tnx-shared 5.1.184 → 5.1.185

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.
Files changed (32) hide show
  1. package/bundles/tnx-shared.umd.js +1258 -1185
  2. package/bundles/tnx-shared.umd.js.map +1 -1
  3. package/bundles/tnx-shared.umd.min.js +1 -1
  4. package/bundles/tnx-shared.umd.min.js.map +1 -1
  5. package/classes/base/data-list-base.d.ts.map +1 -1
  6. package/classes/public-function.d.ts +7 -1
  7. package/classes/public-function.d.ts.map +1 -1
  8. package/components/crud/crud-form/crud-form.component.d.ts +2 -2
  9. package/components/tn-app-notification/tn-app-notification.component.d.ts +2 -2
  10. package/components/tn-app-notification/tn-app-notification.component.d.ts.map +1 -1
  11. package/congviec/dm-loai-congviec/dm-loai-congviec.component.d.ts +2 -0
  12. package/congviec/dm-loai-congviec/dm-loai-congviec.component.d.ts.map +1 -1
  13. package/esm2015/classes/base/data-list-base.js +4 -1
  14. package/esm2015/classes/public-function.js +7 -1
  15. package/esm2015/components/chat/chat-box/chat-box.component.js +1 -1
  16. package/esm2015/components/chat/chat-send-message-box/chat-send-message-box.component.js +1 -1
  17. package/esm2015/components/tn-app-notification/tn-app-notification.component.js +38 -34
  18. package/esm2015/congviec/dm-loai-congviec/dm-loai-congviec.component.js +8 -3
  19. package/esm2015/intercepters/anonymous-token.interceptor.js +43 -0
  20. package/esm2015/tnx-shared.js +2 -1
  21. package/esm2015/tnx-shared.module.js +32 -32
  22. package/fesm2015/tnx-shared.js +802 -749
  23. package/fesm2015/tnx-shared.js.map +1 -1
  24. package/intercepters/anonymous-token.interceptor.d.ts +13 -0
  25. package/intercepters/anonymous-token.interceptor.d.ts.map +1 -0
  26. package/intercepters/anonymous-token.interceptor.ngfactory.d.ts.map +1 -0
  27. package/package.json +2 -2
  28. package/tnx-shared.d.ts +1 -0
  29. package/tnx-shared.d.ts.map +1 -1
  30. package/tnx-shared.metadata.json +1 -1
  31. package/tnx-shared.module.d.ts +5 -5
  32. package/tnx-shared.module.d.ts.map +1 -1
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@angular/forms'), require('@ngx-translate/core'), require('angular-split'), require('ng2-currency-mask'), require('ngx-device-detector'), require('ngx-extended-pdf-viewer'), require('ngx-img-fallback'), require('ngx-mask'), require('ngx-perfect-scrollbar'), require('tn-custom-primeng/autocomplete'), require('tn-custom-primeng/blockui'), require('tn-custom-primeng/breadcrumb'), require('tn-custom-primeng/button'), require('tn-custom-primeng/calendar'), require('tn-custom-primeng/card'), require('tn-custom-primeng/chart'), require('tn-custom-primeng/checkbox'), require('tn-custom-primeng/chips'), require('tn-custom-primeng/colorpicker'), require('tn-custom-primeng/confirmdialog'), require('tn-custom-primeng/contextmenu'), require('tn-custom-primeng/dataview'), require('tn-custom-primeng/dialog'), require('tn-custom-primeng/dropdown'), require('tn-custom-primeng/fieldset'), require('tn-custom-primeng/fileupload'), require('tn-custom-primeng/focustrap'), require('tn-custom-primeng/inputmask'), require('tn-custom-primeng/inputswitch'), require('tn-custom-primeng/inputtext'), require('tn-custom-primeng/inputtextarea'), require('tn-custom-primeng/menu'), require('tn-custom-primeng/menubar'), require('tn-custom-primeng/multiselect'), require('tn-custom-primeng/overlaypanel'), require('tn-custom-primeng/paginator'), require('tn-custom-primeng/panel'), require('tn-custom-primeng/progressspinner'), require('tn-custom-primeng/radiobutton'), require('tn-custom-primeng/scrollpanel'), require('tn-custom-primeng/selectbutton'), require('tn-custom-primeng/sidebar'), require('tn-custom-primeng/slider'), require('tn-custom-primeng/spinner'), require('tn-custom-primeng/splitbutton'), require('tn-custom-primeng/steps'), require('tn-custom-primeng/table'), require('tn-custom-primeng/tabview'), require('tn-custom-primeng/toast'), require('tn-custom-primeng/tooltip'), require('tn-custom-primeng/tree'), require('tn-custom-primeng/treetable'), require('tn-custom-primeng/tristatecheckbox'), require('@angular/router'), require('rxjs'), require('rxjs/operators'), require('uuid'), require('fast-safe-stringify'), require('moment'), require('underscore'), require('angular-oauth2-oidc'), require('tn-custom-primeng/api'), require('@angular/common/http'), require('@aspnet/signalr'), require('file-saver'), require('print-js'), require('jwt-decode'), require('@angular/platform-browser'), require('jquery'), require('nanoid'), require('@angular/animations'), require('hammerjs'), require('ng2-signalr'), require('tn-custom-primeng/dom'), require('qrcode'), require('jsplumb'), require('rtf.js'), require('tn-custom-primeng/accordion'), require('@angular/common/locales/vi'), require('@angular/platform-browser/animations')) :
3
- typeof define === 'function' && define.amd ? define('tnx-shared', ['exports', '@angular/common', '@angular/core', '@angular/forms', '@ngx-translate/core', 'angular-split', 'ng2-currency-mask', 'ngx-device-detector', 'ngx-extended-pdf-viewer', 'ngx-img-fallback', 'ngx-mask', 'ngx-perfect-scrollbar', 'tn-custom-primeng/autocomplete', 'tn-custom-primeng/blockui', 'tn-custom-primeng/breadcrumb', 'tn-custom-primeng/button', 'tn-custom-primeng/calendar', 'tn-custom-primeng/card', 'tn-custom-primeng/chart', 'tn-custom-primeng/checkbox', 'tn-custom-primeng/chips', 'tn-custom-primeng/colorpicker', 'tn-custom-primeng/confirmdialog', 'tn-custom-primeng/contextmenu', 'tn-custom-primeng/dataview', 'tn-custom-primeng/dialog', 'tn-custom-primeng/dropdown', 'tn-custom-primeng/fieldset', 'tn-custom-primeng/fileupload', 'tn-custom-primeng/focustrap', 'tn-custom-primeng/inputmask', 'tn-custom-primeng/inputswitch', 'tn-custom-primeng/inputtext', 'tn-custom-primeng/inputtextarea', 'tn-custom-primeng/menu', 'tn-custom-primeng/menubar', 'tn-custom-primeng/multiselect', 'tn-custom-primeng/overlaypanel', 'tn-custom-primeng/paginator', 'tn-custom-primeng/panel', 'tn-custom-primeng/progressspinner', 'tn-custom-primeng/radiobutton', 'tn-custom-primeng/scrollpanel', 'tn-custom-primeng/selectbutton', 'tn-custom-primeng/sidebar', 'tn-custom-primeng/slider', 'tn-custom-primeng/spinner', 'tn-custom-primeng/splitbutton', 'tn-custom-primeng/steps', 'tn-custom-primeng/table', 'tn-custom-primeng/tabview', 'tn-custom-primeng/toast', 'tn-custom-primeng/tooltip', 'tn-custom-primeng/tree', 'tn-custom-primeng/treetable', 'tn-custom-primeng/tristatecheckbox', '@angular/router', 'rxjs', 'rxjs/operators', 'uuid', 'fast-safe-stringify', 'moment', 'underscore', 'angular-oauth2-oidc', 'tn-custom-primeng/api', '@angular/common/http', '@aspnet/signalr', 'file-saver', 'print-js', 'jwt-decode', '@angular/platform-browser', 'jquery', 'nanoid', '@angular/animations', 'hammerjs', 'ng2-signalr', 'tn-custom-primeng/dom', 'qrcode', 'jsplumb', 'rtf.js', 'tn-custom-primeng/accordion', '@angular/common/locales/vi', '@angular/platform-browser/animations'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global['tnx-shared'] = {}, global.ng.common, global.ng.core, global.ng.forms, global.i2, global.angularSplit, global.ng2CurrencyMask, global.ngxDeviceDetector, global.ngxExtendedPdfViewer, global.ngxImgFallback, global.ngxMask, global.ngxPerfectScrollbar, global.autocomplete, global.blockui, global.breadcrumb, global.button, global.calendar, global.card, global.chart, global.checkbox, global.chips, global.colorpicker, global.confirmdialog, global.contextmenu, global.dataview, global.dialog, global.dropdown, global.fieldset, global.fileupload, global.focustrap, global.inputmask, global.inputswitch, global.inputtext, global.inputtextarea, global.menu, global.menubar, global.multiselect, global.overlaypanel, global.paginator, global.panel, global.progressspinner, global.radiobutton, global.scrollpanel, global.selectbutton, global.sidebar, global.slider, global.spinner, global.splitbutton, global.steps, global.table, global.tabview, global.toast, global.tooltip, global.tree, global.treetable, global.tristatecheckbox, global.ng.router, global.rxjs, global.rxjs.operators, global.uuid, global.stringify, global.moment_, global._, global.i4, global.i1, global.ng.common.http, global.signalR, global.FileSaver, global.printJS_, global.JWT_, global.ng.platformBrowser, global.jQuery_, global.nanoid_, global.ng.animations, global.Hammer, global.ng2Signalr, global.dom, global.QRCode, global.jsplumb, global.rtf_js, global.accordion, global.ng.common.locales.vi, global.ng.platformBrowser.animations));
5
- }(this, (function (exports, i2$1, i0, forms, i2, angularSplit, ng2CurrencyMask, ngxDeviceDetector, ngxExtendedPdfViewer, ngxImgFallback, ngxMask, ngxPerfectScrollbar, autocomplete, blockui, breadcrumb, button, calendar, card, chart, checkbox, chips, colorpicker, confirmdialog, contextmenu, dataview, dialog, dropdown, fieldset, fileupload, focustrap, inputmask, inputswitch, inputtext, inputtextarea, menu, menubar, multiselect, overlaypanel, paginator, panel, progressspinner, radiobutton, scrollpanel, selectbutton, sidebar, slider, spinner, splitbutton, steps, table, tabview, toast, tooltip, tree, treetable, tristatecheckbox, i3, rxjs, operators, uuid, stringify, moment_, _, i4, i1, i1$1, signalR, FileSaver, printJS_, JWT_, platformBrowser, jQuery_, nanoid_, animations, Hammer, ng2Signalr, dom, QRCode, jsplumb, rtf_js, accordion, localeVi, animations$1) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@angular/forms'), require('@ngx-translate/core'), require('angular-split'), require('ng2-currency-mask'), require('ngx-device-detector'), require('ngx-extended-pdf-viewer'), require('ngx-img-fallback'), require('ngx-mask'), require('ngx-perfect-scrollbar'), require('tn-custom-primeng/accordion'), require('tn-custom-primeng/autocomplete'), require('tn-custom-primeng/blockui'), require('tn-custom-primeng/breadcrumb'), require('tn-custom-primeng/button'), require('tn-custom-primeng/calendar'), require('tn-custom-primeng/card'), require('tn-custom-primeng/chart'), require('tn-custom-primeng/checkbox'), require('tn-custom-primeng/chips'), require('tn-custom-primeng/colorpicker'), require('tn-custom-primeng/confirmdialog'), require('tn-custom-primeng/contextmenu'), require('tn-custom-primeng/dataview'), require('tn-custom-primeng/dialog'), require('tn-custom-primeng/dropdown'), require('tn-custom-primeng/fieldset'), require('tn-custom-primeng/fileupload'), require('tn-custom-primeng/focustrap'), require('tn-custom-primeng/inputmask'), require('tn-custom-primeng/inputswitch'), require('tn-custom-primeng/inputtext'), require('tn-custom-primeng/inputtextarea'), require('tn-custom-primeng/menu'), require('tn-custom-primeng/menubar'), require('tn-custom-primeng/multiselect'), require('tn-custom-primeng/overlaypanel'), require('tn-custom-primeng/paginator'), require('tn-custom-primeng/panel'), require('tn-custom-primeng/progressspinner'), require('tn-custom-primeng/radiobutton'), require('tn-custom-primeng/scrollpanel'), require('tn-custom-primeng/selectbutton'), require('tn-custom-primeng/sidebar'), require('tn-custom-primeng/slider'), require('tn-custom-primeng/spinner'), require('tn-custom-primeng/splitbutton'), require('tn-custom-primeng/steps'), require('tn-custom-primeng/table'), require('tn-custom-primeng/tabview'), require('tn-custom-primeng/toast'), require('tn-custom-primeng/tooltip'), require('tn-custom-primeng/tree'), require('tn-custom-primeng/treetable'), require('tn-custom-primeng/tristatecheckbox'), require('@angular/router'), require('rxjs'), require('rxjs/operators'), require('uuid'), require('fast-safe-stringify'), require('moment'), require('underscore'), require('angular-oauth2-oidc'), require('tn-custom-primeng/api'), require('@angular/common/http'), require('@aspnet/signalr'), require('file-saver'), require('print-js'), require('jwt-decode'), require('@angular/platform-browser'), require('jquery'), require('nanoid'), require('@angular/animations'), require('hammerjs'), require('ng2-signalr'), require('tn-custom-primeng/dom'), require('qrcode'), require('jsplumb'), require('rtf.js'), require('@angular/common/locales/vi'), require('@angular/platform-browser/animations')) :
3
+ typeof define === 'function' && define.amd ? define('tnx-shared', ['exports', '@angular/common', '@angular/core', '@angular/forms', '@ngx-translate/core', 'angular-split', 'ng2-currency-mask', 'ngx-device-detector', 'ngx-extended-pdf-viewer', 'ngx-img-fallback', 'ngx-mask', 'ngx-perfect-scrollbar', 'tn-custom-primeng/accordion', 'tn-custom-primeng/autocomplete', 'tn-custom-primeng/blockui', 'tn-custom-primeng/breadcrumb', 'tn-custom-primeng/button', 'tn-custom-primeng/calendar', 'tn-custom-primeng/card', 'tn-custom-primeng/chart', 'tn-custom-primeng/checkbox', 'tn-custom-primeng/chips', 'tn-custom-primeng/colorpicker', 'tn-custom-primeng/confirmdialog', 'tn-custom-primeng/contextmenu', 'tn-custom-primeng/dataview', 'tn-custom-primeng/dialog', 'tn-custom-primeng/dropdown', 'tn-custom-primeng/fieldset', 'tn-custom-primeng/fileupload', 'tn-custom-primeng/focustrap', 'tn-custom-primeng/inputmask', 'tn-custom-primeng/inputswitch', 'tn-custom-primeng/inputtext', 'tn-custom-primeng/inputtextarea', 'tn-custom-primeng/menu', 'tn-custom-primeng/menubar', 'tn-custom-primeng/multiselect', 'tn-custom-primeng/overlaypanel', 'tn-custom-primeng/paginator', 'tn-custom-primeng/panel', 'tn-custom-primeng/progressspinner', 'tn-custom-primeng/radiobutton', 'tn-custom-primeng/scrollpanel', 'tn-custom-primeng/selectbutton', 'tn-custom-primeng/sidebar', 'tn-custom-primeng/slider', 'tn-custom-primeng/spinner', 'tn-custom-primeng/splitbutton', 'tn-custom-primeng/steps', 'tn-custom-primeng/table', 'tn-custom-primeng/tabview', 'tn-custom-primeng/toast', 'tn-custom-primeng/tooltip', 'tn-custom-primeng/tree', 'tn-custom-primeng/treetable', 'tn-custom-primeng/tristatecheckbox', '@angular/router', 'rxjs', 'rxjs/operators', 'uuid', 'fast-safe-stringify', 'moment', 'underscore', 'angular-oauth2-oidc', 'tn-custom-primeng/api', '@angular/common/http', '@aspnet/signalr', 'file-saver', 'print-js', 'jwt-decode', '@angular/platform-browser', 'jquery', 'nanoid', '@angular/animations', 'hammerjs', 'ng2-signalr', 'tn-custom-primeng/dom', 'qrcode', 'jsplumb', 'rtf.js', '@angular/common/locales/vi', '@angular/platform-browser/animations'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global['tnx-shared'] = {}, global.ng.common, global.ng.core, global.ng.forms, global.i2, global.angularSplit, global.ng2CurrencyMask, global.ngxDeviceDetector, global.ngxExtendedPdfViewer, global.ngxImgFallback, global.ngxMask, global.ngxPerfectScrollbar, global.accordion, global.autocomplete, global.blockui, global.breadcrumb, global.button, global.calendar, global.card, global.chart, global.checkbox, global.chips, global.colorpicker, global.confirmdialog, global.contextmenu, global.dataview, global.dialog, global.dropdown, global.fieldset, global.fileupload, global.focustrap, global.inputmask, global.inputswitch, global.inputtext, global.inputtextarea, global.menu, global.menubar, global.multiselect, global.overlaypanel, global.paginator, global.panel, global.progressspinner, global.radiobutton, global.scrollpanel, global.selectbutton, global.sidebar, global.slider, global.spinner, global.splitbutton, global.steps, global.table, global.tabview, global.toast, global.tooltip, global.tree, global.treetable, global.tristatecheckbox, global.ng.router, global.rxjs, global.rxjs.operators, global.uuid, global.stringify, global.moment_, global._, global.i4, global.i1, global.ng.common.http, global.signalR, global.FileSaver, global.printJS_, global.JWT_, global.ng.platformBrowser, global.jQuery_, global.nanoid_, global.ng.animations, global.Hammer, global.ng2Signalr, global.dom, global.QRCode, global.jsplumb, global.rtf_js, global.ng.common.locales.vi, global.ng.platformBrowser.animations));
5
+ }(this, (function (exports, i2$1, i0, forms, i2, angularSplit, ng2CurrencyMask, ngxDeviceDetector, ngxExtendedPdfViewer, ngxImgFallback, ngxMask, ngxPerfectScrollbar, accordion, autocomplete, blockui, breadcrumb, button, calendar, card, chart, checkbox, chips, colorpicker, confirmdialog, contextmenu, dataview, dialog, dropdown, fieldset, fileupload, focustrap, inputmask, inputswitch, inputtext, inputtextarea, menu, menubar, multiselect, overlaypanel, paginator, panel, progressspinner, radiobutton, scrollpanel, selectbutton, sidebar, slider, spinner, splitbutton, steps, table, tabview, toast, tooltip, tree, treetable, tristatecheckbox, i3, rxjs, operators, uuid, stringify, moment_, _, i4, i1, i1$1, signalR, FileSaver, printJS_, JWT_, platformBrowser, jQuery_, nanoid_, animations, Hammer, ng2Signalr, dom, QRCode, jsplumb, rtf_js, localeVi, animations$1) { 'use strict';
6
6
 
7
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
8
 
@@ -22426,6 +22426,9 @@
22426
22426
  configurable: true
22427
22427
  });
22428
22428
  DataListBase.prototype.ngOnInit = function () {
22429
+ // if (window) {
22430
+ // window['_clbc'] = this;
22431
+ // }
22429
22432
  this.model.baseReady = false;
22430
22433
  if (this.setting.cols) {
22431
22434
  this.setting.cols = this.setting.cols.filter(function (q) { return !q.removeOnInit; });
@@ -26944,7 +26947,7 @@
26944
26947
  selector: 'chat-box',
26945
26948
  template: "<div class=\"dashboard\">\r\n <div class=\"chat\">\r\n <div class=\"group-info\">\r\n <a href=\"javascript:\">C\u00F3 {{peopleAll.length}} ng\u01B0\u1EDDi trong nh\u00F3m n\u00E0y</a>\r\n <div class=\"circleButton\" pTooltip=\"Xem to\u00E0n b\u1ED9 \u0111\u00EDnh k\u00E8m\" tooltipPosition=\"top\">\r\n <a href=\"javascript:\"><i class=\"far fa-images\"></i></a>\r\n </div>\r\n <div (click)=\"addPeople()\" class=\"circleButton\" pTooltip=\"Th\u00EAm m\u1EDBi ng\u01B0\u1EDDi v\u00E0o nh\u00F3m\" tooltipPosition=\"top\"\r\n disabled=\"true\">\r\n <a href=\"javascript:\"><i class=\"fas fa-user-plus\"></i></a>\r\n </div>\r\n </div>\r\n <ul #scrollMe [ngClass]=\"{'hasPin': model.pinnedMessage != null}\">\r\n <li *ngIf=\"model.pinnedMessage\" class=\"clearfix pin\" [ngClass]=\"{'message-from': true}\">\r\n <ng-container\r\n *ngTemplateOutlet=\"messageItem; context: { i : -1, item: model.pinnedMessage, isPinnedMessage: true}\">\r\n </ng-container>\r\n </li>\r\n <li *ngFor=\"let item of model.dataSource; let i = index; trackBy: trackByFunc\" class=\"clearfix\"\r\n [ngClass]=\"{ 'message-own': item.type == 'own'}\">\r\n <ng-container *ngTemplateOutlet=\"messageItem; context: { i : i, item: item}\">\r\n </ng-container>\r\n </li>\r\n </ul>\r\n <!-- <chat-send-message-box *ngIf=\"showSendMessageBox\"></chat-send-message-box>-->\r\n <div [ngClass]=\"{'visible2': model.scrolling, 'hidden2': !model.scrolling}\" class=\"scroll-to-bottom\">\r\n <span *ngIf=\"model.newMessageNotUpdatedCount > 0\" (click)=\"scrollToBottom(350, true, null)\">\r\n {{model.newMessageNotUpdatedCount <= 5 ? model.newMessageNotUpdatedCount : '5+' }} </span>\r\n <span (click)=\"scrollToBottom(350, true, null)\" *ngIf=\"model.newMessageNotUpdatedCount == 0\">\r\n <i class=\"fas fa-chevron-down\"></i>\r\n </span>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<file-viewer *ngIf=\"fileViewerModel.showEditForm\" [parentContext]=\"context\" [parentModel]=\"model\"\r\n [model]=\"fileViewerModel\">\r\n</file-viewer>\r\n\r\n<ng-template #messageItem let-i=\"i\" let-isPinnedMessage=\"isPinnedMessage\" let-item=\"item\">\r\n <img *ngIf=\"item.isFirstMessageFlow && item.type != 'own' && !isPinnedMessage && item.avatar != null\" alt=\"\"\r\n class=\"chat-avatar\" src=\"{{getCurrentUserAvatar(item.avatar)}}\">\r\n <p *ngIf=\"(item.isFirstMessageFlow && item.type != 'own') && !isPinnedMessage\" class=\"message-created-by\">\r\n {{item.fullName}}\r\n </p>\r\n <span *ngIf=\"!hasAttachment(item)\">\r\n <!-- [class]=\"addClassToMessage(item, isPinnedMessage)\">-->\r\n <p *ngIf=\"!hasAttachment(item)\" class=\"message-content\">\r\n <i (click)=\"pinMessage(item)\" class=\"fas fa-thumbtack\" style=\"right: 0;\"></i>\r\n <i (click)=\"quickNote(item)\" class=\"fas fa-sticky-note\"></i>\r\n {{item.content}}\r\n </p>\r\n <p *ngIf=\"!isPinnedMessage && (item.isLastMessageFlow || !inTheSameTime(i, item, model.dataSource))\"\r\n class=\"message-created\" pTooltip=\"{{item.created | date:'dd/MM/yyyy HH:mm'}}\"\r\n tooltipPosition=\"{{item.type != 'own'?'right':'left'}}\">\r\n {{_crudService.renderDateTime(item.created)}}\r\n </p>\r\n <p *ngIf=\"isPinnedMessage\" class=\"message-created\">\r\n {{item.createdBy}} \u0111\u00E3 g\u1EEDi l\u00FAc {{item.created | date:'dd/MM/yyyy HH:mm'}}\r\n </p>\r\n </span>\r\n <ng-container *ngIf=\"hasAttachment(item)\">\r\n <ng-container *ngFor=\"let attachmentItem of item.attachments;let index=index\">\r\n <div class=\"file\"\r\n [ngClass]=\"{'first':item.isFirstMessageFlow && index == 0, 'middle':index > 0 || !item.isFirstMessageFlow, 'image' : attachmentItem.type == 'image'}\"\r\n [ngStyle]=\"{'width': model.img[i + 'width' + index]}\">\r\n <p class=\"attachment\">\r\n <span (mouseup)=\"onMouseUp($event)\" class=\"attachment-item\">\r\n <a *ngIf=\"attachmentItem.type != 'image'\" (click)=\"viewOrDownloadFile($event, attachmentItem)\">\r\n <i class=\"fas fa-paperclip\"></i>{{attachmentItem.fileName}}\r\n </a>\r\n <a *ngIf=\"attachmentItem.type == 'image'\" #aElement\r\n [ngClass]=\"{'hidden': !model.img[i + '' + index], 'visible':model.img[i + '' + index]}\"\r\n (click)=\"viewOrDownloadFile($event, attachmentItem)\">\r\n <img class=\"message-img\" (load)=\"loadImg($event, i, index)\"\r\n [src]=\"attachmentItem.url | secure | async\" />\r\n </a>\r\n </span>\r\n </p>\r\n <div style=\"clear: both\"></div>\r\n <p class=\"message-created\" pTooltip=\"{{item.created | date:'dd/MM/yyyy HH:mm'}}\"\r\n tooltipPosition=\"{{item.type != 'own'?'right':'left'}}\">\r\n {{_crudService.renderDateTime(item.created)}}\r\n </p>\r\n </div>\r\n <div style=\"clear: both\"></div>\r\n </ng-container>\r\n </ng-container>\r\n <after-view-checked *ngIf=\"model.dataSource.length == i + 1\" (loading)=\"scrollToBottom(0, false, item.sent)\">\r\n </after-view-checked>\r\n</ng-template>\r\n\r\n<!--<tn-dialog *ngIf=\"userPickerForm.show\" #dialog [styleClass]=\"'tn-form-dialog'\"-->\r\n<!-- [header]=\"'Th\u00EAm m\u1EDBi ng\u01B0\u1EDDi d\u00F9ng' | translate\" [popupSize]=\"userPickerForm.popupSize\"-->\r\n<!-- (onCancel)=\"userPickerForm.show = false\"-->\r\n<!-- (onHide)=\"userPickerForm.show = false\">-->\r\n<!-- &lt;!&ndash; <congviec-form #formBase [parentModel]=\"model\" [parentContext]=\"context\" [model]=\"formModel\"&ndash;&gt;-->\r\n<!-- &lt;!&ndash; (onSaved)=\"showDetailForm = false;crudList.reload()\" (onCancel)=\"_handleCancel($event)\"&ndash;&gt;-->\r\n<!-- &lt;!&ndash; (onAfterSaved)=\"onAfterSaved($event)\"></congviec-form>&ndash;&gt;-->\r\n<!-- <user-picker-box #formBase [control]=\"userPickerControl\"-->\r\n<!-- [(ngModel)]=\"this.peopleAll\" [multiple]=\"userPickerControl.multiple\">-->\r\n<!-- </user-picker-box>-->\r\n<!--</tn-dialog>-->\r\n\r\n\r\n<!--<tn-dialog *ngIf=\"userPickerForm.show\" #dialog [styleClass]=\"'tn-form-dialog'\"-->\r\n<!-- [header]=\"'Th\u00EAm m\u1EDBi ng\u01B0\u1EDDi d\u00F9ng' | translate\" [popupSize]=\"userPickerForm.popupSize\" (onHide)=\"userPickerForm.show == false\">-->\r\n<!-- &lt;!&ndash; <congviec-form #formBase [parentModel]=\"model\" [parentContext]=\"context\" [model]=\"formModel\"&ndash;&gt;-->\r\n<!-- &lt;!&ndash; (onSaved)=\"showDetailForm = false;crudList.reload()\" (onCancel)=\"_handleCancel($event)\"&ndash;&gt;-->\r\n<!-- &lt;!&ndash; (onAfterSaved)=\"onAfterSaved($event)\"></congviec-form>&ndash;&gt;-->\r\n\r\n<!-- &lt;!&ndash;<quick-add-form *ngIf=\"model.editFormModel.showQuickNoteForm\" [parentContext]=\"context\"&ndash;&gt;-->\r\n<!-- &lt;!&ndash; [parentModel]=\"context.data.noteDataModel\"></quick-add-form>&ndash;&gt;-->\r\n<!--</tn-dialog>-->",
26946
26949
  providers: [ComponentContextService, CheckControlVisibleService],
26947
- styles: [".paging-advance{list-style:none;margin:3px 0;padding-left:0}.paging-advance li{line-height:30;padding-left:15px;width:150px}.paging-advance li.disabled{color:#bdbdbd;outline:none}.paging-advance li.disabled:hover{background:none;cursor:default}.paging-advance li:hover{background:red;cursor:pointer}.paging-advance-overlay .ui-overlaypanel-content{padding:0}.paging-advance-overlay.ui-overlaypanel-shifted:before{left:1.25em;margin-left:-10;right:auto}.paging-advance-overlay.ui-overlaypanel-shifted:after{left:1.25em;margin-left:-8px;right:auto}.chat-avatar{border:2px solid #eee;height:36px}", "@charset \"UTF-8\";@import url(C:\\Users\\Admin\\Desktop\\TN_TriNam\\5.1\\shared\\AppSharedV5\\node_modules\\@angular\\material\\prebuilt-themes\\indigo-pink.css);@import url(C:\\Users\\Admin\\Desktop\\TN_TriNam\\5.1\\shared\\AppSharedV5\\node_modules\\jsoneditor\\dist\\jsoneditor.min.css);.flex{display:flex}.flex .fit{flex:1 1}.flex.flex-column{flex-direction:column}.flex.flex-wrap{flex-wrap:wrap}.flex.center-v{align-items:center}.flex.center-all,.flex.center-h{justify-content:center}.flex.center-all{align-items:center}.validate-item{color:#e00000;display:inline-block;font-size:.9em;white-space:nowrap}.tn-scroll-bar.bgWhite>div,.validate-item{background-color:#fff}.label-primary{background-color:#1ab394;padding:2px}.label-danger,.label-primary{border-radius:.25em;color:#fff;display:inline-block;font-size:12px;margin-left:3px;margin-right:3px;min-width:60px}.label-danger{background-color:#ed5565;padding:2px 5px}.label-warning{background-color:#b8860b}.label-secondary,.label-warning{border-radius:.25em;color:#fff;display:inline-block;font-size:12px;margin-left:3px;margin-right:3px;min-width:60px;padding:2px}.label-secondary{background-color:#a9a9a9}.label-done{background-color:#3b1ef7;border-radius:.25em;color:#fff;display:inline-block;font-size:12px;margin-left:3px;margin-right:3px;min-width:60px;padding:2px}.text-navy{color:#1ab394!important}.text-danger{color:red!important}.fa-user-edit{font-size:14px}.flexcolumn{border:1px solid #eee;border-radius:5px;min-height:80px;overflow-x:hidden;overflow-y:hidden}.flexcolumn,.has2ScrollZone2 .flexcolumn{max-height:calc(100vh - 180px)}.headerNoBorder>th{border:none!important;border-bottom:1px solid #eee!important}.cellNoBorder table tr td{border:0!important}.layout-wrapper .layout-main{overflow:hidden;padding:60px 0 0}div.circleButton{border-radius:50%;display:inline-block;height:32px;line-height:32px;margin-bottom:4px;margin-top:4px;overflow:hidden;position:relative;text-align:center;transform:perspective(1px);width:32px}div.circleButton>a{line-height:32px;padding:0!important}div.circleButton>a>i{width:24px!important}div.circleButton:before{background:#e6e6e6;border-radius:50%;bottom:0;content:\"\";left:0;position:absolute;right:0;top:0;transform:scale(0);transition:all .3s cubic-bezier(.4,.34,.01,.97);z-index:-1}div.circleButton:hover:before{transform:scale(1)}.message-notice{background:#e0e0e0;text-align:center}.message-created-by{color:#888;font-size:.82em;font-weight:400;margin-bottom:3px;margin-left:45px;margin-top:5px}.message-created{color:#495057;display:inline-block;font-size:.82em;margin-bottom:0;margin-top:0}.message-own .message-created{padding-left:10px;padding-right:6px}.message-from .message-created{padding-left:6px;padding-right:10px}.message-content{color:#000;line-height:20px;margin-bottom:6px;margin-top:3px;position:relative}.message-content i{display:none}.message-content:hover i{display:block}.message-content:hover{padding-right:20px!important}.chat-box-content{max-height:500px}.attachment-list .attachment-item{-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;background:#f1f1f1;border:1px solid #ccc;border-radius:8px;box-shadow:1px 2px 3px rgba(0,0,0,.06);float:left;height:84px;margin:8px;overflow:hidden;position:relative;text-align:center;user-select:none;width:84px}.attachment-list .attachment-item img{height:100%;width:100%}.attachment-list .attachment-item span{left:0;padding:5px;position:absolute;top:25px;width:100%;word-break:break-all}.clearfix{clear:both}.dashboard .chat ul li img.message-img{float:none;height:120px;margin-left:0;width:auto}.message-attachment{cursor:pointer;font-size:1.5em;margin:0 5px 0 0;position:relative}.hidden{display:none}.message-input{width:100%}.message-input label{font-size:1.2rem}.remove-file-attachment{background:#495057;border-radius:50%;color:#fff;cursor:pointer;font-size:20px;position:absolute;right:5px;top:5px}.attachment-list{background:#fff;bottom:51px;box-shadow:0 -2px 3px -3px rgba(0,0,0,.21176470588235294);display:none;height:100px;left:-15px;position:absolute;width:calc(100% + 30px)}.attachment-list.attached-file{display:block}.dashboard{margin-bottom:-15px;margin-top:-5px}.dashboard .timeline>.ui-g .ui-g-9 .event-text{color:#555;white-space:nowrap}.dashboard .timeline>.ui-g .ui-g-9 .event-text.event-text2{line-height:18px;padding-left:30px;text-align:justify;white-space:pre-wrap}.dashboard .timeline>.ui-g .ui-g-9 .event-text.event-text2 i{left:20px;margin-top:3px;position:absolute}.new-message{align-items:center;justify-content:center}.dashboard .chat .new-message{border:0;display:flex;margin:0;padding:0;text-align:left}.dashboard .chat .new-message i{color:#495057}.dashboard .chat .new-message .message-attachment{border:0}.dashboard .chat .new-message .button-send{display:inline-block;line-height:40px;position:relative}.dashboard .chat .new-message .button-send .p-button-label{text-align:center}.dashboard .chat .new-message .message-emotion{display:inline-block;height:100%;line-height:40px;text-align:center;width:40px}.dashboard .chat .new-message .message-emotion i{font-size:24px;line-height:inherit}.dashboard .chat .new-message .message-input{width:calc(100% - 155px)}.dashboard .chat ul li.message-from,.dashboard .chat ul li.message-own{padding:0}.dashboard .chat ul li.message-from>span{background-color:#f0e3fd;border:0;border-radius:2px 20px 20px 2px}.dashboard .chat ul li.message-from>.first,.dashboard .chat ul li.message-from>.middle{margin-left:45px!important}.dashboard .chat ul li.message-from>.last{border-radius:2px 20px 20px 20px;margin-left:45px!important}.dashboard .chat ul li.message-from>img{border-radius:50%;margin-top:5px;position:absolute;width:36px}.dashboard .chat ul li.message-own>span{background-color:#def6f8;border:0;border-radius:20px 2px 2px 20px;text-align:right}.dashboard .chat ul li.message-own>span.sending{background-color:#eee}.dashboard .chat ul li.message-own>span.last{border-radius:20px 2px 20px 20px}.dashboard .chat ul li.message-own .attachment span.attachment-item{background-color:#f1f1f1!important;border:0!important;padding-left:0;padding-right:0}.dashboard .chat ul li.message-own .attachment span.attachment-item a{color:#555;cursor:pointer;display:inline-block;font-weight:700}.dashboard .chat ul li.message-own>div.file{background:#f1f1f1;border:1px solid #e4e4e4;border-radius:6px;display:inline-block;margin:1px;overflow:hidden;text-align:right}.dashboard .chat ul li.message-from .attachment span.attachment-item{background-color:#f1f1f1!important;border:0!important;padding-left:0;padding-right:0}.dashboard .chat ul li.message-from .attachment span.attachment-item a{color:#555;cursor:pointer;display:inline-block;font-weight:700}.dashboard .chat ul li.message-from .attachment span.attachment-item a img{margin-right:0}.dashboard .chat ul li.message-from>div.file{background:#f1f1f1;border:1px solid #e4e4e4;border-radius:6px;display:inline-block;margin:1px;overflow:hidden;text-align:left}.dashboard .chat ul li .attachment span.attachment-item a>i{padding-right:8px}.dashboard .chat ul li div.file p.attachment{display:inline-block;margin-bottom:5px}.dashboard .chat ul li.message-from{text-align:left}.dashboard .chat ul li.message-own{text-align:right}.dashboard .chat ul li>div.file.image{height:170px;max-width:100%;padding:15px;transition:width .15s linear;width:220px}.dashboard .chat ul li>div.file.image p.attachment{height:120px}.dashboard .chat ul li>div.file{padding:15px}.dashboard .chat ul li>div.file p,.dashboard .chat ul li>div.file span{display:inline-block;margin:0;padding:0}.visible{opacity:1;transition:opacity .15s linear;visibility:visible}.hidden{opacity:0;transition:visibility 0s .1s,opacity .1s linear;visibility:hidden}.visible2{opacity:1;transition:opacity .35s linear;visibility:visible}.hidden2{opacity:0;transition:visibility 0s .3s,opacity .3s linear;visibility:hidden}.dashboard .chat{position:relative}.dashboard .chat .scroll-to-bottom{bottom:6px;min-height:40px;padding-right:12px;position:-webkit-sticky;position:sticky;text-align:right}.dashboard .chat .scroll-to-bottom span{background:#495057;border:2px solid #fff;border-radius:50%;box-shadow:0 0 10px rgba(0,0,0,.34901960784313724);color:#fff;cursor:pointer;display:inline-block;font-size:20px;height:35px;line-height:35px;overflow:hidden;text-align:center;width:35px}.dashboard .chat .group-info{line-height:30px;margin:-10px;padding:5px 10px;top:0;z-index:99}.dashboard .chat .group-info,.dashboard .chat .pin{background:#fff;box-shadow:0 0 3px -1px rgba(0,0,0,.21176470588235294);position:-webkit-sticky;position:sticky}.dashboard .chat .pin{margin-bottom:10px;margin-left:-10px;top:40px;width:calc(100% + 20px);z-index:98}.dashboard .chat ul li.message-from.pin>span,.dashboard .chat ul li.message-own.pin>span{background-color:transparent}.dashboard .chat ul li.message-from.pin>span{margin-left:0}.dashboard .chat .message-content i{color:#495057;cursor:pointer;font-size:11px}.dashboard .chat .pin .message-content i{display:block}.dashboard .chat li.message-from .message-content{padding-left:6px}.dashboard .chat li.message-from .message-content i{padding:5px}.dashboard .chat li.message-own .message-content i{padding:5px;position:absolute;right:-15px}.dashboard .chat .group-info .circleButton{float:right;margin-bottom:0;margin-top:0}.dashboard .chat ul{margin-top:20px;padding:0}.dashboard .chat .new-message .message-input input.ui-inputtext:focus{box-shadow:none;outline:none}.dashboard .chat ul.hasPin{margin-top:10px}.dashboard .chat .group-info a{color:#495057}.normalHtml,.normalHtml b,.normalHtml strong{font-weight:400}.normalHtml{display:inline-block}.avatar-viewer .profile-image{border:1px solid #fff;border-radius:50%;height:40px;margin-top:-6px;width:40px}a.button>i{margin-right:5px}.dashboard .timeline{padding-top:20px}.ui-inputgroup .ui-inputtext{padding-right:0}.new-message .ui-inputtext{width:100%}.full-screen,.full-screen>.p-dialog{height:100%!important;left:0!important;max-height:100%;min-height:unset!important;min-width:100%!important;top:0!important;width:100%!important}#image-view-list.image-gallery-2{background-color:rgba(0,0,0,.4);height:calc(100vh - 41px);margin:-14px auto 0;touch-action:none;width:100%}#image-view-list.image-gallery-2 .image-container{background-color:transparent;border:0;bottom:0;height:85%;margin:auto}#image-view-list.image-gallery-2 .image-container .iv-snap-view{bottom:20px;left:calc(50% - 75px);top:auto}#image-view-list.image-gallery-2 .image-container .iv-image-view img{touch-action:auto}#image-view-list .inline-icon{margin-top:-41px}#image-view-list .footer-info,#image-view-list .material-icons.next,#image-view-list .material-icons.prev{display:none}#image-view-list .options-image-viewer{-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;margin-right:37px;user-select:none}.mobile-image-viewer-close{color:#fff;cursor:pointer;font-size:x-large;height:42px;line-height:42px;padding-right:7px;padding-top:2px;position:absolute;right:0;text-align:center;top:0;vertical-align:middle;width:37px}.mobile-image-viewer-close:hover{color:#feca37!important}.hide-holder{padding:0}.file-ex-name{word-break:break-all}.box-function{background:#fff;border-radius:0 0 5px 5px;border-top:1px solid #e8e8e8;bottom:0;left:0;padding:8px 30px;position:absolute;text-align:right;width:100%}.box-function button{margin-left:5px}.quick-note-button-holder{bottom:40px;display:none;height:50px;position:absolute;right:50px;width:50px;z-index:99}.quick-note-button{background:#ffc107;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 5px 0 #b9b9b9;color:#fff;display:block;font-size:2em;height:50px;line-height:50px;outline:none;text-align:center;width:50px}.quick-note-button:hover{color:#fff}.all-note-button{background:#ffd24b;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 5px 0 #b9b9b9;color:#fff;display:block;font-size:1.5em;height:40px;line-height:40px;outline:none;position:absolute;right:5px;text-align:center;top:5px;transition:right;transition-duration:.16s;transition-timing-function:ease-in;width:40px;z-index:-1}.all-note-button:hover{color:#fff}.setting-note-button{background:#ffd24b;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 5px 0 #b9b9b9;color:#fff;display:block;font-size:1.5em;height:40px;line-height:40px;outline:none;position:absolute;right:5px;text-align:center;top:5px;transition:right;transition-duration:.16s;transition-timing-function:ease-in;width:40px;z-index:-1}.setting-note-button:hover{color:#fff}.pinned-notes-holder{bottom:20px;display:none;left:20px;position:absolute;width:250px;z-index:98}.pinned-notes{background:transparent;display:block;outline:none;padding:0}.pinned-notes-header{font-size:1rem;font-weight:700}.pinned-notes-setting{position:absolute;right:.5rem}.pinned-note{background-color:#fff1ac;box-shadow:1px 2px 3px rgba(185,139,6,.6313725490196078);font-size:.8rem;margin-bottom:10px;padding:0;position:relative}.pinned-note:last-child{margin-bottom:0}.pinned-notes-minimize-button{background:#ffc003;border:1px solid #fff;border-radius:50%;box-shadow:1px 2px 3px rgba(185,139,6,.6313725490196078);color:#fff;cursor:pointer;height:25px;padding-top:5px;position:absolute;right:-15px;text-align:center;top:-15px;width:25px;z-index:1}.pinned-note-header-line{border:1px solid #fff;box-shadow:1px 1px 2px rgba(0,0,0,.4);height:calc(100% - 1rem);left:3px;margin-bottom:.5rem;margin-top:.5rem;max-height:20px;position:absolute;width:13px}.pinned-note-header-right{cursor:pointer;float:right;margin-left:3px;width:32px}.pinned-note-header-time{font-size:.6rem}.pinned-note-header-button-unpin{display:none;float:left;height:14px;margin-right:2px;opacity:.8;width:14px}.pinned-note-header-button-complete{display:none;padding-top:2px}.pinned-note-body{float:right;padding:.5rem .5rem .5rem 25px;width:100%}.pinned-note-body:hover{background-color:#feeb82}.pinned-note-body:hover .pinned-note-header-time{display:none}.pinned-note-body:hover .pinned-note-header-button-complete,.pinned-note-body:hover .pinned-note-header-button-unpin{display:block}.pinned-note-line-title{color:#333;display:block;font-weight:700;padding-bottom:6px}.pinned-note-line{display:block}.view-port{border-radius:5px;box-shadow:0 0 0 9999px rgba(0,0,0,.5882352941176471);display:none;height:0;width:0;z-index:999}.view-port,.view-port-mask{background:transparent;position:absolute}.view-port-mask{display:block;height:100%;left:0;top:0;width:100%;z-index:9998}.tinymce-control{border:1px solid #ccc;display:none;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:14px;width:100%}.input-tab-trap{filter:alpha(opacity=0)!important;opacity:0!important;overflow:hidden!important;width:0!important}.color-value input{font-size:.8em;line-height:16px}.dialog-material.mobile{width:100%!important}audio,audio:focus,video,video:focus{outline:none}.iv-image-view img.iv-image{-webkit-animation:fadein .5s;animation:fadein .5s;visibility:hidden!important}@-webkit-keyframes fadein{0%{opacity:0}to{opacity:1}}@keyframes fadein{0%{opacity:0}to{opacity:1}}.iv-image-view img.iv-image.show{visibility:visible!important}.row-line{padding-bottom:0;padding-top:0}.fc-ltr{padding-bottom:7px}.padding-bottom-5px{padding-bottom:5px}.no-margin{margin:0!important}.no-padding{padding:0}.no-padding-left{padding-left:0}.float-left{float:left}body .fc .fc-toolbar .fc-button{background-color:#007ad9;border:1px solid #007ad9;border-radius:3px;color:#fff;font-size:14px;transition:background-color .2s,box-shadow .2s}body .fc .fc-toolbar .fc-button:enabled:hover{background-color:#116fbf;border-color:#116fbf;color:#fff}body .fc .fc-toolbar .fc-button:focus{box-shadow:0 0 0 .2em #8dcdff;outline:0 none;outline-offset:0}body .fc .fc-toolbar .fc-button-group .fc-button{border-radius:0}body .fc .fc-toolbar .fc-button-group .fc-button:first-child{border-bottom-left-radius:3px;border-top-left-radius:3px}body .fc .fc-toolbar .fc-button-group .fc-button:last-child{border-bottom-right-radius:3px;border-top-right-radius:3px}body .fc .fc-toolbar .fc-right .fc-button{border-radius:0}body .fc .fc-toolbar .fc-right .fc-button:first-child{border-bottom-left-radius:3px;border-top-left-radius:3px}body .fc .fc-toolbar .fc-right .fc-button:last-child{border-bottom-right-radius:3px;border-top-right-radius:3px}.fc-toolbar>*>:not(:first-child){margin-left:0}.fc-axis,.fc-dayGridMonth-button,.fc-timeGridDay-button,.fc-timeGridWeek-button,.old-content{line-height:0;text-indent:-9999px}.fc-axis:after,.fc-dayGridMonth-button:after,.fc-timeGridDay-button:after,.fc-timeGridWeek-button:after,.new-content{display:block;line-height:normal;text-indent:0}.fc-dayGridMonth-button:after{content:\"Th\u00E1ng\";padding:.2em}.fc-timeGridWeek-button:after{content:\"Tu\u1EA7n\";padding:.2em}.fc-timeGridDay-button:after{content:\"Ng\u00E0y\";padding:.2em}body .fc th{background-color:#f4f4f4;border:1px solid #c8c8c8;color:#333;padding:.571em 1em}.ui-fluid .button-group button,.ui-fluid .button-group p-button{margin-right:.5em!important;text-align:left;width:auto}.layout-wrapper .layout-menu-container{z-index:97}.base-status,.base-status-aborted,.base-status-approved,.base-status-completed,.base-status-create-new,.base-status-ended,.base-status-high,.base-status-immediately,.base-status-low,.base-status-medium,.base-status-on-conducting,.base-status-on-going,.base-status-pending,.base-status-rejected,.base-status-returned,.base-status-urgent{border-radius:.25em;color:#fff;font-size:.8em;padding:3px;text-align:center}.base-status-create-new{background-color:#f2f2f2;color:#666}.base-status-on-conducting,.base-status-on-going{background-color:#337ab7}.base-status-pending{background-color:#ffba01}.base-status-approved{background-color:#34a835}.base-status-returned{background-color:#ffba01}.base-status-rejected{background-color:#d9534f}.base-status-completed{background-color:#34a835}.base-status-aborted{background-color:#ffba01}.base-status-ended{background-color:#34a835}.base-status-low,.base-status-medium{background-color:#f2f2f2;color:#666}.base-status-high{background-color:#ffba01}.base-status-immediately,.base-status-urgent{background-color:#d9534f}.text-align-center{text-align:center}.font-weight-bold{font-weight:700}.landing-body .landing-menu li a:hover{border-bottom:none}.landing-body .landing-menu li:first-child{margin-left:8px}.crud-form .label-control p{margin:0;padding:0}.crud-form .tn-check-box-list .p-row{display:block;padding:.5em;width:100%}.crud-form dropdown,.crud-form tn-mask{width:100%}.crud-form .tn-dropdown{min-height:32px}.crud-form .tn-dropdown.free-text.horizontal{display:flex}.crud-form .tn-dropdown.free-text.horizontal>div{flex-grow:1;padding-left:.5em;padding-right:.5em}.crud-form .tn-dropdown.free-text.horizontal>div:first-child{padding-left:0}.crud-form .tn-dropdown.free-text.horizontal>div:last-child{padding-right:0}.crud-form .tn-dropdown.free-text.vertical input.ui-inputtext.input-free-text{margin-top:.5em}.crud-form.assessment .label-control{font-weight:700}.crud-form.assessment .label-control.haveIndex{display:block;margin-bottom:5px;padding-left:20px;position:relative}.crud-form.assessment .label-control.haveIndex:before{content:\" \" attr(label-index) \".\";left:0;position:absolute;top:0}.crud-form.assessment .ViewMode{border-bottom:none}.crud-form.assessment .ViewMode .label-control{margin-bottom:0}body .ui-inputtext.min-width{padding:6px}.ps__rail-x,.ps__rail-y{z-index:2}.zIndex5 .ps__rail-x,.zIndex5 .ps__rail-y{z-index:5}.table-sticky table{border-collapse:separate;border-spacing:0}.table-sticky tr td,.table-sticky tr th{border:1px solid #eee!important;border-left:none!important;border-top:none!important}.table-sticky tr td:first-child,.table-sticky tr th:first-child{border-left:1px solid #eee!important}.table-sticky tr td:last-child,.table-sticky tr th:last-child{border-right:none!important}.table-sticky tr:first-child th{border-top:1px solid #eee!important}.table-sticky th{background:#eee}.table-sticky tbody td.disabled{background:#eee!important}.table-sticky tbody td.disabled:not(:last-child){border-right:1px solid #fff!important}.table-sticky.fix-height tr:first-child th{position:-webkit-sticky;position:sticky;top:0;z-index:2}.container-flex{align-items:center;display:flex}.container-flex>div:first-child{flex:0 0 auto;margin-right:.5em}.container-flex>div:last-child{flex-grow:1}.container-control{display:flex}.container-control>span.label{flex:0 0 auto;padding-right:.5em;padding-top:.5em}.container-control>span.label+*{flex-grow:1;flex-shrink:1;position:relative}.container-control>span.label+* .tn-dropdown,.container-control>span.label+* .ui-autocomplete-multiple,.container-control>span.label+* .ui-inputgroup .ui-inputtext{width:100%}.container-control>span.label+* .validation-container{margin-top:3px}.container-control>span.label+* .validation-container .validate-item{white-space:unset}.container-control>span.label+*>div{left:0;position:absolute;top:0;width:100%}.container-control.no-label>span.label{display:none}.container-control.inline{display:inline-flex}.align-flex-center{align-items:center;display:flex;justify-content:center}@media print{.isPrinting>*{display:none}.isPrinting app-print-layout{display:block}}.layout-wrapper .topbar .topbar-left,.layout-wrapper .topbar .topbar-right{background:#397ac3}#searchResultPanel-holder{padding:0 .5em}.cus-dropdown{line-height:normal;margin-right:1em}.tn-thumbnail{padding:.5rem}.tn-thumbnail.tn-thumbnail.tn-thumbnail{box-sizing:border-box}.fa-10:before{content:\"A+\";font-family:cursive;font-weight:700}.layout-wrapper .topbar .topbar-right #menu-button i{font-size:20px;margin-top:4px}.layout-wrapper .layout-menu li a i.menuitem-toggle-icon{font-size:15px;margin-left:auto}.flex-container-main-content{display:flex;flex-direction:column}.flex-container-main-content>div:last-child{background-color:#f4f4f4;display:flex;flex:1 1;overflow:hidden;position:relative}.flex-container-main-content>div:last-child>div{height:100%;left:0;overflow:hidden;padding-top:.5em;position:absolute;top:0;width:100%}.flex-container-main-content .block-with-button-search{display:flex;justify-content:flex-end}.flex-container-main-content .block-with-button-search>*{margin-left:.5em}.flex-container-main-content .block-with-button-search>input{height:26px;margin-left:0;max-width:200px;width:100%}.flex-container-main-content .block-with-button-search>dropdown{max-width:140px;width:100%}.flex-container-main-content .title-main-component{border-bottom:2px solid #1ca7ff}.clickable-table.clickable-table{cursor:pointer}.main-crud-container{height:calc(100vh - 76px)}.flex-container-fit-child{display:flex;flex-direction:column;height:100%;overflow:hidden}.flex-container-fit-child>div.fit-content{flex:1 1;position:relative}.flex-container-fit-child>div.fit-content>div{height:100%;overflow:auto;position:absolute;width:100%}.waiting-box{display:none;height:100%;left:0;position:fixed;top:0;width:100%;z-index:9999}.waiting-box .overlay{background-color:red;background-color:hsla(0,0%,42.7%,.5019607843137255);height:100%;width:100%}.waiting-box .content-loading{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.waiting-box.show{display:block}.function-topbar>*{vertical-align:top}.function-topbar button{width:auto}.function-topbar p-fileUpload{margin-right:1em}.function-topbar .container-control{display:inline-flex;line-height:normal}.function-topbar .container-control dropdown{width:100%}:focus{outline-color:#a6d5fa!important}address{font-style:normal}body .p-toast .p-toast-message{border-radius:0;border-width:0 0 0 4px!important}.__status span,.status span{font-size:.8rem}p-table.single-check .p-datatable .p-datatable-tbody>tr{cursor:pointer}p-table.single-check .p-datatable .p-datatable-tbody>tr.ui-state-highlight{background:#e3f2fd!important;outline:2px solid #a6d5fa}p-table.single-check .p-datatable .p-datatable-tbody>tr td.sticky .fix-sticky.top{display:none}p-table.multi-check .p-datatable .p-datatable-tbody>tr.ui-state-highlight{background:#e3f2fd!important}p-table.multi-check .p-datatable .p-datatable-tbody>tr.ui-state-highlight td{border-color:#fff}p-table.multi-check .p-datatable .p-datatable-tbody>tr.ui-state-highlight td .fix-sticky{background-color:#fff}.tn-animated-left-arrow-icon,.tn-animated-right-arrow-icon{height:32px;position:relative;width:14px;z-index:10}.tn-animated-right-arrow-icon{-webkit-animation:arrowBounceToRight .8s ease-in-out infinite alternate;animation:arrowBounceToRight .8s ease-in-out infinite alternate}.tn-animated-left-arrow-icon{-webkit-animation:arrowBounceToLeft .8s ease-in-out infinite alternate;animation:arrowBounceToLeft .8s ease-in-out infinite alternate}.tn-animated-left-arrow-icon:after,.tn-animated-left-arrow-icon:before,.tn-animated-right-arrow-icon:after,.tn-animated-right-arrow-icon:before{background-color:#88b0dd;content:\"\";display:block;height:20px;position:absolute;width:5px}.tn-animated-right-arrow-icon:before{left:4px;top:0;transform:rotate(-35deg)}.tn-animated-right-arrow-icon:after{left:4px;top:14px;transform:rotate(35deg)}.tn-animated-left-arrow-icon:before{right:4px;top:0;transform:rotate(35deg)}.tn-animated-left-arrow-icon:after{right:4px;top:14px;transform:rotate(-35deg)}@-webkit-keyframes arrowBounceToLeft{0%{transform:translateX(-3px)}to{transform:translateX(3px)}}@keyframes arrowBounceToLeft{0%{transform:translateX(-3px)}to{transform:translateX(3px)}}@-webkit-keyframes arrowBounceToRight{0%{transform:translateX(3px)}to{transform:translateX(-3px)}}@keyframes arrowBounceToRight{0%{transform:translateX(3px)}to{transform:translateX(-3px)}}.pass{color:#49c949}.not-pass,.pass{margin:5px;text-align:center}.not-pass{color:red}"]
26950
+ styles: [".paging-advance{list-style:none;margin:3px 0;padding-left:0}.paging-advance li{line-height:30;padding-left:15px;width:150px}.paging-advance li.disabled{color:#bdbdbd;outline:none}.paging-advance li.disabled:hover{background:none;cursor:default}.paging-advance li:hover{background:red;cursor:pointer}.paging-advance-overlay .ui-overlaypanel-content{padding:0}.paging-advance-overlay.ui-overlaypanel-shifted:before{left:1.25em;margin-left:-10;right:auto}.paging-advance-overlay.ui-overlaypanel-shifted:after{left:1.25em;margin-left:-8px;right:auto}.chat-avatar{border:2px solid #eee;height:36px}", "@charset \"UTF-8\";@import url(D:\\git.dttt.vn\\5.1\\shared\\AppSharedV5\\node_modules\\@angular\\material\\prebuilt-themes\\indigo-pink.css);@import url(D:\\git.dttt.vn\\5.1\\shared\\AppSharedV5\\node_modules\\jsoneditor\\dist\\jsoneditor.min.css);.flex{display:flex}.flex .fit{flex:1 1}.flex.flex-column{flex-direction:column}.flex.flex-wrap{flex-wrap:wrap}.flex.center-v{align-items:center}.flex.center-all,.flex.center-h{justify-content:center}.flex.center-all{align-items:center}.validate-item{color:#e00000;display:inline-block;font-size:.9em;white-space:nowrap}.tn-scroll-bar.bgWhite>div,.validate-item{background-color:#fff}.label-primary{background-color:#1ab394;padding:2px}.label-danger,.label-primary{border-radius:.25em;color:#fff;display:inline-block;font-size:12px;margin-left:3px;margin-right:3px;min-width:60px}.label-danger{background-color:#ed5565;padding:2px 5px}.label-warning{background-color:#b8860b}.label-secondary,.label-warning{border-radius:.25em;color:#fff;display:inline-block;font-size:12px;margin-left:3px;margin-right:3px;min-width:60px;padding:2px}.label-secondary{background-color:#a9a9a9}.label-done{background-color:#3b1ef7;border-radius:.25em;color:#fff;display:inline-block;font-size:12px;margin-left:3px;margin-right:3px;min-width:60px;padding:2px}.text-navy{color:#1ab394!important}.text-danger{color:red!important}.fa-user-edit{font-size:14px}.flexcolumn{border:1px solid #eee;border-radius:5px;min-height:80px;overflow-x:hidden;overflow-y:hidden}.flexcolumn,.has2ScrollZone2 .flexcolumn{max-height:calc(100vh - 180px)}.headerNoBorder>th{border:none!important;border-bottom:1px solid #eee!important}.cellNoBorder table tr td{border:0!important}.layout-wrapper .layout-main{overflow:hidden;padding:60px 0 0}div.circleButton{border-radius:50%;display:inline-block;height:32px;line-height:32px;margin-bottom:4px;margin-top:4px;overflow:hidden;position:relative;text-align:center;transform:perspective(1px);width:32px}div.circleButton>a{line-height:32px;padding:0!important}div.circleButton>a>i{width:24px!important}div.circleButton:before{background:#e6e6e6;border-radius:50%;bottom:0;content:\"\";left:0;position:absolute;right:0;top:0;transform:scale(0);transition:all .3s cubic-bezier(.4,.34,.01,.97);z-index:-1}div.circleButton:hover:before{transform:scale(1)}.message-notice{background:#e0e0e0;text-align:center}.message-created-by{color:#888;font-size:.82em;font-weight:400;margin-bottom:3px;margin-left:45px;margin-top:5px}.message-created{color:#495057;display:inline-block;font-size:.82em;margin-bottom:0;margin-top:0}.message-own .message-created{padding-left:10px;padding-right:6px}.message-from .message-created{padding-left:6px;padding-right:10px}.message-content{color:#000;line-height:20px;margin-bottom:6px;margin-top:3px;position:relative}.message-content i{display:none}.message-content:hover i{display:block}.message-content:hover{padding-right:20px!important}.chat-box-content{max-height:500px}.attachment-list .attachment-item{-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;background:#f1f1f1;border:1px solid #ccc;border-radius:8px;box-shadow:1px 2px 3px rgba(0,0,0,.06);float:left;height:84px;margin:8px;overflow:hidden;position:relative;text-align:center;user-select:none;width:84px}.attachment-list .attachment-item img{height:100%;width:100%}.attachment-list .attachment-item span{left:0;padding:5px;position:absolute;top:25px;width:100%;word-break:break-all}.clearfix{clear:both}.dashboard .chat ul li img.message-img{float:none;height:120px;margin-left:0;width:auto}.message-attachment{cursor:pointer;font-size:1.5em;margin:0 5px 0 0;position:relative}.hidden{display:none}.message-input{width:100%}.message-input label{font-size:1.2rem}.remove-file-attachment{background:#495057;border-radius:50%;color:#fff;cursor:pointer;font-size:20px;position:absolute;right:5px;top:5px}.attachment-list{background:#fff;bottom:51px;box-shadow:0 -2px 3px -3px rgba(0,0,0,.21176470588235294);display:none;height:100px;left:-15px;position:absolute;width:calc(100% + 30px)}.attachment-list.attached-file{display:block}.dashboard{margin-bottom:-15px;margin-top:-5px}.dashboard .timeline>.ui-g .ui-g-9 .event-text{color:#555;white-space:nowrap}.dashboard .timeline>.ui-g .ui-g-9 .event-text.event-text2{line-height:18px;padding-left:30px;text-align:justify;white-space:pre-wrap}.dashboard .timeline>.ui-g .ui-g-9 .event-text.event-text2 i{left:20px;margin-top:3px;position:absolute}.new-message{align-items:center;justify-content:center}.dashboard .chat .new-message{border:0;display:flex;margin:0;padding:0;text-align:left}.dashboard .chat .new-message i{color:#495057}.dashboard .chat .new-message .message-attachment{border:0}.dashboard .chat .new-message .button-send{display:inline-block;line-height:40px;position:relative}.dashboard .chat .new-message .button-send .p-button-label{text-align:center}.dashboard .chat .new-message .message-emotion{display:inline-block;height:100%;line-height:40px;text-align:center;width:40px}.dashboard .chat .new-message .message-emotion i{font-size:24px;line-height:inherit}.dashboard .chat .new-message .message-input{width:calc(100% - 155px)}.dashboard .chat ul li.message-from,.dashboard .chat ul li.message-own{padding:0}.dashboard .chat ul li.message-from>span{background-color:#f0e3fd;border:0;border-radius:2px 20px 20px 2px}.dashboard .chat ul li.message-from>.first,.dashboard .chat ul li.message-from>.middle{margin-left:45px!important}.dashboard .chat ul li.message-from>.last{border-radius:2px 20px 20px 20px;margin-left:45px!important}.dashboard .chat ul li.message-from>img{border-radius:50%;margin-top:5px;position:absolute;width:36px}.dashboard .chat ul li.message-own>span{background-color:#def6f8;border:0;border-radius:20px 2px 2px 20px;text-align:right}.dashboard .chat ul li.message-own>span.sending{background-color:#eee}.dashboard .chat ul li.message-own>span.last{border-radius:20px 2px 20px 20px}.dashboard .chat ul li.message-own .attachment span.attachment-item{background-color:#f1f1f1!important;border:0!important;padding-left:0;padding-right:0}.dashboard .chat ul li.message-own .attachment span.attachment-item a{color:#555;cursor:pointer;display:inline-block;font-weight:700}.dashboard .chat ul li.message-own>div.file{background:#f1f1f1;border:1px solid #e4e4e4;border-radius:6px;display:inline-block;margin:1px;overflow:hidden;text-align:right}.dashboard .chat ul li.message-from .attachment span.attachment-item{background-color:#f1f1f1!important;border:0!important;padding-left:0;padding-right:0}.dashboard .chat ul li.message-from .attachment span.attachment-item a{color:#555;cursor:pointer;display:inline-block;font-weight:700}.dashboard .chat ul li.message-from .attachment span.attachment-item a img{margin-right:0}.dashboard .chat ul li.message-from>div.file{background:#f1f1f1;border:1px solid #e4e4e4;border-radius:6px;display:inline-block;margin:1px;overflow:hidden;text-align:left}.dashboard .chat ul li .attachment span.attachment-item a>i{padding-right:8px}.dashboard .chat ul li div.file p.attachment{display:inline-block;margin-bottom:5px}.dashboard .chat ul li.message-from{text-align:left}.dashboard .chat ul li.message-own{text-align:right}.dashboard .chat ul li>div.file.image{height:170px;max-width:100%;padding:15px;transition:width .15s linear;width:220px}.dashboard .chat ul li>div.file.image p.attachment{height:120px}.dashboard .chat ul li>div.file{padding:15px}.dashboard .chat ul li>div.file p,.dashboard .chat ul li>div.file span{display:inline-block;margin:0;padding:0}.visible{opacity:1;transition:opacity .15s linear;visibility:visible}.hidden{opacity:0;transition:visibility 0s .1s,opacity .1s linear;visibility:hidden}.visible2{opacity:1;transition:opacity .35s linear;visibility:visible}.hidden2{opacity:0;transition:visibility 0s .3s,opacity .3s linear;visibility:hidden}.dashboard .chat{position:relative}.dashboard .chat .scroll-to-bottom{bottom:6px;min-height:40px;padding-right:12px;position:-webkit-sticky;position:sticky;text-align:right}.dashboard .chat .scroll-to-bottom span{background:#495057;border:2px solid #fff;border-radius:50%;box-shadow:0 0 10px rgba(0,0,0,.34901960784313724);color:#fff;cursor:pointer;display:inline-block;font-size:20px;height:35px;line-height:35px;overflow:hidden;text-align:center;width:35px}.dashboard .chat .group-info{line-height:30px;margin:-10px;padding:5px 10px;top:0;z-index:99}.dashboard .chat .group-info,.dashboard .chat .pin{background:#fff;box-shadow:0 0 3px -1px rgba(0,0,0,.21176470588235294);position:-webkit-sticky;position:sticky}.dashboard .chat .pin{margin-bottom:10px;margin-left:-10px;top:40px;width:calc(100% + 20px);z-index:98}.dashboard .chat ul li.message-from.pin>span,.dashboard .chat ul li.message-own.pin>span{background-color:transparent}.dashboard .chat ul li.message-from.pin>span{margin-left:0}.dashboard .chat .message-content i{color:#495057;cursor:pointer;font-size:11px}.dashboard .chat .pin .message-content i{display:block}.dashboard .chat li.message-from .message-content{padding-left:6px}.dashboard .chat li.message-from .message-content i{padding:5px}.dashboard .chat li.message-own .message-content i{padding:5px;position:absolute;right:-15px}.dashboard .chat .group-info .circleButton{float:right;margin-bottom:0;margin-top:0}.dashboard .chat ul{margin-top:20px;padding:0}.dashboard .chat .new-message .message-input input.ui-inputtext:focus{box-shadow:none;outline:none}.dashboard .chat ul.hasPin{margin-top:10px}.dashboard .chat .group-info a{color:#495057}.normalHtml,.normalHtml b,.normalHtml strong{font-weight:400}.normalHtml{display:inline-block}.avatar-viewer .profile-image{border:1px solid #fff;border-radius:50%;height:40px;margin-top:-6px;width:40px}a.button>i{margin-right:5px}.dashboard .timeline{padding-top:20px}.ui-inputgroup .ui-inputtext{padding-right:0}.new-message .ui-inputtext{width:100%}.full-screen,.full-screen>.p-dialog{height:100%!important;left:0!important;max-height:100%;min-height:unset!important;min-width:100%!important;top:0!important;width:100%!important}#image-view-list.image-gallery-2{background-color:rgba(0,0,0,.4);height:calc(100vh - 41px);margin:-14px auto 0;touch-action:none;width:100%}#image-view-list.image-gallery-2 .image-container{background-color:transparent;border:0;bottom:0;height:85%;margin:auto}#image-view-list.image-gallery-2 .image-container .iv-snap-view{bottom:20px;left:calc(50% - 75px);top:auto}#image-view-list.image-gallery-2 .image-container .iv-image-view img{touch-action:auto}#image-view-list .inline-icon{margin-top:-41px}#image-view-list .footer-info,#image-view-list .material-icons.next,#image-view-list .material-icons.prev{display:none}#image-view-list .options-image-viewer{-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;margin-right:37px;user-select:none}.mobile-image-viewer-close{color:#fff;cursor:pointer;font-size:x-large;height:42px;line-height:42px;padding-right:7px;padding-top:2px;position:absolute;right:0;text-align:center;top:0;vertical-align:middle;width:37px}.mobile-image-viewer-close:hover{color:#feca37!important}.hide-holder{padding:0}.file-ex-name{word-break:break-all}.box-function{background:#fff;border-radius:0 0 5px 5px;border-top:1px solid #e8e8e8;bottom:0;left:0;padding:8px 30px;position:absolute;text-align:right;width:100%}.box-function button{margin-left:5px}.quick-note-button-holder{bottom:40px;display:none;height:50px;position:absolute;right:50px;width:50px;z-index:99}.quick-note-button{background:#ffc107;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 5px 0 #b9b9b9;color:#fff;display:block;font-size:2em;height:50px;line-height:50px;outline:none;text-align:center;width:50px}.quick-note-button:hover{color:#fff}.all-note-button{background:#ffd24b;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 5px 0 #b9b9b9;color:#fff;display:block;font-size:1.5em;height:40px;line-height:40px;outline:none;position:absolute;right:5px;text-align:center;top:5px;transition:right;transition-duration:.16s;transition-timing-function:ease-in;width:40px;z-index:-1}.all-note-button:hover{color:#fff}.setting-note-button{background:#ffd24b;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 5px 0 #b9b9b9;color:#fff;display:block;font-size:1.5em;height:40px;line-height:40px;outline:none;position:absolute;right:5px;text-align:center;top:5px;transition:right;transition-duration:.16s;transition-timing-function:ease-in;width:40px;z-index:-1}.setting-note-button:hover{color:#fff}.pinned-notes-holder{bottom:20px;display:none;left:20px;position:absolute;width:250px;z-index:98}.pinned-notes{background:transparent;display:block;outline:none;padding:0}.pinned-notes-header{font-size:1rem;font-weight:700}.pinned-notes-setting{position:absolute;right:.5rem}.pinned-note{background-color:#fff1ac;box-shadow:1px 2px 3px rgba(185,139,6,.6313725490196078);font-size:.8rem;margin-bottom:10px;padding:0;position:relative}.pinned-note:last-child{margin-bottom:0}.pinned-notes-minimize-button{background:#ffc003;border:1px solid #fff;border-radius:50%;box-shadow:1px 2px 3px rgba(185,139,6,.6313725490196078);color:#fff;cursor:pointer;height:25px;padding-top:5px;position:absolute;right:-15px;text-align:center;top:-15px;width:25px;z-index:1}.pinned-note-header-line{border:1px solid #fff;box-shadow:1px 1px 2px rgba(0,0,0,.4);height:calc(100% - 1rem);left:3px;margin-bottom:.5rem;margin-top:.5rem;max-height:20px;position:absolute;width:13px}.pinned-note-header-right{cursor:pointer;float:right;margin-left:3px;width:32px}.pinned-note-header-time{font-size:.6rem}.pinned-note-header-button-unpin{display:none;float:left;height:14px;margin-right:2px;opacity:.8;width:14px}.pinned-note-header-button-complete{display:none;padding-top:2px}.pinned-note-body{float:right;padding:.5rem .5rem .5rem 25px;width:100%}.pinned-note-body:hover{background-color:#feeb82}.pinned-note-body:hover .pinned-note-header-time{display:none}.pinned-note-body:hover .pinned-note-header-button-complete,.pinned-note-body:hover .pinned-note-header-button-unpin{display:block}.pinned-note-line-title{color:#333;display:block;font-weight:700;padding-bottom:6px}.pinned-note-line{display:block}.view-port{border-radius:5px;box-shadow:0 0 0 9999px rgba(0,0,0,.5882352941176471);display:none;height:0;width:0;z-index:999}.view-port,.view-port-mask{background:transparent;position:absolute}.view-port-mask{display:block;height:100%;left:0;top:0;width:100%;z-index:9998}.tinymce-control{border:1px solid #ccc;display:none;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:14px;width:100%}.input-tab-trap{filter:alpha(opacity=0)!important;opacity:0!important;overflow:hidden!important;width:0!important}.color-value input{font-size:.8em;line-height:16px}.dialog-material.mobile{width:100%!important}audio,audio:focus,video,video:focus{outline:none}.iv-image-view img.iv-image{-webkit-animation:fadein .5s;animation:fadein .5s;visibility:hidden!important}@-webkit-keyframes fadein{0%{opacity:0}to{opacity:1}}@keyframes fadein{0%{opacity:0}to{opacity:1}}.iv-image-view img.iv-image.show{visibility:visible!important}.row-line{padding-bottom:0;padding-top:0}.fc-ltr{padding-bottom:7px}.padding-bottom-5px{padding-bottom:5px}.no-margin{margin:0!important}.no-padding{padding:0}.no-padding-left{padding-left:0}.float-left{float:left}body .fc .fc-toolbar .fc-button{background-color:#007ad9;border:1px solid #007ad9;border-radius:3px;color:#fff;font-size:14px;transition:background-color .2s,box-shadow .2s}body .fc .fc-toolbar .fc-button:enabled:hover{background-color:#116fbf;border-color:#116fbf;color:#fff}body .fc .fc-toolbar .fc-button:focus{box-shadow:0 0 0 .2em #8dcdff;outline:0 none;outline-offset:0}body .fc .fc-toolbar .fc-button-group .fc-button{border-radius:0}body .fc .fc-toolbar .fc-button-group .fc-button:first-child{border-bottom-left-radius:3px;border-top-left-radius:3px}body .fc .fc-toolbar .fc-button-group .fc-button:last-child{border-bottom-right-radius:3px;border-top-right-radius:3px}body .fc .fc-toolbar .fc-right .fc-button{border-radius:0}body .fc .fc-toolbar .fc-right .fc-button:first-child{border-bottom-left-radius:3px;border-top-left-radius:3px}body .fc .fc-toolbar .fc-right .fc-button:last-child{border-bottom-right-radius:3px;border-top-right-radius:3px}.fc-toolbar>*>:not(:first-child){margin-left:0}.fc-axis,.fc-dayGridMonth-button,.fc-timeGridDay-button,.fc-timeGridWeek-button,.old-content{line-height:0;text-indent:-9999px}.fc-axis:after,.fc-dayGridMonth-button:after,.fc-timeGridDay-button:after,.fc-timeGridWeek-button:after,.new-content{display:block;line-height:normal;text-indent:0}.fc-dayGridMonth-button:after{content:\"Th\u00E1ng\";padding:.2em}.fc-timeGridWeek-button:after{content:\"Tu\u1EA7n\";padding:.2em}.fc-timeGridDay-button:after{content:\"Ng\u00E0y\";padding:.2em}body .fc th{background-color:#f4f4f4;border:1px solid #c8c8c8;color:#333;padding:.571em 1em}.ui-fluid .button-group button,.ui-fluid .button-group p-button{margin-right:.5em!important;text-align:left;width:auto}.layout-wrapper .layout-menu-container{z-index:97}.base-status,.base-status-aborted,.base-status-approved,.base-status-completed,.base-status-create-new,.base-status-ended,.base-status-high,.base-status-immediately,.base-status-low,.base-status-medium,.base-status-on-conducting,.base-status-on-going,.base-status-pending,.base-status-rejected,.base-status-returned,.base-status-urgent{border-radius:.25em;color:#fff;font-size:.8em;padding:3px;text-align:center}.base-status-create-new{background-color:#f2f2f2;color:#666}.base-status-on-conducting,.base-status-on-going{background-color:#337ab7}.base-status-pending{background-color:#ffba01}.base-status-approved{background-color:#34a835}.base-status-returned{background-color:#ffba01}.base-status-rejected{background-color:#d9534f}.base-status-completed{background-color:#34a835}.base-status-aborted{background-color:#ffba01}.base-status-ended{background-color:#34a835}.base-status-low,.base-status-medium{background-color:#f2f2f2;color:#666}.base-status-high{background-color:#ffba01}.base-status-immediately,.base-status-urgent{background-color:#d9534f}.text-align-center{text-align:center}.font-weight-bold{font-weight:700}.landing-body .landing-menu li a:hover{border-bottom:none}.landing-body .landing-menu li:first-child{margin-left:8px}.crud-form .label-control p{margin:0;padding:0}.crud-form .tn-check-box-list .p-row{display:block;padding:.5em;width:100%}.crud-form dropdown,.crud-form tn-mask{width:100%}.crud-form .tn-dropdown{min-height:32px}.crud-form .tn-dropdown.free-text.horizontal{display:flex}.crud-form .tn-dropdown.free-text.horizontal>div{flex-grow:1;padding-left:.5em;padding-right:.5em}.crud-form .tn-dropdown.free-text.horizontal>div:first-child{padding-left:0}.crud-form .tn-dropdown.free-text.horizontal>div:last-child{padding-right:0}.crud-form .tn-dropdown.free-text.vertical input.ui-inputtext.input-free-text{margin-top:.5em}.crud-form.assessment .label-control{font-weight:700}.crud-form.assessment .label-control.haveIndex{display:block;margin-bottom:5px;padding-left:20px;position:relative}.crud-form.assessment .label-control.haveIndex:before{content:\" \" attr(label-index) \".\";left:0;position:absolute;top:0}.crud-form.assessment .ViewMode{border-bottom:none}.crud-form.assessment .ViewMode .label-control{margin-bottom:0}body .ui-inputtext.min-width{padding:6px}.ps__rail-x,.ps__rail-y{z-index:2}.zIndex5 .ps__rail-x,.zIndex5 .ps__rail-y{z-index:5}.table-sticky table{border-collapse:separate;border-spacing:0}.table-sticky tr td,.table-sticky tr th{border:1px solid #eee!important;border-left:none!important;border-top:none!important}.table-sticky tr td:first-child,.table-sticky tr th:first-child{border-left:1px solid #eee!important}.table-sticky tr td:last-child,.table-sticky tr th:last-child{border-right:none!important}.table-sticky tr:first-child th{border-top:1px solid #eee!important}.table-sticky th{background:#eee}.table-sticky tbody td.disabled{background:#eee!important}.table-sticky tbody td.disabled:not(:last-child){border-right:1px solid #fff!important}.table-sticky.fix-height tr:first-child th{position:-webkit-sticky;position:sticky;top:0;z-index:2}.container-flex{align-items:center;display:flex}.container-flex>div:first-child{flex:0 0 auto;margin-right:.5em}.container-flex>div:last-child{flex-grow:1}.container-control{display:flex}.container-control>span.label{flex:0 0 auto;padding-right:.5em;padding-top:.5em}.container-control>span.label+*{flex-grow:1;flex-shrink:1;position:relative}.container-control>span.label+* .tn-dropdown,.container-control>span.label+* .ui-autocomplete-multiple,.container-control>span.label+* .ui-inputgroup .ui-inputtext{width:100%}.container-control>span.label+* .validation-container{margin-top:3px}.container-control>span.label+* .validation-container .validate-item{white-space:unset}.container-control>span.label+*>div{left:0;position:absolute;top:0;width:100%}.container-control.no-label>span.label{display:none}.container-control.inline{display:inline-flex}.align-flex-center{align-items:center;display:flex;justify-content:center}@media print{.isPrinting>*{display:none}.isPrinting app-print-layout{display:block}}.layout-wrapper .topbar .topbar-left,.layout-wrapper .topbar .topbar-right{background:#397ac3}#searchResultPanel-holder{padding:0 .5em}.cus-dropdown{line-height:normal;margin-right:1em}.tn-thumbnail{padding:.5rem}.tn-thumbnail.tn-thumbnail.tn-thumbnail{box-sizing:border-box}.fa-10:before{content:\"A+\";font-family:cursive;font-weight:700}.layout-wrapper .topbar .topbar-right #menu-button i{font-size:20px;margin-top:4px}.layout-wrapper .layout-menu li a i.menuitem-toggle-icon{font-size:15px;margin-left:auto}.flex-container-main-content{display:flex;flex-direction:column}.flex-container-main-content>div:last-child{background-color:#f4f4f4;display:flex;flex:1 1;overflow:hidden;position:relative}.flex-container-main-content>div:last-child>div{height:100%;left:0;overflow:hidden;padding-top:.5em;position:absolute;top:0;width:100%}.flex-container-main-content .block-with-button-search{display:flex;justify-content:flex-end}.flex-container-main-content .block-with-button-search>*{margin-left:.5em}.flex-container-main-content .block-with-button-search>input{height:26px;margin-left:0;max-width:200px;width:100%}.flex-container-main-content .block-with-button-search>dropdown{max-width:140px;width:100%}.flex-container-main-content .title-main-component{border-bottom:2px solid #1ca7ff}.clickable-table.clickable-table{cursor:pointer}.main-crud-container{height:calc(100vh - 76px)}.flex-container-fit-child{display:flex;flex-direction:column;height:100%;overflow:hidden}.flex-container-fit-child>div.fit-content{flex:1 1;position:relative}.flex-container-fit-child>div.fit-content>div{height:100%;overflow:auto;position:absolute;width:100%}.waiting-box{display:none;height:100%;left:0;position:fixed;top:0;width:100%;z-index:9999}.waiting-box .overlay{background-color:red;background-color:hsla(0,0%,42.7%,.5019607843137255);height:100%;width:100%}.waiting-box .content-loading{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.waiting-box.show{display:block}.function-topbar>*{vertical-align:top}.function-topbar button{width:auto}.function-topbar p-fileUpload{margin-right:1em}.function-topbar .container-control{display:inline-flex;line-height:normal}.function-topbar .container-control dropdown{width:100%}:focus{outline-color:#a6d5fa!important}address{font-style:normal}body .p-toast .p-toast-message{border-radius:0;border-width:0 0 0 4px!important}.__status span,.status span{font-size:.8rem}p-table.single-check .p-datatable .p-datatable-tbody>tr{cursor:pointer}p-table.single-check .p-datatable .p-datatable-tbody>tr.ui-state-highlight{background:#e3f2fd!important;outline:2px solid #a6d5fa}p-table.single-check .p-datatable .p-datatable-tbody>tr td.sticky .fix-sticky.top{display:none}p-table.multi-check .p-datatable .p-datatable-tbody>tr.ui-state-highlight{background:#e3f2fd!important}p-table.multi-check .p-datatable .p-datatable-tbody>tr.ui-state-highlight td{border-color:#fff}p-table.multi-check .p-datatable .p-datatable-tbody>tr.ui-state-highlight td .fix-sticky{background-color:#fff}.tn-animated-left-arrow-icon,.tn-animated-right-arrow-icon{height:32px;position:relative;width:14px;z-index:10}.tn-animated-right-arrow-icon{-webkit-animation:arrowBounceToRight .8s ease-in-out infinite alternate;animation:arrowBounceToRight .8s ease-in-out infinite alternate}.tn-animated-left-arrow-icon{-webkit-animation:arrowBounceToLeft .8s ease-in-out infinite alternate;animation:arrowBounceToLeft .8s ease-in-out infinite alternate}.tn-animated-left-arrow-icon:after,.tn-animated-left-arrow-icon:before,.tn-animated-right-arrow-icon:after,.tn-animated-right-arrow-icon:before{background-color:#88b0dd;content:\"\";display:block;height:20px;position:absolute;width:5px}.tn-animated-right-arrow-icon:before{left:4px;top:0;transform:rotate(-35deg)}.tn-animated-right-arrow-icon:after{left:4px;top:14px;transform:rotate(35deg)}.tn-animated-left-arrow-icon:before{right:4px;top:0;transform:rotate(35deg)}.tn-animated-left-arrow-icon:after{right:4px;top:14px;transform:rotate(-35deg)}@-webkit-keyframes arrowBounceToLeft{0%{transform:translateX(-3px)}to{transform:translateX(3px)}}@keyframes arrowBounceToLeft{0%{transform:translateX(-3px)}to{transform:translateX(3px)}}@-webkit-keyframes arrowBounceToRight{0%{transform:translateX(3px)}to{transform:translateX(-3px)}}@keyframes arrowBounceToRight{0%{transform:translateX(3px)}to{transform:translateX(-3px)}}.pass{color:#49c949}.not-pass,.pass{margin:5px;text-align:center}.not-pass{color:red}"]
26948
26951
  },] }
26949
26952
  ];
26950
26953
  ChatBoxComponent.ctorParameters = function () { return [
@@ -27550,7 +27553,7 @@
27550
27553
  selector: 'chat-send-message-box',
27551
27554
  template: "<div class=\"dashboard\" (mouseup)=\"onMouseUp($event)\">\r\n <div class=\"chat\">\r\n <div class=\"new-message\">\r\n <div class=\"message-emotion\">\r\n <i class=\"far fa-smile\" style=\"color: gray;\" disabled=\"true\"></i>\r\n </div>\r\n <div class=\"message-attachment\" pTooltip=\"\u0110\u00EDnh k\u00E8m file\" tooltipPosition=\"top\" (click)=\"op.toggle($event)\">\r\n <i class=\"fas fa-paperclip\"></i>\r\n </div>\r\n <p-overlayPanel #op [dismissable]=\"true\" [appendTo]=\"'body'\" [styleClass]=\"'paging-advance-overlay'\"\r\n (mouseup)=\"onMouseUp($event)\">\r\n <ul class=\"paging-advance\">\r\n <li (click)=\"browseFileFromPersonal()\">T\u1EEB file c\u00E1 nh\u00E2n</li>\r\n <li (click)=\"browseFileFromComputer()\">T\u1EA3i l\u00EAn t\u1EEB m\u00E1y t\u00EDnh</li>\r\n </ul>\r\n </p-overlayPanel>\r\n <div class=\"message-input p-float-label\">\r\n <input #input pInputText\r\n id=\"message\"\r\n autocomplete=\"off\" autocorrect=\"off\"\r\n spellcheck=\"false\" class=\"ui-inputtext\"\r\n type=\"text\" placeholder=\"N\u1ED9i dung tin nh\u1EAFn\"\r\n [(ngModel)]=\"model.content\"\r\n (keyup.enter)=\"onSendMessage($event.target.value)\" (keydown.shift.tab)=\"cancelBlur($event)\"\r\n (keydown.tab)=\"cancelBlur($event)\" (paste)=\"handlePaste($event)\" (click)=\"clickInputText()\"/>\r\n </div>\r\n <div>\r\n <button pButton class=\"p-button-danger\" icon=\"fas fa-send\" type=\"button\" label=\"G\u1EEDi\"\r\n (click)=\"onSendMessage(model.content)\">\r\n </button>\r\n </div>\r\n </div>\r\n <div class=\"attachment-list\" [ngClass]=\"model.classHasAttachment\">\r\n <tn-custom-scrollbar #scrollbar [style]=\"{'height': '100px'}\">\r\n <div *ngFor=\"let item of model.attachments\" class=\"attachment-item\">\r\n <img *ngIf=\"item.type == 'image'\" [src]=\"item.url | safeUrl\"/>\r\n <span *ngIf=\"item.type == 'file'\">{{item.fileName}}</span>\r\n <i class=\"far fa-times-circle label-danger remove-file-attachment\"\r\n (click)=\"removeAttachment(item)\"></i>\r\n </div>\r\n </tn-custom-scrollbar>\r\n <!-- <div class=\"clearfix\"></div>-->\r\n </div>\r\n </div>\r\n</div>\r\n<p-fileUpload [ngStyle]=\"{'display': 'none'}\" #fileElement (onSelect)=\"onSelectFileFromComputer($event)\"\r\n multiple=\"multiple\" name=\"fileUpload\" [maxFileSize]=\"model.maxFileSize\" auto=\"false\">\r\n</p-fileUpload>\r\n\r\n<!-- <app-drive-file-dialog *ngIf=\"model.driveFileDialog.show\" [parentDataContext]=\"dataContext\"\r\n []=\"model.driveFileDialog\" #driveFileDialog>\r\n</app-drive-file-dialog> -->\r\n",
27552
27555
  providers: [ComponentContextService],
27553
- styles: ["", "@charset \"UTF-8\";@import url(C:\\Users\\Admin\\Desktop\\TN_TriNam\\5.1\\shared\\AppSharedV5\\node_modules\\@angular\\material\\prebuilt-themes\\indigo-pink.css);@import url(C:\\Users\\Admin\\Desktop\\TN_TriNam\\5.1\\shared\\AppSharedV5\\node_modules\\jsoneditor\\dist\\jsoneditor.min.css);.flex{display:flex}.flex .fit{flex:1 1}.flex.flex-column{flex-direction:column}.flex.flex-wrap{flex-wrap:wrap}.flex.center-v{align-items:center}.flex.center-all,.flex.center-h{justify-content:center}.flex.center-all{align-items:center}.validate-item{color:#e00000;display:inline-block;font-size:.9em;white-space:nowrap}.tn-scroll-bar.bgWhite>div,.validate-item{background-color:#fff}.label-primary{background-color:#1ab394;padding:2px}.label-danger,.label-primary{border-radius:.25em;color:#fff;display:inline-block;font-size:12px;margin-left:3px;margin-right:3px;min-width:60px}.label-danger{background-color:#ed5565;padding:2px 5px}.label-warning{background-color:#b8860b}.label-secondary,.label-warning{border-radius:.25em;color:#fff;display:inline-block;font-size:12px;margin-left:3px;margin-right:3px;min-width:60px;padding:2px}.label-secondary{background-color:#a9a9a9}.label-done{background-color:#3b1ef7;border-radius:.25em;color:#fff;display:inline-block;font-size:12px;margin-left:3px;margin-right:3px;min-width:60px;padding:2px}.text-navy{color:#1ab394!important}.text-danger{color:red!important}.fa-user-edit{font-size:14px}.flexcolumn{border:1px solid #eee;border-radius:5px;min-height:80px;overflow-x:hidden;overflow-y:hidden}.flexcolumn,.has2ScrollZone2 .flexcolumn{max-height:calc(100vh - 180px)}.headerNoBorder>th{border:none!important;border-bottom:1px solid #eee!important}.cellNoBorder table tr td{border:0!important}.layout-wrapper .layout-main{overflow:hidden;padding:60px 0 0}div.circleButton{border-radius:50%;display:inline-block;height:32px;line-height:32px;margin-bottom:4px;margin-top:4px;overflow:hidden;position:relative;text-align:center;transform:perspective(1px);width:32px}div.circleButton>a{line-height:32px;padding:0!important}div.circleButton>a>i{width:24px!important}div.circleButton:before{background:#e6e6e6;border-radius:50%;bottom:0;content:\"\";left:0;position:absolute;right:0;top:0;transform:scale(0);transition:all .3s cubic-bezier(.4,.34,.01,.97);z-index:-1}div.circleButton:hover:before{transform:scale(1)}.message-notice{background:#e0e0e0;text-align:center}.message-created-by{color:#888;font-size:.82em;font-weight:400;margin-bottom:3px;margin-left:45px;margin-top:5px}.message-created{color:#495057;display:inline-block;font-size:.82em;margin-bottom:0;margin-top:0}.message-own .message-created{padding-left:10px;padding-right:6px}.message-from .message-created{padding-left:6px;padding-right:10px}.message-content{color:#000;line-height:20px;margin-bottom:6px;margin-top:3px;position:relative}.message-content i{display:none}.message-content:hover i{display:block}.message-content:hover{padding-right:20px!important}.chat-box-content{max-height:500px}.attachment-list .attachment-item{-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;background:#f1f1f1;border:1px solid #ccc;border-radius:8px;box-shadow:1px 2px 3px rgba(0,0,0,.06);float:left;height:84px;margin:8px;overflow:hidden;position:relative;text-align:center;user-select:none;width:84px}.attachment-list .attachment-item img{height:100%;width:100%}.attachment-list .attachment-item span{left:0;padding:5px;position:absolute;top:25px;width:100%;word-break:break-all}.clearfix{clear:both}.dashboard .chat ul li img.message-img{float:none;height:120px;margin-left:0;width:auto}.message-attachment{cursor:pointer;font-size:1.5em;margin:0 5px 0 0;position:relative}.hidden{display:none}.message-input{width:100%}.message-input label{font-size:1.2rem}.remove-file-attachment{background:#495057;border-radius:50%;color:#fff;cursor:pointer;font-size:20px;position:absolute;right:5px;top:5px}.attachment-list{background:#fff;bottom:51px;box-shadow:0 -2px 3px -3px rgba(0,0,0,.21176470588235294);display:none;height:100px;left:-15px;position:absolute;width:calc(100% + 30px)}.attachment-list.attached-file{display:block}.dashboard{margin-bottom:-15px;margin-top:-5px}.dashboard .timeline>.ui-g .ui-g-9 .event-text{color:#555;white-space:nowrap}.dashboard .timeline>.ui-g .ui-g-9 .event-text.event-text2{line-height:18px;padding-left:30px;text-align:justify;white-space:pre-wrap}.dashboard .timeline>.ui-g .ui-g-9 .event-text.event-text2 i{left:20px;margin-top:3px;position:absolute}.new-message{align-items:center;justify-content:center}.dashboard .chat .new-message{border:0;display:flex;margin:0;padding:0;text-align:left}.dashboard .chat .new-message i{color:#495057}.dashboard .chat .new-message .message-attachment{border:0}.dashboard .chat .new-message .button-send{display:inline-block;line-height:40px;position:relative}.dashboard .chat .new-message .button-send .p-button-label{text-align:center}.dashboard .chat .new-message .message-emotion{display:inline-block;height:100%;line-height:40px;text-align:center;width:40px}.dashboard .chat .new-message .message-emotion i{font-size:24px;line-height:inherit}.dashboard .chat .new-message .message-input{width:calc(100% - 155px)}.dashboard .chat ul li.message-from,.dashboard .chat ul li.message-own{padding:0}.dashboard .chat ul li.message-from>span{background-color:#f0e3fd;border:0;border-radius:2px 20px 20px 2px}.dashboard .chat ul li.message-from>.first,.dashboard .chat ul li.message-from>.middle{margin-left:45px!important}.dashboard .chat ul li.message-from>.last{border-radius:2px 20px 20px 20px;margin-left:45px!important}.dashboard .chat ul li.message-from>img{border-radius:50%;margin-top:5px;position:absolute;width:36px}.dashboard .chat ul li.message-own>span{background-color:#def6f8;border:0;border-radius:20px 2px 2px 20px;text-align:right}.dashboard .chat ul li.message-own>span.sending{background-color:#eee}.dashboard .chat ul li.message-own>span.last{border-radius:20px 2px 20px 20px}.dashboard .chat ul li.message-own .attachment span.attachment-item{background-color:#f1f1f1!important;border:0!important;padding-left:0;padding-right:0}.dashboard .chat ul li.message-own .attachment span.attachment-item a{color:#555;cursor:pointer;display:inline-block;font-weight:700}.dashboard .chat ul li.message-own>div.file{background:#f1f1f1;border:1px solid #e4e4e4;border-radius:6px;display:inline-block;margin:1px;overflow:hidden;text-align:right}.dashboard .chat ul li.message-from .attachment span.attachment-item{background-color:#f1f1f1!important;border:0!important;padding-left:0;padding-right:0}.dashboard .chat ul li.message-from .attachment span.attachment-item a{color:#555;cursor:pointer;display:inline-block;font-weight:700}.dashboard .chat ul li.message-from .attachment span.attachment-item a img{margin-right:0}.dashboard .chat ul li.message-from>div.file{background:#f1f1f1;border:1px solid #e4e4e4;border-radius:6px;display:inline-block;margin:1px;overflow:hidden;text-align:left}.dashboard .chat ul li .attachment span.attachment-item a>i{padding-right:8px}.dashboard .chat ul li div.file p.attachment{display:inline-block;margin-bottom:5px}.dashboard .chat ul li.message-from{text-align:left}.dashboard .chat ul li.message-own{text-align:right}.dashboard .chat ul li>div.file.image{height:170px;max-width:100%;padding:15px;transition:width .15s linear;width:220px}.dashboard .chat ul li>div.file.image p.attachment{height:120px}.dashboard .chat ul li>div.file{padding:15px}.dashboard .chat ul li>div.file p,.dashboard .chat ul li>div.file span{display:inline-block;margin:0;padding:0}.visible{opacity:1;transition:opacity .15s linear;visibility:visible}.hidden{opacity:0;transition:visibility 0s .1s,opacity .1s linear;visibility:hidden}.visible2{opacity:1;transition:opacity .35s linear;visibility:visible}.hidden2{opacity:0;transition:visibility 0s .3s,opacity .3s linear;visibility:hidden}.dashboard .chat{position:relative}.dashboard .chat .scroll-to-bottom{bottom:6px;min-height:40px;padding-right:12px;position:-webkit-sticky;position:sticky;text-align:right}.dashboard .chat .scroll-to-bottom span{background:#495057;border:2px solid #fff;border-radius:50%;box-shadow:0 0 10px rgba(0,0,0,.34901960784313724);color:#fff;cursor:pointer;display:inline-block;font-size:20px;height:35px;line-height:35px;overflow:hidden;text-align:center;width:35px}.dashboard .chat .group-info{line-height:30px;margin:-10px;padding:5px 10px;top:0;z-index:99}.dashboard .chat .group-info,.dashboard .chat .pin{background:#fff;box-shadow:0 0 3px -1px rgba(0,0,0,.21176470588235294);position:-webkit-sticky;position:sticky}.dashboard .chat .pin{margin-bottom:10px;margin-left:-10px;top:40px;width:calc(100% + 20px);z-index:98}.dashboard .chat ul li.message-from.pin>span,.dashboard .chat ul li.message-own.pin>span{background-color:transparent}.dashboard .chat ul li.message-from.pin>span{margin-left:0}.dashboard .chat .message-content i{color:#495057;cursor:pointer;font-size:11px}.dashboard .chat .pin .message-content i{display:block}.dashboard .chat li.message-from .message-content{padding-left:6px}.dashboard .chat li.message-from .message-content i{padding:5px}.dashboard .chat li.message-own .message-content i{padding:5px;position:absolute;right:-15px}.dashboard .chat .group-info .circleButton{float:right;margin-bottom:0;margin-top:0}.dashboard .chat ul{margin-top:20px;padding:0}.dashboard .chat .new-message .message-input input.ui-inputtext:focus{box-shadow:none;outline:none}.dashboard .chat ul.hasPin{margin-top:10px}.dashboard .chat .group-info a{color:#495057}.normalHtml,.normalHtml b,.normalHtml strong{font-weight:400}.normalHtml{display:inline-block}.avatar-viewer .profile-image{border:1px solid #fff;border-radius:50%;height:40px;margin-top:-6px;width:40px}a.button>i{margin-right:5px}.dashboard .timeline{padding-top:20px}.ui-inputgroup .ui-inputtext{padding-right:0}.new-message .ui-inputtext{width:100%}.full-screen,.full-screen>.p-dialog{height:100%!important;left:0!important;max-height:100%;min-height:unset!important;min-width:100%!important;top:0!important;width:100%!important}#image-view-list.image-gallery-2{background-color:rgba(0,0,0,.4);height:calc(100vh - 41px);margin:-14px auto 0;touch-action:none;width:100%}#image-view-list.image-gallery-2 .image-container{background-color:transparent;border:0;bottom:0;height:85%;margin:auto}#image-view-list.image-gallery-2 .image-container .iv-snap-view{bottom:20px;left:calc(50% - 75px);top:auto}#image-view-list.image-gallery-2 .image-container .iv-image-view img{touch-action:auto}#image-view-list .inline-icon{margin-top:-41px}#image-view-list .footer-info,#image-view-list .material-icons.next,#image-view-list .material-icons.prev{display:none}#image-view-list .options-image-viewer{-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;margin-right:37px;user-select:none}.mobile-image-viewer-close{color:#fff;cursor:pointer;font-size:x-large;height:42px;line-height:42px;padding-right:7px;padding-top:2px;position:absolute;right:0;text-align:center;top:0;vertical-align:middle;width:37px}.mobile-image-viewer-close:hover{color:#feca37!important}.hide-holder{padding:0}.file-ex-name{word-break:break-all}.box-function{background:#fff;border-radius:0 0 5px 5px;border-top:1px solid #e8e8e8;bottom:0;left:0;padding:8px 30px;position:absolute;text-align:right;width:100%}.box-function button{margin-left:5px}.quick-note-button-holder{bottom:40px;display:none;height:50px;position:absolute;right:50px;width:50px;z-index:99}.quick-note-button{background:#ffc107;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 5px 0 #b9b9b9;color:#fff;display:block;font-size:2em;height:50px;line-height:50px;outline:none;text-align:center;width:50px}.quick-note-button:hover{color:#fff}.all-note-button{background:#ffd24b;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 5px 0 #b9b9b9;color:#fff;display:block;font-size:1.5em;height:40px;line-height:40px;outline:none;position:absolute;right:5px;text-align:center;top:5px;transition:right;transition-duration:.16s;transition-timing-function:ease-in;width:40px;z-index:-1}.all-note-button:hover{color:#fff}.setting-note-button{background:#ffd24b;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 5px 0 #b9b9b9;color:#fff;display:block;font-size:1.5em;height:40px;line-height:40px;outline:none;position:absolute;right:5px;text-align:center;top:5px;transition:right;transition-duration:.16s;transition-timing-function:ease-in;width:40px;z-index:-1}.setting-note-button:hover{color:#fff}.pinned-notes-holder{bottom:20px;display:none;left:20px;position:absolute;width:250px;z-index:98}.pinned-notes{background:transparent;display:block;outline:none;padding:0}.pinned-notes-header{font-size:1rem;font-weight:700}.pinned-notes-setting{position:absolute;right:.5rem}.pinned-note{background-color:#fff1ac;box-shadow:1px 2px 3px rgba(185,139,6,.6313725490196078);font-size:.8rem;margin-bottom:10px;padding:0;position:relative}.pinned-note:last-child{margin-bottom:0}.pinned-notes-minimize-button{background:#ffc003;border:1px solid #fff;border-radius:50%;box-shadow:1px 2px 3px rgba(185,139,6,.6313725490196078);color:#fff;cursor:pointer;height:25px;padding-top:5px;position:absolute;right:-15px;text-align:center;top:-15px;width:25px;z-index:1}.pinned-note-header-line{border:1px solid #fff;box-shadow:1px 1px 2px rgba(0,0,0,.4);height:calc(100% - 1rem);left:3px;margin-bottom:.5rem;margin-top:.5rem;max-height:20px;position:absolute;width:13px}.pinned-note-header-right{cursor:pointer;float:right;margin-left:3px;width:32px}.pinned-note-header-time{font-size:.6rem}.pinned-note-header-button-unpin{display:none;float:left;height:14px;margin-right:2px;opacity:.8;width:14px}.pinned-note-header-button-complete{display:none;padding-top:2px}.pinned-note-body{float:right;padding:.5rem .5rem .5rem 25px;width:100%}.pinned-note-body:hover{background-color:#feeb82}.pinned-note-body:hover .pinned-note-header-time{display:none}.pinned-note-body:hover .pinned-note-header-button-complete,.pinned-note-body:hover .pinned-note-header-button-unpin{display:block}.pinned-note-line-title{color:#333;display:block;font-weight:700;padding-bottom:6px}.pinned-note-line{display:block}.view-port{border-radius:5px;box-shadow:0 0 0 9999px rgba(0,0,0,.5882352941176471);display:none;height:0;width:0;z-index:999}.view-port,.view-port-mask{background:transparent;position:absolute}.view-port-mask{display:block;height:100%;left:0;top:0;width:100%;z-index:9998}.tinymce-control{border:1px solid #ccc;display:none;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:14px;width:100%}.input-tab-trap{filter:alpha(opacity=0)!important;opacity:0!important;overflow:hidden!important;width:0!important}.color-value input{font-size:.8em;line-height:16px}.dialog-material.mobile{width:100%!important}audio,audio:focus,video,video:focus{outline:none}.iv-image-view img.iv-image{-webkit-animation:fadein .5s;animation:fadein .5s;visibility:hidden!important}@-webkit-keyframes fadein{0%{opacity:0}to{opacity:1}}@keyframes fadein{0%{opacity:0}to{opacity:1}}.iv-image-view img.iv-image.show{visibility:visible!important}.row-line{padding-bottom:0;padding-top:0}.fc-ltr{padding-bottom:7px}.padding-bottom-5px{padding-bottom:5px}.no-margin{margin:0!important}.no-padding{padding:0}.no-padding-left{padding-left:0}.float-left{float:left}body .fc .fc-toolbar .fc-button{background-color:#007ad9;border:1px solid #007ad9;border-radius:3px;color:#fff;font-size:14px;transition:background-color .2s,box-shadow .2s}body .fc .fc-toolbar .fc-button:enabled:hover{background-color:#116fbf;border-color:#116fbf;color:#fff}body .fc .fc-toolbar .fc-button:focus{box-shadow:0 0 0 .2em #8dcdff;outline:0 none;outline-offset:0}body .fc .fc-toolbar .fc-button-group .fc-button{border-radius:0}body .fc .fc-toolbar .fc-button-group .fc-button:first-child{border-bottom-left-radius:3px;border-top-left-radius:3px}body .fc .fc-toolbar .fc-button-group .fc-button:last-child{border-bottom-right-radius:3px;border-top-right-radius:3px}body .fc .fc-toolbar .fc-right .fc-button{border-radius:0}body .fc .fc-toolbar .fc-right .fc-button:first-child{border-bottom-left-radius:3px;border-top-left-radius:3px}body .fc .fc-toolbar .fc-right .fc-button:last-child{border-bottom-right-radius:3px;border-top-right-radius:3px}.fc-toolbar>*>:not(:first-child){margin-left:0}.fc-axis,.fc-dayGridMonth-button,.fc-timeGridDay-button,.fc-timeGridWeek-button,.old-content{line-height:0;text-indent:-9999px}.fc-axis:after,.fc-dayGridMonth-button:after,.fc-timeGridDay-button:after,.fc-timeGridWeek-button:after,.new-content{display:block;line-height:normal;text-indent:0}.fc-dayGridMonth-button:after{content:\"Th\u00E1ng\";padding:.2em}.fc-timeGridWeek-button:after{content:\"Tu\u1EA7n\";padding:.2em}.fc-timeGridDay-button:after{content:\"Ng\u00E0y\";padding:.2em}body .fc th{background-color:#f4f4f4;border:1px solid #c8c8c8;color:#333;padding:.571em 1em}.ui-fluid .button-group button,.ui-fluid .button-group p-button{margin-right:.5em!important;text-align:left;width:auto}.layout-wrapper .layout-menu-container{z-index:97}.base-status,.base-status-aborted,.base-status-approved,.base-status-completed,.base-status-create-new,.base-status-ended,.base-status-high,.base-status-immediately,.base-status-low,.base-status-medium,.base-status-on-conducting,.base-status-on-going,.base-status-pending,.base-status-rejected,.base-status-returned,.base-status-urgent{border-radius:.25em;color:#fff;font-size:.8em;padding:3px;text-align:center}.base-status-create-new{background-color:#f2f2f2;color:#666}.base-status-on-conducting,.base-status-on-going{background-color:#337ab7}.base-status-pending{background-color:#ffba01}.base-status-approved{background-color:#34a835}.base-status-returned{background-color:#ffba01}.base-status-rejected{background-color:#d9534f}.base-status-completed{background-color:#34a835}.base-status-aborted{background-color:#ffba01}.base-status-ended{background-color:#34a835}.base-status-low,.base-status-medium{background-color:#f2f2f2;color:#666}.base-status-high{background-color:#ffba01}.base-status-immediately,.base-status-urgent{background-color:#d9534f}.text-align-center{text-align:center}.font-weight-bold{font-weight:700}.landing-body .landing-menu li a:hover{border-bottom:none}.landing-body .landing-menu li:first-child{margin-left:8px}.crud-form .label-control p{margin:0;padding:0}.crud-form .tn-check-box-list .p-row{display:block;padding:.5em;width:100%}.crud-form dropdown,.crud-form tn-mask{width:100%}.crud-form .tn-dropdown{min-height:32px}.crud-form .tn-dropdown.free-text.horizontal{display:flex}.crud-form .tn-dropdown.free-text.horizontal>div{flex-grow:1;padding-left:.5em;padding-right:.5em}.crud-form .tn-dropdown.free-text.horizontal>div:first-child{padding-left:0}.crud-form .tn-dropdown.free-text.horizontal>div:last-child{padding-right:0}.crud-form .tn-dropdown.free-text.vertical input.ui-inputtext.input-free-text{margin-top:.5em}.crud-form.assessment .label-control{font-weight:700}.crud-form.assessment .label-control.haveIndex{display:block;margin-bottom:5px;padding-left:20px;position:relative}.crud-form.assessment .label-control.haveIndex:before{content:\" \" attr(label-index) \".\";left:0;position:absolute;top:0}.crud-form.assessment .ViewMode{border-bottom:none}.crud-form.assessment .ViewMode .label-control{margin-bottom:0}body .ui-inputtext.min-width{padding:6px}.ps__rail-x,.ps__rail-y{z-index:2}.zIndex5 .ps__rail-x,.zIndex5 .ps__rail-y{z-index:5}.table-sticky table{border-collapse:separate;border-spacing:0}.table-sticky tr td,.table-sticky tr th{border:1px solid #eee!important;border-left:none!important;border-top:none!important}.table-sticky tr td:first-child,.table-sticky tr th:first-child{border-left:1px solid #eee!important}.table-sticky tr td:last-child,.table-sticky tr th:last-child{border-right:none!important}.table-sticky tr:first-child th{border-top:1px solid #eee!important}.table-sticky th{background:#eee}.table-sticky tbody td.disabled{background:#eee!important}.table-sticky tbody td.disabled:not(:last-child){border-right:1px solid #fff!important}.table-sticky.fix-height tr:first-child th{position:-webkit-sticky;position:sticky;top:0;z-index:2}.container-flex{align-items:center;display:flex}.container-flex>div:first-child{flex:0 0 auto;margin-right:.5em}.container-flex>div:last-child{flex-grow:1}.container-control{display:flex}.container-control>span.label{flex:0 0 auto;padding-right:.5em;padding-top:.5em}.container-control>span.label+*{flex-grow:1;flex-shrink:1;position:relative}.container-control>span.label+* .tn-dropdown,.container-control>span.label+* .ui-autocomplete-multiple,.container-control>span.label+* .ui-inputgroup .ui-inputtext{width:100%}.container-control>span.label+* .validation-container{margin-top:3px}.container-control>span.label+* .validation-container .validate-item{white-space:unset}.container-control>span.label+*>div{left:0;position:absolute;top:0;width:100%}.container-control.no-label>span.label{display:none}.container-control.inline{display:inline-flex}.align-flex-center{align-items:center;display:flex;justify-content:center}@media print{.isPrinting>*{display:none}.isPrinting app-print-layout{display:block}}.layout-wrapper .topbar .topbar-left,.layout-wrapper .topbar .topbar-right{background:#397ac3}#searchResultPanel-holder{padding:0 .5em}.cus-dropdown{line-height:normal;margin-right:1em}.tn-thumbnail{padding:.5rem}.tn-thumbnail.tn-thumbnail.tn-thumbnail{box-sizing:border-box}.fa-10:before{content:\"A+\";font-family:cursive;font-weight:700}.layout-wrapper .topbar .topbar-right #menu-button i{font-size:20px;margin-top:4px}.layout-wrapper .layout-menu li a i.menuitem-toggle-icon{font-size:15px;margin-left:auto}.flex-container-main-content{display:flex;flex-direction:column}.flex-container-main-content>div:last-child{background-color:#f4f4f4;display:flex;flex:1 1;overflow:hidden;position:relative}.flex-container-main-content>div:last-child>div{height:100%;left:0;overflow:hidden;padding-top:.5em;position:absolute;top:0;width:100%}.flex-container-main-content .block-with-button-search{display:flex;justify-content:flex-end}.flex-container-main-content .block-with-button-search>*{margin-left:.5em}.flex-container-main-content .block-with-button-search>input{height:26px;margin-left:0;max-width:200px;width:100%}.flex-container-main-content .block-with-button-search>dropdown{max-width:140px;width:100%}.flex-container-main-content .title-main-component{border-bottom:2px solid #1ca7ff}.clickable-table.clickable-table{cursor:pointer}.main-crud-container{height:calc(100vh - 76px)}.flex-container-fit-child{display:flex;flex-direction:column;height:100%;overflow:hidden}.flex-container-fit-child>div.fit-content{flex:1 1;position:relative}.flex-container-fit-child>div.fit-content>div{height:100%;overflow:auto;position:absolute;width:100%}.waiting-box{display:none;height:100%;left:0;position:fixed;top:0;width:100%;z-index:9999}.waiting-box .overlay{background-color:red;background-color:hsla(0,0%,42.7%,.5019607843137255);height:100%;width:100%}.waiting-box .content-loading{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.waiting-box.show{display:block}.function-topbar>*{vertical-align:top}.function-topbar button{width:auto}.function-topbar p-fileUpload{margin-right:1em}.function-topbar .container-control{display:inline-flex;line-height:normal}.function-topbar .container-control dropdown{width:100%}:focus{outline-color:#a6d5fa!important}address{font-style:normal}body .p-toast .p-toast-message{border-radius:0;border-width:0 0 0 4px!important}.__status span,.status span{font-size:.8rem}p-table.single-check .p-datatable .p-datatable-tbody>tr{cursor:pointer}p-table.single-check .p-datatable .p-datatable-tbody>tr.ui-state-highlight{background:#e3f2fd!important;outline:2px solid #a6d5fa}p-table.single-check .p-datatable .p-datatable-tbody>tr td.sticky .fix-sticky.top{display:none}p-table.multi-check .p-datatable .p-datatable-tbody>tr.ui-state-highlight{background:#e3f2fd!important}p-table.multi-check .p-datatable .p-datatable-tbody>tr.ui-state-highlight td{border-color:#fff}p-table.multi-check .p-datatable .p-datatable-tbody>tr.ui-state-highlight td .fix-sticky{background-color:#fff}.tn-animated-left-arrow-icon,.tn-animated-right-arrow-icon{height:32px;position:relative;width:14px;z-index:10}.tn-animated-right-arrow-icon{-webkit-animation:arrowBounceToRight .8s ease-in-out infinite alternate;animation:arrowBounceToRight .8s ease-in-out infinite alternate}.tn-animated-left-arrow-icon{-webkit-animation:arrowBounceToLeft .8s ease-in-out infinite alternate;animation:arrowBounceToLeft .8s ease-in-out infinite alternate}.tn-animated-left-arrow-icon:after,.tn-animated-left-arrow-icon:before,.tn-animated-right-arrow-icon:after,.tn-animated-right-arrow-icon:before{background-color:#88b0dd;content:\"\";display:block;height:20px;position:absolute;width:5px}.tn-animated-right-arrow-icon:before{left:4px;top:0;transform:rotate(-35deg)}.tn-animated-right-arrow-icon:after{left:4px;top:14px;transform:rotate(35deg)}.tn-animated-left-arrow-icon:before{right:4px;top:0;transform:rotate(35deg)}.tn-animated-left-arrow-icon:after{right:4px;top:14px;transform:rotate(-35deg)}@-webkit-keyframes arrowBounceToLeft{0%{transform:translateX(-3px)}to{transform:translateX(3px)}}@keyframes arrowBounceToLeft{0%{transform:translateX(-3px)}to{transform:translateX(3px)}}@-webkit-keyframes arrowBounceToRight{0%{transform:translateX(3px)}to{transform:translateX(-3px)}}@keyframes arrowBounceToRight{0%{transform:translateX(3px)}to{transform:translateX(-3px)}}.pass{color:#49c949}.not-pass,.pass{margin:5px;text-align:center}.not-pass{color:red}"]
27556
+ styles: ["", "@charset \"UTF-8\";@import url(D:\\git.dttt.vn\\5.1\\shared\\AppSharedV5\\node_modules\\@angular\\material\\prebuilt-themes\\indigo-pink.css);@import url(D:\\git.dttt.vn\\5.1\\shared\\AppSharedV5\\node_modules\\jsoneditor\\dist\\jsoneditor.min.css);.flex{display:flex}.flex .fit{flex:1 1}.flex.flex-column{flex-direction:column}.flex.flex-wrap{flex-wrap:wrap}.flex.center-v{align-items:center}.flex.center-all,.flex.center-h{justify-content:center}.flex.center-all{align-items:center}.validate-item{color:#e00000;display:inline-block;font-size:.9em;white-space:nowrap}.tn-scroll-bar.bgWhite>div,.validate-item{background-color:#fff}.label-primary{background-color:#1ab394;padding:2px}.label-danger,.label-primary{border-radius:.25em;color:#fff;display:inline-block;font-size:12px;margin-left:3px;margin-right:3px;min-width:60px}.label-danger{background-color:#ed5565;padding:2px 5px}.label-warning{background-color:#b8860b}.label-secondary,.label-warning{border-radius:.25em;color:#fff;display:inline-block;font-size:12px;margin-left:3px;margin-right:3px;min-width:60px;padding:2px}.label-secondary{background-color:#a9a9a9}.label-done{background-color:#3b1ef7;border-radius:.25em;color:#fff;display:inline-block;font-size:12px;margin-left:3px;margin-right:3px;min-width:60px;padding:2px}.text-navy{color:#1ab394!important}.text-danger{color:red!important}.fa-user-edit{font-size:14px}.flexcolumn{border:1px solid #eee;border-radius:5px;min-height:80px;overflow-x:hidden;overflow-y:hidden}.flexcolumn,.has2ScrollZone2 .flexcolumn{max-height:calc(100vh - 180px)}.headerNoBorder>th{border:none!important;border-bottom:1px solid #eee!important}.cellNoBorder table tr td{border:0!important}.layout-wrapper .layout-main{overflow:hidden;padding:60px 0 0}div.circleButton{border-radius:50%;display:inline-block;height:32px;line-height:32px;margin-bottom:4px;margin-top:4px;overflow:hidden;position:relative;text-align:center;transform:perspective(1px);width:32px}div.circleButton>a{line-height:32px;padding:0!important}div.circleButton>a>i{width:24px!important}div.circleButton:before{background:#e6e6e6;border-radius:50%;bottom:0;content:\"\";left:0;position:absolute;right:0;top:0;transform:scale(0);transition:all .3s cubic-bezier(.4,.34,.01,.97);z-index:-1}div.circleButton:hover:before{transform:scale(1)}.message-notice{background:#e0e0e0;text-align:center}.message-created-by{color:#888;font-size:.82em;font-weight:400;margin-bottom:3px;margin-left:45px;margin-top:5px}.message-created{color:#495057;display:inline-block;font-size:.82em;margin-bottom:0;margin-top:0}.message-own .message-created{padding-left:10px;padding-right:6px}.message-from .message-created{padding-left:6px;padding-right:10px}.message-content{color:#000;line-height:20px;margin-bottom:6px;margin-top:3px;position:relative}.message-content i{display:none}.message-content:hover i{display:block}.message-content:hover{padding-right:20px!important}.chat-box-content{max-height:500px}.attachment-list .attachment-item{-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;background:#f1f1f1;border:1px solid #ccc;border-radius:8px;box-shadow:1px 2px 3px rgba(0,0,0,.06);float:left;height:84px;margin:8px;overflow:hidden;position:relative;text-align:center;user-select:none;width:84px}.attachment-list .attachment-item img{height:100%;width:100%}.attachment-list .attachment-item span{left:0;padding:5px;position:absolute;top:25px;width:100%;word-break:break-all}.clearfix{clear:both}.dashboard .chat ul li img.message-img{float:none;height:120px;margin-left:0;width:auto}.message-attachment{cursor:pointer;font-size:1.5em;margin:0 5px 0 0;position:relative}.hidden{display:none}.message-input{width:100%}.message-input label{font-size:1.2rem}.remove-file-attachment{background:#495057;border-radius:50%;color:#fff;cursor:pointer;font-size:20px;position:absolute;right:5px;top:5px}.attachment-list{background:#fff;bottom:51px;box-shadow:0 -2px 3px -3px rgba(0,0,0,.21176470588235294);display:none;height:100px;left:-15px;position:absolute;width:calc(100% + 30px)}.attachment-list.attached-file{display:block}.dashboard{margin-bottom:-15px;margin-top:-5px}.dashboard .timeline>.ui-g .ui-g-9 .event-text{color:#555;white-space:nowrap}.dashboard .timeline>.ui-g .ui-g-9 .event-text.event-text2{line-height:18px;padding-left:30px;text-align:justify;white-space:pre-wrap}.dashboard .timeline>.ui-g .ui-g-9 .event-text.event-text2 i{left:20px;margin-top:3px;position:absolute}.new-message{align-items:center;justify-content:center}.dashboard .chat .new-message{border:0;display:flex;margin:0;padding:0;text-align:left}.dashboard .chat .new-message i{color:#495057}.dashboard .chat .new-message .message-attachment{border:0}.dashboard .chat .new-message .button-send{display:inline-block;line-height:40px;position:relative}.dashboard .chat .new-message .button-send .p-button-label{text-align:center}.dashboard .chat .new-message .message-emotion{display:inline-block;height:100%;line-height:40px;text-align:center;width:40px}.dashboard .chat .new-message .message-emotion i{font-size:24px;line-height:inherit}.dashboard .chat .new-message .message-input{width:calc(100% - 155px)}.dashboard .chat ul li.message-from,.dashboard .chat ul li.message-own{padding:0}.dashboard .chat ul li.message-from>span{background-color:#f0e3fd;border:0;border-radius:2px 20px 20px 2px}.dashboard .chat ul li.message-from>.first,.dashboard .chat ul li.message-from>.middle{margin-left:45px!important}.dashboard .chat ul li.message-from>.last{border-radius:2px 20px 20px 20px;margin-left:45px!important}.dashboard .chat ul li.message-from>img{border-radius:50%;margin-top:5px;position:absolute;width:36px}.dashboard .chat ul li.message-own>span{background-color:#def6f8;border:0;border-radius:20px 2px 2px 20px;text-align:right}.dashboard .chat ul li.message-own>span.sending{background-color:#eee}.dashboard .chat ul li.message-own>span.last{border-radius:20px 2px 20px 20px}.dashboard .chat ul li.message-own .attachment span.attachment-item{background-color:#f1f1f1!important;border:0!important;padding-left:0;padding-right:0}.dashboard .chat ul li.message-own .attachment span.attachment-item a{color:#555;cursor:pointer;display:inline-block;font-weight:700}.dashboard .chat ul li.message-own>div.file{background:#f1f1f1;border:1px solid #e4e4e4;border-radius:6px;display:inline-block;margin:1px;overflow:hidden;text-align:right}.dashboard .chat ul li.message-from .attachment span.attachment-item{background-color:#f1f1f1!important;border:0!important;padding-left:0;padding-right:0}.dashboard .chat ul li.message-from .attachment span.attachment-item a{color:#555;cursor:pointer;display:inline-block;font-weight:700}.dashboard .chat ul li.message-from .attachment span.attachment-item a img{margin-right:0}.dashboard .chat ul li.message-from>div.file{background:#f1f1f1;border:1px solid #e4e4e4;border-radius:6px;display:inline-block;margin:1px;overflow:hidden;text-align:left}.dashboard .chat ul li .attachment span.attachment-item a>i{padding-right:8px}.dashboard .chat ul li div.file p.attachment{display:inline-block;margin-bottom:5px}.dashboard .chat ul li.message-from{text-align:left}.dashboard .chat ul li.message-own{text-align:right}.dashboard .chat ul li>div.file.image{height:170px;max-width:100%;padding:15px;transition:width .15s linear;width:220px}.dashboard .chat ul li>div.file.image p.attachment{height:120px}.dashboard .chat ul li>div.file{padding:15px}.dashboard .chat ul li>div.file p,.dashboard .chat ul li>div.file span{display:inline-block;margin:0;padding:0}.visible{opacity:1;transition:opacity .15s linear;visibility:visible}.hidden{opacity:0;transition:visibility 0s .1s,opacity .1s linear;visibility:hidden}.visible2{opacity:1;transition:opacity .35s linear;visibility:visible}.hidden2{opacity:0;transition:visibility 0s .3s,opacity .3s linear;visibility:hidden}.dashboard .chat{position:relative}.dashboard .chat .scroll-to-bottom{bottom:6px;min-height:40px;padding-right:12px;position:-webkit-sticky;position:sticky;text-align:right}.dashboard .chat .scroll-to-bottom span{background:#495057;border:2px solid #fff;border-radius:50%;box-shadow:0 0 10px rgba(0,0,0,.34901960784313724);color:#fff;cursor:pointer;display:inline-block;font-size:20px;height:35px;line-height:35px;overflow:hidden;text-align:center;width:35px}.dashboard .chat .group-info{line-height:30px;margin:-10px;padding:5px 10px;top:0;z-index:99}.dashboard .chat .group-info,.dashboard .chat .pin{background:#fff;box-shadow:0 0 3px -1px rgba(0,0,0,.21176470588235294);position:-webkit-sticky;position:sticky}.dashboard .chat .pin{margin-bottom:10px;margin-left:-10px;top:40px;width:calc(100% + 20px);z-index:98}.dashboard .chat ul li.message-from.pin>span,.dashboard .chat ul li.message-own.pin>span{background-color:transparent}.dashboard .chat ul li.message-from.pin>span{margin-left:0}.dashboard .chat .message-content i{color:#495057;cursor:pointer;font-size:11px}.dashboard .chat .pin .message-content i{display:block}.dashboard .chat li.message-from .message-content{padding-left:6px}.dashboard .chat li.message-from .message-content i{padding:5px}.dashboard .chat li.message-own .message-content i{padding:5px;position:absolute;right:-15px}.dashboard .chat .group-info .circleButton{float:right;margin-bottom:0;margin-top:0}.dashboard .chat ul{margin-top:20px;padding:0}.dashboard .chat .new-message .message-input input.ui-inputtext:focus{box-shadow:none;outline:none}.dashboard .chat ul.hasPin{margin-top:10px}.dashboard .chat .group-info a{color:#495057}.normalHtml,.normalHtml b,.normalHtml strong{font-weight:400}.normalHtml{display:inline-block}.avatar-viewer .profile-image{border:1px solid #fff;border-radius:50%;height:40px;margin-top:-6px;width:40px}a.button>i{margin-right:5px}.dashboard .timeline{padding-top:20px}.ui-inputgroup .ui-inputtext{padding-right:0}.new-message .ui-inputtext{width:100%}.full-screen,.full-screen>.p-dialog{height:100%!important;left:0!important;max-height:100%;min-height:unset!important;min-width:100%!important;top:0!important;width:100%!important}#image-view-list.image-gallery-2{background-color:rgba(0,0,0,.4);height:calc(100vh - 41px);margin:-14px auto 0;touch-action:none;width:100%}#image-view-list.image-gallery-2 .image-container{background-color:transparent;border:0;bottom:0;height:85%;margin:auto}#image-view-list.image-gallery-2 .image-container .iv-snap-view{bottom:20px;left:calc(50% - 75px);top:auto}#image-view-list.image-gallery-2 .image-container .iv-image-view img{touch-action:auto}#image-view-list .inline-icon{margin-top:-41px}#image-view-list .footer-info,#image-view-list .material-icons.next,#image-view-list .material-icons.prev{display:none}#image-view-list .options-image-viewer{-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;margin-right:37px;user-select:none}.mobile-image-viewer-close{color:#fff;cursor:pointer;font-size:x-large;height:42px;line-height:42px;padding-right:7px;padding-top:2px;position:absolute;right:0;text-align:center;top:0;vertical-align:middle;width:37px}.mobile-image-viewer-close:hover{color:#feca37!important}.hide-holder{padding:0}.file-ex-name{word-break:break-all}.box-function{background:#fff;border-radius:0 0 5px 5px;border-top:1px solid #e8e8e8;bottom:0;left:0;padding:8px 30px;position:absolute;text-align:right;width:100%}.box-function button{margin-left:5px}.quick-note-button-holder{bottom:40px;display:none;height:50px;position:absolute;right:50px;width:50px;z-index:99}.quick-note-button{background:#ffc107;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 5px 0 #b9b9b9;color:#fff;display:block;font-size:2em;height:50px;line-height:50px;outline:none;text-align:center;width:50px}.quick-note-button:hover{color:#fff}.all-note-button{background:#ffd24b;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 5px 0 #b9b9b9;color:#fff;display:block;font-size:1.5em;height:40px;line-height:40px;outline:none;position:absolute;right:5px;text-align:center;top:5px;transition:right;transition-duration:.16s;transition-timing-function:ease-in;width:40px;z-index:-1}.all-note-button:hover{color:#fff}.setting-note-button{background:#ffd24b;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 5px 0 #b9b9b9;color:#fff;display:block;font-size:1.5em;height:40px;line-height:40px;outline:none;position:absolute;right:5px;text-align:center;top:5px;transition:right;transition-duration:.16s;transition-timing-function:ease-in;width:40px;z-index:-1}.setting-note-button:hover{color:#fff}.pinned-notes-holder{bottom:20px;display:none;left:20px;position:absolute;width:250px;z-index:98}.pinned-notes{background:transparent;display:block;outline:none;padding:0}.pinned-notes-header{font-size:1rem;font-weight:700}.pinned-notes-setting{position:absolute;right:.5rem}.pinned-note{background-color:#fff1ac;box-shadow:1px 2px 3px rgba(185,139,6,.6313725490196078);font-size:.8rem;margin-bottom:10px;padding:0;position:relative}.pinned-note:last-child{margin-bottom:0}.pinned-notes-minimize-button{background:#ffc003;border:1px solid #fff;border-radius:50%;box-shadow:1px 2px 3px rgba(185,139,6,.6313725490196078);color:#fff;cursor:pointer;height:25px;padding-top:5px;position:absolute;right:-15px;text-align:center;top:-15px;width:25px;z-index:1}.pinned-note-header-line{border:1px solid #fff;box-shadow:1px 1px 2px rgba(0,0,0,.4);height:calc(100% - 1rem);left:3px;margin-bottom:.5rem;margin-top:.5rem;max-height:20px;position:absolute;width:13px}.pinned-note-header-right{cursor:pointer;float:right;margin-left:3px;width:32px}.pinned-note-header-time{font-size:.6rem}.pinned-note-header-button-unpin{display:none;float:left;height:14px;margin-right:2px;opacity:.8;width:14px}.pinned-note-header-button-complete{display:none;padding-top:2px}.pinned-note-body{float:right;padding:.5rem .5rem .5rem 25px;width:100%}.pinned-note-body:hover{background-color:#feeb82}.pinned-note-body:hover .pinned-note-header-time{display:none}.pinned-note-body:hover .pinned-note-header-button-complete,.pinned-note-body:hover .pinned-note-header-button-unpin{display:block}.pinned-note-line-title{color:#333;display:block;font-weight:700;padding-bottom:6px}.pinned-note-line{display:block}.view-port{border-radius:5px;box-shadow:0 0 0 9999px rgba(0,0,0,.5882352941176471);display:none;height:0;width:0;z-index:999}.view-port,.view-port-mask{background:transparent;position:absolute}.view-port-mask{display:block;height:100%;left:0;top:0;width:100%;z-index:9998}.tinymce-control{border:1px solid #ccc;display:none;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:14px;width:100%}.input-tab-trap{filter:alpha(opacity=0)!important;opacity:0!important;overflow:hidden!important;width:0!important}.color-value input{font-size:.8em;line-height:16px}.dialog-material.mobile{width:100%!important}audio,audio:focus,video,video:focus{outline:none}.iv-image-view img.iv-image{-webkit-animation:fadein .5s;animation:fadein .5s;visibility:hidden!important}@-webkit-keyframes fadein{0%{opacity:0}to{opacity:1}}@keyframes fadein{0%{opacity:0}to{opacity:1}}.iv-image-view img.iv-image.show{visibility:visible!important}.row-line{padding-bottom:0;padding-top:0}.fc-ltr{padding-bottom:7px}.padding-bottom-5px{padding-bottom:5px}.no-margin{margin:0!important}.no-padding{padding:0}.no-padding-left{padding-left:0}.float-left{float:left}body .fc .fc-toolbar .fc-button{background-color:#007ad9;border:1px solid #007ad9;border-radius:3px;color:#fff;font-size:14px;transition:background-color .2s,box-shadow .2s}body .fc .fc-toolbar .fc-button:enabled:hover{background-color:#116fbf;border-color:#116fbf;color:#fff}body .fc .fc-toolbar .fc-button:focus{box-shadow:0 0 0 .2em #8dcdff;outline:0 none;outline-offset:0}body .fc .fc-toolbar .fc-button-group .fc-button{border-radius:0}body .fc .fc-toolbar .fc-button-group .fc-button:first-child{border-bottom-left-radius:3px;border-top-left-radius:3px}body .fc .fc-toolbar .fc-button-group .fc-button:last-child{border-bottom-right-radius:3px;border-top-right-radius:3px}body .fc .fc-toolbar .fc-right .fc-button{border-radius:0}body .fc .fc-toolbar .fc-right .fc-button:first-child{border-bottom-left-radius:3px;border-top-left-radius:3px}body .fc .fc-toolbar .fc-right .fc-button:last-child{border-bottom-right-radius:3px;border-top-right-radius:3px}.fc-toolbar>*>:not(:first-child){margin-left:0}.fc-axis,.fc-dayGridMonth-button,.fc-timeGridDay-button,.fc-timeGridWeek-button,.old-content{line-height:0;text-indent:-9999px}.fc-axis:after,.fc-dayGridMonth-button:after,.fc-timeGridDay-button:after,.fc-timeGridWeek-button:after,.new-content{display:block;line-height:normal;text-indent:0}.fc-dayGridMonth-button:after{content:\"Th\u00E1ng\";padding:.2em}.fc-timeGridWeek-button:after{content:\"Tu\u1EA7n\";padding:.2em}.fc-timeGridDay-button:after{content:\"Ng\u00E0y\";padding:.2em}body .fc th{background-color:#f4f4f4;border:1px solid #c8c8c8;color:#333;padding:.571em 1em}.ui-fluid .button-group button,.ui-fluid .button-group p-button{margin-right:.5em!important;text-align:left;width:auto}.layout-wrapper .layout-menu-container{z-index:97}.base-status,.base-status-aborted,.base-status-approved,.base-status-completed,.base-status-create-new,.base-status-ended,.base-status-high,.base-status-immediately,.base-status-low,.base-status-medium,.base-status-on-conducting,.base-status-on-going,.base-status-pending,.base-status-rejected,.base-status-returned,.base-status-urgent{border-radius:.25em;color:#fff;font-size:.8em;padding:3px;text-align:center}.base-status-create-new{background-color:#f2f2f2;color:#666}.base-status-on-conducting,.base-status-on-going{background-color:#337ab7}.base-status-pending{background-color:#ffba01}.base-status-approved{background-color:#34a835}.base-status-returned{background-color:#ffba01}.base-status-rejected{background-color:#d9534f}.base-status-completed{background-color:#34a835}.base-status-aborted{background-color:#ffba01}.base-status-ended{background-color:#34a835}.base-status-low,.base-status-medium{background-color:#f2f2f2;color:#666}.base-status-high{background-color:#ffba01}.base-status-immediately,.base-status-urgent{background-color:#d9534f}.text-align-center{text-align:center}.font-weight-bold{font-weight:700}.landing-body .landing-menu li a:hover{border-bottom:none}.landing-body .landing-menu li:first-child{margin-left:8px}.crud-form .label-control p{margin:0;padding:0}.crud-form .tn-check-box-list .p-row{display:block;padding:.5em;width:100%}.crud-form dropdown,.crud-form tn-mask{width:100%}.crud-form .tn-dropdown{min-height:32px}.crud-form .tn-dropdown.free-text.horizontal{display:flex}.crud-form .tn-dropdown.free-text.horizontal>div{flex-grow:1;padding-left:.5em;padding-right:.5em}.crud-form .tn-dropdown.free-text.horizontal>div:first-child{padding-left:0}.crud-form .tn-dropdown.free-text.horizontal>div:last-child{padding-right:0}.crud-form .tn-dropdown.free-text.vertical input.ui-inputtext.input-free-text{margin-top:.5em}.crud-form.assessment .label-control{font-weight:700}.crud-form.assessment .label-control.haveIndex{display:block;margin-bottom:5px;padding-left:20px;position:relative}.crud-form.assessment .label-control.haveIndex:before{content:\" \" attr(label-index) \".\";left:0;position:absolute;top:0}.crud-form.assessment .ViewMode{border-bottom:none}.crud-form.assessment .ViewMode .label-control{margin-bottom:0}body .ui-inputtext.min-width{padding:6px}.ps__rail-x,.ps__rail-y{z-index:2}.zIndex5 .ps__rail-x,.zIndex5 .ps__rail-y{z-index:5}.table-sticky table{border-collapse:separate;border-spacing:0}.table-sticky tr td,.table-sticky tr th{border:1px solid #eee!important;border-left:none!important;border-top:none!important}.table-sticky tr td:first-child,.table-sticky tr th:first-child{border-left:1px solid #eee!important}.table-sticky tr td:last-child,.table-sticky tr th:last-child{border-right:none!important}.table-sticky tr:first-child th{border-top:1px solid #eee!important}.table-sticky th{background:#eee}.table-sticky tbody td.disabled{background:#eee!important}.table-sticky tbody td.disabled:not(:last-child){border-right:1px solid #fff!important}.table-sticky.fix-height tr:first-child th{position:-webkit-sticky;position:sticky;top:0;z-index:2}.container-flex{align-items:center;display:flex}.container-flex>div:first-child{flex:0 0 auto;margin-right:.5em}.container-flex>div:last-child{flex-grow:1}.container-control{display:flex}.container-control>span.label{flex:0 0 auto;padding-right:.5em;padding-top:.5em}.container-control>span.label+*{flex-grow:1;flex-shrink:1;position:relative}.container-control>span.label+* .tn-dropdown,.container-control>span.label+* .ui-autocomplete-multiple,.container-control>span.label+* .ui-inputgroup .ui-inputtext{width:100%}.container-control>span.label+* .validation-container{margin-top:3px}.container-control>span.label+* .validation-container .validate-item{white-space:unset}.container-control>span.label+*>div{left:0;position:absolute;top:0;width:100%}.container-control.no-label>span.label{display:none}.container-control.inline{display:inline-flex}.align-flex-center{align-items:center;display:flex;justify-content:center}@media print{.isPrinting>*{display:none}.isPrinting app-print-layout{display:block}}.layout-wrapper .topbar .topbar-left,.layout-wrapper .topbar .topbar-right{background:#397ac3}#searchResultPanel-holder{padding:0 .5em}.cus-dropdown{line-height:normal;margin-right:1em}.tn-thumbnail{padding:.5rem}.tn-thumbnail.tn-thumbnail.tn-thumbnail{box-sizing:border-box}.fa-10:before{content:\"A+\";font-family:cursive;font-weight:700}.layout-wrapper .topbar .topbar-right #menu-button i{font-size:20px;margin-top:4px}.layout-wrapper .layout-menu li a i.menuitem-toggle-icon{font-size:15px;margin-left:auto}.flex-container-main-content{display:flex;flex-direction:column}.flex-container-main-content>div:last-child{background-color:#f4f4f4;display:flex;flex:1 1;overflow:hidden;position:relative}.flex-container-main-content>div:last-child>div{height:100%;left:0;overflow:hidden;padding-top:.5em;position:absolute;top:0;width:100%}.flex-container-main-content .block-with-button-search{display:flex;justify-content:flex-end}.flex-container-main-content .block-with-button-search>*{margin-left:.5em}.flex-container-main-content .block-with-button-search>input{height:26px;margin-left:0;max-width:200px;width:100%}.flex-container-main-content .block-with-button-search>dropdown{max-width:140px;width:100%}.flex-container-main-content .title-main-component{border-bottom:2px solid #1ca7ff}.clickable-table.clickable-table{cursor:pointer}.main-crud-container{height:calc(100vh - 76px)}.flex-container-fit-child{display:flex;flex-direction:column;height:100%;overflow:hidden}.flex-container-fit-child>div.fit-content{flex:1 1;position:relative}.flex-container-fit-child>div.fit-content>div{height:100%;overflow:auto;position:absolute;width:100%}.waiting-box{display:none;height:100%;left:0;position:fixed;top:0;width:100%;z-index:9999}.waiting-box .overlay{background-color:red;background-color:hsla(0,0%,42.7%,.5019607843137255);height:100%;width:100%}.waiting-box .content-loading{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.waiting-box.show{display:block}.function-topbar>*{vertical-align:top}.function-topbar button{width:auto}.function-topbar p-fileUpload{margin-right:1em}.function-topbar .container-control{display:inline-flex;line-height:normal}.function-topbar .container-control dropdown{width:100%}:focus{outline-color:#a6d5fa!important}address{font-style:normal}body .p-toast .p-toast-message{border-radius:0;border-width:0 0 0 4px!important}.__status span,.status span{font-size:.8rem}p-table.single-check .p-datatable .p-datatable-tbody>tr{cursor:pointer}p-table.single-check .p-datatable .p-datatable-tbody>tr.ui-state-highlight{background:#e3f2fd!important;outline:2px solid #a6d5fa}p-table.single-check .p-datatable .p-datatable-tbody>tr td.sticky .fix-sticky.top{display:none}p-table.multi-check .p-datatable .p-datatable-tbody>tr.ui-state-highlight{background:#e3f2fd!important}p-table.multi-check .p-datatable .p-datatable-tbody>tr.ui-state-highlight td{border-color:#fff}p-table.multi-check .p-datatable .p-datatable-tbody>tr.ui-state-highlight td .fix-sticky{background-color:#fff}.tn-animated-left-arrow-icon,.tn-animated-right-arrow-icon{height:32px;position:relative;width:14px;z-index:10}.tn-animated-right-arrow-icon{-webkit-animation:arrowBounceToRight .8s ease-in-out infinite alternate;animation:arrowBounceToRight .8s ease-in-out infinite alternate}.tn-animated-left-arrow-icon{-webkit-animation:arrowBounceToLeft .8s ease-in-out infinite alternate;animation:arrowBounceToLeft .8s ease-in-out infinite alternate}.tn-animated-left-arrow-icon:after,.tn-animated-left-arrow-icon:before,.tn-animated-right-arrow-icon:after,.tn-animated-right-arrow-icon:before{background-color:#88b0dd;content:\"\";display:block;height:20px;position:absolute;width:5px}.tn-animated-right-arrow-icon:before{left:4px;top:0;transform:rotate(-35deg)}.tn-animated-right-arrow-icon:after{left:4px;top:14px;transform:rotate(35deg)}.tn-animated-left-arrow-icon:before{right:4px;top:0;transform:rotate(35deg)}.tn-animated-left-arrow-icon:after{right:4px;top:14px;transform:rotate(-35deg)}@-webkit-keyframes arrowBounceToLeft{0%{transform:translateX(-3px)}to{transform:translateX(3px)}}@keyframes arrowBounceToLeft{0%{transform:translateX(-3px)}to{transform:translateX(3px)}}@-webkit-keyframes arrowBounceToRight{0%{transform:translateX(3px)}to{transform:translateX(-3px)}}@keyframes arrowBounceToRight{0%{transform:translateX(3px)}to{transform:translateX(-3px)}}.pass{color:#49c949}.not-pass,.pass{margin:5px;text-align:center}.not-pass{color:red}"]
27554
27557
  },] }
27555
27558
  ];
27556
27559
  ChatSendMessageBoxComponent.ctorParameters = function () { return [
@@ -28595,6 +28598,432 @@
28595
28598
  notify: [{ type: i0.ViewChild, args: ['notify', { static: true },] }]
28596
28599
  };
28597
28600
 
28601
+ var AppTopBarV2Component = /** @class */ (function (_super) {
28602
+ __extends(AppTopBarV2Component, _super);
28603
+ function AppTopBarV2Component(
28604
+ // public app: AppComponent,
28605
+ _customRouteService, _router, _commonService, _authenService, _cd, _injector, _permissionService, _moduleConfigService, _userService, _notifierService, _translateService) {
28606
+ var _this = _super.call(this, _injector) || this;
28607
+ _this._customRouteService = _customRouteService;
28608
+ _this._router = _router;
28609
+ _this._commonService = _commonService;
28610
+ _this._authenService = _authenService;
28611
+ _this._cd = _cd;
28612
+ _this._permissionService = _permissionService;
28613
+ _this._moduleConfigService = _moduleConfigService;
28614
+ _this._userService = _userService;
28615
+ _this._notifierService = _notifierService;
28616
+ _this._translateService = _translateService;
28617
+ _this.defaultAvatar = '';
28618
+ _this.key = '';
28619
+ _this.currentRoute = '';
28620
+ _this.fileApi = '';
28621
+ _this.currentUser = null;
28622
+ _this.appSwitcherItems = [];
28623
+ _this.isFirstTime = false;
28624
+ _this.showSettings = false;
28625
+ _this.allSubscriptions = [];
28626
+ _this.message = '';
28627
+ _this.environment = _this._moduleConfigService.getConfig().environment;
28628
+ _this.defaultAvatar = _this.environment.appMetadata.main.defaultMaleAvatar;
28629
+ _this.fileApi = _this.environment.apiDomain.fileEndpoint;
28630
+ if (_this.rootContext.data.currentAppMetadata && _this.rootContext.data.currentAppMetadata.showDefaultSetting != null && _this.rootContext.data.currentAppMetadata.showDefaultSetting != undefined) {
28631
+ _this.showDefaultSetting = _this.rootContext.data.currentAppMetadata.showDefaultSetting;
28632
+ }
28633
+ else {
28634
+ if (_this.environment.appMetadata.main.showDefaultSetting != null && _this.environment.appMetadata.main.showDefaultSetting != undefined) {
28635
+ _this.showDefaultSetting = _this.environment.appMetadata.main.showDefaultSetting;
28636
+ }
28637
+ else {
28638
+ _this.showDefaultSetting = false;
28639
+ }
28640
+ }
28641
+ if (!_this.rootContext.data.currentUser) {
28642
+ _this.rootContext.data.currentUser = {};
28643
+ }
28644
+ // this.allSubscriptions.push(this.rootContext.subscribe(ComCtxConstants.ROOT.USER_INFO_CHANGED, rs => {
28645
+ // this._cd.detectChanges();
28646
+ // }));
28647
+ _this.rootContext.replaySubscribeOnce(ComCtxConstants.ROOT.USER_LOADED, function (rs) {
28648
+ _this.currentUser = _this._userService.getCurrentUser();
28649
+ _this.loadMenuMetadata();
28650
+ });
28651
+ if (_this.rootModel.allowAnonymous) {
28652
+ _this.loadMenuMetadata();
28653
+ }
28654
+ return _this;
28655
+ }
28656
+ AppTopBarV2Component.prototype.loadMenuMetadata = function () {
28657
+ var _this = this;
28658
+ var prmsAppSwicherItem = new Promise(function (resolve, reject) { return __awaiter(_this, void 0, void 0, function () {
28659
+ var arr, _a, _b, _i, ind, element, clientId, isAuthorized;
28660
+ return __generator(this, function (_c) {
28661
+ switch (_c.label) {
28662
+ case 0:
28663
+ arr = [];
28664
+ _a = [];
28665
+ for (_b in this.environment.appMetadata.appSwitcher)
28666
+ _a.push(_b);
28667
+ _i = 0;
28668
+ _c.label = 1;
28669
+ case 1:
28670
+ if (!(_i < _a.length)) return [3 /*break*/, 5];
28671
+ ind = _a[_i];
28672
+ element = this.environment.appMetadata.appSwitcher[ind];
28673
+ clientId = this.environment.authenticationSettings.clientId;
28674
+ if (!(this.rootContext.data.allowAnonymous && element.allowAnonymous)) return [3 /*break*/, 2];
28675
+ arr.push(element);
28676
+ return [3 /*break*/, 4];
28677
+ case 2:
28678
+ if (!this.currentUser) return [3 /*break*/, 4];
28679
+ return [4 /*yield*/, this._permissionService.isAuthorized(element.code, (element.code + ".MODULE." + element.code).toUpperCase(), true)];
28680
+ case 3:
28681
+ isAuthorized = _c.sent();
28682
+ if (isAuthorized) {
28683
+ arr.push(element);
28684
+ }
28685
+ _c.label = 4;
28686
+ case 4:
28687
+ _i++;
28688
+ return [3 /*break*/, 1];
28689
+ case 5:
28690
+ resolve(arr);
28691
+ return [2 /*return*/];
28692
+ }
28693
+ });
28694
+ }); });
28695
+ prmsAppSwicherItem.then(function (rs) {
28696
+ if (rs) {
28697
+ var currentUser_1 = _this._userService.getCurrentUser();
28698
+ _this.appSwitcherItems.length = 0;
28699
+ rs.forEach(function (element) {
28700
+ if (element.visible) {
28701
+ if (element.allowAnonymous) {
28702
+ _this.appSwitcherItems.push(element);
28703
+ }
28704
+ else {
28705
+ if (currentUser_1.maNguoiHoc && currentUser_1.issuperuser && currentUser_1.issuperuser.toLowerCase() != 'true') {
28706
+ if (element.code.toLowerCase() == 'sv' || element.code.toLowerCase() == 'user') {
28707
+ _this.appSwitcherItems.push(element);
28708
+ }
28709
+ }
28710
+ else {
28711
+ _this.appSwitcherItems.push(element);
28712
+ }
28713
+ }
28714
+ }
28715
+ });
28716
+ }
28717
+ });
28718
+ };
28719
+ AppTopBarV2Component.prototype.ngOnInit = function () {
28720
+ var _this = this;
28721
+ if (this.rootContext.data.currentUser) {
28722
+ if (this.rootContext.data.currentUser.gender == 0) {
28723
+ this.defaultAvatar = this.environment.appMetadata.main.defaultFemaleAvatar;
28724
+ }
28725
+ else {
28726
+ this.defaultAvatar = this.environment.appMetadata.main.defaultMaleAvatar;
28727
+ }
28728
+ this.userProfile = this._userService.getProfileInfo();
28729
+ }
28730
+ this.rootContext.subscribe(ComCtxConstants.ROOT.BODY_MOUSE_DOWN, function (e) {
28731
+ setTimeout(function () {
28732
+ _this.hideAdvanceSearch(e);
28733
+ });
28734
+ });
28735
+ this.rootContext.subscribe(ComCtxConstants.ROOT.KEY_DOWN_CTRL_F, function (e) {
28736
+ _this.focusToSearchBox();
28737
+ });
28738
+ this.rootContext.subscribe(ComCtxConstants.COMMON.FORCE_RELOAD, function (e) {
28739
+ _this.showNotificationReload();
28740
+ });
28741
+ this.rootContext.subscribe(ComCtxConstants.COMMON.SHOW_NOTIFY, function (e) {
28742
+ _this.setNotify(e.message);
28743
+ });
28744
+ this.allSubscriptions.push(this.rootContext.subscribe(ComCtxConstants.ROOT_USMART.SHOW_CONFIG_DATA_DEFAULT, function (e) {
28745
+ _this.model.dataModelSetting.showSettings = true;
28746
+ }));
28747
+ this.model.dataModelSetting = {
28748
+ data: {},
28749
+ showSettings: false
28750
+ };
28751
+ this.subscribe(ComCtxConstants.COMMON.SAVE_DATA_DEFAULT, function (data) {
28752
+ _this.formatDefaultDataSetting(data);
28753
+ _this.reloadWindow();
28754
+ });
28755
+ var stringDataDefault = localStorage.getItem(ComCtxConstants.LOCALSTORAGE_KEY.DEFAULT_DATA);
28756
+ if (stringDataDefault) {
28757
+ var dataCacheDefault = JSON.parse(stringDataDefault);
28758
+ this.formatDefaultDataSetting(dataCacheDefault);
28759
+ }
28760
+ else {
28761
+ this.defaultDataSetting = 'Thiết lập tham số mặc định';
28762
+ }
28763
+ };
28764
+ AppTopBarV2Component.prototype.ngOnDestroy = function () {
28765
+ this.allSubscriptions.forEach(function (element) {
28766
+ element.unsubscribe();
28767
+ });
28768
+ if (this.intervalCountdown) {
28769
+ clearInterval(this.intervalCountdown);
28770
+ }
28771
+ _super.prototype.ngOnDestroy.call(this);
28772
+ };
28773
+ AppTopBarV2Component.prototype.formatDefaultDataSetting = function (data) {
28774
+ var _this = this;
28775
+ var dataSetting = '';
28776
+ var fields = ['instanceIdHeDaoTao', 'heDaoTao', 'namHoc', 'hocKy', 'instanceIdNamHoc', 'instanceIdHocKy', 'idDotThi'];
28777
+ var fieldPluses = ['code', 'code', 'ten', 'ten', 'ten', 'ten', 'ten'];
28778
+ fields.forEach(function (field, index) {
28779
+ if (!_this.checkHidden(field)) {
28780
+ var _f = "" + field + fieldPluses[index];
28781
+ if (data[_f]) {
28782
+ dataSetting += data[_f] + '/';
28783
+ }
28784
+ }
28785
+ });
28786
+ if (dataSetting.length > 0) {
28787
+ dataSetting = dataSetting.substring(0, dataSetting.length - 1);
28788
+ }
28789
+ this.defaultDataSetting = dataSetting;
28790
+ };
28791
+ AppTopBarV2Component.prototype.checkHidden = function (field) {
28792
+ return this.rootModel.currentAppMetadata.configDefaultSetting && !this.rootModel.currentAppMetadata.configDefaultSetting.column.some(function (p) { return p.field == field; });
28793
+ };
28794
+ AppTopBarV2Component.prototype.getCurrentUserFullName = function () {
28795
+ return this.rootContext.data.currentUser && this.rootContext.data.currentUser.fullName ? this.rootContext.data.currentUser.fullName : 'Khách';
28796
+ };
28797
+ AppTopBarV2Component.prototype.getCurrentUserPosition = function () {
28798
+ return this.userProfile ? this.userProfile.tenDonVi : null;
28799
+ };
28800
+ AppTopBarV2Component.prototype.getCurrentUserAvatar = function () {
28801
+ if (this.rootContext.data.currentUser && this.rootContext.data.currentUser.avatar) {
28802
+ return this.fileApi + "/file/public/" + this.rootContext.data.currentUser.avatar + "/Download";
28803
+ }
28804
+ else {
28805
+ return this.defaultAvatar;
28806
+ }
28807
+ };
28808
+ AppTopBarV2Component.prototype.clearFilter = function (input) {
28809
+ var _this = this;
28810
+ setTimeout(function () {
28811
+ _this.model.searchModel[_this.model.fieldKey] = '';
28812
+ _this._customRouteService.updateFragment(_this.model.fieldKey, null);
28813
+ _this._customRouteService.updateWithoutFireEvent();
28814
+ _this.rootContext.fireEvent(ComCtxConstants.ROOT.ON_SEARCH, _this.model.searchModel);
28815
+ input.value = '';
28816
+ input.focus();
28817
+ _this._cd.detectChanges();
28818
+ });
28819
+ };
28820
+ AppTopBarV2Component.prototype.toggleAdvanceSearch = function (evt) {
28821
+ this.rootContext.fireEvent(ComCtxConstants.ROOT.ADVANCE_SEARCH_TOGGLE_BOX, { event: evt });
28822
+ evt.preventDefault();
28823
+ evt.cancelBubble = true;
28824
+ };
28825
+ AppTopBarV2Component.prototype.hideAdvanceSearch = function (evt) {
28826
+ if (document.getElementById('advance-search-box')) {
28827
+ var mask = document.body.querySelectorAll('div[class~="ui-dialog-mask"]');
28828
+ if (!mask.length) {
28829
+ var closestDropdown = evt.target.closest('.dropdown-advs');
28830
+ if (closestDropdown == null || closestDropdown.length == 0) {
28831
+ this.rootContext.fireEvent(ComCtxConstants.ROOT.ADVANCE_SEARCH_HIDE_BOX, { event: evt });
28832
+ }
28833
+ }
28834
+ }
28835
+ };
28836
+ AppTopBarV2Component.prototype.focusToSearchBox = function () {
28837
+ if (!document.body.querySelector('div[class~="ui-dialog-mask"]')) {
28838
+ this.input.nativeElement.focus();
28839
+ }
28840
+ };
28841
+ AppTopBarV2Component.prototype.onTopbarSearchClick = function (event, input) {
28842
+ var _this = this;
28843
+ if (!this.model.fieldKey) {
28844
+ return;
28845
+ }
28846
+ setTimeout(function () {
28847
+ _this.rootContext.fireEvent(ComCtxConstants.ROOT.ON_SEARCH, _this.model.searchModel);
28848
+ _this._customRouteService.updateFragment(_this.model.fieldKey, input.value);
28849
+ _this._customRouteService.updateWithoutFireEvent();
28850
+ input.focus();
28851
+ });
28852
+ };
28853
+ AppTopBarV2Component.prototype.onEsc = function (event, input) {
28854
+ this.clearFilter(input);
28855
+ };
28856
+ AppTopBarV2Component.prototype.onEnter = function (event, input) {
28857
+ this.onTopbarSearchClick(event, input);
28858
+ };
28859
+ AppTopBarV2Component.prototype.switchApp = function (item, openNewTab) {
28860
+ if (openNewTab === void 0) { openNewTab = false; }
28861
+ if (item.target == '_blank') {
28862
+ if (!item.defaultRedirect) {
28863
+ item.defaultRedirect = '';
28864
+ }
28865
+ // NamNH tip trick cho mot so may bi loi item.url = 'main' -> redirect sai khi click vao cac phan he
28866
+ if (item.url == item.defaultRedirect) {
28867
+ item.url = '/' + item.code.toLowerCase();
28868
+ }
28869
+ if (!openNewTab) {
28870
+ top.location.href = item.url + "/" + item.defaultRedirect;
28871
+ }
28872
+ else {
28873
+ window.open(item.url + "/" + item.defaultRedirect, '_blank');
28874
+ }
28875
+ }
28876
+ else {
28877
+ if (item.defaultRedirect != '' && !this.rootContext.data.flags.menuTopOpenning) {
28878
+ this._router.navigateByUrl(item.defaultRedirect);
28879
+ this.rootContext.data.currentAppMetadata = this.environment.appMetadata.appSwitcher.find(function (x) { return x.code == item.code; });
28880
+ if (this.rootContext.data.currentAppMetadata
28881
+ && this.rootContext.data.currentAppMetadata.showDefaultSetting != undefined
28882
+ && this.rootContext.data.currentAppMetadata.showDefaultSetting != null) {
28883
+ this.showDefaultSetting = this.rootContext.data.currentAppMetadata.showDefaultSetting && this.showDefaultSetting;
28884
+ }
28885
+ }
28886
+ }
28887
+ };
28888
+ AppTopBarV2Component.prototype.hasAdvanceSearchBox = function () {
28889
+ return this.model.searchModel.hasAdvanceSearch;
28890
+ };
28891
+ AppTopBarV2Component.prototype.isAdvanceSearching = function () {
28892
+ return this.hasAdvanceSearchValue(this.model.searchModel);
28893
+ };
28894
+ AppTopBarV2Component.prototype.hasAdvanceSearchValue = function (obj) {
28895
+ for (var key in obj) {
28896
+ if (key === '_k' || key === 'hasAdvanceSearch') {
28897
+ continue;
28898
+ }
28899
+ if (obj[key] != null && obj[key] != '') {
28900
+ return false;
28901
+ }
28902
+ }
28903
+ return true;
28904
+ };
28905
+ AppTopBarV2Component.prototype.getComponentId = function () {
28906
+ return 'TOPBAR';
28907
+ };
28908
+ AppTopBarV2Component.prototype.goToHome = function () {
28909
+ this.rootContext.fireEvent('GO_HOME');
28910
+ };
28911
+ AppTopBarV2Component.prototype.onEditInfo = function (event) {
28912
+ event.preventDefault();
28913
+ var currentAppSetting = this.environment.appMetadata.appSwitcher.find(function (x) { return x.code == 'USER'; });
28914
+ if (currentAppSetting) {
28915
+ this.switchApp(currentAppSetting);
28916
+ }
28917
+ else {
28918
+ console.error('Bạn chưa thiết lập metadata cho trang cá nhân');
28919
+ }
28920
+ };
28921
+ AppTopBarV2Component.prototype.onChangePassword = function (event) {
28922
+ event.preventDefault();
28923
+ // this.changePassword.showPopup(this._userService.getId());
28924
+ };
28925
+ AppTopBarV2Component.prototype.onTopbarLogout = function () {
28926
+ if (!localStorage.getItem('currentUrl')) {
28927
+ localStorage.setItem('currentUrl', top.location.href);
28928
+ }
28929
+ this._authenService.logout();
28930
+ };
28931
+ AppTopBarV2Component.prototype.settingDefault = function () {
28932
+ this.model.dataModelSetting = {
28933
+ data: {},
28934
+ showSettings: true
28935
+ };
28936
+ };
28937
+ AppTopBarV2Component.prototype.onShowSettings = function (ev) {
28938
+ this.rootContext.fireEvent(ComCtxConstants.ROOT_USMART.CONFIG_DATA_DEFAULT_OPENED);
28939
+ };
28940
+ AppTopBarV2Component.prototype.onCloseSettings = function (ev) {
28941
+ this.rootContext.fireEvent(ComCtxConstants.ROOT_USMART.CONFIG_DATA_DEFAULT_CLOSED);
28942
+ };
28943
+ AppTopBarV2Component.prototype.showProfilePage = function () {
28944
+ if (this._userService.isSinhVienAccount()) {
28945
+ return false;
28946
+ }
28947
+ return true;
28948
+ };
28949
+ AppTopBarV2Component.prototype.login = function () {
28950
+ this.rootContext.fireEvent('LOGIN');
28951
+ };
28952
+ AppTopBarV2Component.prototype.setNotify = function (message) {
28953
+ this.message = message;
28954
+ };
28955
+ AppTopBarV2Component.prototype.handleMouseOver = function (evt) {
28956
+ evt.target.stop();
28957
+ };
28958
+ AppTopBarV2Component.prototype.handleMouseOut = function (evt) {
28959
+ evt.target.start();
28960
+ };
28961
+ AppTopBarV2Component.prototype.showNotificationReload = function () {
28962
+ var _this = this;
28963
+ this.message = 'Hệ thống có phiên bản mới, hãy refresh trình duyệt để cập nhật';
28964
+ this.rootContext.fireEvent(ComCtxConstants.ROOT.SHOW_REJECT_CONFIRM, false);
28965
+ this._notifierService.showConfirm(this.message).then(function (res) {
28966
+ _this.reloadWindow();
28967
+ });
28968
+ // if (this.intervalCountdown) {
28969
+ // clearInterval(this.intervalCountdown);
28970
+ // }
28971
+ // const date = new Date();
28972
+ // const goalDate = (new Date(date.getTime() + 10 * 1000)).getTime(); // Đếm 10s
28973
+ // this.intervalCountdown = setInterval(f => {
28974
+ // const now = new Date().getTime();
28975
+ // const distance = goalDate - now;
28976
+ // var seconds = Math.floor(distance / 1000);
28977
+ // // If the count down is finished, write some text
28978
+ // if (distance < 0) {
28979
+ // clearInterval(this.intervalCountdown);
28980
+ // this.reloadWindow();
28981
+ // return;
28982
+ // }
28983
+ // let message = `Trình duyệt sẽ khởi động lại sau ${seconds}s`;
28984
+ // if (seconds < 1) {
28985
+ // message = 'Trình duyệt sẽ khởi động lại ngay bây giờ';
28986
+ // }
28987
+ // this._notifierService.showConfirm(
28988
+ // message, null, null, false, this._translateService.instant('CONFIRM.ACCEPT_LABEL'),
28989
+ // 'pi pi-check'
28990
+ // ).then(res => {
28991
+ // clearInterval(this.intervalCountdown);
28992
+ // this.reloadWindow();
28993
+ // });
28994
+ // }, 1000);
28995
+ };
28996
+ AppTopBarV2Component.prototype.reloadWindow = function () {
28997
+ top.location.reload();
28998
+ };
28999
+ return AppTopBarV2Component;
29000
+ }(ComponentBase));
29001
+ AppTopBarV2Component.decorators = [
29002
+ { type: i0.Component, args: [{
29003
+ selector: 'app-topbar-v2',
29004
+ template: "<div class=\"topbar clearfix tn-l-top-bar\">\r\n <div class=\"topbar-left tn-l-top-bar-left\" [ngClass]=\"{'beta-version': !environment.isProduction }\">\r\n <div class=\"tn-l-left-menu-toggle-block\">\r\n <a tabindex=\"1\" id=\"menu-button\" class=\"tn-l-left-menu-toggle\" href=\"#\"\r\n (click)=\"_commonService.onMenuButtonClick($event)\">\r\n <i class=\"pi pi-chevron-left\"></i>\r\n </a>\r\n </div>\r\n\r\n <div class=\"topbar-logo tn-l-logo-wrapper\">\r\n <a tabindex=\"2\" href=\"javascript:\" style=\"display: inline-block;\">\r\n <img class=\"topbar-logo tn-l-logo\" [src]=\"environment.appMetadata.main.logo\" (click)=\"goToHome()\" /></a>\r\n </div>\r\n <div class=\"topbar-title tn-l-logo-title-block\">\r\n <div class=\"topbar-owner\">\r\n {{environment.appMetadata.main.owner}}\r\n </div>\r\n <div class=\"topbar-description\">\r\n {{environment.appMetadata.main.title}}\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"setting-default-container\">\r\n <ng-container *ngIf=\"showDefaultSetting && currentUser\">\r\n <a tabindex=\"3\" href=\"javascript:void(0)\" class=\"tn-l-m-default-setting pi pi-cog\"\r\n (click)=\"settingDefault()\">\r\n </a>\r\n <h3 class=\"tn-l-default-detting\" (click)=\"settingDefault()\">\r\n {{defaultDataSetting}} <i class=\"pi pi-pencil\" style=\"margin-left:10px\"></i></h3>\r\n </ng-container>\r\n </div>\r\n <div #notify class=\"notify-message\">\r\n <marquee (mouseover)=\"handleMouseOver($event)\" (mouseout)=\"handleMouseOut($event)\">{{message}}</marquee>\r\n </div>\r\n <div class=\"topbar-right tn-l-top-bar-right\" [ngClass]=\"{'beta-version': !environment.isProduction}\"\r\n oncontextmenu=\"return false\">\r\n <div class=\"tn-l-top-bar-right-block-1\">\r\n <a tabindex=\"4\" class=\"topbar-menu-button\" id=\"topbar-menu-button\" href=\"#\"\r\n (click)=\"_commonService.onTopbarMenuButtonClick($event)\">\r\n <svg focusable=\"false\" class=\"tn-m-topbar-menu-toggle\" role=\"img\" xmlns=\"http://www.w3.org/2000/svg\"\r\n viewBox=\"0 0 448 512\">\r\n <path fill=\"currentColor\"\r\n d=\"M0 224h192V32H0v192zm256-192v192h192V32H256zM0 480h192V288H0v192zm256-192v192h192V288H256z\">\r\n </path>\r\n </svg>\r\n <span *ngIf=\"messages.totalUnRead > 0\" class=\"topbar-badge animated rubberBand\"\r\n [ngClass]=\"{'topbar-badge-bounce': messages.bounceNoti}\">{{messages.totalUnRead}}</span>\r\n </a>\r\n </div>\r\n\r\n <div class=\"tn-l-top-bar-right-block-2\">\r\n <ul class=\"topbar-items fadeInDown\" [ngClass]=\"{'topbar-items-visible': _commonService.topbarMenuActive}\">\r\n <li #profile class=\"profile-item tn-l-top-bar-menu-item\"\r\n *ngIf=\"_commonService.profileMode==='top'||_commonService.isHorizontal()\"\r\n [ngClass]=\"{'active-top-menu':_commonService.activeTopbarItem === profile}\">\r\n\r\n <a href=\"#\" tabindex=\"10\" class=\"UserPane tn-l-top-bar-menu-item-inner\"\r\n (click)=\"_commonService.onTopbarItemClick($event,profile)\">\r\n <div class=\"profile-image-wrapper topbar-icon-left\">\r\n <img class=\"profile-image tn-l-profile-img\" [src-fallback]=\"defaultAvatar\"\r\n [src]=\"getCurrentUserAvatar()\" />\r\n </div>\r\n <div class=\"profile-info-wrapper\">\r\n <div class=\"topbar-item-name-wrapper\"\r\n [ngClass]=\"{'not-show-position': !getCurrentUserPosition()}\">\r\n <span class=\"topbar-item-name tn-l-user-name\">{{getCurrentUserFullName()}}</span>\r\n </div>\r\n <div class=\"topbar-item-role-wrapper tn-l-topbar-item-role-wrapper\"><span\r\n class=\"topbar-item-role\">{{getCurrentUserPosition()}}</span></div>\r\n </div>\r\n <i class=\"pi pi-user\" style=\"opacity: 0; position: absolute;\"></i>\r\n </a>\r\n\r\n <ul class=\"layout-menu fadeInDown tn-l-switcher\">\r\n <li *ngIf=\"currentUser\" role=\"menuitem\">\r\n <a href=\"javascript:;\" (click)=\"onTopbarLogout()\">\r\n <i class=\"pi pi-sign-out\"></i>\r\n <span>\u0110\u0103ng xu\u1EA5t</span>\r\n </a>\r\n </li>\r\n <li *ngIf=\"!currentUser\" role=\"menuitem\">\r\n <a href=\"javascript:;\" (click)=\"login()\">\r\n <i class=\"pi pi-sign-in\"></i>\r\n <span>\u0110\u0103ng nh\u1EADp</span>\r\n </a>\r\n </li>\r\n </ul>\r\n </li>\r\n <li #help class=\"menu-help tn-l-top-bar-menu-item\" tn-app-help></li>\r\n <li id=\"li-notifications\" class=\"tn-l-top-bar-menu-item\" #messages\r\n [ngClass]=\"{'active-top-menu':_commonService.activeTopbarItem === messages || _commonService.activeTopbarItem === 0}\"\r\n tn-app-notification (openMenu)=\"_commonService.onTopbarItemClick($event,messages)\"></li>\r\n <li id=\"li-app-switcher\" class=\"tn-l-top-bar-menu-item\" #modules\r\n [ngClass]=\"{'active-top-menu':_commonService.activeTopbarItem === modules || _commonService.activeTopbarItem === 1}\">\r\n <a href=\"#\" tabindex=\"7\" class=\"tn-l-top-bar-menu-item-inner\" style=\"height: 30px;\"\r\n pTooltip=\"Danh s\u00E1ch ph\u00E2n h\u1EC7\" tooltipPosition=\"bottom\"\r\n (click)=\"_commonService.onTopbarItemClick($event,modules)\">\r\n <span class=\"topbar-icon-left tn-l-topbar-icon-left\">\r\n <svg focusable=\"false\" class=\"topbar-icon animated swing svgmodule\" role=\"img\"\r\n xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 448 512\">\r\n <path fill=\"currentColor\"\r\n d=\"M0 224h192V32H0v192zm256-192v192h192V32H256zM0 480h192V288H0v192zm256-192v192h192V288H256z\">\r\n </path>\r\n </svg>\r\n <!-- <i class=\"pi pi-microsoft\"></i> -->\r\n </span>\r\n <span class=\"topbar-item-name\">{{ 'Danh s\u00E1ch ph\u00E2n h\u1EC7' | translate}}</span>\r\n </a>\r\n <ul class=\"app-switcher layout-menu fadeInDown\">\r\n <tn-custom-scrollbar #scrollbar class=\"app-switcher-holder\">\r\n <li role=\"menuitem\" class=\"wrapper-appswitch\">\r\n <ng-container *ngFor=\"let item of appSwitcherItems; let ind = index;\">\r\n <a class=\"switcher-item tn-l-switcher-item\" href=\"javascript:\"\r\n (click)=\"switchApp(item, true)\">\r\n <span class=\"tn-l-switcher-item-inner\">\r\n <i class=\"{{item.icon}} app-switcher-item-icon tn-l-switcher-item-icon\"></i>\r\n <div class=\"tn-l-switcher-item-label\">\r\n {{ item.title | translate}}\r\n </div>\r\n </span>\r\n </a>\r\n </ng-container>\r\n </li>\r\n </tn-custom-scrollbar>\r\n </ul>\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n</div>",
29005
+ providers: [ComponentContextService],
29006
+ styles: [".topBarSearchButton:disabled{background-color:#eee!important;border:1px solid #c8c8c8!important;border-right:none!important;color:#c1c1c1!important;opacity:1}::ng-deep app-topbar a{outline:none}input:disabled::-moz-placeholder{color:#b1b1b1}input:disabled:-ms-input-placeholder{color:#b1b1b1}input:disabled::placeholder{color:#b1b1b1}.UserPane.UserPane{display:flex}.profile-image-wrapper{order:1}.tn-l-user-name.tn-l-user-name.tn-l-user-name.tn-l-user-name.tn-l-user-name{float:none;margin-top:0}.profile-info-wrapper.profile-info-wrapper.profile-info-wrapper.profile-info-wrapper{display:inline-flex;flex-direction:column;float:none;justify-content:center;order:0;text-align:right}.tn-l-logo{image-rendering:-webkit-optimize-contrast;image-rendering:crisp-edges}.tn-l-default-detting{color:#fff;cursor:pointer;margin:0}.tn-l-left-menu-toggle-block{-ms-grid-row-align:stretch;align-items:center;align-self:stretch;box-shadow:0 0 5px 0 rgba(0,0,0,.3764705882352941);display:flex}.tn-l-left-menu-toggle{color:#fff;padding:8px;transition:transform .25s ease-in-out}::ng-deep .layout-menu-static-inactive app-topbar .tn-l-left-menu-toggle{transform:rotate(180deg)}.tn-l-logo-title-block.tn-l-logo-title-block.tn-l-logo-title-block.tn-l-logo-title-block{margin-left:0;margin-right:30px}.topbar-logo.topbar-logo.topbar-logo{float:none}.tn-l-logo.tn-l-logo.tn-l-logo.tn-l-logo{height:40px;margin:0;width:auto}.tn-l-logo-wrapper.tn-l-logo-wrapper.tn-l-logo-wrapper.tn-l-logo-wrapper{font-size:0;height:auto;margin:0;padding-left:8px;padding-right:8px;width:auto}.tn-l-top-bar{display:flex}.topbar-description,.topbar-owner{white-space:nowrap}.topbar-owner.topbar-owner.topbar-owner.topbar-owner.topbar-owner{font-size:15px}.topbar-description.topbar-description.topbar-description.topbar-description.topbar-description{font-size:11px;text-transform:none}.tn-l-top-bar-left.tn-l-top-bar-left.tn-l-top-bar-left{display:flex;float:none;width:auto}.tn-l-top-bar-left{align-items:center}.tn-m-topbar-menu-toggle{display:block;height:28px;margin:auto;width:30px}.tn-m-topbar-menu-toggle g{stroke:#fff}.tn-m-topbar-menu-toggle path{fill:#fff}.tn-l-m-default-setting{display:none}.setting-default-container{justify-content:center}.notify-message,.setting-default-container{align-items:center;display:flex;margin-left:30px}.notify-message{flex:1 1;overflow:hidden}.notify-message>marquee{color:#ff0;font-size:500;white-space:nowrap}.search-item{margin-right:10px}.tn-l-switcher-item.tn-l-switcher-item.tn-l-switcher-item{background:#fff}.tn-l-switcher-item-label{color:#52abff;text-align:center;text-shadow:none}.tn-l-switcher-item-icon.tn-l-switcher-item-icon.tn-l-switcher-item-icon.tn-l-switcher-item-icon{color:#52abff;font-size:38px;margin:5px auto;text-shadow:none}.tn-l-switcher-item.tn-l-switcher-item.tn-l-switcher-item.tn-l-switcher-item.tn-l-switcher-item{padding:8px}.tn-l-switcher.tn-l-switcher{margin-bottom:0}::ng-deep .layout-wrapper app-topbar-v2 .layout-menu li a.switcher-item{margin-top:0;width:unset}::ng-deep .layout-wrapper app-topbar-v2 .layout-menu li a.switcher-item:nth-child(3n+0){border-left:none}::ng-deep .layout-wrapper app-topbar-v2 .layout-menu li a.switcher-item:nth-child(3n+1){border-right:none}::ng-deep .layout-wrapper app-topbar-v2 .layout-menu li a.switcher-item:nth-child(3n+2){border:none}::ng-deep .layout-wrapper app-topbar-v2 .layout-menu li a.switcher-item:nth-child(3n+1):last-child,::ng-deep .layout-wrapper app-topbar-v2 .layout-menu li a.switcher-item:nth-child(3n+2):last-child{width:unset}::ng-deep .layout-wrapper app-topbar-v2 .layout-menu li a span{line-height:1.2}::ng-deep .layout-wrapper app-topbar-v2 .topbar .topbar-left{box-shadow:none}::ng-deep .layout-wrapper app-topbar-v2 .wrapper-appswitch{display:-ms-grid;display:grid;grid-template-columns:repeat(auto-fill,minmax(100px,1fr));text-align:center}@media (max-width:1024px){::ng-deep .layout-wrapper app-topbar-v2 .layout-menu li a.switcher-item{width:unset}}@media (min-width:1025px){.tn-l-top-bar-right{align-items:center;display:flex;justify-content:space-between}.tn-l-top-bar-right.tn-l-top-bar-right.tn-l-top-bar-right{padding:0 15px}.topbar-items.topbar-items.topbar-items{align-items:center;display:flex;flex-direction:row-reverse;justify-content:flex-start;margin:0}.topbar-items.topbar-items.topbar-items,.topbar-items.topbar-items.topbar-items>li{float:none}::ng-deep .topbar .topbar-items>li>a{margin-top:0}::ng-deep .topbar .topbar-items>li>a>span>i{color:#fff;font-size:24px}.topbar .topbar-items>li>a.UserPane{height:auto;line-height:inherit;top:0}a.UserPane .profile-image.profile-image.profile-image.profile-image{margin-top:0}}@media (min-width:1025px) and (max-width:1400px){.tn-l-logo-title-block.tn-l-logo-title-block.tn-l-logo-title-block.tn-l-logo-title-block{margin-right:19px}.search-item{margin-right:0}.tn-l-top-bar-right.tn-l-top-bar-right.tn-l-top-bar-right{padding-left:15px}.topbar-items>li.profile-item{margin-left:14px}}@media (max-width:1024px){.tn-l-m-default-setting{align-items:center;color:#fff;display:flex;font-size:28px;height:36px;justify-content:center;width:36px}.tn-l-default-detting{display:none}::ng-deep .layout-menu-static-mobile-inactive app-topbar .tn-l-left-menu-toggle{transform:rotate(180deg)}.profile-info-wrapper.profile-info-wrapper.profile-info-wrapper.profile-info-wrapper{text-align:left}.topbar .topbar-right #topbar-menu-button{align-items:center;display:flex;justify-content:center;width:36px}.tn-l-top-bar-right-block-1{display:flex}.tn-l-logo-wrapper.tn-l-logo-wrapper.tn-l-logo-wrapper.tn-l-logo-wrapper{padding-left:5px;padding-right:5px}.tn-l-logo-title-block,.tn-l-top-bar-left,.topbar-description,.topbar-owner{overflow:hidden}.topbar-description,.topbar-owner{text-overflow:ellipsis}.tn-l-top-bar-menu-item:empty{display:none}.tn-l-top-bar-left.tn-l-top-bar-left.tn-l-top-bar-left{padding-left:0;padding-right:0}.topbar-title.topbar-title.topbar-title.topbar-title{margin:0}.topbar-owner.topbar-owner.topbar-owner.topbar-owner.topbar-owner{font-size:14px}.topbar-description.topbar-description.topbar-description.topbar-description.topbar-description{font-size:10px}.tn-l-top-bar-right{flex:1;position:relative}.topbar-menu-button span.topbar-badge{right:-4px}.tn-l-top-bar-right.tn-l-top-bar-right.tn-l-top-bar-right{align-items:center;display:flex;justify-content:flex-end;padding:0 .5em}.tn-l-top-bar-right.tn-l-top-bar-right.tn-l-top-bar-right #topbar-menu-button{margin-left:.5em;position:relative;right:0;top:0}.app-switcher.layout-menu.layout-menu.layout-menu.layout-menu{width:270px}.profile-image-wrapper{order:0}.tn-l-user-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:220px}::ng-deep app-topbar .tn-l-top-bar-menu-item .topbar-icon-left{align-items:center;display:flex;justify-content:center}.tn-l-topbar-item-role-wrapper{display:none}}"]
29007
+ },] }
29008
+ ];
29009
+ AppTopBarV2Component.ctorParameters = function () { return [
29010
+ { type: CustomRouterService },
29011
+ { type: i3.Router },
29012
+ { type: CommonService },
29013
+ { type: AuthenService },
29014
+ { type: i0.ChangeDetectorRef },
29015
+ { type: i0.Injector },
29016
+ { type: PermissionService },
29017
+ { type: ModuleConfigService },
29018
+ { type: UserService },
29019
+ { type: NotifierService },
29020
+ { type: i2.TranslateService }
29021
+ ]; };
29022
+ AppTopBarV2Component.propDecorators = {
29023
+ input: [{ type: i0.ViewChild, args: ['input',] }],
29024
+ notify: [{ type: i0.ViewChild, args: ['notify', { static: true },] }]
29025
+ };
29026
+
28598
29027
  var MenuService = /** @class */ (function () {
28599
29028
  function MenuService(_moduleConfigService, _permissionService, _commonService, _applicationContext) {
28600
29029
  this._moduleConfigService = _moduleConfigService;
@@ -32292,6 +32721,46 @@
32292
32721
  onReady: [{ type: i0.Output }]
32293
32722
  };
32294
32723
 
32724
+ var TableDetailFormComponent = /** @class */ (function (_super) {
32725
+ __extends(TableDetailFormComponent, _super);
32726
+ function TableDetailFormComponent(injector) {
32727
+ var _this = _super.call(this, injector) || this;
32728
+ _this.schema = [];
32729
+ _this.data = {};
32730
+ _this.onSaved = new i0.EventEmitter();
32731
+ return _this;
32732
+ }
32733
+ TableDetailFormComponent.prototype.ngOnInit = function () {
32734
+ _super.prototype.ngOnInit.call(this);
32735
+ this.autoSave = false;
32736
+ this.model.data = this.data;
32737
+ this.setting.baseService = this.parentSetting.baseService;
32738
+ this.setting.schema = this.schema;
32739
+ };
32740
+ TableDetailFormComponent.prototype.handleManualSave = function () {
32741
+ this.onSaved.emit(this.model.data);
32742
+ };
32743
+ return TableDetailFormComponent;
32744
+ }(DataFormBase));
32745
+ TableDetailFormComponent.decorators = [
32746
+ { type: i0.Component, args: [{
32747
+ selector: 'table-detail-form',
32748
+ template: "<crud-form #crudForm [(data)]=\"model.data\" [setting]=\"setting\" [context]=\"context\" [disableCaching]=\"true\"\r\n (onFormReady)=\"_handleFormReady($event)\">\r\n</crud-form>\r\n<ng-template #buttonTemplate>\r\n <button type=\"button\" pButton icon=\"pi pi-save\" class=\"p-button-text\" [label]=\"'FORM.SAVE' | translate\"\r\n (click)=\"_handleSave($event)\"></button>\r\n <button type=\"button\" pButton icon=\"pi pi-replay\" class=\"p-button-text p-button-secondary\"\r\n [label]=\"'FORM.CANCEL' | translate\" preventTab (click)=\"_handleCancel($event)\"></button>\r\n</ng-template>",
32749
+ providers: [
32750
+ ComponentContextService
32751
+ ],
32752
+ styles: [".tn-check-box-list.p-grid{margin-bottom:-.5em}.btn-clear{background:#337ab7;border:none;border-radius:3px;color:#fff;cursor:pointer;height:30px;margin:1px .5em 0;padding:0 10px}.p-col-horizontal{padding:.5em}::ng-deep .tn-check-box-list{position:relative}::ng-deep .tn-check-box-list.flex-end{justify-content:flex-end}::ng-deep .tn-check-box-list.flex-center{justify-content:center}::ng-deep .tn-check-box-list label{cursor:pointer}"]
32753
+ },] }
32754
+ ];
32755
+ TableDetailFormComponent.ctorParameters = function () { return [
32756
+ { type: i0.Injector }
32757
+ ]; };
32758
+ TableDetailFormComponent.propDecorators = {
32759
+ schema: [{ type: i0.Input }],
32760
+ data: [{ type: i0.Input }],
32761
+ onSaved: [{ type: i0.Output }]
32762
+ };
32763
+
32295
32764
  var TreeTableComponent = /** @class */ (function (_super) {
32296
32765
  __extends(TreeTableComponent, _super);
32297
32766
  function TreeTableComponent(injector, _crudService, _notifierService) {
@@ -32969,46 +33438,6 @@
32969
33438
  onReloaded: [{ type: i0.Output }]
32970
33439
  };
32971
33440
 
32972
- var TableDetailFormComponent = /** @class */ (function (_super) {
32973
- __extends(TableDetailFormComponent, _super);
32974
- function TableDetailFormComponent(injector) {
32975
- var _this = _super.call(this, injector) || this;
32976
- _this.schema = [];
32977
- _this.data = {};
32978
- _this.onSaved = new i0.EventEmitter();
32979
- return _this;
32980
- }
32981
- TableDetailFormComponent.prototype.ngOnInit = function () {
32982
- _super.prototype.ngOnInit.call(this);
32983
- this.autoSave = false;
32984
- this.model.data = this.data;
32985
- this.setting.baseService = this.parentSetting.baseService;
32986
- this.setting.schema = this.schema;
32987
- };
32988
- TableDetailFormComponent.prototype.handleManualSave = function () {
32989
- this.onSaved.emit(this.model.data);
32990
- };
32991
- return TableDetailFormComponent;
32992
- }(DataFormBase));
32993
- TableDetailFormComponent.decorators = [
32994
- { type: i0.Component, args: [{
32995
- selector: 'table-detail-form',
32996
- template: "<crud-form #crudForm [(data)]=\"model.data\" [setting]=\"setting\" [context]=\"context\" [disableCaching]=\"true\"\r\n (onFormReady)=\"_handleFormReady($event)\">\r\n</crud-form>\r\n<ng-template #buttonTemplate>\r\n <button type=\"button\" pButton icon=\"pi pi-save\" class=\"p-button-text\" [label]=\"'FORM.SAVE' | translate\"\r\n (click)=\"_handleSave($event)\"></button>\r\n <button type=\"button\" pButton icon=\"pi pi-replay\" class=\"p-button-text p-button-secondary\"\r\n [label]=\"'FORM.CANCEL' | translate\" preventTab (click)=\"_handleCancel($event)\"></button>\r\n</ng-template>",
32997
- providers: [
32998
- ComponentContextService
32999
- ],
33000
- styles: [".tn-check-box-list.p-grid{margin-bottom:-.5em}.btn-clear{background:#337ab7;border:none;border-radius:3px;color:#fff;cursor:pointer;height:30px;margin:1px .5em 0;padding:0 10px}.p-col-horizontal{padding:.5em}::ng-deep .tn-check-box-list{position:relative}::ng-deep .tn-check-box-list.flex-end{justify-content:flex-end}::ng-deep .tn-check-box-list.flex-center{justify-content:center}::ng-deep .tn-check-box-list label{cursor:pointer}"]
33001
- },] }
33002
- ];
33003
- TableDetailFormComponent.ctorParameters = function () { return [
33004
- { type: i0.Injector }
33005
- ]; };
33006
- TableDetailFormComponent.propDecorators = {
33007
- schema: [{ type: i0.Input }],
33008
- data: [{ type: i0.Input }],
33009
- onSaved: [{ type: i0.Output }]
33010
- };
33011
-
33012
33441
  var DatetimePickerRangeComponent = /** @class */ (function () {
33013
33442
  function DatetimePickerRangeComponent() {
33014
33443
  this.control = new DateTimeRangeControlSchema();
@@ -41493,213 +41922,6 @@
41493
41922
  lstItem: [{ type: i0.Input }]
41494
41923
  };
41495
41924
 
41496
- var SplashComponentV2Component = /** @class */ (function (_super) {
41497
- __extends(SplashComponentV2Component, _super);
41498
- function SplashComponentV2Component(injector, _moduleConfigService, _permissionService, _deviceDetectorService, _userService, _router, _authenService, _globalService) {
41499
- var _this = _super.call(this, injector) || this;
41500
- _this._moduleConfigService = _moduleConfigService;
41501
- _this._permissionService = _permissionService;
41502
- _this._deviceDetectorService = _deviceDetectorService;
41503
- _this._userService = _userService;
41504
- _this._router = _router;
41505
- _this._authenService = _authenService;
41506
- _this._globalService = _globalService;
41507
- _this.defaultAvatar = '';
41508
- _this.appSwitcherItems = [];
41509
- _this.loaded = false;
41510
- _this.currentDate = new Date();
41511
- _this.showDefaultSetting = false;
41512
- _this.fileApi = '';
41513
- _this.isOnMobile = false;
41514
- _this.daysInWeek = ['Chủ nhật', 'Thứ 2', 'Thứ 3', 'Thứ 4', 'Thứ 5', 'Thứ 6', 'Thứ 7'];
41515
- _this.rootContext.fireEvent('MAIN_CONTENT_ONLY', true);
41516
- _this.environment = _this._moduleConfigService.getConfig().environment;
41517
- _this.defaultAvatar = _this.environment.appMetadata.main.defaultMaleAvatar;
41518
- _this.fileApi = _this.environment.apiDomain.fileEndpoint;
41519
- setInterval(function () {
41520
- _this.currentDate = new Date();
41521
- }, 1000);
41522
- if (_this.rootContext.data.currentAppMetadata && _this.rootContext.data.currentAppMetadata && _this.rootContext.data.currentAppMetadata.showDefaultSetting != null && _this.rootContext.data.currentAppMetadata.showDefaultSetting != undefined) {
41523
- _this.showDefaultSetting = _this.rootContext.data.currentAppMetadata.showDefaultSetting;
41524
- }
41525
- else {
41526
- if (_this.environment.appMetadata.main.showDefaultSetting != null && _this.environment.appMetadata.main.showDefaultSetting != undefined) {
41527
- _this.showDefaultSetting = _this.environment.appMetadata.main.showDefaultSetting;
41528
- }
41529
- else {
41530
- _this.showDefaultSetting = false;
41531
- }
41532
- }
41533
- // Config for authentication
41534
- _this._globalService.setHeaderState(false);
41535
- _this._globalService.setMenuState(false);
41536
- _this.underconstruction = _this.environment.underconstruction;
41537
- return _this;
41538
- }
41539
- SplashComponentV2Component.prototype.ngOnInit = function () {
41540
- var _this = this;
41541
- if (this._deviceDetectorService.isMobile()) {
41542
- this.isOnMobile = true;
41543
- }
41544
- if (this.rootContext.data.currentUser) {
41545
- if (this.rootContext.data.currentUser.gender == 0) {
41546
- this.defaultAvatar = this.environment.appMetadata.main.defaultFemaleAvatar;
41547
- }
41548
- else {
41549
- this.defaultAvatar = this.environment.appMetadata.main.defaultMaleAvatar;
41550
- }
41551
- }
41552
- this.rootContext.replaySubscribe(ComCtxConstants.ROOT.USER_LOADED, function (rs) {
41553
- _this.currentUser = _this._userService.getCurrentUser();
41554
- _this.loadAppMetadata();
41555
- _this.loaded = true;
41556
- });
41557
- if (this.rootModel.allowAnonymous) {
41558
- this.loaded = true;
41559
- this.loadAppMetadata();
41560
- }
41561
- };
41562
- SplashComponentV2Component.prototype.loadAppMetadata = function () {
41563
- var _this = this;
41564
- var prmsAppSwicherItem = new Promise(function (resolve, reject) { return __awaiter(_this, void 0, void 0, function () {
41565
- var arr, _a, _b, _i, ind, element, clientId, isAuthorized;
41566
- return __generator(this, function (_c) {
41567
- switch (_c.label) {
41568
- case 0:
41569
- arr = [];
41570
- _a = [];
41571
- for (_b in this.environment.appMetadata.appSwitcher)
41572
- _a.push(_b);
41573
- _i = 0;
41574
- _c.label = 1;
41575
- case 1:
41576
- if (!(_i < _a.length)) return [3 /*break*/, 5];
41577
- ind = _a[_i];
41578
- element = this.environment.appMetadata.appSwitcher[ind];
41579
- clientId = this.environment.authenticationSettings.clientId;
41580
- if (!(this.rootModel.allowAnonymous && element.allowAnonymous)) return [3 /*break*/, 2];
41581
- arr.push(element);
41582
- return [3 /*break*/, 4];
41583
- case 2:
41584
- if (!this.currentUser) return [3 /*break*/, 4];
41585
- return [4 /*yield*/, this._permissionService.isAuthorized(element.code, (element.code + ".MODULE." + element.code).toUpperCase(), true)];
41586
- case 3:
41587
- isAuthorized = _c.sent();
41588
- if (isAuthorized) {
41589
- arr.push(element);
41590
- }
41591
- _c.label = 4;
41592
- case 4:
41593
- _i++;
41594
- return [3 /*break*/, 1];
41595
- case 5:
41596
- resolve(arr);
41597
- return [2 /*return*/];
41598
- }
41599
- });
41600
- }); });
41601
- prmsAppSwicherItem.then(function (rs) {
41602
- _this.appSwitcherItems.length = 0;
41603
- if (rs) {
41604
- rs.forEach(function (element) {
41605
- if (element.visible) {
41606
- if (!_this.currentUser) { // allow anonymous
41607
- _this.appSwitcherItems.push(element);
41608
- }
41609
- else {
41610
- if (_this.currentUser.maNguoiHoc && _this.currentUser.issuperuser.toLowerCase() != 'true') {
41611
- if (element.code.toLowerCase() == 'sv' || element.code.toLowerCase() == 'user') {
41612
- _this.appSwitcherItems.push(element);
41613
- }
41614
- }
41615
- else {
41616
- _this.appSwitcherItems.push(element);
41617
- }
41618
- }
41619
- }
41620
- });
41621
- }
41622
- });
41623
- };
41624
- SplashComponentV2Component.prototype.switchApp = function (item) {
41625
- this.loaded = false;
41626
- if (item.target == '_blank') {
41627
- if (!item.defaultRedirect) {
41628
- item.defaultRedirect = '';
41629
- }
41630
- // NamNH tip trick cho mot so may bi loi item.url = 'main' -> redirect sai khi click vao cac phan he
41631
- if (item.url == item.defaultRedirect) {
41632
- item.url = '/' + item.code.toLowerCase();
41633
- }
41634
- var link = item.url + "/" + item.defaultRedirect;
41635
- if (!link.startsWith('/') && !link.startsWith('http')) {
41636
- link = '/' + link;
41637
- }
41638
- top.location.href = link;
41639
- }
41640
- else {
41641
- if (item.defaultRedirect != '' && !this.rootContext.data.flags.menuTopOpenning) {
41642
- this._router.navigateByUrl(item.defaultRedirect);
41643
- this.rootContext.data.currentAppMetadata = this.environment.appMetadata.appSwitcher.find(function (x) { return x.code == item.code; });
41644
- if (this.rootContext.data.currentAppMetadata && this.rootContext.data.currentAppMetadata.showDefaultSetting != undefined && this.rootContext.data.currentAppMetadata.showDefaultSetting != null) {
41645
- this.showDefaultSetting = this.rootContext.data.currentAppMetadata.showDefaultSetting && this.showDefaultSetting;
41646
- }
41647
- }
41648
- }
41649
- };
41650
- SplashComponentV2Component.prototype.logout = function () {
41651
- this._authenService.logout();
41652
- };
41653
- SplashComponentV2Component.prototype.goToPersonal = function () {
41654
- var userMenu = this.environment.appMetadata.appSwitcher.find(function (x) { return x.code == 'USER'; });
41655
- this.switchApp(userMenu);
41656
- };
41657
- SplashComponentV2Component.prototype.getCurrentUserAvatar = function () {
41658
- if (this.rootContext.data.currentUser && this.rootContext.data.currentUser.avatar) {
41659
- return this.fileApi + "/file/public/" + this.rootContext.data.currentUser.avatar + "/Download";
41660
- }
41661
- else {
41662
- return this.defaultAvatar;
41663
- }
41664
- };
41665
- SplashComponentV2Component.prototype.getNgayTrongTuan = function () {
41666
- return this.daysInWeek[this.currentDate.getDay()];
41667
- };
41668
- SplashComponentV2Component.prototype.showProfilePage = function () {
41669
- if (this._userService.isSinhVienAccount()) {
41670
- return false;
41671
- }
41672
- return true;
41673
- };
41674
- SplashComponentV2Component.prototype.ngOnDestroy = function () {
41675
- _super.prototype.ngOnDestroy.call(this);
41676
- this._globalService.setHeaderState(true);
41677
- this._globalService.setMenuState(true);
41678
- };
41679
- SplashComponentV2Component.prototype.login = function () {
41680
- this.rootContext.fireEvent('LOGIN');
41681
- };
41682
- return SplashComponentV2Component;
41683
- }(ComponentBase));
41684
- SplashComponentV2Component.decorators = [
41685
- { type: i0.Component, args: [{
41686
- selector: 'splash-component-v2',
41687
- template: "<div *ngIf=\"!loaded\" class=\"wrp-loader\">\r\n <div class=\"loader\"></div>\r\n</div>\r\n<div *ngIf=\"loaded\" class=\"modules-v2\">\r\n <div class=\"welcome-user\">\r\n <div class=\"profile-image\">\r\n <div class=\"tn-full-name\">{{currentUser.fullName}}</div>\r\n <img class=\"custom-avatar\" [src-fallback]=\"defaultAvatar\" [src]=\"getCurrentUserAvatar()\" />\r\n <div *ngIf=\"currentUser\" class=\"login\">\r\n <a class=\"tn-icon-signout\" title=\"\u0110\u0103ng xu\u1EA5t\" (click)=\"logout()\">\r\n <i class=\"pi pi-sign-out\"></i>\r\n </a>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"module-icons\">\r\n <div class=\"img-title\">\r\n <img class=\"tn-custom-logo\" [src]=\"environment.appMetadata.main.logo\"\r\n [alt]=\"environment.appMetadata.main.owner\">\r\n <div class=\"title\">\r\n <h2>{{environment.appMetadata.main.title}}</h2>\r\n <h1>{{environment.appMetadata.main.owner}}</h1>\r\n </div>\r\n <div *ngIf=\"!currentUser\" class=\"login\">\r\n <a class=\"tn-icon-signin\" title=\"\u0110\u0103ng nh\u1EADp\" (click)=\"login()\">\r\n <i class=\"pi pi-sign-in\"></i>\u0110\u0103ng nh\u1EADp\r\n </a>\r\n </div>\r\n </div>\r\n\r\n <div class=\"div1111-wrapper\">\r\n <tn-custom-scrollbar *ngIf=\"!isOnMobile\" [config]=\"{'suppressScrollY': true}\">\r\n <ng-container *ngTemplateOutlet=\"appSwitcher\"></ng-container>\r\n </tn-custom-scrollbar>\r\n\r\n <ng-container *ngIf=\"isOnMobile\">\r\n <ng-container *ngTemplateOutlet=\"appSwitcher\"></ng-container>\r\n </ng-container>\r\n </div>\r\n\r\n <div class=\"clock-wrapper\">\r\n <h1 class=\"clock\">{{currentDate | date:'HH:mm:ss'}}</h1>\r\n <h4 class=\"data-time\">{{getNgayTrongTuan()}}, ng\u00E0y {{currentDate | date:'dd/MM/yyyy'}}</h4>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<ng-template #appSwitcher>\r\n <div class=\"div1111\">\r\n <ng-container *ngFor=\"let item of appSwitcherItems; let ind = index;\">\r\n <span>\r\n <a class=\"bg-switcher\" (click)=\"switchApp(item)\">\r\n <i class=\"{{item.icon}} app-switcher-item-icon\"></i>\r\n <span>{{ item.title | translate}}</span>\r\n </a>\r\n </span>\r\n </ng-container>\r\n </div>\r\n</ng-template>",
41688
- providers: [ComponentContextService],
41689
- styles: ["body{background-color:#fff;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}.wrp-loader{display:inline-block;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:101}.wrp-loader .loader{-webkit-animation:load4 1.3s linear infinite;animation:load4 1.3s linear infinite;border:2px solid #bcdbf5;border-radius:50%;border-top-color:#3192e1;color:#607d8b;display:block;font-size:10px;height:10px;width:10px}.modules-v2{align-items:center;background-image:url(/assets/images/background-splash.png);background-position:50%;background-repeat:no-repeat;background-size:cover;display:flex;height:100vh;justify-content:center;left:0;position:fixed;top:0;width:100vw;z-index:100}.modules-v2 div>span{border-radius:5px;box-shadow:1px 2px 9px 1px #dfd1d1;display:inline-block;height:120px;margin:10px;min-width:100px;white-space:normal;width:120px}.modules-v2 div>span>a{border-radius:5px;cursor:pointer;display:inline-block;display:flex;flex-direction:column;font-weight:700;height:100%;justify-content:space-evenly;position:relative}.modules-v2 div>span>a,.modules-v2 div>span>a>span{color:#fff;text-align:center;text-decoration:unset;width:100%}.modules-v2 div>span>a>span{display:inline-block;line-height:1.2;padding:0 5px}.modules-v2 div>span>a>i{font-size:3.5em;width:100%}.modules-v2 .module-icons{background:hsla(0,0%,100%,.9490196078431372);border-radius:10px;box-shadow:1px 2px 9px 1px rgba(39,23,86,.5215686274509804);color:#666;display:flex;flex-direction:column;justify-content:center;padding:40px 60px;text-align:center}.modules-v2 .module-icons h2{color:#271756;font-size:25px;margin-bottom:15px;margin-top:15px}.modules-v2 .module-icons h1{color:#2f70ac;font-size:35px;margin-bottom:0;margin-top:0}.modules-v2 .module-icons .img-title{margin-bottom:80px}.modules-v2 .module-icons .img-title img.tn-custom-logo{margin-bottom:30px}.modules-v2 .module-icons .img-title a.tn-icon-signin{align-items:center;background:#002c6c;border-radius:5px;color:#fff;cursor:pointer;display:inline-flex;justify-content:center;padding:10px}.modules-v2 .module-icons .img-title a.tn-icon-signin i{margin-right:5px}.modules-v2 .module-icons .div1111-wrapper{margin:0 auto 80px}.modules-v2 .module-icons .div1111-wrapper .div1111{display:flex;flex-wrap:wrap;white-space:nowrap;width:100%}.modules-v2 .module-icons .div1111-wrapper .div1111 .bg-switcher{background:#fff;transition:.3s}.modules-v2 .module-icons .div1111-wrapper .div1111 .bg-switcher .app-switcher-item-icon{color:#2f70ac;transition:.3s}.modules-v2 .module-icons .div1111-wrapper .div1111 .bg-switcher span{color:#2f70ac;font-weight:500;text-shadow:none;transition:.3s}.modules-v2 .module-icons .div1111-wrapper .div1111 .bg-switcher:hover{background:#002c6c;box-shadow:1px 2px 9px 1px rgba(39,23,86,.5215686274509804)}.modules-v2 .module-icons .div1111-wrapper .div1111 .bg-switcher:hover .app-switcher-item-icon,.modules-v2 .module-icons .div1111-wrapper .div1111 .bg-switcher:hover span{color:#fff}.modules-v2 .module-icons .clock-wrapper{color:#fff;margin-bottom:auto;margin-top:auto;text-align:center}.modules-v2 .module-icons .clock-wrapper h4{color:#2f70ac;font-size:20px;font-weight:500;margin-bottom:0;margin-top:10px}.modules-v2 .module-icons .clock-wrapper h1{font-size:40px;margin-bottom:0}.modules-v2 .welcome-user{background:hsla(0,0%,100%,.9019607843137255);border-radius:10px;box-shadow:1px 2px 9px 1px rgba(39,23,86,.5215686274509804);color:#333;display:flex;padding:10px;position:absolute;right:20px;text-align:center;top:20px}.modules-v2 .welcome-user .wrp-login{align-items:center;color:#333;display:flex;flex-direction:column;margin:auto}.modules-v2 .welcome-user .wrp-login h2{font-size:20px;font-weight:500;margin-bottom:5px;margin-top:0}.modules-v2 .profile-image{align-items:center;display:flex;justify-content:center}.modules-v2 .profile-image .tn-full-name{font-size:18px;margin-right:10px}.modules-v2 .profile-image img{-o-object-fit:contain;background:#fff;border-radius:50%;height:40px;margin-right:10px;object-fit:contain;width:40px}.modules-v2 .profile-image .login{display:-ms-grid;display:grid;grid-gap:10px}.modules-v2 .profile-image .login a.tn-icon-signout{align-items:center;background:#002c6c;border-radius:50%;cursor:pointer;display:flex;height:40px;justify-content:center;width:40px}.modules-v2 .profile-image .login a.tn-icon-signout i{color:#edc16f;font-size:16px}@media (max-width:1368px){.modules-v2 .clock{font-size:1.5em;margin:0 20px}.modules-v2 .data-time{font-size:1em;margin:10px 0 20px}}@media (max-width:1200px){.modules-v2 .welcome-user{right:10px;top:10px}}@media (max-width:768px){.modules-v2 .module-icons .img-title .title h2{font-size:28px}.modules-v2 .module-icons .img-title .title h1{font-size:32px}}@media (max-width:640px){.modules-v2 .welcome-user{justify-content:flex-end;right:10px;top:10px;width:calc(100% - 20px)}.modules-v2 .module-icons{margin:10px;padding:20px}.modules-v2 .module-icons .img-title{margin-bottom:40px}.modules-v2 .module-icons .img-title .title h1{font-size:19px}.modules-v2 .module-icons .img-title .title h2{font-size:16px;margin-bottom:10px;margin-top:0}.modules-v2 .module-icons .div1111-wrapper{margin-bottom:50px}.modules-v2 .module-icons .div1111-wrapper .div1111{-ms-grid-columns:(minmax(100px,1fr))[3];display:-ms-grid;display:grid;grid-template-columns:repeat(3,minmax(100px,1fr))}.modules-v2 .module-icons .div1111-wrapper .div1111 .bg-switcher span{font-size:14px}.modules-v2 .module-icons div>span{height:100px;width:100px}.modules-v2 .module-icons div>span>a>i{font-size:3em;top:15px}.modules-v2 .module-icons .clock-wrapper h4{font-size:16px;margin-top:5px}.modules-v2 .module-icons .clock-wrapper h1{font-size:30px}}@media (max-width:375px){.modules-v2 .module-icons .img-title{margin-bottom:0}.modules-v2 .module-icons .img-title img.tn-custom-logo{margin-bottom:10px;width:100px}.modules-v2 .module-icons .img-title .title{padding:0}.modules-v2 .module-icons .img-title .title h2{font-size:14px;margin-bottom:10px}.modules-v2 .module-icons .div1111-wrapper{margin-bottom:0}.modules-v2 .module-icons .div1111-wrapper .div1111{display:flex;justify-content:center}.modules-v2 .module-icons .div1111-wrapper .div1111 .bg-switcher span{font-size:14px}}@-webkit-keyframes load4{0%,to{box-shadow:0 -3em 0 .2em,2em -2em 0 0,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 0}12.5%{box-shadow:0 -3em 0 0,2em -2em 0 .2em,3em 0 0 0,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}25%{box-shadow:0 -3em 0 -.5em,2em -2em 0 0,3em 0 0 .2em,2em 2em 0 0,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}37.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 0,2em 2em 0 .2em,0 3em 0 0,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}50%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 0,0 3em 0 .2em,-2em 2em 0 0,-3em 0 0 -1em,-2em -2em 0 -1em}62.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 0,-2em 2em 0 .2em,-3em 0 0 0,-2em -2em 0 -1em}75%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 0,-3em 0 0 .2em,-2em -2em 0 0}87.5%{box-shadow:0 -3em 0 0,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 0,-3em 0 0 0,-2em -2em 0 .2em}}@keyframes load4{0%,to{box-shadow:0 -3em 0 .2em,2em -2em 0 0,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 0}12.5%{box-shadow:0 -3em 0 0,2em -2em 0 .2em,3em 0 0 0,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}25%{box-shadow:0 -3em 0 -.5em,2em -2em 0 0,3em 0 0 .2em,2em 2em 0 0,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}37.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 0,2em 2em 0 .2em,0 3em 0 0,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}50%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 0,0 3em 0 .2em,-2em 2em 0 0,-3em 0 0 -1em,-2em -2em 0 -1em}62.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 0,-2em 2em 0 .2em,-3em 0 0 0,-2em -2em 0 -1em}75%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 0,-3em 0 0 .2em,-2em -2em 0 0}87.5%{box-shadow:0 -3em 0 0,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 0,-3em 0 0 0,-2em -2em 0 .2em}}"]
41690
- },] }
41691
- ];
41692
- SplashComponentV2Component.ctorParameters = function () { return [
41693
- { type: i0.Injector },
41694
- { type: ModuleConfigService },
41695
- { type: PermissionService },
41696
- { type: ngxDeviceDetector.DeviceDetectorService },
41697
- { type: UserService },
41698
- { type: i3.Router },
41699
- { type: AuthenService },
41700
- { type: GlobalService }
41701
- ]; };
41702
-
41703
41925
  var SplashComponentV1Component = /** @class */ (function (_super) {
41704
41926
  __extends(SplashComponentV1Component, _super);
41705
41927
  function SplashComponentV1Component(injector, _moduleConfigService, _permissionService, _deviceDetectorService, _userService, _router, _authenService, _globalService) {
@@ -41907,6 +42129,213 @@
41907
42129
  { type: GlobalService }
41908
42130
  ]; };
41909
42131
 
42132
+ var SplashComponentV2Component = /** @class */ (function (_super) {
42133
+ __extends(SplashComponentV2Component, _super);
42134
+ function SplashComponentV2Component(injector, _moduleConfigService, _permissionService, _deviceDetectorService, _userService, _router, _authenService, _globalService) {
42135
+ var _this = _super.call(this, injector) || this;
42136
+ _this._moduleConfigService = _moduleConfigService;
42137
+ _this._permissionService = _permissionService;
42138
+ _this._deviceDetectorService = _deviceDetectorService;
42139
+ _this._userService = _userService;
42140
+ _this._router = _router;
42141
+ _this._authenService = _authenService;
42142
+ _this._globalService = _globalService;
42143
+ _this.defaultAvatar = '';
42144
+ _this.appSwitcherItems = [];
42145
+ _this.loaded = false;
42146
+ _this.currentDate = new Date();
42147
+ _this.showDefaultSetting = false;
42148
+ _this.fileApi = '';
42149
+ _this.isOnMobile = false;
42150
+ _this.daysInWeek = ['Chủ nhật', 'Thứ 2', 'Thứ 3', 'Thứ 4', 'Thứ 5', 'Thứ 6', 'Thứ 7'];
42151
+ _this.rootContext.fireEvent('MAIN_CONTENT_ONLY', true);
42152
+ _this.environment = _this._moduleConfigService.getConfig().environment;
42153
+ _this.defaultAvatar = _this.environment.appMetadata.main.defaultMaleAvatar;
42154
+ _this.fileApi = _this.environment.apiDomain.fileEndpoint;
42155
+ setInterval(function () {
42156
+ _this.currentDate = new Date();
42157
+ }, 1000);
42158
+ if (_this.rootContext.data.currentAppMetadata && _this.rootContext.data.currentAppMetadata && _this.rootContext.data.currentAppMetadata.showDefaultSetting != null && _this.rootContext.data.currentAppMetadata.showDefaultSetting != undefined) {
42159
+ _this.showDefaultSetting = _this.rootContext.data.currentAppMetadata.showDefaultSetting;
42160
+ }
42161
+ else {
42162
+ if (_this.environment.appMetadata.main.showDefaultSetting != null && _this.environment.appMetadata.main.showDefaultSetting != undefined) {
42163
+ _this.showDefaultSetting = _this.environment.appMetadata.main.showDefaultSetting;
42164
+ }
42165
+ else {
42166
+ _this.showDefaultSetting = false;
42167
+ }
42168
+ }
42169
+ // Config for authentication
42170
+ _this._globalService.setHeaderState(false);
42171
+ _this._globalService.setMenuState(false);
42172
+ _this.underconstruction = _this.environment.underconstruction;
42173
+ return _this;
42174
+ }
42175
+ SplashComponentV2Component.prototype.ngOnInit = function () {
42176
+ var _this = this;
42177
+ if (this._deviceDetectorService.isMobile()) {
42178
+ this.isOnMobile = true;
42179
+ }
42180
+ if (this.rootContext.data.currentUser) {
42181
+ if (this.rootContext.data.currentUser.gender == 0) {
42182
+ this.defaultAvatar = this.environment.appMetadata.main.defaultFemaleAvatar;
42183
+ }
42184
+ else {
42185
+ this.defaultAvatar = this.environment.appMetadata.main.defaultMaleAvatar;
42186
+ }
42187
+ }
42188
+ this.rootContext.replaySubscribe(ComCtxConstants.ROOT.USER_LOADED, function (rs) {
42189
+ _this.currentUser = _this._userService.getCurrentUser();
42190
+ _this.loadAppMetadata();
42191
+ _this.loaded = true;
42192
+ });
42193
+ if (this.rootModel.allowAnonymous) {
42194
+ this.loaded = true;
42195
+ this.loadAppMetadata();
42196
+ }
42197
+ };
42198
+ SplashComponentV2Component.prototype.loadAppMetadata = function () {
42199
+ var _this = this;
42200
+ var prmsAppSwicherItem = new Promise(function (resolve, reject) { return __awaiter(_this, void 0, void 0, function () {
42201
+ var arr, _a, _b, _i, ind, element, clientId, isAuthorized;
42202
+ return __generator(this, function (_c) {
42203
+ switch (_c.label) {
42204
+ case 0:
42205
+ arr = [];
42206
+ _a = [];
42207
+ for (_b in this.environment.appMetadata.appSwitcher)
42208
+ _a.push(_b);
42209
+ _i = 0;
42210
+ _c.label = 1;
42211
+ case 1:
42212
+ if (!(_i < _a.length)) return [3 /*break*/, 5];
42213
+ ind = _a[_i];
42214
+ element = this.environment.appMetadata.appSwitcher[ind];
42215
+ clientId = this.environment.authenticationSettings.clientId;
42216
+ if (!(this.rootModel.allowAnonymous && element.allowAnonymous)) return [3 /*break*/, 2];
42217
+ arr.push(element);
42218
+ return [3 /*break*/, 4];
42219
+ case 2:
42220
+ if (!this.currentUser) return [3 /*break*/, 4];
42221
+ return [4 /*yield*/, this._permissionService.isAuthorized(element.code, (element.code + ".MODULE." + element.code).toUpperCase(), true)];
42222
+ case 3:
42223
+ isAuthorized = _c.sent();
42224
+ if (isAuthorized) {
42225
+ arr.push(element);
42226
+ }
42227
+ _c.label = 4;
42228
+ case 4:
42229
+ _i++;
42230
+ return [3 /*break*/, 1];
42231
+ case 5:
42232
+ resolve(arr);
42233
+ return [2 /*return*/];
42234
+ }
42235
+ });
42236
+ }); });
42237
+ prmsAppSwicherItem.then(function (rs) {
42238
+ _this.appSwitcherItems.length = 0;
42239
+ if (rs) {
42240
+ rs.forEach(function (element) {
42241
+ if (element.visible) {
42242
+ if (!_this.currentUser) { // allow anonymous
42243
+ _this.appSwitcherItems.push(element);
42244
+ }
42245
+ else {
42246
+ if (_this.currentUser.maNguoiHoc && _this.currentUser.issuperuser.toLowerCase() != 'true') {
42247
+ if (element.code.toLowerCase() == 'sv' || element.code.toLowerCase() == 'user') {
42248
+ _this.appSwitcherItems.push(element);
42249
+ }
42250
+ }
42251
+ else {
42252
+ _this.appSwitcherItems.push(element);
42253
+ }
42254
+ }
42255
+ }
42256
+ });
42257
+ }
42258
+ });
42259
+ };
42260
+ SplashComponentV2Component.prototype.switchApp = function (item) {
42261
+ this.loaded = false;
42262
+ if (item.target == '_blank') {
42263
+ if (!item.defaultRedirect) {
42264
+ item.defaultRedirect = '';
42265
+ }
42266
+ // NamNH tip trick cho mot so may bi loi item.url = 'main' -> redirect sai khi click vao cac phan he
42267
+ if (item.url == item.defaultRedirect) {
42268
+ item.url = '/' + item.code.toLowerCase();
42269
+ }
42270
+ var link = item.url + "/" + item.defaultRedirect;
42271
+ if (!link.startsWith('/') && !link.startsWith('http')) {
42272
+ link = '/' + link;
42273
+ }
42274
+ top.location.href = link;
42275
+ }
42276
+ else {
42277
+ if (item.defaultRedirect != '' && !this.rootContext.data.flags.menuTopOpenning) {
42278
+ this._router.navigateByUrl(item.defaultRedirect);
42279
+ this.rootContext.data.currentAppMetadata = this.environment.appMetadata.appSwitcher.find(function (x) { return x.code == item.code; });
42280
+ if (this.rootContext.data.currentAppMetadata && this.rootContext.data.currentAppMetadata.showDefaultSetting != undefined && this.rootContext.data.currentAppMetadata.showDefaultSetting != null) {
42281
+ this.showDefaultSetting = this.rootContext.data.currentAppMetadata.showDefaultSetting && this.showDefaultSetting;
42282
+ }
42283
+ }
42284
+ }
42285
+ };
42286
+ SplashComponentV2Component.prototype.logout = function () {
42287
+ this._authenService.logout();
42288
+ };
42289
+ SplashComponentV2Component.prototype.goToPersonal = function () {
42290
+ var userMenu = this.environment.appMetadata.appSwitcher.find(function (x) { return x.code == 'USER'; });
42291
+ this.switchApp(userMenu);
42292
+ };
42293
+ SplashComponentV2Component.prototype.getCurrentUserAvatar = function () {
42294
+ if (this.rootContext.data.currentUser && this.rootContext.data.currentUser.avatar) {
42295
+ return this.fileApi + "/file/public/" + this.rootContext.data.currentUser.avatar + "/Download";
42296
+ }
42297
+ else {
42298
+ return this.defaultAvatar;
42299
+ }
42300
+ };
42301
+ SplashComponentV2Component.prototype.getNgayTrongTuan = function () {
42302
+ return this.daysInWeek[this.currentDate.getDay()];
42303
+ };
42304
+ SplashComponentV2Component.prototype.showProfilePage = function () {
42305
+ if (this._userService.isSinhVienAccount()) {
42306
+ return false;
42307
+ }
42308
+ return true;
42309
+ };
42310
+ SplashComponentV2Component.prototype.ngOnDestroy = function () {
42311
+ _super.prototype.ngOnDestroy.call(this);
42312
+ this._globalService.setHeaderState(true);
42313
+ this._globalService.setMenuState(true);
42314
+ };
42315
+ SplashComponentV2Component.prototype.login = function () {
42316
+ this.rootContext.fireEvent('LOGIN');
42317
+ };
42318
+ return SplashComponentV2Component;
42319
+ }(ComponentBase));
42320
+ SplashComponentV2Component.decorators = [
42321
+ { type: i0.Component, args: [{
42322
+ selector: 'splash-component-v2',
42323
+ template: "<div *ngIf=\"!loaded\" class=\"wrp-loader\">\r\n <div class=\"loader\"></div>\r\n</div>\r\n<div *ngIf=\"loaded\" class=\"modules-v2\">\r\n <div class=\"welcome-user\">\r\n <div class=\"profile-image\">\r\n <div class=\"tn-full-name\">{{currentUser.fullName}}</div>\r\n <img class=\"custom-avatar\" [src-fallback]=\"defaultAvatar\" [src]=\"getCurrentUserAvatar()\" />\r\n <div *ngIf=\"currentUser\" class=\"login\">\r\n <a class=\"tn-icon-signout\" title=\"\u0110\u0103ng xu\u1EA5t\" (click)=\"logout()\">\r\n <i class=\"pi pi-sign-out\"></i>\r\n </a>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"module-icons\">\r\n <div class=\"img-title\">\r\n <img class=\"tn-custom-logo\" [src]=\"environment.appMetadata.main.logo\"\r\n [alt]=\"environment.appMetadata.main.owner\">\r\n <div class=\"title\">\r\n <h2>{{environment.appMetadata.main.title}}</h2>\r\n <h1>{{environment.appMetadata.main.owner}}</h1>\r\n </div>\r\n <div *ngIf=\"!currentUser\" class=\"login\">\r\n <a class=\"tn-icon-signin\" title=\"\u0110\u0103ng nh\u1EADp\" (click)=\"login()\">\r\n <i class=\"pi pi-sign-in\"></i>\u0110\u0103ng nh\u1EADp\r\n </a>\r\n </div>\r\n </div>\r\n\r\n <div class=\"div1111-wrapper\">\r\n <tn-custom-scrollbar *ngIf=\"!isOnMobile\" [config]=\"{'suppressScrollY': true}\">\r\n <ng-container *ngTemplateOutlet=\"appSwitcher\"></ng-container>\r\n </tn-custom-scrollbar>\r\n\r\n <ng-container *ngIf=\"isOnMobile\">\r\n <ng-container *ngTemplateOutlet=\"appSwitcher\"></ng-container>\r\n </ng-container>\r\n </div>\r\n\r\n <div class=\"clock-wrapper\">\r\n <h1 class=\"clock\">{{currentDate | date:'HH:mm:ss'}}</h1>\r\n <h4 class=\"data-time\">{{getNgayTrongTuan()}}, ng\u00E0y {{currentDate | date:'dd/MM/yyyy'}}</h4>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<ng-template #appSwitcher>\r\n <div class=\"div1111\">\r\n <ng-container *ngFor=\"let item of appSwitcherItems; let ind = index;\">\r\n <span>\r\n <a class=\"bg-switcher\" (click)=\"switchApp(item)\">\r\n <i class=\"{{item.icon}} app-switcher-item-icon\"></i>\r\n <span>{{ item.title | translate}}</span>\r\n </a>\r\n </span>\r\n </ng-container>\r\n </div>\r\n</ng-template>",
42324
+ providers: [ComponentContextService],
42325
+ styles: ["body{background-color:#fff;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}.wrp-loader{display:inline-block;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:101}.wrp-loader .loader{-webkit-animation:load4 1.3s linear infinite;animation:load4 1.3s linear infinite;border:2px solid #bcdbf5;border-radius:50%;border-top-color:#3192e1;color:#607d8b;display:block;font-size:10px;height:10px;width:10px}.modules-v2{align-items:center;background-image:url(/assets/images/background-splash.png);background-position:50%;background-repeat:no-repeat;background-size:cover;display:flex;height:100vh;justify-content:center;left:0;position:fixed;top:0;width:100vw;z-index:100}.modules-v2 div>span{border-radius:5px;box-shadow:1px 2px 9px 1px #dfd1d1;display:inline-block;height:120px;margin:10px;min-width:100px;white-space:normal;width:120px}.modules-v2 div>span>a{border-radius:5px;cursor:pointer;display:inline-block;display:flex;flex-direction:column;font-weight:700;height:100%;justify-content:space-evenly;position:relative}.modules-v2 div>span>a,.modules-v2 div>span>a>span{color:#fff;text-align:center;text-decoration:unset;width:100%}.modules-v2 div>span>a>span{display:inline-block;line-height:1.2;padding:0 5px}.modules-v2 div>span>a>i{font-size:3.5em;width:100%}.modules-v2 .module-icons{background:hsla(0,0%,100%,.9490196078431372);border-radius:10px;box-shadow:1px 2px 9px 1px rgba(39,23,86,.5215686274509804);color:#666;display:flex;flex-direction:column;justify-content:center;padding:40px 60px;text-align:center}.modules-v2 .module-icons h2{color:#271756;font-size:25px;margin-bottom:15px;margin-top:15px}.modules-v2 .module-icons h1{color:#2f70ac;font-size:35px;margin-bottom:0;margin-top:0}.modules-v2 .module-icons .img-title{margin-bottom:80px}.modules-v2 .module-icons .img-title img.tn-custom-logo{margin-bottom:30px}.modules-v2 .module-icons .img-title a.tn-icon-signin{align-items:center;background:#002c6c;border-radius:5px;color:#fff;cursor:pointer;display:inline-flex;justify-content:center;padding:10px}.modules-v2 .module-icons .img-title a.tn-icon-signin i{margin-right:5px}.modules-v2 .module-icons .div1111-wrapper{margin:0 auto 80px}.modules-v2 .module-icons .div1111-wrapper .div1111{display:flex;flex-wrap:wrap;white-space:nowrap;width:100%}.modules-v2 .module-icons .div1111-wrapper .div1111 .bg-switcher{background:#fff;transition:.3s}.modules-v2 .module-icons .div1111-wrapper .div1111 .bg-switcher .app-switcher-item-icon{color:#2f70ac;transition:.3s}.modules-v2 .module-icons .div1111-wrapper .div1111 .bg-switcher span{color:#2f70ac;font-weight:500;text-shadow:none;transition:.3s}.modules-v2 .module-icons .div1111-wrapper .div1111 .bg-switcher:hover{background:#002c6c;box-shadow:1px 2px 9px 1px rgba(39,23,86,.5215686274509804)}.modules-v2 .module-icons .div1111-wrapper .div1111 .bg-switcher:hover .app-switcher-item-icon,.modules-v2 .module-icons .div1111-wrapper .div1111 .bg-switcher:hover span{color:#fff}.modules-v2 .module-icons .clock-wrapper{color:#fff;margin-bottom:auto;margin-top:auto;text-align:center}.modules-v2 .module-icons .clock-wrapper h4{color:#2f70ac;font-size:20px;font-weight:500;margin-bottom:0;margin-top:10px}.modules-v2 .module-icons .clock-wrapper h1{font-size:40px;margin-bottom:0}.modules-v2 .welcome-user{background:hsla(0,0%,100%,.9019607843137255);border-radius:10px;box-shadow:1px 2px 9px 1px rgba(39,23,86,.5215686274509804);color:#333;display:flex;padding:10px;position:absolute;right:20px;text-align:center;top:20px}.modules-v2 .welcome-user .wrp-login{align-items:center;color:#333;display:flex;flex-direction:column;margin:auto}.modules-v2 .welcome-user .wrp-login h2{font-size:20px;font-weight:500;margin-bottom:5px;margin-top:0}.modules-v2 .profile-image{align-items:center;display:flex;justify-content:center}.modules-v2 .profile-image .tn-full-name{font-size:18px;margin-right:10px}.modules-v2 .profile-image img{-o-object-fit:contain;background:#fff;border-radius:50%;height:40px;margin-right:10px;object-fit:contain;width:40px}.modules-v2 .profile-image .login{display:-ms-grid;display:grid;grid-gap:10px}.modules-v2 .profile-image .login a.tn-icon-signout{align-items:center;background:#002c6c;border-radius:50%;cursor:pointer;display:flex;height:40px;justify-content:center;width:40px}.modules-v2 .profile-image .login a.tn-icon-signout i{color:#edc16f;font-size:16px}@media (max-width:1368px){.modules-v2 .clock{font-size:1.5em;margin:0 20px}.modules-v2 .data-time{font-size:1em;margin:10px 0 20px}}@media (max-width:1200px){.modules-v2 .welcome-user{right:10px;top:10px}}@media (max-width:768px){.modules-v2 .module-icons .img-title .title h2{font-size:28px}.modules-v2 .module-icons .img-title .title h1{font-size:32px}}@media (max-width:640px){.modules-v2 .welcome-user{justify-content:flex-end;right:10px;top:10px;width:calc(100% - 20px)}.modules-v2 .module-icons{margin:10px;padding:20px}.modules-v2 .module-icons .img-title{margin-bottom:40px}.modules-v2 .module-icons .img-title .title h1{font-size:19px}.modules-v2 .module-icons .img-title .title h2{font-size:16px;margin-bottom:10px;margin-top:0}.modules-v2 .module-icons .div1111-wrapper{margin-bottom:50px}.modules-v2 .module-icons .div1111-wrapper .div1111{-ms-grid-columns:(minmax(100px,1fr))[3];display:-ms-grid;display:grid;grid-template-columns:repeat(3,minmax(100px,1fr))}.modules-v2 .module-icons .div1111-wrapper .div1111 .bg-switcher span{font-size:14px}.modules-v2 .module-icons div>span{height:100px;width:100px}.modules-v2 .module-icons div>span>a>i{font-size:3em;top:15px}.modules-v2 .module-icons .clock-wrapper h4{font-size:16px;margin-top:5px}.modules-v2 .module-icons .clock-wrapper h1{font-size:30px}}@media (max-width:375px){.modules-v2 .module-icons .img-title{margin-bottom:0}.modules-v2 .module-icons .img-title img.tn-custom-logo{margin-bottom:10px;width:100px}.modules-v2 .module-icons .img-title .title{padding:0}.modules-v2 .module-icons .img-title .title h2{font-size:14px;margin-bottom:10px}.modules-v2 .module-icons .div1111-wrapper{margin-bottom:0}.modules-v2 .module-icons .div1111-wrapper .div1111{display:flex;justify-content:center}.modules-v2 .module-icons .div1111-wrapper .div1111 .bg-switcher span{font-size:14px}}@-webkit-keyframes load4{0%,to{box-shadow:0 -3em 0 .2em,2em -2em 0 0,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 0}12.5%{box-shadow:0 -3em 0 0,2em -2em 0 .2em,3em 0 0 0,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}25%{box-shadow:0 -3em 0 -.5em,2em -2em 0 0,3em 0 0 .2em,2em 2em 0 0,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}37.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 0,2em 2em 0 .2em,0 3em 0 0,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}50%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 0,0 3em 0 .2em,-2em 2em 0 0,-3em 0 0 -1em,-2em -2em 0 -1em}62.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 0,-2em 2em 0 .2em,-3em 0 0 0,-2em -2em 0 -1em}75%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 0,-3em 0 0 .2em,-2em -2em 0 0}87.5%{box-shadow:0 -3em 0 0,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 0,-3em 0 0 0,-2em -2em 0 .2em}}@keyframes load4{0%,to{box-shadow:0 -3em 0 .2em,2em -2em 0 0,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 0}12.5%{box-shadow:0 -3em 0 0,2em -2em 0 .2em,3em 0 0 0,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}25%{box-shadow:0 -3em 0 -.5em,2em -2em 0 0,3em 0 0 .2em,2em 2em 0 0,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}37.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 0,2em 2em 0 .2em,0 3em 0 0,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}50%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 0,0 3em 0 .2em,-2em 2em 0 0,-3em 0 0 -1em,-2em -2em 0 -1em}62.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 0,-2em 2em 0 .2em,-3em 0 0 0,-2em -2em 0 -1em}75%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 0,-3em 0 0 .2em,-2em -2em 0 0}87.5%{box-shadow:0 -3em 0 0,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 0,-3em 0 0 0,-2em -2em 0 .2em}}"]
42326
+ },] }
42327
+ ];
42328
+ SplashComponentV2Component.ctorParameters = function () { return [
42329
+ { type: i0.Injector },
42330
+ { type: ModuleConfigService },
42331
+ { type: PermissionService },
42332
+ { type: ngxDeviceDetector.DeviceDetectorService },
42333
+ { type: UserService },
42334
+ { type: i3.Router },
42335
+ { type: AuthenService },
42336
+ { type: GlobalService }
42337
+ ]; };
42338
+
41910
42339
  var DynamicNodeComponent = /** @class */ (function (_super) {
41911
42340
  __extends(DynamicNodeComponent, _super);
41912
42341
  function DynamicNodeComponent(injector) {
@@ -45181,17 +45610,24 @@
45181
45610
  });
45182
45611
  };
45183
45612
  TnAppNotificationComponent.prototype.readById = function (data) {
45184
- var _this = this;
45185
- data.readedTime = new Date();
45186
- this._notificationService.markReadById(data.id).then(function (res) {
45187
- _this.rootContext.fireEvent(ComCtxConstants.NOTIFICATION.NOTIFICATION_RELOAD);
45188
- }).catch(function (err) { return _this._commonService.handleError(err, _this._injector); });
45613
+ return __awaiter(this, void 0, void 0, function () {
45614
+ var _this = this;
45615
+ return __generator(this, function (_b) {
45616
+ switch (_b.label) {
45617
+ case 0:
45618
+ data.readedTime = new Date();
45619
+ return [4 /*yield*/, this._notificationService.markReadById(data.id).then(function (res) {
45620
+ _this.rootContext.fireEvent(ComCtxConstants.NOTIFICATION.NOTIFICATION_RELOAD);
45621
+ }).catch(function (err) { return _this._commonService.handleError(err, _this._injector); })];
45622
+ case 1:
45623
+ _b.sent();
45624
+ return [2 /*return*/];
45625
+ }
45626
+ });
45627
+ });
45189
45628
  };
45190
45629
  TnAppNotificationComponent.prototype.isHasAvatar = function (item) {
45191
- if (item.avatarId) {
45192
- return true;
45193
- }
45194
- return false;
45630
+ return !!item.avatarId;
45195
45631
  };
45196
45632
  TnAppNotificationComponent.prototype.isReaded = function (item) {
45197
45633
  return !!item.readedTime;
@@ -45200,30 +45636,42 @@
45200
45636
  return this.apiUploadUrl + "/public/" + item + "/Download";
45201
45637
  };
45202
45638
  TnAppNotificationComponent.prototype.goToLink = function (item) {
45203
- if (!this.isReaded(item)) {
45204
- this.readById(item);
45205
- this.totalUnRead--;
45206
- }
45207
- // Save current path to go back
45208
- localStorage.setItem('currentUrl', top.location.href);
45209
- localStorage.setItem('currentPathName', top.location.pathname);
45210
- if (item.messageLink) {
45211
- var link = item.messageLink;
45212
- // NamNH - Để top location href vì có thể click xem thông báo từ phân hệ khác, sau tối ưu nếu cùng phân hệ thì router navigate, còn khác phân hệ thì location href
45213
- top.location.href = link;
45214
- // if (this._router.isActive(link, false)) {
45215
- // this.rootContext.fireEvent(ComCtxConstants.ROOT.NOTI_CLICK, link);
45216
- // } else {
45217
- // if (this.rootModel.fragments) {
45218
- // for (const item of this.rootModel.fragments) {
45219
- // if (!item.closed) {
45220
- // item.unsubscribe();
45221
- // }
45222
- // }
45223
- // }
45224
- // this._router.navigateByUrl(link);
45225
- // }
45226
- }
45639
+ return __awaiter(this, void 0, void 0, function () {
45640
+ var link;
45641
+ return __generator(this, function (_b) {
45642
+ switch (_b.label) {
45643
+ case 0:
45644
+ if (!!this.isReaded(item)) return [3 /*break*/, 2];
45645
+ return [4 /*yield*/, this.readById(item)];
45646
+ case 1:
45647
+ _b.sent();
45648
+ this.totalUnRead--;
45649
+ _b.label = 2;
45650
+ case 2:
45651
+ // Save current path to go back
45652
+ localStorage.setItem('currentUrl', top.location.href);
45653
+ localStorage.setItem('currentPathName', top.location.pathname);
45654
+ if (item.messageLink) {
45655
+ link = item.messageLink;
45656
+ // NamNH - Để top location href vì có thể click xem thông báo từ phân hệ khác, sau tối ưu nếu cùng phân hệ thì router navigate, còn khác phân hệ thì location href
45657
+ top.location.href = link;
45658
+ // if (this._router.isActive(link, false)) {
45659
+ // this.rootContext.fireEvent(ComCtxConstants.ROOT.NOTI_CLICK, link);
45660
+ // } else {
45661
+ // if (this.rootModel.fragments) {
45662
+ // for (const item of this.rootModel.fragments) {
45663
+ // if (!item.closed) {
45664
+ // item.unsubscribe();
45665
+ // }
45666
+ // }
45667
+ // }
45668
+ // this._router.navigateByUrl(link);
45669
+ // }
45670
+ }
45671
+ return [2 /*return*/];
45672
+ }
45673
+ });
45674
+ });
45227
45675
  };
45228
45676
  TnAppNotificationComponent.prototype.headerClick = function (event) {
45229
45677
  event.preventDefault();
@@ -45234,7 +45682,9 @@
45234
45682
  this.bounceNoti = false;
45235
45683
  };
45236
45684
  TnAppNotificationComponent.prototype.handleClicked = function () {
45237
- this._router.navigate(["user/managemant-notification"]);
45685
+ var _a;
45686
+ var thongBaoDomain = (_a = this.environment.clientDomain.thongbaoDomain) !== null && _a !== void 0 ? _a : '';
45687
+ window.open(thongBaoDomain);
45238
45688
  };
45239
45689
  return TnAppNotificationComponent;
45240
45690
  }(ComponentBase));
@@ -49688,198 +50138,498 @@
49688
50138
  workflowSetting: [{ type: i0.Input }]
49689
50139
  };
49690
50140
 
49691
- var WorkflowPickerComponent = /** @class */ (function (_super) {
49692
- __extends(WorkflowPickerComponent, _super);
49693
- function WorkflowPickerComponent(_injector, _workflowSettingsService, _stateMachinesService) {
50141
+ var WorkflowPermissionFormComponent = /** @class */ (function (_super) {
50142
+ __extends(WorkflowPermissionFormComponent, _super);
50143
+ function WorkflowPermissionFormComponent(_injector, _workflowPermissionService, _workflowPermissionDetailService, _userGroupService) {
49694
50144
  var _this = _super.call(this, _injector) || this;
49695
50145
  _this._injector = _injector;
49696
- _this._workflowSettingsService = _workflowSettingsService;
49697
- _this._stateMachinesService = _stateMachinesService;
49698
- _this.showButtonSave = false;
49699
- _this.onSaved = new i0.EventEmitter();
49700
- _this.onCancel = new i0.EventEmitter();
49701
- _this.onSaveSetting = new i0.EventEmitter();
49702
- _this.dicMachinesData = {};
49703
- _this.readyCrudForm = false;
49704
- _this.autoGetDetail = false;
49705
- _this.autoSave = false;
50146
+ _this._workflowPermissionService = _workflowPermissionService;
50147
+ _this._workflowPermissionDetailService = _workflowPermissionDetailService;
50148
+ _this._userGroupService = _userGroupService;
49706
50149
  return _this;
49707
50150
  }
49708
- WorkflowPickerComponent.prototype.ngOnInit = function () {
49709
- var _this = this;
49710
- this.setting.baseService = this._workflowSettingsService;
50151
+ WorkflowPermissionFormComponent.prototype.ngOnInit = function () {
50152
+ _super.prototype.ngOnInit.call(this);
50153
+ this.setting.baseService = this._workflowPermissionService;
50154
+ this._workflowPermissionService.changeEndpoint(this.businessSetting.baseService);
50155
+ var dataSourcePermission = DataSourcePermissionBase.map(function (q) { return (Object.assign(Object.assign({}, q), { disabled: true })); });
49711
50156
  this.setting.schema = [
49712
- new DropdownControlSchema({
49713
- field: '_workflowCodes',
49714
- label: 'Danh sách quy trình',
49715
- multiple: true,
49716
- baseService: this._stateMachinesService,
49717
- valueField: 'code',
49718
- displayField: 'title',
49719
- onChanged: function (evt) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
49720
- switch (_a.label) {
49721
- case 0: return [4 /*yield*/, this.handleChangeWorkflow(evt)];
49722
- case 1: return [2 /*return*/, _a.sent()];
49723
- }
49724
- }); }); },
49725
- onAdjustedValue: function (evt) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
49726
- switch (_a.label) {
49727
- case 0: return [4 /*yield*/, this.handleChangeWorkflow(evt)];
49728
- case 1: return [2 /*return*/, _a.sent()];
49729
- }
49730
- }); }); },
49731
- required: true
49732
- // onReady: async (evt: EventData) => await this.handleChangeWorkflow(evt)
49733
- }),
49734
- new DropdownControlSchema({
49735
- field: 'workflowCode',
49736
- label: 'Quy trình mặc định',
49737
- valueField: 'code',
49738
- displayField: 'title',
49739
- onChanged: function (evt) { return _this.handleChangeWorkflowDefault(evt); }
49740
- }),
49741
- new CustomControlSchema({
49742
- field: 'designer',
49743
- label: this._translateService.instant('Sơ đồ trạng thái'),
49744
- mdWidth: 12
50157
+ this._createUserPickerControl('userIds', 'Người dùng'),
50158
+ this._createCoCauToChucControl('donViIds', 'Đơn vị'),
50159
+ this._createUserGroupPickerControl('groupIds', 'Nhóm người dùng'),
50160
+ new CheckBoxListControlSchema({
50161
+ field: 'lstPermission',
50162
+ label: 'Quyền khả dụng',
50163
+ dataSource: dataSourcePermission
49745
50164
  })
49746
50165
  ];
49747
- this.model.data = this.data;
49748
- this.afterGetSetting();
49749
- _super.prototype.ngOnInit.call(this);
49750
50166
  };
49751
- WorkflowPickerComponent.prototype.onFormInitialized = function (evt) {
50167
+ WorkflowPermissionFormComponent.prototype._createUserPickerControl = function (field, label, multiple) {
50168
+ if (multiple === void 0) { multiple = true; }
50169
+ var control = createUserPickerControl(field, label);
50170
+ control.multiple = multiple;
50171
+ return control;
50172
+ };
50173
+ WorkflowPermissionFormComponent.prototype._createCoCauToChucControl = function (field, label) {
50174
+ return createOrgPickerControl(field, label);
50175
+ };
50176
+ WorkflowPermissionFormComponent.prototype._createUserGroupPickerControl = function (field, label) {
50177
+ return createUserGroupPickerControl(this._userGroupService, field, label);
50178
+ };
50179
+ WorkflowPermissionFormComponent.prototype.onFormInitialized = function (constrols) {
49752
50180
  return __awaiter(this, void 0, void 0, function () {
49753
50181
  return __generator(this, function (_a) {
49754
- return [2 /*return*/];
50182
+ switch (_a.label) {
50183
+ case 0:
50184
+ // tiền xử lý dữ liệu (ví dụ tổng hợp datasource), trước khi gọi api get detail
50185
+ return [4 /*yield*/, this.getItemPermissionCurrent()];
50186
+ case 1:
50187
+ // tiền xử lý dữ liệu (ví dụ tổng hợp datasource), trước khi gọi api get detail
50188
+ _a.sent();
50189
+ return [2 /*return*/];
50190
+ }
49755
50191
  });
49756
50192
  });
49757
50193
  };
49758
- WorkflowPickerComponent.prototype.afterGetSetting = function () {
49759
- var _this = this;
49760
- if (!this.model.data) {
49761
- this.model.data = {};
49762
- this.model.formState = exports.FormState.ADD;
49763
- }
49764
- else {
49765
- if (this.model.data.workflowCodes) {
49766
- this.model.data._workflowCodes = this.model.data.workflowCodes.split(',');
49767
- this.model.data._workflowCodes.forEach(function (wfCode) {
49768
- _this.dicMachinesData[wfCode] = {
49769
- machines: [],
49770
- connections: []
49771
- };
49772
- });
49773
- }
49774
- this.model.formState = exports.FormState.EDIT;
49775
- }
49776
- this.readyCrudForm = true;
49777
- };
49778
- WorkflowPickerComponent.prototype.handleChangeWorkflow = function (evt) {
50194
+ WorkflowPermissionFormComponent.prototype.getItemPermissionCurrent = function () {
49779
50195
  return __awaiter(this, void 0, void 0, function () {
49780
- var dataSourceSelected_1, index, codeDeleted, dataMachines;
49781
- var _this = this;
50196
+ var itemPermission;
49782
50197
  return __generator(this, function (_a) {
49783
50198
  switch (_a.label) {
49784
- case 0:
49785
- if (!(this.model.data._workflowCodes && this.model.data._workflowCodes.length)) return [3 /*break*/, 2];
49786
- dataSourceSelected_1 = evt.formControls['_workflowCodes']._component.dataSourceInternal
49787
- .filter(function (q) { return _this.model.data._workflowCodes.some(function (x) { return x == q.value.code; }); })
49788
- .map(function (q) { return q.value; });
49789
- evt.formControls['workflowCode'].dataSource = dataSourceSelected_1;
49790
- if (!evt.rootModel.workflowCode || !dataSourceSelected_1.some(function (x) { return x.code == evt.rootModel.workflowCode; })) {
49791
- evt.rootModel.workflowCode = this.model.data._workflowCodes[0];
49792
- }
49793
- else {
49794
- index = this.model.data._workflowCodes.findIndex(function (q) { return q == evt.rootModel.workflowCode; });
49795
- if (index > 0) {
49796
- codeDeleted = this.model.data._workflowCodes.splice(index, 1);
49797
- this.model.data._workflowCodes.unshift(codeDeleted);
49798
- evt.rootModel._workflowCodes = this.model.data._workflowCodes;
49799
- }
49800
- }
49801
- this.model.data._workflowCodes.forEach(function (wfCode) {
49802
- _this.dicMachinesData[wfCode] = {
49803
- ten: dataSourceSelected_1.find(function (q) { return q.code == wfCode; }).title,
49804
- machines: [],
49805
- connections: []
49806
- };
49807
- });
49808
- return [4 /*yield*/, this._stateMachinesService.getAll([
49809
- this.newFilter('code', exports.Operator.in, this.model.data._workflowCodes)
49810
- ])];
50199
+ case 0: return [4 /*yield*/, this._workflowPermissionDetailService.changeEndpoint(this.businessSetting.baseService)
50200
+ .getDetailByFilter([
50201
+ this.newFilter('itemId', exports.Operator.equal, this.itemId),
50202
+ this.newFilter('userId', exports.Operator.equal, this._userService.getId())
50203
+ ])];
49811
50204
  case 1:
49812
- dataMachines = (_a.sent()).data;
49813
- dataMachines.forEach(function (data) {
49814
- _this.dicMachinesData[data.code].machines = [];
49815
- _this.dicMachinesData[data.code].connections = [];
49816
- if (data.data) {
49817
- _this.dicMachinesData[data.code] = Object.assign(Object.assign({}, JSON.parse(data.data)), { ten: data.title });
49818
- }
49819
- });
49820
- return [3 /*break*/, 3];
49821
- case 2:
49822
- evt.formControls['workflowCode'].dataSource = [];
49823
- evt.rootModel.workflowCode = null;
49824
- _a.label = 3;
49825
- case 3: return [2 /*return*/];
50205
+ itemPermission = (_a.sent()).data;
50206
+ if (itemPermission) {
50207
+ this.formControls['lstPermission'].dataSource.forEach(function (item) {
50208
+ if ((itemPermission.permission & item.id) == item.id) {
50209
+ item.disabled = false;
50210
+ }
50211
+ });
50212
+ }
50213
+ return [2 /*return*/];
49826
50214
  }
49827
50215
  });
49828
50216
  });
49829
50217
  };
49830
- WorkflowPickerComponent.prototype.handleChangeWorkflowDefault = function (evt) {
49831
- var _this = this;
49832
- if (!evt.rootModel.workflowCode)
49833
- return;
49834
- if (this.model.data._workflowCodes && this.model.data._workflowCodes.length) {
49835
- var index = this.model.data._workflowCodes.findIndex(function (q) { return q == _this.model.data.workflowCode; });
49836
- if (index > 0) {
49837
- var codeDeleteds = this.model.data._workflowCodes.splice(index, 1);
49838
- this.model.data._workflowCodes.unshift(codeDeleteds[0]);
49839
- var itemDeleteds = evt.rootModel._workflowCodes.splice(index, 1);
49840
- evt.rootModel._workflowCodes.unshift(itemDeleteds[0]);
49841
- }
49842
- }
49843
- };
49844
- WorkflowPickerComponent.prototype.handleCancelWorkflow = function (event) {
49845
- var _this = this;
49846
- this._notifierService.showConfirm('Bạn có chắc chắn muốn hủy bỏ quy trình nghiệp vụ')
49847
- .then(function (res) {
49848
- if (!res)
49849
- return;
49850
- _this._workflowSettingsService.delete(_this.model.data.id)
49851
- .then(function (res) { return _this.handleResponse(res, 'Hủy bỏ quy trình nghiệp vụ thành công', function (f) {
49852
- _this.onSaved.emit();
49853
- }); });
50218
+ WorkflowPermissionFormComponent.prototype.modifyDetailData = function (data) {
50219
+ return __awaiter(this, void 0, void 0, function () {
50220
+ return __generator(this, function (_a) {
50221
+ // xử lý dữ liệu lấy từ get detail về
50222
+ if (data.userIds) {
50223
+ data.userIds = data.userIds.split(',');
50224
+ }
50225
+ if (data.donViIds) {
50226
+ data.donViIds = data.donViIds.split(',');
50227
+ }
50228
+ if (data.groupIds) {
50229
+ data.groupIds = data.groupIds.split(',');
50230
+ }
50231
+ data.lstPermission = [];
50232
+ if (data.permission) {
50233
+ if ((data.permission & exports.PermissionBase.READ)) {
50234
+ data.lstPermission.push(exports.PermissionBase.READ);
50235
+ }
50236
+ if ((data.permission & exports.PermissionBase.EDIT)) {
50237
+ data.lstPermission.push(exports.PermissionBase.EDIT);
50238
+ }
50239
+ if ((data.permission & exports.PermissionBase.DELETE)) {
50240
+ data.lstPermission.push(exports.PermissionBase.DELETE);
50241
+ }
50242
+ }
50243
+ return [2 /*return*/];
50244
+ });
49854
50245
  });
49855
50246
  };
49856
- WorkflowPickerComponent.prototype.onBeforeSave = function () {
49857
- this.model.data.workflowCodes = this.model.data._workflowCodes.toString();
49858
- };
49859
- WorkflowPickerComponent.prototype.handleManualSave = function () {
49860
- this.model.submitting = false;
49861
- this.onSaveSetting.emit(this.model.data);
50247
+ WorkflowPermissionFormComponent.prototype.validateForm = function () {
50248
+ return __awaiter(this, void 0, void 0, function () {
50249
+ var itemMissings;
50250
+ return __generator(this, function (_a) {
50251
+ itemMissings = [];
50252
+ if (!this.isNotNullArray(this.model.data.userIds)
50253
+ && !this.isNotNullArray(this.model.data.donViIds)
50254
+ && !this.isNotNullArray(this.model.data.groupIds)) {
50255
+ itemMissings.push('người muốn phân quyền');
50256
+ }
50257
+ if (!this.isNotNullArray(this.model.data.lstPermission)) {
50258
+ itemMissings.push('quyền muốn phân');
50259
+ }
50260
+ if (itemMissings.length) {
50261
+ this._notifierService.showWarning("B\u1EA1n ph\u1EA3i nh\u1EADp " + itemMissings.join(', '));
50262
+ return [2 /*return*/, false];
50263
+ }
50264
+ return [2 /*return*/, true];
50265
+ });
50266
+ });
49862
50267
  };
49863
- return WorkflowPickerComponent;
49864
- }(DataFormBase));
49865
- WorkflowPickerComponent.decorators = [
49866
- { type: i0.Component, args: [{
49867
- selector: 'workflow-picker',
49868
- template: "<crud-form *ngIf=\"readyCrudForm\" #crudForm [(data)]=\"model.data\" [setting]=\"setting\" [context]=\"context\"\r\n [styleClass]=\"'workflow-setting'\" [disableCaching]=\"true\" (onFormReady)=\"_handleFormReady($event)\">\r\n <ng-template #designer>\r\n <div *ngFor=\"let wfCode of model.data._workflowCodes\">\r\n <div class=\"title-workflow\">\r\n Quy tr\u00ECnh {{dicMachinesData[wfCode].ten}} ({{wfCode}})\r\n <span *ngIf=\"wfCode == model.data.workflowCode\" class=\"pi pi-star\" pTooltip=\"\u0110\u00E2y l\u00E0 quy tr\u00ECnh ch\u00EDnh\"\r\n tooltipPosition=\"top\"></span>\r\n </div>\r\n <div class=\"state-machines-container\">\r\n <statemachines-designer #designer [data]=\"dicMachinesData[wfCode]\" [viewOnly]=\"true\">\r\n </statemachines-designer>\r\n </div>\r\n </div>\r\n </ng-template>\r\n</crud-form>\r\n<div *ngIf=\"showButtonSave\" class=\"container-button-workflow\">\r\n <button type=\"button\" pButton icon=\"pi pi-save\" class=\"p-button-text\" [label]=\"'L\u01B0u c\u1EA5u h\u00ECnh' | translate\"\r\n (click)=\"_handleSave($event)\"></button>\r\n</div>",
49869
- providers: [ComponentContextService],
49870
- styles: [".title-workflow{font-size:.9em;font-weight:700;padding:1em 0 .5em}.title-workflow .pi-star{color:orange}.state-machines-container{border:1px solid #ced4da;border-radius:3px}.container-button-workflow{background:#fff;border-top:1px solid #ddd;bottom:0;padding:.5em;position:-webkit-sticky;position:sticky;text-align:right;z-index:10}"]
49871
- },] }
49872
- ];
49873
- WorkflowPickerComponent.ctorParameters = function () { return [
49874
- { type: i0.Injector },
49875
- { type: WorkflowSettingsService },
49876
- { type: StateMachinesService }
49877
- ]; };
49878
- WorkflowPickerComponent.propDecorators = {
49879
- parentSetting: [{ type: i0.Input }],
49880
- data: [{ type: i0.Input }],
49881
- showButtonSave: [{ type: i0.Input }],
49882
- onSaved: [{ type: i0.Output }],
50268
+ WorkflowPermissionFormComponent.prototype.onBeforeSave = function () {
50269
+ this.model.data.tableName = this.businessSetting.baseService.entityName;
50270
+ this.model.data.workflowCode = DummyWorkflowCode;
50271
+ this.model.data.itemId = this.itemId;
50272
+ if (this.model.data.userIds) {
50273
+ this.model.data.userIds = this.model.data.userIds.toString();
50274
+ }
50275
+ if (this.model.data.donViIds) {
50276
+ this.model.data.donViIds = this.model.data.donViIds.toString();
50277
+ }
50278
+ if (this.model.data.groupIds) {
50279
+ this.model.data.groupIds = this.model.data.groupIds.toString();
50280
+ }
50281
+ if (this.model.data.lstPermission) {
50282
+ var permission = 0;
50283
+ if (this.model.data.lstPermission & exports.PermissionBase.READ) {
50284
+ permission = permission | exports.PermissionBase.READ;
50285
+ }
50286
+ if (this.model.data.lstPermission & exports.PermissionBase.EDIT) {
50287
+ permission = permission | exports.PermissionBase.EDIT;
50288
+ }
50289
+ if (this.model.data.lstPermission & exports.PermissionBase.DELETE) {
50290
+ permission = permission | exports.PermissionBase.DELETE;
50291
+ }
50292
+ this.model.data.permission = permission;
50293
+ }
50294
+ };
50295
+ WorkflowPermissionFormComponent.prototype.getPromiseActionInsert = function () {
50296
+ return this._workflowPermissionService.insertPermission(this.model.data);
50297
+ };
50298
+ WorkflowPermissionFormComponent.prototype.getPromiseActionUpdate = function () {
50299
+ return this._workflowPermissionService.updatePermission(this.model.data);
50300
+ };
50301
+ return WorkflowPermissionFormComponent;
50302
+ }(DataFormBase));
50303
+ WorkflowPermissionFormComponent.decorators = [
50304
+ { type: i0.Component, args: [{
50305
+ selector: 'workflow-permission-form',
50306
+ template: "<crud-form #crudForm [(data)]=\"model.data\" [setting]=\"setting\" [context]=\"context\" [disableCaching]=\"true\"\r\n (onFormReady)=\"_handleFormReady($event)\">\r\n</crud-form>\r\n<ng-template #buttonTemplate>\r\n <button *ngIf=\"!model.data.__disableEdit && !__isFormView\" type=\"button\" pButton icon=\"pi pi-save\" class=\"p-button-text\"\r\n [label]=\"'FORM.SAVE' | translate\" (click)=\"_handleSave($event)\"></button>\r\n <button type=\"button\" pButton icon=\"pi pi-replay\" class=\"p-button-text p-button-secondary\"\r\n [label]=\"'FORM.CANCEL' | translate\" preventTab (click)=\"_handleCancel($event)\"></button>\r\n</ng-template>\r\n",
50307
+ providers: [ComponentContextService],
50308
+ styles: [""]
50309
+ },] }
50310
+ ];
50311
+ WorkflowPermissionFormComponent.ctorParameters = function () { return [
50312
+ { type: i0.Injector },
50313
+ { type: WorkflowPermissionService },
50314
+ { type: WorkflowPermissionDetailService },
50315
+ { type: UserGroupRealService }
50316
+ ]; };
50317
+ WorkflowPermissionFormComponent.propDecorators = {
50318
+ businessSetting: [{ type: i0.Input }],
50319
+ itemId: [{ type: i0.Input }]
50320
+ };
50321
+
50322
+ var WorkflowPermissionComponent = /** @class */ (function (_super) {
50323
+ __extends(WorkflowPermissionComponent, _super);
50324
+ function WorkflowPermissionComponent(_injector, _workflowPermissionService, _coCauToChucService, _userGroupService) {
50325
+ var _this = _super.call(this, _injector) || this;
50326
+ _this._injector = _injector;
50327
+ _this._workflowPermissionService = _workflowPermissionService;
50328
+ _this._coCauToChucService = _coCauToChucService;
50329
+ _this._userGroupService = _userGroupService;
50330
+ _this.searchSchema = {};
50331
+ _this.searchData = {};
50332
+ return _this;
50333
+ }
50334
+ WorkflowPermissionComponent.prototype.ngOnInit = function () {
50335
+ this.setting.baseService = this._workflowPermissionService;
50336
+ this._workflowPermissionService.changeEndpoint(this.businessSetting.baseService);
50337
+ this.setting.title = '';
50338
+ this.setting.disableShare = true;
50339
+ this.setting.hiddenSettingPermission = true;
50340
+ this.setting.hiddenSettingWorkflow = true;
50341
+ this.setting.hiddenSettingWorkflowNew = true;
50342
+ this.setting.modelSchemas = [
50343
+ new ModelSchema({ field: 'userIds', name: 'Người dùng', fullName: 'Người dùng', description: 'Người dùng' }),
50344
+ new ModelSchema({ field: 'donViIds', name: 'Đơn vị', fullName: 'Đơn vị', description: 'Đơn vị' }),
50345
+ new ModelSchema({ field: 'groupIds', name: 'Nhóm người dùng', fullName: 'Nhóm người dùng', description: 'Nhóm người dùng' }),
50346
+ new ModelSchema({ field: 'permission', dataType: 'boolean', name: 'Sử dụng', fullName: 'Sử dụng', description: 'Sử dụng' })
50347
+ ];
50348
+ this.setting.cols = [
50349
+ new ColumnSchemaBase({
50350
+ field: 'userIds',
50351
+ baseService: this._userService,
50352
+ displayField: 'fullNameNew',
50353
+ fieldPlus: 'userName',
50354
+ multiple: true
50355
+ }),
50356
+ new ColumnSchemaBase({
50357
+ field: 'donViIds',
50358
+ baseService: this._coCauToChucService,
50359
+ multiple: true,
50360
+ }),
50361
+ new ColumnSchemaBase({
50362
+ field: 'groupIds',
50363
+ baseService: this._userGroupService,
50364
+ displayField: 'name',
50365
+ multiple: true,
50366
+ }),
50367
+ new ColumnSchemaBase({
50368
+ field: 'permissions',
50369
+ label: 'Quyền hiện tại'
50370
+ })
50371
+ ];
50372
+ this.setting.objectName = ' quyền bản ghi';
50373
+ _super.prototype.ngOnInit.call(this);
50374
+ };
50375
+ WorkflowPermissionComponent.prototype.modifyGridInfo = function (gridInfo) {
50376
+ return __awaiter(this, void 0, void 0, function () {
50377
+ return __generator(this, function (_a) {
50378
+ gridInfo.filters.push(this.newFilter('itemId', exports.Operator.equal, this.item.id), this.newFilterContainer('or', this.newFilterContainer('and', this.newFilter('userIds', exports.Operator.isNotNull, '1'), this.newFilter('userIds', exports.Operator.notEqual, '')), this.newFilterContainer('and', this.newFilter('donViIds', exports.Operator.isNotNull, '1'), this.newFilter('donViIds', exports.Operator.notEqual, '')), this.newFilterContainer('and', this.newFilter('groupIds', exports.Operator.isNotNull, '1'), this.newFilter('groupIds', exports.Operator.notEqual, ''))));
50379
+ return [2 /*return*/];
50380
+ });
50381
+ });
50382
+ };
50383
+ WorkflowPermissionComponent.prototype.beforeRenderDataSource = function (dataSource) {
50384
+ return __awaiter(this, void 0, void 0, function () {
50385
+ var userId;
50386
+ return __generator(this, function (_a) {
50387
+ userId = this._userService.getId();
50388
+ dataSource.forEach(function (item) {
50389
+ item.__disableEdit = item.type != exports.EnumPermissionType.SHARE || item.userIdCreated != userId;
50390
+ item.__disableDelete = item.type != exports.EnumPermissionType.SHARE || item.userIdCreated != userId;
50391
+ if (!item.permission)
50392
+ return;
50393
+ var strPermission = '';
50394
+ if ((item.permission & exports.PermissionBase.READ) == exports.PermissionBase.READ)
50395
+ strPermission += 'xem, ';
50396
+ if ((item.permission & exports.PermissionBase.EDIT) == exports.PermissionBase.EDIT)
50397
+ strPermission += 'sửa, ';
50398
+ if ((item.permission & exports.PermissionBase.DELETE) == exports.PermissionBase.DELETE)
50399
+ strPermission += 'xóa, ';
50400
+ if (strPermission.length) {
50401
+ strPermission = strPermission.charAt(0).toUpperCase() + strPermission.substring(1, strPermission.length - 2);
50402
+ }
50403
+ item.permissions = strPermission;
50404
+ });
50405
+ return [2 /*return*/];
50406
+ });
50407
+ });
50408
+ };
50409
+ WorkflowPermissionComponent.prototype.handleDelete = function (rowData) {
50410
+ var _this = this;
50411
+ this._notifierService.showConfirm('Bạn có chắc chắn muốn xóa phân quyền')
50412
+ .then(function (res) {
50413
+ if (!res)
50414
+ return;
50415
+ _this._workflowPermissionService.deletePermission(rowData.id)
50416
+ .then(function (res) { return _this.handleResponse(res, '', function (f) {
50417
+ _this._triggerProcessData();
50418
+ }); });
50419
+ });
50420
+ };
50421
+ return WorkflowPermissionComponent;
50422
+ }(DataListBase));
50423
+ WorkflowPermissionComponent.decorators = [
50424
+ { type: i0.Component, args: [{
50425
+ selector: 'workflow-permission',
50426
+ template: "<crud-list #crudList [model]=\"model\" [setting]=\"setting\" [dataSource]=\"model.dataSource\"\r\n (onCopyLink)=\"_copyLink($event)\" (onCopyLinkMultiple)=\"_copyLinkMultiple()\" (onReload)=\"_triggerProcessData($event)\"\r\n (onAdd)=\"_add($event)\" (onEdit)=\"_edit($event)\" (onView)=\"_view($event)\" (onDelete)=\"handleDelete($event)\"\r\n (onDeleteMultiple)=\"_deleteMultiple($event)\" (onReloaded)=\"_unmarkLoading()\">\r\n</crud-list>\r\n\r\n<tn-dialog *ngIf=\"showDetailForm\" #dialog [styleClass]=\"'workflow-permission-form tn-form-dialog'\"\r\n [header]=\"setting.popupHeader | translate\" [popupSize]=\"setting.popupSize\" (onHide)=\"showDetailForm = false\">\r\n <workflow-permission-form #formBase [itemId]=\"item.id\" [businessSetting]=\"businessSetting\" [parentModel]=\"model\"\r\n [parentContext]=\"context\" [model]=\"formModel\" (onSaved)=\"showDetailForm = false;crudList.reload()\"\r\n (onCancel)=\"_handleCancel($event)\">\r\n </workflow-permission-form>\r\n</tn-dialog>",
50427
+ styles: [""]
50428
+ },] }
50429
+ ];
50430
+ WorkflowPermissionComponent.ctorParameters = function () { return [
50431
+ { type: i0.Injector },
50432
+ { type: WorkflowPermissionService },
50433
+ { type: CoCauToChucService },
50434
+ { type: UserGroupRealService }
50435
+ ]; };
50436
+ WorkflowPermissionComponent.propDecorators = {
50437
+ businessSetting: [{ type: i0.Input }],
50438
+ item: [{ type: i0.Input }]
50439
+ };
50440
+
50441
+ var WorkflowPickerComponent = /** @class */ (function (_super) {
50442
+ __extends(WorkflowPickerComponent, _super);
50443
+ function WorkflowPickerComponent(_injector, _workflowSettingsService, _stateMachinesService) {
50444
+ var _this = _super.call(this, _injector) || this;
50445
+ _this._injector = _injector;
50446
+ _this._workflowSettingsService = _workflowSettingsService;
50447
+ _this._stateMachinesService = _stateMachinesService;
50448
+ _this.showButtonSave = false;
50449
+ _this.onSaved = new i0.EventEmitter();
50450
+ _this.onCancel = new i0.EventEmitter();
50451
+ _this.onSaveSetting = new i0.EventEmitter();
50452
+ _this.dicMachinesData = {};
50453
+ _this.readyCrudForm = false;
50454
+ _this.autoGetDetail = false;
50455
+ _this.autoSave = false;
50456
+ return _this;
50457
+ }
50458
+ WorkflowPickerComponent.prototype.ngOnInit = function () {
50459
+ var _this = this;
50460
+ this.setting.baseService = this._workflowSettingsService;
50461
+ this.setting.schema = [
50462
+ new DropdownControlSchema({
50463
+ field: '_workflowCodes',
50464
+ label: 'Danh sách quy trình',
50465
+ multiple: true,
50466
+ baseService: this._stateMachinesService,
50467
+ valueField: 'code',
50468
+ displayField: 'title',
50469
+ onChanged: function (evt) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
50470
+ switch (_a.label) {
50471
+ case 0: return [4 /*yield*/, this.handleChangeWorkflow(evt)];
50472
+ case 1: return [2 /*return*/, _a.sent()];
50473
+ }
50474
+ }); }); },
50475
+ onAdjustedValue: function (evt) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
50476
+ switch (_a.label) {
50477
+ case 0: return [4 /*yield*/, this.handleChangeWorkflow(evt)];
50478
+ case 1: return [2 /*return*/, _a.sent()];
50479
+ }
50480
+ }); }); },
50481
+ required: true
50482
+ // onReady: async (evt: EventData) => await this.handleChangeWorkflow(evt)
50483
+ }),
50484
+ new DropdownControlSchema({
50485
+ field: 'workflowCode',
50486
+ label: 'Quy trình mặc định',
50487
+ valueField: 'code',
50488
+ displayField: 'title',
50489
+ onChanged: function (evt) { return _this.handleChangeWorkflowDefault(evt); }
50490
+ }),
50491
+ new CustomControlSchema({
50492
+ field: 'designer',
50493
+ label: this._translateService.instant('Sơ đồ trạng thái'),
50494
+ mdWidth: 12
50495
+ })
50496
+ ];
50497
+ this.model.data = this.data;
50498
+ this.afterGetSetting();
50499
+ _super.prototype.ngOnInit.call(this);
50500
+ };
50501
+ WorkflowPickerComponent.prototype.onFormInitialized = function (evt) {
50502
+ return __awaiter(this, void 0, void 0, function () {
50503
+ return __generator(this, function (_a) {
50504
+ return [2 /*return*/];
50505
+ });
50506
+ });
50507
+ };
50508
+ WorkflowPickerComponent.prototype.afterGetSetting = function () {
50509
+ var _this = this;
50510
+ if (!this.model.data) {
50511
+ this.model.data = {};
50512
+ this.model.formState = exports.FormState.ADD;
50513
+ }
50514
+ else {
50515
+ if (this.model.data.workflowCodes) {
50516
+ this.model.data._workflowCodes = this.model.data.workflowCodes.split(',');
50517
+ this.model.data._workflowCodes.forEach(function (wfCode) {
50518
+ _this.dicMachinesData[wfCode] = {
50519
+ machines: [],
50520
+ connections: []
50521
+ };
50522
+ });
50523
+ }
50524
+ this.model.formState = exports.FormState.EDIT;
50525
+ }
50526
+ this.readyCrudForm = true;
50527
+ };
50528
+ WorkflowPickerComponent.prototype.handleChangeWorkflow = function (evt) {
50529
+ return __awaiter(this, void 0, void 0, function () {
50530
+ var dataSourceSelected_1, index, codeDeleted, dataMachines;
50531
+ var _this = this;
50532
+ return __generator(this, function (_a) {
50533
+ switch (_a.label) {
50534
+ case 0:
50535
+ if (!(this.model.data._workflowCodes && this.model.data._workflowCodes.length)) return [3 /*break*/, 2];
50536
+ dataSourceSelected_1 = evt.formControls['_workflowCodes']._component.dataSourceInternal
50537
+ .filter(function (q) { return _this.model.data._workflowCodes.some(function (x) { return x == q.value.code; }); })
50538
+ .map(function (q) { return q.value; });
50539
+ evt.formControls['workflowCode'].dataSource = dataSourceSelected_1;
50540
+ if (!evt.rootModel.workflowCode || !dataSourceSelected_1.some(function (x) { return x.code == evt.rootModel.workflowCode; })) {
50541
+ evt.rootModel.workflowCode = this.model.data._workflowCodes[0];
50542
+ }
50543
+ else {
50544
+ index = this.model.data._workflowCodes.findIndex(function (q) { return q == evt.rootModel.workflowCode; });
50545
+ if (index > 0) {
50546
+ codeDeleted = this.model.data._workflowCodes.splice(index, 1);
50547
+ this.model.data._workflowCodes.unshift(codeDeleted);
50548
+ evt.rootModel._workflowCodes = this.model.data._workflowCodes;
50549
+ }
50550
+ }
50551
+ this.model.data._workflowCodes.forEach(function (wfCode) {
50552
+ _this.dicMachinesData[wfCode] = {
50553
+ ten: dataSourceSelected_1.find(function (q) { return q.code == wfCode; }).title,
50554
+ machines: [],
50555
+ connections: []
50556
+ };
50557
+ });
50558
+ return [4 /*yield*/, this._stateMachinesService.getAll([
50559
+ this.newFilter('code', exports.Operator.in, this.model.data._workflowCodes)
50560
+ ])];
50561
+ case 1:
50562
+ dataMachines = (_a.sent()).data;
50563
+ dataMachines.forEach(function (data) {
50564
+ _this.dicMachinesData[data.code].machines = [];
50565
+ _this.dicMachinesData[data.code].connections = [];
50566
+ if (data.data) {
50567
+ _this.dicMachinesData[data.code] = Object.assign(Object.assign({}, JSON.parse(data.data)), { ten: data.title });
50568
+ }
50569
+ });
50570
+ return [3 /*break*/, 3];
50571
+ case 2:
50572
+ evt.formControls['workflowCode'].dataSource = [];
50573
+ evt.rootModel.workflowCode = null;
50574
+ _a.label = 3;
50575
+ case 3: return [2 /*return*/];
50576
+ }
50577
+ });
50578
+ });
50579
+ };
50580
+ WorkflowPickerComponent.prototype.handleChangeWorkflowDefault = function (evt) {
50581
+ var _this = this;
50582
+ if (!evt.rootModel.workflowCode)
50583
+ return;
50584
+ if (this.model.data._workflowCodes && this.model.data._workflowCodes.length) {
50585
+ var index = this.model.data._workflowCodes.findIndex(function (q) { return q == _this.model.data.workflowCode; });
50586
+ if (index > 0) {
50587
+ var codeDeleteds = this.model.data._workflowCodes.splice(index, 1);
50588
+ this.model.data._workflowCodes.unshift(codeDeleteds[0]);
50589
+ var itemDeleteds = evt.rootModel._workflowCodes.splice(index, 1);
50590
+ evt.rootModel._workflowCodes.unshift(itemDeleteds[0]);
50591
+ }
50592
+ }
50593
+ };
50594
+ WorkflowPickerComponent.prototype.handleCancelWorkflow = function (event) {
50595
+ var _this = this;
50596
+ this._notifierService.showConfirm('Bạn có chắc chắn muốn hủy bỏ quy trình nghiệp vụ')
50597
+ .then(function (res) {
50598
+ if (!res)
50599
+ return;
50600
+ _this._workflowSettingsService.delete(_this.model.data.id)
50601
+ .then(function (res) { return _this.handleResponse(res, 'Hủy bỏ quy trình nghiệp vụ thành công', function (f) {
50602
+ _this.onSaved.emit();
50603
+ }); });
50604
+ });
50605
+ };
50606
+ WorkflowPickerComponent.prototype.onBeforeSave = function () {
50607
+ this.model.data.workflowCodes = this.model.data._workflowCodes.toString();
50608
+ };
50609
+ WorkflowPickerComponent.prototype.handleManualSave = function () {
50610
+ this.model.submitting = false;
50611
+ this.onSaveSetting.emit(this.model.data);
50612
+ };
50613
+ return WorkflowPickerComponent;
50614
+ }(DataFormBase));
50615
+ WorkflowPickerComponent.decorators = [
50616
+ { type: i0.Component, args: [{
50617
+ selector: 'workflow-picker',
50618
+ template: "<crud-form *ngIf=\"readyCrudForm\" #crudForm [(data)]=\"model.data\" [setting]=\"setting\" [context]=\"context\"\r\n [styleClass]=\"'workflow-setting'\" [disableCaching]=\"true\" (onFormReady)=\"_handleFormReady($event)\">\r\n <ng-template #designer>\r\n <div *ngFor=\"let wfCode of model.data._workflowCodes\">\r\n <div class=\"title-workflow\">\r\n Quy tr\u00ECnh {{dicMachinesData[wfCode].ten}} ({{wfCode}})\r\n <span *ngIf=\"wfCode == model.data.workflowCode\" class=\"pi pi-star\" pTooltip=\"\u0110\u00E2y l\u00E0 quy tr\u00ECnh ch\u00EDnh\"\r\n tooltipPosition=\"top\"></span>\r\n </div>\r\n <div class=\"state-machines-container\">\r\n <statemachines-designer #designer [data]=\"dicMachinesData[wfCode]\" [viewOnly]=\"true\">\r\n </statemachines-designer>\r\n </div>\r\n </div>\r\n </ng-template>\r\n</crud-form>\r\n<div *ngIf=\"showButtonSave\" class=\"container-button-workflow\">\r\n <button type=\"button\" pButton icon=\"pi pi-save\" class=\"p-button-text\" [label]=\"'L\u01B0u c\u1EA5u h\u00ECnh' | translate\"\r\n (click)=\"_handleSave($event)\"></button>\r\n</div>",
50619
+ providers: [ComponentContextService],
50620
+ styles: [".title-workflow{font-size:.9em;font-weight:700;padding:1em 0 .5em}.title-workflow .pi-star{color:orange}.state-machines-container{border:1px solid #ced4da;border-radius:3px}.container-button-workflow{background:#fff;border-top:1px solid #ddd;bottom:0;padding:.5em;position:-webkit-sticky;position:sticky;text-align:right;z-index:10}"]
50621
+ },] }
50622
+ ];
50623
+ WorkflowPickerComponent.ctorParameters = function () { return [
50624
+ { type: i0.Injector },
50625
+ { type: WorkflowSettingsService },
50626
+ { type: StateMachinesService }
50627
+ ]; };
50628
+ WorkflowPickerComponent.propDecorators = {
50629
+ parentSetting: [{ type: i0.Input }],
50630
+ data: [{ type: i0.Input }],
50631
+ showButtonSave: [{ type: i0.Input }],
50632
+ onSaved: [{ type: i0.Output }],
49883
50633
  onCancel: [{ type: i0.Output }],
49884
50634
  onSaveSetting: [{ type: i0.Output }]
49885
50635
  };
@@ -52129,7 +52879,7 @@
52129
52879
  this.setting.cols = [
52130
52880
  new ColumnSchemaBase({
52131
52881
  field: 'code',
52132
- width: '120px',
52882
+ width: '150px',
52133
52883
  sort: false
52134
52884
  }),
52135
52885
  new ColumnSchemaBase({
@@ -52143,6 +52893,9 @@
52143
52893
  this.setting.objectName = ' loại công việc';
52144
52894
  _super.prototype.ngOnInit.call(this);
52145
52895
  };
52896
+ BaseDmLoaiCongViecComponent.prototype.getPromiseGetData = function (gridInfo) {
52897
+ return this._dmLoaiCongViecService.baseGetTreeData(gridInfo);
52898
+ };
52146
52899
  BaseDmLoaiCongViecComponent.prototype.modifyGridInfo = function (gridInfo) {
52147
52900
  return __awaiter(this, void 0, void 0, function () {
52148
52901
  return __generator(this, function (_a) {
@@ -52154,7 +52907,7 @@
52154
52907
  };
52155
52908
  BaseDmLoaiCongViecComponent.prototype.beforeRenderDataSource = function (dataSource) {
52156
52909
  return __awaiter(this, void 0, void 0, function () {
52157
- var lstParent, itemParentBefore, itemLastChild, dicParentChild;
52910
+ var lstParent, itemParentBefore, itemLastChild, dicParentChild, i;
52158
52911
  var _this = this;
52159
52912
  return __generator(this, function (_a) {
52160
52913
  lstParent = [];
@@ -52225,7 +52978,9 @@
52225
52978
  lstParent.forEach(function (itemParent) {
52226
52979
  itemParent.isLast = true;
52227
52980
  });
52228
- this.setIsLastParentForChild(dicParentChild, lstParent[lstParent.length - 1], dataSource);
52981
+ for (i = lstParent.length - 1; i >= 0; i--) {
52982
+ this.setIsLastParentForChild(dicParentChild, lstParent[i], dataSource);
52983
+ }
52229
52984
  }
52230
52985
  if (itemLastChild != null) {
52231
52986
  itemLastChild.isLast = true;
@@ -53909,732 +54664,6 @@
53909
54664
  { type: UserService }
53910
54665
  ]; };
53911
54666
 
53912
- var WorkflowPermissionComponent = /** @class */ (function (_super) {
53913
- __extends(WorkflowPermissionComponent, _super);
53914
- function WorkflowPermissionComponent(_injector, _workflowPermissionService, _coCauToChucService, _userGroupService) {
53915
- var _this = _super.call(this, _injector) || this;
53916
- _this._injector = _injector;
53917
- _this._workflowPermissionService = _workflowPermissionService;
53918
- _this._coCauToChucService = _coCauToChucService;
53919
- _this._userGroupService = _userGroupService;
53920
- _this.searchSchema = {};
53921
- _this.searchData = {};
53922
- return _this;
53923
- }
53924
- WorkflowPermissionComponent.prototype.ngOnInit = function () {
53925
- this.setting.baseService = this._workflowPermissionService;
53926
- this._workflowPermissionService.changeEndpoint(this.businessSetting.baseService);
53927
- this.setting.title = '';
53928
- this.setting.disableShare = true;
53929
- this.setting.hiddenSettingPermission = true;
53930
- this.setting.hiddenSettingWorkflow = true;
53931
- this.setting.hiddenSettingWorkflowNew = true;
53932
- this.setting.modelSchemas = [
53933
- new ModelSchema({ field: 'userIds', name: 'Người dùng', fullName: 'Người dùng', description: 'Người dùng' }),
53934
- new ModelSchema({ field: 'donViIds', name: 'Đơn vị', fullName: 'Đơn vị', description: 'Đơn vị' }),
53935
- new ModelSchema({ field: 'groupIds', name: 'Nhóm người dùng', fullName: 'Nhóm người dùng', description: 'Nhóm người dùng' }),
53936
- new ModelSchema({ field: 'permission', dataType: 'boolean', name: 'Sử dụng', fullName: 'Sử dụng', description: 'Sử dụng' })
53937
- ];
53938
- this.setting.cols = [
53939
- new ColumnSchemaBase({
53940
- field: 'userIds',
53941
- baseService: this._userService,
53942
- displayField: 'fullNameNew',
53943
- fieldPlus: 'userName',
53944
- multiple: true
53945
- }),
53946
- new ColumnSchemaBase({
53947
- field: 'donViIds',
53948
- baseService: this._coCauToChucService,
53949
- multiple: true,
53950
- }),
53951
- new ColumnSchemaBase({
53952
- field: 'groupIds',
53953
- baseService: this._userGroupService,
53954
- displayField: 'name',
53955
- multiple: true,
53956
- }),
53957
- new ColumnSchemaBase({
53958
- field: 'permissions',
53959
- label: 'Quyền hiện tại'
53960
- })
53961
- ];
53962
- this.setting.objectName = ' quyền bản ghi';
53963
- _super.prototype.ngOnInit.call(this);
53964
- };
53965
- WorkflowPermissionComponent.prototype.modifyGridInfo = function (gridInfo) {
53966
- return __awaiter(this, void 0, void 0, function () {
53967
- return __generator(this, function (_a) {
53968
- gridInfo.filters.push(this.newFilter('itemId', exports.Operator.equal, this.item.id), this.newFilterContainer('or', this.newFilterContainer('and', this.newFilter('userIds', exports.Operator.isNotNull, '1'), this.newFilter('userIds', exports.Operator.notEqual, '')), this.newFilterContainer('and', this.newFilter('donViIds', exports.Operator.isNotNull, '1'), this.newFilter('donViIds', exports.Operator.notEqual, '')), this.newFilterContainer('and', this.newFilter('groupIds', exports.Operator.isNotNull, '1'), this.newFilter('groupIds', exports.Operator.notEqual, ''))));
53969
- return [2 /*return*/];
53970
- });
53971
- });
53972
- };
53973
- WorkflowPermissionComponent.prototype.beforeRenderDataSource = function (dataSource) {
53974
- return __awaiter(this, void 0, void 0, function () {
53975
- var userId;
53976
- return __generator(this, function (_a) {
53977
- userId = this._userService.getId();
53978
- dataSource.forEach(function (item) {
53979
- item.__disableEdit = item.type != exports.EnumPermissionType.SHARE || item.userIdCreated != userId;
53980
- item.__disableDelete = item.type != exports.EnumPermissionType.SHARE || item.userIdCreated != userId;
53981
- if (!item.permission)
53982
- return;
53983
- var strPermission = '';
53984
- if ((item.permission & exports.PermissionBase.READ) == exports.PermissionBase.READ)
53985
- strPermission += 'xem, ';
53986
- if ((item.permission & exports.PermissionBase.EDIT) == exports.PermissionBase.EDIT)
53987
- strPermission += 'sửa, ';
53988
- if ((item.permission & exports.PermissionBase.DELETE) == exports.PermissionBase.DELETE)
53989
- strPermission += 'xóa, ';
53990
- if (strPermission.length) {
53991
- strPermission = strPermission.charAt(0).toUpperCase() + strPermission.substring(1, strPermission.length - 2);
53992
- }
53993
- item.permissions = strPermission;
53994
- });
53995
- return [2 /*return*/];
53996
- });
53997
- });
53998
- };
53999
- WorkflowPermissionComponent.prototype.handleDelete = function (rowData) {
54000
- var _this = this;
54001
- this._notifierService.showConfirm('Bạn có chắc chắn muốn xóa phân quyền')
54002
- .then(function (res) {
54003
- if (!res)
54004
- return;
54005
- _this._workflowPermissionService.deletePermission(rowData.id)
54006
- .then(function (res) { return _this.handleResponse(res, '', function (f) {
54007
- _this._triggerProcessData();
54008
- }); });
54009
- });
54010
- };
54011
- return WorkflowPermissionComponent;
54012
- }(DataListBase));
54013
- WorkflowPermissionComponent.decorators = [
54014
- { type: i0.Component, args: [{
54015
- selector: 'workflow-permission',
54016
- template: "<crud-list #crudList [model]=\"model\" [setting]=\"setting\" [dataSource]=\"model.dataSource\"\r\n (onCopyLink)=\"_copyLink($event)\" (onCopyLinkMultiple)=\"_copyLinkMultiple()\" (onReload)=\"_triggerProcessData($event)\"\r\n (onAdd)=\"_add($event)\" (onEdit)=\"_edit($event)\" (onView)=\"_view($event)\" (onDelete)=\"handleDelete($event)\"\r\n (onDeleteMultiple)=\"_deleteMultiple($event)\" (onReloaded)=\"_unmarkLoading()\">\r\n</crud-list>\r\n\r\n<tn-dialog *ngIf=\"showDetailForm\" #dialog [styleClass]=\"'workflow-permission-form tn-form-dialog'\"\r\n [header]=\"setting.popupHeader | translate\" [popupSize]=\"setting.popupSize\" (onHide)=\"showDetailForm = false\">\r\n <workflow-permission-form #formBase [itemId]=\"item.id\" [businessSetting]=\"businessSetting\" [parentModel]=\"model\"\r\n [parentContext]=\"context\" [model]=\"formModel\" (onSaved)=\"showDetailForm = false;crudList.reload()\"\r\n (onCancel)=\"_handleCancel($event)\">\r\n </workflow-permission-form>\r\n</tn-dialog>",
54017
- styles: [""]
54018
- },] }
54019
- ];
54020
- WorkflowPermissionComponent.ctorParameters = function () { return [
54021
- { type: i0.Injector },
54022
- { type: WorkflowPermissionService },
54023
- { type: CoCauToChucService },
54024
- { type: UserGroupRealService }
54025
- ]; };
54026
- WorkflowPermissionComponent.propDecorators = {
54027
- businessSetting: [{ type: i0.Input }],
54028
- item: [{ type: i0.Input }]
54029
- };
54030
-
54031
- var WorkflowPermissionFormComponent = /** @class */ (function (_super) {
54032
- __extends(WorkflowPermissionFormComponent, _super);
54033
- function WorkflowPermissionFormComponent(_injector, _workflowPermissionService, _workflowPermissionDetailService, _userGroupService) {
54034
- var _this = _super.call(this, _injector) || this;
54035
- _this._injector = _injector;
54036
- _this._workflowPermissionService = _workflowPermissionService;
54037
- _this._workflowPermissionDetailService = _workflowPermissionDetailService;
54038
- _this._userGroupService = _userGroupService;
54039
- return _this;
54040
- }
54041
- WorkflowPermissionFormComponent.prototype.ngOnInit = function () {
54042
- _super.prototype.ngOnInit.call(this);
54043
- this.setting.baseService = this._workflowPermissionService;
54044
- this._workflowPermissionService.changeEndpoint(this.businessSetting.baseService);
54045
- var dataSourcePermission = DataSourcePermissionBase.map(function (q) { return (Object.assign(Object.assign({}, q), { disabled: true })); });
54046
- this.setting.schema = [
54047
- this._createUserPickerControl('userIds', 'Người dùng'),
54048
- this._createCoCauToChucControl('donViIds', 'Đơn vị'),
54049
- this._createUserGroupPickerControl('groupIds', 'Nhóm người dùng'),
54050
- new CheckBoxListControlSchema({
54051
- field: 'lstPermission',
54052
- label: 'Quyền khả dụng',
54053
- dataSource: dataSourcePermission
54054
- })
54055
- ];
54056
- };
54057
- WorkflowPermissionFormComponent.prototype._createUserPickerControl = function (field, label, multiple) {
54058
- if (multiple === void 0) { multiple = true; }
54059
- var control = createUserPickerControl(field, label);
54060
- control.multiple = multiple;
54061
- return control;
54062
- };
54063
- WorkflowPermissionFormComponent.prototype._createCoCauToChucControl = function (field, label) {
54064
- return createOrgPickerControl(field, label);
54065
- };
54066
- WorkflowPermissionFormComponent.prototype._createUserGroupPickerControl = function (field, label) {
54067
- return createUserGroupPickerControl(this._userGroupService, field, label);
54068
- };
54069
- WorkflowPermissionFormComponent.prototype.onFormInitialized = function (constrols) {
54070
- return __awaiter(this, void 0, void 0, function () {
54071
- return __generator(this, function (_a) {
54072
- switch (_a.label) {
54073
- case 0:
54074
- // tiền xử lý dữ liệu (ví dụ tổng hợp datasource), trước khi gọi api get detail
54075
- return [4 /*yield*/, this.getItemPermissionCurrent()];
54076
- case 1:
54077
- // tiền xử lý dữ liệu (ví dụ tổng hợp datasource), trước khi gọi api get detail
54078
- _a.sent();
54079
- return [2 /*return*/];
54080
- }
54081
- });
54082
- });
54083
- };
54084
- WorkflowPermissionFormComponent.prototype.getItemPermissionCurrent = function () {
54085
- return __awaiter(this, void 0, void 0, function () {
54086
- var itemPermission;
54087
- return __generator(this, function (_a) {
54088
- switch (_a.label) {
54089
- case 0: return [4 /*yield*/, this._workflowPermissionDetailService.changeEndpoint(this.businessSetting.baseService)
54090
- .getDetailByFilter([
54091
- this.newFilter('itemId', exports.Operator.equal, this.itemId),
54092
- this.newFilter('userId', exports.Operator.equal, this._userService.getId())
54093
- ])];
54094
- case 1:
54095
- itemPermission = (_a.sent()).data;
54096
- if (itemPermission) {
54097
- this.formControls['lstPermission'].dataSource.forEach(function (item) {
54098
- if ((itemPermission.permission & item.id) == item.id) {
54099
- item.disabled = false;
54100
- }
54101
- });
54102
- }
54103
- return [2 /*return*/];
54104
- }
54105
- });
54106
- });
54107
- };
54108
- WorkflowPermissionFormComponent.prototype.modifyDetailData = function (data) {
54109
- return __awaiter(this, void 0, void 0, function () {
54110
- return __generator(this, function (_a) {
54111
- // xử lý dữ liệu lấy từ get detail về
54112
- if (data.userIds) {
54113
- data.userIds = data.userIds.split(',');
54114
- }
54115
- if (data.donViIds) {
54116
- data.donViIds = data.donViIds.split(',');
54117
- }
54118
- if (data.groupIds) {
54119
- data.groupIds = data.groupIds.split(',');
54120
- }
54121
- data.lstPermission = [];
54122
- if (data.permission) {
54123
- if ((data.permission & exports.PermissionBase.READ)) {
54124
- data.lstPermission.push(exports.PermissionBase.READ);
54125
- }
54126
- if ((data.permission & exports.PermissionBase.EDIT)) {
54127
- data.lstPermission.push(exports.PermissionBase.EDIT);
54128
- }
54129
- if ((data.permission & exports.PermissionBase.DELETE)) {
54130
- data.lstPermission.push(exports.PermissionBase.DELETE);
54131
- }
54132
- }
54133
- return [2 /*return*/];
54134
- });
54135
- });
54136
- };
54137
- WorkflowPermissionFormComponent.prototype.validateForm = function () {
54138
- return __awaiter(this, void 0, void 0, function () {
54139
- var itemMissings;
54140
- return __generator(this, function (_a) {
54141
- itemMissings = [];
54142
- if (!this.isNotNullArray(this.model.data.userIds)
54143
- && !this.isNotNullArray(this.model.data.donViIds)
54144
- && !this.isNotNullArray(this.model.data.groupIds)) {
54145
- itemMissings.push('người muốn phân quyền');
54146
- }
54147
- if (!this.isNotNullArray(this.model.data.lstPermission)) {
54148
- itemMissings.push('quyền muốn phân');
54149
- }
54150
- if (itemMissings.length) {
54151
- this._notifierService.showWarning("B\u1EA1n ph\u1EA3i nh\u1EADp " + itemMissings.join(', '));
54152
- return [2 /*return*/, false];
54153
- }
54154
- return [2 /*return*/, true];
54155
- });
54156
- });
54157
- };
54158
- WorkflowPermissionFormComponent.prototype.onBeforeSave = function () {
54159
- this.model.data.tableName = this.businessSetting.baseService.entityName;
54160
- this.model.data.workflowCode = DummyWorkflowCode;
54161
- this.model.data.itemId = this.itemId;
54162
- if (this.model.data.userIds) {
54163
- this.model.data.userIds = this.model.data.userIds.toString();
54164
- }
54165
- if (this.model.data.donViIds) {
54166
- this.model.data.donViIds = this.model.data.donViIds.toString();
54167
- }
54168
- if (this.model.data.groupIds) {
54169
- this.model.data.groupIds = this.model.data.groupIds.toString();
54170
- }
54171
- if (this.model.data.lstPermission) {
54172
- var permission = 0;
54173
- if (this.model.data.lstPermission & exports.PermissionBase.READ) {
54174
- permission = permission | exports.PermissionBase.READ;
54175
- }
54176
- if (this.model.data.lstPermission & exports.PermissionBase.EDIT) {
54177
- permission = permission | exports.PermissionBase.EDIT;
54178
- }
54179
- if (this.model.data.lstPermission & exports.PermissionBase.DELETE) {
54180
- permission = permission | exports.PermissionBase.DELETE;
54181
- }
54182
- this.model.data.permission = permission;
54183
- }
54184
- };
54185
- WorkflowPermissionFormComponent.prototype.getPromiseActionInsert = function () {
54186
- return this._workflowPermissionService.insertPermission(this.model.data);
54187
- };
54188
- WorkflowPermissionFormComponent.prototype.getPromiseActionUpdate = function () {
54189
- return this._workflowPermissionService.updatePermission(this.model.data);
54190
- };
54191
- return WorkflowPermissionFormComponent;
54192
- }(DataFormBase));
54193
- WorkflowPermissionFormComponent.decorators = [
54194
- { type: i0.Component, args: [{
54195
- selector: 'workflow-permission-form',
54196
- template: "<crud-form #crudForm [(data)]=\"model.data\" [setting]=\"setting\" [context]=\"context\" [disableCaching]=\"true\"\r\n (onFormReady)=\"_handleFormReady($event)\">\r\n</crud-form>\r\n<ng-template #buttonTemplate>\r\n <button *ngIf=\"!model.data.__disableEdit && !__isFormView\" type=\"button\" pButton icon=\"pi pi-save\" class=\"p-button-text\"\r\n [label]=\"'FORM.SAVE' | translate\" (click)=\"_handleSave($event)\"></button>\r\n <button type=\"button\" pButton icon=\"pi pi-replay\" class=\"p-button-text p-button-secondary\"\r\n [label]=\"'FORM.CANCEL' | translate\" preventTab (click)=\"_handleCancel($event)\"></button>\r\n</ng-template>\r\n",
54197
- providers: [ComponentContextService],
54198
- styles: [""]
54199
- },] }
54200
- ];
54201
- WorkflowPermissionFormComponent.ctorParameters = function () { return [
54202
- { type: i0.Injector },
54203
- { type: WorkflowPermissionService },
54204
- { type: WorkflowPermissionDetailService },
54205
- { type: UserGroupRealService }
54206
- ]; };
54207
- WorkflowPermissionFormComponent.propDecorators = {
54208
- businessSetting: [{ type: i0.Input }],
54209
- itemId: [{ type: i0.Input }]
54210
- };
54211
-
54212
- var AppTopBarV2Component = /** @class */ (function (_super) {
54213
- __extends(AppTopBarV2Component, _super);
54214
- function AppTopBarV2Component(
54215
- // public app: AppComponent,
54216
- _customRouteService, _router, _commonService, _authenService, _cd, _injector, _permissionService, _moduleConfigService, _userService, _notifierService, _translateService) {
54217
- var _this = _super.call(this, _injector) || this;
54218
- _this._customRouteService = _customRouteService;
54219
- _this._router = _router;
54220
- _this._commonService = _commonService;
54221
- _this._authenService = _authenService;
54222
- _this._cd = _cd;
54223
- _this._permissionService = _permissionService;
54224
- _this._moduleConfigService = _moduleConfigService;
54225
- _this._userService = _userService;
54226
- _this._notifierService = _notifierService;
54227
- _this._translateService = _translateService;
54228
- _this.defaultAvatar = '';
54229
- _this.key = '';
54230
- _this.currentRoute = '';
54231
- _this.fileApi = '';
54232
- _this.currentUser = null;
54233
- _this.appSwitcherItems = [];
54234
- _this.isFirstTime = false;
54235
- _this.showSettings = false;
54236
- _this.allSubscriptions = [];
54237
- _this.message = '';
54238
- _this.environment = _this._moduleConfigService.getConfig().environment;
54239
- _this.defaultAvatar = _this.environment.appMetadata.main.defaultMaleAvatar;
54240
- _this.fileApi = _this.environment.apiDomain.fileEndpoint;
54241
- if (_this.rootContext.data.currentAppMetadata && _this.rootContext.data.currentAppMetadata.showDefaultSetting != null && _this.rootContext.data.currentAppMetadata.showDefaultSetting != undefined) {
54242
- _this.showDefaultSetting = _this.rootContext.data.currentAppMetadata.showDefaultSetting;
54243
- }
54244
- else {
54245
- if (_this.environment.appMetadata.main.showDefaultSetting != null && _this.environment.appMetadata.main.showDefaultSetting != undefined) {
54246
- _this.showDefaultSetting = _this.environment.appMetadata.main.showDefaultSetting;
54247
- }
54248
- else {
54249
- _this.showDefaultSetting = false;
54250
- }
54251
- }
54252
- if (!_this.rootContext.data.currentUser) {
54253
- _this.rootContext.data.currentUser = {};
54254
- }
54255
- // this.allSubscriptions.push(this.rootContext.subscribe(ComCtxConstants.ROOT.USER_INFO_CHANGED, rs => {
54256
- // this._cd.detectChanges();
54257
- // }));
54258
- _this.rootContext.replaySubscribeOnce(ComCtxConstants.ROOT.USER_LOADED, function (rs) {
54259
- _this.currentUser = _this._userService.getCurrentUser();
54260
- _this.loadMenuMetadata();
54261
- });
54262
- if (_this.rootModel.allowAnonymous) {
54263
- _this.loadMenuMetadata();
54264
- }
54265
- return _this;
54266
- }
54267
- AppTopBarV2Component.prototype.loadMenuMetadata = function () {
54268
- var _this = this;
54269
- var prmsAppSwicherItem = new Promise(function (resolve, reject) { return __awaiter(_this, void 0, void 0, function () {
54270
- var arr, _a, _b, _i, ind, element, clientId, isAuthorized;
54271
- return __generator(this, function (_c) {
54272
- switch (_c.label) {
54273
- case 0:
54274
- arr = [];
54275
- _a = [];
54276
- for (_b in this.environment.appMetadata.appSwitcher)
54277
- _a.push(_b);
54278
- _i = 0;
54279
- _c.label = 1;
54280
- case 1:
54281
- if (!(_i < _a.length)) return [3 /*break*/, 5];
54282
- ind = _a[_i];
54283
- element = this.environment.appMetadata.appSwitcher[ind];
54284
- clientId = this.environment.authenticationSettings.clientId;
54285
- if (!(this.rootContext.data.allowAnonymous && element.allowAnonymous)) return [3 /*break*/, 2];
54286
- arr.push(element);
54287
- return [3 /*break*/, 4];
54288
- case 2:
54289
- if (!this.currentUser) return [3 /*break*/, 4];
54290
- return [4 /*yield*/, this._permissionService.isAuthorized(element.code, (element.code + ".MODULE." + element.code).toUpperCase(), true)];
54291
- case 3:
54292
- isAuthorized = _c.sent();
54293
- if (isAuthorized) {
54294
- arr.push(element);
54295
- }
54296
- _c.label = 4;
54297
- case 4:
54298
- _i++;
54299
- return [3 /*break*/, 1];
54300
- case 5:
54301
- resolve(arr);
54302
- return [2 /*return*/];
54303
- }
54304
- });
54305
- }); });
54306
- prmsAppSwicherItem.then(function (rs) {
54307
- if (rs) {
54308
- var currentUser_1 = _this._userService.getCurrentUser();
54309
- _this.appSwitcherItems.length = 0;
54310
- rs.forEach(function (element) {
54311
- if (element.visible) {
54312
- if (element.allowAnonymous) {
54313
- _this.appSwitcherItems.push(element);
54314
- }
54315
- else {
54316
- if (currentUser_1.maNguoiHoc && currentUser_1.issuperuser && currentUser_1.issuperuser.toLowerCase() != 'true') {
54317
- if (element.code.toLowerCase() == 'sv' || element.code.toLowerCase() == 'user') {
54318
- _this.appSwitcherItems.push(element);
54319
- }
54320
- }
54321
- else {
54322
- _this.appSwitcherItems.push(element);
54323
- }
54324
- }
54325
- }
54326
- });
54327
- }
54328
- });
54329
- };
54330
- AppTopBarV2Component.prototype.ngOnInit = function () {
54331
- var _this = this;
54332
- if (this.rootContext.data.currentUser) {
54333
- if (this.rootContext.data.currentUser.gender == 0) {
54334
- this.defaultAvatar = this.environment.appMetadata.main.defaultFemaleAvatar;
54335
- }
54336
- else {
54337
- this.defaultAvatar = this.environment.appMetadata.main.defaultMaleAvatar;
54338
- }
54339
- this.userProfile = this._userService.getProfileInfo();
54340
- }
54341
- this.rootContext.subscribe(ComCtxConstants.ROOT.BODY_MOUSE_DOWN, function (e) {
54342
- setTimeout(function () {
54343
- _this.hideAdvanceSearch(e);
54344
- });
54345
- });
54346
- this.rootContext.subscribe(ComCtxConstants.ROOT.KEY_DOWN_CTRL_F, function (e) {
54347
- _this.focusToSearchBox();
54348
- });
54349
- this.rootContext.subscribe(ComCtxConstants.COMMON.FORCE_RELOAD, function (e) {
54350
- _this.showNotificationReload();
54351
- });
54352
- this.rootContext.subscribe(ComCtxConstants.COMMON.SHOW_NOTIFY, function (e) {
54353
- _this.setNotify(e.message);
54354
- });
54355
- this.allSubscriptions.push(this.rootContext.subscribe(ComCtxConstants.ROOT_USMART.SHOW_CONFIG_DATA_DEFAULT, function (e) {
54356
- _this.model.dataModelSetting.showSettings = true;
54357
- }));
54358
- this.model.dataModelSetting = {
54359
- data: {},
54360
- showSettings: false
54361
- };
54362
- this.subscribe(ComCtxConstants.COMMON.SAVE_DATA_DEFAULT, function (data) {
54363
- _this.formatDefaultDataSetting(data);
54364
- _this.reloadWindow();
54365
- });
54366
- var stringDataDefault = localStorage.getItem(ComCtxConstants.LOCALSTORAGE_KEY.DEFAULT_DATA);
54367
- if (stringDataDefault) {
54368
- var dataCacheDefault = JSON.parse(stringDataDefault);
54369
- this.formatDefaultDataSetting(dataCacheDefault);
54370
- }
54371
- else {
54372
- this.defaultDataSetting = 'Thiết lập tham số mặc định';
54373
- }
54374
- };
54375
- AppTopBarV2Component.prototype.ngOnDestroy = function () {
54376
- this.allSubscriptions.forEach(function (element) {
54377
- element.unsubscribe();
54378
- });
54379
- if (this.intervalCountdown) {
54380
- clearInterval(this.intervalCountdown);
54381
- }
54382
- _super.prototype.ngOnDestroy.call(this);
54383
- };
54384
- AppTopBarV2Component.prototype.formatDefaultDataSetting = function (data) {
54385
- var _this = this;
54386
- var dataSetting = '';
54387
- var fields = ['instanceIdHeDaoTao', 'heDaoTao', 'namHoc', 'hocKy', 'instanceIdNamHoc', 'instanceIdHocKy', 'idDotThi'];
54388
- var fieldPluses = ['code', 'code', 'ten', 'ten', 'ten', 'ten', 'ten'];
54389
- fields.forEach(function (field, index) {
54390
- if (!_this.checkHidden(field)) {
54391
- var _f = "" + field + fieldPluses[index];
54392
- if (data[_f]) {
54393
- dataSetting += data[_f] + '/';
54394
- }
54395
- }
54396
- });
54397
- if (dataSetting.length > 0) {
54398
- dataSetting = dataSetting.substring(0, dataSetting.length - 1);
54399
- }
54400
- this.defaultDataSetting = dataSetting;
54401
- };
54402
- AppTopBarV2Component.prototype.checkHidden = function (field) {
54403
- return this.rootModel.currentAppMetadata.configDefaultSetting && !this.rootModel.currentAppMetadata.configDefaultSetting.column.some(function (p) { return p.field == field; });
54404
- };
54405
- AppTopBarV2Component.prototype.getCurrentUserFullName = function () {
54406
- return this.rootContext.data.currentUser && this.rootContext.data.currentUser.fullName ? this.rootContext.data.currentUser.fullName : 'Khách';
54407
- };
54408
- AppTopBarV2Component.prototype.getCurrentUserPosition = function () {
54409
- return this.userProfile ? this.userProfile.tenDonVi : null;
54410
- };
54411
- AppTopBarV2Component.prototype.getCurrentUserAvatar = function () {
54412
- if (this.rootContext.data.currentUser && this.rootContext.data.currentUser.avatar) {
54413
- return this.fileApi + "/file/public/" + this.rootContext.data.currentUser.avatar + "/Download";
54414
- }
54415
- else {
54416
- return this.defaultAvatar;
54417
- }
54418
- };
54419
- AppTopBarV2Component.prototype.clearFilter = function (input) {
54420
- var _this = this;
54421
- setTimeout(function () {
54422
- _this.model.searchModel[_this.model.fieldKey] = '';
54423
- _this._customRouteService.updateFragment(_this.model.fieldKey, null);
54424
- _this._customRouteService.updateWithoutFireEvent();
54425
- _this.rootContext.fireEvent(ComCtxConstants.ROOT.ON_SEARCH, _this.model.searchModel);
54426
- input.value = '';
54427
- input.focus();
54428
- _this._cd.detectChanges();
54429
- });
54430
- };
54431
- AppTopBarV2Component.prototype.toggleAdvanceSearch = function (evt) {
54432
- this.rootContext.fireEvent(ComCtxConstants.ROOT.ADVANCE_SEARCH_TOGGLE_BOX, { event: evt });
54433
- evt.preventDefault();
54434
- evt.cancelBubble = true;
54435
- };
54436
- AppTopBarV2Component.prototype.hideAdvanceSearch = function (evt) {
54437
- if (document.getElementById('advance-search-box')) {
54438
- var mask = document.body.querySelectorAll('div[class~="ui-dialog-mask"]');
54439
- if (!mask.length) {
54440
- var closestDropdown = evt.target.closest('.dropdown-advs');
54441
- if (closestDropdown == null || closestDropdown.length == 0) {
54442
- this.rootContext.fireEvent(ComCtxConstants.ROOT.ADVANCE_SEARCH_HIDE_BOX, { event: evt });
54443
- }
54444
- }
54445
- }
54446
- };
54447
- AppTopBarV2Component.prototype.focusToSearchBox = function () {
54448
- if (!document.body.querySelector('div[class~="ui-dialog-mask"]')) {
54449
- this.input.nativeElement.focus();
54450
- }
54451
- };
54452
- AppTopBarV2Component.prototype.onTopbarSearchClick = function (event, input) {
54453
- var _this = this;
54454
- if (!this.model.fieldKey) {
54455
- return;
54456
- }
54457
- setTimeout(function () {
54458
- _this.rootContext.fireEvent(ComCtxConstants.ROOT.ON_SEARCH, _this.model.searchModel);
54459
- _this._customRouteService.updateFragment(_this.model.fieldKey, input.value);
54460
- _this._customRouteService.updateWithoutFireEvent();
54461
- input.focus();
54462
- });
54463
- };
54464
- AppTopBarV2Component.prototype.onEsc = function (event, input) {
54465
- this.clearFilter(input);
54466
- };
54467
- AppTopBarV2Component.prototype.onEnter = function (event, input) {
54468
- this.onTopbarSearchClick(event, input);
54469
- };
54470
- AppTopBarV2Component.prototype.switchApp = function (item, openNewTab) {
54471
- if (openNewTab === void 0) { openNewTab = false; }
54472
- if (item.target == '_blank') {
54473
- if (!item.defaultRedirect) {
54474
- item.defaultRedirect = '';
54475
- }
54476
- // NamNH tip trick cho mot so may bi loi item.url = 'main' -> redirect sai khi click vao cac phan he
54477
- if (item.url == item.defaultRedirect) {
54478
- item.url = '/' + item.code.toLowerCase();
54479
- }
54480
- if (!openNewTab) {
54481
- top.location.href = item.url + "/" + item.defaultRedirect;
54482
- }
54483
- else {
54484
- window.open(item.url + "/" + item.defaultRedirect, '_blank');
54485
- }
54486
- }
54487
- else {
54488
- if (item.defaultRedirect != '' && !this.rootContext.data.flags.menuTopOpenning) {
54489
- this._router.navigateByUrl(item.defaultRedirect);
54490
- this.rootContext.data.currentAppMetadata = this.environment.appMetadata.appSwitcher.find(function (x) { return x.code == item.code; });
54491
- if (this.rootContext.data.currentAppMetadata
54492
- && this.rootContext.data.currentAppMetadata.showDefaultSetting != undefined
54493
- && this.rootContext.data.currentAppMetadata.showDefaultSetting != null) {
54494
- this.showDefaultSetting = this.rootContext.data.currentAppMetadata.showDefaultSetting && this.showDefaultSetting;
54495
- }
54496
- }
54497
- }
54498
- };
54499
- AppTopBarV2Component.prototype.hasAdvanceSearchBox = function () {
54500
- return this.model.searchModel.hasAdvanceSearch;
54501
- };
54502
- AppTopBarV2Component.prototype.isAdvanceSearching = function () {
54503
- return this.hasAdvanceSearchValue(this.model.searchModel);
54504
- };
54505
- AppTopBarV2Component.prototype.hasAdvanceSearchValue = function (obj) {
54506
- for (var key in obj) {
54507
- if (key === '_k' || key === 'hasAdvanceSearch') {
54508
- continue;
54509
- }
54510
- if (obj[key] != null && obj[key] != '') {
54511
- return false;
54512
- }
54513
- }
54514
- return true;
54515
- };
54516
- AppTopBarV2Component.prototype.getComponentId = function () {
54517
- return 'TOPBAR';
54518
- };
54519
- AppTopBarV2Component.prototype.goToHome = function () {
54520
- this.rootContext.fireEvent('GO_HOME');
54521
- };
54522
- AppTopBarV2Component.prototype.onEditInfo = function (event) {
54523
- event.preventDefault();
54524
- var currentAppSetting = this.environment.appMetadata.appSwitcher.find(function (x) { return x.code == 'USER'; });
54525
- if (currentAppSetting) {
54526
- this.switchApp(currentAppSetting);
54527
- }
54528
- else {
54529
- console.error('Bạn chưa thiết lập metadata cho trang cá nhân');
54530
- }
54531
- };
54532
- AppTopBarV2Component.prototype.onChangePassword = function (event) {
54533
- event.preventDefault();
54534
- // this.changePassword.showPopup(this._userService.getId());
54535
- };
54536
- AppTopBarV2Component.prototype.onTopbarLogout = function () {
54537
- if (!localStorage.getItem('currentUrl')) {
54538
- localStorage.setItem('currentUrl', top.location.href);
54539
- }
54540
- this._authenService.logout();
54541
- };
54542
- AppTopBarV2Component.prototype.settingDefault = function () {
54543
- this.model.dataModelSetting = {
54544
- data: {},
54545
- showSettings: true
54546
- };
54547
- };
54548
- AppTopBarV2Component.prototype.onShowSettings = function (ev) {
54549
- this.rootContext.fireEvent(ComCtxConstants.ROOT_USMART.CONFIG_DATA_DEFAULT_OPENED);
54550
- };
54551
- AppTopBarV2Component.prototype.onCloseSettings = function (ev) {
54552
- this.rootContext.fireEvent(ComCtxConstants.ROOT_USMART.CONFIG_DATA_DEFAULT_CLOSED);
54553
- };
54554
- AppTopBarV2Component.prototype.showProfilePage = function () {
54555
- if (this._userService.isSinhVienAccount()) {
54556
- return false;
54557
- }
54558
- return true;
54559
- };
54560
- AppTopBarV2Component.prototype.login = function () {
54561
- this.rootContext.fireEvent('LOGIN');
54562
- };
54563
- AppTopBarV2Component.prototype.setNotify = function (message) {
54564
- this.message = message;
54565
- };
54566
- AppTopBarV2Component.prototype.handleMouseOver = function (evt) {
54567
- evt.target.stop();
54568
- };
54569
- AppTopBarV2Component.prototype.handleMouseOut = function (evt) {
54570
- evt.target.start();
54571
- };
54572
- AppTopBarV2Component.prototype.showNotificationReload = function () {
54573
- var _this = this;
54574
- this.message = 'Hệ thống có phiên bản mới, hãy refresh trình duyệt để cập nhật';
54575
- this.rootContext.fireEvent(ComCtxConstants.ROOT.SHOW_REJECT_CONFIRM, false);
54576
- this._notifierService.showConfirm(this.message).then(function (res) {
54577
- _this.reloadWindow();
54578
- });
54579
- // if (this.intervalCountdown) {
54580
- // clearInterval(this.intervalCountdown);
54581
- // }
54582
- // const date = new Date();
54583
- // const goalDate = (new Date(date.getTime() + 10 * 1000)).getTime(); // Đếm 10s
54584
- // this.intervalCountdown = setInterval(f => {
54585
- // const now = new Date().getTime();
54586
- // const distance = goalDate - now;
54587
- // var seconds = Math.floor(distance / 1000);
54588
- // // If the count down is finished, write some text
54589
- // if (distance < 0) {
54590
- // clearInterval(this.intervalCountdown);
54591
- // this.reloadWindow();
54592
- // return;
54593
- // }
54594
- // let message = `Trình duyệt sẽ khởi động lại sau ${seconds}s`;
54595
- // if (seconds < 1) {
54596
- // message = 'Trình duyệt sẽ khởi động lại ngay bây giờ';
54597
- // }
54598
- // this._notifierService.showConfirm(
54599
- // message, null, null, false, this._translateService.instant('CONFIRM.ACCEPT_LABEL'),
54600
- // 'pi pi-check'
54601
- // ).then(res => {
54602
- // clearInterval(this.intervalCountdown);
54603
- // this.reloadWindow();
54604
- // });
54605
- // }, 1000);
54606
- };
54607
- AppTopBarV2Component.prototype.reloadWindow = function () {
54608
- top.location.reload();
54609
- };
54610
- return AppTopBarV2Component;
54611
- }(ComponentBase));
54612
- AppTopBarV2Component.decorators = [
54613
- { type: i0.Component, args: [{
54614
- selector: 'app-topbar-v2',
54615
- template: "<div class=\"topbar clearfix tn-l-top-bar\">\r\n <div class=\"topbar-left tn-l-top-bar-left\" [ngClass]=\"{'beta-version': !environment.isProduction }\">\r\n <div class=\"tn-l-left-menu-toggle-block\">\r\n <a tabindex=\"1\" id=\"menu-button\" class=\"tn-l-left-menu-toggle\" href=\"#\"\r\n (click)=\"_commonService.onMenuButtonClick($event)\">\r\n <i class=\"pi pi-chevron-left\"></i>\r\n </a>\r\n </div>\r\n\r\n <div class=\"topbar-logo tn-l-logo-wrapper\">\r\n <a tabindex=\"2\" href=\"javascript:\" style=\"display: inline-block;\">\r\n <img class=\"topbar-logo tn-l-logo\" [src]=\"environment.appMetadata.main.logo\" (click)=\"goToHome()\" /></a>\r\n </div>\r\n <div class=\"topbar-title tn-l-logo-title-block\">\r\n <div class=\"topbar-owner\">\r\n {{environment.appMetadata.main.owner}}\r\n </div>\r\n <div class=\"topbar-description\">\r\n {{environment.appMetadata.main.title}}\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"setting-default-container\">\r\n <ng-container *ngIf=\"showDefaultSetting && currentUser\">\r\n <a tabindex=\"3\" href=\"javascript:void(0)\" class=\"tn-l-m-default-setting pi pi-cog\"\r\n (click)=\"settingDefault()\">\r\n </a>\r\n <h3 class=\"tn-l-default-detting\" (click)=\"settingDefault()\">\r\n {{defaultDataSetting}} <i class=\"pi pi-pencil\" style=\"margin-left:10px\"></i></h3>\r\n </ng-container>\r\n </div>\r\n <div #notify class=\"notify-message\">\r\n <marquee (mouseover)=\"handleMouseOver($event)\" (mouseout)=\"handleMouseOut($event)\">{{message}}</marquee>\r\n </div>\r\n <div class=\"topbar-right tn-l-top-bar-right\" [ngClass]=\"{'beta-version': !environment.isProduction}\"\r\n oncontextmenu=\"return false\">\r\n <div class=\"tn-l-top-bar-right-block-1\">\r\n <a tabindex=\"4\" class=\"topbar-menu-button\" id=\"topbar-menu-button\" href=\"#\"\r\n (click)=\"_commonService.onTopbarMenuButtonClick($event)\">\r\n <svg focusable=\"false\" class=\"tn-m-topbar-menu-toggle\" role=\"img\" xmlns=\"http://www.w3.org/2000/svg\"\r\n viewBox=\"0 0 448 512\">\r\n <path fill=\"currentColor\"\r\n d=\"M0 224h192V32H0v192zm256-192v192h192V32H256zM0 480h192V288H0v192zm256-192v192h192V288H256z\">\r\n </path>\r\n </svg>\r\n <span *ngIf=\"messages.totalUnRead > 0\" class=\"topbar-badge animated rubberBand\"\r\n [ngClass]=\"{'topbar-badge-bounce': messages.bounceNoti}\">{{messages.totalUnRead}}</span>\r\n </a>\r\n </div>\r\n\r\n <div class=\"tn-l-top-bar-right-block-2\">\r\n <ul class=\"topbar-items fadeInDown\" [ngClass]=\"{'topbar-items-visible': _commonService.topbarMenuActive}\">\r\n <li #profile class=\"profile-item tn-l-top-bar-menu-item\"\r\n *ngIf=\"_commonService.profileMode==='top'||_commonService.isHorizontal()\"\r\n [ngClass]=\"{'active-top-menu':_commonService.activeTopbarItem === profile}\">\r\n\r\n <a href=\"#\" tabindex=\"10\" class=\"UserPane tn-l-top-bar-menu-item-inner\"\r\n (click)=\"_commonService.onTopbarItemClick($event,profile)\">\r\n <div class=\"profile-image-wrapper topbar-icon-left\">\r\n <img class=\"profile-image tn-l-profile-img\" [src-fallback]=\"defaultAvatar\"\r\n [src]=\"getCurrentUserAvatar()\" />\r\n </div>\r\n <div class=\"profile-info-wrapper\">\r\n <div class=\"topbar-item-name-wrapper\"\r\n [ngClass]=\"{'not-show-position': !getCurrentUserPosition()}\">\r\n <span class=\"topbar-item-name tn-l-user-name\">{{getCurrentUserFullName()}}</span>\r\n </div>\r\n <div class=\"topbar-item-role-wrapper tn-l-topbar-item-role-wrapper\"><span\r\n class=\"topbar-item-role\">{{getCurrentUserPosition()}}</span></div>\r\n </div>\r\n <i class=\"pi pi-user\" style=\"opacity: 0; position: absolute;\"></i>\r\n </a>\r\n\r\n <ul class=\"layout-menu fadeInDown tn-l-switcher\">\r\n <li *ngIf=\"currentUser\" role=\"menuitem\">\r\n <a href=\"javascript:;\" (click)=\"onTopbarLogout()\">\r\n <i class=\"pi pi-sign-out\"></i>\r\n <span>\u0110\u0103ng xu\u1EA5t</span>\r\n </a>\r\n </li>\r\n <li *ngIf=\"!currentUser\" role=\"menuitem\">\r\n <a href=\"javascript:;\" (click)=\"login()\">\r\n <i class=\"pi pi-sign-in\"></i>\r\n <span>\u0110\u0103ng nh\u1EADp</span>\r\n </a>\r\n </li>\r\n </ul>\r\n </li>\r\n <li #help class=\"menu-help tn-l-top-bar-menu-item\" tn-app-help></li>\r\n <li id=\"li-notifications\" class=\"tn-l-top-bar-menu-item\" #messages\r\n [ngClass]=\"{'active-top-menu':_commonService.activeTopbarItem === messages || _commonService.activeTopbarItem === 0}\"\r\n tn-app-notification (openMenu)=\"_commonService.onTopbarItemClick($event,messages)\"></li>\r\n <li id=\"li-app-switcher\" class=\"tn-l-top-bar-menu-item\" #modules\r\n [ngClass]=\"{'active-top-menu':_commonService.activeTopbarItem === modules || _commonService.activeTopbarItem === 1}\">\r\n <a href=\"#\" tabindex=\"7\" class=\"tn-l-top-bar-menu-item-inner\" style=\"height: 30px;\"\r\n pTooltip=\"Danh s\u00E1ch ph\u00E2n h\u1EC7\" tooltipPosition=\"bottom\"\r\n (click)=\"_commonService.onTopbarItemClick($event,modules)\">\r\n <span class=\"topbar-icon-left tn-l-topbar-icon-left\">\r\n <svg focusable=\"false\" class=\"topbar-icon animated swing svgmodule\" role=\"img\"\r\n xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 448 512\">\r\n <path fill=\"currentColor\"\r\n d=\"M0 224h192V32H0v192zm256-192v192h192V32H256zM0 480h192V288H0v192zm256-192v192h192V288H256z\">\r\n </path>\r\n </svg>\r\n <!-- <i class=\"pi pi-microsoft\"></i> -->\r\n </span>\r\n <span class=\"topbar-item-name\">{{ 'Danh s\u00E1ch ph\u00E2n h\u1EC7' | translate}}</span>\r\n </a>\r\n <ul class=\"app-switcher layout-menu fadeInDown\">\r\n <tn-custom-scrollbar #scrollbar class=\"app-switcher-holder\">\r\n <li role=\"menuitem\" class=\"wrapper-appswitch\">\r\n <ng-container *ngFor=\"let item of appSwitcherItems; let ind = index;\">\r\n <a class=\"switcher-item tn-l-switcher-item\" href=\"javascript:\"\r\n (click)=\"switchApp(item, true)\">\r\n <span class=\"tn-l-switcher-item-inner\">\r\n <i class=\"{{item.icon}} app-switcher-item-icon tn-l-switcher-item-icon\"></i>\r\n <div class=\"tn-l-switcher-item-label\">\r\n {{ item.title | translate}}\r\n </div>\r\n </span>\r\n </a>\r\n </ng-container>\r\n </li>\r\n </tn-custom-scrollbar>\r\n </ul>\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n</div>",
54616
- providers: [ComponentContextService],
54617
- styles: [".topBarSearchButton:disabled{background-color:#eee!important;border:1px solid #c8c8c8!important;border-right:none!important;color:#c1c1c1!important;opacity:1}::ng-deep app-topbar a{outline:none}input:disabled::-moz-placeholder{color:#b1b1b1}input:disabled:-ms-input-placeholder{color:#b1b1b1}input:disabled::placeholder{color:#b1b1b1}.UserPane.UserPane{display:flex}.profile-image-wrapper{order:1}.tn-l-user-name.tn-l-user-name.tn-l-user-name.tn-l-user-name.tn-l-user-name{float:none;margin-top:0}.profile-info-wrapper.profile-info-wrapper.profile-info-wrapper.profile-info-wrapper{display:inline-flex;flex-direction:column;float:none;justify-content:center;order:0;text-align:right}.tn-l-logo{image-rendering:-webkit-optimize-contrast;image-rendering:crisp-edges}.tn-l-default-detting{color:#fff;cursor:pointer;margin:0}.tn-l-left-menu-toggle-block{-ms-grid-row-align:stretch;align-items:center;align-self:stretch;box-shadow:0 0 5px 0 rgba(0,0,0,.3764705882352941);display:flex}.tn-l-left-menu-toggle{color:#fff;padding:8px;transition:transform .25s ease-in-out}::ng-deep .layout-menu-static-inactive app-topbar .tn-l-left-menu-toggle{transform:rotate(180deg)}.tn-l-logo-title-block.tn-l-logo-title-block.tn-l-logo-title-block.tn-l-logo-title-block{margin-left:0;margin-right:30px}.topbar-logo.topbar-logo.topbar-logo{float:none}.tn-l-logo.tn-l-logo.tn-l-logo.tn-l-logo{height:40px;margin:0;width:auto}.tn-l-logo-wrapper.tn-l-logo-wrapper.tn-l-logo-wrapper.tn-l-logo-wrapper{font-size:0;height:auto;margin:0;padding-left:8px;padding-right:8px;width:auto}.tn-l-top-bar{display:flex}.topbar-description,.topbar-owner{white-space:nowrap}.topbar-owner.topbar-owner.topbar-owner.topbar-owner.topbar-owner{font-size:15px}.topbar-description.topbar-description.topbar-description.topbar-description.topbar-description{font-size:11px;text-transform:none}.tn-l-top-bar-left.tn-l-top-bar-left.tn-l-top-bar-left{display:flex;float:none;width:auto}.tn-l-top-bar-left{align-items:center}.tn-m-topbar-menu-toggle{display:block;height:28px;margin:auto;width:30px}.tn-m-topbar-menu-toggle g{stroke:#fff}.tn-m-topbar-menu-toggle path{fill:#fff}.tn-l-m-default-setting{display:none}.setting-default-container{justify-content:center}.notify-message,.setting-default-container{align-items:center;display:flex;margin-left:30px}.notify-message{flex:1 1;overflow:hidden}.notify-message>marquee{color:#ff0;font-size:500;white-space:nowrap}.search-item{margin-right:10px}.tn-l-switcher-item.tn-l-switcher-item.tn-l-switcher-item{background:#fff}.tn-l-switcher-item-label{color:#52abff;text-align:center;text-shadow:none}.tn-l-switcher-item-icon.tn-l-switcher-item-icon.tn-l-switcher-item-icon.tn-l-switcher-item-icon{color:#52abff;font-size:38px;margin:5px auto;text-shadow:none}.tn-l-switcher-item.tn-l-switcher-item.tn-l-switcher-item.tn-l-switcher-item.tn-l-switcher-item{padding:8px}.tn-l-switcher.tn-l-switcher{margin-bottom:0}::ng-deep .layout-wrapper app-topbar-v2 .layout-menu li a.switcher-item{margin-top:0;width:unset}::ng-deep .layout-wrapper app-topbar-v2 .layout-menu li a.switcher-item:nth-child(3n+0){border-left:none}::ng-deep .layout-wrapper app-topbar-v2 .layout-menu li a.switcher-item:nth-child(3n+1){border-right:none}::ng-deep .layout-wrapper app-topbar-v2 .layout-menu li a.switcher-item:nth-child(3n+2){border:none}::ng-deep .layout-wrapper app-topbar-v2 .layout-menu li a.switcher-item:nth-child(3n+1):last-child,::ng-deep .layout-wrapper app-topbar-v2 .layout-menu li a.switcher-item:nth-child(3n+2):last-child{width:unset}::ng-deep .layout-wrapper app-topbar-v2 .layout-menu li a span{line-height:1.2}::ng-deep .layout-wrapper app-topbar-v2 .topbar .topbar-left{box-shadow:none}::ng-deep .layout-wrapper app-topbar-v2 .wrapper-appswitch{display:-ms-grid;display:grid;grid-template-columns:repeat(auto-fill,minmax(100px,1fr));text-align:center}@media (max-width:1024px){::ng-deep .layout-wrapper app-topbar-v2 .layout-menu li a.switcher-item{width:unset}}@media (min-width:1025px){.tn-l-top-bar-right{align-items:center;display:flex;justify-content:space-between}.tn-l-top-bar-right.tn-l-top-bar-right.tn-l-top-bar-right{padding:0 15px}.topbar-items.topbar-items.topbar-items{align-items:center;display:flex;flex-direction:row-reverse;justify-content:flex-start;margin:0}.topbar-items.topbar-items.topbar-items,.topbar-items.topbar-items.topbar-items>li{float:none}::ng-deep .topbar .topbar-items>li>a{margin-top:0}::ng-deep .topbar .topbar-items>li>a>span>i{color:#fff;font-size:24px}.topbar .topbar-items>li>a.UserPane{height:auto;line-height:inherit;top:0}a.UserPane .profile-image.profile-image.profile-image.profile-image{margin-top:0}}@media (min-width:1025px) and (max-width:1400px){.tn-l-logo-title-block.tn-l-logo-title-block.tn-l-logo-title-block.tn-l-logo-title-block{margin-right:19px}.search-item{margin-right:0}.tn-l-top-bar-right.tn-l-top-bar-right.tn-l-top-bar-right{padding-left:15px}.topbar-items>li.profile-item{margin-left:14px}}@media (max-width:1024px){.tn-l-m-default-setting{align-items:center;color:#fff;display:flex;font-size:28px;height:36px;justify-content:center;width:36px}.tn-l-default-detting{display:none}::ng-deep .layout-menu-static-mobile-inactive app-topbar .tn-l-left-menu-toggle{transform:rotate(180deg)}.profile-info-wrapper.profile-info-wrapper.profile-info-wrapper.profile-info-wrapper{text-align:left}.topbar .topbar-right #topbar-menu-button{align-items:center;display:flex;justify-content:center;width:36px}.tn-l-top-bar-right-block-1{display:flex}.tn-l-logo-wrapper.tn-l-logo-wrapper.tn-l-logo-wrapper.tn-l-logo-wrapper{padding-left:5px;padding-right:5px}.tn-l-logo-title-block,.tn-l-top-bar-left,.topbar-description,.topbar-owner{overflow:hidden}.topbar-description,.topbar-owner{text-overflow:ellipsis}.tn-l-top-bar-menu-item:empty{display:none}.tn-l-top-bar-left.tn-l-top-bar-left.tn-l-top-bar-left{padding-left:0;padding-right:0}.topbar-title.topbar-title.topbar-title.topbar-title{margin:0}.topbar-owner.topbar-owner.topbar-owner.topbar-owner.topbar-owner{font-size:14px}.topbar-description.topbar-description.topbar-description.topbar-description.topbar-description{font-size:10px}.tn-l-top-bar-right{flex:1;position:relative}.topbar-menu-button span.topbar-badge{right:-4px}.tn-l-top-bar-right.tn-l-top-bar-right.tn-l-top-bar-right{align-items:center;display:flex;justify-content:flex-end;padding:0 .5em}.tn-l-top-bar-right.tn-l-top-bar-right.tn-l-top-bar-right #topbar-menu-button{margin-left:.5em;position:relative;right:0;top:0}.app-switcher.layout-menu.layout-menu.layout-menu.layout-menu{width:270px}.profile-image-wrapper{order:0}.tn-l-user-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:220px}::ng-deep app-topbar .tn-l-top-bar-menu-item .topbar-icon-left{align-items:center;display:flex;justify-content:center}.tn-l-topbar-item-role-wrapper{display:none}}"]
54618
- },] }
54619
- ];
54620
- AppTopBarV2Component.ctorParameters = function () { return [
54621
- { type: CustomRouterService },
54622
- { type: i3.Router },
54623
- { type: CommonService },
54624
- { type: AuthenService },
54625
- { type: i0.ChangeDetectorRef },
54626
- { type: i0.Injector },
54627
- { type: PermissionService },
54628
- { type: ModuleConfigService },
54629
- { type: UserService },
54630
- { type: NotifierService },
54631
- { type: i2.TranslateService }
54632
- ]; };
54633
- AppTopBarV2Component.propDecorators = {
54634
- input: [{ type: i0.ViewChild, args: ['input',] }],
54635
- notify: [{ type: i0.ViewChild, args: ['notify', { static: true },] }]
54636
- };
54637
-
54638
54667
  function coreDeclaration() {
54639
54668
  return [
54640
54669
  AddressComponent,
@@ -54797,7 +54826,7 @@
54797
54826
  FileKySoSimComponent,
54798
54827
  TaiLieuComponent,
54799
54828
  TaiLieuCuaToiComponent,
54800
- KhaiThacTaiLieuDungChungComponent
54829
+ KhaiThacTaiLieuDungChungComponent,
54801
54830
  ];
54802
54831
  }
54803
54832
  function coreModuleImport() {
@@ -56132,6 +56161,44 @@
56132
56161
  { type: CommonService }
56133
56162
  ]; };
56134
56163
 
56164
+ var AnonymousTokenInterceptor = /** @class */ (function () {
56165
+ function AnonymousTokenInterceptor(_moduleConfigService, _applicationContextService) {
56166
+ this._moduleConfigService = _moduleConfigService;
56167
+ this._applicationContextService = _applicationContextService;
56168
+ this.env = this._moduleConfigService.getConfig().environment;
56169
+ }
56170
+ AnonymousTokenInterceptor.prototype.intercept = function (request, next) {
56171
+ // Tạm thời xử lý đọc access token từ config, sau khi Phúc xử lý xong phần backend thì sẽ thay đổi logic đoạn này để đọc từ querystring
56172
+ try {
56173
+ this.appMetadata = this._applicationContextService.getRootContext().data.currentAppMetadata;
56174
+ if (this.appMetadata && this.appMetadata.enableTemporaryAccessToken) {
56175
+ console.log("using temporary accesstoken from config: " + this.appMetadata.temporaryAccessToken);
56176
+ request = request.clone({
56177
+ setHeaders: {
56178
+ Authorization: "Bearer " + this.appMetadata.temporaryAccessToken,
56179
+ PortalAlias: location.origin
56180
+ }
56181
+ });
56182
+ }
56183
+ }
56184
+ catch (e) {
56185
+ console.error("error on AnonymousTokenInterceptor " + e);
56186
+ }
56187
+ return next.handle(request);
56188
+ };
56189
+ return AnonymousTokenInterceptor;
56190
+ }());
56191
+ AnonymousTokenInterceptor.ɵprov = i0.ɵɵdefineInjectable({ factory: function AnonymousTokenInterceptor_Factory() { return new AnonymousTokenInterceptor(i0.ɵɵinject(ModuleConfigService), i0.ɵɵinject(ApplicationContextService)); }, token: AnonymousTokenInterceptor, providedIn: "root" });
56192
+ AnonymousTokenInterceptor.decorators = [
56193
+ { type: i0.Injectable, args: [{
56194
+ providedIn: 'root'
56195
+ },] }
56196
+ ];
56197
+ AnonymousTokenInterceptor.ctorParameters = function () { return [
56198
+ { type: ModuleConfigService },
56199
+ { type: ApplicationContextService }
56200
+ ]; };
56201
+
56135
56202
  var PublicFunction = /** @class */ (function () {
56136
56203
  function PublicFunction() {
56137
56204
  }
@@ -56228,6 +56295,11 @@
56228
56295
  useClass: TraceInterceptor,
56229
56296
  multi: true,
56230
56297
  },
56298
+ {
56299
+ provide: i1$1.HTTP_INTERCEPTORS,
56300
+ useClass: AnonymousTokenInterceptor,
56301
+ multi: true,
56302
+ },
56231
56303
  i1.MessageService,
56232
56304
  i1.ConfirmationService,
56233
56305
  i2$1.DatePipe,
@@ -58199,6 +58271,7 @@
58199
58271
  exports.ɵfd = LogInterceptor;
58200
58272
  exports.ɵfe = PermissionUtilsInterceptor;
58201
58273
  exports.ɵff = TraceInterceptor;
58274
+ exports.ɵfg = AnonymousTokenInterceptor;
58202
58275
  exports.ɵg = AdvanceSearchComponent;
58203
58276
  exports.ɵh = AppRootMenuComponent;
58204
58277
  exports.ɵi = AppTopBarComponent;