Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/505 add my projects page #534

Merged
merged 38 commits into from
Jun 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
cd7b8a2
added page and fixed routing
macfleury-2000 Jun 10, 2021
743d9dc
completed surrounding HTML, first try call service
macfleury-2000 Jun 11, 2021
2c0b32a
Updated endpoint for retrieving user projects
RubenFricke Jun 11, 2021
f1c10c8
Added missing method
RubenFricke Jun 11, 2021
ff6f912
Imported missing dependencies
RubenFricke Jun 11, 2021
65040d0
Updated projects to display
RubenFricke Jun 11, 2021
48042bf
Added my projects button
Jun 14, 2021
fe3d68b
First primary version
Jun 14, 2021
aa1f7a8
first primary version
Jun 14, 2021
183b675
added needed functions
Jun 14, 2021
8796a75
added another missing function
Jun 14, 2021
09a81e1
Finished design
Jun 17, 2021
6bb6f67
Revert "Added my projects button"
Jun 17, 2021
05a7fa4
Revert "Revert "Added my projects button""
Jun 17, 2021
5660960
removed pagination an fixed loaded projects
Jun 17, 2021
80a21a1
Styling fixes and updated changelog
Jun 17, 2021
765e32d
fixed routing
Jun 17, 2021
90c104f
Code cleanup
waltersajtos Jun 22, 2021
c82e471
Merge branch 'develop' into feature/505-add-my-projects-page
macfleury-2000 Jun 23, 2021
9005b4f
Merge branch 'develop' into feature/505-add-my-projects-page
macfleury-2000 Jun 25, 2021
a85639d
responsive fix
Jun 25, 2021
d712e06
Merge branch 'feature/505-add-my-projects-page' of https://github.com…
Jun 25, 2021
4580d83
Added comments and removed useless CSS files
Jun 25, 2021
2134162
Revert "Added comments and removed useless CSS files"
Jun 25, 2021
6f212ca
Revert "Revert "Added comments and removed useless CSS files""
Jun 25, 2021
dcf36dc
removed another useless CSS file
Jun 25, 2021
a166408
Fixed trailling whitespace lint error
Jun 25, 2021
6c468c0
Merge branch 'develop' into feature/505-add-my-projects-page
waltersajtos Jun 25, 2021
c52cc03
Removed commented import line
RubenFricke Jun 25, 2021
00f5ac5
linked loading ngIf to the right boolean
niraymak Jun 28, 2021
89d3771
Merge branch 'develop' into feature/505-add-my-projects-page
RubenFricke Jun 28, 2021
3136372
Merge branch 'develop' into feature/505-add-my-projects-page
RubenFricke Jun 29, 2021
04513e9
Fix infinite loading and dropdown menu
waltersajtos Jun 29, 2021
6e349e7
Linter issues
waltersajtos Jun 29, 2021
ba7b9a9
Change title size
waltersajtos Jun 29, 2021
34174f7
Linter issue
waltersajtos Jun 29, 2021
640b4f7
Merge branch 'develop' into feature/505-add-my-projects-page
RubenFricke Jun 29, 2021
ff125db
Merge branch 'develop' into feature/505-add-my-projects-page
RubenFricke Jun 29, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]

