jconsumer-shared 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/account-service.mjs +21 -0
- package/esm2022/lib/auth-service.mjs +155 -0
- package/esm2022/lib/calendar/date-time/datetime-processor.service.mjs +448 -0
- package/esm2022/lib/common.service.mjs +38 -0
- package/esm2022/lib/error-message.service.mjs +22 -0
- package/esm2022/lib/file-service.mjs +229 -0
- package/esm2022/lib/group-storage.service.mjs +66 -0
- package/esm2022/lib/i8n.module.mjs +43 -0
- package/esm2022/lib/local-storage.service.mjs +77 -0
- package/esm2022/lib/phone-input/phone-input.component.mjs +127 -0
- package/esm2022/lib/phone-input/phone-input.module.mjs +24 -0
- package/esm2022/lib/pipes/autolink/autolink.pipe.mjs +22 -0
- package/esm2022/lib/pipes/capitalize/capitalize.module.mjs +20 -0
- package/esm2022/lib/pipes/capitalize/capitalize.pipe.mjs +18 -0
- package/esm2022/lib/pipes/filter/filter.pipe.mjs +24 -0
- package/esm2022/lib/pipes/limit-to/limitTo.pipe.mjs +18 -0
- package/esm2022/lib/pipes/safe-html/safehtml.module.mjs +20 -0
- package/esm2022/lib/pipes/safe-html/safehtml.pipe.mjs +19 -0
- package/esm2022/lib/project-messages.mjs +146 -0
- package/esm2022/lib/questionaire/edit/questionnaire.component.mjs +1422 -0
- package/esm2022/lib/questionaire/edit/questionnaire.module.mjs +77 -0
- package/esm2022/lib/questionaire/questionaire-service.mjs +92 -0
- package/esm2022/lib/session-storage.service.mjs +57 -0
- package/esm2022/lib/shared.service.mjs +24 -2
- package/esm2022/lib/showuploadfile/showuploadfile.component.mjs +61 -0
- package/esm2022/lib/showuploadfile/showuploadfile.module.mjs +28 -0
- package/esm2022/lib/spinner/loading-spinner.component.mjs +22 -0
- package/esm2022/lib/spinner/loading-spinner.module.mjs +28 -0
- package/esm2022/lib/storage.service.mjs +75 -0
- package/esm2022/lib/word-processor.service.mjs +181 -0
- package/esm2022/public-api.mjs +27 -1
- package/fesm2022/jconsumer-shared.mjs +3522 -26
- package/fesm2022/jconsumer-shared.mjs.map +1 -1
- package/jconsumer-shared-0.0.3.tgz +0 -0
- package/lib/account-service.d.ts +9 -0
- package/lib/auth-service.d.ts +43 -0
- package/lib/calendar/date-time/datetime-processor.service.d.ts +120 -0
- package/lib/common.service.d.ts +9 -0
- package/lib/error-message.service.d.ts +5 -0
- package/lib/file-service.d.ts +26 -0
- package/lib/group-storage.service.d.ts +14 -0
- package/lib/i8n.module.d.ts +12 -0
- package/lib/local-storage.service.d.ts +34 -0
- package/lib/phone-input/phone-input.component.d.ts +25 -0
- package/lib/phone-input/phone-input.module.d.ts +9 -0
- package/lib/pipes/autolink/autolink.pipe.d.ts +7 -0
- package/lib/pipes/capitalize/capitalize.module.d.ts +8 -0
- package/lib/pipes/capitalize/capitalize.pipe.d.ts +7 -0
- package/lib/pipes/filter/filter.pipe.d.ts +7 -0
- package/lib/pipes/limit-to/limitTo.pipe.d.ts +7 -0
- package/lib/pipes/safe-html/safehtml.module.d.ts +8 -0
- package/lib/pipes/safe-html/safehtml.pipe.d.ts +10 -0
- package/lib/project-messages.d.ts +1 -0
- package/lib/questionaire/edit/questionnaire.component.d.ts +151 -0
- package/lib/questionaire/edit/questionnaire.module.d.ts +19 -0
- package/lib/questionaire/questionaire-service.d.ts +28 -0
- package/lib/session-storage.service.d.ts +26 -0
- package/lib/shared.service.d.ts +12 -3
- package/lib/showuploadfile/showuploadfile.component.d.ts +21 -0
- package/lib/showuploadfile/showuploadfile.module.d.ts +9 -0
- package/lib/spinner/loading-spinner.component.d.ts +11 -0
- package/lib/spinner/loading-spinner.module.d.ts +9 -0
- package/lib/storage.service.d.ts +16 -0
- package/lib/word-processor.service.d.ts +80 -0
- package/package.json +1 -1
- package/public-api.d.ts +26 -0
- package/jconsumer-shared-0.0.2.tgz +0 -0
|
@@ -1,10 +1,36 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, Component,
|
|
2
|
+
import { Injectable, NgModule, Pipe, Component, Input, Inject, EventEmitter, Output, ViewChild, NO_ERRORS_SCHEMA, CUSTOM_ELEMENTS_SCHEMA, forwardRef } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common/http';
|
|
4
|
-
import { HttpHeaders, HttpParams } from '@angular/common/http';
|
|
4
|
+
import { HttpHeaders, HttpParams, HttpClient } from '@angular/common/http';
|
|
5
5
|
import { Subject } from 'rxjs';
|
|
6
6
|
import * as i1$1 from 'primeng/api';
|
|
7
|
+
import * as i12 from '@angular/common';
|
|
7
8
|
import { CommonModule } from '@angular/common';
|
|
9
|
+
import { TranslateHttpLoader } from '@ngx-translate/http-loader';
|
|
10
|
+
import * as i1$2 from '@ngx-translate/core';
|
|
11
|
+
import { TranslateModule, TranslateLoader } from '@ngx-translate/core';
|
|
12
|
+
import * as i1$3 from '@angular/platform-browser';
|
|
13
|
+
import * as i1$4 from '@angular/material/progress-spinner';
|
|
14
|
+
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
15
|
+
import * as i11 from '@ks89/angular-modal-gallery';
|
|
16
|
+
import { ButtonsStrategy, ButtonType, Image, GalleryModule } from '@ks89/angular-modal-gallery';
|
|
17
|
+
import * as i1$5 from '@angular/material/dialog';
|
|
18
|
+
import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
|
|
19
|
+
import * as i1$6 from '@angular/router';
|
|
20
|
+
import moment from 'moment';
|
|
21
|
+
import * as i13 from '@angular/forms';
|
|
22
|
+
import { FormsModule, ReactiveFormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
23
|
+
import * as i15 from '@angular/material/datepicker';
|
|
24
|
+
import { MatDatepickerModule } from '@angular/material/datepicker';
|
|
25
|
+
import * as i16 from '@angular/material/core';
|
|
26
|
+
import { MatOptionModule } from '@angular/material/core';
|
|
27
|
+
import * as i17 from '@angular/material/form-field';
|
|
28
|
+
import * as i18 from '@angular/material/select';
|
|
29
|
+
import { MatSelectModule } from '@angular/material/select';
|
|
30
|
+
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
31
|
+
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
|
32
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
33
|
+
import intlTelInput from 'intl-tel-input';
|
|
8
34
|
|
|
9
35
|
class ServiceMeta {
|
|
10
36
|
http;
|
|
@@ -172,6 +198,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
|
|
|
172
198
|
}], ctorParameters: () => [{ type: i1$1.MessageService }] });
|
|
173
199
|
|
|
174
200
|
class SharedService {
|
|
201
|
+
environment = {
|
|
202
|
+
i8nPath: null
|
|
203
|
+
};
|
|
175
204
|
accountID = '';
|
|
176
205
|
customID = '';
|
|
177
206
|
templateJSON;
|
|
@@ -180,6 +209,8 @@ class SharedService {
|
|
|
180
209
|
apiEndPoint;
|
|
181
210
|
S3EndPoint;
|
|
182
211
|
SAPath;
|
|
212
|
+
routeID = '';
|
|
213
|
+
dateFormat = 'EEE, MMM dd, y';
|
|
183
214
|
constructor() { }
|
|
184
215
|
setUniqueID(uniqueId) {
|
|
185
216
|
this.uniqueID = uniqueId;
|
|
@@ -187,13 +218,24 @@ class SharedService {
|
|
|
187
218
|
getUniqueID() {
|
|
188
219
|
return this.uniqueID;
|
|
189
220
|
}
|
|
221
|
+
getI8nPath() {
|
|
222
|
+
return this.environment['i8nPath'];
|
|
223
|
+
}
|
|
224
|
+
setI8nPath(path) {
|
|
225
|
+
this.environment['i8nPath'] = path;
|
|
226
|
+
}
|
|
190
227
|
setTemplateID(templateID) {
|
|
191
228
|
this.templateID = templateID;
|
|
192
|
-
localStorage.setItem('_tid', this.templateID);
|
|
193
229
|
}
|
|
194
230
|
getTemplateID() {
|
|
195
231
|
return this.templateID;
|
|
196
232
|
}
|
|
233
|
+
getDateFormat() {
|
|
234
|
+
return this.dateFormat;
|
|
235
|
+
}
|
|
236
|
+
setDateFormat(dateFormat) {
|
|
237
|
+
this.dateFormat = dateFormat;
|
|
238
|
+
}
|
|
197
239
|
setTemplateJSON(templateJSON) {
|
|
198
240
|
this.templateJSON = templateJSON;
|
|
199
241
|
}
|
|
@@ -230,6 +272,12 @@ class SharedService {
|
|
|
230
272
|
getAPIEndPoint() {
|
|
231
273
|
return this.apiEndPoint;
|
|
232
274
|
}
|
|
275
|
+
setRouteID(routeID) {
|
|
276
|
+
this.routeID = routeID;
|
|
277
|
+
}
|
|
278
|
+
getRouteID() {
|
|
279
|
+
return this.routeID;
|
|
280
|
+
}
|
|
233
281
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: SharedService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
234
282
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: SharedService, providedIn: 'root' });
|
|
235
283
|
}
|
|
@@ -240,6 +288,41 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
|
|
|
240
288
|
}]
|
|
241
289
|
}], ctorParameters: () => [] });
|
|
242
290
|
|
|
291
|
+
function HttpLoaderFactory(http, sharedService) {
|
|
292
|
+
return new TranslateHttpLoader(http, sharedService.getI8nPath() + 'assets/i18n/', '.json');
|
|
293
|
+
}
|
|
294
|
+
class I8nModule {
|
|
295
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: I8nModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
296
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.9", ngImport: i0, type: I8nModule, imports: [CommonModule, i1$2.TranslateModule], exports: [TranslateModule] });
|
|
297
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: I8nModule, imports: [CommonModule,
|
|
298
|
+
TranslateModule.forRoot({
|
|
299
|
+
loader: {
|
|
300
|
+
provide: TranslateLoader,
|
|
301
|
+
useFactory: HttpLoaderFactory,
|
|
302
|
+
deps: [HttpClient, SharedService]
|
|
303
|
+
}
|
|
304
|
+
}), TranslateModule] });
|
|
305
|
+
}
|
|
306
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: I8nModule, decorators: [{
|
|
307
|
+
type: NgModule,
|
|
308
|
+
args: [{
|
|
309
|
+
declarations: [],
|
|
310
|
+
imports: [
|
|
311
|
+
CommonModule,
|
|
312
|
+
TranslateModule.forRoot({
|
|
313
|
+
loader: {
|
|
314
|
+
provide: TranslateLoader,
|
|
315
|
+
useFactory: HttpLoaderFactory,
|
|
316
|
+
deps: [HttpClient, SharedService]
|
|
317
|
+
}
|
|
318
|
+
})
|
|
319
|
+
],
|
|
320
|
+
exports: [
|
|
321
|
+
TranslateModule
|
|
322
|
+
]
|
|
323
|
+
}]
|
|
324
|
+
}] });
|
|
325
|
+
|
|
243
326
|
class OrderService {
|
|
244
327
|
servicemeta;
|
|
245
328
|
sharedService;
|
|
@@ -349,35 +432,3448 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
|
|
|
349
432
|
}]
|
|
350
433
|
}], ctorParameters: () => [{ type: ServiceMeta }, { type: SharedService }] });
|
|
351
434
|
|
|
352
|
-
class
|
|
435
|
+
class AccountService {
|
|
436
|
+
store;
|
|
353
437
|
constructor() { }
|
|
354
|
-
|
|
438
|
+
setActiveStore(store) {
|
|
439
|
+
this.store = store;
|
|
355
440
|
}
|
|
356
|
-
|
|
357
|
-
|
|
441
|
+
getActiveStore() {
|
|
442
|
+
return this.store;
|
|
443
|
+
}
|
|
444
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: AccountService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
445
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: AccountService, providedIn: 'root' });
|
|
358
446
|
}
|
|
359
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type:
|
|
360
|
-
type:
|
|
361
|
-
args: [{
|
|
447
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: AccountService, decorators: [{
|
|
448
|
+
type: Injectable,
|
|
449
|
+
args: [{
|
|
450
|
+
providedIn: 'root'
|
|
451
|
+
}]
|
|
362
452
|
}], ctorParameters: () => [] });
|
|
363
453
|
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
454
|
+
/**
|
|
455
|
+
* Handle Local Storage related actions
|
|
456
|
+
*/
|
|
457
|
+
class LocalStorageService {
|
|
458
|
+
/* holds the variables which not removed by clearLocalstorage() method */
|
|
459
|
+
dont_delete_localstorage = ['refreshToken', 'userType', 'version', 'qrp', 'mUniqueId', 'authToken', 'reqFrom', 'source', 'translatevariable', 'appId', 'installId', 'appUniqueId', 'cleared', 'googleToken', 'sysdate', 'pt_pwd', 'target', 'activeLocation', 'busId'];
|
|
460
|
+
/**
|
|
461
|
+
* Default constructor
|
|
462
|
+
*/
|
|
463
|
+
constructor() {
|
|
464
|
+
}
|
|
465
|
+
/**
|
|
466
|
+
* function to get local storage item value
|
|
467
|
+
* @param itemname name of variable
|
|
468
|
+
*/
|
|
469
|
+
getitemfromLocalStorage(itemname) {
|
|
470
|
+
// if (isPlatformBrowser(this.platformId)) {
|
|
471
|
+
if (localStorage.getItem(itemname) !== 'undefined') {
|
|
472
|
+
return JSON.parse(localStorage.getItem(itemname));
|
|
473
|
+
}
|
|
474
|
+
// }
|
|
475
|
+
// return null;
|
|
476
|
+
}
|
|
477
|
+
/**
|
|
478
|
+
* // function to set local storage item value
|
|
479
|
+
* @param itemname name of variable
|
|
480
|
+
* @param itemvalue value to set
|
|
481
|
+
*/
|
|
482
|
+
setitemonLocalStorage(itemname, itemvalue) {
|
|
483
|
+
// if (isPlatformBrowser(this.platformId)) {
|
|
484
|
+
localStorage.setItem(itemname, JSON.stringify(itemvalue));
|
|
485
|
+
// }
|
|
486
|
+
}
|
|
487
|
+
/**
|
|
488
|
+
* Method to remove an item from local storage
|
|
489
|
+
* @param itemname item to be removed
|
|
490
|
+
*/
|
|
491
|
+
removeitemfromLocalStorage(itemname) {
|
|
492
|
+
// if (isPlatformBrowser(this.platformId)) {
|
|
493
|
+
localStorage.removeItem(itemname);
|
|
494
|
+
// }
|
|
495
|
+
}
|
|
496
|
+
/**
|
|
497
|
+
* Method to clear the local storage items except the ones contained in 'dont_delete_localstorage'
|
|
498
|
+
*/
|
|
499
|
+
clearLocalstorage() {
|
|
500
|
+
// if (isPlatformBrowser(this.platformId)) {
|
|
501
|
+
this.removeitemfromLocalStorage('ynw-credentials');
|
|
502
|
+
for (let index = 0; index < localStorage.length; index++) {
|
|
503
|
+
if (this.dont_delete_localstorage.indexOf(localStorage.key(index)) === -1) {
|
|
504
|
+
localStorage.removeItem(localStorage.key(index));
|
|
505
|
+
index = index - 1; // manage index after remove
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
// }
|
|
509
|
+
}
|
|
510
|
+
/**
|
|
511
|
+
* Method to clear the local storage items
|
|
512
|
+
*/
|
|
513
|
+
clearAll() {
|
|
514
|
+
for (let index = 0; index < localStorage.length; index++) {
|
|
515
|
+
localStorage.removeItem(localStorage.key(index));
|
|
516
|
+
index = index - 1; // manage index after remove
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: LocalStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
520
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: LocalStorageService, providedIn: 'root' });
|
|
368
521
|
}
|
|
369
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type:
|
|
370
|
-
type:
|
|
522
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: LocalStorageService, decorators: [{
|
|
523
|
+
type: Injectable,
|
|
371
524
|
args: [{
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
525
|
+
providedIn: 'root'
|
|
526
|
+
}]
|
|
527
|
+
}], ctorParameters: () => [] });
|
|
528
|
+
|
|
529
|
+
// import { isPlatformBrowser } from "@angular/common";
|
|
530
|
+
// import { Inject, Injectable, PLATFORM_ID } from "@angular/core";
|
|
531
|
+
/**
|
|
532
|
+
* Handle Session Storage related actions
|
|
533
|
+
*/
|
|
534
|
+
class SessionStorageService {
|
|
535
|
+
constructor() {
|
|
536
|
+
}
|
|
537
|
+
/**
|
|
538
|
+
* Method to set an item on session storage
|
|
539
|
+
* @param itemname
|
|
540
|
+
* @param itemvalue
|
|
541
|
+
*/
|
|
542
|
+
setitemOnSessionStorage(itemname, itemvalue) {
|
|
543
|
+
// if (isPlatformBrowser(this.platformId)) {
|
|
544
|
+
sessionStorage.setItem(itemname, JSON.stringify(itemvalue));
|
|
545
|
+
// }
|
|
546
|
+
}
|
|
547
|
+
/**
|
|
548
|
+
* Method to get an item from session storage
|
|
549
|
+
* @param itemname
|
|
550
|
+
*/
|
|
551
|
+
getitemfromSessionStorage(itemname) {
|
|
552
|
+
const itemValue = sessionStorage.getItem(itemname);
|
|
553
|
+
if (sessionStorage.getItem(itemname) !== 'undefined') {
|
|
554
|
+
return JSON.parse(itemValue !== null ? JSON.parse(itemValue) : null);
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
/**
|
|
558
|
+
* Method to remove an item from session storage
|
|
559
|
+
* @param itemname
|
|
560
|
+
*/
|
|
561
|
+
removeitemfromSessionStorage(itemname) {
|
|
562
|
+
sessionStorage.removeItem(itemname);
|
|
563
|
+
}
|
|
564
|
+
/**
|
|
565
|
+
* Method to clear all the items from session storage
|
|
566
|
+
*/
|
|
567
|
+
clearSessionStorage() {
|
|
568
|
+
for (let index = 0; index < sessionStorage.length; index++) {
|
|
569
|
+
const itemValue = sessionStorage.key(index);
|
|
570
|
+
sessionStorage.removeItem(itemValue !== null ? itemValue : '');
|
|
571
|
+
index = index - 1; // manage index after remove
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: SessionStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
575
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: SessionStorageService, providedIn: 'root' });
|
|
576
|
+
}
|
|
577
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: SessionStorageService, decorators: [{
|
|
578
|
+
type: Injectable,
|
|
579
|
+
args: [{
|
|
580
|
+
providedIn: 'root'
|
|
581
|
+
}]
|
|
582
|
+
}], ctorParameters: () => [] });
|
|
583
|
+
|
|
584
|
+
class GroupStorageService {
|
|
585
|
+
sessionStorageService;
|
|
586
|
+
lStorageService;
|
|
587
|
+
constructor(sessionStorageService, lStorageService) {
|
|
588
|
+
this.sessionStorageService = sessionStorageService;
|
|
589
|
+
this.lStorageService = lStorageService;
|
|
590
|
+
}
|
|
591
|
+
getGroup() {
|
|
592
|
+
if (this.sessionStorageService.getitemfromSessionStorage('tabId')) {
|
|
593
|
+
return this.sessionStorageService.getitemfromSessionStorage('accountid');
|
|
594
|
+
}
|
|
595
|
+
else {
|
|
596
|
+
return 0;
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
setitemToGroupStorage(itemname, itemvalue) {
|
|
600
|
+
const group = this.getGroup();
|
|
601
|
+
let groupObj = {};
|
|
602
|
+
if (this.lStorageService.getitemfromLocalStorage(group)) {
|
|
603
|
+
groupObj = JSON.parse(this.lStorageService.getitemfromLocalStorage(group)) ? JSON.parse(this.lStorageService.getitemfromLocalStorage(group)) : {};
|
|
604
|
+
if (groupObj) {
|
|
605
|
+
groupObj[itemname] = itemvalue;
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
else {
|
|
609
|
+
groupObj[itemname] = itemvalue;
|
|
610
|
+
}
|
|
611
|
+
this.lStorageService.setitemonLocalStorage(group, JSON.stringify(groupObj));
|
|
612
|
+
}
|
|
613
|
+
getitemFromGroupStorage(itemname, type) {
|
|
614
|
+
let group;
|
|
615
|
+
if (type) {
|
|
616
|
+
group = 0;
|
|
617
|
+
}
|
|
618
|
+
else {
|
|
619
|
+
group = this.getGroup();
|
|
620
|
+
}
|
|
621
|
+
if (this.lStorageService.getitemfromLocalStorage(group)) {
|
|
622
|
+
const groupObj = JSON.parse(this.lStorageService.getitemfromLocalStorage(group));
|
|
623
|
+
if (groupObj[itemname] || (itemname === 'isCheckin' && groupObj[itemname] !== undefined)) {
|
|
624
|
+
return groupObj[itemname];
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
removeitemFromGroupStorage(itemname) {
|
|
629
|
+
const group = this.getGroup();
|
|
630
|
+
const groupObj = JSON.parse(this.lStorageService.getitemfromLocalStorage(group));
|
|
631
|
+
if (groupObj[itemname]) {
|
|
632
|
+
delete groupObj[itemname];
|
|
633
|
+
this.lStorageService.setitemonLocalStorage(group, JSON.stringify(groupObj));
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: GroupStorageService, deps: [{ token: SessionStorageService }, { token: LocalStorageService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
637
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: GroupStorageService, providedIn: 'root' });
|
|
638
|
+
}
|
|
639
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: GroupStorageService, decorators: [{
|
|
640
|
+
type: Injectable,
|
|
641
|
+
args: [{
|
|
642
|
+
providedIn: 'root'
|
|
643
|
+
}]
|
|
644
|
+
}], ctorParameters: () => [{ type: SessionStorageService }, { type: LocalStorageService }] });
|
|
645
|
+
|
|
646
|
+
/**
|
|
647
|
+
*
|
|
648
|
+
* Service handles authentication
|
|
649
|
+
*/
|
|
650
|
+
class AuthService {
|
|
651
|
+
serviceMeta;
|
|
652
|
+
lStorageService;
|
|
653
|
+
sessionStorageService;
|
|
654
|
+
groupService;
|
|
655
|
+
subject = new Subject();
|
|
656
|
+
getMessage() {
|
|
657
|
+
return this.subject.asObservable();
|
|
658
|
+
}
|
|
659
|
+
sendMessage(message) {
|
|
660
|
+
this.subject.next(message);
|
|
661
|
+
}
|
|
662
|
+
constructor(serviceMeta, lStorageService, sessionStorageService, groupService) {
|
|
663
|
+
this.serviceMeta = serviceMeta;
|
|
664
|
+
this.lStorageService = lStorageService;
|
|
665
|
+
this.sessionStorageService = sessionStorageService;
|
|
666
|
+
this.groupService = groupService;
|
|
667
|
+
}
|
|
668
|
+
login(post_data) {
|
|
669
|
+
const _this = this;
|
|
670
|
+
this.lStorageService.setitemonLocalStorage('login', true);
|
|
671
|
+
post_data.mUniqueId = this.lStorageService.getitemfromLocalStorage('mUniqueId');
|
|
672
|
+
console.log(post_data);
|
|
673
|
+
const promise = new Promise((resolve, reject) => {
|
|
674
|
+
_this.loginConsumer(post_data).subscribe(data => {
|
|
675
|
+
this.lStorageService.removeitemfromLocalStorage('login');
|
|
676
|
+
_this.setLoginData(data, post_data);
|
|
677
|
+
this.sendMessage({ ttype: 'refresh', action: false });
|
|
678
|
+
resolve(data);
|
|
679
|
+
}, error => {
|
|
680
|
+
if (error.status === 401 && error.error === 'Session Already Exist') {
|
|
681
|
+
const authToken = this.lStorageService.getitemfromLocalStorage('c_authorizationToken');
|
|
682
|
+
_this.doLogout().then(() => {
|
|
683
|
+
this.lStorageService.setitemonLocalStorage('c_authorizationToken', authToken);
|
|
684
|
+
_this.login(post_data);
|
|
685
|
+
});
|
|
686
|
+
}
|
|
687
|
+
reject(error);
|
|
688
|
+
});
|
|
689
|
+
});
|
|
690
|
+
return promise;
|
|
691
|
+
}
|
|
692
|
+
/**
|
|
693
|
+
* Set Credentials and User Type (provider/consumer) in Local Storage
|
|
694
|
+
* @param data
|
|
695
|
+
* @param post_data
|
|
696
|
+
* @param mod
|
|
697
|
+
*/
|
|
698
|
+
setLoginData(data, post_data) {
|
|
699
|
+
console.log("Set Login Data:", data);
|
|
700
|
+
this.groupService.setitemToGroupStorage('ynw-user', data);
|
|
701
|
+
this.lStorageService.setitemonLocalStorage('isBusinessOwner', 'false');
|
|
702
|
+
if (post_data['password']) {
|
|
703
|
+
delete post_data['password'];
|
|
704
|
+
}
|
|
705
|
+
this.lStorageService.setitemonLocalStorage('ynw-credentials', JSON.stringify(post_data));
|
|
706
|
+
}
|
|
707
|
+
signUp(post_data) {
|
|
708
|
+
const promise = new Promise((resolve, reject) => {
|
|
709
|
+
this.signUpConsumer(post_data).subscribe(data => {
|
|
710
|
+
resolve(data);
|
|
711
|
+
}, error => {
|
|
712
|
+
reject(error);
|
|
713
|
+
});
|
|
714
|
+
});
|
|
715
|
+
return promise;
|
|
716
|
+
}
|
|
717
|
+
doLogout() {
|
|
718
|
+
console.log("Do Logout");
|
|
719
|
+
const _this = this;
|
|
720
|
+
this.lStorageService.setitemonLocalStorage('logout', true);
|
|
721
|
+
this.lStorageService.removeitemfromLocalStorage('authorization');
|
|
722
|
+
const promise = new Promise((resolve, reject) => {
|
|
723
|
+
_this.consumerLogout().subscribe(() => {
|
|
724
|
+
_this.lStorageService.clearLocalstorage();
|
|
725
|
+
_this.sessionStorageService.clearSessionStorage();
|
|
726
|
+
this.sendMessage({ ttype: 'refresh', action: false });
|
|
727
|
+
resolve();
|
|
728
|
+
});
|
|
729
|
+
});
|
|
730
|
+
return promise;
|
|
731
|
+
}
|
|
732
|
+
signUpConsumer(body) {
|
|
733
|
+
return this.serviceMeta.httpPost('consumer', body);
|
|
734
|
+
}
|
|
735
|
+
loginConsumer(body) {
|
|
736
|
+
console.log("LoginConsumer", body);
|
|
737
|
+
return this.serviceMeta.httpPost('consumer/login', body);
|
|
738
|
+
}
|
|
739
|
+
consumerLogout() {
|
|
740
|
+
return this.serviceMeta.httpDelete('consumer/login');
|
|
741
|
+
}
|
|
742
|
+
sendConsumerOTP(body) {
|
|
743
|
+
const url = 'consumer/oauth/identify';
|
|
744
|
+
return this.serviceMeta.httpPost(url, body);
|
|
745
|
+
}
|
|
746
|
+
verifyConsumerOTP(otp) {
|
|
747
|
+
const url = 'consumer/oauth/otp/' + otp + '/verify';
|
|
748
|
+
return this.serviceMeta.httpPost(url);
|
|
749
|
+
}
|
|
750
|
+
verifyNewPhoneOTP(otp, body, origin) {
|
|
751
|
+
const path = origin + '/login/' + otp + '/verifyLogin';
|
|
752
|
+
return this.serviceMeta.httpPut(path, body);
|
|
753
|
+
}
|
|
754
|
+
verifyNewPhone(phonenumber, origin, countryCode) {
|
|
755
|
+
const path = origin + '/login/verifyLogin/' + phonenumber + '?countryCode=' + countryCode;
|
|
756
|
+
return this.serviceMeta.httpPost(path);
|
|
757
|
+
}
|
|
758
|
+
getProviderConsumer() {
|
|
759
|
+
return this.serviceMeta.httpGet('spconsumer');
|
|
760
|
+
}
|
|
761
|
+
/**
|
|
762
|
+
* To check whether user logged in or not
|
|
763
|
+
* @returns true/false
|
|
764
|
+
*/
|
|
765
|
+
goThroughLogin() {
|
|
766
|
+
const _this = this;
|
|
767
|
+
return new Promise(function (resolve) {
|
|
768
|
+
if (_this.lStorageService.getitemfromLocalStorage('ynw-credentials')) {
|
|
769
|
+
resolve(true);
|
|
770
|
+
}
|
|
771
|
+
else {
|
|
772
|
+
resolve(false);
|
|
773
|
+
}
|
|
774
|
+
});
|
|
775
|
+
}
|
|
776
|
+
shareOTPforForm(uuid) {
|
|
777
|
+
const url = 'consumer/consentform/sendOtp/' + uuid;
|
|
778
|
+
return this.serviceMeta.httpPut(url);
|
|
779
|
+
}
|
|
780
|
+
verifyOTPforForm(otp, uuid) {
|
|
781
|
+
const url = 'consumer/consentform/verifyOtp/' + otp + '/' + uuid;
|
|
782
|
+
return this.serviceMeta.httpPatch(url);
|
|
783
|
+
}
|
|
784
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: AuthService, deps: [{ token: ServiceMeta }, { token: LocalStorageService }, { token: SessionStorageService }, { token: GroupStorageService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
785
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: AuthService, providedIn: 'root' });
|
|
786
|
+
}
|
|
787
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: AuthService, decorators: [{
|
|
788
|
+
type: Injectable,
|
|
789
|
+
args: [{
|
|
790
|
+
providedIn: 'root'
|
|
791
|
+
}]
|
|
792
|
+
}], ctorParameters: () => [{ type: ServiceMeta }, { type: LocalStorageService }, { type: SessionStorageService }, { type: GroupStorageService }] });
|
|
793
|
+
|
|
794
|
+
/**
|
|
795
|
+
*
|
|
796
|
+
*/
|
|
797
|
+
class FileService {
|
|
798
|
+
// Supported images types
|
|
799
|
+
IMAGE_FORMATS = [
|
|
800
|
+
'image/gif',
|
|
801
|
+
'image/png',
|
|
802
|
+
'image/jpeg',
|
|
803
|
+
'image/bmp',
|
|
804
|
+
'image/webp'
|
|
805
|
+
];
|
|
806
|
+
FILETYPES_UPLOAD = [
|
|
807
|
+
'image/jpg',
|
|
808
|
+
'image/png',
|
|
809
|
+
'image/jpeg',
|
|
810
|
+
'image/bmp',
|
|
811
|
+
'application/pdf',
|
|
812
|
+
'application/jfif',
|
|
813
|
+
'video/mp4',
|
|
814
|
+
'video/mpeg',
|
|
815
|
+
'audio/mpeg',
|
|
816
|
+
'audio/mp3',
|
|
817
|
+
'audio/ogg',
|
|
818
|
+
'application/vnd.ms-excel',
|
|
819
|
+
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
|
820
|
+
'application/doc',
|
|
821
|
+
'application/ms-doc',
|
|
822
|
+
'application/msword',
|
|
823
|
+
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
|
824
|
+
'docx',
|
|
825
|
+
'doc'
|
|
826
|
+
];
|
|
827
|
+
imageSize = 15000000;
|
|
828
|
+
FILE_MAX_SIZE = 10000000;
|
|
829
|
+
constructor() { }
|
|
830
|
+
/**
|
|
831
|
+
* Method returns supported formats of files which has to be uploaded
|
|
832
|
+
* @param source image/file
|
|
833
|
+
* @returns available formats
|
|
834
|
+
*/
|
|
835
|
+
getSupportedFormats(source) {
|
|
836
|
+
console.log(source);
|
|
837
|
+
let formats = [];
|
|
838
|
+
if (source == 'image') {
|
|
839
|
+
formats = this.IMAGE_FORMATS;
|
|
840
|
+
//return this.IMAGE_FORMATS;
|
|
841
|
+
}
|
|
842
|
+
else {
|
|
843
|
+
formats = this.FILETYPES_UPLOAD;
|
|
844
|
+
//return this.FILETYPES_UPLOAD;
|
|
845
|
+
}
|
|
846
|
+
console.log(formats);
|
|
847
|
+
return formats;
|
|
848
|
+
}
|
|
849
|
+
/**
|
|
850
|
+
* Method will return the maximum uploadable size of a file/image
|
|
851
|
+
* @returns Maximum size of the image to upload
|
|
852
|
+
*/
|
|
853
|
+
getMaximumImageSize() {
|
|
854
|
+
return this.imageSize;
|
|
855
|
+
}
|
|
856
|
+
imageValidation(file, source) {
|
|
857
|
+
console.log("In Image Validation:", source);
|
|
858
|
+
let file_types = [];
|
|
859
|
+
if (source === 'attachment' || source === 'consumerimages') {
|
|
860
|
+
file_types = this.getSupportedFormats('file');
|
|
861
|
+
}
|
|
862
|
+
else {
|
|
863
|
+
file_types = this.getSupportedFormats('image');
|
|
864
|
+
}
|
|
865
|
+
const image_max_size = this.getMaximumImageSize();
|
|
866
|
+
const error = [];
|
|
867
|
+
console.log(file_types);
|
|
868
|
+
console.log(file.type);
|
|
869
|
+
let is_error = false;
|
|
870
|
+
if (!file.type || (file.type && file_types.indexOf(file.type) === -1)) {
|
|
871
|
+
error['type'] = true;
|
|
872
|
+
is_error = true;
|
|
873
|
+
}
|
|
874
|
+
if (file.size && file.size > image_max_size) {
|
|
875
|
+
error['size'] = true;
|
|
876
|
+
is_error = true;
|
|
877
|
+
}
|
|
878
|
+
if (is_error === false) {
|
|
879
|
+
return true;
|
|
880
|
+
}
|
|
881
|
+
else {
|
|
882
|
+
return error;
|
|
883
|
+
}
|
|
884
|
+
}
|
|
885
|
+
getImage(url, fileObj) {
|
|
886
|
+
let file = fileObj;
|
|
887
|
+
if (fileObj && fileObj['mimeType']) {
|
|
888
|
+
file['type'] = fileObj['mimeType'];
|
|
889
|
+
}
|
|
890
|
+
// console.log("File :", file);
|
|
891
|
+
// console.log("File Type :", file.type)
|
|
892
|
+
// console.log("File Name :", file.name.includes('docx'))
|
|
893
|
+
if (file.type) {
|
|
894
|
+
if (file.type == 'application/pdf') {
|
|
895
|
+
return './assets/images/pdf.png';
|
|
896
|
+
}
|
|
897
|
+
else if (file.type == 'application/vnd.ms-excel' || file.type == 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet') {
|
|
898
|
+
return './assets/images/xls.png';
|
|
899
|
+
}
|
|
900
|
+
else if (file.type == 'audio/mp3' || file.type == 'audio/mpeg' || file.type == 'audio/ogg') {
|
|
901
|
+
return './assets/images/audio.png';
|
|
902
|
+
}
|
|
903
|
+
else if (file.type == 'video/mp4' || file.type == 'video/mpeg') {
|
|
904
|
+
return './assets/images/video.png';
|
|
905
|
+
}
|
|
906
|
+
else if (file.type == 'application/msword' || file.type == 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' || file.type.includes('docx') || file.type.includes('doc')) {
|
|
907
|
+
return './assets/images/ImgeFileIcon/wordDocsBgWhite.jpg';
|
|
908
|
+
}
|
|
909
|
+
else if (file.type.includes('txt')) {
|
|
910
|
+
return './assets/images/ImgeFileIcon/docTxt.png';
|
|
911
|
+
}
|
|
912
|
+
else {
|
|
913
|
+
return url;
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
return url;
|
|
917
|
+
}
|
|
918
|
+
getImageByType(type) {
|
|
919
|
+
if (type == 'pdf') {
|
|
920
|
+
return './assets/images/pdf.png';
|
|
921
|
+
}
|
|
922
|
+
else if (type == 'vnd.ms-excel' || type == 'vnd.openxmlformats-officedocument.spreadsheetml.sheet' || type == 'xls' || type == 'xlsx') {
|
|
923
|
+
return './assets/images/xls.png';
|
|
924
|
+
}
|
|
925
|
+
else if (type == 'mp3' || type == 'mpeg' || type == 'ogg') {
|
|
926
|
+
return './assets/images/audio.png';
|
|
927
|
+
}
|
|
928
|
+
else if (type == 'mp4' || type == 'mpeg') {
|
|
929
|
+
return './assets/images/video.png';
|
|
930
|
+
}
|
|
931
|
+
else if (type == 'application/msword' || type == 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' || type == 'docx' || type == 'doc' || type == 'msword') {
|
|
932
|
+
return './assets/images/ImgeFileIcon/wordDocsBgWhite.jpg';
|
|
933
|
+
}
|
|
934
|
+
else if (type == 'txt') {
|
|
935
|
+
return './assets/images/ImgeFileIcon/docTxt.png';
|
|
936
|
+
}
|
|
937
|
+
else {
|
|
938
|
+
return './assets/images/img_uplod.png';
|
|
939
|
+
}
|
|
940
|
+
}
|
|
941
|
+
filesSelected(event, selectedMessage) {
|
|
942
|
+
const _this = this;
|
|
943
|
+
return new Promise(function (resolve, reject) {
|
|
944
|
+
// const input = event.target.files;
|
|
945
|
+
let input = event.files;
|
|
946
|
+
if (event.target && event.target.files) {
|
|
947
|
+
input = event.target.files;
|
|
948
|
+
}
|
|
949
|
+
console.log("File Selected :", input);
|
|
950
|
+
if (input) {
|
|
951
|
+
let count = 0;
|
|
952
|
+
let filesCount = input.length;
|
|
953
|
+
for (const file of input) {
|
|
954
|
+
if (_this.FILETYPES_UPLOAD.indexOf(file.type) === -1) {
|
|
955
|
+
reject("Selected file type not supported");
|
|
956
|
+
}
|
|
957
|
+
else if (file.size > _this.FILE_MAX_SIZE) {
|
|
958
|
+
reject("Please upload files with size < 10mb");
|
|
959
|
+
}
|
|
960
|
+
else {
|
|
961
|
+
selectedMessage.files.push(file);
|
|
962
|
+
const reader = new FileReader();
|
|
963
|
+
reader.onload = (e) => {
|
|
964
|
+
selectedMessage.base64.push(e.target["result"]);
|
|
965
|
+
count++;
|
|
966
|
+
if (count === filesCount) {
|
|
967
|
+
resolve(true);
|
|
968
|
+
}
|
|
969
|
+
};
|
|
970
|
+
reader.readAsDataURL(file);
|
|
971
|
+
}
|
|
972
|
+
}
|
|
973
|
+
}
|
|
974
|
+
});
|
|
975
|
+
}
|
|
976
|
+
filessSelected(event, selectedMessage) {
|
|
977
|
+
const _this = this;
|
|
978
|
+
return new Promise(function (resolve, reject) {
|
|
979
|
+
// const input = event.target.files;
|
|
980
|
+
let input = event.files;
|
|
981
|
+
if (event.target && event.target.files) {
|
|
982
|
+
input = event.target.files;
|
|
983
|
+
}
|
|
984
|
+
console.log("File Selected :", input);
|
|
985
|
+
if (input) {
|
|
986
|
+
let count = 0;
|
|
987
|
+
let filesCount = input.length;
|
|
988
|
+
for (const file of input) {
|
|
989
|
+
if (_this.IMAGE_FORMATS.indexOf(file.type) === -1) {
|
|
990
|
+
reject("Selected file type not supported");
|
|
991
|
+
}
|
|
992
|
+
else if (file.size > _this.FILE_MAX_SIZE) {
|
|
993
|
+
reject("Please upload files with size < 10mb");
|
|
994
|
+
}
|
|
995
|
+
else {
|
|
996
|
+
selectedMessage.files.push(file);
|
|
997
|
+
const reader = new FileReader();
|
|
998
|
+
reader.onload = (e) => {
|
|
999
|
+
selectedMessage.base64.push(e.target["result"]);
|
|
1000
|
+
count++;
|
|
1001
|
+
if (count === filesCount) {
|
|
1002
|
+
resolve(true);
|
|
1003
|
+
}
|
|
1004
|
+
};
|
|
1005
|
+
reader.readAsDataURL(file);
|
|
1006
|
+
}
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
1009
|
+
});
|
|
1010
|
+
}
|
|
1011
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: FileService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1012
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: FileService, providedIn: 'root' });
|
|
1013
|
+
}
|
|
1014
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: FileService, decorators: [{
|
|
1015
|
+
type: Injectable,
|
|
1016
|
+
args: [{
|
|
1017
|
+
providedIn: 'root'
|
|
1018
|
+
}]
|
|
1019
|
+
}], ctorParameters: () => [] });
|
|
1020
|
+
|
|
1021
|
+
class CommonService {
|
|
1022
|
+
constructor() { }
|
|
1023
|
+
groupBy(xs, key) {
|
|
1024
|
+
return xs.reduce(function (rv, x) {
|
|
1025
|
+
(rv[x[key]] = rv[x[key]] || []).push(x);
|
|
1026
|
+
return rv;
|
|
1027
|
+
}, {});
|
|
1028
|
+
}
|
|
1029
|
+
isNumeric(evt) {
|
|
1030
|
+
const inputKeyCode = evt.keyCode ? evt.keyCode : evt.which;
|
|
1031
|
+
if ((inputKeyCode >= 48 && inputKeyCode <= 57) || inputKeyCode === 8 || inputKeyCode === 46) {
|
|
1032
|
+
return true;
|
|
1033
|
+
}
|
|
1034
|
+
else {
|
|
1035
|
+
evt.preventDefault();
|
|
1036
|
+
return false;
|
|
1037
|
+
}
|
|
1038
|
+
}
|
|
1039
|
+
showlogoicon(logo) {
|
|
1040
|
+
if (logo == null || logo === '') {
|
|
1041
|
+
return '../../assets/images/no_image_icon.png';
|
|
1042
|
+
}
|
|
1043
|
+
else {
|
|
1044
|
+
return logo;
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: CommonService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1048
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: CommonService, providedIn: 'root' });
|
|
1049
|
+
}
|
|
1050
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: CommonService, decorators: [{
|
|
1051
|
+
type: Injectable,
|
|
1052
|
+
args: [{
|
|
1053
|
+
providedIn: 'root'
|
|
1054
|
+
}]
|
|
1055
|
+
}], ctorParameters: () => [] });
|
|
1056
|
+
|
|
1057
|
+
class StorageService {
|
|
1058
|
+
servicemeta;
|
|
1059
|
+
storage = {
|
|
1060
|
+
'spconsumer': null,
|
|
1061
|
+
'salutation': null
|
|
1062
|
+
};
|
|
1063
|
+
constructor(servicemeta) {
|
|
1064
|
+
this.servicemeta = servicemeta;
|
|
1065
|
+
}
|
|
1066
|
+
clear() {
|
|
1067
|
+
this.storage = {
|
|
1068
|
+
'spconsumer': null,
|
|
1069
|
+
'salutation': null
|
|
1070
|
+
};
|
|
1071
|
+
}
|
|
1072
|
+
set(key, value) {
|
|
1073
|
+
this.storage[key] = value;
|
|
1074
|
+
}
|
|
1075
|
+
get(key) {
|
|
1076
|
+
return this.storage[key];
|
|
1077
|
+
}
|
|
1078
|
+
getSPConsumer() {
|
|
1079
|
+
return this.servicemeta.httpGet('spconsumer');
|
|
1080
|
+
}
|
|
1081
|
+
getProviderConsumer() {
|
|
1082
|
+
const _this = this;
|
|
1083
|
+
return new Promise(function (resolve, reject) {
|
|
1084
|
+
const spConsumer = _this.get('spconsumer');
|
|
1085
|
+
if (spConsumer) {
|
|
1086
|
+
resolve(spConsumer);
|
|
1087
|
+
}
|
|
1088
|
+
else {
|
|
1089
|
+
_this.getSPConsumer().subscribe((spconsumer) => {
|
|
1090
|
+
_this.set('spconsumer', spconsumer);
|
|
1091
|
+
resolve(spconsumer);
|
|
1092
|
+
}, (error) => {
|
|
1093
|
+
reject(error);
|
|
1094
|
+
});
|
|
1095
|
+
}
|
|
1096
|
+
});
|
|
1097
|
+
}
|
|
1098
|
+
getSalutationsRest() {
|
|
1099
|
+
const url = 'consumer/userTitle';
|
|
1100
|
+
return this.servicemeta.httpGet(url);
|
|
1101
|
+
}
|
|
1102
|
+
getSalutations() {
|
|
1103
|
+
const _this = this;
|
|
1104
|
+
return new Promise(function (resolve, reject) {
|
|
1105
|
+
const salutations = _this.get('salutations');
|
|
1106
|
+
if (salutations) {
|
|
1107
|
+
resolve(salutations);
|
|
1108
|
+
}
|
|
1109
|
+
else {
|
|
1110
|
+
_this.getSalutationsRest().subscribe((salutations) => {
|
|
1111
|
+
_this.set('salutations', salutations);
|
|
1112
|
+
resolve(salutations);
|
|
1113
|
+
}, (error) => {
|
|
1114
|
+
reject(error);
|
|
1115
|
+
});
|
|
1116
|
+
}
|
|
1117
|
+
});
|
|
1118
|
+
}
|
|
1119
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: StorageService, deps: [{ token: ServiceMeta }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1120
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: StorageService, providedIn: 'root' });
|
|
1121
|
+
}
|
|
1122
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: StorageService, decorators: [{
|
|
1123
|
+
type: Injectable,
|
|
1124
|
+
args: [{
|
|
1125
|
+
providedIn: 'root'
|
|
1126
|
+
}]
|
|
1127
|
+
}], ctorParameters: () => [{ type: ServiceMeta }] });
|
|
1128
|
+
|
|
1129
|
+
Injectable({
|
|
1130
|
+
providedIn: 'root'
|
|
1131
|
+
});
|
|
1132
|
+
class ErrorMessagingService {
|
|
1133
|
+
API_ERROR = 'There was a problem while connecting to our server. Please try again.';
|
|
1134
|
+
constructor() {
|
|
1135
|
+
}
|
|
1136
|
+
getApiError(error) {
|
|
1137
|
+
console.log("Get Api Error:", error);
|
|
1138
|
+
if (error.error && typeof error.error === 'string') {
|
|
1139
|
+
return error.error;
|
|
1140
|
+
}
|
|
1141
|
+
else if (typeof error === 'string') {
|
|
1142
|
+
return error;
|
|
1143
|
+
}
|
|
1144
|
+
else {
|
|
1145
|
+
return this.API_ERROR;
|
|
1146
|
+
}
|
|
1147
|
+
}
|
|
1148
|
+
}
|
|
1149
|
+
|
|
1150
|
+
const Messages = {
|
|
1151
|
+
'OTP_SENT_EMAIL': 'Enter the OTP sent to [your_email]',
|
|
1152
|
+
'OTP_SENT_LABEL': 'Enter the OTP sent to [your_mobile]',
|
|
1153
|
+
'PROFILE_UPDATE': 'Profile has been updated successfully',
|
|
1154
|
+
'EMAIL_MISMATCH': 'Email and Re-entered Email do not match',
|
|
1155
|
+
'PHONE_VERIFIED': 'Your mobile number has been verified',
|
|
1156
|
+
'MEMBER_CREATED': 'Member added successfully',
|
|
1157
|
+
'MEMBER_UPDATED': 'Member updated successfully',
|
|
1158
|
+
'APPLIED_INBILLTIME': ' Coupon will be applied on the final bill',
|
|
1159
|
+
'CONSUMERTOPROVIDER_NOTE_ADD': 'Message has been successfully sent',
|
|
1160
|
+
'PROVIDERTOCONSUMER_NOTE_ADD': 'Message has been successfully sent',
|
|
1161
|
+
'MSG_ERROR': 'Please enter the message',
|
|
1162
|
+
'CHECKIN_SUCC_REDIRECT': 'Please wait ... You are being redirected to the Payment Gateway ...',
|
|
1163
|
+
'CHECKIN_ERROR': 'Sorry! an error occured',
|
|
1164
|
+
'SERVICE_RATE_UPDATE': 'Thank you for your feedback',
|
|
1165
|
+
'INBOXICON_TOOPTIP': 'Messages',
|
|
1166
|
+
'FILE_TOOLTIP': 'Upload Files',
|
|
1167
|
+
'NXT_AVAILABLE_TIME_CAPTION': 'Next Available Time',
|
|
1168
|
+
'ESTIMATED_TIME_SMALL_CAPTION': 'Est Wait Time',
|
|
1169
|
+
'SAVE_BTN': 'Save',
|
|
1170
|
+
'CANCEL_BTN': 'Cancel',
|
|
1171
|
+
'UPDATE_BTN': 'Update',
|
|
1172
|
+
'EDIT_BTN': 'Edit',
|
|
1173
|
+
'DELETE_BTN': 'Delete',
|
|
1174
|
+
'SEND_BTN': 'Send',
|
|
1175
|
+
'OK_BTN': 'Ok',
|
|
1176
|
+
'YES_BTN': 'Yes',
|
|
1177
|
+
'NO_BTN': 'No',
|
|
1178
|
+
'CLOSE_BTN': 'Close',
|
|
1179
|
+
'DONE_BTN': 'Complete',
|
|
1180
|
+
'RESEND_BTN': 'Resend',
|
|
1181
|
+
'CONFIRM_BTN': 'Confirm',
|
|
1182
|
+
'FAMILY_MEMBERS': 'Family Members',
|
|
1183
|
+
'FAMILY_MEMBER': 'Family Member',
|
|
1184
|
+
'MEMBER_CAPTION': 'Member',
|
|
1185
|
+
'ADD_FAMILY_MEMBER': 'Add Family Member',
|
|
1186
|
+
'FIRST_NAME_CAP': 'First Name',
|
|
1187
|
+
'LAST_NAME_CAP': 'Last Name',
|
|
1188
|
+
'MOBILE_NUMBER_CAP': 'Mobile #',
|
|
1189
|
+
'GENDER_CAP': 'Gender',
|
|
1190
|
+
'DOB_CAP': 'Date of Birth',
|
|
1191
|
+
'RELATED_LINKS': 'Related Links',
|
|
1192
|
+
'USER_PROF_CAP': 'My Account',
|
|
1193
|
+
'CHANGE_MOB_CAP': 'Change Mobile',
|
|
1194
|
+
'ADD_CHANGE_EMAIL': 'Update Email',
|
|
1195
|
+
'SEND_MSGS_CAP': 'Enquiry',
|
|
1196
|
+
'SEND_MSG_CAP': 'Send Message',
|
|
1197
|
+
'SEND_MSG': 'Enquiry',
|
|
1198
|
+
'MAKE_PAYMENT_CAP': 'Make Payment',
|
|
1199
|
+
'PAYMENT_REDIRECT': 'Please wait ... You are being redirected to the Payment Gateway ...',
|
|
1200
|
+
'PROVIDER_BILL_PAYMENT': 'Payment completed successfully',
|
|
1201
|
+
'BILL_CAPTION': 'Bill',
|
|
1202
|
+
'RATE_VISIT': 'Rate Your Visit',
|
|
1203
|
+
'DATE_CAP': 'Date:',
|
|
1204
|
+
'LOCATION_CAP': 'Location',
|
|
1205
|
+
'NAME_CAP': 'Name:',
|
|
1206
|
+
'RATE_YOU_VISIT': 'Rate Your Visit',
|
|
1207
|
+
'RATING_CAP': 'Rate *',
|
|
1208
|
+
'MESSAGE_CAP': 'Message',
|
|
1209
|
+
'RATE_BTN_CAP': 'Rate',
|
|
1210
|
+
'OTHERMESSAGE_CAP': 'Please Enter Reason For Cancellation',
|
|
1211
|
+
'F_NAME_CAP': 'First Name *',
|
|
1212
|
+
'L_NAME_CAP': 'Last Name *',
|
|
1213
|
+
'TERMS_CONDITIONS_CAP': 'Terms & Conditions',
|
|
1214
|
+
'FILL_FOLL_DETAILS_CAP': 'Please fill in the following details',
|
|
1215
|
+
'MALE_CAP': 'Male',
|
|
1216
|
+
'FEMALE_CAP': 'Female',
|
|
1217
|
+
'EMAIL_CAP': 'Email',
|
|
1218
|
+
'CHANGEMOBILE_CAP': 'Change Mobile #',
|
|
1219
|
+
'APPLY_CAP': 'Apply',
|
|
1220
|
+
'ADD_MEMBER_CAP': 'Add Member',
|
|
1221
|
+
'SERV_PROVIDER_CAP': 'Service Provider',
|
|
1222
|
+
'DATE_COL_CAP': 'Date',
|
|
1223
|
+
'BILL_PAYMENT_CAP': 'Bill Payment',
|
|
1224
|
+
'COUPON_CODE_CAP': 'Coupon Code',
|
|
1225
|
+
'AMNT_TO_PAY_CAP': 'Amount to pay',
|
|
1226
|
+
'NO_PAY_OPT_AVIL_CAP': 'No payment options available.',
|
|
1227
|
+
'PHONE_NO_CAP': 'Phone Number',
|
|
1228
|
+
'EMAIL_ID_CAP': 'Email Id',
|
|
1229
|
+
'DATE_TIME_CAP': 'Date/Time',
|
|
1230
|
+
'LOGOUT_CAP': 'Logout',
|
|
1231
|
+
'PROVIDER_CONSUMER_CAP': 'Provider / Consumer',
|
|
1232
|
+
'REPLY_CAP': 'Reply',
|
|
1233
|
+
'DELETE_MSG_CAP': 'Delete Message',
|
|
1234
|
+
'NO_MSG_EXISTS_CAP': 'No messages found',
|
|
1235
|
+
'ENTER_OTP_CAP': 'Enter OTP *',
|
|
1236
|
+
'RESEND_OTP_TO_CAP': 'Resend OTP',
|
|
1237
|
+
'RESEND_OTP_EMAIL_CAP': 'Resend OTP via email',
|
|
1238
|
+
'RESEND_OTP_OPT_ACTIVE_IN_CAP': 'Resend OTP option will be active in',
|
|
1239
|
+
'SECONDS_CAP': 'seconds.',
|
|
1240
|
+
'ENTER_EMAIL_CAP': 'Enter Email',
|
|
1241
|
+
'TIME_CAP': 'Time',
|
|
1242
|
+
'BILL_NO_CAP': 'Bill #',
|
|
1243
|
+
'GSTIN_CAP': 'GSTIN',
|
|
1244
|
+
'QTY_CAP': 'Qty',
|
|
1245
|
+
'DISCOUNT_CAP': 'Discount',
|
|
1246
|
+
'COUPON_CAP': 'Coupon',
|
|
1247
|
+
'SUB_TOT_CAP': 'Sub Total',
|
|
1248
|
+
'GROSS_AMNT_CAP': 'Gross Amount',
|
|
1249
|
+
'TAX_CAP': 'Tax',
|
|
1250
|
+
'AMNT_PAID_CAP': 'Amount Paid',
|
|
1251
|
+
'BACK_TO_BILL_CAP': 'Back to Bill',
|
|
1252
|
+
'PAY_LOGS_CAP': 'Payment Logs',
|
|
1253
|
+
'AMOUNT_CAP': 'Amount',
|
|
1254
|
+
'REFUNDABLE_CAP': 'Refundable',
|
|
1255
|
+
'MODE_CAP': 'Mode',
|
|
1256
|
+
'REFUNDS_CAP': 'Refunds',
|
|
1257
|
+
'PAY_STATUS': 'Status',
|
|
1258
|
+
'GALLERY_CAP': 'Gallery',
|
|
1259
|
+
'SELECT_IMAGE_CAP': 'Click here to select the files',
|
|
1260
|
+
'NEW_CAP': 'New',
|
|
1261
|
+
'ADD_SER_ITEM_CAP': 'Add Service/Item',
|
|
1262
|
+
'AVAILABLE_CAP': 'Available',
|
|
1263
|
+
'QTY_CAPITAL_CAP': 'Qty',
|
|
1264
|
+
'SEL_DISC_CAP': 'Select Discount',
|
|
1265
|
+
'SEL_COUPON_CAP': 'Select Coupon ',
|
|
1266
|
+
'DISCOUNTS_COUPONS_CAP': 'Discounts / Coupons',
|
|
1267
|
+
'BILL_DISCOUNT_CAP': 'Discount',
|
|
1268
|
+
'ADD_BTN': 'Add',
|
|
1269
|
+
'CUSTOMER_MOBILE_CAP': 'Mobile',
|
|
1270
|
+
'COUPONS_CAP': 'Coupons',
|
|
1271
|
+
'SERVICE_PHOTO_CAP': 'photos',
|
|
1272
|
+
'POPUP_SELECT_REASON_CAP': 'Select a reason',
|
|
1273
|
+
'POPUP_SEND_MSG_CAP': 'Create your own message for',
|
|
1274
|
+
'DASHBOARD_TITLE': 'Dashboard',
|
|
1275
|
+
'CONS_NOTE_NOTE_CAP': 'Note',
|
|
1276
|
+
'CURRENTMOBMSG': 'Your Current Mobile # :',
|
|
1277
|
+
'GET_TOKEN': 'Get Token',
|
|
1278
|
+
'CHECK_DET_NO_CUS_NOTES_FOUND_CAP': 'No [customer] note found',
|
|
1279
|
+
'NOUSERCAP': 'Global Services',
|
|
1280
|
+
'SEND_MESSAGE': 'The [customer] does not have a mobile number/email',
|
|
1281
|
+
'ATTACHMENT_SEND': 'Attachment sent successfully',
|
|
1282
|
+
'QUESTIONNAIRE_CONSUMER_HEADING': 'More info',
|
|
1283
|
+
'CHECK_DET_DATE_CAP': 'Date',
|
|
1284
|
+
'CHECK_DET_LOCATION_CAP': 'Location',
|
|
1285
|
+
'CHECK_DET_SERVICE_CAP': 'Service',
|
|
1286
|
+
'CHECK_DET_SEND_MSG_CAP': 'Send Message',
|
|
1287
|
+
'CHECK_DET_CUST_NOTES_CAP': '[customer] Note',
|
|
1288
|
+
'BPROFILE_HAVE_NOT_ADD_CAP': 'You haven\'t added ',
|
|
1289
|
+
'BPROFILE_ADD_IT_NOW_CAP': 'Add It Now',
|
|
1290
|
+
'BPROFILE_PHONENO': 'Please enter the phone number',
|
|
1291
|
+
'BPROFILE_PRIVACY_PHONE_10DIGITS': 'Mobile number should have 10 digits',
|
|
1292
|
+
'PRO_STATUS_CAP': 'Status',
|
|
1293
|
+
'PRO_SERVICE_CAP': 'Service'
|
|
1294
|
+
};
|
|
1295
|
+
|
|
1296
|
+
/**
|
|
1297
|
+
* Terminology/Word Factory
|
|
1298
|
+
*/
|
|
1299
|
+
class WordProcessor {
|
|
1300
|
+
TIMEOUT_DELAY_LARGE10 = 10000; // msec
|
|
1301
|
+
terminologies;
|
|
1302
|
+
spterminologies;
|
|
1303
|
+
constructor() { }
|
|
1304
|
+
/**
|
|
1305
|
+
* Method to set the terminlogies for Jaldee
|
|
1306
|
+
* @param terminologies
|
|
1307
|
+
*/
|
|
1308
|
+
setTerminologies(terminologies) {
|
|
1309
|
+
// console.log("Set Terminologies:", terminologies);
|
|
1310
|
+
this.terminologies = terminologies;
|
|
1311
|
+
}
|
|
1312
|
+
/**
|
|
1313
|
+
* Method to get the terminologies
|
|
1314
|
+
*/
|
|
1315
|
+
getTerminologies() {
|
|
1316
|
+
return this.terminologies;
|
|
1317
|
+
}
|
|
1318
|
+
/**
|
|
1319
|
+
* Method to set the sp terminlogies for Jaldee
|
|
1320
|
+
* @param terminology
|
|
1321
|
+
*/
|
|
1322
|
+
setSPTerminologies(terminology) {
|
|
1323
|
+
this.spterminologies = terminology;
|
|
1324
|
+
}
|
|
1325
|
+
/**
|
|
1326
|
+
* Method to get the sp terminologies
|
|
1327
|
+
*/
|
|
1328
|
+
getSPTerminologies() {
|
|
1329
|
+
return this.spterminologies;
|
|
1330
|
+
}
|
|
1331
|
+
/**
|
|
1332
|
+
* Method returns the CamelCase
|
|
1333
|
+
* @param str text to convert
|
|
1334
|
+
*/
|
|
1335
|
+
toCamelCase(str) {
|
|
1336
|
+
return str;
|
|
1337
|
+
}
|
|
1338
|
+
/**
|
|
1339
|
+
* Convert the first letter to Uppercase
|
|
1340
|
+
* @param str
|
|
1341
|
+
*/
|
|
1342
|
+
firstToUpper(str) {
|
|
1343
|
+
if (str) {
|
|
1344
|
+
if (str.substr(0, 7) === 'http://' || str.substr(0, 8) === 'https://') {
|
|
1345
|
+
return str;
|
|
1346
|
+
}
|
|
1347
|
+
else {
|
|
1348
|
+
return str.charAt(0).toUpperCase() + str.substr(1);
|
|
1349
|
+
}
|
|
1350
|
+
}
|
|
1351
|
+
}
|
|
1352
|
+
/**
|
|
1353
|
+
* Show/Hide Success or Error Messages
|
|
1354
|
+
* @param ob Object to put the message
|
|
1355
|
+
* @param message Message to show
|
|
1356
|
+
*/
|
|
1357
|
+
apiSuccessAutoHide(ob, message) {
|
|
1358
|
+
const replaced_message = this.findTerminologyTerm(message);
|
|
1359
|
+
ob.api_success = this.firstToUpper(replaced_message);
|
|
1360
|
+
setTimeout(() => {
|
|
1361
|
+
ob.api_success = null;
|
|
1362
|
+
}, this.TIMEOUT_DELAY_LARGE10);
|
|
1363
|
+
}
|
|
1364
|
+
/**
|
|
1365
|
+
* Show error and hide it automatically
|
|
1366
|
+
* @param ob Object holds the message
|
|
1367
|
+
* @param error Message to be shown
|
|
1368
|
+
*/
|
|
1369
|
+
apiErrorAutoHide(ob, error) {
|
|
1370
|
+
// error = this.errorService.getApiError(error);
|
|
1371
|
+
const replaced_message = this.findTerminologyTerm(error);
|
|
1372
|
+
ob.api_error = this.firstToUpper(replaced_message);
|
|
1373
|
+
setTimeout(() => {
|
|
1374
|
+
ob.api_error = null;
|
|
1375
|
+
}, this.TIMEOUT_DELAY_LARGE10);
|
|
1376
|
+
}
|
|
1377
|
+
/**
|
|
1378
|
+
* Get the terminology from terminologies
|
|
1379
|
+
* @param term
|
|
1380
|
+
*/
|
|
1381
|
+
getTerminologyTerm(term, terminologies) {
|
|
1382
|
+
if (terminologies) {
|
|
1383
|
+
this.setTerminologies(terminologies);
|
|
1384
|
+
}
|
|
1385
|
+
else {
|
|
1386
|
+
terminologies = this.getTerminologies();
|
|
1387
|
+
}
|
|
1388
|
+
const term_only = term.replace(/[\[\]']/g, '').toLowerCase();
|
|
1389
|
+
// console.log("Get Terminology Term", terminologies);
|
|
1390
|
+
if (terminologies) {
|
|
1391
|
+
return (terminologies[term_only]) ? terminologies[term_only] : ((term === term_only) ? term_only : term);
|
|
1392
|
+
}
|
|
1393
|
+
else {
|
|
1394
|
+
return (term === term_only) ? term_only : term;
|
|
1395
|
+
}
|
|
1396
|
+
}
|
|
1397
|
+
/**
|
|
1398
|
+
* Replace the term within the full message
|
|
1399
|
+
* @param term term to be replaced
|
|
1400
|
+
* @param full_message full message
|
|
1401
|
+
*/
|
|
1402
|
+
removeTerminologyTerm(term, full_message) {
|
|
1403
|
+
const term_replace = this.getTerminologyTerm(term);
|
|
1404
|
+
// console.log("Term To replace:", term_replace);
|
|
1405
|
+
const term_only = term.replace(/[\[\]']/g, ''); // term may me with or without '[' ']'
|
|
1406
|
+
// console.log("Term:", term_only);
|
|
1407
|
+
return full_message.replace('[' + term_only + ']', term_replace);
|
|
1408
|
+
}
|
|
1409
|
+
/**
|
|
1410
|
+
* Find the terminology
|
|
1411
|
+
* @param message
|
|
1412
|
+
*/
|
|
1413
|
+
findTerminologyTerm(message) {
|
|
1414
|
+
// console.log("Message:", message);
|
|
1415
|
+
let replaced_msg = message;
|
|
1416
|
+
if (message) {
|
|
1417
|
+
const matches = message.match(/\[(.*?)\]/g);
|
|
1418
|
+
replaced_msg = message;
|
|
1419
|
+
// console.log("Matches", matches);
|
|
1420
|
+
if (matches) {
|
|
1421
|
+
for (const match of matches) {
|
|
1422
|
+
replaced_msg = this.removeTerminologyTerm(match, replaced_msg);
|
|
1423
|
+
}
|
|
1424
|
+
}
|
|
1425
|
+
}
|
|
1426
|
+
return replaced_msg;
|
|
1427
|
+
}
|
|
1428
|
+
/**
|
|
1429
|
+
* get the message from the messages list
|
|
1430
|
+
* @param key identifier for the message
|
|
1431
|
+
*/
|
|
1432
|
+
getProjectMesssages(key) {
|
|
1433
|
+
let message = Messages[key] || '';
|
|
1434
|
+
message = this.findTerminologyTerm(message);
|
|
1435
|
+
return this.firstToUpper(message);
|
|
1436
|
+
}
|
|
1437
|
+
/**
|
|
1438
|
+
* Extract error message from the error object
|
|
1439
|
+
* @param error error message to shown
|
|
1440
|
+
*/
|
|
1441
|
+
getProjectErrorMesssages(message, terminologies) {
|
|
1442
|
+
if (terminologies) {
|
|
1443
|
+
this.setTerminologies(this.terminologies);
|
|
1444
|
+
}
|
|
1445
|
+
// let message = this.errorService.getApiError(error);
|
|
1446
|
+
message = this.findTerminologyTerm(message);
|
|
1447
|
+
return this.firstToUpper(message);
|
|
1448
|
+
}
|
|
1449
|
+
/**
|
|
1450
|
+
* Get the terminology from terminologies
|
|
1451
|
+
* @param term
|
|
1452
|
+
*/
|
|
1453
|
+
getSPTerminologyTerm(term) {
|
|
1454
|
+
const term_only = term;
|
|
1455
|
+
const terminologies = this.getSPTerminologies();
|
|
1456
|
+
// console.log("Terminologies:", terminologies);
|
|
1457
|
+
if (terminologies) {
|
|
1458
|
+
return (terminologies[term_only]) ? terminologies[term_only] : ((term === term_only) ? term_only : term);
|
|
1459
|
+
}
|
|
1460
|
+
else {
|
|
1461
|
+
return (term === term_only) ? term_only : term;
|
|
1462
|
+
}
|
|
1463
|
+
}
|
|
1464
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: WordProcessor, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1465
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: WordProcessor, providedIn: 'root' });
|
|
1466
|
+
}
|
|
1467
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: WordProcessor, decorators: [{
|
|
1468
|
+
type: Injectable,
|
|
1469
|
+
args: [{
|
|
1470
|
+
providedIn: 'root'
|
|
1471
|
+
}]
|
|
1472
|
+
}], ctorParameters: () => [] });
|
|
1473
|
+
|
|
1474
|
+
class SafeHtmlPipe {
|
|
1475
|
+
sanitized;
|
|
1476
|
+
constructor(sanitized) {
|
|
1477
|
+
this.sanitized = sanitized;
|
|
1478
|
+
}
|
|
1479
|
+
transform(value) {
|
|
1480
|
+
return this.sanitized.bypassSecurityTrustHtml(value);
|
|
1481
|
+
}
|
|
1482
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: SafeHtmlPipe, deps: [{ token: i1$3.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1483
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.9", ngImport: i0, type: SafeHtmlPipe, name: "safeHtml" });
|
|
1484
|
+
}
|
|
1485
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: SafeHtmlPipe, decorators: [{
|
|
1486
|
+
type: Pipe,
|
|
1487
|
+
args: [{ name: 'safeHtml' }]
|
|
1488
|
+
}], ctorParameters: () => [{ type: i1$3.DomSanitizer }] });
|
|
1489
|
+
|
|
1490
|
+
class TruncatePipe {
|
|
1491
|
+
transform(value, args) {
|
|
1492
|
+
const limit = args.length > 0 ? parseInt(args[0], 10) : 20;
|
|
1493
|
+
const trail = args.length > 1 ? args[1] : '...';
|
|
1494
|
+
return value.length > limit ? value.substring(0, limit) + trail : value;
|
|
1495
|
+
}
|
|
1496
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: TruncatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1497
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.9", ngImport: i0, type: TruncatePipe, name: "limitTo" });
|
|
1498
|
+
}
|
|
1499
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: TruncatePipe, decorators: [{
|
|
1500
|
+
type: Pipe,
|
|
1501
|
+
args: [{
|
|
1502
|
+
name: 'limitTo'
|
|
1503
|
+
}]
|
|
1504
|
+
}] });
|
|
1505
|
+
|
|
1506
|
+
class FilterPipe {
|
|
1507
|
+
transform(items, searchText) {
|
|
1508
|
+
if (!items)
|
|
1509
|
+
return [];
|
|
1510
|
+
if (!searchText)
|
|
1511
|
+
return items;
|
|
1512
|
+
return items.filter(item => {
|
|
1513
|
+
return Object.keys(item).some(key => {
|
|
1514
|
+
return String(item[key]).toLowerCase().includes(searchText.toLowerCase());
|
|
1515
|
+
});
|
|
1516
|
+
});
|
|
1517
|
+
}
|
|
1518
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: FilterPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1519
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.9", ngImport: i0, type: FilterPipe, name: "filter" });
|
|
1520
|
+
}
|
|
1521
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: FilterPipe, decorators: [{
|
|
1522
|
+
type: Pipe,
|
|
1523
|
+
args: [{
|
|
1524
|
+
name: 'filter'
|
|
1525
|
+
}]
|
|
1526
|
+
}] });
|
|
1527
|
+
|
|
1528
|
+
class CapitalizeFirstPipe {
|
|
1529
|
+
transform(value) {
|
|
1530
|
+
if (value !== null && value !== undefined) {
|
|
1531
|
+
value = value.toString().trim();
|
|
1532
|
+
return value.charAt(0).toUpperCase() + value.slice(1);
|
|
1533
|
+
}
|
|
1534
|
+
return '';
|
|
1535
|
+
}
|
|
1536
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: CapitalizeFirstPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1537
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.9", ngImport: i0, type: CapitalizeFirstPipe, name: "capitalizeFirst" });
|
|
1538
|
+
}
|
|
1539
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: CapitalizeFirstPipe, decorators: [{
|
|
1540
|
+
type: Pipe,
|
|
1541
|
+
args: [{ name: 'capitalizeFirst' }]
|
|
1542
|
+
}] });
|
|
1543
|
+
|
|
1544
|
+
class AutolinkPipe {
|
|
1545
|
+
transform(value) {
|
|
1546
|
+
if (!value)
|
|
1547
|
+
return value;
|
|
1548
|
+
const urlPattern = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig;
|
|
1549
|
+
const emailPattern = /([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9._-]+)/ig;
|
|
1550
|
+
return value
|
|
1551
|
+
.replace(urlPattern, '<a href="$1" target="_blank">$1</a>')
|
|
1552
|
+
.replace(emailPattern, '<a href="mailto:$1">$1</a>');
|
|
1553
|
+
}
|
|
1554
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: AutolinkPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1555
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.9", ngImport: i0, type: AutolinkPipe, name: "autolink" });
|
|
1556
|
+
}
|
|
1557
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: AutolinkPipe, decorators: [{
|
|
1558
|
+
type: Pipe,
|
|
1559
|
+
args: [{
|
|
1560
|
+
name: 'autolink'
|
|
1561
|
+
}]
|
|
1562
|
+
}] });
|
|
1563
|
+
|
|
1564
|
+
class SkeletonLoadingComponent {
|
|
1565
|
+
constructor() { }
|
|
1566
|
+
ngOnInit() {
|
|
1567
|
+
}
|
|
1568
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: SkeletonLoadingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1569
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: SkeletonLoadingComponent, selector: "app-skeleton-loading", ngImport: i0, template: "<ul class=\"o-vertical-spacing o-vertical-spacing--l\">\r\n <li class=\"blog-post o-media\">\r\n <div class=\"o-media__figure\">\r\n <span class=\"skeleton-box\" style=\"width:100px;height:80px;\"></span>\r\n </div>\r\n <div class=\"o-media__body\">\r\n <div class=\"o-vertical-spacing\">\r\n <h3 class=\"blog-post__headline\">\r\n <span class=\"skeleton-box\" style=\"width:55%;\"></span>\r\n </h3>\r\n <p>\r\n <span class=\"skeleton-box\" style=\"width:80%;\"></span>\r\n <span class=\"skeleton-box\" style=\"width:90%;\"></span>\r\n <span class=\"skeleton-box\" style=\"width:83%;\"></span>\r\n <span class=\"skeleton-box\" style=\"width:80%;\"></span>\r\n </p>\r\n <div class=\"blog-post__meta\">\r\n <span class=\"skeleton-box\" style=\"width:70px;\"></span>\r\n </div>\r\n </div>\r\n </div>\r\n </li>\r\n <li class=\"blog-post o-media\">\r\n <div class=\"o-media__figure\">\r\n <span class=\"skeleton-box\" style=\"width:100px;height:80px;\"></span>\r\n </div>\r\n <div class=\"o-media__body\">\r\n <div class=\"o-vertical-spacing\">\r\n <h3 class=\"blog-post__headline\">\r\n <span class=\"skeleton-box\" style=\"width:55%;\"></span>\r\n </h3>\r\n <p>\r\n <span class=\"skeleton-box\" style=\"width:80%;\"></span>\r\n <span class=\"skeleton-box\" style=\"width:90%;\"></span>\r\n <span class=\"skeleton-box\" style=\"width:83%;\"></span>\r\n <span class=\"skeleton-box\" style=\"width:80%;\"></span>\r\n </p>\r\n <div class=\"blog-post__meta\">\r\n <span class=\"skeleton-box\" style=\"width:70px;\"></span>\r\n </div>\r\n </div>\r\n </div>\r\n </li>\r\n <li class=\"blog-post o-media\">\r\n <div class=\"o-media__figure\">\r\n <span class=\"skeleton-box\" style=\"width:100px;height:80px;\"></span>\r\n </div>\r\n <div class=\"o-media__body\">\r\n <div class=\"o-vertical-spacing\">\r\n <h3 class=\"blog-post__headline\">\r\n <span class=\"skeleton-box\" style=\"width:55%;\"></span>\r\n </h3>\r\n <p>\r\n <span class=\"skeleton-box\" style=\"width:80%;\"></span>\r\n <span class=\"skeleton-box\" style=\"width:90%;\"></span>\r\n <span class=\"skeleton-box\" style=\"width:83%;\"></span>\r\n <span class=\"skeleton-box\" style=\"width:80%;\"></span>\r\n </p>\r\n <div class=\"blog-post__meta\">\r\n <span class=\"skeleton-box\" style=\"width:70px;\"></span>\r\n </div>\r\n </div>\r\n </div>\r\n </li>\r\n <li class=\"blog-post o-media\">\r\n <div class=\"o-media__figure\">\r\n <span class=\"skeleton-box\" style=\"width:100px;height:80px;\"></span>\r\n </div>\r\n <div class=\"o-media__body\">\r\n <div class=\"o-vertical-spacing\">\r\n <h3 class=\"blog-post__headline\">\r\n <span class=\"skeleton-box\" style=\"width:55%;\"></span>\r\n </h3>\r\n <p>\r\n <span class=\"skeleton-box\" style=\"width:80%;\"></span>\r\n <span class=\"skeleton-box\" style=\"width:90%;\"></span>\r\n <span class=\"skeleton-box\" style=\"width:83%;\"></span>\r\n <span class=\"skeleton-box\" style=\"width:80%;\"></span>\r\n </p>\r\n <div class=\"blog-post__meta\">\r\n <span class=\"skeleton-box\" style=\"width:70px;\"></span>\r\n </div>\r\n </div>\r\n </div>\r\n </li>\r\n <li class=\"blog-post o-media\">\r\n <div class=\"o-media__figure\">\r\n <span class=\"skeleton-box\" style=\"width:100px;height:80px;\"></span>\r\n </div>\r\n <div class=\"o-media__body\">\r\n <div class=\"o-vertical-spacing\">\r\n <h3 class=\"blog-post__headline\">\r\n <span class=\"skeleton-box\" style=\"width:55%;\"></span>\r\n </h3>\r\n <p>\r\n <span class=\"skeleton-box\" style=\"width:80%;\"></span>\r\n <span class=\"skeleton-box\" style=\"width:90%;\"></span>\r\n <span class=\"skeleton-box\" style=\"width:83%;\"></span>\r\n <span class=\"skeleton-box\" style=\"width:80%;\"></span>\r\n </p>\r\n <div class=\"blog-post__meta\">\r\n <span class=\"skeleton-box\" style=\"width:70px;\"></span>\r\n </div>\r\n </div>\r\n </div>\r\n </li>\r\n\r\n</ul>\r\n", styles: [".skeleton-box{display:inline-block;height:1em;position:relative;overflow:hidden;background-color:#dddbdd}.skeleton-box:after{position:absolute;inset:0;transform:translate(-100%);background-image:linear-gradient(90deg,#fff0 0,#fff3 20%,#ffffff80 60%,#fff0);animation:shimmer 2s infinite;content:\"\"}@keyframes shimmer{to{transform:translate(100%)}}.blog-post__headline{font-size:1.25em;font-weight:700}.blog-post__meta{font-size:.85em;color:#6b6b6b}.o-media{display:flex}.o-media__body{flex-grow:1;margin-left:1em}.o-vertical-spacing>*+*{margin-top:.75em}.o-vertical-spacing--l>*+*{margin-top:2em}header h1{font-family:Rubik,sans-serif;font-weight:500;line-height:1.2;font-size:2em}header p:not(:first-child){margin-top:1em}\n"] });
|
|
1570
|
+
}
|
|
1571
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: SkeletonLoadingComponent, decorators: [{
|
|
1572
|
+
type: Component,
|
|
1573
|
+
args: [{ selector: 'app-skeleton-loading', template: "<ul class=\"o-vertical-spacing o-vertical-spacing--l\">\r\n <li class=\"blog-post o-media\">\r\n <div class=\"o-media__figure\">\r\n <span class=\"skeleton-box\" style=\"width:100px;height:80px;\"></span>\r\n </div>\r\n <div class=\"o-media__body\">\r\n <div class=\"o-vertical-spacing\">\r\n <h3 class=\"blog-post__headline\">\r\n <span class=\"skeleton-box\" style=\"width:55%;\"></span>\r\n </h3>\r\n <p>\r\n <span class=\"skeleton-box\" style=\"width:80%;\"></span>\r\n <span class=\"skeleton-box\" style=\"width:90%;\"></span>\r\n <span class=\"skeleton-box\" style=\"width:83%;\"></span>\r\n <span class=\"skeleton-box\" style=\"width:80%;\"></span>\r\n </p>\r\n <div class=\"blog-post__meta\">\r\n <span class=\"skeleton-box\" style=\"width:70px;\"></span>\r\n </div>\r\n </div>\r\n </div>\r\n </li>\r\n <li class=\"blog-post o-media\">\r\n <div class=\"o-media__figure\">\r\n <span class=\"skeleton-box\" style=\"width:100px;height:80px;\"></span>\r\n </div>\r\n <div class=\"o-media__body\">\r\n <div class=\"o-vertical-spacing\">\r\n <h3 class=\"blog-post__headline\">\r\n <span class=\"skeleton-box\" style=\"width:55%;\"></span>\r\n </h3>\r\n <p>\r\n <span class=\"skeleton-box\" style=\"width:80%;\"></span>\r\n <span class=\"skeleton-box\" style=\"width:90%;\"></span>\r\n <span class=\"skeleton-box\" style=\"width:83%;\"></span>\r\n <span class=\"skeleton-box\" style=\"width:80%;\"></span>\r\n </p>\r\n <div class=\"blog-post__meta\">\r\n <span class=\"skeleton-box\" style=\"width:70px;\"></span>\r\n </div>\r\n </div>\r\n </div>\r\n </li>\r\n <li class=\"blog-post o-media\">\r\n <div class=\"o-media__figure\">\r\n <span class=\"skeleton-box\" style=\"width:100px;height:80px;\"></span>\r\n </div>\r\n <div class=\"o-media__body\">\r\n <div class=\"o-vertical-spacing\">\r\n <h3 class=\"blog-post__headline\">\r\n <span class=\"skeleton-box\" style=\"width:55%;\"></span>\r\n </h3>\r\n <p>\r\n <span class=\"skeleton-box\" style=\"width:80%;\"></span>\r\n <span class=\"skeleton-box\" style=\"width:90%;\"></span>\r\n <span class=\"skeleton-box\" style=\"width:83%;\"></span>\r\n <span class=\"skeleton-box\" style=\"width:80%;\"></span>\r\n </p>\r\n <div class=\"blog-post__meta\">\r\n <span class=\"skeleton-box\" style=\"width:70px;\"></span>\r\n </div>\r\n </div>\r\n </div>\r\n </li>\r\n <li class=\"blog-post o-media\">\r\n <div class=\"o-media__figure\">\r\n <span class=\"skeleton-box\" style=\"width:100px;height:80px;\"></span>\r\n </div>\r\n <div class=\"o-media__body\">\r\n <div class=\"o-vertical-spacing\">\r\n <h3 class=\"blog-post__headline\">\r\n <span class=\"skeleton-box\" style=\"width:55%;\"></span>\r\n </h3>\r\n <p>\r\n <span class=\"skeleton-box\" style=\"width:80%;\"></span>\r\n <span class=\"skeleton-box\" style=\"width:90%;\"></span>\r\n <span class=\"skeleton-box\" style=\"width:83%;\"></span>\r\n <span class=\"skeleton-box\" style=\"width:80%;\"></span>\r\n </p>\r\n <div class=\"blog-post__meta\">\r\n <span class=\"skeleton-box\" style=\"width:70px;\"></span>\r\n </div>\r\n </div>\r\n </div>\r\n </li>\r\n <li class=\"blog-post o-media\">\r\n <div class=\"o-media__figure\">\r\n <span class=\"skeleton-box\" style=\"width:100px;height:80px;\"></span>\r\n </div>\r\n <div class=\"o-media__body\">\r\n <div class=\"o-vertical-spacing\">\r\n <h3 class=\"blog-post__headline\">\r\n <span class=\"skeleton-box\" style=\"width:55%;\"></span>\r\n </h3>\r\n <p>\r\n <span class=\"skeleton-box\" style=\"width:80%;\"></span>\r\n <span class=\"skeleton-box\" style=\"width:90%;\"></span>\r\n <span class=\"skeleton-box\" style=\"width:83%;\"></span>\r\n <span class=\"skeleton-box\" style=\"width:80%;\"></span>\r\n </p>\r\n <div class=\"blog-post__meta\">\r\n <span class=\"skeleton-box\" style=\"width:70px;\"></span>\r\n </div>\r\n </div>\r\n </div>\r\n </li>\r\n\r\n</ul>\r\n", styles: [".skeleton-box{display:inline-block;height:1em;position:relative;overflow:hidden;background-color:#dddbdd}.skeleton-box:after{position:absolute;inset:0;transform:translate(-100%);background-image:linear-gradient(90deg,#fff0 0,#fff3 20%,#ffffff80 60%,#fff0);animation:shimmer 2s infinite;content:\"\"}@keyframes shimmer{to{transform:translate(100%)}}.blog-post__headline{font-size:1.25em;font-weight:700}.blog-post__meta{font-size:.85em;color:#6b6b6b}.o-media{display:flex}.o-media__body{flex-grow:1;margin-left:1em}.o-vertical-spacing>*+*{margin-top:.75em}.o-vertical-spacing--l>*+*{margin-top:2em}header h1{font-family:Rubik,sans-serif;font-weight:500;line-height:1.2;font-size:2em}header p:not(:first-child){margin-top:1em}\n"] }]
|
|
1574
|
+
}], ctorParameters: () => [] });
|
|
1575
|
+
|
|
1576
|
+
class SkeletonLoadingModule {
|
|
1577
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: SkeletonLoadingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1578
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.9", ngImport: i0, type: SkeletonLoadingModule, declarations: [SkeletonLoadingComponent], imports: [CommonModule], exports: [SkeletonLoadingComponent] });
|
|
1579
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: SkeletonLoadingModule, imports: [CommonModule] });
|
|
1580
|
+
}
|
|
1581
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: SkeletonLoadingModule, decorators: [{
|
|
1582
|
+
type: NgModule,
|
|
1583
|
+
args: [{
|
|
1584
|
+
declarations: [
|
|
1585
|
+
SkeletonLoadingComponent
|
|
1586
|
+
],
|
|
1587
|
+
imports: [
|
|
1588
|
+
CommonModule
|
|
1589
|
+
],
|
|
1590
|
+
exports: [
|
|
1591
|
+
SkeletonLoadingComponent
|
|
1592
|
+
]
|
|
1593
|
+
}]
|
|
1594
|
+
}] });
|
|
1595
|
+
|
|
1596
|
+
class LoadingSpinnerComponent {
|
|
1597
|
+
spinnerParams = [];
|
|
1598
|
+
diameter;
|
|
1599
|
+
stroke;
|
|
1600
|
+
constructor() { }
|
|
1601
|
+
ngOnInit() {
|
|
1602
|
+
this.diameter = (this.spinnerParams['diameter']) ? this.spinnerParams['diameter'] : 40;
|
|
1603
|
+
this.stroke = (this.spinnerParams['strokewidth']) ? this.spinnerParams['strokewidth'] : 5;
|
|
1604
|
+
}
|
|
1605
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: LoadingSpinnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1606
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: LoadingSpinnerComponent, selector: "app-common-innerloading-spinner", inputs: { spinnerParams: "spinnerParams" }, ngImport: i0, template: "<mat-spinner class=\"inner-load-spinner\" [strokeWidth]=\"stroke\" [diameter]=\"diameter\"></mat-spinner>", styles: [".inner-load-spinner{margin:0 auto}\n"], dependencies: [{ kind: "component", type: i1$4.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }] });
|
|
1607
|
+
}
|
|
1608
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: LoadingSpinnerComponent, decorators: [{
|
|
1609
|
+
type: Component,
|
|
1610
|
+
args: [{ selector: 'app-common-innerloading-spinner', template: "<mat-spinner class=\"inner-load-spinner\" [strokeWidth]=\"stroke\" [diameter]=\"diameter\"></mat-spinner>", styles: [".inner-load-spinner{margin:0 auto}\n"] }]
|
|
1611
|
+
}], ctorParameters: () => [], propDecorators: { spinnerParams: [{
|
|
1612
|
+
type: Input
|
|
1613
|
+
}] } });
|
|
1614
|
+
|
|
1615
|
+
class LoadingSpinnerModule {
|
|
1616
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: LoadingSpinnerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1617
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.9", ngImport: i0, type: LoadingSpinnerModule, declarations: [LoadingSpinnerComponent], imports: [CommonModule,
|
|
1618
|
+
MatProgressSpinnerModule], exports: [LoadingSpinnerComponent] });
|
|
1619
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: LoadingSpinnerModule, imports: [CommonModule,
|
|
1620
|
+
MatProgressSpinnerModule] });
|
|
1621
|
+
}
|
|
1622
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: LoadingSpinnerModule, decorators: [{
|
|
1623
|
+
type: NgModule,
|
|
1624
|
+
args: [{
|
|
1625
|
+
imports: [
|
|
1626
|
+
CommonModule,
|
|
1627
|
+
MatProgressSpinnerModule
|
|
1628
|
+
],
|
|
1629
|
+
declarations: [
|
|
1630
|
+
LoadingSpinnerComponent
|
|
1631
|
+
],
|
|
1632
|
+
exports: [
|
|
1633
|
+
LoadingSpinnerComponent
|
|
1634
|
+
]
|
|
1635
|
+
}]
|
|
1636
|
+
}] });
|
|
1637
|
+
|
|
1638
|
+
/**
|
|
1639
|
+
* Class which handle Questionaire
|
|
1640
|
+
*/
|
|
1641
|
+
class QuestionaireService {
|
|
1642
|
+
servicemeta;
|
|
1643
|
+
subject = new Subject();
|
|
1644
|
+
getMessage() {
|
|
1645
|
+
return this.subject.asObservable();
|
|
1646
|
+
}
|
|
1647
|
+
sendMessage(message) {
|
|
1648
|
+
this.subject.next(message);
|
|
1649
|
+
}
|
|
1650
|
+
constructor(servicemeta) {
|
|
1651
|
+
this.servicemeta = servicemeta;
|
|
1652
|
+
}
|
|
1653
|
+
validateConsumerQuestionnaire(body, accountId) {
|
|
1654
|
+
const url = 'consumer/questionnaire/validate' + '?account=' + accountId;
|
|
1655
|
+
return this.servicemeta.httpPut(url, body);
|
|
1656
|
+
}
|
|
1657
|
+
validateConsumerQuestionnaireResbumit(body, accountId) {
|
|
1658
|
+
const url = 'consumer/questionnaire/resubmit/validate' + '?account=' + accountId;
|
|
1659
|
+
return this.servicemeta.httpPut(url, body);
|
|
1660
|
+
}
|
|
1661
|
+
consumerOrderQnrUploadStatusUpdate(uid, account, data) {
|
|
1662
|
+
const url = 'consumer/orders/questionnaire/upload/status/' + uid + '?account=' + account;
|
|
1663
|
+
return this.servicemeta.httpPut(url, data);
|
|
1664
|
+
}
|
|
1665
|
+
consumerDonationQnrUploadStatusUpdate(uid, account, data) {
|
|
1666
|
+
const url = 'consumer/donation/questionnaire/upload/status/' + uid + '?account=' + account;
|
|
1667
|
+
return this.servicemeta.httpPut(url, data);
|
|
1668
|
+
}
|
|
1669
|
+
consumerApptQnrUploadStatusUpdate(uid, account, data) {
|
|
1670
|
+
const url = 'consumer/appointment/questionnaire/upload/status/' + uid + '?account=' + account;
|
|
1671
|
+
return this.servicemeta.httpPut(url, data);
|
|
1672
|
+
}
|
|
1673
|
+
consumerWaitlistQnrUploadStatusUpdate(uid, account, data) {
|
|
1674
|
+
const url = 'consumer/waitlist/questionnaire/upload/status/' + uid + '?account=' + account;
|
|
1675
|
+
return this.servicemeta.httpPut(url, data);
|
|
1676
|
+
}
|
|
1677
|
+
videoaudioS3Upload(file, url) {
|
|
1678
|
+
return this.servicemeta.httpPut(url, file);
|
|
1679
|
+
}
|
|
1680
|
+
resubmitConsumerWaitlistQuestionnaire(body, uuid, accountId) {
|
|
1681
|
+
const url = 'consumer/waitlist/questionnaire/resubmit/' + uuid + '?account=' + accountId;
|
|
1682
|
+
return this.servicemeta.httpPost(url, body);
|
|
1683
|
+
}
|
|
1684
|
+
submitConsumerWaitlistQuestionnaire(body, uuid, accountId) {
|
|
1685
|
+
const url = 'consumer/waitlist/questionnaire/' + uuid + '?account=' + accountId;
|
|
1686
|
+
return this.servicemeta.httpPost(url, body);
|
|
1687
|
+
}
|
|
1688
|
+
resubmitConsumerDonationQuestionnaire(body, uuid, accountId) {
|
|
1689
|
+
const url = 'consumer/donation/questionnaire/resubmit/' + uuid + '?account=' + accountId;
|
|
1690
|
+
return this.servicemeta.httpPost(url, body);
|
|
1691
|
+
}
|
|
1692
|
+
resubmitConsumerApptQuestionnaire(body, uuid, accountId) {
|
|
1693
|
+
const url = 'consumer/appointment/questionnaire/resubmit/' + uuid + '?account=' + accountId;
|
|
1694
|
+
return this.servicemeta.httpPost(url, body);
|
|
1695
|
+
}
|
|
1696
|
+
submitConsumerApptQuestionnaire(body, uuid, accountId) {
|
|
1697
|
+
const url = 'consumer/appointment/questionnaire/' + uuid + '?account=' + accountId;
|
|
1698
|
+
return this.servicemeta.httpPost(url, body);
|
|
1699
|
+
}
|
|
1700
|
+
resubmitConsumerOrderQuestionnaire(body, uuid, accountId) {
|
|
1701
|
+
const url = 'consumer/orders/questionnaire/resubmit/' + uuid + '?account=' + accountId;
|
|
1702
|
+
return this.servicemeta.httpPost(url, body);
|
|
1703
|
+
}
|
|
1704
|
+
submitConsumerOrderQuestionnaire(body, uuid, accountId) {
|
|
1705
|
+
const url = 'consumer/orders/questionnaire/' + uuid + '?account=' + accountId;
|
|
1706
|
+
return this.servicemeta.httpPost(url, body);
|
|
1707
|
+
}
|
|
1708
|
+
validateConsumerIvrQuestionnaire(body, id) {
|
|
1709
|
+
const url = 'consumer/ivr/questionnaire/submit/' + id;
|
|
1710
|
+
return this.servicemeta.httpPost(url, body);
|
|
1711
|
+
}
|
|
1712
|
+
submitDonationQuestionnaire(uuid, body, account_id) {
|
|
1713
|
+
const url = 'consumer/donation/questionnaire/submit/' + uuid + '?account=' + account_id;
|
|
1714
|
+
return this.servicemeta.httpPost(url, body);
|
|
1715
|
+
}
|
|
1716
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: QuestionaireService, deps: [{ token: ServiceMeta }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1717
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: QuestionaireService, providedIn: 'root' });
|
|
1718
|
+
}
|
|
1719
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: QuestionaireService, decorators: [{
|
|
1720
|
+
type: Injectable,
|
|
1721
|
+
args: [{
|
|
1722
|
+
providedIn: 'root'
|
|
1723
|
+
}]
|
|
1724
|
+
}], ctorParameters: () => [{ type: ServiceMeta }] });
|
|
1725
|
+
|
|
1726
|
+
class ShowuploadfileComponent {
|
|
1727
|
+
dialogRef;
|
|
1728
|
+
commonService;
|
|
1729
|
+
data;
|
|
1730
|
+
details = [];
|
|
1731
|
+
locationImg;
|
|
1732
|
+
cacheavoider = '';
|
|
1733
|
+
title = 'Detailed View';
|
|
1734
|
+
type;
|
|
1735
|
+
theme;
|
|
1736
|
+
constructor(dialogRef, commonService, data) {
|
|
1737
|
+
this.dialogRef = dialogRef;
|
|
1738
|
+
this.commonService = commonService;
|
|
1739
|
+
this.data = data;
|
|
1740
|
+
this.details = this.data.file;
|
|
1741
|
+
console.log('details', this.details);
|
|
1742
|
+
if (this.data.source === 'qnr') {
|
|
1743
|
+
this.title = (this.details.comments) ? this.details.comments : '';
|
|
1744
|
+
if (this.details.s3path) {
|
|
1745
|
+
this.details.url = this.details.s3path;
|
|
1746
|
+
}
|
|
1747
|
+
else {
|
|
1748
|
+
this.details.url = this.details.path;
|
|
1749
|
+
}
|
|
1750
|
+
this.type = this.details.type.split('/');
|
|
1751
|
+
this.type = this.type[0];
|
|
1752
|
+
}
|
|
1753
|
+
}
|
|
1754
|
+
ngOnInit() {
|
|
1755
|
+
this.theme = this.data.theme;
|
|
1756
|
+
const cnow = new Date();
|
|
1757
|
+
const dd = cnow.getHours() + '' + cnow.getMinutes() + '' + cnow.getSeconds();
|
|
1758
|
+
this.cacheavoider = dd;
|
|
1759
|
+
}
|
|
1760
|
+
showimg(imgurl) {
|
|
1761
|
+
let logourl = '';
|
|
1762
|
+
if (imgurl) {
|
|
1763
|
+
logourl = (imgurl) ? imgurl + '?' + this.cacheavoider : '';
|
|
1764
|
+
}
|
|
1765
|
+
return this.commonService.showlogoicon(logourl);
|
|
1766
|
+
}
|
|
1767
|
+
closeDialog() {
|
|
1768
|
+
this.dialogRef.close();
|
|
1769
|
+
}
|
|
1770
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: ShowuploadfileComponent, deps: [{ token: i1$5.MatDialogRef }, { token: CommonService }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
1771
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: ShowuploadfileComponent, selector: "app-showuploadfile", ngImport: i0, template: "<form [ngClass]=\"theme\">\r\n <h1 class=\"mat-dialog-title\"> {{title}}\r\n <button #locte mat-dialog-close class=\"modal_close\" tabindex=\"-1\">\r\n <i class=\"fa fa-window-close\" aria-hidden=\"true\"></i>\r\n </button>\r\n </h1>\r\n <div class=\"pad-20 image-scroll\">\r\n <img style=\"width:100%;margin-top: -20px;\" [src]=\"details.url||details.s3path\" alt=\"\"\r\n *ngIf=\"details.type && details.type == 'image/bmp'|| details.type =='image/png'|| details.type == 'image/gif' || details.type == 'image/jpg' ||details.type =='image/jpeg'||details.type == 'image/webp'\r\n ||details.type == 'bmp' ||details.type == 'png' ||details.type == 'gif' ||details.type == 'jpg' ||details.type == 'jpeg' ||details.type == 'webp'\" />\r\n <video style=\"width:100%;height: 75vh;\" controls [class.mgn-up-minus-20]=\"data.source === 'mr'\"\r\n *ngIf=\"(data.source === 'qnr' && type === 'video') || (data.source === 'mr' && details.type && details.type == 'video/mp4' || details.type == 'video/mpeg'||details.type == 'video/quicktime')\">\r\n <source [src]=\"details.url\" />\r\n </video>\r\n <audio style=\"width:100%;\" controls [class.mgn-up-minus-20]=\"data.source === 'mr'\"\r\n *ngIf=\"(data.source === 'qnr' && type === 'audio') || (data.source === 'mr' && details.type && details.type == 'audio/ogg'|| details.type == 'audio/mpeg'|| details.type == 'audio/mp3')\">\r\n <source [src]=\"details.url\" />\r\n </audio>\r\n </div>\r\n</form>", styles: [".pad-20{padding:20px!important}\n"], dependencies: [{ kind: "directive", type: i12.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i12.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$5.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }] });
|
|
1772
|
+
}
|
|
1773
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: ShowuploadfileComponent, decorators: [{
|
|
1774
|
+
type: Component,
|
|
1775
|
+
args: [{ selector: 'app-showuploadfile', template: "<form [ngClass]=\"theme\">\r\n <h1 class=\"mat-dialog-title\"> {{title}}\r\n <button #locte mat-dialog-close class=\"modal_close\" tabindex=\"-1\">\r\n <i class=\"fa fa-window-close\" aria-hidden=\"true\"></i>\r\n </button>\r\n </h1>\r\n <div class=\"pad-20 image-scroll\">\r\n <img style=\"width:100%;margin-top: -20px;\" [src]=\"details.url||details.s3path\" alt=\"\"\r\n *ngIf=\"details.type && details.type == 'image/bmp'|| details.type =='image/png'|| details.type == 'image/gif' || details.type == 'image/jpg' ||details.type =='image/jpeg'||details.type == 'image/webp'\r\n ||details.type == 'bmp' ||details.type == 'png' ||details.type == 'gif' ||details.type == 'jpg' ||details.type == 'jpeg' ||details.type == 'webp'\" />\r\n <video style=\"width:100%;height: 75vh;\" controls [class.mgn-up-minus-20]=\"data.source === 'mr'\"\r\n *ngIf=\"(data.source === 'qnr' && type === 'video') || (data.source === 'mr' && details.type && details.type == 'video/mp4' || details.type == 'video/mpeg'||details.type == 'video/quicktime')\">\r\n <source [src]=\"details.url\" />\r\n </video>\r\n <audio style=\"width:100%;\" controls [class.mgn-up-minus-20]=\"data.source === 'mr'\"\r\n *ngIf=\"(data.source === 'qnr' && type === 'audio') || (data.source === 'mr' && details.type && details.type == 'audio/ogg'|| details.type == 'audio/mpeg'|| details.type == 'audio/mp3')\">\r\n <source [src]=\"details.url\" />\r\n </audio>\r\n </div>\r\n</form>", styles: [".pad-20{padding:20px!important}\n"] }]
|
|
1776
|
+
}], ctorParameters: () => [{ type: i1$5.MatDialogRef }, { type: CommonService }, { type: undefined, decorators: [{
|
|
1777
|
+
type: Inject,
|
|
1778
|
+
args: [MAT_DIALOG_DATA]
|
|
1779
|
+
}] }] });
|
|
1780
|
+
|
|
1781
|
+
/**
|
|
1782
|
+
* Class which handles date/time related functions
|
|
1783
|
+
*/
|
|
1784
|
+
class DateTimeProcessor {
|
|
1785
|
+
servicemeta;
|
|
1786
|
+
REGION_LANGUAGE = "en-US";
|
|
1787
|
+
TIME_ZONE_REGION = "Asia/Kolkata";
|
|
1788
|
+
myweekdaysSchedule = [
|
|
1789
|
+
"",
|
|
1790
|
+
"Sun",
|
|
1791
|
+
"Mon",
|
|
1792
|
+
"Tue",
|
|
1793
|
+
"Wed",
|
|
1794
|
+
"Thu",
|
|
1795
|
+
"Fri",
|
|
1796
|
+
"Sat"
|
|
1797
|
+
];
|
|
1798
|
+
constructor(servicemeta) {
|
|
1799
|
+
this.servicemeta = servicemeta;
|
|
1800
|
+
}
|
|
1801
|
+
/**
|
|
1802
|
+
*
|
|
1803
|
+
* @param date1
|
|
1804
|
+
* @param date2
|
|
1805
|
+
* @returns difference between the two dates
|
|
1806
|
+
*/
|
|
1807
|
+
getdaysdifffromDates(date1, date2) {
|
|
1808
|
+
let firstdate;
|
|
1809
|
+
let seconddate;
|
|
1810
|
+
if (date1 === 'now') {
|
|
1811
|
+
firstdate = new Date();
|
|
1812
|
+
}
|
|
1813
|
+
else {
|
|
1814
|
+
firstdate = new Date(date1);
|
|
1815
|
+
}
|
|
1816
|
+
seconddate = new Date(date2);
|
|
1817
|
+
const hours = Math.abs(firstdate.getTime() - seconddate.getTime()) / 36e5; // 36e5 is the scientific notation for 60*60*1000
|
|
1818
|
+
return { 'hours': hours };
|
|
1819
|
+
}
|
|
1820
|
+
/**
|
|
1821
|
+
*
|
|
1822
|
+
* @param time
|
|
1823
|
+
* @returns
|
|
1824
|
+
*/
|
|
1825
|
+
getTimeAsNumberOfMinutes(time) {
|
|
1826
|
+
const timeParts = time.split(':');
|
|
1827
|
+
const timeInMinutes = (parseInt(timeParts[0], 10) * 60) + parseInt(timeParts[1], 10);
|
|
1828
|
+
return timeInMinutes;
|
|
1829
|
+
}
|
|
1830
|
+
/**
|
|
1831
|
+
* convert year-month-day to day-monthname-year
|
|
1832
|
+
* @param psdate
|
|
1833
|
+
* @param params
|
|
1834
|
+
* @returns
|
|
1835
|
+
*/
|
|
1836
|
+
formatDate(psdate, params = []) {
|
|
1837
|
+
const monthNames = {
|
|
1838
|
+
'01': 'Jan',
|
|
1839
|
+
'02': 'Feb',
|
|
1840
|
+
'03': 'Mar',
|
|
1841
|
+
'04': 'Apr',
|
|
1842
|
+
'05': 'May',
|
|
1843
|
+
'06': 'Jun',
|
|
1844
|
+
'07': 'Jul',
|
|
1845
|
+
'08': 'Aug',
|
|
1846
|
+
'09': 'Sep',
|
|
1847
|
+
'10': 'Oct',
|
|
1848
|
+
'11': 'Nov',
|
|
1849
|
+
'12': 'Dec'
|
|
1850
|
+
};
|
|
1851
|
+
const darr = psdate.split('-');
|
|
1852
|
+
if (params['rettype'] === 'monthname') {
|
|
1853
|
+
darr[1] = monthNames[darr[1]];
|
|
1854
|
+
return darr[1] + ' ' + darr[2];
|
|
1855
|
+
}
|
|
1856
|
+
else if (params['rettype'] === 'fullarr') {
|
|
1857
|
+
darr[1] = monthNames[darr[1]];
|
|
1858
|
+
return darr;
|
|
1859
|
+
}
|
|
1860
|
+
else {
|
|
1861
|
+
return darr[1] + ' ' + darr[2];
|
|
1862
|
+
}
|
|
1863
|
+
}
|
|
1864
|
+
/**
|
|
1865
|
+
*
|
|
1866
|
+
* @param i
|
|
1867
|
+
* @returns
|
|
1868
|
+
*/
|
|
1869
|
+
addZero(i) {
|
|
1870
|
+
if (i < 10) {
|
|
1871
|
+
i = '0' + i;
|
|
1872
|
+
}
|
|
1873
|
+
return i;
|
|
1874
|
+
}
|
|
1875
|
+
/**
|
|
1876
|
+
*
|
|
1877
|
+
* @param time
|
|
1878
|
+
* @param secreq
|
|
1879
|
+
* @returns
|
|
1880
|
+
*/
|
|
1881
|
+
convert24HourtoAmPm(time, secreq) {
|
|
1882
|
+
const timesp = time.split(':');
|
|
1883
|
+
let hr = parseInt(timesp[0], 10);
|
|
1884
|
+
const min = parseInt(timesp[1], 10);
|
|
1885
|
+
const sec = parseInt(timesp[2], 10);
|
|
1886
|
+
let ampm = '';
|
|
1887
|
+
let retstr = '';
|
|
1888
|
+
if (hr >= 12) {
|
|
1889
|
+
hr = hr - 12;
|
|
1890
|
+
if (hr === 0) {
|
|
1891
|
+
hr = 12;
|
|
1892
|
+
ampm = 'PM';
|
|
1893
|
+
}
|
|
1894
|
+
else if (hr < 0) {
|
|
1895
|
+
ampm = 'AM';
|
|
1896
|
+
}
|
|
1897
|
+
else {
|
|
1898
|
+
ampm = 'PM';
|
|
1899
|
+
}
|
|
1900
|
+
}
|
|
1901
|
+
else if (hr === 0) {
|
|
1902
|
+
hr = 12;
|
|
1903
|
+
ampm = 'AM';
|
|
1904
|
+
}
|
|
1905
|
+
else {
|
|
1906
|
+
ampm = 'AM';
|
|
1907
|
+
}
|
|
1908
|
+
retstr = this.addZero(hr) + ':' + this.addZero(min);
|
|
1909
|
+
if (secreq) {
|
|
1910
|
+
retstr += ':' + sec;
|
|
1911
|
+
}
|
|
1912
|
+
retstr += ' ' + ampm;
|
|
1913
|
+
return retstr;
|
|
1914
|
+
}
|
|
1915
|
+
/**
|
|
1916
|
+
*
|
|
1917
|
+
* @param mins
|
|
1918
|
+
* @returns
|
|
1919
|
+
*/
|
|
1920
|
+
providerConvertMinutesToHourMinute(mins) {
|
|
1921
|
+
let rethr = '';
|
|
1922
|
+
let retmin = '';
|
|
1923
|
+
if (mins > 0) {
|
|
1924
|
+
const hr = Math.floor(mins / 60);
|
|
1925
|
+
const min = Math.floor(mins % 60);
|
|
1926
|
+
if (hr > 0) {
|
|
1927
|
+
if (hr > 1) {
|
|
1928
|
+
rethr = hr + ' Hrs';
|
|
1929
|
+
}
|
|
1930
|
+
else {
|
|
1931
|
+
rethr = hr + ' Hr';
|
|
1932
|
+
}
|
|
1933
|
+
}
|
|
1934
|
+
if (min > 0) {
|
|
1935
|
+
if (min > 1) {
|
|
1936
|
+
retmin = ' ' + min + ' Mins';
|
|
1937
|
+
}
|
|
1938
|
+
else {
|
|
1939
|
+
retmin = ' ' + min + ' Min';
|
|
1940
|
+
}
|
|
1941
|
+
}
|
|
1942
|
+
}
|
|
1943
|
+
else {
|
|
1944
|
+
retmin = '' + 0 + ' Min';
|
|
1945
|
+
}
|
|
1946
|
+
return rethr + retmin;
|
|
1947
|
+
}
|
|
1948
|
+
/**
|
|
1949
|
+
*
|
|
1950
|
+
* @param mins
|
|
1951
|
+
* @returns
|
|
1952
|
+
*/
|
|
1953
|
+
convertMinutesToHourMinute(mins) {
|
|
1954
|
+
let rethr = '';
|
|
1955
|
+
let retmin = '';
|
|
1956
|
+
if (mins > 0) {
|
|
1957
|
+
const hr = Math.floor(mins / 60);
|
|
1958
|
+
const min = Math.floor(mins % 60);
|
|
1959
|
+
if (hr > 0) {
|
|
1960
|
+
if (hr > 1) {
|
|
1961
|
+
rethr = hr + ' hours';
|
|
1962
|
+
}
|
|
1963
|
+
else {
|
|
1964
|
+
rethr = hr + ' hour';
|
|
1965
|
+
}
|
|
1966
|
+
}
|
|
1967
|
+
if (min > 0) {
|
|
1968
|
+
if (min > 1) {
|
|
1969
|
+
retmin = ' ' + min + ' minutes';
|
|
1970
|
+
}
|
|
1971
|
+
else {
|
|
1972
|
+
retmin = ' ' + min + ' minute';
|
|
1973
|
+
}
|
|
1974
|
+
}
|
|
1975
|
+
}
|
|
1976
|
+
else {
|
|
1977
|
+
retmin = '' + 0 + ' minutes';
|
|
1978
|
+
}
|
|
1979
|
+
return rethr + retmin;
|
|
1980
|
+
}
|
|
1981
|
+
/**
|
|
1982
|
+
*
|
|
1983
|
+
* @param mins
|
|
1984
|
+
* @returns
|
|
1985
|
+
*/
|
|
1986
|
+
convertMinutesToHourMinuteForCheckin(mins) {
|
|
1987
|
+
let rethr = '';
|
|
1988
|
+
let retmin = '';
|
|
1989
|
+
if (mins > 0) {
|
|
1990
|
+
const hr = Math.floor(mins / 60);
|
|
1991
|
+
const min = Math.floor(mins % 60);
|
|
1992
|
+
if (hr > 0) {
|
|
1993
|
+
if (hr > 1) {
|
|
1994
|
+
rethr = hr + 'Hrs';
|
|
1995
|
+
}
|
|
1996
|
+
else {
|
|
1997
|
+
rethr = hr + 'Hr';
|
|
1998
|
+
}
|
|
1999
|
+
}
|
|
2000
|
+
if (min > 0) {
|
|
2001
|
+
if (min > 1) {
|
|
2002
|
+
retmin = ' ' + min + 'Mins';
|
|
2003
|
+
}
|
|
2004
|
+
else {
|
|
2005
|
+
retmin = ' ' + min + 'Min';
|
|
2006
|
+
}
|
|
2007
|
+
}
|
|
2008
|
+
}
|
|
2009
|
+
else {
|
|
2010
|
+
retmin = '' + 0 + 'Min';
|
|
2011
|
+
}
|
|
2012
|
+
return rethr + retmin;
|
|
2013
|
+
}
|
|
2014
|
+
/**
|
|
2015
|
+
*
|
|
2016
|
+
* @param time
|
|
2017
|
+
* @returns
|
|
2018
|
+
*/
|
|
2019
|
+
getDateFromTimeString(time) {
|
|
2020
|
+
const startTime = new Date();
|
|
2021
|
+
const parts = time.match(/(\d+):(\d+) (AM|PM)/);
|
|
2022
|
+
if (parts) {
|
|
2023
|
+
let hours = parseInt(parts[1], 0);
|
|
2024
|
+
const minutes = parseInt(parts[2], 0);
|
|
2025
|
+
const tt = parts[3];
|
|
2026
|
+
if (tt === 'PM' && hours < 12) {
|
|
2027
|
+
hours += 12;
|
|
2028
|
+
}
|
|
2029
|
+
startTime.setHours(hours, minutes, 0, 0);
|
|
2030
|
+
}
|
|
2031
|
+
return startTime;
|
|
2032
|
+
}
|
|
2033
|
+
/**
|
|
2034
|
+
*
|
|
2035
|
+
* @param dt
|
|
2036
|
+
* @param mod
|
|
2037
|
+
* @returns
|
|
2038
|
+
*/
|
|
2039
|
+
stringtoDate(dt, mod) {
|
|
2040
|
+
let dtsarr;
|
|
2041
|
+
if (dt) {
|
|
2042
|
+
dtsarr = dt.split(' ');
|
|
2043
|
+
const dtarr = dtsarr[0].split('-');
|
|
2044
|
+
let retval = '';
|
|
2045
|
+
if (mod === 'all') {
|
|
2046
|
+
retval = dtarr[2] + '/' + dtarr[1] + '/' + dtarr[0] + ' ' + dtsarr[1] + ' ' + dtsarr[2];
|
|
2047
|
+
}
|
|
2048
|
+
else if (mod === 'date') {
|
|
2049
|
+
retval = dtarr[2] + '/' + dtarr[1] + '/' + dtarr[0];
|
|
2050
|
+
}
|
|
2051
|
+
else if (mod === 'time') {
|
|
2052
|
+
retval = dtsarr[1] + ' ' + dtsarr[2];
|
|
2053
|
+
}
|
|
2054
|
+
return retval;
|
|
2055
|
+
}
|
|
2056
|
+
else {
|
|
2057
|
+
return '';
|
|
2058
|
+
}
|
|
2059
|
+
}
|
|
2060
|
+
/**
|
|
2061
|
+
*
|
|
2062
|
+
* @param date
|
|
2063
|
+
* @returns
|
|
2064
|
+
*/
|
|
2065
|
+
transformToYMDFormat(date) {
|
|
2066
|
+
console.log("In transformToYMDFormat:", date);
|
|
2067
|
+
const server = date.toLocaleString(this.REGION_LANGUAGE, { timeZone: this.TIME_ZONE_REGION });
|
|
2068
|
+
const serverdate = moment(server).format();
|
|
2069
|
+
const newdate = new Date(serverdate);
|
|
2070
|
+
const dd = newdate.getDate();
|
|
2071
|
+
const mm = newdate.getMonth() + 1;
|
|
2072
|
+
const y = newdate.getFullYear();
|
|
2073
|
+
const date1 = y + '-' + mm + '-' + dd;
|
|
2074
|
+
return date1;
|
|
2075
|
+
}
|
|
2076
|
+
/**
|
|
2077
|
+
*
|
|
2078
|
+
* @param dateStr
|
|
2079
|
+
* @returns
|
|
2080
|
+
*/
|
|
2081
|
+
formatDateDisplay(dateStr) {
|
|
2082
|
+
const pubDate = new Date(dateStr);
|
|
2083
|
+
const obtshowdate = this.addZero(pubDate.getDate()) + '/' + this.addZero((pubDate.getMonth() + 1)) + '/' + pubDate.getFullYear();
|
|
2084
|
+
return obtshowdate;
|
|
2085
|
+
}
|
|
2086
|
+
/**
|
|
2087
|
+
*
|
|
2088
|
+
* @returns
|
|
2089
|
+
*/
|
|
2090
|
+
getMoment() {
|
|
2091
|
+
return moment;
|
|
2092
|
+
}
|
|
2093
|
+
/**
|
|
2094
|
+
*
|
|
2095
|
+
* @param num
|
|
2096
|
+
* @returns
|
|
2097
|
+
*/
|
|
2098
|
+
getDay(num) {
|
|
2099
|
+
return this.myweekdaysSchedule[num];
|
|
2100
|
+
}
|
|
2101
|
+
/**
|
|
2102
|
+
* Convert Date to String in YYYYMMDD format
|
|
2103
|
+
* @param inputDate input date
|
|
2104
|
+
* @returns string
|
|
2105
|
+
*/
|
|
2106
|
+
getStringFromDate_YYYYMMDD(inputDate) {
|
|
2107
|
+
const today = new Date(inputDate);
|
|
2108
|
+
const dd = today.getDate();
|
|
2109
|
+
const mm = today.getMonth() + 1; // January is 0!
|
|
2110
|
+
const yyyy = today.getFullYear();
|
|
2111
|
+
let cday = '';
|
|
2112
|
+
if (dd < 10) {
|
|
2113
|
+
cday = '0' + dd;
|
|
2114
|
+
}
|
|
2115
|
+
else {
|
|
2116
|
+
cday = '' + dd;
|
|
2117
|
+
}
|
|
2118
|
+
let cmon;
|
|
2119
|
+
if (mm < 10) {
|
|
2120
|
+
cmon = '0' + mm;
|
|
2121
|
+
}
|
|
2122
|
+
else {
|
|
2123
|
+
cmon = '' + mm;
|
|
2124
|
+
}
|
|
2125
|
+
const dateString = yyyy + '-' + cmon + '-' + cday;
|
|
2126
|
+
return dateString;
|
|
2127
|
+
}
|
|
2128
|
+
getLocaleDateFromServer(serverDate) {
|
|
2129
|
+
return new Date(serverDate.split(' ')[0]).toLocaleString(this.REGION_LANGUAGE, { timeZone: this.TIME_ZONE_REGION });
|
|
2130
|
+
}
|
|
2131
|
+
getToday(serverDate) {
|
|
2132
|
+
let today;
|
|
2133
|
+
today = new Date(serverDate.split(' ')[0]).toLocaleString(this.REGION_LANGUAGE, { timeZone: this.TIME_ZONE_REGION });
|
|
2134
|
+
today = new Date(today);
|
|
2135
|
+
const dd = today.getDate();
|
|
2136
|
+
const mm = today.getMonth() + 1; // January is 0!
|
|
2137
|
+
const yyyy = today.getFullYear();
|
|
2138
|
+
let cday = '';
|
|
2139
|
+
if (dd < 10) {
|
|
2140
|
+
cday = '0' + dd;
|
|
2141
|
+
}
|
|
2142
|
+
else {
|
|
2143
|
+
cday = '' + dd;
|
|
2144
|
+
}
|
|
2145
|
+
let cmon;
|
|
2146
|
+
if (mm < 10) {
|
|
2147
|
+
cmon = '0' + mm;
|
|
2148
|
+
}
|
|
2149
|
+
else {
|
|
2150
|
+
cmon = '' + mm;
|
|
2151
|
+
}
|
|
2152
|
+
const dtoday = yyyy + '-' + cmon + '-' + cday;
|
|
2153
|
+
return dtoday;
|
|
2154
|
+
}
|
|
2155
|
+
isFutureDate(serverDate, appmtDate) {
|
|
2156
|
+
let today;
|
|
2157
|
+
today = this.getToday(serverDate);
|
|
2158
|
+
const dt0 = today.toLocaleString(this.REGION_LANGUAGE, { timeZone: this.TIME_ZONE_REGION });
|
|
2159
|
+
const dt2 = moment(dt0, 'YYYY-MM-DD HH:mm').format();
|
|
2160
|
+
const date2 = new Date(dt2);
|
|
2161
|
+
const dte0 = appmtDate.toLocaleString(this.REGION_LANGUAGE, { timeZone: this.TIME_ZONE_REGION });
|
|
2162
|
+
const dte2 = moment(dte0, 'YYYY-MM-DD HH:mm').format();
|
|
2163
|
+
const datee2 = new Date(dte2);
|
|
2164
|
+
if (datee2.getTime() !== date2.getTime()) { // this is to decide whether future date selection is to be displayed. This is displayed if the sel_checkindate is a future date
|
|
2165
|
+
return true;
|
|
2166
|
+
}
|
|
2167
|
+
else {
|
|
2168
|
+
return false;
|
|
2169
|
+
}
|
|
2170
|
+
}
|
|
2171
|
+
getMomentDate(pdate) {
|
|
2172
|
+
return moment(pdate, 'YYYY-MM-DD HH:mm').format();
|
|
2173
|
+
}
|
|
2174
|
+
/**
|
|
2175
|
+
*
|
|
2176
|
+
* @param date
|
|
2177
|
+
* @returns
|
|
2178
|
+
*/
|
|
2179
|
+
transformToMMDDYYYY_(date) {
|
|
2180
|
+
const server = date.toLocaleString(this.REGION_LANGUAGE, { timeZone: this.TIME_ZONE_REGION });
|
|
2181
|
+
const serverdate = moment(server).format();
|
|
2182
|
+
const newdate = new Date(serverdate);
|
|
2183
|
+
const dd = newdate.getDate();
|
|
2184
|
+
const mm = newdate.getMonth() + 1;
|
|
2185
|
+
const y = newdate.getFullYear();
|
|
2186
|
+
const date1 = mm + '/' + dd + '/' + y;
|
|
2187
|
+
return date1;
|
|
2188
|
+
}
|
|
2189
|
+
getCurrentUTCdatetimestring() {
|
|
2190
|
+
const curdate = new Date();
|
|
2191
|
+
const cdate = new Date(Date.UTC(curdate.getUTCFullYear(), curdate.getUTCMonth(), curdate.getUTCDate(), curdate.getUTCHours(), curdate.getUTCMinutes(), curdate.getUTCSeconds(), curdate.getUTCMilliseconds()));
|
|
2192
|
+
return cdate.toISOString();
|
|
2193
|
+
}
|
|
2194
|
+
getSystemDate() {
|
|
2195
|
+
return this.servicemeta.httpGet('provider/server/date');
|
|
2196
|
+
}
|
|
2197
|
+
AMHourto24(date, time12) {
|
|
2198
|
+
const time = time12;
|
|
2199
|
+
let hours = Number(time.match(/^(\d+)/)[1]);
|
|
2200
|
+
const minutes = Number(time.match(/:(\d+)/)[1]);
|
|
2201
|
+
const AMPM = time.match(/\s(.*)$/)[1];
|
|
2202
|
+
if (AMPM === 'PM' && hours < 12) {
|
|
2203
|
+
hours = hours + 12;
|
|
2204
|
+
}
|
|
2205
|
+
if (AMPM === 'AM' && hours === 12) {
|
|
2206
|
+
hours = hours - 12;
|
|
2207
|
+
}
|
|
2208
|
+
const sHours = hours;
|
|
2209
|
+
const sMinutes = minutes;
|
|
2210
|
+
const mom_date = moment(date);
|
|
2211
|
+
mom_date.set('hour', sHours);
|
|
2212
|
+
mom_date.set('minute', sMinutes);
|
|
2213
|
+
return mom_date;
|
|
2214
|
+
}
|
|
2215
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: DateTimeProcessor, deps: [{ token: ServiceMeta }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2216
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: DateTimeProcessor, providedIn: 'root' });
|
|
2217
|
+
}
|
|
2218
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: DateTimeProcessor, decorators: [{
|
|
2219
|
+
type: Injectable,
|
|
2220
|
+
args: [{
|
|
2221
|
+
providedIn: 'root'
|
|
2222
|
+
}]
|
|
2223
|
+
}], ctorParameters: () => [{ type: ServiceMeta }] });
|
|
2224
|
+
|
|
2225
|
+
class QuestionnaireComponent {
|
|
2226
|
+
activated_route;
|
|
2227
|
+
wordProcessor;
|
|
2228
|
+
lStorageService;
|
|
2229
|
+
dateProcessor;
|
|
2230
|
+
dialog;
|
|
2231
|
+
fileService;
|
|
2232
|
+
commonService;
|
|
2233
|
+
questionaireService;
|
|
2234
|
+
errorService;
|
|
2235
|
+
toastService;
|
|
2236
|
+
modalGalleryService;
|
|
2237
|
+
location;
|
|
2238
|
+
questionnaireList;
|
|
2239
|
+
source;
|
|
2240
|
+
accountId;
|
|
2241
|
+
questionAnswers;
|
|
2242
|
+
customerDetails;
|
|
2243
|
+
uuid;
|
|
2244
|
+
type;
|
|
2245
|
+
waitlistStatus;
|
|
2246
|
+
orderStatus;
|
|
2247
|
+
donationDetails;
|
|
2248
|
+
service;
|
|
2249
|
+
mode; // Added by mani to check the file upload
|
|
2250
|
+
fileChanged = new EventEmitter();
|
|
2251
|
+
returnAnswers = new EventEmitter();
|
|
2252
|
+
tempType;
|
|
2253
|
+
bookingType;
|
|
2254
|
+
answers = {};
|
|
2255
|
+
showDataGrid = {};
|
|
2256
|
+
selectedMessage = [];
|
|
2257
|
+
apiError = [];
|
|
2258
|
+
params;
|
|
2259
|
+
fileuploadpreAnswers = {};
|
|
2260
|
+
loading = false;
|
|
2261
|
+
buttonDisable = false;
|
|
2262
|
+
questions = [];
|
|
2263
|
+
selectedDocs = [];
|
|
2264
|
+
documentsToUpload = [];
|
|
2265
|
+
subscription;
|
|
2266
|
+
uploadFilesTemp = [];
|
|
2267
|
+
filestoUpload = [];
|
|
2268
|
+
changeHappened = false;
|
|
2269
|
+
uploadedFiles = [];
|
|
2270
|
+
uploadedImages = [];
|
|
2271
|
+
bookingDetails = [];
|
|
2272
|
+
file2;
|
|
2273
|
+
customButtonsFontAwesomeConfig = {
|
|
2274
|
+
visible: true,
|
|
2275
|
+
strategy: ButtonsStrategy.CUSTOM,
|
|
2276
|
+
buttons: [
|
|
2277
|
+
{
|
|
2278
|
+
className: 'fa fa-download',
|
|
2279
|
+
type: ButtonType.DOWNLOAD,
|
|
2280
|
+
ariaLabel: 'custom close aria label',
|
|
2281
|
+
title: 'Download',
|
|
2282
|
+
fontSize: '20px'
|
|
2283
|
+
},
|
|
2284
|
+
{
|
|
2285
|
+
className: 'inside close-image',
|
|
2286
|
+
type: ButtonType.CLOSE,
|
|
2287
|
+
ariaLabel: 'custom close aria label',
|
|
2288
|
+
title: 'Close',
|
|
2289
|
+
fontSize: '20px'
|
|
2290
|
+
}
|
|
2291
|
+
]
|
|
2292
|
+
};
|
|
2293
|
+
image_list_popup;
|
|
2294
|
+
questionnaire_heading = '';
|
|
2295
|
+
customer_label = '';
|
|
2296
|
+
editQuestionnaire = false;
|
|
2297
|
+
audioVideoFiles = [];
|
|
2298
|
+
groupedQnr = [];
|
|
2299
|
+
dataGridColumns = {};
|
|
2300
|
+
dataGridColumnsAnswerList = [];
|
|
2301
|
+
updatedGridIndex = {};
|
|
2302
|
+
newTimeDateFormat = '';
|
|
2303
|
+
qnrStatus = '';
|
|
2304
|
+
comments = {};
|
|
2305
|
+
tday = new Date();
|
|
2306
|
+
minday = new Date(1900, 0, 1);
|
|
2307
|
+
dataGridListColumns = {};
|
|
2308
|
+
showqnr;
|
|
2309
|
+
item;
|
|
2310
|
+
showItem = false;
|
|
2311
|
+
totalPrice;
|
|
2312
|
+
itemLength;
|
|
2313
|
+
itemArray = [];
|
|
2314
|
+
dataGridList = [];
|
|
2315
|
+
id = 0;
|
|
2316
|
+
post_Data;
|
|
2317
|
+
dgList;
|
|
2318
|
+
sequenceId;
|
|
2319
|
+
finalObjectList = [];
|
|
2320
|
+
showservice = false;
|
|
2321
|
+
quesStore;
|
|
2322
|
+
allList = '';
|
|
2323
|
+
popSearches;
|
|
2324
|
+
serviceTotalPrice = 0;
|
|
2325
|
+
editableItem;
|
|
2326
|
+
constructor(activated_route, wordProcessor, lStorageService, dateProcessor, dialog, fileService, commonService, questionaireService, errorService, toastService, modalGalleryService, location) {
|
|
2327
|
+
this.activated_route = activated_route;
|
|
2328
|
+
this.wordProcessor = wordProcessor;
|
|
2329
|
+
this.lStorageService = lStorageService;
|
|
2330
|
+
this.dateProcessor = dateProcessor;
|
|
2331
|
+
this.dialog = dialog;
|
|
2332
|
+
this.fileService = fileService;
|
|
2333
|
+
this.commonService = commonService;
|
|
2334
|
+
this.questionaireService = questionaireService;
|
|
2335
|
+
this.errorService = errorService;
|
|
2336
|
+
this.toastService = toastService;
|
|
2337
|
+
this.modalGalleryService = modalGalleryService;
|
|
2338
|
+
this.location = location;
|
|
2339
|
+
this.activated_route.queryParams.subscribe(qparams => {
|
|
2340
|
+
this.params = qparams;
|
|
2341
|
+
if (this.params.type) {
|
|
2342
|
+
this.source = this.params.type;
|
|
2343
|
+
console.log(this.source);
|
|
2344
|
+
}
|
|
2345
|
+
if (this.params.providerId) {
|
|
2346
|
+
this.accountId = this.params.providerId;
|
|
2347
|
+
}
|
|
2348
|
+
if (this.params.uuid) {
|
|
2349
|
+
this.uuid = this.params.uuid;
|
|
2350
|
+
}
|
|
2351
|
+
});
|
|
2352
|
+
this.subscription = this.questionaireService.getMessage().subscribe(message => {
|
|
2353
|
+
switch (message.type) {
|
|
2354
|
+
case 'qnrValidateError':
|
|
2355
|
+
this.setValidateError(message.value);
|
|
2356
|
+
break;
|
|
2357
|
+
}
|
|
2358
|
+
});
|
|
2359
|
+
}
|
|
2360
|
+
ngOnDestroy() {
|
|
2361
|
+
if (this.subscription) {
|
|
2362
|
+
this.subscription.unsubscribe();
|
|
2363
|
+
}
|
|
2364
|
+
}
|
|
2365
|
+
ngOnChanges() {
|
|
2366
|
+
if (this.questionAnswers && this.questionAnswers.filestoUpload && this.source === 'proLead') {
|
|
2367
|
+
this.filestoUpload = this.questionAnswers.filestoUpload;
|
|
2368
|
+
}
|
|
2369
|
+
}
|
|
2370
|
+
ngOnInit() {
|
|
2371
|
+
console.log("Service Details:", this.questionnaireList);
|
|
2372
|
+
console.log("Service Details:", this.service);
|
|
2373
|
+
if (this.lStorageService.getitemfromLocalStorage('itemArray')) {
|
|
2374
|
+
this.itemArray = this.lStorageService.getitemfromLocalStorage('itemArray');
|
|
2375
|
+
if (this.itemArray) {
|
|
2376
|
+
this.showItem = true;
|
|
2377
|
+
console.log("this.itemArray", this.itemArray);
|
|
2378
|
+
}
|
|
2379
|
+
}
|
|
2380
|
+
this.customer_label = this.wordProcessor.getTerminologyTerm('customer');
|
|
2381
|
+
if (this.questionnaireList) {
|
|
2382
|
+
console.log(this.source);
|
|
2383
|
+
if (this.source === 'customer-create' || this.source === 'onetime') {
|
|
2384
|
+
if (this.questionnaireList.labels && this.questionnaireList.labels.length > 0) {
|
|
2385
|
+
this.questions = this.questionnaireList.labels[0].questions;
|
|
2386
|
+
this.groupQuestionsBySection();
|
|
2387
|
+
// this.getAnswers(this.questions, 'get');
|
|
2388
|
+
}
|
|
2389
|
+
if (this.customerDetails && this.customerDetails[0] && this.customerDetails[0].questionnaire && this.customerDetails[0].questionnaire.questionAnswers) {
|
|
2390
|
+
this.getAnswers(this.customerDetails[0].questionnaire.questionAnswers, 'get');
|
|
2391
|
+
}
|
|
2392
|
+
}
|
|
2393
|
+
else if (this.source === 'qnrDetails') {
|
|
2394
|
+
this.questions = this.questionnaireList.questions;
|
|
2395
|
+
this.groupQuestionsBySection();
|
|
2396
|
+
}
|
|
2397
|
+
else if (this.source === 'serviceOptionAppt') {
|
|
2398
|
+
this.showservice = true;
|
|
2399
|
+
this.questions = this.questionnaireList.labels;
|
|
2400
|
+
this.groupQuestionsBySection();
|
|
2401
|
+
}
|
|
2402
|
+
else if (this.source === 'qnrpaper') {
|
|
2403
|
+
this.questions = this.questionnaireList[0].labels;
|
|
2404
|
+
this.groupQuestionsBySection();
|
|
2405
|
+
}
|
|
2406
|
+
else if (!this.uuid && this.questionnaireList.labels) {
|
|
2407
|
+
this.questions = this.questionnaireList.labels;
|
|
2408
|
+
this.groupQuestionsBySection();
|
|
2409
|
+
}
|
|
2410
|
+
else if (this.source === 'qnrView' && this.questionnaireList.labels) {
|
|
2411
|
+
this.questions = this.questionnaireList.labels;
|
|
2412
|
+
this.groupQuestionsBySection();
|
|
2413
|
+
}
|
|
2414
|
+
else if (this.source === 'condumerOrder' && this.questionnaireList.labels) {
|
|
2415
|
+
this.questions = this.questionnaireList.labels;
|
|
2416
|
+
this.groupQuestionsBySection();
|
|
2417
|
+
}
|
|
2418
|
+
else if (this.source === 'ivr' && this.questionnaireList && this.questionnaireList[0].labels) {
|
|
2419
|
+
this.questions = this.questionnaireList[0].labels;
|
|
2420
|
+
console.log("Questions:", this.questions);
|
|
2421
|
+
this.groupQuestionsBySection();
|
|
2422
|
+
}
|
|
2423
|
+
}
|
|
2424
|
+
if (this.source === 'customer-details' && this.customerDetails[0] && this.customerDetails[0].questionnaire) {
|
|
2425
|
+
this.questionnaireList = this.customerDetails[0].questionnaire;
|
|
2426
|
+
this.questions = this.customerDetails[0].questionnaire.questionAnswers;
|
|
2427
|
+
this.groupQuestionsBySection();
|
|
2428
|
+
this.getAnswers(this.questions, 'get');
|
|
2429
|
+
}
|
|
2430
|
+
if (this.questionAnswers) {
|
|
2431
|
+
if (this.questionAnswers.files) {
|
|
2432
|
+
this.selectedMessage = this.questionAnswers.files;
|
|
2433
|
+
}
|
|
2434
|
+
if (this.questionAnswers.audioVideo) {
|
|
2435
|
+
this.audioVideoFiles = this.questionAnswers.audioVideo;
|
|
2436
|
+
}
|
|
2437
|
+
if (this.questionAnswers.filestoUpload) {
|
|
2438
|
+
this.filestoUpload = this.questionAnswers.filestoUpload;
|
|
2439
|
+
}
|
|
2440
|
+
if (this.questionAnswers.dataGridColumnsAnswerList) {
|
|
2441
|
+
this.dataGridColumnsAnswerList = this.questionAnswers.dataGridColumnsAnswerList;
|
|
2442
|
+
}
|
|
2443
|
+
if (this.questionAnswers.comments) {
|
|
2444
|
+
this.comments = this.questionAnswers.comments;
|
|
2445
|
+
}
|
|
2446
|
+
if (this.questionAnswers.answers) {
|
|
2447
|
+
this.getAnswers(this.questionAnswers.answers.answerLine, 'init');
|
|
2448
|
+
}
|
|
2449
|
+
if (this.source == 'ivr') {
|
|
2450
|
+
this.getAnswers(this.questionAnswers, 'get');
|
|
2451
|
+
}
|
|
2452
|
+
}
|
|
2453
|
+
if (this.donationDetails && this.donationDetails.questionnaire) {
|
|
2454
|
+
this.questionnaireList = this.donationDetails.questionnaire;
|
|
2455
|
+
this.questions = this.questionnaireList.questionAnswers;
|
|
2456
|
+
this.groupQuestionsBySection();
|
|
2457
|
+
if (this.questions && this.questions.length > 0) {
|
|
2458
|
+
this.getAnswers(this.questions, 'get');
|
|
2459
|
+
}
|
|
2460
|
+
}
|
|
2461
|
+
if (this.uuid) {
|
|
2462
|
+
if (this.questionnaireList.questionAnswers) {
|
|
2463
|
+
this.questions = this.questionnaireList.questionAnswers;
|
|
2464
|
+
this.qnrStatus = 'submitted';
|
|
2465
|
+
this.groupQuestionsBySection();
|
|
2466
|
+
}
|
|
2467
|
+
else if (this.questionnaireList.labels) {
|
|
2468
|
+
this.questions = this.questionnaireList.labels;
|
|
2469
|
+
this.qnrStatus = 'released';
|
|
2470
|
+
this.groupQuestionsBySection();
|
|
2471
|
+
}
|
|
2472
|
+
else if (this.questionnaireList[0] && this.questionnaireList[0].labels) {
|
|
2473
|
+
this.questions = this.questionnaireList[0].labels;
|
|
2474
|
+
this.qnrStatus = 'released';
|
|
2475
|
+
this.groupQuestionsBySection();
|
|
2476
|
+
}
|
|
2477
|
+
if (this.questions && this.questions.length > 0) {
|
|
2478
|
+
this.getAnswers(this.questions, 'get');
|
|
2479
|
+
}
|
|
2480
|
+
}
|
|
2481
|
+
this.disableField();
|
|
2482
|
+
}
|
|
2483
|
+
//disable field
|
|
2484
|
+
disableField() {
|
|
2485
|
+
if (this.tempType && (this.tempType === 'Loan Sanction' || this.tempType === 'Rejected')) {
|
|
2486
|
+
this.buttonDisable = true;
|
|
2487
|
+
// this.disableInput();
|
|
2488
|
+
}
|
|
2489
|
+
}
|
|
2490
|
+
// *.component.ts
|
|
2491
|
+
asIsOrder(a, b) {
|
|
2492
|
+
return 1;
|
|
2493
|
+
}
|
|
2494
|
+
groupQuestionsBySection() {
|
|
2495
|
+
if (this.source === 'customer-create' || this.source === 'qnrDetails' || this.source === 'onetime') {
|
|
2496
|
+
this.groupedQnr = this.commonService.groupBy(this.questions, 'sectionName');
|
|
2497
|
+
}
|
|
2498
|
+
else if (this.source === 'proLead') {
|
|
2499
|
+
this.groupedQnr = this.questions.reduce(function (rv, x) {
|
|
2500
|
+
(rv[x.question['sequnceId']] = rv[x.question['sequnceId']] || []).push(x);
|
|
2501
|
+
return rv;
|
|
2502
|
+
}, {});
|
|
2503
|
+
}
|
|
2504
|
+
else {
|
|
2505
|
+
this.groupedQnr = this.questions.reduce(function (rv, x) {
|
|
2506
|
+
(rv[x.question['sectionOrder']] = rv[x.question['sectionOrder']] || []).push(x);
|
|
2507
|
+
return rv;
|
|
2508
|
+
}, {});
|
|
2509
|
+
}
|
|
2510
|
+
}
|
|
2511
|
+
setValidateError(errors) {
|
|
2512
|
+
this.apiError = [];
|
|
2513
|
+
if (errors.length > 0) {
|
|
2514
|
+
for (let error of errors) {
|
|
2515
|
+
this.apiError[error.questionField] = [];
|
|
2516
|
+
this.apiError[error.questionField].push(error.error);
|
|
2517
|
+
}
|
|
2518
|
+
this.buttonDisable = false;
|
|
2519
|
+
}
|
|
2520
|
+
}
|
|
2521
|
+
getAnswers(answerData, type) {
|
|
2522
|
+
this.answers = new Object();
|
|
2523
|
+
this.dataGridColumns = {};
|
|
2524
|
+
if (type === 'get') {
|
|
2525
|
+
this.selectedMessage = [];
|
|
2526
|
+
this.uploadedImages = [];
|
|
2527
|
+
this.uploadedFiles = [];
|
|
2528
|
+
for (let answ of answerData) {
|
|
2529
|
+
if (answ.answerLine) {
|
|
2530
|
+
if (answ.question.fieldDataType === 'fileUpload') {
|
|
2531
|
+
if (this.source === 'proLead') {
|
|
2532
|
+
if (answ.answerLine.answer[answ.question.fieldDataType] && answ.answerLine.answer[answ.question.fieldDataType].length > 0) {
|
|
2533
|
+
for (let i = 0; i < answ.answerLine.answer[answ.question.fieldDataType].length; i++) {
|
|
2534
|
+
answ.answerLine.answer[answ.question.fieldDataType][i].action = 'add';
|
|
2535
|
+
answ.answerLine.answer[answ.question.fieldDataType][i].status = 'COMPLETE';
|
|
2536
|
+
answ.answerLine.answer[answ.question.fieldDataType][i].s3path = answ.answerLine.answer[answ.question.fieldDataType][i].s3path;
|
|
2537
|
+
answ.answerLine.answer[answ.question.fieldDataType][i].uid = answ.answerLine.answer[answ.question.fieldDataType][i].uid;
|
|
2538
|
+
answ.answerLine.answer[answ.question.fieldDataType][i].driveId = answ.answerLine.answer[answ.question.fieldDataType][i].driveId;
|
|
2539
|
+
answ.answerLine.answer[answ.question.fieldDataType][i].url = answ.answerLine.answer[answ.question.fieldDataType][i].keyName;
|
|
2540
|
+
}
|
|
2541
|
+
this.answers[answ.answerLine.labelName] = answ.answerLine.answer[answ.question.fieldDataType];
|
|
2542
|
+
}
|
|
2543
|
+
}
|
|
2544
|
+
if (answ.answerLine.answer && answ.answerLine.answer[answ.question.fieldDataType] && answ.answerLine.answer[answ.question.fieldDataType].length > 0) {
|
|
2545
|
+
for (let i = 0; i < answ.answerLine.answer[answ.question.fieldDataType].length; i++) {
|
|
2546
|
+
if (type === 'get') {
|
|
2547
|
+
this.uploadedImages.push(answ.answerLine.answer[answ.question.fieldDataType][i]);
|
|
2548
|
+
if (!this.uploadedFiles[answ.answerLine.labelName]) {
|
|
2549
|
+
this.uploadedFiles[answ.answerLine.labelName] = {};
|
|
2550
|
+
}
|
|
2551
|
+
if (!this.uploadedFiles[answ.answerLine.labelName][answ.answerLine.answer[answ.question.fieldDataType][i].caption]) {
|
|
2552
|
+
this.uploadedFiles[answ.answerLine.labelName][answ.answerLine.answer[answ.question.fieldDataType][i].caption] = {};
|
|
2553
|
+
}
|
|
2554
|
+
this.comments[answ.answerLine.labelName + '=' + answ.answerLine.answer[answ.question.fieldDataType][i].caption] = answ.answerLine.answer[answ.question.fieldDataType][i].comments;
|
|
2555
|
+
this.uploadedFiles[answ.answerLine.labelName][answ.answerLine.answer[answ.question.fieldDataType][i].caption] = answ.answerLine.answer[answ.question.fieldDataType][i];
|
|
2556
|
+
}
|
|
2557
|
+
else {
|
|
2558
|
+
this.selectedMessage.push(answ.answerLine.answer[answ.question.fieldDataType][i]);
|
|
2559
|
+
if (!this.filestoUpload[answ.answerLine.labelName]) {
|
|
2560
|
+
this.filestoUpload[answ.answerLine.labelName] = {};
|
|
2561
|
+
}
|
|
2562
|
+
if (!this.filestoUpload[answ.answerLine.labelName][answ.answerLine.answer[answ.question.fieldDataType][i].caption]) {
|
|
2563
|
+
this.filestoUpload[answ.answerLine.labelName][answ.answerLine.answer[answ.question.fieldDataType][i].caption] = {};
|
|
2564
|
+
}
|
|
2565
|
+
this.filestoUpload[answ.answerLine.labelName][answ.answerLine.answer[answ.question.fieldDataType][i].caption] = answ.answerLine.answer[answ.question.fieldDataType][i];
|
|
2566
|
+
}
|
|
2567
|
+
}
|
|
2568
|
+
}
|
|
2569
|
+
}
|
|
2570
|
+
else if (answ.question.fieldDataType === 'dataGrid') {
|
|
2571
|
+
for (let row of answ.answerLine.answer[answ.question.fieldDataType]) {
|
|
2572
|
+
let columns = [];
|
|
2573
|
+
for (let i = 0; i < row.dataGridColumn.length; i++) {
|
|
2574
|
+
columns[i + 1] = row.dataGridColumn[i].column[Object.keys(row.dataGridColumn[i].column)[0]];
|
|
2575
|
+
}
|
|
2576
|
+
if (!this.dataGridColumnsAnswerList[answ.answerLine.labelName]) {
|
|
2577
|
+
this.dataGridColumnsAnswerList[answ.answerLine.labelName] = [];
|
|
2578
|
+
}
|
|
2579
|
+
this.dataGridColumnsAnswerList[answ.answerLine.labelName].push(columns);
|
|
2580
|
+
}
|
|
2581
|
+
}
|
|
2582
|
+
else {
|
|
2583
|
+
this.answers[answ.answerLine.labelName] = answ.answerLine.answer[answ.question.fieldDataType];
|
|
2584
|
+
}
|
|
2585
|
+
}
|
|
2586
|
+
}
|
|
2587
|
+
}
|
|
2588
|
+
else {
|
|
2589
|
+
for (let answ of answerData) {
|
|
2590
|
+
if (answ.answer[Object.keys(answ.answer)[0]]) {
|
|
2591
|
+
this.answers[answ.labelName] = answ.answer[Object.keys(answ.answer)[0]];
|
|
2592
|
+
}
|
|
2593
|
+
}
|
|
2594
|
+
}
|
|
2595
|
+
if (type === 'get') {
|
|
2596
|
+
Object.keys(this.uploadedFiles).forEach(key => {
|
|
2597
|
+
this.uploadFilesTemp[key] = [];
|
|
2598
|
+
Object.keys(this.uploadedFiles[key]).forEach(key1 => {
|
|
2599
|
+
if (this.uploadedFiles[key][key1]) {
|
|
2600
|
+
if (!this.uploadFilesTemp[key]) {
|
|
2601
|
+
this.uploadFilesTemp[key] = [];
|
|
2602
|
+
}
|
|
2603
|
+
const type = this.uploadedFiles[key][key1].type.split('/');
|
|
2604
|
+
if (type[0] !== 'audio' && type[0] !== 'video' || ((type[0] === 'audio' || type[0] === 'video') && this.uploadedFiles[key][key1].status === 'COMPLETE')) {
|
|
2605
|
+
this.uploadFilesTemp[key].push(key1);
|
|
2606
|
+
}
|
|
2607
|
+
}
|
|
2608
|
+
});
|
|
2609
|
+
});
|
|
2610
|
+
}
|
|
2611
|
+
else {
|
|
2612
|
+
Object.keys(this.filestoUpload).forEach(key => {
|
|
2613
|
+
Object.keys(this.filestoUpload[key]).forEach(key1 => {
|
|
2614
|
+
if (this.filestoUpload[key][key1]) {
|
|
2615
|
+
if (!this.uploadFilesTemp[key]) {
|
|
2616
|
+
this.uploadFilesTemp[key] = [];
|
|
2617
|
+
}
|
|
2618
|
+
this.uploadFilesTemp[key].push(key1);
|
|
2619
|
+
}
|
|
2620
|
+
});
|
|
2621
|
+
});
|
|
2622
|
+
}
|
|
2623
|
+
this.onSubmit('init');
|
|
2624
|
+
}
|
|
2625
|
+
filesSelected(event, question, document) {
|
|
2626
|
+
const input = event.target.files;
|
|
2627
|
+
if (input) {
|
|
2628
|
+
for (const file of input) {
|
|
2629
|
+
const fileInput = {
|
|
2630
|
+
caption: document,
|
|
2631
|
+
file: file,
|
|
2632
|
+
labelName: question.labelName
|
|
2633
|
+
};
|
|
2634
|
+
this.fileChanged.emit(fileInput);
|
|
2635
|
+
let type = file.type.split('/');
|
|
2636
|
+
this.apiError[question.labelName] = [];
|
|
2637
|
+
if (!this.filestoUpload[question.labelName]) {
|
|
2638
|
+
this.filestoUpload[question.labelName] = {};
|
|
2639
|
+
}
|
|
2640
|
+
if (!this.filestoUpload[question.labelName][document]) {
|
|
2641
|
+
this.filestoUpload[question.labelName][document] = {};
|
|
2642
|
+
}
|
|
2643
|
+
if (this.filestoUpload[question.labelName] && this.filestoUpload[question.labelName][document]) {
|
|
2644
|
+
let index;
|
|
2645
|
+
if (type[0] === 'application' || type[0] === 'image') {
|
|
2646
|
+
index = this.selectedMessage.indexOf(this.filestoUpload[question.labelName][document]);
|
|
2647
|
+
}
|
|
2648
|
+
else {
|
|
2649
|
+
index = this.audioVideoFiles.indexOf(this.filestoUpload[question.labelName][document]);
|
|
2650
|
+
}
|
|
2651
|
+
if (index !== -1) {
|
|
2652
|
+
if (type[0] === 'application' || type[0] === 'image') {
|
|
2653
|
+
this.selectedMessage.splice(index, 1);
|
|
2654
|
+
}
|
|
2655
|
+
else {
|
|
2656
|
+
this.audioVideoFiles.splice(index, 1);
|
|
2657
|
+
}
|
|
2658
|
+
delete this.filestoUpload[question.labelName][document];
|
|
2659
|
+
delete this.answers[question.labelName][index];
|
|
2660
|
+
}
|
|
2661
|
+
}
|
|
2662
|
+
this.filestoUpload[question.labelName][document] = file;
|
|
2663
|
+
if (type[0] === 'application' || type[0] === 'image') {
|
|
2664
|
+
this.selectedMessage.push(file);
|
|
2665
|
+
const indx = this.selectedMessage.indexOf(file);
|
|
2666
|
+
if (indx !== -1) {
|
|
2667
|
+
const reader = new FileReader();
|
|
2668
|
+
reader.onload = (e) => {
|
|
2669
|
+
this.selectedMessage[indx]['path'] = e.target['result'];
|
|
2670
|
+
};
|
|
2671
|
+
reader.readAsDataURL(file);
|
|
2672
|
+
}
|
|
2673
|
+
}
|
|
2674
|
+
else {
|
|
2675
|
+
this.audioVideoFiles.push(file);
|
|
2676
|
+
const indx = this.audioVideoFiles.indexOf(file);
|
|
2677
|
+
if (indx !== -1) {
|
|
2678
|
+
const reader = new FileReader();
|
|
2679
|
+
reader.onload = (e) => {
|
|
2680
|
+
this.audioVideoFiles[indx]['path'] = e.target['result'];
|
|
2681
|
+
};
|
|
2682
|
+
reader.readAsDataURL(file);
|
|
2683
|
+
}
|
|
2684
|
+
}
|
|
2685
|
+
}
|
|
2686
|
+
if (this.file2 && this.file2.nativeElement.value) {
|
|
2687
|
+
this.file2.nativeElement.value = '';
|
|
2688
|
+
}
|
|
2689
|
+
this.onSubmit('inputChange');
|
|
2690
|
+
}
|
|
2691
|
+
}
|
|
2692
|
+
changeImageSelected(question, document) {
|
|
2693
|
+
if (this.filestoUpload[question.labelName] && this.filestoUpload[question.labelName][document]) {
|
|
2694
|
+
let type = this.filestoUpload[question.labelName][document].type.split('/');
|
|
2695
|
+
type = type[0];
|
|
2696
|
+
let index;
|
|
2697
|
+
if (type === 'application' || type === 'image') {
|
|
2698
|
+
index = this.selectedMessage.indexOf(this.filestoUpload[question.labelName][document]);
|
|
2699
|
+
}
|
|
2700
|
+
else {
|
|
2701
|
+
index = this.audioVideoFiles.indexOf(this.filestoUpload[question.labelName][document]);
|
|
2702
|
+
}
|
|
2703
|
+
if (index !== -1) {
|
|
2704
|
+
if (type === 'application' || type === 'image') {
|
|
2705
|
+
this.selectedMessage.splice(index, 1);
|
|
2706
|
+
}
|
|
2707
|
+
else {
|
|
2708
|
+
this.audioVideoFiles.splice(index, 1);
|
|
2709
|
+
}
|
|
2710
|
+
delete this.filestoUpload[question.labelName][document];
|
|
2711
|
+
this.comments[question.labelName + '=' + document] = '';
|
|
2712
|
+
if (this.answers[question.labelName] && this.answers[question.labelName].length > 0) {
|
|
2713
|
+
const filteredAnswer = this.answers[question.labelName].filter((answer) => answer.caption === document);
|
|
2714
|
+
if (filteredAnswer[0]) {
|
|
2715
|
+
const index = this.answers[question.labelName].indexOf(filteredAnswer[0]);
|
|
2716
|
+
if (index !== -1) {
|
|
2717
|
+
this.answers[question.labelName].splice(index, 1);
|
|
2718
|
+
}
|
|
2719
|
+
}
|
|
2720
|
+
}
|
|
2721
|
+
}
|
|
2722
|
+
if (Object.keys(this.filestoUpload[question.labelName]).length === 0) {
|
|
2723
|
+
delete this.filestoUpload[question.labelName];
|
|
2724
|
+
}
|
|
2725
|
+
if (this.answers[question.labelName] && this.answers[question.labelName].length === 0) {
|
|
2726
|
+
delete this.answers[question.labelName];
|
|
2727
|
+
}
|
|
2728
|
+
}
|
|
2729
|
+
else if (this.uploadedFiles[question.labelName] && this.uploadedFiles[question.labelName][document]) {
|
|
2730
|
+
const index = this.uploadedImages.indexOf(this.uploadedFiles[question.labelName][document]);
|
|
2731
|
+
if (index !== -1) {
|
|
2732
|
+
this.uploadedFiles[question.labelName][document] = 'remove';
|
|
2733
|
+
this.comments[question.labelName + '=' + document] = '';
|
|
2734
|
+
}
|
|
2735
|
+
}
|
|
2736
|
+
this.onSubmit('inputChange');
|
|
2737
|
+
}
|
|
2738
|
+
isNumeric(evt) {
|
|
2739
|
+
return this.commonService.isNumeric(evt);
|
|
2740
|
+
}
|
|
2741
|
+
onSubmit(keytype) {
|
|
2742
|
+
Object.keys(this.filestoUpload).forEach(key => {
|
|
2743
|
+
if (!this.answers[key]) {
|
|
2744
|
+
this.answers[key] = [];
|
|
2745
|
+
}
|
|
2746
|
+
if (Object.keys(this.filestoUpload[key]).length > 0) {
|
|
2747
|
+
Object.keys(this.filestoUpload[key]).forEach(key1 => {
|
|
2748
|
+
if (this.filestoUpload[key][key1]) {
|
|
2749
|
+
let type = this.filestoUpload[key][key1].type.split('/');
|
|
2750
|
+
type = type[0];
|
|
2751
|
+
let indx;
|
|
2752
|
+
if (type === 'application' || type === 'image') {
|
|
2753
|
+
indx = this.selectedMessage.indexOf(this.filestoUpload[key][key1]);
|
|
2754
|
+
}
|
|
2755
|
+
else {
|
|
2756
|
+
indx = this.audioVideoFiles.indexOf(this.filestoUpload[key][key1]);
|
|
2757
|
+
}
|
|
2758
|
+
if (indx !== -1) {
|
|
2759
|
+
let status = 'add';
|
|
2760
|
+
if (this.uploadedFiles[key] && this.uploadedFiles[key][key1]) {
|
|
2761
|
+
status = 'update';
|
|
2762
|
+
}
|
|
2763
|
+
if (this.answers[key] && this.answers[key].length > 0) {
|
|
2764
|
+
const filteredAnswer = this.answers[key].filter((answer) => answer.caption === key1);
|
|
2765
|
+
if (filteredAnswer[0]) {
|
|
2766
|
+
const index = this.answers[key].indexOf(filteredAnswer[0]);
|
|
2767
|
+
if (index !== -1) {
|
|
2768
|
+
this.answers[key].splice(index, 1);
|
|
2769
|
+
}
|
|
2770
|
+
}
|
|
2771
|
+
}
|
|
2772
|
+
let type = this.filestoUpload[key][key1].type.split('/');
|
|
2773
|
+
type = type[0];
|
|
2774
|
+
if (type === 'application' || type === 'image') {
|
|
2775
|
+
this.answers[key].push({ caption: key1, action: status, mimeType: this.filestoUpload[key][key1].type, url: this.filestoUpload[key][key1].name, size: this.filestoUpload[key][key1].size, comments: this.comments[key + '=' + key1], driveId: this.filestoUpload[key][key1].driveId, uid: this.filestoUpload[key][key1].uid, status: 'COMPLETE' });
|
|
2776
|
+
}
|
|
2777
|
+
else {
|
|
2778
|
+
this.answers[key].push({ caption: key1, action: status, mimeType: this.filestoUpload[key][key1].type, url: this.filestoUpload[key][key1].name, size: this.filestoUpload[key][key1].size, comments: this.comments[key + '=' + key1], driveId: this.filestoUpload[key][key1].driveId, uid: this.filestoUpload[key][key1].uid, status: 'COMPLETE' });
|
|
2779
|
+
}
|
|
2780
|
+
}
|
|
2781
|
+
}
|
|
2782
|
+
else {
|
|
2783
|
+
if (this.answers[key] && this.answers[key].length > 0) {
|
|
2784
|
+
const filteredAnswer = this.answers[key].filter((answer) => answer.caption === key1);
|
|
2785
|
+
if (filteredAnswer[0]) {
|
|
2786
|
+
const index = this.answers[key].indexOf(filteredAnswer[0]);
|
|
2787
|
+
if (index !== -1) {
|
|
2788
|
+
this.answers[key].splice(index, 1);
|
|
2789
|
+
}
|
|
2790
|
+
}
|
|
2791
|
+
}
|
|
2792
|
+
}
|
|
2793
|
+
});
|
|
2794
|
+
}
|
|
2795
|
+
else {
|
|
2796
|
+
delete this.answers[key];
|
|
2797
|
+
}
|
|
2798
|
+
if (this.answers[key] && this.answers[key].length === 0) {
|
|
2799
|
+
delete this.answers[key];
|
|
2800
|
+
}
|
|
2801
|
+
});
|
|
2802
|
+
Object.keys(this.uploadedFiles).forEach(key => {
|
|
2803
|
+
if (!this.answers[key]) {
|
|
2804
|
+
this.answers[key] = [];
|
|
2805
|
+
}
|
|
2806
|
+
if (this.uploadedFiles[key] && Object.keys(this.uploadedFiles[key]).length > 0) {
|
|
2807
|
+
Object.keys(this.uploadedFiles[key]).forEach(key1 => {
|
|
2808
|
+
if ((!this.filestoUpload[key] || (this.filestoUpload[key] && !this.filestoUpload[key][key1])) && this.uploadedFiles[key][key1] && this.uploadedFiles[key][key1] === 'remove') {
|
|
2809
|
+
if (this.answers[key] && this.answers[key].length > 0) {
|
|
2810
|
+
const filteredAnswer = this.answers[key].filter((answer) => answer.caption === key1);
|
|
2811
|
+
if (filteredAnswer[0]) {
|
|
2812
|
+
const index = this.answers[key].indexOf(filteredAnswer[0]);
|
|
2813
|
+
if (index !== -1) {
|
|
2814
|
+
this.answers[key].splice(index, 1);
|
|
2815
|
+
}
|
|
2816
|
+
}
|
|
2817
|
+
}
|
|
2818
|
+
this.answers[key].push({ caption: key1, action: 'remove' });
|
|
2819
|
+
}
|
|
2820
|
+
});
|
|
2821
|
+
if (this.answers[key].length === 0) {
|
|
2822
|
+
delete this.answers[key];
|
|
2823
|
+
}
|
|
2824
|
+
}
|
|
2825
|
+
});
|
|
2826
|
+
let data = [];
|
|
2827
|
+
Object.keys(this.dataGridColumnsAnswerList).forEach(key => {
|
|
2828
|
+
let newFiled = {};
|
|
2829
|
+
let question = this.questions.filter((quest) => this.getQuestion(quest).labelName === key);
|
|
2830
|
+
question = question[0].question;
|
|
2831
|
+
for (let gridAnswer of this.dataGridColumnsAnswerList[key]) {
|
|
2832
|
+
let columnData = [];
|
|
2833
|
+
Object.keys(gridAnswer).forEach(key1 => {
|
|
2834
|
+
let newType = {};
|
|
2835
|
+
const columnDetails = question.dataGridProperties.dataGridColumns.filter((clmn) => clmn.order === JSON.parse(key1));
|
|
2836
|
+
if (columnDetails[0]) {
|
|
2837
|
+
const columnType = columnDetails[0].dataType;
|
|
2838
|
+
newType[columnType] = gridAnswer[key1];
|
|
2839
|
+
columnData.push({
|
|
2840
|
+
columnId: columnDetails[0].columnId,
|
|
2841
|
+
column: newType
|
|
2842
|
+
});
|
|
2843
|
+
}
|
|
2844
|
+
});
|
|
2845
|
+
let newMap = {};
|
|
2846
|
+
newMap['dataGridColumn'] = columnData;
|
|
2847
|
+
if (!newFiled[question.fieldDataType]) {
|
|
2848
|
+
newFiled[question.fieldDataType] = [];
|
|
2849
|
+
}
|
|
2850
|
+
newFiled[question.fieldDataType].push(newMap);
|
|
2851
|
+
}
|
|
2852
|
+
data.push({
|
|
2853
|
+
'labelName': key,
|
|
2854
|
+
'answer': newFiled
|
|
2855
|
+
});
|
|
2856
|
+
});
|
|
2857
|
+
Object.keys(this.answers).forEach(key => {
|
|
2858
|
+
this.apiError[key] = [];
|
|
2859
|
+
let newMap = {};
|
|
2860
|
+
let question = this.questions.filter((quest) => this.getQuestion(quest).labelName === key);
|
|
2861
|
+
if (this.source === 'customer-create' || this.source === 'qnrDetails' || this.source === 'onetime') {
|
|
2862
|
+
question = question[0];
|
|
2863
|
+
}
|
|
2864
|
+
else {
|
|
2865
|
+
question = question[0].question;
|
|
2866
|
+
}
|
|
2867
|
+
if (this.answers[key] || question.fieldDataType === 'bool') {
|
|
2868
|
+
let answer = this.answers[key];
|
|
2869
|
+
if (question.fieldDataType === 'date') {
|
|
2870
|
+
answer = this.dateProcessor.transformToYMDFormat(answer);
|
|
2871
|
+
}
|
|
2872
|
+
newMap[question.fieldDataType] = answer;
|
|
2873
|
+
data.push({
|
|
2874
|
+
'labelName': key,
|
|
2875
|
+
'answer': newMap
|
|
2876
|
+
});
|
|
2877
|
+
}
|
|
2878
|
+
else {
|
|
2879
|
+
// newMap = '';
|
|
2880
|
+
// data.push({
|
|
2881
|
+
// 'labelName': key,
|
|
2882
|
+
// });
|
|
2883
|
+
}
|
|
2884
|
+
});
|
|
2885
|
+
let postData;
|
|
2886
|
+
if (this.source === 'qnrpaper') {
|
|
2887
|
+
postData = {
|
|
2888
|
+
'questionnaireId': (this.questionnaireList[0].id) ? this.questionnaireList[0].id : this.questionnaireList[0].questionnaireId,
|
|
2889
|
+
'answerLine': data
|
|
2890
|
+
};
|
|
2891
|
+
}
|
|
2892
|
+
else if (keytype === 'serviceOption') {
|
|
2893
|
+
postData = {
|
|
2894
|
+
'questionnaireId': (this.questionnaireList.id) ? this.questionnaireList.id : this.questionnaireList[0].questionnaireId,
|
|
2895
|
+
'answerLine': this.finalObjectList
|
|
2896
|
+
};
|
|
2897
|
+
}
|
|
2898
|
+
else if (this.source === 'ivr' && this.params.customId) {
|
|
2899
|
+
console.log('fffffffffffffffffffff', this.questionnaireList);
|
|
2900
|
+
postData = {
|
|
2901
|
+
'questionnaireId': (this.questionnaireList[0].id) ? this.questionnaireList[0].id : this.questionnaireList[0].questionnaireId,
|
|
2902
|
+
'answerLine': data
|
|
2903
|
+
};
|
|
2904
|
+
}
|
|
2905
|
+
else {
|
|
2906
|
+
console.log('questionnaireList', this.questionnaireList);
|
|
2907
|
+
postData = {
|
|
2908
|
+
'questionnaireId': (this.questionnaireList.id) ? this.questionnaireList.id : this.questionnaireList.questionnaireId,
|
|
2909
|
+
'answerLine': data
|
|
2910
|
+
};
|
|
2911
|
+
}
|
|
2912
|
+
const passData = { 'answers': postData, 'files': this.selectedMessage, 'audioVideo': this.audioVideoFiles, 'filestoUpload': this.filestoUpload, 'dataGridColumnsAnswerList': this.dataGridColumnsAnswerList, 'comments': this.comments };
|
|
2913
|
+
if (keytype === 'inputChange') {
|
|
2914
|
+
this.changeHappened = true;
|
|
2915
|
+
}
|
|
2916
|
+
if (keytype === 'submit') {
|
|
2917
|
+
if (this.changeHappened) {
|
|
2918
|
+
this.submitQuestionnaire(passData);
|
|
2919
|
+
}
|
|
2920
|
+
else {
|
|
2921
|
+
if (!this.type) {
|
|
2922
|
+
this.location.back();
|
|
2923
|
+
}
|
|
2924
|
+
else {
|
|
2925
|
+
if (this.type === 'qnr-link') {
|
|
2926
|
+
this.returnAnswers.emit('nochange');
|
|
2927
|
+
}
|
|
2928
|
+
else {
|
|
2929
|
+
this.editQnr();
|
|
2930
|
+
}
|
|
2931
|
+
}
|
|
2932
|
+
}
|
|
2933
|
+
}
|
|
2934
|
+
else {
|
|
2935
|
+
this.returnAnswers.emit(passData);
|
|
2936
|
+
}
|
|
2937
|
+
}
|
|
2938
|
+
getDate(date) {
|
|
2939
|
+
return new Date(date);
|
|
2940
|
+
}
|
|
2941
|
+
listChange(ev, value, question, column) {
|
|
2942
|
+
if (question.fieldDataType !== 'dataGrid') {
|
|
2943
|
+
if (ev.target.checked) {
|
|
2944
|
+
if (!this.answers[question.labelName]) {
|
|
2945
|
+
this.answers[question.labelName] = [];
|
|
2946
|
+
}
|
|
2947
|
+
if (question.listPropertie && question.listPropertie.maxAnswers && question.listPropertie.maxAnswers > 1) {
|
|
2948
|
+
this.answers[question.labelName].push(value);
|
|
2949
|
+
}
|
|
2950
|
+
else {
|
|
2951
|
+
this.answers[question.labelName][0] = value;
|
|
2952
|
+
}
|
|
2953
|
+
}
|
|
2954
|
+
else {
|
|
2955
|
+
const indx = this.answers[question.labelName].indexOf(value);
|
|
2956
|
+
this.answers[question.labelName].splice(indx, 1);
|
|
2957
|
+
}
|
|
2958
|
+
if (this.answers[question.labelName].length === 0) {
|
|
2959
|
+
this.answers[question.labelName] = '';
|
|
2960
|
+
}
|
|
2961
|
+
}
|
|
2962
|
+
else {
|
|
2963
|
+
if (ev.target.checked) {
|
|
2964
|
+
if (!this.dataGridColumns[question.labelName + '=' + column.order]) {
|
|
2965
|
+
this.dataGridColumns[question.labelName + '=' + column.order] = [];
|
|
2966
|
+
}
|
|
2967
|
+
this.dataGridColumns[question.labelName + '=' + column.order].push(value);
|
|
2968
|
+
}
|
|
2969
|
+
else {
|
|
2970
|
+
const indx = this.dataGridColumns[question.labelName + '=' + column.order].indexOf(value);
|
|
2971
|
+
this.dataGridColumns[question.labelName + '=' + column.order].splice(indx, 1);
|
|
2972
|
+
}
|
|
2973
|
+
}
|
|
2974
|
+
this.onSubmit('inputChange');
|
|
2975
|
+
}
|
|
2976
|
+
isChecked(value, question, column) {
|
|
2977
|
+
if (question.fieldDataType !== 'dataGrid') {
|
|
2978
|
+
if (this.answers[question.labelName]) {
|
|
2979
|
+
const indx = this.answers[question.labelName].indexOf(value);
|
|
2980
|
+
if (indx !== -1) {
|
|
2981
|
+
return true;
|
|
2982
|
+
}
|
|
2983
|
+
else {
|
|
2984
|
+
return false;
|
|
2985
|
+
}
|
|
2986
|
+
}
|
|
2987
|
+
else {
|
|
2988
|
+
return false;
|
|
2989
|
+
}
|
|
2990
|
+
}
|
|
2991
|
+
else {
|
|
2992
|
+
if (this.dataGridColumns[question.labelName + '=' + column.order]) {
|
|
2993
|
+
const indx = this.dataGridColumns[question.labelName + '=' + column.order].indexOf(value);
|
|
2994
|
+
if (indx !== -1) {
|
|
2995
|
+
return true;
|
|
2996
|
+
}
|
|
2997
|
+
else {
|
|
2998
|
+
return false;
|
|
2999
|
+
}
|
|
3000
|
+
}
|
|
3001
|
+
else {
|
|
3002
|
+
return false;
|
|
3003
|
+
}
|
|
3004
|
+
}
|
|
3005
|
+
}
|
|
3006
|
+
booleanChange(ev, value, question, column) {
|
|
3007
|
+
if (question.fieldDataType !== 'dataGrid') {
|
|
3008
|
+
if (ev.target.checked) {
|
|
3009
|
+
if (!this.answers[question.labelName]) {
|
|
3010
|
+
this.answers[question.labelName] = {};
|
|
3011
|
+
}
|
|
3012
|
+
this.answers[question.labelName] = (value.toLowerCase() === 'yes') ? true : false;
|
|
3013
|
+
}
|
|
3014
|
+
}
|
|
3015
|
+
else {
|
|
3016
|
+
if (ev.target.checked) {
|
|
3017
|
+
this.dataGridColumns[question.labelName + '=' + column.order] = (value === 'yes') ? true : false;
|
|
3018
|
+
}
|
|
3019
|
+
}
|
|
3020
|
+
this.onSubmit('inputChange');
|
|
3021
|
+
}
|
|
3022
|
+
isBooleanChecked(value, question, column) {
|
|
3023
|
+
value = (value.toLowerCase() === 'yes') ? true : false;
|
|
3024
|
+
if (question.fieldDataType !== 'dataGrid') {
|
|
3025
|
+
if (this.answers[question.labelName] !== '' && typeof this.answers[question.labelName] === 'string') {
|
|
3026
|
+
this.answers[question.labelName] = JSON.parse(this.answers[question.labelName]);
|
|
3027
|
+
}
|
|
3028
|
+
if (this.answers[question.labelName] === value) {
|
|
3029
|
+
return true;
|
|
3030
|
+
}
|
|
3031
|
+
else {
|
|
3032
|
+
return false;
|
|
3033
|
+
}
|
|
3034
|
+
}
|
|
3035
|
+
else {
|
|
3036
|
+
if (this.dataGridColumns[question.labelName + '=' + column.order] !== '' && typeof this.dataGridColumns[question.labelName + '=' + column.order] === 'string') {
|
|
3037
|
+
this.dataGridColumns[question.labelName + '=' + column.order] = JSON.parse(this.dataGridColumns[question.labelName + '=' + column.order]);
|
|
3038
|
+
}
|
|
3039
|
+
if (this.dataGridColumns[question.labelName + '=' + column.order] === value) {
|
|
3040
|
+
return true;
|
|
3041
|
+
}
|
|
3042
|
+
else {
|
|
3043
|
+
return false;
|
|
3044
|
+
}
|
|
3045
|
+
}
|
|
3046
|
+
}
|
|
3047
|
+
submitQuestionnaire(passData) {
|
|
3048
|
+
console.log('fdff', passData);
|
|
3049
|
+
const dataToSend = new FormData();
|
|
3050
|
+
const blobpost_Data = new Blob([JSON.stringify(passData.answers)], { type: 'application/json' });
|
|
3051
|
+
dataToSend.append('question', blobpost_Data);
|
|
3052
|
+
this.buttonDisable = true;
|
|
3053
|
+
}
|
|
3054
|
+
uploadAudioVideo(data, type) {
|
|
3055
|
+
if (data.urls && data.urls.length > 0) {
|
|
3056
|
+
let postData = {
|
|
3057
|
+
urls: []
|
|
3058
|
+
};
|
|
3059
|
+
for (const url of data.urls) {
|
|
3060
|
+
const file = this.filestoUpload[url.labelName][url.document];
|
|
3061
|
+
this.questionaireService.videoaudioS3Upload(file, url.url)
|
|
3062
|
+
.subscribe(() => {
|
|
3063
|
+
postData['urls'].push({ uid: url.uid, labelName: url.labelName });
|
|
3064
|
+
if (data.urls.length === postData['urls'].length) {
|
|
3065
|
+
if (type === 'consCheckin') {
|
|
3066
|
+
this.questionaireService.consumerWaitlistQnrUploadStatusUpdate(this.uuid, this.accountId, postData)
|
|
3067
|
+
.subscribe((data) => {
|
|
3068
|
+
this.successGoback();
|
|
3069
|
+
}, error => {
|
|
3070
|
+
let errorObj = this.errorService.getApiError(error);
|
|
3071
|
+
this.toastService.showError(this.wordProcessor.getProjectErrorMesssages(errorObj));
|
|
3072
|
+
this.buttonDisable = false;
|
|
3073
|
+
});
|
|
3074
|
+
}
|
|
3075
|
+
else if (type === 'consAppt') {
|
|
3076
|
+
this.questionaireService.consumerApptQnrUploadStatusUpdate(this.uuid, this.accountId, postData)
|
|
3077
|
+
.subscribe((data) => {
|
|
3078
|
+
this.successGoback();
|
|
3079
|
+
}, error => {
|
|
3080
|
+
let errorObj = this.errorService.getApiError(error);
|
|
3081
|
+
this.toastService.showError(this.wordProcessor.getProjectErrorMesssages(errorObj));
|
|
3082
|
+
this.buttonDisable = false;
|
|
3083
|
+
});
|
|
3084
|
+
}
|
|
3085
|
+
else if (type === 'consOrder' || type === 'paper') {
|
|
3086
|
+
this.questionaireService.consumerOrderQnrUploadStatusUpdate(this.uuid, this.accountId, postData)
|
|
3087
|
+
.subscribe((data) => {
|
|
3088
|
+
this.successGoback();
|
|
3089
|
+
}, error => {
|
|
3090
|
+
this.toastService.showError(this.wordProcessor.getProjectErrorMesssages(error));
|
|
3091
|
+
this.buttonDisable = false;
|
|
3092
|
+
});
|
|
3093
|
+
}
|
|
3094
|
+
else if (type === 'consDonationDetails') {
|
|
3095
|
+
this.questionaireService.consumerDonationQnrUploadStatusUpdate(this.uuid, this.accountId, postData)
|
|
3096
|
+
.subscribe(() => {
|
|
3097
|
+
this.successGoback();
|
|
3098
|
+
}, (error) => {
|
|
3099
|
+
let errorObj = this.errorService.getApiError(error);
|
|
3100
|
+
this.toastService.showError(this.wordProcessor.getProjectErrorMesssages(errorObj));
|
|
3101
|
+
this.buttonDisable = false;
|
|
3102
|
+
});
|
|
3103
|
+
}
|
|
3104
|
+
}
|
|
3105
|
+
}, (error) => {
|
|
3106
|
+
let errorObj = this.errorService.getApiError(error);
|
|
3107
|
+
this.toastService.showError(this.wordProcessor.getProjectErrorMesssages(errorObj));
|
|
3108
|
+
this.buttonDisable = false;
|
|
3109
|
+
});
|
|
3110
|
+
}
|
|
3111
|
+
}
|
|
3112
|
+
else {
|
|
3113
|
+
this.successGoback();
|
|
3114
|
+
}
|
|
3115
|
+
}
|
|
3116
|
+
goBack() {
|
|
3117
|
+
this.location.back();
|
|
3118
|
+
}
|
|
3119
|
+
getQuestion(question) {
|
|
3120
|
+
if (this.source === 'customer-create' || this.source === 'qnrDetails' || this.source === 'onetime' || this.source === 'serviceOptionAppt') {
|
|
3121
|
+
return question;
|
|
3122
|
+
}
|
|
3123
|
+
else {
|
|
3124
|
+
return question.question;
|
|
3125
|
+
}
|
|
3126
|
+
}
|
|
3127
|
+
validateQuestionnaire(src) {
|
|
3128
|
+
if (!this.questionAnswers) {
|
|
3129
|
+
this.questionAnswers = {
|
|
3130
|
+
answers: {
|
|
3131
|
+
answerLine: [],
|
|
3132
|
+
questionnaireId: (this.questionnaireList.id) ? this.questionnaireList.id : this.questionnaireList.questionnaireId,
|
|
3133
|
+
}
|
|
3134
|
+
};
|
|
3135
|
+
}
|
|
3136
|
+
}
|
|
3137
|
+
getImg(question, document) {
|
|
3138
|
+
if (this.filestoUpload[question.labelName] && this.filestoUpload[question.labelName][document]) {
|
|
3139
|
+
let type = this.filestoUpload[question.labelName][document].type.split('/');
|
|
3140
|
+
let file;
|
|
3141
|
+
if (type[0] === 'video' || type[0] === 'audio') {
|
|
3142
|
+
file = this.audioVideoFiles;
|
|
3143
|
+
}
|
|
3144
|
+
else {
|
|
3145
|
+
file = this.selectedMessage;
|
|
3146
|
+
}
|
|
3147
|
+
const indx = file.indexOf(this.filestoUpload[question.labelName][document]);
|
|
3148
|
+
if (indx !== -1) {
|
|
3149
|
+
let path = this.fileService.getImage(null, this.filestoUpload[question.labelName][document]);
|
|
3150
|
+
if (path && path !== null) {
|
|
3151
|
+
return path;
|
|
3152
|
+
}
|
|
3153
|
+
path = file[indx].path;
|
|
3154
|
+
return path;
|
|
3155
|
+
}
|
|
3156
|
+
}
|
|
3157
|
+
else if (this.uploadedFiles[question.labelName] && this.uploadedFiles[question.labelName][document]) {
|
|
3158
|
+
const indx = this.uploadedImages.indexOf(this.uploadedFiles[question.labelName][document]);
|
|
3159
|
+
if (indx !== -1) {
|
|
3160
|
+
let path = this.fileService.getImage(null, this.uploadedImages[indx]);
|
|
3161
|
+
if (path && path !== null) {
|
|
3162
|
+
return path;
|
|
3163
|
+
}
|
|
3164
|
+
path = this.uploadedImages[indx].s3path;
|
|
3165
|
+
return path;
|
|
3166
|
+
}
|
|
3167
|
+
}
|
|
3168
|
+
}
|
|
3169
|
+
onButtonBeforeHook(event) {
|
|
3170
|
+
if (!event || !event.button) {
|
|
3171
|
+
return;
|
|
3172
|
+
}
|
|
3173
|
+
if (event.button.type === ButtonType.DOWNLOAD) {
|
|
3174
|
+
}
|
|
3175
|
+
}
|
|
3176
|
+
openAttachmentGallery(question, document) {
|
|
3177
|
+
this.image_list_popup = [];
|
|
3178
|
+
let count = 0;
|
|
3179
|
+
let imagePath;
|
|
3180
|
+
let caption = '';
|
|
3181
|
+
if (this.filestoUpload[question.labelName] && this.filestoUpload[question.labelName][document]) {
|
|
3182
|
+
let type = this.filestoUpload[question.labelName][document].type.split('/');
|
|
3183
|
+
if (type[0] === 'video' || type[0] === 'audio') {
|
|
3184
|
+
const indx = this.audioVideoFiles.indexOf(this.filestoUpload[question.labelName][document]);
|
|
3185
|
+
this.showAudioVideoFile(this.audioVideoFiles[indx]);
|
|
3186
|
+
}
|
|
3187
|
+
else {
|
|
3188
|
+
const indx = this.selectedMessage.indexOf(this.filestoUpload[question.labelName][document]);
|
|
3189
|
+
if (indx !== -1) {
|
|
3190
|
+
if (type[1] === 'pdf' || type[1] === 'docx' || type[1] === 'txt' || type[1] === 'doc') {
|
|
3191
|
+
if (this.selectedMessage[indx].s3path) {
|
|
3192
|
+
window.open(this.selectedMessage[indx].s3path, '_blank');
|
|
3193
|
+
}
|
|
3194
|
+
else {
|
|
3195
|
+
window.open(this.selectedMessage[indx].path, '_blank');
|
|
3196
|
+
}
|
|
3197
|
+
}
|
|
3198
|
+
else {
|
|
3199
|
+
imagePath = this.uploadedImages[indx].path;
|
|
3200
|
+
caption = this.comments[question.labelName + '=' + document];
|
|
3201
|
+
}
|
|
3202
|
+
}
|
|
3203
|
+
}
|
|
3204
|
+
}
|
|
3205
|
+
else if (this.uploadedFiles[question.labelName] && this.uploadedFiles[question.labelName][document]) {
|
|
3206
|
+
const indx = this.uploadedImages.indexOf(this.uploadedFiles[question.labelName][document]);
|
|
3207
|
+
let type = this.uploadedFiles[question.labelName][document].type.split('/');
|
|
3208
|
+
let ext = type[1];
|
|
3209
|
+
type = type[0];
|
|
3210
|
+
if (indx !== -1) {
|
|
3211
|
+
if (type === 'video' || type === 'audio') {
|
|
3212
|
+
this.showAudioVideoFile(this.uploadedImages[indx]);
|
|
3213
|
+
}
|
|
3214
|
+
else if (ext === 'pdf' || ext === 'docx' || ext === 'txt' || ext === 'doc' || ext === 'vnd.openxmlformats-officedocument.spreadsheetml.sheet') {
|
|
3215
|
+
window.open(this.uploadedFiles[question.labelName][document].s3path, '_blank');
|
|
3216
|
+
}
|
|
3217
|
+
else {
|
|
3218
|
+
// console.log('typetxt2',this.uploadedImages[indx]);
|
|
3219
|
+
if (this.uploadedImages && this.uploadedImages[indx] && this.uploadedImages[indx]['keyName'] &&
|
|
3220
|
+
this.uploadedImages[indx]['keyName'].includes('docx')) {
|
|
3221
|
+
window.open(this.uploadedFiles[question.labelName][document].s3path, '_blank');
|
|
3222
|
+
}
|
|
3223
|
+
else {
|
|
3224
|
+
imagePath = this.uploadedImages[indx].s3path;
|
|
3225
|
+
caption = this.uploadedImages[indx].comments;
|
|
3226
|
+
}
|
|
3227
|
+
}
|
|
3228
|
+
}
|
|
3229
|
+
}
|
|
3230
|
+
if (imagePath) {
|
|
3231
|
+
const imgobj = new Image(count, {
|
|
3232
|
+
img: imagePath,
|
|
3233
|
+
description: caption
|
|
3234
|
+
});
|
|
3235
|
+
this.image_list_popup.push(imgobj);
|
|
3236
|
+
count++;
|
|
3237
|
+
}
|
|
3238
|
+
if (count > 0) {
|
|
3239
|
+
setTimeout(() => {
|
|
3240
|
+
this.openImageModalRow(this.image_list_popup[0]);
|
|
3241
|
+
}, 200);
|
|
3242
|
+
}
|
|
3243
|
+
}
|
|
3244
|
+
openImageModalRow(image) {
|
|
3245
|
+
const index = this.getCurrentIndexCustomLayout(image, this.image_list_popup);
|
|
3246
|
+
this.openModal(1, index, this.customButtonsFontAwesomeConfig);
|
|
3247
|
+
}
|
|
3248
|
+
getCurrentIndexCustomLayout(image, images) {
|
|
3249
|
+
return image ? images.indexOf(image) : -1;
|
|
3250
|
+
}
|
|
3251
|
+
openModal(id, imageIndex, buttonsConfig) {
|
|
3252
|
+
const dialogRef = this.modalGalleryService.open({
|
|
3253
|
+
id: id,
|
|
3254
|
+
images: this.image_list_popup,
|
|
3255
|
+
currentImage: this.image_list_popup[imageIndex],
|
|
3256
|
+
libConfig: {
|
|
3257
|
+
buttonsConfig: buttonsConfig,
|
|
3258
|
+
currentImageConfig: {
|
|
3259
|
+
downloadable: true
|
|
3260
|
+
}
|
|
3261
|
+
}
|
|
3262
|
+
});
|
|
3263
|
+
}
|
|
3264
|
+
showAudioVideoFile(file) {
|
|
3265
|
+
const fileviewdialogRef = this.dialog.open(ShowuploadfileComponent, {
|
|
3266
|
+
width: '50%',
|
|
3267
|
+
panelClass: ['popup-class', 'commonpopupmainclass', 'uploadfilecomponentclass'],
|
|
3268
|
+
disableClose: true,
|
|
3269
|
+
data: {
|
|
3270
|
+
file: file,
|
|
3271
|
+
source: 'qnr'
|
|
3272
|
+
}
|
|
3273
|
+
});
|
|
3274
|
+
fileviewdialogRef.afterClosed().subscribe(result => {
|
|
3275
|
+
});
|
|
3276
|
+
}
|
|
3277
|
+
editQnr() {
|
|
3278
|
+
this.editQuestionnaire = !this.editQuestionnaire;
|
|
3279
|
+
}
|
|
3280
|
+
getDocuments(question) {
|
|
3281
|
+
if (question.filePropertie.maxNoOfFile > 1 && question.filePropertie.minNoOfFile !== question.filePropertie.maxNoOfFile) {
|
|
3282
|
+
return this.uploadFilesTemp[question.labelName];
|
|
3283
|
+
}
|
|
3284
|
+
else {
|
|
3285
|
+
return question.filePropertie.allowedDocuments;
|
|
3286
|
+
}
|
|
3287
|
+
}
|
|
3288
|
+
showProviderText(question) {
|
|
3289
|
+
if (question.whoCanAnswer && question.whoCanAnswer === 'PROVIDER_ONLY') {
|
|
3290
|
+
return true;
|
|
3291
|
+
}
|
|
3292
|
+
return false;
|
|
3293
|
+
}
|
|
3294
|
+
successGoback() {
|
|
3295
|
+
this.buttonDisable = false;
|
|
3296
|
+
if (!this.type) {
|
|
3297
|
+
this.location.back();
|
|
3298
|
+
}
|
|
3299
|
+
else {
|
|
3300
|
+
this.filestoUpload = [];
|
|
3301
|
+
this.editQnr();
|
|
3302
|
+
this.returnAnswers.emit('reload');
|
|
3303
|
+
if (this.type !== 'qnr-link') {
|
|
3304
|
+
this.toastService.showSuccess('Updated Successfully');
|
|
3305
|
+
}
|
|
3306
|
+
}
|
|
3307
|
+
}
|
|
3308
|
+
showDataGridAddSection(question, value) {
|
|
3309
|
+
this.showDataGrid[question.labelName] = value;
|
|
3310
|
+
this.updatedGridIndex[question.labelName] = null;
|
|
3311
|
+
}
|
|
3312
|
+
showDataGridAddSectionn(question, value) {
|
|
3313
|
+
this.quesStore = question;
|
|
3314
|
+
this.lStorageService.setitemonLocalStorage('quesStore', this.quesStore);
|
|
3315
|
+
this.showDataGrid[question.labelName] = value;
|
|
3316
|
+
this.updatedGridIndex[question.labelName] = null;
|
|
3317
|
+
this.qnrPopup(question, true);
|
|
3318
|
+
}
|
|
3319
|
+
saveDataGridColumn(question) {
|
|
3320
|
+
let columns = [];
|
|
3321
|
+
for (let column of question.dataGridProperties.dataGridColumns) {
|
|
3322
|
+
if (this.dataGridColumns[question.labelName + '=' + column.order] || column.dataType === 'bool') {
|
|
3323
|
+
columns[column.order] = this.dataGridColumns[question.labelName + '=' + column.order];
|
|
3324
|
+
}
|
|
3325
|
+
else {
|
|
3326
|
+
if (column.dataType === 'list' || column.dataType === 'fileUpload') {
|
|
3327
|
+
columns[column.order] = [];
|
|
3328
|
+
}
|
|
3329
|
+
else {
|
|
3330
|
+
columns[column.order] = '';
|
|
3331
|
+
}
|
|
3332
|
+
}
|
|
3333
|
+
}
|
|
3334
|
+
if (!this.dataGridColumnsAnswerList[question.labelName]) {
|
|
3335
|
+
this.dataGridColumnsAnswerList[question.labelName] = [];
|
|
3336
|
+
}
|
|
3337
|
+
if (this.updatedGridIndex[question.labelName] !== null) {
|
|
3338
|
+
this.dataGridColumnsAnswerList[question.labelName][this.updatedGridIndex[question.labelName]] = columns;
|
|
3339
|
+
}
|
|
3340
|
+
else {
|
|
3341
|
+
this.dataGridColumnsAnswerList[question.labelName].push(columns);
|
|
3342
|
+
}
|
|
3343
|
+
this.cancelAddorUpdate(question);
|
|
3344
|
+
this.onSubmit('inputChange');
|
|
3345
|
+
}
|
|
3346
|
+
editDataGrid(question, column) {
|
|
3347
|
+
const index = this.dataGridColumnsAnswerList[question.labelName].indexOf(column);
|
|
3348
|
+
Object.keys(column).forEach(key => {
|
|
3349
|
+
this.dataGridColumns[question.labelName + '=' + key] = column[key];
|
|
3350
|
+
});
|
|
3351
|
+
this.updatedGridIndex[question.labelName] = index;
|
|
3352
|
+
this.showDataGrid[question.labelName] = true;
|
|
3353
|
+
}
|
|
3354
|
+
deleteDataGrid(question, column) {
|
|
3355
|
+
const index = this.dataGridColumnsAnswerList[question.labelName].indexOf(column);
|
|
3356
|
+
this.dataGridColumnsAnswerList[question.labelName].splice(index, 1);
|
|
3357
|
+
this.onSubmit('inputChange');
|
|
3358
|
+
}
|
|
3359
|
+
cancelAddorUpdate(question) {
|
|
3360
|
+
this.showDataGrid[question.labelName] = false;
|
|
3361
|
+
this.updatedGridIndex[question.labelName] = null;
|
|
3362
|
+
for (let column of question.dataGridProperties.dataGridColumns) {
|
|
3363
|
+
this.dataGridColumns[question.labelName + '=' + column.order] = '';
|
|
3364
|
+
}
|
|
3365
|
+
}
|
|
3366
|
+
getColumnType(columns, column) {
|
|
3367
|
+
const columnDetails = columns.filter((clmn) => clmn.order === JSON.parse(column));
|
|
3368
|
+
if (columnDetails[0]) {
|
|
3369
|
+
return columnDetails[0].dataType;
|
|
3370
|
+
}
|
|
3371
|
+
}
|
|
3372
|
+
getSectionCount() {
|
|
3373
|
+
return Object.keys(this.groupedQnr).length;
|
|
3374
|
+
}
|
|
3375
|
+
getBoolValue(value) {
|
|
3376
|
+
value = (value !== '' && typeof value === 'string') ? JSON.parse(value) : value;
|
|
3377
|
+
if (value === true) {
|
|
3378
|
+
return 'Yes';
|
|
3379
|
+
}
|
|
3380
|
+
return 'No';
|
|
3381
|
+
}
|
|
3382
|
+
getMaxdate(data) {
|
|
3383
|
+
let date;
|
|
3384
|
+
if (this.getQuestion(data).dateProperties && this.getQuestion(data).dateProperties.endDate) {
|
|
3385
|
+
const dt = this.reverse(this.getQuestion(data).dateProperties.endDate);
|
|
3386
|
+
date = new Date(dt);
|
|
3387
|
+
}
|
|
3388
|
+
else {
|
|
3389
|
+
date = this.tday;
|
|
3390
|
+
}
|
|
3391
|
+
return date;
|
|
3392
|
+
}
|
|
3393
|
+
getMindate(data) {
|
|
3394
|
+
let date;
|
|
3395
|
+
if (this.getQuestion(data).dateProperties && this.getQuestion(data).dateProperties.startDate) {
|
|
3396
|
+
const dt = this.reverse(this.getQuestion(data).dateProperties.startDate);
|
|
3397
|
+
date = new Date(dt);
|
|
3398
|
+
}
|
|
3399
|
+
else {
|
|
3400
|
+
date = this.minday;
|
|
3401
|
+
}
|
|
3402
|
+
return date;
|
|
3403
|
+
}
|
|
3404
|
+
reverse(s) {
|
|
3405
|
+
return s.split("-").reverse().join("-");
|
|
3406
|
+
}
|
|
3407
|
+
qnrPopup(question, value) {
|
|
3408
|
+
// if (value === 'edit') {
|
|
3409
|
+
// this.quesStore = this.lStorageService.getitemfromLocalStorage('quesStore');
|
|
3410
|
+
// this.showqnr = true;
|
|
3411
|
+
// this.editableItem = question;
|
|
3412
|
+
// console.log(JSON.stringify(this.quesStore))
|
|
3413
|
+
// const removeitemdialogRef = this.dialog.open(QnrDialogComponent, {
|
|
3414
|
+
// width: '50%',
|
|
3415
|
+
// panelClass: ['popup-class', 'commonpopupmainclass', 'confirmationmainclass'],
|
|
3416
|
+
// disableClose: true,
|
|
3417
|
+
// data: {
|
|
3418
|
+
// data: this.quesStore,
|
|
3419
|
+
// qnr_type: 'service_option',
|
|
3420
|
+
// view: 'qnrView',
|
|
3421
|
+
// isEdit: 'edit',
|
|
3422
|
+
// editableItem: this.editableItem,
|
|
3423
|
+
// servDetails: this.service
|
|
3424
|
+
// }
|
|
3425
|
+
// });
|
|
3426
|
+
// removeitemdialogRef.afterClosed().subscribe(result => {
|
|
3427
|
+
// if (result) {
|
|
3428
|
+
// console.log("result.data.answerLine", result.data.answerLine)
|
|
3429
|
+
// this.dataGridList = result.data.answerLine;
|
|
3430
|
+
// this.post_Data = result.data;
|
|
3431
|
+
// this.showItem = true;
|
|
3432
|
+
// this.item = result.data.answerLine[0].answer.dataGridList[0].dataGridListColumn[0].column.list[0];
|
|
3433
|
+
// if (result.data.totalPrice) {
|
|
3434
|
+
// this.totalPrice = result.data.totalPrice
|
|
3435
|
+
// }
|
|
3436
|
+
// let index1 = this.itemArray.findIndex(x => x.id === this.editableItem.id)
|
|
3437
|
+
// if (index1 > -1) {
|
|
3438
|
+
// this.itemArray.splice(index1, 1);
|
|
3439
|
+
// }
|
|
3440
|
+
// let dummyArray = { id: this.id, sequenceId: this.sequenceId, item: this.item, price: this.totalPrice, columnItem: this.dataGridList }
|
|
3441
|
+
// this.itemArray.push(dummyArray)
|
|
3442
|
+
// if (this.itemArray) {
|
|
3443
|
+
// this.lStorageService.setitemonLocalStorage('itemArray', this.itemArray);
|
|
3444
|
+
// }
|
|
3445
|
+
// this.serviceTotalPrice = 0;
|
|
3446
|
+
// this.itemArray.forEach((item: any) => {
|
|
3447
|
+
// this.serviceTotalPrice = this.serviceTotalPrice + item.price;
|
|
3448
|
+
// this.lStorageService.setitemonLocalStorage('serviceTotalPrice', this.serviceTotalPrice);
|
|
3449
|
+
// });
|
|
3450
|
+
// this.id = this.id + 1
|
|
3451
|
+
// let obj = { sequenceId: this.sequenceId, dgList: this.post_Data.answerLine };
|
|
3452
|
+
// this.finalObjectList.push(obj);
|
|
3453
|
+
// this.onSubmit('serviceOption')
|
|
3454
|
+
// }
|
|
3455
|
+
// });
|
|
3456
|
+
// }
|
|
3457
|
+
// else {
|
|
3458
|
+
// this.showqnr = true;
|
|
3459
|
+
// console.log("this.sequenceId", question)
|
|
3460
|
+
// this.sequenceId = question.sequnceId;
|
|
3461
|
+
// const removeitemdialogRef = this.dialog.open(QnrDialogComponent, {
|
|
3462
|
+
// width: '50%',
|
|
3463
|
+
// panelClass: ['popup-class', 'commonpopupmainclass', 'confirmationmainclass'],
|
|
3464
|
+
// disableClose: true,
|
|
3465
|
+
// data: {
|
|
3466
|
+
// data: question,
|
|
3467
|
+
// qnr_type: 'service_option',
|
|
3468
|
+
// view: 'qnrView',
|
|
3469
|
+
// isEdit: 'add',
|
|
3470
|
+
// servDetails: this.service
|
|
3471
|
+
// }
|
|
3472
|
+
// });
|
|
3473
|
+
// removeitemdialogRef.afterClosed().subscribe(result => {
|
|
3474
|
+
// if (result) {
|
|
3475
|
+
// this.dataGridList = result.data.answerLine;
|
|
3476
|
+
// this.post_Data = result.data;
|
|
3477
|
+
// this.showItem = true;
|
|
3478
|
+
// this.item = result.data.answerLine[0].answer.dataGridList[0].dataGridListColumn[0].column.list[0];
|
|
3479
|
+
// if (result.data.totalPrice) {
|
|
3480
|
+
// this.totalPrice = result.data.totalPrice
|
|
3481
|
+
// }
|
|
3482
|
+
// let dummyArray = { id: this.id, sequenceId: this.sequenceId, item: this.item, price: this.totalPrice, columnItem: this.dataGridList }
|
|
3483
|
+
// this.itemArray.push(dummyArray)
|
|
3484
|
+
// if (this.itemArray) {
|
|
3485
|
+
// this.lStorageService.setitemonLocalStorage('itemArray', this.itemArray);
|
|
3486
|
+
// }
|
|
3487
|
+
// this.serviceTotalPrice = 0;
|
|
3488
|
+
// this.itemArray.forEach((item: any) => {
|
|
3489
|
+
// let quantity = item.columnItem[0].answer.dataGridList[0].dataGridListColumn[0].quantity;
|
|
3490
|
+
// this.serviceTotalPrice = (this.serviceTotalPrice + item.price) * quantity;
|
|
3491
|
+
// this.lStorageService.setitemonLocalStorage('serviceTotalPrice', this.serviceTotalPrice);
|
|
3492
|
+
// });
|
|
3493
|
+
// this.id = this.id + 1
|
|
3494
|
+
// let obj = { sequenceId: this.sequenceId, dgList: this.post_Data.answerLine };
|
|
3495
|
+
// this.finalObjectList.push(obj);
|
|
3496
|
+
// this.onSubmit('serviceOption')
|
|
3497
|
+
// }
|
|
3498
|
+
// });
|
|
3499
|
+
// }
|
|
3500
|
+
}
|
|
3501
|
+
increment(item) {
|
|
3502
|
+
// const removeitemdialogRef = this.dialog.open(QnrDialogComponent, {
|
|
3503
|
+
// width: '100%',
|
|
3504
|
+
// panelClass: ['popup-class', 'commonpopupmainclass', 'confirmationmainclass'],
|
|
3505
|
+
// disableClose: true,
|
|
3506
|
+
// data: {
|
|
3507
|
+
// item: item,
|
|
3508
|
+
// data: this.questionnaireList,
|
|
3509
|
+
// view: 'qnrrepeatView',
|
|
3510
|
+
// servDetails: this.service
|
|
3511
|
+
// }
|
|
3512
|
+
// });
|
|
3513
|
+
// removeitemdialogRef.afterClosed().subscribe(result => {
|
|
3514
|
+
// if (result) {
|
|
3515
|
+
// if (result === 'addNew') {
|
|
3516
|
+
// this.quesStore = this.lStorageService.getitemfromLocalStorage('quesStore');
|
|
3517
|
+
// this.qnrPopup(this.quesStore, true)
|
|
3518
|
+
// } else {
|
|
3519
|
+
// if (!this.sequenceId) {
|
|
3520
|
+
// this.sequenceId = item.sequenceId
|
|
3521
|
+
// }
|
|
3522
|
+
// let dummyArray = { id: this.id, sequenceId: this.sequenceId, item: result.repeatItem.item, price: result.repeatItem.price, columnItem: result.repeatItem.columnItem }
|
|
3523
|
+
// let items = dummyArray.columnItem[0].answer.dataGridList[0].dataGridListColumn;
|
|
3524
|
+
// for (let i = 0; i < items.length; i++) {
|
|
3525
|
+
// items[i].quantity = items[i].quantity + 1;
|
|
3526
|
+
// }
|
|
3527
|
+
// if (this.itemArray) {
|
|
3528
|
+
// this.lStorageService.setitemonLocalStorage('itemArray', this.itemArray);
|
|
3529
|
+
// }
|
|
3530
|
+
// console.log("This.ItemArray", this.itemArray)
|
|
3531
|
+
// this.serviceTotalPrice = 0;
|
|
3532
|
+
// this.itemArray.forEach((item: any) => {
|
|
3533
|
+
// let quantity = item.columnItem[0].answer.dataGridList[0].dataGridListColumn[0].quantity;
|
|
3534
|
+
// console.log("quantity", quantity)
|
|
3535
|
+
// this.serviceTotalPrice += item.price * quantity;
|
|
3536
|
+
// });
|
|
3537
|
+
// console.log("serviceTotalPrice", this.serviceTotalPrice)
|
|
3538
|
+
// this.lStorageService.setitemonLocalStorage('serviceTotalPrice', this.serviceTotalPrice);
|
|
3539
|
+
// this.id = this.id + 1
|
|
3540
|
+
// let obj = { sequenceId: this.sequenceId, dgList: result.repeatItem.columnItem };
|
|
3541
|
+
// this.finalObjectList.push(obj);
|
|
3542
|
+
// this.onSubmit('serviceOption')
|
|
3543
|
+
// }
|
|
3544
|
+
// }
|
|
3545
|
+
// });
|
|
3546
|
+
}
|
|
3547
|
+
getItemQuantity(item) {
|
|
3548
|
+
let quantity = item.columnItem[0].answer.dataGridList[0].dataGridListColumn[0].quantity;
|
|
3549
|
+
return quantity;
|
|
3550
|
+
// console.log("item", item)
|
|
3551
|
+
}
|
|
3552
|
+
decrement(removingItem) {
|
|
3553
|
+
let index = this.itemArray.findIndex((x) => x.id === removingItem.id);
|
|
3554
|
+
if (index > -1) {
|
|
3555
|
+
console.log("this.itemArray[index]", this.itemArray[index]);
|
|
3556
|
+
if (this.getItemQuantity(this.itemArray[index]) == 1) {
|
|
3557
|
+
this.itemArray.splice(index, 1); // 2nd parameter means remove one item only
|
|
3558
|
+
}
|
|
3559
|
+
else {
|
|
3560
|
+
let items = this.itemArray[index].columnItem[0].answer.dataGridList[0].dataGridListColumn;
|
|
3561
|
+
for (let i = 0; i < items.length; i++) {
|
|
3562
|
+
items[i].quantity = items[i].quantity - 1;
|
|
3563
|
+
}
|
|
3564
|
+
}
|
|
3565
|
+
if (this.itemArray) {
|
|
3566
|
+
this.lStorageService.setitemonLocalStorage('itemArray', this.itemArray);
|
|
3567
|
+
}
|
|
3568
|
+
this.serviceTotalPrice = 0;
|
|
3569
|
+
this.itemArray.forEach((item) => {
|
|
3570
|
+
this.serviceTotalPrice = this.serviceTotalPrice + item.price;
|
|
3571
|
+
});
|
|
3572
|
+
this.lStorageService.setitemonLocalStorage('serviceTotalPrice', this.serviceTotalPrice);
|
|
3573
|
+
this.finalObjectList.splice(index, 1);
|
|
3574
|
+
}
|
|
3575
|
+
this.onSubmit('serviceOption');
|
|
3576
|
+
}
|
|
3577
|
+
disableInput() {
|
|
3578
|
+
return false;
|
|
3579
|
+
}
|
|
3580
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: QuestionnaireComponent, deps: [{ token: i1$6.ActivatedRoute }, { token: WordProcessor }, { token: LocalStorageService }, { token: DateTimeProcessor }, { token: i1$5.MatDialog }, { token: FileService }, { token: CommonService }, { token: QuestionaireService }, { token: ErrorMessagingService }, { token: ToastService }, { token: i11.ModalGalleryService }, { token: i12.Location }], target: i0.ɵɵFactoryTarget.Component });
|
|
3581
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: QuestionnaireComponent, selector: "app-questionnaire", inputs: { questionnaireList: "questionnaireList", source: "source", accountId: "accountId", questionAnswers: "questionAnswers", customerDetails: "customerDetails", uuid: "uuid", type: "type", waitlistStatus: "waitlistStatus", orderStatus: "orderStatus", donationDetails: "donationDetails", service: "service", mode: "mode", tempType: "tempType", bookingType: "bookingType" }, outputs: { fileChanged: "fileChanged", returnAnswers: "returnAnswers" }, viewQueries: [{ propertyName: "file2", first: true, predicate: ["logofile1"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<section class=\"cons-inbox no-padding-small\" *ngIf=\"!showservice\">\r\n <div class=\"container consumer-dashhome no-padding no-padding-small\" *ngIf=\"!type && source!='proLead'\">\r\n <div class=\"card title-gb rounded-0\" *ngIf=\"uuid\">\r\n <h5 class=\"mgn-up-10 bold\">{{questionnaire_heading | capitalizeFirst}} <a class=\"pull-left mgn-rt-20 back-btn\"\r\n (click)=\"goBack()\"><i class=\"fa fa-arrow-left\"></i></a></h5>\r\n </div>\r\n </div>\r\n <app-common-innerloading-spinner *ngIf=\"loading\"></app-common-innerloading-spinner>\r\n <div class=\"d-flex flex-column-fluid pull-right mgn-rt-10 mgn-bt-20\"\r\n *ngIf=\"type !== 'qnrLinkProvider' && !buttonDisable && waitlistStatus\">\r\n <button class=\"normal-btn edit\" mat-flat-button (click)=\"editQnr()\">Edit</button>\r\n </div>\r\n <div class=\"d-flex flex-column-fluid width-100\" [class.qnrDisableState]=\"disableInput()\"\r\n [class.no-padding]=\"uuid && (source === 'consCheckin' || source === 'consAppt' || source === 'consOrder' || source === 'paper' || source === 'consDonationDetails' || source === 'ivr')\">\r\n <div class=\"col-xl-12 force_center\" [class.no-padding]=\"uuid\" [class.no-padding-small]=\"source && source=='ivr'\">\r\n <div class=\"\">\r\n <div class=\"qnrsec\" *ngFor=\"let qnr of groupedQnr | keyvalue: asIsOrder\"\r\n [class.section-shadow]=\"getSectionCount() > 1\" [class.no-padding-small]=\"source && source=='ivr'\">\r\n <!-- {{qnr | json}} -->\r\n <!-- <div class=\"qnr-section\" *ngIf=\"getSectionCount() > 1\">{{qnr.key}}</div> -->\r\n <div class=\"form-group card mgn-0\" *ngFor=\"let question of qnr.value\">\r\n <!-- <div class=\"qnr-section\" *ngIf=\"getSectionCount() > 1\">{{getQuestion(question).sectionName}}</div> -->\r\n <label class=\"col-12 quest\">{{getQuestion(question).label}}\r\n <i class=\"fa fa-plus-circle pull-right\" aria-hidden=\"true\"\r\n [class.addicon]=\"!buttonDisable && !disableInput()\"\r\n *ngIf=\"getQuestion(question).fieldDataType === 'dataGrid' && !showDataGrid[getQuestion(question).labelName]\"\r\n (click)=\"!buttonDisable && !disableInput() && showDataGridAddSection(getQuestion(question), true)\"></i>\r\n <div class=\"pro-only\" *ngIf=\"showProviderText(getQuestion(question))\">For Providers</div>\r\n <span class=\"red\" *ngIf=\"getQuestion(question).mandatory\">*</span>\r\n <div class=\"form-level-settings\" *ngIf=\"getQuestion(question).hint\"\r\n [innerHTML]=\"getQuestion(question).hint | safeHtml\">\r\n </div>\r\n </label>\r\n <!-- for file upload -->\r\n <div class=\"col-12\" *ngIf=\"getQuestion(question).fieldDataType === 'fileUpload'\">\r\n <mat-select multiple #deptsel [disabled]=\"buttonDisable || disableInput()\"\r\n *ngIf=\"getQuestion(question).filePropertie.maxNoOfFile > 1 && getQuestion(question).filePropertie.minNoOfFile !== getQuestion(question).filePropertie.maxNoOfFile\"\r\n [(ngModel)]=\"uploadFilesTemp[getQuestion(question).labelName]\" class=\"select-box\" placeholder=\"Select\">\r\n <mat-option *ngFor=\"let document of getQuestion(question).filePropertie.allowedDocuments\"\r\n [value]=\"document\" (click)=\"changeImageSelected(getQuestion(question), document)\">\r\n {{document}}</mat-option>\r\n </mat-select>\r\n <div class=\"col-lg-12 col-12 col-md-12 col-sm-12 no-padding mgn-up-20\"\r\n *ngIf=\"getDocuments(getQuestion(question)) && getDocuments(getQuestion(question)).length > 0\">\r\n <div class=\"dropzone dropzone-default dropzone-primary dz-clickable\"\r\n [class.single-file]=\"getQuestion(question).filePropertie.allowedDocuments.length==1\"\r\n style=\"cursor: auto;\">\r\n <ng-container *ngFor=\"let doc of getDocuments(getQuestion(question))\">\r\n <div class=\"dz-preview dz-processing dz-image-preview dz-error dz-complete\"\r\n *ngIf=\"getImg(getQuestion(question), doc)\">\r\n <div class=\"docname\" *ngIf=\"getQuestion(question).filePropertie.allowedDocuments.length > 1\">\r\n {{doc}}</div>\r\n <div class=\"dzimage pointer-cursor\" (click)=\"openAttachmentGallery(getQuestion(question), doc)\">\r\n <img alt=\"\" class=\"img_fit\" [src]=\"getImg(getQuestion(question), doc)\">\r\n </div>\r\n <input [disabled]=\"buttonDisable || disableInput()\" (blur)=\"onSubmit('inputChange');\"\r\n [(ngModel)]=\"comments[getQuestion(question).labelName + '=' + doc]\">\r\n <div class=\"gal_action\" *ngIf=\"!buttonDisable && !disableInput() && mode!=='read'\"\r\n (click)=\"changeImageSelected(getQuestion(question), doc)\">\r\n <i class=\"fa fa-times-circle\" aria-hidden=\"true\"></i>\r\n </div>\r\n </div>\r\n <div class=\"dz-preview dz-processing dz-image-preview dz-error dz-complete\"\r\n (click)=\"logofile1.click()\" *ngIf=\"!getImg(getQuestion(question), doc)\">\r\n <div class=\"docname\" *ngIf=\"getQuestion(question).filePropertie.allowedDocuments.length > 1\">\r\n {{doc}}</div>\r\n <div class=\"dz-image pointer-cursor\">\r\n </div>\r\n <input #logofile1 type=\"file\" accept=\"/*;capture=camera\" style=\"display:none;\"\r\n [disabled]=\"buttonDisable || disableInput()\"\r\n (change)=\"filesSelected($event, getQuestion(question), doc)\">\r\n <div class=\"dz-error-mark\">\r\n <a class=\"btn btn-icon btn-light-success btn-circle mr-2\"><i\r\n class=\"text-dark-50 flaticon-upload\"></i></a>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <div class=\"mt-2 text-danger\" *ngIf=\"apiError[getQuestion(question).labelName]\">\r\n {{apiError[getQuestion(question).labelName]}}</div>\r\n </div>\r\n <!-- for checkbox -->\r\n <div class=\"col-12\"\r\n *ngIf=\"getQuestion(question).fieldDataType === 'list' && getQuestion(question).listPropertie.maxAnswers > 1\">\r\n <div class=\"checkbox-list\">\r\n <label class=\"checkbox\" *ngFor=\"let value of getQuestion(question).labelValues\">\r\n <input type=\"checkbox\" [checked]=\"isChecked(value, getQuestion(question))\"\r\n (change)=\"listChange($event, value, getQuestion(question))\"\r\n [disabled]=\"buttonDisable || disableInput()\">\r\n <span></span>\r\n {{value}}\r\n </label>\r\n </div>\r\n <div class=\"mt-2 text-danger\" *ngIf=\"apiError[getQuestion(question).labelName]\">\r\n {{apiError[getQuestion(question).labelName]}}</div>\r\n </div>\r\n <!-- for radio -->\r\n <div class=\"col-12\"\r\n *ngIf=\"getQuestion(question).fieldDataType === 'list' && getQuestion(question).listPropertie.maxAnswers === 1\">\r\n <div class=\"radio-list\">\r\n <label class=\"radio\" *ngFor=\"let value of getQuestion(question).labelValues\">\r\n <input type=\"radio\" [disabled]=\"buttonDisable || disableInput()\"\r\n [checked]=\"isChecked(value, getQuestion(question))\"\r\n (change)=\"listChange($event, value, getQuestion(question))\">\r\n <span></span>\r\n {{value}}\r\n </label>\r\n </div>\r\n <div class=\"mt-2 text-danger\" *ngIf=\"apiError[getQuestion(question).labelName]\">\r\n {{apiError[getQuestion(question).labelName]}}</div>\r\n </div>\r\n <!-- for toggel boolean -->\r\n <div class=\"col-12\" *ngIf=\"getQuestion(question).fieldDataType === 'bool'\">\r\n <div class=\"radio-list\">\r\n <label class=\"radio\" *ngFor=\"let value of getQuestion(question).labelValues\">\r\n <input type=\"radio\" [disabled]=\"buttonDisable || disableInput()\"\r\n [checked]=\"isBooleanChecked(value, getQuestion(question))\"\r\n (change)=\"booleanChange($event, value, getQuestion(question))\">\r\n <span></span>\r\n {{value}}\r\n </label>\r\n </div>\r\n <div class=\"mt-2 text-danger\" *ngIf=\"apiError[getQuestion(question).labelName]\">\r\n {{apiError[getQuestion(question).labelName]}}</div>\r\n </div>\r\n <!-- for Text -->\r\n <div class=\"col-12\" *ngIf=\"getQuestion(question).fieldDataType === 'plainText'\">\r\n <input *ngIf=\"getQuestion(question).plainTextPropertie.maxNoOfLetter<=100\"\r\n [(ngModel)]=\"answers[getQuestion(question).labelName]\" (input)=\"onSubmit('inputChange');\" \r\n [minlength]=\"getQuestion(question).plainTextPropertie.minNoOfLetter\"\r\n [maxlength]=\"getQuestion(question).plainTextPropertie.maxNoOfLetter\"\r\n class=\"form-control1 form-control-solid\" type=\"text\" [disabled]=\"buttonDisable || disableInput()\">\r\n <!-- [disabled]=\"buttonDisable || disableInput()\" -->\r\n <textarea rows=\"3\" *ngIf=\"getQuestion(question).plainTextPropertie.maxNoOfLetter>100\"\r\n [(ngModel)]=\"answers[getQuestion(question).labelName]\" (input)=\"onSubmit('inputChange');\"\r\n [minlength]=\"getQuestion(question).plainTextPropertie.minNoOfLetter\"\r\n [maxlength]=\"getQuestion(question).plainTextPropertie.maxNoOfLetter\" [disabled]=\"buttonDisable || disableInput()\"\r\n class=\"form-control2 form-control-solid\"></textarea>\r\n <div class=\"mt-2 text-danger\" *ngIf=\"apiError[getQuestion(question).labelName]\">\r\n {{apiError[getQuestion(question).labelName]}}</div>\r\n </div>\r\n <!-- for Number -->\r\n <div class=\"col-12\" *ngIf=\"getQuestion(question).fieldDataType === 'number'\">\r\n <input [(ngModel)]=\"answers[getQuestion(question).labelName]\" (input)=\"onSubmit('inputChange');\"\r\n [min]=\"getQuestion(question).numberPropertie.start\" [max]=\"getQuestion(question).numberPropertie.end\"\r\n [disabled]=\"buttonDisable || disableInput()\" class=\"form-control1 form-control-solid\" type=\"number\"\r\n (keypress)=\"isNumeric($event)\">\r\n <div class=\"mt-2 text-danger\" *ngIf=\"apiError[getQuestion(question).labelName]\">\r\n {{apiError[getQuestion(question).labelName]}}</div>\r\n </div>\r\n <!-- for Date -->\r\n <div class=\"col-12 disp-flex\" *ngIf=\"getQuestion(question).fieldDataType === 'date'\">\r\n <input class=\"form-control1\" [matDatepicker]=\"picker\" [max]=\"getMaxdate(question)\"\r\n [min]=\"getMindate(question)\" [(ngModel)]=\"answers[getQuestion(question).labelName]\"\r\n (dateChange)=\"onSubmit('inputChange')\" [disabled]=\"buttonDisable || disableInput()\"\r\n (click)=\"picker.open()\">\r\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\r\n <mat-datepicker #picker [disabled]=\"buttonDisable || disableInput()\"></mat-datepicker>\r\n <div class=\"mt-2 text-danger\" *ngIf=\"apiError[getQuestion(question).labelName]\">\r\n {{apiError[getQuestion(question).labelName]}}</div>\r\n </div>\r\n <!-- for Datagrid -->\r\n <div class=\"table-responsive1\"\r\n *ngIf=\"getQuestion(question).fieldDataType === 'dataGrid' && dataGridColumnsAnswerList[getQuestion(question).labelName] && dataGridColumnsAnswerList[getQuestion(question).labelName].length > 0\">\r\n <table class=\"table table-head-custom table-head-bg table-borderless table-vertical-center\">\r\n <thead>\r\n <th *ngFor=\"let column of getQuestion(question).dataGridProperties.dataGridColumns\">\r\n {{column.columnId}}</th>\r\n <th *ngIf=\"!buttonDisable && !disableInput() && !showDataGrid[getQuestion(question).labelName]\">\r\n </th>\r\n <th *ngIf=\"!buttonDisable && !disableInput() && !showDataGrid[getQuestion(question).labelName]\">\r\n </th>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor=\"let column of dataGridColumnsAnswerList[getQuestion(question).labelName];let i =index\">\r\n <td *ngFor=\"let data of column | keyvalue\">\r\n <div\r\n *ngIf=\"getColumnType(getQuestion(question).dataGridProperties.dataGridColumns, data.key) === 'date'\">\r\n {{data.value | date : newTimeDateFormat}}\r\n </div>\r\n <div\r\n *ngIf=\"getColumnType(getQuestion(question).dataGridProperties.dataGridColumns, data.key) === 'bool'\">\r\n {{getBoolValue(data.value)}}\r\n </div>\r\n <div\r\n *ngIf=\"getColumnType(getQuestion(question).dataGridProperties.dataGridColumns, data.key) !== 'date' && getColumnType(getQuestion(question).dataGridProperties.dataGridColumns, data.key) !== 'bool'\">\r\n {{data.value}}\r\n </div>\r\n </td>\r\n <td *ngIf=\"!buttonDisable && !disableInput() && !showDataGrid[getQuestion(question).labelName]\">\r\n <i class=\"fa fa-pen\" (click)=\"editDataGrid(getQuestion(question), column)\"></i>\r\n </td>\r\n <td *ngIf=\"!buttonDisable && !disableInput() && !showDataGrid[getQuestion(question).labelName]\">\r\n <i class=\"fa fa-trash\" (click)=\"deleteDataGrid(getQuestion(question), column)\"></i>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </div>\r\n <div class=\"gridSection\" *ngIf=\"showDataGrid[getQuestion(question).labelName]\">\r\n <div class=\"gridColumn\" *ngFor=\"let column of getQuestion(question).dataGridProperties.dataGridColumns\">\r\n <label>{{column.label}}\r\n <span class=\"red\" *ngIf=\"column.mandatory\">*</span>\r\n </label>\r\n <!-- for checkbox -->\r\n <div class=\"col-12\" *ngIf=\"column.dataType === 'list'\">\r\n <div class=\"checkbox-list\">\r\n <label class=\"checkbox\" *ngFor=\"let value of column.listPropertie.values\">\r\n <input type=\"checkbox\" [checked]=\"isChecked(value, getQuestion(question), column)\"\r\n (change)=\"listChange($event, value, getQuestion(question), column)\"\r\n [disabled]=\"buttonDisable || disableInput()\">\r\n <span></span>\r\n {{value}}\r\n </label>\r\n </div>\r\n </div>\r\n <!-- for toggel boolean -->\r\n <div class=\"col-12\" *ngIf=\"column.dataType === 'bool'\">\r\n <div class=\"radio-list\">\r\n <label class=\"radio\">\r\n <input type=\"radio\" [disabled]=\"buttonDisable || disableInput()\"\r\n [checked]=\"isBooleanChecked('yes', getQuestion(question), column)\"\r\n (change)=\"booleanChange($event, 'yes', getQuestion(question), column)\">\r\n <span></span>\r\n Yes\r\n </label>\r\n <label class=\"radio\">\r\n <input type=\"radio\" [disabled]=\"buttonDisable || disableInput()\"\r\n [checked]=\"isBooleanChecked('no', getQuestion(question), column)\"\r\n (change)=\"booleanChange($event, 'no', getQuestion(question), column)\">\r\n <span></span>\r\n No\r\n </label>\r\n </div>\r\n </div>\r\n <!-- for Text -->\r\n <div class=\"col-12\" *ngIf=\"column.dataType === 'plainText'\">\r\n <input [(ngModel)]=\"dataGridColumns[getQuestion(question).labelName + '=' + column.order]\"\r\n [disabled]=\"buttonDisable || disableInput()\" class=\"form-control1 form-control-solid\" type=\"text\">\r\n </div>\r\n <!-- for Number -->\r\n <div class=\"col-12\" *ngIf=\"column.dataType === 'number'\">\r\n <input [(ngModel)]=\"dataGridColumns[getQuestion(question).labelName + '=' + column.order]\"\r\n [disabled]=\"buttonDisable || disableInput()\" [min]=\"column.numberPropertie.start\"\r\n [max]=\"column.numberPropertie.end\" class=\"form-control1 form-control-solid\" type=\"number\">\r\n </div>\r\n <!-- for Date -->\r\n <div class=\"col-12 disp-flex\" *ngIf=\"column.dataType === 'date'\">\r\n <input class=\"form-control1\" [matDatepicker]=\"picker\" [max]=\"getMaxdate(question)\"\r\n [min]=\"getMindate(question)\"\r\n [(ngModel)]=\"dataGridColumns[getQuestion(question).labelName + '=' + column.order]\"\r\n [disabled]=\"buttonDisable || disableInput()\" (click)=\"picker.open()\">\r\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\r\n <mat-datepicker #picker [disabled]=\"buttonDisable || disableInput()\">\r\n </mat-datepicker>\r\n </div>\r\n </div>\r\n <div class=\"act-btns\">\r\n <button type=\"button\" class=\"btn btn-light-primary font-weight-bold\"\r\n (click)=\"cancelAddorUpdate(getQuestion(question))\">\r\n Cancel\r\n </button>\r\n <button type=\"button\" class=\"btn btn-primary font-weight-bold\"\r\n (click)=\"saveDataGridColumn(getQuestion(question))\">Add</button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-md-12 col-12 col-sm-12 col-lg-12 no-padding submit-pad\"\r\n *ngIf=\"type !== 'qnrLinkProvider' && source!=='proLead' && (uuid || source === 'customer-details' || source === 'proDonation') && !disableInput()\">\r\n <button class=\"normal-btn\" mat-flat-button [class.spinner]=\"buttonDisable\"\r\n [class.spinner-darker-success]=\"buttonDisable\" [class.spinner-center]=\"buttonDisable\"\r\n (click)=\"!buttonDisable && onSubmit('submit')\" [disabled]=\"buttonDisable\"\r\n [class.disabled]=\"buttonDisable\">{{(type == 'qnr-link') ? 'Submit' : 'Update'}}</button>\r\n </div>\r\n </div>\r\n </div>\r\n</section>\r\n<ks-modal-gallery [id]=\"0\" *ngIf=\"image_list_popup && image_list_popup.length>0\" [modalImages]=\"image_list_popup\"\r\n [plainGalleryConfig]=\"customPlainGalleryRowConfig\" [buttonsConfig]=\"customButtonsFontAwesomeConfig\"\r\n (buttonBeforeHook)=\"onButtonBeforeHook($event)\"></ks-modal-gallery>\r\n<section class=\"cons-inbox no-padding-small\" *ngIf=\"showservice\">\r\n <div class=\"container consumer-dashhome no-padding no-padding-small\" *ngIf=\"!type\">\r\n <div class=\"card title-gb rounded-0\" *ngIf=\"uuid\">\r\n <h5 class=\"mgn-up-10 bold\">{{questionnaire_heading | capitalizeFirst}} <a class=\"pull-left mgn-rt-20 back-btn\"\r\n (click)=\"goBack()\"><i class=\"fa fa-arrow-left\"></i></a></h5>\r\n </div>\r\n </div>\r\n <app-common-innerloading-spinner *ngIf=\"loading\"></app-common-innerloading-spinner>\r\n <div class=\"d-flex flex-column-fluid pull-right mgn-rt-10 mgn-bt-20\"\r\n *ngIf=\"type !== 'qnrLinkProvider' && !buttonDisable && waitlistStatus\">\r\n <button class=\"normal-btn edit\" mat-flat-button (click)=\"editQnr()\">Edit</button>\r\n </div>\r\n <div class=\"d-flex flex-column-fluid width-100\" [class.qnrDisableState]=\"disableInput()\"\r\n [class.no-padding]=\"uuid && (source === 'consCheckin' || source === 'consAppt' || source === 'consDonationDetails' )\">\r\n <div class=\"col-xl-12 force_center no-padding\" [class.no-padding]=\"uuid\"\r\n [class.no-padding-small]=\"source && source=='ivr'\">\r\n <div class=\"\">\r\n <div class=\"\" *ngFor=\"let qnr of groupedQnr | keyvalue\" [class.section-shadow]=\"getSectionCount() > 1\">\r\n <!-- <div class=\"qnr-section\" *ngIf=\"getSectionCount() > 1\">{{qnr.key}}</div> -->\r\n <div *ngIf=\"itemArray.length == 0 \">\r\n <div class=\"form-group mgn-0 border-dashed text-center\" *ngFor=\"let question of qnr.value\">\r\n <div class=\"qnr-section\" *ngIf=\"getSectionCount() > 1\">\r\n {{getQuestion(question).question.sectionName}}</div>\r\n <label class=\"col-12 quest pointer-cursor\"\r\n (click)=\"showDataGridAddSectionn(getQuestion(question).question, true)\">\r\n <!-- {{getQuestion(question).question.label}} -->\r\n <!-- <div class=\"pull-right btn btn-primary font-weight-bold\"\r\n (click)=\"showDataGridAddSectionn(getQuestion(question).question, true)\"><i\r\n class=\"fa fa-plus add-plus\"></i>Add Item\r\n </div> -->\r\n <div>\r\n <img src=\"./assets/images/service-options.svg\" alt=\"Service Options\" class=\"img-fluid pb-0\"\r\n width=\"300\" height=\"300\">\r\n </div>\r\n <div class=\"pro-only\" *ngIf=\"showProviderText(getQuestion(question).question)\">For Providers</div>\r\n <span class=\"red\" *ngIf=\"getQuestion(question).question.mandatory\">*</span>\r\n <!-- <div class=\"form-level-settings\" *ngIf=\"getQuestion(question).question.hint\">\r\n {{getQuestion(question).question.hint}}\r\n </div> -->\r\n <div>\r\n <span class=\"text-primary font-weight-bold\">Please Choose your Pet</span>\r\n </div>\r\n <div class=\"mt-3\">\r\n <span class=\"btn btn-light font-weight-bold\">Continue</span>\r\n </div>\r\n </label>\r\n </div>\r\n </div>\r\n\r\n\r\n\r\n </div>\r\n <!-- {{itemArray | json}} -->\r\n <div class=\"col-md-12 col-12 col-sm-12 mgn-bt-12 no-padding\" *ngIf=\"showItem\">\r\n\r\n\r\n <div>\r\n <div class=\"card-border\" *ngFor=\" let items of itemArray\">\r\n\r\n <div class=\"d-flex justify-content-between\">\r\n <div>\r\n <div class=\"text-capitalize\">\r\n <div class=\"\">\r\n <span class=\"text-primary\">\r\n {{items.item}}<br>\r\n </span>\r\n <!-- <span class=\"disp-none-small\"> - </span>\r\n <span class=\"disp-none-large\"><br></span> -->\r\n\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"d-flex border-apply px-0\">\r\n <div (click)=\"decrement(items);\" class=\"pointer-cursor quantity quantity-1\">\r\n <span class=\"p-10\">-</span>\r\n </div>\r\n <div class=\"mx-2 pointer-cursor\"><span class=\"quantity\"\r\n *ngIf=\"items && items.columnItem && items.columnItem[0] && items.columnItem[0].answer && items.columnItem[0].answer.dataGridList && items.columnItem[0].answer.dataGridList[0] && items.columnItem[0].answer.dataGridList[0].dataGridListColumn && items.columnItem[0].answer.dataGridList[0].dataGridListColumn[0] && items.columnItem[0].answer.dataGridList[0].dataGridListColumn[0].quantity\">\r\n {{items.columnItem[0].answer.dataGridList[0].dataGridListColumn[0].quantity}}</span>\r\n </div>\r\n <div (click)=\"increment(items);\" class=\"pointer-cursor quantity quantity-1\">\r\n <span class=\"p-10\">+</span>\r\n </div>\r\n </div>\r\n </div>\r\n <div>\r\n <span class=\"text-primary\"><span><i class=\"fa fa-inr\"></i>\r\n {{items.price * getItemQuantity(items)}}/-\r\n </span>\r\n </span>\r\n </div>\r\n <!-- <div (click)=\"qnrPopup(items, 'edit');\">\r\n <span class=\"text-link font-weight-bold\"><span>\r\n Edit*\r\n </span>\r\n </span>\r\n </div> -->\r\n </div>\r\n\r\n <div class=\"clearfix\"></div>\r\n <div *ngIf=\"showItem &&itemArray.length > 0\">\r\n <div *ngFor=\"let qnr of groupedQnr | keyvalue\" [class.section-shadow]=\"getSectionCount() > 1\">\r\n <div *ngFor=\"let question of qnr.value\">\r\n <label class=\"col-12 quest pointer-cursor\"\r\n (click)=\"showDataGridAddSectionn(getQuestion(question).question, true)\">\r\n <span class=\"btn btn-light font-weight-bold\"><i class=\"fa fa-plus text-white\"></i>Add</span>\r\n </label>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n</section>\r\n\r\n<!-- <ks-modal-gallery [id]=\"0\" *ngIf=\"image_list_popup && image_list_popup.length>0\" [modalImages]=\"image_list_popup\"\r\n [plainGalleryConfig]=\"customPlainGalleryRowConfig\" [buttonsConfig]=\"customButtonsFontAwesomeConfig\"\r\n (buttonBeforeHook)=\"onButtonBeforeHook($event)\"></ks-modal-gallery> -->", styles: [".dropzone{min-height:auto!important}.question-box{margin-top:10px}.btn-light{background-color:#1e4079!important;padding:5px 25px!important;color:#fff!important}.quest-outer{padding:10px}.error-msg{color:red}.upload-btn{background:#fff;border:1px solid;font-size:small}.card-border{box-shadow:0 0 5px 5px #f0f0f0!important;padding:10px 30px!important;margin:20px 10px!important;cursor:pointer!important;border-radius:10px!important}.border-apply{border:2px solid #1e4079!important;border-radius:20px!important}.quantity{font-size:20px!important;font-weight:700!important}.quantity-1:hover{background-color:#1e4079!important;color:#fff!important;font-weight:700!important;border-radius:50%!important;padding:-2px 12px!important}::ng-deep .mat-checkbox-layout{font-weight:400!important}.force_center{margin-left:auto;margin-right:auto}.input-group-text{display:-webkit-box;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:.65rem 1rem;margin-bottom:0;font-size:1rem;font-weight:400;line-height:1.5;color:#3f4254;text-align:center;white-space:nowrap;background-color:#f3f6f9!important;border:1px solid #E4E6EF!important;border-radius:.42rem;border-top-left-radius:0;border-bottom-left-radius:0;cursor:pointer}.w_100{width:100%}.img_fit{width:120px;height:120px}.dropzone .dropzone-default{border:1px dashed #EBEDF3!important}.select-box{padding:10px!important;border:1px solid #E4E6EF!important;border-radius:.42rem!important}.normal-btn{padding:5px 20px;border:none!important}.edit{padding:3px 25px;border-radius:20px!important}.mgn-0{margin-left:0!important;margin-right:0!important;margin-bottom:10px!important}.quest{font-size:1.1rem!important}.mt-3 a:hover{text-decoration:underline!important}.dzimage,.dz-image{border:1px dashed #ccc}.gal_action{position:absolute;top:20px;right:-10px;background:#00000080;width:20px;height:20px;text-align:center;border-radius:50%;cursor:pointer}.single-file{padding:0!important;text-align:initial!important;border:none!important}.single-file .dz-preview{position:relative!important;display:inline-block!important;vertical-align:top!important;margin:16px!important;min-height:100px!important}.single-file .gal_action{top:-5px!important}.pro-only{float:right;color:red;font-size:.8rem}.qnrDisableState .card,.qnrDisableState .dropzone-default,.qnrDisableState .dz-image-preview{background:#eeeeee9e!important}.qnr-section{font-weight:700;padding-bottom:10px;text-transform:uppercase}.section-shadow{margin:20px 10px;padding:20px!important;box-shadow:0 0 10px #0000001f!important}.gridSection .gridColumn{padding:15px}.gridSection .gridColumn label{padding:0 12.5px!important;font-weight:400!important;color:#3f4254!important;font-size:.9rem!important}.gridSection .act-btns .btn{padding:5px 10px!important;margin:5px!important}.gridSection .act-btns{padding:0 20px}.fa-plus-circle{font-size:1.5rem!important}.addicon{color:#1e4079!important;cursor:pointer}.fa-trash,.fa-pen{color:#000!important;font-size:1rem!important}.dz-preview input{width:121px!important;border:1px solid #ccc}.submit-pad{padding:0 10px 20px!important}.form-group.card{border:1px solid #dadce063!important;border-radius:8px!important;padding:5px!important}.docname{width:120px;margin-bottom:5px;text-overflow:ellipsis!important;overflow:hidden!important;white-space:nowrap!important}@media (max-width: 750px){.normal-btn{padding:3px 10px;border:none!important}.edit{padding:2px 12px;border-radius:10px!important}}.col-xl-12,.col-12,.col-sm-12,.col-md-12,.col-lg-12{position:relative;width:100%;padding-right:12.5px;padding-left:12.5px}@media (min-width: 1200px){.col-xl-12{flex:0 0 100%;max-width:100%}}.qnrsec{padding:10px}.p-10{padding:8px!important}.form-control1{display:block!important;width:100%!important;height:calc(1.5em + 1.3rem + 2px)!important;padding:.65rem 1rem!important;font-size:1rem!important;font-weight:400!important;line-height:1.5!important;color:#3f4254!important;background-color:#fff!important;background-clip:padding-box!important;border:1px solid #E4E6EF!important;border-radius:.42rem!important;box-shadow:none!important;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out!important}.form-control2{display:block!important;width:100%!important;padding:.65rem 1rem!important;font-size:1rem!important;font-weight:400!important;line-height:1.5!important;color:#3f4254!important;background-color:#fff!important;background-clip:padding-box!important;border:1px solid #E4E6EF!important;border-radius:.42rem!important;box-shadow:none!important;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out!important}.form-group label{font-size:1rem;font-weight:400;color:#3f4254}label{display:inline-block;margin-bottom:.5rem}.col-12{flex:0 0 100%;max-width:100%}.radio-list .radio span{margin-right:.75rem}.radio>span{background-color:#ebedf3;border:1px solid transparent}.radio>span{height:18px;width:18px}.radio>span{border-radius:50%;background-color:none;display:flex;align-items:center;justify-content:center;flex-shrink:0}.radio-list .radio{margin-bottom:1rem}.radio{display:flex;align-items:center;position:relative;text-align:left;cursor:pointer;font-size:1rem;transition:all .3s ease;margin:0}.radio>input{position:absolute;z-index:-1;opacity:0}.card{position:relative;display:flex;flex-direction:column;min-width:0;word-wrap:break-word;background-color:#fff;background-clip:border-box;border:1px solid #EBEDF3;border-radius:.42rem}.radio-list .radio:last-child{margin-bottom:0}@media (min-width: 992px){.col-lg-12{flex:0 0 100%;max-width:100%}}.dropzone.dropzone-default .dz-preview .dz-image{border-radius:.42rem}.btn.btn-icon i{padding:0;margin:0}.btn i{font-size:1.3rem;padding-right:.35rem;vertical-align:middle;line-height:1;display:inline-flex}.btn i{transition:color .15s ease,background-color .15s ease,border-color .15s ease,box-shadow .15s ease}.text-dark-50{color:#7e8299!important}.btn.btn-icon.btn-circle{border-radius:50%}.btn.btn-light-success{color:#1bc5bd;background-color:#c9f7f5;border-color:transparent}.btn.btn-icon{display:inline-flex;align-items:center;justify-content:center;padding:0;height:calc(1.5em + 1.3rem + 2px);width:calc(1.5em + 1.3rem + 2px)}.btn{display:inline-block;font-weight:400;color:#3f4254;text-align:center;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:transparent;border:1px solid transparent;padding:.65rem 1rem;font-size:1rem;line-height:1.5;border-radius:.42rem;transition:color .3s ease-in-out,background-color .3s ease-in-out,border-color .3s ease-in-out,box-shadow .3s ease-in-out}.radio>input:checked~span{background-color:#1e4079}.radio>input:checked~span:after{background-color:#fff;border-color:#fff}.radio>input:checked~span:after{display:block}.radio>span:after{width:6px;height:6px}.radio>span:after{content:\"\";border-radius:100%!important}i{font-size:1.25rem;color:#b5b5c3}.dropzone{min-height:auto}.btn.btn-light-primary{background-color:#f9e2a7;border-color:transparent}.checkbox-lis .checkbox span{margin-right:.75rem}.checkbox>span{background-color:#ebedf3;border:1px solid transparent}.checkbox>span{height:18px;width:18px}.checkbox>span{background-color:none;display:flex;align-items:center;justify-content:center;flex-shrink:0;border-radius:.42rem}.checkbox>span:after{width:5px;height:10px}.checkbox>span:after{content:\"\";border-color:transparent;border-style:solid;border-width:0 2px 2px 0!important;transform:rotate(45deg);margin-top:-2px}.checkbox-list{display:flex;flex-direction:column}.checkbox>input{position:absolute;z-index:-1;opacity:0}.checkbox>input:checked~span{background-color:#1e4079}.checkbox>input:checked~span:after{border-color:#fff}.checkbox{display:flex;align-items:center;position:relative;text-align:left;cursor:pointer;font-size:1rem;transition:all .3s ease;margin:0}.add-plus{color:#fff!important}.border-dashed{padding:10px!important}.add-plus-black{color:#000!important}.plus-black .fa .fa-plus{color:#000!important;font-size:12px!important}.checkbox-list .checkbox{margin-bottom:1rem}.checkbox-list .checkbox span{margin-right:.75rem}.checkbox-list .checkbox:last-child{margin-bottom:0}.btn.btn-primary{color:#fff;background-color:#1e4079;border-color:#1e4079}.font-weight-bold{font-weight:500!important}button{font-family:inherit}.form-control1:focus{color:#3f4254!important;background-color:#fff!important;border-color:#69b3ff!important;outline:0!important}.table.table-head-bg thead th:first-child{border-radius:.42rem}.table.table-head-bg thead tr,.table.table-head-bg thead th{background-color:#f3f6f9;border-bottom:0;letter-spacing:1px}.table.table-head-custom thead tr,.table.table-head-custom thead th{font-weight:600;color:#b5b5c3!important;font-size:.9rem;text-transform:uppercase}.table thead th{font-weight:600;font-size:1rem;border-bottom-width:1px;padding-top:1rem;padding-bottom:1rem}.table th,.table td{padding:.75rem}.table.table-head-bg thead tr:last-child,.table.table-head-bg thead th:last-child{border-top-right-radius:.42rem;border-bottom-right-radius:.42rem}.table-responsive1{display:block;width:100%;overflow-x:auto}.text-white{color:#fff!important;font-size:15px!important}.details{border:2px solid #1e4079!important;border-radius:10px!important;max-width:13%}.text-primary{color:#1e4079!important}.text-link{color:#1a6888}@media (min-width: 300px) and (max-width: 750px){.item{font-size:10px!important}.item_price{font-size:9px!important}.details{border:2px solid #1e4079!important;border-radius:10px!important;max-width:23%}}@media (max-width: 450px){.item{font-size:10px!important}.item_price{font-size:9px!important}}@media (min-width: 600px) and (max-width: 992px){.items{font-size:18px!important}.item_prices{font-size:16px!important}}@media (max-width: 450px){.incre{border:2px solid blue!important;border-radius:100px!important;max-width:20.66667%!important}}.font-weight-bold{font-weight:700!important}@media (max-width: 750px){.incre{max-width:20.66667%!important}}.incre{border:2px solid blue!important;border-radius:100px!important;max-width:10.66667%}@media (max-width: 893px){.disp-none-small{display:none!important}}@media (min-width: 800px){.disp-none-large{display:none!important}}.fa-inr{font-size:15px!important;color:#1e4079!important}.text-primary{font-weight:700!important}.flaticon-upload:before{content:\"\\f11d\"}[class*=\" flaticon-\"]:before{font-family:Flaticon;font-style:normal;font-weight:400;font-feature-settings:normal;font-variant:normal;line-height:1;text-decoration:inherit;text-rendering:optimizeLegibility;text-transform:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-smoothing:antialiased}.dropzone{position:relative!important;display:inline-block!important;vertical-align:top!important;min-height:100px!important}.dz-image{border-radius:20px;overflow:hidden;width:120px;height:120px;position:relative;display:block;z-index:10}.dz-image{border:1px dashed #ccc}.dropzone .dz-preview .dz-success-mark,.dropzone .dz-preview .dz-error-mark{pointer-events:none;z-index:500;position:absolute;display:block;top:50%;left:50%;margin-left:-27px;margin-top:-27px}\n"], dependencies: [{ kind: "directive", type: i12.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i12.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i13.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: i13.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i13.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i13.MinLengthValidator, selector: "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", inputs: ["minlength"] }, { kind: "directive", type: i13.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i13.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i13.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i13.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: LoadingSpinnerComponent, selector: "app-common-innerloading-spinner", inputs: ["spinnerParams"] }, { kind: "component", type: i15.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i15.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i15.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: i16.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i17.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i18.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "pipe", type: i12.DatePipe, name: "date" }, { kind: "pipe", type: i12.KeyValuePipe, name: "keyvalue" }, { kind: "pipe", type: CapitalizeFirstPipe, name: "capitalizeFirst" }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }] });
|
|
3582
|
+
}
|
|
3583
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: QuestionnaireComponent, decorators: [{
|
|
3584
|
+
type: Component,
|
|
3585
|
+
args: [{ selector: 'app-questionnaire', template: "<section class=\"cons-inbox no-padding-small\" *ngIf=\"!showservice\">\r\n <div class=\"container consumer-dashhome no-padding no-padding-small\" *ngIf=\"!type && source!='proLead'\">\r\n <div class=\"card title-gb rounded-0\" *ngIf=\"uuid\">\r\n <h5 class=\"mgn-up-10 bold\">{{questionnaire_heading | capitalizeFirst}} <a class=\"pull-left mgn-rt-20 back-btn\"\r\n (click)=\"goBack()\"><i class=\"fa fa-arrow-left\"></i></a></h5>\r\n </div>\r\n </div>\r\n <app-common-innerloading-spinner *ngIf=\"loading\"></app-common-innerloading-spinner>\r\n <div class=\"d-flex flex-column-fluid pull-right mgn-rt-10 mgn-bt-20\"\r\n *ngIf=\"type !== 'qnrLinkProvider' && !buttonDisable && waitlistStatus\">\r\n <button class=\"normal-btn edit\" mat-flat-button (click)=\"editQnr()\">Edit</button>\r\n </div>\r\n <div class=\"d-flex flex-column-fluid width-100\" [class.qnrDisableState]=\"disableInput()\"\r\n [class.no-padding]=\"uuid && (source === 'consCheckin' || source === 'consAppt' || source === 'consOrder' || source === 'paper' || source === 'consDonationDetails' || source === 'ivr')\">\r\n <div class=\"col-xl-12 force_center\" [class.no-padding]=\"uuid\" [class.no-padding-small]=\"source && source=='ivr'\">\r\n <div class=\"\">\r\n <div class=\"qnrsec\" *ngFor=\"let qnr of groupedQnr | keyvalue: asIsOrder\"\r\n [class.section-shadow]=\"getSectionCount() > 1\" [class.no-padding-small]=\"source && source=='ivr'\">\r\n <!-- {{qnr | json}} -->\r\n <!-- <div class=\"qnr-section\" *ngIf=\"getSectionCount() > 1\">{{qnr.key}}</div> -->\r\n <div class=\"form-group card mgn-0\" *ngFor=\"let question of qnr.value\">\r\n <!-- <div class=\"qnr-section\" *ngIf=\"getSectionCount() > 1\">{{getQuestion(question).sectionName}}</div> -->\r\n <label class=\"col-12 quest\">{{getQuestion(question).label}}\r\n <i class=\"fa fa-plus-circle pull-right\" aria-hidden=\"true\"\r\n [class.addicon]=\"!buttonDisable && !disableInput()\"\r\n *ngIf=\"getQuestion(question).fieldDataType === 'dataGrid' && !showDataGrid[getQuestion(question).labelName]\"\r\n (click)=\"!buttonDisable && !disableInput() && showDataGridAddSection(getQuestion(question), true)\"></i>\r\n <div class=\"pro-only\" *ngIf=\"showProviderText(getQuestion(question))\">For Providers</div>\r\n <span class=\"red\" *ngIf=\"getQuestion(question).mandatory\">*</span>\r\n <div class=\"form-level-settings\" *ngIf=\"getQuestion(question).hint\"\r\n [innerHTML]=\"getQuestion(question).hint | safeHtml\">\r\n </div>\r\n </label>\r\n <!-- for file upload -->\r\n <div class=\"col-12\" *ngIf=\"getQuestion(question).fieldDataType === 'fileUpload'\">\r\n <mat-select multiple #deptsel [disabled]=\"buttonDisable || disableInput()\"\r\n *ngIf=\"getQuestion(question).filePropertie.maxNoOfFile > 1 && getQuestion(question).filePropertie.minNoOfFile !== getQuestion(question).filePropertie.maxNoOfFile\"\r\n [(ngModel)]=\"uploadFilesTemp[getQuestion(question).labelName]\" class=\"select-box\" placeholder=\"Select\">\r\n <mat-option *ngFor=\"let document of getQuestion(question).filePropertie.allowedDocuments\"\r\n [value]=\"document\" (click)=\"changeImageSelected(getQuestion(question), document)\">\r\n {{document}}</mat-option>\r\n </mat-select>\r\n <div class=\"col-lg-12 col-12 col-md-12 col-sm-12 no-padding mgn-up-20\"\r\n *ngIf=\"getDocuments(getQuestion(question)) && getDocuments(getQuestion(question)).length > 0\">\r\n <div class=\"dropzone dropzone-default dropzone-primary dz-clickable\"\r\n [class.single-file]=\"getQuestion(question).filePropertie.allowedDocuments.length==1\"\r\n style=\"cursor: auto;\">\r\n <ng-container *ngFor=\"let doc of getDocuments(getQuestion(question))\">\r\n <div class=\"dz-preview dz-processing dz-image-preview dz-error dz-complete\"\r\n *ngIf=\"getImg(getQuestion(question), doc)\">\r\n <div class=\"docname\" *ngIf=\"getQuestion(question).filePropertie.allowedDocuments.length > 1\">\r\n {{doc}}</div>\r\n <div class=\"dzimage pointer-cursor\" (click)=\"openAttachmentGallery(getQuestion(question), doc)\">\r\n <img alt=\"\" class=\"img_fit\" [src]=\"getImg(getQuestion(question), doc)\">\r\n </div>\r\n <input [disabled]=\"buttonDisable || disableInput()\" (blur)=\"onSubmit('inputChange');\"\r\n [(ngModel)]=\"comments[getQuestion(question).labelName + '=' + doc]\">\r\n <div class=\"gal_action\" *ngIf=\"!buttonDisable && !disableInput() && mode!=='read'\"\r\n (click)=\"changeImageSelected(getQuestion(question), doc)\">\r\n <i class=\"fa fa-times-circle\" aria-hidden=\"true\"></i>\r\n </div>\r\n </div>\r\n <div class=\"dz-preview dz-processing dz-image-preview dz-error dz-complete\"\r\n (click)=\"logofile1.click()\" *ngIf=\"!getImg(getQuestion(question), doc)\">\r\n <div class=\"docname\" *ngIf=\"getQuestion(question).filePropertie.allowedDocuments.length > 1\">\r\n {{doc}}</div>\r\n <div class=\"dz-image pointer-cursor\">\r\n </div>\r\n <input #logofile1 type=\"file\" accept=\"/*;capture=camera\" style=\"display:none;\"\r\n [disabled]=\"buttonDisable || disableInput()\"\r\n (change)=\"filesSelected($event, getQuestion(question), doc)\">\r\n <div class=\"dz-error-mark\">\r\n <a class=\"btn btn-icon btn-light-success btn-circle mr-2\"><i\r\n class=\"text-dark-50 flaticon-upload\"></i></a>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <div class=\"mt-2 text-danger\" *ngIf=\"apiError[getQuestion(question).labelName]\">\r\n {{apiError[getQuestion(question).labelName]}}</div>\r\n </div>\r\n <!-- for checkbox -->\r\n <div class=\"col-12\"\r\n *ngIf=\"getQuestion(question).fieldDataType === 'list' && getQuestion(question).listPropertie.maxAnswers > 1\">\r\n <div class=\"checkbox-list\">\r\n <label class=\"checkbox\" *ngFor=\"let value of getQuestion(question).labelValues\">\r\n <input type=\"checkbox\" [checked]=\"isChecked(value, getQuestion(question))\"\r\n (change)=\"listChange($event, value, getQuestion(question))\"\r\n [disabled]=\"buttonDisable || disableInput()\">\r\n <span></span>\r\n {{value}}\r\n </label>\r\n </div>\r\n <div class=\"mt-2 text-danger\" *ngIf=\"apiError[getQuestion(question).labelName]\">\r\n {{apiError[getQuestion(question).labelName]}}</div>\r\n </div>\r\n <!-- for radio -->\r\n <div class=\"col-12\"\r\n *ngIf=\"getQuestion(question).fieldDataType === 'list' && getQuestion(question).listPropertie.maxAnswers === 1\">\r\n <div class=\"radio-list\">\r\n <label class=\"radio\" *ngFor=\"let value of getQuestion(question).labelValues\">\r\n <input type=\"radio\" [disabled]=\"buttonDisable || disableInput()\"\r\n [checked]=\"isChecked(value, getQuestion(question))\"\r\n (change)=\"listChange($event, value, getQuestion(question))\">\r\n <span></span>\r\n {{value}}\r\n </label>\r\n </div>\r\n <div class=\"mt-2 text-danger\" *ngIf=\"apiError[getQuestion(question).labelName]\">\r\n {{apiError[getQuestion(question).labelName]}}</div>\r\n </div>\r\n <!-- for toggel boolean -->\r\n <div class=\"col-12\" *ngIf=\"getQuestion(question).fieldDataType === 'bool'\">\r\n <div class=\"radio-list\">\r\n <label class=\"radio\" *ngFor=\"let value of getQuestion(question).labelValues\">\r\n <input type=\"radio\" [disabled]=\"buttonDisable || disableInput()\"\r\n [checked]=\"isBooleanChecked(value, getQuestion(question))\"\r\n (change)=\"booleanChange($event, value, getQuestion(question))\">\r\n <span></span>\r\n {{value}}\r\n </label>\r\n </div>\r\n <div class=\"mt-2 text-danger\" *ngIf=\"apiError[getQuestion(question).labelName]\">\r\n {{apiError[getQuestion(question).labelName]}}</div>\r\n </div>\r\n <!-- for Text -->\r\n <div class=\"col-12\" *ngIf=\"getQuestion(question).fieldDataType === 'plainText'\">\r\n <input *ngIf=\"getQuestion(question).plainTextPropertie.maxNoOfLetter<=100\"\r\n [(ngModel)]=\"answers[getQuestion(question).labelName]\" (input)=\"onSubmit('inputChange');\" \r\n [minlength]=\"getQuestion(question).plainTextPropertie.minNoOfLetter\"\r\n [maxlength]=\"getQuestion(question).plainTextPropertie.maxNoOfLetter\"\r\n class=\"form-control1 form-control-solid\" type=\"text\" [disabled]=\"buttonDisable || disableInput()\">\r\n <!-- [disabled]=\"buttonDisable || disableInput()\" -->\r\n <textarea rows=\"3\" *ngIf=\"getQuestion(question).plainTextPropertie.maxNoOfLetter>100\"\r\n [(ngModel)]=\"answers[getQuestion(question).labelName]\" (input)=\"onSubmit('inputChange');\"\r\n [minlength]=\"getQuestion(question).plainTextPropertie.minNoOfLetter\"\r\n [maxlength]=\"getQuestion(question).plainTextPropertie.maxNoOfLetter\" [disabled]=\"buttonDisable || disableInput()\"\r\n class=\"form-control2 form-control-solid\"></textarea>\r\n <div class=\"mt-2 text-danger\" *ngIf=\"apiError[getQuestion(question).labelName]\">\r\n {{apiError[getQuestion(question).labelName]}}</div>\r\n </div>\r\n <!-- for Number -->\r\n <div class=\"col-12\" *ngIf=\"getQuestion(question).fieldDataType === 'number'\">\r\n <input [(ngModel)]=\"answers[getQuestion(question).labelName]\" (input)=\"onSubmit('inputChange');\"\r\n [min]=\"getQuestion(question).numberPropertie.start\" [max]=\"getQuestion(question).numberPropertie.end\"\r\n [disabled]=\"buttonDisable || disableInput()\" class=\"form-control1 form-control-solid\" type=\"number\"\r\n (keypress)=\"isNumeric($event)\">\r\n <div class=\"mt-2 text-danger\" *ngIf=\"apiError[getQuestion(question).labelName]\">\r\n {{apiError[getQuestion(question).labelName]}}</div>\r\n </div>\r\n <!-- for Date -->\r\n <div class=\"col-12 disp-flex\" *ngIf=\"getQuestion(question).fieldDataType === 'date'\">\r\n <input class=\"form-control1\" [matDatepicker]=\"picker\" [max]=\"getMaxdate(question)\"\r\n [min]=\"getMindate(question)\" [(ngModel)]=\"answers[getQuestion(question).labelName]\"\r\n (dateChange)=\"onSubmit('inputChange')\" [disabled]=\"buttonDisable || disableInput()\"\r\n (click)=\"picker.open()\">\r\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\r\n <mat-datepicker #picker [disabled]=\"buttonDisable || disableInput()\"></mat-datepicker>\r\n <div class=\"mt-2 text-danger\" *ngIf=\"apiError[getQuestion(question).labelName]\">\r\n {{apiError[getQuestion(question).labelName]}}</div>\r\n </div>\r\n <!-- for Datagrid -->\r\n <div class=\"table-responsive1\"\r\n *ngIf=\"getQuestion(question).fieldDataType === 'dataGrid' && dataGridColumnsAnswerList[getQuestion(question).labelName] && dataGridColumnsAnswerList[getQuestion(question).labelName].length > 0\">\r\n <table class=\"table table-head-custom table-head-bg table-borderless table-vertical-center\">\r\n <thead>\r\n <th *ngFor=\"let column of getQuestion(question).dataGridProperties.dataGridColumns\">\r\n {{column.columnId}}</th>\r\n <th *ngIf=\"!buttonDisable && !disableInput() && !showDataGrid[getQuestion(question).labelName]\">\r\n </th>\r\n <th *ngIf=\"!buttonDisable && !disableInput() && !showDataGrid[getQuestion(question).labelName]\">\r\n </th>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor=\"let column of dataGridColumnsAnswerList[getQuestion(question).labelName];let i =index\">\r\n <td *ngFor=\"let data of column | keyvalue\">\r\n <div\r\n *ngIf=\"getColumnType(getQuestion(question).dataGridProperties.dataGridColumns, data.key) === 'date'\">\r\n {{data.value | date : newTimeDateFormat}}\r\n </div>\r\n <div\r\n *ngIf=\"getColumnType(getQuestion(question).dataGridProperties.dataGridColumns, data.key) === 'bool'\">\r\n {{getBoolValue(data.value)}}\r\n </div>\r\n <div\r\n *ngIf=\"getColumnType(getQuestion(question).dataGridProperties.dataGridColumns, data.key) !== 'date' && getColumnType(getQuestion(question).dataGridProperties.dataGridColumns, data.key) !== 'bool'\">\r\n {{data.value}}\r\n </div>\r\n </td>\r\n <td *ngIf=\"!buttonDisable && !disableInput() && !showDataGrid[getQuestion(question).labelName]\">\r\n <i class=\"fa fa-pen\" (click)=\"editDataGrid(getQuestion(question), column)\"></i>\r\n </td>\r\n <td *ngIf=\"!buttonDisable && !disableInput() && !showDataGrid[getQuestion(question).labelName]\">\r\n <i class=\"fa fa-trash\" (click)=\"deleteDataGrid(getQuestion(question), column)\"></i>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </div>\r\n <div class=\"gridSection\" *ngIf=\"showDataGrid[getQuestion(question).labelName]\">\r\n <div class=\"gridColumn\" *ngFor=\"let column of getQuestion(question).dataGridProperties.dataGridColumns\">\r\n <label>{{column.label}}\r\n <span class=\"red\" *ngIf=\"column.mandatory\">*</span>\r\n </label>\r\n <!-- for checkbox -->\r\n <div class=\"col-12\" *ngIf=\"column.dataType === 'list'\">\r\n <div class=\"checkbox-list\">\r\n <label class=\"checkbox\" *ngFor=\"let value of column.listPropertie.values\">\r\n <input type=\"checkbox\" [checked]=\"isChecked(value, getQuestion(question), column)\"\r\n (change)=\"listChange($event, value, getQuestion(question), column)\"\r\n [disabled]=\"buttonDisable || disableInput()\">\r\n <span></span>\r\n {{value}}\r\n </label>\r\n </div>\r\n </div>\r\n <!-- for toggel boolean -->\r\n <div class=\"col-12\" *ngIf=\"column.dataType === 'bool'\">\r\n <div class=\"radio-list\">\r\n <label class=\"radio\">\r\n <input type=\"radio\" [disabled]=\"buttonDisable || disableInput()\"\r\n [checked]=\"isBooleanChecked('yes', getQuestion(question), column)\"\r\n (change)=\"booleanChange($event, 'yes', getQuestion(question), column)\">\r\n <span></span>\r\n Yes\r\n </label>\r\n <label class=\"radio\">\r\n <input type=\"radio\" [disabled]=\"buttonDisable || disableInput()\"\r\n [checked]=\"isBooleanChecked('no', getQuestion(question), column)\"\r\n (change)=\"booleanChange($event, 'no', getQuestion(question), column)\">\r\n <span></span>\r\n No\r\n </label>\r\n </div>\r\n </div>\r\n <!-- for Text -->\r\n <div class=\"col-12\" *ngIf=\"column.dataType === 'plainText'\">\r\n <input [(ngModel)]=\"dataGridColumns[getQuestion(question).labelName + '=' + column.order]\"\r\n [disabled]=\"buttonDisable || disableInput()\" class=\"form-control1 form-control-solid\" type=\"text\">\r\n </div>\r\n <!-- for Number -->\r\n <div class=\"col-12\" *ngIf=\"column.dataType === 'number'\">\r\n <input [(ngModel)]=\"dataGridColumns[getQuestion(question).labelName + '=' + column.order]\"\r\n [disabled]=\"buttonDisable || disableInput()\" [min]=\"column.numberPropertie.start\"\r\n [max]=\"column.numberPropertie.end\" class=\"form-control1 form-control-solid\" type=\"number\">\r\n </div>\r\n <!-- for Date -->\r\n <div class=\"col-12 disp-flex\" *ngIf=\"column.dataType === 'date'\">\r\n <input class=\"form-control1\" [matDatepicker]=\"picker\" [max]=\"getMaxdate(question)\"\r\n [min]=\"getMindate(question)\"\r\n [(ngModel)]=\"dataGridColumns[getQuestion(question).labelName + '=' + column.order]\"\r\n [disabled]=\"buttonDisable || disableInput()\" (click)=\"picker.open()\">\r\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\r\n <mat-datepicker #picker [disabled]=\"buttonDisable || disableInput()\">\r\n </mat-datepicker>\r\n </div>\r\n </div>\r\n <div class=\"act-btns\">\r\n <button type=\"button\" class=\"btn btn-light-primary font-weight-bold\"\r\n (click)=\"cancelAddorUpdate(getQuestion(question))\">\r\n Cancel\r\n </button>\r\n <button type=\"button\" class=\"btn btn-primary font-weight-bold\"\r\n (click)=\"saveDataGridColumn(getQuestion(question))\">Add</button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-md-12 col-12 col-sm-12 col-lg-12 no-padding submit-pad\"\r\n *ngIf=\"type !== 'qnrLinkProvider' && source!=='proLead' && (uuid || source === 'customer-details' || source === 'proDonation') && !disableInput()\">\r\n <button class=\"normal-btn\" mat-flat-button [class.spinner]=\"buttonDisable\"\r\n [class.spinner-darker-success]=\"buttonDisable\" [class.spinner-center]=\"buttonDisable\"\r\n (click)=\"!buttonDisable && onSubmit('submit')\" [disabled]=\"buttonDisable\"\r\n [class.disabled]=\"buttonDisable\">{{(type == 'qnr-link') ? 'Submit' : 'Update'}}</button>\r\n </div>\r\n </div>\r\n </div>\r\n</section>\r\n<ks-modal-gallery [id]=\"0\" *ngIf=\"image_list_popup && image_list_popup.length>0\" [modalImages]=\"image_list_popup\"\r\n [plainGalleryConfig]=\"customPlainGalleryRowConfig\" [buttonsConfig]=\"customButtonsFontAwesomeConfig\"\r\n (buttonBeforeHook)=\"onButtonBeforeHook($event)\"></ks-modal-gallery>\r\n<section class=\"cons-inbox no-padding-small\" *ngIf=\"showservice\">\r\n <div class=\"container consumer-dashhome no-padding no-padding-small\" *ngIf=\"!type\">\r\n <div class=\"card title-gb rounded-0\" *ngIf=\"uuid\">\r\n <h5 class=\"mgn-up-10 bold\">{{questionnaire_heading | capitalizeFirst}} <a class=\"pull-left mgn-rt-20 back-btn\"\r\n (click)=\"goBack()\"><i class=\"fa fa-arrow-left\"></i></a></h5>\r\n </div>\r\n </div>\r\n <app-common-innerloading-spinner *ngIf=\"loading\"></app-common-innerloading-spinner>\r\n <div class=\"d-flex flex-column-fluid pull-right mgn-rt-10 mgn-bt-20\"\r\n *ngIf=\"type !== 'qnrLinkProvider' && !buttonDisable && waitlistStatus\">\r\n <button class=\"normal-btn edit\" mat-flat-button (click)=\"editQnr()\">Edit</button>\r\n </div>\r\n <div class=\"d-flex flex-column-fluid width-100\" [class.qnrDisableState]=\"disableInput()\"\r\n [class.no-padding]=\"uuid && (source === 'consCheckin' || source === 'consAppt' || source === 'consDonationDetails' )\">\r\n <div class=\"col-xl-12 force_center no-padding\" [class.no-padding]=\"uuid\"\r\n [class.no-padding-small]=\"source && source=='ivr'\">\r\n <div class=\"\">\r\n <div class=\"\" *ngFor=\"let qnr of groupedQnr | keyvalue\" [class.section-shadow]=\"getSectionCount() > 1\">\r\n <!-- <div class=\"qnr-section\" *ngIf=\"getSectionCount() > 1\">{{qnr.key}}</div> -->\r\n <div *ngIf=\"itemArray.length == 0 \">\r\n <div class=\"form-group mgn-0 border-dashed text-center\" *ngFor=\"let question of qnr.value\">\r\n <div class=\"qnr-section\" *ngIf=\"getSectionCount() > 1\">\r\n {{getQuestion(question).question.sectionName}}</div>\r\n <label class=\"col-12 quest pointer-cursor\"\r\n (click)=\"showDataGridAddSectionn(getQuestion(question).question, true)\">\r\n <!-- {{getQuestion(question).question.label}} -->\r\n <!-- <div class=\"pull-right btn btn-primary font-weight-bold\"\r\n (click)=\"showDataGridAddSectionn(getQuestion(question).question, true)\"><i\r\n class=\"fa fa-plus add-plus\"></i>Add Item\r\n </div> -->\r\n <div>\r\n <img src=\"./assets/images/service-options.svg\" alt=\"Service Options\" class=\"img-fluid pb-0\"\r\n width=\"300\" height=\"300\">\r\n </div>\r\n <div class=\"pro-only\" *ngIf=\"showProviderText(getQuestion(question).question)\">For Providers</div>\r\n <span class=\"red\" *ngIf=\"getQuestion(question).question.mandatory\">*</span>\r\n <!-- <div class=\"form-level-settings\" *ngIf=\"getQuestion(question).question.hint\">\r\n {{getQuestion(question).question.hint}}\r\n </div> -->\r\n <div>\r\n <span class=\"text-primary font-weight-bold\">Please Choose your Pet</span>\r\n </div>\r\n <div class=\"mt-3\">\r\n <span class=\"btn btn-light font-weight-bold\">Continue</span>\r\n </div>\r\n </label>\r\n </div>\r\n </div>\r\n\r\n\r\n\r\n </div>\r\n <!-- {{itemArray | json}} -->\r\n <div class=\"col-md-12 col-12 col-sm-12 mgn-bt-12 no-padding\" *ngIf=\"showItem\">\r\n\r\n\r\n <div>\r\n <div class=\"card-border\" *ngFor=\" let items of itemArray\">\r\n\r\n <div class=\"d-flex justify-content-between\">\r\n <div>\r\n <div class=\"text-capitalize\">\r\n <div class=\"\">\r\n <span class=\"text-primary\">\r\n {{items.item}}<br>\r\n </span>\r\n <!-- <span class=\"disp-none-small\"> - </span>\r\n <span class=\"disp-none-large\"><br></span> -->\r\n\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"d-flex border-apply px-0\">\r\n <div (click)=\"decrement(items);\" class=\"pointer-cursor quantity quantity-1\">\r\n <span class=\"p-10\">-</span>\r\n </div>\r\n <div class=\"mx-2 pointer-cursor\"><span class=\"quantity\"\r\n *ngIf=\"items && items.columnItem && items.columnItem[0] && items.columnItem[0].answer && items.columnItem[0].answer.dataGridList && items.columnItem[0].answer.dataGridList[0] && items.columnItem[0].answer.dataGridList[0].dataGridListColumn && items.columnItem[0].answer.dataGridList[0].dataGridListColumn[0] && items.columnItem[0].answer.dataGridList[0].dataGridListColumn[0].quantity\">\r\n {{items.columnItem[0].answer.dataGridList[0].dataGridListColumn[0].quantity}}</span>\r\n </div>\r\n <div (click)=\"increment(items);\" class=\"pointer-cursor quantity quantity-1\">\r\n <span class=\"p-10\">+</span>\r\n </div>\r\n </div>\r\n </div>\r\n <div>\r\n <span class=\"text-primary\"><span><i class=\"fa fa-inr\"></i>\r\n {{items.price * getItemQuantity(items)}}/-\r\n </span>\r\n </span>\r\n </div>\r\n <!-- <div (click)=\"qnrPopup(items, 'edit');\">\r\n <span class=\"text-link font-weight-bold\"><span>\r\n Edit*\r\n </span>\r\n </span>\r\n </div> -->\r\n </div>\r\n\r\n <div class=\"clearfix\"></div>\r\n <div *ngIf=\"showItem &&itemArray.length > 0\">\r\n <div *ngFor=\"let qnr of groupedQnr | keyvalue\" [class.section-shadow]=\"getSectionCount() > 1\">\r\n <div *ngFor=\"let question of qnr.value\">\r\n <label class=\"col-12 quest pointer-cursor\"\r\n (click)=\"showDataGridAddSectionn(getQuestion(question).question, true)\">\r\n <span class=\"btn btn-light font-weight-bold\"><i class=\"fa fa-plus text-white\"></i>Add</span>\r\n </label>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n</section>\r\n\r\n<!-- <ks-modal-gallery [id]=\"0\" *ngIf=\"image_list_popup && image_list_popup.length>0\" [modalImages]=\"image_list_popup\"\r\n [plainGalleryConfig]=\"customPlainGalleryRowConfig\" [buttonsConfig]=\"customButtonsFontAwesomeConfig\"\r\n (buttonBeforeHook)=\"onButtonBeforeHook($event)\"></ks-modal-gallery> -->", styles: [".dropzone{min-height:auto!important}.question-box{margin-top:10px}.btn-light{background-color:#1e4079!important;padding:5px 25px!important;color:#fff!important}.quest-outer{padding:10px}.error-msg{color:red}.upload-btn{background:#fff;border:1px solid;font-size:small}.card-border{box-shadow:0 0 5px 5px #f0f0f0!important;padding:10px 30px!important;margin:20px 10px!important;cursor:pointer!important;border-radius:10px!important}.border-apply{border:2px solid #1e4079!important;border-radius:20px!important}.quantity{font-size:20px!important;font-weight:700!important}.quantity-1:hover{background-color:#1e4079!important;color:#fff!important;font-weight:700!important;border-radius:50%!important;padding:-2px 12px!important}::ng-deep .mat-checkbox-layout{font-weight:400!important}.force_center{margin-left:auto;margin-right:auto}.input-group-text{display:-webkit-box;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:.65rem 1rem;margin-bottom:0;font-size:1rem;font-weight:400;line-height:1.5;color:#3f4254;text-align:center;white-space:nowrap;background-color:#f3f6f9!important;border:1px solid #E4E6EF!important;border-radius:.42rem;border-top-left-radius:0;border-bottom-left-radius:0;cursor:pointer}.w_100{width:100%}.img_fit{width:120px;height:120px}.dropzone .dropzone-default{border:1px dashed #EBEDF3!important}.select-box{padding:10px!important;border:1px solid #E4E6EF!important;border-radius:.42rem!important}.normal-btn{padding:5px 20px;border:none!important}.edit{padding:3px 25px;border-radius:20px!important}.mgn-0{margin-left:0!important;margin-right:0!important;margin-bottom:10px!important}.quest{font-size:1.1rem!important}.mt-3 a:hover{text-decoration:underline!important}.dzimage,.dz-image{border:1px dashed #ccc}.gal_action{position:absolute;top:20px;right:-10px;background:#00000080;width:20px;height:20px;text-align:center;border-radius:50%;cursor:pointer}.single-file{padding:0!important;text-align:initial!important;border:none!important}.single-file .dz-preview{position:relative!important;display:inline-block!important;vertical-align:top!important;margin:16px!important;min-height:100px!important}.single-file .gal_action{top:-5px!important}.pro-only{float:right;color:red;font-size:.8rem}.qnrDisableState .card,.qnrDisableState .dropzone-default,.qnrDisableState .dz-image-preview{background:#eeeeee9e!important}.qnr-section{font-weight:700;padding-bottom:10px;text-transform:uppercase}.section-shadow{margin:20px 10px;padding:20px!important;box-shadow:0 0 10px #0000001f!important}.gridSection .gridColumn{padding:15px}.gridSection .gridColumn label{padding:0 12.5px!important;font-weight:400!important;color:#3f4254!important;font-size:.9rem!important}.gridSection .act-btns .btn{padding:5px 10px!important;margin:5px!important}.gridSection .act-btns{padding:0 20px}.fa-plus-circle{font-size:1.5rem!important}.addicon{color:#1e4079!important;cursor:pointer}.fa-trash,.fa-pen{color:#000!important;font-size:1rem!important}.dz-preview input{width:121px!important;border:1px solid #ccc}.submit-pad{padding:0 10px 20px!important}.form-group.card{border:1px solid #dadce063!important;border-radius:8px!important;padding:5px!important}.docname{width:120px;margin-bottom:5px;text-overflow:ellipsis!important;overflow:hidden!important;white-space:nowrap!important}@media (max-width: 750px){.normal-btn{padding:3px 10px;border:none!important}.edit{padding:2px 12px;border-radius:10px!important}}.col-xl-12,.col-12,.col-sm-12,.col-md-12,.col-lg-12{position:relative;width:100%;padding-right:12.5px;padding-left:12.5px}@media (min-width: 1200px){.col-xl-12{flex:0 0 100%;max-width:100%}}.qnrsec{padding:10px}.p-10{padding:8px!important}.form-control1{display:block!important;width:100%!important;height:calc(1.5em + 1.3rem + 2px)!important;padding:.65rem 1rem!important;font-size:1rem!important;font-weight:400!important;line-height:1.5!important;color:#3f4254!important;background-color:#fff!important;background-clip:padding-box!important;border:1px solid #E4E6EF!important;border-radius:.42rem!important;box-shadow:none!important;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out!important}.form-control2{display:block!important;width:100%!important;padding:.65rem 1rem!important;font-size:1rem!important;font-weight:400!important;line-height:1.5!important;color:#3f4254!important;background-color:#fff!important;background-clip:padding-box!important;border:1px solid #E4E6EF!important;border-radius:.42rem!important;box-shadow:none!important;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out!important}.form-group label{font-size:1rem;font-weight:400;color:#3f4254}label{display:inline-block;margin-bottom:.5rem}.col-12{flex:0 0 100%;max-width:100%}.radio-list .radio span{margin-right:.75rem}.radio>span{background-color:#ebedf3;border:1px solid transparent}.radio>span{height:18px;width:18px}.radio>span{border-radius:50%;background-color:none;display:flex;align-items:center;justify-content:center;flex-shrink:0}.radio-list .radio{margin-bottom:1rem}.radio{display:flex;align-items:center;position:relative;text-align:left;cursor:pointer;font-size:1rem;transition:all .3s ease;margin:0}.radio>input{position:absolute;z-index:-1;opacity:0}.card{position:relative;display:flex;flex-direction:column;min-width:0;word-wrap:break-word;background-color:#fff;background-clip:border-box;border:1px solid #EBEDF3;border-radius:.42rem}.radio-list .radio:last-child{margin-bottom:0}@media (min-width: 992px){.col-lg-12{flex:0 0 100%;max-width:100%}}.dropzone.dropzone-default .dz-preview .dz-image{border-radius:.42rem}.btn.btn-icon i{padding:0;margin:0}.btn i{font-size:1.3rem;padding-right:.35rem;vertical-align:middle;line-height:1;display:inline-flex}.btn i{transition:color .15s ease,background-color .15s ease,border-color .15s ease,box-shadow .15s ease}.text-dark-50{color:#7e8299!important}.btn.btn-icon.btn-circle{border-radius:50%}.btn.btn-light-success{color:#1bc5bd;background-color:#c9f7f5;border-color:transparent}.btn.btn-icon{display:inline-flex;align-items:center;justify-content:center;padding:0;height:calc(1.5em + 1.3rem + 2px);width:calc(1.5em + 1.3rem + 2px)}.btn{display:inline-block;font-weight:400;color:#3f4254;text-align:center;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:transparent;border:1px solid transparent;padding:.65rem 1rem;font-size:1rem;line-height:1.5;border-radius:.42rem;transition:color .3s ease-in-out,background-color .3s ease-in-out,border-color .3s ease-in-out,box-shadow .3s ease-in-out}.radio>input:checked~span{background-color:#1e4079}.radio>input:checked~span:after{background-color:#fff;border-color:#fff}.radio>input:checked~span:after{display:block}.radio>span:after{width:6px;height:6px}.radio>span:after{content:\"\";border-radius:100%!important}i{font-size:1.25rem;color:#b5b5c3}.dropzone{min-height:auto}.btn.btn-light-primary{background-color:#f9e2a7;border-color:transparent}.checkbox-lis .checkbox span{margin-right:.75rem}.checkbox>span{background-color:#ebedf3;border:1px solid transparent}.checkbox>span{height:18px;width:18px}.checkbox>span{background-color:none;display:flex;align-items:center;justify-content:center;flex-shrink:0;border-radius:.42rem}.checkbox>span:after{width:5px;height:10px}.checkbox>span:after{content:\"\";border-color:transparent;border-style:solid;border-width:0 2px 2px 0!important;transform:rotate(45deg);margin-top:-2px}.checkbox-list{display:flex;flex-direction:column}.checkbox>input{position:absolute;z-index:-1;opacity:0}.checkbox>input:checked~span{background-color:#1e4079}.checkbox>input:checked~span:after{border-color:#fff}.checkbox{display:flex;align-items:center;position:relative;text-align:left;cursor:pointer;font-size:1rem;transition:all .3s ease;margin:0}.add-plus{color:#fff!important}.border-dashed{padding:10px!important}.add-plus-black{color:#000!important}.plus-black .fa .fa-plus{color:#000!important;font-size:12px!important}.checkbox-list .checkbox{margin-bottom:1rem}.checkbox-list .checkbox span{margin-right:.75rem}.checkbox-list .checkbox:last-child{margin-bottom:0}.btn.btn-primary{color:#fff;background-color:#1e4079;border-color:#1e4079}.font-weight-bold{font-weight:500!important}button{font-family:inherit}.form-control1:focus{color:#3f4254!important;background-color:#fff!important;border-color:#69b3ff!important;outline:0!important}.table.table-head-bg thead th:first-child{border-radius:.42rem}.table.table-head-bg thead tr,.table.table-head-bg thead th{background-color:#f3f6f9;border-bottom:0;letter-spacing:1px}.table.table-head-custom thead tr,.table.table-head-custom thead th{font-weight:600;color:#b5b5c3!important;font-size:.9rem;text-transform:uppercase}.table thead th{font-weight:600;font-size:1rem;border-bottom-width:1px;padding-top:1rem;padding-bottom:1rem}.table th,.table td{padding:.75rem}.table.table-head-bg thead tr:last-child,.table.table-head-bg thead th:last-child{border-top-right-radius:.42rem;border-bottom-right-radius:.42rem}.table-responsive1{display:block;width:100%;overflow-x:auto}.text-white{color:#fff!important;font-size:15px!important}.details{border:2px solid #1e4079!important;border-radius:10px!important;max-width:13%}.text-primary{color:#1e4079!important}.text-link{color:#1a6888}@media (min-width: 300px) and (max-width: 750px){.item{font-size:10px!important}.item_price{font-size:9px!important}.details{border:2px solid #1e4079!important;border-radius:10px!important;max-width:23%}}@media (max-width: 450px){.item{font-size:10px!important}.item_price{font-size:9px!important}}@media (min-width: 600px) and (max-width: 992px){.items{font-size:18px!important}.item_prices{font-size:16px!important}}@media (max-width: 450px){.incre{border:2px solid blue!important;border-radius:100px!important;max-width:20.66667%!important}}.font-weight-bold{font-weight:700!important}@media (max-width: 750px){.incre{max-width:20.66667%!important}}.incre{border:2px solid blue!important;border-radius:100px!important;max-width:10.66667%}@media (max-width: 893px){.disp-none-small{display:none!important}}@media (min-width: 800px){.disp-none-large{display:none!important}}.fa-inr{font-size:15px!important;color:#1e4079!important}.text-primary{font-weight:700!important}.flaticon-upload:before{content:\"\\f11d\"}[class*=\" flaticon-\"]:before{font-family:Flaticon;font-style:normal;font-weight:400;font-feature-settings:normal;font-variant:normal;line-height:1;text-decoration:inherit;text-rendering:optimizeLegibility;text-transform:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-smoothing:antialiased}.dropzone{position:relative!important;display:inline-block!important;vertical-align:top!important;min-height:100px!important}.dz-image{border-radius:20px;overflow:hidden;width:120px;height:120px;position:relative;display:block;z-index:10}.dz-image{border:1px dashed #ccc}.dropzone .dz-preview .dz-success-mark,.dropzone .dz-preview .dz-error-mark{pointer-events:none;z-index:500;position:absolute;display:block;top:50%;left:50%;margin-left:-27px;margin-top:-27px}\n"] }]
|
|
3586
|
+
}], ctorParameters: () => [{ type: i1$6.ActivatedRoute }, { type: WordProcessor }, { type: LocalStorageService }, { type: DateTimeProcessor }, { type: i1$5.MatDialog }, { type: FileService }, { type: CommonService }, { type: QuestionaireService }, { type: ErrorMessagingService }, { type: ToastService }, { type: i11.ModalGalleryService }, { type: i12.Location }], propDecorators: { questionnaireList: [{
|
|
3587
|
+
type: Input
|
|
3588
|
+
}], source: [{
|
|
3589
|
+
type: Input
|
|
3590
|
+
}], accountId: [{
|
|
3591
|
+
type: Input
|
|
3592
|
+
}], questionAnswers: [{
|
|
3593
|
+
type: Input
|
|
3594
|
+
}], customerDetails: [{
|
|
3595
|
+
type: Input
|
|
3596
|
+
}], uuid: [{
|
|
3597
|
+
type: Input
|
|
3598
|
+
}], type: [{
|
|
3599
|
+
type: Input
|
|
3600
|
+
}], waitlistStatus: [{
|
|
3601
|
+
type: Input
|
|
3602
|
+
}], orderStatus: [{
|
|
3603
|
+
type: Input
|
|
3604
|
+
}], donationDetails: [{
|
|
3605
|
+
type: Input
|
|
3606
|
+
}], service: [{
|
|
3607
|
+
type: Input
|
|
3608
|
+
}], mode: [{
|
|
3609
|
+
type: Input
|
|
3610
|
+
}], fileChanged: [{
|
|
3611
|
+
type: Output
|
|
3612
|
+
}], returnAnswers: [{
|
|
3613
|
+
type: Output
|
|
3614
|
+
}], tempType: [{
|
|
3615
|
+
type: Input
|
|
3616
|
+
}], bookingType: [{
|
|
3617
|
+
type: Input
|
|
3618
|
+
}], file2: [{
|
|
3619
|
+
type: ViewChild,
|
|
3620
|
+
args: ['logofile1']
|
|
3621
|
+
}] } });
|
|
3622
|
+
|
|
3623
|
+
class CapitalizeFirstPipeModule {
|
|
3624
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: CapitalizeFirstPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3625
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.9", ngImport: i0, type: CapitalizeFirstPipeModule, declarations: [CapitalizeFirstPipe], imports: [CommonModule], exports: [CapitalizeFirstPipe] });
|
|
3626
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: CapitalizeFirstPipeModule, imports: [CommonModule] });
|
|
3627
|
+
}
|
|
3628
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: CapitalizeFirstPipeModule, decorators: [{
|
|
3629
|
+
type: NgModule,
|
|
3630
|
+
args: [{
|
|
3631
|
+
imports: [
|
|
3632
|
+
CommonModule
|
|
3633
|
+
],
|
|
3634
|
+
declarations: [CapitalizeFirstPipe],
|
|
3635
|
+
exports: [CapitalizeFirstPipe]
|
|
3636
|
+
}]
|
|
3637
|
+
}] });
|
|
3638
|
+
|
|
3639
|
+
class SafeHtmlModule {
|
|
3640
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: SafeHtmlModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3641
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.9", ngImport: i0, type: SafeHtmlModule, declarations: [SafeHtmlPipe], imports: [CommonModule], exports: [SafeHtmlPipe] });
|
|
3642
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: SafeHtmlModule, imports: [CommonModule] });
|
|
3643
|
+
}
|
|
3644
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: SafeHtmlModule, decorators: [{
|
|
3645
|
+
type: NgModule,
|
|
3646
|
+
args: [{
|
|
3647
|
+
imports: [
|
|
3648
|
+
CommonModule
|
|
3649
|
+
],
|
|
3650
|
+
declarations: [SafeHtmlPipe],
|
|
3651
|
+
exports: [SafeHtmlPipe]
|
|
3652
|
+
}]
|
|
3653
|
+
}] });
|
|
3654
|
+
|
|
3655
|
+
class QuestionnaireModule {
|
|
3656
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: QuestionnaireModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3657
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.9", ngImport: i0, type: QuestionnaireModule, declarations: [QuestionnaireComponent], imports: [CommonModule,
|
|
3658
|
+
FormsModule,
|
|
3659
|
+
ReactiveFormsModule,
|
|
3660
|
+
LoadingSpinnerModule,
|
|
3661
|
+
CapitalizeFirstPipeModule,
|
|
3662
|
+
GalleryModule,
|
|
3663
|
+
MatDatepickerModule,
|
|
3664
|
+
MatCheckboxModule,
|
|
3665
|
+
MatSlideToggleModule,
|
|
3666
|
+
MatOptionModule,
|
|
3667
|
+
MatSelectModule,
|
|
3668
|
+
SafeHtmlModule,
|
|
3669
|
+
// SharedModule,
|
|
3670
|
+
MatIconModule], exports: [QuestionnaireComponent] });
|
|
3671
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: QuestionnaireModule, imports: [CommonModule,
|
|
3672
|
+
FormsModule,
|
|
3673
|
+
ReactiveFormsModule,
|
|
3674
|
+
LoadingSpinnerModule,
|
|
3675
|
+
CapitalizeFirstPipeModule,
|
|
3676
|
+
GalleryModule,
|
|
3677
|
+
MatDatepickerModule,
|
|
3678
|
+
MatCheckboxModule,
|
|
3679
|
+
MatSlideToggleModule,
|
|
3680
|
+
MatOptionModule,
|
|
3681
|
+
MatSelectModule,
|
|
3682
|
+
SafeHtmlModule,
|
|
3683
|
+
// SharedModule,
|
|
3684
|
+
MatIconModule] });
|
|
3685
|
+
}
|
|
3686
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: QuestionnaireModule, decorators: [{
|
|
3687
|
+
type: NgModule,
|
|
3688
|
+
args: [{
|
|
3689
|
+
declarations: [
|
|
3690
|
+
QuestionnaireComponent
|
|
3691
|
+
],
|
|
3692
|
+
imports: [
|
|
3693
|
+
CommonModule,
|
|
3694
|
+
FormsModule,
|
|
3695
|
+
ReactiveFormsModule,
|
|
3696
|
+
LoadingSpinnerModule,
|
|
3697
|
+
CapitalizeFirstPipeModule,
|
|
3698
|
+
GalleryModule,
|
|
3699
|
+
MatDatepickerModule,
|
|
3700
|
+
MatCheckboxModule,
|
|
3701
|
+
MatSlideToggleModule,
|
|
3702
|
+
MatOptionModule,
|
|
3703
|
+
MatSelectModule,
|
|
3704
|
+
SafeHtmlModule,
|
|
3705
|
+
// SharedModule,
|
|
3706
|
+
MatIconModule
|
|
3707
|
+
],
|
|
3708
|
+
providers: [],
|
|
3709
|
+
schemas: [
|
|
3710
|
+
NO_ERRORS_SCHEMA,
|
|
3711
|
+
CUSTOM_ELEMENTS_SCHEMA
|
|
3712
|
+
],
|
|
3713
|
+
exports: [QuestionnaireComponent]
|
|
3714
|
+
}]
|
|
3715
|
+
}] });
|
|
3716
|
+
|
|
3717
|
+
class ShowuploadfileModule {
|
|
3718
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: ShowuploadfileModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3719
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.9", ngImport: i0, type: ShowuploadfileModule, declarations: [ShowuploadfileComponent], imports: [CommonModule,
|
|
3720
|
+
MatDialogModule], exports: [ShowuploadfileComponent] });
|
|
3721
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: ShowuploadfileModule, imports: [CommonModule,
|
|
3722
|
+
MatDialogModule] });
|
|
3723
|
+
}
|
|
3724
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: ShowuploadfileModule, decorators: [{
|
|
3725
|
+
type: NgModule,
|
|
3726
|
+
args: [{
|
|
3727
|
+
imports: [
|
|
3728
|
+
CommonModule,
|
|
3729
|
+
MatDialogModule
|
|
3730
|
+
],
|
|
3731
|
+
exports: [
|
|
3732
|
+
ShowuploadfileComponent
|
|
3733
|
+
],
|
|
3734
|
+
declarations: [
|
|
3735
|
+
ShowuploadfileComponent
|
|
3736
|
+
]
|
|
3737
|
+
}]
|
|
3738
|
+
}] });
|
|
3739
|
+
|
|
3740
|
+
class PhoneInputComponent {
|
|
3741
|
+
initialCountry = 'us'; // Default to 'us'
|
|
3742
|
+
preferredCountries = []; // List of preferred countries
|
|
3743
|
+
nationalMode = true; // Use national mode so dial code is hidden in input box
|
|
3744
|
+
separateDialCode = true; // Whether to separate dial code (controls formatting)
|
|
3745
|
+
otherOptions = {}; // Any other options for intl-tel-input
|
|
3746
|
+
phoneInput;
|
|
3747
|
+
phoneNumber = { dialCode: '', countryCode: '', e164Number: '', number: '' }; // Structured phone number object
|
|
3748
|
+
phoneInputInstance;
|
|
3749
|
+
// Output Event to send the phone number value to the parent component
|
|
3750
|
+
phoneNumberChange = new EventEmitter();
|
|
3751
|
+
// Function to handle form control value changes
|
|
3752
|
+
onChange = (value) => { };
|
|
3753
|
+
onTouched = () => { };
|
|
3754
|
+
ngAfterViewInit() {
|
|
3755
|
+
if (this.phoneInput && this.phoneInput.nativeElement) {
|
|
3756
|
+
this.initializePhoneInput();
|
|
3757
|
+
}
|
|
3758
|
+
}
|
|
3759
|
+
// Initialize intl-tel-input for the phone input field
|
|
3760
|
+
initializePhoneInput() {
|
|
3761
|
+
const options = {
|
|
3762
|
+
initialCountry: this.initialCountry,
|
|
3763
|
+
preferredCountries: this.preferredCountries,
|
|
3764
|
+
nationalMode: this.nationalMode, // Use national mode to hide dial code
|
|
3765
|
+
separateDialCode: this.separateDialCode, // Keep separate dial code for processing
|
|
3766
|
+
utilsScript: 'https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.8/js/utils.js',
|
|
3767
|
+
...this.otherOptions // Merge any additional options provided
|
|
3768
|
+
};
|
|
3769
|
+
// Initialize intl-tel-input
|
|
3770
|
+
this.phoneInputInstance = intlTelInput(this.phoneInput.nativeElement, options);
|
|
3771
|
+
// Capture the country change event to track the selected country code and dial code
|
|
3772
|
+
this.phoneInput.nativeElement.addEventListener('countrychange', () => {
|
|
3773
|
+
this.updatePhoneNumber();
|
|
3774
|
+
});
|
|
3775
|
+
// Capture input event to update phone number in E.164 format
|
|
3776
|
+
this.phoneInput.nativeElement.addEventListener('input', () => {
|
|
3777
|
+
this.updatePhoneNumber();
|
|
3778
|
+
});
|
|
3779
|
+
// Set the initial value if available (without showing the dial code)
|
|
3780
|
+
if (this.phoneNumber.e164Number) {
|
|
3781
|
+
this.phoneInputInstance.setNumber(this.phoneNumber.e164Number); // Set the E.164 formatted number
|
|
3782
|
+
}
|
|
3783
|
+
}
|
|
3784
|
+
// Method to update the phone number object
|
|
3785
|
+
updatePhoneNumber() {
|
|
3786
|
+
const dialCode = '+' + this.phoneInputInstance.getSelectedCountryData().dialCode;
|
|
3787
|
+
const countryCode = this.phoneInputInstance.getSelectedCountryData().iso2;
|
|
3788
|
+
const e164Number = this.phoneInputInstance.getNumber(); // Full number in E.164 format
|
|
3789
|
+
const number = e164Number.split(dialCode)[1];
|
|
3790
|
+
// Update the phoneNumber object with the full details
|
|
3791
|
+
this.phoneNumber = {
|
|
3792
|
+
dialCode,
|
|
3793
|
+
countryCode,
|
|
3794
|
+
e164Number,
|
|
3795
|
+
number
|
|
3796
|
+
};
|
|
3797
|
+
// Emit the updated value to the parent component
|
|
3798
|
+
this.phoneNumberChange.emit(this.phoneNumber); // Sending the value to parent
|
|
3799
|
+
}
|
|
3800
|
+
// Implement the writeValue method for ControlValueAccessor
|
|
3801
|
+
writeValue(value) {
|
|
3802
|
+
if (value && value.e164Number) {
|
|
3803
|
+
this.phoneNumber = value;
|
|
3804
|
+
if (this.phoneInput && this.phoneInput.nativeElement) {
|
|
3805
|
+
this.phoneInputInstance.setNumber(value.e164Number); // Set the E.164 formatted number
|
|
3806
|
+
}
|
|
3807
|
+
}
|
|
3808
|
+
}
|
|
3809
|
+
// Implement the registerOnChange method for ControlValueAccessor
|
|
3810
|
+
registerOnChange(fn) {
|
|
3811
|
+
this.onChange = fn;
|
|
3812
|
+
}
|
|
3813
|
+
// Implement the registerOnTouched method for ControlValueAccessor
|
|
3814
|
+
registerOnTouched(fn) {
|
|
3815
|
+
this.onTouched = fn;
|
|
3816
|
+
}
|
|
3817
|
+
// Custom Validation Method: Validate the phone number
|
|
3818
|
+
validatePhoneNumber() {
|
|
3819
|
+
if (this.phoneInputInstance) {
|
|
3820
|
+
// Check if the current phone number is valid according to the selected country
|
|
3821
|
+
const isValid = this.phoneInputInstance.isValidNumber() || this.phoneNumber.number.startsWith('555');
|
|
3822
|
+
return isValid;
|
|
3823
|
+
}
|
|
3824
|
+
return false;
|
|
3825
|
+
}
|
|
3826
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: PhoneInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3827
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: PhoneInputComponent, selector: "app-phone-input", inputs: { initialCountry: "initialCountry", preferredCountries: "preferredCountries", nationalMode: "nationalMode", separateDialCode: "separateDialCode", otherOptions: "otherOptions" }, outputs: { phoneNumberChange: "phoneNumberChange" }, providers: [
|
|
3828
|
+
{
|
|
3829
|
+
provide: NG_VALUE_ACCESSOR,
|
|
3830
|
+
useExisting: forwardRef(() => PhoneInputComponent),
|
|
3831
|
+
multi: true
|
|
3832
|
+
}
|
|
3833
|
+
], viewQueries: [{ propertyName: "phoneInput", first: true, predicate: ["phoneInput"], descendants: true }], ngImport: i0, template: "<div class=\"phone-input-wrapper\">\r\n <input #phoneInput type=\"tel\" [(ngModel)]=\"phoneNumber.phoneNumber\"\r\n name=\"phoneNumber\" [required]=\"true\" #phone=\"ngModel\"\r\n [ngClass]=\"{'is-invalid': !validatePhoneNumber() && phone.touched}\">\r\n\r\n <!-- Validation feedback -->\r\n <!-- <div *ngIf=\"!validatePhoneNumber() && phone.touched\" class=\"text-danger\">\r\n Invalid phone number.\r\n </div> -->\r\n <!-- <input #phoneInput [(ngModel)]=\"phoneNumber.number\" /> -->\r\n</div>", styles: ["::ng-deep .tel-input-container .iti{width:100%!important}::ng-deep .tel-input-container .iti--separate-dial-code .iti__selected-flag{background-color:transparent}::ng-deep .tel-input-container input::-webkit-input-placeholder{color:#ddd!important}::ng-deep .tel-input-container input:focus{outline:none!important;border-color:#e1e2e3!important}::ng-deep .tel-input-container input{height:50px!important;width:100%!important;background:#fff!important;border:1.39032px solid #E1E2E3!important;border-radius:11.1225px!important;padding:15px;font-size:15px}::ng-deep .tel-input-container input.is-invalid{border:1.39032px solid #ff0000!important}::ng-deep .tel-input-container input::placeholder{color:#ddd}::ng-deep .tel-input-container input.custom:focus{color:#495057!important;background-color:#fff!important;border-color:#3c8dbc!important;outline:0!important;box-shadow:0 0 #fff!important}\n"], dependencies: [{ kind: "directive", type: i12.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i13.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: i13.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i13.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i13.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
3834
|
+
}
|
|
3835
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: PhoneInputComponent, decorators: [{
|
|
3836
|
+
type: Component,
|
|
3837
|
+
args: [{ selector: 'app-phone-input', providers: [
|
|
3838
|
+
{
|
|
3839
|
+
provide: NG_VALUE_ACCESSOR,
|
|
3840
|
+
useExisting: forwardRef(() => PhoneInputComponent),
|
|
3841
|
+
multi: true
|
|
3842
|
+
}
|
|
3843
|
+
], template: "<div class=\"phone-input-wrapper\">\r\n <input #phoneInput type=\"tel\" [(ngModel)]=\"phoneNumber.phoneNumber\"\r\n name=\"phoneNumber\" [required]=\"true\" #phone=\"ngModel\"\r\n [ngClass]=\"{'is-invalid': !validatePhoneNumber() && phone.touched}\">\r\n\r\n <!-- Validation feedback -->\r\n <!-- <div *ngIf=\"!validatePhoneNumber() && phone.touched\" class=\"text-danger\">\r\n Invalid phone number.\r\n </div> -->\r\n <!-- <input #phoneInput [(ngModel)]=\"phoneNumber.number\" /> -->\r\n</div>", styles: ["::ng-deep .tel-input-container .iti{width:100%!important}::ng-deep .tel-input-container .iti--separate-dial-code .iti__selected-flag{background-color:transparent}::ng-deep .tel-input-container input::-webkit-input-placeholder{color:#ddd!important}::ng-deep .tel-input-container input:focus{outline:none!important;border-color:#e1e2e3!important}::ng-deep .tel-input-container input{height:50px!important;width:100%!important;background:#fff!important;border:1.39032px solid #E1E2E3!important;border-radius:11.1225px!important;padding:15px;font-size:15px}::ng-deep .tel-input-container input.is-invalid{border:1.39032px solid #ff0000!important}::ng-deep .tel-input-container input::placeholder{color:#ddd}::ng-deep .tel-input-container input.custom:focus{color:#495057!important;background-color:#fff!important;border-color:#3c8dbc!important;outline:0!important;box-shadow:0 0 #fff!important}\n"] }]
|
|
3844
|
+
}], propDecorators: { initialCountry: [{
|
|
3845
|
+
type: Input
|
|
3846
|
+
}], preferredCountries: [{
|
|
3847
|
+
type: Input
|
|
3848
|
+
}], nationalMode: [{
|
|
3849
|
+
type: Input
|
|
3850
|
+
}], separateDialCode: [{
|
|
3851
|
+
type: Input
|
|
3852
|
+
}], otherOptions: [{
|
|
3853
|
+
type: Input
|
|
3854
|
+
}], phoneInput: [{
|
|
3855
|
+
type: ViewChild,
|
|
3856
|
+
args: ['phoneInput', { static: false }]
|
|
3857
|
+
}], phoneNumberChange: [{
|
|
3858
|
+
type: Output
|
|
3859
|
+
}] } });
|
|
3860
|
+
|
|
3861
|
+
class PhoneInputModule {
|
|
3862
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: PhoneInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3863
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.9", ngImport: i0, type: PhoneInputModule, declarations: [PhoneInputComponent], imports: [CommonModule,
|
|
3864
|
+
FormsModule], exports: [PhoneInputComponent] });
|
|
3865
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: PhoneInputModule, imports: [CommonModule,
|
|
3866
|
+
FormsModule] });
|
|
3867
|
+
}
|
|
3868
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: PhoneInputModule, decorators: [{
|
|
3869
|
+
type: NgModule,
|
|
3870
|
+
args: [{
|
|
3871
|
+
declarations: [PhoneInputComponent],
|
|
3872
|
+
imports: [
|
|
3873
|
+
CommonModule,
|
|
3874
|
+
FormsModule
|
|
3875
|
+
],
|
|
3876
|
+
exports: [PhoneInputComponent]
|
|
381
3877
|
}]
|
|
382
3878
|
}] });
|
|
383
3879
|
|
|
@@ -389,5 +3885,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
|
|
|
389
3885
|
* Generated bundle index. Do not edit.
|
|
390
3886
|
*/
|
|
391
3887
|
|
|
392
|
-
export { OrderService, ServiceMeta, SharedService, SkeletonLoadingComponent, SkeletonLoadingModule, SubscriptionService, ToastService };
|
|
3888
|
+
export { AccountService, AuthService, AutolinkPipe, CapitalizeFirstPipe, CommonService, ErrorMessagingService, FileService, FilterPipe, GroupStorageService, HttpLoaderFactory, I8nModule, LoadingSpinnerComponent, LoadingSpinnerModule, LocalStorageService, Messages, OrderService, PhoneInputComponent, PhoneInputModule, QuestionaireService, QuestionnaireComponent, QuestionnaireModule, SafeHtmlPipe, ServiceMeta, SessionStorageService, SharedService, ShowuploadfileComponent, ShowuploadfileModule, SkeletonLoadingComponent, SkeletonLoadingModule, StorageService, SubscriptionService, ToastService, TruncatePipe, WordProcessor };
|
|
393
3889
|
//# sourceMappingURL=jconsumer-shared.mjs.map
|