@bnsights/bbsf-admin-portal 1.0.99 → 1.1.1
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/README.md +9 -0
- package/{bnsights-bbsf-admin-portal-1.0.99.tgz → bnsights-bbsf-admin-portal-1.1.1.tgz} +0 -0
- package/bundles/bnsights-bbsf-admin-portal.umd.js +115 -67
- package/bundles/bnsights-bbsf-admin-portal.umd.js.map +1 -1
- package/esm2015/lib/Pages/anonymouslayout/login/login.component.js +26 -11
- package/esm2015/lib/Pages/authentication/auth-callback/auth-callback.component.js +1 -7
- package/esm2015/lib/Pages/shared/Services/AccountService.service.js +7 -1
- package/fesm2015/bnsights-bbsf-admin-portal.js +94 -66
- package/fesm2015/bnsights-bbsf-admin-portal.js.map +1 -1
- package/lib/Pages/anonymouslayout/login/login.component.d.ts +7 -2
- package/lib/Pages/shared/Services/AccountService.service.d.ts +2 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -5,6 +5,15 @@ BBSF Admin Portal package is part of BBSF 3 packages. It hosts all the angular m
|
|
|
5
5
|
For more info please visit [BBSF documentation](https://bnsightsprojects.visualstudio.com/BBSF%203/_wiki/wikis/BBSF-3.wiki/65/BBSF-Documentation)
|
|
6
6
|
|
|
7
7
|
# Change Log
|
|
8
|
+
## 1.1.1 / 29-11-2023
|
|
9
|
+
===================
|
|
10
|
+
* Update controls & Utilities version
|
|
11
|
+
|
|
12
|
+
## 1.1.0 / 19-11-2023
|
|
13
|
+
===================
|
|
14
|
+
* Update controls & Utilities version
|
|
15
|
+
* Add Login Function To Account Service
|
|
16
|
+
|
|
8
17
|
## 1.0.99 / 16-11-2023
|
|
9
18
|
===================
|
|
10
19
|
* Update controls & Utilities version
|
|
Binary file
|
|
@@ -18309,12 +18309,6 @@
|
|
|
18309
18309
|
AuthCallbackComponent.prototype.ngOnInit = function () {
|
|
18310
18310
|
return __awaiter(this, void 0, void 0, function () {
|
|
18311
18311
|
return __generator(this, function (_a) {
|
|
18312
|
-
// check for error
|
|
18313
|
-
// if (this.route.snapshot.fragment.indexOf('error') >= 0) {
|
|
18314
|
-
// this.error=true;
|
|
18315
|
-
// return;
|
|
18316
|
-
// }
|
|
18317
|
-
// await this.authService.completeAuthentication();
|
|
18318
18312
|
this.router.navigate([this.authService.getUrl()]);
|
|
18319
18313
|
return [2 /*return*/];
|
|
18320
18314
|
});
|
|
@@ -22313,13 +22307,64 @@
|
|
|
22313
22307
|
}]
|
|
22314
22308
|
}], ctorParameters: function () { return []; } });
|
|
22315
22309
|
|
|
22310
|
+
var AccountService$1 = /** @class */ (function () {
|
|
22311
|
+
function AccountService(http) {
|
|
22312
|
+
this.http = http;
|
|
22313
|
+
this.ApiUrl = "/account/";
|
|
22314
|
+
}
|
|
22315
|
+
AccountService.prototype.forgotPassword = function (email) {
|
|
22316
|
+
return this.http.post(this.ApiUrl + 'forgotPassword', JSON.stringify(email));
|
|
22317
|
+
};
|
|
22318
|
+
AccountService.prototype.getResetPassword = function (id) {
|
|
22319
|
+
var params = new i1$2.HttpParams();
|
|
22320
|
+
params = params.append("id", id);
|
|
22321
|
+
return this.http.get(this.ApiUrl + 'ResetPassword', params);
|
|
22322
|
+
};
|
|
22323
|
+
AccountService.prototype.resetPassword = function (model) {
|
|
22324
|
+
return this.http.post(this.ApiUrl + 'ResetPassword', model);
|
|
22325
|
+
};
|
|
22326
|
+
AccountService.prototype.getActivation = function (id) {
|
|
22327
|
+
var params = new i1$2.HttpParams();
|
|
22328
|
+
params = params.append("id", id);
|
|
22329
|
+
return this.http.get(this.ApiUrl + 'Activate', params);
|
|
22330
|
+
};
|
|
22331
|
+
AccountService.prototype.activate = function (model) {
|
|
22332
|
+
return this.http.post(this.ApiUrl + 'Activate', model);
|
|
22333
|
+
};
|
|
22334
|
+
AccountService.prototype.uploadLicense = function (File) {
|
|
22335
|
+
return this.http.post(this.ApiUrl + 'UploadLicense', File);
|
|
22336
|
+
};
|
|
22337
|
+
AccountService.prototype.UpdateLanguageCookieAnonymous = function (langKey) {
|
|
22338
|
+
var params = new i1$2.HttpParams();
|
|
22339
|
+
params = params.append("langKey", langKey);
|
|
22340
|
+
return this.http.get(this.ApiUrl + 'ChangeLanguageAnonymous', params);
|
|
22341
|
+
};
|
|
22342
|
+
AccountService.prototype.login = function (model) {
|
|
22343
|
+
return this.http.post(this.ApiUrl + 'Login', model);
|
|
22344
|
+
};
|
|
22345
|
+
AccountService.prototype.loginWithWindowsAuthentication = function () {
|
|
22346
|
+
return this.http.get(this.ApiUrl + 'LoginWithWindowsAuthentication');
|
|
22347
|
+
};
|
|
22348
|
+
return AccountService;
|
|
22349
|
+
}());
|
|
22350
|
+
AccountService$1.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: AccountService$1, deps: [{ token: i1__namespace.RequestHandlerService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
22351
|
+
AccountService$1.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: AccountService$1, providedIn: 'root' });
|
|
22352
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: AccountService$1, decorators: [{
|
|
22353
|
+
type: i0.Injectable,
|
|
22354
|
+
args: [{
|
|
22355
|
+
providedIn: 'root'
|
|
22356
|
+
}]
|
|
22357
|
+
}], ctorParameters: function () { return [{ type: i1__namespace.RequestHandlerService }]; } });
|
|
22358
|
+
|
|
22316
22359
|
var LoginComponent$1 = /** @class */ (function () {
|
|
22317
|
-
function LoginComponent(authService, router, route, utilityService) {
|
|
22360
|
+
function LoginComponent(authService, accountService, router, route, utilityService, environmentService) {
|
|
22318
22361
|
var _this = this;
|
|
22319
22362
|
this.authService = authService;
|
|
22363
|
+
this.accountService = accountService;
|
|
22320
22364
|
this.router = router;
|
|
22321
22365
|
this.route = route;
|
|
22322
22366
|
this.utilityService = utilityService;
|
|
22367
|
+
this.environmentService = environmentService;
|
|
22323
22368
|
this.loginForm = new i11$1.FormGroup({});
|
|
22324
22369
|
this.loginFormOptions = new i6.FormOptions;
|
|
22325
22370
|
this.getLoginModel = function () {
|
|
@@ -22333,7 +22378,7 @@
|
|
|
22333
22378
|
return paramArray;
|
|
22334
22379
|
};
|
|
22335
22380
|
this.getLoginFunction = function (model) {
|
|
22336
|
-
return _this.
|
|
22381
|
+
return _this.accountService.login(model);
|
|
22337
22382
|
};
|
|
22338
22383
|
this.onSuccessHandler = function (result) { return __awaiter(_this, void 0, void 0, function () {
|
|
22339
22384
|
return __generator(this, function (_a) {
|
|
@@ -22347,10 +22392,31 @@
|
|
|
22347
22392
|
});
|
|
22348
22393
|
}); };
|
|
22349
22394
|
this.OnErrorHandler = function (error) {
|
|
22350
|
-
_this.error = error;
|
|
22395
|
+
_this.error = error.error.Message;
|
|
22351
22396
|
};
|
|
22352
22397
|
}
|
|
22353
22398
|
LoginComponent.prototype.ngOnInit = function () {
|
|
22399
|
+
var _this = this;
|
|
22400
|
+
if (this.environmentService.getIsEnableWindowsAuthentication)
|
|
22401
|
+
this.accountService.loginWithWindowsAuthentication().subscribe(function (res) { return __awaiter(_this, void 0, void 0, function () {
|
|
22402
|
+
var result;
|
|
22403
|
+
return __generator(this, function (_a) {
|
|
22404
|
+
switch (_a.label) {
|
|
22405
|
+
case 0:
|
|
22406
|
+
result = res;
|
|
22407
|
+
this.utilityService.stopBlockUI();
|
|
22408
|
+
return [4 /*yield*/, this.authService.handleAccessToken(result.val)];
|
|
22409
|
+
case 1:
|
|
22410
|
+
_a.sent();
|
|
22411
|
+
this.router.navigate([this.authService.getUrl()]);
|
|
22412
|
+
return [2 /*return*/];
|
|
22413
|
+
}
|
|
22414
|
+
});
|
|
22415
|
+
}); });
|
|
22416
|
+
else
|
|
22417
|
+
this.loadLoginForm();
|
|
22418
|
+
};
|
|
22419
|
+
LoginComponent.prototype.loadLoginForm = function () {
|
|
22354
22420
|
this.loginForm = new i11$1.FormGroup({});
|
|
22355
22421
|
this.loginFormOptions = new i6.FormOptions();
|
|
22356
22422
|
this.loginFormOptions.FormGroup = this.loginForm;
|
|
@@ -22370,62 +22436,20 @@
|
|
|
22370
22436
|
this.password.LabelKey = "Password";
|
|
22371
22437
|
this.password.Type = i6.InputType.Password;
|
|
22372
22438
|
this.password.IsRequired = true;
|
|
22439
|
+
this.loadPage = true;
|
|
22373
22440
|
this.utilityService.stopBlockUI();
|
|
22374
22441
|
};
|
|
22375
22442
|
return LoginComponent;
|
|
22376
22443
|
}());
|
|
22377
|
-
LoginComponent$1.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: LoginComponent$1, deps: [{ token: i1__namespace.AuthService }, { token: i1__namespace$1.Router }, { token: i1__namespace$1.ActivatedRoute }, { token: i1__namespace.UtilityService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
22378
|
-
LoginComponent$1.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: LoginComponent$1, selector: "app-login", ngImport: i0__namespace, template: "\r\n<block-ui></block-ui>\r\n<div class=\"form w-100\" novalidate=\"novalidate\" id=\"kt_sign_in_form\">\r\n <input type=\"hidden\" name=\"ReturnUrl\" value=\"@Model.ReturnUrl\" />\r\n <div class=\"text-center mb-10\">\r\n <h1 class=\"text-dark mb-3\"> {{utilityService.getResourceValue(\"Login\")}} </h1>\r\n </div>\r\n <BBSF-Form [options]=\"loginFormOptions\">\r\n <div class=\"fv-row mb-10\">\r\n <BBSF-TextBox [options]=\"email\" [group]=\"loginForm\"></BBSF-TextBox>\r\n </div>\r\n <div class=\"fv-row mb-10\">\r\n <BBSF-TextBox [options]=\"password\" [group]=\"loginForm\"></BBSF-TextBox>\r\n <div class=\"text-right\">\r\n <a href=\"/Admin/account/forgotPassword\" class=\"link-primary fs-6 fw-bolder mt-2\">{{utilityService.getResourceValue(\"ForgotPassword\")}}</a>\r\n </div>\r\n </div>\r\n <div class=\"fv-row mb-10\" *ngIf=\"error\">\r\n <span class=\"text-danger\">\r\n {{error}}\r\n </span>\r\n </div>\r\n\r\n <div class=\"text-center\">\r\n <button type=\"submit\" class=\"btn btn-primary btn-sm\">\r\n {{utilityService.getResourceValue(\"Login\")}}\r\n </button>\r\n </div>\r\n </BBSF-Form>\r\n</div>\r\n", components: [{ type: i5__namespace$1.BlockUIComponent, selector: "block-ui", inputs: ["name", "template", "message", "delayStart", "delayStop"] }, { type: i6__namespace.FormComponent, selector: "BBSF-Form", inputs: ["options"], outputs: ["OnChange"] }, { type: i6__namespace.TextboxComponent, selector: "BBSF-TextBox", inputs: ["group", "options"], outputs: ["OnChange", "OnBlur"] }], directives: [{ type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
22444
|
+
LoginComponent$1.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: LoginComponent$1, deps: [{ token: i1__namespace.AuthService }, { token: AccountService$1 }, { token: i1__namespace$1.Router }, { token: i1__namespace$1.ActivatedRoute }, { token: i1__namespace.UtilityService }, { token: i1__namespace.EnvironmentService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
22445
|
+
LoginComponent$1.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: LoginComponent$1, selector: "app-login", ngImport: i0__namespace, template: "\r\n<block-ui></block-ui>\r\n<div class=\"form w-100\" novalidate=\"novalidate\" id=\"kt_sign_in_form\" *ngIf=\"loadPage\">\r\n <input type=\"hidden\" name=\"ReturnUrl\" value=\"@Model.ReturnUrl\" />\r\n <div class=\"text-center mb-10\">\r\n <h1 class=\"text-dark mb-3\"> {{utilityService.getResourceValue(\"Login\")}} </h1>\r\n </div>\r\n <BBSF-Form [options]=\"loginFormOptions\">\r\n <div class=\"fv-row mb-10\">\r\n <BBSF-TextBox [options]=\"email\" [group]=\"loginForm\"></BBSF-TextBox>\r\n </div>\r\n <div class=\"fv-row mb-10\">\r\n <BBSF-TextBox [options]=\"password\" [group]=\"loginForm\"></BBSF-TextBox>\r\n <div class=\"text-right\">\r\n <a href=\"/Admin/account/forgotPassword\" class=\"link-primary fs-6 fw-bolder mt-2\">{{utilityService.getResourceValue(\"ForgotPassword\")}}</a>\r\n </div>\r\n </div>\r\n <div class=\"fv-row mb-10\" *ngIf=\"error\">\r\n <span class=\"text-danger\">\r\n {{error}}\r\n </span>\r\n </div>\r\n\r\n <div class=\"text-center\">\r\n <button type=\"submit\" class=\"btn btn-primary btn-sm\">\r\n {{utilityService.getResourceValue(\"Login\")}}\r\n </button>\r\n </div>\r\n </BBSF-Form>\r\n</div>\r\n", components: [{ type: i5__namespace$1.BlockUIComponent, selector: "block-ui", inputs: ["name", "template", "message", "delayStart", "delayStop"] }, { type: i6__namespace.FormComponent, selector: "BBSF-Form", inputs: ["options"], outputs: ["OnChange"] }, { type: i6__namespace.TextboxComponent, selector: "BBSF-TextBox", inputs: ["group", "options"], outputs: ["OnChange", "OnBlur"] }], directives: [{ type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
22379
22446
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: LoginComponent$1, decorators: [{
|
|
22380
22447
|
type: i0.Component,
|
|
22381
22448
|
args: [{
|
|
22382
22449
|
selector: 'app-login',
|
|
22383
22450
|
templateUrl: './login.component.html'
|
|
22384
22451
|
}]
|
|
22385
|
-
}], ctorParameters: function () { return [{ type: i1__namespace.AuthService }, { type: i1__namespace$1.Router }, { type: i1__namespace$1.ActivatedRoute }, { type: i1__namespace.UtilityService }]; } });
|
|
22386
|
-
|
|
22387
|
-
var AccountService$1 = /** @class */ (function () {
|
|
22388
|
-
function AccountService(http) {
|
|
22389
|
-
this.http = http;
|
|
22390
|
-
this.ApiUrl = "/account/";
|
|
22391
|
-
}
|
|
22392
|
-
AccountService.prototype.forgotPassword = function (email) {
|
|
22393
|
-
return this.http.post(this.ApiUrl + 'forgotPassword', JSON.stringify(email));
|
|
22394
|
-
};
|
|
22395
|
-
AccountService.prototype.getResetPassword = function (id) {
|
|
22396
|
-
var params = new i1$2.HttpParams();
|
|
22397
|
-
params = params.append("id", id);
|
|
22398
|
-
return this.http.get(this.ApiUrl + 'ResetPassword', params);
|
|
22399
|
-
};
|
|
22400
|
-
AccountService.prototype.resetPassword = function (model) {
|
|
22401
|
-
return this.http.post(this.ApiUrl + 'ResetPassword', model);
|
|
22402
|
-
};
|
|
22403
|
-
AccountService.prototype.getActivation = function (id) {
|
|
22404
|
-
var params = new i1$2.HttpParams();
|
|
22405
|
-
params = params.append("id", id);
|
|
22406
|
-
return this.http.get(this.ApiUrl + 'Activate', params);
|
|
22407
|
-
};
|
|
22408
|
-
AccountService.prototype.activate = function (model) {
|
|
22409
|
-
return this.http.post(this.ApiUrl + 'Activate', model);
|
|
22410
|
-
};
|
|
22411
|
-
AccountService.prototype.uploadLicense = function (File) {
|
|
22412
|
-
return this.http.post(this.ApiUrl + 'UploadLicense', File);
|
|
22413
|
-
};
|
|
22414
|
-
AccountService.prototype.UpdateLanguageCookieAnonymous = function (langKey) {
|
|
22415
|
-
var params = new i1$2.HttpParams();
|
|
22416
|
-
params = params.append("langKey", langKey);
|
|
22417
|
-
return this.http.get(this.ApiUrl + 'ChangeLanguageAnonymous', params);
|
|
22418
|
-
};
|
|
22419
|
-
return AccountService;
|
|
22420
|
-
}());
|
|
22421
|
-
AccountService$1.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: AccountService$1, deps: [{ token: i1__namespace.RequestHandlerService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
22422
|
-
AccountService$1.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: AccountService$1, providedIn: 'root' });
|
|
22423
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: AccountService$1, decorators: [{
|
|
22424
|
-
type: i0.Injectable,
|
|
22425
|
-
args: [{
|
|
22426
|
-
providedIn: 'root'
|
|
22427
|
-
}]
|
|
22428
|
-
}], ctorParameters: function () { return [{ type: i1__namespace.RequestHandlerService }]; } });
|
|
22452
|
+
}], ctorParameters: function () { return [{ type: i1__namespace.AuthService }, { type: AccountService$1 }, { type: i1__namespace$1.Router }, { type: i1__namespace$1.ActivatedRoute }, { type: i1__namespace.UtilityService }, { type: i1__namespace.EnvironmentService }]; } });
|
|
22429
22453
|
|
|
22430
22454
|
var AnonymousLayoutService$1 = /** @class */ (function () {
|
|
22431
22455
|
function AnonymousLayoutService(accountService, router, http, authService, stylesBundleService, translate) {
|
|
@@ -25451,12 +25475,6 @@
|
|
|
25451
25475
|
AuthCallbackComponent.prototype.ngOnInit = function () {
|
|
25452
25476
|
return __awaiter(this, void 0, void 0, function () {
|
|
25453
25477
|
return __generator(this, function (_a) {
|
|
25454
|
-
// check for error
|
|
25455
|
-
// if (this.route.snapshot.fragment.indexOf('error') >= 0) {
|
|
25456
|
-
// this.error=true;
|
|
25457
|
-
// return;
|
|
25458
|
-
// }
|
|
25459
|
-
// await this.authService.completeAuthentication();
|
|
25460
25478
|
this.router.navigate([this.authService.getUrl()]);
|
|
25461
25479
|
return [2 /*return*/];
|
|
25462
25480
|
});
|
|
@@ -31328,6 +31346,12 @@
|
|
|
31328
31346
|
params = params.append("langKey", langKey);
|
|
31329
31347
|
return this.http.get(this.ApiUrl + 'ChangeLanguageAnonymous', params);
|
|
31330
31348
|
};
|
|
31349
|
+
AccountService.prototype.login = function (model) {
|
|
31350
|
+
return this.http.post(this.ApiUrl + 'Login', model);
|
|
31351
|
+
};
|
|
31352
|
+
AccountService.prototype.loginWithWindowsAuthentication = function () {
|
|
31353
|
+
return this.http.get(this.ApiUrl + 'LoginWithWindowsAuthentication');
|
|
31354
|
+
};
|
|
31331
31355
|
return AccountService;
|
|
31332
31356
|
}());
|
|
31333
31357
|
AccountService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: AccountService, deps: [{ token: i1__namespace.RequestHandlerService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
@@ -31418,12 +31442,14 @@
|
|
|
31418
31442
|
}], ctorParameters: function () { return [{ type: i1__namespace.UtilityService }, { type: i1__namespace.StylesBundleService }, { type: i1__namespace.EnvironmentService }, { type: AnonymousLayoutService }, { type: i1__namespace.BBSFTranslateService }, { type: i1__namespace.MasterLayoutService }, { type: i1__namespace.AppearanceConfigurationService }]; } });
|
|
31419
31443
|
|
|
31420
31444
|
var LoginComponent = /** @class */ (function () {
|
|
31421
|
-
function LoginComponent(authService, router, route, utilityService) {
|
|
31445
|
+
function LoginComponent(authService, accountService, router, route, utilityService, environmentService) {
|
|
31422
31446
|
var _this = this;
|
|
31423
31447
|
this.authService = authService;
|
|
31448
|
+
this.accountService = accountService;
|
|
31424
31449
|
this.router = router;
|
|
31425
31450
|
this.route = route;
|
|
31426
31451
|
this.utilityService = utilityService;
|
|
31452
|
+
this.environmentService = environmentService;
|
|
31427
31453
|
this.loginForm = new i11$1.FormGroup({});
|
|
31428
31454
|
this.loginFormOptions = new i6.FormOptions;
|
|
31429
31455
|
this.getLoginModel = function () {
|
|
@@ -31437,7 +31463,7 @@
|
|
|
31437
31463
|
return paramArray;
|
|
31438
31464
|
};
|
|
31439
31465
|
this.getLoginFunction = function (model) {
|
|
31440
|
-
return _this.
|
|
31466
|
+
return _this.accountService.login(model);
|
|
31441
31467
|
};
|
|
31442
31468
|
this.onSuccessHandler = function (result) { return __awaiter(_this, void 0, void 0, function () {
|
|
31443
31469
|
return __generator(this, function (_a) {
|
|
@@ -31451,10 +31477,31 @@
|
|
|
31451
31477
|
});
|
|
31452
31478
|
}); };
|
|
31453
31479
|
this.OnErrorHandler = function (error) {
|
|
31454
|
-
_this.error = error;
|
|
31480
|
+
_this.error = error.error.Message;
|
|
31455
31481
|
};
|
|
31456
31482
|
}
|
|
31457
31483
|
LoginComponent.prototype.ngOnInit = function () {
|
|
31484
|
+
var _this = this;
|
|
31485
|
+
if (this.environmentService.getIsEnableWindowsAuthentication)
|
|
31486
|
+
this.accountService.loginWithWindowsAuthentication().subscribe(function (res) { return __awaiter(_this, void 0, void 0, function () {
|
|
31487
|
+
var result;
|
|
31488
|
+
return __generator(this, function (_a) {
|
|
31489
|
+
switch (_a.label) {
|
|
31490
|
+
case 0:
|
|
31491
|
+
result = res;
|
|
31492
|
+
this.utilityService.stopBlockUI();
|
|
31493
|
+
return [4 /*yield*/, this.authService.handleAccessToken(result.val)];
|
|
31494
|
+
case 1:
|
|
31495
|
+
_a.sent();
|
|
31496
|
+
this.router.navigate([this.authService.getUrl()]);
|
|
31497
|
+
return [2 /*return*/];
|
|
31498
|
+
}
|
|
31499
|
+
});
|
|
31500
|
+
}); });
|
|
31501
|
+
else
|
|
31502
|
+
this.loadLoginForm();
|
|
31503
|
+
};
|
|
31504
|
+
LoginComponent.prototype.loadLoginForm = function () {
|
|
31458
31505
|
this.loginForm = new i11$1.FormGroup({});
|
|
31459
31506
|
this.loginFormOptions = new i6.FormOptions();
|
|
31460
31507
|
this.loginFormOptions.FormGroup = this.loginForm;
|
|
@@ -31474,19 +31521,20 @@
|
|
|
31474
31521
|
this.password.LabelKey = "Password";
|
|
31475
31522
|
this.password.Type = i6.InputType.Password;
|
|
31476
31523
|
this.password.IsRequired = true;
|
|
31524
|
+
this.loadPage = true;
|
|
31477
31525
|
this.utilityService.stopBlockUI();
|
|
31478
31526
|
};
|
|
31479
31527
|
return LoginComponent;
|
|
31480
31528
|
}());
|
|
31481
|
-
LoginComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: LoginComponent, deps: [{ token: i1__namespace.AuthService }, { token: i1__namespace$1.Router }, { token: i1__namespace$1.ActivatedRoute }, { token: i1__namespace.UtilityService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
31482
|
-
LoginComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: LoginComponent, selector: "app-login", ngImport: i0__namespace, template: "\r\n<block-ui></block-ui>\r\n<div class=\"form w-100\" novalidate=\"novalidate\" id=\"kt_sign_in_form\">\r\n <input type=\"hidden\" name=\"ReturnUrl\" value=\"@Model.ReturnUrl\" />\r\n <div class=\"text-center mb-10\">\r\n <h1 class=\"text-dark mb-3\"> {{utilityService.getResourceValue(\"Login\")}} </h1>\r\n </div>\r\n <BBSF-Form [options]=\"loginFormOptions\">\r\n <div class=\"fv-row mb-10\">\r\n <BBSF-TextBox [options]=\"email\" [group]=\"loginForm\"></BBSF-TextBox>\r\n </div>\r\n <div class=\"fv-row mb-10\">\r\n <BBSF-TextBox [options]=\"password\" [group]=\"loginForm\"></BBSF-TextBox>\r\n <div class=\"text-right\">\r\n <a href=\"/Admin/account/forgotPassword\" class=\"link-primary fs-6 fw-bolder mt-2\">{{utilityService.getResourceValue(\"ForgotPassword\")}}</a>\r\n </div>\r\n </div>\r\n <div class=\"fv-row mb-10\" *ngIf=\"error\">\r\n <span class=\"text-danger\">\r\n {{error}}\r\n </span>\r\n </div>\r\n\r\n <div class=\"text-center\">\r\n <button type=\"submit\" class=\"btn btn-primary btn-sm\">\r\n {{utilityService.getResourceValue(\"Login\")}}\r\n </button>\r\n </div>\r\n </BBSF-Form>\r\n</div>\r\n", components: [{ type: i5__namespace$1.BlockUIComponent, selector: "block-ui", inputs: ["name", "template", "message", "delayStart", "delayStop"] }, { type: i6__namespace.FormComponent, selector: "BBSF-Form", inputs: ["options"], outputs: ["OnChange"] }, { type: i6__namespace.TextboxComponent, selector: "BBSF-TextBox", inputs: ["group", "options"], outputs: ["OnChange", "OnBlur"] }], directives: [{ type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
31529
|
+
LoginComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: LoginComponent, deps: [{ token: i1__namespace.AuthService }, { token: AccountService }, { token: i1__namespace$1.Router }, { token: i1__namespace$1.ActivatedRoute }, { token: i1__namespace.UtilityService }, { token: i1__namespace.EnvironmentService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
31530
|
+
LoginComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: LoginComponent, selector: "app-login", ngImport: i0__namespace, template: "\r\n<block-ui></block-ui>\r\n<div class=\"form w-100\" novalidate=\"novalidate\" id=\"kt_sign_in_form\" *ngIf=\"loadPage\">\r\n <input type=\"hidden\" name=\"ReturnUrl\" value=\"@Model.ReturnUrl\" />\r\n <div class=\"text-center mb-10\">\r\n <h1 class=\"text-dark mb-3\"> {{utilityService.getResourceValue(\"Login\")}} </h1>\r\n </div>\r\n <BBSF-Form [options]=\"loginFormOptions\">\r\n <div class=\"fv-row mb-10\">\r\n <BBSF-TextBox [options]=\"email\" [group]=\"loginForm\"></BBSF-TextBox>\r\n </div>\r\n <div class=\"fv-row mb-10\">\r\n <BBSF-TextBox [options]=\"password\" [group]=\"loginForm\"></BBSF-TextBox>\r\n <div class=\"text-right\">\r\n <a href=\"/Admin/account/forgotPassword\" class=\"link-primary fs-6 fw-bolder mt-2\">{{utilityService.getResourceValue(\"ForgotPassword\")}}</a>\r\n </div>\r\n </div>\r\n <div class=\"fv-row mb-10\" *ngIf=\"error\">\r\n <span class=\"text-danger\">\r\n {{error}}\r\n </span>\r\n </div>\r\n\r\n <div class=\"text-center\">\r\n <button type=\"submit\" class=\"btn btn-primary btn-sm\">\r\n {{utilityService.getResourceValue(\"Login\")}}\r\n </button>\r\n </div>\r\n </BBSF-Form>\r\n</div>\r\n", components: [{ type: i5__namespace$1.BlockUIComponent, selector: "block-ui", inputs: ["name", "template", "message", "delayStart", "delayStop"] }, { type: i6__namespace.FormComponent, selector: "BBSF-Form", inputs: ["options"], outputs: ["OnChange"] }, { type: i6__namespace.TextboxComponent, selector: "BBSF-TextBox", inputs: ["group", "options"], outputs: ["OnChange", "OnBlur"] }], directives: [{ type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
31483
31531
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: LoginComponent, decorators: [{
|
|
31484
31532
|
type: i0.Component,
|
|
31485
31533
|
args: [{
|
|
31486
31534
|
selector: 'app-login',
|
|
31487
31535
|
templateUrl: './login.component.html'
|
|
31488
31536
|
}]
|
|
31489
|
-
}], ctorParameters: function () { return [{ type: i1__namespace.AuthService }, { type: i1__namespace$1.Router }, { type: i1__namespace$1.ActivatedRoute }, { type: i1__namespace.UtilityService }]; } });
|
|
31537
|
+
}], ctorParameters: function () { return [{ type: i1__namespace.AuthService }, { type: AccountService }, { type: i1__namespace$1.Router }, { type: i1__namespace$1.ActivatedRoute }, { type: i1__namespace.UtilityService }, { type: i1__namespace.EnvironmentService }]; } });
|
|
31490
31538
|
|
|
31491
31539
|
var GlobalErrorHandler = /** @class */ (function () {
|
|
31492
31540
|
function GlobalErrorHandler(injector, zone) {
|