@brggroup/share-lib 0.0.59 → 0.0.60

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.
@@ -12,7 +12,7 @@ import { NzModalService } from 'ng-zorro-antd/modal';
12
12
  import { jwtDecode } from 'jwt-decode';
13
13
  import { switchMap, distinctUntilChanged, filter as filter$1, takeUntil } from 'rxjs/operators';
14
14
  import * as i2$1 from '@angular/forms';
15
- import { FormGroup, FormsModule, ReactiveFormsModule, Validators, NG_VALUE_ACCESSOR } from '@angular/forms';
15
+ import { FormGroup, FormsModule, ReactiveFormsModule, Validators, NG_VALUE_ACCESSOR, FormBuilder } from '@angular/forms';
16
16
  import * as i1$3 from '@angular/common';
17
17
  import { Location, CommonModule } from '@angular/common';
18
18
  import { Overlay } from '@angular/cdk/overlay';
@@ -80,6 +80,7 @@ import * as i8$1 from 'ng-zorro-antd/badge';
80
80
  import { NzBadgeModule } from 'ng-zorro-antd/badge';
81
81
  import * as i4$2 from 'ng-zorro-antd/menu';
82
82
  import * as signalR from '@microsoft/signalr';
83
+ import { NzSwitchModule } from 'ng-zorro-antd/switch';
83
84
 
84
85
  var TranslateKey;
