Make display_mode and page_size blank
This commit is contained in:
@@ -27,7 +27,7 @@ import {
|
||||
} from 'rxjs'
|
||||
import { Group } from 'src/app/data/group'
|
||||
import {
|
||||
DOCUMENT_DISPLAY_FIELDS,
|
||||
DEFAULT_DOCUMENT_DISPLAY_FIELDS,
|
||||
DisplayMode,
|
||||
DocumentDisplayField,
|
||||
SavedView,
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<a class="btn-link text-decoration-none" header-buttons [routerLink]="[]" (click)="showAll()" i18n>Show all</a>
|
||||
}
|
||||
|
||||
@if (documents.length && savedView.display_mode === DashboardViewMode.TABLE) {
|
||||
@if (documents.length && (!savedView.display_mode || savedView.display_mode === DashboardViewMode.TABLE)) {
|
||||
<table content class="table table-hover mb-0 mt-n2 align-middle">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
@@ -13,7 +13,8 @@ import {
|
||||
DocumentDisplayField,
|
||||
DisplayMode,
|
||||
SavedView,
|
||||
DOCUMENT_DISPLAY_FIELDS,
|
||||
DEFAULT_DOCUMENT_DISPLAY_FIELDS,
|
||||
DEFAULT_PAGE_SIZE,
|
||||
} from 'src/app/data/saved-view'
|
||||
import { ConsumerStatusService } from 'src/app/services/consumer-status.service'
|
||||
import { DocumentService } from 'src/app/services/rest/document.service'
|
||||
@@ -133,7 +134,7 @@ export class SavedViewWidgetComponent
|
||||
this.documentService
|
||||
.listFiltered(
|
||||
1,
|
||||
this.savedView.page_size,
|
||||
this.savedView.page_size ?? DEFAULT_PAGE_SIZE,
|
||||
this.savedView.sort_field,
|
||||
this.savedView.sort_reverse,
|
||||
this.savedView.filter_rules,
|
||||
@@ -250,6 +251,6 @@ export class SavedViewWidgetComponent
|
||||
const id = column.split('_')[2]
|
||||
return this.customFields.find((c) => c.id === parseInt(id))?.name
|
||||
}
|
||||
return DOCUMENT_DISPLAY_FIELDS.find((c) => c.id === column)?.name
|
||||
return DEFAULT_DOCUMENT_DISPLAY_FIELDS.find((c) => c.id === column)?.name
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ import { NgbPopover } from '@ng-bootstrap/ng-bootstrap'
|
||||
import { SETTINGS_KEYS } from 'src/app/data/ui-settings'
|
||||
import { ComponentWithPermissions } from '../../with-permissions/with-permissions.component'
|
||||
import {
|
||||
DOCUMENT_DISPLAY_FIELDS,
|
||||
DEFAULT_DOCUMENT_DISPLAY_FIELDS,
|
||||
DocumentDisplayField,
|
||||
} from 'src/app/data/saved-view'
|
||||
|
||||
@@ -36,7 +36,7 @@ export class DocumentCardLargeComponent extends ComponentWithPermissions {
|
||||
|
||||
@Input()
|
||||
displayFields: Set<DocumentDisplayField | string> = new Set(
|
||||
DOCUMENT_DISPLAY_FIELDS.map((f) => f.id)
|
||||
DEFAULT_DOCUMENT_DISPLAY_FIELDS.map((f) => f.id)
|
||||
)
|
||||
|
||||
@Output()
|
||||
|
||||
@@ -13,7 +13,7 @@ import { NgbPopover } from '@ng-bootstrap/ng-bootstrap'
|
||||
import { SETTINGS_KEYS } from 'src/app/data/ui-settings'
|
||||
import { ComponentWithPermissions } from '../../with-permissions/with-permissions.component'
|
||||
import {
|
||||
DOCUMENT_DISPLAY_FIELDS,
|
||||
DEFAULT_DOCUMENT_DISPLAY_FIELDS,
|
||||
DocumentDisplayField,
|
||||
} from 'src/app/data/saved-view'
|
||||
|
||||
@@ -43,7 +43,7 @@ export class DocumentCardSmallComponent extends ComponentWithPermissions {
|
||||
|
||||
@Input()
|
||||
displayFields: Set<DocumentDisplayField | string> = new Set(
|
||||
DOCUMENT_DISPLAY_FIELDS.map((f) => f.id)
|
||||
DEFAULT_DOCUMENT_DISPLAY_FIELDS.map((f) => f.id)
|
||||
)
|
||||
|
||||
@Output()
|
||||
|
||||
Reference in New Issue
Block a user