@bnsights/bbsf-admin-portal 1.0.99 → 1.1.0

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 CHANGED
@@ -5,6 +5,11 @@ 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.0 / 19-11-2023
9
+ ===================
10
+ * Update controls & Utilities version
11
+ * Add Login Function To Account Service
12
+
8
13
  ## 1.0.99 / 16-11-2023
9
14
  ===================
10
15
  * Update controls & Utilities version
@@ -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,10 +22307,57 @@
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
+ return AccountService;
22346
+ }());
22347
+ 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 });
22348
+ AccountService$1.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: AccountService$1, providedIn: 'root' });
22349
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: AccountService$1, decorators: [{
22350
+ type: i0.Injectable,
22351
+ args: [{
22352
+ providedIn: 'root'
22353
+ }]
22354
+ }], ctorParameters: function () { return [{ type: i1__namespace.RequestHandlerService }]; } });
22355
+
22316
22356
  var LoginComponent$1 = /** @class */ (function () {
22317
- function LoginComponent(authService, router, route, utilityService) {
22357
+ function LoginComponent(authService, accountService, router, route, utilityService) {
22318
22358
  var _this = this;
22319
22359
  this.authService = authService;
22360
+ this.accountService = accountService;
22320
22361
  this.router = router;
22321
22362
  this.route = route;
22322
22363
  this.utilityService = utilityService;
@@ -22333,7 +22374,7 @@
22333
22374
  return paramArray;
22334
22375
  };
22335
22376
  this.getLoginFunction = function (model) {
22336
- return _this.authService.loginForm(model);
22377
+ return _this.accountService.login(model);
22337
22378
  };
22338
22379
  this.onSuccessHandler = function (result) { return __awaiter(_this, void 0, void 0, function () {
22339
22380
  return __generator(this, function (_a) {
@@ -22347,7 +22388,7 @@
22347
22388
  });
22348
22389
  }); };
22349
22390
  this.OnErrorHandler = function (error) {
22350
- _this.error = error;
22391
+ _this.error = error.error.Message;
22351
22392
  };
22352
22393
  }
22353
22394
  LoginComponent.prototype.ngOnInit = function () {
@@ -22374,7 +22415,7 @@
22374
22415
  };
22375
22416
  return LoginComponent;
22376
22417
  }());
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 });
22418
+ 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 }], target: i0__namespace.ɵɵFactoryTarget.Component });
22378
22419
  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"] }] });
22379
22420
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: LoginComponent$1, decorators: [{
22380
22421
  type: i0.Component,
@@ -22382,50 +22423,7 @@
22382
22423
  selector: 'app-login',
22383
22424
  templateUrl: './login.component.html'
22384
22425
  }]
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 }]; } });
22426
+ }], ctorParameters: function () { return [{ type: i1__namespace.AuthService }, { type: AccountService$1 }, { type: i1__namespace$1.Router }, { type: i1__namespace$1.ActivatedRoute }, { type: i1__namespace.UtilityService }]; } });
22429
22427
 
22430
22428
  var AnonymousLayoutService$1 = /** @class */ (function () {
22431
22429
  function AnonymousLayoutService(accountService, router, http, authService, stylesBundleService, translate) {
@@ -25451,12 +25449,6 @@
25451
25449
  AuthCallbackComponent.prototype.ngOnInit = function () {
25452
25450
  return __awaiter(this, void 0, void 0, function () {
25453
25451
  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
25452
  this.router.navigate([this.authService.getUrl()]);
25461
25453
  return [2 /*return*/];
25462
25454
  });
@@ -31328,6 +31320,9 @@
31328
31320
  params = params.append("langKey", langKey);
31329
31321
  return this.http.get(this.ApiUrl + 'ChangeLanguageAnonymous', params);
31330
31322
  };
31323
+ AccountService.prototype.login = function (model) {
31324
+ return this.http.post(this.ApiUrl + 'Login', model);
31325
+ };
31331
31326
  return AccountService;
31332
31327
  }());
31333
31328
  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,9 +31413,10 @@
31418
31413
  }], 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
31414
 
31420
31415
  var LoginComponent = /** @class */ (function () {
31421
- function LoginComponent(authService, router, route, utilityService) {
31416
+ function LoginComponent(authService, accountService, router, route, utilityService) {
31422
31417
  var _this = this;
31423
31418
  this.authService = authService;
31419
+ this.accountService = accountService;
31424
31420
  this.router = router;
31425
31421
  this.route = route;
31426
31422
  this.utilityService = utilityService;
@@ -31437,7 +31433,7 @@
31437
31433
  return paramArray;
31438
31434
  };
31439
31435
  this.getLoginFunction = function (model) {
31440
- return _this.authService.loginForm(model);
31436
+ return _this.accountService.login(model);
31441
31437
  };
31442
31438
  this.onSuccessHandler = function (result) { return __awaiter(_this, void 0, void 0, function () {
31443
31439
  return __generator(this, function (_a) {
@@ -31451,7 +31447,7 @@
31451
31447
  });
31452
31448
  }); };
31453
31449
  this.OnErrorHandler = function (error) {
31454
- _this.error = error;
31450
+ _this.error = error.error.Message;
31455
31451
  };
31456
31452
  }
31457
31453
  LoginComponent.prototype.ngOnInit = function () {
@@ -31478,7 +31474,7 @@
31478
31474
  };
31479
31475
  return LoginComponent;
31480
31476
  }());
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 });
31477
+ 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 }], target: i0__namespace.ɵɵFactoryTarget.Component });
31482
31478
  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"] }] });
31483
31479
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: LoginComponent, decorators: [{
31484
31480
  type: i0.Component,
@@ -31486,7 +31482,7 @@
31486
31482
  selector: 'app-login',
31487
31483
  templateUrl: './login.component.html'
31488
31484
  }]
31489
- }], ctorParameters: function () { return [{ type: i1__namespace.AuthService }, { type: i1__namespace$1.Router }, { type: i1__namespace$1.ActivatedRoute }, { type: i1__namespace.UtilityService }]; } });
31485
+ }], ctorParameters: function () { return [{ type: i1__namespace.AuthService }, { type: AccountService }, { type: i1__namespace$1.Router }, { type: i1__namespace$1.ActivatedRoute }, { type: i1__namespace.UtilityService }]; } });
31490
31486
 
31491
31487
  var GlobalErrorHandler = /** @class */ (function () {
31492
31488
  function GlobalErrorHandler(injector, zone) {