85
86
  (function (TranslateKey) {
@@ -518,7 +519,7 @@ class TokenStorage {
518
519
  }
519
520
  }
520
521
 
521
- const URLs$3 = {
522
+ const URLs$4 = {
522
523
  login: '/api/Auth/Login',
523
524
  register: '/api/Auth/Register',
524
525
  pingAuth: '/api/Auth/PingAuth',
@@ -554,7 +555,7 @@ class AuthService extends HTTPService {
554
555
  }
555
556
  async pingAuth() {
556
557
  try {
557
- const res = await this.get(AppGlobals.apiEndpoint + URLs$3.pingAuth, true);
558
+ const res = await this.get(AppGlobals.apiEndpoint + URLs$4.pingAuth, true);
558
559
  return res?.IsSuccess;
559
560
  }
560
561
  catch {
@@ -587,7 +588,7 @@ class AuthService extends HTTPService {
587
588
  return true;
588
589
  }
589
590
  async sendSignIn(body) {
590
- return firstValueFrom(this.httpClient.post(AppGlobals.apiEndpoint + URLs$3.login, body, {
591
+ return firstValueFrom(this.httpClient.post(AppGlobals.apiEndpoint + URLs$4.login, body, {
591
592
  headers: new HttpHeaders().set('Content-Type', 'application/json'),
592
593
  }));
593
594
  }
@@ -631,10 +632,10 @@ class AuthService extends HTTPService {
631
632
  }
632
633
  }
633
634
  changePassword(data) {
634
- return this.postData(AppGlobals.apiEndpoint + URLs$3.changePassword, data);
635
+ return this.postData(AppGlobals.apiEndpoint + URLs$4.changePassword, data);
635
636
  }
636
637
  setPass(data) {
637
- return this.postData(AppGlobals.apiEndpoint + URLs$3.setPass, data);
638
+ return this.postData(AppGlobals.apiEndpoint + URLs$4.setPass, data);
638
639
  }
639
640
  async signUp(d) {
640
641
  try {
@@ -652,7 +653,7 @@ class AuthService extends HTTPService {
652
653
  }
653
654
  }
654
655
  async sendSignUp(d) {
655
- return this.postData(AppGlobals.apiEndpoint + URLs$3.register, d);
656
+ return this.postData(AppGlobals.apiEndpoint + URLs$4.register, d);
656
657
  }
657
658
  idleTimer;
658
659
  idleTimeInMinutes = 15; // phút
@@ -698,7 +699,7 @@ class AuthService extends HTTPService {
698
699
  }
699
700
  async sendChangeOrg(App_Org_Id) {
700
701
  let params = new HttpParams().append('App_Org_Id', App_Org_Id);
701
- return this.postParams(AppGlobals.apiEndpoint + URLs$3.changeOrgLogin, params);
702
+ return this.postParams(AppGlobals.apiEndpoint + URLs$4.changeOrgLogin, params);
702
703
  }
703
704
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: AuthService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
704
705
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: AuthService, providedIn: 'root' });
@@ -5523,6 +5524,26 @@ class CheckModel {
5523
5524
  ErrorMessage = '';
5524
5525
  ErrorContent = '';
5525
5526
  }
5527
+ class App_Org {
5528
+ // #region properties
5529
+ App_Org_Id;
5530
+ CreatedDate;
5531
+ CreatedUser;
5532
+ UpdatedDate;
5533
+ UpdatedUser;
5534
+ IsActive;
5535
+ Code;
5536
+ Name;
5537
+ NameEn;
5538
+ Type;
5539
+ Address;
5540
+ Description;
5541
+ ParentId;
5542
+ OrderValue;
5543
+ // #endregion properties
5544
+ TreeNodeName;
5545
+ LstUserId;
5546
+ }
5526
5547
 
5527
5548
  class RouteMonitorService {
5528
5549
  router;
@@ -5658,7 +5679,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImpor
5658
5679
  }]
5659
5680
  }] });
5660
5681
 
5661
- const URLs$2 = {
5682
+ const URLs$3 = {
5662
5683
  getById: '/api/App_Dic_Domain/GetById',
5663
5684
  getAll: '/api/App_Dic_Domain/GetAll',
5664
5685
  getList: '/api/App_Dic_Domain/GetList',
@@ -5845,26 +5866,6 @@ const fadeSlide = trigger('fadeSlide', [
5845
5866
  ]),
5846
5867
  ]);
5847
5868
 
5848
- class App_Org {
5849
- // #region properties
5850
- App_Org_Id;
5851
- CreatedDate;
5852
- CreatedUser;
5853
- UpdatedDate;
5854
- UpdatedUser;
5855
- IsActive;
5856
- Code;
5857
- Name;
5858
- NameEn;
5859
- Type;
5860
- Address;
5861
- Description;
5862
- ParentId;
5863
- OrderValue;
5864
- // #endregion properties
5865
- TreeNodeName;
5866
- LstUserId;
5867
- }
5868
5869
  class LayoutUser extends BaseComponent {
5869
5870
  cms = inject(CommonService);
5870
5871
  authService = inject(AuthService);
@@ -5926,7 +5927,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImpor
5926
5927
  ], animations: [fadeInOut], template: "<nz-badge [nzSize]=\"'small'\" [nzCount]=\"0\">\n <button nz-button nzType=\"text\" nzSize=\"small\">\n <nz-icon nzType=\"bell\" nzTheme=\"outline\" style=\"color: #ffffff\" />\n </button>\n</nz-badge>\n\n<button\n nz-button\n nzType=\"text\"\n nz-dropdown\n nzTrigger=\"click\"\n [nzDropdownMenu]=\"menuUser\"\n style=\"height: 50px; color: #ffffff\"\n>\n <nz-icon nzType=\"user\" nzTheme=\"outline\" />\n {{ TokenStorage.getUserFullname() }}\n</button>\n\n<nz-dropdown-menu #menuUser=\"nzDropdownMenu\">\n <ul nz-menu>\n <li *ngIf=\"!(!isXSmall && TokenStorage.getOrgName())\" nz-menu-item>\n <nz-icon nzType=\"cluster\" nzTheme=\"outline\" />&nbsp;&nbsp; {{ TokenStorage.getOrgName() }}\n </li>\n <li *ngIf=\"!(!isXSmall && TokenStorage.getOrgName())\" nz-menu-divider></li>\n <li nz-menu-item (click)=\"gotoSetting()\">\n <nz-icon nzType=\"setting\" nzTheme=\"outline\" />&nbsp;&nbsp; {{ TranslateKey.SETTING | translate }}\n </li>\n <li nz-menu-divider></li>\n <li nz-menu-item (click)=\"logout()\">\n <nz-icon nzType=\"logout\" nzTheme=\"outline\" />&nbsp;&nbsp; {{ TranslateKey.LOGOUT | translate }}\n </li>\n </ul>\n</nz-dropdown-menu>\n\n<button\n *ngIf=\"!isXSmall && TokenStorage.getOrgName()\"\n [@fadeInOut]\n nz-button\n nzType=\"text\"\n nz-dropdown\n nzTrigger=\"click\"\n [nzDropdownMenu]=\"menuOrg\"\n style=\"height: 50px; color: #ffffff\"\n>\n <nz-icon nzType=\"cluster\" nzTheme=\"outline\" />\n {{ TokenStorage.getOrgName() }}\n</button>\n\n<nz-dropdown-menu #menuOrg=\"nzDropdownMenu\">\n <ul nz-menu>\n @for (org of lstOrg; track $index) {\n <li *ngIf=\"$index > 0\" nz-menu-divider></li>\n <li nz-menu-item (click)=\"changeOrg(org)\">\n <nz-icon nzType=\"swap\" nzTheme=\"outline\" />&nbsp;&nbsp; {{ org.Name }}\n </li>\n }\n </ul>\n</nz-dropdown-menu>\n" }]
5927
5928
  }] });
5928
5929
 
5929
- const URLs$1 = {
5930
+ const URLs$2 = {
5930
5931
  getById: '/api/App_Setting/GetById',
5931
5932
  getAll: '/api/App_Setting/GetAll',
5932
5933
  getList: '/api/App_Setting/GetList',
@@ -5947,10 +5948,10 @@ class SettingService extends HTTPService {
5947
5948
  });
5948
5949
  }
5949
5950
  getAll() {
5950
- return this.post(AppGlobals.apiEndpoint + URLs$1.getAll);
5951
+ return this.post(AppGlobals.apiEndpoint + URLs$2.getAll);
5951
5952
  }
5952
5953
  getList(filter) {
5953
- return this.postData(AppGlobals.apiEndpoint + URLs$1.getList, filter);
5954
+ return this.postData(AppGlobals.apiEndpoint + URLs$2.getList, filter);
5954
5955
  }
