tango-app-ui-auth 3.3.1-beta.10 → 3.3.1-beta.12
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/esm2022/lib/components/tango-auth-login/tango-auth-login.component.mjs +7 -4
- package/esm2022/lib/components/tango-auth-signup/step/step1/step1.component.mjs +13 -4
- package/esm2022/lib/components/tango-auth-signup/tango-auth-signup.component.mjs +25 -10
- package/esm2022/lib/services/auth.service.mjs +2 -2
- package/fesm2022/tango-app-ui-auth.mjs +36 -10
- package/fesm2022/tango-app-ui-auth.mjs.map +1 -1
- package/lib/components/tango-auth-signup/tango-auth-signup.component.d.ts +6 -2
- package/lib/services/auth.service.d.ts +1 -1
- package/package.json +1 -1
@@ -77,7 +77,7 @@ class AuthService {
|
|
77
77
|
return this.http.post(`${this.middlewareApiUrl}/request-callback`, data);
|
78
78
|
}
|
79
79
|
isClientnameTaken(data) {
|
80
|
-
return this.http.
|
80
|
+
return this.http.post(`${this.leadApiUrl}/isClientExist`, data);
|
81
81
|
}
|
82
82
|
isEmailTaken(data) {
|
83
83
|
return this.http.get(`${this.leadApiUrl}/isExists?corporateEmail=${data}`);
|
@@ -288,9 +288,9 @@ class TangoAuthLoginComponent {
|
|
288
288
|
this.service.userProfileDet().pipe(takeUntil(this.destroy$)).subscribe({
|
289
289
|
next: (res) => {
|
290
290
|
if (res && res.code == 200) {
|
291
|
-
if (res.data.userType === '
|
291
|
+
if (res.data.userType === 'tango') {
|
292
292
|
// console.log("adfadf")
|
293
|
-
this.router.navigate(['/manage/
|
293
|
+
this.router.navigate(['/manage/brands']);
|
294
294
|
// window.hj('identify', userId, {
|
295
295
|
// 'loginTime': this.dayjs().format('DD/MM/YYYY HH:mm'),
|
296
296
|
// 'clientName': res.data?.clientName,
|
@@ -303,8 +303,11 @@ class TangoAuthLoginComponent {
|
|
303
303
|
// window.pagesense.push(['identifyUser', res.data?.email]);
|
304
304
|
// window.pagesense.push(['trackUser', {'ClientName':res.data?.clientName, 'Email': res.data?.email, 'UserName':res.data?.userName, 'LoginTime': this.dayjs().format('DD/MM/YYYY HH:mm'), 'userId': res.data?._id } ]);
|
305
305
|
}
|
306
|
+
else if (res.data.userType === 'lead') {
|
307
|
+
this.router.navigate(['/explore']);
|
308
|
+
}
|
306
309
|
else {
|
307
|
-
this.router.navigate(['/manage/
|
310
|
+
this.router.navigate(['/manage/summary']);
|
308
311
|
}
|
309
312
|
this.gs.userAccess.next(res.data?.permission);
|
310
313
|
this.cd.detectChanges();
|
@@ -553,7 +556,10 @@ class Step1Component {
|
|
553
556
|
}));
|
554
557
|
}
|
555
558
|
onClientNameBlur() {
|
556
|
-
|
559
|
+
const data = {
|
560
|
+
clientName: this.aboutForm?.get('clientName')?.value
|
561
|
+
};
|
562
|
+
this.subscriptions.push(this.authService.isClientnameTaken(data).subscribe({
|
557
563
|
next: (res) => {
|
558
564
|
this.isClientNameTaken = res.data.isExists;
|
559
565
|
this.cd.detectChanges();
|
@@ -561,7 +567,10 @@ class Step1Component {
|
|
561
567
|
}));
|
562
568
|
}
|
563
569
|
onEmailBlur() {
|
564
|
-
|
570
|
+
const data = {
|
571
|
+
corporateEmail: this.aboutForm?.get('corporateEmail')?.value
|
572
|
+
};
|
573
|
+
this.subscriptions.push(this.authService.isClientnameTaken(data).subscribe({
|
565
574
|
next: (res) => {
|
566
575
|
this.isEmailTaken = res.data.isExists;
|
567
576
|
this.cd.detectChanges();
|
@@ -569,7 +578,10 @@ class Step1Component {
|
|
569
578
|
}));
|
570
579
|
}
|
571
580
|
onMobileNumberBlur() {
|
572
|
-
|
581
|
+
const data = {
|
582
|
+
mobileNumber: this.aboutForm?.get('mobileNumber')?.value
|
583
|
+
};
|
584
|
+
this.subscriptions.push(this.authService.isClientnameTaken(data).subscribe({
|
573
585
|
next: (res) => {
|
574
586
|
this.isMobileTaken = res.data.isExists;
|
575
587
|
this.cd.detectChanges();
|
@@ -1356,15 +1368,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
1356
1368
|
class TangoAuthSignupComponent {
|
1357
1369
|
setterService;
|
1358
1370
|
pageInfo;
|
1371
|
+
gs;
|
1372
|
+
router;
|
1359
1373
|
formsCount = 3;
|
1360
1374
|
account$ = new BehaviorSubject('');
|
1361
1375
|
currentStep$ = new BehaviorSubject(1);
|
1362
1376
|
isCurrentFormValid$ = new BehaviorSubject(false);
|
1363
1377
|
prevStepdata;
|
1364
1378
|
subscriptions = [];
|
1365
|
-
|
1379
|
+
authlocalStorageToken;
|
1380
|
+
constructor(setterService, pageInfo, gs, router) {
|
1366
1381
|
this.setterService = setterService;
|
1367
1382
|
this.pageInfo = pageInfo;
|
1383
|
+
this.gs = gs;
|
1384
|
+
this.router = router;
|
1385
|
+
this.subscriptions.push(this.gs.environment.subscribe((env) => {
|
1386
|
+
if (env) {
|
1387
|
+
this.authlocalStorageToken = `${env.appVersion}-${env.USERDATA_KEY}`;
|
1388
|
+
this.authlocalStorageToken = localStorage.getItem(this.authlocalStorageToken);
|
1389
|
+
}
|
1390
|
+
}));
|
1368
1391
|
}
|
1369
1392
|
ngOnDestroy() {
|
1370
1393
|
this.subscriptions.forEach((subscription) => {
|
@@ -1372,6 +1395,9 @@ class TangoAuthSignupComponent {
|
|
1372
1395
|
});
|
1373
1396
|
}
|
1374
1397
|
ngOnInit() {
|
1398
|
+
if (this.authlocalStorageToken) {
|
1399
|
+
this.router.navigate(['/manage']);
|
1400
|
+
}
|
1375
1401
|
this.subscriptions.push(this.setterService.$stepper.subscribe((data) => {
|
1376
1402
|
if (data?.prev) {
|
1377
1403
|
this.prevStep();
|
@@ -1402,13 +1428,13 @@ class TangoAuthSignupComponent {
|
|
1402
1428
|
}
|
1403
1429
|
this.currentStep$.next(prevStep);
|
1404
1430
|
}
|
1405
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TangoAuthSignupComponent, deps: [{ token: ConversionService }, { token: i4.PageInfoService }], target: i0.ɵɵFactoryTarget.Component });
|
1431
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TangoAuthSignupComponent, deps: [{ token: ConversionService }, { token: i4.PageInfoService }, { token: i4.GlobalStateService }, { token: i3.Router }], target: i0.ɵɵFactoryTarget.Component });
|
1406
1432
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: TangoAuthSignupComponent, selector: "lib-tango-auth-signup", ngImport: i0, template: "<div class=\"row me-0\">\r\n <lib-vertical class=\"col-lg-4 col-xl-3 col-xxl-3 p-0\"></lib-vertical>\r\n\r\n <!--begin::Content-->\r\n <div class=\" col-lg-8 col-xl-9 col-xxl-9 mb-10\">\r\n <div class=\"current\">\r\n <ng-container *ngIf=\"currentStep$.value === 1\">\r\n <lib-step1 class=\"w-100 \" [prevStepdata]='prevStepdata' [updateParentModel]=\"updateAccount\" [defaultValues]=\"account$.value\"></lib-step1>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"currentStep$.value === 2\">\r\n <lib-step2 class=\"w-100 \" [updateParentModel]=\"updateAccount\" [defaultValues]=\"account$.value\"></lib-step2>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"currentStep$.value === 3\">\r\n <lib-step3 class=\"w-100 \"></lib-step3>\r\n </ng-container>\r\n </div>\r\n\r\n <!-- <div class=\"d-flex flex-stack py-2\">\r\n <div class=\"mr-2\">\r\n <ng-container *ngIf=\"currentStep$.value == 2\">\r\n <button type=\"button\" class=\"btn btn-lg btn-light-primary me-5\" (click)=\"prevStep()\">\r\n Previous\r\n </button>\r\n </ng-container>\r\n \r\n </div>\r\n\r\n </div> -->\r\n <!-- <div *ngIf=\"currentStep$.value !== 3\" class=\"my-5 d-flex flex-column flex-md-row flex-md-stack pt-3 container-fluid\">\r\n <div class=\"text-gray-900 order-2 order-md-1 ms-10\">\r\n <span class=\"text-muted fw-semibold me-1\">\u00A9 2024 </span>\r\n <a target=\"_blank\" class=\"text-gray-800 text-hover-primary\">Tango IT solutions</a>\r\n </div>\r\n <ul class=\"menu menu-gray-600 menu-hover-primary fw-semibold order-1 me-10\">\r\n <li class=\"menu-item\"><a target=\"_blank\" href=\"https://tangoeye.ai/#aboutus\" class=\"menu-link px-5\">About us</a></li>\r\n <li class=\"menu-item\"><a target=\"_blank\" href=\"https://tangoeye.ai/#contact\" class=\"menu-link px-5\">Contact Us</a></li>\r\n <li class=\"menu-item\"><a target=\"_blank\" href=\"https://tangoeye.ai/privacy-policy-2/\" class=\"menu-link px-5\">Privacy & policy</a></li>\r\n </ul>\r\n </div> -->\r\n </div>\r\n <!-- </div> -->\r\n </div>\r\n <!--end::Content-->\r\n<!-- </div> -->", styles: [""], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: Step1Component, selector: "lib-step1" }, { kind: "component", type: Step2Component, selector: "lib-step2" }, { kind: "component", type: Step3Component, selector: "lib-step3" }, { kind: "component", type: VerticalComponent, selector: "lib-vertical" }] });
|
1407
1433
|
}
|
1408
1434
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TangoAuthSignupComponent, decorators: [{
|
1409
1435
|
type: Component,
|
1410
1436
|
args: [{ selector: 'lib-tango-auth-signup', template: "<div class=\"row me-0\">\r\n <lib-vertical class=\"col-lg-4 col-xl-3 col-xxl-3 p-0\"></lib-vertical>\r\n\r\n <!--begin::Content-->\r\n <div class=\" col-lg-8 col-xl-9 col-xxl-9 mb-10\">\r\n <div class=\"current\">\r\n <ng-container *ngIf=\"currentStep$.value === 1\">\r\n <lib-step1 class=\"w-100 \" [prevStepdata]='prevStepdata' [updateParentModel]=\"updateAccount\" [defaultValues]=\"account$.value\"></lib-step1>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"currentStep$.value === 2\">\r\n <lib-step2 class=\"w-100 \" [updateParentModel]=\"updateAccount\" [defaultValues]=\"account$.value\"></lib-step2>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"currentStep$.value === 3\">\r\n <lib-step3 class=\"w-100 \"></lib-step3>\r\n </ng-container>\r\n </div>\r\n\r\n <!-- <div class=\"d-flex flex-stack py-2\">\r\n <div class=\"mr-2\">\r\n <ng-container *ngIf=\"currentStep$.value == 2\">\r\n <button type=\"button\" class=\"btn btn-lg btn-light-primary me-5\" (click)=\"prevStep()\">\r\n Previous\r\n </button>\r\n </ng-container>\r\n \r\n </div>\r\n\r\n </div> -->\r\n <!-- <div *ngIf=\"currentStep$.value !== 3\" class=\"my-5 d-flex flex-column flex-md-row flex-md-stack pt-3 container-fluid\">\r\n <div class=\"text-gray-900 order-2 order-md-1 ms-10\">\r\n <span class=\"text-muted fw-semibold me-1\">\u00A9 2024 </span>\r\n <a target=\"_blank\" class=\"text-gray-800 text-hover-primary\">Tango IT solutions</a>\r\n </div>\r\n <ul class=\"menu menu-gray-600 menu-hover-primary fw-semibold order-1 me-10\">\r\n <li class=\"menu-item\"><a target=\"_blank\" href=\"https://tangoeye.ai/#aboutus\" class=\"menu-link px-5\">About us</a></li>\r\n <li class=\"menu-item\"><a target=\"_blank\" href=\"https://tangoeye.ai/#contact\" class=\"menu-link px-5\">Contact Us</a></li>\r\n <li class=\"menu-item\"><a target=\"_blank\" href=\"https://tangoeye.ai/privacy-policy-2/\" class=\"menu-link px-5\">Privacy & policy</a></li>\r\n </ul>\r\n </div> -->\r\n </div>\r\n <!-- </div> -->\r\n </div>\r\n <!--end::Content-->\r\n<!-- </div> -->" }]
|
1411
|
-
}], ctorParameters: () => [{ type: ConversionService }, { type: i4.PageInfoService }] });
|
1437
|
+
}], ctorParameters: () => [{ type: ConversionService }, { type: i4.PageInfoService }, { type: i4.GlobalStateService }, { type: i3.Router }] });
|
1412
1438
|
|
1413
1439
|
class TangoAuthForgotPasswordComponent {
|
1414
1440
|
toast;
|