@tuki-io/tuki-widgets 0.0.190 → 0.0.192
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/esm2020/user-creation/src/app.constants.mjs +9 -2
- package/esm2020/user-creation/src/interfaces/user-creation-wizard.interfaces.mjs +19 -0
- package/esm2020/user-creation/src/shared/material.module.mjs +35 -7
- package/esm2020/user-creation/src/shared/services/user-creation-api.service.mjs +42 -19
- package/esm2020/user-creation/src/user-creation.module.mjs +4 -1
- package/esm2020/user-creation/src/utils/app-loader/app-loader.mjs +14 -0
- package/esm2020/user-creation/src/utils/build-savable-end-user.mjs +147 -0
- package/esm2020/user-creation/src/utils/validation.mjs +14 -0
- package/esm2020/user-creation/src/widgets/user-creation-wizard/components/user-details-step/user-details-step.component.mjs +429 -20
- package/esm2020/user-creation/src/widgets/user-creation-wizard/components/user-overview-step/user-overview-step.component.mjs +3 -3
- package/esm2020/user-creation/src/widgets/user-creation-wizard/components/user-template-step/user-template-step.component.mjs +80 -34
- package/esm2020/user-creation/src/widgets/user-creation-wizard/user-creation-wizard.component.mjs +61 -11
- package/esm2020/user-creation/src/widgets/user-creation-wizard/user-creation-wizard.service.mjs +509 -130
- package/fesm2015/tuki-io-tuki-widgets-user-creation.mjs +1446 -300
- package/fesm2015/tuki-io-tuki-widgets-user-creation.mjs.map +1 -1
- package/fesm2020/tuki-io-tuki-widgets-user-creation.mjs +1408 -287
- package/fesm2020/tuki-io-tuki-widgets-user-creation.mjs.map +1 -1
- package/package.json +1 -1
- package/user-creation/src/app.constants.d.ts +7 -0
- package/user-creation/src/interfaces/user-creation-wizard.interfaces.d.ts +483 -0
- package/user-creation/src/shared/material.module.d.ts +5 -1
- package/user-creation/src/shared/services/user-creation-api.service.d.ts +8 -2
- package/user-creation/src/user-creation.module.d.ts +11 -10
- package/user-creation/src/utils/app-loader/app-loader.d.ts +6 -0
- package/user-creation/src/utils/build-savable-end-user.d.ts +23 -0
- package/user-creation/src/utils/validation.d.ts +4 -0
- package/user-creation/src/widgets/user-creation-wizard/components/user-details-step/user-details-step.component.d.ts +75 -7
- package/user-creation/src/widgets/user-creation-wizard/components/user-template-step/user-template-step.component.d.ts +11 -4
- package/user-creation/src/widgets/user-creation-wizard/user-creation-wizard.component.d.ts +13 -0
- package/user-creation/src/widgets/user-creation-wizard/user-creation-wizard.service.d.ts +57 -56
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import * as i2 from '@angular/common';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { Injectable, Pipe, Component, ChangeDetectionStrategy, NgModule, inject,
|
|
5
|
-
import * as
|
|
6
|
-
import {
|
|
7
|
-
import * as
|
|
4
|
+
import { Injectable, Pipe, Component, ChangeDetectionStrategy, NgModule, inject, ViewEncapsulation, EventEmitter, Output, Input, ViewChild } from '@angular/core';
|
|
5
|
+
import * as i1$2 from '@angular/forms';
|
|
6
|
+
import { ReactiveFormsModule, FormsModule, FormBuilder, Validators, FormControl } from '@angular/forms';
|
|
7
|
+
import * as i15 from '@angular/material/expansion';
|
|
8
8
|
import { MatExpansionModule } from '@angular/material/expansion';
|
|
9
9
|
import { MatRadioModule } from '@angular/material/radio';
|
|
10
10
|
import * as i4$1 from '@angular/material/stepper';
|
|
11
11
|
import { MatStepperModule } from '@angular/material/stepper';
|
|
12
|
-
import { Subject, BehaviorSubject, tap, forkJoin, map,
|
|
12
|
+
import { Subject, BehaviorSubject, tap, forkJoin, map, take, catchError, of, finalize, startWith, takeUntil, debounceTime, timer, switchMap, filter, distinctUntilChanged } from 'rxjs';
|
|
13
13
|
import * as i3 from '@angular/material/tooltip';
|
|
14
14
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
15
15
|
import * as i4 from '@angular/material/button';
|
|
@@ -17,20 +17,30 @@ import { MatButtonModule } from '@angular/material/button';
|
|
|
17
17
|
import * as i5 from '@ngx-translate/core';
|
|
18
18
|
import { TranslateModule, TranslateLoader } from '@ngx-translate/core';
|
|
19
19
|
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
|
20
|
-
import * as
|
|
20
|
+
import * as i5$1 from '@angular/material/table';
|
|
21
21
|
import { MatTableModule } from '@angular/material/table';
|
|
22
22
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
23
|
+
import * as i7 from '@angular/material/icon';
|
|
23
24
|
import { MatIconModule } from '@angular/material/icon';
|
|
24
|
-
import * as
|
|
25
|
+
import * as i8 from '@angular/material/form-field';
|
|
25
26
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
26
|
-
import * as
|
|
27
|
+
import * as i9 from '@angular/material/input';
|
|
27
28
|
import { MatInputModule } from '@angular/material/input';
|
|
28
|
-
import * as i7 from '@angular/material/select';
|
|
29
|
+
import * as i7$1 from '@angular/material/select';
|
|
29
30
|
import { MatSelectModule } from '@angular/material/select';
|
|
31
|
+
import * as i12 from '@angular/material/autocomplete';
|
|
32
|
+
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
33
|
+
import * as i1$1 from '@angular/material/progress-spinner';
|
|
34
|
+
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
35
|
+
import * as i13 from '@angular/material/paginator';
|
|
36
|
+
import { MatPaginatorModule } from '@angular/material/paginator';
|
|
37
|
+
import * as i14 from '@angular/material/chips';
|
|
38
|
+
import { MatChipsModule } from '@angular/material/chips';
|
|
30
39
|
import * as i1 from '@angular/common/http';
|
|
31
40
|
import { HttpHeaders, HttpClientModule, HttpClient } from '@angular/common/http';
|
|
32
41
|
import { NgApexchartsModule } from 'ng-apexcharts';
|
|
33
|
-
import
|
|
42
|
+
import Big from 'big.js';
|
|
43
|
+
import * as i11 from '@angular/material/core';
|
|
34
44
|
import { TranslateHttpLoader } from '@ngx-translate/http-loader';
|
|
35
45
|
|
|
36
46
|
const environment = {
|
|
@@ -135,13 +145,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
135
145
|
|
|
136
146
|
const API = {
|
|
137
147
|
WEBEX_CHECK_CONTROL_HUB_INTEGRATION: "/webex/api/search/webex/customers/:customerId/controlhubexists",
|
|
138
|
-
SITES: "/api/customers/:customerId/sites",
|
|
148
|
+
SITES: "/dcp/api/customers/:customerId/sites",
|
|
139
149
|
SITE: "/dcp/api/sites/:siteId",
|
|
140
150
|
DEVICE_TYPES: "/dcp/api/provision/options/:siteId/devicetypes",
|
|
141
151
|
SITE_SETTINGS: "/dcp/api/sites/:siteId/settings",
|
|
142
152
|
VM_USER_TEMPLATES: "/dcp/api/provision/options/:siteId/vmusertemplates",
|
|
153
|
+
EXISTING_USERS: "/dcp/api/provision/:siteId/users",
|
|
143
154
|
USER_TEMPLATES_UPLOAD_LIST: "/dcp/api/searchbulkupdate/uploadedusertemplatelist",
|
|
144
155
|
USER_TEMPLATE_TOKEN: "/dcp/api/bulkupdate/:customerId/usertemplate/:id/token",
|
|
156
|
+
AVAILABLE_DN_IN_RANGES: "/dcp/api/sites/:siteId/available-dn-in-ranges",
|
|
157
|
+
USER_CHECK_ID_EXISTING: "/dcp/api/provision/:siteId/users/:userId",
|
|
158
|
+
LDAP_USERS: "/dcp/api/provision/:siteId/users",
|
|
159
|
+
USERS: "/dcp/api/provision/:siteId/users",
|
|
160
|
+
CREATE_NEW_USER_FROM_TEMPLATE: "/dcp/api/provision/newUserFromUserTemplate",
|
|
161
|
+
DEVICE_DEFAULTS: "/api/provision/options/:siteId/devicedefaults/:deviceType",
|
|
145
162
|
};
|
|
146
163
|
const USER_CREATION_TYPES = {
|
|
147
164
|
CUCM: 'CUCM',
|
|
@@ -226,7 +243,11 @@ MaterialModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version:
|
|
|
226
243
|
MatIconModule,
|
|
227
244
|
MatFormFieldModule,
|
|
228
245
|
MatInputModule,
|
|
229
|
-
MatSelectModule
|
|
246
|
+
MatSelectModule,
|
|
247
|
+
MatAutocompleteModule,
|
|
248
|
+
MatProgressSpinnerModule,
|
|
249
|
+
MatPaginatorModule,
|
|
250
|
+
MatChipsModule], exports: [MatProgressBarModule,
|
|
230
251
|
MatTooltipModule,
|
|
231
252
|
MatTableModule,
|
|
232
253
|
MatCheckboxModule,
|
|
@@ -234,7 +255,11 @@ MaterialModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version:
|
|
|
234
255
|
MatIconModule,
|
|
235
256
|
MatFormFieldModule,
|
|
236
257
|
MatInputModule,
|
|
237
|
-
MatSelectModule
|
|
258
|
+
MatSelectModule,
|
|
259
|
+
MatAutocompleteModule,
|
|
260
|
+
MatProgressSpinnerModule,
|
|
261
|
+
MatPaginatorModule,
|
|
262
|
+
MatChipsModule] });
|
|
238
263
|
MaterialModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MaterialModule, imports: [MatProgressBarModule,
|
|
239
264
|
MatTooltipModule,
|
|
240
265
|
MatTableModule,
|
|
@@ -243,7 +268,11 @@ MaterialModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version:
|
|
|
243
268
|
MatIconModule,
|
|
244
269
|
MatFormFieldModule,
|
|
245
270
|
MatInputModule,
|
|
246
|
-
MatSelectModule,
|
|
271
|
+
MatSelectModule,
|
|
272
|
+
MatAutocompleteModule,
|
|
273
|
+
MatProgressSpinnerModule,
|
|
274
|
+
MatPaginatorModule,
|
|
275
|
+
MatChipsModule, MatProgressBarModule,
|
|
247
276
|
MatTooltipModule,
|
|
248
277
|
MatTableModule,
|
|
249
278
|
MatCheckboxModule,
|
|
@@ -251,7 +280,11 @@ MaterialModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version:
|
|
|
251
280
|
MatIconModule,
|
|
252
281
|
MatFormFieldModule,
|
|
253
282
|
MatInputModule,
|
|
254
|
-
MatSelectModule
|
|
283
|
+
MatSelectModule,
|
|
284
|
+
MatAutocompleteModule,
|
|
285
|
+
MatProgressSpinnerModule,
|
|
286
|
+
MatPaginatorModule,
|
|
287
|
+
MatChipsModule] });
|
|
255
288
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MaterialModule, decorators: [{
|
|
256
289
|
type: NgModule,
|
|
257
290
|
args: [{
|
|
@@ -264,7 +297,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
264
297
|
MatIconModule,
|
|
265
298
|
MatFormFieldModule,
|
|
266
299
|
MatInputModule,
|
|
267
|
-
MatSelectModule
|
|
300
|
+
MatSelectModule,
|
|
301
|
+
MatAutocompleteModule,
|
|
302
|
+
MatProgressSpinnerModule,
|
|
303
|
+
MatPaginatorModule,
|
|
304
|
+
MatChipsModule,
|
|
268
305
|
],
|
|
269
306
|
exports: [
|
|
270
307
|
MatProgressBarModule,
|
|
@@ -275,81 +312,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
275
312
|
MatIconModule,
|
|
276
313
|
MatFormFieldModule,
|
|
277
314
|
MatInputModule,
|
|
278
|
-
MatSelectModule
|
|
315
|
+
MatSelectModule,
|
|
316
|
+
MatAutocompleteModule,
|
|
317
|
+
MatProgressSpinnerModule,
|
|
318
|
+
MatPaginatorModule,
|
|
319
|
+
MatChipsModule,
|
|
279
320
|
]
|
|
280
321
|
}]
|
|
281
322
|
}] });
|
|
282
323
|
|
|
283
|
-
const getSavableData = (model, exclude) => {
|
|
284
|
-
let result = Object.keys(model);
|
|
285
|
-
if (exclude && exclude.length) {
|
|
286
|
-
result = result.filter(key => !exclude.some(item => item === key));
|
|
287
|
-
}
|
|
288
|
-
return result.reduce((result, key) => {
|
|
289
|
-
if (model[key] instanceof Array && model[key].length && model[key][0].getSavableData) {
|
|
290
|
-
result[key] = model[key].map((item) => item.getSavableData());
|
|
291
|
-
}
|
|
292
|
-
else if (model[key] instanceof Object && model[key].getSavableData) {
|
|
293
|
-
result[key] = model[key].getSavableData();
|
|
294
|
-
}
|
|
295
|
-
else {
|
|
296
|
-
result[key] = model[key];
|
|
297
|
-
}
|
|
298
|
-
return result;
|
|
299
|
-
}, {});
|
|
300
|
-
};
|
|
301
|
-
|
|
302
|
-
class Site {
|
|
303
|
-
constructor(site) {
|
|
304
|
-
Object.assign(this, site);
|
|
305
|
-
this.initForm();
|
|
306
|
-
}
|
|
307
|
-
initForm() {
|
|
308
|
-
const formBuilder = new FormBuilder();
|
|
309
|
-
const formSettings = {
|
|
310
|
-
name: [this.name || '', [Validators.required]],
|
|
311
|
-
shortName: [this.shortName || '', [Validators.required]],
|
|
312
|
-
cucm: [this.cucm || ''],
|
|
313
|
-
cuc: [this.cuc || ''],
|
|
314
|
-
address1: [this.address1 || ''],
|
|
315
|
-
zipCode: [this.country || ''],
|
|
316
|
-
city: [this.city || ''],
|
|
317
|
-
state: [this.state || ''],
|
|
318
|
-
country: [this.country || '', [Validators.required]],
|
|
319
|
-
isAfterTtu: [this.isAfterTtu || ''],
|
|
320
|
-
ttuEnableDate: [this.ttuEnableDate || '']
|
|
321
|
-
};
|
|
322
|
-
this.form = formBuilder.group(formSettings);
|
|
323
|
-
}
|
|
324
|
-
getSavableData() {
|
|
325
|
-
const nonSavableData = ['form'];
|
|
326
|
-
return getSavableData(this, nonSavableData);
|
|
327
|
-
}
|
|
328
|
-
getId() {
|
|
329
|
-
return this.id;
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
class SiteDefaults {
|
|
333
|
-
constructor(siteDefaults, isSharedLineSite) {
|
|
334
|
-
this.routePartitionFilter = [];
|
|
335
|
-
this.devicePoolFilter = [];
|
|
336
|
-
this.cssFilter = [];
|
|
337
|
-
this.voicemailProfileFilter = [];
|
|
338
|
-
if (siteDefaults) {
|
|
339
|
-
Object.assign(this, siteDefaults);
|
|
340
|
-
this.enableEm = siteDefaults.enableEm === 'true';
|
|
341
|
-
this.routePartitionFilter.sort();
|
|
342
|
-
this.devicePoolFilter.sort();
|
|
343
|
-
this.cssFilter.sort();
|
|
344
|
-
this.voicemailProfileFilter.sort();
|
|
345
|
-
}
|
|
346
|
-
if (isSharedLineSite) {
|
|
347
|
-
this.cssFilter = siteDefaults?.sharedSitesCssFilter || [];
|
|
348
|
-
this.routePartitionFilter = siteDefaults?.sharedSitesRPFilter || [];
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
|
|
353
324
|
class APIService {
|
|
354
325
|
constructor(httpClient) {
|
|
355
326
|
this.httpClient = httpClient;
|
|
@@ -427,6 +398,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
427
398
|
}]
|
|
428
399
|
}], ctorParameters: function () { return [{ type: i1.HttpClient }]; } });
|
|
429
400
|
|
|
401
|
+
const BERLIN_MT_SITE = {
|
|
402
|
+
address2: "Address 2",
|
|
403
|
+
address3: "Address 3",
|
|
404
|
+
country: "IL",
|
|
405
|
+
cucm: {
|
|
406
|
+
platformType: "CUCM",
|
|
407
|
+
id: 2073,
|
|
408
|
+
name: "DI_220"
|
|
409
|
+
},
|
|
410
|
+
id: 9329,
|
|
411
|
+
name: "Berlin_MT",
|
|
412
|
+
hqStatus: false,
|
|
413
|
+
hasActivated: true,
|
|
414
|
+
isAfterTtu: false,
|
|
415
|
+
prefetchDn: false,
|
|
416
|
+
settings: [],
|
|
417
|
+
shortName: "Berl1758105407",
|
|
418
|
+
state: "",
|
|
419
|
+
timezone: "GMT"
|
|
420
|
+
};
|
|
430
421
|
class UserCreationApiService {
|
|
431
422
|
constructor() {
|
|
432
423
|
this._allSites = [];
|
|
@@ -456,32 +447,21 @@ class UserCreationApiService {
|
|
|
456
447
|
// }
|
|
457
448
|
// this.allCustomerSites$.next(true);
|
|
458
449
|
// return this._allSites;
|
|
459
|
-
this.sitesListSubject$.next(res.pageData);
|
|
450
|
+
this.sitesListSubject$.next([BERLIN_MT_SITE, ...res.pageData].sort((a, b) => a.name.localeCompare(b.name)));
|
|
460
451
|
}));
|
|
461
452
|
// .pipe(this.handleError(true));
|
|
462
453
|
}
|
|
463
|
-
|
|
454
|
+
getSiteAllData(siteId) {
|
|
464
455
|
// this.dataPending = true;
|
|
465
456
|
return forkJoin([
|
|
466
457
|
this.getSite(siteId),
|
|
467
|
-
this.getDeviceTypes(siteId),
|
|
468
458
|
this.getSiteDefaults(siteId, false),
|
|
469
|
-
this.
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
}));
|
|
459
|
+
// this.getDeviceTypes(siteId),
|
|
460
|
+
// this.getVoiceMailUserTemplates(siteId)
|
|
461
|
+
]);
|
|
473
462
|
}
|
|
474
463
|
getSite(siteId, isEdit) {
|
|
475
|
-
return this.apiService.fetch(API.SITE.replace(':siteId', String(siteId)), null, false)
|
|
476
|
-
.pipe(map((siteData) => {
|
|
477
|
-
const site = new Site(siteData);
|
|
478
|
-
// if (isEdit) {
|
|
479
|
-
// this.setEditSite(site);
|
|
480
|
-
// } else {
|
|
481
|
-
// this.setCurrentSite(site);
|
|
482
|
-
// }
|
|
483
|
-
return site;
|
|
484
|
-
}));
|
|
464
|
+
return this.apiService.fetch(API.SITE.replace(':siteId', String(siteId)), null, false);
|
|
485
465
|
}
|
|
486
466
|
getDeviceTypes(siteId) {
|
|
487
467
|
return this.apiService.fetch(API.DEVICE_TYPES.replace(':siteId', String(siteId)), null, true);
|
|
@@ -525,6 +505,21 @@ class UserCreationApiService {
|
|
|
525
505
|
return this.apiService.fetch(API.USER_TEMPLATE_TOKEN.replace(':customerId', customerId).replace(':id', id));
|
|
526
506
|
// .pipe(this.handleError(false, true));
|
|
527
507
|
}
|
|
508
|
+
getAvailableDnInRanges(siteId, params) {
|
|
509
|
+
return this.apiService.fetch(API.AVAILABLE_DN_IN_RANGES.replace(':siteId', siteId), params);
|
|
510
|
+
}
|
|
511
|
+
getLdapUsers(siteId, params) {
|
|
512
|
+
return this.apiService.fetch(API.LDAP_USERS.replace(':siteId', siteId), params);
|
|
513
|
+
}
|
|
514
|
+
checkUserIdExisting(siteId, userId) {
|
|
515
|
+
return this.apiService.fetch(API.USER_CHECK_ID_EXISTING.replace(':siteId', siteId).replace(':userId', userId));
|
|
516
|
+
}
|
|
517
|
+
saveTemplateUser(user, templateId, siteId) {
|
|
518
|
+
return this.apiService.post(API.CREATE_NEW_USER_FROM_TEMPLATE, user, { siteId: siteId, templateId: templateId });
|
|
519
|
+
}
|
|
520
|
+
getDeviceDefaults(siteId, deviceType) {
|
|
521
|
+
return this.apiService.fetch(API.DEVICE_DEFAULTS.replace(':siteId', siteId).replace(':deviceType', deviceType));
|
|
522
|
+
}
|
|
528
523
|
}
|
|
529
524
|
UserCreationApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserCreationApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
530
525
|
UserCreationApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserCreationApiService });
|
|
@@ -580,11 +575,279 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
580
575
|
}]
|
|
581
576
|
}] });
|
|
582
577
|
|
|
578
|
+
const MAC_ADDRESS_REGEX = /^[A-Fa-f0-9]{12}$/;
|
|
579
|
+
const Validation = {
|
|
580
|
+
macAddress() {
|
|
581
|
+
return (control) => {
|
|
582
|
+
const raw = String(control.value ?? '').trim();
|
|
583
|
+
if (!raw) {
|
|
584
|
+
return null;
|
|
585
|
+
}
|
|
586
|
+
const normalized = raw.replace(/^SEP\s*/i, '').trim();
|
|
587
|
+
return MAC_ADDRESS_REGEX.test(normalized) ? null : { macAddress: true };
|
|
588
|
+
};
|
|
589
|
+
},
|
|
590
|
+
};
|
|
591
|
+
|
|
592
|
+
const getSavableData = (model, exclude) => {
|
|
593
|
+
let result = Object.keys(model);
|
|
594
|
+
if (exclude && exclude.length) {
|
|
595
|
+
result = result.filter(key => !exclude.some(item => item === key));
|
|
596
|
+
}
|
|
597
|
+
return result.reduce((result, key) => {
|
|
598
|
+
if (model[key] instanceof Array && model[key].length && model[key][0].getSavableData) {
|
|
599
|
+
result[key] = model[key].map((item) => item.getSavableData());
|
|
600
|
+
}
|
|
601
|
+
else if (model[key] instanceof Object && model[key].getSavableData) {
|
|
602
|
+
result[key] = model[key].getSavableData();
|
|
603
|
+
}
|
|
604
|
+
else {
|
|
605
|
+
result[key] = model[key];
|
|
606
|
+
}
|
|
607
|
+
return result;
|
|
608
|
+
}, {});
|
|
609
|
+
};
|
|
610
|
+
|
|
611
|
+
class Site {
|
|
612
|
+
constructor(site) {
|
|
613
|
+
Object.assign(this, site);
|
|
614
|
+
this.initForm();
|
|
615
|
+
}
|
|
616
|
+
initForm() {
|
|
617
|
+
const formBuilder = new FormBuilder();
|
|
618
|
+
const formSettings = {
|
|
619
|
+
name: [this.name || '', [Validators.required]],
|
|
620
|
+
shortName: [this.shortName || '', [Validators.required]],
|
|
621
|
+
cucm: [this.cucm || ''],
|
|
622
|
+
cuc: [this.cuc || ''],
|
|
623
|
+
address1: [this.address1 || ''],
|
|
624
|
+
zipCode: [this.country || ''],
|
|
625
|
+
city: [this.city || ''],
|
|
626
|
+
state: [this.state || ''],
|
|
627
|
+
country: [this.country || '', [Validators.required]],
|
|
628
|
+
isAfterTtu: [this.isAfterTtu || ''],
|
|
629
|
+
ttuEnableDate: [this.ttuEnableDate || '']
|
|
630
|
+
};
|
|
631
|
+
this.form = formBuilder.group(formSettings);
|
|
632
|
+
}
|
|
633
|
+
getSavableData() {
|
|
634
|
+
const nonSavableData = ['form'];
|
|
635
|
+
return getSavableData(this, nonSavableData);
|
|
636
|
+
}
|
|
637
|
+
getId() {
|
|
638
|
+
return this.id;
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
class SiteDefaults {
|
|
642
|
+
constructor(siteDefaults, isSharedLineSite) {
|
|
643
|
+
this.routePartitionFilter = [];
|
|
644
|
+
this.devicePoolFilter = [];
|
|
645
|
+
this.cssFilter = [];
|
|
646
|
+
this.voicemailProfileFilter = [];
|
|
647
|
+
if (siteDefaults) {
|
|
648
|
+
Object.assign(this, siteDefaults);
|
|
649
|
+
this.enableEm = siteDefaults.enableEm === 'true';
|
|
650
|
+
this.routePartitionFilter.sort();
|
|
651
|
+
this.devicePoolFilter.sort();
|
|
652
|
+
this.cssFilter.sort();
|
|
653
|
+
this.voicemailProfileFilter.sort();
|
|
654
|
+
}
|
|
655
|
+
if (isSharedLineSite) {
|
|
656
|
+
this.cssFilter = siteDefaults?.sharedSitesCssFilter || [];
|
|
657
|
+
this.routePartitionFilter = siteDefaults?.sharedSitesRPFilter || [];
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
var DnRangeType;
|
|
663
|
+
(function (DnRangeType) {
|
|
664
|
+
DnRangeType["extension"] = "EXTENSION";
|
|
665
|
+
DnRangeType["cpg"] = "CPG";
|
|
666
|
+
DnRangeType["callpark"] = "CALLPARK";
|
|
667
|
+
DnRangeType["huntgroup"] = "HUNTGROUP";
|
|
668
|
+
DnRangeType["meetme"] = "MEETME";
|
|
669
|
+
DnRangeType["did"] = "DID";
|
|
670
|
+
})(DnRangeType || (DnRangeType = {}));
|
|
671
|
+
var UserViewType;
|
|
672
|
+
(function (UserViewType) {
|
|
673
|
+
UserViewType[UserViewType["details"] = 0] = "details";
|
|
674
|
+
UserViewType[UserViewType["devices"] = 1] = "devices";
|
|
675
|
+
UserViewType[UserViewType["lines"] = 2] = "lines";
|
|
676
|
+
UserViewType[UserViewType["snr"] = 3] = "snr";
|
|
677
|
+
UserViewType[UserViewType["features"] = 4] = "features";
|
|
678
|
+
UserViewType[UserViewType["overview"] = 5] = "overview";
|
|
679
|
+
})(UserViewType || (UserViewType = {}));
|
|
680
|
+
|
|
681
|
+
const ENTITY_CHANGE_TYPE = {
|
|
682
|
+
ADDED: 'added',
|
|
683
|
+
UPDATED: 'updated',
|
|
684
|
+
EXISTING: 'existing',
|
|
685
|
+
REMOVED: 'removed',
|
|
686
|
+
};
|
|
687
|
+
function deepClone(value) {
|
|
688
|
+
return JSON.parse(JSON.stringify(value));
|
|
689
|
+
}
|
|
690
|
+
function toApiBooleanString(value) {
|
|
691
|
+
if (value === true || value === 'true') {
|
|
692
|
+
return 'true';
|
|
693
|
+
}
|
|
694
|
+
if (value === false || value === 'false') {
|
|
695
|
+
return 'false';
|
|
696
|
+
}
|
|
697
|
+
return value == null || value === '' ? '' : String(value);
|
|
698
|
+
}
|
|
699
|
+
function toApiStringValue(value) {
|
|
700
|
+
if (value === true) {
|
|
701
|
+
return 'true';
|
|
702
|
+
}
|
|
703
|
+
if (value === false) {
|
|
704
|
+
return 'false';
|
|
705
|
+
}
|
|
706
|
+
return value == null ? '' : String(value);
|
|
707
|
+
}
|
|
708
|
+
function normalizeCallInfoDisplay(callInfoDisplay) {
|
|
709
|
+
if (!callInfoDisplay) {
|
|
710
|
+
return null;
|
|
711
|
+
}
|
|
712
|
+
if (typeof callInfoDisplay === 'string') {
|
|
713
|
+
try {
|
|
714
|
+
const parsed = JSON.parse(callInfoDisplay);
|
|
715
|
+
return normalizeCallInfoDisplay(parsed);
|
|
716
|
+
}
|
|
717
|
+
catch {
|
|
718
|
+
return null;
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
if (typeof callInfoDisplay !== 'object') {
|
|
722
|
+
return null;
|
|
723
|
+
}
|
|
724
|
+
const source = callInfoDisplay;
|
|
725
|
+
return {
|
|
726
|
+
callerName: source['callerName'] != null ? toApiBooleanString(source['callerName']) : null,
|
|
727
|
+
callerNumber: source['callerNumber'] != null ? toApiBooleanString(source['callerNumber']) : null,
|
|
728
|
+
redirectedNumber: source['redirectedNumber'] != null ? toApiBooleanString(source['redirectedNumber']) : null,
|
|
729
|
+
dialedNumber: source['dialedNumber'] != null ? toApiBooleanString(source['dialedNumber']) : null,
|
|
730
|
+
};
|
|
731
|
+
}
|
|
732
|
+
function normalizeDidPattern(didPattern, line, directoryNumber) {
|
|
733
|
+
if (didPattern && typeof didPattern === 'object') {
|
|
734
|
+
return didPattern;
|
|
735
|
+
}
|
|
736
|
+
if (typeof didPattern === 'string' && didPattern.trim()) {
|
|
737
|
+
return { calledPartyTransformationMask: didPattern };
|
|
738
|
+
}
|
|
739
|
+
const dn = directoryNumber || line?.directoryNumber?.directoryNumber;
|
|
740
|
+
if (dn) {
|
|
741
|
+
return { calledPartyTransformationMask: dn };
|
|
742
|
+
}
|
|
743
|
+
return null;
|
|
744
|
+
}
|
|
745
|
+
function normalizeDirectoryNumber(directoryNumber) {
|
|
746
|
+
const { displayValue: _displayValue, ...rest } = directoryNumber;
|
|
747
|
+
return {
|
|
748
|
+
directoryNumber: rest.directoryNumber ?? '',
|
|
749
|
+
routePartitionName: rest.routePartitionName ?? '',
|
|
750
|
+
templateDirectoryNumber: rest.templateDirectoryNumber,
|
|
751
|
+
pkid: rest.pkid || null,
|
|
752
|
+
dnType: rest.dnType || null,
|
|
753
|
+
subType: rest.subType ?? null,
|
|
754
|
+
};
|
|
755
|
+
}
|
|
756
|
+
function prepareLineAssociation(association, line) {
|
|
757
|
+
const prepared = deepClone(association);
|
|
758
|
+
const lineDn = line?.directoryNumber;
|
|
759
|
+
if (lineDn) {
|
|
760
|
+
prepared.directoryNumber = {
|
|
761
|
+
...prepared.directoryNumber,
|
|
762
|
+
directoryNumber: lineDn.directoryNumber || '',
|
|
763
|
+
routePartitionName: lineDn.routePartitionName || '',
|
|
764
|
+
templateDirectoryNumber: lineDn.templateDirectoryNumber ??
|
|
765
|
+
prepared.directoryNumber?.templateDirectoryNumber,
|
|
766
|
+
};
|
|
767
|
+
}
|
|
768
|
+
prepared.directoryNumber = normalizeDirectoryNumber(prepared.directoryNumber);
|
|
769
|
+
prepared.entityChangeType = prepared.entityChangeType || ENTITY_CHANGE_TYPE.ADDED;
|
|
770
|
+
prepared.logMissedCall = toApiBooleanString(prepared.logMissedCall);
|
|
771
|
+
prepared.callInfoDisplay = normalizeCallInfoDisplay(prepared.callInfoDisplay);
|
|
772
|
+
prepared.didPattern = normalizeDidPattern(prepared.didPattern, line, prepared.directoryNumber?.directoryNumber);
|
|
773
|
+
prepared.visualMWI = toApiStringValue(prepared.visualMWI);
|
|
774
|
+
prepared.audibleMWI = toApiStringValue(prepared.audibleMWI);
|
|
775
|
+
prepared.associated = prepared.associated ?? true;
|
|
776
|
+
return prepared;
|
|
777
|
+
}
|
|
778
|
+
function prepareLine(line) {
|
|
779
|
+
const prepared = deepClone(line);
|
|
780
|
+
prepared.entityChangeType = prepared.entityChangeType || ENTITY_CHANGE_TYPE.ADDED;
|
|
781
|
+
if (prepared.directoryNumber) {
|
|
782
|
+
prepared.directoryNumber = normalizeDirectoryNumber(prepared.directoryNumber);
|
|
783
|
+
}
|
|
784
|
+
return prepared;
|
|
785
|
+
}
|
|
786
|
+
function syncDeviceLineAssociations(device, lines) {
|
|
787
|
+
device.lineAssociations = (device.lineAssociations || []).map((association, index) => prepareLineAssociation(association, lines[index]));
|
|
788
|
+
}
|
|
789
|
+
function prepareDeviceForSave(device, userId, lines, deviceName) {
|
|
790
|
+
const prepared = deepClone(device);
|
|
791
|
+
const resolvedName = deviceName.trim();
|
|
792
|
+
prepared.name = resolvedName;
|
|
793
|
+
prepared.newName = resolvedName;
|
|
794
|
+
prepared.entityChangeType = prepared.entityChangeType || ENTITY_CHANGE_TYPE.ADDED;
|
|
795
|
+
prepared.createDeviceMode = prepared.createDeviceMode ?? false;
|
|
796
|
+
if (prepared.extraOptions) {
|
|
797
|
+
prepared.extraOptions.mobilityUserId = userId;
|
|
798
|
+
}
|
|
799
|
+
syncDeviceLineAssociations(prepared, lines);
|
|
800
|
+
return prepared;
|
|
801
|
+
}
|
|
802
|
+
function resolvePrimaryLineReference(user) {
|
|
803
|
+
const firstDeviceAssociation = user.devices?.[0]?.lineAssociations?.[0]?.directoryNumber;
|
|
804
|
+
if (firstDeviceAssociation) {
|
|
805
|
+
return firstDeviceAssociation;
|
|
806
|
+
}
|
|
807
|
+
const firstLineDn = user.lines?.[0]?.directoryNumber;
|
|
808
|
+
return firstLineDn ?? null;
|
|
809
|
+
}
|
|
810
|
+
function buildSavableEndUser(endUser, lines, devices, deviceProfiles, form, options = {}) {
|
|
811
|
+
const user = deepClone(endUser);
|
|
812
|
+
user.userid = form.userId || user.userid || '';
|
|
813
|
+
user.firstName = form.firstName || user.firstName || '';
|
|
814
|
+
user.lastName = form.lastName || user.lastName || '';
|
|
815
|
+
user.email = form.email || user.email || '';
|
|
816
|
+
user.createUserMode = false;
|
|
817
|
+
user.lines = (lines || []).map(line => prepareLine(line));
|
|
818
|
+
user.devices = (devices || []).map((device, index) => prepareDeviceForSave(device, user.userid || '', user.lines, options.resolveDeviceName?.(index, device) ?? device.name ?? device.newName ?? ''));
|
|
819
|
+
user.deviceProfiles = (deviceProfiles || []).map((profile, index) => prepareDeviceForSave(profile, user.userid || '', user.lines, options.resolveDeviceProfileName?.(index, profile) ?? profile.name ?? profile.newName ?? ''));
|
|
820
|
+
user.primaryLineReference = resolvePrimaryLineReference(user);
|
|
821
|
+
const snr = user.singleNumberReach;
|
|
822
|
+
if (snr && !snr.remoteDestinationProfileName) {
|
|
823
|
+
user.singleNumberReach = null;
|
|
824
|
+
}
|
|
825
|
+
return user;
|
|
826
|
+
}
|
|
827
|
+
|
|
583
828
|
class UserCreationWizardService {
|
|
829
|
+
get currentSite() {
|
|
830
|
+
return this._currentSite;
|
|
831
|
+
}
|
|
832
|
+
get firstLineRoutePartition() {
|
|
833
|
+
return this.lines[0]?.directoryNumber?.routePartitionName ?? '';
|
|
834
|
+
}
|
|
835
|
+
get siteDefaultRoutePartition() {
|
|
836
|
+
return this.siteDefaults?.routePartition || '';
|
|
837
|
+
}
|
|
838
|
+
get routePartitionNamesList() {
|
|
839
|
+
return this.siteDefaults ? this.siteDefaults.routePartitionFilter : [];
|
|
840
|
+
}
|
|
584
841
|
constructor() {
|
|
585
|
-
this.
|
|
842
|
+
this.userCreationApiService = inject(UserCreationApiService);
|
|
586
843
|
this.ldapTableColumns = ['userId', 'firstName', 'lastName', 'email', 'add'];
|
|
587
844
|
this.userCreationTypes = ['CUCM', 'MT'];
|
|
845
|
+
this.template = null;
|
|
846
|
+
this.endUser = null;
|
|
847
|
+
this.lines = [];
|
|
848
|
+
this.devices = [];
|
|
849
|
+
this.deviceProfiles = [];
|
|
850
|
+
this._currentSite = null;
|
|
588
851
|
this.siteOptions = [];
|
|
589
852
|
this.templateOptions = [];
|
|
590
853
|
this.lineOptions = [];
|
|
@@ -594,41 +857,87 @@ class UserCreationWizardService {
|
|
|
594
857
|
this.overviewUsers = [];
|
|
595
858
|
this.overviewLines = [];
|
|
596
859
|
this.overviewDevices = [];
|
|
860
|
+
this.overviewDeviceProfiles = [];
|
|
861
|
+
this.userDetailsFormValue = null;
|
|
597
862
|
this.userDetailsForm = {
|
|
598
863
|
userId: '',
|
|
599
864
|
firstName: '',
|
|
600
865
|
lastName: '',
|
|
601
|
-
email: ''
|
|
866
|
+
email: '',
|
|
602
867
|
};
|
|
603
868
|
this.lineSelections = [];
|
|
604
869
|
this.deviceEntries = [];
|
|
870
|
+
this.availableNumbers = [];
|
|
871
|
+
this.deviceTypes = [];
|
|
872
|
+
this.siteDefaults = null;
|
|
873
|
+
this.originalSiteDefaults = null;
|
|
874
|
+
this.templateLines = [];
|
|
875
|
+
this.templateDevices = [];
|
|
876
|
+
this.templateUserDetails = {};
|
|
605
877
|
this.selectedSite = null;
|
|
606
|
-
this.
|
|
878
|
+
this.selectedTemplateName = null;
|
|
879
|
+
this.selectedTemplateId = null;
|
|
607
880
|
this.selectedUserCreationType = 'CUCM';
|
|
608
|
-
this.
|
|
609
|
-
this.
|
|
881
|
+
this.availableDidPatternsMappedToDn = {};
|
|
882
|
+
this.selectedLdapUser = null;
|
|
883
|
+
this.ldapUsersTotal = 0;
|
|
884
|
+
// this.loadPlaceholderData();
|
|
885
|
+
}
|
|
886
|
+
get isLdapIntegrated() {
|
|
887
|
+
return !!this.endUser?.ldapIntegrated;
|
|
888
|
+
}
|
|
889
|
+
selectLdapUser(user) {
|
|
890
|
+
this.selectedLdapUser = user;
|
|
891
|
+
if (this.endUser) {
|
|
892
|
+
this.endUser.ldapIntegrated = true;
|
|
893
|
+
this.endUser.userid = user.userid;
|
|
894
|
+
this.endUser.firstName = user.firstName ?? '';
|
|
895
|
+
this.endUser.lastName = user.lastName ?? '';
|
|
896
|
+
this.endUser.email = user.email ?? '';
|
|
897
|
+
}
|
|
898
|
+
this.userDetailsForm = {
|
|
899
|
+
userId: user.userid,
|
|
900
|
+
firstName: user.firstName ?? '',
|
|
901
|
+
lastName: user.lastName ?? '',
|
|
902
|
+
email: user.email ?? '',
|
|
903
|
+
};
|
|
904
|
+
this.rebuildOverviewUsers();
|
|
610
905
|
}
|
|
611
|
-
|
|
906
|
+
clearLdapUserSelection() {
|
|
907
|
+
this.selectedLdapUser = null;
|
|
908
|
+
if (this.endUser) {
|
|
909
|
+
this.endUser.ldapIntegrated = false;
|
|
910
|
+
this.endUser.userid = '';
|
|
911
|
+
this.endUser.firstName = '';
|
|
912
|
+
this.endUser.lastName = '';
|
|
913
|
+
this.endUser.email = '';
|
|
914
|
+
}
|
|
612
915
|
this.userDetailsForm = {
|
|
613
|
-
userId:
|
|
614
|
-
firstName:
|
|
615
|
-
lastName:
|
|
616
|
-
email:
|
|
916
|
+
userId: '',
|
|
917
|
+
firstName: '',
|
|
918
|
+
lastName: '',
|
|
919
|
+
email: '',
|
|
617
920
|
};
|
|
618
|
-
this.addedLdapUserIds.clear();
|
|
619
|
-
this.addedLdapUserIds.add(row.userId);
|
|
620
921
|
this.rebuildOverviewUsers();
|
|
621
922
|
}
|
|
622
|
-
|
|
623
|
-
return this.
|
|
923
|
+
isLdapUserRowSelected(row) {
|
|
924
|
+
return this.selectedLdapUser?.userid === row.userid;
|
|
925
|
+
}
|
|
926
|
+
setLdapUsersResult(users, total) {
|
|
927
|
+
this.ldapUsers = users;
|
|
928
|
+
this.ldapUsersTotal = total;
|
|
624
929
|
}
|
|
625
930
|
setSelectedSite(site) {
|
|
626
|
-
this.selectedSite = site;
|
|
931
|
+
this.selectedSite = site || null;
|
|
627
932
|
}
|
|
628
933
|
setSelectedTemplate(template) {
|
|
629
|
-
this.
|
|
934
|
+
this.selectedTemplateName = template?.name || null;
|
|
935
|
+
this.selectedTemplateId = template?.id || null;
|
|
630
936
|
this.rebuildOverviewUsers();
|
|
631
937
|
}
|
|
938
|
+
setCurrentSite(site) {
|
|
939
|
+
this._currentSite = site;
|
|
940
|
+
}
|
|
632
941
|
resetTemplateDrivenData() {
|
|
633
942
|
this.lineOptions = [];
|
|
634
943
|
this.routePartitionOptions = [];
|
|
@@ -639,66 +948,78 @@ class UserCreationWizardService {
|
|
|
639
948
|
this.rebuildOverviewDevices();
|
|
640
949
|
}
|
|
641
950
|
applyTemplateTokenPayload(payload) {
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
this.
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
}
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
this.
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
this.
|
|
699
|
-
|
|
700
|
-
this.
|
|
701
|
-
|
|
951
|
+
this.template = this.extractTemplateFromTokenPayload(payload);
|
|
952
|
+
this.endUser = this.template?.endUser || null;
|
|
953
|
+
this.lines = this.endUser && Array.isArray(this.endUser?.lines) ? this.endUser.lines : [];
|
|
954
|
+
this.devices = this.endUser && Array.isArray(this.endUser?.devices) ? this.endUser.devices : [];
|
|
955
|
+
this.deviceProfiles = this.endUser && Array.isArray(this.endUser?.deviceProfiles) ? this.endUser.deviceProfiles : [];
|
|
956
|
+
this.initTemplateDnsNamesForLines();
|
|
957
|
+
// this.userDetailsForm = {
|
|
958
|
+
// userId: this.valueToString(this.endUser?.userid ?? ''),
|
|
959
|
+
// firstName: this.valueToString(this.endUser?.firstName ?? ''),
|
|
960
|
+
// lastName: this.valueToString(this.endUser?.lastName ?? ''),
|
|
961
|
+
// email: this.valueToString(this.endUser?.email ?? '')
|
|
962
|
+
// };
|
|
963
|
+
// const mappedLineOptions: LineOption[] = linesFromTemplate
|
|
964
|
+
// .map(line => ({
|
|
965
|
+
// number: this.valueToString(line?.directoryNumber?.directoryNumber),
|
|
966
|
+
// did: this.valueToString(line?.didPatterns?.[0]?.pattern || line?.directoryNumber?.directoryNumber),
|
|
967
|
+
// css: this.valueToString(
|
|
968
|
+
// typeof line?.callingSearchSpace === 'string'
|
|
969
|
+
// ? line.callingSearchSpace
|
|
970
|
+
// : line?.callingSearchSpace?.name
|
|
971
|
+
// ),
|
|
972
|
+
// description: this.valueToString(line?.description)
|
|
973
|
+
// }))
|
|
974
|
+
// .filter(line => line.number.trim().length > 0);
|
|
975
|
+
this.devices.forEach(device => this.initDeviceWithSiteInfo(device));
|
|
976
|
+
this.deviceProfiles.forEach(device => this.initDeviceWithSiteInfo(device));
|
|
977
|
+
this.lines.forEach(line => this.initLineWithSiteInfo(line));
|
|
978
|
+
// if (mappedLineOptions.length) {
|
|
979
|
+
// this.lineOptions = this.uniqueByNumber(mappedLineOptions);
|
|
980
|
+
// this.lineSelections = this.lineOptions.map(line => ({
|
|
981
|
+
// lineNumber: line.number,
|
|
982
|
+
// routePartitionName: linesFromTemplate.find(
|
|
983
|
+
// source => (source?.directoryNumber?.directoryNumber || '') === line.number
|
|
984
|
+
// )?.directoryNumber?.routePartitionName || null
|
|
985
|
+
// }));
|
|
986
|
+
// } else {
|
|
987
|
+
// const lineAssociations = devicesFromTemplate.flatMap(device => device.lineAssociations || []);
|
|
988
|
+
// const associatedLineOptions: LineOption[] = lineAssociations
|
|
989
|
+
// .map(association => {
|
|
990
|
+
// const number = association?.directoryNumber?.directoryNumber || '';
|
|
991
|
+
// return {
|
|
992
|
+
// number,
|
|
993
|
+
// did: number,
|
|
994
|
+
// css: '',
|
|
995
|
+
// description: ''
|
|
996
|
+
// };
|
|
997
|
+
// })
|
|
998
|
+
// .filter(line => line.number.trim().length > 0);
|
|
999
|
+
// this.lineOptions = this.uniqueByNumber(associatedLineOptions);
|
|
1000
|
+
// this.lineSelections = this.lineOptions.map(line => ({
|
|
1001
|
+
// lineNumber: line.number,
|
|
1002
|
+
// routePartitionName: lineAssociations.find(
|
|
1003
|
+
// source => (source?.directoryNumber?.directoryNumber || '') === line.number
|
|
1004
|
+
// )?.directoryNumber?.routePartitionName || null
|
|
1005
|
+
// }));
|
|
1006
|
+
// this.templateLines.forEach((line: any) => this.initLineWithSiteInfo(line));
|
|
1007
|
+
// this.initTemplateDnsNamesForLines(this.templateLines);
|
|
1008
|
+
// }
|
|
1009
|
+
// const routePartitions = this.lineSelections
|
|
1010
|
+
// .map(line => line.routePartitionName)
|
|
1011
|
+
// .filter((value): value is string => !!value && value.trim().length > 0);
|
|
1012
|
+
// this.routePartitionOptions = this.uniqueStrings(routePartitions);
|
|
1013
|
+
// this.deviceEntries = devicesFromTemplate.map(device => ({
|
|
1014
|
+
// deviceType: this.valueToString(device.deviceType),
|
|
1015
|
+
// protocol: this.valueToString(device.protocol),
|
|
1016
|
+
// buttonTemplate: this.valueToString(device.buttonTemplate),
|
|
1017
|
+
// name: this.valueToString(device.name)
|
|
1018
|
+
// }));
|
|
1019
|
+
// this.deviceRows = this.deviceEntries.map((_, index) => index + 1);
|
|
1020
|
+
// this.rebuildOverviewUsers();
|
|
1021
|
+
// this.rebuildOverviewLines();
|
|
1022
|
+
// this.rebuildOverviewDevices();
|
|
702
1023
|
}
|
|
703
1024
|
setSelectedUserCreationType(type) {
|
|
704
1025
|
this.selectedUserCreationType = type;
|
|
@@ -710,6 +1031,41 @@ class UserCreationWizardService {
|
|
|
710
1031
|
};
|
|
711
1032
|
this.rebuildOverviewUsers();
|
|
712
1033
|
}
|
|
1034
|
+
applyUserDetailsFormValue(formValue) {
|
|
1035
|
+
this.userDetailsFormValue = formValue;
|
|
1036
|
+
this.userDetailsForm = {
|
|
1037
|
+
userId: formValue.userId || '',
|
|
1038
|
+
firstName: formValue.firstName || '',
|
|
1039
|
+
lastName: formValue.lastName || '',
|
|
1040
|
+
email: formValue.email || '',
|
|
1041
|
+
};
|
|
1042
|
+
formValue.lines?.forEach((lineValue, index) => {
|
|
1043
|
+
const line = this.lines[index];
|
|
1044
|
+
if (!line?.directoryNumber) {
|
|
1045
|
+
return;
|
|
1046
|
+
}
|
|
1047
|
+
line.directoryNumber.directoryNumber = lineValue.number || '';
|
|
1048
|
+
line.directoryNumber.routePartitionName = lineValue.routePartition || '';
|
|
1049
|
+
});
|
|
1050
|
+
formValue.devices?.forEach((deviceValue, index) => {
|
|
1051
|
+
const device = this.devices[index];
|
|
1052
|
+
if (!device) {
|
|
1053
|
+
return;
|
|
1054
|
+
}
|
|
1055
|
+
device.name = deviceValue.name || '';
|
|
1056
|
+
});
|
|
1057
|
+
formValue.deviceProfiles?.forEach((profileValue, index) => {
|
|
1058
|
+
const profile = this.deviceProfiles[index];
|
|
1059
|
+
if (!profile) {
|
|
1060
|
+
return;
|
|
1061
|
+
}
|
|
1062
|
+
profile.name = profileValue.name || '';
|
|
1063
|
+
});
|
|
1064
|
+
this.rebuildOverviewUsers();
|
|
1065
|
+
this.rebuildOverviewLines();
|
|
1066
|
+
this.rebuildOverviewDevices();
|
|
1067
|
+
this.rebuildOverviewDeviceProfiles();
|
|
1068
|
+
}
|
|
713
1069
|
setLineSelection(index, lineNumber) {
|
|
714
1070
|
if (!this.lineSelections[index]) {
|
|
715
1071
|
return;
|
|
@@ -759,64 +1115,47 @@ class UserCreationWizardService {
|
|
|
759
1115
|
}
|
|
760
1116
|
return entry.name || '';
|
|
761
1117
|
}
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
did: '+13125557046',
|
|
770
|
-
css: 'Atlanta_internal_css',
|
|
771
|
-
description: ''
|
|
772
|
-
},
|
|
773
|
-
{
|
|
774
|
-
number: '557047',
|
|
775
|
-
did: '+13125557047',
|
|
776
|
-
css: 'Atlanta_internal_css',
|
|
777
|
-
description: ''
|
|
778
|
-
},
|
|
779
|
-
{
|
|
780
|
-
number: '557048',
|
|
781
|
-
did: '+13125557048',
|
|
782
|
-
css: 'Atlanta_internal_css',
|
|
783
|
-
description: ''
|
|
1118
|
+
getSiteAllData(siteId) {
|
|
1119
|
+
return this.userCreationApiService.getSiteAllData(siteId)
|
|
1120
|
+
.pipe(tap((res) => {
|
|
1121
|
+
let site = null;
|
|
1122
|
+
if (res && res[0]) {
|
|
1123
|
+
const site = new Site(res[0]);
|
|
1124
|
+
this.selectedSite = site.id;
|
|
784
1125
|
}
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
{ userId: 'John.Smith', firstName: 'John', lastName: 'Smith', email: 'john.smith@car-west.com' },
|
|
790
|
-
{ userId: 'John.Doe', firstName: 'John', lastName: 'Doe', email: 'john.doe@car-west.com' },
|
|
791
|
-
{ userId: 'Jane.Smith', firstName: 'Jane', lastName: 'Smith', email: 'jane.smith@car-west.com' }
|
|
792
|
-
];
|
|
793
|
-
this.lineSelections = [
|
|
794
|
-
{
|
|
795
|
-
lineNumber: null,
|
|
796
|
-
routePartitionName: this.routePartitionOptions[0] || null
|
|
1126
|
+
if (res && res[1]) {
|
|
1127
|
+
this.siteDefaults = new SiteDefaults(res[1], false);
|
|
1128
|
+
this.originalSiteDefaults = new SiteDefaults(res[1], false);
|
|
1129
|
+
this.routePartitionOptions = [...this.routePartitionNamesList];
|
|
797
1130
|
}
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
{
|
|
801
|
-
deviceType: 'Cisco 8851',
|
|
802
|
-
protocol: 'SIP',
|
|
803
|
-
buttonTemplate: 'Standard 8851 SIP',
|
|
804
|
-
name: ''
|
|
805
|
-
},
|
|
806
|
-
{
|
|
807
|
-
deviceType: 'Cisco Unified Client Services Framework',
|
|
808
|
-
protocol: 'SIP',
|
|
809
|
-
buttonTemplate: 'Standard Client Services Framework',
|
|
810
|
-
name: ''
|
|
1131
|
+
if (res && res[2]) {
|
|
1132
|
+
this.deviceTypes = res[2];
|
|
811
1133
|
}
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
1134
|
+
// this.routePartitionOptions = this.siteDefaults?.routePartition || [];
|
|
1135
|
+
// this.devicePoolOptions = this.siteDefaults?.devicePool || [];
|
|
1136
|
+
// this.cssOptions = this.siteDefaults?.cssFilter || [];
|
|
1137
|
+
// this.voicemailProfileOptions = this.siteDefaults?.voicemailProfile || [];
|
|
1138
|
+
// this.lineCss = this.siteDefaults?.lineCss || '';
|
|
1139
|
+
// this.deviceCss = this.siteDefaults?.deviceCss || '';
|
|
1140
|
+
// this.callForwardAllCss = this.siteDefaults?.callForwardAllCss || '';
|
|
1141
|
+
}));
|
|
1142
|
+
}
|
|
1143
|
+
getNumberRange(siteId, routePartition) {
|
|
1144
|
+
this.availableDidPatternsMappedToDn = {};
|
|
1145
|
+
const pageSize = 9999;
|
|
1146
|
+
const params = { dntype: DnRangeType.extension, routepartition: routePartition, size: pageSize, page: 0 };
|
|
1147
|
+
this.availableNumbers = [];
|
|
1148
|
+
return this.userCreationApiService.getAvailableDnInRanges(siteId, params)
|
|
1149
|
+
.pipe(map((res) => {
|
|
1150
|
+
res.availableNumberList.forEach((availableNumber) => {
|
|
1151
|
+
this.setAvailableDidMappedToDn(availableNumber);
|
|
1152
|
+
this.availableNumbers = [...this.availableNumbers, ...this.getUnwrapNumberRange(availableNumber)];
|
|
1153
|
+
});
|
|
1154
|
+
}));
|
|
1155
|
+
// .pipe(this.handleError(true, false));
|
|
817
1156
|
}
|
|
818
1157
|
rebuildOverviewUsers() {
|
|
819
|
-
const userTemplate = this.
|
|
1158
|
+
const userTemplate = this.selectedTemplateName || '';
|
|
820
1159
|
const hasUserData = Object.values(this.userDetailsForm).some(value => value.trim().length > 0);
|
|
821
1160
|
this.overviewUsers = hasUserData
|
|
822
1161
|
? [{
|
|
@@ -829,6 +1168,23 @@ class UserCreationWizardService {
|
|
|
829
1168
|
: [];
|
|
830
1169
|
}
|
|
831
1170
|
rebuildOverviewLines() {
|
|
1171
|
+
const formLines = this.userDetailsFormValue?.lines;
|
|
1172
|
+
if (formLines?.length) {
|
|
1173
|
+
this.overviewLines = formLines
|
|
1174
|
+
.filter(line => !!line?.number?.trim())
|
|
1175
|
+
.map((lineValue, index) => {
|
|
1176
|
+
const templateLine = this.lines[index];
|
|
1177
|
+
const css = this.valueToString(templateLine?.callingSearchSpace);
|
|
1178
|
+
return {
|
|
1179
|
+
number: lineValue.number,
|
|
1180
|
+
did: lineValue.lineNumber || lineValue.number,
|
|
1181
|
+
routePartitionName: lineValue.routePartition || '',
|
|
1182
|
+
css,
|
|
1183
|
+
description: this.valueToString(templateLine?.description),
|
|
1184
|
+
};
|
|
1185
|
+
});
|
|
1186
|
+
return;
|
|
1187
|
+
}
|
|
832
1188
|
this.overviewLines = this.lineSelections
|
|
833
1189
|
.map(selection => {
|
|
834
1190
|
if (!selection?.lineNumber) {
|
|
@@ -850,6 +1206,18 @@ class UserCreationWizardService {
|
|
|
850
1206
|
}
|
|
851
1207
|
rebuildOverviewDevices() {
|
|
852
1208
|
const selectedLineNumbers = this.overviewLines.map(line => line.number).join(', ');
|
|
1209
|
+
const formDevices = this.userDetailsFormValue?.devices;
|
|
1210
|
+
if (formDevices?.length) {
|
|
1211
|
+
this.overviewDevices = formDevices
|
|
1212
|
+
.filter(device => !!device.deviceType?.trim() || !!device.name?.trim())
|
|
1213
|
+
.map(device => ({
|
|
1214
|
+
name: device.name || '',
|
|
1215
|
+
deviceType: device.deviceType || '',
|
|
1216
|
+
lines: selectedLineNumbers,
|
|
1217
|
+
description: `${device.protocol || ''} / ${device.buttonTemplate || ''}`.trim(),
|
|
1218
|
+
}));
|
|
1219
|
+
return;
|
|
1220
|
+
}
|
|
853
1221
|
this.overviewDevices = this.deviceEntries
|
|
854
1222
|
.map((device, index) => ({
|
|
855
1223
|
device,
|
|
@@ -863,6 +1231,22 @@ class UserCreationWizardService {
|
|
|
863
1231
|
description: `${device.protocol} / ${device.buttonTemplate}`
|
|
864
1232
|
}));
|
|
865
1233
|
}
|
|
1234
|
+
rebuildOverviewDeviceProfiles() {
|
|
1235
|
+
const selectedLineNumbers = this.overviewLines.map(line => line.number).join(', ');
|
|
1236
|
+
const formProfiles = this.userDetailsFormValue?.deviceProfiles;
|
|
1237
|
+
if (!formProfiles?.length) {
|
|
1238
|
+
this.overviewDeviceProfiles = [];
|
|
1239
|
+
return;
|
|
1240
|
+
}
|
|
1241
|
+
this.overviewDeviceProfiles = formProfiles
|
|
1242
|
+
.filter(profile => !!profile.deviceType?.trim() || !!profile.name?.trim())
|
|
1243
|
+
.map(profile => ({
|
|
1244
|
+
name: profile.name || '',
|
|
1245
|
+
deviceType: profile.deviceType || '',
|
|
1246
|
+
lines: selectedLineNumbers,
|
|
1247
|
+
description: `${profile.protocol || ''} / ${profile.buttonTemplate || ''}`.trim(),
|
|
1248
|
+
}));
|
|
1249
|
+
}
|
|
866
1250
|
extractTemplateFromTokenPayload(payload) {
|
|
867
1251
|
if (!payload || typeof payload !== 'object') {
|
|
868
1252
|
return null;
|
|
@@ -889,10 +1273,244 @@ class UserCreationWizardService {
|
|
|
889
1273
|
valueToString(value) {
|
|
890
1274
|
return typeof value === 'string' ? value : '';
|
|
891
1275
|
}
|
|
1276
|
+
getUnwrapNumberRange(availableNumber) {
|
|
1277
|
+
let unwrapNumberRange = this.unwrapNumberRange(availableNumber.phoneNumberRange.from, availableNumber.phoneNumberRange.to)
|
|
1278
|
+
.map((unwrappedNumber) => {
|
|
1279
|
+
const dn = availableNumber.phoneNumberRange.prefix + unwrappedNumber;
|
|
1280
|
+
let str = dn;
|
|
1281
|
+
if (this.availableDidPatternsMappedToDn[dn] && this.availableDidPatternsMappedToDn[dn].length > 0) {
|
|
1282
|
+
if (this.availableDidPatternsMappedToDn[dn][0]['mappedDids'] && this.availableDidPatternsMappedToDn[dn][0]['mappedDids'].length > 0) {
|
|
1283
|
+
str += ' DID: ' + (this.availableDidPatternsMappedToDn[dn][0]['mappedDids'].length > 1 ? 'multiple' :
|
|
1284
|
+
this.availableDidPatternsMappedToDn[dn][0]['mappedDids'][0]);
|
|
1285
|
+
}
|
|
1286
|
+
if (this.availableDidPatternsMappedToDn[dn][0]['vm']) {
|
|
1287
|
+
str += ' In Use - VM';
|
|
1288
|
+
}
|
|
1289
|
+
}
|
|
1290
|
+
return str;
|
|
1291
|
+
});
|
|
1292
|
+
unwrapNumberRange = unwrapNumberRange.filter((unwrappedNumber) => !availableNumber.usedNumbers.includes(unwrappedNumber));
|
|
1293
|
+
return unwrapNumberRange;
|
|
1294
|
+
}
|
|
1295
|
+
unwrapNumberRange(start, end) {
|
|
1296
|
+
const regExp = /(^0+)/;
|
|
1297
|
+
let leadingZeros = '';
|
|
1298
|
+
const matches = start.match(regExp);
|
|
1299
|
+
if (matches) {
|
|
1300
|
+
leadingZeros = matches[1];
|
|
1301
|
+
}
|
|
1302
|
+
const startNumeric = new Big(start);
|
|
1303
|
+
const endNumeric = new Big(end);
|
|
1304
|
+
return Array.from({ length: Number(endNumeric.minus(startNumeric).plus(new Big(1)).toFixed(0)) }, (v, k) => {
|
|
1305
|
+
const number = String(startNumeric.plus(new Big(k.toString())).toFixed(0));
|
|
1306
|
+
if ((leadingZeros + number).length > start.length) {
|
|
1307
|
+
leadingZeros = leadingZeros.substr(1);
|
|
1308
|
+
}
|
|
1309
|
+
return leadingZeros + number;
|
|
1310
|
+
});
|
|
1311
|
+
}
|
|
1312
|
+
setAvailableDidMappedToDn(availableNumber) {
|
|
1313
|
+
if (availableNumber.unUsedNumbersWithDids && availableNumber.unUsedNumbersWithDids.length) {
|
|
1314
|
+
availableNumber.unUsedNumbersWithDids.forEach((numberWithDids) => {
|
|
1315
|
+
const dn = numberWithDids['unUsedNumber'];
|
|
1316
|
+
this.availableDidPatternsMappedToDn[dn] = [{}];
|
|
1317
|
+
if (numberWithDids['translationPatternList'] && numberWithDids['translationPatternList'].length > 0) {
|
|
1318
|
+
this.availableDidPatternsMappedToDn[dn] = numberWithDids['translationPatternList'];
|
|
1319
|
+
this.availableDidPatternsMappedToDn[dn][0]['mappedDids'] = [{}];
|
|
1320
|
+
if (numberWithDids['mappedDids'] && numberWithDids['mappedDids'].length > 0) {
|
|
1321
|
+
this.availableDidPatternsMappedToDn[dn][0]['mappedDids'] = numberWithDids['mappedDids'];
|
|
1322
|
+
}
|
|
1323
|
+
}
|
|
1324
|
+
this.availableDidPatternsMappedToDn[dn][0]['vm'] = numberWithDids['vm'];
|
|
1325
|
+
});
|
|
1326
|
+
}
|
|
1327
|
+
}
|
|
892
1328
|
// TODO: replace placeholders with real API integration.
|
|
893
1329
|
loadDataFromApi() {
|
|
894
1330
|
// this.api.getWizardBootstrapData().subscribe(...)
|
|
895
1331
|
}
|
|
1332
|
+
initLineWithSiteInfo(line) {
|
|
1333
|
+
line.directoryNumber.routePartitionName = this.siteDefaults?.routePartition || '';
|
|
1334
|
+
let callingSearchSpaceVal = this.siteDefaults?.lineCss || '';
|
|
1335
|
+
line.callingSearchSpace = callingSearchSpaceVal;
|
|
1336
|
+
}
|
|
1337
|
+
// private initTemplateDnsNamesForLines(userLines: TemplateLineLike[]): void {
|
|
1338
|
+
// const routePartition = this.siteDefaults?.routePartition || '';
|
|
1339
|
+
// if (userLines && userLines.length > 0) {
|
|
1340
|
+
// userLines.forEach((line, index) => {
|
|
1341
|
+
// line && line.directoryNumber && (line.directoryNumber.templateDirectoryNumber = line.directoryNumber.directoryNumber);
|
|
1342
|
+
// line && line.directoryNumber && (line.directoryNumber.directoryNumber = '');
|
|
1343
|
+
// return line;
|
|
1344
|
+
// });
|
|
1345
|
+
// // const routePartition = this.siteDefaults?.routePartition || '';
|
|
1346
|
+
// // if (line.lineAssociations && line.lineAssociations.length) {
|
|
1347
|
+
// // this.setLineAssociationsForDevice(line, routePartition);
|
|
1348
|
+
// // }
|
|
1349
|
+
// }
|
|
1350
|
+
// this.templateDevices.forEach(device => {
|
|
1351
|
+
// if (device.lineAssociations && device.lineAssociations.length) {
|
|
1352
|
+
// this.setLineAssociationsForDevice(device, routePartition);
|
|
1353
|
+
// }
|
|
1354
|
+
// });
|
|
1355
|
+
// }
|
|
1356
|
+
setLineAssociationsForDevice(device, routePartition) {
|
|
1357
|
+
const lineAssociations = device.lineAssociations || [];
|
|
1358
|
+
if (lineAssociations && lineAssociations.length) {
|
|
1359
|
+
lineAssociations.forEach(lineAssociation => {
|
|
1360
|
+
lineAssociation && lineAssociation.directoryNumber && (lineAssociation.directoryNumber.templateDirectoryNumber = lineAssociation.directoryNumber.directoryNumber || '');
|
|
1361
|
+
lineAssociation && lineAssociation.directoryNumber && (lineAssociation.directoryNumber.routePartitionName = routePartition);
|
|
1362
|
+
});
|
|
1363
|
+
}
|
|
1364
|
+
}
|
|
1365
|
+
initDeviceWithSiteInfo(device) {
|
|
1366
|
+
device.newName = device.name;
|
|
1367
|
+
device.name = '';
|
|
1368
|
+
if (!device['enabledExtensionMobility']) {
|
|
1369
|
+
device.enabledExtensionMobility = this.siteDefaults?.enableEm ?? false;
|
|
1370
|
+
}
|
|
1371
|
+
else if (device['enabledExtensionMobility'].toString() === 'Yes') {
|
|
1372
|
+
device.enabledExtensionMobility = true;
|
|
1373
|
+
}
|
|
1374
|
+
else if (device['enabledExtensionMobility'].toString() === 'No') {
|
|
1375
|
+
device.enabledExtensionMobility = false;
|
|
1376
|
+
}
|
|
1377
|
+
if (device.location) {
|
|
1378
|
+
const replacedValue = this.replaceDynamicValueSiteInfo(device.location, this.currentSite?.shortName ?? '') ?? null;
|
|
1379
|
+
device.location = replacedValue;
|
|
1380
|
+
}
|
|
1381
|
+
if (device.location) {
|
|
1382
|
+
const replacedValue = this.replaceDynamicValueSiteInfo(device.devicePoolName, this.currentSite?.shortName ?? '') ?? null;
|
|
1383
|
+
device.devicePoolName = replacedValue;
|
|
1384
|
+
}
|
|
1385
|
+
if (device.location) {
|
|
1386
|
+
const replacedValue = this.replaceDynamicValueSiteInfo(device.callingSearchSpaceName, this.currentSite?.shortName ?? '') ?? null;
|
|
1387
|
+
device.callingSearchSpaceName = replacedValue;
|
|
1388
|
+
}
|
|
1389
|
+
if (device.extraOptions) {
|
|
1390
|
+
const replacedValue = this.replaceDynamicValueSiteInfo(device.extraOptions.aarCss, this.currentSite?.shortName ?? '') ?? null;
|
|
1391
|
+
device.extraOptions.aarCss = replacedValue;
|
|
1392
|
+
}
|
|
1393
|
+
if (!device.description && this.siteDefaults) {
|
|
1394
|
+
device.description = this.siteDefaults.deviceDescription;
|
|
1395
|
+
}
|
|
1396
|
+
}
|
|
1397
|
+
replaceDynamicValueSiteInfo(fieldValue, siteShortName) {
|
|
1398
|
+
if (fieldValue) {
|
|
1399
|
+
fieldValue = this.replaceDynamicValueFormat(fieldValue);
|
|
1400
|
+
const paramsToReplaces = { 'SiteShortName': siteShortName };
|
|
1401
|
+
return this.mutliStringReplace(paramsToReplaces, fieldValue);
|
|
1402
|
+
}
|
|
1403
|
+
return null;
|
|
1404
|
+
}
|
|
1405
|
+
replaceDynamicValueFormat(str) {
|
|
1406
|
+
str = str.replace(/\[FN\]/ig, '[FN]').replace(/\[LN\]/ig, '[LN]').replace(/\[ID\]/ig, '[UserId]')
|
|
1407
|
+
.replace(/\[UserId\]/ig, '[UserId]').replace(/<Match User ID>/ig, '[UserId]')
|
|
1408
|
+
.replace(/\[Email\]/ig, '[Email]').replace(/\[DN\(/ig, '[DN(')
|
|
1409
|
+
.replace(/\[SiteShortName\]/ig, '[SiteShortName]').replace(/\$\(SiteShortName\)/ig, '[SiteShortName]')
|
|
1410
|
+
.replace(/\$\{SiteShortName\}/ig, '[SiteShortName]').replace(/{SiteShortName}/ig, '[SiteShortName]')
|
|
1411
|
+
.replace(/\[FN\(/ig, '[FN(').replace(/\[LN\(/ig, '[LN(')
|
|
1412
|
+
.replace(/\[ID\(/ig, '[ID(');
|
|
1413
|
+
return str;
|
|
1414
|
+
}
|
|
1415
|
+
mutliStringReplace(object, input, directoryNumber, user) {
|
|
1416
|
+
var val = input;
|
|
1417
|
+
if (val.includes('[DN]') && directoryNumber && !directoryNumber.includes('Line')) {
|
|
1418
|
+
val = val.replace('[DN]', directoryNumber);
|
|
1419
|
+
}
|
|
1420
|
+
var indexOfDN = val.indexOf('[DN(');
|
|
1421
|
+
if (indexOfDN !== -1 && directoryNumber) {
|
|
1422
|
+
var digit = val.substring(indexOfDN + 4, val.indexOf(')', indexOfDN + 4));
|
|
1423
|
+
var digitCount = Number(digit) || 0;
|
|
1424
|
+
var dnDigit = (digitCount > val.length) ? directoryNumber : directoryNumber.substring(directoryNumber.length - digitCount, directoryNumber.length);
|
|
1425
|
+
val = val.replace('[DN(' + digit + ')]', dnDigit);
|
|
1426
|
+
}
|
|
1427
|
+
var indexOfFN = val.indexOf('[FN(');
|
|
1428
|
+
if (indexOfFN !== -1 && user && user.firstName) {
|
|
1429
|
+
var digit = val.substring(indexOfFN + 4, val.indexOf(')', indexOfFN + 4));
|
|
1430
|
+
var fnDigit = user.firstName.substring(0, digit);
|
|
1431
|
+
val = val.replace('[FN(' + digit + ')]', fnDigit);
|
|
1432
|
+
}
|
|
1433
|
+
var indexOfLN = val.indexOf('[LN(');
|
|
1434
|
+
if (indexOfLN !== -1 && user && user.lastName) {
|
|
1435
|
+
var digit = val.substring(indexOfLN + 4, val.indexOf(')', indexOfLN + 4));
|
|
1436
|
+
var lnDigit = user.lastName.substring(0, digit);
|
|
1437
|
+
val = val.replace('[LN(' + digit + ')]', lnDigit);
|
|
1438
|
+
}
|
|
1439
|
+
var indexOfID = val.indexOf('[ID(');
|
|
1440
|
+
if (indexOfID !== -1 && user && user.userid) {
|
|
1441
|
+
var digit = val.substring(indexOfID + 4, val.indexOf(')', indexOfID + 4));
|
|
1442
|
+
var idDigit = user.userid.substring(0, digit);
|
|
1443
|
+
val = val.replace('[ID(' + digit + ')]', idDigit);
|
|
1444
|
+
}
|
|
1445
|
+
var entries = Object.entries(object);
|
|
1446
|
+
entries.forEach((para) => {
|
|
1447
|
+
var find = '[' + para[0] + ']';
|
|
1448
|
+
var replacement = para[1] != null ? String(para[1]) : '';
|
|
1449
|
+
val = val.split(find).join(replacement);
|
|
1450
|
+
});
|
|
1451
|
+
return val;
|
|
1452
|
+
}
|
|
1453
|
+
initTemplateDnsNamesForLines() {
|
|
1454
|
+
if (this.lines && this.lines.length > 0) {
|
|
1455
|
+
this.lines.forEach((line, index) => {
|
|
1456
|
+
line.directoryNumber.templateDirectoryNumber = line.directoryNumber.directoryNumber;
|
|
1457
|
+
line.directoryNumber.directoryNumber = '';
|
|
1458
|
+
return line;
|
|
1459
|
+
});
|
|
1460
|
+
const routePartition = this.siteDefaults?.routePartition || '';
|
|
1461
|
+
this.devices.forEach(device => {
|
|
1462
|
+
if (device.lineAssociations && device.lineAssociations.length) {
|
|
1463
|
+
this.setLineAssociationsForDevice(device, routePartition);
|
|
1464
|
+
}
|
|
1465
|
+
});
|
|
1466
|
+
this.deviceProfiles.forEach(deviceProfile => {
|
|
1467
|
+
if (deviceProfile.lineAssociations && deviceProfile.lineAssociations.length) {
|
|
1468
|
+
this.setLineAssociationsForDevice(deviceProfile, routePartition);
|
|
1469
|
+
}
|
|
1470
|
+
});
|
|
1471
|
+
if (this.endUser?.singleNumberReach && this.endUser.singleNumberReach.associatedLines && this.endUser.singleNumberReach.associatedLines.length) {
|
|
1472
|
+
if (this.endUser.singleNumberReach.associatedLines && this.endUser.singleNumberReach.associatedLines.length) {
|
|
1473
|
+
this.endUser.singleNumberReach.associatedLines.map(lineAssociation => {
|
|
1474
|
+
lineAssociation.directoryNumber.templateDirectoryNumber = lineAssociation.directoryNumber.directoryNumber;
|
|
1475
|
+
lineAssociation.directoryNumber.routePartitionName = routePartition;
|
|
1476
|
+
});
|
|
1477
|
+
}
|
|
1478
|
+
if (this.endUser.singleNumberReach.remoteDestinations && this.endUser.singleNumberReach.remoteDestinations.length) {
|
|
1479
|
+
this.endUser.singleNumberReach.remoteDestinations.forEach(remoteDestination => {
|
|
1480
|
+
if (remoteDestination.lineAssociations && remoteDestination.lineAssociations.length) {
|
|
1481
|
+
remoteDestination.lineAssociations.map(lineAssociation => {
|
|
1482
|
+
lineAssociation.directoryNumber.templateDirectoryNumber = lineAssociation.directoryNumber.directoryNumber;
|
|
1483
|
+
lineAssociation.directoryNumber.routePartitionName = routePartition;
|
|
1484
|
+
});
|
|
1485
|
+
}
|
|
1486
|
+
});
|
|
1487
|
+
}
|
|
1488
|
+
}
|
|
1489
|
+
}
|
|
1490
|
+
}
|
|
1491
|
+
buildSavableEndUser() {
|
|
1492
|
+
if (!this.endUser) {
|
|
1493
|
+
throw new Error('No template user loaded');
|
|
1494
|
+
}
|
|
1495
|
+
return buildSavableEndUser(this.endUser, this.lines, this.devices, this.deviceProfiles, this.userDetailsForm, {
|
|
1496
|
+
resolveDeviceName: (index, device) => this.resolveDeviceNameForSave(index, device),
|
|
1497
|
+
resolveDeviceProfileName: (index, profile) => this.resolveDeviceNameForSave(index, profile),
|
|
1498
|
+
});
|
|
1499
|
+
}
|
|
1500
|
+
resolveDeviceNameForSave(_index, device) {
|
|
1501
|
+
const rawName = (device.name || device.newName || '').trim();
|
|
1502
|
+
if (device.deviceType?.includes('8851')) {
|
|
1503
|
+
const withoutSep = rawName.replace(/^SEP\s*/i, '').trim();
|
|
1504
|
+
return withoutSep ? `SEP ${withoutSep}` : '';
|
|
1505
|
+
}
|
|
1506
|
+
return rawName;
|
|
1507
|
+
}
|
|
1508
|
+
saveNewUser() {
|
|
1509
|
+
const user = this.buildSavableEndUser();
|
|
1510
|
+
const siteId = String(this.selectedSite ?? '');
|
|
1511
|
+
const templateId = String(this.selectedTemplateId ?? '');
|
|
1512
|
+
return this.userCreationApiService.saveTemplateUser(user, templateId, siteId);
|
|
1513
|
+
}
|
|
896
1514
|
}
|
|
897
1515
|
UserCreationWizardService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserCreationWizardService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
898
1516
|
UserCreationWizardService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserCreationWizardService });
|
|
@@ -900,23 +1518,433 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
900
1518
|
type: Injectable
|
|
901
1519
|
}], ctorParameters: function () { return []; } });
|
|
902
1520
|
|
|
1521
|
+
class AppLoaderComponent {
|
|
1522
|
+
constructor() {
|
|
1523
|
+
}
|
|
1524
|
+
}
|
|
1525
|
+
AppLoaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AppLoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1526
|
+
AppLoaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: AppLoaderComponent, selector: "app-loader", ngImport: i0, template: "<div class=\"overlay\">\r\n <mat-progress-spinner\r\n class=\"page-spinner\"\r\n mode=\"indeterminate\"\r\n [diameter]=\"70\"\r\n strokeWidth=\"3\"></mat-progress-spinner>\r\n</div>\r\n", styles: [".overlay{position:fixed;width:100%;height:100%;inset:0;background-color:#fff3;z-index:200;display:flex;justify-content:center;align-items:center}\n"], dependencies: [{ kind: "component", type: i1$1.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
1527
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AppLoaderComponent, decorators: [{
|
|
1528
|
+
type: Component,
|
|
1529
|
+
args: [{ selector: 'app-loader', encapsulation: ViewEncapsulation.None, template: "<div class=\"overlay\">\r\n <mat-progress-spinner\r\n class=\"page-spinner\"\r\n mode=\"indeterminate\"\r\n [diameter]=\"70\"\r\n strokeWidth=\"3\"></mat-progress-spinner>\r\n</div>\r\n", styles: [".overlay{position:fixed;width:100%;height:100%;inset:0;background-color:#fff3;z-index:200;display:flex;justify-content:center;align-items:center}\n"] }]
|
|
1530
|
+
}], ctorParameters: function () { return []; } });
|
|
1531
|
+
|
|
1532
|
+
const LDAP_PAGE_SIZE = 10;
|
|
903
1533
|
class UserDetailsStepComponent {
|
|
904
|
-
|
|
1534
|
+
get linesFormArray() {
|
|
1535
|
+
return this.userDetailsForm.get('lines');
|
|
1536
|
+
}
|
|
1537
|
+
get devicesFormArray() {
|
|
1538
|
+
return this.userDetailsForm.get('devices');
|
|
1539
|
+
}
|
|
1540
|
+
get deviceProfilesFormArray() {
|
|
1541
|
+
return this.userDetailsForm.get('deviceProfiles');
|
|
1542
|
+
}
|
|
1543
|
+
get selectedLdapUser() {
|
|
1544
|
+
return this.userCreationWizardService.selectedLdapUser;
|
|
1545
|
+
}
|
|
1546
|
+
get ldapTotalCount() {
|
|
1547
|
+
return this.userCreationWizardService.ldapUsersTotal;
|
|
1548
|
+
}
|
|
1549
|
+
get hasLdapUsers() {
|
|
1550
|
+
return this.userCreationWizardService.ldapUsers.length > 0;
|
|
1551
|
+
}
|
|
1552
|
+
constructor(fb, userCreationApiService, userCreationWizardService) {
|
|
1553
|
+
this.fb = fb;
|
|
1554
|
+
this.userCreationApiService = userCreationApiService;
|
|
905
1555
|
this.userCreationWizardService = userCreationWizardService;
|
|
1556
|
+
this.validityChange = new EventEmitter();
|
|
1557
|
+
this.userIdCheckPending = false;
|
|
1558
|
+
this.loadingAvailableNumbers = false;
|
|
1559
|
+
this.ldapLoading = false;
|
|
1560
|
+
this.ldapSearchAttempted = false;
|
|
1561
|
+
this.ldapPageSize = LDAP_PAGE_SIZE;
|
|
1562
|
+
this.ldapPageIndex = 0;
|
|
1563
|
+
this.ldapQueryTypeOptions = [
|
|
1564
|
+
{ label: 'User ID', value: 'userId' },
|
|
1565
|
+
{ label: 'First Name', value: 'firstName' },
|
|
1566
|
+
{ label: 'Last Name', value: 'lastName' },
|
|
1567
|
+
];
|
|
1568
|
+
this.filteredAvailableNumbersByLine = [];
|
|
1569
|
+
this.filteredRoutePartitionsByLine = [];
|
|
1570
|
+
this.destroy$ = new Subject();
|
|
1571
|
+
this.userIdAsyncValidator = this.createUserIdAsyncValidator();
|
|
1572
|
+
this.ldapSearchForm = this.fb.group({
|
|
1573
|
+
queryValue: [''],
|
|
1574
|
+
queryType: ['userId'],
|
|
1575
|
+
});
|
|
1576
|
+
this.userDetailsForm = this.fb.group({
|
|
1577
|
+
userId: ['', [Validators.required], [this.userIdAsyncValidator]],
|
|
1578
|
+
firstName: ['', Validators.required],
|
|
1579
|
+
lastName: ['', Validators.required],
|
|
1580
|
+
email: ['', [Validators.required, Validators.email]],
|
|
1581
|
+
lines: this.fb.array([]),
|
|
1582
|
+
devices: this.fb.array([]),
|
|
1583
|
+
deviceProfiles: this.fb.array([]),
|
|
1584
|
+
});
|
|
1585
|
+
}
|
|
1586
|
+
ngOnInit() {
|
|
1587
|
+
this.buildDynamicFormArrays();
|
|
1588
|
+
this.patchUserFieldsFromService();
|
|
1589
|
+
this.initLineFilters();
|
|
1590
|
+
this.setupFormSync();
|
|
1591
|
+
this.setupValidityEmitter();
|
|
1592
|
+
this.fetchInitialAvailableNumbers();
|
|
1593
|
+
this.userCreationWizardService.applyUserDetailsFormValue(this.userDetailsForm.getRawValue());
|
|
1594
|
+
if (this.userCreationWizardService.isLdapIntegrated && this.selectedLdapUser) {
|
|
1595
|
+
this.applyLdapIntegratedFormState();
|
|
1596
|
+
}
|
|
1597
|
+
this.emitValidity();
|
|
1598
|
+
}
|
|
1599
|
+
ngOnDestroy() {
|
|
1600
|
+
this.destroy$.next();
|
|
1601
|
+
this.destroy$.complete();
|
|
1602
|
+
}
|
|
1603
|
+
isStepValid() {
|
|
1604
|
+
return this.userDetailsForm.valid && !this.userIdCheckPending;
|
|
1605
|
+
}
|
|
1606
|
+
markAllAsTouched() {
|
|
1607
|
+
this.userDetailsForm.markAllAsTouched();
|
|
1608
|
+
this.emitValidity();
|
|
1609
|
+
}
|
|
1610
|
+
syncToService() {
|
|
1611
|
+
this.userCreationWizardService.applyUserDetailsFormValue(this.userDetailsForm.getRawValue());
|
|
1612
|
+
}
|
|
1613
|
+
getLineGroup(index) {
|
|
1614
|
+
return this.linesFormArray.at(index);
|
|
1615
|
+
}
|
|
1616
|
+
getDeviceGroup(index) {
|
|
1617
|
+
return this.devicesFormArray.at(index);
|
|
906
1618
|
}
|
|
907
|
-
|
|
908
|
-
this.
|
|
1619
|
+
getDeviceProfileGroup(index) {
|
|
1620
|
+
return this.deviceProfilesFormArray.at(index);
|
|
909
1621
|
}
|
|
910
|
-
|
|
911
|
-
return this.
|
|
1622
|
+
getFilteredNumbers(lineIndex) {
|
|
1623
|
+
return this.filteredAvailableNumbersByLine[lineIndex] ?? [];
|
|
1624
|
+
}
|
|
1625
|
+
getFilteredRoutePartitions(lineIndex) {
|
|
1626
|
+
return this.filteredRoutePartitionsByLine[lineIndex] ?? [];
|
|
1627
|
+
}
|
|
1628
|
+
filterAvailableNumbers(lineIndex, event) {
|
|
1629
|
+
const raw = event.target?.value || '';
|
|
1630
|
+
this.applyNumberFilter(lineIndex, raw);
|
|
1631
|
+
}
|
|
1632
|
+
filterRoutePartitions(lineIndex, event) {
|
|
1633
|
+
const raw = event.target?.value || '';
|
|
1634
|
+
this.applyRoutePartitionFilter(lineIndex, raw);
|
|
1635
|
+
}
|
|
1636
|
+
onRoutePartitionSelected(lineIndex, routePartition) {
|
|
1637
|
+
const lineGroup = this.linesFormArray.at(lineIndex);
|
|
1638
|
+
lineGroup.get('routePartition')?.setValue(routePartition, { emitEvent: false });
|
|
1639
|
+
lineGroup.get('number')?.setValue('');
|
|
1640
|
+
this.applyRoutePartitionFilter(lineIndex, routePartition);
|
|
1641
|
+
this.loadAvailableNumbersForLine(lineIndex, routePartition);
|
|
1642
|
+
}
|
|
1643
|
+
onNumberSelected(lineIndex, number) {
|
|
1644
|
+
const lineGroup = this.linesFormArray.at(lineIndex);
|
|
1645
|
+
const displayNumber = this.extractDirectoryNumber(number);
|
|
1646
|
+
lineGroup.get('number')?.setValue(displayNumber, { emitEvent: true });
|
|
1647
|
+
}
|
|
1648
|
+
searchLdapUsers(pageIndex = 0) {
|
|
1649
|
+
const queryValue = String(this.ldapSearchForm.get('queryValue')?.value).trim() || undefined;
|
|
1650
|
+
const siteId = this.userCreationWizardService.selectedSite;
|
|
1651
|
+
if (!siteId) {
|
|
1652
|
+
this.userCreationWizardService.setLdapUsersResult([], 0);
|
|
1653
|
+
this.ldapPageIndex = 0;
|
|
1654
|
+
this.ldapSearchAttempted = false;
|
|
1655
|
+
return;
|
|
1656
|
+
}
|
|
1657
|
+
this.ldapPageIndex = pageIndex;
|
|
1658
|
+
const queryType = this.ldapSearchForm.get('queryType')?.value;
|
|
1659
|
+
const params = {
|
|
1660
|
+
size: String(LDAP_PAGE_SIZE),
|
|
1661
|
+
page: String(pageIndex),
|
|
1662
|
+
deviceless: 'true',
|
|
1663
|
+
querytype: queryType,
|
|
1664
|
+
withEmailOnly: 'true',
|
|
1665
|
+
queryvalue: queryValue,
|
|
1666
|
+
};
|
|
1667
|
+
this.ldapLoading = true;
|
|
1668
|
+
this.userCreationApiService
|
|
1669
|
+
.getLdapUsers(String(siteId), params)
|
|
1670
|
+
.pipe(take(1), map((res) => ({
|
|
1671
|
+
users: res?.pageData ?? [],
|
|
1672
|
+
total: res?.total ?? 0,
|
|
1673
|
+
})), catchError(() => of({ users: [], total: 0 })), finalize(() => {
|
|
1674
|
+
this.ldapLoading = false;
|
|
1675
|
+
}))
|
|
1676
|
+
.subscribe(({ users, total }) => {
|
|
1677
|
+
this.ldapSearchAttempted = true;
|
|
1678
|
+
this.userCreationWizardService.setLdapUsersResult(users, total);
|
|
1679
|
+
});
|
|
1680
|
+
}
|
|
1681
|
+
onLdapPageChange(event) {
|
|
1682
|
+
this.searchLdapUsers(event.pageIndex);
|
|
1683
|
+
}
|
|
1684
|
+
onAddLdapUser(row) {
|
|
1685
|
+
this.userCreationWizardService.selectLdapUser(row);
|
|
1686
|
+
this.userDetailsForm.patchValue({
|
|
1687
|
+
userId: row.userid,
|
|
1688
|
+
firstName: row.firstName ?? '',
|
|
1689
|
+
lastName: row.lastName ?? '',
|
|
1690
|
+
email: row.email ?? '',
|
|
1691
|
+
});
|
|
1692
|
+
this.applyLdapIntegratedFormState();
|
|
1693
|
+
this.emitValidity();
|
|
1694
|
+
}
|
|
1695
|
+
onDeleteLdapUser(row) {
|
|
1696
|
+
if (!this.userCreationWizardService.isLdapUserRowSelected(row)) {
|
|
1697
|
+
return;
|
|
1698
|
+
}
|
|
1699
|
+
this.clearLdapSelection();
|
|
1700
|
+
}
|
|
1701
|
+
onRemoveLdapTag() {
|
|
1702
|
+
this.clearLdapSelection();
|
|
1703
|
+
}
|
|
1704
|
+
isLdapUserRowSelected(row) {
|
|
1705
|
+
return this.userCreationWizardService.isLdapUserRowSelected(row);
|
|
1706
|
+
}
|
|
1707
|
+
clearLdapSelection() {
|
|
1708
|
+
this.userCreationWizardService.clearLdapUserSelection();
|
|
1709
|
+
this.userDetailsForm.patchValue({
|
|
1710
|
+
userId: '',
|
|
1711
|
+
firstName: '',
|
|
1712
|
+
lastName: '',
|
|
1713
|
+
email: '',
|
|
1714
|
+
});
|
|
1715
|
+
this.restoreManualEntryFormState();
|
|
1716
|
+
this.emitValidity();
|
|
1717
|
+
}
|
|
1718
|
+
applyLdapIntegratedFormState() {
|
|
1719
|
+
this.setUserIdentityFieldsReadonly(true);
|
|
1720
|
+
this.toggleUserIdAsyncValidator(false);
|
|
1721
|
+
this.userDetailsForm.get('userId')?.updateValueAndValidity({ emitEvent: false });
|
|
1722
|
+
}
|
|
1723
|
+
restoreManualEntryFormState() {
|
|
1724
|
+
this.setUserIdentityFieldsReadonly(false);
|
|
1725
|
+
this.toggleUserIdAsyncValidator(true);
|
|
1726
|
+
this.userDetailsForm.get('userId')?.updateValueAndValidity();
|
|
1727
|
+
}
|
|
1728
|
+
setUserIdentityFieldsReadonly(readonly) {
|
|
1729
|
+
['userId', 'firstName', 'lastName', 'email'].forEach(fieldName => {
|
|
1730
|
+
const control = this.userDetailsForm.get(fieldName);
|
|
1731
|
+
if (!control) {
|
|
1732
|
+
return;
|
|
1733
|
+
}
|
|
1734
|
+
if (readonly) {
|
|
1735
|
+
control.disable({ emitEvent: false });
|
|
1736
|
+
}
|
|
1737
|
+
else {
|
|
1738
|
+
control.enable({ emitEvent: false });
|
|
1739
|
+
}
|
|
1740
|
+
});
|
|
1741
|
+
}
|
|
1742
|
+
toggleUserIdAsyncValidator(enabled) {
|
|
1743
|
+
const control = this.userDetailsForm.get('userId');
|
|
1744
|
+
if (!control) {
|
|
1745
|
+
return;
|
|
1746
|
+
}
|
|
1747
|
+
if (enabled) {
|
|
1748
|
+
control.setAsyncValidators([this.userIdAsyncValidator]);
|
|
1749
|
+
}
|
|
1750
|
+
else {
|
|
1751
|
+
control.clearAsyncValidators();
|
|
1752
|
+
}
|
|
1753
|
+
control.updateValueAndValidity({ emitEvent: false });
|
|
1754
|
+
}
|
|
1755
|
+
setupValidityEmitter() {
|
|
1756
|
+
this.userDetailsForm.statusChanges
|
|
1757
|
+
.pipe(startWith(this.userDetailsForm.status), takeUntil(this.destroy$))
|
|
1758
|
+
.subscribe(() => this.emitValidity());
|
|
1759
|
+
}
|
|
1760
|
+
emitValidity() {
|
|
1761
|
+
this.validityChange.emit(this.isStepValid());
|
|
1762
|
+
}
|
|
1763
|
+
buildDynamicFormArrays() {
|
|
1764
|
+
const service = this.userCreationWizardService;
|
|
1765
|
+
const linesArray = this.linesFormArray;
|
|
1766
|
+
const devicesArray = this.devicesFormArray;
|
|
1767
|
+
const profilesArray = this.deviceProfilesFormArray;
|
|
1768
|
+
while (linesArray.length) {
|
|
1769
|
+
linesArray.removeAt(0);
|
|
1770
|
+
}
|
|
1771
|
+
while (devicesArray.length) {
|
|
1772
|
+
devicesArray.removeAt(0);
|
|
1773
|
+
}
|
|
1774
|
+
while (profilesArray.length) {
|
|
1775
|
+
profilesArray.removeAt(0);
|
|
1776
|
+
}
|
|
1777
|
+
service.lines.forEach((line, index) => {
|
|
1778
|
+
const lineGroup = this.fb.group({
|
|
1779
|
+
lineNumber: [
|
|
1780
|
+
{
|
|
1781
|
+
value: line.directoryNumber?.templateDirectoryNumber || '',
|
|
1782
|
+
disabled: true,
|
|
1783
|
+
},
|
|
1784
|
+
],
|
|
1785
|
+
number: [line.directoryNumber?.directoryNumber || '', Validators.required],
|
|
1786
|
+
routePartition: [
|
|
1787
|
+
line.directoryNumber?.routePartitionName || '',
|
|
1788
|
+
Validators.required,
|
|
1789
|
+
],
|
|
1790
|
+
});
|
|
1791
|
+
linesArray.push(lineGroup);
|
|
1792
|
+
this.setupLineListeners(index, lineGroup);
|
|
1793
|
+
});
|
|
1794
|
+
service.devices.forEach(device => {
|
|
1795
|
+
devicesArray.push(this.fb.group({
|
|
1796
|
+
deviceType: [{ value: device.deviceType || '', disabled: true }],
|
|
1797
|
+
protocol: [{ value: device.protocol || '', disabled: true }],
|
|
1798
|
+
buttonTemplate: [{ value: device.buttonTemplate || '', disabled: true }],
|
|
1799
|
+
name: ['', [Validators.required, Validation.macAddress()]],
|
|
1800
|
+
}));
|
|
1801
|
+
});
|
|
1802
|
+
service.deviceProfiles.forEach(profile => {
|
|
1803
|
+
profilesArray.push(this.fb.group({
|
|
1804
|
+
deviceType: [{ value: profile.deviceType || '', disabled: true }],
|
|
1805
|
+
protocol: [{ value: profile.protocol || '', disabled: true }],
|
|
1806
|
+
buttonTemplate: [{ value: profile.buttonTemplate || '', disabled: true }],
|
|
1807
|
+
name: ['', [Validation.macAddress()]],
|
|
1808
|
+
}));
|
|
1809
|
+
});
|
|
1810
|
+
}
|
|
1811
|
+
patchUserFieldsFromService() {
|
|
1812
|
+
const endUser = this.userCreationWizardService.endUser;
|
|
1813
|
+
this.userDetailsForm.patchValue({
|
|
1814
|
+
userId: endUser?.userid || this.userCreationWizardService.userDetailsForm.userId || '',
|
|
1815
|
+
firstName: endUser?.firstName || this.userCreationWizardService.userDetailsForm.firstName || '',
|
|
1816
|
+
lastName: endUser?.lastName || this.userCreationWizardService.userDetailsForm.lastName || '',
|
|
1817
|
+
email: endUser?.email || this.userCreationWizardService.userDetailsForm.email || '',
|
|
1818
|
+
});
|
|
1819
|
+
}
|
|
1820
|
+
setupLineListeners(lineIndex, lineGroup) {
|
|
1821
|
+
lineGroup
|
|
1822
|
+
.get('routePartition')
|
|
1823
|
+
?.valueChanges.pipe(debounceTime(300), takeUntil(this.destroy$))
|
|
1824
|
+
.subscribe(value => {
|
|
1825
|
+
this.applyRoutePartitionFilter(lineIndex, String(value ?? ''));
|
|
1826
|
+
});
|
|
1827
|
+
lineGroup
|
|
1828
|
+
.get('number')
|
|
1829
|
+
?.valueChanges.pipe(debounceTime(150), takeUntil(this.destroy$))
|
|
1830
|
+
.subscribe(value => {
|
|
1831
|
+
this.applyNumberFilter(lineIndex, String(value ?? ''));
|
|
1832
|
+
});
|
|
1833
|
+
}
|
|
1834
|
+
initLineFilters() {
|
|
1835
|
+
const partitions = this.userCreationWizardService.routePartitionOptions;
|
|
1836
|
+
const numbers = this.userCreationWizardService.availableNumbers;
|
|
1837
|
+
this.filteredRoutePartitionsByLine = this.linesFormArray.controls.map((_, index) => {
|
|
1838
|
+
const current = String(this.linesFormArray.at(index).get('routePartition')?.value ?? '');
|
|
1839
|
+
return this.filterOptions(partitions, current);
|
|
1840
|
+
});
|
|
1841
|
+
this.filteredAvailableNumbersByLine = this.linesFormArray.controls.map((_, index) => {
|
|
1842
|
+
const current = String(this.linesFormArray.at(index).get('number')?.value ?? '');
|
|
1843
|
+
return this.filterOptions(numbers, current);
|
|
1844
|
+
});
|
|
1845
|
+
}
|
|
1846
|
+
setupFormSync() {
|
|
1847
|
+
this.userDetailsForm.valueChanges
|
|
1848
|
+
.pipe(debounceTime(200), takeUntil(this.destroy$))
|
|
1849
|
+
.subscribe(() => {
|
|
1850
|
+
this.userCreationWizardService.applyUserDetailsFormValue(this.userDetailsForm.getRawValue());
|
|
1851
|
+
});
|
|
1852
|
+
}
|
|
1853
|
+
fetchInitialAvailableNumbers() {
|
|
1854
|
+
const firstPartition = this.linesFormArray.length > 0
|
|
1855
|
+
? String(this.linesFormArray.at(0).get('routePartition')?.value ?? '').trim()
|
|
1856
|
+
: this.userCreationWizardService.firstLineRoutePartition ||
|
|
1857
|
+
this.userCreationWizardService.siteDefaultRoutePartition ||
|
|
1858
|
+
'';
|
|
1859
|
+
if (firstPartition) {
|
|
1860
|
+
this.loadAvailableNumbersForLine(0, firstPartition, false);
|
|
1861
|
+
}
|
|
1862
|
+
}
|
|
1863
|
+
loadAvailableNumbersForLine(lineIndex, routePartition, clearNumber = true) {
|
|
1864
|
+
const siteId = this.userCreationWizardService.selectedSite;
|
|
1865
|
+
if (!siteId || !routePartition.trim()) {
|
|
1866
|
+
return;
|
|
1867
|
+
}
|
|
1868
|
+
if (clearNumber) {
|
|
1869
|
+
this.linesFormArray.at(lineIndex).get('number')?.setValue('');
|
|
1870
|
+
}
|
|
1871
|
+
this.loadingAvailableNumbers = true;
|
|
1872
|
+
this.userCreationWizardService
|
|
1873
|
+
.getNumberRange(String(siteId), routePartition)
|
|
1874
|
+
.pipe(take(1), catchError(() => of(null)), finalize(() => {
|
|
1875
|
+
this.loadingAvailableNumbers = false;
|
|
1876
|
+
this.refreshNumberFilters();
|
|
1877
|
+
}))
|
|
1878
|
+
.subscribe();
|
|
1879
|
+
}
|
|
1880
|
+
refreshNumberFilters() {
|
|
1881
|
+
const numbers = this.userCreationWizardService.availableNumbers;
|
|
1882
|
+
this.filteredAvailableNumbersByLine = this.linesFormArray.controls.map((_, index) => {
|
|
1883
|
+
const current = String(this.linesFormArray.at(index).get('number')?.value ?? '');
|
|
1884
|
+
return this.filterOptions(numbers, current);
|
|
1885
|
+
});
|
|
1886
|
+
}
|
|
1887
|
+
applyNumberFilter(lineIndex, raw) {
|
|
1888
|
+
const value = raw.trim().toLowerCase();
|
|
1889
|
+
const source = this.userCreationWizardService.availableNumbers || [];
|
|
1890
|
+
this.filteredAvailableNumbersByLine[lineIndex] = value.length
|
|
1891
|
+
? source.filter(n => !!n && n.toLowerCase().includes(value))
|
|
1892
|
+
: [...source];
|
|
1893
|
+
}
|
|
1894
|
+
applyRoutePartitionFilter(lineIndex, raw) {
|
|
1895
|
+
const value = raw.trim().toLowerCase();
|
|
1896
|
+
const source = this.userCreationWizardService.routePartitionOptions || [];
|
|
1897
|
+
this.filteredRoutePartitionsByLine[lineIndex] = value.length
|
|
1898
|
+
? source.filter(n => !!n && n.toLowerCase().includes(value))
|
|
1899
|
+
: [...source];
|
|
1900
|
+
}
|
|
1901
|
+
filterOptions(source, raw) {
|
|
1902
|
+
const value = raw.trim().toLowerCase();
|
|
1903
|
+
if (!value.length) {
|
|
1904
|
+
return [...source];
|
|
1905
|
+
}
|
|
1906
|
+
return source.filter(item => !!item && item.toLowerCase().includes(value));
|
|
1907
|
+
}
|
|
1908
|
+
extractDirectoryNumber(value) {
|
|
1909
|
+
const trimmed = value.trim();
|
|
1910
|
+
const spaceIndex = trimmed.indexOf(' ');
|
|
1911
|
+
return spaceIndex > -1 ? trimmed.substring(0, spaceIndex) : trimmed;
|
|
1912
|
+
}
|
|
1913
|
+
createUserIdAsyncValidator() {
|
|
1914
|
+
return (control) => {
|
|
1915
|
+
if (this.userCreationWizardService.isLdapIntegrated) {
|
|
1916
|
+
this.userIdCheckPending = false;
|
|
1917
|
+
return of(null);
|
|
1918
|
+
}
|
|
1919
|
+
const userId = String(control.value ?? '').trim();
|
|
1920
|
+
const siteId = this.userCreationWizardService.selectedSite;
|
|
1921
|
+
if (!userId || !siteId) {
|
|
1922
|
+
this.userIdCheckPending = false;
|
|
1923
|
+
this.emitValidity();
|
|
1924
|
+
return of(null);
|
|
1925
|
+
}
|
|
1926
|
+
this.userIdCheckPending = true;
|
|
1927
|
+
this.emitValidity();
|
|
1928
|
+
return timer(500).pipe(switchMap(() => this.userCreationApiService
|
|
1929
|
+
.checkUserIdExisting(String(siteId), encodeURIComponent(encodeURIComponent(userId)))
|
|
1930
|
+
.pipe(map(() => ({ userIdExists: true })), catchError(() => of(null)))), tap(() => {
|
|
1931
|
+
this.userIdCheckPending = false;
|
|
1932
|
+
this.emitValidity();
|
|
1933
|
+
}), finalize(() => {
|
|
1934
|
+
this.userIdCheckPending = false;
|
|
1935
|
+
this.emitValidity();
|
|
1936
|
+
}));
|
|
1937
|
+
};
|
|
912
1938
|
}
|
|
913
1939
|
}
|
|
914
|
-
UserDetailsStepComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserDetailsStepComponent, deps: [{ token: UserCreationWizardService }], target: i0.ɵɵFactoryTarget.Component });
|
|
915
|
-
UserDetailsStepComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: UserDetailsStepComponent, selector: "tk-user-details-step", ngImport: i0, template: "<section class=\"details-step-content\">\r\n <div class=\"details-step-sections\">\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">User details</h3>\r\n <div class=\"details-step-section__content\">\r\n <div class=\"details-step-section__part\">\r\n <div class=\"details-inline-fields\">\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">User ID</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input\r\n matInput\r\n placeholder=\"User ID\"\r\n [value]=\"userCreationWizardService.userDetailsForm.userId\"\r\n (input)=\"\r\n userCreationWizardService.setUserDetailsField(\r\n 'userId',\r\n $any($event.target).value\r\n )\r\n \"\r\n />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">First Name</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input\r\n matInput\r\n placeholder=\"First Name\"\r\n [value]=\"userCreationWizardService.userDetailsForm.firstName\"\r\n (input)=\"\r\n userCreationWizardService.setUserDetailsField(\r\n 'firstName',\r\n $any($event.target).value\r\n )\r\n \"\r\n />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Last Name</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input\r\n matInput\r\n placeholder=\"Last Name\"\r\n [value]=\"userCreationWizardService.userDetailsForm.lastName\"\r\n (input)=\"\r\n userCreationWizardService.setUserDetailsField(\r\n 'lastName',\r\n $any($event.target).value\r\n )\r\n \"\r\n />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Email</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input\r\n matInput\r\n placeholder=\"Email\"\r\n [value]=\"userCreationWizardService.userDetailsForm.email\"\r\n (input)=\"\r\n userCreationWizardService.setUserDetailsField(\r\n 'email',\r\n $any($event.target).value\r\n )\r\n \"\r\n />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">User Template</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input\r\n matInput\r\n placeholder=\"User Template\"\r\n [value]=\"userCreationWizardService.selectedTemplate || ''\"\r\n [disabled]=\"true\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"details-step-section__part\">\r\n <mat-accordion class=\"details-user-accordion\">\r\n <mat-expansion-panel togglePosition=\"before\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title\r\n >Choose an existing or a LDAP user</mat-panel-title\r\n >\r\n </mat-expansion-panel-header>\r\n <div class=\"details-user-accordion__content\">\r\n <table\r\n mat-table\r\n [dataSource]=\"userCreationWizardService.ldapUsers\"\r\n class=\"details-ldap-table\"\r\n >\r\n <ng-container matColumnDef=\"userId\">\r\n <th mat-header-cell *matHeaderCellDef>User ID</th>\r\n <td mat-cell *matCellDef=\"let row\">{{ row.userId }}</td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"firstName\">\r\n <th mat-header-cell *matHeaderCellDef>First Name</th>\r\n <td mat-cell *matCellDef=\"let row\">{{ row.firstName }}</td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"lastName\">\r\n <th mat-header-cell *matHeaderCellDef>Last Name</th>\r\n <td mat-cell *matCellDef=\"let row\">{{ row.lastName }}</td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"email\">\r\n <th mat-header-cell *matHeaderCellDef>Email</th>\r\n <td mat-cell *matCellDef=\"let row\">{{ row.email }}</td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"add\">\r\n <th mat-header-cell *matHeaderCellDef>Add</th>\r\n <td mat-cell *matCellDef=\"let row\">\r\n <button\r\n mat-button\r\n class=\"details-ldap-table__add-btn\"\r\n type=\"button\"\r\n [disabled]=\"\r\n userCreationWizardService.isLdapUserAdded(row)\r\n \"\r\n (click)=\"onAddUser(row)\"\r\n >\r\n Add user\r\n </button>\r\n </td>\r\n </ng-container>\r\n\r\n <tr\r\n mat-header-row\r\n *matHeaderRowDef=\"\r\n userCreationWizardService.ldapTableColumns\r\n \"\r\n ></tr>\r\n <tr\r\n mat-row\r\n *matRowDef=\"\r\n let row;\r\n columns: userCreationWizardService.ldapTableColumns\r\n \"\r\n [class.details-ldap-table__row--disabled]=\"\r\n userCreationWizardService.isLdapUserAdded(row)\r\n \"\r\n ></tr>\r\n </table>\r\n </div>\r\n </mat-expansion-panel>\r\n </mat-accordion>\r\n </div>\r\n </div>\r\n </section>\r\n\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">Lines</h3>\r\n <div class=\"details-step-section__content\">\r\n <div class=\"line-route-list\">\r\n <div\r\n class=\"line-route-row\"\r\n *ngFor=\"\r\n let lineSelection of userCreationWizardService.lineSelections;\r\n let idx = index\r\n \"\r\n >\r\n <div class=\"line-route-field\">\r\n <mat-form-field\r\n class=\"details-step-select line-route-select\"\r\n appearance=\"outline\"\r\n >\r\n <mat-select\r\n placeholder=\"Select line\"\r\n [value]=\"lineSelection.lineNumber\"\r\n (selectionChange)=\"\r\n userCreationWizardService.setLineSelection(\r\n idx,\r\n $event.value\r\n )\r\n \"\r\n >\r\n <mat-option\r\n *ngFor=\"let line of userCreationWizardService.lineOptions\"\r\n [value]=\"line.number\"\r\n >\r\n {{ line.number }} - {{ line.did }}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"line-route-field\">\r\n <mat-form-field\r\n class=\"details-step-select line-route-select\"\r\n appearance=\"outline\"\r\n >\r\n <mat-select\r\n placeholder=\"Select route partition\"\r\n [value]=\"lineSelection.routePartitionName\"\r\n (selectionChange)=\"\r\n userCreationWizardService.setRoutePartitionSelection(\r\n idx,\r\n $event.value\r\n )\r\n \"\r\n >\r\n <mat-option\r\n *ngFor=\"\r\n let partition of userCreationWizardService.routePartitionOptions\r\n \"\r\n [value]=\"partition\"\r\n >\r\n {{ partition }}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">Devices</h3>\r\n <div class=\"details-step-section__content\">\r\n <div class=\"devices-rows\">\r\n <div\r\n class=\"details-inline-fields details-inline-fields--four\"\r\n *ngFor=\"\r\n let _row of userCreationWizardService.deviceRows;\r\n let idx = index\r\n \"\r\n >\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Device type</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input\r\n matInput\r\n placeholder=\"Device type\"\r\n [value]=\"\r\n userCreationWizardService.deviceEntries[idx].deviceType ||\r\n ''\r\n \"\r\n [disabled]=\"true\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Protocol</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input\r\n matInput\r\n placeholder=\"Protocol\"\r\n [value]=\"\r\n userCreationWizardService.deviceEntries[idx].protocol || ''\r\n \"\r\n [disabled]=\"true\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Button Template</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input\r\n matInput\r\n placeholder=\"Button Template\"\r\n [value]=\"\r\n userCreationWizardService.deviceEntries[idx]\r\n .buttonTemplate || ''\r\n \"\r\n [disabled]=\"true\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Name</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input\r\n matInput\r\n placeholder=\"Name\"\r\n [value]=\"getDeviceName(idx)\"\r\n (input)=\"\r\n userCreationWizardService.setDeviceName(\r\n idx,\r\n $any($event.target).value\r\n )\r\n \"\r\n />\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n </div>\r\n</section>\r\n", styles: [".details-step-content{display:flex;flex-direction:column;gap:0}.details-step-dropdowns{display:flex;flex-direction:column;gap:1rem}.details-step-field{display:flex;flex-direction:column;gap:8px}.details-step-label{font-size:16px;font-weight:400;line-height:100%;letter-spacing:0;color:#333}.details-step-select{width:333px}.details-step-divider{border-top:1px solid #d9d9d9;margin-top:24px}.details-step-sections{display:flex;flex-direction:column}.details-step-section{display:flex;flex-direction:column;gap:0;padding:24px 0}.details-step-sections>.details-step-section:first-child{padding-top:0}.details-step-section+.details-step-section{border-top:1px solid #d9d9d9}.details-step-section__title{margin:0;font-family:Inter,sans-serif;font-size:16px;font-weight:600;line-height:100%;letter-spacing:0;color:#333}.details-step-section__content{margin-top:24px}.details-step-section__part+.details-step-section__part{margin-top:24px}.details-user-accordion{width:100%}.details-user-accordion__content{padding:12px 0 0}.details-ldap-table{width:100%}.details-ldap-table__row--disabled{opacity:.35}.details-ldap-table__add-btn{min-width:0;padding:0;font-family:Inter,sans-serif;font-size:14px;font-weight:500;line-height:20px;letter-spacing:0;color:#0d56aa}:host ::ng-deep .details-ldap-table .mat-header-cell{font-family:Inter,sans-serif;font-size:12px;font-weight:500;line-height:16px;letter-spacing:0;color:#737480;height:30px;padding:7px 8px}:host ::ng-deep .details-ldap-table .mat-cell{font-family:Inter,sans-serif;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0;color:#333;height:40px;padding:8px}.details-inline-fields{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:16px}.details-inline-fields--four{grid-template-columns:repeat(4,minmax(0,1fr))}.devices-rows{display:flex;flex-direction:column;gap:24px}.details-inline-field{display:flex;flex-direction:column;gap:4px}.details-inline-field__label{color:#c0c2ce;font-size:12px;font-weight:400;line-height:16px;letter-spacing:0}.details-step-input{width:100%}.line-route-list{display:flex;flex-direction:column;gap:16px}.line-route-row{display:flex;gap:16px}.line-route-field{display:flex;flex-direction:column;gap:0}.line-route-field:nth-of-type(1) .line-route-select{width:230px}.line-route-field .line-route-select{width:185px}:host ::ng-deep .details-step-select .mat-form-field-wrapper{padding-bottom:0}:host ::ng-deep .details-step-input .mat-form-field-wrapper{padding-bottom:0}:host ::ng-deep .details-step-select .mat-form-field-flex{align-items:center;height:32px;border:1px solid #767676;border-radius:6px;padding:0 12px}:host ::ng-deep .details-step-input .mat-form-field-flex{align-items:center;height:36px;border:1px solid #767676;border-radius:4px;padding:10px 8px}:host ::ng-deep .details-step-select .mat-form-field-outline,:host ::ng-deep .details-step-select .mat-form-field-outline-start,:host ::ng-deep .details-step-select .mat-form-field-outline-end,:host ::ng-deep .details-step-select .mat-form-field-outline-gap{display:none}:host ::ng-deep .details-step-input .mat-form-field-outline,:host ::ng-deep .details-step-input .mat-form-field-outline-start,:host ::ng-deep .details-step-input .mat-form-field-outline-end,:host ::ng-deep .details-step-input .mat-form-field-outline-gap{display:none}:host ::ng-deep .details-step-select .mat-form-field-infix{width:100%;border-top:0;padding:0}:host ::ng-deep .details-step-input .mat-form-field-infix{width:100%;border-top:0;padding:0}:host ::ng-deep .details-step-select .mat-select-trigger{display:flex;align-items:center;justify-content:space-between;height:100%}:host ::ng-deep .details-step-input .mat-input-element{height:100%;margin:0}:host ::ng-deep .details-step-input.mat-form-field-disabled .mat-form-field-flex{background-color:#f5f6fa;border-color:#b8beca;opacity:.55;cursor:not-allowed}:host ::ng-deep .details-step-input .mat-input-element:disabled{color:#7f8694;-webkit-text-fill-color:#7f8694;cursor:not-allowed}:host ::ng-deep .details-user-accordion .mat-expansion-panel{border:0;border-radius:0!important;background:transparent;box-shadow:none!important}:host ::ng-deep .details-user-accordion .mat-expansion-panel-header{padding:0 0 0 8px;min-height:32px;height:32px}:host ::ng-deep .details-user-accordion .mat-expansion-panel-header-title{margin:0;display:flex;align-items:center;font-family:Inter,sans-serif;font-size:14px;font-weight:500;line-height:20px;letter-spacing:0;color:#333}:host ::ng-deep .details-user-accordion .mat-expansion-panel-body{padding:0!important}:host ::ng-deep .details-user-accordion .mat-expansion-panel-header .mat-content{display:flex;align-items:center}:host ::ng-deep .details-user-accordion .mat-expansion-panel-header .mat-expansion-indicator{display:block!important;opacity:1!important;color:#333!important;align-self:center;margin:0 8px 0 0!important}:host ::ng-deep .details-user-accordion .mat-expansion-panel-header .mat-expansion-indicator:after{color:#333!important;border-color:#333!important;position:relative;top:-4px}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i3$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i3$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i3$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i3$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i3$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i3$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i3$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i3$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i3$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i3$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i5$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i7.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i8.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i9.MatAccordion, selector: "mat-accordion", inputs: ["multi", "hideToggle", "displayMode", "togglePosition"], exportAs: ["matAccordion"] }, { kind: "component", type: i9.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["disabled", "expanded", "hideToggle", "togglePosition"], outputs: ["opened", "closed", "expandedChange", "afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i9.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["tabIndex", "expandedHeight", "collapsedHeight"] }, { kind: "directive", type: i9.MatExpansionPanelTitle, selector: "mat-panel-title" }] });
|
|
1940
|
+
UserDetailsStepComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserDetailsStepComponent, deps: [{ token: i1$2.FormBuilder }, { token: UserCreationApiService }, { token: UserCreationWizardService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1941
|
+
UserDetailsStepComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: UserDetailsStepComponent, selector: "tk-user-details-step", outputs: { validityChange: "validityChange" }, ngImport: i0, template: "<app-loader *ngIf=\"loadingAvailableNumbers\"></app-loader>\r\n<section class=\"details-step-content\">\r\n <form [formGroup]=\"userDetailsForm\">\r\n <div class=\"details-step-sections\">\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">User details</h3>\r\n <div class=\"details-step-section__content\">\r\n <div class=\"details-step-section__part\">\r\n <div class=\"details-inline-fields\">\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">User ID</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input matInput placeholder=\"User ID\" formControlName=\"userId\" />\r\n <mat-error *ngIf=\"userDetailsForm.get('userId')?.hasError('required') && userDetailsForm.get('userId')?.touched\">\r\n User ID is required\r\n </mat-error>\r\n <mat-error *ngIf=\"userDetailsForm.get('userId')?.hasError('userIdExists') && userDetailsForm.get('userId')?.touched\">\r\n User ID already exists\r\n </mat-error>\r\n <mat-hint *ngIf=\"userIdCheckPending\">Checking user ID...</mat-hint>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">First Name</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input matInput placeholder=\"First Name\" formControlName=\"firstName\" />\r\n <mat-error *ngIf=\"userDetailsForm.get('firstName')?.hasError('required') && userDetailsForm.get('firstName')?.touched\">\r\n First name is required\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Last Name</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input matInput placeholder=\"Last Name\" formControlName=\"lastName\" />\r\n <mat-error *ngIf=\"userDetailsForm.get('lastName')?.hasError('required') && userDetailsForm.get('lastName')?.touched\">\r\n Last name is required\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Email</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input matInput placeholder=\"Email\" formControlName=\"email\" />\r\n <mat-error *ngIf=\"userDetailsForm.get('email')?.invalid && userDetailsForm.get('email')?.touched\">\r\n <span *ngIf=\"userDetailsForm.get('email')?.hasError('required')\">Email is required</span>\r\n <span *ngIf=\"userDetailsForm.get('email')?.hasError('email')\">Please enter a valid email</span>\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">User Template</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input\r\n matInput\r\n placeholder=\"User Template\"\r\n [value]=\"userCreationWizardService.selectedTemplateName || ''\"\r\n [disabled]=\"true\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"details-step-section__part\">\r\n <mat-accordion class=\"details-user-accordion\">\r\n <mat-expansion-panel togglePosition=\"before\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>Choose an existing or a LDAP user</mat-panel-title>\r\n </mat-expansion-panel-header>\r\n <div class=\"details-user-accordion__content\">\r\n <div class=\"details-ldap-search\" [formGroup]=\"ldapSearchForm\">\r\n <mat-form-field\r\n class=\"details-ldap-search__input\"\r\n appearance=\"outline\"\r\n floatLabel=\"never\"\r\n >\r\n <input\r\n matInput\r\n placeholder=\"Search\"\r\n formControlName=\"queryValue\"\r\n (keyup.enter)=\"searchLdapUsers()\"\r\n />\r\n </mat-form-field>\r\n\r\n <mat-form-field\r\n class=\"details-ldap-search__select\"\r\n appearance=\"outline\"\r\n floatLabel=\"never\"\r\n >\r\n <mat-select formControlName=\"queryType\">\r\n <mat-option *ngFor=\"let option of ldapQueryTypeOptions\" [value]=\"option.value\">\r\n {{ option.label }}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n\r\n <mat-chip-list *ngIf=\"selectedLdapUser\" class=\"details-ldap-search__chip\">\r\n <mat-chip removable (removed)=\"onRemoveLdapTag()\">\r\n {{ selectedLdapUser.userid }}\r\n <mat-icon matChipRemove>cancel</mat-icon>\r\n </mat-chip>\r\n </mat-chip-list>\r\n\r\n <button\r\n mat-button\r\n class=\"details-ldap-search__btn\"\r\n type=\"button\"\r\n [disabled]=\"ldapLoading\"\r\n (click)=\"searchLdapUsers()\"\r\n >\r\n Search\r\n </button>\r\n </div>\r\n\r\n <app-loader *ngIf=\"ldapLoading\"></app-loader>\r\n\r\n <p\r\n *ngIf=\"!ldapLoading && ldapSearchAttempted && !hasLdapUsers\"\r\n class=\"details-ldap-table__empty\"\r\n >\r\n No users found\r\n </p>\r\n\r\n <table\r\n *ngIf=\"!ldapLoading && hasLdapUsers\"\r\n mat-table\r\n [dataSource]=\"userCreationWizardService.ldapUsers\"\r\n class=\"details-ldap-table\"\r\n >\r\n <ng-container matColumnDef=\"userId\">\r\n <th mat-header-cell *matHeaderCellDef>User Id</th>\r\n <td mat-cell *matCellDef=\"let row\">{{ row.userid }}</td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"firstName\">\r\n <th mat-header-cell *matHeaderCellDef>First Name</th>\r\n <td mat-cell *matCellDef=\"let row\">{{ row.firstName }}</td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"lastName\">\r\n <th mat-header-cell *matHeaderCellDef>Last Name</th>\r\n <td mat-cell *matCellDef=\"let row\">{{ row.lastName }}</td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"email\">\r\n <th mat-header-cell *matHeaderCellDef>Email</th>\r\n <td mat-cell *matCellDef=\"let row\">{{ row.email }}</td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"add\">\r\n <th mat-header-cell *matHeaderCellDef>Add</th>\r\n <td mat-cell *matCellDef=\"let row\">\r\n <button\r\n *ngIf=\"!isLdapUserRowSelected(row); else deleteLdapUserBtn\"\r\n mat-button\r\n class=\"details-ldap-table__add-btn\"\r\n type=\"button\"\r\n (click)=\"onAddLdapUser(row)\"\r\n >\r\n Add User\r\n </button>\r\n <ng-template #deleteLdapUserBtn>\r\n <button\r\n mat-button\r\n class=\"details-ldap-table__add-btn details-ldap-table__add-btn--delete\"\r\n type=\"button\"\r\n (click)=\"onDeleteLdapUser(row)\"\r\n >\r\n Delete user\r\n </button>\r\n </ng-template>\r\n </td>\r\n </ng-container>\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"userCreationWizardService.ldapTableColumns\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: userCreationWizardService.ldapTableColumns\"></tr>\r\n </table>\r\n\r\n <mat-paginator\r\n *ngIf=\"!ldapLoading && hasLdapUsers\"\r\n class=\"details-ldap-paginator\"\r\n [length]=\"ldapTotalCount\"\r\n [pageSize]=\"ldapPageSize\"\r\n [pageIndex]=\"ldapPageIndex\"\r\n [pageSizeOptions]=\"[ldapPageSize]\"\r\n [hidePageSize]=\"true\"\r\n [disabled]=\"ldapLoading\"\r\n (page)=\"onLdapPageChange($event)\"\r\n ></mat-paginator>\r\n </div>\r\n </mat-expansion-panel>\r\n </mat-accordion>\r\n </div>\r\n </div>\r\n </section>\r\n\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">Lines</h3>\r\n <div class=\"details-step-section__content\" formArrayName=\"lines\">\r\n <div class=\"line-route-list\">\r\n <div\r\n class=\"line-route-row\"\r\n *ngFor=\"let lineGroup of linesFormArray.controls; let idx = index\"\r\n [formGroupName]=\"idx\"\r\n >\r\n <div class=\"line-info\">\r\n <mat-form-field\r\n class=\"details-step-input line-route-field\"\r\n appearance=\"outline\"\r\n floatLabel=\"never\"\r\n hideRequiredMarker\r\n >\r\n <input matInput placeholder=\"Line number\" formControlName=\"lineNumber\" />\r\n </mat-form-field>\r\n\r\n <mat-form-field\r\n class=\"details-step-input line-route-field\"\r\n appearance=\"outline\"\r\n floatLabel=\"never\"\r\n hideRequiredMarker\r\n >\r\n <input\r\n matInput\r\n placeholder=\"Search for a number\"\r\n formControlName=\"number\"\r\n [matAutocomplete]=\"numberAuto\"\r\n (input)=\"filterAvailableNumbers(idx, $event)\"\r\n />\r\n <mat-autocomplete\r\n #numberAuto=\"matAutocomplete\"\r\n [panelWidth]=\"'auto'\"\r\n (optionSelected)=\"onNumberSelected(idx, $event.option.value)\"\r\n >\r\n <mat-option *ngFor=\"let option of getFilteredNumbers(idx)\" [value]=\"option\">\r\n {{ option }}\r\n </mat-option>\r\n </mat-autocomplete>\r\n <mat-error *ngIf=\"getLineGroup(idx).get('number')?.invalid && getLineGroup(idx).get('number')?.touched\">\r\n Number is required\r\n </mat-error>\r\n </mat-form-field>\r\n\r\n <mat-form-field\r\n class=\"details-step-input line-route-field\"\r\n appearance=\"outline\"\r\n floatLabel=\"never\"\r\n hideRequiredMarker\r\n >\r\n <input\r\n matInput\r\n placeholder=\"Select route partition\"\r\n formControlName=\"routePartition\"\r\n [matAutocomplete]=\"routePartitionAuto\"\r\n (input)=\"filterRoutePartitions(idx, $event)\"\r\n />\r\n <mat-autocomplete\r\n #routePartitionAuto=\"matAutocomplete\"\r\n (optionSelected)=\"onRoutePartitionSelected(idx, $event.option.value)\"\r\n >\r\n <mat-option\r\n *ngFor=\"let routePartition of getFilteredRoutePartitions(idx)\"\r\n [value]=\"routePartition\"\r\n >\r\n {{ routePartition }}\r\n </mat-option>\r\n </mat-autocomplete>\r\n <mat-error *ngIf=\"getLineGroup(idx).get('routePartition')?.invalid && getLineGroup(idx).get('routePartition')?.touched\">\r\n Route partition is required\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">Devices</h3>\r\n <div class=\"details-step-section__content\" formArrayName=\"devices\">\r\n <div class=\"devices-rows\">\r\n <div\r\n class=\"details-inline-fields details-inline-fields--four\"\r\n *ngFor=\"let deviceGroup of devicesFormArray.controls; let idx = index\"\r\n [formGroupName]=\"idx\"\r\n >\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Device type</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input matInput formControlName=\"deviceType\" />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Protocol</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input matInput formControlName=\"protocol\" />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Button Template</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input matInput formControlName=\"buttonTemplate\" />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Name</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input matInput placeholder=\"Name\" formControlName=\"name\" />\r\n <mat-error *ngIf=\"getDeviceGroup(idx).get('name')?.hasError('macAddress') && getDeviceGroup(idx).get('name')?.touched\">\r\n Please enter a valid MAC address\r\n </mat-error>\r\n <mat-error *ngIf=\"getDeviceGroup(idx).get('name')?.hasError('required') && getDeviceGroup(idx).get('name')?.touched\">\r\n Name is required\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n\r\n <section class=\"details-step-section\" *ngIf=\"deviceProfilesFormArray.length\">\r\n <h3 class=\"details-step-section__title\">Device profiles</h3>\r\n <div class=\"details-step-section__content\" formArrayName=\"deviceProfiles\">\r\n <div class=\"devices-rows\">\r\n <div\r\n class=\"details-inline-fields details-inline-fields--four\"\r\n *ngFor=\"let profileGroup of deviceProfilesFormArray.controls; let idx = index\"\r\n [formGroupName]=\"idx\"\r\n >\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Device type</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input matInput formControlName=\"deviceType\" />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Protocol</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input matInput formControlName=\"protocol\" />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Button Template</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input matInput formControlName=\"buttonTemplate\" />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Name</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input matInput placeholder=\"Name\" formControlName=\"name\" />\r\n <mat-error *ngIf=\"getDeviceProfileGroup(idx).get('name')?.hasError('macAddress') && getDeviceProfileGroup(idx).get('name')?.touched\">\r\n Please enter a valid MAC address\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n </div>\r\n </form>\r\n</section>\r\n", styles: [".details-step-content{display:flex;flex-direction:column;gap:0}.details-step-dropdowns{display:flex;flex-direction:column;gap:1rem}.details-step-field{display:flex;flex-direction:column;gap:8px}.details-step-label{font-size:16px;font-weight:400;line-height:100%;letter-spacing:0;color:#333}.details-step-select{width:333px}.details-step-divider{border-top:1px solid #d9d9d9;margin-top:24px}.details-step-sections{display:flex;flex-direction:column}.details-step-section{display:flex;flex-direction:column;gap:0;padding:24px 0}.details-step-sections>.details-step-section:first-child{padding-top:0}.details-step-section+.details-step-section{border-top:1px solid #d9d9d9}.details-step-section__title{margin:0;font-family:Inter,sans-serif;font-size:16px;font-weight:600;line-height:100%;letter-spacing:0;color:#333}.details-step-section__content{margin-top:24px}.details-step-section__part+.details-step-section__part{margin-top:24px}.details-user-accordion{width:100%}.details-user-accordion__content{padding:12px 0 0}.details-ldap-search{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-bottom:16px}.details-ldap-search__input{min-width:180px;width:180px}.details-ldap-search__select{flex:0 1 180px;min-width:160px}:host ::ng-deep .details-ldap-search__input.mat-form-field .mat-form-field-wrapper,:host ::ng-deep .details-ldap-search__select.mat-form-field .mat-form-field-wrapper{padding-bottom:0;margin:0}:host ::ng-deep .details-ldap-search__input.mat-form-field .mat-form-field-flex,:host ::ng-deep .details-ldap-search__select.mat-form-field .mat-form-field-flex{align-items:center;height:36px;border:1px solid #767676;border-radius:4px;padding:0 12px}:host ::ng-deep .details-ldap-search__input.mat-form-field .mat-form-field-outline,:host ::ng-deep .details-ldap-search__input.mat-form-field .mat-form-field-outline-start,:host ::ng-deep .details-ldap-search__input.mat-form-field .mat-form-field-outline-end,:host ::ng-deep .details-ldap-search__input.mat-form-field .mat-form-field-outline-gap,:host ::ng-deep .details-ldap-search__select.mat-form-field .mat-form-field-outline,:host ::ng-deep .details-ldap-search__select.mat-form-field .mat-form-field-outline-start,:host ::ng-deep .details-ldap-search__select.mat-form-field .mat-form-field-outline-end,:host ::ng-deep .details-ldap-search__select.mat-form-field .mat-form-field-outline-gap{display:none}:host ::ng-deep .details-ldap-search__input.mat-form-field .mat-form-field-infix,:host ::ng-deep .details-ldap-search__select.mat-form-field .mat-form-field-infix{width:100%;border-top:0;padding:0;display:flex;align-items:center;min-height:unset}:host ::ng-deep .details-ldap-search__input.mat-form-field .mat-input-element,:host ::ng-deep .details-ldap-search__select.mat-form-field .mat-input-element{margin:0;line-height:20px}:host ::ng-deep .details-ldap-search__select.mat-form-field .mat-select-trigger{display:flex;align-items:center;width:100%;height:100%}:host ::ng-deep .details-ldap-search__select.mat-form-field .mat-select-value{display:flex;align-items:center;max-width:100%}:host ::ng-deep .details-ldap-search__select.mat-form-field .mat-select-arrow-wrapper{display:flex;align-items:center}.details-ldap-search__chip{flex:0 0 auto}.details-ldap-search__btn{flex:0 0 auto;min-width:0;padding:0 12px;font-family:Inter,sans-serif;font-size:14px;font-weight:500;color:#0d56aa}.details-ldap-paginator{margin-top:8px}.details-ldap-table__add-btn--delete{color:#c62828}.details-ldap-table{width:100%}.details-ldap-table__empty{margin:16px 0 8px;font-family:Inter,sans-serif;font-size:14px;line-height:20px;color:#737480;text-align:center}.details-ldap-table__row--disabled{opacity:.35}.details-ldap-table__add-btn{min-width:0;padding:0;font-family:Inter,sans-serif;font-size:14px;font-weight:500;line-height:20px;letter-spacing:0;color:#0d56aa}:host ::ng-deep .details-ldap-table .mat-header-cell{font-family:Inter,sans-serif;font-size:12px;font-weight:500;line-height:16px;letter-spacing:0;color:#737480;height:30px;padding:7px 8px}:host ::ng-deep .details-ldap-table .mat-cell{font-family:Inter,sans-serif;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0;color:#333;height:40px;padding:8px}.details-inline-fields{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:16px}.details-inline-fields--four{grid-template-columns:repeat(4,minmax(0,1fr))}.devices-rows{display:flex;flex-direction:column;gap:24px}.details-inline-field{display:flex;flex-direction:column;gap:4px}.details-inline-field__label{color:#c0c2ce;font-size:12px;font-weight:400;line-height:16px;letter-spacing:0}.details-step-input{width:100%}.line-route-list{display:flex;flex-direction:column;gap:16px}.line-route-row{display:flex;gap:16px}.line-info{display:flex;align-items:flex-start;gap:16px}.line-route-field{flex:1 1 180px;min-width:160px}.line-route-field{display:flex;flex-direction:column;gap:0}.line-route-field:nth-of-type(1) .line-route-select{width:230px}.line-route-field .line-route-select{width:185px}:host ::ng-deep .details-step-select .mat-form-field-wrapper{padding-bottom:0}:host ::ng-deep .details-step-input .mat-form-field-wrapper{padding-bottom:0}:host ::ng-deep .details-step-select .mat-form-field-flex{align-items:center;height:36px;border:1px solid #767676;border-radius:6px;padding:0 12px}:host ::ng-deep .details-step-input .mat-form-field-flex{align-items:center;height:36px;border:1px solid #767676;border-radius:4px;padding:10px 8px}:host ::ng-deep .details-step-select .mat-form-field-outline,:host ::ng-deep .details-step-select .mat-form-field-outline-start,:host ::ng-deep .details-step-select .mat-form-field-outline-end,:host ::ng-deep .details-step-select .mat-form-field-outline-gap{display:none}:host ::ng-deep .details-step-input .mat-form-field-outline,:host ::ng-deep .details-step-input .mat-form-field-outline-start,:host ::ng-deep .details-step-input .mat-form-field-outline-end,:host ::ng-deep .details-step-input .mat-form-field-outline-gap{display:none}:host ::ng-deep .details-step-select .mat-form-field-infix{width:100%;border-top:0;padding:0}:host ::ng-deep .details-step-input .mat-form-field-infix{width:100%;border-top:0;padding:0}:host ::ng-deep .details-step-select .mat-select-trigger{display:flex;align-items:center;justify-content:space-between;height:100%}:host ::ng-deep .details-step-input .mat-input-element{height:100%;margin:0}:host ::ng-deep .details-step-input.mat-form-field-disabled .mat-form-field-flex{background-color:#f5f6fa;border-color:#b8beca;opacity:.55;cursor:not-allowed}:host ::ng-deep .details-step-input .mat-input-element:disabled{color:#7f8694;-webkit-text-fill-color:#7f8694;cursor:not-allowed}:host ::ng-deep .line-info .details-step-input .mat-form-field-flex{height:36px;padding:0 8px}:host ::ng-deep .line-info .details-step-input .mat-form-field-infix{padding:0}:host ::ng-deep .line-info .details-step-input .mat-input-element{font-size:14px;line-height:20px}:host ::ng-deep .mat-form-field-subscript-wrapper{position:relative}:host ::ng-deep .line-info .details-step-input .mat-form-field-subscript-wrapper{margin-top:4px;position:relative}:host ::ng-deep .details-user-accordion .mat-expansion-panel{border:0;border-radius:0!important;background:transparent;box-shadow:none!important}:host ::ng-deep .details-user-accordion .mat-expansion-panel-header{padding:0 0 0 8px;min-height:32px;height:32px}:host ::ng-deep .details-user-accordion .mat-expansion-panel-header-title{margin:0;display:flex;align-items:center;font-family:Inter,sans-serif;font-size:14px;font-weight:500;line-height:20px;letter-spacing:0;color:#333}:host ::ng-deep .details-user-accordion .mat-expansion-panel-body{padding:0!important}:host ::ng-deep .details-user-accordion .mat-expansion-panel-header .mat-content{display:flex;align-items:center}:host ::ng-deep .details-user-accordion .mat-expansion-panel-header .mat-expansion-indicator{display:block!important;opacity:1!important;color:#333!important;align-self:center;margin:0 8px 0 0!important}:host ::ng-deep .details-user-accordion .mat-expansion-panel-header .mat-expansion-indicator:after{color:#333!important;border-color:#333!important;position:relative;top:-4px}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i5$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i5$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i5$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i5$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i5$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i5$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i5$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i5$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i5$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i8.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i9.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i7$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i11.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i12.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple"], exportAs: ["matAutocomplete"] }, { kind: "directive", type: i12.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { kind: "component", type: i13.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }, { kind: "component", type: i14.MatChipList, selector: "mat-chip-list", inputs: ["role", "aria-describedby", "errorStateMatcher", "multiple", "compareWith", "value", "required", "placeholder", "disabled", "aria-orientation", "selectable", "tabIndex"], outputs: ["change", "valueChange"], exportAs: ["matChipList"] }, { kind: "directive", type: i14.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["color", "disableRipple", "tabIndex", "role", "selected", "value", "selectable", "disabled", "removable"], outputs: ["selectionChange", "destroyed", "removed"], exportAs: ["matChip"] }, { kind: "directive", type: i14.MatChipRemove, selector: "[matChipRemove]" }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.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: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i1$2.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "directive", type: i15.MatAccordion, selector: "mat-accordion", inputs: ["multi", "hideToggle", "displayMode", "togglePosition"], exportAs: ["matAccordion"] }, { kind: "component", type: i15.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["disabled", "expanded", "hideToggle", "togglePosition"], outputs: ["opened", "closed", "expandedChange", "afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i15.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["tabIndex", "expandedHeight", "collapsedHeight"] }, { kind: "directive", type: i15.MatExpansionPanelTitle, selector: "mat-panel-title" }, { kind: "component", type: AppLoaderComponent, selector: "app-loader" }] });
|
|
916
1942
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserDetailsStepComponent, decorators: [{
|
|
917
1943
|
type: Component,
|
|
918
|
-
args: [{ selector: 'tk-user-details-step', template: "<section class=\"details-step-content\">\r\n <div class=\"details-step-sections\">\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">User details</h3>\r\n <div class=\"details-step-section__content\">\r\n <div class=\"details-step-section__part\">\r\n <div class=\"details-inline-fields\">\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">User ID</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input\r\n matInput\r\n placeholder=\"User ID\"\r\n [value]=\"userCreationWizardService.userDetailsForm.userId\"\r\n (input)=\"\r\n userCreationWizardService.setUserDetailsField(\r\n 'userId',\r\n $any($event.target).value\r\n )\r\n \"\r\n />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">First Name</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input\r\n matInput\r\n placeholder=\"First Name\"\r\n [value]=\"userCreationWizardService.userDetailsForm.firstName\"\r\n (input)=\"\r\n userCreationWizardService.setUserDetailsField(\r\n 'firstName',\r\n $any($event.target).value\r\n )\r\n \"\r\n />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Last Name</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input\r\n matInput\r\n placeholder=\"Last Name\"\r\n [value]=\"userCreationWizardService.userDetailsForm.lastName\"\r\n (input)=\"\r\n userCreationWizardService.setUserDetailsField(\r\n 'lastName',\r\n $any($event.target).value\r\n )\r\n \"\r\n />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Email</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input\r\n matInput\r\n placeholder=\"Email\"\r\n [value]=\"userCreationWizardService.userDetailsForm.email\"\r\n (input)=\"\r\n userCreationWizardService.setUserDetailsField(\r\n 'email',\r\n $any($event.target).value\r\n )\r\n \"\r\n />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">User Template</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input\r\n matInput\r\n placeholder=\"User Template\"\r\n [value]=\"userCreationWizardService.selectedTemplate || ''\"\r\n [disabled]=\"true\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"details-step-section__part\">\r\n <mat-accordion class=\"details-user-accordion\">\r\n <mat-expansion-panel togglePosition=\"before\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title\r\n >Choose an existing or a LDAP user</mat-panel-title\r\n >\r\n </mat-expansion-panel-header>\r\n <div class=\"details-user-accordion__content\">\r\n <table\r\n mat-table\r\n [dataSource]=\"userCreationWizardService.ldapUsers\"\r\n class=\"details-ldap-table\"\r\n >\r\n <ng-container matColumnDef=\"userId\">\r\n <th mat-header-cell *matHeaderCellDef>User ID</th>\r\n <td mat-cell *matCellDef=\"let row\">{{ row.userId }}</td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"firstName\">\r\n <th mat-header-cell *matHeaderCellDef>First Name</th>\r\n <td mat-cell *matCellDef=\"let row\">{{ row.firstName }}</td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"lastName\">\r\n <th mat-header-cell *matHeaderCellDef>Last Name</th>\r\n <td mat-cell *matCellDef=\"let row\">{{ row.lastName }}</td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"email\">\r\n <th mat-header-cell *matHeaderCellDef>Email</th>\r\n <td mat-cell *matCellDef=\"let row\">{{ row.email }}</td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"add\">\r\n <th mat-header-cell *matHeaderCellDef>Add</th>\r\n <td mat-cell *matCellDef=\"let row\">\r\n <button\r\n mat-button\r\n class=\"details-ldap-table__add-btn\"\r\n type=\"button\"\r\n [disabled]=\"\r\n userCreationWizardService.isLdapUserAdded(row)\r\n \"\r\n (click)=\"onAddUser(row)\"\r\n >\r\n Add user\r\n </button>\r\n </td>\r\n </ng-container>\r\n\r\n <tr\r\n mat-header-row\r\n *matHeaderRowDef=\"\r\n userCreationWizardService.ldapTableColumns\r\n \"\r\n ></tr>\r\n <tr\r\n mat-row\r\n *matRowDef=\"\r\n let row;\r\n columns: userCreationWizardService.ldapTableColumns\r\n \"\r\n [class.details-ldap-table__row--disabled]=\"\r\n userCreationWizardService.isLdapUserAdded(row)\r\n \"\r\n ></tr>\r\n </table>\r\n </div>\r\n </mat-expansion-panel>\r\n </mat-accordion>\r\n </div>\r\n </div>\r\n </section>\r\n\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">Lines</h3>\r\n <div class=\"details-step-section__content\">\r\n <div class=\"line-route-list\">\r\n <div\r\n class=\"line-route-row\"\r\n *ngFor=\"\r\n let lineSelection of userCreationWizardService.lineSelections;\r\n let idx = index\r\n \"\r\n >\r\n <div class=\"line-route-field\">\r\n <mat-form-field\r\n class=\"details-step-select line-route-select\"\r\n appearance=\"outline\"\r\n >\r\n <mat-select\r\n placeholder=\"Select line\"\r\n [value]=\"lineSelection.lineNumber\"\r\n (selectionChange)=\"\r\n userCreationWizardService.setLineSelection(\r\n idx,\r\n $event.value\r\n )\r\n \"\r\n >\r\n <mat-option\r\n *ngFor=\"let line of userCreationWizardService.lineOptions\"\r\n [value]=\"line.number\"\r\n >\r\n {{ line.number }} - {{ line.did }}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"line-route-field\">\r\n <mat-form-field\r\n class=\"details-step-select line-route-select\"\r\n appearance=\"outline\"\r\n >\r\n <mat-select\r\n placeholder=\"Select route partition\"\r\n [value]=\"lineSelection.routePartitionName\"\r\n (selectionChange)=\"\r\n userCreationWizardService.setRoutePartitionSelection(\r\n idx,\r\n $event.value\r\n )\r\n \"\r\n >\r\n <mat-option\r\n *ngFor=\"\r\n let partition of userCreationWizardService.routePartitionOptions\r\n \"\r\n [value]=\"partition\"\r\n >\r\n {{ partition }}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">Devices</h3>\r\n <div class=\"details-step-section__content\">\r\n <div class=\"devices-rows\">\r\n <div\r\n class=\"details-inline-fields details-inline-fields--four\"\r\n *ngFor=\"\r\n let _row of userCreationWizardService.deviceRows;\r\n let idx = index\r\n \"\r\n >\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Device type</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input\r\n matInput\r\n placeholder=\"Device type\"\r\n [value]=\"\r\n userCreationWizardService.deviceEntries[idx].deviceType ||\r\n ''\r\n \"\r\n [disabled]=\"true\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Protocol</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input\r\n matInput\r\n placeholder=\"Protocol\"\r\n [value]=\"\r\n userCreationWizardService.deviceEntries[idx].protocol || ''\r\n \"\r\n [disabled]=\"true\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Button Template</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input\r\n matInput\r\n placeholder=\"Button Template\"\r\n [value]=\"\r\n userCreationWizardService.deviceEntries[idx]\r\n .buttonTemplate || ''\r\n \"\r\n [disabled]=\"true\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Name</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input\r\n matInput\r\n placeholder=\"Name\"\r\n [value]=\"getDeviceName(idx)\"\r\n (input)=\"\r\n userCreationWizardService.setDeviceName(\r\n idx,\r\n $any($event.target).value\r\n )\r\n \"\r\n />\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n </div>\r\n</section>\r\n", styles: [".details-step-content{display:flex;flex-direction:column;gap:0}.details-step-dropdowns{display:flex;flex-direction:column;gap:1rem}.details-step-field{display:flex;flex-direction:column;gap:8px}.details-step-label{font-size:16px;font-weight:400;line-height:100%;letter-spacing:0;color:#333}.details-step-select{width:333px}.details-step-divider{border-top:1px solid #d9d9d9;margin-top:24px}.details-step-sections{display:flex;flex-direction:column}.details-step-section{display:flex;flex-direction:column;gap:0;padding:24px 0}.details-step-sections>.details-step-section:first-child{padding-top:0}.details-step-section+.details-step-section{border-top:1px solid #d9d9d9}.details-step-section__title{margin:0;font-family:Inter,sans-serif;font-size:16px;font-weight:600;line-height:100%;letter-spacing:0;color:#333}.details-step-section__content{margin-top:24px}.details-step-section__part+.details-step-section__part{margin-top:24px}.details-user-accordion{width:100%}.details-user-accordion__content{padding:12px 0 0}.details-ldap-table{width:100%}.details-ldap-table__row--disabled{opacity:.35}.details-ldap-table__add-btn{min-width:0;padding:0;font-family:Inter,sans-serif;font-size:14px;font-weight:500;line-height:20px;letter-spacing:0;color:#0d56aa}:host ::ng-deep .details-ldap-table .mat-header-cell{font-family:Inter,sans-serif;font-size:12px;font-weight:500;line-height:16px;letter-spacing:0;color:#737480;height:30px;padding:7px 8px}:host ::ng-deep .details-ldap-table .mat-cell{font-family:Inter,sans-serif;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0;color:#333;height:40px;padding:8px}.details-inline-fields{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:16px}.details-inline-fields--four{grid-template-columns:repeat(4,minmax(0,1fr))}.devices-rows{display:flex;flex-direction:column;gap:24px}.details-inline-field{display:flex;flex-direction:column;gap:4px}.details-inline-field__label{color:#c0c2ce;font-size:12px;font-weight:400;line-height:16px;letter-spacing:0}.details-step-input{width:100%}.line-route-list{display:flex;flex-direction:column;gap:16px}.line-route-row{display:flex;gap:16px}.line-route-field{display:flex;flex-direction:column;gap:0}.line-route-field:nth-of-type(1) .line-route-select{width:230px}.line-route-field .line-route-select{width:185px}:host ::ng-deep .details-step-select .mat-form-field-wrapper{padding-bottom:0}:host ::ng-deep .details-step-input .mat-form-field-wrapper{padding-bottom:0}:host ::ng-deep .details-step-select .mat-form-field-flex{align-items:center;height:32px;border:1px solid #767676;border-radius:6px;padding:0 12px}:host ::ng-deep .details-step-input .mat-form-field-flex{align-items:center;height:36px;border:1px solid #767676;border-radius:4px;padding:10px 8px}:host ::ng-deep .details-step-select .mat-form-field-outline,:host ::ng-deep .details-step-select .mat-form-field-outline-start,:host ::ng-deep .details-step-select .mat-form-field-outline-end,:host ::ng-deep .details-step-select .mat-form-field-outline-gap{display:none}:host ::ng-deep .details-step-input .mat-form-field-outline,:host ::ng-deep .details-step-input .mat-form-field-outline-start,:host ::ng-deep .details-step-input .mat-form-field-outline-end,:host ::ng-deep .details-step-input .mat-form-field-outline-gap{display:none}:host ::ng-deep .details-step-select .mat-form-field-infix{width:100%;border-top:0;padding:0}:host ::ng-deep .details-step-input .mat-form-field-infix{width:100%;border-top:0;padding:0}:host ::ng-deep .details-step-select .mat-select-trigger{display:flex;align-items:center;justify-content:space-between;height:100%}:host ::ng-deep .details-step-input .mat-input-element{height:100%;margin:0}:host ::ng-deep .details-step-input.mat-form-field-disabled .mat-form-field-flex{background-color:#f5f6fa;border-color:#b8beca;opacity:.55;cursor:not-allowed}:host ::ng-deep .details-step-input .mat-input-element:disabled{color:#7f8694;-webkit-text-fill-color:#7f8694;cursor:not-allowed}:host ::ng-deep .details-user-accordion .mat-expansion-panel{border:0;border-radius:0!important;background:transparent;box-shadow:none!important}:host ::ng-deep .details-user-accordion .mat-expansion-panel-header{padding:0 0 0 8px;min-height:32px;height:32px}:host ::ng-deep .details-user-accordion .mat-expansion-panel-header-title{margin:0;display:flex;align-items:center;font-family:Inter,sans-serif;font-size:14px;font-weight:500;line-height:20px;letter-spacing:0;color:#333}:host ::ng-deep .details-user-accordion .mat-expansion-panel-body{padding:0!important}:host ::ng-deep .details-user-accordion .mat-expansion-panel-header .mat-content{display:flex;align-items:center}:host ::ng-deep .details-user-accordion .mat-expansion-panel-header .mat-expansion-indicator{display:block!important;opacity:1!important;color:#333!important;align-self:center;margin:0 8px 0 0!important}:host ::ng-deep .details-user-accordion .mat-expansion-panel-header .mat-expansion-indicator:after{color:#333!important;border-color:#333!important;position:relative;top:-4px}\n"] }]
|
|
919
|
-
}], ctorParameters: function () { return [{ type: UserCreationWizardService }]; }
|
|
1944
|
+
args: [{ selector: 'tk-user-details-step', template: "<app-loader *ngIf=\"loadingAvailableNumbers\"></app-loader>\r\n<section class=\"details-step-content\">\r\n <form [formGroup]=\"userDetailsForm\">\r\n <div class=\"details-step-sections\">\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">User details</h3>\r\n <div class=\"details-step-section__content\">\r\n <div class=\"details-step-section__part\">\r\n <div class=\"details-inline-fields\">\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">User ID</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input matInput placeholder=\"User ID\" formControlName=\"userId\" />\r\n <mat-error *ngIf=\"userDetailsForm.get('userId')?.hasError('required') && userDetailsForm.get('userId')?.touched\">\r\n User ID is required\r\n </mat-error>\r\n <mat-error *ngIf=\"userDetailsForm.get('userId')?.hasError('userIdExists') && userDetailsForm.get('userId')?.touched\">\r\n User ID already exists\r\n </mat-error>\r\n <mat-hint *ngIf=\"userIdCheckPending\">Checking user ID...</mat-hint>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">First Name</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input matInput placeholder=\"First Name\" formControlName=\"firstName\" />\r\n <mat-error *ngIf=\"userDetailsForm.get('firstName')?.hasError('required') && userDetailsForm.get('firstName')?.touched\">\r\n First name is required\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Last Name</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input matInput placeholder=\"Last Name\" formControlName=\"lastName\" />\r\n <mat-error *ngIf=\"userDetailsForm.get('lastName')?.hasError('required') && userDetailsForm.get('lastName')?.touched\">\r\n Last name is required\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Email</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input matInput placeholder=\"Email\" formControlName=\"email\" />\r\n <mat-error *ngIf=\"userDetailsForm.get('email')?.invalid && userDetailsForm.get('email')?.touched\">\r\n <span *ngIf=\"userDetailsForm.get('email')?.hasError('required')\">Email is required</span>\r\n <span *ngIf=\"userDetailsForm.get('email')?.hasError('email')\">Please enter a valid email</span>\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">User Template</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input\r\n matInput\r\n placeholder=\"User Template\"\r\n [value]=\"userCreationWizardService.selectedTemplateName || ''\"\r\n [disabled]=\"true\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"details-step-section__part\">\r\n <mat-accordion class=\"details-user-accordion\">\r\n <mat-expansion-panel togglePosition=\"before\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>Choose an existing or a LDAP user</mat-panel-title>\r\n </mat-expansion-panel-header>\r\n <div class=\"details-user-accordion__content\">\r\n <div class=\"details-ldap-search\" [formGroup]=\"ldapSearchForm\">\r\n <mat-form-field\r\n class=\"details-ldap-search__input\"\r\n appearance=\"outline\"\r\n floatLabel=\"never\"\r\n >\r\n <input\r\n matInput\r\n placeholder=\"Search\"\r\n formControlName=\"queryValue\"\r\n (keyup.enter)=\"searchLdapUsers()\"\r\n />\r\n </mat-form-field>\r\n\r\n <mat-form-field\r\n class=\"details-ldap-search__select\"\r\n appearance=\"outline\"\r\n floatLabel=\"never\"\r\n >\r\n <mat-select formControlName=\"queryType\">\r\n <mat-option *ngFor=\"let option of ldapQueryTypeOptions\" [value]=\"option.value\">\r\n {{ option.label }}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n\r\n <mat-chip-list *ngIf=\"selectedLdapUser\" class=\"details-ldap-search__chip\">\r\n <mat-chip removable (removed)=\"onRemoveLdapTag()\">\r\n {{ selectedLdapUser.userid }}\r\n <mat-icon matChipRemove>cancel</mat-icon>\r\n </mat-chip>\r\n </mat-chip-list>\r\n\r\n <button\r\n mat-button\r\n class=\"details-ldap-search__btn\"\r\n type=\"button\"\r\n [disabled]=\"ldapLoading\"\r\n (click)=\"searchLdapUsers()\"\r\n >\r\n Search\r\n </button>\r\n </div>\r\n\r\n <app-loader *ngIf=\"ldapLoading\"></app-loader>\r\n\r\n <p\r\n *ngIf=\"!ldapLoading && ldapSearchAttempted && !hasLdapUsers\"\r\n class=\"details-ldap-table__empty\"\r\n >\r\n No users found\r\n </p>\r\n\r\n <table\r\n *ngIf=\"!ldapLoading && hasLdapUsers\"\r\n mat-table\r\n [dataSource]=\"userCreationWizardService.ldapUsers\"\r\n class=\"details-ldap-table\"\r\n >\r\n <ng-container matColumnDef=\"userId\">\r\n <th mat-header-cell *matHeaderCellDef>User Id</th>\r\n <td mat-cell *matCellDef=\"let row\">{{ row.userid }}</td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"firstName\">\r\n <th mat-header-cell *matHeaderCellDef>First Name</th>\r\n <td mat-cell *matCellDef=\"let row\">{{ row.firstName }}</td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"lastName\">\r\n <th mat-header-cell *matHeaderCellDef>Last Name</th>\r\n <td mat-cell *matCellDef=\"let row\">{{ row.lastName }}</td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"email\">\r\n <th mat-header-cell *matHeaderCellDef>Email</th>\r\n <td mat-cell *matCellDef=\"let row\">{{ row.email }}</td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"add\">\r\n <th mat-header-cell *matHeaderCellDef>Add</th>\r\n <td mat-cell *matCellDef=\"let row\">\r\n <button\r\n *ngIf=\"!isLdapUserRowSelected(row); else deleteLdapUserBtn\"\r\n mat-button\r\n class=\"details-ldap-table__add-btn\"\r\n type=\"button\"\r\n (click)=\"onAddLdapUser(row)\"\r\n >\r\n Add User\r\n </button>\r\n <ng-template #deleteLdapUserBtn>\r\n <button\r\n mat-button\r\n class=\"details-ldap-table__add-btn details-ldap-table__add-btn--delete\"\r\n type=\"button\"\r\n (click)=\"onDeleteLdapUser(row)\"\r\n >\r\n Delete user\r\n </button>\r\n </ng-template>\r\n </td>\r\n </ng-container>\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"userCreationWizardService.ldapTableColumns\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: userCreationWizardService.ldapTableColumns\"></tr>\r\n </table>\r\n\r\n <mat-paginator\r\n *ngIf=\"!ldapLoading && hasLdapUsers\"\r\n class=\"details-ldap-paginator\"\r\n [length]=\"ldapTotalCount\"\r\n [pageSize]=\"ldapPageSize\"\r\n [pageIndex]=\"ldapPageIndex\"\r\n [pageSizeOptions]=\"[ldapPageSize]\"\r\n [hidePageSize]=\"true\"\r\n [disabled]=\"ldapLoading\"\r\n (page)=\"onLdapPageChange($event)\"\r\n ></mat-paginator>\r\n </div>\r\n </mat-expansion-panel>\r\n </mat-accordion>\r\n </div>\r\n </div>\r\n </section>\r\n\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">Lines</h3>\r\n <div class=\"details-step-section__content\" formArrayName=\"lines\">\r\n <div class=\"line-route-list\">\r\n <div\r\n class=\"line-route-row\"\r\n *ngFor=\"let lineGroup of linesFormArray.controls; let idx = index\"\r\n [formGroupName]=\"idx\"\r\n >\r\n <div class=\"line-info\">\r\n <mat-form-field\r\n class=\"details-step-input line-route-field\"\r\n appearance=\"outline\"\r\n floatLabel=\"never\"\r\n hideRequiredMarker\r\n >\r\n <input matInput placeholder=\"Line number\" formControlName=\"lineNumber\" />\r\n </mat-form-field>\r\n\r\n <mat-form-field\r\n class=\"details-step-input line-route-field\"\r\n appearance=\"outline\"\r\n floatLabel=\"never\"\r\n hideRequiredMarker\r\n >\r\n <input\r\n matInput\r\n placeholder=\"Search for a number\"\r\n formControlName=\"number\"\r\n [matAutocomplete]=\"numberAuto\"\r\n (input)=\"filterAvailableNumbers(idx, $event)\"\r\n />\r\n <mat-autocomplete\r\n #numberAuto=\"matAutocomplete\"\r\n [panelWidth]=\"'auto'\"\r\n (optionSelected)=\"onNumberSelected(idx, $event.option.value)\"\r\n >\r\n <mat-option *ngFor=\"let option of getFilteredNumbers(idx)\" [value]=\"option\">\r\n {{ option }}\r\n </mat-option>\r\n </mat-autocomplete>\r\n <mat-error *ngIf=\"getLineGroup(idx).get('number')?.invalid && getLineGroup(idx).get('number')?.touched\">\r\n Number is required\r\n </mat-error>\r\n </mat-form-field>\r\n\r\n <mat-form-field\r\n class=\"details-step-input line-route-field\"\r\n appearance=\"outline\"\r\n floatLabel=\"never\"\r\n hideRequiredMarker\r\n >\r\n <input\r\n matInput\r\n placeholder=\"Select route partition\"\r\n formControlName=\"routePartition\"\r\n [matAutocomplete]=\"routePartitionAuto\"\r\n (input)=\"filterRoutePartitions(idx, $event)\"\r\n />\r\n <mat-autocomplete\r\n #routePartitionAuto=\"matAutocomplete\"\r\n (optionSelected)=\"onRoutePartitionSelected(idx, $event.option.value)\"\r\n >\r\n <mat-option\r\n *ngFor=\"let routePartition of getFilteredRoutePartitions(idx)\"\r\n [value]=\"routePartition\"\r\n >\r\n {{ routePartition }}\r\n </mat-option>\r\n </mat-autocomplete>\r\n <mat-error *ngIf=\"getLineGroup(idx).get('routePartition')?.invalid && getLineGroup(idx).get('routePartition')?.touched\">\r\n Route partition is required\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">Devices</h3>\r\n <div class=\"details-step-section__content\" formArrayName=\"devices\">\r\n <div class=\"devices-rows\">\r\n <div\r\n class=\"details-inline-fields details-inline-fields--four\"\r\n *ngFor=\"let deviceGroup of devicesFormArray.controls; let idx = index\"\r\n [formGroupName]=\"idx\"\r\n >\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Device type</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input matInput formControlName=\"deviceType\" />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Protocol</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input matInput formControlName=\"protocol\" />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Button Template</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input matInput formControlName=\"buttonTemplate\" />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Name</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input matInput placeholder=\"Name\" formControlName=\"name\" />\r\n <mat-error *ngIf=\"getDeviceGroup(idx).get('name')?.hasError('macAddress') && getDeviceGroup(idx).get('name')?.touched\">\r\n Please enter a valid MAC address\r\n </mat-error>\r\n <mat-error *ngIf=\"getDeviceGroup(idx).get('name')?.hasError('required') && getDeviceGroup(idx).get('name')?.touched\">\r\n Name is required\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n\r\n <section class=\"details-step-section\" *ngIf=\"deviceProfilesFormArray.length\">\r\n <h3 class=\"details-step-section__title\">Device profiles</h3>\r\n <div class=\"details-step-section__content\" formArrayName=\"deviceProfiles\">\r\n <div class=\"devices-rows\">\r\n <div\r\n class=\"details-inline-fields details-inline-fields--four\"\r\n *ngFor=\"let profileGroup of deviceProfilesFormArray.controls; let idx = index\"\r\n [formGroupName]=\"idx\"\r\n >\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Device type</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input matInput formControlName=\"deviceType\" />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Protocol</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input matInput formControlName=\"protocol\" />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Button Template</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input matInput formControlName=\"buttonTemplate\" />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"details-inline-field\">\r\n <label class=\"details-inline-field__label\">Name</label>\r\n <mat-form-field class=\"details-step-input\" appearance=\"outline\">\r\n <input matInput placeholder=\"Name\" formControlName=\"name\" />\r\n <mat-error *ngIf=\"getDeviceProfileGroup(idx).get('name')?.hasError('macAddress') && getDeviceProfileGroup(idx).get('name')?.touched\">\r\n Please enter a valid MAC address\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n </div>\r\n </form>\r\n</section>\r\n", styles: [".details-step-content{display:flex;flex-direction:column;gap:0}.details-step-dropdowns{display:flex;flex-direction:column;gap:1rem}.details-step-field{display:flex;flex-direction:column;gap:8px}.details-step-label{font-size:16px;font-weight:400;line-height:100%;letter-spacing:0;color:#333}.details-step-select{width:333px}.details-step-divider{border-top:1px solid #d9d9d9;margin-top:24px}.details-step-sections{display:flex;flex-direction:column}.details-step-section{display:flex;flex-direction:column;gap:0;padding:24px 0}.details-step-sections>.details-step-section:first-child{padding-top:0}.details-step-section+.details-step-section{border-top:1px solid #d9d9d9}.details-step-section__title{margin:0;font-family:Inter,sans-serif;font-size:16px;font-weight:600;line-height:100%;letter-spacing:0;color:#333}.details-step-section__content{margin-top:24px}.details-step-section__part+.details-step-section__part{margin-top:24px}.details-user-accordion{width:100%}.details-user-accordion__content{padding:12px 0 0}.details-ldap-search{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-bottom:16px}.details-ldap-search__input{min-width:180px;width:180px}.details-ldap-search__select{flex:0 1 180px;min-width:160px}:host ::ng-deep .details-ldap-search__input.mat-form-field .mat-form-field-wrapper,:host ::ng-deep .details-ldap-search__select.mat-form-field .mat-form-field-wrapper{padding-bottom:0;margin:0}:host ::ng-deep .details-ldap-search__input.mat-form-field .mat-form-field-flex,:host ::ng-deep .details-ldap-search__select.mat-form-field .mat-form-field-flex{align-items:center;height:36px;border:1px solid #767676;border-radius:4px;padding:0 12px}:host ::ng-deep .details-ldap-search__input.mat-form-field .mat-form-field-outline,:host ::ng-deep .details-ldap-search__input.mat-form-field .mat-form-field-outline-start,:host ::ng-deep .details-ldap-search__input.mat-form-field .mat-form-field-outline-end,:host ::ng-deep .details-ldap-search__input.mat-form-field .mat-form-field-outline-gap,:host ::ng-deep .details-ldap-search__select.mat-form-field .mat-form-field-outline,:host ::ng-deep .details-ldap-search__select.mat-form-field .mat-form-field-outline-start,:host ::ng-deep .details-ldap-search__select.mat-form-field .mat-form-field-outline-end,:host ::ng-deep .details-ldap-search__select.mat-form-field .mat-form-field-outline-gap{display:none}:host ::ng-deep .details-ldap-search__input.mat-form-field .mat-form-field-infix,:host ::ng-deep .details-ldap-search__select.mat-form-field .mat-form-field-infix{width:100%;border-top:0;padding:0;display:flex;align-items:center;min-height:unset}:host ::ng-deep .details-ldap-search__input.mat-form-field .mat-input-element,:host ::ng-deep .details-ldap-search__select.mat-form-field .mat-input-element{margin:0;line-height:20px}:host ::ng-deep .details-ldap-search__select.mat-form-field .mat-select-trigger{display:flex;align-items:center;width:100%;height:100%}:host ::ng-deep .details-ldap-search__select.mat-form-field .mat-select-value{display:flex;align-items:center;max-width:100%}:host ::ng-deep .details-ldap-search__select.mat-form-field .mat-select-arrow-wrapper{display:flex;align-items:center}.details-ldap-search__chip{flex:0 0 auto}.details-ldap-search__btn{flex:0 0 auto;min-width:0;padding:0 12px;font-family:Inter,sans-serif;font-size:14px;font-weight:500;color:#0d56aa}.details-ldap-paginator{margin-top:8px}.details-ldap-table__add-btn--delete{color:#c62828}.details-ldap-table{width:100%}.details-ldap-table__empty{margin:16px 0 8px;font-family:Inter,sans-serif;font-size:14px;line-height:20px;color:#737480;text-align:center}.details-ldap-table__row--disabled{opacity:.35}.details-ldap-table__add-btn{min-width:0;padding:0;font-family:Inter,sans-serif;font-size:14px;font-weight:500;line-height:20px;letter-spacing:0;color:#0d56aa}:host ::ng-deep .details-ldap-table .mat-header-cell{font-family:Inter,sans-serif;font-size:12px;font-weight:500;line-height:16px;letter-spacing:0;color:#737480;height:30px;padding:7px 8px}:host ::ng-deep .details-ldap-table .mat-cell{font-family:Inter,sans-serif;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0;color:#333;height:40px;padding:8px}.details-inline-fields{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:16px}.details-inline-fields--four{grid-template-columns:repeat(4,minmax(0,1fr))}.devices-rows{display:flex;flex-direction:column;gap:24px}.details-inline-field{display:flex;flex-direction:column;gap:4px}.details-inline-field__label{color:#c0c2ce;font-size:12px;font-weight:400;line-height:16px;letter-spacing:0}.details-step-input{width:100%}.line-route-list{display:flex;flex-direction:column;gap:16px}.line-route-row{display:flex;gap:16px}.line-info{display:flex;align-items:flex-start;gap:16px}.line-route-field{flex:1 1 180px;min-width:160px}.line-route-field{display:flex;flex-direction:column;gap:0}.line-route-field:nth-of-type(1) .line-route-select{width:230px}.line-route-field .line-route-select{width:185px}:host ::ng-deep .details-step-select .mat-form-field-wrapper{padding-bottom:0}:host ::ng-deep .details-step-input .mat-form-field-wrapper{padding-bottom:0}:host ::ng-deep .details-step-select .mat-form-field-flex{align-items:center;height:36px;border:1px solid #767676;border-radius:6px;padding:0 12px}:host ::ng-deep .details-step-input .mat-form-field-flex{align-items:center;height:36px;border:1px solid #767676;border-radius:4px;padding:10px 8px}:host ::ng-deep .details-step-select .mat-form-field-outline,:host ::ng-deep .details-step-select .mat-form-field-outline-start,:host ::ng-deep .details-step-select .mat-form-field-outline-end,:host ::ng-deep .details-step-select .mat-form-field-outline-gap{display:none}:host ::ng-deep .details-step-input .mat-form-field-outline,:host ::ng-deep .details-step-input .mat-form-field-outline-start,:host ::ng-deep .details-step-input .mat-form-field-outline-end,:host ::ng-deep .details-step-input .mat-form-field-outline-gap{display:none}:host ::ng-deep .details-step-select .mat-form-field-infix{width:100%;border-top:0;padding:0}:host ::ng-deep .details-step-input .mat-form-field-infix{width:100%;border-top:0;padding:0}:host ::ng-deep .details-step-select .mat-select-trigger{display:flex;align-items:center;justify-content:space-between;height:100%}:host ::ng-deep .details-step-input .mat-input-element{height:100%;margin:0}:host ::ng-deep .details-step-input.mat-form-field-disabled .mat-form-field-flex{background-color:#f5f6fa;border-color:#b8beca;opacity:.55;cursor:not-allowed}:host ::ng-deep .details-step-input .mat-input-element:disabled{color:#7f8694;-webkit-text-fill-color:#7f8694;cursor:not-allowed}:host ::ng-deep .line-info .details-step-input .mat-form-field-flex{height:36px;padding:0 8px}:host ::ng-deep .line-info .details-step-input .mat-form-field-infix{padding:0}:host ::ng-deep .line-info .details-step-input .mat-input-element{font-size:14px;line-height:20px}:host ::ng-deep .mat-form-field-subscript-wrapper{position:relative}:host ::ng-deep .line-info .details-step-input .mat-form-field-subscript-wrapper{margin-top:4px;position:relative}:host ::ng-deep .details-user-accordion .mat-expansion-panel{border:0;border-radius:0!important;background:transparent;box-shadow:none!important}:host ::ng-deep .details-user-accordion .mat-expansion-panel-header{padding:0 0 0 8px;min-height:32px;height:32px}:host ::ng-deep .details-user-accordion .mat-expansion-panel-header-title{margin:0;display:flex;align-items:center;font-family:Inter,sans-serif;font-size:14px;font-weight:500;line-height:20px;letter-spacing:0;color:#333}:host ::ng-deep .details-user-accordion .mat-expansion-panel-body{padding:0!important}:host ::ng-deep .details-user-accordion .mat-expansion-panel-header .mat-content{display:flex;align-items:center}:host ::ng-deep .details-user-accordion .mat-expansion-panel-header .mat-expansion-indicator{display:block!important;opacity:1!important;color:#333!important;align-self:center;margin:0 8px 0 0!important}:host ::ng-deep .details-user-accordion .mat-expansion-panel-header .mat-expansion-indicator:after{color:#333!important;border-color:#333!important;position:relative;top:-4px}\n"] }]
|
|
1945
|
+
}], ctorParameters: function () { return [{ type: i1$2.FormBuilder }, { type: UserCreationApiService }, { type: UserCreationWizardService }]; }, propDecorators: { validityChange: [{
|
|
1946
|
+
type: Output
|
|
1947
|
+
}] } });
|
|
920
1948
|
|
|
921
1949
|
class UserOverviewStepComponent {
|
|
922
1950
|
constructor(userCreationWizardService) {
|
|
@@ -927,17 +1955,21 @@ class UserOverviewStepComponent {
|
|
|
927
1955
|
}
|
|
928
1956
|
}
|
|
929
1957
|
UserOverviewStepComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserOverviewStepComponent, deps: [{ token: UserCreationWizardService }], target: i0.ɵɵFactoryTarget.Component });
|
|
930
|
-
UserOverviewStepComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: UserOverviewStepComponent, selector: "tk-user-overview-step", ngImport: i0, template: "<section class=\"details-step-content\">\r\n <div class=\"details-step-sections\">\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">User details</h3>\r\n <div class=\"details-step-section__content\">\r\n <div class=\"preview-list\" [style.--preview-cols]=\"USER_DETAILS_COLS.length\">\r\n <div class=\"preview-list__header\">\r\n <span *ngFor=\"let col of USER_DETAILS_COLS\">{{ col }}</span>\r\n </div>\r\n <div class=\"preview-list__row\" *ngFor=\"let user of userCreationWizardService.overviewUsers\">\r\n <span>{{ user.userId }}</span>\r\n <span>{{ user.firstName }}</span>\r\n <span>{{ user.lastName }}</span>\r\n <span>{{ user.email }}</span>\r\n <span>{{ user.userTemplate }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n </div>\r\n
|
|
1958
|
+
UserOverviewStepComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: UserOverviewStepComponent, selector: "tk-user-overview-step", ngImport: i0, template: "<section class=\"details-step-content\">\r\n <div class=\"details-step-sections\">\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">User details</h3>\r\n <div class=\"details-step-section__content\">\r\n <div class=\"preview-list\" [style.--preview-cols]=\"USER_DETAILS_COLS.length\">\r\n <div class=\"preview-list__header\">\r\n <span *ngFor=\"let col of USER_DETAILS_COLS\">{{ col }}</span>\r\n </div>\r\n <div class=\"preview-list__row\" *ngFor=\"let user of userCreationWizardService.overviewUsers\">\r\n <span>{{ user.userId }}</span>\r\n <span>{{ user.firstName }}</span>\r\n <span>{{ user.lastName }}</span>\r\n <span>{{ user.email }}</span>\r\n <span>{{ user.userTemplate }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n </div>\r\n\r\n <div class=\"details-step-divider\"></div>\r\n\r\n <div class=\"details-step-sections\">\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">Lines</h3>\r\n <div class=\"details-step-section__content\">\r\n <div class=\"preview-list\" [style.--preview-cols]=\"LINES_COLS.length\">\r\n <div class=\"preview-list__header\">\r\n <span *ngFor=\"let col of LINES_COLS\">{{ col }}</span>\r\n </div>\r\n <div class=\"preview-list__row\" *ngFor=\"let line of userCreationWizardService.overviewLines\">\r\n <span>{{ line.number }}</span>\r\n <span>{{ line.did }}</span>\r\n <span>{{ line.routePartitionName }}</span>\r\n <span>{{ line.css }}</span>\r\n <span>{{ line.description }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n </div>\r\n\r\n <div class=\"details-step-divider\"></div>\r\n\r\n <div class=\"details-step-sections\">\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">Devices</h3>\r\n <div class=\"details-step-section__content\">\r\n <div class=\"preview-list\" [style.--preview-cols]=\"DEVICES_COLS.length\">\r\n <div class=\"preview-list__header\">\r\n <span *ngFor=\"let col of DEVICES_COLS\">{{ col }}</span>\r\n </div>\r\n <div class=\"preview-list__row\" *ngFor=\"let device of userCreationWizardService.overviewDevices\">\r\n <span>{{ device.name }}</span>\r\n <span>{{ device.deviceType }}</span>\r\n <span>{{ device.lines }}</span>\r\n <span>{{ device.description }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n </div>\r\n\r\n <ng-container *ngIf=\"userCreationWizardService.overviewDeviceProfiles.length\">\r\n <div class=\"details-step-divider\"></div>\r\n\r\n <div class=\"details-step-sections\">\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">Device profiles</h3>\r\n <div class=\"details-step-section__content\">\r\n <div class=\"preview-list\" [style.--preview-cols]=\"DEVICES_COLS.length\">\r\n <div class=\"preview-list__header\">\r\n <span *ngFor=\"let col of DEVICES_COLS\">{{ col }}</span>\r\n </div>\r\n <div class=\"preview-list__row\" *ngFor=\"let device of userCreationWizardService.overviewDeviceProfiles\">\r\n <span>{{ device.name }}</span>\r\n <span>{{ device.deviceType }}</span>\r\n <span>{{ device.lines }}</span>\r\n <span>{{ device.description }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n </div>\r\n </ng-container>\r\n\r\n <div class=\"details-step-divider\"></div>\r\n\r\n <div class=\"details-step-sections\">\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">Single Number Reach</h3>\r\n <div class=\"details-step-section__content\"></div>\r\n </section>\r\n </div>\r\n\r\n <div class=\"details-step-divider\"></div>\r\n\r\n <div class=\"details-step-sections\">\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">Features</h3>\r\n <div class=\"details-step-section__content\">\r\n <span style=\"margin-right: 1rem;\">Voicemail</span> 557046\r\n </div>\r\n </section>\r\n </div>\r\n</section>\r\n", styles: [".details-step-content{display:flex;flex-direction:column;gap:24px}.details-step-divider{border-top:1px solid #d9d9d9}.details-step-sections{display:flex;flex-direction:column}.details-step-section{display:flex;flex-direction:column;gap:16px}.details-step-section+.details-step-section{border-top:1px solid #d9d9d9}.details-step-section__title{margin:0;font-family:Inter,sans-serif;font-size:16px;font-weight:600;line-height:100%;letter-spacing:0;color:#333}.preview-list{display:flex;flex-direction:column;gap:4px}.preview-list__header,.preview-list__row{display:grid;grid-template-columns:repeat(var(--preview-cols, 1),minmax(0,1fr));column-gap:24px}.preview-list__header>span,.preview-list__row>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--Gray-700, #737480);font-family:Inter,sans-serif;font-size:12px;font-style:normal;font-weight:400;line-height:16px}.preview-list__row>span{min-width:0;color:var(--Gray-700, #333);font-family:Inter,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:150%}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
931
1959
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserOverviewStepComponent, decorators: [{
|
|
932
1960
|
type: Component,
|
|
933
|
-
args: [{ selector: 'tk-user-overview-step', template: "<section class=\"details-step-content\">\r\n <div class=\"details-step-sections\">\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">User details</h3>\r\n <div class=\"details-step-section__content\">\r\n <div class=\"preview-list\" [style.--preview-cols]=\"USER_DETAILS_COLS.length\">\r\n <div class=\"preview-list__header\">\r\n <span *ngFor=\"let col of USER_DETAILS_COLS\">{{ col }}</span>\r\n </div>\r\n <div class=\"preview-list__row\" *ngFor=\"let user of userCreationWizardService.overviewUsers\">\r\n <span>{{ user.userId }}</span>\r\n <span>{{ user.firstName }}</span>\r\n <span>{{ user.lastName }}</span>\r\n <span>{{ user.email }}</span>\r\n <span>{{ user.userTemplate }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n </div>\r\n
|
|
1961
|
+
args: [{ selector: 'tk-user-overview-step', template: "<section class=\"details-step-content\">\r\n <div class=\"details-step-sections\">\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">User details</h3>\r\n <div class=\"details-step-section__content\">\r\n <div class=\"preview-list\" [style.--preview-cols]=\"USER_DETAILS_COLS.length\">\r\n <div class=\"preview-list__header\">\r\n <span *ngFor=\"let col of USER_DETAILS_COLS\">{{ col }}</span>\r\n </div>\r\n <div class=\"preview-list__row\" *ngFor=\"let user of userCreationWizardService.overviewUsers\">\r\n <span>{{ user.userId }}</span>\r\n <span>{{ user.firstName }}</span>\r\n <span>{{ user.lastName }}</span>\r\n <span>{{ user.email }}</span>\r\n <span>{{ user.userTemplate }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n </div>\r\n\r\n <div class=\"details-step-divider\"></div>\r\n\r\n <div class=\"details-step-sections\">\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">Lines</h3>\r\n <div class=\"details-step-section__content\">\r\n <div class=\"preview-list\" [style.--preview-cols]=\"LINES_COLS.length\">\r\n <div class=\"preview-list__header\">\r\n <span *ngFor=\"let col of LINES_COLS\">{{ col }}</span>\r\n </div>\r\n <div class=\"preview-list__row\" *ngFor=\"let line of userCreationWizardService.overviewLines\">\r\n <span>{{ line.number }}</span>\r\n <span>{{ line.did }}</span>\r\n <span>{{ line.routePartitionName }}</span>\r\n <span>{{ line.css }}</span>\r\n <span>{{ line.description }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n </div>\r\n\r\n <div class=\"details-step-divider\"></div>\r\n\r\n <div class=\"details-step-sections\">\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">Devices</h3>\r\n <div class=\"details-step-section__content\">\r\n <div class=\"preview-list\" [style.--preview-cols]=\"DEVICES_COLS.length\">\r\n <div class=\"preview-list__header\">\r\n <span *ngFor=\"let col of DEVICES_COLS\">{{ col }}</span>\r\n </div>\r\n <div class=\"preview-list__row\" *ngFor=\"let device of userCreationWizardService.overviewDevices\">\r\n <span>{{ device.name }}</span>\r\n <span>{{ device.deviceType }}</span>\r\n <span>{{ device.lines }}</span>\r\n <span>{{ device.description }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n </div>\r\n\r\n <ng-container *ngIf=\"userCreationWizardService.overviewDeviceProfiles.length\">\r\n <div class=\"details-step-divider\"></div>\r\n\r\n <div class=\"details-step-sections\">\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">Device profiles</h3>\r\n <div class=\"details-step-section__content\">\r\n <div class=\"preview-list\" [style.--preview-cols]=\"DEVICES_COLS.length\">\r\n <div class=\"preview-list__header\">\r\n <span *ngFor=\"let col of DEVICES_COLS\">{{ col }}</span>\r\n </div>\r\n <div class=\"preview-list__row\" *ngFor=\"let device of userCreationWizardService.overviewDeviceProfiles\">\r\n <span>{{ device.name }}</span>\r\n <span>{{ device.deviceType }}</span>\r\n <span>{{ device.lines }}</span>\r\n <span>{{ device.description }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n </div>\r\n </ng-container>\r\n\r\n <div class=\"details-step-divider\"></div>\r\n\r\n <div class=\"details-step-sections\">\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">Single Number Reach</h3>\r\n <div class=\"details-step-section__content\"></div>\r\n </section>\r\n </div>\r\n\r\n <div class=\"details-step-divider\"></div>\r\n\r\n <div class=\"details-step-sections\">\r\n <section class=\"details-step-section\">\r\n <h3 class=\"details-step-section__title\">Features</h3>\r\n <div class=\"details-step-section__content\">\r\n <span style=\"margin-right: 1rem;\">Voicemail</span> 557046\r\n </div>\r\n </section>\r\n </div>\r\n</section>\r\n", styles: [".details-step-content{display:flex;flex-direction:column;gap:24px}.details-step-divider{border-top:1px solid #d9d9d9}.details-step-sections{display:flex;flex-direction:column}.details-step-section{display:flex;flex-direction:column;gap:16px}.details-step-section+.details-step-section{border-top:1px solid #d9d9d9}.details-step-section__title{margin:0;font-family:Inter,sans-serif;font-size:16px;font-weight:600;line-height:100%;letter-spacing:0;color:#333}.preview-list{display:flex;flex-direction:column;gap:4px}.preview-list__header,.preview-list__row{display:grid;grid-template-columns:repeat(var(--preview-cols, 1),minmax(0,1fr));column-gap:24px}.preview-list__header>span,.preview-list__row>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--Gray-700, #737480);font-family:Inter,sans-serif;font-size:12px;font-style:normal;font-weight:400;line-height:16px}.preview-list__row>span{min-width:0;color:var(--Gray-700, #333);font-family:Inter,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:150%}\n"] }]
|
|
934
1962
|
}], ctorParameters: function () { return [{ type: UserCreationWizardService }]; } });
|
|
935
1963
|
|
|
936
1964
|
class UserTemplateStepComponent {
|
|
1965
|
+
get isLoading() {
|
|
1966
|
+
return this.loadingSites || this.loadingSiteData;
|
|
1967
|
+
}
|
|
937
1968
|
constructor(userCreationWizardService, userCreationService, fb) {
|
|
938
1969
|
this.userCreationWizardService = userCreationWizardService;
|
|
939
1970
|
this.userCreationService = userCreationService;
|
|
940
1971
|
this.fb = fb;
|
|
1972
|
+
this.validityChange = new EventEmitter();
|
|
941
1973
|
this.formGroup = this.fb.group({
|
|
942
1974
|
userType: [USER_CREATION_TYPES.CUCM],
|
|
943
1975
|
siteId: [null],
|
|
@@ -945,8 +1977,8 @@ class UserTemplateStepComponent {
|
|
|
945
1977
|
});
|
|
946
1978
|
this.userCreationType = USER_CREATION_TYPES.CUCM;
|
|
947
1979
|
this.USER_CREATION_TYPES = USER_CREATION_TYPES;
|
|
948
|
-
|
|
949
|
-
|
|
1980
|
+
// readonly defaultTemplateName = 'User 8851 Office';
|
|
1981
|
+
// readonly fallbackTemplateId = '-1';
|
|
950
1982
|
this.destroy$ = new Subject();
|
|
951
1983
|
this.sitesList = [];
|
|
952
1984
|
this.sitesList$ = this.userCreationService.sitesList$.pipe(takeUntil(this.destroy$), tap((res) => this.sitesList = res));
|
|
@@ -955,15 +1987,19 @@ class UserTemplateStepComponent {
|
|
|
955
1987
|
const templateControl = this.formGroup.get('userTemplateId');
|
|
956
1988
|
const currentTemplateId = templateControl?.value;
|
|
957
1989
|
const selectedSiteId = this.formGroup.get('siteId')?.value;
|
|
958
|
-
const defaultTemplate = this.templates.find(
|
|
1990
|
+
// const defaultTemplate = this.templates.find(
|
|
1991
|
+
// template => template.name === this.defaultTemplateName
|
|
1992
|
+
// );
|
|
959
1993
|
const hasSelectedSite = selectedSiteId !== null && selectedSiteId !== undefined;
|
|
960
|
-
if (hasSelectedSite && defaultTemplate && String(currentTemplateId || '') !== String(defaultTemplate.id)) {
|
|
961
|
-
|
|
962
|
-
}
|
|
1994
|
+
// if (hasSelectedSite && defaultTemplate && String(currentTemplateId || '') !== String(defaultTemplate.id)) {
|
|
1995
|
+
// templateControl?.setValue(String(defaultTemplate.id));
|
|
1996
|
+
// }
|
|
963
1997
|
}), takeUntil(this.destroy$));
|
|
964
1998
|
this.isTemplateSelectable = false;
|
|
965
1999
|
this.templates = [];
|
|
966
|
-
this.
|
|
2000
|
+
this.loadingSites = false;
|
|
2001
|
+
this.loadingSiteData = false;
|
|
2002
|
+
this.templateToggleFormControl = new FormControl(false);
|
|
967
2003
|
}
|
|
968
2004
|
ngOnInit() {
|
|
969
2005
|
this.formGroup.get('userType').valueChanges
|
|
@@ -977,10 +2013,24 @@ class UserTemplateStepComponent {
|
|
|
977
2013
|
.pipe(
|
|
978
2014
|
// filter((value) => value !== null && value !== undefined),
|
|
979
2015
|
tap((value) => {
|
|
980
|
-
this.formGroup.get('userTemplateId')?.setValue(this.fallbackTemplateId);
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
2016
|
+
// this.formGroup.get('userTemplateId')?.setValue(this.fallbackTemplateId);
|
|
2017
|
+
const selectedSite = this.sitesList.find(site => String(site.id) === String(value));
|
|
2018
|
+
if (selectedSite) {
|
|
2019
|
+
this.userCreationWizardService.setCurrentSite(selectedSite);
|
|
2020
|
+
}
|
|
2021
|
+
return this.userCreationWizardService.setSelectedSite(value);
|
|
2022
|
+
}), takeUntil(this.destroy$), switchMap((value) => {
|
|
2023
|
+
if (value === null || value === undefined || value === '') {
|
|
2024
|
+
this.loadingSiteData = false;
|
|
2025
|
+
return of(null);
|
|
2026
|
+
}
|
|
2027
|
+
this.loadingSiteData = true;
|
|
2028
|
+
return forkJoin([
|
|
2029
|
+
this.userCreationService.fetchAllUserTemplates(Number(value)),
|
|
2030
|
+
this.userCreationWizardService.getSiteAllData(Number(value)),
|
|
2031
|
+
]).pipe(finalize(() => {
|
|
2032
|
+
this.loadingSiteData = false;
|
|
2033
|
+
}));
|
|
984
2034
|
}))
|
|
985
2035
|
.subscribe();
|
|
986
2036
|
// .subscribe((value) => {
|
|
@@ -988,35 +2038,39 @@ class UserTemplateStepComponent {
|
|
|
988
2038
|
// })
|
|
989
2039
|
this.formGroup.get('userTemplateId').valueChanges
|
|
990
2040
|
.pipe(filter((value) => value !== null && value !== undefined && String(value).trim().length > 0), takeUntil(this.destroy$), switchMap((value) => {
|
|
991
|
-
if (String(value) === this.fallbackTemplateId) {
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
}
|
|
2041
|
+
// if (String(value) === this.fallbackTemplateId) {
|
|
2042
|
+
// this.userCreationWizardService.setSelectedTemplate(this.defaultTemplateName);
|
|
2043
|
+
// return of(null);
|
|
2044
|
+
// }
|
|
995
2045
|
return this.userCreationService.getUserTemplateToken(String(value), String(String(this.customerId)))
|
|
996
2046
|
.pipe(tap((payload) => {
|
|
997
2047
|
const selectedTemplate = this.templates.find(template => String(template.id) === String(value));
|
|
998
|
-
this.userCreationWizardService.setSelectedTemplate(selectedTemplate
|
|
2048
|
+
this.userCreationWizardService.setSelectedTemplate(selectedTemplate);
|
|
999
2049
|
this.userCreationWizardService.applyTemplateTokenPayload(payload);
|
|
1000
2050
|
}));
|
|
1001
2051
|
}))
|
|
1002
2052
|
.subscribe();
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
2053
|
+
this.templateToggleFormControl.valueChanges
|
|
2054
|
+
.pipe(startWith(true), takeUntil(this.destroy$), distinctUntilChanged())
|
|
2055
|
+
.subscribe((value) => {
|
|
2056
|
+
if (value === true) {
|
|
2057
|
+
const siteId = this.formGroup.get('siteId')?.value || 7095;
|
|
2058
|
+
this.userCreationService.fetchAllUserTemplates(siteId)
|
|
2059
|
+
.subscribe();
|
|
2060
|
+
}
|
|
2061
|
+
else {
|
|
2062
|
+
this.formGroup.get('userTemplateId')?.reset();
|
|
2063
|
+
}
|
|
2064
|
+
});
|
|
1014
2065
|
this.getData();
|
|
2066
|
+
this.formGroup.statusChanges
|
|
2067
|
+
.pipe(startWith(this.formGroup.status), takeUntil(this.destroy$))
|
|
2068
|
+
.subscribe(() => this.validityChange.emit(this.isStepValid()));
|
|
1015
2069
|
}
|
|
1016
2070
|
reseFieldstForm() {
|
|
1017
2071
|
this.formGroup.get('siteId')?.reset();
|
|
1018
2072
|
this.formGroup.get('userTemplateId')?.reset();
|
|
1019
|
-
this.userCreationWizardService.setSelectedTemplate(
|
|
2073
|
+
this.userCreationWizardService.setSelectedTemplate();
|
|
1020
2074
|
this.userCreationWizardService.resetTemplateDrivenData();
|
|
1021
2075
|
}
|
|
1022
2076
|
getData() {
|
|
@@ -1026,7 +2080,10 @@ class UserTemplateStepComponent {
|
|
|
1026
2080
|
.subscribe();
|
|
1027
2081
|
}
|
|
1028
2082
|
getSites(isOnlyWithLocations) {
|
|
1029
|
-
|
|
2083
|
+
this.loadingSites = true;
|
|
2084
|
+
return this.userCreationService.getAllCustomerSites(String(this.customerId), isOnlyWithLocations).pipe(finalize(() => {
|
|
2085
|
+
this.loadingSites = false;
|
|
2086
|
+
}));
|
|
1030
2087
|
}
|
|
1031
2088
|
isCUCM(site) {
|
|
1032
2089
|
return site?.cucm?.id === 2542;
|
|
@@ -1036,29 +2093,51 @@ class UserTemplateStepComponent {
|
|
|
1036
2093
|
const foundedSite = this.sitesList.find((site) => site.id === siteId);
|
|
1037
2094
|
return siteId && foundedSite ? foundedSite.name : '';
|
|
1038
2095
|
}
|
|
2096
|
+
getSelectedTemplateName() {
|
|
2097
|
+
const templateId = this.formGroup.get('userTemplateId')?.value;
|
|
2098
|
+
const foundedTemplate = this.templates.find((template) => String(template.id) === String(templateId));
|
|
2099
|
+
return templateId && foundedTemplate ? foundedTemplate.name : '';
|
|
2100
|
+
}
|
|
2101
|
+
isStepValid() {
|
|
2102
|
+
const siteId = this.formGroup.get('siteId')?.value;
|
|
2103
|
+
const templateId = this.formGroup.get('userTemplateId')?.value;
|
|
2104
|
+
return siteId !== null && siteId !== undefined && String(templateId || '').trim().length > 0;
|
|
2105
|
+
}
|
|
2106
|
+
markStepTouched() {
|
|
2107
|
+
this.formGroup.get('siteId')?.markAsTouched();
|
|
2108
|
+
this.formGroup.get('userTemplateId')?.markAsTouched();
|
|
2109
|
+
}
|
|
1039
2110
|
ngOnDestroy() {
|
|
1040
2111
|
this.destroy$.next();
|
|
1041
2112
|
this.destroy$.complete();
|
|
1042
2113
|
}
|
|
1043
2114
|
}
|
|
1044
|
-
UserTemplateStepComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserTemplateStepComponent, deps: [{ token: UserCreationWizardService }, { token: UserCreationApiService }, { token:
|
|
1045
|
-
UserTemplateStepComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: UserTemplateStepComponent, selector: "tk-user-template-step", inputs: { customerId: "customerId" }, ngImport: i0, template: "<section class=\"template-step-content\">\r\n <ng-container [formGroup]=\"formGroup\">\r\n <!-- <div class=\"template-step-field template-step-field--user-type\">\r\n <label class=\"template-step-label\">User type</label>\r\n <mat-radio-group class=\"user-type-mat-radio-group\" formControlName=\"userType\">\r\n <mat-radio-button class=\"user-type-mat-radio\" id=\"userCreationCucm\" [value]=\"USER_CREATION_TYPES.CUCM\">\r\n UCM/DI\r\n </mat-radio-button>\r\n <mat-radio-button class=\"user-type-mat-radio\" id=\"userCreationMT\" [value]=\"USER_CREATION_TYPES.MT\">\r\n MT\r\n </mat-radio-button>\r\n </mat-radio-group>\r\n </div> -->\r\n\r\n <div class=\"template-step-field\">\r\n <label class=\"template-step-label\">Select site</label>\r\n <mat-form-field class=\"template-step-select\" appearance=\"outline\">\r\n <mat-select\r\n placeholder=\"Site name\"\r\n formControlName=\"siteId\">\r\n\r\n <mat-select-trigger>\r\n {{ getSelectedSiteName() }}\r\n </mat-select-trigger>\r\n\r\n <mat-option *ngFor=\"let site of sitesList$ | async\" [value]=\"site.id\">\r\n <div class=\"option-row\">\r\n <span class=\"name\">{{ site.name }}</span>\r\n <span *ngIf=\"site.name === 'Berlin' else notBerlinSite\" class=\"type\">{{ 'Multi Tenant' }}</span>\r\n <ng-template #notBerlinSite>\r\n <span class=\"type\">{{ isCUCM(site) ? 'UCM' : 'Dedicated Instance' }}</span>\r\n </ng-template>\r\n </div>\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n\r\n <ng-container *ngIf=\"formGroup.get('userType')?.value === USER_CREATION_TYPES.CUCM\">\r\n <div class=\"template-step-field\">\r\n <!-- <label class=\"template-step-label\">Would you like to use a template for the user creation?</label
|
|
2115
|
+
UserTemplateStepComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserTemplateStepComponent, deps: [{ token: UserCreationWizardService }, { token: UserCreationApiService }, { token: i1$2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
|
|
2116
|
+
UserTemplateStepComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: UserTemplateStepComponent, selector: "tk-user-template-step", inputs: { customerId: "customerId" }, outputs: { validityChange: "validityChange" }, ngImport: i0, template: "<section class=\"template-step-content\">\r\n <app-loader *ngIf=\"isLoading\"></app-loader>\r\n <ng-container [formGroup]=\"formGroup\">\r\n <!-- <div class=\"template-step-field template-step-field--user-type\">\r\n <label class=\"template-step-label\">User type</label>\r\n <mat-radio-group class=\"user-type-mat-radio-group\" formControlName=\"userType\">\r\n <mat-radio-button class=\"user-type-mat-radio\" id=\"userCreationCucm\" [value]=\"USER_CREATION_TYPES.CUCM\">\r\n UCM/DI\r\n </mat-radio-button>\r\n <mat-radio-button class=\"user-type-mat-radio\" id=\"userCreationMT\" [value]=\"USER_CREATION_TYPES.MT\">\r\n MT\r\n </mat-radio-button>\r\n </mat-radio-group>\r\n </div> -->\r\n\r\n <div class=\"template-step-field\">\r\n <label class=\"template-step-label\">Select site</label>\r\n <mat-form-field class=\"template-step-select\" appearance=\"outline\">\r\n <mat-select\r\n placeholder=\"Site name\"\r\n formControlName=\"siteId\">\r\n\r\n <mat-select-trigger>\r\n {{ getSelectedSiteName() }}\r\n </mat-select-trigger>\r\n\r\n <mat-option *ngFor=\"let site of sitesList$ | async\" [value]=\"site.id\">\r\n <div class=\"option-row\">\r\n <span class=\"name\">{{ site.name }}</span>\r\n <span *ngIf=\"site.name === 'Berlin' else notBerlinSite\" class=\"type\">{{ 'Multi Tenant' }}</span>\r\n <ng-template #notBerlinSite>\r\n <span class=\"type\">{{ isCUCM(site) ? 'UCM' : 'Dedicated Instance' }}</span>\r\n </ng-template>\r\n </div>\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n\r\n <ng-container *ngIf=\"formGroup.get('userType')?.value === USER_CREATION_TYPES.CUCM\">\r\n <div class=\"template-step-field\">\r\n <!-- <label class=\"template-step-label\">Would you like to use a template for the user creation?</label> -->\r\n <!-- <mat-radio-group [formControl]=\"templateToggleFormControl\">\r\n <mat-radio-button [color]=\"'primary'\" [value]=\"true\">\r\n {{ 'Yes' }}\r\n </mat-radio-button>\r\n <mat-radio-button [color]=\"'primary'\" [value]=\"false\">\r\n {{ 'No' }}\r\n </mat-radio-button>\r\n </mat-radio-group> -->\r\n\r\n <!-- <ng-container *ngIf=\"templateToggleFormControl.value === true\"> -->\r\n <label class=\"template-step-label\">Select user template</label>\r\n <mat-form-field class=\"template-step-select\" appearance=\"outline\">\r\n <mat-select\r\n placeholder=\"Templates\"\r\n formControlName=\"userTemplateId\">\r\n <mat-select-trigger>\r\n <span matTooltip=\"'A new user will be created based on the selected template, including a Cisco 8851 physical device with a single line configured, without SNR (Single Number Reach) and without voicemail.'\">\r\n {{ getSelectedTemplateName() }}\r\n </span>\r\n </mat-select-trigger>\r\n <mat-option *ngFor=\"let template of templatesList$ | async\" [value]=\"template.id\">\r\n {{ template.name }}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n <!-- </ng-container> -->\r\n </div>\r\n </ng-container>\r\n \r\n </ng-container>\r\n</section>\r\n", styles: [".template-step-content{display:flex;flex-direction:column;gap:20px;max-width:420px}.template-step-field{display:flex;flex-direction:column;gap:10px}.template-step-field .mat-radio-group{display:flex;gap:10px}.template-step-field--user-type{margin-bottom:6px}.template-step-label{font-size:14px;font-weight:600;line-height:100%;letter-spacing:.1px;color:#2a2f3b}.template-step-select{width:100%;max-width:333px}.user-type-mat-radio-group{display:flex;flex-direction:column;gap:10px;margin-left:16px;margin-top:8px}.user-type-mat-radio{color:#2a2f3b;font-size:14px;font-weight:500}:host ::ng-deep .user-type-mat-radio .mat-radio-label{gap:10px}:host ::ng-deep .user-type-mat-radio .mat-radio-outer-circle{border-color:#8a93a3;border-width:2px}:host ::ng-deep .user-type-mat-radio .mat-radio-inner-circle{background-color:#1170cf}:host ::ng-deep .user-type-mat-radio.mat-radio-checked .mat-radio-outer-circle{border-color:#1170cf}:host ::ng-deep .user-type-mat-radio.mat-radio-checked .mat-radio-ripple .mat-ripple-element{background-color:#1176ce26!important}:host ::ng-deep .user-type-mat-radio .mdc-radio__outer-circle{border-color:#8a93a3!important;border-width:2px!important}:host ::ng-deep .user-type-mat-radio .mdc-radio__inner-circle{border-color:#1170cf!important}:host ::ng-deep .user-type-mat-radio.mat-mdc-radio-checked .mdc-radio__outer-circle{border-color:#1170cf!important}:host ::ng-deep .user-type-mat-radio.mat-mdc-radio-checked .mdc-radio__background:before{background-color:#1176ce1f!important}:host ::ng-deep .template-step-select .mat-form-field-wrapper{padding-bottom:0}:host ::ng-deep .template-step-select .mat-form-field-flex{align-items:center;height:32px;border:1px solid #767676;border-radius:6px;padding:0 12px}:host ::ng-deep .template-step-select .mat-form-field-outline,:host ::ng-deep .template-step-select .mat-form-field-outline-start,:host ::ng-deep .template-step-select .mat-form-field-outline-end,:host ::ng-deep .template-step-select .mat-form-field-outline-gap{display:none}:host ::ng-deep .template-step-select .mat-form-field-infix{width:100%;border-top:0;padding:0}:host ::ng-deep .template-step-select .mat-select-trigger{display:flex;align-items:center;justify-content:space-between;height:100%}::ng-deep .option-row{display:flex;justify-content:space-between;align-items:center;width:100%}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "component", type: i7$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "directive", type: i7$1.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i11.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: AppLoaderComponent, selector: "app-loader" }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }] });
|
|
1046
2117
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserTemplateStepComponent, decorators: [{
|
|
1047
2118
|
type: Component,
|
|
1048
|
-
args: [{ selector: 'tk-user-template-step', template: "<section class=\"template-step-content\">\r\n <ng-container [formGroup]=\"formGroup\">\r\n <!-- <div class=\"template-step-field template-step-field--user-type\">\r\n <label class=\"template-step-label\">User type</label>\r\n <mat-radio-group class=\"user-type-mat-radio-group\" formControlName=\"userType\">\r\n <mat-radio-button class=\"user-type-mat-radio\" id=\"userCreationCucm\" [value]=\"USER_CREATION_TYPES.CUCM\">\r\n UCM/DI\r\n </mat-radio-button>\r\n <mat-radio-button class=\"user-type-mat-radio\" id=\"userCreationMT\" [value]=\"USER_CREATION_TYPES.MT\">\r\n MT\r\n </mat-radio-button>\r\n </mat-radio-group>\r\n </div> -->\r\n\r\n <div class=\"template-step-field\">\r\n <label class=\"template-step-label\">Select site</label>\r\n <mat-form-field class=\"template-step-select\" appearance=\"outline\">\r\n <mat-select\r\n placeholder=\"Site name\"\r\n formControlName=\"siteId\">\r\n\r\n <mat-select-trigger>\r\n {{ getSelectedSiteName() }}\r\n </mat-select-trigger>\r\n\r\n <mat-option *ngFor=\"let site of sitesList$ | async\" [value]=\"site.id\">\r\n <div class=\"option-row\">\r\n <span class=\"name\">{{ site.name }}</span>\r\n <span *ngIf=\"site.name === 'Berlin' else notBerlinSite\" class=\"type\">{{ 'Multi Tenant' }}</span>\r\n <ng-template #notBerlinSite>\r\n <span class=\"type\">{{ isCUCM(site) ? 'UCM' : 'Dedicated Instance' }}</span>\r\n </ng-template>\r\n </div>\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n\r\n <ng-container *ngIf=\"formGroup.get('userType')?.value === USER_CREATION_TYPES.CUCM\">\r\n <div class=\"template-step-field\">\r\n <!-- <label class=\"template-step-label\">Would you like to use a template for the user creation?</label
|
|
1049
|
-
}], ctorParameters: function () { return [{ type: UserCreationWizardService }, { type: UserCreationApiService }, { type:
|
|
2119
|
+
args: [{ selector: 'tk-user-template-step', template: "<section class=\"template-step-content\">\r\n <app-loader *ngIf=\"isLoading\"></app-loader>\r\n <ng-container [formGroup]=\"formGroup\">\r\n <!-- <div class=\"template-step-field template-step-field--user-type\">\r\n <label class=\"template-step-label\">User type</label>\r\n <mat-radio-group class=\"user-type-mat-radio-group\" formControlName=\"userType\">\r\n <mat-radio-button class=\"user-type-mat-radio\" id=\"userCreationCucm\" [value]=\"USER_CREATION_TYPES.CUCM\">\r\n UCM/DI\r\n </mat-radio-button>\r\n <mat-radio-button class=\"user-type-mat-radio\" id=\"userCreationMT\" [value]=\"USER_CREATION_TYPES.MT\">\r\n MT\r\n </mat-radio-button>\r\n </mat-radio-group>\r\n </div> -->\r\n\r\n <div class=\"template-step-field\">\r\n <label class=\"template-step-label\">Select site</label>\r\n <mat-form-field class=\"template-step-select\" appearance=\"outline\">\r\n <mat-select\r\n placeholder=\"Site name\"\r\n formControlName=\"siteId\">\r\n\r\n <mat-select-trigger>\r\n {{ getSelectedSiteName() }}\r\n </mat-select-trigger>\r\n\r\n <mat-option *ngFor=\"let site of sitesList$ | async\" [value]=\"site.id\">\r\n <div class=\"option-row\">\r\n <span class=\"name\">{{ site.name }}</span>\r\n <span *ngIf=\"site.name === 'Berlin' else notBerlinSite\" class=\"type\">{{ 'Multi Tenant' }}</span>\r\n <ng-template #notBerlinSite>\r\n <span class=\"type\">{{ isCUCM(site) ? 'UCM' : 'Dedicated Instance' }}</span>\r\n </ng-template>\r\n </div>\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n\r\n <ng-container *ngIf=\"formGroup.get('userType')?.value === USER_CREATION_TYPES.CUCM\">\r\n <div class=\"template-step-field\">\r\n <!-- <label class=\"template-step-label\">Would you like to use a template for the user creation?</label> -->\r\n <!-- <mat-radio-group [formControl]=\"templateToggleFormControl\">\r\n <mat-radio-button [color]=\"'primary'\" [value]=\"true\">\r\n {{ 'Yes' }}\r\n </mat-radio-button>\r\n <mat-radio-button [color]=\"'primary'\" [value]=\"false\">\r\n {{ 'No' }}\r\n </mat-radio-button>\r\n </mat-radio-group> -->\r\n\r\n <!-- <ng-container *ngIf=\"templateToggleFormControl.value === true\"> -->\r\n <label class=\"template-step-label\">Select user template</label>\r\n <mat-form-field class=\"template-step-select\" appearance=\"outline\">\r\n <mat-select\r\n placeholder=\"Templates\"\r\n formControlName=\"userTemplateId\">\r\n <mat-select-trigger>\r\n <span matTooltip=\"'A new user will be created based on the selected template, including a Cisco 8851 physical device with a single line configured, without SNR (Single Number Reach) and without voicemail.'\">\r\n {{ getSelectedTemplateName() }}\r\n </span>\r\n </mat-select-trigger>\r\n <mat-option *ngFor=\"let template of templatesList$ | async\" [value]=\"template.id\">\r\n {{ template.name }}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n <!-- </ng-container> -->\r\n </div>\r\n </ng-container>\r\n \r\n </ng-container>\r\n</section>\r\n", styles: [".template-step-content{display:flex;flex-direction:column;gap:20px;max-width:420px}.template-step-field{display:flex;flex-direction:column;gap:10px}.template-step-field .mat-radio-group{display:flex;gap:10px}.template-step-field--user-type{margin-bottom:6px}.template-step-label{font-size:14px;font-weight:600;line-height:100%;letter-spacing:.1px;color:#2a2f3b}.template-step-select{width:100%;max-width:333px}.user-type-mat-radio-group{display:flex;flex-direction:column;gap:10px;margin-left:16px;margin-top:8px}.user-type-mat-radio{color:#2a2f3b;font-size:14px;font-weight:500}:host ::ng-deep .user-type-mat-radio .mat-radio-label{gap:10px}:host ::ng-deep .user-type-mat-radio .mat-radio-outer-circle{border-color:#8a93a3;border-width:2px}:host ::ng-deep .user-type-mat-radio .mat-radio-inner-circle{background-color:#1170cf}:host ::ng-deep .user-type-mat-radio.mat-radio-checked .mat-radio-outer-circle{border-color:#1170cf}:host ::ng-deep .user-type-mat-radio.mat-radio-checked .mat-radio-ripple .mat-ripple-element{background-color:#1176ce26!important}:host ::ng-deep .user-type-mat-radio .mdc-radio__outer-circle{border-color:#8a93a3!important;border-width:2px!important}:host ::ng-deep .user-type-mat-radio .mdc-radio__inner-circle{border-color:#1170cf!important}:host ::ng-deep .user-type-mat-radio.mat-mdc-radio-checked .mdc-radio__outer-circle{border-color:#1170cf!important}:host ::ng-deep .user-type-mat-radio.mat-mdc-radio-checked .mdc-radio__background:before{background-color:#1176ce1f!important}:host ::ng-deep .template-step-select .mat-form-field-wrapper{padding-bottom:0}:host ::ng-deep .template-step-select .mat-form-field-flex{align-items:center;height:32px;border:1px solid #767676;border-radius:6px;padding:0 12px}:host ::ng-deep .template-step-select .mat-form-field-outline,:host ::ng-deep .template-step-select .mat-form-field-outline-start,:host ::ng-deep .template-step-select .mat-form-field-outline-end,:host ::ng-deep .template-step-select .mat-form-field-outline-gap{display:none}:host ::ng-deep .template-step-select .mat-form-field-infix{width:100%;border-top:0;padding:0}:host ::ng-deep .template-step-select .mat-select-trigger{display:flex;align-items:center;justify-content:space-between;height:100%}::ng-deep .option-row{display:flex;justify-content:space-between;align-items:center;width:100%}\n"] }]
|
|
2120
|
+
}], ctorParameters: function () { return [{ type: UserCreationWizardService }, { type: UserCreationApiService }, { type: i1$2.FormBuilder }]; }, propDecorators: { customerId: [{
|
|
1050
2121
|
type: Input
|
|
2122
|
+
}], validityChange: [{
|
|
2123
|
+
type: Output
|
|
1051
2124
|
}] } });
|
|
1052
2125
|
|
|
2126
|
+
const USER_CREATED_SUCCESSFLLY = 'User created successfully';
|
|
1053
2127
|
class UserCreationWizardComponent {
|
|
1054
2128
|
constructor(notificationService) {
|
|
1055
2129
|
this.notificationService = notificationService;
|
|
1056
2130
|
this.apiService = inject(APIService);
|
|
2131
|
+
this.userCreationWizardService = inject(UserCreationWizardService);
|
|
1057
2132
|
this.title = 'Create User';
|
|
1058
2133
|
this.cancel = new EventEmitter();
|
|
1059
2134
|
this.submit = new EventEmitter();
|
|
1060
2135
|
this.isSubmitting = false;
|
|
1061
2136
|
this.submitTimerId = null;
|
|
2137
|
+
this.selectedIndex = 0;
|
|
2138
|
+
this.templateStepValid = false;
|
|
2139
|
+
this.detailsStepValid = false;
|
|
2140
|
+
this.isLoading = false;
|
|
1062
2141
|
}
|
|
1063
2142
|
ngOnInit() {
|
|
1064
2143
|
this.apiService.token = this.token;
|
|
@@ -1067,18 +2146,35 @@ class UserCreationWizardComponent {
|
|
|
1067
2146
|
onCancel() {
|
|
1068
2147
|
this.cancel.emit();
|
|
1069
2148
|
}
|
|
2149
|
+
onStepperNext(stepper) {
|
|
2150
|
+
if (stepper.selectedIndex === 0) {
|
|
2151
|
+
if (!this.templateStep?.isStepValid()) {
|
|
2152
|
+
this.templateStep?.markStepTouched();
|
|
2153
|
+
return;
|
|
2154
|
+
}
|
|
2155
|
+
}
|
|
2156
|
+
if (stepper.selectedIndex === 1) {
|
|
2157
|
+
if (!this.detailsStep?.isStepValid()) {
|
|
2158
|
+
this.detailsStep?.markAllAsTouched();
|
|
2159
|
+
return;
|
|
2160
|
+
}
|
|
2161
|
+
this.detailsStep?.syncToService();
|
|
2162
|
+
}
|
|
2163
|
+
stepper.next();
|
|
2164
|
+
}
|
|
1070
2165
|
onSubmit() {
|
|
1071
2166
|
if (this.isSubmitting) {
|
|
1072
2167
|
return;
|
|
1073
2168
|
}
|
|
1074
2169
|
this.isSubmitting = true;
|
|
1075
|
-
const delayMs = 3000 + Math.floor(Math.random() * 1001);
|
|
1076
|
-
this.submitTimerId = window.setTimeout(() => {
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
}, delayMs);
|
|
2170
|
+
// const delayMs = 3000 + Math.floor(Math.random() * 1001);
|
|
2171
|
+
// this.submitTimerId = window.setTimeout(() => {
|
|
2172
|
+
// this.isSubmitting = false;
|
|
2173
|
+
// this.submitTimerId = null;
|
|
2174
|
+
// this.notificationService.success('User created successfully!');
|
|
2175
|
+
// this.submit.emit();
|
|
2176
|
+
// }, delayMs);
|
|
2177
|
+
this._saveChanges();
|
|
1082
2178
|
}
|
|
1083
2179
|
ngOnDestroy() {
|
|
1084
2180
|
if (this.submitTimerId) {
|
|
@@ -1086,12 +2182,29 @@ class UserCreationWizardComponent {
|
|
|
1086
2182
|
this.submitTimerId = null;
|
|
1087
2183
|
}
|
|
1088
2184
|
}
|
|
2185
|
+
_saveChanges() {
|
|
2186
|
+
this.isLoading = true;
|
|
2187
|
+
this.userCreationWizardService.saveNewUser()
|
|
2188
|
+
.subscribe((res) => {
|
|
2189
|
+
this.isLoading = false;
|
|
2190
|
+
this.isSubmitting = false;
|
|
2191
|
+
this.notificationService.success('User created successfully!');
|
|
2192
|
+
this.submit.emit();
|
|
2193
|
+
}, (error) => {
|
|
2194
|
+
this.isLoading = false;
|
|
2195
|
+
this.isSubmitting = false;
|
|
2196
|
+
if (typeof error === 'string' && error.indexOf(USER_CREATED_SUCCESSFLLY) > -1) {
|
|
2197
|
+
this.notificationService.success('User created successfully!');
|
|
2198
|
+
this.submit.emit();
|
|
2199
|
+
}
|
|
2200
|
+
});
|
|
2201
|
+
}
|
|
1089
2202
|
}
|
|
1090
2203
|
UserCreationWizardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserCreationWizardComponent, deps: [{ token: NotificationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1091
|
-
UserCreationWizardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: UserCreationWizardComponent, selector: "tk-user-creation-wizard", inputs: { title: "title", host: "host", token: "token", customerId: "customerId" }, outputs: { cancel: "cancel", submit: "submit" }, ngImport: i0, template: "<app-notification></app-notification>\r\n\r\n<div class=\"move-user-stepper-container\" [attr.aria-busy]=\"isSubmitting\">\r\n <header class=\"move-user-header\">\r\n <div class=\"move-user-header__title\">{{ title }}</div>\r\n <div class=\"move-user-header__close\">\r\n <span class=\"app-icon user-creation-close-icon\" (click)=\"onCancel()\"></span>\r\n </div>\r\n </header>\r\n\r\n <div id=\"user-creation-stepper\">\r\n <mat-stepper [linear]=\"false\" labelPosition=\"bottom\" #stepper>\r\n <mat-step>\r\n <div class=\"step-title\">Step 1: User creation with template</div>\r\n <ng-template matStepLabel>User creation</ng-template>\r\n\r\n <div class=\"move-user-tab-content-box\">\r\n <tk-user-template-step [customerId]=\"customerId\"></tk-user-template-step>\r\n </div>\r\n </mat-step>\r\n\r\n <mat-step>\r\n <div class=\"step-title\">Step 2 : User details</div>\r\n <ng-template matStepLabel>User details</ng-template>\r\n\r\n <div class=\"move-user-tab-content-box\">\r\n <tk-user-details-step></tk-user-details-step>\r\n </div>\r\n </mat-step>\r\n\r\n <mat-step>\r\n <div class=\"step-title\">Step 3: Review</div>\r\n <ng-template matStepLabel>Review</ng-template>\r\n\r\n <div class=\"move-user-tab-content-box\">\r\n <tk-user-overview-step></tk-user-overview-step>\r\n </div>\r\n </mat-step>\r\n </mat-stepper>\r\n\r\n <div class=\"wizard-actions\">\r\n <ng-container [ngSwitch]=\"stepper.selectedIndex\">\r\n <ng-container *ngSwitchCase=\"0\">\r\n <button mat-button class=\"uc-btn uc-btn-primary\" type=\"button\" (click)=\"stepper.next()\">\r\n Next\r\n </button>\r\n <button mat-button class=\"uc-btn uc-btn-secondary\" type=\"button\" (click)=\"onCancel()\">\r\n Cancel\r\n </button>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"1\">\r\n <button mat-button class=\"uc-btn uc-btn-primary\" type=\"button\" (click)=\"stepper.next()\">\r\n Next\r\n </button>\r\n <button mat-button class=\"uc-btn uc-btn-secondary\" type=\"button\" (click)=\"stepper.previous()\">\r\n Previous\r\n </button>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"2\">\r\n <button\r\n mat-button\r\n class=\"uc-btn uc-btn-primary\"\r\n type=\"button\"\r\n [disabled]=\"isSubmitting\"\r\n (click)=\"onSubmit()\"\r\n >\r\n <span class=\"uc-btn__inline-content\">\r\n <span class=\"uc-btn__spinner\" *ngIf=\"isSubmitting\" aria-hidden=\"true\"></span>\r\n <span>{{ isSubmitting ? 'Creating...' : 'Create' }}</span>\r\n </span>\r\n </button>\r\n <button\r\n mat-button\r\n class=\"uc-btn uc-btn-secondary\"\r\n type=\"button\"\r\n [disabled]=\"isSubmitting\"\r\n (click)=\"stepper.previous()\"\r\n >\r\n Previous\r\n </button>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </div>\r\n\r\n <div class=\"wizard-loading-overlay\" [class.wizard-loading-overlay--visible]=\"isSubmitting\" aria-hidden=\"true\"></div>\r\n</div>", styles: [".move-user-stepper-container{background-color:#f3f3f3;padding:0 0 16px;position:relative;overflow:hidden}.move-user-header{background-color:#1170cf;height:45px;padding:1rem 1.5rem;display:flex;align-items:center;justify-content:space-between;color:#fff;font-size:18px;font-weight:500}.move-user-header__close{cursor:pointer;display:flex;align-items:center;justify-content:center;line-height:0}.move-user-header__close i{font-size:25px;font-weight:100}.app-icon{height:20px;width:20px;display:block;cursor:pointer;background-repeat:no-repeat;background-position:center}.user-creation-close-icon{background-image:url(\"data:image/svg+xml,%3Csvg width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0D%3Cpath d%3D%22M13.0606 11.9998L19.2803 5.78001C19.35 5.71038 19.4052 5.6277 19.4429 5.53672C19.4806 5.44573 19.5 5.34822 19.5 5.24974C19.5 5.15126 19.4806 5.05374 19.4429 4.96276C19.4052 4.87177 19.3499 4.7891 19.2803 4.71947C19.2107 4.64983 19.128 4.5946 19.037 4.55691C18.946 4.51923 18.8485 4.49983 18.75 4.49983C18.6515 4.49984 18.554 4.51924 18.463 4.55692C18.3721 4.59461 18.2894 4.64985 18.2198 4.71949L12 10.9392L5.78026 4.71949C5.71077 4.64921 5.62807 4.59335 5.53691 4.55514C5.44576 4.51692 5.34795 4.49711 5.24911 4.49683C5.15027 4.49655 5.05235 4.51581 4.96098 4.55351C4.86961 4.59121 4.78659 4.64659 4.7167 4.71648C4.64681 4.78638 4.59143 4.8694 4.55374 4.96077C4.51605 5.05214 4.49679 5.15006 4.49707 5.2489C4.49736 5.34774 4.51718 5.44555 4.5554 5.5367C4.59361 5.62786 4.64947 5.71055 4.71976 5.78004L10.9395 11.9998L4.71976 18.2195C4.65013 18.2892 4.59489 18.3718 4.5572 18.4628C4.51951 18.5538 4.50011 18.6513 4.50011 18.7498C4.50011 18.8483 4.51951 18.9458 4.5572 19.0368C4.59488 19.1278 4.65012 19.2105 4.71976 19.2801C4.7894 19.3497 4.87207 19.405 4.96305 19.4427C5.05403 19.4803 5.15155 19.4997 5.25003 19.4997C5.34851 19.4997 5.44603 19.4803 5.53701 19.4427C5.628 19.405 5.71067 19.3497 5.78031 19.2801L12.0001 13.0603L18.2198 19.2801C18.3604 19.4207 18.5512 19.4997 18.7501 19.4997C18.949 19.4997 19.1397 19.4207 19.2804 19.2801C19.421 19.1395 19.5 18.9487 19.5 18.7498C19.5 18.5509 19.421 18.3602 19.2804 18.2195L13.0606 11.9998Z%22 fill%3D%22white%22 fill-opacity%3D%220.95%22%2F%3E%0D%3C%2Fsvg%3E%0D\");background-size:20px 20px}#user-creation-stepper{display:flex;flex-direction:column;width:100%}#user-creation-stepper .mat-stepper-horizontal{margin:0 auto;width:100%;background-color:transparent}#user-creation-stepper .mat-horizontal-stepper-header-container{margin:0 auto;width:800px}#user-creation-stepper .mat-step-icon{width:28px;height:28px;border:3px solid hsl(0,0%,50.2%)}#user-creation-stepper .mat-step-icon-selected{background-color:#c6c6c6!important;border-color:#19487d}#user-creation-stepper .mat-step-icon-state-number{background-color:#fff}#user-creation-stepper .mat-step-icon-state-edit,#user-creation-stepper .mat-step-header .mat-step-icon-state-done{background-color:#1170cf;border-color:#1170cf}#user-creation-stepper .mat-step-icon-content{display:none}#user-creation-stepper .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child):before,#user-creation-stepper [dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child):before,#user-creation-stepper .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child):after,#user-creation-stepper [dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child):after{border-top-width:3px!important}#user-creation-stepper .mat-horizontal-stepper-header:before,#user-creation-stepper .mat-horizontal-stepper-header:after,#user-creation-stepper .mat-stepper-horizontal-line{border-top-color:#1170cf!important;border-top-width:3px!important;border-top-style:solid!important}#user-creation-stepper .mat-horizontal-stepper-header[aria-selected=true]~.mat-stepper-horizontal-line,#user-creation-stepper .mat-horizontal-stepper-header[aria-selected=true]~.mat-horizontal-stepper-header:before,#user-creation-stepper .mat-horizontal-stepper-header[aria-selected=true]~.mat-horizontal-stepper-header:after{border-top-width:3px!important;background-color:#7b7b7b!important;border-top-color:#7b7b7b!important}#user-creation-stepper .mat-horizontal-content-container{padding:0!important;margin-top:3rem}#user-creation-stepper .mat-horizontal-stepper-content[aria-expanded=true]{padding-bottom:0}.step-title{font-size:26px;font-weight:500;width:70%;margin:0 auto 1rem;min-height:32px;display:flex;align-items:center}.wizard-actions{display:flex;flex-flow:row-reverse;justify-content:flex-start;align-items:center;margin:16px 16px 0 0;align-self:flex-end;gap:1rem;position:relative;z-index:30}.uc-btn{border-radius:50px!important;padding:8px 16px!important;min-width:80px!important;line-height:normal!important;cursor:pointer}.uc-btn__inline-content{display:inline-flex;align-items:center;gap:8px}.uc-btn__spinner{width:14px;height:14px;border:2px solid rgba(255,255,255,.5);border-top-color:#fff;border-radius:50%;animation:uc-btn-spin .7s linear infinite}@keyframes uc-btn-spin{to{transform:rotate(360deg)}}.uc-btn-primary{background-color:#000!important;color:#fff!important;border:1px solid black!important}.uc-btn-secondary{background-color:#fff!important;color:#000!important;border:1px solid black!important}.move-user-tab-content-box{width:70%;margin:0 auto;background-color:#fff;min-height:350px;border:1px solid #C3C1C1;border-radius:8px;box-sizing:border-box;padding:25px}.wizard-loading-overlay{position:absolute;inset:0;background:rgba(243,243,243,.72);backdrop-filter:blur(1px);opacity:0;pointer-events:none;transition:opacity .18s ease;z-index:20}.wizard-loading-overlay--visible{opacity:1;pointer-events:auto}.mat-button-disabled{background-color:#bbb;color:#fff;border:1px solid grey;cursor:default!important}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4$1.MatStep, selector: "mat-step", inputs: ["color"], exportAs: ["matStep"] }, { kind: "directive", type: i4$1.MatStepLabel, selector: "[matStepLabel]" }, { kind: "component", type: i4$1.MatStepper, selector: "mat-stepper, mat-vertical-stepper, mat-horizontal-stepper, [matStepper]", inputs: ["selectedIndex", "disableRipple", "color", "labelPosition", "headerPosition", "animationDuration"], outputs: ["animationDone"], exportAs: ["matStepper", "matVerticalStepper", "matHorizontalStepper"] }, { kind: "component", type: UserTemplateStepComponent, selector: "tk-user-template-step", inputs: ["customerId"] }, { kind: "component", type: NotificationsComponent, selector: "app-notification" }, { kind: "component", type: UserDetailsStepComponent, selector: "tk-user-details-step" }, { kind: "component", type: UserOverviewStepComponent, selector: "tk-user-overview-step" }], encapsulation: i0.ViewEncapsulation.None });
|
|
2204
|
+
UserCreationWizardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: UserCreationWizardComponent, selector: "tk-user-creation-wizard", inputs: { title: "title", host: "host", token: "token", customerId: "customerId" }, outputs: { cancel: "cancel", submit: "submit" }, viewQueries: [{ propertyName: "templateStep", first: true, predicate: UserTemplateStepComponent, descendants: true }, { propertyName: "detailsStep", first: true, predicate: UserDetailsStepComponent, descendants: true }], ngImport: i0, template: "<app-notification></app-notification>\r\n<app-loader *ngIf=\"isLoading\"></app-loader>\r\n<div class=\"move-user-stepper-container\" [attr.aria-busy]=\"isSubmitting\">\r\n <header class=\"move-user-header\">\r\n <div class=\"move-user-header__title\">{{ title }}</div>\r\n <div class=\"move-user-header__close\">\r\n <span class=\"app-icon user-creation-close-icon\" (click)=\"onCancel()\"></span>\r\n </div>\r\n </header>\r\n\r\n <div id=\"user-creation-stepper\">\r\n <mat-stepper [linear]=\"false\" labelPosition=\"bottom\" #stepper\r\n [selectedIndex]=\"selectedIndex\"\r\n (selectionChange)=\"selectedIndex = $event.selectedIndex\">\r\n\r\n <mat-step>\r\n <div class=\"step-title\">Step 1: User creation with template</div>\r\n <ng-template matStepLabel>User creation</ng-template>\r\n\r\n <ng-container *ngIf=\"selectedIndex === 0\">\r\n <div class=\"move-user-tab-content-box\">\r\n <tk-user-template-step\r\n [customerId]=\"customerId\"\r\n (validityChange)=\"templateStepValid = $event\"\r\n ></tk-user-template-step>\r\n </div>\r\n </ng-container>\r\n </mat-step>\r\n\r\n <mat-step>\r\n <div class=\"step-title\">Step 2 : User details</div>\r\n <ng-template matStepLabel>User details</ng-template>\r\n\r\n <ng-container *ngIf=\"selectedIndex === 1\">\r\n <div class=\"move-user-tab-content-box\">\r\n <tk-user-details-step (validityChange)=\"detailsStepValid = $event\"></tk-user-details-step>\r\n </div>\r\n </ng-container>\r\n </mat-step>\r\n\r\n <mat-step>\r\n <div class=\"step-title\">Step 3: Review</div>\r\n <ng-template matStepLabel>Review</ng-template>\r\n\r\n <ng-container *ngIf=\"selectedIndex === 2\">\r\n <div class=\"move-user-tab-content-box\">\r\n <tk-user-overview-step></tk-user-overview-step>\r\n </div>\r\n </ng-container>\r\n </mat-step>\r\n </mat-stepper>\r\n\r\n <div class=\"wizard-actions\">\r\n <ng-container [ngSwitch]=\"stepper.selectedIndex\">\r\n <ng-container *ngSwitchCase=\"0\">\r\n <button\r\n mat-button\r\n class=\"uc-btn uc-btn-primary\"\r\n type=\"button\"\r\n [disabled]=\"!templateStepValid\"\r\n (click)=\"onStepperNext(stepper)\"\r\n >\r\n Next\r\n </button>\r\n <button mat-button class=\"uc-btn uc-btn-secondary\" type=\"button\" (click)=\"onCancel()\">\r\n Cancel\r\n </button>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"1\">\r\n <button\r\n mat-button\r\n class=\"uc-btn uc-btn-primary\"\r\n type=\"button\"\r\n [disabled]=\"!detailsStepValid\"\r\n (click)=\"onStepperNext(stepper)\"\r\n >\r\n Next\r\n </button>\r\n <button mat-button class=\"uc-btn uc-btn-secondary\" type=\"button\" (click)=\"stepper.previous()\">\r\n Previous\r\n </button>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"2\">\r\n <button\r\n mat-button\r\n class=\"uc-btn uc-btn-primary\"\r\n type=\"button\"\r\n [disabled]=\"isSubmitting\"\r\n (click)=\"onSubmit()\"\r\n >\r\n <span class=\"uc-btn__inline-content\">\r\n <span class=\"uc-btn__spinner\" *ngIf=\"isSubmitting\" aria-hidden=\"true\"></span>\r\n <span>{{ isSubmitting ? 'Creating...' : 'Create' }}</span>\r\n </span>\r\n </button>\r\n <button\r\n mat-button\r\n class=\"uc-btn uc-btn-secondary\"\r\n type=\"button\"\r\n [disabled]=\"isSubmitting\"\r\n (click)=\"stepper.previous()\"\r\n >\r\n Previous\r\n </button>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </div>\r\n\r\n <div class=\"wizard-loading-overlay\" [class.wizard-loading-overlay--visible]=\"isSubmitting\" aria-hidden=\"true\"></div>\r\n</div>", styles: [".move-user-stepper-container{background-color:#f3f3f3;padding:0 0 16px;position:relative;overflow:hidden}.move-user-header{background-color:#1170cf;height:45px;padding:1rem 1.5rem;display:flex;align-items:center;justify-content:space-between;color:#fff;font-size:18px;font-weight:500}.move-user-header__close{cursor:pointer;display:flex;align-items:center;justify-content:center;line-height:0}.move-user-header__close i{font-size:25px;font-weight:100}.app-icon{height:20px;width:20px;display:block;cursor:pointer;background-repeat:no-repeat;background-position:center}.user-creation-close-icon{background-image:url(\"data:image/svg+xml,%3Csvg width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0D%3Cpath d%3D%22M13.0606 11.9998L19.2803 5.78001C19.35 5.71038 19.4052 5.6277 19.4429 5.53672C19.4806 5.44573 19.5 5.34822 19.5 5.24974C19.5 5.15126 19.4806 5.05374 19.4429 4.96276C19.4052 4.87177 19.3499 4.7891 19.2803 4.71947C19.2107 4.64983 19.128 4.5946 19.037 4.55691C18.946 4.51923 18.8485 4.49983 18.75 4.49983C18.6515 4.49984 18.554 4.51924 18.463 4.55692C18.3721 4.59461 18.2894 4.64985 18.2198 4.71949L12 10.9392L5.78026 4.71949C5.71077 4.64921 5.62807 4.59335 5.53691 4.55514C5.44576 4.51692 5.34795 4.49711 5.24911 4.49683C5.15027 4.49655 5.05235 4.51581 4.96098 4.55351C4.86961 4.59121 4.78659 4.64659 4.7167 4.71648C4.64681 4.78638 4.59143 4.8694 4.55374 4.96077C4.51605 5.05214 4.49679 5.15006 4.49707 5.2489C4.49736 5.34774 4.51718 5.44555 4.5554 5.5367C4.59361 5.62786 4.64947 5.71055 4.71976 5.78004L10.9395 11.9998L4.71976 18.2195C4.65013 18.2892 4.59489 18.3718 4.5572 18.4628C4.51951 18.5538 4.50011 18.6513 4.50011 18.7498C4.50011 18.8483 4.51951 18.9458 4.5572 19.0368C4.59488 19.1278 4.65012 19.2105 4.71976 19.2801C4.7894 19.3497 4.87207 19.405 4.96305 19.4427C5.05403 19.4803 5.15155 19.4997 5.25003 19.4997C5.34851 19.4997 5.44603 19.4803 5.53701 19.4427C5.628 19.405 5.71067 19.3497 5.78031 19.2801L12.0001 13.0603L18.2198 19.2801C18.3604 19.4207 18.5512 19.4997 18.7501 19.4997C18.949 19.4997 19.1397 19.4207 19.2804 19.2801C19.421 19.1395 19.5 18.9487 19.5 18.7498C19.5 18.5509 19.421 18.3602 19.2804 18.2195L13.0606 11.9998Z%22 fill%3D%22white%22 fill-opacity%3D%220.95%22%2F%3E%0D%3C%2Fsvg%3E%0D\");background-size:20px 20px}#user-creation-stepper{display:flex;flex-direction:column;width:100%}#user-creation-stepper .mat-stepper-horizontal{margin:0 auto;width:100%;background-color:transparent}#user-creation-stepper .mat-horizontal-stepper-header-container{margin:0 auto;width:800px}#user-creation-stepper .mat-step-icon{width:28px;height:28px;border:3px solid hsl(0,0%,50.2%)}#user-creation-stepper .mat-step-icon-selected{background-color:#c6c6c6!important;border-color:#19487d}#user-creation-stepper .mat-step-icon-state-number{background-color:#fff}#user-creation-stepper .mat-step-icon-state-edit,#user-creation-stepper .mat-step-header .mat-step-icon-state-done{background-color:#1170cf;border-color:#1170cf}#user-creation-stepper .mat-step-icon-content{display:none}#user-creation-stepper .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child):before,#user-creation-stepper [dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child):before,#user-creation-stepper .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child):after,#user-creation-stepper [dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child):after{border-top-width:3px!important}#user-creation-stepper .mat-horizontal-stepper-header:before,#user-creation-stepper .mat-horizontal-stepper-header:after,#user-creation-stepper .mat-stepper-horizontal-line{border-top-color:#1170cf!important;border-top-width:3px!important;border-top-style:solid!important}#user-creation-stepper .mat-horizontal-stepper-header[aria-selected=true]~.mat-stepper-horizontal-line,#user-creation-stepper .mat-horizontal-stepper-header[aria-selected=true]~.mat-horizontal-stepper-header:before,#user-creation-stepper .mat-horizontal-stepper-header[aria-selected=true]~.mat-horizontal-stepper-header:after{border-top-width:3px!important;background-color:#7b7b7b!important;border-top-color:#7b7b7b!important}#user-creation-stepper .mat-horizontal-content-container{padding:0!important;margin-top:3rem}#user-creation-stepper .mat-horizontal-stepper-content[aria-expanded=true]{padding-bottom:0}.step-title{font-size:26px;font-weight:500;width:70%;margin:0 auto 1rem;min-height:32px;display:flex;align-items:center}.wizard-actions{display:flex;flex-flow:row-reverse;justify-content:flex-start;align-items:center;margin:16px 16px 0 0;align-self:flex-end;gap:1rem;position:relative;z-index:30}.uc-btn{border-radius:50px!important;padding:8px 16px!important;min-width:80px!important;line-height:normal!important;cursor:pointer}.uc-btn__inline-content{display:inline-flex;align-items:center;gap:8px}.uc-btn__spinner{width:14px;height:14px;border:2px solid rgba(255,255,255,.5);border-top-color:#fff;border-radius:50%;animation:uc-btn-spin .7s linear infinite}@keyframes uc-btn-spin{to{transform:rotate(360deg)}}.uc-btn-primary{background-color:#000!important;color:#fff!important;border:1px solid black!important}.uc-btn-secondary{background-color:#fff!important;color:#000!important;border:1px solid black!important}.move-user-tab-content-box{width:70%;margin:0 auto;background-color:#fff;min-height:350px;border:1px solid #C3C1C1;border-radius:8px;box-sizing:border-box;padding:25px}.wizard-loading-overlay{position:absolute;inset:0;background:rgba(243,243,243,.72);backdrop-filter:blur(1px);opacity:0;pointer-events:none;transition:opacity .18s ease;z-index:20}.wizard-loading-overlay--visible{opacity:1;pointer-events:auto}.wizard-actions .uc-btn-primary.mat-button-disabled{background-color:#bbb;color:#fff;border:1px solid grey;cursor:default!important;opacity:.3}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4$1.MatStep, selector: "mat-step", inputs: ["color"], exportAs: ["matStep"] }, { kind: "directive", type: i4$1.MatStepLabel, selector: "[matStepLabel]" }, { kind: "component", type: i4$1.MatStepper, selector: "mat-stepper, mat-vertical-stepper, mat-horizontal-stepper, [matStepper]", inputs: ["selectedIndex", "disableRipple", "color", "labelPosition", "headerPosition", "animationDuration"], outputs: ["animationDone"], exportAs: ["matStepper", "matVerticalStepper", "matHorizontalStepper"] }, { kind: "component", type: UserTemplateStepComponent, selector: "tk-user-template-step", inputs: ["customerId"], outputs: ["validityChange"] }, { kind: "component", type: NotificationsComponent, selector: "app-notification" }, { kind: "component", type: UserDetailsStepComponent, selector: "tk-user-details-step", outputs: ["validityChange"] }, { kind: "component", type: UserOverviewStepComponent, selector: "tk-user-overview-step" }, { kind: "component", type: AppLoaderComponent, selector: "app-loader" }], encapsulation: i0.ViewEncapsulation.None });
|
|
1092
2205
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserCreationWizardComponent, decorators: [{
|
|
1093
2206
|
type: Component,
|
|
1094
|
-
args: [{ selector: 'tk-user-creation-wizard', encapsulation: ViewEncapsulation.None, template: "<app-notification></app-notification>\r\n\r\n<div class=\"move-user-stepper-container\" [attr.aria-busy]=\"isSubmitting\">\r\n <header class=\"move-user-header\">\r\n <div class=\"move-user-header__title\">{{ title }}</div>\r\n <div class=\"move-user-header__close\">\r\n <span class=\"app-icon user-creation-close-icon\" (click)=\"onCancel()\"></span>\r\n </div>\r\n </header>\r\n\r\n <div id=\"user-creation-stepper\">\r\n <mat-stepper [linear]=\"false\" labelPosition=\"bottom\" #stepper>\r\n <mat-step>\r\n <div class=\"step-title\">Step 1: User creation with template</div>\r\n <ng-template matStepLabel>User creation</ng-template>\r\n\r\n <div class=\"move-user-tab-content-box\">\r\n <tk-user-template-step [customerId]=\"customerId\"></tk-user-template-step>\r\n </div>\r\n </mat-step>\r\n\r\n <mat-step>\r\n <div class=\"step-title\">Step 2 : User details</div>\r\n <ng-template matStepLabel>User details</ng-template>\r\n\r\n <div class=\"move-user-tab-content-box\">\r\n <tk-user-details-step></tk-user-details-step>\r\n </div>\r\n </mat-step>\r\n\r\n <mat-step>\r\n <div class=\"step-title\">Step 3: Review</div>\r\n <ng-template matStepLabel>Review</ng-template>\r\n\r\n <div class=\"move-user-tab-content-box\">\r\n <tk-user-overview-step></tk-user-overview-step>\r\n </div>\r\n </mat-step>\r\n </mat-stepper>\r\n\r\n <div class=\"wizard-actions\">\r\n <ng-container [ngSwitch]=\"stepper.selectedIndex\">\r\n <ng-container *ngSwitchCase=\"0\">\r\n <button mat-button class=\"uc-btn uc-btn-primary\" type=\"button\" (click)=\"stepper.next()\">\r\n Next\r\n </button>\r\n <button mat-button class=\"uc-btn uc-btn-secondary\" type=\"button\" (click)=\"onCancel()\">\r\n Cancel\r\n </button>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"1\">\r\n <button mat-button class=\"uc-btn uc-btn-primary\" type=\"button\" (click)=\"stepper.next()\">\r\n Next\r\n </button>\r\n <button mat-button class=\"uc-btn uc-btn-secondary\" type=\"button\" (click)=\"stepper.previous()\">\r\n Previous\r\n </button>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"2\">\r\n <button\r\n mat-button\r\n class=\"uc-btn uc-btn-primary\"\r\n type=\"button\"\r\n [disabled]=\"isSubmitting\"\r\n (click)=\"onSubmit()\"\r\n >\r\n <span class=\"uc-btn__inline-content\">\r\n <span class=\"uc-btn__spinner\" *ngIf=\"isSubmitting\" aria-hidden=\"true\"></span>\r\n <span>{{ isSubmitting ? 'Creating...' : 'Create' }}</span>\r\n </span>\r\n </button>\r\n <button\r\n mat-button\r\n class=\"uc-btn uc-btn-secondary\"\r\n type=\"button\"\r\n [disabled]=\"isSubmitting\"\r\n (click)=\"stepper.previous()\"\r\n >\r\n Previous\r\n </button>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </div>\r\n\r\n <div class=\"wizard-loading-overlay\" [class.wizard-loading-overlay--visible]=\"isSubmitting\" aria-hidden=\"true\"></div>\r\n</div>", styles: [".move-user-stepper-container{background-color:#f3f3f3;padding:0 0 16px;position:relative;overflow:hidden}.move-user-header{background-color:#1170cf;height:45px;padding:1rem 1.5rem;display:flex;align-items:center;justify-content:space-between;color:#fff;font-size:18px;font-weight:500}.move-user-header__close{cursor:pointer;display:flex;align-items:center;justify-content:center;line-height:0}.move-user-header__close i{font-size:25px;font-weight:100}.app-icon{height:20px;width:20px;display:block;cursor:pointer;background-repeat:no-repeat;background-position:center}.user-creation-close-icon{background-image:url(\"data:image/svg+xml,%3Csvg width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0D%3Cpath d%3D%22M13.0606 11.9998L19.2803 5.78001C19.35 5.71038 19.4052 5.6277 19.4429 5.53672C19.4806 5.44573 19.5 5.34822 19.5 5.24974C19.5 5.15126 19.4806 5.05374 19.4429 4.96276C19.4052 4.87177 19.3499 4.7891 19.2803 4.71947C19.2107 4.64983 19.128 4.5946 19.037 4.55691C18.946 4.51923 18.8485 4.49983 18.75 4.49983C18.6515 4.49984 18.554 4.51924 18.463 4.55692C18.3721 4.59461 18.2894 4.64985 18.2198 4.71949L12 10.9392L5.78026 4.71949C5.71077 4.64921 5.62807 4.59335 5.53691 4.55514C5.44576 4.51692 5.34795 4.49711 5.24911 4.49683C5.15027 4.49655 5.05235 4.51581 4.96098 4.55351C4.86961 4.59121 4.78659 4.64659 4.7167 4.71648C4.64681 4.78638 4.59143 4.8694 4.55374 4.96077C4.51605 5.05214 4.49679 5.15006 4.49707 5.2489C4.49736 5.34774 4.51718 5.44555 4.5554 5.5367C4.59361 5.62786 4.64947 5.71055 4.71976 5.78004L10.9395 11.9998L4.71976 18.2195C4.65013 18.2892 4.59489 18.3718 4.5572 18.4628C4.51951 18.5538 4.50011 18.6513 4.50011 18.7498C4.50011 18.8483 4.51951 18.9458 4.5572 19.0368C4.59488 19.1278 4.65012 19.2105 4.71976 19.2801C4.7894 19.3497 4.87207 19.405 4.96305 19.4427C5.05403 19.4803 5.15155 19.4997 5.25003 19.4997C5.34851 19.4997 5.44603 19.4803 5.53701 19.4427C5.628 19.405 5.71067 19.3497 5.78031 19.2801L12.0001 13.0603L18.2198 19.2801C18.3604 19.4207 18.5512 19.4997 18.7501 19.4997C18.949 19.4997 19.1397 19.4207 19.2804 19.2801C19.421 19.1395 19.5 18.9487 19.5 18.7498C19.5 18.5509 19.421 18.3602 19.2804 18.2195L13.0606 11.9998Z%22 fill%3D%22white%22 fill-opacity%3D%220.95%22%2F%3E%0D%3C%2Fsvg%3E%0D\");background-size:20px 20px}#user-creation-stepper{display:flex;flex-direction:column;width:100%}#user-creation-stepper .mat-stepper-horizontal{margin:0 auto;width:100%;background-color:transparent}#user-creation-stepper .mat-horizontal-stepper-header-container{margin:0 auto;width:800px}#user-creation-stepper .mat-step-icon{width:28px;height:28px;border:3px solid hsl(0,0%,50.2%)}#user-creation-stepper .mat-step-icon-selected{background-color:#c6c6c6!important;border-color:#19487d}#user-creation-stepper .mat-step-icon-state-number{background-color:#fff}#user-creation-stepper .mat-step-icon-state-edit,#user-creation-stepper .mat-step-header .mat-step-icon-state-done{background-color:#1170cf;border-color:#1170cf}#user-creation-stepper .mat-step-icon-content{display:none}#user-creation-stepper .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child):before,#user-creation-stepper [dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child):before,#user-creation-stepper .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child):after,#user-creation-stepper [dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child):after{border-top-width:3px!important}#user-creation-stepper .mat-horizontal-stepper-header:before,#user-creation-stepper .mat-horizontal-stepper-header:after,#user-creation-stepper .mat-stepper-horizontal-line{border-top-color:#1170cf!important;border-top-width:3px!important;border-top-style:solid!important}#user-creation-stepper .mat-horizontal-stepper-header[aria-selected=true]~.mat-stepper-horizontal-line,#user-creation-stepper .mat-horizontal-stepper-header[aria-selected=true]~.mat-horizontal-stepper-header:before,#user-creation-stepper .mat-horizontal-stepper-header[aria-selected=true]~.mat-horizontal-stepper-header:after{border-top-width:3px!important;background-color:#7b7b7b!important;border-top-color:#7b7b7b!important}#user-creation-stepper .mat-horizontal-content-container{padding:0!important;margin-top:3rem}#user-creation-stepper .mat-horizontal-stepper-content[aria-expanded=true]{padding-bottom:0}.step-title{font-size:26px;font-weight:500;width:70%;margin:0 auto 1rem;min-height:32px;display:flex;align-items:center}.wizard-actions{display:flex;flex-flow:row-reverse;justify-content:flex-start;align-items:center;margin:16px 16px 0 0;align-self:flex-end;gap:1rem;position:relative;z-index:30}.uc-btn{border-radius:50px!important;padding:8px 16px!important;min-width:80px!important;line-height:normal!important;cursor:pointer}.uc-btn__inline-content{display:inline-flex;align-items:center;gap:8px}.uc-btn__spinner{width:14px;height:14px;border:2px solid rgba(255,255,255,.5);border-top-color:#fff;border-radius:50%;animation:uc-btn-spin .7s linear infinite}@keyframes uc-btn-spin{to{transform:rotate(360deg)}}.uc-btn-primary{background-color:#000!important;color:#fff!important;border:1px solid black!important}.uc-btn-secondary{background-color:#fff!important;color:#000!important;border:1px solid black!important}.move-user-tab-content-box{width:70%;margin:0 auto;background-color:#fff;min-height:350px;border:1px solid #C3C1C1;border-radius:8px;box-sizing:border-box;padding:25px}.wizard-loading-overlay{position:absolute;inset:0;background:rgba(243,243,243,.72);backdrop-filter:blur(1px);opacity:0;pointer-events:none;transition:opacity .18s ease;z-index:20}.wizard-loading-overlay--visible{opacity:1;pointer-events:auto}.mat-button-disabled{background-color:#bbb;color:#fff;border:1px solid grey;cursor:default!important}\n"] }]
|
|
2207
|
+
args: [{ selector: 'tk-user-creation-wizard', encapsulation: ViewEncapsulation.None, template: "<app-notification></app-notification>\r\n<app-loader *ngIf=\"isLoading\"></app-loader>\r\n<div class=\"move-user-stepper-container\" [attr.aria-busy]=\"isSubmitting\">\r\n <header class=\"move-user-header\">\r\n <div class=\"move-user-header__title\">{{ title }}</div>\r\n <div class=\"move-user-header__close\">\r\n <span class=\"app-icon user-creation-close-icon\" (click)=\"onCancel()\"></span>\r\n </div>\r\n </header>\r\n\r\n <div id=\"user-creation-stepper\">\r\n <mat-stepper [linear]=\"false\" labelPosition=\"bottom\" #stepper\r\n [selectedIndex]=\"selectedIndex\"\r\n (selectionChange)=\"selectedIndex = $event.selectedIndex\">\r\n\r\n <mat-step>\r\n <div class=\"step-title\">Step 1: User creation with template</div>\r\n <ng-template matStepLabel>User creation</ng-template>\r\n\r\n <ng-container *ngIf=\"selectedIndex === 0\">\r\n <div class=\"move-user-tab-content-box\">\r\n <tk-user-template-step\r\n [customerId]=\"customerId\"\r\n (validityChange)=\"templateStepValid = $event\"\r\n ></tk-user-template-step>\r\n </div>\r\n </ng-container>\r\n </mat-step>\r\n\r\n <mat-step>\r\n <div class=\"step-title\">Step 2 : User details</div>\r\n <ng-template matStepLabel>User details</ng-template>\r\n\r\n <ng-container *ngIf=\"selectedIndex === 1\">\r\n <div class=\"move-user-tab-content-box\">\r\n <tk-user-details-step (validityChange)=\"detailsStepValid = $event\"></tk-user-details-step>\r\n </div>\r\n </ng-container>\r\n </mat-step>\r\n\r\n <mat-step>\r\n <div class=\"step-title\">Step 3: Review</div>\r\n <ng-template matStepLabel>Review</ng-template>\r\n\r\n <ng-container *ngIf=\"selectedIndex === 2\">\r\n <div class=\"move-user-tab-content-box\">\r\n <tk-user-overview-step></tk-user-overview-step>\r\n </div>\r\n </ng-container>\r\n </mat-step>\r\n </mat-stepper>\r\n\r\n <div class=\"wizard-actions\">\r\n <ng-container [ngSwitch]=\"stepper.selectedIndex\">\r\n <ng-container *ngSwitchCase=\"0\">\r\n <button\r\n mat-button\r\n class=\"uc-btn uc-btn-primary\"\r\n type=\"button\"\r\n [disabled]=\"!templateStepValid\"\r\n (click)=\"onStepperNext(stepper)\"\r\n >\r\n Next\r\n </button>\r\n <button mat-button class=\"uc-btn uc-btn-secondary\" type=\"button\" (click)=\"onCancel()\">\r\n Cancel\r\n </button>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"1\">\r\n <button\r\n mat-button\r\n class=\"uc-btn uc-btn-primary\"\r\n type=\"button\"\r\n [disabled]=\"!detailsStepValid\"\r\n (click)=\"onStepperNext(stepper)\"\r\n >\r\n Next\r\n </button>\r\n <button mat-button class=\"uc-btn uc-btn-secondary\" type=\"button\" (click)=\"stepper.previous()\">\r\n Previous\r\n </button>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"2\">\r\n <button\r\n mat-button\r\n class=\"uc-btn uc-btn-primary\"\r\n type=\"button\"\r\n [disabled]=\"isSubmitting\"\r\n (click)=\"onSubmit()\"\r\n >\r\n <span class=\"uc-btn__inline-content\">\r\n <span class=\"uc-btn__spinner\" *ngIf=\"isSubmitting\" aria-hidden=\"true\"></span>\r\n <span>{{ isSubmitting ? 'Creating...' : 'Create' }}</span>\r\n </span>\r\n </button>\r\n <button\r\n mat-button\r\n class=\"uc-btn uc-btn-secondary\"\r\n type=\"button\"\r\n [disabled]=\"isSubmitting\"\r\n (click)=\"stepper.previous()\"\r\n >\r\n Previous\r\n </button>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </div>\r\n\r\n <div class=\"wizard-loading-overlay\" [class.wizard-loading-overlay--visible]=\"isSubmitting\" aria-hidden=\"true\"></div>\r\n</div>", styles: [".move-user-stepper-container{background-color:#f3f3f3;padding:0 0 16px;position:relative;overflow:hidden}.move-user-header{background-color:#1170cf;height:45px;padding:1rem 1.5rem;display:flex;align-items:center;justify-content:space-between;color:#fff;font-size:18px;font-weight:500}.move-user-header__close{cursor:pointer;display:flex;align-items:center;justify-content:center;line-height:0}.move-user-header__close i{font-size:25px;font-weight:100}.app-icon{height:20px;width:20px;display:block;cursor:pointer;background-repeat:no-repeat;background-position:center}.user-creation-close-icon{background-image:url(\"data:image/svg+xml,%3Csvg width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0D%3Cpath d%3D%22M13.0606 11.9998L19.2803 5.78001C19.35 5.71038 19.4052 5.6277 19.4429 5.53672C19.4806 5.44573 19.5 5.34822 19.5 5.24974C19.5 5.15126 19.4806 5.05374 19.4429 4.96276C19.4052 4.87177 19.3499 4.7891 19.2803 4.71947C19.2107 4.64983 19.128 4.5946 19.037 4.55691C18.946 4.51923 18.8485 4.49983 18.75 4.49983C18.6515 4.49984 18.554 4.51924 18.463 4.55692C18.3721 4.59461 18.2894 4.64985 18.2198 4.71949L12 10.9392L5.78026 4.71949C5.71077 4.64921 5.62807 4.59335 5.53691 4.55514C5.44576 4.51692 5.34795 4.49711 5.24911 4.49683C5.15027 4.49655 5.05235 4.51581 4.96098 4.55351C4.86961 4.59121 4.78659 4.64659 4.7167 4.71648C4.64681 4.78638 4.59143 4.8694 4.55374 4.96077C4.51605 5.05214 4.49679 5.15006 4.49707 5.2489C4.49736 5.34774 4.51718 5.44555 4.5554 5.5367C4.59361 5.62786 4.64947 5.71055 4.71976 5.78004L10.9395 11.9998L4.71976 18.2195C4.65013 18.2892 4.59489 18.3718 4.5572 18.4628C4.51951 18.5538 4.50011 18.6513 4.50011 18.7498C4.50011 18.8483 4.51951 18.9458 4.5572 19.0368C4.59488 19.1278 4.65012 19.2105 4.71976 19.2801C4.7894 19.3497 4.87207 19.405 4.96305 19.4427C5.05403 19.4803 5.15155 19.4997 5.25003 19.4997C5.34851 19.4997 5.44603 19.4803 5.53701 19.4427C5.628 19.405 5.71067 19.3497 5.78031 19.2801L12.0001 13.0603L18.2198 19.2801C18.3604 19.4207 18.5512 19.4997 18.7501 19.4997C18.949 19.4997 19.1397 19.4207 19.2804 19.2801C19.421 19.1395 19.5 18.9487 19.5 18.7498C19.5 18.5509 19.421 18.3602 19.2804 18.2195L13.0606 11.9998Z%22 fill%3D%22white%22 fill-opacity%3D%220.95%22%2F%3E%0D%3C%2Fsvg%3E%0D\");background-size:20px 20px}#user-creation-stepper{display:flex;flex-direction:column;width:100%}#user-creation-stepper .mat-stepper-horizontal{margin:0 auto;width:100%;background-color:transparent}#user-creation-stepper .mat-horizontal-stepper-header-container{margin:0 auto;width:800px}#user-creation-stepper .mat-step-icon{width:28px;height:28px;border:3px solid hsl(0,0%,50.2%)}#user-creation-stepper .mat-step-icon-selected{background-color:#c6c6c6!important;border-color:#19487d}#user-creation-stepper .mat-step-icon-state-number{background-color:#fff}#user-creation-stepper .mat-step-icon-state-edit,#user-creation-stepper .mat-step-header .mat-step-icon-state-done{background-color:#1170cf;border-color:#1170cf}#user-creation-stepper .mat-step-icon-content{display:none}#user-creation-stepper .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child):before,#user-creation-stepper [dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child):before,#user-creation-stepper .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child):after,#user-creation-stepper [dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child):after{border-top-width:3px!important}#user-creation-stepper .mat-horizontal-stepper-header:before,#user-creation-stepper .mat-horizontal-stepper-header:after,#user-creation-stepper .mat-stepper-horizontal-line{border-top-color:#1170cf!important;border-top-width:3px!important;border-top-style:solid!important}#user-creation-stepper .mat-horizontal-stepper-header[aria-selected=true]~.mat-stepper-horizontal-line,#user-creation-stepper .mat-horizontal-stepper-header[aria-selected=true]~.mat-horizontal-stepper-header:before,#user-creation-stepper .mat-horizontal-stepper-header[aria-selected=true]~.mat-horizontal-stepper-header:after{border-top-width:3px!important;background-color:#7b7b7b!important;border-top-color:#7b7b7b!important}#user-creation-stepper .mat-horizontal-content-container{padding:0!important;margin-top:3rem}#user-creation-stepper .mat-horizontal-stepper-content[aria-expanded=true]{padding-bottom:0}.step-title{font-size:26px;font-weight:500;width:70%;margin:0 auto 1rem;min-height:32px;display:flex;align-items:center}.wizard-actions{display:flex;flex-flow:row-reverse;justify-content:flex-start;align-items:center;margin:16px 16px 0 0;align-self:flex-end;gap:1rem;position:relative;z-index:30}.uc-btn{border-radius:50px!important;padding:8px 16px!important;min-width:80px!important;line-height:normal!important;cursor:pointer}.uc-btn__inline-content{display:inline-flex;align-items:center;gap:8px}.uc-btn__spinner{width:14px;height:14px;border:2px solid rgba(255,255,255,.5);border-top-color:#fff;border-radius:50%;animation:uc-btn-spin .7s linear infinite}@keyframes uc-btn-spin{to{transform:rotate(360deg)}}.uc-btn-primary{background-color:#000!important;color:#fff!important;border:1px solid black!important}.uc-btn-secondary{background-color:#fff!important;color:#000!important;border:1px solid black!important}.move-user-tab-content-box{width:70%;margin:0 auto;background-color:#fff;min-height:350px;border:1px solid #C3C1C1;border-radius:8px;box-sizing:border-box;padding:25px}.wizard-loading-overlay{position:absolute;inset:0;background:rgba(243,243,243,.72);backdrop-filter:blur(1px);opacity:0;pointer-events:none;transition:opacity .18s ease;z-index:20}.wizard-loading-overlay--visible{opacity:1;pointer-events:auto}.wizard-actions .uc-btn-primary.mat-button-disabled{background-color:#bbb;color:#fff;border:1px solid grey;cursor:default!important;opacity:.3}\n"] }]
|
|
1095
2208
|
}], ctorParameters: function () { return [{ type: NotificationService }]; }, propDecorators: { title: [{
|
|
1096
2209
|
type: Input
|
|
1097
2210
|
}], host: [{
|
|
@@ -1104,6 +2217,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1104
2217
|
type: Output
|
|
1105
2218
|
}], submit: [{
|
|
1106
2219
|
type: Output
|
|
2220
|
+
}], templateStep: [{
|
|
2221
|
+
type: ViewChild,
|
|
2222
|
+
args: [UserTemplateStepComponent]
|
|
2223
|
+
}], detailsStep: [{
|
|
2224
|
+
type: ViewChild,
|
|
2225
|
+
args: [UserDetailsStepComponent]
|
|
1107
2226
|
}] } });
|
|
1108
2227
|
|
|
1109
2228
|
function HttpLoaderFactory(http) {
|
|
@@ -1117,6 +2236,7 @@ UserCreationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", vers
|
|
|
1117
2236
|
NotificationsComponent,
|
|
1118
2237
|
UserDetailsStepComponent,
|
|
1119
2238
|
UserOverviewStepComponent,
|
|
2239
|
+
AppLoaderComponent,
|
|
1120
2240
|
TruncatePipe], imports: [CommonModule,
|
|
1121
2241
|
SharedModule,
|
|
1122
2242
|
MaterialModule,
|
|
@@ -1153,6 +2273,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1153
2273
|
NotificationsComponent,
|
|
1154
2274
|
UserDetailsStepComponent,
|
|
1155
2275
|
UserOverviewStepComponent,
|
|
2276
|
+
AppLoaderComponent,
|
|
1156
2277
|
TruncatePipe,
|
|
1157
2278
|
],
|
|
1158
2279
|
imports: [
|
|
@@ -1196,5 +2317,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1196
2317
|
* Generated bundle index. Do not edit.
|
|
1197
2318
|
*/
|
|
1198
2319
|
|
|
1199
|
-
export { HttpLoaderFactory, UserCreationModule, UserCreationWizardComponent };
|
|
2320
|
+
export { HttpLoaderFactory, USER_CREATED_SUCCESSFLLY, UserCreationModule, UserCreationWizardComponent };
|
|
1200
2321
|
//# sourceMappingURL=tuki-io-tuki-widgets-user-creation.mjs.map
|