diff --git a/eform-client/src/app/plugins/modules/backend-configuration-pn/components/reports/report-table/report-table.component.ts b/eform-client/src/app/plugins/modules/backend-configuration-pn/components/reports/report-table/report-table.component.ts index 1aad37fd..c73faabf 100644 --- a/eform-client/src/app/plugins/modules/backend-configuration-pn/components/reports/report-table/report-table.component.ts +++ b/eform-client/src/app/plugins/modules/backend-configuration-pn/components/reports/report-table/report-table.component.ts @@ -51,12 +51,6 @@ export class ReportTableComponent implements OnInit, OnChanges, OnDestroy { }, {header: this.translateService.stream('Done by'), field: 'doneBy'}, {header: this.translateService.stream('Name'), field: 'itemName'}, - { - header: this.translateService.stream('Actions'), - field: 'actions', - width: '160px', - pinned: 'right', - }, ]; adminTableHeaders: MtxGridColumn[] = [ {header: this.translateService.stream('Id'), field: 'microtingSdkCaseId'}, @@ -72,12 +66,6 @@ export class ReportTableComponent implements OnInit, OnChanges, OnDestroy { {header: this.translateService.stream('Server time'), field: 'serverTime', type: 'date', typeParameter: {format: 'dd.MM.y HH:mm'}}, {header: this.translateService.stream('Done by'), field: 'doneBy'}, {header: this.translateService.stream('Area'), field: 'itemName'}, - { - header: this.translateService.stream('Actions'), - field: 'actions', - width: '160px', - pinned: 'right', - }, ]; mergedTableHeaders: MtxGridColumn[] = []; @@ -126,10 +114,16 @@ export class ReportTableComponent implements OnInit, OnChanges, OnDestroy { }, }; }); + const actionsColumn: MtxGridColumn = { + header: this.translateService.stream('Actions'), + field: 'actions', + width: '160px', + pinned: 'right', + }; if (this.isAdmin) { - this.mergedTableHeaders = [...this.adminTableHeaders, ...itemHeaders]; + this.mergedTableHeaders = [...this.adminTableHeaders, ...itemHeaders, actionsColumn]; } else { - this.mergedTableHeaders = [...this.tableHeaders, ...itemHeaders]; + this.mergedTableHeaders = [...this.tableHeaders, ...itemHeaders, actionsColumn]; } } } diff --git a/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/reports/components/report-table/report-table.component.ts b/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/reports/components/report-table/report-table.component.ts index 0e5d63a1..d35a7b73 100644 --- a/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/reports/components/report-table/report-table.component.ts +++ b/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/reports/components/report-table/report-table.component.ts @@ -46,12 +46,6 @@ export class ReportTableComponent implements OnInit, OnChanges, OnDestroy { {header: this.translateService.stream('Submitted date'), field: 'microtingSdkCaseDoneAt', type: 'date', typeParameter: {format: 'dd.MM.y', timezone: 'utc'}}, {header: this.translateService.stream('Done by'), field: 'doneBy'}, {header: this.translateService.stream('Name'), field: 'itemName'}, - { - header: this.translateService.stream('Actions'), - field: 'actions', - width: '160px', - pinned: 'right', - }, {header: this.translateService.stream('Employee no'), field: 'employeeNo'}, ]; adminTableHeaders: MtxGridColumn[] = [ @@ -63,12 +57,6 @@ export class ReportTableComponent implements OnInit, OnChanges, OnDestroy { {header: this.translateService.stream('Server time'), field: 'serverTime', type: 'date', typeParameter: {format: 'dd.MM.y HH:mm', timezone: 'utc'}}, {header: this.translateService.stream('Done by'), field: 'doneBy'}, {header: this.translateService.stream('Area'), field: 'itemName'}, - { - header: this.translateService.stream('Actions'), - field: 'actions', - width: '160px', - pinned: 'right', - }, {header: this.translateService.stream('Employee no'), field: 'employeeNo'}, ]; mergedTableHeaders: MtxGridColumn[] = []; @@ -119,10 +107,17 @@ export class ReportTableComponent implements OnInit, OnChanges, OnDestroy { let isAdmin = false; this.selectAuthIsAdmin$.subscribe((selectAuthIsAdmin$) => isAdmin = selectAuthIsAdmin$); const tableHeaders = [...(isAdmin ? [...this.adminTableHeaders] : [...this.tableHeaders])]; + const actionsColumn: MtxGridColumn = { + header: this.translateService.stream('Actions'), + field: 'actions', + width: '160px', + pinned: 'right', + }; this.mergedTableHeaders = [ ...tableHeaders, - ...itemHeaders + ...itemHeaders, + actionsColumn ]; } }