tango-app-ui-auth 3.3.1-beta.3 → 3.3.1-beta.5
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.
@@ -7,6 +7,7 @@ import { RouterModule } from '@angular/router';
|
|
7
7
|
import * as i2$1 from '@angular/forms';
|
8
8
|
import { Validators, FormControl, ReactiveFormsModule, FormsModule } from '@angular/forms';
|
9
9
|
import { BehaviorSubject, of, map, catchError, throwError, Subject, takeUntil, timer } from 'rxjs';
|
10
|
+
import dayjs from 'dayjs';
|
10
11
|
import * as i2 from '@angular/common/http';
|
11
12
|
import * as i4 from 'tango-app-ui-global';
|
12
13
|
import * as i5 from 'tango-app-ui-shared';
|
@@ -161,6 +162,7 @@ class TangoAuthLoginComponent {
|
|
161
162
|
otpCounter = 0;
|
162
163
|
resendOtp = false;
|
163
164
|
countDown;
|
165
|
+
dayjs = dayjs;
|
164
166
|
constructor(router, route, fb, service, gs, cd, toastService, pageInfo) {
|
165
167
|
this.router = router;
|
166
168
|
this.route = route;
|
@@ -285,6 +287,15 @@ class TangoAuthLoginComponent {
|
|
285
287
|
this.service.userProfileDet().pipe(takeUntil(this.destroy$)).subscribe({
|
286
288
|
next: (res) => {
|
287
289
|
if (res && res.code == 200) {
|
290
|
+
if (res.data.userType === 'client') {
|
291
|
+
let userId = res.data?._id;
|
292
|
+
window.hj('identify', userId, {
|
293
|
+
'loginTime': this.dayjs().format('DD/MM/YYYY HH:mm'),
|
294
|
+
'clientName': res.data?.clientName,
|
295
|
+
'email': res.data?.email,
|
296
|
+
'userName': res.data?.userName,
|
297
|
+
});
|
298
|
+
}
|
288
299
|
this.gs.userAccess.next(res.data?.permission);
|
289
300
|
this.cd.detectChanges();
|
290
301
|
this.router.navigate(['/manage']);
|