5955
5956
  getPaging(filter) {
5956
5957
  return this.commonService.ESP({
@@ -5966,24 +5967,24 @@ class SettingService extends HTTPService {
5966
5967
  }
5967
5968
  delete(id) {
5968
5969
  const params = new HttpParams().append('id', id);
5969
- return this.postParams(AppGlobals.apiEndpoint + URLs$1.delete, params);
5970
+ return this.postParams(AppGlobals.apiEndpoint + URLs$2.delete, params);
5970
5971
  }
5971
5972
  getByCodeAnonymous(code) {
5972
5973
  const params = new HttpParams().append('Code', code);
5973
- return this.getParams(AppGlobals.apiEndpoint + URLs$1.getByCodeAnonymous, params);
5974
+ return this.getParams(AppGlobals.apiEndpoint + URLs$2.getByCodeAnonymous, params);
5974
5975
  }
5975
5976
  // getGroupByCodeAnonymous(code: string) {
5976
5977
  // const params = new HttpParams().append('Code', code);
5977
5978
  // return this.getParams(AppGlobals.apiEndpoint + URLs.getByCodeAnonymous, params);
5978
5979
  // }
5979
5980
  getAllConfig() {
5980
- return this.post(AppGlobals.apiEndpoint + URLs$1.GetAllConfig);
5981
+ return this.post(AppGlobals.apiEndpoint + URLs$2.GetAllConfig);
5981
5982
  }
5982
5983
  applyConfig(config) {
5983
- return this.postData(AppGlobals.apiEndpoint + URLs$1.ApplyConfig, config);
5984
+ return this.postData(AppGlobals.apiEndpoint + URLs$2.ApplyConfig, config);
5984
5985
  }
5985
5986
  getDbInfo() {
5986
- return this.post(AppGlobals.apiEndpoint + URLs$1.GetDbInfo);
5987
+ return this.post(AppGlobals.apiEndpoint + URLs$2.GetDbInfo);
5987
5988
  }
5988
5989
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: SettingService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
5989
5990
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: SettingService, providedIn: 'root' });
@@ -5995,7 +5996,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImpor
5995
5996
  }]
5996
5997
  }] });
5997
5998
 
5998
- const URLs = {
5999
+ const URLs$1 = {
5999
6000
  getById: '/api/file/GetById',
6000
6001
  getAll: '/api/file/GetAll',
6001
6002
  getList: '/api/file/GetList',
@@ -6009,13 +6010,13 @@ class FileService extends HTTPService {
6009
6010
  commonService = inject(CommonService);
6010
6011
  getById(id) {
6011
6012
  const params = new HttpParams().append('id', id);
6012
- return this.postParams(AppGlobals.apiEndpoint + URLs.getById, params);
6013
+ return this.postParams(AppGlobals.apiEndpoint + URLs$1.getById, params);
6013
6014
  }
6014
6015
  getAll() {
6015
- return this.post(AppGlobals.apiEndpoint + URLs.getAll);
6016
+ return this.post(AppGlobals.apiEndpoint + URLs$1.getAll);
6016
6017
  }
6017
6018
  getList(filter) {
6018
- return this.postData(AppGlobals.apiEndpoint + URLs.getList, filter);
6019
+ return this.postData(AppGlobals.apiEndpoint + URLs$1.getList, filter);
6019
6020
  }
6020
6021
  getPaging(filter) {
6021
6022
  return this.commonService.ESP({
@@ -6024,11 +6025,11 @@ class FileService extends HTTPService {
6024
6025
  });
6025
6026
  }
6026
6027
  addOrEdit(obj) {
6027
- return this.postData(AppGlobals.apiEndpoint + URLs.addOrEdit, obj);
6028
+ return this.postData(AppGlobals.apiEndpoint + URLs$1.addOrEdit, obj);
6028
6029
  }
6029
6030
  delete(id) {
6030
6031
  const params = new HttpParams().append('id', id);
6031
- return this.postParams(AppGlobals.apiEndpoint + URLs.delete, params);
6032
+ return this.postParams(AppGlobals.apiEndpoint + URLs$1.delete, params);
6032
6033
  }
6033
6034
  downloadFile(id) {
6034
6035
  const params = new HttpParams().append('id', id);
@@ -6070,7 +6071,7 @@ class FileService extends HTTPService {
6070
6071
  });
6071
6072
  }
6072
6073
  addFileWithRef(obj) {
6073
- return this.postData(AppGlobals.apiEndpoint + URLs.addFileWithRef, obj);
6074
+ return this.postData(AppGlobals.apiEndpoint + URLs$1.addFileWithRef, obj);
6074
6075
  }
6075
6076
  getAnhWithRef(Ref_Table, Ref_Id) {
6076
6077
  return this.commonService.ESP({
@@ -6079,7 +6080,7 @@ class FileService extends HTTPService {
6079
6080
  });
6080
6081
  }
6081
6082
  moveFileToDisk(obj) {
6082
- return this.postData(AppGlobals.apiEndpoint + URLs.moveFileToDisk, obj);
6083
+ return this.postData(AppGlobals.apiEndpoint + URLs$1.moveFileToDisk, obj);
6083
6084
  }
6084
6085
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: FileService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
6085
6086
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: FileService, providedIn: 'root' });
@@ -6499,9 +6500,207 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImpor
6499
6500
  args: ['divuser']
6500
6501
  }] } });