### Added
- Added my projects page - [#505](https://github.com/DigitalExcellence/dex-frontend/issues/505)

- Added project images. - [#464](https://github.com/DigitalExcellence/dex-frontend/issues/464)
- Added images to highlights - [#463](https://github.com/DigitalExcellence/dex-frontend/issues/463)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.901.13",
"@angular/cli": "^9.1.13",
"@angular/cli": "^9.1.15",
"@angular/compiler-cli": "^9.1.13",
"@angular/language-service": "^9.1.13",
"@types/jasmine": "^3.6.3",
Expand Down
4 changes: 4 additions & 0 deletions src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ const routes: Routes = [
path: 'project',
loadChildren: () => import('./modules/project/project.module').then((m) => m.ProjectModule),
},
{
path: 'user',
loadChildren: () => import('./modules/user/user.module').then((m) => m.UserModule),
},
{
path: 'account',
loadChildren: () => import('./modules/account/account.module').then((m) => m.AccountModule),
Expand Down
4 changes: 3 additions & 1 deletion src/app/components/app-layout/app-layout.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@
<span class="caret"></span>
</button>
<ul *dropdownMenu aria-labelledby="button-basic" class="dropdown-menu" id="dropdown-basic" role="menu">
<li role="menuitem"><a (click)="onClickSignout()" class="dropdown-item" routerLinkActive="active">Sign Out</a></li>
<li role="menuitem"> <a class="dropdown-item" routerLink="user/projects">My Projects</a></li>
<li role="menuitem"><a (click)="onClickSignout()" class="dropdown-item">Sign Out</a></li>

</ul>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions src/app/components/app-layout/app-layout.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@
below each other
*/
.profile-dropdown {
z-index: 9;
@include media-breakpoint-down(sm) {
flex-direction: column;
}
Expand Down
5 changes: 5 additions & 0 deletions src/app/components/app-layout/app-layout.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@ export class AppLayoutComponent implements OnInit {
this.displayBetaBanner = true;
}


public viewUserProjects() {
this.router.navigate(['user/projects']);
}

/**
* Method which triggers when the user clicks on the burger menu in the header.
* Toggles the navbar visibility
Expand Down
1 change: 0 additions & 1 deletion src/app/modules/project/overview/overview.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ export class OverviewComponent implements OnInit, AfterViewInit {
public projectsToDisplay: Project[] = [];
public projectsTotal: Project[] = [];


/**
* Determine whether we need to render a list or cart view
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ <h3 class="project-name">{{ project.name }}</h3>
</ng-template>
</div>
<div (click)="userClicked($event)" class="item project-user-name disabled"><em class="fas fa-user"></em> {{ project.user.name }}</div>
</div>
</div>
</ng-container>

<!-- Grid Project-->
Expand Down
80 changes: 80 additions & 0 deletions src/app/modules/user/user-projects/user-projects.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
<!--

Digital Excellence Copyright (C) 2020 Brend Smits

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
by the Free Software Foundation version 3 of the License.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Lesser General Public License for more details.

You can find a copy of the GNU Lesser General Public License
along with this program, in the LICENSE.md file in the root project directory.
If not, see https://www.gnu.org/licenses/lgpl-3.0.txt
-->

<div class="row">


<div class="col-md projects-overview-wrapper">
<div class="project-list-header">
<h1 class="">My projects</h1>

<div class="list-view-toggle">
<label class="container">
<input [(ngModel)]="showListView" [value]="false" aria-label="Switch to grid view" name="list-view" type="radio"/>
<span class="checkmark grid">
<svg>
<use xlink:href="assets/images/grid-icon.svg#img"></use>
</svg>
</span>
</label>
<label class="container">
<input [(ngModel)]="showListView" [value]="true" aria-label="Switch to list view" checked="checked" name="list-view" type="radio"/>
<span class="checkmark list">
<svg>
<use xlink:href="assets/images/list-icon.svg#img"></use>
</svg>
</span>
</label>
</div>
</div>

<div class="userinfo">
<img alt="" class="profile-picture" loading="lazy" src="assets/images/profile-placeholder.png" />
<div class="usercreds">
<h3> {{ userName }} </h3>
<div class="user-amounts">
<div class="grid-item"><p>Projects:</p></div>
<div class="grid-item"><p>{{ userprojects.length }}</p></div>

</div>
</div>
</div>

<ng-container *ngIf="projectsLoading; else projectsLoading">
<div class="project-list-wrapper" [ngClass]="this.showListView ? 'list' : 'grid'">
<app-project
(click)="onClickProject($event, project.id, project.name)"
*ngFor="let project of userprojects"
[project]="project"
[showListView]="this.showListView"
>
</app-project>
</div>
</ng-container>

<ng-container *ngIf="projectsEmpty()">
<h3>No projects found</h3>
<button class="primary" (click)="addProjectClicked()">Create project</button>
</ng-container>

<ng-template #projectsLoading>
<h2 class="fas fa-spinner fa-pulse loading-circle" *ngIf="userProjectsLoading"></h2>
<p *ngIf="!userProjectsLoading">There are no projects available.</p>
</ng-template>
</div>
</div>
Loading