tnx-shared 5.1.283 → 5.1.286
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 +16 -23
- 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/i-list-component.d.ts +2 -0
- package/classes/base/i-list-component.d.ts.map +1 -1
- package/classes/base/list-base.d.ts +1 -0
- package/classes/base/list-base.d.ts.map +1 -1
- package/classes/form-schema.d.ts.map +1 -1
- package/components/crud/tree-table/tree-table.component.d.ts +3 -1
- package/components/crud/tree-table/tree-table.component.d.ts.map +1 -1
- package/esm2015/classes/base/i-list-component.js +1 -1
- package/esm2015/classes/base/list-base.js +9 -2
- package/esm2015/classes/form-schema.js +2 -2
- package/esm2015/components/crud/tree-table/tree-table.component.js +8 -3
- package/esm2015/services/permission.service.js +3 -1
- package/fesm2015/tnx-shared.js +17 -3
- package/fesm2015/tnx-shared.js.map +1 -1
- package/package.json +2 -2
- package/services/permission.service.d.ts.map +1 -1
- package/tnx-shared.metadata.json +1 -1
|
@@ -718,7 +718,7 @@
|
|
|
718
718
|
this.hiddenTrinhKy = true;
|
|
719
719
|
this.useBaseTrinhKy = true;
|
|
720
720
|
this.disableShare = false;
|
|
721
|
-
this.disableViewWorkflowAttach =
|
|
721
|
+
this.disableViewWorkflowAttach = false;
|
|
722
722
|
this.hiddenWorkflowCoreStatus = true;
|
|
723
723
|
this.requiredVanBanDiAfterTrinhKy = false;
|
|
724
724
|
this.showExportAll = false;
|
|
@@ -10419,26 +10419,7 @@
|
|
|
10419
10419
|
case 0: return [4 /*yield*/, this._userService.getCurrentUser()];
|
|
10420
10420
|
case 1:
|
|
10421
10421
|
user = (_e.sent());
|
|
10422
|
-
|
|
10423
|
-
resolve(true);
|
|
10424
|
-
return [2 /*return*/];
|
|
10425
|
-
}
|
|
10426
|
-
if (user && user.isadmin && user.isadmin.toLowerCase() == 'true' && !this.ignoreAdmin) {
|
|
10427
|
-
resolve(true);
|
|
10428
|
-
return [2 /*return*/];
|
|
10429
|
-
}
|
|
10430
|
-
this.getPermissions(service).then(function (permissions) {
|
|
10431
|
-
if (permissions && permissions.length) {
|
|
10432
|
-
var isAuthorized = permissions.includes(permission);
|
|
10433
|
-
resolve(isAuthorized);
|
|
10434
|
-
}
|
|
10435
|
-
else {
|
|
10436
|
-
console.log("L\u1ED7i kh\u00F4ng l\u1EA5y \u0111\u01B0\u1EE3c permission cho module: " + service);
|
|
10437
|
-
resolve(false);
|
|
10438
|
-
}
|
|
10439
|
-
}, function (error) {
|
|
10440
|
-
reject(false);
|
|
10441
|
-
});
|
|
10422
|
+
resolve(true);
|
|
10442
10423
|
return [2 /*return*/];
|
|
10443
10424
|
}
|
|
10444
10425
|
});
|
|
@@ -23094,6 +23075,10 @@
|
|
|
23094
23075
|
};
|
|
23095
23076
|
// eslint-disable-next-line spaced-comment
|
|
23096
23077
|
//#endregion
|
|
23078
|
+
TreeTableComponent.prototype.checkIsInsideDialog = function () {
|
|
23079
|
+
var $dialog = this.container.nativeElement.closest('.p-dialog');
|
|
23080
|
+
return !!$dialog;
|
|
23081
|
+
};
|
|
23097
23082
|
TreeTableComponent.prototype.getData = function () {
|
|
23098
23083
|
var infoGetData = this.getGridInfo();
|
|
23099
23084
|
this.onReload.emit(infoGetData);
|
|
@@ -23676,7 +23661,7 @@
|
|
|
23676
23661
|
TreeTableComponent.decorators = [
|
|
23677
23662
|
{ type: i0.Component, args: [{
|
|
23678
23663
|
selector: 'tn-tree-table',
|
|
23679
|
-
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=\"col.colHasToggleIcon\" [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>",
|
|
23664
|
+
template: "<div #container 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=\"col.colHasToggleIcon\" [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>",
|
|
23680
23665
|
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}"]
|
|
23681
23666
|
},] }
|
|
23682
23667
|
];
|
|
@@ -23687,6 +23672,7 @@
|
|
|
23687
23672
|
{ type: NotifierService }
|
|
23688
23673
|
]; };
|
|
23689
23674
|
TreeTableComponent.propDecorators = {
|
|
23675
|
+
container: [{ type: i0.ViewChild, args: ['container', { static: true },] }],
|
|
23690
23676
|
treeTable: [{ type: i0.ViewChild, args: ['treetable',] }],
|
|
23691
23677
|
scrollbar: [{ type: i0.ViewChild, args: ['scrollbar', { static: true },] }],
|
|
23692
23678
|
children: [{ type: i0.ContentChildren, args: [i0.TemplateRef,] }],
|
|
@@ -23973,6 +23959,13 @@
|
|
|
23973
23959
|
this.crudList = content;
|
|
23974
23960
|
if (!beforeValue) {
|
|
23975
23961
|
this.countReady++;
|
|
23962
|
+
if (!this.keyA) {
|
|
23963
|
+
this.keyA = this._commonService.guid();
|
|
23964
|
+
}
|
|
23965
|
+
console.log(this.keyA, this.crudList.container);
|
|
23966
|
+
if (!this.crudList.checkIsInsideDialog()) {
|
|
23967
|
+
this.loadItemFromQueryParam();
|
|
23968
|
+
}
|
|
23976
23969
|
if (this.countReady < 2) {
|
|
23977
23970
|
return;
|
|
23978
23971
|
}
|
|
@@ -24082,7 +24075,6 @@
|
|
|
24082
24075
|
this.model.baseReady = true;
|
|
24083
24076
|
this._triggerProcessData();
|
|
24084
24077
|
}
|
|
24085
|
-
this.loadItemFromQueryParam();
|
|
24086
24078
|
return [2 /*return*/];
|
|
24087
24079
|
}
|
|
24088
24080
|
});
|
|
@@ -24720,6 +24712,7 @@
|
|
|
24720
24712
|
pid = this._activatedRoute.snapshot.queryParams.pid;
|
|
24721
24713
|
}
|
|
24722
24714
|
if (pid) {
|
|
24715
|
+
console.log(this.keyA, this.constructor.name);
|
|
24723
24716
|
this.loadDetailPid(pid);
|
|
24724
24717
|
}
|
|
24725
24718
|
else if (idInQueryString) {
|