6501
6502
 
6503
+ const URLs = {
6504
+ getById: '/api/App_Org/GetById',
6505
+ getAll: '/api/App_Org/GetAll',
6506
+ getList: '/api/App_Org/GetList',
6507
+ getPaging: '/api/App_Org/GetPaging',
6508
+ addOrEdit: '/api/App_Org/AddOrEdit',
6509
+ delete: '/api/App_Org/Delete',
6510
+ };
6511
+ class OrgService extends HTTPService {
6512
+ commonService = inject(CommonService);
6513
+ getById(id) {
6514
+ return this.commonService.ESP({
6515
+ SPN: 'App_Org_getById',
6516
+ Params: [id],
6517
+ });
6518
+ }
6519
+ getAll() {
6520
+ return this.commonService.ESP({
6521
+ SPN: 'App_Org_getAll',
6522
+ });
6523
+ }
6524
+ getList(filter) {
6525
+ return this.postData(AppGlobals.apiEndpoint + URLs.getList, filter);
6526
+ }
6527
+ getPaging(filter) {
6528
+ return this.commonService.ESP({
6529
+ SPN: 'App_Org_getpaging',
6530
+ Params: [filter],
6531
+ });
6532
+ }
6533
+ addOrEdit(obj) {
6534
+ return this.commonService.ESP({
6535
+ SPN: 'App_Org_addOrEdit',
6536
+ Params: [obj],
6537
+ });
6538
+ }
6539
+ delete(id) {
6540
+ const params = new HttpParams().append('id', id);
6541
+ return this.postParams(AppGlobals.apiEndpoint + URLs.delete, params);
6542
+ }
6543
+ getAllForLogin(UserName) {
6544
+ const params = new HttpParams().append('UserName', UserName);
6545
+ return this.getParams(`${AppGlobals.apiEndpoint}/api/public/LstOrgForLogin`, params);
6546
+ }
6547
+ getUserInOrgStr(OrgId) {
6548
+ return this.commonService.ESP({
6549
+ SPN: 'App_Org_getUserInOrgStr',
6550
+ Params: [OrgId],
6551
+ });
6552
+ }
6553
+ getUsersInOrg(orgId) {
6554
+ return this.commonService.ESP({
6555
+ SPN: 'App_Org_getUsersInOrg',
6556
+ Params: [orgId],
6557
+ });
6558
+ }
6559
+ addUsersToOrg(orgId, userIds) {
6560
+ if (!orgId) {
6561
+ return Promise.reject('Org ID is required');
6562
+ }
6563
+ return this.commonService.ESP({
6564
+ SPN: 'App_Org_addUsersToOrg',
6565
+ Params: [orgId, userIds.join(',')],
6566
+ });
6567
+ }
6568
+ deleteUserFromOrg(orgId, userId) {
6569
+ return this.commonService.ESP({
6570
+ SPN: 'App_Org_deleteUserFromOrg',
6571
+ Params: [orgId, userId],
6572
+ });
6573
+ }
6574
+ checkImportOrg(data) {
6575
+ return this.commonService.ESP({
6576
+ SPN: 'App_Org_checkImportOrg',
6577
+ Params: [data],
6578
+ });
6579
+ }
6580
+ importOrg(data) {
6581
+ return this.postData(`${AppGlobals.apiEndpoint}/api/Org/importOrg`, data);
6582
+ }
6583
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: OrgService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
6584
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: OrgService, providedIn: 'root' });
6585
+ }
6586
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: OrgService, decorators: [{
6587
+ type: Injectable,
6588
+ args: [{
6589
+ providedIn: 'root',
6590
+ }]
6591
+ }] });
6592
+
6593
+ class LoginComponent extends BaseComponent {
6594
+ fb = inject(FormBuilder);
6595
+ authService = inject(AuthService);
6596
+ orgService = inject(OrgService);
6597
+ settingService = inject(SettingService);
6598
+ vscService = inject(VscService);
6599
+ loadingService = inject(LoadingService);
6600
+ fileService = inject(FileService);
6601
+ loginForm;
6602
+ visible = false;
6603
+ passwordType = 'password';
6604
+ returnUrl = '';
6605
+ lstOrg = [];
6606
+ isOneUserMultiOrgs = false;
6607
+ SYSTEM_NAME_LOGIN = '';
6608
+ async ngOnInit() {
6609
+ this.route.queryParams.subscribe((params) => (this.returnUrl = params['returnUrl'] || '/'));
6610
+ if (TokenStorage.getToken() && (await this.authService.pingAuth())) {
6611
+ this.goto(this.returnUrl);
6612
+ return;
6613
+ }
6614
+ TokenStorage.clearToken();
6615
+ this.loginForm = this.fb.group({
6616
+ username: [null, [Validators.required]],
6617
+ password: [null, [Validators.required]],
6618
+ orgid: [null],
6619
+ langSwitch: [AppStorage.getLang() === 'vn'],
6620
+ });
6621
+ this.settingService.getByCodeAnonymous('SYSTEM_NAME_LOGIN').then((res) => {
6622
+ if (res?.Data) {
6623
+ this.SYSTEM_NAME_LOGIN = res.Data;
6624
+ }
6625
+ }, (err) => this.handleError(err));
6626
+ this.settingService.getByCodeAnonymous('ONE_USER_MULTI_ORGS').then((res) => {
6627
+ if (res?.Data) {
6628
+ if (res.Data == '1') {
6629
+ this.isOneUserMultiOrgs = true;
6630
+ this.loginForm.get('orgid')?.setValidators([Validators.required]);
6631
+ this.getLstOrg();
6632
+ }
6633
+ else {
6634
+ this.loginForm.get('orgid')?.clearValidators();
6635
+ }
6636
+ }
6637
+ }, (err) => this.handleError(err));
6638
+ this.vscService.clearInterval();
6639
+ this.authService.stopWatching();
6640
+ }
6641
+ getLstOrg() {
6642
+ const username = this.loginForm.controls['username'].value;
6643
+ this.orgService.getAllForLogin(username ?? '').then((res) => {
6644
+ if (res.Data) {
6645
+ this.lstOrg = res.Data;
6646
+ }
6647
+ else {
6648
+ this.lstOrg = [];
6649
+ }
6650
+ }, (err) => this.handleError(err));
6651
+ }
6652
+ dologin() {
6653
+ for (const i in this.loginForm.controls) {
6654
+ this.loginForm.controls[i].markAsDirty();
6655
+ this.loginForm.controls[i].updateValueAndValidity();
6656
+ }
6657
+ if (this.loginForm.valid) {
6658
+ this.authService.signIn(this.loginForm.value.username, this.loginForm.value.password, this.loginForm.value.orgid, this.returnUrl);
6659
+ }
6660
+ this.vscService.checkVersion();
6661
+ }
6662
+ changeLanguage(lang) {
6663
+ AppStorage.setLang(lang ? 'vn' : 'en');
6664
+ this.translate.use(lang ? 'vn' : 'en');
6665
+ }
6666
+ onFocusOrg() {
6667
+ console.log(this.loginForm.value.username);
6668
+ this.getLstOrg();
6669
+ }
6670
+ onImgError(e) {
6671
+ e.target.style.display = 'none';
6672
+ }
6673
+ logoUrl$ = this.fileService
6674
+ .getFileVersion('LOGO')
6675
+ .pipe(map((res) => `${AppGlobals.apiEndpoint}/api/file/image?code=LOGO&v=${res || ''}`));
6676
+ bgUrl$ = this.fileService
6677
+ .getFileVersion('LOGIN_BACKGROUND')
6678
+ .pipe(map((res) => `${AppGlobals.apiEndpoint}/api/file/image?code=LOGIN_BACKGROUND&v=${res || ''}`));
6679
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: LoginComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
6680
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.7", type: LoginComponent, isStandalone: true, selector: "login", usesInheritance: true, ngImport: i0, template: "<div nz-row nzJustify=\"center\">\n <div class=\"form-container\">\n <form nz-flex nzVertical=\"true\" nz-form [formGroup]=\"loginForm\" class=\"login-form\" (ngSubmit)=\"dologin()\">\n <div>\n <div style=\"text-align: center\">\n <img *ngIf=\"logoUrl$ | async as url\" width=\"150px\" [src]=\"url\" hideIfError />\n </div>\n <div class=\"form-field\" style=\"text-align: center; margin-bottom: 20px\">\n <h3 style=\"font-weight: bold; font-size: 20px\">{{ SYSTEM_NAME_LOGIN }}</h3>\n </div>\n </div>\n\n <div nz-row [nzJustify]=\"'center'\">\n <div nz-col nzSm=\"24\" nzMd=\"16\">\n <div nz-flex nzVertical=\"true\">\n @if (isOneUserMultiOrgs) {\n <nz-form-item>\n <nz-form-control nzErrorTip=\"{{ 'REQUIRED' | translate }}\">\n <nz-input-group nzPrefixIcon=\"cluster\" nzHasFeedback=\"false\">\n <nz-select\n nzShowSearch\n nzAllowClear\n [nzBorderless]=\"true\"\n [nzSize]=\"'small'\"\n [nzDropdownMatchSelectWidth]=\"false\"\n nzPlaceHolder=\"{{ 'ORG' | translate }}\"\n formControlName=\"orgid\"\n class=\"no-error-border\"\n (nzFocus)=\"onFocusOrg()\"\n >\n @for (item of lstOrg; track $index) {\n <nz-option [nzLabel]=\"item.TreeNodeName!\" [nzValue]=\"item.App_Org_Id\"></nz-option>\n }\n </nz-select>\n </nz-input-group>\n </nz-form-control>\n </nz-form-item>\n }\n\n <nz-form-item>\n <nz-form-control nzErrorTip=\"{{ 'REQUIRED' | translate }}\">\n <nz-input-group nzPrefixIcon=\"user\">\n <input type=\"text\" nz-input formControlName=\"username\" placeholder=\"{{ 'USERNAME' | translate }}\" />\n </nz-input-group>\n </nz-form-control>\n </nz-form-item>\n\n <nz-form-item>\n <nz-form-control nzErrorTip=\"{{ 'REQUIRED' | translate }}\">\n <nz-input-group\n nzPrefixIcon=\"lock\"\n [nzSuffix]=\"visible ? suffixTemplateHiddenPassword : suffixTemplateShowPassword\"\n >\n <input\n type=\"{{ passwordType }}\"\n nz-input\n formControlName=\"password\"\n placeholder=\"{{ 'PASSWORD' | translate }}\"\n />\n </nz-input-group>\n </nz-form-control>\n <ng-template #suffixTemplateShowPassword>\n <nz-icon\n nzType=\"eye\"\n nzTheme=\"outline\"\n nz-tooltip\n nzTooltipTitle=\"{{ 'SHOW' | translate }}\"\n nzTooltipPlacement=\"right\"\n (click)=\"visible = !visible; passwordType = 'text'\"\n />\n </ng-template>\n <ng-template #suffixTemplateHiddenPassword>\n <nz-icon\n nzType=\"eye-invisible\"\n nzTheme=\"outline\"\n nz-tooltip\n nzTooltipTitle=\"{{ 'HIDDEN' | translate }}\"\n nzTooltipPlacement=\"right\"\n (click)=\"visible = !visible; passwordType = 'password'\"\n />\n </ng-template>\n </nz-form-item>\n\n <div nz-flex nzVertical=\"true\" nzGap=\"4px\">\n <button nz-button [nzType]=\"'primary'\" nzBlock [nzLoading]=\"loadingService.isLoading\">\n {{ \"LOGIN\" | translate }}\n </button>\n <!-- \n <nz-form-item nzJustify=\"end\">\n <nz-switch formControlName=\"langSwitch\" class=\"nz-switch-both-active-color\" nzCheckedChildren=\"VN\"\n nzUnCheckedChildren=\"EN\" (ngModelChange)=\"changeLanguage($event)\"></nz-switch>\n </nz-form-item> \n -->\n </div>\n </div>\n </div>\n </div>\n </form>\n </div>\n</div>\n\n<img *ngIf=\"bgUrl$ | async as url\" class=\"bg-image\" [src]=\"url\" hideIfError />\n", styles: [":host{display:flex;justify-content:center;align-items:center;height:80vh}.form-container{width:clamp(280px,30vw,420px);box-shadow:0 10px 20px 1px #001a2d59;background-color:#fff;padding:16px}.bg-image{position:fixed;top:0;left:0;width:100vw;height:100vh;object-fit:cover;object-position:center;z-index:-1;pointer-events:none}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1$3.AsyncPipe, name: "async" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: NzFormModule }, { kind: "directive", type: i4.NzColDirective, selector: "[nz-col],nz-col,nz-form-control,nz-form-label", inputs: ["nzFlex", "nzSpan", "nzOrder", "nzOffset", "nzPush", "nzPull", "nzXs", "nzSm", "nzMd", "nzLg", "nzXl", "nzXXl"], exportAs: ["nzCol"] }, { kind: "directive", type: i4.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "directive", type: i5.NzFormDirective, selector: "[nz-form]", inputs: ["nzLayout", "nzNoColon", "nzAutoTips", "nzDisableAutoTips", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap"], exportAs: ["nzForm"] }, { kind: "component", type: i5.NzFormItemComponent, selector: "nz-form-item", exportAs: ["nzFormItem"] }, { kind: "component", type: i5.NzFormControlComponent, selector: "nz-form-control", inputs: ["nzSuccessTip", "nzWarningTip", "nzErrorTip", "nzValidatingTip", "nzExtra", "nzAutoTips", "nzDisableAutoTips", "nzHasFeedback", "nzValidateStatus"], exportAs: ["nzFormControl"] }, { kind: "ngmodule", type: NzInputModule }, { kind: "directive", type: i6$1.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzSize", "nzStepperless", "nzStatus", "disabled"], exportAs: ["nzInput"] }, { kind: "component", type: i6$1.NzInputGroupComponent, selector: "nz-input-group", inputs: ["nzAddOnBeforeIcon", "nzAddOnAfterIcon", "nzPrefixIcon", "nzSuffixIcon", "nzAddOnBefore", "nzAddOnAfter", "nzPrefix", "nzStatus", "nzSuffix", "nzSize", "nzSearch", "nzCompact"], exportAs: ["nzInputGroup"] }, { kind: "directive", type: i6$1.NzInputGroupWhitSuffixOrPrefixDirective, selector: "nz-input-group[nzSuffix], nz-input-group[nzPrefix]" }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i1$2.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: NzToolTipModule }, { kind: "directive", type: i11.NzTooltipDirective, selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "cdkConnectedOverlayPush", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i8.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i9.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i10.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "ngmodule", type: NzSwitchModule }, { kind: "ngmodule", type: NzFlexModule }, { kind: "directive", type: i14.NzFlexDirective, selector: "[nz-flex],nz-flex", inputs: ["nzVertical", "nzJustify", "nzAlign", "nzGap", "nzWrap", "nzFlex"], exportAs: ["nzFlex"] }, { kind: "ngmodule", type: NzSelectModule }, { kind: "component", type: i6$2.NzOptionComponent, selector: "nz-option", inputs: ["nzTitle", "nzLabel", "nzValue", "nzKey", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: i6$2.NzSelectComponent, selector: "nz-select", inputs: ["nzId", "nzSize", "nzStatus", "nzOptionHeightPx", "nzOptionOverflowSize", "nzDropdownClassName", "nzDropdownMatchSelectWidth", "nzDropdownStyle", "nzNotFoundContent", "nzPlaceHolder", "nzPlacement", "nzMaxTagCount", "nzDropdownRender", "nzCustomTemplate", "nzSuffixIcon", "nzClearIcon", "nzRemoveIcon", "nzMenuItemSelectedIcon", "nzTokenSeparators", "nzMaxTagPlaceholder", "nzMaxMultipleCount", "nzMode", "nzFilterOption", "compareWith", "nzAllowClear", "nzBorderless", "nzShowSearch", "nzLoading", "nzAutoFocus", "nzAutoClearSearchValue", "nzServerSearch", "nzDisabled", "nzOpen", "nzSelectOnTab", "nzBackdrop", "nzOptions", "nzShowArrow"], outputs: ["nzOnSearch", "nzScrollToBottom", "nzOpenChange", "nzBlur", "nzFocus"], exportAs: ["nzSelect"] }, { kind: "directive", type: HideIfErrorDirective, selector: "img[hideIfError]" }] });
6681
+ }
6682
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: LoginComponent, decorators: [{
6683
+ type: Component,
6684
+ args: [{ selector: 'login', imports: [
6685
+ CommonModule,
6686
+ FormsModule,
6687
+ ReactiveFormsModule,
6688
+ TranslateModule,
6689
+ NzFormModule,
6690
+ NzInputModule,
6691
+ NzIconModule,
6692
+ NzToolTipModule,
6693
+ NzButtonModule,
6694
+ NzSwitchModule,
6695
+ NzFlexModule,
6696
+ NzSelectModule,
6697
+ HideIfErrorDirective,
6698
+ ], template: "<div nz-row nzJustify=\"center\">\n <div class=\"form-container\">\n <form nz-flex nzVertical=\"true\" nz-form [formGroup]=\"loginForm\" class=\"login-form\" (ngSubmit)=\"dologin()\">\n <div>\n <div style=\"text-align: center\">\n <img *ngIf=\"logoUrl$ | async as url\" width=\"150px\" [src]=\"url\" hideIfError />\n </div>\n <div class=\"form-field\" style=\"text-align: center; margin-bottom: 20px\">\n <h3 style=\"font-weight: bold; font-size: 20px\">{{ SYSTEM_NAME_LOGIN }}</h3>\n </div>\n </div>\n\n <div nz-row [nzJustify]=\"'center'\">\n <div nz-col nzSm=\"24\" nzMd=\"16\">\n <div nz-flex nzVertical=\"true\">\n @if (isOneUserMultiOrgs) {\n <nz-form-item>\n <nz-form-control nzErrorTip=\"{{ 'REQUIRED' | translate }}\">\n <nz-input-group nzPrefixIcon=\"cluster\" nzHasFeedback=\"false\">\n <nz-select\n nzShowSearch\n nzAllowClear\n [nzBorderless]=\"true\"\n [nzSize]=\"'small'\"\n [nzDropdownMatchSelectWidth]=\"false\"\n nzPlaceHolder=\"{{ 'ORG' | translate }}\"\n formControlName=\"orgid\"\n class=\"no-error-border\"\n (nzFocus)=\"onFocusOrg()\"\n >\n @for (item of lstOrg; track $index) {\n <nz-option [nzLabel]=\"item.TreeNodeName!\" [nzValue]=\"item.App_Org_Id\"></nz-option>\n }\n </nz-select>\n </nz-input-group>\n </nz-form-control>\n </nz-form-item>\n }\n\n <nz-form-item>\n <nz-form-control nzErrorTip=\"{{ 'REQUIRED' | translate }}\">\n <nz-input-group nzPrefixIcon=\"user\">\n <input type=\"text\" nz-input formControlName=\"username\" placeholder=\"{{ 'USERNAME' | translate }}\" />\n </nz-input-group>\n </nz-form-control>\n </nz-form-item>\n\n <nz-form-item>\n <nz-form-control nzErrorTip=\"{{ 'REQUIRED' | translate }}\">\n <nz-input-group\n nzPrefixIcon=\"lock\"\n [nzSuffix]=\"visible ? suffixTemplateHiddenPassword : suffixTemplateShowPassword\"\n >\n <input\n type=\"{{ passwordType }}\"\n nz-input\n formControlName=\"password\"\n placeholder=\"{{ 'PASSWORD' | translate }}\"\n />\n </nz-input-group>\n </nz-form-control>\n <ng-template #suffixTemplateShowPassword>\n <nz-icon\n nzType=\"eye\"\n nzTheme=\"outline\"\n nz-tooltip\n nzTooltipTitle=\"{{ 'SHOW' | translate }}\"\n nzTooltipPlacement=\"right\"\n (click)=\"visible = !visible; passwordType = 'text'\"\n />\n </ng-template>\n <ng-template #suffixTemplateHiddenPassword>\n <nz-icon\n nzType=\"eye-invisible\"\n nzTheme=\"outline\"\n nz-tooltip\n nzTooltipTitle=\"{{ 'HIDDEN' | translate }}\"\n nzTooltipPlacement=\"right\"\n (click)=\"visible = !visible; passwordType = 'password'\"\n />\n </ng-template>\n </nz-form-item>\n\n <div nz-flex nzVertical=\"true\" nzGap=\"4px\">\n <button nz-button [nzType]=\"'primary'\" nzBlock [nzLoading]=\"loadingService.isLoading\">\n {{ \"LOGIN\" | translate }}\n </button>\n <!-- \n <nz-form-item nzJustify=\"end\">\n <nz-switch formControlName=\"langSwitch\" class=\"nz-switch-both-active-color\" nzCheckedChildren=\"VN\"\n nzUnCheckedChildren=\"EN\" (ngModelChange)=\"changeLanguage($event)\"></nz-switch>\n </nz-form-item> \n -->\n </div>\n </div>\n </div>\n </div>\n </form>\n </div>\n</div>\n\n<img *ngIf=\"bgUrl$ | async as url\" class=\"bg-image\" [src]=\"url\" hideIfError />\n", styles: [":host{display:flex;justify-content:center;align-items:center;height:80vh}.form-container{width:clamp(280px,30vw,420px);box-shadow:0 10px 20px 1px #001a2d59;background-color:#fff;padding:16px}.bg-image{position:fixed;top:0;left:0;width:100vw;height:100vh;object-fit:cover;object-position:center;z-index:-1;pointer-events:none}\n"] }]
6699
+ }] });
6700
+
6502
6701
  /**
6503
6702
  * Generated bundle index. Do not edit.
6504
6703
  */
