tnx-shared 5.1.188 → 5.1.192
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/tnx-shared.umd.js +123 -34
- package/bundles/tnx-shared.umd.js.map +1 -1
- package/bundles/tnx-shared.umd.min.js +1 -1
- package/bundles/tnx-shared.umd.min.js.map +1 -1
- package/classes/base/data-list-base.d.ts +1 -1
- package/classes/base/data-list-base.d.ts.map +1 -1
- package/classes/base/list-base.d.ts +6 -7
- package/classes/base/list-base.d.ts.map +1 -1
- package/classes/base/tree-list-base.d.ts +3 -3
- package/classes/base/tree-list-base.d.ts.map +1 -1
- package/components/crud/crud-list/crud-list.component.d.ts +2 -2
- package/components/crud/crud-list/crud-list.component.d.ts.map +1 -1
- package/components/crud/tree-table/tree-table.component.d.ts +9 -1
- package/components/crud/tree-table/tree-table.component.d.ts.map +1 -1
- package/esm2015/classes/base/data-list-base.js +2 -2
- package/esm2015/classes/base/list-base.js +11 -6
- package/esm2015/classes/base/tree-list-base.js +6 -5
- package/esm2015/components/crud/crud-list/crud-list.component.js +5 -5
- package/esm2015/components/crud/tree-table/tree-table.component.js +85 -14
- package/fesm2015/tnx-shared.js +100 -23
- package/fesm2015/tnx-shared.js.map +1 -1
- package/package.json +2 -2
- package/tnx-shared.metadata.json +1 -1
|
@@ -22072,9 +22072,9 @@
|
|
|
22072
22072
|
{ type: i0.Component, args: [{
|
|
22073
22073
|
// tslint:disable-next-line: component-selector
|
|
22074
22074
|
selector: 'crud-list',
|
|
22075
|
-
template: "<div #container class=\"custom-card card card-w-title flex-container-fit-child\" [attr.height-type]=\"setting.heightType\"\r\n [ngStyle]=\"_style\">\r\n <div class=\"ui-helper-clearfix crud-list-header-area\">\r\n <div *ngIf=\"searchCustom\" class=\"p-grid ui-fluid custom-p-col custom-search-area\">\r\n <div class=\"p-col-12 main-container-search\">\r\n <div class=\"p-grid main-container-search-inner\">\r\n <ng-container>\r\n <ng-container *ngTemplateOutlet=\"searchCustom; context: {$implicit: this}\"></ng-container>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!setting.hiddenHeader\" class=\"p-grid ui-fluid custom-p-col page-title-area\">\r\n <div *ngIf=\"!setting.hiddenPageTitle\" class=\"main-title\">\r\n <h1 *ngIf=\"!hasTemplate('customTitle')\">\r\n {{setting.title != null ? setting.title : 'Danh s\u00E1ch ' + setting.objectName}}\r\n </h1>\r\n\r\n <ng-container *ngIf=\"hasTemplate('customTitle')\" [ngTemplateOutlet]=\"getTemplate('customTitle')\"\r\n [ngTemplateOutletContext]=\"{crudList: this}\">\r\n </ng-container>\r\n </div>\r\n\r\n <div *ngIf=\"!setting.hiddenPageSetting\" class=\"paginator-table\">\r\n <paging-next-back-only [model]=\"model\" [setting]=\"setting\" (onChanged)=\"getData()\"\r\n (onChangeLimitPage)=\"savePageSize()\">\r\n </paging-next-back-only>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"fit-content crud-list-body-area\">\r\n <div class=\"crud-list-body-area-inner\" style=\"overflow: unset;\">\r\n <div class=\"flex-container-fit-child\" style=\"overflow: unset;\">\r\n <div *ngIf=\"!setting.hiddenToolbar\" class=\"p-grid crudListToolbar\">\r\n <ng-container>\r\n <div *ngIf=\"!setting.hiddenButtons && hasTemplate('toolbar')\"\r\n [ngClass]=\"setting.hiddenAdvanceSearch ? 'p-md-12 p-lg-12' : 'p-md-7 p-lg-8'\"\r\n class=\"p-col-12 button-group function-topbar custom-toolbar\">\r\n <ng-container\r\n [ngTemplateOutletContext]=\"{selectedItems: model.selectedItems, crudList: this}\"\r\n [ngTemplateOutlet]=\"getTemplate('toolbar')\"></ng-container>\r\n </div>\r\n <div *ngIf=\"!setting.hiddenButtons && !hasTemplate('toolbar')\"\r\n [ngClass]=\"setting.hiddenAdvanceSearch ? 'p-md-12 p-lg-12' : 'p-md-7 p-lg-8'\"\r\n class=\"p-col-12 button-group function-topbar\">\r\n <button *ngIf=\"!hiddenAdd\" type=\"button\" pButton pRipple label=\"Th\u00EAm m\u1EDBi\" icon=\"pi pi-plus\"\r\n class=\"p-button-text\" [disabled]=\"!model.baseReady\" (click)=\"add()\"></button>\r\n <button *ngIf=\"setting.showExportSelectedItems && model.selectedItems.length > 0\"\r\n type=\"button\" pButton pRipple\r\n label=\"Xu\u1EA5t c\u00E1c m\u1EE5c \u0111\u00E3 ch\u1ECDn ({{model.selectedItems.length}})\" icon=\"fas fa-file-excel\"\r\n class=\"p-button-text p-button-success\" (click)=\"xuatCacMucDaChon()\"></button>\r\n <button *ngIf=\"!hiddenDelete && model.selectedItems.length > 0 && !disableMultipleDelete()\"\r\n type=\"button\" pButton pRipple\r\n label=\"{{ 'X\u00F3a' | translate }} ({{model.selectedItems.length}})\" icon=\"pi pi-trash\"\r\n class=\"p-button-text p-button-danger\" (click)=\"deleteMutiple()\"></button>\r\n <button *ngIf=\"!setting.disableShare && model.selectedItems.length > 0\"\r\n label=\"Chia s\u1EBB li\u00EAn k\u1EBFt\" type=\"button\" pButton pRipple\r\n [pTooltip]=\"'Chia s\u1EBB li\u00EAn k\u1EBFt' | translate\" tooltipPosition=\"top\"\r\n class=\"p-button-text p-button-info link-or-action\" icon=\"pi pi-link\"\r\n (click)=\"createShareLinkMultiple()\"></button>\r\n <ng-container [ngTemplateOutlet]=\"getTemplate('buttonAfterToolbar')\"\r\n [ngTemplateOutletContext]=\"{crudList: this}\"></ng-container>\r\n </div>\r\n </ng-container>\r\n <div *ngIf=\"!setting.hiddenAdvanceSearch\" class=\"p-col-12 advance-search-container\"\r\n [ngClass]=\"setting.hiddenButtons ? 'p-md-12 p-lg-12' : 'p-md-5 p-lg-4'\">\r\n <advance-search #advanceSearch [parentSetting]=\"setting\" [searchInfo]=\"searchInfo\"\r\n [loading]=\"model.loading\" (onSearch)=\"handleSearchAdvs($event)\"\r\n (onInit)=\"handleInitAdvanceSearch($event)\">\r\n </advance-search>\r\n </div>\r\n </div>\r\n <div *ngIf=\"hasTemplate('topGrid')\" class=\"extend-content-top-grid\">\r\n <ng-container [ngTemplateOutletContext]=\"{selectedItems: model.selectedItems, crudList: this}\"\r\n [ngTemplateOutlet]=\"getTemplate('topGrid')\"></ng-container>\r\n </div>\r\n <div class=\"container-table fit-content\" [class.--table-responsive]=\"responsive\">\r\n <div class=\"container-table-inner\">\r\n <ng-container *ngIf=\"!_groupField\">\r\n <tn-custom-scrollbar *ngIf=\"showScrollBar\" #scrollbar [config]=\"configScrollBar\"\r\n [showScrollHorizontal]=\"showScrollHorizontal\">\r\n <ng-container *ngTemplateOutlet=\"tableGetGroupFieldFalse\">\r\n </ng-container>\r\n <ng-container *ngIf=\"hasTemplate('afterCrudList')\">\r\n <ng-container [ngTemplateOutlet]=\"hasTemplate('afterCrudList')\"></ng-container>\r\n </ng-container>\r\n </tn-custom-scrollbar>\r\n <div *ngIf=\"!showScrollBar\">\r\n <ng-container *ngTemplateOutlet=\"tableGetGroupFieldFalse\">\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"_groupField\">\r\n <tn-custom-scrollbar *ngIf=\"showScrollBar\" #scrollbar [config]=\"configScrollBar\"\r\n [showScrollHorizontal]=\"showScrollHorizontal\">\r\n <ng-container *ngTemplateOutlet=\"tableGetGroupFieldTrue\">\r\n </ng-container>\r\n <ng-container *ngIf=\"hasTemplate('afterCrudList')\">\r\n <ng-container [ngTemplateOutlet]=\"getTemplate('afterCrudList')\"></ng-container>\r\n </ng-container>\r\n </tn-custom-scrollbar>\r\n <div *ngIf=\"!showScrollBar\">\r\n <ng-container *ngTemplateOutlet=\"tableGetGroupFieldTrue\">\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n\r\n <div class=\"table-border-line --top\"></div>\r\n <div class=\"table-border-line --right\"></div>\r\n <div class=\"table-border-line --bottom\"></div>\r\n <div class=\"table-border-line --left\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n<after-view-checked (loaded)=\"handleReady()\"></after-view-checked>\r\n<settings *ngIf=\"_showSettings && !setting.hiddenSetting\" [entityMetadataService]=\"entityMetadataService\"\r\n [parentContext]=\"context\" [parentSetting]=\"setting\" [parentModel]=\"model\" (onSave)=\"onSaveSettings($event)\"\r\n (onCancel)=\"_showSettings = false\">\r\n</settings>\r\n<settings-row *ngIf=\"_showSettingsRowColor && !setting.hiddenSetting\" [entityMetadataService]=\"entityMetadataService\"\r\n [parentContext]=\"context\" [parentSetting]=\"setting\" [parentModel]=\"model\" (onSave)=\"onSaveColorSettings($event)\"\r\n (onCancel)=\"_showSettingsRowColor = false\">\r\n</settings-row>\r\n<workflow-setting-dialog *ngIf=\"_showSettingsWorkflow && !setting.hiddenSettingWorkflow\" [parentSetting]=\"setting\"\r\n [parentContext]=\"context\" [parentModel]=\"model\" (onSaved)=\"onSaveWorkflowSettings($event)\"\r\n (onRemoved)=\"onRemoveWorkflowSettings($event)\" (onCancel)=\"_showSettingsWorkflow = false\"></workflow-setting-dialog>\r\n<tn-dialog *ngIf=\"workflowSettingModel.showEditForm\" [header]=\"'C\u1EA5u h\u00ECnh quy tr\u00ECnh nghi\u1EC7p v\u1EE5' | translate\"\r\n [popupSize]=\"workflowSettingModel.popupSize\" (onHide)=\"workflowSettingModel.showEditForm = false\">\r\n <workflow-setting-new #formBase [parentSetting]=\"setting\" (onSaved)=\"onSaveWorkflowSettingsNew($event)\"\r\n (onCancel)=\"workflowSettingModel.showEditForm = false\"></workflow-setting-new>\r\n</tn-dialog>\r\n<entity-permission *ngIf=\"_showSettingsPermission && !setting.hiddenSettingPermission\" [parentSetting]=\"setting\"\r\n [parentContext]=\"context\" [parentModel]=\"model\" [searchInfo]=\"searchInfo\"\r\n (onCancel)=\"_showSettingsPermission = false\">\r\n</entity-permission>\r\n<p-contextMenu #contextMenu [appendTo]=\"'body'\" [model]=\"buttonContexts\">\r\n</p-contextMenu>\r\n<tn-dialog *ngIf=\"processWorkflowModel.showEditForm\" #dialog [header]=\"processWorkflowModel.header | translate\"\r\n [popupSize]=\"processWorkflowModel.popupSize\" [scrollBarStyleClass]=\"'fit-content'\"\r\n (onHide)=\"processWorkflowModel.showEditForm = false\">\r\n <div style=\"height: 100%; padding: 1rem\">\r\n <process-workflow-form #formBase [businessSetting]=\"processWorkflowModel.data.setting\" [item]=\"currentItem\"\r\n [workflow]=\"processWorkflowModel.data.workflow\" [action]=\"processWorkflowModel.data.action\"\r\n (onSaved)=\"handleProcessedWorkflowBase()\" (onCancel)=\"processWorkflowModel.showEditForm = false\">\r\n </process-workflow-form>\r\n </div>\r\n</tn-dialog>\r\n<tn-dialog *ngIf=\"choYKienModel.showEditForm\" #dialog [header]=\"choYKienModel.header | translate\"\r\n [popupSize]=\"choYKienModel.popupSize\" [scrollBarStyleClass]=\"'fit-content'\"\r\n (onHide)=\"choYKienModel.showEditForm = false\">\r\n <div style=\"height: 100%\">\r\n <cho-y-kien-form #formBase [bussinessSetting]=\"choYKienModel.data.setting\"\r\n [rowItem]=\"choYKienModel.data.rowData\" (onSaved)=\"choYKienModel.showEditForm = false\"\r\n (onCancel)=\"choYKienModel.showEditForm = false\">\r\n </cho-y-kien-form>\r\n </div>\r\n</tn-dialog>\r\n<tn-dialog *ngIf=\"workflowHistoryModel.showEditForm\" #dialog [header]=\"workflowHistoryModel.header | translate\"\r\n [popupSize]=\"workflowHistoryModel.popupSize\" [scrollBarStyleClass]=\"'fit-content'\"\r\n (onHide)=\"workflowHistoryModel.showEditForm = false\">\r\n <div style=\"height: 100%\">\r\n <workflow-history-new #formBase [businessSetting]=\"workflowHistoryModel.data.setting\"\r\n [tableName]=\"workflowHistoryModel.data.tableName\" [item]=\"currentItem\"\r\n [workflowSetting]=\"workflowHistoryModel.data.workflowSetting\"\r\n (onCancel)=\"workflowHistoryModel.showEditForm = false\">\r\n </workflow-history-new>\r\n </div>\r\n</tn-dialog>\r\n<tn-dialog *ngIf=\"detailTaskModel.showEditForm\" #dialog [header]=\"detailTaskModel.header | translate\"\r\n [popupSize]=\"detailTaskModel.popupSize\" [scrollBarStyleClass]=\"'fit-content'\"\r\n (onHide)=\"detailTaskModel.showEditForm = false\">\r\n <base-congviec-form #formBase [model]=\"detailTaskModel.data.taskFormModel\" [forceOnlyView]=\"true\"\r\n (onCancel)=\"detailTaskModel.showEditForm = false\">\r\n </base-congviec-form>\r\n</tn-dialog>\r\n\r\n<!-- <tn-dialog *ngIf=\"showDetailForm\" #dialog [styleClass]=\"'congviec-form tn-form-dialog'\"\r\n [header]=\"setting.popupHeader | translate\" [popupSize]=\"setting.popupSize\" (onHide)=\"showDetailForm = false\">\r\n <base-congviec-form #formBase [parentModel]=\"model\" [parentSetting]=\"setting\" [parentContext]=\"context\"\r\n [model]=\"formModel\" [crudList]=\"crudList\" (onSaved)=\"showDetailForm = false;crudList.reload()\"\r\n (onCancel)=\"_handleCancel($event)\" (onAfterSaved)=\"onAfterSaved($event)\">\r\n </base-congviec-form>\r\n</tn-dialog> -->\r\n\r\n<tn-dialog *ngIf=\"permissionSharingModel.showEditForm\" #dialog [header]=\"permissionSharingModel.header | translate\"\r\n [popupSize]=\"permissionSharingModel.popupSize\" [scrollBarStyleClass]=\"'fit-content'\"\r\n (onHide)=\"permissionSharingModel.showEditForm = false\">\r\n <div style=\"height: 100%\">\r\n <permission-sharing #formBase [item]=\"rowDataCurrent\" [baseService]=\"setting.baseService\"\r\n (onCancel)=\"permissionSharingModel.showEditForm = false\">\r\n </permission-sharing>\r\n </div>\r\n</tn-dialog>\r\n<tn-dialog *ngIf=\"permissionListModel.showEditForm\" #dialog [header]=\"permissionListModel.header | translate\"\r\n [popupSize]=\"permissionListModel.popupSize\" [scrollBarStyleClass]=\"'fit-content'\" [useDefaultScrollBar]=\"true\"\r\n (onHide)=\"permissionListModel.showEditForm = false\">\r\n <div style=\"height: 100%\">\r\n <workflow-permission #formBase [item]=\"rowDataCurrent\" [businessSetting]=\"setting\"\r\n (onCancel)=\"permissionListModel.showEditForm = false\">\r\n </workflow-permission>\r\n </div>\r\n</tn-dialog>\r\n<workflow-history-dialog *ngIf=\"showHistoryWorkflow\" [baseService]=\"setting.baseService\" [item]=\"currentItem\"\r\n [workflowSetting]=\"setting.workflowSetting\" (onHide)=\"handleHideHistoryWorkflow()\">\r\n</workflow-history-dialog>\r\n<tn-dialog *ngIf=\"startWorkflowModel.showEditForm\" #dialog [header]=\"startWorkflowModel.header | translate\"\r\n [popupSize]=\"startWorkflowModel.popupSize\" [scrollBarStyleClass]=\"'fit-content'\"\r\n (onHide)=\"startWorkflowModel.showEditForm = false\">\r\n <div style=\"height: 100%\">\r\n <start-workflow #formBase [workflows]=\"startWorkflowModel.data.workflows\"\r\n [defaultWorkflow]=\"startWorkflowModel.data.defaultWorkflow\"\r\n (onCancel)=\"startWorkflowModel.showEditForm = false\" (onSaved)=\"handleStartWorkflowFromDialog($event)\">\r\n </start-workflow>\r\n </div>\r\n</tn-dialog>\r\n<tn-dialog *ngIf=\"congViecModel.showEditForm\" #dialog [styleClass]=\"'congviec-form tn-form-dialog'\"\r\n [header]=\"congViecModel.header | translate\" [popupSize]=\"congViecModel.popupSize\"\r\n (onHide)=\"congViecModel.showEditForm = false\">\r\n <base-congviec-form #formBase [parentSetting]=\"congViecModel.data.congViecSetting\"\r\n [model]=\"congViecModel.data.model\" (onSaved)=\"congViecModel.showEditForm = false;getData()\"\r\n (onCancel)=\"congViecModel.showEditForm = false\">\r\n </base-congviec-form>\r\n</tn-dialog>\r\n<tn-dialog *ngIf=\"shareLinkModel.showEditForm\" #dialog [styleClass]=\"'congviec-form tn-form-dialog'\"\r\n [header]=\"shareLinkModel.header | translate\" [popupSize]=\"shareLinkModel.popupSize\" [useDefaultScrollBar]=\"true\"\r\n (onHide)=\"shareLinkModel.showEditForm = false\">\r\n <share-link-by-permission #formBase [setting]=\"setting\" [lstItem]=\"shareLinkModel.data.lstItem\"\r\n (onCancel)=\"congViecModel.showEditForm = false\">\r\n </share-link-by-permission>\r\n</tn-dialog>\r\n<ng-template #tableGetGroupFieldFalse>\r\n <p-table #table [dataKey]=\"'id'\" [scrollable]=\"pTableScrollable\" [scrollHeight]=\"pTableScrollHeight\"\r\n [columns]=\"setting.cols\" [paginator]=\"false\" [value]=\"_dataSource\" (onSort)=\"onSort($event, table)\"\r\n [class]=\"_tableClass\" [responsive]=\"responsive\" [lazy]=\"lazy\" [loading]=\"model.loading\"\r\n [(selection)]=\"model.selectedItems\" (onRowReorder)=\"handleRowOrdered($event)\">\r\n <ng-template *ngIf=\"header\" pTemplate=\"header\" let-columns>\r\n <ng-container\r\n *ngTemplateOutlet=\"header, context: {$implicit: columns, crudList: this, rowHeaderFilter: rowHeaderFilter, contentTh: contentTh, containerSticky: containerSticky, funcCheckAll: handleCheckAll}\">\r\n </ng-container>\r\n </ng-template>\r\n <ng-template *ngIf=\"!header\" pTemplate=\"header\" let-columns>\r\n <ng-container *ngTemplateOutlet=\"trHeader; context: {$implicit: columns, funcCheckAll: handleCheckAll}\">\r\n </ng-container>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-rowData let-columns=\"columns\" let-index=\"rowIndex\" let-expanded=\"expanded\">\r\n <ng-container\r\n *ngTemplateOutlet=\"trBody; context: {$implicit: rowData, columns: columns, index: index, expanded: expanded, eventSelectRow: handleSelectRow, eventChecked: handleCheckRowData}\">\r\n </ng-container>\r\n <after-view-checked *ngIf=\"index == _dataSource.length - 1\" style=\"display: none;\" [renderKey]=\"_dataSource\"\r\n (loaded)=\"handleTableRendered()\">\r\n </after-view-checked>\r\n </ng-template>\r\n <ng-template *ngIf=\"rowExpansion\" pTemplate=\"rowexpansion\" let-rowData let-expanded=\"expanded\">\r\n <ng-container\r\n *ngTemplateOutlet=\"rowExpansion; context: {rowData: rowData, expanded: expanded, getColSpanGroup: getColSpanGroup}\">\r\n </ng-container>\r\n </ng-template>\r\n <ng-template *ngIf=\"summary\" pTemplate=\"summary\">\r\n <ng-container *ngTemplateOutlet=\"summary\"></ng-container>\r\n </ng-template>\r\n <ng-template *ngIf=\"footer\" pTemplate=\"footer\" let-columns>\r\n <ng-container *ngTemplateOutlet=\"footer; context: {$implicit: columns}\"></ng-container>\r\n </ng-template>\r\n <ng-template *ngIf=\"colgroup\" pTemplate=\"colgroup\" let-columns>\r\n <ng-container *ngTemplateOutlet=\"colgroup; context: {$implicit: columns}\"></ng-container>\r\n </ng-template>\r\n </p-table>\r\n</ng-template>\r\n<ng-template #tableGetGroupFieldTrue>\r\n <p-table #tableGroup [scrollable]=\"pTableScrollable\" [scrollHeight]=\"pTableScrollHeight\" [columns]=\"setting.cols\"\r\n [paginator]=\"false\" [value]=\"_dataSource\" [metaKeySelection]=\"false\" (onSort)=\"onSort($event, tableGroup)\"\r\n [class]=\"_tableClass\" [customSort]=\"true\" [responsive]=\"responsive\" [lazy]=\"true\" [loading]=\"model.loading\"\r\n [(selection)]=\"model.selectedItems\" [expandedRowKeys]=\"model.expandedRowKeys\" [dataKey]=\"_groupField\">\r\n <ng-template *ngIf=\"header\" pTemplate=\"header\" let-columns>\r\n <ng-container\r\n *ngTemplateOutlet=\"header, context: {$implicit: columns, crudList: this, rowHeaderFilter: rowHeaderFilter, contentTh: contentTh, containerSticky: containerSticky, funcCheckAll: handleCheckAll_Group}\">\r\n </ng-container>\r\n </ng-template>\r\n <ng-template *ngIf=\"!header\" pTemplate=\"header\" let-columns>\r\n <ng-container\r\n *ngTemplateOutlet=\"trHeader; context: {$implicit: columns, funcCheckAll: handleCheckAll_Group}\">\r\n </ng-container>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-rowData let-rowIndex=\"rowIndex\" let-expanded=\"expanded\" let-columns=\"columns\">\r\n <tr *ngIf=\"rowGroupMetadata[rowData[_groupField]] && rowGroupMetadata[rowData[_groupField]].index == rowIndex\"\r\n class=\"p-widget-header group-row\" style=\"border: 0px; border-bottom: 1px solid #eee\">\r\n <td *ngIf=\"!setting.hiddenCheckbox\" class=\"center chkbox\" [class.sticky]=\"setting.stickyColumn\">\r\n <p-checkbox [(ngModel)]=\"rowGroupChecked[rowData[_groupField]]\" binary=\"true\"\r\n (onChange)=\"handleCheckRowGroup(rowData)\">\r\n </p-checkbox>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n <ng-container *ngIf=\"!rowGroup\">\r\n <td [colSpan]=\"getColSpanGroup()\" [class]=\"_classRowGroup\">\r\n <div class=\"container-row-group\">\r\n <a href=\"javascript:;\" [pRowToggler]=\"rowData\" class=\"container-row-group-toggle\"\r\n [class.sticky]=\"setting.stickyColumn\">\r\n <i style=\"margin-right:5px\"\r\n [ngClass]=\"expanded ? 'fas fa-fw fa-caret-down' : 'fas fa-fw fa-caret-right'\"></i>\r\n <span class=\"content-row-group\">\r\n <ng-container *ngIf=\"!contentRowGroup\">\r\n <ng-container [ngTemplateOutlet]=\"_contentRowGroup\"\r\n [ngTemplateOutletContext]=\"getContextRowGroup(rowData)\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"contentRowGroup\">\r\n <ng-container [ngTemplateOutlet]=\"contentRowGroup\"\r\n [ngTemplateOutletContext]=\"getContextRowGroup(rowData)\">\r\n </ng-container>\r\n </ng-container>\r\n </span>\r\n </a>\r\n </div>\r\n </td>\r\n </ng-container>\r\n <ng-container *ngIf=\"rowGroup\">\r\n <ng-container [ngTemplateOutlet]=\"rowGroup\"\r\n [ngTemplateOutletContext]=\"getContextRowGroupRoot(rowData, expanded)\">\r\n </ng-container>\r\n </ng-container>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"rowexpansion\" let-columns=\"columns\" let-rowData let-index=\"rowIndex\">\r\n <ng-container\r\n *ngTemplateOutlet=\"trBody; context: {$implicit: rowData, columns: columns, index: index, expanded: false, eventSelectRow: handleSelectRowGroup, eventChecked: handleCheckRowData_Group}\">\r\n </ng-container>\r\n <after-view-checked *ngIf=\"index == _dataSource.length - 1\" style=\"display: none;\" [renderKey]=\"_dataSource\"\r\n (loaded)=\"handleTableRendered()\">\r\n </after-view-checked>\r\n </ng-template>\r\n <ng-template *ngIf=\"summary\" pTemplate=\"summary\">\r\n <ng-container *ngTemplateOutlet=\"summary\"></ng-container>\r\n </ng-template>\r\n <ng-template *ngIf=\"footer\" pTemplate=\"footer\" let-columns>\r\n <ng-container *ngTemplateOutlet=\"footer; context: {$implicit: columns}\"></ng-container>\r\n </ng-template>\r\n <ng-template *ngIf=\"colgroup\" pTemplate=\"colgroup\" let-columns>\r\n <ng-container *ngTemplateOutlet=\"colgroup; context: {$implicit: columns}\"></ng-container>\r\n </ng-template>\r\n </p-table>\r\n <after-view-checked></after-view-checked>\r\n</ng-template>\r\n<ng-template #trHeader let-columns let-funcCheckAll=\"funcCheckAll\">\r\n <tr class=\"title-row\">\r\n <ng-container *ngIf=\"!setting.hiddenCheckbox\">\r\n <th [style.width]=\"widthCheckbox\" class=\"chkbox link-or-action cell-checkbox\"\r\n [class.sticky]=\"setting.stickyColumn\">\r\n <button *ngIf=\"!hasTemplate('headerCheckbox')\" type=\"button\" pButton pRipple icon=\"pi pi-refresh\"\r\n class=\"p-button-rounded p-button-text btnReload\" pTooltip=\"L\u00E0m m\u1EDBi d\u1EEF li\u1EC7u\" tooltipPosition=\"top\"\r\n [disabled]=\"model.loading\" (click)=\"reload()\"></button>\r\n <ng-container *ngIf=\"hasTemplate('headerCheckbox')\">\r\n <ng-container [ngTemplateOutletContext]=\"{crudList: this}\"\r\n [ngTemplateOutlet]=\"getTemplate('headerCheckbox')\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n </ng-container>\r\n <th *ngIf=\"!setting.hiddenOrderColumn\" [style.width]=\"widthOrderColumn\" class=\"stt nopad center\"\r\n [class.sticky]=\"setting.stickyColumn\">\r\n {{ 'TT' |translate}}\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n <th *ngIf=\"rowExpansion\" class=\"nopad row-expansion-toggle center\" style=\"width: 2.5rem\"\r\n [class.sticky]=\"setting.stickyColumn\">\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n <ng-container *ngFor=\"let col of columns; let i = index\">\r\n <th *ngIf=\"col && col.visible && col.field!='function'\" [ngStyle]=\"col.extendData.headerStyle\"\r\n [pTooltip]=\"col.fullLabel\" tooltipStyleClass=\"unset-width\" [class]=\"col.extendData.headerClass\"\r\n [class.first-th]=\"i==0\" [escape]=\"false\" tooltipPosition=\"top\" [tnSortableColumn]=\"col.field\">\r\n <ng-container *ngTemplateOutlet=\"contentTh; context: {$implicit: col}\"></ng-container>\r\n <ng-container *ngIf=\"col.sort || col.sortClient\">\r\n <ng-container *ngTemplateOutlet=\"sortIcon; context: {field: col.field}\"></ng-container>\r\n </ng-container>\r\n </th>\r\n </ng-container>\r\n <th *ngIf=\"enableReorderRow\" style=\"width: 30px\">\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n <ng-container *ngTemplateOutlet=\"colFunctionHeader\"></ng-container>\r\n </tr>\r\n <ng-container *ngTemplateOutlet=\"rowHeaderFilter; context: {columns: columns, funcCheckAll: funcCheckAll}\">\r\n </ng-container>\r\n</ng-template>\r\n<ng-template #rowHeaderFilter let-columns=\"columns\" let-funcCheckAll=\"funcCheckAll\">\r\n <tr class=\"filter-row\" *ngIf=\"!setting.hiddenFilterRow\">\r\n <th *ngIf=\"!setting.hiddenCheckbox\" class=\"chkbox nopad center\" [class.sticky]=\"setting.stickyColumn\"\r\n [class.tricheckbox-custom-false]=\"checkedAll === false\" [style.width]=\"widthCheckbox\">\r\n <p-triStateCheckbox [(ngModel)]=\"checkedAll\" binary=\"true\" (onChange)=\"funcCheckAll()\">\r\n </p-triStateCheckbox>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n <th *ngIf=\"!setting.hiddenOrderColumn\" class=\"stt center v-top\" [class.sticky]=\"setting.stickyColumn\">\r\n <div *ngIf=\"!setting.hiddenSetting\" class=\"pick-color-row\" pTooltip=\"C\u1EA5u h\u00ECnh hi\u1EC3n th\u1ECB m\u00E0u\"\r\n tooltipPosition=\"top\" (click)=\"showSettingRowColor()\">\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n </div>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n <th *ngIf=\"rowExpansion\" class=\"nopad center row-expansion-toggle\" [class.sticky]=\"setting.stickyColumn\">\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n <ng-container *ngFor=\"let col of columns; let i = index\">\r\n <th *ngIf=\"col.visible && col.field != 'function'\" class=\"cell-header-filter center\">\r\n <ng-container *ngIf=\"col.allowFilter\">\r\n <ng-container *ngIf=\"col.templateFilter\">\r\n <ng-container [ngTemplateOutlet]=\"col.templateFilter\"\r\n [ngTemplateOutletContext]=\"{col: col, filterData: filterData, onSearch: onSearch, onShowFilterDropdownPanel: onShowFilterDropdownPanel, onHideFilterDropdownPanel: onHideFilterDropdownPanel}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"!col.templateFilter\" [ngSwitch]=\"col.controlType\">\r\n <ng-container *ngSwitchCase=\"'dropdown'\">\r\n <ng-container [ngTemplateOutlet]=\"filterDropdown\"\r\n [ngTemplateOutletContext]=\"{col: col.rawColumn}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'number'\">\r\n <ng-container [ngTemplateOutlet]=\"filterNumber\" [ngTemplateOutletContext]=\"{col: col}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'date'\">\r\n <ng-container [ngTemplateOutlet]=\"filterDate\" [ngTemplateOutletContext]=\"{col: col}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'datetime'\">\r\n <ng-container [ngTemplateOutlet]=\"filterDate\" [ngTemplateOutletContext]=\"{col: col}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <ng-container [ngSwitch]=\"col.dataType\">\r\n <ng-container *ngSwitchCase=\"'int'\">\r\n <ng-container [ngTemplateOutlet]=\"filterNumber\"\r\n [ngTemplateOutletContext]=\"{col: col}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'decimal'\">\r\n <ng-container [ngTemplateOutlet]=\"filterNumber\"\r\n [ngTemplateOutletContext]=\"{col: col}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'date'\">\r\n <ng-container [ngTemplateOutlet]=\"filterDate\"\r\n [ngTemplateOutletContext]=\"{col: col}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'datetime'\">\r\n <ng-container [ngTemplateOutlet]=\"filterDate\"\r\n [ngTemplateOutletContext]=\"{col: col}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'boolean'\">\r\n <ng-container [ngTemplateOutlet]=\"filterBoolean\"\r\n [ngTemplateOutletContext]=\"{col: col}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <ng-container [ngTemplateOutlet]=\"filterText\"\r\n [ngTemplateOutletContext]=\"{col: col}\">\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n </ng-container>\r\n <th *ngIf=\"enableReorderRow\" style=\"width: 30px\">\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n <th *ngIf=\"!setting.hiddenFunctionColumn\" class=\"center setting-cell column-function\"\r\n [class.sticky]=\"setting.stickyColumn\">\r\n <button *ngIf=\"!setting.hiddenSetting\" type=\"button\" pButton pRipple icon=\"pi pi-cog\"\r\n class=\"p-button-rounded p-button-text\" pTooltip=\"C\u1EA5u h\u00ECnh hi\u1EC3n th\u1ECB\" tooltipPosition=\"top\"\r\n (click)=\"showSettings()\"></button>\r\n <button *ngIf=\"!setting.hiddenSettingPermission\" type=\"button\" pButton pRipple icon=\"pi pi-users\"\r\n class=\"p-button-rounded p-button-text\" pTooltip=\"Ph\u00E2n quy\u1EC1n d\u1EEF li\u1EC7u\" tooltipPosition=\"left\"\r\n [disabled]=\"checkPermissionToUseButton(BUTTON_PHAN_QUYEN)\" (click)=\"showSettingsPermission()\"></button>\r\n <button *ngIf=\"!setting.hiddenSettingWorkflow\" type=\"button\" pButton pRipple icon=\"pi pi-sitemap\"\r\n class=\"p-button-rounded p-button-text\" pTooltip=\"C\u1EA5u h\u00ECnh quy tr\u00ECnh\" tooltipPosition=\"left\"\r\n [disabled]=\"checkPermissionToUseButton(BUTTON_CAU_HINH_QUY_TRINH)\"\r\n (click)=\"showSettingsWorkflowNew()\"></button>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n </tr>\r\n</ng-template>\r\n<ng-template #colFunctionHeader>\r\n <ng-container *ngIf=\"!setting.hiddenFunctionColumn\">\r\n <th class=\"column-function\" [class.sticky]=\"setting.stickyColumn\"\r\n [style.width]=\"widthFunctionColumn || _widthFunctionColumn\">\r\n <div class=\"cell-header-function\">\r\n <span>{{'GRID.FUNCTION'| translate}}</span>\r\n </div>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n </ng-container>\r\n</ng-template>\r\n<ng-template #contentTh let-col>\r\n <ng-container *ngIf=\"templateHeaderContent[col.field]\">\r\n <ng-container *ngTemplateOutlet=\"templateHeaderContent[col.field]\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"!templateHeaderContent[col.field]\">\r\n {{col.label}}\r\n </ng-container>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n</ng-template>\r\n<ng-template #trBody let-rowData let-columns=\"columns\" let-index=\"index\" let-expanded=\"expanded\"\r\n let-eventSelectRow=\"eventSelectRow\" let-eventChecked=\"eventChecked\">\r\n <tr [tnReorderableRow]=\"index\" [attr.rowIndex]=\"index\"\r\n [ngClass]=\"mergeClassObj(rowData, { 'ui-state-highlight': rowData._checked })\" [pTooltip]=\"rowData.tooltip\"\r\n tooltipPosition=\"top\" [tooltipStyleClass]=\"rowData.tooltipClass\" [escape]=\"escape\"\r\n (click)=\"eventSelectRow($event, rowData)\">\r\n <ng-container *ngIf=\"!setting.hiddenCheckbox\">\r\n <td [style.width]=\"widthCheckbox\" class=\"chkbox link-or-action cell-checkbox\"\r\n [class.sticky]=\"setting.stickyColumn\">\r\n <ng-container *ngIf=\"!rowData.hiddenCheckBox\">\r\n <ng-container *ngIf=\"!hasTemplate('checkbox')\">\r\n <p-checkbox [(ngModel)]=\"rowData._checked\" binary=\"true\" (onChange)=\"eventChecked(rowData)\">\r\n </p-checkbox>\r\n </ng-container>\r\n <ng-container *ngIf=\"hasTemplate('checkbox')\">\r\n <ng-container [ngTemplateOutlet]=\"getTemplate('checkbox')\"\r\n [ngTemplateOutletContext]=\"{rowData: rowData, rowIndex: index}\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n </ng-container>\r\n <td *ngIf=\"!setting.hiddenOrderColumn && (!rowData.hidden || !rowData.hidden[fieldOrder])\"\r\n [style.width]=\"widthOrderColumn\" class=\"stt\" style=\"text-align: center;\"\r\n [class.sticky]=\"setting.stickyColumn\" [attr.colSpan]=\"rowData.colSpan && rowData.colSpan[fieldOrder]\"\r\n [attr.rowSpan]=\"rowData.rowSpan && rowData.rowSpan[fieldOrder]\">\r\n <span class=\"row-card\" [ngStyle]=\"getBookmarkColor(rowData, columns)\"></span>\r\n {{rowData[fieldOrder]}}\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n <td *ngIf=\"rowExpansion\" class=\"no-padding center row-expansion-toggle\" [class.sticky]=\"setting.stickyColumn\">\r\n <ng-container *ngTemplateOutlet=\"iconToggleRowData; context: {rowData: rowData, expanded: expanded}\">\r\n </ng-container>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n <ng-container\r\n *ngTemplateOutlet=\"dynamicColBodys; context: {$implicit: columns, rowData: rowData, index: index, expanded: expanded}\">\r\n </ng-container>\r\n <td *ngIf=\"enableReorderRow\" class=\"no-padding center\">\r\n <i class=\"fas fa-arrows-alt\" style=\"cursor:pointer; padding: 8px; color: #555;\" pReorderableRowHandle></i>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n <ng-container *ngIf=\"!setting.hiddenFunctionColumn\">\r\n <td class=\"text-center column-function\" style=\"text-align: center;\" [class.sticky]=\"setting.stickyColumn\">\r\n <div *ngIf=\"hasTemplate('function')\" class=\"p-toolbar-group-center button-group\">\r\n <ng-container [ngTemplateOutlet]=\"getTemplate('function')\"\r\n [ngTemplateOutletContext]=\"{rowData: rowData, rowIndex: index}\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </div>\r\n <div *ngIf=\"!hasTemplate('function')\" class=\"p-toolbar-group-center button-group\">\r\n <ng-container [ngTemplateOutletContext]=\"{rowData: rowData, rowIndex: index}\"\r\n [ngTemplateOutlet]=\"getTemplate('buttonBefore')\"></ng-container>\r\n <button *ngIf=\"setting.showVersionButton\" type=\"button\" pButton pRipple icon=\"pi pi-calendar\"\r\n class=\"p-button-rounded p-button-success link-or-action\" pTooltip=\"Xem l\u1ECBch s\u1EED phi\u00EAn b\u1EA3n\"\r\n tooltipPosition=\"top\" (click)=\"showListVersion(rowData)\"></button>\r\n <button *ngIf=\"!rowData.hiddenEdit\" type=\"button\" pButton pRipple [disabled]=\"disableEdit(rowData)\"\r\n pTooltip=\"{{'FORM.EDIT' | translate}}\" tooltipPosition=\"top\"\r\n class=\"p-button-rounded p-button-text p-button-info link-or-action\" icon=\"pi pi-pencil\"\r\n (click)=\"edit(rowData)\"></button>\r\n <button *ngIf=\"!rowData.hiddenDelete\" type=\"button\" pButton pRipple\r\n [disabled]=\"disableDelete(rowData)\" pTooltip=\"{{'FORM.DELETE' | translate}}\"\r\n tooltipPosition=\"top\" class=\"p-button-rounded p-button-text p-button-danger link-or-action\"\r\n icon=\"pi pi-trash\" (click)=\"delete(rowData)\"></button>\r\n <button *ngIf=\"this.menuButtons\" type=\"button\" pButton icon=\"pi pi-ellipsis-v\"\r\n class=\"link-or-action p-button-text p-button-info p-button-rounded\" pTooltip=\"Ch\u1EE9c n\u0103ng kh\u00E1c\"\r\n tooltipPosition=\"top\" (click)=\"showContextMenu($event, rowData)\"></button>\r\n </div>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n </ng-container>\r\n </tr>\r\n</ng-template>\r\n<ng-template #dynamicColBodys let-columns let-rowData=\"rowData\" let-index=\"index\" let-expanded=\"expanded\">\r\n <ng-container *ngFor=\"let col of columns; let i = index\">\r\n <ng-container\r\n *ngTemplateOutlet=\"contentTd; context: {$implicit: rowData, col: col, index: index, i: i, expanded: expanded}\">\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>\r\n<ng-template #contentTd let-rowData let-col=\"col\" let-index=\"index\" let-expanded=\"expanded\" let-i=\"i\">\r\n <td *ngIf=\"col && col.visible && col.field != 'function' && (!rowData.hidden || !rowData.hidden[col.field])\"\r\n [attr.colSpan]=\"rowData.colSpan && rowData.colSpan[col.field]\"\r\n [attr.rowSpan]=\"rowData.rowSpan && rowData.rowSpan[col.field]\" [ngStyle]=\"col.extendData.style\"\r\n [class]=\"col.cellClass\" [class.first-td]=\"i == 0\">\r\n <span *ngIf=\"col.pipe\">\r\n <span class=\"p-column-title\" [pTooltip]=\"col.fullLabel\" [escape]=\"false\"\r\n tooltipPosition=\"top\">{{col.label}}</span>\r\n {{rowData['pipe__' + col.field]}}\r\n </span>\r\n <span *ngIf=\"!col.pipe\">\r\n <span class=\"p-column-title\" [pTooltip]=\"col.fullLabel\" [escape]=\"false\"\r\n tooltipPosition=\"top\">{{col.label}}</span>\r\n <span *ngIf=\"setting.showEditLink && col.showEditLink\" [pTooltip]=\"config.tooltipView\" tooltipPosition=\"top\"\r\n class=\"link-or-action\">\r\n <a href=\"javascript:;\" (click)=\"view(rowData)\" [pTooltip]=\"config.tooltipView\" tooltipPosition=\"top\">\r\n <ng-container [ngTemplateOutlet]=\"contentCell\"\r\n [ngTemplateOutletContext]=\"getContextCell(rowData, index, col, expanded, this)\">\r\n </ng-container>\r\n </a>\r\n </span>\r\n <span *ngIf=\"!setting.showEditLink || !col.showEditLink\">\r\n <ng-container [ngTemplateOutlet]=\"contentCell\"\r\n [ngTemplateOutletContext]=\"getContextCell(rowData, index, col, expanded, this)\">\r\n </ng-container>\r\n </span>\r\n </span>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n</ng-template>\r\n<ng-template #contentCell let-col=\"col\" let-rowData=\"rowData\" let-rowIndex=\"rowIndex\" let-field=\"field\"\r\n let-expanded=\"expanded\">\r\n <ng-container *ngIf=\"col.template\">\r\n <ng-container [ngTemplateOutlet]=\"col.template\"\r\n [ngTemplateOutletContext]=\"getContextCell(rowData, rowIndex, col, expanded,this)\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"!col.template\">\r\n <ng-container [ngSwitch]=\"col.dataType\">\r\n <span *ngSwitchCase=\"'color'\" style=\"display:block;text-align:center;\">\r\n <div pTooltip=\"{{rowData[field]}}\" tooltipPosition=\"top\" [ngStyle]=\"{'background-color':rowData[field]}\"\r\n style=\"width:30px;height:30px;margin:0 auto;\"></div>\r\n </span>\r\n <span *ngSwitchCase=\"'icon'\" style=\"display:block;text-align:center;\">\r\n <i pTooltip=\"{{rowData[field]}}\" tooltipPosition=\"top\" style=\"text-align: center;\"\r\n [ngClass]=\"rowData[field]\"></i>\r\n </span>\r\n <span *ngSwitchCase=\"'date'\" pTooltip=\"{{rowData[field] | date:'dd/MM/yyyy'}}\" tooltipPosition=\"top\">\r\n {{_crudService.renderDate(rowData[field], col.format)}}\r\n </span>\r\n <span *ngSwitchCase=\"'datetime'\" pTooltip=\"{{rowData[field] | date:'dd/MM/yyyy HH:mm'}}\"\r\n tooltipPosition=\"top\">\r\n {{_crudService.renderDateTime(rowData[field], col.format)}}\r\n </span>\r\n <span *ngSwitchCase=\"'user'\" class=\"user\">\r\n {{rowData[field] | userFormat | async}}\r\n </span>\r\n <div *ngSwitchCase=\"'users'\" [innerHTML]=\"rowData[field] | usersFormat | async\">\r\n </div>\r\n <span *ngSwitchCase=\"'int'\">\r\n {{rowData[field]}}\r\n </span>\r\n <span *ngSwitchCase=\"'decimal'\">\r\n {{rowData[field]}}\r\n </span>\r\n <span *ngSwitchCase=\"'boolean'\">\r\n <p-checkbox class=\"boolean-data-type\" [(ngModel)]=\"rowData[field]\" binary=\"true\"\r\n [disabled]=\"col.disableCheckBox\">\r\n </p-checkbox>\r\n </span>\r\n <span *ngSwitchCase=\"'html'\">\r\n <div *ngIf=\"rowData[field]==null?'':rowData[field]\" [innerHTML]=\"rowData[field] | safeHtml\"></div>\r\n </span>\r\n <span *ngSwitchCase=\"'metadataStatus'\">\r\n <span *ngIf=\"rowData['rejectReason']\" class=\"label-danger\" [pTooltip]=\"rowData['rejectReason']\"\r\n tooltipStyleClass=\"unset-width\" [escape]=\"false\" tooltipPosition=\"top\">T\u1EEB ch\u1ED1i</span>\r\n <span *ngIf=\"rowData[field] == '0' && !rowData['rejectReason']\" class=\"label-secondary\">Ch\u01B0a\r\n duy\u1EC7t</span>\r\n <span *ngIf=\"rowData[field] == '1' && !rowData['rejectReason']\" class=\"label-warning\">Ch\u1EDD duy\u1EC7t</span>\r\n <span *ngIf=\"rowData[field] == '2'\" class=\"label-primary\">\u0110\u00E3 duy\u1EC7t</span>\r\n </span>\r\n <ng-container *ngSwitchCase=\"'string'\">\r\n <ng-container *ngTemplateOutlet=\"contentCellString; context: {$implicit: rowData, field: col.field}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"null\">\r\n <ng-container *ngTemplateOutlet=\"contentCellString; context: {$implicit: rowData, field: col.field}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <ng-container [ngTemplateOutlet]=\"getComponentByType(col.dataType)\"\r\n [ngTemplateOutletContext]=\"getContextCell(rowData, rowIndex, col, expanded, this)\">\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>\r\n<ng-template #contentCellString let-rowData let-field=\"field\">\r\n <span>\r\n <!-- __sv: Short Value -->\r\n <ng-container *ngIf=\"rowData[field + '__sv']\">\r\n <ng-container *ngIf=\"!rowData[field + '__showFull']\">\r\n {{rowData[field + '__sv']}}\r\n <span class=\"toggle-showfull\" (click)=\"toggleShowFull(rowData, field)\" pTooltip=\"B\u1EA5m \u0111\u1EC3 xem th\u00EAm\"\r\n tooltipPosition=\"top\">[...]</span>\r\n </ng-container>\r\n <ng-container *ngIf=\"rowData[field + '__showFull']\">\r\n {{rowData[field]}}\r\n <span class=\"toggle-showfull\" (click)=\"toggleShowFull(rowData, field)\">Thu g\u1ECDn</span>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"!rowData[field + '__sv']\">\r\n {{rowData[field]}}\r\n </ng-container>\r\n </span>\r\n</ng-template>\r\n<ng-template #iconToggleRowGroup let-rowData=\"rowData\" let-expanded=\"expanded\">\r\n <a href=\"javascript:;\" (click)=\"handleToggleRow(rowData, $event)\">\r\n <i style=\"margin-right:5px\" [ngClass]=\"expanded ? 'fas fa-fw fa-caret-down' : 'fas fa-fw fa-caret-right'\"></i>\r\n </a>\r\n</ng-template>\r\n<ng-template #iconToggleRowData let-rowData=\"rowData\" let-expanded=\"expanded\">\r\n <button type=\"button\" pButton pRipple class=\"link-or-action p-button-text p-button-rounded p-button-plain\"\r\n [icon]=\"expanded ? 'pi pi-chevron-down' : 'pi pi-chevron-right'\"\r\n (click)=\"handleToggleRow(rowData, $event)\"></button>\r\n</ng-template>\r\n<ng-template #_contentRowGroup let-rowData=\"rowData\" let-groupCol=\"groupCol\" let-groupField=\"_groupField\">\r\n <ng-container [ngTemplateOutlet]=\"contentCell\"\r\n [ngTemplateOutletContext]=\"{rowData: rowData, col: groupCol, field: _groupField}\">\r\n </ng-container>\r\n <span> ({{rowGroupMetadata[rowData[_groupField]].size}})</span>\r\n</ng-template>\r\n<ng-template #trangThaiV5 let-rowData=\"rowData\">\r\n <div class=\"container-text-workflow\">\r\n <button *ngIf=\"!rowData.__workflowCode\" pButton class=\"p-button-text link-or-action\" label=\"B\u1EAFt \u0111\u1EA7u\"\r\n style=\"border: 1px solid #7ca9cd;\" pTooltip=\"B\u1EAFt \u0111\u1EA7u ch\u1EA1y quy tr\u00ECnh\" tooltipPosition=\"top\"\r\n [disabled]=\"rowData.__startingWorkflow\" (click)=\"showFormStartWorkflow(rowData)\"></button>\r\n <ng-container *ngIf=\"rowData.__workflowCode\">\r\n <span class=\"content\">{{rowData.__textTrangThai}}</span>\r\n <button *ngIf=\"!rowData.hiddenWorkflowAction\" type=\"button\" pButton icon=\"pi pi-ellipsis-v\"\r\n class=\"link-or-action p-button-text p-button-rounded\" pTooltip=\"H\u00E0nh \u0111\u1ED9ng\" tooltipPosition=\"top\"\r\n [disabled]=\"showingActionWorkflow\" (click)=\"showActionWorkflow($event, rowData)\"></button>\r\n </ng-container>\r\n </div>\r\n</ng-template>\r\n<ng-template #viewHistory let-rowData=\"rowData\">\r\n <button pButton icon=\"pi pi-calendar\" class=\"p-button-text p-button-rounded link-or-action\" pTooltip=\"Xem l\u1ECBch s\u1EED\"\r\n tooltipPosition=\"top\" (click)=\"viewHistoryWorkflow(setting, rowData)\"></button>\r\n</ng-template>\r\n<ng-template #containerSticky>\r\n <span class=\"fix-sticky top\"></span>\r\n <span class=\"fix-sticky right\"></span>\r\n <!-- <span class=\"fix-sticky bottom\"></span> -->\r\n <span class=\"fix-sticky left\"></span>\r\n</ng-template>\r\n<ng-template #sortIcon let-field=\"field\">\r\n <i class=\"p-sortable-column-icon pi\" style=\"font-size: 0.8em;\"\r\n [ngClass]=\"{'pi-sort-amount-up-alt': field == _sortField && _sortDir === 1, 'pi-sort-amount-down': field == _sortField && _sortDir === -1, 'pi-sort-alt': field != _sortField || _sortDir === 0}\"></i>\r\n</ng-template>\r\n<ng-template #filterDropdown let-col=\"col\">\r\n <div #filterBox style=\"width: 100%; border-radius: 4px;\">\r\n <dropdown *ngIf=\"col && filterSchema.dropdown[col.field]\" [control]=\"filterSchema.dropdown[col.field]\"\r\n [dataSource]=\"filterSchema.dropdown[col.field].dataSource\" [(value)]=\"filterData[col.field]\"\r\n (onHideSmartEvent)=\"onSearch()\" (onShow)=\"onShowFilterDropdownPanel($event)\"\r\n (onHide)=\"onHideFilterDropdownPanel($event)\" (mousedown)=\"initFilterBoxFocus(filterBox)\"></dropdown>\r\n </div>\r\n</ng-template>\r\n<ng-template #filterText let-col=\"col\">\r\n <div #filterBox class=\"text-filter filter-box\" tabindex=\"-1\" (mousedown)=\"initFilterBoxFocus(filterBox)\">\r\n <div tabindex=\"-1\">\r\n <input pInputText type=\"text\" class=\"input-search\" [placeholder]=\"col.label\"\r\n [(ngModel)]=\"filterData[col.field]\" (change)=\"onSearch()\"\r\n (keyup.esc)=\"onClearSearch(filterBox, col.field)\">\r\n </div>\r\n <span [ngClass]=\"{'action-clear': true, 'dirty': filterData[col.field] != null && filterData[col.field] !== ''}\"\r\n [pTooltip]=\"'B\u1ECF filter'\" tooltipPosition=\"top\" (mousedown)=\"onClearSearch(filterBox, col.field)\"\r\n tabindex=\"-1\"><i class=\"pi pi-filter-slash\"></i></span>\r\n <after-view-checked style=\"display: none;\" (loaded)=\"initFilterBoxFocus(filterBox)\">\r\n </after-view-checked>\r\n </div>\r\n</ng-template>\r\n<ng-template #filterNumber let-col=\"col\">\r\n <div #filterBox class=\"number-picker-range filter-box\" tabindex=\"-1\" (mousedown)=\"initFilterBoxFocus(filterBox)\">\r\n <div tabindex=\"-1\">\r\n <tn-number-picker-range #numberRange [maskType]=\"col.dataType\" [(ngModel)]=\"filterData[col.field]\"\r\n [min]=\"col.min\" [max]=\"col.max\" (change)=\"onSearch()\">\r\n </tn-number-picker-range>\r\n </div>\r\n <span\r\n [ngClass]=\"{'action-clear': true, 'dirty': filterData[col.field] && ((filterData[col.field][0] != null && filterData[col.field][0] !== '') || (filterData[col.field][1] != null && filterData[col.field][1] !== ''))}\"\r\n [pTooltip]=\"'B\u1ECF filter'\" tooltipPosition=\"top\" (mousedown)=\"onClearNumberSearch(filterBox, numberRange)\"\r\n tabindex=\"-1\">\r\n <i class=\"pi pi-filter-slash\"></i></span>\r\n <after-view-checked style=\"display: none;\" (loaded)=\"initFilterBoxFocus(filterBox)\">\r\n </after-view-checked>\r\n </div>\r\n</ng-template>\r\n<ng-template #filterDate let-col=\"col\">\r\n <div #filterBox class=\"date-picker-range filter-box\" tabindex=\"-1\" (mousedown)=\"initFilterBoxFocus(filterBox)\">\r\n <div tabindex=\"-1\">\r\n <tn-datetime-picker-range #dateRange [control]=\"filterSchema.dateRange\"\r\n (onChanged)=\"onChangeDateTime($event, col.field)\">\r\n </tn-datetime-picker-range>\r\n </div>\r\n <span\r\n [ngClass]=\"{'action-clear': true, 'dirty': filterData[col.field] && ((filterData[col.field][0] != null && filterData[col.field][0] !== '') || (filterData[col.field][1] != null && filterData[col.field][1] !== ''))}\"\r\n [pTooltip]=\"'B\u1ECF filter'\" tooltipPosition=\"top\"\r\n (mousedown)=\"onClearDateSearch(filterBox, dateRange, col.field)\" tabindex=\"-1\"><i\r\n class=\"pi pi-filter-slash\"></i></span>\r\n <after-view-checked style=\"display: none;\" (loaded)=\"initFilterBoxFocus(filterBox)\">\r\n </after-view-checked>\r\n </div>\r\n</ng-template>\r\n<ng-template #filterBoolean let-col=\"col\">\r\n <div class=\"filter-boolean-box\">\r\n <p-selectButton\r\n [options]=\"[{value: true, label: 'C\u00F3', icon: 'pi pi-check'}, {value: false, label: 'Kh\u00F4ng', icon: 'pi pi-times'}]\"\r\n [multiple]=\"true\" [(ngModel)]=\"filterData[col.field]\" (onChange)=\"onChangeBoolean($event, col.field)\">\r\n <ng-template let-item>\r\n <i style=\"padding: 3px 0;\" [class]=\"item.icon\"></i>\r\n </ng-template>\r\n </p-selectButton>\r\n </div>\r\n</ng-template>",
|
|
22075
|
+
template: "<div #container class=\"custom-card card card-w-title flex-container-fit-child\" [attr.height-type]=\"setting.heightType\"\r\n [ngStyle]=\"_style\">\r\n <div class=\"ui-helper-clearfix crud-list-header-area\">\r\n <div *ngIf=\"searchCustom\" class=\"p-grid ui-fluid custom-p-col custom-search-area\">\r\n <div class=\"p-col-12 main-container-search\">\r\n <div class=\"p-grid main-container-search-inner\">\r\n <ng-container>\r\n <ng-container *ngTemplateOutlet=\"searchCustom; context: {$implicit: this}\"></ng-container>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!setting.hiddenHeader\" class=\"p-grid ui-fluid custom-p-col page-title-area\">\r\n <div *ngIf=\"!setting.hiddenPageTitle\" class=\"main-title\">\r\n <h1 *ngIf=\"!hasTemplate('customTitle')\">\r\n {{setting.title != null ? setting.title : 'Danh s\u00E1ch ' + setting.objectName}}\r\n </h1>\r\n\r\n <ng-container *ngIf=\"hasTemplate('customTitle')\" [ngTemplateOutlet]=\"getTemplate('customTitle')\"\r\n [ngTemplateOutletContext]=\"{crudList: this}\">\r\n </ng-container>\r\n </div>\r\n\r\n <div *ngIf=\"!setting.hiddenPageSetting\" class=\"paginator-table\">\r\n <paging-next-back-only [model]=\"model\" [setting]=\"setting\" (onChanged)=\"getData()\"\r\n (onChangeLimitPage)=\"savePageSize()\">\r\n </paging-next-back-only>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"fit-content crud-list-body-area\">\r\n <div class=\"crud-list-body-area-inner\" style=\"overflow: unset;\">\r\n <div class=\"flex-container-fit-child\" style=\"overflow: unset;\">\r\n <div *ngIf=\"!setting.hiddenToolbar\" class=\"p-grid crudListToolbar\">\r\n <ng-container>\r\n <div *ngIf=\"!setting.hiddenButtons && hasTemplate('toolbar')\"\r\n [ngClass]=\"setting.hiddenAdvanceSearch ? 'p-md-12 p-lg-12' : 'p-md-7 p-lg-8'\"\r\n class=\"p-col-12 button-group function-topbar custom-toolbar\">\r\n <ng-container\r\n [ngTemplateOutletContext]=\"{selectedItems: model.selectedItems, crudList: this}\"\r\n [ngTemplateOutlet]=\"getTemplate('toolbar')\"></ng-container>\r\n </div>\r\n <div *ngIf=\"!setting.hiddenButtons && !hasTemplate('toolbar')\"\r\n [ngClass]=\"setting.hiddenAdvanceSearch ? 'p-md-12 p-lg-12' : 'p-md-7 p-lg-8'\"\r\n class=\"p-col-12 button-group function-topbar\">\r\n <button *ngIf=\"!hiddenAdd\" type=\"button\" pButton pRipple label=\"Th\u00EAm m\u1EDBi\" icon=\"pi pi-plus\"\r\n class=\"p-button-text\" [disabled]=\"!model.baseReady\" (click)=\"add()\"></button>\r\n <button *ngIf=\"setting.showExportSelectedItems && model.selectedItems.length > 0\"\r\n type=\"button\" pButton pRipple\r\n label=\"Xu\u1EA5t c\u00E1c m\u1EE5c \u0111\u00E3 ch\u1ECDn ({{model.selectedItems.length}})\" icon=\"fas fa-file-excel\"\r\n class=\"p-button-text p-button-success\" (click)=\"xuatCacMucDaChon()\"></button>\r\n <button *ngIf=\"!hiddenDelete && model.selectedItems.length > 0 && !disableMultipleDelete()\"\r\n type=\"button\" pButton pRipple\r\n [label]=\"'X\u00F3a ' + (model.selectedItems.length) | translate\" icon=\"pi pi-trash\"\r\n class=\"p-button-text p-button-danger\" (click)=\"deleteMutiple()\"></button>\r\n <button *ngIf=\"!setting.disableShare && model.selectedItems.length > 0\"\r\n label=\"Chia s\u1EBB li\u00EAn k\u1EBFt\" type=\"button\" pButton pRipple\r\n [pTooltip]=\"'Chia s\u1EBB li\u00EAn k\u1EBFt' | translate\" tooltipPosition=\"top\"\r\n class=\"p-button-text p-button-info link-or-action\" icon=\"pi pi-link\"\r\n (click)=\"createShareLinkMultiple()\"></button>\r\n <ng-container [ngTemplateOutlet]=\"getTemplate('buttonAfterToolbar')\"\r\n [ngTemplateOutletContext]=\"{crudList: this}\"></ng-container>\r\n </div>\r\n </ng-container>\r\n <div *ngIf=\"!setting.hiddenAdvanceSearch\" class=\"p-col-12 advance-search-container\"\r\n [ngClass]=\"setting.hiddenButtons ? 'p-md-12 p-lg-12' : 'p-md-5 p-lg-4'\">\r\n <advance-search #advanceSearch [parentSetting]=\"setting\" [searchInfo]=\"searchInfo\"\r\n [loading]=\"model.loading\" (onSearch)=\"handleSearchAdvs($event)\"\r\n (onInit)=\"handleInitAdvanceSearch($event)\">\r\n </advance-search>\r\n </div>\r\n </div>\r\n <div *ngIf=\"hasTemplate('topGrid')\" class=\"extend-content-top-grid\">\r\n <ng-container [ngTemplateOutletContext]=\"{selectedItems: model.selectedItems, crudList: this}\"\r\n [ngTemplateOutlet]=\"getTemplate('topGrid')\"></ng-container>\r\n </div>\r\n <div class=\"container-table fit-content\" [class.--table-responsive]=\"responsive\">\r\n <div class=\"container-table-inner\">\r\n <ng-container *ngIf=\"!_groupField\">\r\n <tn-custom-scrollbar *ngIf=\"showScrollBar\" #scrollbar [config]=\"configScrollBar\"\r\n [showScrollHorizontal]=\"showScrollHorizontal\">\r\n <ng-container *ngTemplateOutlet=\"tableGetGroupFieldFalse\">\r\n </ng-container>\r\n <ng-container *ngIf=\"hasTemplate('afterCrudList')\">\r\n <ng-container [ngTemplateOutlet]=\"hasTemplate('afterCrudList')\"></ng-container>\r\n </ng-container>\r\n </tn-custom-scrollbar>\r\n <div *ngIf=\"!showScrollBar\">\r\n <ng-container *ngTemplateOutlet=\"tableGetGroupFieldFalse\">\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"_groupField\">\r\n <tn-custom-scrollbar *ngIf=\"showScrollBar\" #scrollbar [config]=\"configScrollBar\"\r\n [showScrollHorizontal]=\"showScrollHorizontal\">\r\n <ng-container *ngTemplateOutlet=\"tableGetGroupFieldTrue\">\r\n </ng-container>\r\n <ng-container *ngIf=\"hasTemplate('afterCrudList')\">\r\n <ng-container [ngTemplateOutlet]=\"getTemplate('afterCrudList')\"></ng-container>\r\n </ng-container>\r\n </tn-custom-scrollbar>\r\n <div *ngIf=\"!showScrollBar\">\r\n <ng-container *ngTemplateOutlet=\"tableGetGroupFieldTrue\">\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n\r\n <div class=\"table-border-line --top\"></div>\r\n <div class=\"table-border-line --right\"></div>\r\n <div class=\"table-border-line --bottom\"></div>\r\n <div class=\"table-border-line --left\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n<after-view-checked (loaded)=\"handleReady()\"></after-view-checked>\r\n<settings *ngIf=\"_showSettings && !setting.hiddenSetting\" [entityMetadataService]=\"entityMetadataService\"\r\n [parentContext]=\"context\" [parentSetting]=\"setting\" [parentModel]=\"model\" (onSave)=\"onSaveSettings($event)\"\r\n (onCancel)=\"_showSettings = false\">\r\n</settings>\r\n<settings-row *ngIf=\"_showSettingsRowColor && !setting.hiddenSetting\" [entityMetadataService]=\"entityMetadataService\"\r\n [parentContext]=\"context\" [parentSetting]=\"setting\" [parentModel]=\"model\" (onSave)=\"onSaveColorSettings($event)\"\r\n (onCancel)=\"_showSettingsRowColor = false\">\r\n</settings-row>\r\n<workflow-setting-dialog *ngIf=\"_showSettingsWorkflow && !setting.hiddenSettingWorkflow\" [parentSetting]=\"setting\"\r\n [parentContext]=\"context\" [parentModel]=\"model\" (onSaved)=\"onSaveWorkflowSettings($event)\"\r\n (onRemoved)=\"onRemoveWorkflowSettings($event)\" (onCancel)=\"_showSettingsWorkflow = false\"></workflow-setting-dialog>\r\n<tn-dialog *ngIf=\"workflowSettingModel.showEditForm\" [header]=\"'C\u1EA5u h\u00ECnh quy tr\u00ECnh nghi\u1EC7p v\u1EE5' | translate\"\r\n [popupSize]=\"workflowSettingModel.popupSize\" (onHide)=\"workflowSettingModel.showEditForm = false\">\r\n <workflow-setting-new #formBase [parentSetting]=\"setting\" (onSaved)=\"onSaveWorkflowSettingsNew($event)\"\r\n (onCancel)=\"workflowSettingModel.showEditForm = false\"></workflow-setting-new>\r\n</tn-dialog>\r\n<entity-permission *ngIf=\"_showSettingsPermission && !setting.hiddenSettingPermission\" [parentSetting]=\"setting\"\r\n [parentContext]=\"context\" [parentModel]=\"model\" [searchInfo]=\"searchInfo\"\r\n (onCancel)=\"_showSettingsPermission = false\">\r\n</entity-permission>\r\n<p-contextMenu #contextMenu [appendTo]=\"'body'\" [model]=\"buttonContexts\">\r\n</p-contextMenu>\r\n<tn-dialog *ngIf=\"processWorkflowModel.showEditForm\" #dialog [header]=\"processWorkflowModel.header | translate\"\r\n [popupSize]=\"processWorkflowModel.popupSize\" [scrollBarStyleClass]=\"'fit-content'\"\r\n (onHide)=\"processWorkflowModel.showEditForm = false\">\r\n <div style=\"height: 100%; padding: 1rem\">\r\n <process-workflow-form #formBase [businessSetting]=\"processWorkflowModel.data.setting\" [item]=\"currentItem\"\r\n [workflow]=\"processWorkflowModel.data.workflow\" [action]=\"processWorkflowModel.data.action\"\r\n (onSaved)=\"handleProcessedWorkflowBase()\" (onCancel)=\"processWorkflowModel.showEditForm = false\">\r\n </process-workflow-form>\r\n </div>\r\n</tn-dialog>\r\n<tn-dialog *ngIf=\"choYKienModel.showEditForm\" #dialog [header]=\"choYKienModel.header | translate\"\r\n [popupSize]=\"choYKienModel.popupSize\" [scrollBarStyleClass]=\"'fit-content'\"\r\n (onHide)=\"choYKienModel.showEditForm = false\">\r\n <div style=\"height: 100%\">\r\n <cho-y-kien-form #formBase [bussinessSetting]=\"choYKienModel.data.setting\"\r\n [rowItem]=\"choYKienModel.data.rowData\" (onSaved)=\"choYKienModel.showEditForm = false\"\r\n (onCancel)=\"choYKienModel.showEditForm = false\">\r\n </cho-y-kien-form>\r\n </div>\r\n</tn-dialog>\r\n<tn-dialog *ngIf=\"workflowHistoryModel.showEditForm\" #dialog [header]=\"workflowHistoryModel.header | translate\"\r\n [popupSize]=\"workflowHistoryModel.popupSize\" [scrollBarStyleClass]=\"'fit-content'\"\r\n (onHide)=\"workflowHistoryModel.showEditForm = false\">\r\n <div style=\"height: 100%\">\r\n <workflow-history-new #formBase [businessSetting]=\"workflowHistoryModel.data.setting\"\r\n [tableName]=\"workflowHistoryModel.data.tableName\" [item]=\"currentItem\"\r\n [workflowSetting]=\"workflowHistoryModel.data.workflowSetting\"\r\n (onCancel)=\"workflowHistoryModel.showEditForm = false\">\r\n </workflow-history-new>\r\n </div>\r\n</tn-dialog>\r\n<tn-dialog *ngIf=\"detailTaskModel.showEditForm\" #dialog [header]=\"detailTaskModel.header | translate\"\r\n [popupSize]=\"detailTaskModel.popupSize\" [scrollBarStyleClass]=\"'fit-content'\"\r\n (onHide)=\"detailTaskModel.showEditForm = false\">\r\n <base-congviec-form #formBase [model]=\"detailTaskModel.data.taskFormModel\" [forceOnlyView]=\"true\"\r\n (onCancel)=\"detailTaskModel.showEditForm = false\">\r\n </base-congviec-form>\r\n</tn-dialog>\r\n\r\n<!-- <tn-dialog *ngIf=\"showDetailForm\" #dialog [styleClass]=\"'congviec-form tn-form-dialog'\"\r\n [header]=\"setting.popupHeader | translate\" [popupSize]=\"setting.popupSize\" (onHide)=\"showDetailForm = false\">\r\n <base-congviec-form #formBase [parentModel]=\"model\" [parentSetting]=\"setting\" [parentContext]=\"context\"\r\n [model]=\"formModel\" [crudList]=\"crudList\" (onSaved)=\"showDetailForm = false;crudList.reload()\"\r\n (onCancel)=\"_handleCancel($event)\" (onAfterSaved)=\"onAfterSaved($event)\">\r\n </base-congviec-form>\r\n</tn-dialog> -->\r\n\r\n<tn-dialog *ngIf=\"permissionSharingModel.showEditForm\" #dialog [header]=\"permissionSharingModel.header | translate\"\r\n [popupSize]=\"permissionSharingModel.popupSize\" [scrollBarStyleClass]=\"'fit-content'\"\r\n (onHide)=\"permissionSharingModel.showEditForm = false\">\r\n <div style=\"height: 100%\">\r\n <permission-sharing #formBase [item]=\"rowDataCurrent\" [baseService]=\"setting.baseService\"\r\n (onCancel)=\"permissionSharingModel.showEditForm = false\">\r\n </permission-sharing>\r\n </div>\r\n</tn-dialog>\r\n<tn-dialog *ngIf=\"permissionListModel.showEditForm\" #dialog [header]=\"permissionListModel.header | translate\"\r\n [popupSize]=\"permissionListModel.popupSize\" [scrollBarStyleClass]=\"'fit-content'\" [useDefaultScrollBar]=\"true\"\r\n (onHide)=\"permissionListModel.showEditForm = false\">\r\n <div style=\"height: 100%\">\r\n <workflow-permission #formBase [item]=\"rowDataCurrent\" [businessSetting]=\"setting\"\r\n (onCancel)=\"permissionListModel.showEditForm = false\">\r\n </workflow-permission>\r\n </div>\r\n</tn-dialog>\r\n<workflow-history-dialog *ngIf=\"showHistoryWorkflow\" [baseService]=\"setting.baseService\" [item]=\"currentItem\"\r\n [workflowSetting]=\"setting.workflowSetting\" (onHide)=\"handleHideHistoryWorkflow()\">\r\n</workflow-history-dialog>\r\n<tn-dialog *ngIf=\"startWorkflowModel.showEditForm\" #dialog [header]=\"startWorkflowModel.header | translate\"\r\n [popupSize]=\"startWorkflowModel.popupSize\" [scrollBarStyleClass]=\"'fit-content'\"\r\n (onHide)=\"startWorkflowModel.showEditForm = false\">\r\n <div style=\"height: 100%\">\r\n <start-workflow #formBase [workflows]=\"startWorkflowModel.data.workflows\"\r\n [defaultWorkflow]=\"startWorkflowModel.data.defaultWorkflow\"\r\n (onCancel)=\"startWorkflowModel.showEditForm = false\" (onSaved)=\"handleStartWorkflowFromDialog($event)\">\r\n </start-workflow>\r\n </div>\r\n</tn-dialog>\r\n<tn-dialog *ngIf=\"congViecModel.showEditForm\" #dialog [styleClass]=\"'congviec-form tn-form-dialog'\"\r\n [header]=\"congViecModel.header | translate\" [popupSize]=\"congViecModel.popupSize\"\r\n (onHide)=\"congViecModel.showEditForm = false\">\r\n <base-congviec-form #formBase [parentSetting]=\"congViecModel.data.congViecSetting\"\r\n [model]=\"congViecModel.data.model\" (onSaved)=\"congViecModel.showEditForm = false;getData()\"\r\n (onCancel)=\"congViecModel.showEditForm = false\">\r\n </base-congviec-form>\r\n</tn-dialog>\r\n<tn-dialog *ngIf=\"shareLinkModel.showEditForm\" #dialog [styleClass]=\"'congviec-form tn-form-dialog'\"\r\n [header]=\"shareLinkModel.header | translate\" [popupSize]=\"shareLinkModel.popupSize\" [useDefaultScrollBar]=\"true\"\r\n (onHide)=\"shareLinkModel.showEditForm = false\">\r\n <share-link-by-permission #formBase [setting]=\"setting\" [lstItem]=\"shareLinkModel.data.lstItem\"\r\n (onCancel)=\"congViecModel.showEditForm = false\">\r\n </share-link-by-permission>\r\n</tn-dialog>\r\n<ng-template #tableGetGroupFieldFalse>\r\n <p-table #table [dataKey]=\"'id'\" [scrollable]=\"pTableScrollable\" [scrollHeight]=\"pTableScrollHeight\"\r\n [columns]=\"setting.cols\" [paginator]=\"false\" [value]=\"_dataSource\" (onSort)=\"onSort($event, table)\"\r\n [class]=\"_tableClass\" [responsive]=\"responsive\" [lazy]=\"lazy\" [loading]=\"model.loading\"\r\n [(selection)]=\"model.selectedItems\" (onRowReorder)=\"handleRowOrdered($event)\">\r\n <ng-template *ngIf=\"header\" pTemplate=\"header\" let-columns>\r\n <ng-container\r\n *ngTemplateOutlet=\"header, context: {$implicit: columns, crudList: this, rowHeaderFilter: rowHeaderFilter, contentTh: contentTh, containerSticky: containerSticky, funcCheckAll: handleCheckAll}\">\r\n </ng-container>\r\n </ng-template>\r\n <ng-template *ngIf=\"!header\" pTemplate=\"header\" let-columns>\r\n <ng-container *ngTemplateOutlet=\"trHeader; context: {$implicit: columns, funcCheckAll: handleCheckAll}\">\r\n </ng-container>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-rowData let-columns=\"columns\" let-index=\"rowIndex\" let-expanded=\"expanded\">\r\n <ng-container\r\n *ngTemplateOutlet=\"trBody; context: {$implicit: rowData, columns: columns, index: index, expanded: expanded, eventSelectRow: handleSelectRow, eventChecked: handleCheckRowData}\">\r\n </ng-container>\r\n <after-view-checked *ngIf=\"index == _dataSource.length - 1\" style=\"display: none;\" [renderKey]=\"_dataSource\"\r\n (loaded)=\"handleTableRendered()\">\r\n </after-view-checked>\r\n </ng-template>\r\n <ng-template *ngIf=\"rowExpansion\" pTemplate=\"rowexpansion\" let-rowData let-expanded=\"expanded\">\r\n <ng-container\r\n *ngTemplateOutlet=\"rowExpansion; context: {rowData: rowData, expanded: expanded, getColSpanGroup: getColSpanGroup}\">\r\n </ng-container>\r\n </ng-template>\r\n <ng-template *ngIf=\"summary\" pTemplate=\"summary\">\r\n <ng-container *ngTemplateOutlet=\"summary\"></ng-container>\r\n </ng-template>\r\n <ng-template *ngIf=\"footer\" pTemplate=\"footer\" let-columns>\r\n <ng-container *ngTemplateOutlet=\"footer; context: {$implicit: columns}\"></ng-container>\r\n </ng-template>\r\n <ng-template *ngIf=\"colgroup\" pTemplate=\"colgroup\" let-columns>\r\n <ng-container *ngTemplateOutlet=\"colgroup; context: {$implicit: columns}\"></ng-container>\r\n </ng-template>\r\n </p-table>\r\n</ng-template>\r\n<ng-template #tableGetGroupFieldTrue>\r\n <p-table #tableGroup [scrollable]=\"pTableScrollable\" [scrollHeight]=\"pTableScrollHeight\" [columns]=\"setting.cols\"\r\n [paginator]=\"false\" [value]=\"_dataSource\" [metaKeySelection]=\"false\" (onSort)=\"onSort($event, tableGroup)\"\r\n [class]=\"_tableClass\" [customSort]=\"true\" [responsive]=\"responsive\" [lazy]=\"true\" [loading]=\"model.loading\"\r\n [(selection)]=\"model.selectedItems\" [expandedRowKeys]=\"model.expandedRowKeys\" [dataKey]=\"_groupField\">\r\n <ng-template *ngIf=\"header\" pTemplate=\"header\" let-columns>\r\n <ng-container\r\n *ngTemplateOutlet=\"header, context: {$implicit: columns, crudList: this, rowHeaderFilter: rowHeaderFilter, contentTh: contentTh, containerSticky: containerSticky, funcCheckAll: handleCheckAll_Group}\">\r\n </ng-container>\r\n </ng-template>\r\n <ng-template *ngIf=\"!header\" pTemplate=\"header\" let-columns>\r\n <ng-container\r\n *ngTemplateOutlet=\"trHeader; context: {$implicit: columns, funcCheckAll: handleCheckAll_Group}\">\r\n </ng-container>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-rowData let-rowIndex=\"rowIndex\" let-expanded=\"expanded\" let-columns=\"columns\">\r\n <tr *ngIf=\"rowGroupMetadata[rowData[_groupField]] && rowGroupMetadata[rowData[_groupField]].index == rowIndex\"\r\n class=\"p-widget-header group-row\" style=\"border: 0px; border-bottom: 1px solid #eee\">\r\n <td *ngIf=\"!setting.hiddenCheckbox\" class=\"center chkbox\" [class.sticky]=\"setting.stickyColumn\">\r\n <p-checkbox [(ngModel)]=\"rowGroupChecked[rowData[_groupField]]\" binary=\"true\"\r\n (onChange)=\"handleCheckRowGroup(rowData)\">\r\n </p-checkbox>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n <ng-container *ngIf=\"!rowGroup\">\r\n <td [colSpan]=\"getColSpanGroup()\" [class]=\"_classRowGroup\">\r\n <div class=\"container-row-group\">\r\n <a href=\"javascript:;\" [pRowToggler]=\"rowData\" class=\"container-row-group-toggle\"\r\n [class.sticky]=\"setting.stickyColumn\">\r\n <i style=\"margin-right:5px\"\r\n [ngClass]=\"expanded ? 'fas fa-fw fa-caret-down' : 'fas fa-fw fa-caret-right'\"></i>\r\n <span class=\"content-row-group\">\r\n <ng-container *ngIf=\"!contentRowGroup\">\r\n <ng-container [ngTemplateOutlet]=\"_contentRowGroup\"\r\n [ngTemplateOutletContext]=\"getContextRowGroup(rowData)\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"contentRowGroup\">\r\n <ng-container [ngTemplateOutlet]=\"contentRowGroup\"\r\n [ngTemplateOutletContext]=\"getContextRowGroup(rowData)\">\r\n </ng-container>\r\n </ng-container>\r\n </span>\r\n </a>\r\n </div>\r\n </td>\r\n </ng-container>\r\n <ng-container *ngIf=\"rowGroup\">\r\n <ng-container [ngTemplateOutlet]=\"rowGroup\"\r\n [ngTemplateOutletContext]=\"getContextRowGroupRoot(rowData, expanded)\">\r\n </ng-container>\r\n </ng-container>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"rowexpansion\" let-columns=\"columns\" let-rowData let-index=\"rowIndex\">\r\n <ng-container\r\n *ngTemplateOutlet=\"trBody; context: {$implicit: rowData, columns: columns, index: index, expanded: false, eventSelectRow: handleSelectRowGroup, eventChecked: handleCheckRowData_Group}\">\r\n </ng-container>\r\n <after-view-checked *ngIf=\"index == _dataSource.length - 1\" style=\"display: none;\" [renderKey]=\"_dataSource\"\r\n (loaded)=\"handleTableRendered()\">\r\n </after-view-checked>\r\n </ng-template>\r\n <ng-template *ngIf=\"summary\" pTemplate=\"summary\">\r\n <ng-container *ngTemplateOutlet=\"summary\"></ng-container>\r\n </ng-template>\r\n <ng-template *ngIf=\"footer\" pTemplate=\"footer\" let-columns>\r\n <ng-container *ngTemplateOutlet=\"footer; context: {$implicit: columns}\"></ng-container>\r\n </ng-template>\r\n <ng-template *ngIf=\"colgroup\" pTemplate=\"colgroup\" let-columns>\r\n <ng-container *ngTemplateOutlet=\"colgroup; context: {$implicit: columns}\"></ng-container>\r\n </ng-template>\r\n </p-table>\r\n <after-view-checked></after-view-checked>\r\n</ng-template>\r\n<ng-template #trHeader let-columns let-funcCheckAll=\"funcCheckAll\">\r\n <tr class=\"title-row\">\r\n <ng-container *ngIf=\"!setting.hiddenCheckbox\">\r\n <th [style.width]=\"widthCheckbox\" class=\"chkbox link-or-action cell-checkbox\"\r\n [class.sticky]=\"setting.stickyColumn\">\r\n <button *ngIf=\"!hasTemplate('headerCheckbox')\" type=\"button\" pButton pRipple icon=\"pi pi-refresh\"\r\n class=\"p-button-rounded p-button-text btnReload\" pTooltip=\"L\u00E0m m\u1EDBi d\u1EEF li\u1EC7u\" tooltipPosition=\"top\"\r\n [disabled]=\"model.loading\" (click)=\"reload()\"></button>\r\n <ng-container *ngIf=\"hasTemplate('headerCheckbox')\">\r\n <ng-container [ngTemplateOutletContext]=\"{crudList: this}\"\r\n [ngTemplateOutlet]=\"getTemplate('headerCheckbox')\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n </ng-container>\r\n <th *ngIf=\"!setting.hiddenOrderColumn\" [style.width]=\"widthOrderColumn\" class=\"stt nopad center\"\r\n [class.sticky]=\"setting.stickyColumn\">\r\n {{ 'TT' |translate}}\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n <th *ngIf=\"rowExpansion\" class=\"nopad row-expansion-toggle center\" style=\"width: 2.5rem\"\r\n [class.sticky]=\"setting.stickyColumn\">\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n <ng-container *ngFor=\"let col of columns; let i = index\">\r\n <th *ngIf=\"col && col.visible && col.field!='function'\" [ngStyle]=\"col.extendData.headerStyle\"\r\n [pTooltip]=\"col.fullLabel\" tooltipStyleClass=\"unset-width\" [class]=\"col.extendData.headerClass\"\r\n [class.first-th]=\"i==0\" [escape]=\"false\" tooltipPosition=\"top\" [tnSortableColumn]=\"col.field\">\r\n <ng-container *ngTemplateOutlet=\"contentTh; context: {$implicit: col}\"></ng-container>\r\n <ng-container *ngIf=\"col.sort || col.sortClient\">\r\n <ng-container *ngTemplateOutlet=\"sortIcon; context: {field: col.field}\"></ng-container>\r\n </ng-container>\r\n </th>\r\n </ng-container>\r\n <th *ngIf=\"enableReorderRow\" style=\"width: 30px\">\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n <ng-container *ngTemplateOutlet=\"colFunctionHeader\"></ng-container>\r\n </tr>\r\n <ng-container *ngTemplateOutlet=\"rowHeaderFilter; context: {columns: columns, funcCheckAll: funcCheckAll}\">\r\n </ng-container>\r\n</ng-template>\r\n<ng-template #rowHeaderFilter let-columns=\"columns\" let-funcCheckAll=\"funcCheckAll\">\r\n <tr class=\"filter-row\" *ngIf=\"!setting.hiddenFilterRow\">\r\n <th *ngIf=\"!setting.hiddenCheckbox\" class=\"chkbox nopad center\" [class.sticky]=\"setting.stickyColumn\"\r\n [class.tricheckbox-custom-false]=\"checkedAll === false\" [style.width]=\"widthCheckbox\">\r\n <p-triStateCheckbox [(ngModel)]=\"checkedAll\" binary=\"true\" (onChange)=\"funcCheckAll()\">\r\n </p-triStateCheckbox>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n <th *ngIf=\"!setting.hiddenOrderColumn\" class=\"stt center v-top\" [class.sticky]=\"setting.stickyColumn\">\r\n <div *ngIf=\"!setting.hiddenSetting\" class=\"pick-color-row\" pTooltip=\"C\u1EA5u h\u00ECnh hi\u1EC3n th\u1ECB m\u00E0u\"\r\n tooltipPosition=\"top\" (click)=\"showSettingRowColor()\">\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n </div>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n <th *ngIf=\"rowExpansion\" class=\"nopad center row-expansion-toggle\" [class.sticky]=\"setting.stickyColumn\">\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n <ng-container *ngFor=\"let col of columns; let i = index\">\r\n <th *ngIf=\"col.visible && col.field != 'function'\" class=\"cell-header-filter center\">\r\n <ng-container *ngIf=\"col.allowFilter\">\r\n <ng-container *ngIf=\"col.templateFilter\">\r\n <ng-container [ngTemplateOutlet]=\"col.templateFilter\"\r\n [ngTemplateOutletContext]=\"{col: col, filterData: filterData, onSearch: onSearch, onShowFilterDropdownPanel: onShowFilterDropdownPanel, onHideFilterDropdownPanel: onHideFilterDropdownPanel}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"!col.templateFilter\" [ngSwitch]=\"col.controlType\">\r\n <ng-container *ngSwitchCase=\"'dropdown'\">\r\n <ng-container [ngTemplateOutlet]=\"filterDropdown\"\r\n [ngTemplateOutletContext]=\"{col: col.rawColumn}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'number'\">\r\n <ng-container [ngTemplateOutlet]=\"filterNumber\" [ngTemplateOutletContext]=\"{col: col}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'date'\">\r\n <ng-container [ngTemplateOutlet]=\"filterDate\" [ngTemplateOutletContext]=\"{col: col}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'datetime'\">\r\n <ng-container [ngTemplateOutlet]=\"filterDate\" [ngTemplateOutletContext]=\"{col: col}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <ng-container [ngSwitch]=\"col.dataType\">\r\n <ng-container *ngSwitchCase=\"'int'\">\r\n <ng-container [ngTemplateOutlet]=\"filterNumber\"\r\n [ngTemplateOutletContext]=\"{col: col}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'decimal'\">\r\n <ng-container [ngTemplateOutlet]=\"filterNumber\"\r\n [ngTemplateOutletContext]=\"{col: col}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'date'\">\r\n <ng-container [ngTemplateOutlet]=\"filterDate\"\r\n [ngTemplateOutletContext]=\"{col: col}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'datetime'\">\r\n <ng-container [ngTemplateOutlet]=\"filterDate\"\r\n [ngTemplateOutletContext]=\"{col: col}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'boolean'\">\r\n <ng-container [ngTemplateOutlet]=\"filterBoolean\"\r\n [ngTemplateOutletContext]=\"{col: col}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <ng-container [ngTemplateOutlet]=\"filterText\"\r\n [ngTemplateOutletContext]=\"{col: col}\">\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n </ng-container>\r\n <th *ngIf=\"enableReorderRow\" style=\"width: 30px\">\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n <th *ngIf=\"!setting.hiddenFunctionColumn\" class=\"center setting-cell column-function\"\r\n [class.sticky]=\"setting.stickyColumn\">\r\n <button *ngIf=\"!setting.hiddenSetting\" type=\"button\" pButton pRipple icon=\"pi pi-cog\"\r\n class=\"p-button-rounded p-button-text\" pTooltip=\"C\u1EA5u h\u00ECnh hi\u1EC3n th\u1ECB\" tooltipPosition=\"top\"\r\n (click)=\"showSettings()\"></button>\r\n <button *ngIf=\"!setting.hiddenSettingPermission\" type=\"button\" pButton pRipple icon=\"pi pi-users\"\r\n class=\"p-button-rounded p-button-text\" pTooltip=\"Ph\u00E2n quy\u1EC1n d\u1EEF li\u1EC7u\" tooltipPosition=\"left\"\r\n [disabled]=\"checkPermissionToUseButton(BUTTON_PHAN_QUYEN)\" (click)=\"showSettingsPermission()\"></button>\r\n <button *ngIf=\"!setting.hiddenSettingWorkflow\" type=\"button\" pButton pRipple icon=\"pi pi-sitemap\"\r\n class=\"p-button-rounded p-button-text\" pTooltip=\"C\u1EA5u h\u00ECnh quy tr\u00ECnh\" tooltipPosition=\"left\"\r\n [disabled]=\"checkPermissionToUseButton(BUTTON_CAU_HINH_QUY_TRINH)\"\r\n (click)=\"showSettingsWorkflowNew()\"></button>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n </tr>\r\n</ng-template>\r\n<ng-template #colFunctionHeader>\r\n <ng-container *ngIf=\"!setting.hiddenFunctionColumn\">\r\n <th class=\"column-function\" [class.sticky]=\"setting.stickyColumn\"\r\n [style.width]=\"widthFunctionColumn || _widthFunctionColumn\">\r\n <div class=\"cell-header-function\">\r\n <span>{{'GRID.FUNCTION'| translate}}</span>\r\n </div>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n </ng-container>\r\n</ng-template>\r\n<ng-template #contentTh let-col>\r\n <ng-container *ngIf=\"templateHeaderContent[col.field]\">\r\n <ng-container *ngTemplateOutlet=\"templateHeaderContent[col.field]\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"!templateHeaderContent[col.field]\">\r\n {{col.label}}\r\n </ng-container>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n</ng-template>\r\n<ng-template #trBody let-rowData let-columns=\"columns\" let-index=\"index\" let-expanded=\"expanded\"\r\n let-eventSelectRow=\"eventSelectRow\" let-eventChecked=\"eventChecked\">\r\n <tr [tnReorderableRow]=\"index\" [attr.rowIndex]=\"index\"\r\n [ngClass]=\"mergeClassObj(rowData, { 'ui-state-highlight': rowData._checked })\" [pTooltip]=\"rowData.tooltip\"\r\n tooltipPosition=\"top\" [tooltipStyleClass]=\"rowData.tooltipClass\" [escape]=\"escape\"\r\n (click)=\"eventSelectRow($event, rowData)\">\r\n <ng-container *ngIf=\"!setting.hiddenCheckbox\">\r\n <td [style.width]=\"widthCheckbox\" class=\"chkbox link-or-action cell-checkbox\"\r\n [class.sticky]=\"setting.stickyColumn\">\r\n <ng-container *ngIf=\"!rowData.hiddenCheckBox\">\r\n <ng-container *ngIf=\"!hasTemplate('checkbox')\">\r\n <p-checkbox [(ngModel)]=\"rowData._checked\" binary=\"true\" (onChange)=\"eventChecked(rowData)\">\r\n </p-checkbox>\r\n </ng-container>\r\n <ng-container *ngIf=\"hasTemplate('checkbox')\">\r\n <ng-container [ngTemplateOutlet]=\"getTemplate('checkbox')\"\r\n [ngTemplateOutletContext]=\"{rowData: rowData, rowIndex: index}\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n </ng-container>\r\n <td *ngIf=\"!setting.hiddenOrderColumn && (!rowData.hidden || !rowData.hidden[fieldOrder])\"\r\n [style.width]=\"widthOrderColumn\" class=\"stt\" style=\"text-align: center;\"\r\n [class.sticky]=\"setting.stickyColumn\" [attr.colSpan]=\"rowData.colSpan && rowData.colSpan[fieldOrder]\"\r\n [attr.rowSpan]=\"rowData.rowSpan && rowData.rowSpan[fieldOrder]\">\r\n <span class=\"row-card\" [ngStyle]=\"getBookmarkColor(rowData, columns)\"></span>\r\n {{rowData[fieldOrder]}}\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n <td *ngIf=\"rowExpansion\" class=\"no-padding center row-expansion-toggle\" [class.sticky]=\"setting.stickyColumn\">\r\n <ng-container *ngTemplateOutlet=\"iconToggleRowData; context: {rowData: rowData, expanded: expanded}\">\r\n </ng-container>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n <ng-container\r\n *ngTemplateOutlet=\"dynamicColBodys; context: {$implicit: columns, rowData: rowData, index: index, expanded: expanded}\">\r\n </ng-container>\r\n <td *ngIf=\"enableReorderRow\" class=\"no-padding center\">\r\n <i class=\"fas fa-arrows-alt\" style=\"cursor:pointer; padding: 8px; color: #555;\" pReorderableRowHandle></i>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n <ng-container *ngIf=\"!setting.hiddenFunctionColumn\">\r\n <td class=\"text-center column-function\" style=\"text-align: center;\" [class.sticky]=\"setting.stickyColumn\">\r\n <div *ngIf=\"hasTemplate('function')\" class=\"p-toolbar-group-center button-group\">\r\n <ng-container [ngTemplateOutlet]=\"getTemplate('function')\"\r\n [ngTemplateOutletContext]=\"{rowData: rowData, rowIndex: index}\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </div>\r\n <div *ngIf=\"!hasTemplate('function')\" class=\"p-toolbar-group-center button-group\">\r\n <ng-container [ngTemplateOutletContext]=\"{rowData: rowData, rowIndex: index}\"\r\n [ngTemplateOutlet]=\"getTemplate('buttonBefore')\"></ng-container>\r\n <button *ngIf=\"setting.showVersionButton\" type=\"button\" pButton pRipple icon=\"pi pi-calendar\"\r\n class=\"p-button-rounded p-button-success link-or-action\" pTooltip=\"Xem l\u1ECBch s\u1EED phi\u00EAn b\u1EA3n\"\r\n tooltipPosition=\"top\" (click)=\"showListVersion(rowData)\"></button>\r\n <button *ngIf=\"!rowData.hiddenEdit\" type=\"button\" pButton pRipple [disabled]=\"disableEdit(rowData)\"\r\n [pTooltip]=\"'FORM.EDIT' | translate\" tooltipPosition=\"top\"\r\n class=\"p-button-rounded p-button-text p-button-info link-or-action\" icon=\"pi pi-pencil\"\r\n (click)=\"edit(rowData)\"></button>\r\n <button *ngIf=\"!rowData.hiddenDelete\" type=\"button\" pButton pRipple\r\n [disabled]=\"disableDelete(rowData)\" [pTooltip]=\"'FORM.DELETE' | translate\" tooltipPosition=\"top\"\r\n class=\"p-button-rounded p-button-text p-button-danger link-or-action\" icon=\"pi pi-trash\"\r\n (click)=\"delete(rowData)\"></button>\r\n <button *ngIf=\"this.menuButtons\" type=\"button\" pButton icon=\"pi pi-ellipsis-v\"\r\n class=\"link-or-action p-button-text p-button-info p-button-rounded\" pTooltip=\"Ch\u1EE9c n\u0103ng kh\u00E1c\"\r\n tooltipPosition=\"top\" (click)=\"showContextMenu($event, rowData)\"></button>\r\n </div>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n </ng-container>\r\n </tr>\r\n</ng-template>\r\n<ng-template #dynamicColBodys let-columns let-rowData=\"rowData\" let-index=\"index\" let-expanded=\"expanded\">\r\n <ng-container *ngFor=\"let col of columns; let i = index\">\r\n <ng-container\r\n *ngTemplateOutlet=\"contentTd; context: {$implicit: rowData, col: col, index: index, i: i, expanded: expanded}\">\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>\r\n<ng-template #contentTd let-rowData let-col=\"col\" let-index=\"index\" let-expanded=\"expanded\" let-i=\"i\">\r\n <td *ngIf=\"col && col.visible && col.field != 'function' && (!rowData.hidden || !rowData.hidden[col.field])\"\r\n [attr.colSpan]=\"rowData.colSpan && rowData.colSpan[col.field]\"\r\n [attr.rowSpan]=\"rowData.rowSpan && rowData.rowSpan[col.field]\" [ngStyle]=\"col.extendData.style\"\r\n [class]=\"col.cellClass\" [class.first-td]=\"i == 0\">\r\n <span *ngIf=\"col.pipe\">\r\n <span class=\"p-column-title\" [pTooltip]=\"col.fullLabel\" [escape]=\"false\"\r\n tooltipPosition=\"top\">{{col.label}}</span>\r\n {{rowData['pipe__' + col.field]}}\r\n </span>\r\n <span *ngIf=\"!col.pipe\">\r\n <span class=\"p-column-title\" [pTooltip]=\"col.fullLabel\" [escape]=\"false\"\r\n tooltipPosition=\"top\">{{col.label}}</span>\r\n <span *ngIf=\"setting.showEditLink && col.showEditLink\" [pTooltip]=\"config.tooltipView\" tooltipPosition=\"top\"\r\n class=\"link-or-action\">\r\n <a href=\"javascript:;\" (click)=\"view(rowData)\" [pTooltip]=\"config.tooltipView\" tooltipPosition=\"top\">\r\n <ng-container [ngTemplateOutlet]=\"contentCell\"\r\n [ngTemplateOutletContext]=\"getContextCell(rowData, index, col, expanded, this)\">\r\n </ng-container>\r\n </a>\r\n </span>\r\n <span *ngIf=\"!setting.showEditLink || !col.showEditLink\">\r\n <ng-container [ngTemplateOutlet]=\"contentCell\"\r\n [ngTemplateOutletContext]=\"getContextCell(rowData, index, col, expanded, this)\">\r\n </ng-container>\r\n </span>\r\n </span>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n</ng-template>\r\n<ng-template #contentCell let-col=\"col\" let-rowData=\"rowData\" let-rowIndex=\"rowIndex\" let-field=\"field\"\r\n let-expanded=\"expanded\">\r\n <ng-container *ngIf=\"col.template\">\r\n <ng-container [ngTemplateOutlet]=\"col.template\"\r\n [ngTemplateOutletContext]=\"getContextCell(rowData, rowIndex, col, expanded,this)\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"!col.template\">\r\n <ng-container [ngSwitch]=\"col.dataType\">\r\n <span *ngSwitchCase=\"'color'\" style=\"display:block;text-align:center;\">\r\n <div [pTooltip]=\"rowData[field]\" tooltipPosition=\"top\" [ngStyle]=\"{'background-color':rowData[field]}\"\r\n style=\"width:30px;height:30px;margin:0 auto;\"></div>\r\n </span>\r\n <span *ngSwitchCase=\"'icon'\" style=\"display:block;text-align:center;\">\r\n <i [pTooltip]=\"rowData[field]\" tooltipPosition=\"top\" style=\"text-align: center;\"\r\n [ngClass]=\"rowData[field]\"></i>\r\n </span>\r\n <span *ngSwitchCase=\"'date'\" [pTooltip]=\"rowData[field] | date:'dd/MM/yyyy'\" tooltipPosition=\"top\">\r\n {{_crudService.renderDate(rowData[field], col.format)}}\r\n </span>\r\n <span *ngSwitchCase=\"'datetime'\" [pTooltip]=\"rowData[field] | date:'dd/MM/yyyy HH:mm'\"\r\n tooltipPosition=\"top\">\r\n {{_crudService.renderDateTime(rowData[field], col.format)}}\r\n </span>\r\n <span *ngSwitchCase=\"'user'\" class=\"user\">\r\n {{rowData[field] | userFormat | async}}\r\n </span>\r\n <div *ngSwitchCase=\"'users'\" [innerHTML]=\"rowData[field] | usersFormat | async\">\r\n </div>\r\n <span *ngSwitchCase=\"'int'\">\r\n {{rowData[field]}}\r\n </span>\r\n <span *ngSwitchCase=\"'decimal'\">\r\n {{rowData[field]}}\r\n </span>\r\n <span *ngSwitchCase=\"'boolean'\">\r\n <p-checkbox class=\"boolean-data-type\" [(ngModel)]=\"rowData[field]\" binary=\"true\"\r\n [disabled]=\"col.disableCheckBox\">\r\n </p-checkbox>\r\n </span>\r\n <span *ngSwitchCase=\"'html'\">\r\n <div *ngIf=\"rowData[field]==null?'':rowData[field]\" [innerHTML]=\"rowData[field] | safeHtml\"></div>\r\n </span>\r\n <span *ngSwitchCase=\"'metadataStatus'\">\r\n <span *ngIf=\"rowData['rejectReason']\" class=\"label-danger\" [pTooltip]=\"rowData['rejectReason']\"\r\n tooltipStyleClass=\"unset-width\" [escape]=\"false\" tooltipPosition=\"top\">T\u1EEB ch\u1ED1i</span>\r\n <span *ngIf=\"rowData[field] == '0' && !rowData['rejectReason']\" class=\"label-secondary\">Ch\u01B0a\r\n duy\u1EC7t</span>\r\n <span *ngIf=\"rowData[field] == '1' && !rowData['rejectReason']\" class=\"label-warning\">Ch\u1EDD duy\u1EC7t</span>\r\n <span *ngIf=\"rowData[field] == '2'\" class=\"label-primary\">\u0110\u00E3 duy\u1EC7t</span>\r\n </span>\r\n <ng-container *ngSwitchCase=\"'string'\">\r\n <ng-container *ngTemplateOutlet=\"contentCellString; context: {$implicit: rowData, field: col.field}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"null\">\r\n <ng-container *ngTemplateOutlet=\"contentCellString; context: {$implicit: rowData, field: col.field}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <ng-container [ngTemplateOutlet]=\"getComponentByType(col.dataType)\"\r\n [ngTemplateOutletContext]=\"getContextCell(rowData, rowIndex, col, expanded, this)\">\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>\r\n<ng-template #contentCellString let-rowData let-field=\"field\">\r\n <span>\r\n <!-- __sv: Short Value -->\r\n <ng-container *ngIf=\"rowData[field + '__sv']\">\r\n <ng-container *ngIf=\"!rowData[field + '__showFull']\">\r\n {{rowData[field + '__sv']}}\r\n <span class=\"toggle-showfull\" (click)=\"toggleShowFull(rowData, field)\" pTooltip=\"B\u1EA5m \u0111\u1EC3 xem th\u00EAm\"\r\n tooltipPosition=\"top\">[...]</span>\r\n </ng-container>\r\n <ng-container *ngIf=\"rowData[field + '__showFull']\">\r\n {{rowData[field]}}\r\n <span class=\"toggle-showfull\" (click)=\"toggleShowFull(rowData, field)\">Thu g\u1ECDn</span>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"!rowData[field + '__sv']\">\r\n {{rowData[field]}}\r\n </ng-container>\r\n </span>\r\n</ng-template>\r\n<ng-template #iconToggleRowGroup let-rowData=\"rowData\" let-expanded=\"expanded\">\r\n <a href=\"javascript:;\" (click)=\"handleToggleRow(rowData, $event)\">\r\n <i style=\"margin-right:5px\" [ngClass]=\"expanded ? 'fas fa-fw fa-caret-down' : 'fas fa-fw fa-caret-right'\"></i>\r\n </a>\r\n</ng-template>\r\n<ng-template #iconToggleRowData let-rowData=\"rowData\" let-expanded=\"expanded\">\r\n <button type=\"button\" pButton pRipple class=\"link-or-action p-button-text p-button-rounded p-button-plain\"\r\n [icon]=\"expanded ? 'pi pi-chevron-down' : 'pi pi-chevron-right'\"\r\n (click)=\"handleToggleRow(rowData, $event)\"></button>\r\n</ng-template>\r\n<ng-template #_contentRowGroup let-rowData=\"rowData\" let-groupCol=\"groupCol\" let-groupField=\"_groupField\">\r\n <ng-container [ngTemplateOutlet]=\"contentCell\"\r\n [ngTemplateOutletContext]=\"{rowData: rowData, col: groupCol, field: _groupField}\">\r\n </ng-container>\r\n <span> ({{rowGroupMetadata[rowData[_groupField]].size}})</span>\r\n</ng-template>\r\n<ng-template #trangThaiV5 let-rowData=\"rowData\">\r\n <div class=\"container-text-workflow\">\r\n <button *ngIf=\"!rowData.__workflowCode\" pButton class=\"p-button-text link-or-action\" label=\"B\u1EAFt \u0111\u1EA7u\"\r\n style=\"border: 1px solid #7ca9cd;\" pTooltip=\"B\u1EAFt \u0111\u1EA7u ch\u1EA1y quy tr\u00ECnh\" tooltipPosition=\"top\"\r\n [disabled]=\"rowData.__startingWorkflow\" (click)=\"showFormStartWorkflow(rowData)\"></button>\r\n <ng-container *ngIf=\"rowData.__workflowCode\">\r\n <span class=\"content\">{{rowData.__textTrangThai}}</span>\r\n <button *ngIf=\"!rowData.hiddenWorkflowAction\" type=\"button\" pButton icon=\"pi pi-ellipsis-v\"\r\n class=\"link-or-action p-button-text p-button-rounded\" pTooltip=\"H\u00E0nh \u0111\u1ED9ng\" tooltipPosition=\"top\"\r\n [disabled]=\"showingActionWorkflow\" (click)=\"showActionWorkflow($event, rowData)\"></button>\r\n </ng-container>\r\n </div>\r\n</ng-template>\r\n<ng-template #viewHistory let-rowData=\"rowData\">\r\n <button pButton icon=\"pi pi-calendar\" class=\"p-button-text p-button-rounded link-or-action\" pTooltip=\"Xem l\u1ECBch s\u1EED\"\r\n tooltipPosition=\"top\" (click)=\"viewHistoryWorkflow(setting, rowData)\"></button>\r\n</ng-template>\r\n<ng-template #containerSticky>\r\n <span class=\"fix-sticky top\"></span>\r\n <span class=\"fix-sticky right\"></span>\r\n <!-- <span class=\"fix-sticky bottom\"></span> -->\r\n <span class=\"fix-sticky left\"></span>\r\n</ng-template>\r\n<ng-template #sortIcon let-field=\"field\">\r\n <i class=\"p-sortable-column-icon pi\" style=\"font-size: 0.8em;\"\r\n [ngClass]=\"{'pi-sort-amount-up-alt': field == _sortField && _sortDir === 1, 'pi-sort-amount-down': field == _sortField && _sortDir === -1, 'pi-sort-alt': field != _sortField || _sortDir === 0}\"></i>\r\n</ng-template>\r\n<ng-template #filterDropdown let-col=\"col\">\r\n <div #filterBox style=\"width: 100%; border-radius: 4px;\">\r\n <dropdown *ngIf=\"col && filterSchema.dropdown[col.field]\" [control]=\"filterSchema.dropdown[col.field]\"\r\n [dataSource]=\"filterSchema.dropdown[col.field].dataSource\" [(value)]=\"filterData[col.field]\"\r\n (onHideSmartEvent)=\"onSearch()\" (onShow)=\"onShowFilterDropdownPanel($event)\"\r\n (onHide)=\"onHideFilterDropdownPanel($event)\" (mousedown)=\"initFilterBoxFocus(filterBox)\"></dropdown>\r\n </div>\r\n</ng-template>\r\n<ng-template #filterText let-col=\"col\">\r\n <div #filterBox class=\"text-filter filter-box\" tabindex=\"-1\" (mousedown)=\"initFilterBoxFocus(filterBox)\">\r\n <div tabindex=\"-1\">\r\n <input pInputText type=\"text\" class=\"input-search\" [placeholder]=\"col.label\"\r\n [(ngModel)]=\"filterData[col.field]\" (change)=\"onSearch()\"\r\n (keyup.esc)=\"onClearSearch(filterBox, col.field)\">\r\n </div>\r\n <span [ngClass]=\"{'action-clear': true, 'dirty': filterData[col.field] != null && filterData[col.field] !== ''}\"\r\n [pTooltip]=\"'B\u1ECF filter'\" tooltipPosition=\"top\" (mousedown)=\"onClearSearch(filterBox, col.field)\"\r\n tabindex=\"-1\"><i class=\"pi pi-filter-slash\"></i></span>\r\n <after-view-checked style=\"display: none;\" (loaded)=\"initFilterBoxFocus(filterBox)\">\r\n </after-view-checked>\r\n </div>\r\n</ng-template>\r\n<ng-template #filterNumber let-col=\"col\">\r\n <div #filterBox class=\"number-picker-range filter-box\" tabindex=\"-1\" (mousedown)=\"initFilterBoxFocus(filterBox)\">\r\n <div tabindex=\"-1\">\r\n <tn-number-picker-range #numberRange [maskType]=\"col.dataType\" [(ngModel)]=\"filterData[col.field]\"\r\n [min]=\"col.min\" [max]=\"col.max\" (change)=\"onSearch()\">\r\n </tn-number-picker-range>\r\n </div>\r\n <span\r\n [ngClass]=\"{'action-clear': true, 'dirty': filterData[col.field] && ((filterData[col.field][0] != null && filterData[col.field][0] !== '') || (filterData[col.field][1] != null && filterData[col.field][1] !== ''))}\"\r\n [pTooltip]=\"'B\u1ECF filter'\" tooltipPosition=\"top\" (mousedown)=\"onClearNumberSearch(filterBox, numberRange)\"\r\n tabindex=\"-1\">\r\n <i class=\"pi pi-filter-slash\"></i></span>\r\n <after-view-checked style=\"display: none;\" (loaded)=\"initFilterBoxFocus(filterBox)\">\r\n </after-view-checked>\r\n </div>\r\n</ng-template>\r\n<ng-template #filterDate let-col=\"col\">\r\n <div #filterBox class=\"date-picker-range filter-box\" tabindex=\"-1\" (mousedown)=\"initFilterBoxFocus(filterBox)\">\r\n <div tabindex=\"-1\">\r\n <tn-datetime-picker-range #dateRange [control]=\"filterSchema.dateRange\"\r\n (onChanged)=\"onChangeDateTime($event, col.field)\">\r\n </tn-datetime-picker-range>\r\n </div>\r\n <span\r\n [ngClass]=\"{'action-clear': true, 'dirty': filterData[col.field] && ((filterData[col.field][0] != null && filterData[col.field][0] !== '') || (filterData[col.field][1] != null && filterData[col.field][1] !== ''))}\"\r\n [pTooltip]=\"'B\u1ECF filter'\" tooltipPosition=\"top\"\r\n (mousedown)=\"onClearDateSearch(filterBox, dateRange, col.field)\" tabindex=\"-1\"><i\r\n class=\"pi pi-filter-slash\"></i></span>\r\n <after-view-checked style=\"display: none;\" (loaded)=\"initFilterBoxFocus(filterBox)\">\r\n </after-view-checked>\r\n </div>\r\n</ng-template>\r\n<ng-template #filterBoolean let-col=\"col\">\r\n <div class=\"filter-boolean-box\">\r\n <p-selectButton\r\n [options]=\"[{value: true, label: 'C\u00F3', icon: 'pi pi-check'}, {value: false, label: 'Kh\u00F4ng', icon: 'pi pi-times'}]\"\r\n [multiple]=\"true\" [(ngModel)]=\"filterData[col.field]\" (onChange)=\"onChangeBoolean($event, col.field)\">\r\n <ng-template let-item>\r\n <i style=\"padding: 3px 0;\" [class]=\"item.icon\"></i>\r\n </ng-template>\r\n </p-selectButton>\r\n </div>\r\n</ng-template>",
|
|
22076
22076
|
providers: [i2$1.DecimalPipe, i2$1.DatePipe],
|
|
22077
|
-
styles: [".container-table{display:flex;flex-direction:column;overflow:hidden}.container-table .container-table-inner{display:flex;height:auto;max-height:100%;min-height:60px;position:relative}.container-table-inner>tn-custom-scrollbar{width:100%}.cell-checkbox{text-align:center}.pick-color-row{border:1px solid #d1d1d1;border-radius:2px;bottom:0;cursor:pointer;display:flex;flex-wrap:wrap;height:1.4em;left:0;margin:auto;position:absolute;right:0;top:0;width:1.4em}.pick-color-row>div{background:#84d140;border:1px solid #fff;flex:0 0 50%}.pick-color-row>div:nth-child(2){background:#fc6868}.pick-color-row>div:nth-child(3){background:#fbc02d}.pick-color-row>div:nth-child(4){background:#7dc5ff}.cell-header-function{align-items:center;display:flex}.cell-header-function>span{flex:1 1;text-align:center}.cell-header-function button{height:24px;margin:0;padding:0;width:24px}.group-icon{color:#256aa2;font-weight:400}.group-icon i{font-size:.8em;margin-right:5px}.center{text-align:center!important}.row-card{height:100%;left:0;position:absolute;top:0;width:5px}.column-function{min-width:80px;padding:0}.custom-search-area{background-color:#f2f2f2;margin:-.5em -1em .5em;padding-left:.5em;padding-right:.5em}.main-container-search-inner{margin-bottom:-.5em}.main-title>h1{font-size:1.2em}.filter-row>th:not(.sticky):not(.chkbox){padding:3px!important}.container-text-workflow{align-items:center;display:flex;justify-content:center}.container-text-workflow .link-or-action{color:#2196f3;cursor:pointer}.container-text-workflow .content{flex:1 1}.btnReload{height:2rem;left:50%;position:absolute;top:50%;transform:translate(-50%,calc(-50% - 1px));width:2rem}.toggle-showfull{color:#00f;cursor:pointer;font-size:.8rem;font-weight:700;white-space:nowrap}.col-share-permission>div:not(:last-child){margin-bottom:5px}
|
|
22077
|
+
styles: [".container-table{display:flex;flex-direction:column;overflow:hidden}.container-table .container-table-inner{display:flex;height:auto;max-height:100%;min-height:60px;position:relative}.container-table-inner>tn-custom-scrollbar{width:100%}.cell-checkbox{text-align:center}.pick-color-row{border:1px solid #d1d1d1;border-radius:2px;bottom:0;cursor:pointer;display:flex;flex-wrap:wrap;height:1.4em;left:0;margin:auto;position:absolute;right:0;top:0;width:1.4em}.pick-color-row>div{background:#84d140;border:1px solid #fff;flex:0 0 50%}.pick-color-row>div:nth-child(2){background:#fc6868}.pick-color-row>div:nth-child(3){background:#fbc02d}.pick-color-row>div:nth-child(4){background:#7dc5ff}.cell-header-function{align-items:center;display:flex}.cell-header-function>span{flex:1 1;text-align:center}.cell-header-function button{height:24px;margin:0;padding:0;width:24px}.group-icon{color:#256aa2;font-weight:400}.group-icon i{font-size:.8em;margin-right:5px}.center{text-align:center!important}.row-card{height:100%;left:0;position:absolute;top:0;width:5px}.column-function{min-width:80px;padding:0}.custom-search-area{background-color:#f2f2f2;margin:-.5em -1em .5em;padding-left:.5em;padding-right:.5em}.main-container-search-inner{margin-bottom:-.5em}.main-title>h1{font-size:1.2em}.filter-row>th:not(.sticky):not(.chkbox){padding:3px!important}.container-text-workflow{align-items:center;display:flex;justify-content:center}.container-text-workflow .link-or-action{color:#2196f3;cursor:pointer}.container-text-workflow .content{flex:1 1}.btnReload{height:2rem;left:50%;position:absolute;top:50%;transform:translate(-50%,calc(-50% - 1px));width:2rem}.toggle-showfull{color:#00f;cursor:pointer;font-size:.8rem;font-weight:700;white-space:nowrap}.col-share-permission>div:not(:last-child){margin-bottom:5px}.advance-search-container{display:flex;justify-content:flex-end}::ng-deep crud-list advance-search{display:block;flex:1;max-width:400px}::ng-deep crud-list .ps__rail-x,::ng-deep crud-list .ps__rail-y{z-index:5}::ng-deep crud-list .p-datatable .p-datatable-thead>tr>th.cell-fixed-filter{z-index:999}::ng-deep crud-list .p-datatable .p-datatable-thead>tr>th.cell-fixed-filter .fixed-filter{min-width:200px;position:fixed;z-index:10}::ng-deep crud-list .p-datatable .p-datatable-thead>tr>th .container-icon-loading{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}::ng-deep crud-list .check-all-custom{height:0;position:absolute;width:0}::ng-deep crud-list .cell-header-filter{position:relative}::ng-deep crud-list .cell-header-filter .tn-dropdown{height:32px}::ng-deep crud-list .cell-header-filter tn-mask .p-inputtext{width:100%}::ng-deep crud-list .cell-header-filter .filter-box{background-color:#fff;border-radius:3px;display:flex;min-width:0}::ng-deep crud-list .cell-header-filter .filter-box>div{border:1px solid #ced4da;border-radius:3px 0 0 3px;border-right:none;flex:1;outline:none;overflow:hidden}::ng-deep crud-list .cell-header-filter .filter-box>span{align-items:center;background:#f5f6f8;border:1px solid #ced4da;color:#6c757d;cursor:pointer;display:inline-flex;flex-basis:32px;height:32px;justify-content:center;min-width:unset;outline:none}::ng-deep crud-list .cell-header-filter .filter-box>span.action-clear{border-radius:0 3px 3px 0}::ng-deep crud-list .cell-header-filter .filter-box>span.action-clear.dirty{color:#008eff}::ng-deep crud-list .cell-header-filter .filter-box input{border:none;box-shadow:none!important;padding-left:5px;padding-right:5px}::ng-deep crud-list .cell-header-filter .filter-box:not(.no-transition){transition:min-width .1s}::ng-deep crud-list .cell-header-filter .filter-box.boolean-filter>div{flex:0 0 109px;width:109px}::ng-deep crud-list .cell-header-filter .p-multiselect-label.p-placeholder{padding-left:.5rem;padding-right:.5rem}::ng-deep crud-list .cell-header-filter.focus-within,::ng-deep crud-list .cell-header-filter:focus-within{z-index:10!important}::ng-deep crud-list .cell-header-filter.focus-within .filter-boolean-box .p-button,::ng-deep crud-list .cell-header-filter:focus-within .filter-boolean-box .p-button{z-index:10}::ng-deep crud-list .cell-header-filter.focus-within .filter-box>div,::ng-deep crud-list .cell-header-filter:focus-within .filter-box>div{border-color:#2196f3;box-shadow:0 0 0 .2rem #a6d5fa;z-index:0}::ng-deep crud-list .cell-header-filter.focus-within .short-filter-box,::ng-deep crud-list .cell-header-filter:focus-within .short-filter-box{box-shadow:5px 0 15px 1px rgba(0,0,0,.27058823529411763);min-width:250px;position:absolute;top:calc(50% - 16px);z-index:2}::ng-deep crud-list .cell-header-filter.focus-within .short-filter-box>div,::ng-deep crud-list .cell-header-filter:focus-within .short-filter-box>div{border-color:#2196f3;box-shadow:0 0 0 .2rem #a6d5fa;flex:1;z-index:0}::ng-deep crud-list .cell-header-filter.focus-within .short-filter-box>span.action-clear,::ng-deep crud-list .cell-header-filter:focus-within .short-filter-box>span.action-clear{display:flex}::ng-deep crud-list .cell-header-filter.focus-within .short-filter-box.boolean-filter,::ng-deep crud-list .cell-header-filter:focus-within .short-filter-box.boolean-filter{min-width:140px}::ng-deep crud-list .cell-header-filter.focus-within .short-filter-box.boolean-filter>div,::ng-deep crud-list .cell-header-filter:focus-within .short-filter-box.boolean-filter>div{flex:0 0 109px;width:109px}::ng-deep crud-list .cell-header-filter.focus-within:nth-last-child(2) .short-filter-box,::ng-deep crud-list .cell-header-filter:focus-within:nth-last-child(2) .short-filter-box{left:50%;transform:translateX(-50%)}::ng-deep crud-list .cell-header-filter:last-child .filter-box{right:3px}::ng-deep crud-list .table-border-line{background-color:#eee;position:absolute;z-index:5}::ng-deep crud-list .table-border-line.--left,::ng-deep crud-list .table-border-line.--right{bottom:0;top:0;width:1px}::ng-deep crud-list .table-border-line.--bottom,::ng-deep crud-list .table-border-line.--top{height:1px;left:0;right:0}::ng-deep crud-list .table-border-line.--left{left:0}::ng-deep crud-list .table-border-line.--right{right:0}::ng-deep crud-list .table-border-line.--top{top:0}::ng-deep crud-list .table-border-line.--bottom{bottom:0}::ng-deep crud-list .filter-boolean-box{text-align:center}::ng-deep crud-list .filter-boolean-box .p-selectbutton{white-space:nowrap}::ng-deep crud-list .custom-search-area crud-form{width:100%}::ng-deep crud-list>p-contextmenu{display:none}@media (max-width:640px){::ng-deep crud-list .--table-responsive .p-datatable-wrapper{padding:1px}}"]
|
|
22078
22078
|
},] }
|
|
22079
22079
|
];
|
|
22080
22080
|
CrudListComponent.ctorParameters = function () { return [
|
|
@@ -22189,6 +22189,8 @@
|
|
|
22189
22189
|
_this.indexCount = 0;
|
|
22190
22190
|
_this.filterSchema = {};
|
|
22191
22191
|
_this.filterData = {};
|
|
22192
|
+
_this._sortField = '';
|
|
22193
|
+
_this._sortDir = -1;
|
|
22192
22194
|
_this.onSearch = function (node) {
|
|
22193
22195
|
if (_this.model.loading)
|
|
22194
22196
|
return;
|
|
@@ -22219,21 +22221,23 @@
|
|
|
22219
22221
|
this.filterSchema.dateRange = new DateTimeRangeControlSchema({ appendTo: 'body' });
|
|
22220
22222
|
this.filterSchema.dropdown = {};
|
|
22221
22223
|
this.initColumnSchema(this.setting.cols);
|
|
22224
|
+
this.formatColumns(this.setting.cols);
|
|
22222
22225
|
this.createSearchSchema();
|
|
22223
22226
|
this.getData();
|
|
22224
22227
|
};
|
|
22225
22228
|
TreeTableComponent.prototype.initColumnSchema = function (cols) {
|
|
22226
22229
|
if (cols) {
|
|
22227
22230
|
// let colFunction = null, colGroup = null;
|
|
22228
|
-
|
|
22229
|
-
|
|
22230
|
-
|
|
22231
|
-
|
|
22232
|
-
|
|
22233
|
-
|
|
22234
|
-
|
|
22235
|
-
|
|
22236
|
-
|
|
22231
|
+
this.setting.cols.forEach(function (col) {
|
|
22232
|
+
col.sort = false;
|
|
22233
|
+
// if (col.field == 'function') {
|
|
22234
|
+
// colFunction = col;
|
|
22235
|
+
// }
|
|
22236
|
+
// else if (col.group) {
|
|
22237
|
+
// col.group = false;
|
|
22238
|
+
// colGroup = col;
|
|
22239
|
+
// }
|
|
22240
|
+
});
|
|
22237
22241
|
// if (colFunction && !colFunction.width) {
|
|
22238
22242
|
// this._widthFunctionColumn = colFunction.width;
|
|
22239
22243
|
// }
|
|
@@ -22389,8 +22393,84 @@
|
|
|
22389
22393
|
});
|
|
22390
22394
|
});
|
|
22391
22395
|
};
|
|
22396
|
+
// eslint-disable-next-line spaced-comment
|
|
22397
|
+
//#region Style column
|
|
22392
22398
|
TreeTableComponent.prototype.formatColumns = function (cols) {
|
|
22399
|
+
var e_3, _a;
|
|
22400
|
+
try {
|
|
22401
|
+
for (var cols_1 = __values(cols), cols_1_1 = cols_1.next(); !cols_1_1.done; cols_1_1 = cols_1.next()) {
|
|
22402
|
+
var col = cols_1_1.value;
|
|
22403
|
+
col.extendData.style = this.getColumnStyle(col);
|
|
22404
|
+
col.extendData.headerStyle = this.getColumnStyle(col, true);
|
|
22405
|
+
col.extendData.headerClass = this.getCellClassHeader(col);
|
|
22406
|
+
}
|
|
22407
|
+
}
|
|
22408
|
+
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
22409
|
+
finally {
|
|
22410
|
+
try {
|
|
22411
|
+
if (cols_1_1 && !cols_1_1.done && (_a = cols_1.return)) _a.call(cols_1);
|
|
22412
|
+
}
|
|
22413
|
+
finally { if (e_3) throw e_3.error; }
|
|
22414
|
+
}
|
|
22393
22415
|
};
|
|
22416
|
+
TreeTableComponent.prototype.getColumnStyle = function (col, forHeader) {
|
|
22417
|
+
if (forHeader === void 0) { forHeader = false; }
|
|
22418
|
+
var style = {};
|
|
22419
|
+
if (col.field == 'metadataStatus') {
|
|
22420
|
+
style['text-align'] = 'center';
|
|
22421
|
+
style['width'] = '8em';
|
|
22422
|
+
return style;
|
|
22423
|
+
}
|
|
22424
|
+
if (col.textAlign == exports.TextAlign.Left) {
|
|
22425
|
+
style['text-align'] = 'left';
|
|
22426
|
+
}
|
|
22427
|
+
else if (col.textAlign == exports.TextAlign.Center) {
|
|
22428
|
+
style['text-align'] = 'center';
|
|
22429
|
+
}
|
|
22430
|
+
else if (col.textAlign == exports.TextAlign.Right) {
|
|
22431
|
+
style['text-align'] = 'right';
|
|
22432
|
+
}
|
|
22433
|
+
else if (this.alignCenterColumn(col)) {
|
|
22434
|
+
style['text-align'] = 'center';
|
|
22435
|
+
}
|
|
22436
|
+
else if (this.alignRightColumn(col)) {
|
|
22437
|
+
style['text-align'] = 'right';
|
|
22438
|
+
}
|
|
22439
|
+
else {
|
|
22440
|
+
if (forHeader) {
|
|
22441
|
+
style['text-align'] = 'center';
|
|
22442
|
+
}
|
|
22443
|
+
else {
|
|
22444
|
+
style['text-align'] = 'left';
|
|
22445
|
+
}
|
|
22446
|
+
}
|
|
22447
|
+
style['width'] = col.width;
|
|
22448
|
+
return style;
|
|
22449
|
+
};
|
|
22450
|
+
TreeTableComponent.prototype.alignCenterColumn = function (col) {
|
|
22451
|
+
return col.dataType == exports.DataType.datetime || col.dataType == exports.DataType.date || col.dataType == exports.DataType.boolean || col.dataType == exports.DataType.enum;
|
|
22452
|
+
};
|
|
22453
|
+
TreeTableComponent.prototype.alignRightColumn = function (col) {
|
|
22454
|
+
return col.dataType == exports.DataType.int || col.dataType == exports.DataType.decimal;
|
|
22455
|
+
};
|
|
22456
|
+
TreeTableComponent.prototype.getCellClassHeader = function (col) {
|
|
22457
|
+
var result = '';
|
|
22458
|
+
if (col.cellClass) {
|
|
22459
|
+
result += col.cellClass;
|
|
22460
|
+
}
|
|
22461
|
+
if (!col.sort) {
|
|
22462
|
+
result += ' NoSortColumn';
|
|
22463
|
+
}
|
|
22464
|
+
if (col.field == this._sortField) {
|
|
22465
|
+
result += ' p-sortable-column';
|
|
22466
|
+
if (this._sortDir != 0) {
|
|
22467
|
+
result += ' p-highlight';
|
|
22468
|
+
}
|
|
22469
|
+
}
|
|
22470
|
+
return result;
|
|
22471
|
+
};
|
|
22472
|
+
// eslint-disable-next-line spaced-comment
|
|
22473
|
+
//#endregion
|
|
22394
22474
|
TreeTableComponent.prototype.getData = function () {
|
|
22395
22475
|
var infoGetData = this.getGridInfo();
|
|
22396
22476
|
this.onReload.emit(infoGetData);
|
|
@@ -22479,6 +22559,7 @@
|
|
|
22479
22559
|
this.setting.pageSetting.page = page;
|
|
22480
22560
|
this.getData();
|
|
22481
22561
|
};
|
|
22562
|
+
// eslint-disable-next-line spaced-comment
|
|
22482
22563
|
//#region Search
|
|
22483
22564
|
TreeTableComponent.prototype.buildFilterColumn = function (cols) {
|
|
22484
22565
|
var _this = this;
|
|
@@ -22557,7 +22638,7 @@
|
|
|
22557
22638
|
return {};
|
|
22558
22639
|
};
|
|
22559
22640
|
TreeTableComponent.prototype.getMinimizeData = function (model) {
|
|
22560
|
-
var
|
|
22641
|
+
var e_4, _a;
|
|
22561
22642
|
if (isLiteralObject(model)) {
|
|
22562
22643
|
if (model._dropdownvalue != null && model._dropdownvalue !== '') {
|
|
22563
22644
|
return model[model._dropdownvalue];
|
|
@@ -22580,12 +22661,12 @@
|
|
|
22580
22661
|
arr.push(this.getMinimizeData(item));
|
|
22581
22662
|
}
|
|
22582
22663
|
}
|
|
22583
|
-
catch (
|
|
22664
|
+
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
22584
22665
|
finally {
|
|
22585
22666
|
try {
|
|
22586
22667
|
if (model_1_1 && !model_1_1.done && (_a = model_1.return)) _a.call(model_1);
|
|
22587
22668
|
}
|
|
22588
|
-
finally { if (
|
|
22669
|
+
finally { if (e_4) throw e_4.error; }
|
|
22589
22670
|
}
|
|
22590
22671
|
return arr;
|
|
22591
22672
|
}
|
|
@@ -22701,6 +22782,7 @@
|
|
|
22701
22782
|
this.filter_advanceSearch = filters;
|
|
22702
22783
|
this.getData();
|
|
22703
22784
|
};
|
|
22785
|
+
// eslint-disable-next-line spaced-comment
|
|
22704
22786
|
//#endregion
|
|
22705
22787
|
TreeTableComponent.prototype.adjustPositionLoadingMask = function () {
|
|
22706
22788
|
// if (this.interval) {
|
|
@@ -22749,28 +22831,28 @@
|
|
|
22749
22831
|
TreeTableComponent.prototype.preProcessData = function (dataSource) {
|
|
22750
22832
|
return __awaiter(this, void 0, void 0, function () {
|
|
22751
22833
|
var colHasPipe, _loop_2, this_2, colHasPipe_1, colHasPipe_1_1, col;
|
|
22752
|
-
var
|
|
22834
|
+
var e_5, _a;
|
|
22753
22835
|
return __generator(this, function (_b) {
|
|
22754
22836
|
colHasPipe = this.setting.cols.filter(function (x) { return x.pipe; });
|
|
22755
22837
|
_loop_2 = function (col) {
|
|
22756
|
-
var
|
|
22838
|
+
var e_6, _a;
|
|
22757
22839
|
var _loop_3 = function (item) {
|
|
22758
22840
|
this_2.transform(col.pipe, col.asyncPipe, item[col.field]).then(function (rs) {
|
|
22759
22841
|
item["pipe__" + col.field + " "] = rs;
|
|
22760
22842
|
});
|
|
22761
22843
|
};
|
|
22762
22844
|
try {
|
|
22763
|
-
for (var dataSource_1 = (
|
|
22845
|
+
for (var dataSource_1 = (e_6 = void 0, __values(dataSource)), dataSource_1_1 = dataSource_1.next(); !dataSource_1_1.done; dataSource_1_1 = dataSource_1.next()) {
|
|
22764
22846
|
var item = dataSource_1_1.value;
|
|
22765
22847
|
_loop_3(item);
|
|
22766
22848
|
}
|
|
22767
22849
|
}
|
|
22768
|
-
catch (
|
|
22850
|
+
catch (e_6_1) { e_6 = { error: e_6_1 }; }
|
|
22769
22851
|
finally {
|
|
22770
22852
|
try {
|
|
22771
22853
|
if (dataSource_1_1 && !dataSource_1_1.done && (_a = dataSource_1.return)) _a.call(dataSource_1);
|
|
22772
22854
|
}
|
|
22773
|
-
finally { if (
|
|
22855
|
+
finally { if (e_6) throw e_6.error; }
|
|
22774
22856
|
}
|
|
22775
22857
|
};
|
|
22776
22858
|
this_2 = this;
|
|
@@ -22780,12 +22862,12 @@
|
|
|
22780
22862
|
_loop_2(col);
|
|
22781
22863
|
}
|
|
22782
22864
|
}
|
|
22783
|
-
catch (
|
|
22865
|
+
catch (e_5_1) { e_5 = { error: e_5_1 }; }
|
|
22784
22866
|
finally {
|
|
22785
22867
|
try {
|
|
22786
22868
|
if (colHasPipe_1_1 && !colHasPipe_1_1.done && (_a = colHasPipe_1.return)) _a.call(colHasPipe_1);
|
|
22787
22869
|
}
|
|
22788
|
-
finally { if (
|
|
22870
|
+
finally { if (e_5) throw e_5.error; }
|
|
22789
22871
|
}
|
|
22790
22872
|
return [2 /*return*/];
|
|
22791
22873
|
});
|
|
@@ -22971,8 +23053,8 @@
|
|
|
22971
23053
|
TreeTableComponent.decorators = [
|
|
22972
23054
|
{ type: i0.Component, args: [{
|
|
22973
23055
|
selector: 'tn-tree-table',
|
|
22974
|
-
template: "<div class=\"custom-card card card-w-title tn-g-page-layout-1\">\r\n <div class=\"ui-helper-clearfix tn-g-page-layout-1__header-area\">\r\n <div class=\"p-grid ui-fluid custom-p-col page-title-area\">\r\n <div class=\"main-title p-col-8\">\r\n <h1>{{setting.title}}</h1>\r\n </div>\r\n <div class=\"p-col-4\">\r\n <paging-next-back-only [model]=\"model\" [setting]=\"setting\" (onChanged)=\"getData()\"\r\n (onChangeLimitPage)=\"savePageSize()\">\r\n </paging-next-back-only>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"p-grid crudListToolbar tn-g-page-layout-1__toolbar-area\">\r\n <div class=\"p-col-8 button-group function-topbar\">\r\n <button pButton pRipple type=\"button\" label=\"Th\u00EAm m\u1EDBi\" icon=\"pi pi-plus\" class=\"p-button-text\"\r\n (click)=\"handleAdd($event)\"></button>\r\n <button pButton pRipple type=\"button\" label=\"\u0110\u00E1nh l\u1EA1i m\u00E3 ph\u00E2n c\u1EA5p\" icon=\"pi pi-share-alt\"\r\n class=\"p-button-text\" style=\"display: none;\" (click)=\"handleDanhMaPC($event)\"></button>\r\n </div>\r\n <div class=\"p-col-4 p-inputgroup\">\r\n <advance-search #advanceSearch [parentSetting]=\"setting\" [searchInfo]=\"searchInfo\" [loading]=\"model.loading\"\r\n (onSearch)=\"handleSearchAdvs($event)\" (onInit)=\"handleInitAdvanceSearch($event)\">\r\n </advance-search>\r\n <!-- <input [placeholder]=\"'T\u00ECm ki\u1EBFm'\" [(ngModel)]=\"keyword\" pInputText type=\"text\" (change)=\"getData()\">\r\n <button pButton type=\"button\" class=\"btn-info btn-search\" label=\"T\u00ECm ki\u1EBFm\" (click)=\"getData()\"></button> -->\r\n </div>\r\n </div>\r\n <div class=\"tn-g-page-layout-1__table-area\">\r\n <tn-custom-scrollbar [showScrollHorizontal]=\"true\" class=\"--has-border\">\r\n <p-treeTable #treetable [value]=\"dataSource\" [columns]=\"setting.cols\" styleClass=\"treeOrganization\">\r\n <ng-template let-columns pTemplate=\"header\">\r\n <tr>\r\n <th style=\"width: 50px\" class=\"chkbox\">\r\n <button type=\"button\" pButton pRipple icon=\"pi pi-refresh\"\r\n class=\"p-button-rounded p-button-text btnReload\" pTooltip=\"L\u00E0m m\u1EDBi d\u1EEF li\u1EC7u\"\r\n tooltipPosition=\"top\" [disabled]=\"model.loading\" (click)=\"getData()\"></button>\r\n </th>\r\n <th *ngFor=\"let col of columns\" [ttSortableColumn]=\"col.field\" [style.width]=\"col.width\"\r\n [style.textAlign]=\"col.textAlign\" [className]=\"col.class\" [pTooltip]=\"col.fullLabel\"\r\n tooltipStyleClass=\"unset-width\" style=\"text-align: center;\">\r\n {{col.label}}\r\n <p-treeTableSortIcon [field]=\"col.field\"></p-treeTableSortIcon>\r\n </th>\r\n <th style=\"text-align: center; width: 8em\">\r\n Ch\u1EE9c n\u0103ng\r\n </th>\r\n </tr>\r\n <ng-container *ngTemplateOutlet=\"rowHeaderFilter; context: {columns: columns}\">\r\n </ng-container>\r\n </ng-template>\r\n <ng-template let-rowNode let-rowData=\"rowData\" let-index=\"index\" let-columns=\"columns\" pTemplate=\"body\">\r\n <tr [ttRow]=\"rowNode\" [class.generated-by-base]=\"rowData._GeneratedByBase\">\r\n <td class=\"chkbox link-or-action cell-checkbox\">{{rowData._indexInDatabase}}</td>\r\n <ng-container *ngFor=\"let col of columns; let i = index\">\r\n <ng-container\r\n *ngTemplateOutlet=\"contentTd; context: {$implicit: rowData, rowNode: rowNode, col: col, index: index, i: i}\">\r\n </ng-container>\r\n </ng-container>\r\n <td style=\"text-align: center; width: 8em;\">\r\n <div *ngIf=\"hasTemplate('function')\" class=\"p-toolbar-group-center button-group\">\r\n <ng-container [ngTemplateOutlet]=\"getTemplate('function')\"\r\n [ngTemplateOutletContext]=\"{rowData: rowData, rowIndex: index}\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </div>\r\n <div *ngIf=\"!hasTemplate('function')\" class=\"p-toolbar-group-center button-group\">\r\n <ng-container [ngTemplateOutletContext]=\"{rowData: rowData, rowIndex: index}\"\r\n [ngTemplateOutlet]=\"getTemplate('buttonBefore')\"></ng-container>\r\n <button *ngIf=\"!rowData.hiddenEdit\" type=\"button\" pButton pRipple\r\n pTooltip=\"{{'FORM.EDIT' | translate}}\" tooltipPosition=\"top\"\r\n [disabled]=\"disableEdit(rowData)\"\r\n class=\"p-button-rounded p-button-text p-button-info link-or-action\"\r\n icon=\"pi pi-pencil\" (click)=\"handleEdit(rowData)\"></button>\r\n <button *ngIf=\"!rowData.hiddenDelete\" type=\"button\" pButton pRipple\r\n [disabled]=\"disableDelete(rowData)\" pTooltip=\"{{'FORM.DELETE' | translate}}\"\r\n tooltipPosition=\"top\"\r\n class=\"p-button-rounded p-button-text p-button-danger link-or-action\"\r\n icon=\"pi pi-trash\" (click)=\"handleDelete(rowData)\"></button>\r\n <!-- <button *ngIf=\"this.menuButtons\" type=\"button\" pButton icon=\"pi pi-ellipsis-v\"\r\n class=\"link-or-action p-button-text p-button-info p-button-rounded\"\r\n pTooltip=\"Ch\u1EE9c n\u0103ng kh\u00E1c\" tooltipPosition=\"top\"\r\n (click)=\"showContextMenu($event, rowData)\"></button> -->\r\n </div>\r\n </td>\r\n </tr>\r\n <after-view-checked *ngIf=\"rowData._index == indexCount - 1\" style=\"display: none;\"\r\n [renderKey]=\"dataSource\" (loaded)=\"handleTableRendered()\">\r\n </after-view-checked>\r\n </ng-template>\r\n </p-treeTable>\r\n <div class=\"row-bottom-sticky\"></div>\r\n </tn-custom-scrollbar>\r\n </div>\r\n</div>\r\n\r\n<ng-template #contentTd let-rowData let-rowNode=\"rowNode\" let-col=\"col\" let-index=\"index\" let-i=\"i\">\r\n <td *ngIf=\"col && col.visible && col.field != 'function' && (!rowData.hidden || !rowData.hidden[col.field])\"\r\n [attr.colSpan]=\"rowData.colSpan && rowData.colSpan[col.field]\"\r\n [attr.rowSpan]=\"rowData.rowSpan && rowData.rowSpan[col.field]\" [ngStyle]=\"col.extendData.style\"\r\n [class]=\"col.cellClass\" [class.first-td]=\"i == 0\">\r\n <tn-treeTableToggler *ngIf=\"i == 0\" [rowNode]=\"rowNode\"></tn-treeTableToggler>\r\n <span *ngIf=\"col.pipe\">\r\n <!-- <span class=\"p-column-title\" [pTooltip]=\"col.fullLabel\" [escape]=\"false\"\r\n tooltipPosition=\"top\">{{col.label}}</span> -->\r\n {{rowData['pipe__' + col.field]}}\r\n </span>\r\n <span *ngIf=\"!col.pipe\">\r\n <!-- <span class=\"p-column-title\" [pTooltip]=\"col.fullLabel\" [escape]=\"false\"\r\n tooltipPosition=\"top\">{{col.label}}</span> -->\r\n <span *ngIf=\"setting.showEditLink && col.showEditLink\" [pTooltip]=\"config.tooltipView\" tooltipPosition=\"top\"\r\n class=\"link-or-action\">\r\n <a href=\"javascript:;\" (click)=\"handleView(rowData)\" [pTooltip]=\"config.tooltipView\"\r\n tooltipPosition=\"top\">\r\n <ng-container [ngTemplateOutlet]=\"contentCell\"\r\n [ngTemplateOutletContext]=\"getContextCell(rowData, index, col, this)\">\r\n </ng-container>\r\n </a>\r\n </span>\r\n <span *ngIf=\"!setting.showEditLink || !col.showEditLink\">\r\n <ng-container [ngTemplateOutlet]=\"contentCell\"\r\n [ngTemplateOutletContext]=\"getContextCell(rowData, index, col, this)\">\r\n </ng-container>\r\n </span>\r\n </span>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n</ng-template>\r\n<ng-template #contentCell let-col=\"col\" let-rowData=\"rowData\" let-rowIndex=\"rowIndex\" let-field=\"field\"\r\n let-expanded=\"expanded\">\r\n <ng-container *ngIf=\"col.template\">\r\n <ng-container [ngTemplateOutlet]=\"col.template\"\r\n [ngTemplateOutletContext]=\"getContextCell(rowData, rowIndex, col, this)\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"!col.template\">\r\n <ng-container [ngSwitch]=\"col.dataType\">\r\n <span *ngSwitchCase=\"'color'\" style=\"display:block;text-align:center;\">\r\n <div pTooltip=\"{{rowData[field]}}\" tooltipPosition=\"top\" [ngStyle]=\"{'background-color':rowData[field]}\"\r\n style=\"width:30px;height:30px;margin:0 auto;\"></div>\r\n </span>\r\n <span *ngSwitchCase=\"'icon'\" style=\"display:block;text-align:center;\">\r\n <i pTooltip=\"{{rowData[field]}}\" tooltipPosition=\"top\" style=\"text-align: center;\"\r\n [ngClass]=\"rowData[field]\"></i>\r\n </span>\r\n <span *ngSwitchCase=\"'date'\" pTooltip=\"{{rowData[field] | date:'dd/MM/yyyy'}}\" tooltipPosition=\"top\">\r\n {{_crudService.renderDate(rowData[field], col.format)}}\r\n </span>\r\n <span *ngSwitchCase=\"'datetime'\" pTooltip=\"{{rowData[field] | date:'dd/MM/yyyy HH:mm'}}\"\r\n tooltipPosition=\"top\">\r\n {{_crudService.renderDateTime(rowData[field], col.format)}}\r\n </span>\r\n <span *ngSwitchCase=\"'user'\" class=\"user\">\r\n {{rowData[field] | userFormat | async}}\r\n </span>\r\n <div *ngSwitchCase=\"'users'\" [innerHTML]=\"rowData[field] | usersFormat | async\">\r\n </div>\r\n <span *ngSwitchCase=\"'int'\">\r\n {{rowData[field]}}\r\n </span>\r\n <span *ngSwitchCase=\"'decimal'\">\r\n {{rowData[field]}}\r\n </span>\r\n <span *ngSwitchCase=\"'boolean'\">\r\n <p-checkbox class=\"boolean-data-type\" [(ngModel)]=\"rowData[field]\" binary=\"true\"\r\n [disabled]=\"col.disableCheckBox\">\r\n </p-checkbox>\r\n </span>\r\n <span *ngSwitchCase=\"'html'\">\r\n <div *ngIf=\"rowData[field]==null?'':rowData[field]\" [innerHTML]=\"rowData[field] | safeHtml\"></div>\r\n </span>\r\n <span *ngSwitchCase=\"'metadataStatus'\">\r\n <span *ngIf=\"rowData['rejectReason']\" class=\"label-danger\" [pTooltip]=\"rowData['rejectReason']\"\r\n tooltipStyleClass=\"unset-width\" [escape]=\"false\" tooltipPosition=\"top\">T\u1EEB ch\u1ED1i</span>\r\n <span *ngIf=\"rowData[field] == '0' && !rowData['rejectReason']\" class=\"label-secondary\">Ch\u01B0a\r\n duy\u1EC7t</span>\r\n <span *ngIf=\"rowData[field] == '1' && !rowData['rejectReason']\" class=\"label-warning\">Ch\u1EDD duy\u1EC7t</span>\r\n <span *ngIf=\"rowData[field] == '2'\" class=\"label-primary\">\u0110\u00E3 duy\u1EC7t</span>\r\n </span>\r\n <ng-container *ngSwitchCase=\"'string'\">\r\n <ng-container *ngTemplateOutlet=\"contentCellString; context: {$implicit: rowData, field: col.field}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"null\">\r\n <ng-container *ngTemplateOutlet=\"contentCellString; context: {$implicit: rowData, field: col.field}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <ng-container [ngTemplateOutlet]=\"getComponentByType(col.dataType)\"\r\n [ngTemplateOutletContext]=\"getContextCell(rowData, rowIndex, col, this)\">\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>\r\n<ng-template #contentCellString let-rowData let-field=\"field\">\r\n <span>\r\n <!-- __sv: Short Value -->\r\n <ng-container *ngIf=\"rowData[field + '__sv']\">\r\n <ng-container *ngIf=\"!rowData[field + '__showFull']\">\r\n {{rowData[field + '__sv']}}\r\n <span class=\"toggle-showfull\" (click)=\"toggleShowFull(rowData, field)\" pTooltip=\"B\u1EA5m \u0111\u1EC3 xem th\u00EAm\"\r\n tooltipPosition=\"top\">[...]</span>\r\n </ng-container>\r\n <ng-container *ngIf=\"rowData[field + '__showFull']\">\r\n {{rowData[field]}}\r\n <span class=\"toggle-showfull\" (click)=\"toggleShowFull(rowData, field)\">Thu g\u1ECDn</span>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"!rowData[field + '__sv']\">\r\n {{rowData[field]}}\r\n </ng-container>\r\n </span>\r\n</ng-template>\r\n<ng-template #containerSticky>\r\n <span class=\"fix-sticky top\"></span>\r\n <span class=\"fix-sticky right\"></span>\r\n <!-- <span class=\"fix-sticky bottom\"></span> -->\r\n <span class=\"fix-sticky left\"></span>\r\n</ng-template>\r\n<ng-template #rowHeaderFilter let-columns=\"columns\">\r\n <tr class=\"filter-row\" *ngIf=\"!setting.hiddenFilterRow\">\r\n <th class=\"chkbox nopad center\" [class.sticky]=\"setting.stickyColumn\">\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n <ng-container *ngFor=\"let col of columns; let i = index\">\r\n <th *ngIf=\"col.visible && col.field != 'function'\" class=\"cell-header-filter center\">\r\n <ng-container *ngIf=\"col.allowFilter\">\r\n <ng-container *ngIf=\"col.templateFilter\">\r\n <ng-container [ngTemplateOutlet]=\"col.templateFilter\"\r\n [ngTemplateOutletContext]=\"{col: col, filterData: filterData, onSearch: onSearch, onShowFilterDropdownPanel: onShowFilterDropdownPanel, onHideFilterDropdownPanel: onHideFilterDropdownPanel}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"!col.templateFilter\" [ngSwitch]=\"col.controlType\">\r\n <ng-container *ngSwitchCase=\"'dropdown'\">\r\n <ng-container [ngTemplateOutlet]=\"filterDropdown\"\r\n [ngTemplateOutletContext]=\"{col: col.rawColumn}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'number'\">\r\n <ng-container [ngTemplateOutlet]=\"filterNumber\" [ngTemplateOutletContext]=\"{col: col}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'date'\">\r\n <ng-container [ngTemplateOutlet]=\"filterDate\" [ngTemplateOutletContext]=\"{col: col}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'datetime'\">\r\n <ng-container [ngTemplateOutlet]=\"filterDate\" [ngTemplateOutletContext]=\"{col: col}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <ng-container [ngSwitch]=\"col.dataType\">\r\n <ng-container *ngSwitchCase=\"'int'\">\r\n <ng-container [ngTemplateOutlet]=\"filterNumber\"\r\n [ngTemplateOutletContext]=\"{col: col}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'decimal'\">\r\n <ng-container [ngTemplateOutlet]=\"filterNumber\"\r\n [ngTemplateOutletContext]=\"{col: col}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'date'\">\r\n <ng-container [ngTemplateOutlet]=\"filterDate\"\r\n [ngTemplateOutletContext]=\"{col: col}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'datetime'\">\r\n <ng-container [ngTemplateOutlet]=\"filterDate\"\r\n [ngTemplateOutletContext]=\"{col: col}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'boolean'\">\r\n <ng-container [ngTemplateOutlet]=\"filterBoolean\"\r\n [ngTemplateOutletContext]=\"{col: col}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <ng-container [ngTemplateOutlet]=\"filterText\"\r\n [ngTemplateOutletContext]=\"{col: col}\">\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n </ng-container>\r\n <th *ngIf=\"!setting.hiddenFunctionColumn\" class=\"center setting-cell column-function\"\r\n [class.sticky]=\"setting.stickyColumn\">\r\n <!-- <button *ngIf=\"!setting.hiddenSetting\" type=\"button\" pButton pRipple icon=\"pi pi-cog\"\r\n class=\"p-button-rounded p-button-text\" pTooltip=\"C\u1EA5u h\u00ECnh hi\u1EC3n th\u1ECB\" tooltipPosition=\"top\"\r\n (click)=\"showSettings()\"></button>\r\n <button *ngIf=\"!setting.hiddenSettingPermission\" type=\"button\" pButton pRipple icon=\"pi pi-users\"\r\n class=\"p-button-rounded p-button-text\" pTooltip=\"Ph\u00E2n quy\u1EC1n d\u1EEF li\u1EC7u\" tooltipPosition=\"left\"\r\n [disabled]=\"checkPermissionToUseButton(BUTTON_PHAN_QUYEN)\" (click)=\"showSettingsPermission()\"></button>\r\n <button *ngIf=\"!setting.hiddenSettingWorkflow\" type=\"button\" pButton pRipple icon=\"pi pi-sitemap\"\r\n class=\"p-button-rounded p-button-text\" pTooltip=\"C\u1EA5u h\u00ECnh quy tr\u00ECnh\" tooltipPosition=\"left\"\r\n [disabled]=\"checkPermissionToUseButton(BUTTON_CAU_HINH_QUY_TRINH)\"\r\n (click)=\"showSettingsWorkflowNew()\"></button> -->\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n </tr>\r\n</ng-template>\r\n<ng-template #filterDropdown let-col=\"col\">\r\n <div #filterBox style=\"width: 100%; border-radius: 4px;\">\r\n <dropdown *ngIf=\"col && filterSchema.dropdown[col.field]\" [control]=\"filterSchema.dropdown[col.field]\"\r\n [dataSource]=\"filterSchema.dropdown[col.field].dataSource\" [(value)]=\"filterData[col.field]\"\r\n (onHideSmartEvent)=\"onSearch()\" (onShow)=\"onShowFilterDropdownPanel($event)\"\r\n (onHide)=\"onHideFilterDropdownPanel($event)\" (mousedown)=\"initFilterBoxFocus(filterBox)\"></dropdown>\r\n </div>\r\n</ng-template>\r\n<ng-template #filterText let-col=\"col\">\r\n <div #filterBox class=\"text-filter filter-box\" tabindex=\"-1\" (mousedown)=\"initFilterBoxFocus(filterBox)\">\r\n <div tabindex=\"-1\">\r\n <input pInputText type=\"text\" class=\"input-search\" [placeholder]=\"col.label\"\r\n [(ngModel)]=\"filterData[col.field]\" (change)=\"onSearch()\"\r\n (keyup.esc)=\"onClearSearch(filterBox, col.field)\">\r\n </div>\r\n <span [ngClass]=\"{'action-clear': true, 'dirty': filterData[col.field] != null && filterData[col.field] !== ''}\"\r\n [pTooltip]=\"'B\u1ECF filter'\" tooltipPosition=\"top\" (mousedown)=\"onClearSearch(filterBox, col.field)\"\r\n tabindex=\"-1\"><i class=\"pi pi-filter-slash\"></i></span>\r\n <after-view-checked style=\"display: none;\" (loaded)=\"initFilterBoxFocus(filterBox)\">\r\n </after-view-checked>\r\n </div>\r\n</ng-template>\r\n<ng-template #filterNumber let-col=\"col\">\r\n <div #filterBox class=\"number-picker-range filter-box\" tabindex=\"-1\" (mousedown)=\"initFilterBoxFocus(filterBox)\">\r\n <div tabindex=\"-1\">\r\n <tn-number-picker-range #numberRange [maskType]=\"col.dataType\" [(ngModel)]=\"filterData[col.field]\"\r\n [min]=\"col.min\" [max]=\"col.max\" (change)=\"onSearch()\">\r\n </tn-number-picker-range>\r\n </div>\r\n <span\r\n [ngClass]=\"{'action-clear': true, 'dirty': filterData[col.field] && ((filterData[col.field][0] != null && filterData[col.field][0] !== '') || (filterData[col.field][1] != null && filterData[col.field][1] !== ''))}\"\r\n [pTooltip]=\"'B\u1ECF filter'\" tooltipPosition=\"top\" (mousedown)=\"onClearNumberSearch(filterBox, numberRange)\"\r\n tabindex=\"-1\">\r\n <i class=\"pi pi-filter-slash\"></i></span>\r\n <after-view-checked style=\"display: none;\" (loaded)=\"initFilterBoxFocus(filterBox)\">\r\n </after-view-checked>\r\n </div>\r\n</ng-template>\r\n<ng-template #filterDate let-col=\"col\">\r\n <div #filterBox class=\"date-picker-range filter-box\" tabindex=\"-1\" (mousedown)=\"initFilterBoxFocus(filterBox)\">\r\n <div tabindex=\"-1\">\r\n <tn-datetime-picker-range #dateRange [control]=\"filterSchema.dateRange\"\r\n (onChanged)=\"onChangeDateTime($event, col.field)\">\r\n </tn-datetime-picker-range>\r\n </div>\r\n <span\r\n [ngClass]=\"{'action-clear': true, 'dirty': filterData[col.field] && ((filterData[col.field][0] != null && filterData[col.field][0] !== '') || (filterData[col.field][1] != null && filterData[col.field][1] !== ''))}\"\r\n [pTooltip]=\"'B\u1ECF filter'\" tooltipPosition=\"top\"\r\n (mousedown)=\"onClearDateSearch(filterBox, dateRange, col.field)\" tabindex=\"-1\"><i\r\n class=\"pi pi-filter-slash\"></i></span>\r\n <after-view-checked style=\"display: none;\" (loaded)=\"initFilterBoxFocus(filterBox)\">\r\n </after-view-checked>\r\n </div>\r\n</ng-template>\r\n<ng-template #filterBoolean let-col=\"col\">\r\n <div class=\"filter-boolean-box\">\r\n <p-selectButton\r\n [options]=\"[{value: true, label: 'C\u00F3', icon: 'pi pi-check'}, {value: false, label: 'Kh\u00F4ng', icon: 'pi pi-times'}]\"\r\n [multiple]=\"true\" [(ngModel)]=\"filterData[col.field]\" (onChange)=\"onChangeBoolean($event, col.field)\">\r\n <ng-template let-item>\r\n <i style=\"padding: 3px 0;\" [class]=\"item.icon\"></i>\r\n </ng-template>\r\n </p-selectButton>\r\n </div>\r\n</ng-template>",
|
|
22975
|
-
styles: [".filter-row>th:not(.sticky):not(.chkbox){padding:3px!important}::ng-deep tn-tree-table .ps__rail-x,::ng-deep tn-tree-table .ps__rail-y{z-index:5}::ng-deep tn-tree-table .p-treetable .p-treetable-thead>tr>th.cell-fixed-filter{z-index:999}::ng-deep tn-tree-table .p-treetable .p-treetable-thead>tr>th.cell-fixed-filter .fixed-filter{min-width:200px;position:fixed;z-index:10}::ng-deep tn-tree-table .p-treetable .p-treetable-thead>tr>th .container-icon-loading{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}::ng-deep tn-tree-table tr.generated-by-base td.chkbox{background:#e9ecef}::ng-deep tn-tree-table .cell-header-filter{position:relative}::ng-deep tn-tree-table .cell-header-filter .tn-dropdown{height:32px}::ng-deep tn-tree-table .cell-header-filter tn-mask .p-inputtext{width:100%}::ng-deep tn-tree-table .cell-header-filter .filter-box{background-color:#fff;border-radius:3px;display:flex;min-width:0}::ng-deep tn-tree-table .cell-header-filter .filter-box>div{border:1px solid #ced4da;border-radius:3px 0 0 3px;border-right:none;flex:1;outline:none;overflow:hidden}::ng-deep tn-tree-table .cell-header-filter .filter-box>span{align-items:center;background:#f5f6f8;border:1px solid #ced4da;color:#6c757d;cursor:pointer;display:inline-flex;flex-basis:32px;height:32px;justify-content:center;min-width:unset;outline:none}::ng-deep tn-tree-table .cell-header-filter .filter-box>span.action-clear{border-radius:0 3px 3px 0}::ng-deep tn-tree-table .cell-header-filter .filter-box>span.action-clear.dirty{color:#008eff}::ng-deep tn-tree-table .cell-header-filter .filter-box input{border:none;box-shadow:none!important;padding-left:5px;padding-right:5px}::ng-deep tn-tree-table .cell-header-filter .filter-box:not(.no-transition){transition:min-width .1s}::ng-deep tn-tree-table .cell-header-filter .filter-box.boolean-filter>div{flex:0 0 109px;width:109px}::ng-deep tn-tree-table .cell-header-filter .p-multiselect-label.p-placeholder{padding-left:.5rem;padding-right:.5rem}::ng-deep tn-tree-table .cell-header-filter.focus-within,::ng-deep tn-tree-table .cell-header-filter:focus-within{z-index:10!important}::ng-deep tn-tree-table .cell-header-filter.focus-within .filter-boolean-box .p-button,::ng-deep tn-tree-table .cell-header-filter:focus-within .filter-boolean-box .p-button{z-index:10}::ng-deep tn-tree-table .cell-header-filter.focus-within .filter-box>div,::ng-deep tn-tree-table .cell-header-filter:focus-within .filter-box>div{border-color:#2196f3;box-shadow:0 0 0 .2rem #a6d5fa;z-index:0}::ng-deep tn-tree-table .cell-header-filter.focus-within .short-filter-box,::ng-deep tn-tree-table .cell-header-filter:focus-within .short-filter-box{box-shadow:5px 0 15px 1px rgba(0,0,0,.27058823529411763);min-width:250px;position:absolute;top:calc(50% - 16px);z-index:2}::ng-deep tn-tree-table .cell-header-filter.focus-within .short-filter-box>div,::ng-deep tn-tree-table .cell-header-filter:focus-within .short-filter-box>div{border-color:#2196f3;box-shadow:0 0 0 .2rem #a6d5fa;flex:1;z-index:0}::ng-deep tn-tree-table .cell-header-filter.focus-within .short-filter-box>span.action-clear,::ng-deep tn-tree-table .cell-header-filter:focus-within .short-filter-box>span.action-clear{display:flex}::ng-deep tn-tree-table .cell-header-filter.focus-within .short-filter-box.boolean-filter,::ng-deep tn-tree-table .cell-header-filter:focus-within .short-filter-box.boolean-filter{min-width:140px}::ng-deep tn-tree-table .cell-header-filter.focus-within .short-filter-box.boolean-filter>div,::ng-deep tn-tree-table .cell-header-filter:focus-within .short-filter-box.boolean-filter>div{flex:0 0 109px;width:109px}::ng-deep tn-tree-table .cell-header-filter.focus-within:nth-last-child(2) .short-filter-box,::ng-deep tn-tree-table .cell-header-filter:focus-within:nth-last-child(2) .short-filter-box{left:50%;transform:translateX(-50%)}::ng-deep tn-tree-table .cell-header-filter:last-child .filter-box{right:3px}::ng-deep tn-tree-table .table-border-line{background-color:#eee;position:absolute;z-index:5}::ng-deep tn-tree-table .table-border-line.--left,::ng-deep tn-tree-table .table-border-line.--right{bottom:0;top:0;width:1px}::ng-deep tn-tree-table .table-border-line.--bottom,::ng-deep tn-tree-table .table-border-line.--top{height:1px;left:0;right:0}::ng-deep tn-tree-table .table-border-line.--left{left:0}::ng-deep tn-tree-table .table-border-line.--right{right:0}::ng-deep tn-tree-table .table-border-line.--top{top:0}::ng-deep tn-tree-table .table-border-line.--bottom{bottom:0}::ng-deep tn-tree-table .filter-boolean-box{text-align:center}::ng-deep tn-tree-table .filter-boolean-box .p-selectbutton{white-space:nowrap}::ng-deep tn-tree-table .custom-search-area crud-form{width:100%}::ng-deep tn-tree-table>p-contextmenu{display:none}"]
|
|
23056
|
+
template: "<div class=\"custom-card card card-w-title tn-g-page-layout-1\">\r\n <div class=\"ui-helper-clearfix tn-g-page-layout-1__header-area\">\r\n <div *ngIf=\"searchCustom\" class=\"p-grid ui-fluid custom-p-col custom-search-area\">\r\n <div class=\"p-col-12 main-container-search\">\r\n <div class=\"p-grid main-container-search-inner\">\r\n <ng-container>\r\n <ng-container *ngTemplateOutlet=\"searchCustom; context: {$implicit: this}\"></ng-container>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"p-grid ui-fluid custom-p-col page-title-area\">\r\n <div class=\"main-title p-col-8\">\r\n <h1 *ngIf=\"!hasTemplate('customTitle')\">\r\n {{setting.title != null ? setting.title : 'Danh s\u00E1ch ' + setting.objectName}}\r\n </h1>\r\n\r\n <ng-container *ngIf=\"hasTemplate('customTitle')\" [ngTemplateOutlet]=\"getTemplate('customTitle')\"\r\n [ngTemplateOutletContext]=\"{crudList: this}\">\r\n </ng-container>\r\n </div>\r\n <div class=\"p-col-4\">\r\n <paging-next-back-only [model]=\"model\" [setting]=\"setting\" (onChanged)=\"getData()\"\r\n (onChangeLimitPage)=\"savePageSize()\">\r\n </paging-next-back-only>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"p-grid crudListToolbar tn-g-page-layout-1__toolbar-area\">\r\n <div class=\"p-col-7 button-group function-topbar\">\r\n <button pButton pRipple type=\"button\" label=\"Th\u00EAm m\u1EDBi\" icon=\"pi pi-plus\" class=\"p-button-text\"\r\n (click)=\"handleAdd($event)\"></button>\r\n <button pButton pRipple type=\"button\" label=\"\u0110\u00E1nh l\u1EA1i m\u00E3 ph\u00E2n c\u1EA5p\" icon=\"pi pi-share-alt\"\r\n class=\"p-button-text\" style=\"display: none;\" (click)=\"handleDanhMaPC($event)\"></button>\r\n </div>\r\n <div class=\"p-col-5 p-inputgroup advance-search-container\">\r\n <advance-search #advanceSearch [parentSetting]=\"setting\" [searchInfo]=\"searchInfo\" [loading]=\"model.loading\"\r\n (onSearch)=\"handleSearchAdvs($event)\" (onInit)=\"handleInitAdvanceSearch($event)\">\r\n </advance-search>\r\n <!-- <input [placeholder]=\"'T\u00ECm ki\u1EBFm'\" [(ngModel)]=\"keyword\" pInputText type=\"text\" (change)=\"getData()\">\r\n <button pButton type=\"button\" class=\"btn-info btn-search\" label=\"T\u00ECm ki\u1EBFm\" (click)=\"getData()\"></button> -->\r\n </div>\r\n </div>\r\n <div class=\"tn-g-page-layout-1__table-area\">\r\n <tn-custom-scrollbar [showScrollHorizontal]=\"true\" class=\"--has-border\">\r\n <p-treeTable #treetable [value]=\"dataSource\" [columns]=\"setting.cols\" styleClass=\"treeOrganization\">\r\n <ng-template let-columns pTemplate=\"header\">\r\n <tr>\r\n <th style=\"width: 50px\" class=\"chkbox\">\r\n <button type=\"button\" pButton pRipple icon=\"pi pi-refresh\"\r\n class=\"p-button-rounded p-button-text btnReload\" pTooltip=\"L\u00E0m m\u1EDBi d\u1EEF li\u1EC7u\"\r\n tooltipPosition=\"top\" [disabled]=\"model.loading\" (click)=\"getData()\"></button>\r\n </th>\r\n <th *ngFor=\"let col of columns\" [ttSortableColumn]=\"col.field\" [style.width]=\"col.width\"\r\n [style.textAlign]=\"col.textAlign\" [className]=\"col.class\" [pTooltip]=\"col.fullLabel\"\r\n tooltipStyleClass=\"unset-width\" style=\"text-align: center;\">\r\n {{col.label}}\r\n <p-treeTableSortIcon [field]=\"col.field\"></p-treeTableSortIcon>\r\n </th>\r\n <th style=\"text-align: center; width: 8em\">\r\n Ch\u1EE9c n\u0103ng\r\n </th>\r\n </tr>\r\n <ng-container *ngTemplateOutlet=\"rowHeaderFilter; context: {columns: columns}\">\r\n </ng-container>\r\n </ng-template>\r\n <ng-template let-rowNode let-rowData=\"rowData\" let-index=\"index\" let-columns=\"columns\" pTemplate=\"body\">\r\n <tr [ttRow]=\"rowNode\" [class.generated-by-base]=\"rowData._GeneratedByBase\">\r\n <td class=\"chkbox link-or-action cell-checkbox\">{{rowData._indexInDatabase}}</td>\r\n <ng-container *ngFor=\"let col of columns; let i = index\">\r\n <ng-container\r\n *ngTemplateOutlet=\"contentTd; context: {$implicit: rowData, rowNode: rowNode, col: col, index: index, i: i}\">\r\n </ng-container>\r\n </ng-container>\r\n <td style=\"text-align: center; width: 8em;\">\r\n <div *ngIf=\"hasTemplate('function')\" class=\"p-toolbar-group-center button-group\">\r\n <ng-container [ngTemplateOutlet]=\"getTemplate('function')\"\r\n [ngTemplateOutletContext]=\"{rowData: rowData, rowIndex: index}\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </div>\r\n <div *ngIf=\"!hasTemplate('function')\" class=\"p-toolbar-group-center button-group\">\r\n <ng-container [ngTemplateOutletContext]=\"{rowData: rowData, rowIndex: index}\"\r\n [ngTemplateOutlet]=\"getTemplate('buttonBefore')\"></ng-container>\r\n <button *ngIf=\"!rowData.hiddenEdit\" type=\"button\" pButton pRipple\r\n [pTooltip]=\"'FORM.EDIT' | translate\" tooltipPosition=\"top\"\r\n [disabled]=\"disableEdit(rowData)\"\r\n class=\"p-button-rounded p-button-text p-button-info link-or-action\"\r\n icon=\"pi pi-pencil\" (click)=\"handleEdit(rowData)\"></button>\r\n <button *ngIf=\"!rowData.hiddenDelete\" type=\"button\" pButton pRipple\r\n [disabled]=\"disableDelete(rowData)\" [pTooltip]=\"'FORM.DELETE' | translate\"\r\n tooltipPosition=\"top\"\r\n class=\"p-button-rounded p-button-text p-button-danger link-or-action\"\r\n icon=\"pi pi-trash\" (click)=\"handleDelete(rowData)\"></button>\r\n <!-- <button *ngIf=\"this.menuButtons\" type=\"button\" pButton icon=\"pi pi-ellipsis-v\"\r\n class=\"link-or-action p-button-text p-button-info p-button-rounded\"\r\n pTooltip=\"Ch\u1EE9c n\u0103ng kh\u00E1c\" tooltipPosition=\"top\"\r\n (click)=\"showContextMenu($event, rowData)\"></button> -->\r\n </div>\r\n </td>\r\n </tr>\r\n <after-view-checked *ngIf=\"rowData._index == indexCount - 1\" style=\"display: none;\"\r\n [renderKey]=\"dataSource\" (loaded)=\"handleTableRendered()\">\r\n </after-view-checked>\r\n </ng-template>\r\n </p-treeTable>\r\n <div class=\"row-bottom-sticky\"></div>\r\n </tn-custom-scrollbar>\r\n </div>\r\n</div>\r\n\r\n<ng-template #contentTd let-rowData let-rowNode=\"rowNode\" let-col=\"col\" let-index=\"index\" let-i=\"i\">\r\n <td *ngIf=\"col && col.visible && col.field != 'function' && (!rowData.hidden || !rowData.hidden[col.field])\"\r\n [attr.colSpan]=\"rowData.colSpan && rowData.colSpan[col.field]\"\r\n [attr.rowSpan]=\"rowData.rowSpan && rowData.rowSpan[col.field]\" [ngStyle]=\"col.extendData.style\"\r\n [class]=\"col.cellClass\" [class.first-td]=\"i == 0\">\r\n <tn-treeTableToggler *ngIf=\"i == 0\" [rowNode]=\"rowNode\"></tn-treeTableToggler>\r\n <span *ngIf=\"col.pipe\">\r\n <!-- <span class=\"p-column-title\" [pTooltip]=\"col.fullLabel\" [escape]=\"false\"\r\n tooltipPosition=\"top\">{{col.label}}</span> -->\r\n {{rowData['pipe__' + col.field]}}\r\n </span>\r\n <span *ngIf=\"!col.pipe\">\r\n <!-- <span class=\"p-column-title\" [pTooltip]=\"col.fullLabel\" [escape]=\"false\"\r\n tooltipPosition=\"top\">{{col.label}}</span> -->\r\n <span *ngIf=\"setting.showEditLink && col.showEditLink\" [pTooltip]=\"config.tooltipView\" tooltipPosition=\"top\"\r\n class=\"link-or-action\">\r\n <a href=\"javascript:;\" (click)=\"handleView(rowData)\" [pTooltip]=\"config.tooltipView\"\r\n tooltipPosition=\"top\">\r\n <ng-container [ngTemplateOutlet]=\"contentCell\"\r\n [ngTemplateOutletContext]=\"getContextCell(rowData, index, col, this)\">\r\n </ng-container>\r\n </a>\r\n </span>\r\n <span *ngIf=\"!setting.showEditLink || !col.showEditLink\">\r\n <ng-container [ngTemplateOutlet]=\"contentCell\"\r\n [ngTemplateOutletContext]=\"getContextCell(rowData, index, col, this)\">\r\n </ng-container>\r\n </span>\r\n </span>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n</ng-template>\r\n<ng-template #contentCell let-col=\"col\" let-rowData=\"rowData\" let-rowIndex=\"rowIndex\" let-field=\"field\"\r\n let-expanded=\"expanded\">\r\n <ng-container *ngIf=\"col.template\">\r\n <ng-container [ngTemplateOutlet]=\"col.template\"\r\n [ngTemplateOutletContext]=\"getContextCell(rowData, rowIndex, col, this)\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"!col.template\">\r\n <ng-container [ngSwitch]=\"col.dataType\">\r\n <span *ngSwitchCase=\"'color'\" style=\"display:block;text-align:center;\">\r\n <div [pTooltip]=\"rowData[field]\" tooltipPosition=\"top\" [ngStyle]=\"{'background-color':rowData[field]}\"\r\n style=\"width:30px;height:30px;margin:0 auto;\"></div>\r\n </span>\r\n <span *ngSwitchCase=\"'icon'\" style=\"display:block;text-align:center;\">\r\n <i [pTooltip]=\"rowData[field]\" tooltipPosition=\"top\" style=\"text-align: center;\"\r\n [ngClass]=\"rowData[field]\"></i>\r\n </span>\r\n <span *ngSwitchCase=\"'date'\" [pTooltip]=\"rowData[field] | date:'dd/MM/yyyy'\" tooltipPosition=\"top\">\r\n {{_crudService.renderDate(rowData[field], col.format)}}\r\n </span>\r\n <span *ngSwitchCase=\"'datetime'\" [pTooltip]=\"rowData[field] | date:'dd/MM/yyyy HH:mm'\"\r\n tooltipPosition=\"top\">\r\n {{_crudService.renderDateTime(rowData[field], col.format)}}\r\n </span>\r\n <span *ngSwitchCase=\"'user'\" class=\"user\">\r\n {{rowData[field] | userFormat | async}}\r\n </span>\r\n <div *ngSwitchCase=\"'users'\" [innerHTML]=\"rowData[field] | usersFormat | async\">\r\n </div>\r\n <span *ngSwitchCase=\"'int'\">\r\n {{rowData[field]}}\r\n </span>\r\n <span *ngSwitchCase=\"'decimal'\">\r\n {{rowData[field]}}\r\n </span>\r\n <span *ngSwitchCase=\"'boolean'\">\r\n <p-checkbox class=\"boolean-data-type\" [(ngModel)]=\"rowData[field]\" binary=\"true\"\r\n [disabled]=\"col.disableCheckBox\">\r\n </p-checkbox>\r\n </span>\r\n <span *ngSwitchCase=\"'html'\">\r\n <div *ngIf=\"rowData[field]==null?'':rowData[field]\" [innerHTML]=\"rowData[field] | safeHtml\"></div>\r\n </span>\r\n <span *ngSwitchCase=\"'metadataStatus'\">\r\n <span *ngIf=\"rowData['rejectReason']\" class=\"label-danger\" [pTooltip]=\"rowData['rejectReason']\"\r\n tooltipStyleClass=\"unset-width\" [escape]=\"false\" tooltipPosition=\"top\">T\u1EEB ch\u1ED1i</span>\r\n <span *ngIf=\"rowData[field] == '0' && !rowData['rejectReason']\" class=\"label-secondary\">Ch\u01B0a\r\n duy\u1EC7t</span>\r\n <span *ngIf=\"rowData[field] == '1' && !rowData['rejectReason']\" class=\"label-warning\">Ch\u1EDD duy\u1EC7t</span>\r\n <span *ngIf=\"rowData[field] == '2'\" class=\"label-primary\">\u0110\u00E3 duy\u1EC7t</span>\r\n </span>\r\n <ng-container *ngSwitchCase=\"'string'\">\r\n <ng-container *ngTemplateOutlet=\"contentCellString; context: {$implicit: rowData, field: col.field}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"null\">\r\n <ng-container *ngTemplateOutlet=\"contentCellString; context: {$implicit: rowData, field: col.field}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <ng-container [ngTemplateOutlet]=\"getComponentByType(col.dataType)\"\r\n [ngTemplateOutletContext]=\"getContextCell(rowData, rowIndex, col, this)\">\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>\r\n<ng-template #contentCellString let-rowData let-field=\"field\">\r\n <span>\r\n <!-- __sv: Short Value -->\r\n <ng-container *ngIf=\"rowData[field + '__sv']\">\r\n <ng-container *ngIf=\"!rowData[field + '__showFull']\">\r\n {{rowData[field + '__sv']}}\r\n <span class=\"toggle-showfull\" (click)=\"toggleShowFull(rowData, field)\" pTooltip=\"B\u1EA5m \u0111\u1EC3 xem th\u00EAm\"\r\n tooltipPosition=\"top\">[...]</span>\r\n </ng-container>\r\n <ng-container *ngIf=\"rowData[field + '__showFull']\">\r\n {{rowData[field]}}\r\n <span class=\"toggle-showfull\" (click)=\"toggleShowFull(rowData, field)\">Thu g\u1ECDn</span>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"!rowData[field + '__sv']\">\r\n {{rowData[field]}}\r\n </ng-container>\r\n </span>\r\n</ng-template>\r\n<ng-template #containerSticky>\r\n <span class=\"fix-sticky top\"></span>\r\n <span class=\"fix-sticky right\"></span>\r\n <!-- <span class=\"fix-sticky bottom\"></span> -->\r\n <span class=\"fix-sticky left\"></span>\r\n</ng-template>\r\n<ng-template #rowHeaderFilter let-columns=\"columns\">\r\n <tr class=\"filter-row\" *ngIf=\"!setting.hiddenFilterRow\">\r\n <th class=\"chkbox nopad center\" [class.sticky]=\"setting.stickyColumn\">\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n <ng-container *ngFor=\"let col of columns; let i = index\">\r\n <th *ngIf=\"col.visible && col.field != 'function'\" class=\"cell-header-filter center\">\r\n <ng-container *ngIf=\"col.allowFilter\">\r\n <ng-container *ngIf=\"col.templateFilter\">\r\n <ng-container [ngTemplateOutlet]=\"col.templateFilter\"\r\n [ngTemplateOutletContext]=\"{col: col, filterData: filterData, onSearch: onSearch, onShowFilterDropdownPanel: onShowFilterDropdownPanel, onHideFilterDropdownPanel: onHideFilterDropdownPanel}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"!col.templateFilter\" [ngSwitch]=\"col.controlType\">\r\n <ng-container *ngSwitchCase=\"'dropdown'\">\r\n <ng-container [ngTemplateOutlet]=\"filterDropdown\"\r\n [ngTemplateOutletContext]=\"{col: col.rawColumn}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'number'\">\r\n <ng-container [ngTemplateOutlet]=\"filterNumber\" [ngTemplateOutletContext]=\"{col: col}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'date'\">\r\n <ng-container [ngTemplateOutlet]=\"filterDate\" [ngTemplateOutletContext]=\"{col: col}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'datetime'\">\r\n <ng-container [ngTemplateOutlet]=\"filterDate\" [ngTemplateOutletContext]=\"{col: col}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <ng-container [ngSwitch]=\"col.dataType\">\r\n <ng-container *ngSwitchCase=\"'int'\">\r\n <ng-container [ngTemplateOutlet]=\"filterNumber\"\r\n [ngTemplateOutletContext]=\"{col: col}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'decimal'\">\r\n <ng-container [ngTemplateOutlet]=\"filterNumber\"\r\n [ngTemplateOutletContext]=\"{col: col}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'date'\">\r\n <ng-container [ngTemplateOutlet]=\"filterDate\"\r\n [ngTemplateOutletContext]=\"{col: col}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'datetime'\">\r\n <ng-container [ngTemplateOutlet]=\"filterDate\"\r\n [ngTemplateOutletContext]=\"{col: col}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'boolean'\">\r\n <ng-container [ngTemplateOutlet]=\"filterBoolean\"\r\n [ngTemplateOutletContext]=\"{col: col}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <ng-container [ngTemplateOutlet]=\"filterText\"\r\n [ngTemplateOutletContext]=\"{col: col}\">\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n </ng-container>\r\n <th *ngIf=\"!setting.hiddenFunctionColumn\" class=\"center setting-cell column-function\"\r\n [class.sticky]=\"setting.stickyColumn\">\r\n <!-- <button *ngIf=\"!setting.hiddenSetting\" type=\"button\" pButton pRipple icon=\"pi pi-cog\"\r\n class=\"p-button-rounded p-button-text\" pTooltip=\"C\u1EA5u h\u00ECnh hi\u1EC3n th\u1ECB\" tooltipPosition=\"top\"\r\n (click)=\"showSettings()\"></button>\r\n <button *ngIf=\"!setting.hiddenSettingPermission\" type=\"button\" pButton pRipple icon=\"pi pi-users\"\r\n class=\"p-button-rounded p-button-text\" pTooltip=\"Ph\u00E2n quy\u1EC1n d\u1EEF li\u1EC7u\" tooltipPosition=\"left\"\r\n [disabled]=\"checkPermissionToUseButton(BUTTON_PHAN_QUYEN)\" (click)=\"showSettingsPermission()\"></button>\r\n <button *ngIf=\"!setting.hiddenSettingWorkflow\" type=\"button\" pButton pRipple icon=\"pi pi-sitemap\"\r\n class=\"p-button-rounded p-button-text\" pTooltip=\"C\u1EA5u h\u00ECnh quy tr\u00ECnh\" tooltipPosition=\"left\"\r\n [disabled]=\"checkPermissionToUseButton(BUTTON_CAU_HINH_QUY_TRINH)\"\r\n (click)=\"showSettingsWorkflowNew()\"></button> -->\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n </tr>\r\n</ng-template>\r\n<ng-template #filterDropdown let-col=\"col\">\r\n <div #filterBox style=\"width: 100%; border-radius: 4px;\">\r\n <dropdown *ngIf=\"col && filterSchema.dropdown[col.field]\" [control]=\"filterSchema.dropdown[col.field]\"\r\n [dataSource]=\"filterSchema.dropdown[col.field].dataSource\" [(value)]=\"filterData[col.field]\"\r\n (onHideSmartEvent)=\"onSearch()\" (onShow)=\"onShowFilterDropdownPanel($event)\"\r\n (onHide)=\"onHideFilterDropdownPanel($event)\" (mousedown)=\"initFilterBoxFocus(filterBox)\"></dropdown>\r\n </div>\r\n</ng-template>\r\n<ng-template #filterText let-col=\"col\">\r\n <div #filterBox class=\"text-filter filter-box\" tabindex=\"-1\" (mousedown)=\"initFilterBoxFocus(filterBox)\">\r\n <div tabindex=\"-1\">\r\n <input pInputText type=\"text\" class=\"input-search\" [placeholder]=\"col.label\"\r\n [(ngModel)]=\"filterData[col.field]\" (change)=\"onSearch()\"\r\n (keyup.esc)=\"onClearSearch(filterBox, col.field)\">\r\n </div>\r\n <span [ngClass]=\"{'action-clear': true, 'dirty': filterData[col.field] != null && filterData[col.field] !== ''}\"\r\n [pTooltip]=\"'B\u1ECF filter'\" tooltipPosition=\"top\" (mousedown)=\"onClearSearch(filterBox, col.field)\"\r\n tabindex=\"-1\"><i class=\"pi pi-filter-slash\"></i></span>\r\n <after-view-checked style=\"display: none;\" (loaded)=\"initFilterBoxFocus(filterBox)\">\r\n </after-view-checked>\r\n </div>\r\n</ng-template>\r\n<ng-template #filterNumber let-col=\"col\">\r\n <div #filterBox class=\"number-picker-range filter-box\" tabindex=\"-1\" (mousedown)=\"initFilterBoxFocus(filterBox)\">\r\n <div tabindex=\"-1\">\r\n <tn-number-picker-range #numberRange [maskType]=\"col.dataType\" [(ngModel)]=\"filterData[col.field]\"\r\n [min]=\"col.min\" [max]=\"col.max\" (change)=\"onSearch()\">\r\n </tn-number-picker-range>\r\n </div>\r\n <span\r\n [ngClass]=\"{'action-clear': true, 'dirty': filterData[col.field] && ((filterData[col.field][0] != null && filterData[col.field][0] !== '') || (filterData[col.field][1] != null && filterData[col.field][1] !== ''))}\"\r\n [pTooltip]=\"'B\u1ECF filter'\" tooltipPosition=\"top\" (mousedown)=\"onClearNumberSearch(filterBox, numberRange)\"\r\n tabindex=\"-1\">\r\n <i class=\"pi pi-filter-slash\"></i></span>\r\n <after-view-checked style=\"display: none;\" (loaded)=\"initFilterBoxFocus(filterBox)\">\r\n </after-view-checked>\r\n </div>\r\n</ng-template>\r\n<ng-template #filterDate let-col=\"col\">\r\n <div #filterBox class=\"date-picker-range filter-box\" tabindex=\"-1\" (mousedown)=\"initFilterBoxFocus(filterBox)\">\r\n <div tabindex=\"-1\">\r\n <tn-datetime-picker-range #dateRange [control]=\"filterSchema.dateRange\"\r\n (onChanged)=\"onChangeDateTime($event, col.field)\">\r\n </tn-datetime-picker-range>\r\n </div>\r\n <span\r\n [ngClass]=\"{'action-clear': true, 'dirty': filterData[col.field] && ((filterData[col.field][0] != null && filterData[col.field][0] !== '') || (filterData[col.field][1] != null && filterData[col.field][1] !== ''))}\"\r\n [pTooltip]=\"'B\u1ECF filter'\" tooltipPosition=\"top\"\r\n (mousedown)=\"onClearDateSearch(filterBox, dateRange, col.field)\" tabindex=\"-1\"><i\r\n class=\"pi pi-filter-slash\"></i></span>\r\n <after-view-checked style=\"display: none;\" (loaded)=\"initFilterBoxFocus(filterBox)\">\r\n </after-view-checked>\r\n </div>\r\n</ng-template>\r\n<ng-template #filterBoolean let-col=\"col\">\r\n <div class=\"filter-boolean-box\">\r\n <p-selectButton\r\n [options]=\"[{value: true, label: 'C\u00F3', icon: 'pi pi-check'}, {value: false, label: 'Kh\u00F4ng', icon: 'pi pi-times'}]\"\r\n [multiple]=\"true\" [(ngModel)]=\"filterData[col.field]\" (onChange)=\"onChangeBoolean($event, col.field)\">\r\n <ng-template let-item>\r\n <i style=\"padding: 3px 0;\" [class]=\"item.icon\"></i>\r\n </ng-template>\r\n </p-selectButton>\r\n </div>\r\n</ng-template>",
|
|
23057
|
+
styles: [".filter-row>th:not(.sticky):not(.chkbox){padding:3px!important}.advance-search-container{display:flex;justify-content:flex-end}::ng-deep tn-tree-table advance-search{display:block;flex:1;max-width:400px}::ng-deep tn-tree-table .ps__rail-x,::ng-deep tn-tree-table .ps__rail-y{z-index:5}::ng-deep tn-tree-table .p-treetable .p-treetable-thead>tr>th.cell-fixed-filter{z-index:999}::ng-deep tn-tree-table .p-treetable .p-treetable-thead>tr>th.cell-fixed-filter .fixed-filter{min-width:200px;position:fixed;z-index:10}::ng-deep tn-tree-table .p-treetable .p-treetable-thead>tr>th .container-icon-loading{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}::ng-deep tn-tree-table tr.generated-by-base td.chkbox{background:#e9ecef}::ng-deep tn-tree-table .cell-header-filter{position:relative}::ng-deep tn-tree-table .cell-header-filter .tn-dropdown{height:32px}::ng-deep tn-tree-table .cell-header-filter tn-mask .p-inputtext{width:100%}::ng-deep tn-tree-table .cell-header-filter .filter-box{background-color:#fff;border-radius:3px;display:flex;min-width:0}::ng-deep tn-tree-table .cell-header-filter .filter-box>div{border:1px solid #ced4da;border-radius:3px 0 0 3px;border-right:none;flex:1;outline:none;overflow:hidden}::ng-deep tn-tree-table .cell-header-filter .filter-box>span{align-items:center;background:#f5f6f8;border:1px solid #ced4da;color:#6c757d;cursor:pointer;display:inline-flex;flex-basis:32px;height:32px;justify-content:center;min-width:unset;outline:none}::ng-deep tn-tree-table .cell-header-filter .filter-box>span.action-clear{border-radius:0 3px 3px 0}::ng-deep tn-tree-table .cell-header-filter .filter-box>span.action-clear.dirty{color:#008eff}::ng-deep tn-tree-table .cell-header-filter .filter-box input{border:none;box-shadow:none!important;padding-left:5px;padding-right:5px}::ng-deep tn-tree-table .cell-header-filter .filter-box:not(.no-transition){transition:min-width .1s}::ng-deep tn-tree-table .cell-header-filter .filter-box.boolean-filter>div{flex:0 0 109px;width:109px}::ng-deep tn-tree-table .cell-header-filter .p-multiselect-label.p-placeholder{padding-left:.5rem;padding-right:.5rem}::ng-deep tn-tree-table .cell-header-filter.focus-within,::ng-deep tn-tree-table .cell-header-filter:focus-within{z-index:10!important}::ng-deep tn-tree-table .cell-header-filter.focus-within .filter-boolean-box .p-button,::ng-deep tn-tree-table .cell-header-filter:focus-within .filter-boolean-box .p-button{z-index:10}::ng-deep tn-tree-table .cell-header-filter.focus-within .filter-box>div,::ng-deep tn-tree-table .cell-header-filter:focus-within .filter-box>div{border-color:#2196f3;box-shadow:0 0 0 .2rem #a6d5fa;z-index:0}::ng-deep tn-tree-table .cell-header-filter.focus-within .short-filter-box,::ng-deep tn-tree-table .cell-header-filter:focus-within .short-filter-box{box-shadow:5px 0 15px 1px rgba(0,0,0,.27058823529411763);min-width:250px;position:absolute;top:calc(50% - 16px);z-index:2}::ng-deep tn-tree-table .cell-header-filter.focus-within .short-filter-box>div,::ng-deep tn-tree-table .cell-header-filter:focus-within .short-filter-box>div{border-color:#2196f3;box-shadow:0 0 0 .2rem #a6d5fa;flex:1;z-index:0}::ng-deep tn-tree-table .cell-header-filter.focus-within .short-filter-box>span.action-clear,::ng-deep tn-tree-table .cell-header-filter:focus-within .short-filter-box>span.action-clear{display:flex}::ng-deep tn-tree-table .cell-header-filter.focus-within .short-filter-box.boolean-filter,::ng-deep tn-tree-table .cell-header-filter:focus-within .short-filter-box.boolean-filter{min-width:140px}::ng-deep tn-tree-table .cell-header-filter.focus-within .short-filter-box.boolean-filter>div,::ng-deep tn-tree-table .cell-header-filter:focus-within .short-filter-box.boolean-filter>div{flex:0 0 109px;width:109px}::ng-deep tn-tree-table .cell-header-filter.focus-within:nth-last-child(2) .short-filter-box,::ng-deep tn-tree-table .cell-header-filter:focus-within:nth-last-child(2) .short-filter-box{left:50%;transform:translateX(-50%)}::ng-deep tn-tree-table .cell-header-filter:last-child .filter-box{right:3px}::ng-deep tn-tree-table .table-border-line{background-color:#eee;position:absolute;z-index:5}::ng-deep tn-tree-table .table-border-line.--left,::ng-deep tn-tree-table .table-border-line.--right{bottom:0;top:0;width:1px}::ng-deep tn-tree-table .table-border-line.--bottom,::ng-deep tn-tree-table .table-border-line.--top{height:1px;left:0;right:0}::ng-deep tn-tree-table .table-border-line.--left{left:0}::ng-deep tn-tree-table .table-border-line.--right{right:0}::ng-deep tn-tree-table .table-border-line.--top{top:0}::ng-deep tn-tree-table .table-border-line.--bottom{bottom:0}::ng-deep tn-tree-table .filter-boolean-box{text-align:center}::ng-deep tn-tree-table .filter-boolean-box .p-selectbutton{white-space:nowrap}::ng-deep tn-tree-table .custom-search-area crud-form{width:100%}::ng-deep tn-tree-table>p-contextmenu{display:none}"]
|
|
22976
23058
|
},] }
|
|
22977
23059
|
];
|
|
22978
23060
|
TreeTableComponent.ctorParameters = function () { return [
|
|
@@ -22984,6 +23066,7 @@
|
|
|
22984
23066
|
treeTable: [{ type: i0.ViewChild, args: ['treetable',] }],
|
|
22985
23067
|
scrollbar: [{ type: i0.ViewChild, args: ['scrollbar', { static: true },] }],
|
|
22986
23068
|
children: [{ type: i0.ContentChildren, args: [i0.TemplateRef,] }],
|
|
23069
|
+
searchCustom: [{ type: i0.ContentChild, args: ['searchCustom', { static: true },] }],
|
|
22987
23070
|
templates: [{ type: i0.Input }],
|
|
22988
23071
|
model: [{ type: i0.Input }],
|
|
22989
23072
|
setting: [{ type: i0.Input }],
|
|
@@ -23287,7 +23370,7 @@
|
|
|
23287
23370
|
if (!this.setting.hiddenSettingWorkflow) {
|
|
23288
23371
|
this.setting.baseService.useWorkflow = true;
|
|
23289
23372
|
}
|
|
23290
|
-
this.
|
|
23373
|
+
this._registerGlobalService(this.setting.baseService);
|
|
23291
23374
|
}
|
|
23292
23375
|
var moduleConfigService = this._injector.get(ModuleConfigService);
|
|
23293
23376
|
this.environment = moduleConfigService.getConfig().environment;
|
|
@@ -23338,7 +23421,7 @@
|
|
|
23338
23421
|
}
|
|
23339
23422
|
}
|
|
23340
23423
|
};
|
|
23341
|
-
ListBase.prototype.
|
|
23424
|
+
ListBase.prototype._registerGlobalService = function (service) {
|
|
23342
23425
|
var key = service.getKeyWorkflowSetting();
|
|
23343
23426
|
this._entityPermissionService.registerService(key, service);
|
|
23344
23427
|
this._workflowSettingService.registerService(key, service);
|
|
@@ -23377,6 +23460,7 @@
|
|
|
23377
23460
|
});
|
|
23378
23461
|
});
|
|
23379
23462
|
};
|
|
23463
|
+
// eslint-disable-next-line spaced-comment
|
|
23380
23464
|
//#region Get Data
|
|
23381
23465
|
ListBase.prototype.reload = function () {
|
|
23382
23466
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -23558,7 +23642,7 @@
|
|
|
23558
23642
|
};
|
|
23559
23643
|
ListBase.prototype.getDataCustom = function (gridInfo) {
|
|
23560
23644
|
};
|
|
23561
|
-
ListBase.prototype.
|
|
23645
|
+
ListBase.prototype._getDataSource = function (response) {
|
|
23562
23646
|
return __awaiter(this, void 0, void 0, function () {
|
|
23563
23647
|
return __generator(this, function (_a) {
|
|
23564
23648
|
return [2 /*return*/, []];
|
|
@@ -23578,7 +23662,7 @@
|
|
|
23578
23662
|
case 1:
|
|
23579
23663
|
_a.sent();
|
|
23580
23664
|
_a.label = 2;
|
|
23581
|
-
case 2: return [4 /*yield*/, this.
|
|
23665
|
+
case 2: return [4 /*yield*/, this._getDataSource(response)];
|
|
23582
23666
|
case 3:
|
|
23583
23667
|
dataSource = _a.sent();
|
|
23584
23668
|
return [4 /*yield*/, this.afterProcessDataInBase(dataSource)];
|
|
@@ -23803,7 +23887,9 @@
|
|
|
23803
23887
|
};
|
|
23804
23888
|
ListBase.prototype.afterGetRefDataDropdown = function (field) {
|
|
23805
23889
|
};
|
|
23890
|
+
// eslint-disable-next-line spaced-comment
|
|
23806
23891
|
//#endregion
|
|
23892
|
+
// eslint-disable-next-line spaced-comment
|
|
23807
23893
|
//#region Workflow
|
|
23808
23894
|
ListBase.prototype.checkHasWorkflow = function () {
|
|
23809
23895
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -23818,7 +23904,7 @@
|
|
|
23818
23904
|
])];
|
|
23819
23905
|
case 1:
|
|
23820
23906
|
dataWorkflowNew = (_a.sent()).data;
|
|
23821
|
-
this.
|
|
23907
|
+
this._registerGlobalService(this._congViecServiceInBase);
|
|
23822
23908
|
if (!dataWorkflowNew) return [3 /*break*/, 3];
|
|
23823
23909
|
return [4 /*yield*/, this.getWorkflowDetailByWorkflowSetting(dataWorkflowNew)];
|
|
23824
23910
|
case 2:
|
|
@@ -23986,7 +24072,9 @@
|
|
|
23986
24072
|
});
|
|
23987
24073
|
});
|
|
23988
24074
|
};
|
|
24075
|
+
// eslint-disable-next-line spaced-comment
|
|
23989
24076
|
//#endregion
|
|
24077
|
+
// eslint-disable-next-line spaced-comment
|
|
23990
24078
|
//#region crud
|
|
23991
24079
|
ListBase.prototype.loadItemFromQueryParam = function () {
|
|
23992
24080
|
var _this = this;
|
|
@@ -24343,7 +24431,7 @@
|
|
|
24343
24431
|
DataListBase.prototype.getPromiseGetData = function (gridInfo) {
|
|
24344
24432
|
return this.setting.baseService.getByGridRequest(gridInfo, this.plusUrl);
|
|
24345
24433
|
};
|
|
24346
|
-
DataListBase.prototype.
|
|
24434
|
+
DataListBase.prototype._getDataSource = function (response) {
|
|
24347
24435
|
return __awaiter(this, void 0, void 0, function () {
|
|
24348
24436
|
var dataSource, lstItemId, statusNotAllowEdits_1, userIdCurrent, fieldKey_1, callBackWhenNotHaveStatus, _baseService, dataTask_1, result;
|
|
24349
24437
|
var _this = this;
|
|
@@ -55082,6 +55170,7 @@
|
|
|
55082
55170
|
function TreeListBase(_injector) {
|
|
55083
55171
|
var _this = _super.call(this, _injector) || this;
|
|
55084
55172
|
_this.fieldParent = 'idParent';
|
|
55173
|
+
_this.valueParentRoot = null;
|
|
55085
55174
|
_this.levelOpen = 1;
|
|
55086
55175
|
return _this;
|
|
55087
55176
|
}
|
|
@@ -55095,20 +55184,20 @@
|
|
|
55095
55184
|
TreeListBase.prototype.getPromiseGetData = function (gridInfo) {
|
|
55096
55185
|
return this.setting.baseService.baseGetTreeData(gridInfo, this.plusUrl);
|
|
55097
55186
|
};
|
|
55098
|
-
TreeListBase.prototype.
|
|
55187
|
+
TreeListBase.prototype._getDataSource = function (response) {
|
|
55099
55188
|
return __awaiter(this, void 0, void 0, function () {
|
|
55100
55189
|
var dataSource;
|
|
55101
55190
|
return __generator(this, function (_a) {
|
|
55102
55191
|
dataSource = [];
|
|
55103
|
-
this.createTreeData(response.data, dataSource);
|
|
55192
|
+
this.createTreeData(response.data, dataSource, this.valueParentRoot);
|
|
55104
55193
|
return [2 /*return*/, dataSource];
|
|
55105
55194
|
});
|
|
55106
55195
|
});
|
|
55107
55196
|
};
|
|
55108
|
-
TreeListBase.prototype.createTreeData = function (dataSource, result,
|
|
55197
|
+
TreeListBase.prototype.createTreeData = function (dataSource, result, idParent, level, lstIdParent) {
|
|
55109
55198
|
var _this = this;
|
|
55110
|
-
if (level === void 0) { level = 1; }
|
|
55111
55199
|
if (idParent === void 0) { idParent = null; }
|
|
55200
|
+
if (level === void 0) { level = 1; }
|
|
55112
55201
|
if (lstIdParent === void 0) { lstIdParent = []; }
|
|
55113
55202
|
dataSource.forEach(function (item) {
|
|
55114
55203
|
if (item[_this.fieldParent] != idParent)
|
|
@@ -55124,7 +55213,7 @@
|
|
|
55124
55213
|
children: []
|
|
55125
55214
|
};
|
|
55126
55215
|
result.push(node);
|
|
55127
|
-
_this.createTreeData(dataSource, node.children, level + 1,
|
|
55216
|
+
_this.createTreeData(dataSource, node.children, node.data.id, level + 1, __spread(lstIdParent, [item.id]));
|
|
55128
55217
|
});
|
|
55129
55218
|
return result;
|
|
55130
55219
|
};
|