From 50a9a89910c386993f0b37da30955ed0eba73e2a Mon Sep 17 00:00:00 2001 From: Sean Engelhardt Date: Mon, 25 Nov 2019 14:39:08 +0100 Subject: [PATCH] Hide mobile list-menus by permission Hides some mobile list menus if the permissions are not sufficient. Change the layout of the assignment mobile list --- .../assignment-list.component.html | 14 ++++++++++-- .../assignment-list.component.scss | 2 ++ .../assignment-list.component.ts | 17 +++++++++++++- .../motion-list/motion-list.component.html | 2 +- .../motion-list/motion-list.component.ts | 14 ++++++++++++ .../services/local-permissions.service.ts | 8 +++++++ .../motions/styles/motion-list-styles.scss | 20 ----------------- client/src/assets/styles/tables.scss | 22 +++++++++++++++++++ 8 files changed, 75 insertions(+), 24 deletions(-) diff --git a/client/src/app/site/assignments/components/assignment-list/assignment-list.component.html b/client/src/app/site/assignments/components/assignment-list/assignment-list.component.html index e90b20ace..6c57a1fff 100644 --- a/client/src/app/site/assignments/components/assignment-list/assignment-list.component.html +++ b/client/src/app/site/assignments/components/assignment-list/assignment-list.component.html @@ -26,6 +26,7 @@ [columns]="tableColumnDefinition" [filterProps]="filterProps" [multiSelect]="isMultiSelect" + [hiddenInMobile]="getColumnsHiddenInMobile()" listStorageKey="assignments" [(selectedRows)]="selectedRows" (dataSourceChange)="onDataSourceChange($event)" @@ -39,14 +40,23 @@ *ngIf="!isMultiSelect" >
- {{ assignment.getListTitle() }} +
+ {{ assignment.getListTitle() }} +
+ + + {{ assignment.phaseString | translate }} + +
- {{ assignment.phaseString | translate }} + + {{ assignment.phaseString | translate }} +
diff --git a/client/src/app/site/assignments/components/assignment-list/assignment-list.component.scss b/client/src/app/site/assignments/components/assignment-list/assignment-list.component.scss index 0871ea8fe..23c147978 100644 --- a/client/src/app/site/assignments/components/assignment-list/assignment-list.component.scss +++ b/client/src/app/site/assignments/components/assignment-list/assignment-list.component.scss @@ -1,3 +1,5 @@ +@import '~assets/styles/tables.scss'; + .mat-chip-wrapper { .mat-standard-chip { height: auto; diff --git a/client/src/app/site/assignments/components/assignment-list/assignment-list.component.ts b/client/src/app/site/assignments/components/assignment-list/assignment-list.component.ts index b6a3e7dcf..81bc5c28a 100644 --- a/client/src/app/site/assignments/components/assignment-list/assignment-list.component.ts +++ b/client/src/app/site/assignments/components/assignment-list/assignment-list.component.ts @@ -10,6 +10,7 @@ import { OperatorService } from 'app/core/core-services/operator.service'; import { StorageService } from 'app/core/core-services/storage.service'; import { AssignmentRepositoryService } from 'app/core/repositories/assignments/assignment-repository.service'; import { PromptService } from 'app/core/ui-services/prompt.service'; +import { ViewportService } from 'app/core/ui-services/viewport.service'; import { BaseListViewComponent } from 'app/site/base/base-list-view'; import { AssignmentFilterListService } from '../../services/assignment-filter.service'; import { AssignmentPdfExportService } from '../../services/assignment-pdf-export.service'; @@ -81,7 +82,8 @@ export class AssignmentListComponent extends BaseListViewComponent