@brggroup/share-lib 0.0.59 → 0.0.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/brggroup-share-lib.mjs +280 -48
- package/fesm2022/brggroup-share-lib.mjs.map +1 -1
- package/lib/auth/auth.service.d.ts +1 -2
- package/lib/auth/auth.service.d.ts.map +1 -1
- package/lib/components/layout/layout-user/layout-user.d.ts +1 -18
- package/lib/components/layout/layout-user/layout-user.d.ts.map +1 -1
- package/lib/components/layout/layout.component.d.ts +3 -0
- package/lib/components/layout/layout.component.d.ts.map +1 -1
- package/lib/components/login/login.component.d.ts +38 -0
- package/lib/components/login/login.component.d.ts.map +1 -0
- package/lib/helper/date.helper.d.ts +3 -0
- package/lib/helper/date.helper.d.ts.map +1 -1
- package/lib/model.d.ts +18 -0
- package/lib/model.d.ts.map +1 -1
- package/lib/services/device-service.d.ts +9 -0
- package/lib/services/device-service.d.ts.map +1 -0
- package/lib/services/org.service.d.ts +31 -0
- package/lib/services/org.service.d.ts.map +1 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/public-api.d.ts.map +1 -1
|
@@ -5,14 +5,14 @@ import { Router, ActivatedRoute, NavigationEnd, RouterLink, RouterOutlet } from
|
|
|
5
5
|
import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
|
|
6
6
|
import * as i3 from '@ngx-translate/core';
|
|
7
7
|
import { TranslateService, TranslateModule } from '@ngx-translate/core';
|
|
8
|
-
import { firstValueFrom, BehaviorSubject, of, catchError, throwError, finalize, from, switchMap as switchMap$1, take, filter, fromEvent, map } from 'rxjs';
|
|
8
|
+
import { firstValueFrom, BehaviorSubject, of, catchError, throwError, finalize, from, switchMap as switchMap$1, take, filter, fromEvent, startWith, map, Subject, takeUntil as takeUntil$1 } from 'rxjs';
|
|
9
9
|
import { NzNotificationService } from 'ng-zorro-antd/notification';
|
|
10
10
|
import * as i1 from 'ng-zorro-antd/modal';
|
|
11
11
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
635
|
+
return this.postData(AppGlobals.apiEndpoint + URLs$4.changePassword, data);
|
|
635
636
|
}
|
|
636
637
|
setPass(data) {
|
|
637
|
-
return this.postData(AppGlobals.apiEndpoint + URLs$
|
|
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$
|
|
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$
|
|
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' });
|
|
@@ -1753,6 +1754,15 @@ class DateTimeHelper {
|
|
|
1753
1754
|
}
|
|
1754
1755
|
return result;
|
|
1755
1756
|
}
|
|
1757
|
+
static firstDayOfMonth(date = new Date()) {
|
|
1758
|
+
return new Date(date.getFullYear(), date.getMonth(), 1);
|
|
1759
|
+
}
|
|
1760
|
+
static lastDayOfMonth(date = new Date()) {
|
|
1761
|
+
return new Date(date.getFullYear(), date.getMonth() + 1, 0);
|
|
1762
|
+
}
|
|
1763
|
+
static firstDayOfNextMonth(date = new Date()) {
|
|
1764
|
+
return new Date(date.getFullYear(), date.getMonth() + 1, 1);
|
|
1765
|
+
}
|
|
1756
1766
|
}
|
|
1757
1767
|
|
|
1758
1768
|
/**
|
|
@@ -5523,6 +5533,26 @@ class CheckModel {
|
|
|
5523
5533
|
ErrorMessage = '';
|
|
5524
5534
|
ErrorContent = '';
|
|
5525
5535
|
}
|
|
5536
|
+
class App_Org {
|
|
5537
|
+
// #region properties
|
|
5538
|
+
App_Org_Id;
|
|
5539
|
+
CreatedDate;
|
|
5540
|
+
CreatedUser;
|
|
5541
|
+
UpdatedDate;
|
|
5542
|
+
UpdatedUser;
|
|
5543
|
+
IsActive;
|
|
5544
|
+
Code;
|
|
5545
|
+
Name;
|
|
5546
|
+
NameEn;
|
|
5547
|
+
Type;
|
|
5548
|
+
Address;
|
|
5549
|
+
Description;
|
|
5550
|
+
ParentId;
|
|
5551
|
+
OrderValue;
|
|
5552
|
+
// #endregion properties
|
|
5553
|
+
TreeNodeName;
|
|
5554
|
+
LstUserId;
|
|
5555
|
+
}
|
|
5526
5556
|
|
|
5527
5557
|
class RouteMonitorService {
|
|
5528
5558
|
router;
|
|
@@ -5658,7 +5688,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImpor
|
|
|
5658
5688
|
}]
|
|
5659
5689
|
}] });
|
|
5660
5690
|
|
|
5661
|
-
const URLs$
|
|
5691
|
+
const URLs$3 = {
|
|
5662
5692
|
getById: '/api/App_Dic_Domain/GetById',
|
|
5663
5693
|
getAll: '/api/App_Dic_Domain/GetAll',
|
|
5664
5694
|
getList: '/api/App_Dic_Domain/GetList',
|
|
@@ -5845,26 +5875,6 @@ const fadeSlide = trigger('fadeSlide', [
|
|
|
5845
5875
|
]),
|
|
5846
5876
|
]);
|
|
5847
5877
|
|
|
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
5878
|
class LayoutUser extends BaseComponent {
|
|
5869
5879
|
cms = inject(CommonService);
|
|
5870
5880
|
authService = inject(AuthService);
|
|
@@ -5926,7 +5936,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImpor
|
|
|
5926
5936
|
], 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\" /> {{ 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\" /> {{ 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\" /> {{ 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\" /> {{ org.Name }}\n </li>\n }\n </ul>\n</nz-dropdown-menu>\n" }]
|
|
5927
5937
|
}] });
|
|
5928
5938
|
|
|
5929
|
-
const URLs$
|
|
5939
|
+
const URLs$2 = {
|
|
5930
5940
|
getById: '/api/App_Setting/GetById',
|
|
5931
5941
|
getAll: '/api/App_Setting/GetAll',
|
|
5932
5942
|
getList: '/api/App_Setting/GetList',
|
|
@@ -5947,10 +5957,10 @@ class SettingService extends HTTPService {
|
|
|
5947
5957
|
});
|
|
5948
5958
|
}
|
|
5949
5959
|
getAll() {
|
|
5950
|
-
return this.post(AppGlobals.apiEndpoint + URLs$
|
|
5960
|
+
return this.post(AppGlobals.apiEndpoint + URLs$2.getAll);
|
|
5951
5961
|
}
|
|
5952
5962
|
getList(filter) {
|
|
5953
|
-
return this.postData(AppGlobals.apiEndpoint + URLs$
|
|
5963
|
+
return this.postData(AppGlobals.apiEndpoint + URLs$2.getList, filter);
|
|
5954
5964
|
}
|
|
5955
5965
|
getPaging(filter) {
|
|
5956
5966
|
return this.commonService.ESP({
|
|
@@ -5966,24 +5976,24 @@ class SettingService extends HTTPService {
|
|
|
5966
5976
|
}
|
|
5967
5977
|
delete(id) {
|
|
5968
5978
|
const params = new HttpParams().append('id', id);
|
|
5969
|
-
return this.postParams(AppGlobals.apiEndpoint + URLs$
|
|
5979
|
+
return this.postParams(AppGlobals.apiEndpoint + URLs$2.delete, params);
|
|
5970
5980
|
}
|
|
5971
5981
|
getByCodeAnonymous(code) {
|
|
5972
5982
|
const params = new HttpParams().append('Code', code);
|
|
5973
|
-
return this.getParams(AppGlobals.apiEndpoint + URLs$
|
|
5983
|
+
return this.getParams(AppGlobals.apiEndpoint + URLs$2.getByCodeAnonymous, params);
|
|
5974
5984
|
}
|
|
5975
5985
|
// getGroupByCodeAnonymous(code: string) {
|
|
5976
5986
|
// const params = new HttpParams().append('Code', code);
|
|
5977
5987
|
// return this.getParams(AppGlobals.apiEndpoint + URLs.getByCodeAnonymous, params);
|
|
5978
5988
|
// }
|
|
5979
5989
|
getAllConfig() {
|
|
5980
|
-
return this.post(AppGlobals.apiEndpoint + URLs$
|
|
5990
|
+
return this.post(AppGlobals.apiEndpoint + URLs$2.GetAllConfig);
|
|
5981
5991
|
}
|
|
5982
5992
|
applyConfig(config) {
|
|
5983
|
-
return this.postData(AppGlobals.apiEndpoint + URLs$
|
|
5993
|
+
return this.postData(AppGlobals.apiEndpoint + URLs$2.ApplyConfig, config);
|
|
5984
5994
|
}
|
|
5985
5995
|
getDbInfo() {
|
|
5986
|
-
return this.post(AppGlobals.apiEndpoint + URLs$
|
|
5996
|
+
return this.post(AppGlobals.apiEndpoint + URLs$2.GetDbInfo);
|
|
5987
5997
|
}
|
|
5988
5998
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: SettingService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
5989
5999
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: SettingService, providedIn: 'root' });
|
|
@@ -5995,7 +6005,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImpor
|
|
|
5995
6005
|
}]
|
|
5996
6006
|
}] });
|
|
5997
6007
|
|
|
5998
|
-
const URLs = {
|
|
6008
|
+
const URLs$1 = {
|
|
5999
6009
|
getById: '/api/file/GetById',
|
|
6000
6010
|
getAll: '/api/file/GetAll',
|
|
6001
6011
|
getList: '/api/file/GetList',
|
|
@@ -6009,13 +6019,13 @@ class FileService extends HTTPService {
|
|
|
6009
6019
|
commonService = inject(CommonService);
|
|
6010
6020
|
getById(id) {
|
|
6011
6021
|
const params = new HttpParams().append('id', id);
|
|
6012
|
-
return this.postParams(AppGlobals.apiEndpoint + URLs.getById, params);
|
|
6022
|
+
return this.postParams(AppGlobals.apiEndpoint + URLs$1.getById, params);
|
|
6013
6023
|
}
|
|
6014
6024
|
getAll() {
|
|
6015
|
-
return this.post(AppGlobals.apiEndpoint + URLs.getAll);
|
|
6025
|
+
return this.post(AppGlobals.apiEndpoint + URLs$1.getAll);
|
|
6016
6026
|
}
|
|
6017
6027
|
getList(filter) {
|
|
6018
|
-
return this.postData(AppGlobals.apiEndpoint + URLs.getList, filter);
|
|
6028
|
+
return this.postData(AppGlobals.apiEndpoint + URLs$1.getList, filter);
|
|
6019
6029
|
}
|
|
6020
6030
|
getPaging(filter) {
|
|
6021
6031
|
return this.commonService.ESP({
|
|
@@ -6024,11 +6034,11 @@ class FileService extends HTTPService {
|
|
|
6024
6034
|
});
|
|
6025
6035
|
}
|
|
6026
6036
|
addOrEdit(obj) {
|
|
6027
|
-
return this.postData(AppGlobals.apiEndpoint + URLs.addOrEdit, obj);
|
|
6037
|
+
return this.postData(AppGlobals.apiEndpoint + URLs$1.addOrEdit, obj);
|
|
6028
6038
|
}
|
|
6029
6039
|
delete(id) {
|
|
6030
6040
|
const params = new HttpParams().append('id', id);
|
|
6031
|
-
return this.postParams(AppGlobals.apiEndpoint + URLs.delete, params);
|
|
6041
|
+
return this.postParams(AppGlobals.apiEndpoint + URLs$1.delete, params);
|
|
6032
6042
|
}
|
|
6033
6043
|
downloadFile(id) {
|
|
6034
6044
|
const params = new HttpParams().append('id', id);
|
|
@@ -6070,7 +6080,7 @@ class FileService extends HTTPService {
|
|
|
6070
6080
|
});
|
|
6071
6081
|
}
|
|
6072
6082
|
addFileWithRef(obj) {
|
|
6073
|
-
return this.postData(AppGlobals.apiEndpoint + URLs.addFileWithRef, obj);
|
|
6083
|
+
return this.postData(AppGlobals.apiEndpoint + URLs$1.addFileWithRef, obj);
|
|
6074
6084
|
}
|
|
6075
6085
|
getAnhWithRef(Ref_Table, Ref_Id) {
|
|
6076
6086
|
return this.commonService.ESP({
|
|
@@ -6079,7 +6089,7 @@ class FileService extends HTTPService {
|
|
|
6079
6089
|
});
|
|
6080
6090
|
}
|
|
6081
6091
|
moveFileToDisk(obj) {
|
|
6082
|
-
return this.postData(AppGlobals.apiEndpoint + URLs.moveFileToDisk, obj);
|
|
6092
|
+
return this.postData(AppGlobals.apiEndpoint + URLs$1.moveFileToDisk, obj);
|
|
6083
6093
|
}
|
|
6084
6094
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: FileService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
6085
6095
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: FileService, providedIn: 'root' });
|
|
@@ -6162,6 +6172,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImpor
|
|
|
6162
6172
|
}]
|
|
6163
6173
|
}] });
|
|
6164
6174
|
|
|
6175
|
+
class DeviceService {
|
|
6176
|
+
isMobile$() {
|
|
6177
|
+
return fromEvent(window, 'resize').pipe(startWith(null), // emit lần đầu
|
|
6178
|
+
map(() => window.innerWidth <= 768));
|
|
6179
|
+
}
|
|
6180
|
+
get isMobile() {
|
|
6181
|
+
return window.innerWidth <= 500;
|
|
6182
|
+
}
|
|
6183
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: DeviceService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
6184
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: DeviceService, providedIn: 'root' });
|
|
6185
|
+
}
|
|
6186
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: DeviceService, decorators: [{
|
|
6187
|
+
type: Injectable,
|
|
6188
|
+
args: [{ providedIn: 'root' }]
|
|
6189
|
+
}] });
|
|
6190
|
+
|
|
6165
6191
|
class App_Menu {
|
|
6166
6192
|
// #region properties
|
|
6167
6193
|
App_Menu_Id;
|
|
@@ -6223,6 +6249,7 @@ class LayoutComponent extends BaseComponent {
|
|
|
6223
6249
|
loadingService = inject(LoadingService);
|
|
6224
6250
|
fileService = inject(FileService);
|
|
6225
6251
|
breakpointObserver = inject(BreakpointObserver);
|
|
6252
|
+
device = inject(DeviceService);
|
|
6226
6253
|
TokenStorage = TokenStorage;
|
|
6227
6254
|
MENU_TYPE = 0;
|
|
6228
6255
|
HEADER_MENU_IN_USE = false;
|
|
@@ -6252,6 +6279,7 @@ class LayoutComponent extends BaseComponent {
|
|
|
6252
6279
|
logoUrl$ = this.fileService
|
|
6253
6280
|
.getFileVersion('LOGO')
|
|
6254
6281
|
.pipe(map((res) => `${AppGlobals.apiEndpoint}/api/file/image?code=LOGO&v=${res || ''}`));
|
|
6282
|
+
destroy$ = new Subject();
|
|
6255
6283
|
async ngOnInit() {
|
|
6256
6284
|
this.vscService.initVersionCheck();
|
|
6257
6285
|
SignalRService.initNoti();
|
|
@@ -6298,11 +6326,17 @@ class LayoutComponent extends BaseComponent {
|
|
|
6298
6326
|
this.selectNodeByUrl(url);
|
|
6299
6327
|
});
|
|
6300
6328
|
setTimeout(() => {
|
|
6301
|
-
this.isCollapsed = localStorage.getItem('MENU_isCollapsed') == '1';
|
|
6329
|
+
this.isCollapsed = localStorage.getItem('MENU_isCollapsed') == '1' || this.device.isMobile;
|
|
6302
6330
|
if (this.isCollapsed) {
|
|
6303
6331
|
this.visibleMenuDrawer = true;
|
|
6304
6332
|
}
|
|
6305
6333
|
}, 0);
|
|
6334
|
+
this.device
|
|
6335
|
+
.isMobile$()
|
|
6336
|
+
.pipe(takeUntil$1(this.destroy$))
|
|
6337
|
+
.subscribe((isMobile) => {
|
|
6338
|
+
this.isCollapsed = isMobile;
|
|
6339
|
+
});
|
|
6306
6340
|
}
|
|
6307
6341
|
divuser;
|
|
6308
6342
|
ngOnDestroy() {
|
|
@@ -6499,9 +6533,207 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImpor
|
|
|
6499
6533
|
args: ['divuser']
|
|
6500
6534
|
}] } });
|
|
6501
6535
|
|
|
6536
|
+
const URLs = {
|
|
6537
|
+
getById: '/api/App_Org/GetById',
|
|
6538
|
+
getAll: '/api/App_Org/GetAll',
|
|
6539
|
+
getList: '/api/App_Org/GetList',
|
|
6540
|
+
getPaging: '/api/App_Org/GetPaging',
|
|
6541
|
+
addOrEdit: '/api/App_Org/AddOrEdit',
|
|
6542
|
+
delete: '/api/App_Org/Delete',
|
|
6543
|
+
};
|
|
6544
|
+
class OrgService extends HTTPService {
|
|
6545
|
+
commonService = inject(CommonService);
|
|
6546
|
+
getById(id) {
|
|
6547
|
+
return this.commonService.ESP({
|
|
6548
|
+
SPN: 'App_Org_getById',
|
|
6549
|
+
Params: [id],
|
|
6550
|
+
});
|
|
6551
|
+
}
|
|
6552
|
+
getAll() {
|
|
6553
|
+
return this.commonService.ESP({
|
|
6554
|
+
SPN: 'App_Org_getAll',
|
|
6555
|
+
});
|
|
6556
|
+
}
|
|
6557
|
+
getList(filter) {
|
|
6558
|
+
return this.postData(AppGlobals.apiEndpoint + URLs.getList, filter);
|
|
6559
|
+
}
|
|
6560
|
+
getPaging(filter) {
|
|
6561
|
+
return this.commonService.ESP({
|
|
6562
|
+
SPN: 'App_Org_getpaging',
|
|
6563
|
+
Params: [filter],
|
|
6564
|
+
});
|
|
6565
|
+
}
|
|
6566
|
+
addOrEdit(obj) {
|
|
6567
|
+
return this.commonService.ESP({
|
|
6568
|
+
SPN: 'App_Org_addOrEdit',
|
|
6569
|
+
Params: [obj],
|
|
6570
|
+
});
|
|
6571
|
+
}
|
|
6572
|
+
delete(id) {
|
|
6573
|
+
const params = new HttpParams().append('id', id);
|
|
6574
|
+
return this.postParams(AppGlobals.apiEndpoint + URLs.delete, params);
|
|
6575
|
+
}
|
|
6576
|
+
getAllForLogin(UserName) {
|
|
6577
|
+
const params = new HttpParams().append('UserName', UserName);
|
|
6578
|
+
return this.getParams(`${AppGlobals.apiEndpoint}/api/public/LstOrgForLogin`, params);
|
|
6579
|
+
}
|
|
6580
|
+
getUserInOrgStr(OrgId) {
|
|
6581
|
+
return this.commonService.ESP({
|
|
6582
|
+
SPN: 'App_Org_getUserInOrgStr',
|
|
6583
|
+
Params: [OrgId],
|
|
6584
|
+
});
|
|
6585
|
+
}
|
|
6586
|
+
getUsersInOrg(orgId) {
|
|
6587
|
+
return this.commonService.ESP({
|
|
6588
|
+
SPN: 'App_Org_getUsersInOrg',
|
|
6589
|
+
Params: [orgId],
|
|
6590
|
+
});
|
|
6591
|
+
}
|
|
6592
|
+
addUsersToOrg(orgId, userIds) {
|
|
6593
|
+
if (!orgId) {
|
|
6594
|
+
return Promise.reject('Org ID is required');
|
|
6595
|
+
}
|
|
6596
|
+
return this.commonService.ESP({
|
|
6597
|
+
SPN: 'App_Org_addUsersToOrg',
|
|
6598
|
+
Params: [orgId, userIds.join(',')],
|
|
6599
|
+
});
|
|
6600
|
+
}
|
|
6601
|
+
deleteUserFromOrg(orgId, userId) {
|
|
6602
|
+
return this.commonService.ESP({
|
|
6603
|
+
SPN: 'App_Org_deleteUserFromOrg',
|
|
6604
|
+
Params: [orgId, userId],
|
|
6605
|
+
});
|
|
6606
|
+
}
|
|
6607
|
+
checkImportOrg(data) {
|
|
6608
|
+
return this.commonService.ESP({
|
|
6609
|
+
SPN: 'App_Org_checkImportOrg',
|
|
6610
|
+
Params: [data],
|
|
6611
|
+
});
|
|
6612
|
+
}
|
|
6613
|
+
importOrg(data) {
|
|
6614
|
+
return this.postData(`${AppGlobals.apiEndpoint}/api/Org/importOrg`, data);
|
|
6615
|
+
}
|
|
6616
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: OrgService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
6617
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: OrgService, providedIn: 'root' });
|
|
6618
|
+
}
|
|
6619
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: OrgService, decorators: [{
|
|
6620
|
+
type: Injectable,
|
|
6621
|
+
args: [{
|
|
6622
|
+
providedIn: 'root',
|
|
6623
|
+
}]
|
|
6624
|
+
}] });
|
|
6625
|
+
|
|
6626
|
+
class LoginComponent extends BaseComponent {
|
|
6627
|
+
fb = inject(FormBuilder);
|
|
6628
|
+
authService = inject(AuthService);
|
|
6629
|
+
orgService = inject(OrgService);
|
|
6630
|
+
settingService = inject(SettingService);
|
|
6631
|
+
vscService = inject(VscService);
|
|
6632
|
+
loadingService = inject(LoadingService);
|
|
6633
|
+
fileService = inject(FileService);
|
|
6634
|
+
loginForm;
|
|
6635
|
+
visible = false;
|
|
6636
|
+
passwordType = 'password';
|
|
6637
|
+
returnUrl = '';
|
|
6638
|
+
lstOrg = [];
|
|
6639
|
+
isOneUserMultiOrgs = false;
|
|
6640
|
+
SYSTEM_NAME_LOGIN = '';
|
|
6641
|
+
async ngOnInit() {
|
|
6642
|
+
this.route.queryParams.subscribe((params) => (this.returnUrl = params['returnUrl'] || '/'));
|
|
6643
|
+
if (TokenStorage.getToken() && (await this.authService.pingAuth())) {
|
|
6644
|
+
this.goto(this.returnUrl);
|
|
6645
|
+
return;
|
|
6646
|
+
}
|
|
6647
|
+
TokenStorage.clearToken();
|
|
6648
|
+
this.loginForm = this.fb.group({
|
|
6649
|
+
username: [null, [Validators.required]],
|
|
6650
|
+
password: [null, [Validators.required]],
|
|
6651
|
+
orgid: [null],
|
|
6652
|
+
langSwitch: [AppStorage.getLang() === 'vn'],
|
|
6653
|
+
});
|
|
6654
|
+
this.settingService.getByCodeAnonymous('SYSTEM_NAME_LOGIN').then((res) => {
|
|
6655
|
+
if (res?.Data) {
|
|
6656
|
+
this.SYSTEM_NAME_LOGIN = res.Data;
|
|
6657
|
+
}
|
|
6658
|
+
}, (err) => this.handleError(err));
|
|
6659
|
+
this.settingService.getByCodeAnonymous('ONE_USER_MULTI_ORGS').then((res) => {
|
|
6660
|
+
if (res?.Data) {
|
|
6661
|
+
if (res.Data == '1') {
|
|
6662
|
+
this.isOneUserMultiOrgs = true;
|
|
6663
|
+
this.loginForm.get('orgid')?.setValidators([Validators.required]);
|
|
6664
|
+
this.getLstOrg();
|
|
6665
|
+
}
|
|
6666
|
+
else {
|
|
6667
|
+
this.loginForm.get('orgid')?.clearValidators();
|
|
6668
|
+
}
|
|
6669
|
+
}
|
|
6670
|
+
}, (err) => this.handleError(err));
|
|
6671
|
+
this.vscService.clearInterval();
|
|
6672
|
+
this.authService.stopWatching();
|
|
6673
|
+
}
|
|
6674
|
+
getLstOrg() {
|
|
6675
|
+
const username = this.loginForm.controls['username'].value;
|
|
6676
|
+
this.orgService.getAllForLogin(username ?? '').then((res) => {
|
|
6677
|
+
if (res.Data) {
|
|
6678
|
+
this.lstOrg = res.Data;
|
|
6679
|
+
}
|
|
6680
|
+
else {
|
|
6681
|
+
this.lstOrg = [];
|
|
6682
|
+
}
|
|
6683
|
+
}, (err) => this.handleError(err));
|
|
6684
|
+
}
|
|
6685
|
+
dologin() {
|
|
6686
|
+
for (const i in this.loginForm.controls) {
|
|
6687
|
+
this.loginForm.controls[i].markAsDirty();
|
|
6688
|
+
this.loginForm.controls[i].updateValueAndValidity();
|
|
6689
|
+
}
|
|
6690
|
+
if (this.loginForm.valid) {
|
|
6691
|
+
this.authService.signIn(this.loginForm.value.username, this.loginForm.value.password, this.loginForm.value.orgid, this.returnUrl);
|
|
6692
|
+
}
|
|
6693
|
+
this.vscService.checkVersion();
|
|
6694
|
+
}
|
|
6695
|
+
changeLanguage(lang) {
|
|
6696
|
+
AppStorage.setLang(lang ? 'vn' : 'en');
|
|
6697
|
+
this.translate.use(lang ? 'vn' : 'en');
|
|
6698
|
+
}
|
|
6699
|
+
onFocusOrg() {
|
|
6700
|
+
console.log(this.loginForm.value.username);
|
|
6701
|
+
this.getLstOrg();
|
|
6702
|
+
}
|
|
6703
|
+
onImgError(e) {
|
|
6704
|
+
e.target.style.display = 'none';
|
|
6705
|
+
}
|
|
6706
|
+
logoUrl$ = this.fileService
|
|
6707
|
+
.getFileVersion('LOGO')
|
|
6708
|
+
.pipe(map((res) => `${AppGlobals.apiEndpoint}/api/file/image?code=LOGO&v=${res || ''}`));
|
|
6709
|
+
bgUrl$ = this.fileService
|
|
6710
|
+
.getFileVersion('LOGIN_BACKGROUND')
|
|
6711
|
+
.pipe(map((res) => `${AppGlobals.apiEndpoint}/api/file/image?code=LOGIN_BACKGROUND&v=${res || ''}`));
|
|
6712
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: LoginComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
6713
|
+
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]" }] });
|
|
6714
|
+
}
|
|
6715
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: LoginComponent, decorators: [{
|
|
6716
|
+
type: Component,
|
|
6717
|
+
args: [{ selector: 'login', imports: [
|
|
6718
|
+
CommonModule,
|
|
6719
|
+
FormsModule,
|
|
6720
|
+
ReactiveFormsModule,
|
|
6721
|
+
TranslateModule,
|
|
6722
|
+
NzFormModule,
|
|
6723
|
+
NzInputModule,
|
|
6724
|
+
NzIconModule,
|
|
6725
|
+
NzToolTipModule,
|
|
6726
|
+
NzButtonModule,
|
|
6727
|
+
NzSwitchModule,
|
|
6728
|
+
NzFlexModule,
|
|
6729
|
+
NzSelectModule,
|
|
6730
|
+
HideIfErrorDirective,
|
|
6731
|
+
], 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"] }]
|
|
6732
|
+
}] });
|
|
6733
|
+
|
|
6502
6734
|
/**
|
|
6503
6735
|
* Generated bundle index. Do not edit.
|
|
6504
6736
|
*/
|
|
6505
6737
|
|
|
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 };
|
|
6738
|
+
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
6739
|
//# sourceMappingURL=brggroup-share-lib.mjs.map
|