6505
6704
 
6506
- export { AnimatedDigitComponent, AppGlobals, AppStorage, AuthGuard, AutoFocusDirective, BarGraphComponent, BaseComponent, BaseGuardChangeComponent, BaseOverlayComponent, Box, Breadcrumb, CheckModel, CommonService, DashcardComponent, DateInputParserDirective, DateTimeHelper, DicDomainPipe, DoughnutGraphComponent, DownloadHelper, ENUM_ResponseType, ExtendCheckbox, ExtendDatePicker, ExtendDateRangePicker, ExtendInput, ExtendInputNumber, ExtendSelectComponent, ExtendTextArea, GlobalSpinnerComponent, GridFilter, H3Icon, HTTPService, Height, HideIfErrorDirective, HighlightPipe, IconAdd, IconDelete, IconEdit, IconSave, IconSearch, IconView, LayoutComponent, LimitWordsPipe, LineGraphComponent, LoadingService, NoPermission, NotiService, NullIfEmptyDirective, NumberOnlyDirective, OrderOption, PagingData, PagingModel, PdfViewerComponent, RouteMonitorService, TableHeader, ThemeService, TokenStorage, TranslateKey, UnsavedChangesGuard, UpperCaseFirsLetterEachWordDirective, UppercaseDirective, UppercaseFirstLetterDirective, VscService, Width, Workflow, WorkflowAction, WorkflowActionEditorOption, WorkflowEditorComponent, WorkflowEditorOption, WorkflowStage, WorkflowStageEditorOption, XLSXHelper, authInterceptor };
6705
+ export { AnimatedDigitComponent, AppGlobals, AppStorage, App_Org, AuthGuard, AutoFocusDirective, BarGraphComponent, BaseComponent, BaseGuardChangeComponent, BaseOverlayComponent, Box, Breadcrumb, CheckModel, CommonService, DashcardComponent, DateInputParserDirective, DateTimeHelper, DicDomainPipe, DoughnutGraphComponent, DownloadHelper, ENUM_ResponseType, ExtendCheckbox, ExtendDatePicker, ExtendDateRangePicker, ExtendInput, ExtendInputNumber, ExtendSelectComponent, ExtendTextArea, GlobalSpinnerComponent, GridFilter, H3Icon, HTTPService, Height, HideIfErrorDirective, HighlightPipe, IconAdd, IconDelete, IconEdit, IconSave, IconSearch, IconView, LayoutComponent, LimitWordsPipe, LineGraphComponent, LoadingService, LoginComponent, NoPermission, NotiService, NullIfEmptyDirective, NumberOnlyDirective, OrderOption, PagingData, PagingModel, PdfViewerComponent, RouteMonitorService, TableHeader, ThemeService, TokenStorage, TranslateKey, UnsavedChangesGuard, UpperCaseFirsLetterEachWordDirective, UppercaseDirective, UppercaseFirstLetterDirective, VscService, Width, Workflow, WorkflowAction, WorkflowActionEditorOption, WorkflowEditorComponent, WorkflowEditorOption, WorkflowStage, WorkflowStageEditorOption, XLSXHelper, authInterceptor };
6507
6706
  //# sourceMappingURL=brggroup-share-lib.mjs.map