Always display card view on mobile

pull/7882/head
Inga Mai 5 years ago
parent 024996c057
commit 6320c80dd1
  1. 2
      frontend/src/app/modules/work_packages/routing/wp-list/wp-list.component.ts
  2. 2
      frontend/src/app/modules/work_packages/routing/wp-view-base/work-packages-view.base.ts

@ -123,7 +123,7 @@ export class WorkPackagesListComponent extends WorkPackagesViewBase implements O
this.currentQuery = query;
// Update the visible representation
if (this.wpDisplayRepresentation.valueFromQuery(query) === wpDisplayCardRepresentation) {
if (this.deviceService.isMobile || this.wpDisplayRepresentation.valueFromQuery(query) === wpDisplayCardRepresentation) {
this.showListView = false;
} else {
this.showListView = true;

@ -55,6 +55,7 @@ import {WorkPackageViewDisplayRepresentationService} from "core-app/modules/work
import {HalEvent, HalEventsService} from "core-app/modules/hal/services/hal-events.service";
import {HalResourceNotificationService} from "core-app/modules/hal/services/hal-resource-notification.service";
import {WorkPackageNotificationService} from "core-app/modules/work_packages/notifications/work-package-notification.service";
import {DeviceService} from "core-app/modules/common/browser/device.service";
export abstract class WorkPackagesViewBase implements OnInit, OnDestroy {
@ -83,6 +84,7 @@ export abstract class WorkPackagesViewBase implements OnInit, OnDestroy {
readonly cdRef:ChangeDetectorRef = this.injector.get(ChangeDetectorRef);
readonly wpDisplayRepresentation:WorkPackageViewDisplayRepresentationService = this.injector.get(WorkPackageViewDisplayRepresentationService);
readonly halEvents:HalEventsService = this.injector.get(HalEventsService);
readonly deviceService:DeviceService = this.injector.get(DeviceService);
constructor(protected injector:Injector) {

Loading…
Cancel
Save