@rangertechnologies/ngnxt 2.0.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -0
- package/esm2022/lib/components/custom-date-picker/custom-date-picker.component.mjs +33 -0
- package/esm2022/lib/components/custom-dropdown/custom-dropdown.component.mjs +73 -0
- package/esm2022/lib/components/custom-input/custom-input.component.mjs +46 -0
- package/esm2022/lib/components/custom-table/custom-table.component.mjs +51 -0
- package/esm2022/lib/components/custom-text-area/custom-text-area.component.mjs +34 -0
- package/esm2022/lib/components/dropdown-with-flag/dropdown-with-flag.component.mjs +34 -0
- package/esm2022/lib/components/pick-location/pick-location.component.mjs +134 -0
- package/esm2022/lib/components/search-box/search-box.component.mjs +84 -0
- package/esm2022/lib/interfaces/apimeta.mjs +2 -0
- package/esm2022/lib/nxt-app.component.mjs +22 -0
- package/esm2022/lib/nxt-app.module.mjs +262 -0
- package/esm2022/lib/nxt-app.service.mjs +14 -0
- package/esm2022/lib/pages/booklet/booklet.component.mjs +79 -0
- package/esm2022/lib/pages/questionnaire/questionnaire.component.mjs +2131 -0
- package/esm2022/lib/sample.mjs +433 -0
- package/esm2022/lib/services/data.service.mjs +40 -0
- package/esm2022/lib/services/salesforce.service.mjs +46 -0
- package/esm2022/lib/wrapper.mjs +165 -0
- package/esm2022/public-api.mjs +10 -0
- package/esm2022/rangertechnologies-ngnxt.mjs +5 -0
- package/fesm2022/rangertechnologies-ngnxt.mjs +3610 -0
- package/fesm2022/rangertechnologies-ngnxt.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/components/custom-date-picker/custom-date-picker.component.d.ts +14 -0
- package/lib/components/custom-dropdown/custom-dropdown.component.d.ts +23 -0
- package/lib/components/custom-input/custom-input.component.d.ts +18 -0
- package/lib/components/custom-table/custom-table.component.d.ts +23 -0
- package/lib/components/custom-text-area/custom-text-area.component.d.ts +14 -0
- package/lib/components/dropdown-with-flag/dropdown-with-flag.component.d.ts +14 -0
- package/lib/components/pick-location/pick-location.component.d.ts +38 -0
- package/lib/components/search-box/search-box.component.d.ts +34 -0
- package/lib/interfaces/apimeta.d.ts +5 -0
- package/lib/nxt-app.component.d.ts +8 -0
- package/lib/nxt-app.module.d.ts +26 -0
- package/lib/nxt-app.service.d.ts +6 -0
- package/lib/pages/booklet/booklet.component.d.ts +29 -0
- package/lib/pages/questionnaire/questionnaire.component.d.ts +207 -0
- package/lib/sample.d.ts +10 -0
- package/lib/services/data.service.d.ts +9 -0
- package/lib/services/salesforce.service.d.ts +11 -0
- package/lib/wrapper.d.ts +164 -0
- package/package.json +43 -0
- package/public-api.d.ts +6 -0
- package/rangertechnologies-ngnxt-2.0.27.tgz +0 -0
|
@@ -0,0 +1,3610 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Injectable, Component, EventEmitter, ViewChild, Input, Output, ViewEncapsulation, NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
|
3
|
+
import * as moment from 'moment';
|
|
4
|
+
import * as i3 from '@angular/router';
|
|
5
|
+
import * as i1 from '@angular/common/http';
|
|
6
|
+
import { HttpHeaders, HttpClientModule } from '@angular/common/http';
|
|
7
|
+
import * as i4$1 from '@angular/platform-browser';
|
|
8
|
+
import * as i5 from 'ngx-spinner';
|
|
9
|
+
import { NgxSpinnerModule } from 'ngx-spinner';
|
|
10
|
+
import * as i2 from '@angular/forms';
|
|
11
|
+
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
12
|
+
import * as i7 from 'ngx-device-detector';
|
|
13
|
+
import * as i1$1 from '@angular/common';
|
|
14
|
+
import { CommonModule } from '@angular/common';
|
|
15
|
+
import * as i9 from 'mydatepicker';
|
|
16
|
+
import { MyDatePickerModule } from 'mydatepicker';
|
|
17
|
+
import * as i10 from 'ng-circle-progress';
|
|
18
|
+
import { NgCircleProgressModule } from 'ng-circle-progress';
|
|
19
|
+
import * as i3$1 from '@angular/google-maps';
|
|
20
|
+
import { GoogleMapsModule } from '@angular/google-maps';
|
|
21
|
+
import * as i2$1 from 'ng-pick-datetime';
|
|
22
|
+
import { OwlDateTimeModule, OwlNativeDateTimeModule } from 'ng-pick-datetime';
|
|
23
|
+
import * as i4 from '@ng-select/ng-select';
|
|
24
|
+
import { NgSelectModule } from '@ng-select/ng-select';
|
|
25
|
+
|
|
26
|
+
class NxtAppService {
|
|
27
|
+
constructor() { }
|
|
28
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: NxtAppService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
29
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: NxtAppService, providedIn: 'root' });
|
|
30
|
+
}
|
|
31
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: NxtAppService, decorators: [{
|
|
32
|
+
type: Injectable,
|
|
33
|
+
args: [{
|
|
34
|
+
providedIn: 'root'
|
|
35
|
+
}]
|
|
36
|
+
}], ctorParameters: function () { return []; } });
|
|
37
|
+
|
|
38
|
+
class NxtAppComponent {
|
|
39
|
+
constructor() { }
|
|
40
|
+
ngOnInit() {
|
|
41
|
+
}
|
|
42
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: NxtAppComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
43
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: NxtAppComponent, selector: "lib-nxt-app", ngImport: i0, template: `
|
|
44
|
+
<p>
|
|
45
|
+
nxt-app works!
|
|
46
|
+
</p>
|
|
47
|
+
`, isInline: true });
|
|
48
|
+
}
|
|
49
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: NxtAppComponent, decorators: [{
|
|
50
|
+
type: Component,
|
|
51
|
+
args: [{ selector: 'lib-nxt-app', template: `
|
|
52
|
+
<p>
|
|
53
|
+
nxt-app works!
|
|
54
|
+
</p>
|
|
55
|
+
` }]
|
|
56
|
+
}], ctorParameters: function () { return []; } });
|
|
57
|
+
|
|
58
|
+
class QuestionBook {
|
|
59
|
+
Id;
|
|
60
|
+
Name;
|
|
61
|
+
Category__c;
|
|
62
|
+
Next__c;
|
|
63
|
+
Cancel__c;
|
|
64
|
+
Back__c;
|
|
65
|
+
Submit__c;
|
|
66
|
+
Edit__c;
|
|
67
|
+
First_Question__c;
|
|
68
|
+
Title__c;
|
|
69
|
+
Next_Tracking_ID__c;
|
|
70
|
+
Back_Tracking_ID__c;
|
|
71
|
+
Cancel_Tracking_ID__c;
|
|
72
|
+
Submit_Tracking_ID__c;
|
|
73
|
+
Total_Questions__c;
|
|
74
|
+
Summary_Text__c;
|
|
75
|
+
Questions__r;
|
|
76
|
+
Progress_Bar__c;
|
|
77
|
+
SubTitle__c;
|
|
78
|
+
Question_Type__c;
|
|
79
|
+
Possibilities__c;
|
|
80
|
+
Summary_Sub_Text__c;
|
|
81
|
+
isShengel__c;
|
|
82
|
+
}
|
|
83
|
+
class Question {
|
|
84
|
+
Id;
|
|
85
|
+
Name;
|
|
86
|
+
Allowed_File_Extensions__c;
|
|
87
|
+
Question__c;
|
|
88
|
+
Question_Text__c;
|
|
89
|
+
Type__c;
|
|
90
|
+
Next_Question__c;
|
|
91
|
+
Is_Optional__c;
|
|
92
|
+
Is_Title__c;
|
|
93
|
+
X24_Hours__c;
|
|
94
|
+
Error_Message__c;
|
|
95
|
+
Is_Date_Backward__c;
|
|
96
|
+
Is_Date_Forward__c;
|
|
97
|
+
Group__c;
|
|
98
|
+
Question_No__c;
|
|
99
|
+
Question_Options__r;
|
|
100
|
+
Size__c;
|
|
101
|
+
Tracking_ID__c;
|
|
102
|
+
Additional_Rich__c;
|
|
103
|
+
Questions__r;
|
|
104
|
+
RecordType;
|
|
105
|
+
input;
|
|
106
|
+
error;
|
|
107
|
+
static X24_Hours__c;
|
|
108
|
+
Time_Text__c;
|
|
109
|
+
Title__c;
|
|
110
|
+
SubTitle__c;
|
|
111
|
+
Sub_Text__c;
|
|
112
|
+
Date_Text__c;
|
|
113
|
+
valueName;
|
|
114
|
+
dropDownOnly;
|
|
115
|
+
isDependentPicklist;
|
|
116
|
+
tableDataValue;
|
|
117
|
+
tableHeader;
|
|
118
|
+
startDate;
|
|
119
|
+
minDate;
|
|
120
|
+
isShengel__c;
|
|
121
|
+
}
|
|
122
|
+
class LocalQuestion {
|
|
123
|
+
Id;
|
|
124
|
+
Name;
|
|
125
|
+
Allowed_File_Extensions__c;
|
|
126
|
+
Question__c;
|
|
127
|
+
Question_Text__c;
|
|
128
|
+
Type__c;
|
|
129
|
+
Title__c;
|
|
130
|
+
SubTitle__c;
|
|
131
|
+
Next_Question__c;
|
|
132
|
+
Is_Optional__c;
|
|
133
|
+
Is_Title__c;
|
|
134
|
+
X24_Hours__c;
|
|
135
|
+
Error_Message__c;
|
|
136
|
+
Is_Date_Backward__c;
|
|
137
|
+
Is_Date_Forward__c;
|
|
138
|
+
Time_Text__c;
|
|
139
|
+
Date_Text__c;
|
|
140
|
+
Group__c;
|
|
141
|
+
Question_No__c;
|
|
142
|
+
Question_Options__r;
|
|
143
|
+
Sub_Text__c;
|
|
144
|
+
Size__c;
|
|
145
|
+
Tracking_ID__c;
|
|
146
|
+
Additional_Rich__c;
|
|
147
|
+
Questions__r;
|
|
148
|
+
RecordType;
|
|
149
|
+
input;
|
|
150
|
+
error;
|
|
151
|
+
static X24_Hours__c;
|
|
152
|
+
uniqueSubQId;
|
|
153
|
+
}
|
|
154
|
+
class QuestionR {
|
|
155
|
+
records;
|
|
156
|
+
}
|
|
157
|
+
class OptionR {
|
|
158
|
+
records;
|
|
159
|
+
}
|
|
160
|
+
class Option {
|
|
161
|
+
Id;
|
|
162
|
+
Name;
|
|
163
|
+
Value__c;
|
|
164
|
+
Tracking_ID__c;
|
|
165
|
+
Next_Question__c;
|
|
166
|
+
}
|
|
167
|
+
class OptionValue {
|
|
168
|
+
Id;
|
|
169
|
+
Name;
|
|
170
|
+
Value__c;
|
|
171
|
+
Next_Question__c;
|
|
172
|
+
checked;
|
|
173
|
+
}
|
|
174
|
+
class AnswerBook {
|
|
175
|
+
Id;
|
|
176
|
+
Question_Book__c;
|
|
177
|
+
Status__c;
|
|
178
|
+
Answers__r;
|
|
179
|
+
}
|
|
180
|
+
class Answer {
|
|
181
|
+
Id;
|
|
182
|
+
Question_Rich_Text__c;
|
|
183
|
+
Answer_Long__c;
|
|
184
|
+
Question_Type__c;
|
|
185
|
+
Question_Ref__c;
|
|
186
|
+
Question_Group_Text__c;
|
|
187
|
+
}
|
|
188
|
+
class AnswerR {
|
|
189
|
+
records;
|
|
190
|
+
}
|
|
191
|
+
class AnswerWrapper {
|
|
192
|
+
ansId;
|
|
193
|
+
ansNumber;
|
|
194
|
+
abId;
|
|
195
|
+
quesId;
|
|
196
|
+
quesValue;
|
|
197
|
+
qTyp;
|
|
198
|
+
ansValue;
|
|
199
|
+
groupText;
|
|
200
|
+
squesValue;
|
|
201
|
+
}
|
|
202
|
+
class ErrorWrapper {
|
|
203
|
+
errorCode;
|
|
204
|
+
errorMsg;
|
|
205
|
+
errorDetails;
|
|
206
|
+
}
|
|
207
|
+
class AttachmentWrapper {
|
|
208
|
+
parentId;
|
|
209
|
+
fileName;
|
|
210
|
+
fileContent;
|
|
211
|
+
}
|
|
212
|
+
class Attachment {
|
|
213
|
+
attachmentId;
|
|
214
|
+
attachmentName;
|
|
215
|
+
attachmentMetaData;
|
|
216
|
+
constructor(id, name, metaData) {
|
|
217
|
+
this.attachmentId = id;
|
|
218
|
+
this.attachmentName = name;
|
|
219
|
+
this.attachmentMetaData = metaData;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/*
|
|
224
|
+
export const TESTQUESTIONS: Question[] = [
|
|
225
|
+
{ Id: 11, Name: '001', question: 'What is your Name?' },
|
|
226
|
+
{ Id: 12, Name: '002', question: 'What is your favourite City?' },
|
|
227
|
+
{ Id: 13, Name: '003', question: 'How many languages you speak?' },
|
|
228
|
+
{ Id: 14, Name: '004', question: 'Share your feedback?' },
|
|
229
|
+
];
|
|
230
|
+
*/
|
|
231
|
+
// Dynamic Field Changes
|
|
232
|
+
const TESTQB = {
|
|
233
|
+
Id: 2,
|
|
234
|
+
Name: 'QB-0000',
|
|
235
|
+
Category__c: 'Simple',
|
|
236
|
+
Next__c: 'weiter',
|
|
237
|
+
Cancel__c: 'zurück',
|
|
238
|
+
Back__c: 'zurück',
|
|
239
|
+
Submit__c: 'absenden',
|
|
240
|
+
Edit__c: 'Bearbeiten',
|
|
241
|
+
Next_Tracking_ID__c: '12345',
|
|
242
|
+
Back_Tracking_ID__c: '12345',
|
|
243
|
+
Cancel_Tracking_ID__c: '12345',
|
|
244
|
+
Submit_Tracking_ID__c: '12345',
|
|
245
|
+
First_Question__c: '1',
|
|
246
|
+
Title__c: 'Demo Unconditional',
|
|
247
|
+
Total_Questions__c: 3,
|
|
248
|
+
SubTitle__c: 'subTitle',
|
|
249
|
+
Question_Type__c: 'type',
|
|
250
|
+
Possibilities__c: 'poss',
|
|
251
|
+
Summary_Sub_Text__c: 'subText',
|
|
252
|
+
Progress_Bar__c: true
|
|
253
|
+
};
|
|
254
|
+
// Text Question
|
|
255
|
+
const TESTQUESTION = {
|
|
256
|
+
Id: '11',
|
|
257
|
+
Name: 'QN-00001',
|
|
258
|
+
Type__c: 'Text',
|
|
259
|
+
Allowed_File_Extensions__c: '.pdf',
|
|
260
|
+
Question_Text__c: 'What is your Name?',
|
|
261
|
+
Question__c: 'What is your Name?',
|
|
262
|
+
Next_Question__c: 'a013t000013SS89AAG',
|
|
263
|
+
Tracking_ID__c: '1234',
|
|
264
|
+
Is_Optional__c: false,
|
|
265
|
+
Is_Title__c: true,
|
|
266
|
+
X24_Hours__c: true,
|
|
267
|
+
Error_Message__c: 'Please Enter a Value',
|
|
268
|
+
Is_Date_Backward__c: false,
|
|
269
|
+
Is_Date_Forward__c: false,
|
|
270
|
+
Group__c: 'Basic',
|
|
271
|
+
Size__c: 1,
|
|
272
|
+
Question_No__c: '1',
|
|
273
|
+
Time_Text__c: 'hour',
|
|
274
|
+
Title__c: 'title',
|
|
275
|
+
SubTitle__c: 'subtitle',
|
|
276
|
+
Sub_Text__c: 'subtext',
|
|
277
|
+
Date_Text__c: 'datetext',
|
|
278
|
+
RecordType: {
|
|
279
|
+
Name: 'UNCONDITIONAL'
|
|
280
|
+
},
|
|
281
|
+
};
|
|
282
|
+
// DateTime Question
|
|
283
|
+
const DTQUESTION = {
|
|
284
|
+
Id: '12',
|
|
285
|
+
Name: 'QN-00002',
|
|
286
|
+
Type__c: 'DateTime',
|
|
287
|
+
Allowed_File_Extensions__c: '.pdf',
|
|
288
|
+
Question_Text__c: 'When did the incident happen?',
|
|
289
|
+
Question__c: 'When did the incident happen?',
|
|
290
|
+
Next_Question__c: 'a013t000013SS89AAG',
|
|
291
|
+
Tracking_ID__c: '1234',
|
|
292
|
+
Is_Optional__c: false,
|
|
293
|
+
Is_Title__c: true,
|
|
294
|
+
X24_Hours__c: true,
|
|
295
|
+
Error_Message__c: 'Please Enter a Value',
|
|
296
|
+
Is_Date_Backward__c: true,
|
|
297
|
+
Is_Date_Forward__c: true,
|
|
298
|
+
Group__c: 'Basic',
|
|
299
|
+
Size__c: 1,
|
|
300
|
+
Question_No__c: '1',
|
|
301
|
+
Time_Text__c: 'hour',
|
|
302
|
+
Title__c: 'title',
|
|
303
|
+
SubTitle__c: 'subtitle',
|
|
304
|
+
Sub_Text__c: 'subtext',
|
|
305
|
+
Date_Text__c: 'datetext',
|
|
306
|
+
RecordType: {
|
|
307
|
+
Name: 'UNCONDITIONAL'
|
|
308
|
+
},
|
|
309
|
+
};
|
|
310
|
+
// File Question
|
|
311
|
+
const FILEQUESTION = {
|
|
312
|
+
Id: '13',
|
|
313
|
+
Name: 'QN-00003',
|
|
314
|
+
Type__c: 'File',
|
|
315
|
+
Allowed_File_Extensions__c: '.pdf',
|
|
316
|
+
Question_Text__c: 'Upload the Incident Report/Images?',
|
|
317
|
+
Question__c: 'Upload the Incident Report/Images?',
|
|
318
|
+
Next_Question__c: 'a013t000013SS89AAG',
|
|
319
|
+
Tracking_ID__c: '1234',
|
|
320
|
+
Is_Optional__c: false,
|
|
321
|
+
Is_Title__c: true,
|
|
322
|
+
X24_Hours__c: true,
|
|
323
|
+
Error_Message__c: 'Please Enter a Value',
|
|
324
|
+
Is_Date_Backward__c: false,
|
|
325
|
+
Is_Date_Forward__c: false,
|
|
326
|
+
Group__c: 'Basic',
|
|
327
|
+
Size__c: 1,
|
|
328
|
+
Question_No__c: '1',
|
|
329
|
+
Time_Text__c: 'hour',
|
|
330
|
+
Title__c: 'title',
|
|
331
|
+
SubTitle__c: 'subtitle',
|
|
332
|
+
Sub_Text__c: 'subtext',
|
|
333
|
+
Date_Text__c: 'datetext',
|
|
334
|
+
RecordType: {
|
|
335
|
+
Name: 'UNCONDITIONAL'
|
|
336
|
+
},
|
|
337
|
+
};
|
|
338
|
+
// DateTime Question
|
|
339
|
+
const TAQUESTION = {
|
|
340
|
+
Id: '14',
|
|
341
|
+
Name: 'QN-00004',
|
|
342
|
+
Type__c: 'TextArea',
|
|
343
|
+
Allowed_File_Extensions__c: '.pdf',
|
|
344
|
+
Question_Text__c: 'Explain the particulars of the Incident?',
|
|
345
|
+
Question__c: 'Explain the particulars of the Incident?',
|
|
346
|
+
Next_Question__c: 'a013t000013SS89AAG',
|
|
347
|
+
Tracking_ID__c: '1234',
|
|
348
|
+
Is_Optional__c: false,
|
|
349
|
+
Is_Title__c: true,
|
|
350
|
+
X24_Hours__c: false,
|
|
351
|
+
Error_Message__c: 'Please Enter a Value',
|
|
352
|
+
Is_Date_Backward__c: false,
|
|
353
|
+
Is_Date_Forward__c: false,
|
|
354
|
+
Group__c: 'Basic',
|
|
355
|
+
Size__c: 1,
|
|
356
|
+
Question_No__c: '1',
|
|
357
|
+
Time_Text__c: 'hour',
|
|
358
|
+
Title__c: 'title',
|
|
359
|
+
SubTitle__c: 'subtitle',
|
|
360
|
+
Sub_Text__c: 'subtext',
|
|
361
|
+
Date_Text__c: 'datetext',
|
|
362
|
+
RecordType: {
|
|
363
|
+
Name: 'UNCONDITIONAL'
|
|
364
|
+
},
|
|
365
|
+
};
|
|
366
|
+
// Radio Question
|
|
367
|
+
const RADIOQUESTION = {
|
|
368
|
+
Id: '15',
|
|
369
|
+
Name: 'QN-00005',
|
|
370
|
+
Type__c: 'Radio',
|
|
371
|
+
Allowed_File_Extensions__c: '.pdf',
|
|
372
|
+
Question_Text__c: 'Choose your favorite role',
|
|
373
|
+
Question__c: 'Choose your favorite role',
|
|
374
|
+
Tracking_ID__c: '1234',
|
|
375
|
+
Next_Question__c: '',
|
|
376
|
+
Is_Optional__c: false,
|
|
377
|
+
Is_Title__c: true,
|
|
378
|
+
X24_Hours__c: false,
|
|
379
|
+
Error_Message__c: 'Please Enter a Value',
|
|
380
|
+
Is_Date_Backward__c: false,
|
|
381
|
+
Is_Date_Forward__c: false,
|
|
382
|
+
Group__c: 'Basic',
|
|
383
|
+
Size__c: 1,
|
|
384
|
+
Question_No__c: '5',
|
|
385
|
+
Time_Text__c: 'hour',
|
|
386
|
+
Title__c: 'title',
|
|
387
|
+
SubTitle__c: 'subtitle',
|
|
388
|
+
Sub_Text__c: 'subtext',
|
|
389
|
+
Date_Text__c: 'datetext',
|
|
390
|
+
RecordType: {
|
|
391
|
+
Name: 'UNCONDITIONAL'
|
|
392
|
+
},
|
|
393
|
+
Question_Options__r: {
|
|
394
|
+
records: [
|
|
395
|
+
{
|
|
396
|
+
Id: '121',
|
|
397
|
+
Name: '121N',
|
|
398
|
+
Value__c: '121V',
|
|
399
|
+
Tracking_ID__c: '1234',
|
|
400
|
+
Next_Question__c: '',
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
Id: '122',
|
|
404
|
+
Name: '122N',
|
|
405
|
+
Value__c: '122V',
|
|
406
|
+
Tracking_ID__c: '1234',
|
|
407
|
+
Next_Question__c: '',
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
Id: '123',
|
|
411
|
+
Name: '123N',
|
|
412
|
+
Value__c: '123V',
|
|
413
|
+
Tracking_ID__c: '1234',
|
|
414
|
+
Next_Question__c: '',
|
|
415
|
+
}
|
|
416
|
+
]
|
|
417
|
+
}
|
|
418
|
+
};
|
|
419
|
+
// Checkbox Question
|
|
420
|
+
const CHECKQUESTION = {
|
|
421
|
+
Id: '16',
|
|
422
|
+
Name: 'QN-00006',
|
|
423
|
+
Type__c: 'Checkbox',
|
|
424
|
+
Allowed_File_Extensions__c: '.pdf',
|
|
425
|
+
Question_Text__c: 'Choose your favorite spots',
|
|
426
|
+
Question__c: 'Choose your favorite spots',
|
|
427
|
+
Tracking_ID__c: '1234',
|
|
428
|
+
Next_Question__c: '',
|
|
429
|
+
Is_Optional__c: false,
|
|
430
|
+
Is_Title__c: false,
|
|
431
|
+
X24_Hours__c: false,
|
|
432
|
+
Error_Message__c: 'Please Enter a Value',
|
|
433
|
+
Is_Date_Backward__c: false,
|
|
434
|
+
Is_Date_Forward__c: false,
|
|
435
|
+
Group__c: 'Basic',
|
|
436
|
+
Size__c: 1,
|
|
437
|
+
Question_No__c: '6',
|
|
438
|
+
Time_Text__c: 'hour',
|
|
439
|
+
Title__c: 'title',
|
|
440
|
+
SubTitle__c: 'subtitle',
|
|
441
|
+
Sub_Text__c: 'subtext',
|
|
442
|
+
Date_Text__c: 'datetext',
|
|
443
|
+
RecordType: {
|
|
444
|
+
Name: 'CONDITIONAL'
|
|
445
|
+
},
|
|
446
|
+
Question_Options__r: {
|
|
447
|
+
records: [
|
|
448
|
+
{
|
|
449
|
+
Id: '121',
|
|
450
|
+
Name: '121N',
|
|
451
|
+
Value__c: '121V',
|
|
452
|
+
Tracking_ID__c: '1234',
|
|
453
|
+
Next_Question__c: '',
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
Id: '122',
|
|
457
|
+
Name: '122N',
|
|
458
|
+
Value__c: '122V',
|
|
459
|
+
Tracking_ID__c: '1234',
|
|
460
|
+
Next_Question__c: '',
|
|
461
|
+
},
|
|
462
|
+
{
|
|
463
|
+
Id: '123',
|
|
464
|
+
Name: '123N',
|
|
465
|
+
Value__c: '123V',
|
|
466
|
+
Tracking_ID__c: '1234',
|
|
467
|
+
Next_Question__c: '',
|
|
468
|
+
}
|
|
469
|
+
]
|
|
470
|
+
}
|
|
471
|
+
};
|
|
472
|
+
const GOOGLE_MAP_API_KEY = 'AIzaSyA18odJnD-pDsu7EVJ7WiXVM5sVvpjAQxw';
|
|
473
|
+
// Book Question
|
|
474
|
+
const BOOKQUESTION = {
|
|
475
|
+
Id: '17',
|
|
476
|
+
Name: 'QN-00007',
|
|
477
|
+
Type__c: 'Book',
|
|
478
|
+
Allowed_File_Extensions__c: '.pdf',
|
|
479
|
+
Tracking_ID__c: '1234',
|
|
480
|
+
Question__c: 'Provide your Address',
|
|
481
|
+
Question_Text__c: 'Provide your Address',
|
|
482
|
+
Next_Question__c: '',
|
|
483
|
+
Is_Optional__c: false,
|
|
484
|
+
Is_Title__c: true,
|
|
485
|
+
X24_Hours__c: false,
|
|
486
|
+
Error_Message__c: 'Please Enter a Value',
|
|
487
|
+
Is_Date_Backward__c: false,
|
|
488
|
+
Is_Date_Forward__c: false,
|
|
489
|
+
Group__c: 'Basic',
|
|
490
|
+
Size__c: 1,
|
|
491
|
+
Question_No__c: '7',
|
|
492
|
+
Time_Text__c: 'hour',
|
|
493
|
+
Title__c: 'title',
|
|
494
|
+
SubTitle__c: 'subtitle',
|
|
495
|
+
Sub_Text__c: 'subtext',
|
|
496
|
+
Date_Text__c: 'datetext',
|
|
497
|
+
Questions__r: {
|
|
498
|
+
records: [
|
|
499
|
+
{
|
|
500
|
+
Id: '170',
|
|
501
|
+
Name: 'QN-000070',
|
|
502
|
+
Type__c: 'Dropdown',
|
|
503
|
+
Question_Text__c: 'Land',
|
|
504
|
+
Question__c: 'Land',
|
|
505
|
+
Size__c: 1,
|
|
506
|
+
Allowed_File_Extensions__c: '.pdf',
|
|
507
|
+
Tracking_ID__c: '1234',
|
|
508
|
+
Is_Optional__c: false,
|
|
509
|
+
Is_Title__c: true,
|
|
510
|
+
X24_Hours__c: false,
|
|
511
|
+
Error_Message__c: 'Please Enter a Value',
|
|
512
|
+
Is_Date_Backward__c: false,
|
|
513
|
+
Is_Date_Forward__c: false,
|
|
514
|
+
Group__c: 'Basic',
|
|
515
|
+
Time_Text__c: 'hour',
|
|
516
|
+
Title__c: 'title',
|
|
517
|
+
SubTitle__c: 'subtitle',
|
|
518
|
+
Sub_Text__c: 'subtext',
|
|
519
|
+
Date_Text__c: 'datetext',
|
|
520
|
+
RecordType: {
|
|
521
|
+
Name: 'UNCONDITIONAL'
|
|
522
|
+
},
|
|
523
|
+
Question_Options__r: {
|
|
524
|
+
records: [
|
|
525
|
+
{
|
|
526
|
+
Id: '1',
|
|
527
|
+
Name: 'D',
|
|
528
|
+
Value__c: 'D',
|
|
529
|
+
Tracking_ID__c: '1234',
|
|
530
|
+
Next_Question__c: '',
|
|
531
|
+
},
|
|
532
|
+
{
|
|
533
|
+
Id: '2',
|
|
534
|
+
Name: 'CH',
|
|
535
|
+
Value__c: 'CH',
|
|
536
|
+
Tracking_ID__c: '1234',
|
|
537
|
+
Next_Question__c: '',
|
|
538
|
+
},
|
|
539
|
+
{
|
|
540
|
+
Id: '3',
|
|
541
|
+
Name: 'UK',
|
|
542
|
+
Value__c: 'UK',
|
|
543
|
+
Tracking_ID__c: '1234',
|
|
544
|
+
Next_Question__c: '',
|
|
545
|
+
}
|
|
546
|
+
]
|
|
547
|
+
}
|
|
548
|
+
},
|
|
549
|
+
{
|
|
550
|
+
Id: '171',
|
|
551
|
+
Name: 'QN-000071',
|
|
552
|
+
Type__c: 'Text',
|
|
553
|
+
Size__c: 3,
|
|
554
|
+
Allowed_File_Extensions__c: '.pdf',
|
|
555
|
+
Question_Text__c: 'PLZ',
|
|
556
|
+
Question__c: 'PLZ',
|
|
557
|
+
Tracking_ID__c: '1234',
|
|
558
|
+
Is_Optional__c: false,
|
|
559
|
+
Is_Title__c: true,
|
|
560
|
+
X24_Hours__c: false,
|
|
561
|
+
Error_Message__c: 'Please Enter a Value',
|
|
562
|
+
Is_Date_Backward__c: false,
|
|
563
|
+
Is_Date_Forward__c: false,
|
|
564
|
+
Group__c: 'Basic',
|
|
565
|
+
Time_Text__c: 'hour',
|
|
566
|
+
Title__c: 'title',
|
|
567
|
+
SubTitle__c: 'subtitle',
|
|
568
|
+
Sub_Text__c: 'subtext',
|
|
569
|
+
Date_Text__c: 'datetext',
|
|
570
|
+
RecordType: {
|
|
571
|
+
Name: 'UNCONDITIONAL'
|
|
572
|
+
}
|
|
573
|
+
},
|
|
574
|
+
{
|
|
575
|
+
Id: '172',
|
|
576
|
+
Name: 'QN-000072',
|
|
577
|
+
Type__c: 'Text',
|
|
578
|
+
Allowed_File_Extensions__c: '.pdf',
|
|
579
|
+
Tracking_ID__c: '1234',
|
|
580
|
+
Question_Text__c: 'ORT',
|
|
581
|
+
Question__c: 'ORT',
|
|
582
|
+
Is_Optional__c: false,
|
|
583
|
+
Is_Title__c: true,
|
|
584
|
+
X24_Hours__c: false,
|
|
585
|
+
Error_Message__c: 'Please Enter a Value',
|
|
586
|
+
Is_Date_Backward__c: false,
|
|
587
|
+
Is_Date_Forward__c: false,
|
|
588
|
+
Size__c: 8,
|
|
589
|
+
Group__c: 'Basic',
|
|
590
|
+
Time_Text__c: 'hour',
|
|
591
|
+
Title__c: 'title',
|
|
592
|
+
SubTitle__c: 'subtitle',
|
|
593
|
+
Sub_Text__c: 'subtext',
|
|
594
|
+
Date_Text__c: 'datetext',
|
|
595
|
+
RecordType: {
|
|
596
|
+
Name: 'UNCONDITIONAL'
|
|
597
|
+
}
|
|
598
|
+
},
|
|
599
|
+
{
|
|
600
|
+
Id: '173',
|
|
601
|
+
Name: 'QN-000073',
|
|
602
|
+
Type__c: 'Text',
|
|
603
|
+
Question_Text__c: 'StraBe',
|
|
604
|
+
Question__c: 'StraBe',
|
|
605
|
+
Tracking_ID__c: '1234',
|
|
606
|
+
Is_Optional__c: false,
|
|
607
|
+
Is_Title__c: true,
|
|
608
|
+
X24_Hours__c: false,
|
|
609
|
+
Error_Message__c: 'Please Enter a Value',
|
|
610
|
+
Is_Date_Backward__c: false,
|
|
611
|
+
Is_Date_Forward__c: false,
|
|
612
|
+
Allowed_File_Extensions__c: '.pdf',
|
|
613
|
+
Size__c: 8,
|
|
614
|
+
Group__c: 'Basic',
|
|
615
|
+
Time_Text__c: 'hour',
|
|
616
|
+
Title__c: 'title',
|
|
617
|
+
SubTitle__c: 'subtitle',
|
|
618
|
+
Sub_Text__c: 'subtext',
|
|
619
|
+
Date_Text__c: 'datetext',
|
|
620
|
+
RecordType: {
|
|
621
|
+
Name: 'UNCONDITIONAL'
|
|
622
|
+
}
|
|
623
|
+
},
|
|
624
|
+
{
|
|
625
|
+
Id: '174',
|
|
626
|
+
Name: 'QN-000074',
|
|
627
|
+
Type__c: 'Text',
|
|
628
|
+
Allowed_File_Extensions__c: '.pdf',
|
|
629
|
+
Tracking_ID__c: '1234',
|
|
630
|
+
Question_Text__c: 'Hausnummer',
|
|
631
|
+
Question__c: 'Hausnummer',
|
|
632
|
+
Is_Optional__c: false,
|
|
633
|
+
Is_Title__c: true,
|
|
634
|
+
X24_Hours__c: false,
|
|
635
|
+
Error_Message__c: 'Please Enter a Value',
|
|
636
|
+
Is_Date_Backward__c: false,
|
|
637
|
+
Is_Date_Forward__c: false,
|
|
638
|
+
Size__c: 4,
|
|
639
|
+
Group__c: 'Basic',
|
|
640
|
+
Time_Text__c: 'hour',
|
|
641
|
+
Title__c: 'title',
|
|
642
|
+
SubTitle__c: 'subtitle',
|
|
643
|
+
Sub_Text__c: 'subtext',
|
|
644
|
+
Date_Text__c: 'datetext',
|
|
645
|
+
RecordType: {
|
|
646
|
+
Name: 'UNCONDITIONAL'
|
|
647
|
+
}
|
|
648
|
+
},
|
|
649
|
+
]
|
|
650
|
+
},
|
|
651
|
+
RecordType: {
|
|
652
|
+
Name: 'CONDITIONAL'
|
|
653
|
+
},
|
|
654
|
+
};
|
|
655
|
+
|
|
656
|
+
class SalesforceService {
|
|
657
|
+
_router;
|
|
658
|
+
getSFResource = (path) => `${window['_VfResources']}${path}`;
|
|
659
|
+
getRNXTMethodName = () => `${window['_rnxtMethodName']}`;
|
|
660
|
+
remoteAction(methodName, params, resolve, reject, config) {
|
|
661
|
+
// console.log('inside SalesforceService.remoteAction for ' + methodName);
|
|
662
|
+
const self = this;
|
|
663
|
+
var nsMethodName = this.getRNXTMethodName();
|
|
664
|
+
//console.log('method name in lib = ' + nsMethodName);
|
|
665
|
+
Visualforce.remoting.Manager.invokeAction(nsMethodName,
|
|
666
|
+
//'NxtController.process',
|
|
667
|
+
//`{!$RemoteAction.NxtController.process}`,
|
|
668
|
+
...params, function (result, event) {
|
|
669
|
+
try {
|
|
670
|
+
result = JSON.parse(result);
|
|
671
|
+
}
|
|
672
|
+
catch (error) {
|
|
673
|
+
reject(error);
|
|
674
|
+
}
|
|
675
|
+
//console.log('Function called was - ' + methodName);
|
|
676
|
+
//console.log(result);
|
|
677
|
+
//console.log(resolve(result));
|
|
678
|
+
if (result.status) {
|
|
679
|
+
resolve(result);
|
|
680
|
+
}
|
|
681
|
+
else {
|
|
682
|
+
resolve(result);
|
|
683
|
+
}
|
|
684
|
+
}, config || { buffer: false, escape: false });
|
|
685
|
+
}
|
|
686
|
+
constructor(_router) {
|
|
687
|
+
this._router = _router;
|
|
688
|
+
}
|
|
689
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: SalesforceService, deps: [{ token: i3.Router }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
690
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: SalesforceService, providedIn: 'root' });
|
|
691
|
+
}
|
|
692
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: SalesforceService, decorators: [{
|
|
693
|
+
type: Injectable,
|
|
694
|
+
args: [{
|
|
695
|
+
providedIn: 'root'
|
|
696
|
+
}]
|
|
697
|
+
}], ctorParameters: function () { return [{ type: i3.Router }]; } });
|
|
698
|
+
|
|
699
|
+
class DataService {
|
|
700
|
+
http;
|
|
701
|
+
constructor(http) {
|
|
702
|
+
this.http = http;
|
|
703
|
+
}
|
|
704
|
+
getAPIData(tkn, params, resolve, reject, config) {
|
|
705
|
+
console.log('inside DataService.getAPIData for ' + tkn);
|
|
706
|
+
const self = this;
|
|
707
|
+
// Call the ShengelGo Server
|
|
708
|
+
const headers = new HttpHeaders().set('Authorization', `${tkn}`);
|
|
709
|
+
headers.append('Accept', 'application/json');
|
|
710
|
+
headers.append('Access-Control-Allow-Origin', '*');
|
|
711
|
+
// Use Shengel Go Server IP/Domain https://dev-api.shengelgo.com
|
|
712
|
+
this.http.get('https://dev-api.shengelgo.com/nxt/api/process/?dataType=' + params[0] + '&operation=' + params[1] + '¶m=' + params[2], { headers: headers, observe: 'response' })
|
|
713
|
+
.subscribe(response => {
|
|
714
|
+
if (response.status == 200) {
|
|
715
|
+
resolve(response.body);
|
|
716
|
+
}
|
|
717
|
+
else {
|
|
718
|
+
reject(response.body);
|
|
719
|
+
}
|
|
720
|
+
}, error => {
|
|
721
|
+
console.log(error.status);
|
|
722
|
+
reject(error);
|
|
723
|
+
});
|
|
724
|
+
}
|
|
725
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DataService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
726
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DataService, providedIn: 'root' });
|
|
727
|
+
}
|
|
728
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DataService, decorators: [{
|
|
729
|
+
type: Injectable,
|
|
730
|
+
args: [{
|
|
731
|
+
providedIn: 'root'
|
|
732
|
+
}]
|
|
733
|
+
}], ctorParameters: function () { return [{ type: i1.HttpClient }]; } });
|
|
734
|
+
|
|
735
|
+
class PickLocationComponent {
|
|
736
|
+
ngZone;
|
|
737
|
+
latitude = null;
|
|
738
|
+
longitude = null;
|
|
739
|
+
zoom = 10;
|
|
740
|
+
geoCoder;
|
|
741
|
+
// public formGroup: FormGroup;
|
|
742
|
+
searchElementRef;
|
|
743
|
+
showModal = false;
|
|
744
|
+
address;
|
|
745
|
+
locationSelected = new EventEmitter();
|
|
746
|
+
navigatorGeolocation;
|
|
747
|
+
markerPosition;
|
|
748
|
+
center;
|
|
749
|
+
markerOptions;
|
|
750
|
+
// center: google.maps.LatLngLiteral = { lat: 37.7749, lng: -122.4194 };
|
|
751
|
+
constructor(
|
|
752
|
+
// private mapsAPILoader: MapsAPILoader,
|
|
753
|
+
ngZone) {
|
|
754
|
+
this.ngZone = ngZone;
|
|
755
|
+
this.geoCoder = new google.maps.Geocoder();
|
|
756
|
+
// this.formGroup = this.formBuilder.group({
|
|
757
|
+
// location: [''] // Add any initial value or leave it empty
|
|
758
|
+
// });
|
|
759
|
+
}
|
|
760
|
+
ngOnInit() {
|
|
761
|
+
this.initAutocomplete();
|
|
762
|
+
}
|
|
763
|
+
initAutocomplete() {
|
|
764
|
+
if (this.geoCoder) {
|
|
765
|
+
const autocomplete = new google.maps.places.Autocomplete(this.searchElementRef?.nativeElement, {
|
|
766
|
+
types: []
|
|
767
|
+
});
|
|
768
|
+
autocomplete.addListener('place_changed', () => {
|
|
769
|
+
this.ngZone.run(() => {
|
|
770
|
+
const place = autocomplete.getPlace();
|
|
771
|
+
if (place.geometry === undefined || place.geometry === null) {
|
|
772
|
+
return;
|
|
773
|
+
}
|
|
774
|
+
this.latitude = place.geometry.location.lat();
|
|
775
|
+
this.longitude = place.geometry.location.lng();
|
|
776
|
+
this.zoom = 18;
|
|
777
|
+
this.address = place.formatted_address;
|
|
778
|
+
this.locationSelected.emit(this.address);
|
|
779
|
+
});
|
|
780
|
+
});
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
onMarkerDragEnd(event) {
|
|
784
|
+
console.log('onMarkerDragEnd', event);
|
|
785
|
+
this.latitude = event.latLng.lat();
|
|
786
|
+
this.longitude = event.latLng.lng();
|
|
787
|
+
this.getAddress(this.latitude, this.longitude);
|
|
788
|
+
}
|
|
789
|
+
onMapClick(event) {
|
|
790
|
+
console.log('onMapClick', event);
|
|
791
|
+
this.latitude = event.latLng.lat();
|
|
792
|
+
this.longitude = event.latLng.lng();
|
|
793
|
+
this.getAddress(this.latitude, this.longitude);
|
|
794
|
+
}
|
|
795
|
+
setCurrentLocation() {
|
|
796
|
+
if ('geolocation' in navigator) {
|
|
797
|
+
navigator.geolocation.getCurrentPosition((position) => {
|
|
798
|
+
this.latitude = position.coords.latitude;
|
|
799
|
+
this.longitude = position.coords.longitude;
|
|
800
|
+
this.markerOptions = {
|
|
801
|
+
draggable: true,
|
|
802
|
+
animation: google.maps.Animation.DROP
|
|
803
|
+
};
|
|
804
|
+
this.markerPosition = { lat: this.latitude, lng: this.longitude };
|
|
805
|
+
this.center = { lat: this.latitude, lng: this.longitude };
|
|
806
|
+
this.zoom = 0;
|
|
807
|
+
this.getAddress(this.latitude, this.longitude);
|
|
808
|
+
});
|
|
809
|
+
}
|
|
810
|
+
}
|
|
811
|
+
getAddress(latitude, longitude) {
|
|
812
|
+
if (this.geoCoder) {
|
|
813
|
+
this.geoCoder.geocode({ location: { lat: latitude, lng: longitude } }, (results, status) => {
|
|
814
|
+
console.log('results', results);
|
|
815
|
+
console.log('status', status);
|
|
816
|
+
if (status === 'OK') {
|
|
817
|
+
if (results[0]) {
|
|
818
|
+
// this.zoom = 18;
|
|
819
|
+
this.address = results[0].formatted_address;
|
|
820
|
+
this.locationSelected.emit(this.address);
|
|
821
|
+
}
|
|
822
|
+
else {
|
|
823
|
+
console.log('No results found');
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
else {
|
|
827
|
+
console.log('Geocoder failed due to: ' + status);
|
|
828
|
+
}
|
|
829
|
+
});
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
openMap() {
|
|
833
|
+
this.showModal = true;
|
|
834
|
+
if (!this.address) {
|
|
835
|
+
this.latitude = this.longitude = null;
|
|
836
|
+
}
|
|
837
|
+
if (!(this.latitude && this.longitude)) {
|
|
838
|
+
this.setCurrentLocation();
|
|
839
|
+
}
|
|
840
|
+
// $("#map").modal('show');
|
|
841
|
+
// console.log('lat-lan', typeof this.latitude, typeof this.longitude);
|
|
842
|
+
// if (!(this.latitude && this.longitude)) {
|
|
843
|
+
// this.setCurrentLocation();
|
|
844
|
+
// }
|
|
845
|
+
}
|
|
846
|
+
closeModal() {
|
|
847
|
+
this.showModal = false;
|
|
848
|
+
}
|
|
849
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: PickLocationComponent, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
850
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: PickLocationComponent, selector: "app-pick-location", inputs: { address: "address" }, outputs: { locationSelected: "locationSelected" }, viewQueries: [{ propertyName: "searchElementRef", first: true, predicate: ["search"], descendants: true, static: true }], ngImport: i0, template: "<div>\n <!-- <label class=\"she-label\">Location</label> -->\n <input #search class=\"she-line-input form-control\" type=\"text\" placeholder=\"Enter Location\"\n (keydown.enter)=\"$event.preventDefault()\" placeholder=\"Search Nearest Location\" autocorrect=\"off\"\n autocapitalize=\"off\" spellcheck=\"off\" type=\"text\" [(ngModel)]=\"address\"\n >\n <a (click)=\"openMap()\"\n style=\"color:#48B7FF;position:relative;top:5px;cursor: pointer;\">\n <i class=\"fa fa-location-arrow\" aria-hidden=\"true\">\n </i> Pick Location</a>\n</div>\n\n<div class=\"map-overlay\" *ngIf=\"showModal\">\n <div class=\"map-modal\">\n <div class=\"map-modal-content\">\n <div class=\"map-modal-header\">\n <h4>Pick Your Location</h4>\n <button class=\"close-button\" (click)=\"closeModal()\">X</button>\n </div>\n <!-- Modal content goes here -->\n <!-- <agm-map [latitude]=\"latitude\" [longitude]=\"longitude\" [zoom]=\"zoom\" (mapClick)=\"markerDragEnd($event)\"\n [fullscreenControl]=\"true\">\n <agm-marker [latitude]=\"latitude\" [longitude]=\"longitude\" [markerDraggable]=\"true\"\n (dragEnd)=\"markerDragEnd($event)\"></agm-marker>\n </agm-map> -->\n <google-map [latitude]=\"latitude\" [longitude]=\"longitude\" [zoom]=\"zoom\" (mapClick)=\"onMapClick($event)\">\n <map-marker [position]=\"markerPosition\" [options]=\"markerOptions\" (dragEnd)=\"onMarkerDragEnd($event)\"></map-marker>\n </google-map>\n </div>\n </div>\n</div>\n\n\n\n\n\n\n", styles: [".she-label{font-weight:400;color:#9a9a9a;padding-bottom:5px;padding-top:5px;padding-right:15px;font-size:14px}.she-line-input{border:none;background:#fff;border-bottom:1px solid #eeeeee;border-radius:0}.fa-location-arrow:before{content:\"\\f124\"}.map-container{width:auto!important}.map-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#00000080;display:flex;align-items:center;justify-content:center;z-index:1}.map-modal{width:600px;background-color:#fff;border-radius:5px;box-shadow:0 2px 4px #0003}.map-modal-header{display:flex;align-items:center;justify-content:space-between;padding:0 0 10px;background-color:#fff;border-bottom:2px solid #e5e5e5}.map-modal-header h3{margin:0}.map-modal-content{padding:20px}.close-button{border:none;cursor:pointer;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.2}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3$1.GoogleMap, selector: "google-map", inputs: ["height", "width", "mapTypeId", "center", "zoom", "options"], outputs: ["mapInitialized", "authFailure", "boundsChanged", "centerChanged", "mapClick", "mapDblclick", "mapDrag", "mapDragend", "mapDragstart", "headingChanged", "idle", "maptypeidChanged", "mapMousemove", "mapMouseout", "mapMouseover", "projectionChanged", "mapRightclick", "tilesloaded", "tiltChanged", "zoomChanged"], exportAs: ["googleMap"] }, { kind: "directive", type: i3$1.MapMarker, selector: "map-marker", inputs: ["title", "position", "label", "clickable", "options", "icon", "visible"], outputs: ["animationChanged", "mapClick", "clickableChanged", "cursorChanged", "mapDblclick", "mapDrag", "mapDragend", "draggableChanged", "mapDragstart", "flatChanged", "iconChanged", "mapMousedown", "mapMouseout", "mapMouseover", "mapMouseup", "positionChanged", "mapRightclick", "shapeChanged", "titleChanged", "visibleChanged", "zindexChanged"], exportAs: ["mapMarker"] }] });
|
|
851
|
+
}
|
|
852
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: PickLocationComponent, decorators: [{
|
|
853
|
+
type: Component,
|
|
854
|
+
args: [{ selector: 'app-pick-location', template: "<div>\n <!-- <label class=\"she-label\">Location</label> -->\n <input #search class=\"she-line-input form-control\" type=\"text\" placeholder=\"Enter Location\"\n (keydown.enter)=\"$event.preventDefault()\" placeholder=\"Search Nearest Location\" autocorrect=\"off\"\n autocapitalize=\"off\" spellcheck=\"off\" type=\"text\" [(ngModel)]=\"address\"\n >\n <a (click)=\"openMap()\"\n style=\"color:#48B7FF;position:relative;top:5px;cursor: pointer;\">\n <i class=\"fa fa-location-arrow\" aria-hidden=\"true\">\n </i> Pick Location</a>\n</div>\n\n<div class=\"map-overlay\" *ngIf=\"showModal\">\n <div class=\"map-modal\">\n <div class=\"map-modal-content\">\n <div class=\"map-modal-header\">\n <h4>Pick Your Location</h4>\n <button class=\"close-button\" (click)=\"closeModal()\">X</button>\n </div>\n <!-- Modal content goes here -->\n <!-- <agm-map [latitude]=\"latitude\" [longitude]=\"longitude\" [zoom]=\"zoom\" (mapClick)=\"markerDragEnd($event)\"\n [fullscreenControl]=\"true\">\n <agm-marker [latitude]=\"latitude\" [longitude]=\"longitude\" [markerDraggable]=\"true\"\n (dragEnd)=\"markerDragEnd($event)\"></agm-marker>\n </agm-map> -->\n <google-map [latitude]=\"latitude\" [longitude]=\"longitude\" [zoom]=\"zoom\" (mapClick)=\"onMapClick($event)\">\n <map-marker [position]=\"markerPosition\" [options]=\"markerOptions\" (dragEnd)=\"onMarkerDragEnd($event)\"></map-marker>\n </google-map>\n </div>\n </div>\n</div>\n\n\n\n\n\n\n", styles: [".she-label{font-weight:400;color:#9a9a9a;padding-bottom:5px;padding-top:5px;padding-right:15px;font-size:14px}.she-line-input{border:none;background:#fff;border-bottom:1px solid #eeeeee;border-radius:0}.fa-location-arrow:before{content:\"\\f124\"}.map-container{width:auto!important}.map-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#00000080;display:flex;align-items:center;justify-content:center;z-index:1}.map-modal{width:600px;background-color:#fff;border-radius:5px;box-shadow:0 2px 4px #0003}.map-modal-header{display:flex;align-items:center;justify-content:space-between;padding:0 0 10px;background-color:#fff;border-bottom:2px solid #e5e5e5}.map-modal-header h3{margin:0}.map-modal-content{padding:20px}.close-button{border:none;cursor:pointer;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.2}\n"] }]
|
|
855
|
+
}], ctorParameters: function () { return [{ type: i0.NgZone }]; }, propDecorators: { searchElementRef: [{
|
|
856
|
+
type: ViewChild,
|
|
857
|
+
args: ['search', { static: true }]
|
|
858
|
+
}], address: [{
|
|
859
|
+
type: Input
|
|
860
|
+
}], locationSelected: [{
|
|
861
|
+
type: Output
|
|
862
|
+
}] } });
|
|
863
|
+
|
|
864
|
+
class CustomInputComponent {
|
|
865
|
+
value; // input value
|
|
866
|
+
disabled = false; // input disabled or not
|
|
867
|
+
placeholder;
|
|
868
|
+
error;
|
|
869
|
+
fromShengel = false;
|
|
870
|
+
ngClassValue;
|
|
871
|
+
idValue;
|
|
872
|
+
focusEvent;
|
|
873
|
+
inputValue = new EventEmitter();
|
|
874
|
+
constructor() { }
|
|
875
|
+
ngOnInit() {
|
|
876
|
+
}
|
|
877
|
+
onInputChange(input) {
|
|
878
|
+
this.inputValue.emit(input.target.value);
|
|
879
|
+
}
|
|
880
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: CustomInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
881
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: CustomInputComponent, selector: "app-custom-input", inputs: { value: "value", disabled: "disabled", placeholder: "placeholder", error: "error", fromShengel: "fromShengel", ngClassValue: "ngClassValue", idValue: "idValue", focusEvent: "focusEvent" }, outputs: { inputValue: "inputValue" }, ngImport: i0, template: "<input *ngIf=\"!fromShengel\" type=\"text\" \n [(ngModel)]=\"value\"\n [ngClass]=\"ngClassValue\"\n [id]=\"idValue\"\n (focus)=\"focusEvent\"\n [style.border-color]=\"error ? 'red' : ''\"\n [placeholder]=\"placeholder\"\n (input)=\"onInputChange($event)\" />\n\n\n<input *ngIf=\"fromShengel\" class=\"input-shengel\"\n[(ngModel)]=\"value\"\n type=\"text\" \n class=\"she-line-input form-control\" \n[placeholder]=\"placeholder\"\n[disabled]=\"disabled\"\n(input)=\"onInputChange($event)\">\n<span *ngIf=\"error\" class=\"error-msg\">Required*</span>\n", styles: [".form-control[disabled]{border-radius:5px;background-color:#e9ecef!important}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
882
|
+
}
|
|
883
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: CustomInputComponent, decorators: [{
|
|
884
|
+
type: Component,
|
|
885
|
+
args: [{ selector: 'app-custom-input', template: "<input *ngIf=\"!fromShengel\" type=\"text\" \n [(ngModel)]=\"value\"\n [ngClass]=\"ngClassValue\"\n [id]=\"idValue\"\n (focus)=\"focusEvent\"\n [style.border-color]=\"error ? 'red' : ''\"\n [placeholder]=\"placeholder\"\n (input)=\"onInputChange($event)\" />\n\n\n<input *ngIf=\"fromShengel\" class=\"input-shengel\"\n[(ngModel)]=\"value\"\n type=\"text\" \n class=\"she-line-input form-control\" \n[placeholder]=\"placeholder\"\n[disabled]=\"disabled\"\n(input)=\"onInputChange($event)\">\n<span *ngIf=\"error\" class=\"error-msg\">Required*</span>\n", styles: [".form-control[disabled]{border-radius:5px;background-color:#e9ecef!important}\n"] }]
|
|
886
|
+
}], ctorParameters: function () { return []; }, propDecorators: { value: [{
|
|
887
|
+
type: Input
|
|
888
|
+
}], disabled: [{
|
|
889
|
+
type: Input
|
|
890
|
+
}], placeholder: [{
|
|
891
|
+
type: Input
|
|
892
|
+
}], error: [{
|
|
893
|
+
type: Input
|
|
894
|
+
}], fromShengel: [{
|
|
895
|
+
type: Input
|
|
896
|
+
}], ngClassValue: [{
|
|
897
|
+
type: Input
|
|
898
|
+
}], idValue: [{
|
|
899
|
+
type: Input
|
|
900
|
+
}], focusEvent: [{
|
|
901
|
+
type: Input
|
|
902
|
+
}], inputValue: [{
|
|
903
|
+
type: Output
|
|
904
|
+
}] } });
|
|
905
|
+
|
|
906
|
+
class CustomTextAreaComponent {
|
|
907
|
+
value; // input value
|
|
908
|
+
placeholder;
|
|
909
|
+
rows; //The number of visible text lines for the control
|
|
910
|
+
error;
|
|
911
|
+
textareaValueChange = new EventEmitter();
|
|
912
|
+
constructor() { }
|
|
913
|
+
ngOnInit() {
|
|
914
|
+
}
|
|
915
|
+
onTextareaChange(event) {
|
|
916
|
+
this.textareaValueChange.emit(event.target.value);
|
|
917
|
+
}
|
|
918
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: CustomTextAreaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
919
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: CustomTextAreaComponent, selector: "app-custom-text-area", inputs: { value: "value", placeholder: "placeholder", rows: "rows", error: "error" }, outputs: { textareaValueChange: "textareaValueChange" }, ngImport: i0, template: "\n<textarea \n [(ngModel)] =\"value\" \n [rows]=\"rows\" \n class=\"she-line-input form-control\" \n [placeholder]=\"placeholder\"\n (input)=\"onTextareaChange($event)\"\n></textarea>\n<span *ngIf=\"error\" class=\"error-msg\">Required*</span>", styles: [""], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
920
|
+
}
|
|
921
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: CustomTextAreaComponent, decorators: [{
|
|
922
|
+
type: Component,
|
|
923
|
+
args: [{ selector: 'app-custom-text-area', template: "\n<textarea \n [(ngModel)] =\"value\" \n [rows]=\"rows\" \n class=\"she-line-input form-control\" \n [placeholder]=\"placeholder\"\n (input)=\"onTextareaChange($event)\"\n></textarea>\n<span *ngIf=\"error\" class=\"error-msg\">Required*</span>" }]
|
|
924
|
+
}], ctorParameters: function () { return []; }, propDecorators: { value: [{
|
|
925
|
+
type: Input
|
|
926
|
+
}], placeholder: [{
|
|
927
|
+
type: Input
|
|
928
|
+
}], rows: [{
|
|
929
|
+
type: Input
|
|
930
|
+
}], error: [{
|
|
931
|
+
type: Input
|
|
932
|
+
}], textareaValueChange: [{
|
|
933
|
+
type: Output
|
|
934
|
+
}] } });
|
|
935
|
+
|
|
936
|
+
class CustomTableComponent {
|
|
937
|
+
tableHeader = '';
|
|
938
|
+
tableData;
|
|
939
|
+
tableDataChange = new EventEmitter();
|
|
940
|
+
tableIndex;
|
|
941
|
+
constructor() { }
|
|
942
|
+
ngOnInit() {
|
|
943
|
+
}
|
|
944
|
+
addRow() {
|
|
945
|
+
const newItem = {
|
|
946
|
+
label: '',
|
|
947
|
+
imageSrc: 'https://media.istockphoto.com/id/943776434/vector/fire-extinguisher-icon-vector.jpg?s=612x612&w=0&k=20&c=KVaDxuV2TV7fdwn09Tg9HeF3MNyoJC5k2YqSAzpStDY=',
|
|
948
|
+
altText: '',
|
|
949
|
+
name: '',
|
|
950
|
+
value: 'YES'
|
|
951
|
+
};
|
|
952
|
+
const updatedTableData = [...this.tableData, newItem];
|
|
953
|
+
this.tableData = updatedTableData;
|
|
954
|
+
this.emitTableDataValue(updatedTableData);
|
|
955
|
+
}
|
|
956
|
+
updateRadio(item, value) {
|
|
957
|
+
item.value = value;
|
|
958
|
+
this.emitTableDataValue(this.tableData);
|
|
959
|
+
}
|
|
960
|
+
updateLabel(rowIndex, label) {
|
|
961
|
+
this.tableData[rowIndex].label = label;
|
|
962
|
+
this.emitTableDataValue(this.tableData);
|
|
963
|
+
}
|
|
964
|
+
emitTableDataValue(updatedTableData) {
|
|
965
|
+
this.tableDataChange.emit(updatedTableData);
|
|
966
|
+
}
|
|
967
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: CustomTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
968
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: CustomTableComponent, selector: "app-custom-table", inputs: { tableHeader: "tableHeader", tableData: "tableData", tableIndex: "tableIndex" }, outputs: { tableDataChange: "tableDataChange" }, ngImport: i0, template: "<table class=\"table table-striped table-bordered\">\n <thead>\n <tr>\n <th>\n {{ tableHeader }}\n </th>\n <th class=\"permission\">\n YES\n </th>\n <th class=\"permission\">\n NO\n </th>\n <th class=\"permission\">\n NA\n </th>\n </tr>\n </thead>\n <tbody id=\"safetyMeasuresTableBody\">\n <tr *ngFor=\"let item of tableData; let i = index\">\n <td>\n <img style=\"width: 35px; height: 32px; margin-right: 5px;\" [src]=\"item.imageSrc\" [alt]=\"item.altText\">\n <input type=\"text\" [(ngModel)]=\"item.label\" (ngModelChange)=\"updateLabel(i, item.label)\" class=\"she-line-input table-input\">\n </td>\n <td class=\"permission_yes\">\n <input type=\"radio\" [name]=\"'tableRadio_' + i + '_' + tableIndex \" [ngModel]=\"item.value\" value=\"YES\" (change)=\"updateRadio(item, 'YES')\">\n </td>\n <td class=\"permission_no\">\n <input type=\"radio\" [name]=\"'tableRadio_' + i + '_' + tableIndex \" [ngModel]=\"item.value\" value=\"NO\" (change)=\"updateRadio(item, 'NO')\">\n </td>\n <td class=\"permission_na\">\n <input type=\"radio\" [name]=\"'tableRadio_' + i + '_' + tableIndex \" [ngModel]=\"item.value\" value=\"NA\" (change)=\"updateRadio(item, 'NA')\">\n </td>\n </tr>\n <tr>\n <td>\n <b>Add More</b>\n </td>\n <td colspan=\"3\" style=\"text-align: center; cursor: pointer;\" id=\"addSafety\" (click)=\"addRow()\">\n +\n </td>\n </tr>\n </tbody>\n</table>\n\n\n\n <!-- <div class=\"row\">\n <div class=\"col-lg-12 m-t-20\">\n <table class=\"table table-striped table-bordered\" style=\"text-align:center\">\n <thead>\n <tr>\n <th style=\"text-align:left\">\n Atmospheric Condition\n </th>\n <th style=\"text-align:center\">\n Test 1\n </th>\n <th style=\"text-align:center\">\n Test 2\n </th>\n <th style=\"text-align:center\">\n Test 3\n </th>\n <th style=\"text-align:center\">\n Test 4\n </th>\n </tr>\n </thead>\n <tbody id=\"atmosphericCondition\">\n <tr *ngFor=\"let item1 of tableData\">\n <td class=\"permission_yes\">\n <p style=\"text-align:left; margin-top: 9px;\">Oxygen (19.5-23.5%) {{ item.label }}</p>\n </td>\n <td class=\"permission_no\">\n <input type=\"number\" id=\"test1_oxygen\" style=\"width: 181px; height: 27px; text-align: center; border: none; background: transparent;\" placeholder=\"item.placeholder\" >\n </td>\n <td class=\"permission_na\">\n <input type=\"number\" id=\"test2_oxygen\" style=\"width: 181px; height: 27px; text-align: center; border: none; background: transparent;\" placeholder=\"item.placeholder\">\n </td>\n <td class=\"permission_no\">\n <input type=\"number\" id=\"test3_oxygen\" style=\"width: 181px; height: 27px; text-align: center; border: none; background: transparent;\" placeholder=\"item.placeholder\" >\n </td>\n <td class=\"permission_na\">\n <input type=\"number\" id=\"test4_oxygen\" style=\"width: 181px; height: 27px; text-align: center; border: none; background: transparent;\" placeholder=\"item.placeholder\">\n </td>\n </tr>\n <tr id=\"atmosphericAddmore\">\n <td style=\"text-align: left; padding: 13px 11px; cursor: pointer; margin-right: 32px;\" #add id=\"atmos\" (click)=\"add_atmospheriCondition_row(add)\">\n <b>Add More +</b>\n </td>\n <td>\n\n </td>\n <td>\n\n </td>\n <td>\n\n </td>\n <td>\n\n </td>\n </tr> \n \n <tr *ngFor=\"let item2 of tableData\">\n <td class=\"permission_yes\">\n <p style=\"text-align:left; margin-top: 9px;\">Tested By</p>\n </td>\n <td class=\"permission_na\">\n <ng-select style=\"width: 175px\" id=\"test1_tested_by\" (change)=\"onTested1Change($event)\" [items]=\"item.dropDownItems\"\n formControlName=\"test1_tested_by\" placeholder=\"---Select---\"\n >\n </ng-select>\n </td>\n <td class=\"permission_no\">\n <ng-select style=\"width: 175px\" id=\"test2_tested_by\" (change)=\"onTested2Change($event)\" [items]=\"item.dropDownItems\"\n formControlName=\"test2_tested_by\" placeholder=\"---Select---\"\n >\n </ng-select>\n </td>\n <td class=\"permission_na\">\n <ng-select style=\"width: 175px\" id=\"test3_tested_by\" (change)=\"onTested3Change($event)\" [items]=\"item.dropDownItems\"\n formControlName=\"test3_tested_by\" placeholder=\"---Select---\"\n >\n </ng-select>\n </td>\n <td class=\"permission_no\">\n <ng-select style=\"width: 175px\" id=\"test4_tested_by\" (change)=\"onTested4Change($event)\" [items]=\"item.dropDownItems\"\n formControlName=\"test4_tested_by\" placeholder=\"---Select---\"\n >\n </ng-select>\n </td>\n </tr>\n <tr>\n <td class=\"permission_yes\">\n <p style=\"text-align:left; margin-top: 9px;\">Date & Time</p>\n </td>\n <td class=\"permission_no\">\n <input [(ngModel)]=\"test1_time\" id=\"test1_time\" formControlName=\"test1_time\"\n type=\"datetime-local\"\n placeholder=\"DD/MM/YYYY HH:MM\" style=\"width: 75%;\n height: 35px;\n border:none;\n box-shadow: none;\n border-bottom: 1px solid #ccc;\">\n \n </td>\n <td class=\"permission_na\">\n <input [(ngModel)]=\"test2_time\" id=\"test2_time\" type=\"datetime-local\" formControlName=\"test2_time\"\n \n placeholder=\"DD/MM/YYYY HH:MM\" style=\"width: 75%;\n height: 35px;\n border:none;\n box-shadow: none;\n border-bottom: 1px solid #ccc;\">\n \n </td>\n <td class=\"permission_no\">\n\n <input [(ngModel)]=\"test3_time\" id=\"test3_time\" type=\"datetime-local\" formControlName=\"test3_time\"\n \n placeholder=\"DD/MM/YYYY HH:MM\" style=\"width: 75%;\n height: 35px;\n border:none;\n box-shadow: none;\n border-bottom: 1px solid #ccc;\">\n \n </td>\n <td class=\"permission_na\">\n\n <input [(ngModel)]=\"test4MinDate\" id=\"test4_time\" formControlName=\"test4_time\"\n type=\"datetime-local\"\n placeholder=\"DD/MM/YYYY HH:MM\" style=\"width: 75%;\n height: 35px;\n border:none;\n box-shadow: none;\n border-bottom: 1px solid #ccc;\">\n \n </td>\n </tr>\n <tr>\n <td class=\"permission_yes\">\n <p style=\"text-align:left; margin-top: 9px;\">Atmospheric conditions are measured periodically</p>\n </td>\n <td class=\"permission_no\">\n <label class=\"switch2\">\n <input id=\"switch-input31\" class=\"switch-input2\" (change)=\"onTestAssesment1Change($event.target.checked)\" type=\"checkbox\" [checked]=\"Certified3\" />\n <span class=\"switch-label2\" data-on=\"Safe\" data-off=\"Unsafe\"></span> \n <span class=\"switch-handle2\"></span> \n </label> \n </td>\n <td class=\"permission_na\">\n <label class=\"switch2\">\n <input id=\"switch-input4\" class=\"switch-input2\" (change)=\"onTestAssesment2Change($event.target.checked)\" type=\"checkbox\" [checked]=\"Certified4\" />\n <span class=\"switch-label2\" data-on=\"Safe\" data-off=\"Unsafe\"></span> \n <span class=\"switch-handle2\"></span> \n </label> \n </td>\n <td class=\"permission_no\">\n <label class=\"switch2\">\n <input id=\"switch-input5\" class=\"switch-input2\" (change)=\"onTestAssesment3Change($event.target.checked)\" type=\"checkbox\" [checked]=\"Certified5\" />\n <span class=\"switch-label2\" data-on=\"Safe\" data-off=\"Unsafe\"></span> \n <span class=\"switch-handle2\"></span> \n </label> \n </td>\n <td class=\"permission_na\">\n <label class=\"switch2\">\n <input id=\"switch-input6\" class=\"switch-input2\" (change)=\"onTestAssesment4Change($event.target.checked)\" type=\"checkbox\" [checked]=\"Certified6\" />\n <span class=\"switch-label2\" data-on=\"Safe\" data-off=\"Unsafe\"></span> \n <span class=\"switch-handle2\"></span> \n </label> \n </td>\n </tr>\n <tr class=\"docs\">\n <td>\n <p style=\"text-align:left; margin-top: 12px;\">Attachment</p>\n </td>\n <td style=\"width:130px;\">\n <div class=\"col-lg-3 document-cnt\" *ngFor=\"let file of test1File;let i = index;\" style=\"width:130px; margin-left: 25px; margin-bottom: 10px;\">\n <div class=\"row\" (click)=\"viewDoc(file?.doc)\" style=\"cursor: pointer;\">\n <div class=\"col-lg-3 document_image\">\n <img [src]=\"getDocIcon(file?.doc)\" style=\"margin-right: 10px;height: 40px;\">\n </div>\n <div class=\"col-lg-9 document_name\" style=\"overflow:hidden;height:35px;\">\n {{file?.name}}\n </div>\n </div>\n </div>\n <br>\n <label class=\"btn btn-primary\">\n Upload File\n <input id=\"file\" style=\"display: none;\" type=\"file\" class=\"form-control\" (change)=\"Test1File($event)\">\n </label>\n </td>\n <td style=\"width:130px;\">\n <div class=\"col-lg-3 document-cnt\" *ngFor=\"let file of test2File;let i = index;\" style=\"width:130px; margin-left: 25px; margin-bottom: 10px;\">\n <div class=\"row\" (click)=\"viewDoc(file?.doc)\" style=\"cursor: pointer;\">\n <div class=\"col-lg-3 document_image\">\n <img [src]=\"getDocIcon(file?.doc)\" style=\"margin-right: 10px;height: 40px;\">\n </div>\n <div class=\"col-lg-9 document_name\" style=\"overflow:hidden;height:35px;\">\n {{file?.name}}\n </div>\n </div>\n </div>\n <br>\n <label class=\"btn btn-primary\">\n Upload File\n <input id=\"file\" style=\"display: none;\" type=\"file\" class=\"form-control\" (change)=\"Test2File($event)\">\n </label>\n </td>\n <td style=\"width:130px;\">\n <div class=\"col-lg-3 document-cnt\" *ngFor=\"let file of test3File;let i = index;\" style=\"width:130px; margin-left: 25px; margin-bottom: 10px;\">\n <div class=\"row\" (click)=\"viewDoc(file?.doc)\" style=\"cursor: pointer;\">\n <div class=\"col-lg-3 document_image\">\n <img [src]=\"getDocIcon(file?.doc)\" style=\"margin-right: 10px;height: 40px;\">\n </div>\n <div class=\"col-lg-9 document_name\" style=\"overflow:hidden;height:35px;\">\n {{file?.name}}\n </div>\n </div>\n </div>\n <br>\n <label class=\"btn btn-primary\">\n Upload File\n <input id=\"file\" style=\"display: none;\" type=\"file\" class=\"form-control\" (change)=\"Test3File($event)\">\n </label>\n </td>\n <td style=\"width:130px;\">\n <div class=\"col-lg-3 document-cnt\" *ngFor=\"let file of test4File;let i = index;\" style=\"width:130px; margin-left: 25px; margin-bottom: 10px;\">\n <div class=\"row\" (click)=\"viewDoc(file?.doc)\" style=\"cursor: pointer;\">\n <div class=\"col-lg-3 document_image\">\n <img [src]=\"getDocIcon(file?.doc)\" style=\"margin-right: 10px;height: 40px;\">\n </div>\n <div class=\"col-lg-9 document_name\" style=\"overflow:hidden;height:35px;\">\n {{file?.name}}\n </div>\n </div>\n </div>\n <br>\n <label class=\"btn btn-primary\">\n Upload File\n <input id=\"file\" style=\"display: none;\" type=\"file\" class=\"form-control\" (change)=\"Test4File($event)\">\n </label>\n </td>\n </tr>\n \n </tbody>\n </table>\n </div>\n </div> -->\n \n\n\n\n", styles: [".table{width:100%;max-width:100%;margin-bottom:20px;border-collapse:collapse;border-spacing:0}.table-bordered{border:1px solid #ddd}thead{background-color:#03a9f4}thead th{color:#fff;font-size:14px}.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}th{text-align:left}thead .permission{text-align:center}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}tbody{color:#797979}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}tbody td{font-size:13px}.permission_yes,.permission_no,.permission_na{text-align:center}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.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: i2.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
969
|
+
}
|
|
970
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: CustomTableComponent, decorators: [{
|
|
971
|
+
type: Component,
|
|
972
|
+
args: [{ selector: 'app-custom-table', template: "<table class=\"table table-striped table-bordered\">\n <thead>\n <tr>\n <th>\n {{ tableHeader }}\n </th>\n <th class=\"permission\">\n YES\n </th>\n <th class=\"permission\">\n NO\n </th>\n <th class=\"permission\">\n NA\n </th>\n </tr>\n </thead>\n <tbody id=\"safetyMeasuresTableBody\">\n <tr *ngFor=\"let item of tableData; let i = index\">\n <td>\n <img style=\"width: 35px; height: 32px; margin-right: 5px;\" [src]=\"item.imageSrc\" [alt]=\"item.altText\">\n <input type=\"text\" [(ngModel)]=\"item.label\" (ngModelChange)=\"updateLabel(i, item.label)\" class=\"she-line-input table-input\">\n </td>\n <td class=\"permission_yes\">\n <input type=\"radio\" [name]=\"'tableRadio_' + i + '_' + tableIndex \" [ngModel]=\"item.value\" value=\"YES\" (change)=\"updateRadio(item, 'YES')\">\n </td>\n <td class=\"permission_no\">\n <input type=\"radio\" [name]=\"'tableRadio_' + i + '_' + tableIndex \" [ngModel]=\"item.value\" value=\"NO\" (change)=\"updateRadio(item, 'NO')\">\n </td>\n <td class=\"permission_na\">\n <input type=\"radio\" [name]=\"'tableRadio_' + i + '_' + tableIndex \" [ngModel]=\"item.value\" value=\"NA\" (change)=\"updateRadio(item, 'NA')\">\n </td>\n </tr>\n <tr>\n <td>\n <b>Add More</b>\n </td>\n <td colspan=\"3\" style=\"text-align: center; cursor: pointer;\" id=\"addSafety\" (click)=\"addRow()\">\n +\n </td>\n </tr>\n </tbody>\n</table>\n\n\n\n <!-- <div class=\"row\">\n <div class=\"col-lg-12 m-t-20\">\n <table class=\"table table-striped table-bordered\" style=\"text-align:center\">\n <thead>\n <tr>\n <th style=\"text-align:left\">\n Atmospheric Condition\n </th>\n <th style=\"text-align:center\">\n Test 1\n </th>\n <th style=\"text-align:center\">\n Test 2\n </th>\n <th style=\"text-align:center\">\n Test 3\n </th>\n <th style=\"text-align:center\">\n Test 4\n </th>\n </tr>\n </thead>\n <tbody id=\"atmosphericCondition\">\n <tr *ngFor=\"let item1 of tableData\">\n <td class=\"permission_yes\">\n <p style=\"text-align:left; margin-top: 9px;\">Oxygen (19.5-23.5%) {{ item.label }}</p>\n </td>\n <td class=\"permission_no\">\n <input type=\"number\" id=\"test1_oxygen\" style=\"width: 181px; height: 27px; text-align: center; border: none; background: transparent;\" placeholder=\"item.placeholder\" >\n </td>\n <td class=\"permission_na\">\n <input type=\"number\" id=\"test2_oxygen\" style=\"width: 181px; height: 27px; text-align: center; border: none; background: transparent;\" placeholder=\"item.placeholder\">\n </td>\n <td class=\"permission_no\">\n <input type=\"number\" id=\"test3_oxygen\" style=\"width: 181px; height: 27px; text-align: center; border: none; background: transparent;\" placeholder=\"item.placeholder\" >\n </td>\n <td class=\"permission_na\">\n <input type=\"number\" id=\"test4_oxygen\" style=\"width: 181px; height: 27px; text-align: center; border: none; background: transparent;\" placeholder=\"item.placeholder\">\n </td>\n </tr>\n <tr id=\"atmosphericAddmore\">\n <td style=\"text-align: left; padding: 13px 11px; cursor: pointer; margin-right: 32px;\" #add id=\"atmos\" (click)=\"add_atmospheriCondition_row(add)\">\n <b>Add More +</b>\n </td>\n <td>\n\n </td>\n <td>\n\n </td>\n <td>\n\n </td>\n <td>\n\n </td>\n </tr> \n \n <tr *ngFor=\"let item2 of tableData\">\n <td class=\"permission_yes\">\n <p style=\"text-align:left; margin-top: 9px;\">Tested By</p>\n </td>\n <td class=\"permission_na\">\n <ng-select style=\"width: 175px\" id=\"test1_tested_by\" (change)=\"onTested1Change($event)\" [items]=\"item.dropDownItems\"\n formControlName=\"test1_tested_by\" placeholder=\"---Select---\"\n >\n </ng-select>\n </td>\n <td class=\"permission_no\">\n <ng-select style=\"width: 175px\" id=\"test2_tested_by\" (change)=\"onTested2Change($event)\" [items]=\"item.dropDownItems\"\n formControlName=\"test2_tested_by\" placeholder=\"---Select---\"\n >\n </ng-select>\n </td>\n <td class=\"permission_na\">\n <ng-select style=\"width: 175px\" id=\"test3_tested_by\" (change)=\"onTested3Change($event)\" [items]=\"item.dropDownItems\"\n formControlName=\"test3_tested_by\" placeholder=\"---Select---\"\n >\n </ng-select>\n </td>\n <td class=\"permission_no\">\n <ng-select style=\"width: 175px\" id=\"test4_tested_by\" (change)=\"onTested4Change($event)\" [items]=\"item.dropDownItems\"\n formControlName=\"test4_tested_by\" placeholder=\"---Select---\"\n >\n </ng-select>\n </td>\n </tr>\n <tr>\n <td class=\"permission_yes\">\n <p style=\"text-align:left; margin-top: 9px;\">Date & Time</p>\n </td>\n <td class=\"permission_no\">\n <input [(ngModel)]=\"test1_time\" id=\"test1_time\" formControlName=\"test1_time\"\n type=\"datetime-local\"\n placeholder=\"DD/MM/YYYY HH:MM\" style=\"width: 75%;\n height: 35px;\n border:none;\n box-shadow: none;\n border-bottom: 1px solid #ccc;\">\n \n </td>\n <td class=\"permission_na\">\n <input [(ngModel)]=\"test2_time\" id=\"test2_time\" type=\"datetime-local\" formControlName=\"test2_time\"\n \n placeholder=\"DD/MM/YYYY HH:MM\" style=\"width: 75%;\n height: 35px;\n border:none;\n box-shadow: none;\n border-bottom: 1px solid #ccc;\">\n \n </td>\n <td class=\"permission_no\">\n\n <input [(ngModel)]=\"test3_time\" id=\"test3_time\" type=\"datetime-local\" formControlName=\"test3_time\"\n \n placeholder=\"DD/MM/YYYY HH:MM\" style=\"width: 75%;\n height: 35px;\n border:none;\n box-shadow: none;\n border-bottom: 1px solid #ccc;\">\n \n </td>\n <td class=\"permission_na\">\n\n <input [(ngModel)]=\"test4MinDate\" id=\"test4_time\" formControlName=\"test4_time\"\n type=\"datetime-local\"\n placeholder=\"DD/MM/YYYY HH:MM\" style=\"width: 75%;\n height: 35px;\n border:none;\n box-shadow: none;\n border-bottom: 1px solid #ccc;\">\n \n </td>\n </tr>\n <tr>\n <td class=\"permission_yes\">\n <p style=\"text-align:left; margin-top: 9px;\">Atmospheric conditions are measured periodically</p>\n </td>\n <td class=\"permission_no\">\n <label class=\"switch2\">\n <input id=\"switch-input31\" class=\"switch-input2\" (change)=\"onTestAssesment1Change($event.target.checked)\" type=\"checkbox\" [checked]=\"Certified3\" />\n <span class=\"switch-label2\" data-on=\"Safe\" data-off=\"Unsafe\"></span> \n <span class=\"switch-handle2\"></span> \n </label> \n </td>\n <td class=\"permission_na\">\n <label class=\"switch2\">\n <input id=\"switch-input4\" class=\"switch-input2\" (change)=\"onTestAssesment2Change($event.target.checked)\" type=\"checkbox\" [checked]=\"Certified4\" />\n <span class=\"switch-label2\" data-on=\"Safe\" data-off=\"Unsafe\"></span> \n <span class=\"switch-handle2\"></span> \n </label> \n </td>\n <td class=\"permission_no\">\n <label class=\"switch2\">\n <input id=\"switch-input5\" class=\"switch-input2\" (change)=\"onTestAssesment3Change($event.target.checked)\" type=\"checkbox\" [checked]=\"Certified5\" />\n <span class=\"switch-label2\" data-on=\"Safe\" data-off=\"Unsafe\"></span> \n <span class=\"switch-handle2\"></span> \n </label> \n </td>\n <td class=\"permission_na\">\n <label class=\"switch2\">\n <input id=\"switch-input6\" class=\"switch-input2\" (change)=\"onTestAssesment4Change($event.target.checked)\" type=\"checkbox\" [checked]=\"Certified6\" />\n <span class=\"switch-label2\" data-on=\"Safe\" data-off=\"Unsafe\"></span> \n <span class=\"switch-handle2\"></span> \n </label> \n </td>\n </tr>\n <tr class=\"docs\">\n <td>\n <p style=\"text-align:left; margin-top: 12px;\">Attachment</p>\n </td>\n <td style=\"width:130px;\">\n <div class=\"col-lg-3 document-cnt\" *ngFor=\"let file of test1File;let i = index;\" style=\"width:130px; margin-left: 25px; margin-bottom: 10px;\">\n <div class=\"row\" (click)=\"viewDoc(file?.doc)\" style=\"cursor: pointer;\">\n <div class=\"col-lg-3 document_image\">\n <img [src]=\"getDocIcon(file?.doc)\" style=\"margin-right: 10px;height: 40px;\">\n </div>\n <div class=\"col-lg-9 document_name\" style=\"overflow:hidden;height:35px;\">\n {{file?.name}}\n </div>\n </div>\n </div>\n <br>\n <label class=\"btn btn-primary\">\n Upload File\n <input id=\"file\" style=\"display: none;\" type=\"file\" class=\"form-control\" (change)=\"Test1File($event)\">\n </label>\n </td>\n <td style=\"width:130px;\">\n <div class=\"col-lg-3 document-cnt\" *ngFor=\"let file of test2File;let i = index;\" style=\"width:130px; margin-left: 25px; margin-bottom: 10px;\">\n <div class=\"row\" (click)=\"viewDoc(file?.doc)\" style=\"cursor: pointer;\">\n <div class=\"col-lg-3 document_image\">\n <img [src]=\"getDocIcon(file?.doc)\" style=\"margin-right: 10px;height: 40px;\">\n </div>\n <div class=\"col-lg-9 document_name\" style=\"overflow:hidden;height:35px;\">\n {{file?.name}}\n </div>\n </div>\n </div>\n <br>\n <label class=\"btn btn-primary\">\n Upload File\n <input id=\"file\" style=\"display: none;\" type=\"file\" class=\"form-control\" (change)=\"Test2File($event)\">\n </label>\n </td>\n <td style=\"width:130px;\">\n <div class=\"col-lg-3 document-cnt\" *ngFor=\"let file of test3File;let i = index;\" style=\"width:130px; margin-left: 25px; margin-bottom: 10px;\">\n <div class=\"row\" (click)=\"viewDoc(file?.doc)\" style=\"cursor: pointer;\">\n <div class=\"col-lg-3 document_image\">\n <img [src]=\"getDocIcon(file?.doc)\" style=\"margin-right: 10px;height: 40px;\">\n </div>\n <div class=\"col-lg-9 document_name\" style=\"overflow:hidden;height:35px;\">\n {{file?.name}}\n </div>\n </div>\n </div>\n <br>\n <label class=\"btn btn-primary\">\n Upload File\n <input id=\"file\" style=\"display: none;\" type=\"file\" class=\"form-control\" (change)=\"Test3File($event)\">\n </label>\n </td>\n <td style=\"width:130px;\">\n <div class=\"col-lg-3 document-cnt\" *ngFor=\"let file of test4File;let i = index;\" style=\"width:130px; margin-left: 25px; margin-bottom: 10px;\">\n <div class=\"row\" (click)=\"viewDoc(file?.doc)\" style=\"cursor: pointer;\">\n <div class=\"col-lg-3 document_image\">\n <img [src]=\"getDocIcon(file?.doc)\" style=\"margin-right: 10px;height: 40px;\">\n </div>\n <div class=\"col-lg-9 document_name\" style=\"overflow:hidden;height:35px;\">\n {{file?.name}}\n </div>\n </div>\n </div>\n <br>\n <label class=\"btn btn-primary\">\n Upload File\n <input id=\"file\" style=\"display: none;\" type=\"file\" class=\"form-control\" (change)=\"Test4File($event)\">\n </label>\n </td>\n </tr>\n \n </tbody>\n </table>\n </div>\n </div> -->\n \n\n\n\n", styles: [".table{width:100%;max-width:100%;margin-bottom:20px;border-collapse:collapse;border-spacing:0}.table-bordered{border:1px solid #ddd}thead{background-color:#03a9f4}thead th{color:#fff;font-size:14px}.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}th{text-align:left}thead .permission{text-align:center}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}tbody{color:#797979}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}tbody td{font-size:13px}.permission_yes,.permission_no,.permission_na{text-align:center}\n"] }]
|
|
973
|
+
}], ctorParameters: function () { return []; }, propDecorators: { tableHeader: [{
|
|
974
|
+
type: Input
|
|
975
|
+
}], tableData: [{
|
|
976
|
+
type: Input
|
|
977
|
+
}], tableDataChange: [{
|
|
978
|
+
type: Output
|
|
979
|
+
}], tableIndex: [{
|
|
980
|
+
type: Input
|
|
981
|
+
}] } });
|
|
982
|
+
|
|
983
|
+
class CustomDatePickerComponent {
|
|
984
|
+
date;
|
|
985
|
+
minDate;
|
|
986
|
+
maxDate;
|
|
987
|
+
dateChange = new EventEmitter();
|
|
988
|
+
dateSelected;
|
|
989
|
+
constructor() { }
|
|
990
|
+
ngOnInit() {
|
|
991
|
+
this.dateSelected = new Date(this.date);
|
|
992
|
+
}
|
|
993
|
+
onDateChange(event) {
|
|
994
|
+
this.dateChange.emit(event);
|
|
995
|
+
}
|
|
996
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: CustomDatePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
997
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: CustomDatePickerComponent, selector: "app-custom-date-picker", inputs: { date: "date", minDate: "minDate", maxDate: "maxDate" }, outputs: { dateChange: "dateChange" }, ngImport: i0, template: "<!-- <div class=\"date-picker-container\">\n <label>{{label}}</label>\n <input type=\"date\" [min]=\"minDate\" [max]=\"maxDate\" [required]=\"required\" (change)=\"onDateChanged($event)\">\n</div> -->\n<!-- <mat-form-field>\n <input matInput [matDatepicker]=\"picker\" [placeholder]=\"placeholder\" [min]=\"minDate\" [max]=\"maxDate\" [(ngModel)]=\"selectedDate\" (dateChange)=\"onDateChange($event)\">\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n</mat-form-field> -->\n\n<p>\n <input class=\"input-shengel\"\n [(ngModel)]=\"dateSelected\" \n [owlDateTimeTrigger]=\"dt\" \n [owlDateTime]=\"dt\" \n [min]=\"minDate\"\n placeholder=\"DD/MM/YYYY HH:MM\"\n style=\"width: 100%; height: 35px; border: none; box-shadow: none; border-bottom: 1px solid #ccc;\"\n (dateTimeChange)=\"onDateChange($event)\">\n <owl-date-time #dt></owl-date-time>\n</p>\n ", styles: [""], dependencies: [{ kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2$1.OwlDateTimeTriggerDirective, selector: "[owlDateTimeTrigger]", inputs: ["disabled", "owlDateTimeTrigger"] }, { kind: "directive", type: i2$1.OwlDateTimeInputDirective, selector: "input[owlDateTime]", inputs: ["rangeSeparator", "owlDateTime", "owlDateTimeFilter", "min", "max", "selectMode", "value", "values", "_disabled"], outputs: ["dateTimeChange", "dateTimeInput"], exportAs: ["owlDateTimeInput"] }, { kind: "component", type: i2$1.OwlDateTimeComponent, selector: "owl-date-time", inputs: ["startAt", "pickerType", "pickerMode", "disabled", "opened", "backdropClass", "panelClass", "scrollStrategy"], outputs: ["afterPickerClosed", "afterPickerOpen", "yearSelected", "monthSelected"], exportAs: ["owlDateTime"] }] });
|
|
998
|
+
}
|
|
999
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: CustomDatePickerComponent, decorators: [{
|
|
1000
|
+
type: Component,
|
|
1001
|
+
args: [{ selector: 'app-custom-date-picker', template: "<!-- <div class=\"date-picker-container\">\n <label>{{label}}</label>\n <input type=\"date\" [min]=\"minDate\" [max]=\"maxDate\" [required]=\"required\" (change)=\"onDateChanged($event)\">\n</div> -->\n<!-- <mat-form-field>\n <input matInput [matDatepicker]=\"picker\" [placeholder]=\"placeholder\" [min]=\"minDate\" [max]=\"maxDate\" [(ngModel)]=\"selectedDate\" (dateChange)=\"onDateChange($event)\">\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n</mat-form-field> -->\n\n<p>\n <input class=\"input-shengel\"\n [(ngModel)]=\"dateSelected\" \n [owlDateTimeTrigger]=\"dt\" \n [owlDateTime]=\"dt\" \n [min]=\"minDate\"\n placeholder=\"DD/MM/YYYY HH:MM\"\n style=\"width: 100%; height: 35px; border: none; box-shadow: none; border-bottom: 1px solid #ccc;\"\n (dateTimeChange)=\"onDateChange($event)\">\n <owl-date-time #dt></owl-date-time>\n</p>\n " }]
|
|
1002
|
+
}], ctorParameters: function () { return []; }, propDecorators: { date: [{
|
|
1003
|
+
type: Input
|
|
1004
|
+
}], minDate: [{
|
|
1005
|
+
type: Input
|
|
1006
|
+
}], maxDate: [{
|
|
1007
|
+
type: Input
|
|
1008
|
+
}], dateChange: [{
|
|
1009
|
+
type: Output
|
|
1010
|
+
}] } });
|
|
1011
|
+
|
|
1012
|
+
class DropdownWithFlagComponent {
|
|
1013
|
+
certified = false;
|
|
1014
|
+
// @Input() getValue:string = '';
|
|
1015
|
+
JobPerformerCertificates = [];
|
|
1016
|
+
flagDropDownChange = new EventEmitter();
|
|
1017
|
+
selectedValue = '';
|
|
1018
|
+
constructor() { }
|
|
1019
|
+
ngOnInit() {
|
|
1020
|
+
}
|
|
1021
|
+
ngOnChanges() {
|
|
1022
|
+
this.selectedValue = null;
|
|
1023
|
+
}
|
|
1024
|
+
onJobPerformerCertified(event) {
|
|
1025
|
+
this.flagDropDownChange.emit(event);
|
|
1026
|
+
}
|
|
1027
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DropdownWithFlagComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1028
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: DropdownWithFlagComponent, selector: "app-dropdown-with-flag", inputs: { certified: "certified", JobPerformerCertificates: "JobPerformerCertificates" }, outputs: { flagDropDownChange: "flagDropDownChange" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"she-title\">\n <label class=\"switch\">\n <input class=\"switch-input\" type=\"checkbox\" disabled=\"true\" [checked]=\"certified\"/>\n <span class=\"switch-label\" data-on=\"Certified\" data-off=\"Not Certified\"></span> \n <span class=\"switch-handle\"></span> \n </label> \n <ng-select *ngIf=\"certified\"\n style=\"margin-left: 36px; width: 205px; margin-bottom: 8px;\" \n [items]=\"JobPerformerCertificates\"\n [(ngModel)]=\"selectedValue\"\n (change)=\"onJobPerformerCertified($event)\"\n placeholder=\"---Select---\">\n </ng-select>\n </div> ", styles: [".she-title{display:flex;flex-direction:row;align-items:center}.switch{position:relative;width:105px;height:23px;margin-left:5px;margin-top:3px;background:linear-gradient(to bottom,#eeeeee,#FFFFFF 25px);background-image:-webkit-linear-gradient(top,#eeeeee,#FFFFFF 25px);border-radius:18px;box-shadow:inset 0 -1px #fff,inset 0 1px 1px #0000000d;cursor:pointer}.switch-input{position:absolute;top:0;left:0;opacity:0}.switch-label{position:relative;display:block;height:inherit;font-size:12px;background:#eceeef;border-radius:inherit;box-shadow:inset 0 1px 2px #0000001f,inset 0 0 2px #00000026}.switch-label:before,.switch-label:after{position:absolute;top:50%;margin-top:-.5em;line-height:1;transition:inherit}.switch-label:before{content:attr(data-off);right:11px;color:#aaa;text-shadow:0 1px rgba(255,255,255,.5)}.switch-label:after{content:attr(data-on);left:11px;color:#fff;text-shadow:0 1px rgba(0,0,0,.2);opacity:0}.switch-input:checked~.switch-label{background:#03a9f4;border-color:#03a9f4;box-shadow:inset 0 1px 2px #00000026,inset 0 0 3px #0003}.switch-input:checked~.switch-label:before{opacity:0}.switch-input:checked~.switch-label:after{opacity:1}.switch-handle{position:absolute;top:0;left:0;width:19px;height:22px;background:linear-gradient(to bottom,#FFFFFF 40%,#f0f0f0);background-image:-webkit-linear-gradient(top,#FFFFFF 40%,#f0f0f0);border-radius:100%;box-shadow:1px 1px 5px #0003}.switch-handle:before{content:\"\";position:absolute;top:50%;left:50%;margin:-6px 0 0 -6px;width:12px;height:12px;background:linear-gradient(to bottom,#eeeeee,#FFFFFF);background-image:-webkit-linear-gradient(top,#eeeeee,#FFFFFF);border-radius:6px;box-shadow:inset 0 1px #00000005}.switch-input:checked~.switch-handle{left:86px;box-shadow:-1px 1px 5px #0003;border:2px solid aquamarine}.switch-label,.switch-handle{transition:All .3s ease;-webkit-transition:All .3s ease;-moz-transition:All .3s ease;-o-transition:All .3s ease}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.NgSelectComponent, selector: "ng-select", inputs: ["markFirst", "dropdownPosition", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "bufferAmount", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "readonly", "searchWhileComposing", "minTermLength", "keyDownFn", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd", "bindLabel", "placeholder", "notFoundText", "typeToSearchText", "addTagText", "loadingText", "clearAllText", "virtualScroll", "openOnEnter", "appendTo", "bindValue", "appearance", "maxSelectedItems", "groupBy", "groupValue", "tabIndex", "typeahead"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }] });
|
|
1029
|
+
}
|
|
1030
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DropdownWithFlagComponent, decorators: [{
|
|
1031
|
+
type: Component,
|
|
1032
|
+
args: [{ selector: 'app-dropdown-with-flag', template: "<div class=\"she-title\">\n <label class=\"switch\">\n <input class=\"switch-input\" type=\"checkbox\" disabled=\"true\" [checked]=\"certified\"/>\n <span class=\"switch-label\" data-on=\"Certified\" data-off=\"Not Certified\"></span> \n <span class=\"switch-handle\"></span> \n </label> \n <ng-select *ngIf=\"certified\"\n style=\"margin-left: 36px; width: 205px; margin-bottom: 8px;\" \n [items]=\"JobPerformerCertificates\"\n [(ngModel)]=\"selectedValue\"\n (change)=\"onJobPerformerCertified($event)\"\n placeholder=\"---Select---\">\n </ng-select>\n </div> ", styles: [".she-title{display:flex;flex-direction:row;align-items:center}.switch{position:relative;width:105px;height:23px;margin-left:5px;margin-top:3px;background:linear-gradient(to bottom,#eeeeee,#FFFFFF 25px);background-image:-webkit-linear-gradient(top,#eeeeee,#FFFFFF 25px);border-radius:18px;box-shadow:inset 0 -1px #fff,inset 0 1px 1px #0000000d;cursor:pointer}.switch-input{position:absolute;top:0;left:0;opacity:0}.switch-label{position:relative;display:block;height:inherit;font-size:12px;background:#eceeef;border-radius:inherit;box-shadow:inset 0 1px 2px #0000001f,inset 0 0 2px #00000026}.switch-label:before,.switch-label:after{position:absolute;top:50%;margin-top:-.5em;line-height:1;transition:inherit}.switch-label:before{content:attr(data-off);right:11px;color:#aaa;text-shadow:0 1px rgba(255,255,255,.5)}.switch-label:after{content:attr(data-on);left:11px;color:#fff;text-shadow:0 1px rgba(0,0,0,.2);opacity:0}.switch-input:checked~.switch-label{background:#03a9f4;border-color:#03a9f4;box-shadow:inset 0 1px 2px #00000026,inset 0 0 3px #0003}.switch-input:checked~.switch-label:before{opacity:0}.switch-input:checked~.switch-label:after{opacity:1}.switch-handle{position:absolute;top:0;left:0;width:19px;height:22px;background:linear-gradient(to bottom,#FFFFFF 40%,#f0f0f0);background-image:-webkit-linear-gradient(top,#FFFFFF 40%,#f0f0f0);border-radius:100%;box-shadow:1px 1px 5px #0003}.switch-handle:before{content:\"\";position:absolute;top:50%;left:50%;margin:-6px 0 0 -6px;width:12px;height:12px;background:linear-gradient(to bottom,#eeeeee,#FFFFFF);background-image:-webkit-linear-gradient(top,#eeeeee,#FFFFFF);border-radius:6px;box-shadow:inset 0 1px #00000005}.switch-input:checked~.switch-handle{left:86px;box-shadow:-1px 1px 5px #0003;border:2px solid aquamarine}.switch-label,.switch-handle{transition:All .3s ease;-webkit-transition:All .3s ease;-moz-transition:All .3s ease;-o-transition:All .3s ease}\n"] }]
|
|
1033
|
+
}], ctorParameters: function () { return []; }, propDecorators: { certified: [{
|
|
1034
|
+
type: Input
|
|
1035
|
+
}], JobPerformerCertificates: [{
|
|
1036
|
+
type: Input
|
|
1037
|
+
}], flagDropDownChange: [{
|
|
1038
|
+
type: Output
|
|
1039
|
+
}] } });
|
|
1040
|
+
|
|
1041
|
+
class CustomDropdownComponent {
|
|
1042
|
+
http;
|
|
1043
|
+
options;
|
|
1044
|
+
placeholder;
|
|
1045
|
+
apiMeta;
|
|
1046
|
+
selectedValue;
|
|
1047
|
+
progressBar;
|
|
1048
|
+
id;
|
|
1049
|
+
errorMessage;
|
|
1050
|
+
error;
|
|
1051
|
+
fromShengel = false;
|
|
1052
|
+
valueChange = new EventEmitter();
|
|
1053
|
+
constructor(http) {
|
|
1054
|
+
this.http = http;
|
|
1055
|
+
}
|
|
1056
|
+
ngOnInit() {
|
|
1057
|
+
console.log('inside oninit of custom-dropdown of ' + this.id);
|
|
1058
|
+
// console.log(this.apiMeta);
|
|
1059
|
+
if (this.apiMeta !== undefined) {
|
|
1060
|
+
this.options = [];
|
|
1061
|
+
let apiObj = JSON.parse(this.apiMeta);
|
|
1062
|
+
this.apiResponse(apiObj.endpoint).subscribe((apiResponse) => {
|
|
1063
|
+
let responses = apiResponse[apiObj.variable];
|
|
1064
|
+
let results = [];
|
|
1065
|
+
for (let i = 0; i < responses.length; i++) {
|
|
1066
|
+
var resp = responses[i];
|
|
1067
|
+
// console.log(resp);
|
|
1068
|
+
results.push(resp[apiObj.field]);
|
|
1069
|
+
}
|
|
1070
|
+
this.options = results;
|
|
1071
|
+
});
|
|
1072
|
+
}
|
|
1073
|
+
}
|
|
1074
|
+
apiResponse(endpoint) {
|
|
1075
|
+
return this.http.get(endpoint);
|
|
1076
|
+
}
|
|
1077
|
+
selectChange(event) {
|
|
1078
|
+
this.valueChange.emit(event);
|
|
1079
|
+
}
|
|
1080
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: CustomDropdownComponent, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Component });
|
|
1081
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: CustomDropdownComponent, selector: "app-custom-dropdown", inputs: { options: "options", placeholder: "placeholder", apiMeta: "apiMeta", selectedValue: "selectedValue", progressBar: "progressBar", id: "id", errorMessage: "errorMessage", error: "error", fromShengel: "fromShengel" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: "<select *ngIf=\"!fromShengel\"\n [ngClass]=\"{\n 'dt-line dpDown down myt-dropbox myt-border-r myt-font1': progressBar,\n 'custom-select': !progressBar\n }\" class=\"custom-select mr-sm-2 dd-height\" \n [id]=\"id\" \n [(ngModel)]=\"selectedValue\"\n (change)=\"selectChange($event.target.value);\" \n [style.borderColor]=\"error ? 'red' : '#858585'\"\n [style.color]=\"error ? 'red' : ''\">\n <option *ngFor=\"let option of options\" [value]=\"option.Value__c\" class=\"option\">{{ option.Value__c }}</option>\n <option *ngIf=\"errorMessage\" value=\"\" disabled hidden>{{ errorMessage }}</option>\n</select>\n\n<ng-select *ngIf=\"fromShengel\"\n class=\"shengel-custom-select\"\n[(ngModel)]=\"selectedValue\" \n[placeholder]=\"placeholder\"\n(change)=\"selectChange($event)\"\n[id]=\"id\"\n >\n<ng-option *ngFor=\"let option of options\" [value]=\"option\">{{ option }}</ng-option>\n<ng-option *ngIf=\"errorMessage\" value=\"\" disabled hidden>{{ errorMessage }}</ng-option>\n</ng-select>\n<span *ngIf=\"error && fromShengel\" class=\"error-msg\">Required*</span>", styles: [".ng-select{width:100%}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.NgSelectComponent, selector: "ng-select", inputs: ["markFirst", "dropdownPosition", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "bufferAmount", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "readonly", "searchWhileComposing", "minTermLength", "keyDownFn", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd", "bindLabel", "placeholder", "notFoundText", "typeToSearchText", "addTagText", "loadingText", "clearAllText", "virtualScroll", "openOnEnter", "appendTo", "bindValue", "appearance", "maxSelectedItems", "groupBy", "groupValue", "tabIndex", "typeahead"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }, { kind: "component", type: i4.ɵr, selector: "ng-option", inputs: ["disabled", "value"] }] });
|
|
1082
|
+
}
|
|
1083
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: CustomDropdownComponent, decorators: [{
|
|
1084
|
+
type: Component,
|
|
1085
|
+
args: [{ selector: 'app-custom-dropdown', template: "<select *ngIf=\"!fromShengel\"\n [ngClass]=\"{\n 'dt-line dpDown down myt-dropbox myt-border-r myt-font1': progressBar,\n 'custom-select': !progressBar\n }\" class=\"custom-select mr-sm-2 dd-height\" \n [id]=\"id\" \n [(ngModel)]=\"selectedValue\"\n (change)=\"selectChange($event.target.value);\" \n [style.borderColor]=\"error ? 'red' : '#858585'\"\n [style.color]=\"error ? 'red' : ''\">\n <option *ngFor=\"let option of options\" [value]=\"option.Value__c\" class=\"option\">{{ option.Value__c }}</option>\n <option *ngIf=\"errorMessage\" value=\"\" disabled hidden>{{ errorMessage }}</option>\n</select>\n\n<ng-select *ngIf=\"fromShengel\"\n class=\"shengel-custom-select\"\n[(ngModel)]=\"selectedValue\" \n[placeholder]=\"placeholder\"\n(change)=\"selectChange($event)\"\n[id]=\"id\"\n >\n<ng-option *ngFor=\"let option of options\" [value]=\"option\">{{ option }}</ng-option>\n<ng-option *ngIf=\"errorMessage\" value=\"\" disabled hidden>{{ errorMessage }}</ng-option>\n</ng-select>\n<span *ngIf=\"error && fromShengel\" class=\"error-msg\">Required*</span>", styles: [".ng-select{width:100%}\n"] }]
|
|
1086
|
+
}], ctorParameters: function () { return [{ type: i1.HttpClient }]; }, propDecorators: { options: [{
|
|
1087
|
+
type: Input
|
|
1088
|
+
}], placeholder: [{
|
|
1089
|
+
type: Input
|
|
1090
|
+
}], apiMeta: [{
|
|
1091
|
+
type: Input
|
|
1092
|
+
}], selectedValue: [{
|
|
1093
|
+
type: Input
|
|
1094
|
+
}], progressBar: [{
|
|
1095
|
+
type: Input
|
|
1096
|
+
}], id: [{
|
|
1097
|
+
type: Input
|
|
1098
|
+
}], errorMessage: [{
|
|
1099
|
+
type: Input
|
|
1100
|
+
}], error: [{
|
|
1101
|
+
type: Input
|
|
1102
|
+
}], fromShengel: [{
|
|
1103
|
+
type: Input
|
|
1104
|
+
}], valueChange: [{
|
|
1105
|
+
type: Output
|
|
1106
|
+
}] } });
|
|
1107
|
+
|
|
1108
|
+
class QuestionnaireComponent {
|
|
1109
|
+
sfService;
|
|
1110
|
+
dataService;
|
|
1111
|
+
route;
|
|
1112
|
+
sanitizer;
|
|
1113
|
+
spinner;
|
|
1114
|
+
_formBuilder;
|
|
1115
|
+
deviceService;
|
|
1116
|
+
qbId;
|
|
1117
|
+
insuranceStartDate;
|
|
1118
|
+
serv;
|
|
1119
|
+
tkn;
|
|
1120
|
+
handleEvent = new EventEmitter();
|
|
1121
|
+
handlePage = new EventEmitter();
|
|
1122
|
+
params;
|
|
1123
|
+
deviceInfo = null;
|
|
1124
|
+
abItem;
|
|
1125
|
+
qbItem;
|
|
1126
|
+
questionItem;
|
|
1127
|
+
answerWrap;
|
|
1128
|
+
// CONDITIONAL TYPES
|
|
1129
|
+
radioFlag = false;
|
|
1130
|
+
dataFlag = false;
|
|
1131
|
+
// OPTIONONLY TYPES
|
|
1132
|
+
dropdownFlag = false;
|
|
1133
|
+
checkboxFlag = false;
|
|
1134
|
+
// UNCONDITIONAL TYPES
|
|
1135
|
+
textFlag = false;
|
|
1136
|
+
taFlag = false;
|
|
1137
|
+
dtFlag = false;
|
|
1138
|
+
timeFlag = false;
|
|
1139
|
+
dateFlag = false;
|
|
1140
|
+
fileFlag = false;
|
|
1141
|
+
emailFlag = false;
|
|
1142
|
+
numberFlag = false;
|
|
1143
|
+
alphanumericFlag = false;
|
|
1144
|
+
bookFlag = false;
|
|
1145
|
+
listFlag = false;
|
|
1146
|
+
//Back button
|
|
1147
|
+
backButtonFlag = false;
|
|
1148
|
+
optionValues = [];
|
|
1149
|
+
subQuestions = [];
|
|
1150
|
+
inpValue;
|
|
1151
|
+
answerMap = new Map();
|
|
1152
|
+
dateMap = new Map();
|
|
1153
|
+
selectedhourMap = new Map();
|
|
1154
|
+
selectedminuteMap = new Map();
|
|
1155
|
+
attachmentsMap = new Map();
|
|
1156
|
+
sqOptions = new Map();
|
|
1157
|
+
subAnsMap = new Map();
|
|
1158
|
+
localSubQuestions = [];
|
|
1159
|
+
questionStack = [];
|
|
1160
|
+
questionName = [];
|
|
1161
|
+
attachments = [];
|
|
1162
|
+
attachmentIdList = [];
|
|
1163
|
+
attachmentId = "";
|
|
1164
|
+
attachment;
|
|
1165
|
+
allowedFileExtension;
|
|
1166
|
+
fileExceededLimit = false;
|
|
1167
|
+
fileTypeIncorrect = false;
|
|
1168
|
+
back = false;
|
|
1169
|
+
backicon = false;
|
|
1170
|
+
check;
|
|
1171
|
+
pop;
|
|
1172
|
+
localDate;
|
|
1173
|
+
currentName;
|
|
1174
|
+
pathquestion;
|
|
1175
|
+
percent;
|
|
1176
|
+
count;
|
|
1177
|
+
taFocusOut = false;
|
|
1178
|
+
notValidAccNum = false;
|
|
1179
|
+
splCCBackClick = false;
|
|
1180
|
+
summary = [];
|
|
1181
|
+
localSubQMap = new Map();
|
|
1182
|
+
keyIndex = 0;
|
|
1183
|
+
//public sques: string;
|
|
1184
|
+
selDate = {};
|
|
1185
|
+
selectDate;
|
|
1186
|
+
today = new Date();
|
|
1187
|
+
el;
|
|
1188
|
+
innerhtml;
|
|
1189
|
+
possibilities;
|
|
1190
|
+
innerhtml1;
|
|
1191
|
+
summaryData = [];
|
|
1192
|
+
tableData1 = [
|
|
1193
|
+
{
|
|
1194
|
+
label: 'Fire Extinguisher',
|
|
1195
|
+
imageSrc: 'https://media.istockphoto.com/id/943776434/vector/fire-extinguisher-icon-vector.jpg?s=612x612&w=0&k=20&c=KVaDxuV2TV7fdwn09Tg9HeF3MNyoJC5k2YqSAzpStDY=',
|
|
1196
|
+
altText: 'extinguisher',
|
|
1197
|
+
name: 'FireEstinguisher',
|
|
1198
|
+
value: 'YES'
|
|
1199
|
+
},
|
|
1200
|
+
{
|
|
1201
|
+
label: ' Fire Blanket',
|
|
1202
|
+
imageSrc: 'https://media.istockphoto.com/id/943776434/vector/fire-extinguisher-icon-vector.jpg?s=612x612&w=0&k=20&c=KVaDxuV2TV7fdwn09Tg9HeF3MNyoJC5k2YqSAzpStDY=',
|
|
1203
|
+
altText: 'fireBlanket',
|
|
1204
|
+
name: 'fireBlanket',
|
|
1205
|
+
value: 'YES'
|
|
1206
|
+
},
|
|
1207
|
+
{
|
|
1208
|
+
label: 'Illumination',
|
|
1209
|
+
imageSrc: 'https://media.istockphoto.com/id/943776434/vector/fire-extinguisher-icon-vector.jpg?s=612x612&w=0&k=20&c=KVaDxuV2TV7fdwn09Tg9HeF3MNyoJC5k2YqSAzpStDY=',
|
|
1210
|
+
altText: 'fireBlailluminationnket',
|
|
1211
|
+
name: 'illumination',
|
|
1212
|
+
value: 'YES'
|
|
1213
|
+
},
|
|
1214
|
+
{
|
|
1215
|
+
label: 'Ventilation',
|
|
1216
|
+
imageSrc: 'https://media.istockphoto.com/id/943776434/vector/fire-extinguisher-icon-vector.jpg?s=612x612&w=0&k=20&c=KVaDxuV2TV7fdwn09Tg9HeF3MNyoJC5k2YqSAzpStDY=',
|
|
1217
|
+
altText: 'Ventilation',
|
|
1218
|
+
name: 'Ventilation',
|
|
1219
|
+
value: 'YES'
|
|
1220
|
+
}
|
|
1221
|
+
];
|
|
1222
|
+
tableData2 = [
|
|
1223
|
+
{
|
|
1224
|
+
label: 'Head Protection',
|
|
1225
|
+
imageSrc: 'https://media.istockphoto.com/id/943776434/vector/fire-extinguisher-icon-vector.jpg?s=612x612&w=0&k=20&c=KVaDxuV2TV7fdwn09Tg9HeF3MNyoJC5k2YqSAzpStDY=',
|
|
1226
|
+
altText: 'extinguisher',
|
|
1227
|
+
name: 'check1',
|
|
1228
|
+
value: 'YES'
|
|
1229
|
+
},
|
|
1230
|
+
{
|
|
1231
|
+
label: 'Welding Hood',
|
|
1232
|
+
imageSrc: 'https://media.istockphoto.com/id/943776434/vector/fire-extinguisher-icon-vector.jpg?s=612x612&w=0&k=20&c=KVaDxuV2TV7fdwn09Tg9HeF3MNyoJC5k2YqSAzpStDY=',
|
|
1233
|
+
altText: 'fireBlanket',
|
|
1234
|
+
name: 'check2',
|
|
1235
|
+
value: 'YES'
|
|
1236
|
+
},
|
|
1237
|
+
{
|
|
1238
|
+
label: 'Eye Protection',
|
|
1239
|
+
imageSrc: 'https://media.istockphoto.com/id/943776434/vector/fire-extinguisher-icon-vector.jpg?s=612x612&w=0&k=20&c=KVaDxuV2TV7fdwn09Tg9HeF3MNyoJC5k2YqSAzpStDY=',
|
|
1240
|
+
altText: 'Protection',
|
|
1241
|
+
name: 'Protection',
|
|
1242
|
+
value: 'YES'
|
|
1243
|
+
},
|
|
1244
|
+
{
|
|
1245
|
+
label: 'Hearing Protection',
|
|
1246
|
+
imageSrc: 'https://media.istockphoto.com/id/943776434/vector/fire-extinguisher-icon-vector.jpg?s=612x612&w=0&k=20&c=KVaDxuV2TV7fdwn09Tg9HeF3MNyoJC5k2YqSAzpStDY=',
|
|
1247
|
+
altText: 'Hearing',
|
|
1248
|
+
name: 'Hearing',
|
|
1249
|
+
value: 'YES'
|
|
1250
|
+
}
|
|
1251
|
+
];
|
|
1252
|
+
hours = [
|
|
1253
|
+
"01",
|
|
1254
|
+
"02",
|
|
1255
|
+
"03",
|
|
1256
|
+
"04",
|
|
1257
|
+
"05",
|
|
1258
|
+
"06",
|
|
1259
|
+
"07",
|
|
1260
|
+
"08",
|
|
1261
|
+
"09",
|
|
1262
|
+
"10",
|
|
1263
|
+
"11",
|
|
1264
|
+
"12",
|
|
1265
|
+
];
|
|
1266
|
+
minutes = [
|
|
1267
|
+
"00",
|
|
1268
|
+
"01",
|
|
1269
|
+
"02",
|
|
1270
|
+
"03",
|
|
1271
|
+
"04",
|
|
1272
|
+
"05",
|
|
1273
|
+
"06",
|
|
1274
|
+
"07",
|
|
1275
|
+
"08",
|
|
1276
|
+
"09",
|
|
1277
|
+
"10",
|
|
1278
|
+
"11",
|
|
1279
|
+
"12",
|
|
1280
|
+
"13",
|
|
1281
|
+
"14",
|
|
1282
|
+
"15",
|
|
1283
|
+
"16",
|
|
1284
|
+
"17",
|
|
1285
|
+
"18",
|
|
1286
|
+
"19",
|
|
1287
|
+
"20",
|
|
1288
|
+
"21",
|
|
1289
|
+
"22",
|
|
1290
|
+
"23",
|
|
1291
|
+
"24",
|
|
1292
|
+
"25",
|
|
1293
|
+
"26",
|
|
1294
|
+
"27",
|
|
1295
|
+
"28",
|
|
1296
|
+
"29",
|
|
1297
|
+
"30",
|
|
1298
|
+
"31",
|
|
1299
|
+
"32",
|
|
1300
|
+
"33",
|
|
1301
|
+
"34",
|
|
1302
|
+
"35",
|
|
1303
|
+
"36",
|
|
1304
|
+
"37",
|
|
1305
|
+
"38",
|
|
1306
|
+
"39",
|
|
1307
|
+
"40",
|
|
1308
|
+
"41",
|
|
1309
|
+
"42",
|
|
1310
|
+
"43",
|
|
1311
|
+
"44",
|
|
1312
|
+
"45",
|
|
1313
|
+
"46",
|
|
1314
|
+
"47",
|
|
1315
|
+
"48",
|
|
1316
|
+
"49",
|
|
1317
|
+
"50",
|
|
1318
|
+
"51",
|
|
1319
|
+
"52",
|
|
1320
|
+
"53",
|
|
1321
|
+
"54",
|
|
1322
|
+
"55",
|
|
1323
|
+
"56",
|
|
1324
|
+
"57",
|
|
1325
|
+
"58",
|
|
1326
|
+
"59",
|
|
1327
|
+
];
|
|
1328
|
+
selectedHour = "";
|
|
1329
|
+
selectedMinute = "";
|
|
1330
|
+
selectedMeridiem = "";
|
|
1331
|
+
valueName = "";
|
|
1332
|
+
valueName1 = "";
|
|
1333
|
+
bookFlagAccept;
|
|
1334
|
+
recordId;
|
|
1335
|
+
currentQuestionId;
|
|
1336
|
+
spinnerType;
|
|
1337
|
+
spinnerName;
|
|
1338
|
+
nextValue = '';
|
|
1339
|
+
start_date;
|
|
1340
|
+
//search component
|
|
1341
|
+
tempoAddress = [];
|
|
1342
|
+
selectedValue;
|
|
1343
|
+
selectedPostalcode;
|
|
1344
|
+
selectedProvince;
|
|
1345
|
+
selectedCity;
|
|
1346
|
+
selectedArea;
|
|
1347
|
+
localaddress = [];
|
|
1348
|
+
allAddress = [];
|
|
1349
|
+
PostalCode;
|
|
1350
|
+
places = [];
|
|
1351
|
+
province = [];
|
|
1352
|
+
// REQ-01 PROGRESS BAR
|
|
1353
|
+
progressStyle = "0%";
|
|
1354
|
+
answerCount = 0;
|
|
1355
|
+
indexCount = 0;
|
|
1356
|
+
addFlag = true;
|
|
1357
|
+
myDatePickerOptions = {};
|
|
1358
|
+
individualBookButton;
|
|
1359
|
+
constructor(sfService, dataService, route, sanitizer, spinner, _formBuilder,
|
|
1360
|
+
//private dbService: NgxIndexedDBService,
|
|
1361
|
+
deviceService, el) {
|
|
1362
|
+
this.sfService = sfService;
|
|
1363
|
+
this.dataService = dataService;
|
|
1364
|
+
this.route = route;
|
|
1365
|
+
this.sanitizer = sanitizer;
|
|
1366
|
+
this.spinner = spinner;
|
|
1367
|
+
this._formBuilder = _formBuilder;
|
|
1368
|
+
this.deviceService = deviceService;
|
|
1369
|
+
this.spinnerName = "sp1";
|
|
1370
|
+
this.spinnerType = "ball-spin-clockwise";
|
|
1371
|
+
}
|
|
1372
|
+
onDateChanged(event) {
|
|
1373
|
+
//console.log('Inside the onDateChanged');
|
|
1374
|
+
//to change the border color
|
|
1375
|
+
if (this.qbItem.Progress_Bar__c) {
|
|
1376
|
+
//console.log('Inside the progressBar cond');
|
|
1377
|
+
this.inpValue =
|
|
1378
|
+
event.date.day + "/" + event.date.month + "/" + event.date.year;
|
|
1379
|
+
if (this.questionItem.Type__c == "Book") {
|
|
1380
|
+
this.selectDate = event.date.day + "/" + event.date.month + "/" + event.date.year;
|
|
1381
|
+
}
|
|
1382
|
+
}
|
|
1383
|
+
else {
|
|
1384
|
+
//console.log('Inside the ELSE of progressBar cond');
|
|
1385
|
+
if (this.questionItem.Type__c == "Book") {
|
|
1386
|
+
this.selectDate = event.date.day + "-" + event.date.month + "-" + event.date.year;
|
|
1387
|
+
}
|
|
1388
|
+
this.inpValue =
|
|
1389
|
+
event.date.year + "-" + event.date.month + "-" + event.date.day;
|
|
1390
|
+
}
|
|
1391
|
+
const htmlElement = window.document.getElementsByClassName("mydp");
|
|
1392
|
+
htmlElement
|
|
1393
|
+
.item(0)
|
|
1394
|
+
.setAttribute("style", "border-color:#87be1c;width:100%");
|
|
1395
|
+
this.dateMap.set(this.questionItem.Id, event);
|
|
1396
|
+
if (event.date.day === 0 &&
|
|
1397
|
+
event.date.month === 0 &&
|
|
1398
|
+
event.date.year === 0) {
|
|
1399
|
+
this.dateMap.delete(this.questionItem.Id);
|
|
1400
|
+
this.answerMap.delete(this.questionItem.Id);
|
|
1401
|
+
}
|
|
1402
|
+
//console.log('this.inpValue = '+this.inpValue);
|
|
1403
|
+
//console.log('this.selectDate = '+this.selectDate);
|
|
1404
|
+
}
|
|
1405
|
+
ngOnInit() {
|
|
1406
|
+
this.deviceInfo = this.deviceService.getDeviceInfo();
|
|
1407
|
+
this.route.queryParams.subscribe((params) => {
|
|
1408
|
+
if (params['id']) {
|
|
1409
|
+
this.individualBookButton = true;
|
|
1410
|
+
}
|
|
1411
|
+
else if (params['bookletId']) {
|
|
1412
|
+
this.individualBookButton = false;
|
|
1413
|
+
}
|
|
1414
|
+
});
|
|
1415
|
+
console.log('Inside the ngOnInit');
|
|
1416
|
+
// console.log("RNXT-Claim");
|
|
1417
|
+
this.inpValue = "";
|
|
1418
|
+
this.selectedMeridiem = "AM";
|
|
1419
|
+
this.processQB();
|
|
1420
|
+
//console.log(localStorage.getItem('address'));
|
|
1421
|
+
if (localStorage.getItem("address")) {
|
|
1422
|
+
this.localaddress = JSON.parse(localStorage.getItem("address"));
|
|
1423
|
+
//console.log('Length='+this.localaddress.length);
|
|
1424
|
+
this.allAddress = this.localaddress.filter((item, index) => {
|
|
1425
|
+
if (this.localaddress.indexOf(item) == index) {
|
|
1426
|
+
return item;
|
|
1427
|
+
}
|
|
1428
|
+
});
|
|
1429
|
+
this.allAddress.sort(function (a, b) {
|
|
1430
|
+
return a.zipCode - b.zipCode;
|
|
1431
|
+
});
|
|
1432
|
+
}
|
|
1433
|
+
else if (this.deviceInfo.os === 'iOS') {
|
|
1434
|
+
let openRequest = indexedDB.open("addressDB");
|
|
1435
|
+
openRequest.onsuccess = (event) => {
|
|
1436
|
+
const targetNew = event.target;
|
|
1437
|
+
let dbNew = targetNew.result;
|
|
1438
|
+
const requestNew = dbNew.transaction('addressTable')
|
|
1439
|
+
.objectStore('addressTable')
|
|
1440
|
+
.get(1);
|
|
1441
|
+
requestNew.onsuccess = () => {
|
|
1442
|
+
const tempVar = requestNew.result;
|
|
1443
|
+
this.localaddress = JSON.parse(tempVar.wholeAddressString);
|
|
1444
|
+
this.allAddress = this.localaddress.filter((item, index) => {
|
|
1445
|
+
if (this.localaddress.indexOf(item) == index) {
|
|
1446
|
+
return item;
|
|
1447
|
+
}
|
|
1448
|
+
});
|
|
1449
|
+
this.allAddress.sort(function (a, b) {
|
|
1450
|
+
return a.zipCode - b.zipCode;
|
|
1451
|
+
});
|
|
1452
|
+
};
|
|
1453
|
+
};
|
|
1454
|
+
}
|
|
1455
|
+
}
|
|
1456
|
+
ngOnChanges() {
|
|
1457
|
+
//console.log('inside Questionnaire ngOnChanges');
|
|
1458
|
+
this.processQB();
|
|
1459
|
+
}
|
|
1460
|
+
date_TimeMap() {
|
|
1461
|
+
this.selectedhourMap.set(this.questionItem.Id, this.selectedHour);
|
|
1462
|
+
this.selectedminuteMap.set(this.questionItem.Id, this.selectedMinute);
|
|
1463
|
+
}
|
|
1464
|
+
day() {
|
|
1465
|
+
this.myDatePickerOptions = {
|
|
1466
|
+
dateFormat: "dd.mm.yyyy",
|
|
1467
|
+
sunHighlight: false,
|
|
1468
|
+
disableDateRanges: [],
|
|
1469
|
+
showClearDateBtn: false,
|
|
1470
|
+
disableSince: {
|
|
1471
|
+
year: 0,
|
|
1472
|
+
month: 0,
|
|
1473
|
+
day: 0,
|
|
1474
|
+
},
|
|
1475
|
+
disableUntil: {
|
|
1476
|
+
year: 0,
|
|
1477
|
+
month: 0,
|
|
1478
|
+
day: 0,
|
|
1479
|
+
},
|
|
1480
|
+
showTodayBtn: false,
|
|
1481
|
+
dayLabels: {
|
|
1482
|
+
su: "Dom",
|
|
1483
|
+
mo: "Lun",
|
|
1484
|
+
tu: "Mar",
|
|
1485
|
+
we: "Mié",
|
|
1486
|
+
th: "Jue",
|
|
1487
|
+
fr: "Vie",
|
|
1488
|
+
sa: "Sáb",
|
|
1489
|
+
},
|
|
1490
|
+
monthLabels: {
|
|
1491
|
+
1: "Ene",
|
|
1492
|
+
2: "Feb",
|
|
1493
|
+
3: "Mar",
|
|
1494
|
+
4: "Abr",
|
|
1495
|
+
5: "Mayo",
|
|
1496
|
+
6: "Jun",
|
|
1497
|
+
7: "Jul",
|
|
1498
|
+
8: "Ago",
|
|
1499
|
+
9: "Sep",
|
|
1500
|
+
10: "Oct",
|
|
1501
|
+
11: "Nov",
|
|
1502
|
+
12: "Dic",
|
|
1503
|
+
},
|
|
1504
|
+
};
|
|
1505
|
+
}
|
|
1506
|
+
change() {
|
|
1507
|
+
const htmlElement = window.document.getElementsByClassName("mydp");
|
|
1508
|
+
if (this.selDate === null || this.inpValue.length === 0) {
|
|
1509
|
+
htmlElement
|
|
1510
|
+
.item(0)
|
|
1511
|
+
.setAttribute("style", "width:100%;border: 1px solid red");
|
|
1512
|
+
}
|
|
1513
|
+
else {
|
|
1514
|
+
htmlElement
|
|
1515
|
+
.item(0)
|
|
1516
|
+
.setAttribute("style", "border: 1px solid #87be1c ;width:100%");
|
|
1517
|
+
}
|
|
1518
|
+
}
|
|
1519
|
+
processQB() {
|
|
1520
|
+
//console.log('ProcessQB');
|
|
1521
|
+
//this.qbItem
|
|
1522
|
+
//console.log(this.qbId);
|
|
1523
|
+
//console.log('Version in process is 8bf11efa7f91a391d957bf6b5078edc7e656b67c');
|
|
1524
|
+
if (this.qbId) {
|
|
1525
|
+
if (this.qbId.length == 18) {
|
|
1526
|
+
this.readQuestionBook(this.qbId);
|
|
1527
|
+
}
|
|
1528
|
+
else {
|
|
1529
|
+
//console.log('Inside the else part');
|
|
1530
|
+
//console.log('Setting the Question Directly for testing');
|
|
1531
|
+
this.questionItem = DTQUESTION;
|
|
1532
|
+
this.qbItem = TESTQB;
|
|
1533
|
+
this.processQuestion();
|
|
1534
|
+
}
|
|
1535
|
+
}
|
|
1536
|
+
}
|
|
1537
|
+
trimLastDummy(input) {
|
|
1538
|
+
return (input = input.substring(0, input.length - 6));
|
|
1539
|
+
}
|
|
1540
|
+
getProperTime(def, input) {
|
|
1541
|
+
return input === "" ? def : input;
|
|
1542
|
+
}
|
|
1543
|
+
//Summary Question Clickable Logic
|
|
1544
|
+
handleEditClick(value) {
|
|
1545
|
+
this.backicon = false;
|
|
1546
|
+
if (this.abItem?.Status__c == "Pending") {
|
|
1547
|
+
if (value == null) {
|
|
1548
|
+
return;
|
|
1549
|
+
}
|
|
1550
|
+
this.readQuestion(value);
|
|
1551
|
+
//console.log(' in side summaryopen'+ this.summary.length);
|
|
1552
|
+
//Assign question stack length from summary part
|
|
1553
|
+
var arrayLength = this.questionStack.length;
|
|
1554
|
+
var lengthValue = this.questionStack.indexOf(value);
|
|
1555
|
+
for (let i = arrayLength; i > lengthValue; i--) {
|
|
1556
|
+
this.questionStack.pop();
|
|
1557
|
+
}
|
|
1558
|
+
if (this.qbItem.Progress_Bar__c === true) {
|
|
1559
|
+
var arrayLength1 = this.questionName.length;
|
|
1560
|
+
for (let j = arrayLength1; j > lengthValue; j--) {
|
|
1561
|
+
this.questionName.pop();
|
|
1562
|
+
}
|
|
1563
|
+
}
|
|
1564
|
+
this.summary = [];
|
|
1565
|
+
this.summaryData = [];
|
|
1566
|
+
}
|
|
1567
|
+
}
|
|
1568
|
+
handleNextClick() {
|
|
1569
|
+
this.backButtonFlag = false;
|
|
1570
|
+
this.AnswerSave();
|
|
1571
|
+
}
|
|
1572
|
+
AnswerSave() {
|
|
1573
|
+
//this.updateProgress();
|
|
1574
|
+
if (this.currentQuestionId === null) {
|
|
1575
|
+
return;
|
|
1576
|
+
}
|
|
1577
|
+
var questionTxt = '';
|
|
1578
|
+
this.clearError();
|
|
1579
|
+
this.handleEvent.emit(this.qbItem.Next_Tracking_ID__c);
|
|
1580
|
+
this.recordId = null;
|
|
1581
|
+
var cQuestion = new Question();
|
|
1582
|
+
cQuestion = this.questionItem;
|
|
1583
|
+
// Create an array of objects to store the values
|
|
1584
|
+
for (var i = 0; i < this.questionItem.Questions__r.records.length; i++) {
|
|
1585
|
+
if (this.questionItem.Questions__r.records[i].Question_Text__c) {
|
|
1586
|
+
var questionText = this.questionItem.Questions__r.records[i].Question_Text__c.replace(/<[^>]+>/g, ''); // Remove HTML tags from the Question_Text__c value
|
|
1587
|
+
}
|
|
1588
|
+
else {
|
|
1589
|
+
questionText = 'undefined';
|
|
1590
|
+
}
|
|
1591
|
+
const input = this.questionItem.Questions__r.records[i].input;
|
|
1592
|
+
const obj = { [questionText]: input }; // Create an object with the questionText as the key and the input as the value
|
|
1593
|
+
this.summaryData.push(obj); // Add the object to the data array
|
|
1594
|
+
}
|
|
1595
|
+
var typ = cQuestion.Type__c;
|
|
1596
|
+
// this.sques += cQuestion.Question__c + '@@##$$';
|
|
1597
|
+
var quesValue = cQuestion.Question_Text__c;
|
|
1598
|
+
var mailformat = "^[^.][a-zA-Z0-9!#$%&'*+-/=?^_`{|}~]+[^.]@[^-][a-zA-Z0-9.-]+[^-].[a-zA-Z]{2,}$";
|
|
1599
|
+
// Process Inputs
|
|
1600
|
+
if (this.checkboxFlag) {
|
|
1601
|
+
this.inpValue = "";
|
|
1602
|
+
// Save all the selected options in the inpValue
|
|
1603
|
+
for (var ov of this.optionValues.filter((item) => item.checked)) {
|
|
1604
|
+
this.inpValue += ov.Value__c + "@@##$$";
|
|
1605
|
+
this.recordId = ov.Next_Question__c;
|
|
1606
|
+
}
|
|
1607
|
+
this.inpValue = this.trimLastDummy(this.inpValue);
|
|
1608
|
+
}
|
|
1609
|
+
else if (this.emailFlag) {
|
|
1610
|
+
if (this.inpValue && this.inpValue.match(mailformat)) {
|
|
1611
|
+
this.recordId = this.questionItem.Next_Question__c;
|
|
1612
|
+
}
|
|
1613
|
+
else {
|
|
1614
|
+
this.questionItem.error = new ErrorWrapper();
|
|
1615
|
+
return;
|
|
1616
|
+
}
|
|
1617
|
+
}
|
|
1618
|
+
else if (this.alphanumericFlag) {
|
|
1619
|
+
var isNotValidAccNum = this.isNotValidAccNumber(this.inpValue);
|
|
1620
|
+
if (isNotValidAccNum) {
|
|
1621
|
+
this.notValidAccNum = true;
|
|
1622
|
+
this.recordId = this.questionItem.Next_Question__c;
|
|
1623
|
+
return;
|
|
1624
|
+
}
|
|
1625
|
+
this.notValidAccNum = false;
|
|
1626
|
+
}
|
|
1627
|
+
else if (this.numberFlag) {
|
|
1628
|
+
if (this.inpValue) {
|
|
1629
|
+
this.recordId = this.questionItem.Next_Question__c;
|
|
1630
|
+
}
|
|
1631
|
+
else {
|
|
1632
|
+
this.questionItem.error = new ErrorWrapper();
|
|
1633
|
+
return;
|
|
1634
|
+
}
|
|
1635
|
+
}
|
|
1636
|
+
else if (this.bookFlag) {
|
|
1637
|
+
//console.log(this.questionItem.Type__c)
|
|
1638
|
+
//console.log('Inside the bookFlag cond');
|
|
1639
|
+
//console.log('this.inpValue = '+this.inpValue);
|
|
1640
|
+
//console.log('this.selectDate = '+this.selectDate);
|
|
1641
|
+
//console.log('this.selDate = ');
|
|
1642
|
+
//console.log(this.selDate);
|
|
1643
|
+
this.inpValue = "";
|
|
1644
|
+
var hasMissingInput = false;
|
|
1645
|
+
for (var item of this.questionItem.Questions__r.records) {
|
|
1646
|
+
var count = 0;
|
|
1647
|
+
if (item.Type__c == "Date" || item.Type__c == "Time") {
|
|
1648
|
+
//this one
|
|
1649
|
+
this.change();
|
|
1650
|
+
if (item.Type__c == "Date") {
|
|
1651
|
+
//console.log('Inside the date type cond = '+this.selectDate);
|
|
1652
|
+
this.inpValue = this.selectDate;
|
|
1653
|
+
//console.log(this.inpValue)
|
|
1654
|
+
//console.log(this.selectDate)
|
|
1655
|
+
}
|
|
1656
|
+
if (item.Type__c == "Time") {
|
|
1657
|
+
//console.log(this.selectedHour+this.selectedMeridiem+this.selectedMinute)
|
|
1658
|
+
if (this.questionItem.X24_Hours__c === false) {
|
|
1659
|
+
this.questionItem.input =
|
|
1660
|
+
(this.selectedMeridiem === "PM" && this.selectedHour != "12"
|
|
1661
|
+
? Number(this.selectedHour) + 12
|
|
1662
|
+
: this.selectedHour) +
|
|
1663
|
+
":" +
|
|
1664
|
+
this.selectedMinute + " PM";
|
|
1665
|
+
if (this.selectedMeridiem === "AM" && this.selectedHour === "12") {
|
|
1666
|
+
this.questionItem.input = "00" + ":" + this.selectedMinute + " AM";
|
|
1667
|
+
}
|
|
1668
|
+
if (this.qbItem.Progress_Bar__c) {
|
|
1669
|
+
if (this.selectDate) {
|
|
1670
|
+
this.inpValue = this.selectDate + " " + this.questionItem.input;
|
|
1671
|
+
}
|
|
1672
|
+
else {
|
|
1673
|
+
this.inpValue = " " + this.questionItem.input;
|
|
1674
|
+
}
|
|
1675
|
+
}
|
|
1676
|
+
else {
|
|
1677
|
+
if (this.selectDate) {
|
|
1678
|
+
this.inpValue = this.selectDate + " " + this.questionItem.input;
|
|
1679
|
+
}
|
|
1680
|
+
else {
|
|
1681
|
+
this.inpValue = " " + this.questionItem.input;
|
|
1682
|
+
}
|
|
1683
|
+
}
|
|
1684
|
+
}
|
|
1685
|
+
if (this.questionItem.X24_Hours__c === true) {
|
|
1686
|
+
this.questionItem.input =
|
|
1687
|
+
this.selectedHour + ":" + this.selectedMinute;
|
|
1688
|
+
if (this.qbItem.Progress_Bar__c) {
|
|
1689
|
+
this.inpValue = this.questionItem.input;
|
|
1690
|
+
}
|
|
1691
|
+
else {
|
|
1692
|
+
this.inpValue = this.questionItem.input;
|
|
1693
|
+
}
|
|
1694
|
+
}
|
|
1695
|
+
}
|
|
1696
|
+
if (this.selDate === null || this.selDate === undefined || !this.inpValue || !this.selectedHour || !this.selectedMinute || !this.selectDate) {
|
|
1697
|
+
//console.log('Inside the null condition of input');
|
|
1698
|
+
this.questionItem.error = new ErrorWrapper();
|
|
1699
|
+
const htmlElement = window.document.getElementsByClassName("mydp");
|
|
1700
|
+
htmlElement
|
|
1701
|
+
.item(0)
|
|
1702
|
+
.setAttribute("style", "width:100%;border-bottom: 1px solid red !important;");
|
|
1703
|
+
return;
|
|
1704
|
+
}
|
|
1705
|
+
this.date_TimeMap();
|
|
1706
|
+
}
|
|
1707
|
+
if (item.Type__c == "Text" && item.Question__c === 'Población') {
|
|
1708
|
+
for (var loc of this.localaddress) {
|
|
1709
|
+
if ((this.selectedPostalcode == loc.zipCode) && (this.selectedValue == loc.country) && (this.selectedCity == loc.town)) {
|
|
1710
|
+
item.input = this.selectedCity;
|
|
1711
|
+
break;
|
|
1712
|
+
}
|
|
1713
|
+
else if (count == this.localaddress.length - 1) {
|
|
1714
|
+
//console.log('error form city')
|
|
1715
|
+
item.error = new ErrorWrapper();
|
|
1716
|
+
hasMissingInput = true;
|
|
1717
|
+
return;
|
|
1718
|
+
}
|
|
1719
|
+
count++;
|
|
1720
|
+
}
|
|
1721
|
+
//console.log('testin values=='+item.input)
|
|
1722
|
+
}
|
|
1723
|
+
// if(item.Type__c === 'Location' && Array.isArray(item.input) && item.input.every((input) => input !== undefined)){
|
|
1724
|
+
// const inputValues = "answerString: " + item.input ;
|
|
1725
|
+
// item.input = inputValues;
|
|
1726
|
+
// }
|
|
1727
|
+
if (item.Type__c == "Text" && item.Question__c === 'Código postal') {
|
|
1728
|
+
for (var loc of this.localaddress) {
|
|
1729
|
+
if (loc.zipCode == this.selectedPostalcode) {
|
|
1730
|
+
//console.log('testing zipcode value*****'+ this.selectedPostalcode)
|
|
1731
|
+
item.input = this.selectedPostalcode;
|
|
1732
|
+
break;
|
|
1733
|
+
}
|
|
1734
|
+
else if (count == this.localaddress.length - 1) {
|
|
1735
|
+
//console.log('error form')
|
|
1736
|
+
item.error = new ErrorWrapper();
|
|
1737
|
+
hasMissingInput = true;
|
|
1738
|
+
return;
|
|
1739
|
+
}
|
|
1740
|
+
count++;
|
|
1741
|
+
}
|
|
1742
|
+
//console.log('testin values=='+item.input)
|
|
1743
|
+
}
|
|
1744
|
+
if (item.Type__c == "Text" && item.Question__c === 'Provincia') {
|
|
1745
|
+
for (var loc of this.localaddress) {
|
|
1746
|
+
if (loc.province == this.selectedProvince) {
|
|
1747
|
+
//console.log('******testing province value'+ this.selectedProvince)
|
|
1748
|
+
item.input = this.selectedProvince;
|
|
1749
|
+
break;
|
|
1750
|
+
}
|
|
1751
|
+
else if (count == this.localaddress.length - 1) {
|
|
1752
|
+
//console.log('error form')
|
|
1753
|
+
item.error = new ErrorWrapper();
|
|
1754
|
+
hasMissingInput = true;
|
|
1755
|
+
return;
|
|
1756
|
+
}
|
|
1757
|
+
count++;
|
|
1758
|
+
}
|
|
1759
|
+
//console.log('testin values=='+item.input)
|
|
1760
|
+
}
|
|
1761
|
+
if (!item.Is_Optional__c &&
|
|
1762
|
+
// ((item.Type__c != "File" && !item.input && item.Type__c != 'Date' && item.Type__c != 'Time') ||
|
|
1763
|
+
// (item.Type__c == "File" && this.attachments.length == 0))
|
|
1764
|
+
(item.Type__c == "File" && this.attachments.length == 0)) {
|
|
1765
|
+
item.error = new ErrorWrapper();
|
|
1766
|
+
hasMissingInput = true;
|
|
1767
|
+
}
|
|
1768
|
+
if (item.Type__c == "Radio") {
|
|
1769
|
+
if (!item.input) {
|
|
1770
|
+
item.error = new ErrorWrapper();
|
|
1771
|
+
hasMissingInput = true;
|
|
1772
|
+
}
|
|
1773
|
+
}
|
|
1774
|
+
if (item.Type__c == "Dropdown") {
|
|
1775
|
+
if (!item.input) {
|
|
1776
|
+
item.input = "";
|
|
1777
|
+
item.error = new ErrorWrapper();
|
|
1778
|
+
hasMissingInput = true;
|
|
1779
|
+
}
|
|
1780
|
+
}
|
|
1781
|
+
if (item.Type__c == "Email") {
|
|
1782
|
+
if (item.input && item.input.match(mailformat)) {
|
|
1783
|
+
this.recordId = cQuestion.Next_Question__c;
|
|
1784
|
+
}
|
|
1785
|
+
else {
|
|
1786
|
+
item.error = new ErrorWrapper();
|
|
1787
|
+
hasMissingInput = true;
|
|
1788
|
+
}
|
|
1789
|
+
}
|
|
1790
|
+
if (item.Type__c == "File" && this.attachments.length > 0) {
|
|
1791
|
+
for (var attachmentItem of this.attachments) {
|
|
1792
|
+
this.inpValue +=
|
|
1793
|
+
attachmentItem.attachmentId +
|
|
1794
|
+
"@#$" +
|
|
1795
|
+
attachmentItem.attachmentName +
|
|
1796
|
+
",";
|
|
1797
|
+
if (item.input == this.inpValue) {
|
|
1798
|
+
this.recordId = cQuestion.Next_Question__c;
|
|
1799
|
+
//console.log('inside' + recordId);
|
|
1800
|
+
}
|
|
1801
|
+
}
|
|
1802
|
+
// this.attachments = [];
|
|
1803
|
+
} //item.input == this.inpValue;
|
|
1804
|
+
this.inpValue += (item.input != undefined ? item.input : "") + "@@##$$";
|
|
1805
|
+
questionTxt += item.Question__c + "@@##$$";
|
|
1806
|
+
//console.log('inside book1' + this.inpValue)
|
|
1807
|
+
}
|
|
1808
|
+
if (hasMissingInput) {
|
|
1809
|
+
return;
|
|
1810
|
+
}
|
|
1811
|
+
this.inpValue = this.trimLastDummy(this.inpValue);
|
|
1812
|
+
questionTxt = questionTxt ? this.trimLastDummy(questionTxt) : questionTxt;
|
|
1813
|
+
}
|
|
1814
|
+
else if (this.listFlag) {
|
|
1815
|
+
this.inpValue = '';
|
|
1816
|
+
var hasMissingInput = false;
|
|
1817
|
+
if (this.localSubQMap.has(this.questionItem.Id)) {
|
|
1818
|
+
this.subAnsMap = new Map();
|
|
1819
|
+
for (var localQues of this.localSubQMap.get(this.questionItem.Id)) {
|
|
1820
|
+
if (!localQues.input) {
|
|
1821
|
+
localQues.error = new ErrorWrapper();
|
|
1822
|
+
hasMissingInput = true;
|
|
1823
|
+
}
|
|
1824
|
+
if (!this.subAnsMap.has(localQues.Id)) {
|
|
1825
|
+
// console.log('inside ans map')
|
|
1826
|
+
this.subAnsMap.set(localQues.Id, localQues.input);
|
|
1827
|
+
}
|
|
1828
|
+
else {
|
|
1829
|
+
// console.log('inside ans map else')
|
|
1830
|
+
this.subAnsMap.set(localQues.Id, this.subAnsMap.get(localQues.Id) + '$$@@##' + localQues.input);
|
|
1831
|
+
}
|
|
1832
|
+
}
|
|
1833
|
+
if (hasMissingInput) {
|
|
1834
|
+
//console.log('file two')
|
|
1835
|
+
return;
|
|
1836
|
+
}
|
|
1837
|
+
this.subAnsMap.forEach((value, key) => {
|
|
1838
|
+
// console.log('inside Map' );
|
|
1839
|
+
// console.log(value);
|
|
1840
|
+
this.inpValue += (value != undefined ? value : '') + '@@##$$';
|
|
1841
|
+
});
|
|
1842
|
+
this.inpValue = this.trimLastDummy(this.inpValue);
|
|
1843
|
+
}
|
|
1844
|
+
}
|
|
1845
|
+
else if (this.dropdownFlag) {
|
|
1846
|
+
if (this.inpValue.length <= 1) {
|
|
1847
|
+
this.inpValue = ".";
|
|
1848
|
+
this.questionItem.error = new ErrorWrapper();
|
|
1849
|
+
}
|
|
1850
|
+
}
|
|
1851
|
+
else if (this.dtFlag && this.dateFlag && this.timeFlag) {
|
|
1852
|
+
//this one
|
|
1853
|
+
this.change();
|
|
1854
|
+
if (this.inpValue) {
|
|
1855
|
+
this.selectedHour = this.getProperTime("12", this.selectedHour);
|
|
1856
|
+
this.selectedMinute = this.getProperTime("00", this.selectedMinute);
|
|
1857
|
+
this.selectedMeridiem = this.getProperTime("AM", this.selectedMeridiem);
|
|
1858
|
+
//console.log(this.inpValue.length);
|
|
1859
|
+
if (this.questionItem.X24_Hours__c === false) {
|
|
1860
|
+
this.questionItem.input =
|
|
1861
|
+
(this.selectedMeridiem === "PM" && this.selectedHour != "12"
|
|
1862
|
+
? Number(this.selectedHour) + 12
|
|
1863
|
+
: this.selectedHour) +
|
|
1864
|
+
":" +
|
|
1865
|
+
this.selectedMinute + " PM";
|
|
1866
|
+
if (this.selectedMeridiem === "AM" && this.selectedHour === "12") {
|
|
1867
|
+
this.questionItem.input = "00" + ":" + this.selectedMinute + " AM";
|
|
1868
|
+
}
|
|
1869
|
+
if (this.qbItem.Progress_Bar__c) {
|
|
1870
|
+
this.inpValue = this.inpValue + " " + this.questionItem.input;
|
|
1871
|
+
}
|
|
1872
|
+
else {
|
|
1873
|
+
this.inpValue = this.inpValue + "T" + this.questionItem.input;
|
|
1874
|
+
}
|
|
1875
|
+
}
|
|
1876
|
+
if (this.questionItem.X24_Hours__c === true) {
|
|
1877
|
+
this.questionItem.input =
|
|
1878
|
+
this.selectedHour + ":" + this.selectedMinute;
|
|
1879
|
+
if (this.qbItem.Progress_Bar__c) {
|
|
1880
|
+
this.inpValue = this.inpValue + " " + this.questionItem.input;
|
|
1881
|
+
}
|
|
1882
|
+
else {
|
|
1883
|
+
this.inpValue = this.inpValue + "T" + this.questionItem.input;
|
|
1884
|
+
}
|
|
1885
|
+
}
|
|
1886
|
+
if (this.qbItem.Progress_Bar__c) {
|
|
1887
|
+
//console.log("ans => " + this.inpValue);
|
|
1888
|
+
var date1 = this.inpValue.split(" ");
|
|
1889
|
+
date1 = date1[0].split("/");
|
|
1890
|
+
date1 = [date1[2], date1[1], date1[0]].join("-");
|
|
1891
|
+
date1 = new Date(date1);
|
|
1892
|
+
//console.log(date1)
|
|
1893
|
+
var date2 = this.insuranceStartDate.split(" ");
|
|
1894
|
+
date2 = new Date(date2[0]);
|
|
1895
|
+
//console.log(date2);
|
|
1896
|
+
if (date1 < date2) {
|
|
1897
|
+
this.questionItem.error = new ErrorWrapper();
|
|
1898
|
+
this.questionItem.error.errorMsg =
|
|
1899
|
+
"No es posible dar de alta la reclamación debido a que la fecha del incidente es anterior a la fecha de contratación de la póliza";
|
|
1900
|
+
//console.log('inside')
|
|
1901
|
+
return;
|
|
1902
|
+
}
|
|
1903
|
+
}
|
|
1904
|
+
if (this.selDate === null || !this.inpValue) {
|
|
1905
|
+
this.questionItem.error = new ErrorWrapper();
|
|
1906
|
+
return;
|
|
1907
|
+
}
|
|
1908
|
+
this.date_TimeMap();
|
|
1909
|
+
}
|
|
1910
|
+
}
|
|
1911
|
+
else if (this.timeFlag && this.dtFlag && !this.dateFlag) {
|
|
1912
|
+
this.date_TimeMap();
|
|
1913
|
+
if (this.questionItem.X24_Hours__c === false) {
|
|
1914
|
+
this.inpValue =
|
|
1915
|
+
(this.selectedMeridiem === "PM" && this.selectedHour != "12"
|
|
1916
|
+
? Number(this.selectedHour) + 12
|
|
1917
|
+
: this.selectedHour) +
|
|
1918
|
+
":" +
|
|
1919
|
+
this.selectedMinute;
|
|
1920
|
+
}
|
|
1921
|
+
else {
|
|
1922
|
+
this.inpValue = this.selectedHour + ":" + this.selectedMinute;
|
|
1923
|
+
}
|
|
1924
|
+
if (this.inpValue.length < 5) {
|
|
1925
|
+
this.questionItem.error = new ErrorWrapper();
|
|
1926
|
+
return;
|
|
1927
|
+
}
|
|
1928
|
+
}
|
|
1929
|
+
else if (this.dateFlag && this.dtFlag && !this.timeFlag) {
|
|
1930
|
+
this.change();
|
|
1931
|
+
if (this.inpValue.length < 7 || this.selDate === null) {
|
|
1932
|
+
this.questionItem.error = new ErrorWrapper();
|
|
1933
|
+
return;
|
|
1934
|
+
}
|
|
1935
|
+
}
|
|
1936
|
+
else if (this.fileFlag) {
|
|
1937
|
+
//console.log('four')
|
|
1938
|
+
this.inpValue = "";
|
|
1939
|
+
if (this.attachments.length > 0) {
|
|
1940
|
+
for (var attachmentItem of this.attachments) {
|
|
1941
|
+
this.inpValue +=
|
|
1942
|
+
attachmentItem.attachmentId +
|
|
1943
|
+
"@#$" +
|
|
1944
|
+
attachmentItem.attachmentName +
|
|
1945
|
+
",";
|
|
1946
|
+
}
|
|
1947
|
+
//console.log('inside filesss' + this.inpValue);
|
|
1948
|
+
this.inpValue = this.inpValue.substr(0, this.inpValue.length - 1);
|
|
1949
|
+
}
|
|
1950
|
+
else {
|
|
1951
|
+
this.questionItem.error = new ErrorWrapper();
|
|
1952
|
+
return;
|
|
1953
|
+
}
|
|
1954
|
+
}
|
|
1955
|
+
// Check for the answer before saving to the DB
|
|
1956
|
+
if (!this.questionItem.Is_Optional__c && !this.inpValue) {
|
|
1957
|
+
// Show error that the question must be answered
|
|
1958
|
+
this.questionItem.error = new ErrorWrapper();
|
|
1959
|
+
return;
|
|
1960
|
+
}
|
|
1961
|
+
// Save the Answer in the DB
|
|
1962
|
+
this.answerWrap = new AnswerWrapper();
|
|
1963
|
+
this.answerWrap.abId = this.abItem.Id;
|
|
1964
|
+
this.answerWrap.quesId = cQuestion.Id;
|
|
1965
|
+
this.answerWrap.quesValue = quesValue;
|
|
1966
|
+
this.answerWrap.qTyp = typ;
|
|
1967
|
+
this.answerWrap.ansValue = this.inpValue;
|
|
1968
|
+
this.answerWrap.groupText = cQuestion.Group__c;
|
|
1969
|
+
this.answerWrap.ansValue = this.inpValue;
|
|
1970
|
+
console.log('this.answerWrap.qTyp', this.answerWrap.qTyp);
|
|
1971
|
+
if (this.answerWrap.qTyp == "Alphanumeric") {
|
|
1972
|
+
this.answerWrap.ansValue = 'ES' + this.inpValue;
|
|
1973
|
+
// console.log('Bank condition');
|
|
1974
|
+
// console.log(this.answerWrap.ansValue);
|
|
1975
|
+
}
|
|
1976
|
+
/*if (cQuestion.Type__c == 'Book'){
|
|
1977
|
+
for (var qb of cQuestion.Questions__r.records){
|
|
1978
|
+
//console.log(qb.Question__c+'****'+"@@##$$")
|
|
1979
|
+
}
|
|
1980
|
+
}*/
|
|
1981
|
+
//this.answerWrap.squesValue = cQuestion.Question__c;
|
|
1982
|
+
this.answerWrap.squesValue = questionTxt ? questionTxt : cQuestion.Question__c;
|
|
1983
|
+
this.saveAnswer();
|
|
1984
|
+
}
|
|
1985
|
+
next() {
|
|
1986
|
+
var cQuestion = new Question();
|
|
1987
|
+
cQuestion = this.questionItem;
|
|
1988
|
+
var typ = cQuestion.Type__c;
|
|
1989
|
+
// If no error then move to next steps
|
|
1990
|
+
if (this.questionItem.error) {
|
|
1991
|
+
return;
|
|
1992
|
+
}
|
|
1993
|
+
this.questionStack.push(cQuestion.Id);
|
|
1994
|
+
// this.questionName.push(cQuestion.Name);
|
|
1995
|
+
// CONDITIONAL vs OPTIONONLY & UNCONDITIONAL
|
|
1996
|
+
if (cQuestion.RecordType.Name == "CONDITIONAL") {
|
|
1997
|
+
for (var cOpt of cQuestion.Question_Options__r.records) {
|
|
1998
|
+
// Radio / Data
|
|
1999
|
+
//console.log('Option => ' + cOpt.Value__c + ' matching with ' + ansVal);
|
|
2000
|
+
if (cOpt.Value__c == this.inpValue) {
|
|
2001
|
+
//console.log('Match Found using ' + cOpt.Next_Question__c);
|
|
2002
|
+
this.recordId = cOpt.Next_Question__c;
|
|
2003
|
+
//console.log('conditional record id'+ this.recordId);
|
|
2004
|
+
}
|
|
2005
|
+
}
|
|
2006
|
+
// Could be of type Data and existing value
|
|
2007
|
+
if (this.recordId && typ == "Data") {
|
|
2008
|
+
this.recordId = cQuestion.Next_Question__c;
|
|
2009
|
+
}
|
|
2010
|
+
}
|
|
2011
|
+
else if (cQuestion.RecordType.Name == "OPTIONONLY") {
|
|
2012
|
+
// OPTIONONLY logic
|
|
2013
|
+
this.recordId = cQuestion.Next_Question__c;
|
|
2014
|
+
}
|
|
2015
|
+
else if (cQuestion.RecordType.Name == "UNCONDITIONAL") {
|
|
2016
|
+
//Unconditional logic
|
|
2017
|
+
//console.log("inside unconditional");
|
|
2018
|
+
//inside Book Type
|
|
2019
|
+
if (cQuestion.Type__c == "Book" && cQuestion.Question_No__c != '6') {
|
|
2020
|
+
//console.log("inside book");
|
|
2021
|
+
for (let opt of cQuestion.Questions__r.records) {
|
|
2022
|
+
//console.log(opt.Type__c);
|
|
2023
|
+
if (opt.Type__c == "Dropdown" || opt.Type__c == "Radio") {
|
|
2024
|
+
for (var opt1 of opt.Question_Options__r.records) {
|
|
2025
|
+
if (this.valueName == opt1.Value__c) {
|
|
2026
|
+
this.recordId = opt1.Next_Question__c || cQuestion.Next_Question__c;
|
|
2027
|
+
}
|
|
2028
|
+
else {
|
|
2029
|
+
//console.log('Else'+this.recordId)
|
|
2030
|
+
this.recordId = cQuestion.Next_Question__c;
|
|
2031
|
+
}
|
|
2032
|
+
}
|
|
2033
|
+
}
|
|
2034
|
+
else {
|
|
2035
|
+
this.recordId = cQuestion.Next_Question__c;
|
|
2036
|
+
}
|
|
2037
|
+
}
|
|
2038
|
+
}
|
|
2039
|
+
else if (cQuestion.Type__c == "Book" && cQuestion.Question_No__c == '6') {
|
|
2040
|
+
for (let opt of cQuestion.Questions__r.records) {
|
|
2041
|
+
if (opt.Type__c == "Dropdown" || opt.Type__c == "Radio") {
|
|
2042
|
+
for (var opt1 of opt.Question_Options__r.records) {
|
|
2043
|
+
if (this.valueName == opt1.Value__c) {
|
|
2044
|
+
this.recordId = opt1.Next_Question__c;
|
|
2045
|
+
}
|
|
2046
|
+
}
|
|
2047
|
+
}
|
|
2048
|
+
}
|
|
2049
|
+
}
|
|
2050
|
+
else {
|
|
2051
|
+
this.recordId = cQuestion.Next_Question__c;
|
|
2052
|
+
}
|
|
2053
|
+
}
|
|
2054
|
+
// CATEGORIZATION
|
|
2055
|
+
//this.stepperCateg();
|
|
2056
|
+
// Calling the progres bar update function
|
|
2057
|
+
this.answerCount++;
|
|
2058
|
+
this.updateProgress();
|
|
2059
|
+
// CATEGORIZATION
|
|
2060
|
+
//this.stepperCateg();
|
|
2061
|
+
if (this.recordId) {
|
|
2062
|
+
//console.log('Before Calling readQuestion() using ' + recordId);
|
|
2063
|
+
this.readQuestion(this.recordId);
|
|
2064
|
+
this.pop = true;
|
|
2065
|
+
}
|
|
2066
|
+
else {
|
|
2067
|
+
this.pop = false;
|
|
2068
|
+
//console.log('Summary Page Logic');
|
|
2069
|
+
// Reset the Variables
|
|
2070
|
+
this.inpValue = "";
|
|
2071
|
+
this.answerWrap = new AnswerWrapper();
|
|
2072
|
+
this.optionValues = [];
|
|
2073
|
+
this.subQuestions = [];
|
|
2074
|
+
this.resetFlag(typ);
|
|
2075
|
+
this.questionItem = null;
|
|
2076
|
+
// Show Summary
|
|
2077
|
+
for (var q of this.questionStack) {
|
|
2078
|
+
//console.log('Handling Question => ' + q);
|
|
2079
|
+
var ansWrap = this.answerMap.get(q);
|
|
2080
|
+
if (ansWrap) {
|
|
2081
|
+
//console.log('Handling Answer for ' + ansWrap.quesId + ' of type ' + ansWrap.qTyp);
|
|
2082
|
+
if (ansWrap.qTyp == 'File' || ansWrap.qTyp == 'Book' || ansWrap.qTyp == 'List' || ansWrap.qTyp == 'Checkbox') {
|
|
2083
|
+
var newStr = '';
|
|
2084
|
+
for (var ansStr of ansWrap.ansValue.split('@@##$$')) {
|
|
2085
|
+
for (var ansStr1 of ansStr.split('$$@@##')) {
|
|
2086
|
+
// if(ansStr1.includes('answerString')){ //remove the answer string
|
|
2087
|
+
// const withoutAnswerString = ansStr1.replace("answerString: ", "");
|
|
2088
|
+
// ansStr1 = withoutAnswerString;
|
|
2089
|
+
// }
|
|
2090
|
+
if (ansStr1.length > 0) {
|
|
2091
|
+
if (newStr.length == 0) {
|
|
2092
|
+
newStr = ansStr1;
|
|
2093
|
+
}
|
|
2094
|
+
else {
|
|
2095
|
+
newStr += '; ' + ansStr1; //comma(,) changed as semi colon(;) because of address contains comma(,)
|
|
2096
|
+
if (this.attachmentsMap.has(ansWrap.quesId)) {
|
|
2097
|
+
for (var att of this.attachmentsMap.get(ansWrap.quesId)) {
|
|
2098
|
+
newStr = newStr.replace(att.attachmentId, '');
|
|
2099
|
+
}
|
|
2100
|
+
}
|
|
2101
|
+
newStr = (newStr.replace(',,', ', ')).replace(', ,', ', ');
|
|
2102
|
+
newStr = newStr.startsWith(',') ? newStr.substring(1, newStr.length) : (newStr.endsWith(',') ? newStr.substring(0, newStr.length - 1) : newStr);
|
|
2103
|
+
}
|
|
2104
|
+
}
|
|
2105
|
+
}
|
|
2106
|
+
}
|
|
2107
|
+
ansWrap.ansValue = newStr;
|
|
2108
|
+
}
|
|
2109
|
+
this.summary.push(ansWrap);
|
|
2110
|
+
this.backicon = true;
|
|
2111
|
+
}
|
|
2112
|
+
}
|
|
2113
|
+
}
|
|
2114
|
+
}
|
|
2115
|
+
getText(value) {
|
|
2116
|
+
var doc = new DOMParser().parseFromString(value, "text/html");
|
|
2117
|
+
//console.log( doc.documentElement.textContent);
|
|
2118
|
+
return this.sanitizer.bypassSecurityTrustHtml(doc.documentElement.textContent);
|
|
2119
|
+
}
|
|
2120
|
+
handleBackClick() {
|
|
2121
|
+
this.back = true;
|
|
2122
|
+
if (this.pop === true) {
|
|
2123
|
+
this.questionName.pop();
|
|
2124
|
+
}
|
|
2125
|
+
this.handleEvent.emit(this.qbItem.Back_Tracking_ID__c);
|
|
2126
|
+
var cQuestion = new Question();
|
|
2127
|
+
cQuestion = this.questionItem;
|
|
2128
|
+
if (cQuestion.Question_No__c == '1') {
|
|
2129
|
+
this.handleEvent.emit(this.qbItem.Back__c);
|
|
2130
|
+
}
|
|
2131
|
+
this.answerCount--;
|
|
2132
|
+
this.updateProgress();
|
|
2133
|
+
// CATEGORIZATION
|
|
2134
|
+
//this.stepperCateg();
|
|
2135
|
+
if (this.summary) {
|
|
2136
|
+
//console.log('summary true');
|
|
2137
|
+
this.summary = [];
|
|
2138
|
+
}
|
|
2139
|
+
if (this.summaryData) {
|
|
2140
|
+
this.summaryData = [];
|
|
2141
|
+
}
|
|
2142
|
+
// Read the previous question from DB
|
|
2143
|
+
this.readQuestion(this.questionStack.pop());
|
|
2144
|
+
//console.log(this.questionStack);
|
|
2145
|
+
}
|
|
2146
|
+
handleBackClickNew() {
|
|
2147
|
+
this.handleEvent.emit(this.qbItem.Edit__c);
|
|
2148
|
+
}
|
|
2149
|
+
//updating status once Q&A completed.
|
|
2150
|
+
updateAnswerBook = (uuid) => {
|
|
2151
|
+
if (this.serv == "api") {
|
|
2152
|
+
this.dataService.getAPIData(this.tkn, ["AnswerBook", "Update", uuid], this.successupdateAB, this.failureupdateAB);
|
|
2153
|
+
}
|
|
2154
|
+
else {
|
|
2155
|
+
this.sfService.remoteAction("NxtController.process", ["AnswerBook", "Update", uuid], this.successupdateAB, this.failureupdateAB);
|
|
2156
|
+
}
|
|
2157
|
+
};
|
|
2158
|
+
successupdateAB = (response) => {
|
|
2159
|
+
console.log(response);
|
|
2160
|
+
// //console.log('status success')
|
|
2161
|
+
this.abItem.Status__c = "Completed";
|
|
2162
|
+
};
|
|
2163
|
+
failureupdateAB = (response) => {
|
|
2164
|
+
//console.log('status failed')
|
|
2165
|
+
};
|
|
2166
|
+
readQuestionBook = (uuid) => {
|
|
2167
|
+
if (this.serv == "api") {
|
|
2168
|
+
this.dataService.getAPIData(this.tkn, ["QuestionBook", "read", uuid], this.successReadBook, this.failureReadBook);
|
|
2169
|
+
}
|
|
2170
|
+
else {
|
|
2171
|
+
this.sfService.remoteAction("NxtController.process", ["QuestionBook", "read", uuid], this.successReadBook, this.failureReadBook);
|
|
2172
|
+
}
|
|
2173
|
+
};
|
|
2174
|
+
successReadBook = (response) => {
|
|
2175
|
+
console.log('Inside the successReadBook');
|
|
2176
|
+
console.log(response);
|
|
2177
|
+
if (response != null || response != undefined) {
|
|
2178
|
+
this.qbItem = response.questionbook;
|
|
2179
|
+
this.abItem = response.answerbook;
|
|
2180
|
+
}
|
|
2181
|
+
// console.log('readingQuestion using ' + this.qbItem);
|
|
2182
|
+
if (this.abItem?.Status__c == "Pending") {
|
|
2183
|
+
if (this.abItem.Answers__r == null ||
|
|
2184
|
+
this.abItem.Answers__r.records.length == 0) {
|
|
2185
|
+
this.readQuestion(this.qbItem.First_Question__c);
|
|
2186
|
+
}
|
|
2187
|
+
else {
|
|
2188
|
+
// Populate the existing answers
|
|
2189
|
+
var lastQuestionId = "";
|
|
2190
|
+
for (var ansObject of this.abItem.Answers__r.records) {
|
|
2191
|
+
lastQuestionId = ansObject.Question_Ref__c;
|
|
2192
|
+
this.questionStack.push(ansObject.Question_Ref__c);
|
|
2193
|
+
this.answerMap.set(ansObject.Question_Ref__c, {
|
|
2194
|
+
quesValue: ansObject.Question_Rich_Text__c,
|
|
2195
|
+
ansValue: ansObject.Answer_Long__c,
|
|
2196
|
+
quesId: ansObject.Question_Ref__c,
|
|
2197
|
+
qTyp: ansObject.Question_Type__c,
|
|
2198
|
+
groupText: ansObject.Question_Group_Text__c,
|
|
2199
|
+
});
|
|
2200
|
+
//console.log(this.questionStack)
|
|
2201
|
+
if (ansObject.Question_Type__c == "Book") {
|
|
2202
|
+
var av1 = ansObject.Answer_Long__c.split("@@##$$");
|
|
2203
|
+
// //console.log("book log");
|
|
2204
|
+
// //console.log("bookid" + av1[0]);
|
|
2205
|
+
this.attachmentsMap.set(ansObject.Question_Ref__c, [
|
|
2206
|
+
{ attachmentName: av1[1], attachmentId: av1[0] },
|
|
2207
|
+
]);
|
|
2208
|
+
// //console.log(this.attachmentsMap);
|
|
2209
|
+
}
|
|
2210
|
+
else if (ansObject.Question_Type__c == "File") {
|
|
2211
|
+
// //console.log("inside if");
|
|
2212
|
+
var attList;
|
|
2213
|
+
var att;
|
|
2214
|
+
for (var attVar of ansObject.Answer_Long__c.split(",")) {
|
|
2215
|
+
var attIdName = attVar.split("@@##$$");
|
|
2216
|
+
att.attachmentName = attIdName[1];
|
|
2217
|
+
att.attachmentId = attIdName[0];
|
|
2218
|
+
attList.push(att);
|
|
2219
|
+
}
|
|
2220
|
+
this.attachmentsMap.set(ansObject.Question_Ref__c, attList);
|
|
2221
|
+
// //console.log(this.attachmentsMap);
|
|
2222
|
+
}
|
|
2223
|
+
}
|
|
2224
|
+
this.questionStack.pop();
|
|
2225
|
+
//console.log(this.answerMap);
|
|
2226
|
+
// Read the last answered question
|
|
2227
|
+
this.readQuestion(lastQuestionId);
|
|
2228
|
+
}
|
|
2229
|
+
}
|
|
2230
|
+
else if (this.abItem?.Status__c == "Completed") {
|
|
2231
|
+
this.handleEvent.emit("Summaryupdated");
|
|
2232
|
+
// Temporary Fix for duplicate answers on the summary.
|
|
2233
|
+
this.summary = [];
|
|
2234
|
+
this.percent = 100;
|
|
2235
|
+
this.progressStyle = "100%";
|
|
2236
|
+
for (var answer of this.abItem.Answers__r.records) {
|
|
2237
|
+
//console.log(answer.Question_Group_Text__c);
|
|
2238
|
+
//console.log('repeat');
|
|
2239
|
+
//console.log(answer.Question_Rich_Text__c);
|
|
2240
|
+
var answers = {};
|
|
2241
|
+
if (answer.Question_Type__c == "File") {
|
|
2242
|
+
var files = "";
|
|
2243
|
+
var fIndex = 0;
|
|
2244
|
+
var fileList = answer.Answer_Long__c.split(",");
|
|
2245
|
+
for (var fileIdName of fileList) {
|
|
2246
|
+
var fileName = fileIdName.split("@#$");
|
|
2247
|
+
if (fIndex == 0) {
|
|
2248
|
+
files = fileName[1];
|
|
2249
|
+
}
|
|
2250
|
+
else {
|
|
2251
|
+
files = files + " ," + fileName[1];
|
|
2252
|
+
}
|
|
2253
|
+
fIndex++;
|
|
2254
|
+
}
|
|
2255
|
+
answers = {
|
|
2256
|
+
groupText: answer.Question_Group_Text__c,
|
|
2257
|
+
quesValue: answer.Question_Rich_Text__c,
|
|
2258
|
+
ansValue: files,
|
|
2259
|
+
};
|
|
2260
|
+
this.summary.push(answers);
|
|
2261
|
+
}
|
|
2262
|
+
else if (answer.Question_Type__c == "Book") {
|
|
2263
|
+
/* var quesNo=0;
|
|
2264
|
+
if(answer.Answer_Long__c.includes("@@##$$")){
|
|
2265
|
+
//console.log('line 1223');
|
|
2266
|
+
for (var bqAnswerValue of answer.Answer_Long__c.split("@@##$$")) {
|
|
2267
|
+
var quesValue=answer.Question_Text__c.split("@@##$$");
|
|
2268
|
+
answers = {};
|
|
2269
|
+
answers = {
|
|
2270
|
+
// groupText:answer.Question_Text__c,
|
|
2271
|
+
quesValue: "<p>"+ quesValue[quesNo]+"<p>",
|
|
2272
|
+
ansValue: bqAnswerValue,
|
|
2273
|
+
};
|
|
2274
|
+
quesNo++;
|
|
2275
|
+
this.summary.push(answers);
|
|
2276
|
+
}
|
|
2277
|
+
}*/
|
|
2278
|
+
if (answer.Answer_Long__c.includes("@@##$$")) {
|
|
2279
|
+
var answervalues = answer.Answer_Long__c.split("@@##$$");
|
|
2280
|
+
//console.log('value')
|
|
2281
|
+
answers = {
|
|
2282
|
+
//groupText:answer.Question_Group_Text__c,
|
|
2283
|
+
quesValue: answer.Question_Rich_Text__c,
|
|
2284
|
+
ansValue: answervalues,
|
|
2285
|
+
};
|
|
2286
|
+
//console.log(answers)
|
|
2287
|
+
this.summary.push(answers);
|
|
2288
|
+
}
|
|
2289
|
+
else {
|
|
2290
|
+
answers = {
|
|
2291
|
+
//groupText:answer.Question_Group_Text__c,
|
|
2292
|
+
quesValue: answer.Question_Rich_Text__c,
|
|
2293
|
+
ansValue: answer.Answer_Long__c,
|
|
2294
|
+
};
|
|
2295
|
+
this.summary.push(answers);
|
|
2296
|
+
}
|
|
2297
|
+
}
|
|
2298
|
+
else {
|
|
2299
|
+
// var ans1 = answer.Answer_Long__c.split("@@##$$");
|
|
2300
|
+
answers = {
|
|
2301
|
+
//groupText:answer.Question_Group_Text__c,
|
|
2302
|
+
quesValue: answer.Question_Rich_Text__c,
|
|
2303
|
+
ansValue: answer.Answer_Long__c,
|
|
2304
|
+
};
|
|
2305
|
+
this.summary.push(answers);
|
|
2306
|
+
}
|
|
2307
|
+
}
|
|
2308
|
+
}
|
|
2309
|
+
};
|
|
2310
|
+
failureReadBook = (response) => {
|
|
2311
|
+
console.log('Inside the failureReadBook');
|
|
2312
|
+
console.log(response);
|
|
2313
|
+
};
|
|
2314
|
+
readAnswerbook = (uuid) => {
|
|
2315
|
+
if (this.serv = "api") {
|
|
2316
|
+
this.dataService.getAPIData(this.tkn, ["AnswerBook", "read", uuid], this.successAnswerBookRead, this.failureAnswerBookRead);
|
|
2317
|
+
}
|
|
2318
|
+
else {
|
|
2319
|
+
this.sfService.remoteAction("NxtController.process", ["AnswerBook", "read", uuid], this.successAnswerBookRead, this.failureAnswerBookRead);
|
|
2320
|
+
}
|
|
2321
|
+
};
|
|
2322
|
+
successAnswerBookRead = (response) => {
|
|
2323
|
+
if (this.abItem?.Status__c == "Completed") {
|
|
2324
|
+
for (var answer of this.abItem.Answers__r.records) {
|
|
2325
|
+
var av = answer.Answer_Long__c.split("@@##$$");
|
|
2326
|
+
var answers = { quesValue: answer.Question_Rich_Text__c, ansValue: av, groupText: answer.Question_Group_Text__c };
|
|
2327
|
+
//console.log(answers)
|
|
2328
|
+
this.summary.push(answers);
|
|
2329
|
+
}
|
|
2330
|
+
this.handleEvent.emit("Summaryupdated");
|
|
2331
|
+
}
|
|
2332
|
+
};
|
|
2333
|
+
failureAnswerBookRead = (response) => {
|
|
2334
|
+
//console.log('inside failureread');
|
|
2335
|
+
//console.log(response);
|
|
2336
|
+
};
|
|
2337
|
+
readQuestion = (uuid) => {
|
|
2338
|
+
if (this.serv == "api") {
|
|
2339
|
+
this.dataService.getAPIData(this.tkn, ["Question", "read", uuid], this.successRead, this.failureRead);
|
|
2340
|
+
}
|
|
2341
|
+
else {
|
|
2342
|
+
this.sfService.remoteAction("NxtController.process", ["Question", "read", uuid], this.successRead, this.failureRead);
|
|
2343
|
+
}
|
|
2344
|
+
};
|
|
2345
|
+
successRead = (response) => {
|
|
2346
|
+
// console.log('Inside the successRead new');
|
|
2347
|
+
// console.log(response);
|
|
2348
|
+
// console.log(this.questionItem);
|
|
2349
|
+
// Reset the Variables
|
|
2350
|
+
if (this.questionItem) {
|
|
2351
|
+
this.inpValue = "";
|
|
2352
|
+
this.answerWrap = new AnswerWrapper();
|
|
2353
|
+
this.optionValues = [];
|
|
2354
|
+
this.subQuestions = [];
|
|
2355
|
+
this.resetFlag(this.questionItem.Type__c);
|
|
2356
|
+
}
|
|
2357
|
+
this.questionItem = response.question;
|
|
2358
|
+
// console.log(this.questionItem);
|
|
2359
|
+
if (this.questionItem.Type__c === 'Alphanumeric') {
|
|
2360
|
+
this.splCCBackClick = true;
|
|
2361
|
+
}
|
|
2362
|
+
this.currentQuestionId = this.questionItem.Id;
|
|
2363
|
+
this.handlePage.emit(this.questionItem.Tracking_ID__c);
|
|
2364
|
+
// Handle the subQuestion options
|
|
2365
|
+
if (response.sqOptions) {
|
|
2366
|
+
//var newRecords = [];
|
|
2367
|
+
for (var q of this.questionItem.Questions__r.records) {
|
|
2368
|
+
//console.log(q.Name);
|
|
2369
|
+
var sq = response.sqOptions[q.Id];
|
|
2370
|
+
if (sq) {
|
|
2371
|
+
//console.log('found options for subquestion ' + q.Name);
|
|
2372
|
+
if (!q.Question_Options__r) {
|
|
2373
|
+
q.Question_Options__r = sq.Question_Options__r;
|
|
2374
|
+
}
|
|
2375
|
+
}
|
|
2376
|
+
}
|
|
2377
|
+
}
|
|
2378
|
+
this.processQuestion();
|
|
2379
|
+
this.innerhtml = this.sanitizer.bypassSecurityTrustHtml(this.questionItem.Additional_Rich__c);
|
|
2380
|
+
this.trackId();
|
|
2381
|
+
};
|
|
2382
|
+
trackId() {
|
|
2383
|
+
var qtrackId = this.questionItem.Tracking_ID__c;
|
|
2384
|
+
//console.log('trackId-question'+qtrackId);
|
|
2385
|
+
}
|
|
2386
|
+
failureRead = (response) => {
|
|
2387
|
+
//console.log('inside failureread');
|
|
2388
|
+
//console.log(response);
|
|
2389
|
+
};
|
|
2390
|
+
saveAnswer = () => {
|
|
2391
|
+
// Set the Answer Number based on the Question Stack Length
|
|
2392
|
+
if (this.inpValue != ".") {
|
|
2393
|
+
this.currentQuestionId = null;
|
|
2394
|
+
}
|
|
2395
|
+
this.answerWrap.ansNumber = this.questionStack.length + 1;
|
|
2396
|
+
if (this.serv == "api") {
|
|
2397
|
+
this.dataService.getAPIData(this.tkn, ["Answer", "create", JSON.stringify(this.answerWrap)], this.successSave, this.failureSave);
|
|
2398
|
+
}
|
|
2399
|
+
else {
|
|
2400
|
+
this.sfService.remoteAction("NxtController.process", ["Answer", "create", JSON.stringify(this.answerWrap)], this.successSave, this.failureSave);
|
|
2401
|
+
}
|
|
2402
|
+
};
|
|
2403
|
+
htmlDecode(input) {
|
|
2404
|
+
var doc = new DOMParser().parseFromString(input, "text/html");
|
|
2405
|
+
return doc.documentElement.textContent;
|
|
2406
|
+
}
|
|
2407
|
+
successSave = (response) => {
|
|
2408
|
+
if (response.status == "success") {
|
|
2409
|
+
//this.abItem = response.answerbook;
|
|
2410
|
+
this.answerMap.set(response.answer.quesId, response.answer);
|
|
2411
|
+
}
|
|
2412
|
+
else {
|
|
2413
|
+
this.questionItem.error = new ErrorWrapper();
|
|
2414
|
+
this.questionItem.error.errorMsg = response.error.errorMsg;
|
|
2415
|
+
}
|
|
2416
|
+
if (!this.backButtonFlag) {
|
|
2417
|
+
this.next();
|
|
2418
|
+
}
|
|
2419
|
+
};
|
|
2420
|
+
failureSave = (response) => {
|
|
2421
|
+
//console.log('inside failureSave');
|
|
2422
|
+
//console.log(response);
|
|
2423
|
+
};
|
|
2424
|
+
processQuestion = () => {
|
|
2425
|
+
// console.log('Inside the processQuestion');
|
|
2426
|
+
// console.log('splCCBackClick = '+this.splCCBackClick);
|
|
2427
|
+
// console.log(this.questionStack);
|
|
2428
|
+
//console.log(this.questionItem);
|
|
2429
|
+
this.pop = true;
|
|
2430
|
+
// if(!this.back){
|
|
2431
|
+
// this.questionName.push(this.questionItem.Name)
|
|
2432
|
+
// }
|
|
2433
|
+
if (this.qbItem.Progress_Bar__c === true) {
|
|
2434
|
+
if (!this.back) {
|
|
2435
|
+
this.questionName.push(this.questionItem.Name);
|
|
2436
|
+
}
|
|
2437
|
+
this.back = false;
|
|
2438
|
+
if (this.questionName[0] === this.questionName[1]) {
|
|
2439
|
+
this.questionName.pop();
|
|
2440
|
+
}
|
|
2441
|
+
this.currentName = this.questionItem.Name;
|
|
2442
|
+
this.pathquestion = this.questionName.indexOf(this.currentName);
|
|
2443
|
+
this.possibilities = this.qbItem.Possibilities__c;
|
|
2444
|
+
}
|
|
2445
|
+
this.myDatePickerOptions;
|
|
2446
|
+
this.day();
|
|
2447
|
+
//console.log('processing question ' + this.questionItem.Name + ' existing answers are ' + this.answerMap.size); // => ' + JSON.stringify(this.questionItem));
|
|
2448
|
+
// Set the Flags to show right fields
|
|
2449
|
+
this.setFlag(this.questionItem.Type__c);
|
|
2450
|
+
//console.log('After the setFlag method dtFlag = '+this.dtFlag);
|
|
2451
|
+
// Check the existing answer from answerMap
|
|
2452
|
+
if (this.answerMap.has(this.questionItem.Id)) {
|
|
2453
|
+
// //console.log("existing answer found for this.questionItem.Name");
|
|
2454
|
+
var eAnswer = this.answerMap.get(this.questionItem.Id);
|
|
2455
|
+
// Get the existing answer from the Map
|
|
2456
|
+
this.inpValue = eAnswer.ansValue;
|
|
2457
|
+
//console.log('inpValue has been set to ' + this.inpValue);
|
|
2458
|
+
if (this.attachmentsMap.has(this.questionItem.Id)) {
|
|
2459
|
+
this.attachments = this.attachmentsMap.get(this.questionItem.Id);
|
|
2460
|
+
}
|
|
2461
|
+
}
|
|
2462
|
+
else {
|
|
2463
|
+
//console.log('inside removing attachment array');
|
|
2464
|
+
this.attachments = [];
|
|
2465
|
+
}
|
|
2466
|
+
// console.log(this.inpValue);
|
|
2467
|
+
if (this.splCCBackClick && this.inpValue && this.inpValue.includes('ES')) {
|
|
2468
|
+
// console.log('Inside the if cond');
|
|
2469
|
+
this.splCCBackClick = false;
|
|
2470
|
+
this.inpValue = this.inpValue.replace('ES', '');
|
|
2471
|
+
}
|
|
2472
|
+
if (this.checkboxFlag) {
|
|
2473
|
+
// Set the Options for Checkbox
|
|
2474
|
+
this.setOptions(this.questionItem.Question_Options__r.records);
|
|
2475
|
+
}
|
|
2476
|
+
else if (this.bookFlag) {
|
|
2477
|
+
//console.log('Inise the expected bookFlag cond');
|
|
2478
|
+
//console.log('dtFlag = '+this.dtFlag);
|
|
2479
|
+
this.setSubQuestions(this.questionItem.Questions__r.records);
|
|
2480
|
+
}
|
|
2481
|
+
else if (this.listFlag) {
|
|
2482
|
+
// Set the LocalSubQuestions
|
|
2483
|
+
// console.log('inside list flag');
|
|
2484
|
+
// console.log(this.questionItem.Questions__r.records);
|
|
2485
|
+
// console.log(this.abItem.Questions__r.records);
|
|
2486
|
+
if (!this.localSubQMap.has(this.questionItem.Id)) {
|
|
2487
|
+
this.setSubQuestions(this.questionItem.Questions__r.records);
|
|
2488
|
+
}
|
|
2489
|
+
}
|
|
2490
|
+
else if (this.dtFlag) {
|
|
2491
|
+
//console.log('Inise the unexpected dtFlag cond');
|
|
2492
|
+
this.selectedHour = "";
|
|
2493
|
+
this.selectedMinute = "";
|
|
2494
|
+
this.selDate = "";
|
|
2495
|
+
// 2021-5-16T00:00
|
|
2496
|
+
if (this.dateMap.has(this.questionItem.Id)) {
|
|
2497
|
+
this.selDate = this.dateMap.get(this.questionItem.Id);
|
|
2498
|
+
}
|
|
2499
|
+
if (this.selectedhourMap.has(this.questionItem.Id)) {
|
|
2500
|
+
this.selectedHour = this.selectedhourMap.get(this.questionItem.Id);
|
|
2501
|
+
}
|
|
2502
|
+
if (this.selectedminuteMap.has(this.questionItem.Id)) {
|
|
2503
|
+
this.selectedMinute = this.selectedminuteMap.get(this.questionItem.Id);
|
|
2504
|
+
}
|
|
2505
|
+
if (this.questionItem.X24_Hours__c === true) {
|
|
2506
|
+
this.hours.push("13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "00");
|
|
2507
|
+
}
|
|
2508
|
+
if (this.questionItem.X24_Hours__c === false) {
|
|
2509
|
+
this.hours = this.hours.slice(0, 12);
|
|
2510
|
+
}
|
|
2511
|
+
if (this.dtFlag && this.inpValue) {
|
|
2512
|
+
var dtVal = this.inpValue.split("T");
|
|
2513
|
+
var dtval0 = this.inpValue.split(" ");
|
|
2514
|
+
this.inpValue = dtVal[0];
|
|
2515
|
+
this.inpValue = dtval0[0];
|
|
2516
|
+
this.questionItem.input = dtVal[1];
|
|
2517
|
+
this.questionItem.input = dtval0[1];
|
|
2518
|
+
}
|
|
2519
|
+
if (this.questionItem.Is_Date_Backward__c ||
|
|
2520
|
+
this.questionItem.Is_Date_Forward__c) {
|
|
2521
|
+
if (this.questionItem.Is_Date_Backward__c === true) {
|
|
2522
|
+
this.myDatePickerOptions.disableSince = {
|
|
2523
|
+
year: this.today.getFullYear(),
|
|
2524
|
+
month: this.today.getMonth() + 1,
|
|
2525
|
+
day: this.today.getDate() + 1,
|
|
2526
|
+
};
|
|
2527
|
+
}
|
|
2528
|
+
if (this.questionItem.Is_Date_Forward__c === true) {
|
|
2529
|
+
this.myDatePickerOptions.disableUntil = {
|
|
2530
|
+
year: this.today.getFullYear(),
|
|
2531
|
+
month: this.today.getMonth() + 1,
|
|
2532
|
+
day: this.today.getDate(),
|
|
2533
|
+
};
|
|
2534
|
+
}
|
|
2535
|
+
}
|
|
2536
|
+
}
|
|
2537
|
+
else if (this.fileFlag) {
|
|
2538
|
+
this.fileUI();
|
|
2539
|
+
// logic
|
|
2540
|
+
this.allowedFileExtension =
|
|
2541
|
+
this.questionItem.Allowed_File_Extensions__c.split(";");
|
|
2542
|
+
//console.log(this.allowedFileExtension);
|
|
2543
|
+
}
|
|
2544
|
+
if (this.qbItem.Progress_Bar__c === true) {
|
|
2545
|
+
this.updateProgress();
|
|
2546
|
+
}
|
|
2547
|
+
};
|
|
2548
|
+
setFlag(typ) {
|
|
2549
|
+
//console.log('inside setFlag for ' + typ);
|
|
2550
|
+
if (typ) {
|
|
2551
|
+
// Set the Flags
|
|
2552
|
+
if (typ == "Text") {
|
|
2553
|
+
this.textFlag = true;
|
|
2554
|
+
//this.numberFlag = true;
|
|
2555
|
+
}
|
|
2556
|
+
else if (typ == "Number") {
|
|
2557
|
+
this.numberFlag = true;
|
|
2558
|
+
}
|
|
2559
|
+
else if (typ == "AlphaNumeric") {
|
|
2560
|
+
this.alphanumericFlag = true;
|
|
2561
|
+
/*if(this.inpValue.length === 0){
|
|
2562
|
+
this.inpValue='ES'
|
|
2563
|
+
}*/
|
|
2564
|
+
}
|
|
2565
|
+
else if (typ == "Email") {
|
|
2566
|
+
this.emailFlag = true;
|
|
2567
|
+
}
|
|
2568
|
+
else if (typ == "File") {
|
|
2569
|
+
this.fileFlag = true;
|
|
2570
|
+
}
|
|
2571
|
+
else if (typ == "DateTime") {
|
|
2572
|
+
this.dtFlag = true;
|
|
2573
|
+
this.timeFlag = true;
|
|
2574
|
+
this.dateFlag = true;
|
|
2575
|
+
}
|
|
2576
|
+
else if (typ == "TextArea") {
|
|
2577
|
+
this.taFlag = true;
|
|
2578
|
+
}
|
|
2579
|
+
else if (typ == "Radio") {
|
|
2580
|
+
this.radioFlag = true;
|
|
2581
|
+
}
|
|
2582
|
+
else if (typ == "Dropdown") {
|
|
2583
|
+
this.dropdownFlag = true;
|
|
2584
|
+
}
|
|
2585
|
+
else if (typ == "Checkbox") {
|
|
2586
|
+
this.checkboxFlag = true;
|
|
2587
|
+
}
|
|
2588
|
+
else if (typ == "Book") {
|
|
2589
|
+
this.bookFlag = true;
|
|
2590
|
+
}
|
|
2591
|
+
else if (typ == 'List') {
|
|
2592
|
+
this.listFlag = true;
|
|
2593
|
+
}
|
|
2594
|
+
else if (typ == "Time") {
|
|
2595
|
+
//console.log('Inside the Time cond');
|
|
2596
|
+
this.dtFlag = true;
|
|
2597
|
+
this.timeFlag = true;
|
|
2598
|
+
//console.log(this.dtFlag);
|
|
2599
|
+
}
|
|
2600
|
+
else if (typ == "Date") {
|
|
2601
|
+
//console.log('Inside the Date cond');
|
|
2602
|
+
this.dtFlag = true;
|
|
2603
|
+
this.dateFlag = true;
|
|
2604
|
+
//console.log(this.dtFlag);
|
|
2605
|
+
}
|
|
2606
|
+
}
|
|
2607
|
+
}
|
|
2608
|
+
resetFlag(typ) {
|
|
2609
|
+
if (typ) {
|
|
2610
|
+
// Set the Flags
|
|
2611
|
+
if (typ == "Text") {
|
|
2612
|
+
this.textFlag = false;
|
|
2613
|
+
//this.numberFlag = false;
|
|
2614
|
+
}
|
|
2615
|
+
else if (typ == "Number") {
|
|
2616
|
+
this.numberFlag = false;
|
|
2617
|
+
}
|
|
2618
|
+
else if (typ == "Alphanumeric") {
|
|
2619
|
+
this.alphanumericFlag = false;
|
|
2620
|
+
}
|
|
2621
|
+
else if (typ == "Email") {
|
|
2622
|
+
this.emailFlag = false;
|
|
2623
|
+
}
|
|
2624
|
+
else if (typ == "File") {
|
|
2625
|
+
this.fileFlag = false;
|
|
2626
|
+
}
|
|
2627
|
+
else if (typ == "DateTime") {
|
|
2628
|
+
this.dtFlag = false;
|
|
2629
|
+
this.dateFlag = false;
|
|
2630
|
+
this.timeFlag = false;
|
|
2631
|
+
}
|
|
2632
|
+
else if (typ == "TextArea") {
|
|
2633
|
+
this.taFlag = false;
|
|
2634
|
+
}
|
|
2635
|
+
else if (typ == "Radio") {
|
|
2636
|
+
this.radioFlag = false;
|
|
2637
|
+
}
|
|
2638
|
+
else if (typ == "Dropdown") {
|
|
2639
|
+
this.dropdownFlag = false;
|
|
2640
|
+
}
|
|
2641
|
+
else if (typ == "Checkbox") {
|
|
2642
|
+
this.checkboxFlag = false;
|
|
2643
|
+
}
|
|
2644
|
+
else if (typ == "Book") {
|
|
2645
|
+
this.bookFlag = false;
|
|
2646
|
+
}
|
|
2647
|
+
else if (typ == 'List') {
|
|
2648
|
+
this.listFlag = false;
|
|
2649
|
+
}
|
|
2650
|
+
else if (typ == "Time") {
|
|
2651
|
+
this.dtFlag = false;
|
|
2652
|
+
this.timeFlag = false;
|
|
2653
|
+
}
|
|
2654
|
+
else if (typ == "Date") {
|
|
2655
|
+
this.dtFlag = false;
|
|
2656
|
+
this.dateFlag = false;
|
|
2657
|
+
}
|
|
2658
|
+
}
|
|
2659
|
+
}
|
|
2660
|
+
setOptions(records) {
|
|
2661
|
+
for (var opt of records) {
|
|
2662
|
+
var ov = new OptionValue();
|
|
2663
|
+
ov.Id = opt.Id;
|
|
2664
|
+
ov.Name = opt.Name;
|
|
2665
|
+
ov.Value__c = opt.Value__c;
|
|
2666
|
+
ov.Next_Question__c = opt.Next_Question__c;
|
|
2667
|
+
ov.checked = false;
|
|
2668
|
+
if (this.inpValue &&
|
|
2669
|
+
this.inpValue.split("@@##$$").includes(opt.Value__c)) {
|
|
2670
|
+
ov.checked = true;
|
|
2671
|
+
}
|
|
2672
|
+
this.optionValues.push(ov);
|
|
2673
|
+
}
|
|
2674
|
+
}
|
|
2675
|
+
Dropdown(event, ques) {
|
|
2676
|
+
ques.input = event; // here when using the ng-select got event as value
|
|
2677
|
+
}
|
|
2678
|
+
setSubQuestions(records) {
|
|
2679
|
+
// console.log('inside setSubQuestions');
|
|
2680
|
+
// console.log(records);
|
|
2681
|
+
var qaMap = new Map();
|
|
2682
|
+
// console.log(this.inpValue);
|
|
2683
|
+
if (this.inpValue) {
|
|
2684
|
+
var aIndex = 0;
|
|
2685
|
+
// search changed as semi colon because of address contains comma
|
|
2686
|
+
if ((this.inpValue.search("; ") == -1)) {
|
|
2687
|
+
// const withoutAnswerString = this.inpValue.replace("answerString: ", ""); //remove the answer string
|
|
2688
|
+
// this.inpValue = withoutAnswerString;
|
|
2689
|
+
this.inpValue = this.inpValue + '@@##$$';
|
|
2690
|
+
for (var ansStr of this.inpValue.split("@@##$$")) {
|
|
2691
|
+
aIndex++;
|
|
2692
|
+
qaMap.set(aIndex, ansStr);
|
|
2693
|
+
//console.log('Setting the qaMap for ' + aIndex + ' with ' + ansStr);
|
|
2694
|
+
}
|
|
2695
|
+
}
|
|
2696
|
+
else {
|
|
2697
|
+
for (var ansStr of this.inpValue.split("; ")) {
|
|
2698
|
+
aIndex++;
|
|
2699
|
+
qaMap.set(aIndex, ansStr);
|
|
2700
|
+
//console.log('Setting the qaMap ' + aIndex + ' with ' + ansStr);
|
|
2701
|
+
}
|
|
2702
|
+
}
|
|
2703
|
+
}
|
|
2704
|
+
// console.log('after setting values from inpvalue qa map are');
|
|
2705
|
+
// console.log(qaMap);
|
|
2706
|
+
for (var ques of records) {
|
|
2707
|
+
if (ques.Type__c == "File") {
|
|
2708
|
+
this.valueName1 = ques.Allowed_File_Extensions__c;
|
|
2709
|
+
//console.log(this.valueName1);
|
|
2710
|
+
}
|
|
2711
|
+
var ans = '';
|
|
2712
|
+
if (qaMap.has(ques.Question_No__c)) {
|
|
2713
|
+
ques.input = qaMap.get(ques.Question_No__c);
|
|
2714
|
+
// console.log('after fetching map values');
|
|
2715
|
+
// console.log(ques.input);
|
|
2716
|
+
if (ques.input.indexOf('$$@@##') > 0) {
|
|
2717
|
+
// console.log('answer supposed to be trimmed');
|
|
2718
|
+
// console.log(ques.input);
|
|
2719
|
+
ans = ques.input.substring(ques.input.indexOf('$$@@##') + 6, ques.input.length);
|
|
2720
|
+
// console.log(ans);
|
|
2721
|
+
ques.input = ques.input.substring(0, ques.input.indexOf('$$@@##'));
|
|
2722
|
+
// console.log(ques.input);
|
|
2723
|
+
}
|
|
2724
|
+
}
|
|
2725
|
+
if ((ques.Type__c === "Date") && (ques.Is_Date_Backward__c || ques.Is_Date_Forward__c)) {
|
|
2726
|
+
//console.log('Inside the date backward/forward cond');
|
|
2727
|
+
if (ques.Is_Date_Backward__c === true) {
|
|
2728
|
+
//console.log('Inside the Is_Date_Backward__c');
|
|
2729
|
+
this.myDatePickerOptions.disableSince = {
|
|
2730
|
+
year: this.today.getFullYear(),
|
|
2731
|
+
month: this.today.getMonth() + 1,
|
|
2732
|
+
day: this.today.getDate() + 1,
|
|
2733
|
+
};
|
|
2734
|
+
}
|
|
2735
|
+
if (ques.Is_Date_Forward__c === true) {
|
|
2736
|
+
//console.log('Inside the Is_Date_Forward__c');
|
|
2737
|
+
this.myDatePickerOptions.disableUntil = {
|
|
2738
|
+
year: this.today.getFullYear(),
|
|
2739
|
+
month: this.today.getMonth() + 1,
|
|
2740
|
+
day: this.today.getDate(),
|
|
2741
|
+
};
|
|
2742
|
+
}
|
|
2743
|
+
//console.log(this.myDatePickerOptions);
|
|
2744
|
+
}
|
|
2745
|
+
this.subQuestions.push(ques);
|
|
2746
|
+
for (var i = 0; i < this.subQuestions.length; i++) {
|
|
2747
|
+
// to show/hide the dependent dropdown only field using the dropDownOnly boolean
|
|
2748
|
+
if (this.subQuestions[i].Size__c == 4) {
|
|
2749
|
+
this.subQuestions[i].dropDownOnly = true;
|
|
2750
|
+
}
|
|
2751
|
+
else {
|
|
2752
|
+
this.subQuestions[i].dropDownOnly = false;
|
|
2753
|
+
}
|
|
2754
|
+
}
|
|
2755
|
+
if (ans != '') {
|
|
2756
|
+
for (var an of (ans.split('$$@@##'))) {
|
|
2757
|
+
var sQ = new Question();
|
|
2758
|
+
Object.assign(sQ, ques);
|
|
2759
|
+
sQ.input = an;
|
|
2760
|
+
this.subQuestions.push(sQ);
|
|
2761
|
+
}
|
|
2762
|
+
}
|
|
2763
|
+
}
|
|
2764
|
+
if (this.valueName1 != null && this.valueName1.length > 0) {
|
|
2765
|
+
this.bookFlagAccept = this.valueName1.split(";");
|
|
2766
|
+
//console.log(this.subQuestions);
|
|
2767
|
+
}
|
|
2768
|
+
this.structLocalSubQuestion(null);
|
|
2769
|
+
}
|
|
2770
|
+
optionChange(selValue) {
|
|
2771
|
+
let radioTrackingId = "";
|
|
2772
|
+
for (var opt of this.questionItem.Question_Options__r.records) {
|
|
2773
|
+
//console.log('optionChange TrackingId'+opt.Tracking_ID__c);
|
|
2774
|
+
if (opt.Value__c == selValue) {
|
|
2775
|
+
//console.log('inside if'+opt.Tracking_ID__c)
|
|
2776
|
+
radioTrackingId = opt.Tracking_ID__c;
|
|
2777
|
+
}
|
|
2778
|
+
}
|
|
2779
|
+
this.handleEvent.emit(radioTrackingId);
|
|
2780
|
+
this.clearError();
|
|
2781
|
+
// //console.log('inside optionChange using ' + selValue);
|
|
2782
|
+
this.inpValue = selValue;
|
|
2783
|
+
}
|
|
2784
|
+
clearError() {
|
|
2785
|
+
if (this.questionItem.error) {
|
|
2786
|
+
this.questionItem.error = null;
|
|
2787
|
+
}
|
|
2788
|
+
}
|
|
2789
|
+
clearLocalSubQuesError(quesId) {
|
|
2790
|
+
quesId.error = null;
|
|
2791
|
+
}
|
|
2792
|
+
inputValidate(e) {
|
|
2793
|
+
var keyCode = e.keyCode || e.which;
|
|
2794
|
+
// Only ASCII character in that range allowed
|
|
2795
|
+
var ASCIICode = (e.which) ? e.which : e.keyCode;
|
|
2796
|
+
if (ASCIICode > 31 && (ASCIICode < 48 || ASCIICode > 57)) {
|
|
2797
|
+
return false;
|
|
2798
|
+
}
|
|
2799
|
+
else {
|
|
2800
|
+
return true;
|
|
2801
|
+
}
|
|
2802
|
+
}
|
|
2803
|
+
CCOnChange(inpValue) {
|
|
2804
|
+
if (inpValue.length == 2) {
|
|
2805
|
+
this.inpValue += " ";
|
|
2806
|
+
}
|
|
2807
|
+
else if (inpValue.length == 7) {
|
|
2808
|
+
this.inpValue += " ";
|
|
2809
|
+
}
|
|
2810
|
+
else if (inpValue.length == 12) {
|
|
2811
|
+
this.inpValue += " ";
|
|
2812
|
+
}
|
|
2813
|
+
else if (inpValue.length == 17) {
|
|
2814
|
+
this.inpValue += " ";
|
|
2815
|
+
}
|
|
2816
|
+
else if (inpValue.length == 22) {
|
|
2817
|
+
this.inpValue += " ";
|
|
2818
|
+
}
|
|
2819
|
+
}
|
|
2820
|
+
isNotValidAccNumber(s) {
|
|
2821
|
+
s = s.replace(/\s+/g, "");
|
|
2822
|
+
s = 'ES' + s;
|
|
2823
|
+
var isNotValidStr = false;
|
|
2824
|
+
if (s.length == 24) {
|
|
2825
|
+
for (var i = 0; i < s.length; i++) {
|
|
2826
|
+
if (i <= 1 && /[a-zA-Z]/.test(s.charAt(i))) {
|
|
2827
|
+
//console.log("Valid char: " + s.charAt(i));
|
|
2828
|
+
}
|
|
2829
|
+
else if (i > 1 && /[0-9]/.test(s.charAt(i))) {
|
|
2830
|
+
//console.log("Valid numeric: " + s.charAt(i));
|
|
2831
|
+
}
|
|
2832
|
+
else {
|
|
2833
|
+
isNotValidStr = true;
|
|
2834
|
+
//console.log("Not a valid char");
|
|
2835
|
+
}
|
|
2836
|
+
}
|
|
2837
|
+
}
|
|
2838
|
+
else {
|
|
2839
|
+
isNotValidStr = true;
|
|
2840
|
+
//console.log("Not a valid acc number");
|
|
2841
|
+
}
|
|
2842
|
+
return isNotValidStr;
|
|
2843
|
+
}
|
|
2844
|
+
clearSQError(quesId) {
|
|
2845
|
+
var sqList = this.subQuestions.filter((item) => item.Id == quesId);
|
|
2846
|
+
for (var sq of sqList) {
|
|
2847
|
+
sq.error = null;
|
|
2848
|
+
}
|
|
2849
|
+
}
|
|
2850
|
+
uploadFile(event, ques) {
|
|
2851
|
+
//console.log('inside upload');
|
|
2852
|
+
this.clearError();
|
|
2853
|
+
this.fileTypeIncorrect = false;
|
|
2854
|
+
var local = this;
|
|
2855
|
+
local.attachment = event.target.files[0];
|
|
2856
|
+
// Validate the file extension
|
|
2857
|
+
//console.log(local.attachment);
|
|
2858
|
+
let fileNameWithType = local.attachment && local.attachment.name.toLowerCase();
|
|
2859
|
+
if (!fileNameWithType.endsWith(".jpg") &&
|
|
2860
|
+
!fileNameWithType.endsWith(".png") &&
|
|
2861
|
+
!fileNameWithType.endsWith(".pdf") &&
|
|
2862
|
+
!fileNameWithType.endsWith(".jpeg") &&
|
|
2863
|
+
!fileNameWithType.endsWith(".heic") &&
|
|
2864
|
+
!fileNameWithType.endsWith(".heif") &&
|
|
2865
|
+
!fileNameWithType.endsWith(".JPG") &&
|
|
2866
|
+
!fileNameWithType.endsWith(".PNG") &&
|
|
2867
|
+
!fileNameWithType.endsWith(".PDF") &&
|
|
2868
|
+
!fileNameWithType.endsWith(".JPEG") &&
|
|
2869
|
+
!fileNameWithType.endsWith(".HEIC") &&
|
|
2870
|
+
!fileNameWithType.endsWith(".HEIF")) {
|
|
2871
|
+
local.fileTypeIncorrect = true;
|
|
2872
|
+
}
|
|
2873
|
+
// Return when the file type is incorrect
|
|
2874
|
+
if (local.fileTypeIncorrect) {
|
|
2875
|
+
return;
|
|
2876
|
+
}
|
|
2877
|
+
let fileContent;
|
|
2878
|
+
var reader = new FileReader();
|
|
2879
|
+
reader.onload = function () {
|
|
2880
|
+
fileContent = reader.result;
|
|
2881
|
+
local.fileExceededLimit = local.attachment.size > 3242880; //Validating file size
|
|
2882
|
+
// Upload the file to Salesforce when the limit is within range
|
|
2883
|
+
if (!local.fileExceededLimit) {
|
|
2884
|
+
let fileWrapper = new AttachmentWrapper();
|
|
2885
|
+
fileWrapper.parentId = local.abItem.Id;
|
|
2886
|
+
fileWrapper.fileName = local.attachment.name;
|
|
2887
|
+
fileWrapper.fileContent = fileContent;
|
|
2888
|
+
local.createAttachment(fileWrapper);
|
|
2889
|
+
ques.input = fileWrapper.fileName;
|
|
2890
|
+
}
|
|
2891
|
+
};
|
|
2892
|
+
this.spinner.show(this.spinnerName);
|
|
2893
|
+
reader.readAsDataURL(event.target.files[0]);
|
|
2894
|
+
}
|
|
2895
|
+
successAttachmentCreate = (response) => {
|
|
2896
|
+
let createdAttachment = new Attachment(response.attachmentId, response.attachmentName, this.attachment.lastModifiedDate);
|
|
2897
|
+
this.attachments.push(createdAttachment);
|
|
2898
|
+
this.attachmentsMap.set(this.questionItem.Id, this.attachments);
|
|
2899
|
+
this.spinner.hide(this.spinnerName);
|
|
2900
|
+
};
|
|
2901
|
+
successAttachmentDelete = (response) => {
|
|
2902
|
+
for (let i = 0; i < this.attachments.length; i++) {
|
|
2903
|
+
if (this.attachments[i].attachmentId === this.attachmentId) {
|
|
2904
|
+
this.attachments.splice(i, 1);
|
|
2905
|
+
}
|
|
2906
|
+
}
|
|
2907
|
+
};
|
|
2908
|
+
failureAttachmentCreate = (response) => {
|
|
2909
|
+
//console.log('inside failureAttachmentCreate');
|
|
2910
|
+
};
|
|
2911
|
+
failureAttachmentDelete = (response) => {
|
|
2912
|
+
//console.log('inside failureAttachmentDelete');
|
|
2913
|
+
};
|
|
2914
|
+
handleSubmitClick() {
|
|
2915
|
+
this.handleEvent.emit(this.qbItem.Submit_Tracking_ID__c);
|
|
2916
|
+
this.updateAnswerBook(this.abItem.Id);
|
|
2917
|
+
}
|
|
2918
|
+
handleCancelClick() {
|
|
2919
|
+
this.handleEvent.emit(this.qbItem.Cancel_Tracking_ID__c);
|
|
2920
|
+
}
|
|
2921
|
+
createAttachment = (fileWrapper) => {
|
|
2922
|
+
if (this.serv == "api") {
|
|
2923
|
+
this.dataService.getAPIData(this.tkn, ["Attachment", "create", JSON.stringify(fileWrapper)], this.successAttachmentCreate, this.failureAttachmentCreate);
|
|
2924
|
+
}
|
|
2925
|
+
else {
|
|
2926
|
+
this.sfService.remoteAction("NxtController.process", ["Attachment", "create", JSON.stringify(fileWrapper)], this.successAttachmentCreate, this.failureAttachmentCreate);
|
|
2927
|
+
}
|
|
2928
|
+
};
|
|
2929
|
+
deleteAttachment(attachmentId) {
|
|
2930
|
+
this.attachmentId = attachmentId;
|
|
2931
|
+
this.handleEvent.emit("deleteAttachment");
|
|
2932
|
+
this.deleteSFAttachment(attachmentId);
|
|
2933
|
+
}
|
|
2934
|
+
deleteSFAttachment = (fileId) => {
|
|
2935
|
+
if (this.serv == "api") {
|
|
2936
|
+
this.dataService.getAPIData(this.tkn, ["Attachment", "delete", fileId], this.successAttachmentDelete, this.failureAttachmentDelete);
|
|
2937
|
+
}
|
|
2938
|
+
else {
|
|
2939
|
+
this.sfService.remoteAction("NxtController.process", ["Attachment", "delete", fileId], this.successAttachmentDelete, this.failureAttachmentDelete);
|
|
2940
|
+
}
|
|
2941
|
+
};
|
|
2942
|
+
getFileName(fileNamewithIdandType) {
|
|
2943
|
+
//truncate file path
|
|
2944
|
+
var fileNameWithType = fileNamewithIdandType.substr(fileNamewithIdandType.indexOf("::::") + 4);
|
|
2945
|
+
return fileNameWithType; //fileNameWithType.replace(/^(.*(\/|\\))(.+)$/, '$3');
|
|
2946
|
+
}
|
|
2947
|
+
fileUI() {
|
|
2948
|
+
if (this.attachments.length === 0) {
|
|
2949
|
+
}
|
|
2950
|
+
}
|
|
2951
|
+
//Update function for categorization
|
|
2952
|
+
// stepperCateg() {
|
|
2953
|
+
// this.firstFormGroup = this._formBuilder.group({
|
|
2954
|
+
// firstCtrl: ['', Validators.required]
|
|
2955
|
+
// });
|
|
2956
|
+
// this.secondFormGroup = this._formBuilder.group({
|
|
2957
|
+
// secondCtrl: ['', Validators.required]
|
|
2958
|
+
// });
|
|
2959
|
+
// }
|
|
2960
|
+
// Update Function for the Progress Bar
|
|
2961
|
+
updateProgress() {
|
|
2962
|
+
if (this.qbItem.Progress_Bar__c === true) {
|
|
2963
|
+
let j = [];
|
|
2964
|
+
for (let i = 0; i < this.possibilities.total; i++) {
|
|
2965
|
+
var pathposs = Object.values(this.possibilities.paths[i].questions);
|
|
2966
|
+
if (pathposs[this.pathquestion] === this.currentName) {
|
|
2967
|
+
j.push(i);
|
|
2968
|
+
this.check = true;
|
|
2969
|
+
}
|
|
2970
|
+
else {
|
|
2971
|
+
this.check = false;
|
|
2972
|
+
}
|
|
2973
|
+
}
|
|
2974
|
+
if (j.length === 1) {
|
|
2975
|
+
this.count = j[0];
|
|
2976
|
+
}
|
|
2977
|
+
if (j.length > 1) {
|
|
2978
|
+
var width = 90 * (this.questionStack.length / this.possibilities.maxQuestions);
|
|
2979
|
+
this.progressStyle = Math.round(width) + "%";
|
|
2980
|
+
}
|
|
2981
|
+
else if (j.length === 1) {
|
|
2982
|
+
var width = 90 *
|
|
2983
|
+
(this.questionStack.length /
|
|
2984
|
+
this.possibilities.paths[this.count].count);
|
|
2985
|
+
this.progressStyle = Math.round(width) + "%";
|
|
2986
|
+
}
|
|
2987
|
+
this.percent = +Math.round(width);
|
|
2988
|
+
}
|
|
2989
|
+
}
|
|
2990
|
+
townName(area) {
|
|
2991
|
+
this.selectedValue = area.town;
|
|
2992
|
+
//console.log('this value='+this.selectedValue)
|
|
2993
|
+
this.tempoAddress = [];
|
|
2994
|
+
}
|
|
2995
|
+
getTownLocal() {
|
|
2996
|
+
this.tempoAddress = [];
|
|
2997
|
+
if (this.selectedValue.length > 0) {
|
|
2998
|
+
for (var val of this.localaddress) {
|
|
2999
|
+
if (val.town.substring(0, this.selectedValue.length) == this.selectedValue) {
|
|
3000
|
+
//console.log(val.country)
|
|
3001
|
+
this.tempoAddress.push(val);
|
|
3002
|
+
//console.log('tempoAddress'+this.tempoAddress)
|
|
3003
|
+
if (this.tempoAddress.length == 6) {
|
|
3004
|
+
break;
|
|
3005
|
+
}
|
|
3006
|
+
}
|
|
3007
|
+
}
|
|
3008
|
+
}
|
|
3009
|
+
document.getElementById("selectList").style.display = "block";
|
|
3010
|
+
this.setSearchListWidth();
|
|
3011
|
+
}
|
|
3012
|
+
clearList() {
|
|
3013
|
+
setTimeout(() => {
|
|
3014
|
+
this.tempoAddress = [];
|
|
3015
|
+
}, 500);
|
|
3016
|
+
}
|
|
3017
|
+
setSearchListWidth() {
|
|
3018
|
+
//to resize search list based on the screen size
|
|
3019
|
+
const searchBoxWidth = window.document.getElementById("autocomplete-input").offsetWidth;
|
|
3020
|
+
document.getElementById("selectList").style.width = searchBoxWidth + "px";
|
|
3021
|
+
}
|
|
3022
|
+
getCode() {
|
|
3023
|
+
this.tempoAddress = [];
|
|
3024
|
+
if (this.selectedPostalcode.length > 0) {
|
|
3025
|
+
for (var val of this.allAddress) {
|
|
3026
|
+
if (val.zipCode.substring(0, this.selectedPostalcode.length) == this.selectedPostalcode) {
|
|
3027
|
+
//console.log(val.country)
|
|
3028
|
+
this.tempoAddress.push(val);
|
|
3029
|
+
//console.log('tempoAddress'+this.tempoAddress)
|
|
3030
|
+
if (this.tempoAddress.length == 6) {
|
|
3031
|
+
break;
|
|
3032
|
+
}
|
|
3033
|
+
}
|
|
3034
|
+
}
|
|
3035
|
+
}
|
|
3036
|
+
document.getElementById("selectList").style.display = "block";
|
|
3037
|
+
this.setSearchListWidth();
|
|
3038
|
+
}
|
|
3039
|
+
getPostalcode(value) {
|
|
3040
|
+
this.places = [];
|
|
3041
|
+
this.province = [];
|
|
3042
|
+
var province;
|
|
3043
|
+
var town;
|
|
3044
|
+
this.selectedPostalcode = value.zipCode;
|
|
3045
|
+
this.selectedValue = value.country;
|
|
3046
|
+
this.tempoAddress = [];
|
|
3047
|
+
for (var val of this.localaddress) {
|
|
3048
|
+
if (this.selectedPostalcode == val.zipCode) {
|
|
3049
|
+
this.places.push(val);
|
|
3050
|
+
this.province.push(val);
|
|
3051
|
+
this.selectedValue = val.country;
|
|
3052
|
+
province = val.province;
|
|
3053
|
+
town = val.town;
|
|
3054
|
+
}
|
|
3055
|
+
}
|
|
3056
|
+
if (this.places.length == 1) {
|
|
3057
|
+
this.selectedProvince = province;
|
|
3058
|
+
this.selectedCity = town;
|
|
3059
|
+
}
|
|
3060
|
+
else if (this.places.length > 1 || this.places.length == 0) {
|
|
3061
|
+
this.selectedCity = '';
|
|
3062
|
+
this.selectedProvince = '';
|
|
3063
|
+
}
|
|
3064
|
+
}
|
|
3065
|
+
closeDropdown() {
|
|
3066
|
+
if (this.selectedPostalcode.length == 5) {
|
|
3067
|
+
this.getPostalcode({ zipCode: this.selectedPostalcode });
|
|
3068
|
+
}
|
|
3069
|
+
setTimeout(() => {
|
|
3070
|
+
document.getElementById('selectList').style.display = "none";
|
|
3071
|
+
}, 500);
|
|
3072
|
+
}
|
|
3073
|
+
//Plus button implementation.
|
|
3074
|
+
structLocalSubQuestion(ques) {
|
|
3075
|
+
// console.log('inside structLocalSubQuestion');
|
|
3076
|
+
for (var i = 0; i < this.subQuestions.length; i++) {
|
|
3077
|
+
var localSubQuestion = new LocalQuestion();
|
|
3078
|
+
localSubQuestion.Id = this.subQuestions[i].Id;
|
|
3079
|
+
localSubQuestion.Name = this.subQuestions[i].Name;
|
|
3080
|
+
localSubQuestion.Question__c = this.subQuestions[i].Question__c;
|
|
3081
|
+
localSubQuestion.Question_Text__c = this.subQuestions[i].Question_Text__c;
|
|
3082
|
+
localSubQuestion.Type__c = this.subQuestions[i].Type__c;
|
|
3083
|
+
localSubQuestion.Title__c = this.subQuestions[i].Title__c;
|
|
3084
|
+
localSubQuestion.SubTitle__c = this.subQuestions[i].SubTitle__c;
|
|
3085
|
+
localSubQuestion.Is_Optional__c = this.subQuestions[i].Is_Optional__c;
|
|
3086
|
+
localSubQuestion.Error_Message__c = this.subQuestions[i].Error_Message__c;
|
|
3087
|
+
localSubQuestion.Next_Question__c = this.subQuestions[i].Next_Question__c;
|
|
3088
|
+
localSubQuestion.Group__c = this.subQuestions[i].Group__c;
|
|
3089
|
+
localSubQuestion.Question_No__c = this.subQuestions[i].Question_No__c;
|
|
3090
|
+
localSubQuestion.Allowed_File_Extensions__c = this.subQuestions[i].Allowed_File_Extensions__c;
|
|
3091
|
+
localSubQuestion.uniqueSubQId = '' + this.subQuestions[i].Id + i;
|
|
3092
|
+
localSubQuestion.input = this.subQuestions[i].input;
|
|
3093
|
+
this.localSubQuestions.push(localSubQuestion);
|
|
3094
|
+
}
|
|
3095
|
+
// console.log('final local sub questions');
|
|
3096
|
+
// console.log(this.localSubQuestions);
|
|
3097
|
+
// console.log(this.questionItem.Id);
|
|
3098
|
+
this.localSubQMap.set(this.questionItem.Id, this.localSubQuestions);
|
|
3099
|
+
this.localSubQuestions = [];
|
|
3100
|
+
// console.log('final key localSubQMap map');
|
|
3101
|
+
// console.log(this.localSubQMap);
|
|
3102
|
+
}
|
|
3103
|
+
addInputBox(question, index) {
|
|
3104
|
+
var arra = this.localSubQMap.get(this.questionItem.Id);
|
|
3105
|
+
var qIndex = arra.indexOf(question);
|
|
3106
|
+
var ques = new LocalQuestion();
|
|
3107
|
+
Object.assign(ques, question);
|
|
3108
|
+
//console.log((ques.uniqueSubQId).substring(18, (ques.uniqueSubQId).length)+1);
|
|
3109
|
+
if (this.keyIndex == index) {
|
|
3110
|
+
ques.uniqueSubQId = ques.Id + (String(index + 1));
|
|
3111
|
+
this.keyIndex++;
|
|
3112
|
+
}
|
|
3113
|
+
else {
|
|
3114
|
+
this.keyIndex++;
|
|
3115
|
+
ques.uniqueSubQId = ques.Id + (String(this.keyIndex));
|
|
3116
|
+
}
|
|
3117
|
+
ques.input = '';
|
|
3118
|
+
arra.splice(qIndex + 1, 0, ques);
|
|
3119
|
+
this.localSubQMap.set(this.questionItem.Id, arra);
|
|
3120
|
+
//console.log(this.localSubQMap);
|
|
3121
|
+
}
|
|
3122
|
+
removeAddress(quesUniqueId, qName) {
|
|
3123
|
+
//console.log(quesUniqueId)
|
|
3124
|
+
var val = this.localSubQMap.get(this.questionItem.Id);
|
|
3125
|
+
var keyindex = 0;
|
|
3126
|
+
for (let i = 0; i < val.length; i++) {
|
|
3127
|
+
if (val[i].Name == qName) {
|
|
3128
|
+
keyindex++;
|
|
3129
|
+
}
|
|
3130
|
+
}
|
|
3131
|
+
if (this.localSubQMap.has(this.questionItem.Id) && keyindex > 1) {
|
|
3132
|
+
var reorder = val.filter((item) => item.uniqueSubQId !== quesUniqueId);
|
|
3133
|
+
this.localSubQMap.set(this.questionItem.Id, reorder);
|
|
3134
|
+
keyindex--;
|
|
3135
|
+
}
|
|
3136
|
+
}
|
|
3137
|
+
getLocalSubQuestions(id) {
|
|
3138
|
+
return this.localSubQMap.get(id);
|
|
3139
|
+
}
|
|
3140
|
+
//Single Add button functionality for List type
|
|
3141
|
+
Add(question) {
|
|
3142
|
+
this.addFlag = false;
|
|
3143
|
+
var arra = this.localSubQMap.get(this.questionItem.Id);
|
|
3144
|
+
var index = arra.length;
|
|
3145
|
+
var a = arra.slice(-1).pop();
|
|
3146
|
+
this.indexCount = a.Question_No__c;
|
|
3147
|
+
for (var i = 0; i < this.indexCount; i++) {
|
|
3148
|
+
var ques = new LocalQuestion();
|
|
3149
|
+
Object.assign(ques, question[i]);
|
|
3150
|
+
this.keyIndex++;
|
|
3151
|
+
ques.uniqueSubQId = ques.Id + (String(this.keyIndex));
|
|
3152
|
+
ques.input = '';
|
|
3153
|
+
arra.splice(index + (this.indexCount - 1), 0, ques);
|
|
3154
|
+
this.localSubQMap.set(this.questionItem.Id, arra);
|
|
3155
|
+
}
|
|
3156
|
+
this.addFlag = true;
|
|
3157
|
+
}
|
|
3158
|
+
handleLocationSelected(location, ques) {
|
|
3159
|
+
ques.input = location;
|
|
3160
|
+
}
|
|
3161
|
+
selectedInput(input, ques) {
|
|
3162
|
+
ques.input = input;
|
|
3163
|
+
}
|
|
3164
|
+
handleTextareaValueChange(value) {
|
|
3165
|
+
console.log('Selected text-area text:', value);
|
|
3166
|
+
}
|
|
3167
|
+
getData(data) {
|
|
3168
|
+
console.log('table data', data);
|
|
3169
|
+
}
|
|
3170
|
+
dependentChange(value) {
|
|
3171
|
+
this.nextValue = value;
|
|
3172
|
+
}
|
|
3173
|
+
displayDate(dateSelected, ques) {
|
|
3174
|
+
// Parse the date string using moment and assign it to this.selectedDate
|
|
3175
|
+
ques.input = moment(dateSelected.value, 'YYYY-MM-DD HH:mm:ss').format('YYYY-MM-DD HH:mm:ss').toString();
|
|
3176
|
+
}
|
|
3177
|
+
getKey(item) {
|
|
3178
|
+
return Object.keys(item)[0];
|
|
3179
|
+
}
|
|
3180
|
+
getValue(item) {
|
|
3181
|
+
return Object.values(item)[0];
|
|
3182
|
+
}
|
|
3183
|
+
// In the parent component class
|
|
3184
|
+
getTableData(ques) {
|
|
3185
|
+
// Return a new array to ensure each table instance has its own separate array
|
|
3186
|
+
if (ques.Name === 'QN-02251') {
|
|
3187
|
+
ques.tableDataValue = this.tableData1;
|
|
3188
|
+
ques.tableHeader = 'Safety Precautions';
|
|
3189
|
+
return [...ques.tableDataValue];
|
|
3190
|
+
}
|
|
3191
|
+
else {
|
|
3192
|
+
ques.tableDataValue = this.tableData2;
|
|
3193
|
+
ques.tableHeader = 'Personal Protective Equipments';
|
|
3194
|
+
return [...ques.tableDataValue];
|
|
3195
|
+
}
|
|
3196
|
+
}
|
|
3197
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: QuestionnaireComponent, deps: [{ token: SalesforceService }, { token: DataService }, { token: i3.ActivatedRoute }, { token: i4$1.DomSanitizer }, { token: i5.NgxSpinnerService }, { token: i2.UntypedFormBuilder }, { token: i7.DeviceDetectorService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3198
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: QuestionnaireComponent, selector: "lib-questionnaire", inputs: { qbId: "qbId", insuranceStartDate: "insuranceStartDate", serv: "serv", tkn: "tkn" }, outputs: { handleEvent: "handleEvent", handlePage: "handlePage" }, usesOnChanges: true, ngImport: i0, template: "<!-- Spinner -->\n<ngx-spinner [name]=\"spinnerName\" [type]=\"spinnerType\"></ngx-spinner>\n\n<!-- Back Processing -->\n<div *ngIf=\"backicon == false\" >\n <div class=\"backicon\" [style.visibility]=\"questionStack.length >0 ? 'visible' : 'hidden'\">\n <button (click)=\"handleBackClick()\" [class]=\" abItem?.Status__c == 'Completed' ? 'summary-volver':'app-back1'\">\n <img class=\"icon-arrow-back\" src=\"https://rnxt.s3.amazonaws.com/MytIcon/icon-arrow-back.png\" alt=\"Scroll down\"> {{ qbItem?.Back__c }}\n </button>\n </div>\n</div>\n\n<!-- Question Hanlding -->\n<div *ngIf=\"questionItem\" [class]=\"qbItem.isShengel__c ? 'questiondiv1' : 'questiondiv1 padd-bottom'\">\n <!-- Progress Bar & Title -->\n <div *ngIf=\"questionItem.Title__c && qbItem.Progress_Bar__c\">\n <h1 class=\"header1\">{{ questionItem?.Title__c }}</h1>\n <div class=\"header2\">{{ questionItem?.SubTitle__c }}</div>\n </div>\n\n <!-- Progress & Grouping -->\n <div [ngClass]=\"{ questiondiv2: !qbItem?.Progress_Bar__c }\">\n <!-- Pie Chart Progress -->\n <div [ngClass]=\"{ bgColor: qbItem?.Progress_Bar__c }\">\n <div id=\"progress\" *ngIf=\"qbItem?.Progress_Bar__c\">\n <circle-progress class=\"titlebar\" [percent]=\"this.percent\" [radius]=\"40\" [space]=\"-4\" [outerStrokeWidth]=\"4\"\n [innerStrokeWidth]=\"4\" [outerStrokeColor]=\"'#e0b1b0'\" [innerStrokeColor]=\"'#e7e8ea'\" [animation]=\"true\" [backgroundPadding]= \"0\"\n [backgroundColor]= \"'#dd2e13'\" [backgroundGradientStopColor]=\"'#f9bfbd'\" [titleColor]=\"'#f3eded'\" \n class=\"ng-star-inserted\" [title]=\"this.percent+'%'\" [showSubtitle]=\"false\" [showBackground]=\"true\" [animationDuration]=\"300\"\n [startFromZero]=\"false\" [responsive]=\"false\" >\n </circle-progress>\n </div>\n </div>\n\n <!-- Show the Group/Module related to the Progress -->\n <div *ngIf=\"questionItem.Group__c && qbItem.Progress_Bar__c\"\n [ngClass]=\"{ questionalign: !qbItem?.Progress_Bar__c }\">\n <div class=\"largeTitle\">\n <h3 class=\"myt-font6 myt-text3\">\n {{ questionItem?.Group__c }}\n </h3>\n <div *ngIf=\"questionItem.Sub_Text__c != '\u00BFEn qu\u00E9 pa\u00EDs ocurri\u00F3?'\" class=\"myt-font5 myt-text1\">{{questionItem?.Sub_Text__c}}</div>\n <div *ngIf=\"questionItem.Sub_Text__c === '\u00BFEn qu\u00E9 pa\u00EDs ocurri\u00F3?'\" class=\"myt-font10 myt-text2\">{{questionItem?.Sub_Text__c}}</div>\n </div>\n </div>\n </div>\n\n <!-- Question Handling -->\n <div class=\"questiondiv2\">\n <!-- Title -->\n <div *ngIf=\"questionItem.Is_Title__c\">\n <div *ngIf=\"questionItem.Type__c != 'Book' && questionItem.Question_No__c!='6' && questionItem.Question_No__c!='9'\"> \n <h3 class=\"questionalign myt-font3 myt-align myt-text4\" [innerHTML]=\"getText(questionItem?.Question_Text__c)\">\n {{questionItem?.Question_Text__c}}\n </h3>\n </div>\n </div>\n <div *ngIf=\"!questionItem.Is_Title__c\" [class]=\"qbItem.isShengel__c ? 'header-style additional' : 'question-f-size additional'\">\n <div [innerHTML]=\"getText(questionItem?.Question_Text__c)\" >\n {{ questionItem?.Question_Text__c }}\n </div>\n </div>\n\n <!-- This should be removed with Custom Styling - MR - 11AUG23 -->\n <div *ngIf=\"questionItem.Type__c == 'Book'\">\n <div *ngIf=\"questionItem.Question_No__c=='6'\">\n <h3 class=\"myt-321\" [innerHTML]=\"getText(questionItem?.Question_Text__c)\">\n {{ questionItem?.Question_Text__c }}\n </h3>\n </div>\n </div>\n \n <!-- This should be removed with Custom Styling - MR - 11AUG23 -->\n <div *ngIf=\"questionItem.Type__c == 'File' \">\n <div *ngIf=\"questionItem.Question_No__c=='9'\">\n <h3 class=\"myt-345\" [innerHTML]=\"getText(questionItem?.Question_Text__c)\">\n {{questionItem?.Question_Text__c}}\n </h3>\n </div>\n </div>\n </div>\n\n <!-- Additional Info -->\n <!-- The below code can be written effectively nested ngIf for Rich Text & Other onw for Progress Bar -->\n <div *ngIf=\"questionItem.Additional_Rich__c && qbItem.Progress_Bar__c\" >\n <div\n class=\"additional \" [innerHTML]=\"innerhtml\">\n </div>\n </div>\n <div *ngIf=\"questionItem.Additional_Rich__c && !qbItem.Progress_Bar__c\">\n <div class=\"info-alert ques-alert1\">\n <i class=\"fa fa-info fa-3x iposition icolor\" aria-hidden=\"true\"></i>\n <div class=\"infodiv\" [innerHTML]=\"innerhtml\"></div>\n </div>\n </div>\n\n <!-- Dropdown-->\n <div *ngIf=\"dropdownFlag\" >\n <div class=\"dis-flex\">\n <select \n [ngClass]=\"{\n 'dt-line myt-align3 myt-align2 dpDown dropbox down1 myt-dropbox myt-border-r myt-font1': qbItem?.Progress_Bar__c,\n 'custom-select': !qbItem?.Progress_Bar__c\n }\" class=\"mr-sm-2 dd-height dropbox \" id=\"dropdown\" [(ngModel)]=\"inpValue\" (change)=\"clearError()\" style.border-color=\"{{\n this.questionItem?.error ? 'red' : inpValue?.length > 0 ? '#fff' : ''\n }}\" style.color=\"{{ questionItem?.error ? 'red' : '' }}\" style=\"margin-left: 21.5rem !important;\">\n <option *ngFor=\"let opt of questionItem.Question_Options__r.records\" class=\"option\" value=\"{{ opt.Value__c }}\">\n {{ opt.Value__c }}\n </option>\n <option value=\".\" disabled hidden>Bitte treffen Sie eine Auswahl</option>\n </select>\n </div>\n </div>\n\n <!-- Radio -->\n <div *ngIf=\"radioFlag || dataFlag\" class=\"\">\n <div *ngIf=\"this.questionItem.error\" class=\"cond-div2\">\n {{ questionItem?.Error_Message__c }}\n </div>\n <div class=\"dis-flex\">\n <div *ngFor=\"let opt of questionItem.Question_Options__r.records\" class=\"radio radioOption\" >\n <label class=\"radiocontainer container myt-font4\">{{ opt.Value__c }}\n <input type=\"radio\" [id]=\"opt.Id\" [(ngModel)]=\"inpValue\" name=\"inpValue\" value=\"{{ opt.Value__c }}\"\n (change)=\"optionChange(opt.Value__c)\" />\n <span class=\"checkmark\"></span>\n </label>\n </div>\n </div>\n </div>\n\n <!-- Checkbox -->\n <div *ngIf=\"checkboxFlag\" class=\"\">\n <div *ngIf=\"this.questionItem.error\" class=\"cond-div2\">\n {{ questionItem?.Error_Message__c }}\n </div>\n <div class=\"dis-flex\">\n <div *ngFor=\"let item of optionValues\" class=\"radio col-md-6 optiondiv\">\n <label class=\" container1 \" >{{ item.Value__c }}\n <input type=\"checkbox\" [id]=\"item.Id\" [(ngModel)]=\"item.checked\" (click)=\"clearError()\" />\n <span class='checkmark1'></span>\n </label>\n </div>\n </div>\n </div>\n\n <!-- Text -->\n <div *ngIf=\"textFlag\" class=\"col-md-12 myt-book1\">\n <div class=\"col-md-12\" class=\"dis-flex myt-align1\" [class]=\"'col-md-' + questionItem?.Size__c + ' paddingnone'\">\n <input type=\"text\" [(ngModel)]=\"inpValue\" [ngClass]=\"{\n 'boxoutline myt-font1 myt-book1': qbItem?.Progress_Bar__c,\n textBox1: !qbItem?.Progress_Bar__c\n }\" id=\"text-input-id\" required=\"\" (focus)=\"clearError()\" style.border-color=\"{{\n this.questionItem?.error\n ? 'red'\n : inpValue?.length > 0\n ? '#87be1c'\n : ''\n }}\" oninput=\"this.value=this.value.replace(/[^a-zA-Z0-9\\s.:;,?]/g,'');\" />\n <i class=\"fa fa-check check-icon\" aria-hidden=\"true\" *ngIf=\"inpValue?.length > 0\"></i>\n </div>\n </div>\n\n <!-- Text Area -->\n <div *ngIf=\"taFlag\" class=\"col-md-12\">\n <div class=\"dis-flex\">\n <textarea class=\"ta-input\" id=\"ta-input-id\" [(ngModel)]=\"inpValue\" (click)=\"clearError()\" style.border-color=\"{{\n this.questionItem?.error\n ? 'red'\n : inpValue?.length > 0 && taFocusOut\n ? '#87be1c'\n : ''\n }}\" (focusout)=\"taFocusOut = true\"\n oninput=\"this.value=this.value.replace(/[^a-zA-Z0-9\\s.:;,?]/g,'');\"></textarea>\n <i class=\"fa fa-check check-icon\" aria-hidden=\"true\" *ngIf=\"inpValue?.length > 0 && taFocusOut\"></i>\n </div>\n </div>\n\n <!-- CC Number Format -->\n <div *ngIf=\"numberFlag\" class=\"col-md-12\">\n <div class=\"dis-flex\">\n <input type=\"Text\" placeholder=\"0000 0000 0000 0000 0000 0000\" [ngClass]=\"{ boxoutline: qbItem?.Progress_Bar__c }\"\n [(ngModel)]=\"inpValue\" id=\"number-input-id\" (ngModelChange)=\"CCOnChange($event)\" required=\"\" maxlength=\"29\"\n (focus)=\"clearError()\" oninput=\"this.value=this.value.replace(/[^0-9 ]/g,'');\"\n style=\"width:-webkit-fill-available;\" style.border-color=\"{{\n this.questionItem.error\n ? 'red'\n : inpValue?.length > 0\n ? '#87be1c'\n : ''\n }}\" />\n <i class=\"fa fa-check\" aria-hidden=\"true\" style=\"color: #87be1c; margin-left: -2rem; z-index: 1; padding: 5px;\"\n *ngIf=\"inpValue?.length > 0\"></i>\n </div>\n </div>\n <!-- END-->\n\n <!-- AlphaNumeric -->\n <div *ngIf=\"alphanumericFlag\" class=\"col-md-12\"> <!--UI not completed-->\n <div style=\"position:relative;\">\n <input type=text placeholder=\"0 of 0\" style=\"padding:5px 5px 5px 150px;\" id=\"youridhere\"/>\n </div>\n </div>\n\n <!-- Email -->\n <div *ngIf=\"emailFlag\" class=\"col-md-12\">\n <div class=\"dis-flex\">\n <input type=\"email\" [ngClass]=\"{ boxoutline: qbItem?.Progress_Bar__c }\" [(ngModel)]=\"inpValue\" id=\"email-input-id\"\n required=\"\" (focus)=\"clearError()\" style.border-color=\"{{\n this.questionItem.error\n ? 'red'\n : inpValue?.length > 0\n ? '#87be1c'\n : ''\n }}\" />\n <i class=\"fa fa-check\" aria-hidden=\"true\" style=\"color: #87be1c; margin-left: -2rem; z-index: 1; padding: 5px\"\n *ngIf=\"inpValue?.length > 0\"></i>\n </div>\n </div>\n\n <!-- DateTime -->\n <div *ngIf=\"dtFlag\" class=\"col-md-12 paddingZero myt-time1\" >\n <!-- Error Handling -->\n <div class=\"col-md-12\" *ngIf=\"questionItem.error\" style=\"font-size: 18px;\n color: red;\">{{questionItem?.error?.errorMsg}}</div>\n\n <!-- Date -->\n <div *ngIf=\"dateFlag\">\n <div class=\"col-md-12 paddingBottom\">\n <label class=\"date-time colorf\">{{ questionItem?.Date_Text__c }}</label>\n <div class=\"dis-flex\">\n <my-date-picker name=\"mydate\" [options]=\"myDatePickerOptions\" id=\"date\" style=\"font-size: 18px !important;\" (dateChanged)=\"onDateChanged($event)\"\n [(ngModel)]=\"selDate\" class=\"date-picker\" placeholder=\"Seleccione fecha\" (focus)=\"clearError()\">\n </my-date-picker>\n </div>\n </div>\n </div>\n\n <!-- Time -->\n <div *ngIf=\"timeFlag\">\n <div class=\"col-md-12 paddingBottom\">\n <label class=\"date-time colorf\">{{ questionItem?.Time_Text__c }}</label>\n <div class=\"dis-flex\">\n <div [ngClass]=\"{'dt-line date-line dt-time': qbItem?.Progress_Bar__c,\n dateandTime: !qbItem?.Progress_Bar__c}\" \n id=\"dateandTime\" [style.border-color]=\"questionItem?.error ? 'red': questionItem?.input?.length > 0 ? '' : ''\"\n (focus)=\"(clearSQError) \">\n <select name=\"hours\" class=\"datetime showHour myt-time myt-hour\" [(ngModel)]=\"selectedHour\" id=\"hour\"\n (focus)=\"clearError()\">\n <option value=\"\">HH</option>\n <option [value]=\"hour\" *ngFor=\"let hour of hours\">\n {{ hour }}\n </option>\n </select>\n <span class=\"colon\"> : </span>\n <select name=\"minutes\" class=\"datetime showminute myt-time\" [(ngModel)]=\"selectedMinute\" id=\"minute\"\n (focus)=\"clearError()\">\n <option value=\"\">MM</option>\n <option [value]=\"minute\" *ngFor=\"let minute of minutes\">\n {{ minute }}\n </option>\n </select>\n <div [ngClass]=\"{ colon1: qbItem?.Progress_Bar__c }\" *ngIf=\"questionItem?.X24_Hours__c == false\">\n <span class=\"colon\"> : </span>\n <select name=\"AM/PM\" class=\"myt-time\" [(ngModel)]=\"selectedMeridiem\" id=\"meridiem\">\n <option value=\"AM\">AM</option>\n <option value=\"PM\">PM</option>\n </select>\n <!-- <div [ngClass]=\"{'': qbItem.Progress_Bar__c, 'dateandTime': !qbItem.Progress_Bar__c}\"></div> -->\n </div>\n </div>\n </div>\n </div>\n <i class=\"fa check-icon3\" aria-hidden=\"true\" *ngIf=\"questionItem?.input?.length > 0\"></i>\n </div>\n </div>\n\n <!-- Attachment / File -->\n <div *ngIf=\"fileFlag\">\n <div *ngIf=\"!qbItem.Progress_Bar__c\">\n <div class=\"info-alert\" style.border-color=\"{{ this.questionItem?.error ? 'red' : '' }}\">\n <label class=\"picture-upload\" for=\"file-upload\">\n <span class=\"picture-upload-child\">\n <i class=\"fa fa-file-image-o fa-5x icolor\" aria-hidden=\"true\"></i>\n </span>\n <span class=\"fa fa-plus fa-2x picture-upload-child pic-upload icolor\">\n <i class=\"\" aria-hidden=\"true\"></i>\n </span>\n </label>\n </div>\n <input id=\"file-upload\" type=\"file\" accept=\"{{ allowedFileExtension }}\" (change)=\"uploadFile($event)\" />\n </div>\n <ul *ngIf=\"\n attachments?.length > 0 &&\n questionItem?.Type__c === 'File' &&\n !qbItem?.Progress_Bar__c\n \" class=\"attach-ulist col-md-12\">\n <li *ngFor=\"let attachment of attachments\" class=\"align-l\">\n {{ attachment.attachmentName\n }}<span class=\"attach-list\" (click)=\"deleteAttachment(attachment.attachmentId)\">X</span>\n </li>\n </ul>\n\n <!-- Attachment Progress -->\n <div *ngIf=\"qbItem.Progress_Bar__c\">\n <div *ngFor=\"let attachment of attachments\" class=\"file-uploading-box\">\n <!--<img src=\"https://rnxt.s3.amazonaws.com/MytIcon/icon-doc-img%402x.png\" class=\"icon-edit1\" />-->\n <span class=\"uploading-file-name \">{{ attachment.attachmentName }}</span>\n <img src=\"https://rnxt.s3.amazonaws.com/MytIcon/icon-delete%402x.png\" class=\"deleteIcon\"\n (click)=\"deleteAttachment(attachment.attachmentId)\" />\n </div>\n <div class=\"file-upload-box\" style.border-color=\"{{ this.questionItem.error ? 'red' : '' }}\">\n \n <!--<img src=\"https://rnxt.s3.amazonaws.com/MytIcon/icon-doc-img%402x.png\" class=\"icon-edit1\" />-->\n <span class=\"f-Name\" [innerHTML]=\"getText(questionItem?.Question_Text__c)\"> {{ questionItem?.Question_Text__c}}</span>\n <label class=\"file-label \">\n <img src=\"https://rnxt.s3.amazonaws.com/MytIcon/file-upload.png\" class=\"file-icon\"/>\n <input name=\"attachment\" type=\"file\" placeholder=\"Ticket kaufen\" multiple\n accept=\".pdf, .png, .jpg, .jpeg, .heic, .application/pdf\" (change)=\"uploadFile($event)\"\n class=\"file-upload-btn\">\n </label>\n </div>\n </div>\n </div>\n\n <!-- Book -->\n <div *ngIf=\"bookFlag\">\n <div [class]=\"qbItem.isShengel__c ? 'form-group content-box' : 'form-group'\">\n <div class=\"form-row\">\n <div class=\"col-md-12\" *ngIf=\"questionItem.error\" style=\"font-size: 18px;\n color: red;\">{{questionItem?.error?.errorMsg}}</div>\n <div [class]=\"qbItem.isShengel__c ? '' : 'myt-align3'\" [class]=\"qbItem.isShengel__c ? 'col-lg-' + ques.Size__c + ' paddingnone' : 'col-md-' + ques.Size__c + ' paddingnone'\"\n *ngFor=\"let ques of subQuestions;let i = index\">\n <div [ngClass]=\"{ down2: qbItem?.Progress_Bar__c }\">\n <span [class]=\"qbItem.isShengel__c ? 'dis-flex shengel-myt-font3 myt-font7' : 'dis-flex myt-font3 myt-font7' \">{{ ques?.Question__c }}</span>\n </div>\n <div class=\"col-md-12 paddingZero myt-dateTimeNew\" *ngIf=\"ques.Type__c === 'Time' || ques.Type__c === 'Date'\">\n <div *ngIf=\"ques.Type__c === 'Date'\">\n <div class=\"col-md-12 paddingBottom\">\n <label class=\"date-time colorf\">{{ questionItem?.Date_Text__c }}</label>\n <div class=\"dis-flex dateandtime\">\n <my-date-picker name=\"mydate\" [options]=\"myDatePickerOptions\" id=\"date\" style=\"font-size: 18px !important;\" (dateChanged)=\"onDateChanged($event)\"\n [(ngModel)]=\"selDate\" class=\"date-picker\" placeholder=\"Seleccione fecha\" (focus)=\"clearError()\" >\n </my-date-picker>\n </div>\n </div>\n </div>\n <div *ngIf=\"ques.Type__c === 'Time'\">\n <div class=\"col-md-12 paddingBottom\">\n <label class=\"date-time colorf\">{{ questionItem?.Time_Text__c }}</label>\n <div class=\"dis-flex dateandtime\">\n <div [ngClass]=\"{'dt-line date-line dt-time': qbItem?.Progress_Bar__c,\n dateandTime: !qbItem?.Progress_Bar__c}\" \n id=\"dateandTime\" [style.border-color]=\"questionItem?.error ? 'red': questionItem?.input?.length > 0 ? '' : ''\"\n (focus)=\"(clearSQError) \">\n <select name=\"hours\" class=\"datetime showHour myt-time myt-hour\" [(ngModel)]=\"selectedHour\" id=\"hour\"\n (focus)=\"clearError()\">\n <option value=\"\">HH</option>\n <option [value]=\"hour\" *ngFor=\"let hour of hours\">\n {{ hour }}\n </option>\n </select>\n <span class=\"colon\"> : </span>\n <select name=\"minutes\" class=\"datetime showminute myt-time\" [(ngModel)]=\"selectedMinute\" id=\"minute\"\n (focus)=\"clearError()\">\n <option value=\"\">MM</option>\n <option [value]=\"minute\" *ngFor=\"let minute of minutes\">\n {{ minute }}\n </option>\n </select>\n <div [ngClass]=\"{ colon1: qbItem?.Progress_Bar__c }\" *ngIf=\"questionItem.X24_Hours__c == false\">\n <span class=\"colon\"> : </span>\n <select name=\"AM/PM\" class=\"myt-time\" [(ngModel)]=\"selectedMeridiem\" id=\"meridiem\">\n <option value=\"AM\">AM</option>\n <option value=\"PM\">PM</option>\n </select>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div *ngIf=\"ques.Type__c === 'DateTime'\">\n <app-custom-date-picker [minDate]=\"ques.minDate\" [date]=\"ques.input\" (dateChange)=\"displayDate($event,ques)\"></app-custom-date-picker>\n </div>\n <div *ngIf=\"ques.Type__c === 'Text'\">\n <app-custom-input\n [fromShengel]=\"qbItem.isShengel__c\"\n [value]=\"ques.input\"\n [ngClassValue]=\"{\n 'dis-flex dt-line date-line bookText boxoutline myt-font1': qbItem.Progress_Bar__c,\n textBox: !qbItem.Progress_Bar__c\n }\"\n [idValue]=\"ques.Id\"\n [focusEvent]=\"clearSQError(ques.Id)\"\n [error]=\"ques.error\"\n [placeholder]=\"ques.Question__c\"\n (inputValue)=\"selectedInput($event,ques)\">\n </app-custom-input>\n </div>\n <div *ngIf=\"ques.Type__c === 'Location'\">\n <!-- for pick location -->\n <app-pick-location [address]=\"ques.input\" (locationSelected)=\"handleLocationSelected($event,ques)\"></app-pick-location>\n </div>\n <!-- for text area -->\n <div *ngIf=\"ques.Type__c === 'TextArea'\">\n <app-custom-text-area [value]=\"ques.input\" [rows]=\"3\" [error]=\"ques.error\" [placeholder]=\"ques.Question__c \" (textareaValueChange)=\"handleTextareaValueChange($event)\"></app-custom-text-area>\n </div>\n <!-- for to data table we use 'data' type question -->\n <div *ngIf=\"ques.Type__c === 'Data'\">\n <app-custom-table [tableHeader]=\"ques.tableHeader\" [tableData]=\"getTableData(ques)\" [tableIndex]=\"i\" (tableDataChange)=\"getData($event)\"></app-custom-table>\n </div>\n\n <div *ngIf=\"ques.Type__c === 'Email'\">\n <input type=\"email\" [(ngModel)]=\"ques.input\" [id]=\"ques.Id\" required=\"\" (focus)=\"clearSQError(ques.Id)\"\n style.border-color=\"{{ ques.error ? 'red' : '' }}\" placeholder=\"{{ ques.Question__c }}\" />\n </div>\n\n <div *ngIf=\"ques.Type__c === 'File'\">\n <div *ngIf=\"!qbItem.Progress_Bar__c\">\n <label class=\"picture-upload custom-file-upload bgcolor-w\" for=\"file-upload\">\n <span class=\"picture-upload-child\">\n <i class=\"fa fa-file-image-o fa-5x icolor\" aria-hidden=\"true\"></i>\n </span>\n <span class=\"\n fa fa-plus fa-2x\n picture-upload-child\n pic-upload\n icolor\n \">\n <i class=\"\" aria-hidden=\"true\"></i>\n </span>\n </label>\n <input id=\"file-upload\" type=\"file\" accept=\"{{ bookFlagAccept }}\" (change)=\"uploadFile($event,ques)\" />\n </div>\n\n <ul *ngIf=\"\n attachments?.length > 0 &&\n ques.Type__c === 'File' &&\n !qbItem.Progress_Bar__c\n \" class=\"attach-ulist col-md-12\">\n <li *ngFor=\"let attachment of attachments\" class=\"align-l\">\n {{ attachment.attachmentName\n }}<span class=\"attach-list\" (click)=\"deleteAttachment(attachment.attachmentId)\">X</span>\n </li>\n </ul>\n <div class=\"myt-box\" *ngIf=\"qbItem.Progress_Bar__c\">\n\n <div *ngFor=\"let attachment of attachments\" class=\"file-uploading-box\">\n <img src=\"https://rnxt.s3.amazonaws.com/MytIcon/icon-doc-img%402x.png\" class=\"icon-edit1\" />\n <span class=\"uploading-file-name myt-font1 font-weight: normal;\"> {{ attachment.attachmentName }}</span>\n <img src=\"https://rnxt.s3.amazonaws.com/MytIcon/icon-delete%402x.png\" class=\"deleteIcon\"\n (click)=\"deleteAttachment(attachment.attachmentId)\" />\n </div>\n <div class=\"file-upload-box\" style.border-color=\"{{ this.questionItem.error ? 'red' : '' }}\">\n <img src=\"https://rnxt.s3.amazonaws.com/MytIcon/icon-doc-img%402x.png\" class=\"icon-edit1\" />\n <span class=\"f-Name\">{{ ques?.Question__c }}</span>\n <label class=\"file-label \">\n <span style=\"color: #c5281c;text-decoration:underline\">\n Adjuntar\n </span>\n <input name=\"attachment\" type=\"file\" placeholder=\"Ticket kaufen\" multiple\n accept=\".pdf, .png, .jpg, .jpeg, .heic, .application/pdf\" (change)=\"uploadFile($event,ques)\"\n class=\"file-upload-btn\">\n </label>\n </div>\n </div>\n </div>\n\n <!-- Dropdown -->\n <div *ngIf=\"ques.Type__c === 'Dropdown'\" class=\"\">\n <!-- for common dropdown -->\n <app-custom-dropdown [fromShengel]=\"qbItem.isShengel__c\"\n [options]=\"ques.Question_Options__r.records\"\n [apiMeta]=\"ques.Sub_Text__c\"\n [id]=\"ques.Name\"\n [selectedValue]=\"ques.input\"\n [placeholder]=\"'---Select---'\"\n [errorMessage]=\"ques.Error_Message__c\"\n [error]=\"ques.error\"\n (valueChange)=\"Dropdown($event, ques); clearSQError(ques.Id)\">\n </app-custom-dropdown>\n <app-dropdown-with-flag *ngIf=\"ques.isDependentPicklist && !ques.dropDownOnly\" [certified]=\"ques.certifiedFlag\" [JobPerformerCertificates]=\"ques.certificateList\" (flagDropDownChange)=\"dependentChange($event)\"></app-dropdown-with-flag>\n <i class=\"fa fa-check \" aria-hidden=\"true\" *ngIf=\"questionItem?.input?.length > 0\"></i>\n </div> \n </div>\n </div>\n </div>\n </div>\n\n <!--List start-->\n <div *ngIf=\"listFlag\">\n <div class=\"form-group\">\n <div class=\"form-row\">\n <div class=\"col-md-12\" *ngIf=\"questionItem.error\" style=\"font-size: 18px;\n color: red;\">{{questionItem?.error?.errorMsg}}</div>\n <div class=\"myt-align3\" [class]=\"'col-md-' + ques.Size__c + ' paddingnone'\"\n *ngFor=\"let ques of getLocalSubQuestions(questionItem.Id);let i = index\">\n <div>\n <span class=\"dis-flex myt-font3 myt-font7\">{{ ques?.Question__c }}</span>\n </div>\n <div *ngIf=\"ques.Type__c === 'Text'\">\n <input type=\"text\" [(ngModel)]=\"ques.input\" [ngClass]=\"{\n 'dis-flex dt-line date-line bookText boxoutline myt-font1': qbItem.Progress_Bar__c,\n textBox: !qbItem.Progress_Bar__c\n }\" id=\"text\" [id]=\"ques.uniqueSubQId\" required=\"\" (focus)=\"clearLocalSubQuesError(ques)\"\n style.border-color=\"{{ ques.error ? 'red' : '' }}\" placeholder=\"{{ ques.Question__c }}\"\n oninput=\"this.value=this.value.replace(/[^a-zA-Z0-9\\s.:;,?]/g,'');\" />\n </div>\n </div>\n <div class=\"\" *ngIf=\"addFlag\">\n <button (click)=\"Add(getLocalSubQuestions(questionItem.Id))\" class=\"btn\"><i class=\"fa fa-plus\" ></i>Add</button>\n </div>\n </div>\n </div>\n </div>\n <!--List End-->\n\n <!-- Actions -->\n <div *ngIf=\"individualBookButton\" class=\"flexer\">\n <!-- Backward / Back -->\n <div class=\"backbutton\" [ngClass]=\"{ 'col-md-6': !qbItem.Progress_Bar__c }\"\n [style.visibility]=\"questionStack.length > 0 ? 'visible' : 'hidden'\">\n <div [ngClass]=\"{}\">\n <button [ngClass]=\"{\n 'left-bt': qbItem.Progress_Bar__c,\n 'nxt-btn btn-primary btn-lg btn-block btn-back-color':\n !qbItem.Progress_Bar__c\n }\" (click)=\"handleBackClick()\">\n {{ qbItem?.Back__c }}\n </button>\n </div>\n </div>\n\n <!-- Forward / Next -->\n <div [ngClass]=\"{ 'col-md-6': !qbItem.Progress_Bar__c }\">\n <div>\n <button [ngClass]=\"{\n 'rusty': qbItem.Progress_Bar__c,\n 'nxt-btn btn-primary btn-lg btn-block btn-back-color':\n !qbItem.Progress_Bar__c\n }\" (click)=\"handleNextClick()\">\n {{ qbItem.Next__c }}\n </button>\n </div>\n </div>\n </div>\n</div>\n\n<!-- Summary -->\n<div *ngIf=\"summary && summary.length > 0\" height=\"100% !important\" class=\"col-md-12\" [ngClass]=\"{\n 'col-md-12':!qbItem.Progress_Bar__c\n }\">\n <h1 class=\"header1 summarypadd\" >{{ qbItem.SubTitle__c }}</h1> \n <div id=\"progress2\" *ngIf=\"!qbItem.Progress_Bar__c && this.abItem.Status__c != 'Completed' \">\n <div [ngClass]=\"{ 'full-summary': qbItem.Progress_Bar__c }\">\n <div *ngFor=\"let qa of summary\">\n <div [ngClass]=\"{ non: qbItem.Progress_Bar__c }\">\n <div [ngClass]=\"{ summary: !qbItem.Progress_Bar__c }\">\n <div *ngIf=\"!qbItem.Edit__c\"\n [ngClass]=\"{ 'question': this.abItem.Status__c != 'Completed' }\">\n <a [ngClass]=\"{ asum: this.abItem.Status__c === 'Completed' }\" (click)=\"handleEditClick(qa.quesId)\"\n [innerHTML]=\"getText(qa.quesValue)\">{{ qa.quesValue }}</a>\n </div>\n <div *ngIf=\"qbItem.Edit__c\"\n [ngClass]=\"{ 'question': this.abItem.Status__c != 'Completed' }\">\n <div [ngClass]=\"{ 'question': this.abItem.Status__c === 'Completed' }\"\n [innerHTML]=\"getText(qa.quesValue)\">\n {{ qa.quesValue }}\n </div>\n </div>\n <div class=\"answer\" >\n <div *ngIf=\"qa.qTyp === 'File'\">\n <img src=\"https://rnxt.s3.amazonaws.com/MytIcon/icon-doc-img%401.png\" class=\"icon-edit-summary\" />\n {{ qa.ansValue }}\n </div>\n <div *ngIf=\"qa.qTyp != 'File'\">{{ qa.ansValue }}</div>\n <div *ngIf=\"qbItem.Edit__c && this.abItem.Status__c != 'Completed'\" style=\"background: #dedddd;\">\n <button class=\"edit\" (click)=\"handleEditClick(qa.quesId)\">\n <img *ngIf=\"deviceInfo.os === 'iOS'\" src=\"https://rnxt.s3.amazonaws.com/MytIcon/icon-edit%402x.png\" style=\"width:50%!important;\" class=\"icon-editios\"/>\n <img *ngIf=\"deviceInfo.os !== 'iOS'\" src=\"https://rnxt.s3.amazonaws.com/MytIcon/icon-edit%402x.png\" class=\"icon-edit\" />\n </button>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <div *ngIf=\"this.abItem.Status__c === 'Completed'\" class=\"col-lg-12\">\n <div class=\"panel-group panel-group-joined\" id=\"ePTW-details\">\n <div class=\"panel panel-default\">\n <div class=\"panel-heading\">\n <h4 class=\"panel-title\">\n <a data-toggle=\"collapse\" data-parent=\"#ePTW-details\" href=\"#collapseOne\" class=\"collapsed\">\n PTW Details\n </a>\n </h4>\n </div>\n <div id=\"collapseOne\" class=\"panel-collapse collapse\">\n <div class=\"panel-body\">\n <div class=\"row\">\n <ng-container *ngFor=\"let item of summaryData; let i = index\">\n <ng-container *ngIf=\"i % 2 === 0\">\n <div class=\"col-lg-6 m-b-30\">\n <label>{{ getKey(item) }}</label>\n <p class=\"font-size\">{{ getValue(item) || 'N/A' }}</p>\n </div>\n <div class=\"col-lg-6\" *ngIf=\"summaryData[i + 1]\">\n <label>{{ getKey(summaryData[i + 1]) }}</label>\n <p class=\"font-size\">{{ getValue(summaryData[i + 1]) || 'N/A' }}</p>\n </div>\n </ng-container>\n </ng-container>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <div id=\"progress2\" *ngIf=\"qbItem.Progress_Bar__c \">\n <div [ngClass]=\"{'bgColor summary-top' : qbItem.Progress_Bar__c }\" >\n <div id=\"progress-summary\" *ngIf=\"qbItem.Progress_Bar__c\">\n <circle-progress class=\"titlebar\" [percent]=\"this.percent\" [radius]=\"40\" [space]=\"-4\" [outerStrokeWidth]=\"4\"\n [innerStrokeWidth]=\"4\" [outerStrokeColor]=\"'#e0b1b0'\" [innerStrokeColor]=\"'#e7e8ea'\" [animation]=\"true\" [backgroundPadding]= \"0\"\n [backgroundColor]= \"'#dd2e13'\" [backgroundGradientStopColor]=\"'#f9bfbd'\" [titleColor]=\"'#f3eded'\" \n class=\"ng-star-inserted\" [title]=\"this.percent+'%'\" [showSubtitle]=\"false\" [showBackground]=\"true\" [animationDuration]=\"300\"\n [startFromZero]=\"false\" [responsive]=\"false\" >\n </circle-progress>\n \n <div *ngIf=\"qbItem.Summary_Text__c && qbItem.Progress_Bar__c\" \n [ngClass]=\"{ summaryTitle: qbItem.Progress_Bar__c }\">\n <h3 class=\"subTitle\" >{{ qbItem.Summary_Text__c }}</h3>\n <div *ngIf=\"abItem.Status__c != 'Completed'\" class=\"subTitle1\" >{{ qbItem.Summary_Sub_Text__c}}</div>\n </div>\n </div>\n <div *ngIf=\"!qbItem.Progress_Bar__c\">\n <h3 class=\"summary-h\">\n {{ qbItem.Summary_Text__c }}\n </h3>\n </div>\n </div>\n <div [ngClass]=\"{ 'full-summary': qbItem.Progress_Bar__c }\">\n <div class=\"summary-groupText myt-font2\">\n <!-- <p>Informe de da\u00F1o</p> -->\n </div>\n <div *ngFor=\"let qa of summary\" >\n <div [ngClass]=\"{ non: qbItem.Progress_Bar__c }\">\n <div [ngClass]=\"{ summary: this.abItem.Status__c != 'Completed' && !qbItem.Progress_Bar__c }\">\n <div *ngIf=\"!qbItem.Edit__c\"\n [ngClass]=\"{ 'question sum-ques myt-font3 myt-font8': this.abItem.Status__c != 'Completed' }\">\n <a [ngClass]=\"{ asum: this.abItem.Status__c === 'Completed' }\" (click)=\"handleEditClick(qa.quesId)\"\n [innerHTML]=\"getText(qa.quesValue)\">{{ qa.quesValue }}</a>\n </div>\n <div *ngIf=\"qbItem.Edit__c\"\n [ngClass]=\"{ 'sum-ques question myt-font3 myt-font8': this.abItem.Status__c != 'Completed' }\">\n <div [ngClass]=\"{ 'sum-ques1 question1 summary-completed myt-font3 myt-font8': this.abItem.Status__c === 'Completed' }\"\n [innerHTML]=\"getText(qa.quesValue)\">\n {{ qa.quesValue }}\n </div>\n </div>\n <div *ngIf=\"qbItem.Edit__c && this.abItem.Status__c != 'Completed'\" style=\"background: #dedddd;\">\n <button class=\"edit\" (click)=\"handleEditClick(qa.quesId)\">\n <img *ngIf=\"deviceInfo.os === 'iOS'\" src=\"https://rnxt.s3.amazonaws.com/MytIcon/icon-edit%402x.png\" style=\"width:50%!important;\" class=\"icon-editios\"/>\n <img *ngIf=\"deviceInfo.os !== 'iOS'\" src=\"https://rnxt.s3.amazonaws.com/MytIcon/icon-edit%402x.png\" class=\"icon-edit\" />\n </button>\n </div>\n \n <div class=\"answer \" >\n <div *ngIf=\"qa.qTyp === 'File'\">\n <img src=\"https://rnxt.s3.amazonaws.com/MytIcon/icon-doc-img%401.png\" class=\"icon-edit-summary\" />\n {{ qa.ansValue }}\n </div>\n <div *ngIf=\"qa.qTyp != 'File'\">\n {{ qa.ansValue }}\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <!-- Answer Book -->\n <div class=\"flexer1\" *ngIf=\"abItem\">\n <div class=\"\" *ngIf=\"abItem.Status__c == 'Completed'\">\n <div class=\"col-md-12\">\n <button [ngClass]=\"{'btn-text': qbItem.Progress_Bar__c,\n 'nxt-btn btn-primary btn-lg btn-block btn-back-color': !qbItem.Progress_Bar__c}\"\n (click)=\"handleCancelClick()\">\n {{ qbItem.Cancel__c }}\n </button>\n </div>\n </div>\n </div>\n\n <!-- Group Actions -->\n <div class=\"align-edit-submit\" *ngIf=\"abItem.Status__c != 'Completed'\">\n <div class=\"col-md-6\">\n <button [ngClass]=\"{ 'btn-text2': qbItem.Progress_Bar__c,\n 'nxt-btn btn-primary btn-lg btn-block btn-back-color': !qbItem.Progress_Bar__c }\" \n (click)=\"handleSubmitClick()\">\n {{ qbItem.Submit__c }}\n </button>\n </div>\n <div class=\"col-md-6\">\n <button [ngClass]=\"{'grey': qbItem.Progress_Bar__c,\n 'nxt-btn btn-primary btn-lg btn-block btn-back-color': !qbItem.Progress_Bar__c}\" \n (click)=\"handleBackClickNew()\">\n {{ qbItem.Edit__c }}\n </button>\n </div>\n </div>\n\n</div>", styles: [".rusty{width:235px;background-color:#cd2810;color:#fff;text-align:center;font-size:24px;height:60px;margin-left:0%;margin-top:11%;cursor:pointer}.edit{background-color:#dedddd;border:none;color:#c5281c;text-decoration:underline;margin-left:50%;font-size:16px;vertical-align:super;font-weight:700}.icon-edit{width:15px;height:18px;margin:0 6px 1px -13%}.icon-edit1,.icon-edit-summary{width:29px;height:28px}.questiondiv1{padding-left:25px;padding-right:25px;padding-top:3%}.questiondiv2{padding-top:0;padding-bottom:20px;padding-left:11px}.align-edit-submit{display:flex;flex-direction:column;align-items:center}.questiondiv2{padding-left:0!important;padding-bottom:0!important}@media screen and (min-width: 689px){#progress,#progress-summary{padding-left:12px}.backicon{display:none}.dt-time{background-position:98%!important}}.bgColor{text-align:center;background-color:#dedddd}.questionalign{text-align:center;padding-right:4%;margin-bottom:4px;margin-top:2rem;color:#560d05}.largeTitle{padding-left:16px;padding-top:12px}.question-f-size{font-size:.7rem}.non{background-color:#dedddd}.circle{margin-left:25px}.titlebar{padding-left:10%;padding-top:1%;padding-right:10%}.infodiv{padding-left:2rem;overflow:hidden}.info-alert{border:1px solid #e6e6e6;border-radius:5px;padding:.5em;margin-left:15px;margin-right:15px;margin-bottom:1rem;display:flex}.addtional-info{margin-left:-33px;margin-top:-21px;font-size:16px;font-weight:400;font-stretch:normal;font-style:normal;color:#6f7072;font-family:Helvetica}.ques-alert1{margin-bottom:1rem;display:flex}.iposition{margin-left:3rem}.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{position:relative;padding:20px;float:center;width:100%}.col-md-12{padding:0!important}.nxt-btn{border-radius:.3rem;font-size:1.25rem;line-height:1.5;padding:.5rem 1rem;width:100%;cursor:pointer;outline:0}.cond-div2{color:red;font-weight:700;padding-bottom:3%}.radiotext{margin-top:-30px}.radiocontainer{display:flex;flex-direction:row-reverse;border:1px solid none;border-radius:.3em;padding:0;align-items:center;text-align:center;cursor:pointer;font-family:Rubik,Helvetica Neue,Helvetica,Roboto,Arial,sans-serif;color:#a3a2a2}.radioOption{display:flex;align-content:flex-start;margin-top:-16px;width:6%}.checkmark{left:47.5%;height:20px;margin-right:7px;width:20px;background-color:#fff0;border-radius:50%;border:1px solid grey}.myt-time{width:-moz-fit-content!important;width:fit-content!important;background-image:none;background:#dedddd;margin:0;padding:0;border:none;font-size:15px;letter-spacing:1px}.showminute{padding-left:5px;margin-top:0%}.myt-time1{margin-top:-32px;margin-left:-15px}.myt-dateTimeNew{margin-left:-14px}.myt-hour{width:-moz-fit-content;width:fit-content}.date-time{padding:0;margin:0;text-align:left}.dateandTime{border:1px solid #d2d4d6;position:relative;display:flex;border-radius:2px;background-image:url(https://dynamic-css1.s3.ap-south-1.amazonaws.com/External+css/time.svg);background-size:25px;background-repeat:no-repeat;background-position:99% center;background-color:#fff;height:37px}.date-line{border-bottom:1px solid #fff}.dt-time{width:57%;margin-left:2.3%;text-align:left;background-image:url(https://rnxt.s3.amazonaws.com/MytIcon/icon-clock%402x.png)!important;background-size:25px!important;background-repeat:no-repeat!important;background:#dedddd}.date-picker{width:57%;margin-left:2.5%;height:44px;border-radius:5px}.datetime:focus{border:none;box-shadow:none}#meridiem{margin-top:-2px;border:hidden}.dis-flex{display:flex;justify-content:center}.textBox{width:100%;height:36px}.textBox1{width:100%;height:36px;margin-left:-17px}.option{color:#767676}.paddingnone{padding-bottom:0%}.paddingZero{padding:0}.summary-h{text-align:left;padding-bottom:15px}.summary{display:flex;flex-direction:column;align-items:flex-start;border-bottom:2px solid #fff}.asum{color:#6f7072;margin-top:5%;padding-left:3%}.question{padding:10px;font-size:14px;color:#007bff}.question1{margin-left:14rem;background:#dedddd;color:#560d05;font-size:15px;padding-bottom:20px;text-align:left}.answer{display:flex;align-items:baseline;padding:5px 5px 10px;font-size:14px;font-weight:400;word-wrap:break-word;width:97%;justify-content:space-between}.answer1{max-width:55%;margin-left:auto;margin-right:auto;color:#a3a2a2;margin-top:0%;padding-bottom:0;font-size:14px;font-weight:400;word-wrap:break-word;text-align:left;background:#dedddd;border-bottom:1px solid #fff}.myt-font{font-size:20px}.myt-font1{width:16rem;font-size:14px;font-weight:400}.myt-font2{font-size:18px}.myt-font3,.myt-font4{font-size:14px}.myt-font5{margin-top:-18px;font-weight:400;font-size:14px;color:#560d05}.myt-font6{font-size:20px;font-weight:700;color:#c5281c;text-align:center}.myt-font10{font-weight:400;font-size:14px;color:#560d05;margin-top:10px}.myt-font7{display:flex;justify-content:flex-start;padding-left:20.5%;font-weight:100;color:#560d05}.myt-font8{font-weight:400}.dpDown:focus-visible{outline:none}.summaryTitle{padding-left:0%;padding-top:4%}.summary-groupText{width:55%;margin:auto auto -2%;text-align:left;font-weight:700;padding-top:0%;padding-bottom:0%;background-color:#dedddd;color:#c5281c}.sum-ques{width:55%;margin:auto}.sum-ques1{width:59%;margin:auto}.header-style{padding:15px!important;background:#F8F8F8;color:#898989!important;border:1px solid #e8e8e8;border-top-left-radius:5px;border-top-right-radius:5px;margin-left:0!important;justify-content:left!important;font-size:15px!important}.form-group.content-box{background:#ffffff;padding:40px;border:1px solid #e8e8e8;border-bottom-left-radius:5px;border-bottom-right-radius:5px}.shengel-myt-font3{padding-bottom:5px;padding-top:5px;padding-right:15px;padding-left:2px!important;color:#9a9a9a!important;font-size:14px!important;font-weight:400!important}.file-upload-btn{display:none;border-bottom:groove}.file-upload-box{max-width:45%;margin-left:29.5%;height:auto;padding:16px;display:flex;border:2px;border-bottom:1px solid #fff;background-color:#dedddd;justify-content:space-between;color:#d8d8d8}.file-label{cursor:pointer;color:#c5281c;text-decoration:underline}.file-uploading-box{font-size:14px;font-weight:400;max-width:45%;margin-left:29.5%;height:56px;padding:16px;display:flex;border:2px;background-color:#dedddd;justify-content:space-between;margin-bottom:0;color:#d8d8d8}.uploading-file-name{color:#6f7072}.deleteIcon{cursor:pointer;height:24px}.file-icon{max-width:24px;height:26px}.picture-upload{height:200px;width:200px;position:relative;border:1px solid #ccc;display:flex;padding:6px 12px;cursor:pointer;background-color:#fff;align-items:center}.colon{line-height:42px;padding:0;margin-top:10%;color:#6f7072}.colon1{display:contents}.subTitle{color:#c5281c;font-weight:600;margin-top:-3%}.subTitle1{color:#560d05;font-size:14px;font-weight:500}.check-icon{color:#87be1c;margin-left:-2rem;z-index:1;padding:5px;margin-top:.4rem}.check-icon2{color:#87be1c;margin-left:-4rem;z-index:1;margin-top:.6rem;line-height:3}.check-icon3{color:#87be1c;margin-left:-4rem;z-index:1;margin-top:3rem}.align-l{text-align:left;padding:1% 2% 2%;margin-bottom:-5%;margin-top:-1%}.attach-ulist{list-style-type:none;margin-left:0;margin-bottom:.7rem}.attach-list{float:right;cursor:pointer;padding:0}.icolor{color:#99b5ce}.picture-upload-child{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.tspan:nth-child(1){font-size:25px;font-weight:700}.tspan:nth-child(2){display:none}.pic-upload{position:absolute;top:15%;left:85%;transform:translate(-50%,-50%)}.btn-block+.btn-block{margin-top:.5rem}input[type=submit].btn-block,input[type=reset].btn-block,input[type=button].btn-block{width:100%}.btn-lg,.btn-group-lg>.btn{padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:.3rem}.btn-lg+.dropdown-toggle-split,.btn-group-lg>.btn+.dropdown-toggle-split{padding-right:.75rem;padding-left:.75rem}.btn-primary:hover{color:#fff}.btn-primary:focus,.btn-primary.focus{color:#fff;box-shadow:0 0 0 .2rem #268fff80}.btn-primary.disabled,.btn-primary:disabled{color:#fff}.btn-primary:not(:disabled):not(.disabled):active,.btn-primary:not(:disabled):not(.disabled).active,.show>.btn-primary.dropdown-toggle{color:#fff}.btn-primary:not(:disabled):not(.disabled):active:focus,.btn-primary:not(:disabled):not(.disabled).active:focus,.show>.btn-primary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem #268fff80}.btn-back-color{display:block;width:100%;padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;text-align:center;border-radius:.3rem;margin:0}.fa-plus:hover{color:#87be1c}.fa-plus{color:#99b5ce}.btn-primary{border-color:#007bff}.ques-Title{text-align:left;font-size:24px}.grey{width:38%;height:56px;margin:0px 0px 0px 0rem;padding:14px 0 17px;background-color:#cd2810;color:#fff;font-size:24px}.btn-text{width:330px;font-size:24px;background-color:#cd2810;color:#fff;height:60px;margin-left:auto;margin-top:0;cursor:pointer;border-radius:40px}.btn-text2{width:21rem;font-size:24px;background-color:#cd2810;border:none;color:#fff;height:60px;margin-left:17rem;margin-right:17rem;margin-top:10px;cursor:pointer;border-radius:40px}.flexer{max-width:100%;width:100%;display:flex;justify-content:center}.flexer1{max-width:100%;width:100%;display:flex;justify-content:center;margin-top:32px}.btn-r{right:0rem}.down{margin-left:0;width:57%}.down1{width:16rem;margin-left:0rem;background-color:#dedddd}.down2{margin-top:0%;padding-left:11px}.dropbox{margin-left:21.5rem}.myt-dropbox{background-image:url(https://rnxt.s3.amazonaws.com/MytIcon/down-red.png);background-origin:content-box;background-position:right -.9rem center;background-repeat:no-repeat;background-size:35px 33px;padding-right:1.35rem;background-color:#dedddd}.boxoutline{outline:transparent;background-color:#dedddd}.left-bt{width:238px;background-color:#cd2810;color:#fff;padding:0;text-align:center;font-size:24px;cursor:pointer;height:60px;margin-top:125px;margin-bottom:4rem;margin-left:-234px}.townArea{text-align:left;height:43px;padding-left:15px}.townArea:hover{background-color:#9e9e9e2e}.listFlow{font-weight:400;color:#767676;z-index:2;position:absolute;background:#dedddd;box-shadow:0 2px 5px #00000040}.myt-radio input[type=radio]:checked:after{background-color:#c5281c}.full-summary{margin-top:4%}.container-radio input{display:none;position:absolute;opacity:0;cursor:pointer}.container-radio input:checked~.checkmark{background-color:#fff0}.checkmark:after{content:\"\";display:none}.container-radio input:checked~.checkmark:after{display:block}.container-radio .checkmark:after{top:3px;left:3px;width:12px;margin:3px;height:12px;border-radius:50%;background:#C5281C}.f-Name{color:#6f7072;font-size:14px;font-weight:400;word-break:break-word}.summary-top{margin-top:4%}.myt-border-r{border-top:none;border-left:none;border-right:none;border-radius:0}.myt-align{margin-left:4%;line-height:2}.myt-align1{margin-left:-29px}.myt-align2{margin-left:-15px}.myt-align3{width:100%}.myt-book1{margin-top:-20px}.colorf{color:#555}.bookText{width:57%;margin-left:21.5%;background-color:#dedddd}.book{width:32.6%;margin-left:34%;background-color:#dedddd}.summary-completed{padding-left:2%;margin-top:20px}.town{margin:0;background-color:#dedddd}.town-drop{margin:auto;width:57%}.questiondiv1.padd-bottom{padding-bottom:6rem!important;padding-top:2rem!important}@media (max-width: 1090px){.icon-edit{margin:0 6px -3px -13%!important}}@media (max-width: 768px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:center}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}}@media (max-width: 768px){.radioOption{width:8%}.grey{width:78%;margin-left:17.5rem;height:68px!important;font-size:20px!important;font-weight:700!important}.answer{margin-top:-4%!important}}@media screen and (max-width: 672px){.header1{font-size:23px!important}.summarypadd{padding-top:50px!important}.answer{margin-top:-5%!important}.icon-edit{margin:0 6px 0 -13%!important}.subTitle1{width:95%!important}.additional{margin-left:6%!important;padding:0!important}.container1{margin-left:-35%}.town-drop{margin:auto;width:100%!important}.dis-flex{display:flex;justify-content:left}.check{display:inherit;width:-moz-max-content;width:max-content;margin-left:6%}.rusty{width:28rem;margin-left:0rem;height:68px!important;font-size:20px!important;font-weight:700!important;margin-bottom:37px}.left-bt{width:28rem;margin-left:-28rem;height:68px!important;font-size:20px!important;font-weight:700!important}.questionalign{text-align:center}.questionalign{margin-top:1rem!important}.largeTitle{padding-left:0!important}.myt-align{margin-left:0%!important}.myt-text1{margin-top:-22px}.myt-text2{margin-top:-20px}.myt-text3{margin-bottom:21px}.date-picker,.dt-time{width:100%}.showminute{margin-top:-.5%}.radioOption{width:auto;margin-top:0;margin-left:7%;margin-right:-3%}.checkmark{left:3.8rem}.myt-font7{padding-left:0rem;margin-left:-1.5%}.down,.bookText,.book{width:100%;margin-left:0rem}.town{margin-left:0rem;width:100%}.file-upload-box,.file-uploading-box{max-width:85%;margin-left:20px}.question{margin-left:0rem}.btn-text2{width:28rem;margin-right:0rem;margin-left:0;height:68px!important;font-size:20px!important;font-weight:700!important}.grey{width:28rem;margin:-21px 0 0;height:68px!important;font-size:20px!important;font-weight:700!important}}@media screen and (max-width: 580px){.rusty{width:27rem;height:68px!important;font-size:20px!important;font-weight:700!important}.left-bt{width:27rem;margin-left:-27rem;height:68px!important;font-size:20px!important;font-weight:700!important}.container1{margin-left:-24%}.showminute{margin-top:.5%}.bookText,.book{width:100%;margin-left:0rem}.btn-text2{width:27rem;margin-right:0rem;margin-left:0;height:68px!important;font-size:20px!important;font-weight:700!important}.grey{width:27rem;margin:-21px 0 0;height:68px!important;font-size:20px!important;font-weight:700!important}.btn-text{width:27rem;height:68px!important;font-size:20px!important;font-weight:700!important}}@media screen and (max-width: 672px){.questiondiv1{padding:0}}@media screen and (max-width: 525px){.rusty{width:26rem;height:68px!important;font-size:20px!important;font-weight:700!important}.container1{margin-left:-9%}.left-bt{width:26rem;margin-left:-26rem;height:68px!important;font-size:20px!important;font-weight:700!important}.dateandtime{padding-left:10px!important}}@media screen and (max-width: 480px){.answer{margin-top:-7%!important}.icon-edit{margin:0 6px 4px -35%!important}.rusty{width:25rem;height:68px!important;font-size:20px!important;font-weight:700!important}.left-bt{width:25rem;margin-left:-25rem;height:68px!important;font-size:20px!important;font-weight:700!important}.file-upload-box,.file-uploading-box{max-width:89%}}@media screen and (max-width: 420px){.answer{margin-top:-9%!important}.icon-edit{margin:-9px 1px 4px 4%!important}.rusty,.btn-text{width:21rem;height:68px!important;font-size:20px!important;font-weight:700!important}.left-bt{width:21rem;margin-left:-21rem;height:68px!important;font-size:20px!important;font-weight:700!important}.container1{margin-left:0%}.file-upload-box,.file-uploading-box{max-width:100%}.myt-dateTimeNew{margin-left:-10px!important}.form-row{padding-left:8px!important}.dateandtime{padding-left:0!important}.dt-time{padding-left:.8%!important}.myt-font7{padding-left:0rem;margin-left:-3.5%}.grey{width:21rem;margin:-21px 0 0;height:68px!important;font-size:20px!important;font-weight:700!important}.btn-text2{width:21rem;margin-right:0rem;margin-left:0;height:68px!important;font-size:20px!important;font-weight:700!important}}@media screen and (max-width: 368px){.icon-edit{margin:0 6px 3px 35%!important}.icon-editios{margin-bottom:4px}.rusty{width:19rem;height:68px!important;font-size:20px!important;font-weight:700!important}.left-bt{width:19rem;margin-left:-19rem;height:68px!important;font-size:20px!important;font-weight:700!important}.container1{margin-left:15%}.radiotext{margin-top:-45px}.file-upload-box,.file-uploading-box{max-width:100%}.grey{width:19rem;margin:-21px 0 0;height:68px!important;font-size:20px!important;font-weight:700!important}.btn-text2{width:19rem;margin-right:0rem;margin-left:0;height:68px!important;font-size:20px!important;font-weight:700!important}.btn-text{width:19rem;height:68px!important;font-size:20px!important;font-weight:700!important}}.mydp .selection{padding:0!important}.text-border{border-top:none;border-left:none;border-right:none;border-radius:0;border-bottom:1px solid #fff!important;background-color:#dedddd}.additional{display:flex;font-size:20px;text-align:left;font-weight:200;margin-left:4%;justify-content:center;color:#3e3e3c;padding:0 30%}.check{display:block}.header2{font-size:20px;font-weight:300;text-align:center;font-stretch:normal;font-style:normal;line-height:1.5;letter-spacing:normal;color:#560d05;max-width:1100px;margin:auto;padding-bottom:10px}.header1{font-size:32px;font-weight:700;text-align:center;font-stretch:normal;font-style:normal;line-height:1.25;letter-spacing:normal;color:#dd2e13}.container1{display:inline-grid;position:relative;cursor:pointer;font-size:20px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.container1 input{position:absolute;opacity:0;cursor:pointer;height:0;width:0}.checkmark1{position:absolute;top:1px;left:-35%;height:21px;width:21px;background-color:#eee}.container1:hover input~.checkmark1{background-color:#ccc}.container1 input:checked~.checkmark1{content:\"\";background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxMiIgdmlld0JveD0iMCAwIDE2IDEyIj4gIDxwYXRoIGZpbGw9IiM4N0JFMUMiIGZpbGwtcnVsZT0iZXZlbm9kZCIgZD0iTTEyLjI0Mjk1NjUsMTcuNTcyNzczOCBMMjAuOTg1NTM0Nyw5LjEzMjYxNTg1IEMyMS4xNjg1NDM3LDguOTU1OTM3NDEgMjEuNDYyMTgwNyw4Ljk1NTc3NDM2IDIxLjY0NTM5MzYsOS4xMzIyNDk0NCBMMjIuODU5MTUxMywxMC4zMDEzNzAxIEMyMy4wNDY5NDk2LDEwLjQ4MjI2MiAyMy4wNDY5NDk2LDEwLjc3OTA1NjMgMjIuODU5MTUxMywxMC45NTk5NDgyIEwxMi41NzMwNjk2LDIwLjg2Nzc1MDYgQzEyLjM5MDAwNDcsMjEuMDQ0MDgzMSAxMi4wOTY2NTU2LDIxLjA0NDA4MzEgMTEuOTEzNTkwNiwyMC44Njc3NTA2IEw3LjE0MDg0ODc3LDE2LjI3MDUzMDMgQzYuOTU0MTc0MjgsMTYuMDkwNzIwOSA2Ljk1Mjg5MDU1LDE1Ljc5NjA5NTggNy4xMzc5OTEzMywxNS42MTQ3MjgyIEw4LjMzMTE3Njc5LDE0LjQ0NTYwNzUgQzguNTEzODA2NDgsMTQuMjY2NjYxMiA4LjgwOTMzMDgzLDE0LjI2NTQyMjYgOC45OTM1MTMyMiwxNC40NDI4MzE1IEwxMi4yNDI5NTY1LDE3LjU3Mjc3MzggWiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTcgLTkpIi8+PC9zdmc+);background-position:.17rem .3rem;background-repeat:no-repeat;background-color:#d2d4d6;width:21px;height:21px}.checkmark1:after{content:\"\";position:absolute;display:none}.container1 input:checked~.checkmark1:after{display:block}.container1 .checkmark1:after{left:9px;top:5px;width:5px;height:10px;border-width:0 3px 3px 0}.bottomspace1{padding-bottom:14px!important}.myt-321{font-size:20px;font-weight:700;color:#c5281c;margin-top:11px}.myt-345{display:none}.panel{-moz-box-shadow:0px 1px 2px 0px rgba(0,0,0,.1);-webkit-box-shadow:0px 1px 2px 0px rgba(0,0,0,.1);border-radius:0;border:none;box-shadow:0 1px 2px #0000001a;margin-bottom:20px}.panel .panel-body{padding:20px}.panel-heading{border-radius:0;border:none!important;padding:10px 20px}.panel-default>.panel-heading{background-color:#fafafa;border-bottom:none;color:#2a323c;border:1px solid #e3e3e3!important}.panel-title{margin-bottom:0;margin-top:0;font-family:Rubik,sans-serif;font-weight:400}.panel-footer{background:#fafafa;border-top:0}.panel-color .panel-title{color:#fff}.panel-primary>.panel-heading{background-color:#03a9f4}.panel-success>.panel-heading{background-color:#01ba9a}.panel-info>.panel-heading{background-color:#18bae2}.panel-warning>.panel-heading{background-color:#f8ca4e}.panel-danger>.panel-heading{background-color:#f62f37}.panel-dark>.panel-heading{background-color:#2a323c;color:#fff}.panel-fill{border-radius:3px}.panel-fill .panel-heading{background-color:transparent;color:#fff;border-bottom:1px solid rgba(255,255,255,.5)!important}.panel-fill .panel-body{color:#ffffffd9}.panel-fill.panel-default .panel-body{color:#666}.panel-fill.panel-default .panel-heading{background-color:transparent;color:#333;border-bottom:1px solid rgba(0,0,0,.1)!important}.panel-fill.panel-primary{background-color:#03a9f4}.panel-fill.panel-success{background-color:#01ba9a}.panel-fill.panel-info{background-color:#18bae2}.panel-fill.panel-warning{background-color:#f8ca4e}.panel-fill.panel-danger{background-color:#f62f37}.panel-fill.panel-dark{background-color:#2a323c}.panel-group .panel .panel-heading a[data-toggle=collapse].collapsed:before{content:\"\\f0d7\"}.panel-group .panel .panel-heading .accordion-toggle.collapsed:before{content:\"\\f0d7\"}.panel-group .panel .panel-heading a[data-toggle=collapse]{display:block}.panel-group .panel .panel-heading a[data-toggle=collapse]:before{content:\"\\f0d8\";display:block;float:right;font-family:FontAwesome;font-size:14px;text-align:right;width:25px}.panel-group .panel .panel-heading .accordion-toggle{display:block}.panel-group .panel .panel-heading .accordion-toggle:before{content:\"\\f068\";display:block;float:right;font-family:FontAwesome;font-size:14px;text-align:right;width:25px}.panel-group .panel .panel-heading+.panel-collapse .panel-body{border-top:none!important;border:1px solid #e3e3e3}.panel-group .panel-heading{padding:12px 26px}.panel-group.panel-group-joined .panel+.panel{border-top:1px solid #eeeeee;margin-top:0}.panel-group-joined .panel-group .panel+.panel{border-top:1px solid #eeeeee;margin-top:0}.panel-body label{color:#9a9a9a;font-size:14px;font-weight:400;display:inline-block;max-width:100%;margin-bottom:5px}.font-size{font-size:14px}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit;text-decoration:none}.panel-title{font-size:16px}@media (min-width: 300px) and (max-width: 399px){.selbtngroup{padding-left:1.3%!important}}@media (min-width: 400px) and (max-width: 480px){.selbtngroup{padding-left:.9%!important}}@media (min-width: 481px) and (max-width: 580px){.selbtngroup{padding-left:.2%!important}}@media screen and (min-width: 871px){.selbtngroup{padding-right:4px!important}}@media screen and (max-width: 689px){.answer{max-width:95%!important;margin-left:0!important;margin-right:15px}#progress2{margin-left:8.5px!important}.edit{margin-left:85%!important;margin-bottom:0%!important}.sum-ques,.sum-ques1{width:100%!important;margin:auto}.summary-completed{padding-left:0!important;padding-bottom:17px;margin-top:9px}.summary-top{margin-top:10%}.subTitle1{font-size:18px!important;line-height:1.38!important;text-align:center;letter-spacing:normal;color:#560d05!important;font-weight:300}.backbutton{display:none}.rusty{margin-bottom:37px}}@media screen and (min-width: 1024px){.ES-style{position:absolute;left:7px;font-size:.9rem;color:#555;top:9px}}@media screen and (max-width: 1024px){.ES-style{position:absolute;left:.6rem;font-size:.95rem;color:#555;top:.57rem}}@media screen and (max-width: 689px){.app-back1{line-height:1.5;cursor:pointer;width:100%;max-width:1200px;margin-right:auto;margin-left:-10px;display:flex;font-family:Helvetica;font-size:21px;font-weight:700;align-items:center;font-stretch:normal;font-style:normal;letter-spacing:normal;color:#dd2e13;z-index:1;position:fixed;background-color:#dedddd;border-radius:0!important;margin-top:-12px;padding-top:.8rem}.header1{padding-top:75px}.dt-time{background-position:100%!important}}.summary-volver{display:none}@media ((min-width: 1200px)){.form-row{display:flex;flex-wrap:wrap}}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.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: i2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i9.MyDatePicker, selector: "my-date-picker", inputs: ["placeholder", "locale", "disabled", "options", "defaultMonth", "selDate", "selector"], outputs: ["dateChanged", "inputFieldChanged", "calendarViewChanged", "calendarToggle", "inputFocusBlur"], exportAs: ["mydatepicker"] }, { kind: "component", type: i5.NgxSpinnerComponent, selector: "ngx-spinner", inputs: ["disableAnimation", "bdColor", "zIndex", "color", "type", "size", "fullScreen", "name", "template", "showSpinner"] }, { kind: "component", type: i10.CircleProgressComponent, selector: "circle-progress", inputs: ["name", "class", "backgroundGradient", "backgroundColor", "backgroundGradientStopColor", "backgroundOpacity", "backgroundStroke", "backgroundStrokeWidth", "backgroundPadding", "radius", "space", "percent", "toFixed", "maxPercent", "renderOnClick", "units", "unitsFontSize", "unitsFontWeight", "unitsColor", "outerStrokeGradient", "outerStrokeWidth", "outerStrokeColor", "outerStrokeGradientStopColor", "outerStrokeLinecap", "innerStrokeColor", "innerStrokeWidth", "titleFormat", "title", "titleColor", "titleFontSize", "titleFontWeight", "subtitleFormat", "subtitle", "subtitleColor", "subtitleFontSize", "subtitleFontWeight", "imageSrc", "imageHeight", "imageWidth", "animation", "animateTitle", "animateSubtitle", "animationDuration", "showTitle", "showSubtitle", "showUnits", "showImage", "showBackground", "showInnerStroke", "clockwise", "responsive", "startFromZero", "showZeroOuterStroke", "lazy", "options"], outputs: ["onClick"] }, { kind: "component", type: PickLocationComponent, selector: "app-pick-location", inputs: ["address"], outputs: ["locationSelected"] }, { kind: "component", type: CustomInputComponent, selector: "app-custom-input", inputs: ["value", "disabled", "placeholder", "error", "fromShengel", "ngClassValue", "idValue", "focusEvent"], outputs: ["inputValue"] }, { kind: "component", type: CustomTextAreaComponent, selector: "app-custom-text-area", inputs: ["value", "placeholder", "rows", "error"], outputs: ["textareaValueChange"] }, { kind: "component", type: CustomTableComponent, selector: "app-custom-table", inputs: ["tableHeader", "tableData", "tableIndex"], outputs: ["tableDataChange"] }, { kind: "component", type: CustomDatePickerComponent, selector: "app-custom-date-picker", inputs: ["date", "minDate", "maxDate"], outputs: ["dateChange"] }, { kind: "component", type: DropdownWithFlagComponent, selector: "app-dropdown-with-flag", inputs: ["certified", "JobPerformerCertificates"], outputs: ["flagDropDownChange"] }, { kind: "component", type: CustomDropdownComponent, selector: "app-custom-dropdown", inputs: ["options", "placeholder", "apiMeta", "selectedValue", "progressBar", "id", "errorMessage", "error", "fromShengel"], outputs: ["valueChange"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
3199
|
+
}
|
|
3200
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: QuestionnaireComponent, decorators: [{
|
|
3201
|
+
type: Component,
|
|
3202
|
+
args: [{ selector: "lib-questionnaire", encapsulation: ViewEncapsulation.None, template: "<!-- Spinner -->\n<ngx-spinner [name]=\"spinnerName\" [type]=\"spinnerType\"></ngx-spinner>\n\n<!-- Back Processing -->\n<div *ngIf=\"backicon == false\" >\n <div class=\"backicon\" [style.visibility]=\"questionStack.length >0 ? 'visible' : 'hidden'\">\n <button (click)=\"handleBackClick()\" [class]=\" abItem?.Status__c == 'Completed' ? 'summary-volver':'app-back1'\">\n <img class=\"icon-arrow-back\" src=\"https://rnxt.s3.amazonaws.com/MytIcon/icon-arrow-back.png\" alt=\"Scroll down\"> {{ qbItem?.Back__c }}\n </button>\n </div>\n</div>\n\n<!-- Question Hanlding -->\n<div *ngIf=\"questionItem\" [class]=\"qbItem.isShengel__c ? 'questiondiv1' : 'questiondiv1 padd-bottom'\">\n <!-- Progress Bar & Title -->\n <div *ngIf=\"questionItem.Title__c && qbItem.Progress_Bar__c\">\n <h1 class=\"header1\">{{ questionItem?.Title__c }}</h1>\n <div class=\"header2\">{{ questionItem?.SubTitle__c }}</div>\n </div>\n\n <!-- Progress & Grouping -->\n <div [ngClass]=\"{ questiondiv2: !qbItem?.Progress_Bar__c }\">\n <!-- Pie Chart Progress -->\n <div [ngClass]=\"{ bgColor: qbItem?.Progress_Bar__c }\">\n <div id=\"progress\" *ngIf=\"qbItem?.Progress_Bar__c\">\n <circle-progress class=\"titlebar\" [percent]=\"this.percent\" [radius]=\"40\" [space]=\"-4\" [outerStrokeWidth]=\"4\"\n [innerStrokeWidth]=\"4\" [outerStrokeColor]=\"'#e0b1b0'\" [innerStrokeColor]=\"'#e7e8ea'\" [animation]=\"true\" [backgroundPadding]= \"0\"\n [backgroundColor]= \"'#dd2e13'\" [backgroundGradientStopColor]=\"'#f9bfbd'\" [titleColor]=\"'#f3eded'\" \n class=\"ng-star-inserted\" [title]=\"this.percent+'%'\" [showSubtitle]=\"false\" [showBackground]=\"true\" [animationDuration]=\"300\"\n [startFromZero]=\"false\" [responsive]=\"false\" >\n </circle-progress>\n </div>\n </div>\n\n <!-- Show the Group/Module related to the Progress -->\n <div *ngIf=\"questionItem.Group__c && qbItem.Progress_Bar__c\"\n [ngClass]=\"{ questionalign: !qbItem?.Progress_Bar__c }\">\n <div class=\"largeTitle\">\n <h3 class=\"myt-font6 myt-text3\">\n {{ questionItem?.Group__c }}\n </h3>\n <div *ngIf=\"questionItem.Sub_Text__c != '\u00BFEn qu\u00E9 pa\u00EDs ocurri\u00F3?'\" class=\"myt-font5 myt-text1\">{{questionItem?.Sub_Text__c}}</div>\n <div *ngIf=\"questionItem.Sub_Text__c === '\u00BFEn qu\u00E9 pa\u00EDs ocurri\u00F3?'\" class=\"myt-font10 myt-text2\">{{questionItem?.Sub_Text__c}}</div>\n </div>\n </div>\n </div>\n\n <!-- Question Handling -->\n <div class=\"questiondiv2\">\n <!-- Title -->\n <div *ngIf=\"questionItem.Is_Title__c\">\n <div *ngIf=\"questionItem.Type__c != 'Book' && questionItem.Question_No__c!='6' && questionItem.Question_No__c!='9'\"> \n <h3 class=\"questionalign myt-font3 myt-align myt-text4\" [innerHTML]=\"getText(questionItem?.Question_Text__c)\">\n {{questionItem?.Question_Text__c}}\n </h3>\n </div>\n </div>\n <div *ngIf=\"!questionItem.Is_Title__c\" [class]=\"qbItem.isShengel__c ? 'header-style additional' : 'question-f-size additional'\">\n <div [innerHTML]=\"getText(questionItem?.Question_Text__c)\" >\n {{ questionItem?.Question_Text__c }}\n </div>\n </div>\n\n <!-- This should be removed with Custom Styling - MR - 11AUG23 -->\n <div *ngIf=\"questionItem.Type__c == 'Book'\">\n <div *ngIf=\"questionItem.Question_No__c=='6'\">\n <h3 class=\"myt-321\" [innerHTML]=\"getText(questionItem?.Question_Text__c)\">\n {{ questionItem?.Question_Text__c }}\n </h3>\n </div>\n </div>\n \n <!-- This should be removed with Custom Styling - MR - 11AUG23 -->\n <div *ngIf=\"questionItem.Type__c == 'File' \">\n <div *ngIf=\"questionItem.Question_No__c=='9'\">\n <h3 class=\"myt-345\" [innerHTML]=\"getText(questionItem?.Question_Text__c)\">\n {{questionItem?.Question_Text__c}}\n </h3>\n </div>\n </div>\n </div>\n\n <!-- Additional Info -->\n <!-- The below code can be written effectively nested ngIf for Rich Text & Other onw for Progress Bar -->\n <div *ngIf=\"questionItem.Additional_Rich__c && qbItem.Progress_Bar__c\" >\n <div\n class=\"additional \" [innerHTML]=\"innerhtml\">\n </div>\n </div>\n <div *ngIf=\"questionItem.Additional_Rich__c && !qbItem.Progress_Bar__c\">\n <div class=\"info-alert ques-alert1\">\n <i class=\"fa fa-info fa-3x iposition icolor\" aria-hidden=\"true\"></i>\n <div class=\"infodiv\" [innerHTML]=\"innerhtml\"></div>\n </div>\n </div>\n\n <!-- Dropdown-->\n <div *ngIf=\"dropdownFlag\" >\n <div class=\"dis-flex\">\n <select \n [ngClass]=\"{\n 'dt-line myt-align3 myt-align2 dpDown dropbox down1 myt-dropbox myt-border-r myt-font1': qbItem?.Progress_Bar__c,\n 'custom-select': !qbItem?.Progress_Bar__c\n }\" class=\"mr-sm-2 dd-height dropbox \" id=\"dropdown\" [(ngModel)]=\"inpValue\" (change)=\"clearError()\" style.border-color=\"{{\n this.questionItem?.error ? 'red' : inpValue?.length > 0 ? '#fff' : ''\n }}\" style.color=\"{{ questionItem?.error ? 'red' : '' }}\" style=\"margin-left: 21.5rem !important;\">\n <option *ngFor=\"let opt of questionItem.Question_Options__r.records\" class=\"option\" value=\"{{ opt.Value__c }}\">\n {{ opt.Value__c }}\n </option>\n <option value=\".\" disabled hidden>Bitte treffen Sie eine Auswahl</option>\n </select>\n </div>\n </div>\n\n <!-- Radio -->\n <div *ngIf=\"radioFlag || dataFlag\" class=\"\">\n <div *ngIf=\"this.questionItem.error\" class=\"cond-div2\">\n {{ questionItem?.Error_Message__c }}\n </div>\n <div class=\"dis-flex\">\n <div *ngFor=\"let opt of questionItem.Question_Options__r.records\" class=\"radio radioOption\" >\n <label class=\"radiocontainer container myt-font4\">{{ opt.Value__c }}\n <input type=\"radio\" [id]=\"opt.Id\" [(ngModel)]=\"inpValue\" name=\"inpValue\" value=\"{{ opt.Value__c }}\"\n (change)=\"optionChange(opt.Value__c)\" />\n <span class=\"checkmark\"></span>\n </label>\n </div>\n </div>\n </div>\n\n <!-- Checkbox -->\n <div *ngIf=\"checkboxFlag\" class=\"\">\n <div *ngIf=\"this.questionItem.error\" class=\"cond-div2\">\n {{ questionItem?.Error_Message__c }}\n </div>\n <div class=\"dis-flex\">\n <div *ngFor=\"let item of optionValues\" class=\"radio col-md-6 optiondiv\">\n <label class=\" container1 \" >{{ item.Value__c }}\n <input type=\"checkbox\" [id]=\"item.Id\" [(ngModel)]=\"item.checked\" (click)=\"clearError()\" />\n <span class='checkmark1'></span>\n </label>\n </div>\n </div>\n </div>\n\n <!-- Text -->\n <div *ngIf=\"textFlag\" class=\"col-md-12 myt-book1\">\n <div class=\"col-md-12\" class=\"dis-flex myt-align1\" [class]=\"'col-md-' + questionItem?.Size__c + ' paddingnone'\">\n <input type=\"text\" [(ngModel)]=\"inpValue\" [ngClass]=\"{\n 'boxoutline myt-font1 myt-book1': qbItem?.Progress_Bar__c,\n textBox1: !qbItem?.Progress_Bar__c\n }\" id=\"text-input-id\" required=\"\" (focus)=\"clearError()\" style.border-color=\"{{\n this.questionItem?.error\n ? 'red'\n : inpValue?.length > 0\n ? '#87be1c'\n : ''\n }}\" oninput=\"this.value=this.value.replace(/[^a-zA-Z0-9\\s.:;,?]/g,'');\" />\n <i class=\"fa fa-check check-icon\" aria-hidden=\"true\" *ngIf=\"inpValue?.length > 0\"></i>\n </div>\n </div>\n\n <!-- Text Area -->\n <div *ngIf=\"taFlag\" class=\"col-md-12\">\n <div class=\"dis-flex\">\n <textarea class=\"ta-input\" id=\"ta-input-id\" [(ngModel)]=\"inpValue\" (click)=\"clearError()\" style.border-color=\"{{\n this.questionItem?.error\n ? 'red'\n : inpValue?.length > 0 && taFocusOut\n ? '#87be1c'\n : ''\n }}\" (focusout)=\"taFocusOut = true\"\n oninput=\"this.value=this.value.replace(/[^a-zA-Z0-9\\s.:;,?]/g,'');\"></textarea>\n <i class=\"fa fa-check check-icon\" aria-hidden=\"true\" *ngIf=\"inpValue?.length > 0 && taFocusOut\"></i>\n </div>\n </div>\n\n <!-- CC Number Format -->\n <div *ngIf=\"numberFlag\" class=\"col-md-12\">\n <div class=\"dis-flex\">\n <input type=\"Text\" placeholder=\"0000 0000 0000 0000 0000 0000\" [ngClass]=\"{ boxoutline: qbItem?.Progress_Bar__c }\"\n [(ngModel)]=\"inpValue\" id=\"number-input-id\" (ngModelChange)=\"CCOnChange($event)\" required=\"\" maxlength=\"29\"\n (focus)=\"clearError()\" oninput=\"this.value=this.value.replace(/[^0-9 ]/g,'');\"\n style=\"width:-webkit-fill-available;\" style.border-color=\"{{\n this.questionItem.error\n ? 'red'\n : inpValue?.length > 0\n ? '#87be1c'\n : ''\n }}\" />\n <i class=\"fa fa-check\" aria-hidden=\"true\" style=\"color: #87be1c; margin-left: -2rem; z-index: 1; padding: 5px;\"\n *ngIf=\"inpValue?.length > 0\"></i>\n </div>\n </div>\n <!-- END-->\n\n <!-- AlphaNumeric -->\n <div *ngIf=\"alphanumericFlag\" class=\"col-md-12\"> <!--UI not completed-->\n <div style=\"position:relative;\">\n <input type=text placeholder=\"0 of 0\" style=\"padding:5px 5px 5px 150px;\" id=\"youridhere\"/>\n </div>\n </div>\n\n <!-- Email -->\n <div *ngIf=\"emailFlag\" class=\"col-md-12\">\n <div class=\"dis-flex\">\n <input type=\"email\" [ngClass]=\"{ boxoutline: qbItem?.Progress_Bar__c }\" [(ngModel)]=\"inpValue\" id=\"email-input-id\"\n required=\"\" (focus)=\"clearError()\" style.border-color=\"{{\n this.questionItem.error\n ? 'red'\n : inpValue?.length > 0\n ? '#87be1c'\n : ''\n }}\" />\n <i class=\"fa fa-check\" aria-hidden=\"true\" style=\"color: #87be1c; margin-left: -2rem; z-index: 1; padding: 5px\"\n *ngIf=\"inpValue?.length > 0\"></i>\n </div>\n </div>\n\n <!-- DateTime -->\n <div *ngIf=\"dtFlag\" class=\"col-md-12 paddingZero myt-time1\" >\n <!-- Error Handling -->\n <div class=\"col-md-12\" *ngIf=\"questionItem.error\" style=\"font-size: 18px;\n color: red;\">{{questionItem?.error?.errorMsg}}</div>\n\n <!-- Date -->\n <div *ngIf=\"dateFlag\">\n <div class=\"col-md-12 paddingBottom\">\n <label class=\"date-time colorf\">{{ questionItem?.Date_Text__c }}</label>\n <div class=\"dis-flex\">\n <my-date-picker name=\"mydate\" [options]=\"myDatePickerOptions\" id=\"date\" style=\"font-size: 18px !important;\" (dateChanged)=\"onDateChanged($event)\"\n [(ngModel)]=\"selDate\" class=\"date-picker\" placeholder=\"Seleccione fecha\" (focus)=\"clearError()\">\n </my-date-picker>\n </div>\n </div>\n </div>\n\n <!-- Time -->\n <div *ngIf=\"timeFlag\">\n <div class=\"col-md-12 paddingBottom\">\n <label class=\"date-time colorf\">{{ questionItem?.Time_Text__c }}</label>\n <div class=\"dis-flex\">\n <div [ngClass]=\"{'dt-line date-line dt-time': qbItem?.Progress_Bar__c,\n dateandTime: !qbItem?.Progress_Bar__c}\" \n id=\"dateandTime\" [style.border-color]=\"questionItem?.error ? 'red': questionItem?.input?.length > 0 ? '' : ''\"\n (focus)=\"(clearSQError) \">\n <select name=\"hours\" class=\"datetime showHour myt-time myt-hour\" [(ngModel)]=\"selectedHour\" id=\"hour\"\n (focus)=\"clearError()\">\n <option value=\"\">HH</option>\n <option [value]=\"hour\" *ngFor=\"let hour of hours\">\n {{ hour }}\n </option>\n </select>\n <span class=\"colon\"> : </span>\n <select name=\"minutes\" class=\"datetime showminute myt-time\" [(ngModel)]=\"selectedMinute\" id=\"minute\"\n (focus)=\"clearError()\">\n <option value=\"\">MM</option>\n <option [value]=\"minute\" *ngFor=\"let minute of minutes\">\n {{ minute }}\n </option>\n </select>\n <div [ngClass]=\"{ colon1: qbItem?.Progress_Bar__c }\" *ngIf=\"questionItem?.X24_Hours__c == false\">\n <span class=\"colon\"> : </span>\n <select name=\"AM/PM\" class=\"myt-time\" [(ngModel)]=\"selectedMeridiem\" id=\"meridiem\">\n <option value=\"AM\">AM</option>\n <option value=\"PM\">PM</option>\n </select>\n <!-- <div [ngClass]=\"{'': qbItem.Progress_Bar__c, 'dateandTime': !qbItem.Progress_Bar__c}\"></div> -->\n </div>\n </div>\n </div>\n </div>\n <i class=\"fa check-icon3\" aria-hidden=\"true\" *ngIf=\"questionItem?.input?.length > 0\"></i>\n </div>\n </div>\n\n <!-- Attachment / File -->\n <div *ngIf=\"fileFlag\">\n <div *ngIf=\"!qbItem.Progress_Bar__c\">\n <div class=\"info-alert\" style.border-color=\"{{ this.questionItem?.error ? 'red' : '' }}\">\n <label class=\"picture-upload\" for=\"file-upload\">\n <span class=\"picture-upload-child\">\n <i class=\"fa fa-file-image-o fa-5x icolor\" aria-hidden=\"true\"></i>\n </span>\n <span class=\"fa fa-plus fa-2x picture-upload-child pic-upload icolor\">\n <i class=\"\" aria-hidden=\"true\"></i>\n </span>\n </label>\n </div>\n <input id=\"file-upload\" type=\"file\" accept=\"{{ allowedFileExtension }}\" (change)=\"uploadFile($event)\" />\n </div>\n <ul *ngIf=\"\n attachments?.length > 0 &&\n questionItem?.Type__c === 'File' &&\n !qbItem?.Progress_Bar__c\n \" class=\"attach-ulist col-md-12\">\n <li *ngFor=\"let attachment of attachments\" class=\"align-l\">\n {{ attachment.attachmentName\n }}<span class=\"attach-list\" (click)=\"deleteAttachment(attachment.attachmentId)\">X</span>\n </li>\n </ul>\n\n <!-- Attachment Progress -->\n <div *ngIf=\"qbItem.Progress_Bar__c\">\n <div *ngFor=\"let attachment of attachments\" class=\"file-uploading-box\">\n <!--<img src=\"https://rnxt.s3.amazonaws.com/MytIcon/icon-doc-img%402x.png\" class=\"icon-edit1\" />-->\n <span class=\"uploading-file-name \">{{ attachment.attachmentName }}</span>\n <img src=\"https://rnxt.s3.amazonaws.com/MytIcon/icon-delete%402x.png\" class=\"deleteIcon\"\n (click)=\"deleteAttachment(attachment.attachmentId)\" />\n </div>\n <div class=\"file-upload-box\" style.border-color=\"{{ this.questionItem.error ? 'red' : '' }}\">\n \n <!--<img src=\"https://rnxt.s3.amazonaws.com/MytIcon/icon-doc-img%402x.png\" class=\"icon-edit1\" />-->\n <span class=\"f-Name\" [innerHTML]=\"getText(questionItem?.Question_Text__c)\"> {{ questionItem?.Question_Text__c}}</span>\n <label class=\"file-label \">\n <img src=\"https://rnxt.s3.amazonaws.com/MytIcon/file-upload.png\" class=\"file-icon\"/>\n <input name=\"attachment\" type=\"file\" placeholder=\"Ticket kaufen\" multiple\n accept=\".pdf, .png, .jpg, .jpeg, .heic, .application/pdf\" (change)=\"uploadFile($event)\"\n class=\"file-upload-btn\">\n </label>\n </div>\n </div>\n </div>\n\n <!-- Book -->\n <div *ngIf=\"bookFlag\">\n <div [class]=\"qbItem.isShengel__c ? 'form-group content-box' : 'form-group'\">\n <div class=\"form-row\">\n <div class=\"col-md-12\" *ngIf=\"questionItem.error\" style=\"font-size: 18px;\n color: red;\">{{questionItem?.error?.errorMsg}}</div>\n <div [class]=\"qbItem.isShengel__c ? '' : 'myt-align3'\" [class]=\"qbItem.isShengel__c ? 'col-lg-' + ques.Size__c + ' paddingnone' : 'col-md-' + ques.Size__c + ' paddingnone'\"\n *ngFor=\"let ques of subQuestions;let i = index\">\n <div [ngClass]=\"{ down2: qbItem?.Progress_Bar__c }\">\n <span [class]=\"qbItem.isShengel__c ? 'dis-flex shengel-myt-font3 myt-font7' : 'dis-flex myt-font3 myt-font7' \">{{ ques?.Question__c }}</span>\n </div>\n <div class=\"col-md-12 paddingZero myt-dateTimeNew\" *ngIf=\"ques.Type__c === 'Time' || ques.Type__c === 'Date'\">\n <div *ngIf=\"ques.Type__c === 'Date'\">\n <div class=\"col-md-12 paddingBottom\">\n <label class=\"date-time colorf\">{{ questionItem?.Date_Text__c }}</label>\n <div class=\"dis-flex dateandtime\">\n <my-date-picker name=\"mydate\" [options]=\"myDatePickerOptions\" id=\"date\" style=\"font-size: 18px !important;\" (dateChanged)=\"onDateChanged($event)\"\n [(ngModel)]=\"selDate\" class=\"date-picker\" placeholder=\"Seleccione fecha\" (focus)=\"clearError()\" >\n </my-date-picker>\n </div>\n </div>\n </div>\n <div *ngIf=\"ques.Type__c === 'Time'\">\n <div class=\"col-md-12 paddingBottom\">\n <label class=\"date-time colorf\">{{ questionItem?.Time_Text__c }}</label>\n <div class=\"dis-flex dateandtime\">\n <div [ngClass]=\"{'dt-line date-line dt-time': qbItem?.Progress_Bar__c,\n dateandTime: !qbItem?.Progress_Bar__c}\" \n id=\"dateandTime\" [style.border-color]=\"questionItem?.error ? 'red': questionItem?.input?.length > 0 ? '' : ''\"\n (focus)=\"(clearSQError) \">\n <select name=\"hours\" class=\"datetime showHour myt-time myt-hour\" [(ngModel)]=\"selectedHour\" id=\"hour\"\n (focus)=\"clearError()\">\n <option value=\"\">HH</option>\n <option [value]=\"hour\" *ngFor=\"let hour of hours\">\n {{ hour }}\n </option>\n </select>\n <span class=\"colon\"> : </span>\n <select name=\"minutes\" class=\"datetime showminute myt-time\" [(ngModel)]=\"selectedMinute\" id=\"minute\"\n (focus)=\"clearError()\">\n <option value=\"\">MM</option>\n <option [value]=\"minute\" *ngFor=\"let minute of minutes\">\n {{ minute }}\n </option>\n </select>\n <div [ngClass]=\"{ colon1: qbItem?.Progress_Bar__c }\" *ngIf=\"questionItem.X24_Hours__c == false\">\n <span class=\"colon\"> : </span>\n <select name=\"AM/PM\" class=\"myt-time\" [(ngModel)]=\"selectedMeridiem\" id=\"meridiem\">\n <option value=\"AM\">AM</option>\n <option value=\"PM\">PM</option>\n </select>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div *ngIf=\"ques.Type__c === 'DateTime'\">\n <app-custom-date-picker [minDate]=\"ques.minDate\" [date]=\"ques.input\" (dateChange)=\"displayDate($event,ques)\"></app-custom-date-picker>\n </div>\n <div *ngIf=\"ques.Type__c === 'Text'\">\n <app-custom-input\n [fromShengel]=\"qbItem.isShengel__c\"\n [value]=\"ques.input\"\n [ngClassValue]=\"{\n 'dis-flex dt-line date-line bookText boxoutline myt-font1': qbItem.Progress_Bar__c,\n textBox: !qbItem.Progress_Bar__c\n }\"\n [idValue]=\"ques.Id\"\n [focusEvent]=\"clearSQError(ques.Id)\"\n [error]=\"ques.error\"\n [placeholder]=\"ques.Question__c\"\n (inputValue)=\"selectedInput($event,ques)\">\n </app-custom-input>\n </div>\n <div *ngIf=\"ques.Type__c === 'Location'\">\n <!-- for pick location -->\n <app-pick-location [address]=\"ques.input\" (locationSelected)=\"handleLocationSelected($event,ques)\"></app-pick-location>\n </div>\n <!-- for text area -->\n <div *ngIf=\"ques.Type__c === 'TextArea'\">\n <app-custom-text-area [value]=\"ques.input\" [rows]=\"3\" [error]=\"ques.error\" [placeholder]=\"ques.Question__c \" (textareaValueChange)=\"handleTextareaValueChange($event)\"></app-custom-text-area>\n </div>\n <!-- for to data table we use 'data' type question -->\n <div *ngIf=\"ques.Type__c === 'Data'\">\n <app-custom-table [tableHeader]=\"ques.tableHeader\" [tableData]=\"getTableData(ques)\" [tableIndex]=\"i\" (tableDataChange)=\"getData($event)\"></app-custom-table>\n </div>\n\n <div *ngIf=\"ques.Type__c === 'Email'\">\n <input type=\"email\" [(ngModel)]=\"ques.input\" [id]=\"ques.Id\" required=\"\" (focus)=\"clearSQError(ques.Id)\"\n style.border-color=\"{{ ques.error ? 'red' : '' }}\" placeholder=\"{{ ques.Question__c }}\" />\n </div>\n\n <div *ngIf=\"ques.Type__c === 'File'\">\n <div *ngIf=\"!qbItem.Progress_Bar__c\">\n <label class=\"picture-upload custom-file-upload bgcolor-w\" for=\"file-upload\">\n <span class=\"picture-upload-child\">\n <i class=\"fa fa-file-image-o fa-5x icolor\" aria-hidden=\"true\"></i>\n </span>\n <span class=\"\n fa fa-plus fa-2x\n picture-upload-child\n pic-upload\n icolor\n \">\n <i class=\"\" aria-hidden=\"true\"></i>\n </span>\n </label>\n <input id=\"file-upload\" type=\"file\" accept=\"{{ bookFlagAccept }}\" (change)=\"uploadFile($event,ques)\" />\n </div>\n\n <ul *ngIf=\"\n attachments?.length > 0 &&\n ques.Type__c === 'File' &&\n !qbItem.Progress_Bar__c\n \" class=\"attach-ulist col-md-12\">\n <li *ngFor=\"let attachment of attachments\" class=\"align-l\">\n {{ attachment.attachmentName\n }}<span class=\"attach-list\" (click)=\"deleteAttachment(attachment.attachmentId)\">X</span>\n </li>\n </ul>\n <div class=\"myt-box\" *ngIf=\"qbItem.Progress_Bar__c\">\n\n <div *ngFor=\"let attachment of attachments\" class=\"file-uploading-box\">\n <img src=\"https://rnxt.s3.amazonaws.com/MytIcon/icon-doc-img%402x.png\" class=\"icon-edit1\" />\n <span class=\"uploading-file-name myt-font1 font-weight: normal;\"> {{ attachment.attachmentName }}</span>\n <img src=\"https://rnxt.s3.amazonaws.com/MytIcon/icon-delete%402x.png\" class=\"deleteIcon\"\n (click)=\"deleteAttachment(attachment.attachmentId)\" />\n </div>\n <div class=\"file-upload-box\" style.border-color=\"{{ this.questionItem.error ? 'red' : '' }}\">\n <img src=\"https://rnxt.s3.amazonaws.com/MytIcon/icon-doc-img%402x.png\" class=\"icon-edit1\" />\n <span class=\"f-Name\">{{ ques?.Question__c }}</span>\n <label class=\"file-label \">\n <span style=\"color: #c5281c;text-decoration:underline\">\n Adjuntar\n </span>\n <input name=\"attachment\" type=\"file\" placeholder=\"Ticket kaufen\" multiple\n accept=\".pdf, .png, .jpg, .jpeg, .heic, .application/pdf\" (change)=\"uploadFile($event,ques)\"\n class=\"file-upload-btn\">\n </label>\n </div>\n </div>\n </div>\n\n <!-- Dropdown -->\n <div *ngIf=\"ques.Type__c === 'Dropdown'\" class=\"\">\n <!-- for common dropdown -->\n <app-custom-dropdown [fromShengel]=\"qbItem.isShengel__c\"\n [options]=\"ques.Question_Options__r.records\"\n [apiMeta]=\"ques.Sub_Text__c\"\n [id]=\"ques.Name\"\n [selectedValue]=\"ques.input\"\n [placeholder]=\"'---Select---'\"\n [errorMessage]=\"ques.Error_Message__c\"\n [error]=\"ques.error\"\n (valueChange)=\"Dropdown($event, ques); clearSQError(ques.Id)\">\n </app-custom-dropdown>\n <app-dropdown-with-flag *ngIf=\"ques.isDependentPicklist && !ques.dropDownOnly\" [certified]=\"ques.certifiedFlag\" [JobPerformerCertificates]=\"ques.certificateList\" (flagDropDownChange)=\"dependentChange($event)\"></app-dropdown-with-flag>\n <i class=\"fa fa-check \" aria-hidden=\"true\" *ngIf=\"questionItem?.input?.length > 0\"></i>\n </div> \n </div>\n </div>\n </div>\n </div>\n\n <!--List start-->\n <div *ngIf=\"listFlag\">\n <div class=\"form-group\">\n <div class=\"form-row\">\n <div class=\"col-md-12\" *ngIf=\"questionItem.error\" style=\"font-size: 18px;\n color: red;\">{{questionItem?.error?.errorMsg}}</div>\n <div class=\"myt-align3\" [class]=\"'col-md-' + ques.Size__c + ' paddingnone'\"\n *ngFor=\"let ques of getLocalSubQuestions(questionItem.Id);let i = index\">\n <div>\n <span class=\"dis-flex myt-font3 myt-font7\">{{ ques?.Question__c }}</span>\n </div>\n <div *ngIf=\"ques.Type__c === 'Text'\">\n <input type=\"text\" [(ngModel)]=\"ques.input\" [ngClass]=\"{\n 'dis-flex dt-line date-line bookText boxoutline myt-font1': qbItem.Progress_Bar__c,\n textBox: !qbItem.Progress_Bar__c\n }\" id=\"text\" [id]=\"ques.uniqueSubQId\" required=\"\" (focus)=\"clearLocalSubQuesError(ques)\"\n style.border-color=\"{{ ques.error ? 'red' : '' }}\" placeholder=\"{{ ques.Question__c }}\"\n oninput=\"this.value=this.value.replace(/[^a-zA-Z0-9\\s.:;,?]/g,'');\" />\n </div>\n </div>\n <div class=\"\" *ngIf=\"addFlag\">\n <button (click)=\"Add(getLocalSubQuestions(questionItem.Id))\" class=\"btn\"><i class=\"fa fa-plus\" ></i>Add</button>\n </div>\n </div>\n </div>\n </div>\n <!--List End-->\n\n <!-- Actions -->\n <div *ngIf=\"individualBookButton\" class=\"flexer\">\n <!-- Backward / Back -->\n <div class=\"backbutton\" [ngClass]=\"{ 'col-md-6': !qbItem.Progress_Bar__c }\"\n [style.visibility]=\"questionStack.length > 0 ? 'visible' : 'hidden'\">\n <div [ngClass]=\"{}\">\n <button [ngClass]=\"{\n 'left-bt': qbItem.Progress_Bar__c,\n 'nxt-btn btn-primary btn-lg btn-block btn-back-color':\n !qbItem.Progress_Bar__c\n }\" (click)=\"handleBackClick()\">\n {{ qbItem?.Back__c }}\n </button>\n </div>\n </div>\n\n <!-- Forward / Next -->\n <div [ngClass]=\"{ 'col-md-6': !qbItem.Progress_Bar__c }\">\n <div>\n <button [ngClass]=\"{\n 'rusty': qbItem.Progress_Bar__c,\n 'nxt-btn btn-primary btn-lg btn-block btn-back-color':\n !qbItem.Progress_Bar__c\n }\" (click)=\"handleNextClick()\">\n {{ qbItem.Next__c }}\n </button>\n </div>\n </div>\n </div>\n</div>\n\n<!-- Summary -->\n<div *ngIf=\"summary && summary.length > 0\" height=\"100% !important\" class=\"col-md-12\" [ngClass]=\"{\n 'col-md-12':!qbItem.Progress_Bar__c\n }\">\n <h1 class=\"header1 summarypadd\" >{{ qbItem.SubTitle__c }}</h1> \n <div id=\"progress2\" *ngIf=\"!qbItem.Progress_Bar__c && this.abItem.Status__c != 'Completed' \">\n <div [ngClass]=\"{ 'full-summary': qbItem.Progress_Bar__c }\">\n <div *ngFor=\"let qa of summary\">\n <div [ngClass]=\"{ non: qbItem.Progress_Bar__c }\">\n <div [ngClass]=\"{ summary: !qbItem.Progress_Bar__c }\">\n <div *ngIf=\"!qbItem.Edit__c\"\n [ngClass]=\"{ 'question': this.abItem.Status__c != 'Completed' }\">\n <a [ngClass]=\"{ asum: this.abItem.Status__c === 'Completed' }\" (click)=\"handleEditClick(qa.quesId)\"\n [innerHTML]=\"getText(qa.quesValue)\">{{ qa.quesValue }}</a>\n </div>\n <div *ngIf=\"qbItem.Edit__c\"\n [ngClass]=\"{ 'question': this.abItem.Status__c != 'Completed' }\">\n <div [ngClass]=\"{ 'question': this.abItem.Status__c === 'Completed' }\"\n [innerHTML]=\"getText(qa.quesValue)\">\n {{ qa.quesValue }}\n </div>\n </div>\n <div class=\"answer\" >\n <div *ngIf=\"qa.qTyp === 'File'\">\n <img src=\"https://rnxt.s3.amazonaws.com/MytIcon/icon-doc-img%401.png\" class=\"icon-edit-summary\" />\n {{ qa.ansValue }}\n </div>\n <div *ngIf=\"qa.qTyp != 'File'\">{{ qa.ansValue }}</div>\n <div *ngIf=\"qbItem.Edit__c && this.abItem.Status__c != 'Completed'\" style=\"background: #dedddd;\">\n <button class=\"edit\" (click)=\"handleEditClick(qa.quesId)\">\n <img *ngIf=\"deviceInfo.os === 'iOS'\" src=\"https://rnxt.s3.amazonaws.com/MytIcon/icon-edit%402x.png\" style=\"width:50%!important;\" class=\"icon-editios\"/>\n <img *ngIf=\"deviceInfo.os !== 'iOS'\" src=\"https://rnxt.s3.amazonaws.com/MytIcon/icon-edit%402x.png\" class=\"icon-edit\" />\n </button>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <div *ngIf=\"this.abItem.Status__c === 'Completed'\" class=\"col-lg-12\">\n <div class=\"panel-group panel-group-joined\" id=\"ePTW-details\">\n <div class=\"panel panel-default\">\n <div class=\"panel-heading\">\n <h4 class=\"panel-title\">\n <a data-toggle=\"collapse\" data-parent=\"#ePTW-details\" href=\"#collapseOne\" class=\"collapsed\">\n PTW Details\n </a>\n </h4>\n </div>\n <div id=\"collapseOne\" class=\"panel-collapse collapse\">\n <div class=\"panel-body\">\n <div class=\"row\">\n <ng-container *ngFor=\"let item of summaryData; let i = index\">\n <ng-container *ngIf=\"i % 2 === 0\">\n <div class=\"col-lg-6 m-b-30\">\n <label>{{ getKey(item) }}</label>\n <p class=\"font-size\">{{ getValue(item) || 'N/A' }}</p>\n </div>\n <div class=\"col-lg-6\" *ngIf=\"summaryData[i + 1]\">\n <label>{{ getKey(summaryData[i + 1]) }}</label>\n <p class=\"font-size\">{{ getValue(summaryData[i + 1]) || 'N/A' }}</p>\n </div>\n </ng-container>\n </ng-container>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <div id=\"progress2\" *ngIf=\"qbItem.Progress_Bar__c \">\n <div [ngClass]=\"{'bgColor summary-top' : qbItem.Progress_Bar__c }\" >\n <div id=\"progress-summary\" *ngIf=\"qbItem.Progress_Bar__c\">\n <circle-progress class=\"titlebar\" [percent]=\"this.percent\" [radius]=\"40\" [space]=\"-4\" [outerStrokeWidth]=\"4\"\n [innerStrokeWidth]=\"4\" [outerStrokeColor]=\"'#e0b1b0'\" [innerStrokeColor]=\"'#e7e8ea'\" [animation]=\"true\" [backgroundPadding]= \"0\"\n [backgroundColor]= \"'#dd2e13'\" [backgroundGradientStopColor]=\"'#f9bfbd'\" [titleColor]=\"'#f3eded'\" \n class=\"ng-star-inserted\" [title]=\"this.percent+'%'\" [showSubtitle]=\"false\" [showBackground]=\"true\" [animationDuration]=\"300\"\n [startFromZero]=\"false\" [responsive]=\"false\" >\n </circle-progress>\n \n <div *ngIf=\"qbItem.Summary_Text__c && qbItem.Progress_Bar__c\" \n [ngClass]=\"{ summaryTitle: qbItem.Progress_Bar__c }\">\n <h3 class=\"subTitle\" >{{ qbItem.Summary_Text__c }}</h3>\n <div *ngIf=\"abItem.Status__c != 'Completed'\" class=\"subTitle1\" >{{ qbItem.Summary_Sub_Text__c}}</div>\n </div>\n </div>\n <div *ngIf=\"!qbItem.Progress_Bar__c\">\n <h3 class=\"summary-h\">\n {{ qbItem.Summary_Text__c }}\n </h3>\n </div>\n </div>\n <div [ngClass]=\"{ 'full-summary': qbItem.Progress_Bar__c }\">\n <div class=\"summary-groupText myt-font2\">\n <!-- <p>Informe de da\u00F1o</p> -->\n </div>\n <div *ngFor=\"let qa of summary\" >\n <div [ngClass]=\"{ non: qbItem.Progress_Bar__c }\">\n <div [ngClass]=\"{ summary: this.abItem.Status__c != 'Completed' && !qbItem.Progress_Bar__c }\">\n <div *ngIf=\"!qbItem.Edit__c\"\n [ngClass]=\"{ 'question sum-ques myt-font3 myt-font8': this.abItem.Status__c != 'Completed' }\">\n <a [ngClass]=\"{ asum: this.abItem.Status__c === 'Completed' }\" (click)=\"handleEditClick(qa.quesId)\"\n [innerHTML]=\"getText(qa.quesValue)\">{{ qa.quesValue }}</a>\n </div>\n <div *ngIf=\"qbItem.Edit__c\"\n [ngClass]=\"{ 'sum-ques question myt-font3 myt-font8': this.abItem.Status__c != 'Completed' }\">\n <div [ngClass]=\"{ 'sum-ques1 question1 summary-completed myt-font3 myt-font8': this.abItem.Status__c === 'Completed' }\"\n [innerHTML]=\"getText(qa.quesValue)\">\n {{ qa.quesValue }}\n </div>\n </div>\n <div *ngIf=\"qbItem.Edit__c && this.abItem.Status__c != 'Completed'\" style=\"background: #dedddd;\">\n <button class=\"edit\" (click)=\"handleEditClick(qa.quesId)\">\n <img *ngIf=\"deviceInfo.os === 'iOS'\" src=\"https://rnxt.s3.amazonaws.com/MytIcon/icon-edit%402x.png\" style=\"width:50%!important;\" class=\"icon-editios\"/>\n <img *ngIf=\"deviceInfo.os !== 'iOS'\" src=\"https://rnxt.s3.amazonaws.com/MytIcon/icon-edit%402x.png\" class=\"icon-edit\" />\n </button>\n </div>\n \n <div class=\"answer \" >\n <div *ngIf=\"qa.qTyp === 'File'\">\n <img src=\"https://rnxt.s3.amazonaws.com/MytIcon/icon-doc-img%401.png\" class=\"icon-edit-summary\" />\n {{ qa.ansValue }}\n </div>\n <div *ngIf=\"qa.qTyp != 'File'\">\n {{ qa.ansValue }}\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <!-- Answer Book -->\n <div class=\"flexer1\" *ngIf=\"abItem\">\n <div class=\"\" *ngIf=\"abItem.Status__c == 'Completed'\">\n <div class=\"col-md-12\">\n <button [ngClass]=\"{'btn-text': qbItem.Progress_Bar__c,\n 'nxt-btn btn-primary btn-lg btn-block btn-back-color': !qbItem.Progress_Bar__c}\"\n (click)=\"handleCancelClick()\">\n {{ qbItem.Cancel__c }}\n </button>\n </div>\n </div>\n </div>\n\n <!-- Group Actions -->\n <div class=\"align-edit-submit\" *ngIf=\"abItem.Status__c != 'Completed'\">\n <div class=\"col-md-6\">\n <button [ngClass]=\"{ 'btn-text2': qbItem.Progress_Bar__c,\n 'nxt-btn btn-primary btn-lg btn-block btn-back-color': !qbItem.Progress_Bar__c }\" \n (click)=\"handleSubmitClick()\">\n {{ qbItem.Submit__c }}\n </button>\n </div>\n <div class=\"col-md-6\">\n <button [ngClass]=\"{'grey': qbItem.Progress_Bar__c,\n 'nxt-btn btn-primary btn-lg btn-block btn-back-color': !qbItem.Progress_Bar__c}\" \n (click)=\"handleBackClickNew()\">\n {{ qbItem.Edit__c }}\n </button>\n </div>\n </div>\n\n</div>", styles: [".rusty{width:235px;background-color:#cd2810;color:#fff;text-align:center;font-size:24px;height:60px;margin-left:0%;margin-top:11%;cursor:pointer}.edit{background-color:#dedddd;border:none;color:#c5281c;text-decoration:underline;margin-left:50%;font-size:16px;vertical-align:super;font-weight:700}.icon-edit{width:15px;height:18px;margin:0 6px 1px -13%}.icon-edit1,.icon-edit-summary{width:29px;height:28px}.questiondiv1{padding-left:25px;padding-right:25px;padding-top:3%}.questiondiv2{padding-top:0;padding-bottom:20px;padding-left:11px}.align-edit-submit{display:flex;flex-direction:column;align-items:center}.questiondiv2{padding-left:0!important;padding-bottom:0!important}@media screen and (min-width: 689px){#progress,#progress-summary{padding-left:12px}.backicon{display:none}.dt-time{background-position:98%!important}}.bgColor{text-align:center;background-color:#dedddd}.questionalign{text-align:center;padding-right:4%;margin-bottom:4px;margin-top:2rem;color:#560d05}.largeTitle{padding-left:16px;padding-top:12px}.question-f-size{font-size:.7rem}.non{background-color:#dedddd}.circle{margin-left:25px}.titlebar{padding-left:10%;padding-top:1%;padding-right:10%}.infodiv{padding-left:2rem;overflow:hidden}.info-alert{border:1px solid #e6e6e6;border-radius:5px;padding:.5em;margin-left:15px;margin-right:15px;margin-bottom:1rem;display:flex}.addtional-info{margin-left:-33px;margin-top:-21px;font-size:16px;font-weight:400;font-stretch:normal;font-style:normal;color:#6f7072;font-family:Helvetica}.ques-alert1{margin-bottom:1rem;display:flex}.iposition{margin-left:3rem}.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{position:relative;padding:20px;float:center;width:100%}.col-md-12{padding:0!important}.nxt-btn{border-radius:.3rem;font-size:1.25rem;line-height:1.5;padding:.5rem 1rem;width:100%;cursor:pointer;outline:0}.cond-div2{color:red;font-weight:700;padding-bottom:3%}.radiotext{margin-top:-30px}.radiocontainer{display:flex;flex-direction:row-reverse;border:1px solid none;border-radius:.3em;padding:0;align-items:center;text-align:center;cursor:pointer;font-family:Rubik,Helvetica Neue,Helvetica,Roboto,Arial,sans-serif;color:#a3a2a2}.radioOption{display:flex;align-content:flex-start;margin-top:-16px;width:6%}.checkmark{left:47.5%;height:20px;margin-right:7px;width:20px;background-color:#fff0;border-radius:50%;border:1px solid grey}.myt-time{width:-moz-fit-content!important;width:fit-content!important;background-image:none;background:#dedddd;margin:0;padding:0;border:none;font-size:15px;letter-spacing:1px}.showminute{padding-left:5px;margin-top:0%}.myt-time1{margin-top:-32px;margin-left:-15px}.myt-dateTimeNew{margin-left:-14px}.myt-hour{width:-moz-fit-content;width:fit-content}.date-time{padding:0;margin:0;text-align:left}.dateandTime{border:1px solid #d2d4d6;position:relative;display:flex;border-radius:2px;background-image:url(https://dynamic-css1.s3.ap-south-1.amazonaws.com/External+css/time.svg);background-size:25px;background-repeat:no-repeat;background-position:99% center;background-color:#fff;height:37px}.date-line{border-bottom:1px solid #fff}.dt-time{width:57%;margin-left:2.3%;text-align:left;background-image:url(https://rnxt.s3.amazonaws.com/MytIcon/icon-clock%402x.png)!important;background-size:25px!important;background-repeat:no-repeat!important;background:#dedddd}.date-picker{width:57%;margin-left:2.5%;height:44px;border-radius:5px}.datetime:focus{border:none;box-shadow:none}#meridiem{margin-top:-2px;border:hidden}.dis-flex{display:flex;justify-content:center}.textBox{width:100%;height:36px}.textBox1{width:100%;height:36px;margin-left:-17px}.option{color:#767676}.paddingnone{padding-bottom:0%}.paddingZero{padding:0}.summary-h{text-align:left;padding-bottom:15px}.summary{display:flex;flex-direction:column;align-items:flex-start;border-bottom:2px solid #fff}.asum{color:#6f7072;margin-top:5%;padding-left:3%}.question{padding:10px;font-size:14px;color:#007bff}.question1{margin-left:14rem;background:#dedddd;color:#560d05;font-size:15px;padding-bottom:20px;text-align:left}.answer{display:flex;align-items:baseline;padding:5px 5px 10px;font-size:14px;font-weight:400;word-wrap:break-word;width:97%;justify-content:space-between}.answer1{max-width:55%;margin-left:auto;margin-right:auto;color:#a3a2a2;margin-top:0%;padding-bottom:0;font-size:14px;font-weight:400;word-wrap:break-word;text-align:left;background:#dedddd;border-bottom:1px solid #fff}.myt-font{font-size:20px}.myt-font1{width:16rem;font-size:14px;font-weight:400}.myt-font2{font-size:18px}.myt-font3,.myt-font4{font-size:14px}.myt-font5{margin-top:-18px;font-weight:400;font-size:14px;color:#560d05}.myt-font6{font-size:20px;font-weight:700;color:#c5281c;text-align:center}.myt-font10{font-weight:400;font-size:14px;color:#560d05;margin-top:10px}.myt-font7{display:flex;justify-content:flex-start;padding-left:20.5%;font-weight:100;color:#560d05}.myt-font8{font-weight:400}.dpDown:focus-visible{outline:none}.summaryTitle{padding-left:0%;padding-top:4%}.summary-groupText{width:55%;margin:auto auto -2%;text-align:left;font-weight:700;padding-top:0%;padding-bottom:0%;background-color:#dedddd;color:#c5281c}.sum-ques{width:55%;margin:auto}.sum-ques1{width:59%;margin:auto}.header-style{padding:15px!important;background:#F8F8F8;color:#898989!important;border:1px solid #e8e8e8;border-top-left-radius:5px;border-top-right-radius:5px;margin-left:0!important;justify-content:left!important;font-size:15px!important}.form-group.content-box{background:#ffffff;padding:40px;border:1px solid #e8e8e8;border-bottom-left-radius:5px;border-bottom-right-radius:5px}.shengel-myt-font3{padding-bottom:5px;padding-top:5px;padding-right:15px;padding-left:2px!important;color:#9a9a9a!important;font-size:14px!important;font-weight:400!important}.file-upload-btn{display:none;border-bottom:groove}.file-upload-box{max-width:45%;margin-left:29.5%;height:auto;padding:16px;display:flex;border:2px;border-bottom:1px solid #fff;background-color:#dedddd;justify-content:space-between;color:#d8d8d8}.file-label{cursor:pointer;color:#c5281c;text-decoration:underline}.file-uploading-box{font-size:14px;font-weight:400;max-width:45%;margin-left:29.5%;height:56px;padding:16px;display:flex;border:2px;background-color:#dedddd;justify-content:space-between;margin-bottom:0;color:#d8d8d8}.uploading-file-name{color:#6f7072}.deleteIcon{cursor:pointer;height:24px}.file-icon{max-width:24px;height:26px}.picture-upload{height:200px;width:200px;position:relative;border:1px solid #ccc;display:flex;padding:6px 12px;cursor:pointer;background-color:#fff;align-items:center}.colon{line-height:42px;padding:0;margin-top:10%;color:#6f7072}.colon1{display:contents}.subTitle{color:#c5281c;font-weight:600;margin-top:-3%}.subTitle1{color:#560d05;font-size:14px;font-weight:500}.check-icon{color:#87be1c;margin-left:-2rem;z-index:1;padding:5px;margin-top:.4rem}.check-icon2{color:#87be1c;margin-left:-4rem;z-index:1;margin-top:.6rem;line-height:3}.check-icon3{color:#87be1c;margin-left:-4rem;z-index:1;margin-top:3rem}.align-l{text-align:left;padding:1% 2% 2%;margin-bottom:-5%;margin-top:-1%}.attach-ulist{list-style-type:none;margin-left:0;margin-bottom:.7rem}.attach-list{float:right;cursor:pointer;padding:0}.icolor{color:#99b5ce}.picture-upload-child{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.tspan:nth-child(1){font-size:25px;font-weight:700}.tspan:nth-child(2){display:none}.pic-upload{position:absolute;top:15%;left:85%;transform:translate(-50%,-50%)}.btn-block+.btn-block{margin-top:.5rem}input[type=submit].btn-block,input[type=reset].btn-block,input[type=button].btn-block{width:100%}.btn-lg,.btn-group-lg>.btn{padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:.3rem}.btn-lg+.dropdown-toggle-split,.btn-group-lg>.btn+.dropdown-toggle-split{padding-right:.75rem;padding-left:.75rem}.btn-primary:hover{color:#fff}.btn-primary:focus,.btn-primary.focus{color:#fff;box-shadow:0 0 0 .2rem #268fff80}.btn-primary.disabled,.btn-primary:disabled{color:#fff}.btn-primary:not(:disabled):not(.disabled):active,.btn-primary:not(:disabled):not(.disabled).active,.show>.btn-primary.dropdown-toggle{color:#fff}.btn-primary:not(:disabled):not(.disabled):active:focus,.btn-primary:not(:disabled):not(.disabled).active:focus,.show>.btn-primary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem #268fff80}.btn-back-color{display:block;width:100%;padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;text-align:center;border-radius:.3rem;margin:0}.fa-plus:hover{color:#87be1c}.fa-plus{color:#99b5ce}.btn-primary{border-color:#007bff}.ques-Title{text-align:left;font-size:24px}.grey{width:38%;height:56px;margin:0px 0px 0px 0rem;padding:14px 0 17px;background-color:#cd2810;color:#fff;font-size:24px}.btn-text{width:330px;font-size:24px;background-color:#cd2810;color:#fff;height:60px;margin-left:auto;margin-top:0;cursor:pointer;border-radius:40px}.btn-text2{width:21rem;font-size:24px;background-color:#cd2810;border:none;color:#fff;height:60px;margin-left:17rem;margin-right:17rem;margin-top:10px;cursor:pointer;border-radius:40px}.flexer{max-width:100%;width:100%;display:flex;justify-content:center}.flexer1{max-width:100%;width:100%;display:flex;justify-content:center;margin-top:32px}.btn-r{right:0rem}.down{margin-left:0;width:57%}.down1{width:16rem;margin-left:0rem;background-color:#dedddd}.down2{margin-top:0%;padding-left:11px}.dropbox{margin-left:21.5rem}.myt-dropbox{background-image:url(https://rnxt.s3.amazonaws.com/MytIcon/down-red.png);background-origin:content-box;background-position:right -.9rem center;background-repeat:no-repeat;background-size:35px 33px;padding-right:1.35rem;background-color:#dedddd}.boxoutline{outline:transparent;background-color:#dedddd}.left-bt{width:238px;background-color:#cd2810;color:#fff;padding:0;text-align:center;font-size:24px;cursor:pointer;height:60px;margin-top:125px;margin-bottom:4rem;margin-left:-234px}.townArea{text-align:left;height:43px;padding-left:15px}.townArea:hover{background-color:#9e9e9e2e}.listFlow{font-weight:400;color:#767676;z-index:2;position:absolute;background:#dedddd;box-shadow:0 2px 5px #00000040}.myt-radio input[type=radio]:checked:after{background-color:#c5281c}.full-summary{margin-top:4%}.container-radio input{display:none;position:absolute;opacity:0;cursor:pointer}.container-radio input:checked~.checkmark{background-color:#fff0}.checkmark:after{content:\"\";display:none}.container-radio input:checked~.checkmark:after{display:block}.container-radio .checkmark:after{top:3px;left:3px;width:12px;margin:3px;height:12px;border-radius:50%;background:#C5281C}.f-Name{color:#6f7072;font-size:14px;font-weight:400;word-break:break-word}.summary-top{margin-top:4%}.myt-border-r{border-top:none;border-left:none;border-right:none;border-radius:0}.myt-align{margin-left:4%;line-height:2}.myt-align1{margin-left:-29px}.myt-align2{margin-left:-15px}.myt-align3{width:100%}.myt-book1{margin-top:-20px}.colorf{color:#555}.bookText{width:57%;margin-left:21.5%;background-color:#dedddd}.book{width:32.6%;margin-left:34%;background-color:#dedddd}.summary-completed{padding-left:2%;margin-top:20px}.town{margin:0;background-color:#dedddd}.town-drop{margin:auto;width:57%}.questiondiv1.padd-bottom{padding-bottom:6rem!important;padding-top:2rem!important}@media (max-width: 1090px){.icon-edit{margin:0 6px -3px -13%!important}}@media (max-width: 768px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:center}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}}@media (max-width: 768px){.radioOption{width:8%}.grey{width:78%;margin-left:17.5rem;height:68px!important;font-size:20px!important;font-weight:700!important}.answer{margin-top:-4%!important}}@media screen and (max-width: 672px){.header1{font-size:23px!important}.summarypadd{padding-top:50px!important}.answer{margin-top:-5%!important}.icon-edit{margin:0 6px 0 -13%!important}.subTitle1{width:95%!important}.additional{margin-left:6%!important;padding:0!important}.container1{margin-left:-35%}.town-drop{margin:auto;width:100%!important}.dis-flex{display:flex;justify-content:left}.check{display:inherit;width:-moz-max-content;width:max-content;margin-left:6%}.rusty{width:28rem;margin-left:0rem;height:68px!important;font-size:20px!important;font-weight:700!important;margin-bottom:37px}.left-bt{width:28rem;margin-left:-28rem;height:68px!important;font-size:20px!important;font-weight:700!important}.questionalign{text-align:center}.questionalign{margin-top:1rem!important}.largeTitle{padding-left:0!important}.myt-align{margin-left:0%!important}.myt-text1{margin-top:-22px}.myt-text2{margin-top:-20px}.myt-text3{margin-bottom:21px}.date-picker,.dt-time{width:100%}.showminute{margin-top:-.5%}.radioOption{width:auto;margin-top:0;margin-left:7%;margin-right:-3%}.checkmark{left:3.8rem}.myt-font7{padding-left:0rem;margin-left:-1.5%}.down,.bookText,.book{width:100%;margin-left:0rem}.town{margin-left:0rem;width:100%}.file-upload-box,.file-uploading-box{max-width:85%;margin-left:20px}.question{margin-left:0rem}.btn-text2{width:28rem;margin-right:0rem;margin-left:0;height:68px!important;font-size:20px!important;font-weight:700!important}.grey{width:28rem;margin:-21px 0 0;height:68px!important;font-size:20px!important;font-weight:700!important}}@media screen and (max-width: 580px){.rusty{width:27rem;height:68px!important;font-size:20px!important;font-weight:700!important}.left-bt{width:27rem;margin-left:-27rem;height:68px!important;font-size:20px!important;font-weight:700!important}.container1{margin-left:-24%}.showminute{margin-top:.5%}.bookText,.book{width:100%;margin-left:0rem}.btn-text2{width:27rem;margin-right:0rem;margin-left:0;height:68px!important;font-size:20px!important;font-weight:700!important}.grey{width:27rem;margin:-21px 0 0;height:68px!important;font-size:20px!important;font-weight:700!important}.btn-text{width:27rem;height:68px!important;font-size:20px!important;font-weight:700!important}}@media screen and (max-width: 672px){.questiondiv1{padding:0}}@media screen and (max-width: 525px){.rusty{width:26rem;height:68px!important;font-size:20px!important;font-weight:700!important}.container1{margin-left:-9%}.left-bt{width:26rem;margin-left:-26rem;height:68px!important;font-size:20px!important;font-weight:700!important}.dateandtime{padding-left:10px!important}}@media screen and (max-width: 480px){.answer{margin-top:-7%!important}.icon-edit{margin:0 6px 4px -35%!important}.rusty{width:25rem;height:68px!important;font-size:20px!important;font-weight:700!important}.left-bt{width:25rem;margin-left:-25rem;height:68px!important;font-size:20px!important;font-weight:700!important}.file-upload-box,.file-uploading-box{max-width:89%}}@media screen and (max-width: 420px){.answer{margin-top:-9%!important}.icon-edit{margin:-9px 1px 4px 4%!important}.rusty,.btn-text{width:21rem;height:68px!important;font-size:20px!important;font-weight:700!important}.left-bt{width:21rem;margin-left:-21rem;height:68px!important;font-size:20px!important;font-weight:700!important}.container1{margin-left:0%}.file-upload-box,.file-uploading-box{max-width:100%}.myt-dateTimeNew{margin-left:-10px!important}.form-row{padding-left:8px!important}.dateandtime{padding-left:0!important}.dt-time{padding-left:.8%!important}.myt-font7{padding-left:0rem;margin-left:-3.5%}.grey{width:21rem;margin:-21px 0 0;height:68px!important;font-size:20px!important;font-weight:700!important}.btn-text2{width:21rem;margin-right:0rem;margin-left:0;height:68px!important;font-size:20px!important;font-weight:700!important}}@media screen and (max-width: 368px){.icon-edit{margin:0 6px 3px 35%!important}.icon-editios{margin-bottom:4px}.rusty{width:19rem;height:68px!important;font-size:20px!important;font-weight:700!important}.left-bt{width:19rem;margin-left:-19rem;height:68px!important;font-size:20px!important;font-weight:700!important}.container1{margin-left:15%}.radiotext{margin-top:-45px}.file-upload-box,.file-uploading-box{max-width:100%}.grey{width:19rem;margin:-21px 0 0;height:68px!important;font-size:20px!important;font-weight:700!important}.btn-text2{width:19rem;margin-right:0rem;margin-left:0;height:68px!important;font-size:20px!important;font-weight:700!important}.btn-text{width:19rem;height:68px!important;font-size:20px!important;font-weight:700!important}}.mydp .selection{padding:0!important}.text-border{border-top:none;border-left:none;border-right:none;border-radius:0;border-bottom:1px solid #fff!important;background-color:#dedddd}.additional{display:flex;font-size:20px;text-align:left;font-weight:200;margin-left:4%;justify-content:center;color:#3e3e3c;padding:0 30%}.check{display:block}.header2{font-size:20px;font-weight:300;text-align:center;font-stretch:normal;font-style:normal;line-height:1.5;letter-spacing:normal;color:#560d05;max-width:1100px;margin:auto;padding-bottom:10px}.header1{font-size:32px;font-weight:700;text-align:center;font-stretch:normal;font-style:normal;line-height:1.25;letter-spacing:normal;color:#dd2e13}.container1{display:inline-grid;position:relative;cursor:pointer;font-size:20px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.container1 input{position:absolute;opacity:0;cursor:pointer;height:0;width:0}.checkmark1{position:absolute;top:1px;left:-35%;height:21px;width:21px;background-color:#eee}.container1:hover input~.checkmark1{background-color:#ccc}.container1 input:checked~.checkmark1{content:\"\";background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxMiIgdmlld0JveD0iMCAwIDE2IDEyIj4gIDxwYXRoIGZpbGw9IiM4N0JFMUMiIGZpbGwtcnVsZT0iZXZlbm9kZCIgZD0iTTEyLjI0Mjk1NjUsMTcuNTcyNzczOCBMMjAuOTg1NTM0Nyw5LjEzMjYxNTg1IEMyMS4xNjg1NDM3LDguOTU1OTM3NDEgMjEuNDYyMTgwNyw4Ljk1NTc3NDM2IDIxLjY0NTM5MzYsOS4xMzIyNDk0NCBMMjIuODU5MTUxMywxMC4zMDEzNzAxIEMyMy4wNDY5NDk2LDEwLjQ4MjI2MiAyMy4wNDY5NDk2LDEwLjc3OTA1NjMgMjIuODU5MTUxMywxMC45NTk5NDgyIEwxMi41NzMwNjk2LDIwLjg2Nzc1MDYgQzEyLjM5MDAwNDcsMjEuMDQ0MDgzMSAxMi4wOTY2NTU2LDIxLjA0NDA4MzEgMTEuOTEzNTkwNiwyMC44Njc3NTA2IEw3LjE0MDg0ODc3LDE2LjI3MDUzMDMgQzYuOTU0MTc0MjgsMTYuMDkwNzIwOSA2Ljk1Mjg5MDU1LDE1Ljc5NjA5NTggNy4xMzc5OTEzMywxNS42MTQ3MjgyIEw4LjMzMTE3Njc5LDE0LjQ0NTYwNzUgQzguNTEzODA2NDgsMTQuMjY2NjYxMiA4LjgwOTMzMDgzLDE0LjI2NTQyMjYgOC45OTM1MTMyMiwxNC40NDI4MzE1IEwxMi4yNDI5NTY1LDE3LjU3Mjc3MzggWiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTcgLTkpIi8+PC9zdmc+);background-position:.17rem .3rem;background-repeat:no-repeat;background-color:#d2d4d6;width:21px;height:21px}.checkmark1:after{content:\"\";position:absolute;display:none}.container1 input:checked~.checkmark1:after{display:block}.container1 .checkmark1:after{left:9px;top:5px;width:5px;height:10px;border-width:0 3px 3px 0}.bottomspace1{padding-bottom:14px!important}.myt-321{font-size:20px;font-weight:700;color:#c5281c;margin-top:11px}.myt-345{display:none}.panel{-moz-box-shadow:0px 1px 2px 0px rgba(0,0,0,.1);-webkit-box-shadow:0px 1px 2px 0px rgba(0,0,0,.1);border-radius:0;border:none;box-shadow:0 1px 2px #0000001a;margin-bottom:20px}.panel .panel-body{padding:20px}.panel-heading{border-radius:0;border:none!important;padding:10px 20px}.panel-default>.panel-heading{background-color:#fafafa;border-bottom:none;color:#2a323c;border:1px solid #e3e3e3!important}.panel-title{margin-bottom:0;margin-top:0;font-family:Rubik,sans-serif;font-weight:400}.panel-footer{background:#fafafa;border-top:0}.panel-color .panel-title{color:#fff}.panel-primary>.panel-heading{background-color:#03a9f4}.panel-success>.panel-heading{background-color:#01ba9a}.panel-info>.panel-heading{background-color:#18bae2}.panel-warning>.panel-heading{background-color:#f8ca4e}.panel-danger>.panel-heading{background-color:#f62f37}.panel-dark>.panel-heading{background-color:#2a323c;color:#fff}.panel-fill{border-radius:3px}.panel-fill .panel-heading{background-color:transparent;color:#fff;border-bottom:1px solid rgba(255,255,255,.5)!important}.panel-fill .panel-body{color:#ffffffd9}.panel-fill.panel-default .panel-body{color:#666}.panel-fill.panel-default .panel-heading{background-color:transparent;color:#333;border-bottom:1px solid rgba(0,0,0,.1)!important}.panel-fill.panel-primary{background-color:#03a9f4}.panel-fill.panel-success{background-color:#01ba9a}.panel-fill.panel-info{background-color:#18bae2}.panel-fill.panel-warning{background-color:#f8ca4e}.panel-fill.panel-danger{background-color:#f62f37}.panel-fill.panel-dark{background-color:#2a323c}.panel-group .panel .panel-heading a[data-toggle=collapse].collapsed:before{content:\"\\f0d7\"}.panel-group .panel .panel-heading .accordion-toggle.collapsed:before{content:\"\\f0d7\"}.panel-group .panel .panel-heading a[data-toggle=collapse]{display:block}.panel-group .panel .panel-heading a[data-toggle=collapse]:before{content:\"\\f0d8\";display:block;float:right;font-family:FontAwesome;font-size:14px;text-align:right;width:25px}.panel-group .panel .panel-heading .accordion-toggle{display:block}.panel-group .panel .panel-heading .accordion-toggle:before{content:\"\\f068\";display:block;float:right;font-family:FontAwesome;font-size:14px;text-align:right;width:25px}.panel-group .panel .panel-heading+.panel-collapse .panel-body{border-top:none!important;border:1px solid #e3e3e3}.panel-group .panel-heading{padding:12px 26px}.panel-group.panel-group-joined .panel+.panel{border-top:1px solid #eeeeee;margin-top:0}.panel-group-joined .panel-group .panel+.panel{border-top:1px solid #eeeeee;margin-top:0}.panel-body label{color:#9a9a9a;font-size:14px;font-weight:400;display:inline-block;max-width:100%;margin-bottom:5px}.font-size{font-size:14px}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit;text-decoration:none}.panel-title{font-size:16px}@media (min-width: 300px) and (max-width: 399px){.selbtngroup{padding-left:1.3%!important}}@media (min-width: 400px) and (max-width: 480px){.selbtngroup{padding-left:.9%!important}}@media (min-width: 481px) and (max-width: 580px){.selbtngroup{padding-left:.2%!important}}@media screen and (min-width: 871px){.selbtngroup{padding-right:4px!important}}@media screen and (max-width: 689px){.answer{max-width:95%!important;margin-left:0!important;margin-right:15px}#progress2{margin-left:8.5px!important}.edit{margin-left:85%!important;margin-bottom:0%!important}.sum-ques,.sum-ques1{width:100%!important;margin:auto}.summary-completed{padding-left:0!important;padding-bottom:17px;margin-top:9px}.summary-top{margin-top:10%}.subTitle1{font-size:18px!important;line-height:1.38!important;text-align:center;letter-spacing:normal;color:#560d05!important;font-weight:300}.backbutton{display:none}.rusty{margin-bottom:37px}}@media screen and (min-width: 1024px){.ES-style{position:absolute;left:7px;font-size:.9rem;color:#555;top:9px}}@media screen and (max-width: 1024px){.ES-style{position:absolute;left:.6rem;font-size:.95rem;color:#555;top:.57rem}}@media screen and (max-width: 689px){.app-back1{line-height:1.5;cursor:pointer;width:100%;max-width:1200px;margin-right:auto;margin-left:-10px;display:flex;font-family:Helvetica;font-size:21px;font-weight:700;align-items:center;font-stretch:normal;font-style:normal;letter-spacing:normal;color:#dd2e13;z-index:1;position:fixed;background-color:#dedddd;border-radius:0!important;margin-top:-12px;padding-top:.8rem}.header1{padding-top:75px}.dt-time{background-position:100%!important}}.summary-volver{display:none}@media ((min-width: 1200px)){.form-row{display:flex;flex-wrap:wrap}}\n"] }]
|
|
3203
|
+
}], ctorParameters: function () { return [{ type: SalesforceService }, { type: DataService }, { type: i3.ActivatedRoute }, { type: i4$1.DomSanitizer }, { type: i5.NgxSpinnerService }, { type: i2.UntypedFormBuilder }, { type: i7.DeviceDetectorService }, { type: i0.ElementRef }]; }, propDecorators: { qbId: [{
|
|
3204
|
+
type: Input
|
|
3205
|
+
}], insuranceStartDate: [{
|
|
3206
|
+
type: Input
|
|
3207
|
+
}], serv: [{
|
|
3208
|
+
type: Input
|
|
3209
|
+
}], tkn: [{
|
|
3210
|
+
type: Input
|
|
3211
|
+
}], handleEvent: [{
|
|
3212
|
+
type: Output
|
|
3213
|
+
}], handlePage: [{
|
|
3214
|
+
type: Output
|
|
3215
|
+
}] } });
|
|
3216
|
+
|
|
3217
|
+
class BookletComponent {
|
|
3218
|
+
sfService;
|
|
3219
|
+
dataService;
|
|
3220
|
+
route;
|
|
3221
|
+
sanitizer;
|
|
3222
|
+
bookletId;
|
|
3223
|
+
serv;
|
|
3224
|
+
tkn;
|
|
3225
|
+
handleEvent = new EventEmitter();
|
|
3226
|
+
handlePage = new EventEmitter();
|
|
3227
|
+
booklet = [];
|
|
3228
|
+
spinnerName;
|
|
3229
|
+
spinnerType;
|
|
3230
|
+
constructor(sfService, dataService, route, sanitizer, el) {
|
|
3231
|
+
this.sfService = sfService;
|
|
3232
|
+
this.dataService = dataService;
|
|
3233
|
+
this.route = route;
|
|
3234
|
+
this.sanitizer = sanitizer;
|
|
3235
|
+
this.spinnerName = "sp1";
|
|
3236
|
+
this.spinnerType = "ball-spin-clockwise";
|
|
3237
|
+
}
|
|
3238
|
+
ngOnInit() {
|
|
3239
|
+
this.processBooklet();
|
|
3240
|
+
}
|
|
3241
|
+
ngOnChanges() {
|
|
3242
|
+
//console.log('inside Questionnaire ngOnChanges');
|
|
3243
|
+
this.processBooklet();
|
|
3244
|
+
}
|
|
3245
|
+
processBooklet() {
|
|
3246
|
+
if (this.bookletId) {
|
|
3247
|
+
if (this.bookletId.length == 18) {
|
|
3248
|
+
this.readBooklet(this.bookletId);
|
|
3249
|
+
}
|
|
3250
|
+
}
|
|
3251
|
+
}
|
|
3252
|
+
readBooklet = (uuid) => {
|
|
3253
|
+
if (this.serv == "api") {
|
|
3254
|
+
this.dataService.getAPIData(this.tkn, ["Booklet", "read", uuid], this.successReadBooklet, this.failureReadBooklet);
|
|
3255
|
+
}
|
|
3256
|
+
else {
|
|
3257
|
+
this.sfService.remoteAction("NxtController.process", ["Booklet", "read", uuid], this.successReadBooklet, this.failureReadBooklet);
|
|
3258
|
+
}
|
|
3259
|
+
};
|
|
3260
|
+
successReadBooklet = (response) => {
|
|
3261
|
+
console.log('Inside the successReadBooklet');
|
|
3262
|
+
console.log(response);
|
|
3263
|
+
if (response != null || response != undefined) {
|
|
3264
|
+
this.booklet = response.records;
|
|
3265
|
+
}
|
|
3266
|
+
};
|
|
3267
|
+
failureReadBooklet = (response) => {
|
|
3268
|
+
};
|
|
3269
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: BookletComponent, deps: [{ token: SalesforceService }, { token: DataService }, { token: i3.ActivatedRoute }, { token: i4$1.DomSanitizer }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3270
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: BookletComponent, selector: "lib-booklet", inputs: { bookletId: "bookletId", serv: "serv", tkn: "tkn" }, outputs: { handleEvent: "handleEvent", handlePage: "handlePage" }, usesOnChanges: true, ngImport: i0, template: "<ngx-spinner [name]=\"spinnerName\" [type]=\"spinnerType\"></ngx-spinner>\n<div *ngFor=\"let qb of booklet\">\n <lib-questionnaire [serv]=\"serv\" [qbId]=\"qb.Id\" [tkn]=\"tkn\"></lib-questionnaire>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i5.NgxSpinnerComponent, selector: "ngx-spinner", inputs: ["disableAnimation", "bdColor", "zIndex", "color", "type", "size", "fullScreen", "name", "template", "showSpinner"] }, { kind: "component", type: QuestionnaireComponent, selector: "lib-questionnaire", inputs: ["qbId", "insuranceStartDate", "serv", "tkn"], outputs: ["handleEvent", "handlePage"] }] });
|
|
3271
|
+
}
|
|
3272
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: BookletComponent, decorators: [{
|
|
3273
|
+
type: Component,
|
|
3274
|
+
args: [{ selector: 'lib-booklet', template: "<ngx-spinner [name]=\"spinnerName\" [type]=\"spinnerType\"></ngx-spinner>\n<div *ngFor=\"let qb of booklet\">\n <lib-questionnaire [serv]=\"serv\" [qbId]=\"qb.Id\" [tkn]=\"tkn\"></lib-questionnaire>\n</div>\n" }]
|
|
3275
|
+
}], ctorParameters: function () { return [{ type: SalesforceService }, { type: DataService }, { type: i3.ActivatedRoute }, { type: i4$1.DomSanitizer }, { type: i0.ElementRef }]; }, propDecorators: { bookletId: [{
|
|
3276
|
+
type: Input
|
|
3277
|
+
}], serv: [{
|
|
3278
|
+
type: Input
|
|
3279
|
+
}], tkn: [{
|
|
3280
|
+
type: Input
|
|
3281
|
+
}], handleEvent: [{
|
|
3282
|
+
type: Output
|
|
3283
|
+
}], handlePage: [{
|
|
3284
|
+
type: Output
|
|
3285
|
+
}] } });
|
|
3286
|
+
|
|
3287
|
+
class SearchBoxComponent {
|
|
3288
|
+
sfService;
|
|
3289
|
+
dataService;
|
|
3290
|
+
route;
|
|
3291
|
+
http;
|
|
3292
|
+
placeHolderText;
|
|
3293
|
+
auto;
|
|
3294
|
+
filterName;
|
|
3295
|
+
finalResults = [];
|
|
3296
|
+
searchKeyWord = '';
|
|
3297
|
+
newResult;
|
|
3298
|
+
showResult = false;
|
|
3299
|
+
noResult = false;
|
|
3300
|
+
showSuggestion = true;
|
|
3301
|
+
el;
|
|
3302
|
+
serv = 'api';
|
|
3303
|
+
tkn = '';
|
|
3304
|
+
constructor(sfService, dataService, route, http, el) {
|
|
3305
|
+
this.sfService = sfService;
|
|
3306
|
+
this.dataService = dataService;
|
|
3307
|
+
this.route = route;
|
|
3308
|
+
this.http = http;
|
|
3309
|
+
}
|
|
3310
|
+
ngOnInit() {
|
|
3311
|
+
}
|
|
3312
|
+
clearList() {
|
|
3313
|
+
setTimeout(() => {
|
|
3314
|
+
this.finalResults = [];
|
|
3315
|
+
}, 1000);
|
|
3316
|
+
}
|
|
3317
|
+
getSourceDataLocal(event) {
|
|
3318
|
+
if (event.target.value.length > 2) {
|
|
3319
|
+
this.showSuggestion = true;
|
|
3320
|
+
this.finalResults = [];
|
|
3321
|
+
this.searchKeyWord = event.target.value;
|
|
3322
|
+
this.showResult = false;
|
|
3323
|
+
this.getSourceData(event.target.value);
|
|
3324
|
+
}
|
|
3325
|
+
else {
|
|
3326
|
+
this.showSuggestion = false;
|
|
3327
|
+
this.finalResults = [];
|
|
3328
|
+
this.noResult = false;
|
|
3329
|
+
}
|
|
3330
|
+
}
|
|
3331
|
+
apiResponse(keyword) {
|
|
3332
|
+
return this.http.get('https://dummyjson.com/products');
|
|
3333
|
+
}
|
|
3334
|
+
getSourceData = (keyword) => {
|
|
3335
|
+
this.apiResponse('ok').subscribe((apiResponse) => {
|
|
3336
|
+
let results = [];
|
|
3337
|
+
for (let i = 0; i < apiResponse.products.length; i++) {
|
|
3338
|
+
if (apiResponse.products[i].title.indexOf(keyword) >= 0) {
|
|
3339
|
+
console.log('pushing ' + apiResponse.products[i].title);
|
|
3340
|
+
results.push(apiResponse.products[i]);
|
|
3341
|
+
}
|
|
3342
|
+
}
|
|
3343
|
+
this.noResult = !(results.length > 1);
|
|
3344
|
+
this.finalResults = results;
|
|
3345
|
+
});
|
|
3346
|
+
};
|
|
3347
|
+
clickItem(event) {
|
|
3348
|
+
console.log('inside clickItem of ' + event.target.value);
|
|
3349
|
+
}
|
|
3350
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: SearchBoxComponent, deps: [{ token: SalesforceService }, { token: DataService }, { token: i3.ActivatedRoute }, { token: i1.HttpClient }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3351
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: SearchBoxComponent, selector: "lib-search-box", inputs: { placeHolderText: "placeHolderText" }, viewQueries: [{ propertyName: "auto", first: true, predicate: ["auto"], descendants: true }], ngImport: i0, template: "<div id=\"autocomplete-input\">\n <input #auto id=\"searchbox-style\" \n (blur)=\"clearList()\" \n [(ngModel)]=\"filterName\" \n type=\"text\" \n name=\"name\" \n (placeholder)=\"placeHolderText\" \n style=\"margin: 0 !important;\" \n class=\"searchInput\" \n (focusin)=\"getSourceDataLocal($event)\" \n (input)=\"getSourceDataLocal($event)\">\n <div id=\"selectList\" style=\"position: absolute;position: absolute;background: white;z-index: 2;\">\n <div *ngIf=\"finalResults.length > 1 && showSuggestion\" \n style=\"max-height: 100vh;border: 1px solid #d2d4d6;overflow: scroll;\" \n class=\"suggestions-container\">\n <div *ngFor=\"let item of finalResults\" (click)='clickItem(item)' class=\"hoover\">\n <div class=\"grid-x align-middle\" style=\"padding: 1rem\" *ngIf=\"item.id != null\">\n <div class=\"cell shrink\" style=\"width: 60px; margin-right: 1.6rem;\">\n <img [src]=\"item.thumbnail\" style=\"width: 60px;\" alt=\"\">\n </div>\n <div class=\"cell auto\" style=\"text-align: left; padding-left: 20px;\">\n <h4 >{{item.title}}</h4>\n <div class=\"show-for-medium\" style=\" white-space: nowrap;\n overflow: hidden;text-overflow: ellipsis;\" > {{item.description}}\n </div>\n <div *ngIf=\"item.price\" class=\"drop-list\">\n {{item.price.toFixed(2)}}\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>", styles: [""], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
3352
|
+
}
|
|
3353
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: SearchBoxComponent, decorators: [{
|
|
3354
|
+
type: Component,
|
|
3355
|
+
args: [{ selector: 'lib-search-box', template: "<div id=\"autocomplete-input\">\n <input #auto id=\"searchbox-style\" \n (blur)=\"clearList()\" \n [(ngModel)]=\"filterName\" \n type=\"text\" \n name=\"name\" \n (placeholder)=\"placeHolderText\" \n style=\"margin: 0 !important;\" \n class=\"searchInput\" \n (focusin)=\"getSourceDataLocal($event)\" \n (input)=\"getSourceDataLocal($event)\">\n <div id=\"selectList\" style=\"position: absolute;position: absolute;background: white;z-index: 2;\">\n <div *ngIf=\"finalResults.length > 1 && showSuggestion\" \n style=\"max-height: 100vh;border: 1px solid #d2d4d6;overflow: scroll;\" \n class=\"suggestions-container\">\n <div *ngFor=\"let item of finalResults\" (click)='clickItem(item)' class=\"hoover\">\n <div class=\"grid-x align-middle\" style=\"padding: 1rem\" *ngIf=\"item.id != null\">\n <div class=\"cell shrink\" style=\"width: 60px; margin-right: 1.6rem;\">\n <img [src]=\"item.thumbnail\" style=\"width: 60px;\" alt=\"\">\n </div>\n <div class=\"cell auto\" style=\"text-align: left; padding-left: 20px;\">\n <h4 >{{item.title}}</h4>\n <div class=\"show-for-medium\" style=\" white-space: nowrap;\n overflow: hidden;text-overflow: ellipsis;\" > {{item.description}}\n </div>\n <div *ngIf=\"item.price\" class=\"drop-list\">\n {{item.price.toFixed(2)}}\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>" }]
|
|
3356
|
+
}], ctorParameters: function () { return [{ type: SalesforceService }, { type: DataService }, { type: i3.ActivatedRoute }, { type: i1.HttpClient }, { type: i0.ElementRef }]; }, propDecorators: { placeHolderText: [{
|
|
3357
|
+
type: Input
|
|
3358
|
+
}], auto: [{
|
|
3359
|
+
type: ViewChild,
|
|
3360
|
+
args: ['auto']
|
|
3361
|
+
}] } });
|
|
3362
|
+
|
|
3363
|
+
// export const MY_CUSTOM_FORMATS = {
|
|
3364
|
+
// fullPickerInput: 'DD/MM/YYYY HH:mm:ss',
|
|
3365
|
+
// useUtc: true,
|
|
3366
|
+
// };
|
|
3367
|
+
class NxtAppModule {
|
|
3368
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: NxtAppModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3369
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: NxtAppModule, declarations: [NxtAppComponent,
|
|
3370
|
+
QuestionnaireComponent,
|
|
3371
|
+
PickLocationComponent,
|
|
3372
|
+
CustomInputComponent,
|
|
3373
|
+
CustomTextAreaComponent,
|
|
3374
|
+
CustomTableComponent,
|
|
3375
|
+
CustomDatePickerComponent,
|
|
3376
|
+
DropdownWithFlagComponent,
|
|
3377
|
+
CustomDropdownComponent,
|
|
3378
|
+
BookletComponent,
|
|
3379
|
+
SearchBoxComponent], imports: [CommonModule, FormsModule,
|
|
3380
|
+
MyDatePickerModule,
|
|
3381
|
+
OwlDateTimeModule,
|
|
3382
|
+
OwlNativeDateTimeModule,
|
|
3383
|
+
HttpClientModule,
|
|
3384
|
+
NgSelectModule,
|
|
3385
|
+
GoogleMapsModule,
|
|
3386
|
+
//AgmCoreModule.forRoot({
|
|
3387
|
+
// apiKey: GOOGLE_MAP_API_KEY,
|
|
3388
|
+
// libraries: ['geometry', 'places', 'visualization', 'drawing']
|
|
3389
|
+
// }),
|
|
3390
|
+
ReactiveFormsModule, NgxSpinnerModule, i10.NgCircleProgressModule], exports: [NxtAppComponent,
|
|
3391
|
+
QuestionnaireComponent,
|
|
3392
|
+
BookletComponent] });
|
|
3393
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: NxtAppModule, imports: [CommonModule, FormsModule,
|
|
3394
|
+
MyDatePickerModule,
|
|
3395
|
+
OwlDateTimeModule,
|
|
3396
|
+
OwlNativeDateTimeModule,
|
|
3397
|
+
HttpClientModule,
|
|
3398
|
+
NgSelectModule,
|
|
3399
|
+
GoogleMapsModule,
|
|
3400
|
+
//AgmCoreModule.forRoot({
|
|
3401
|
+
// apiKey: GOOGLE_MAP_API_KEY,
|
|
3402
|
+
// libraries: ['geometry', 'places', 'visualization', 'drawing']
|
|
3403
|
+
// }),
|
|
3404
|
+
ReactiveFormsModule, NgxSpinnerModule,
|
|
3405
|
+
/*NgCircleProgressModule.forRoot({
|
|
3406
|
+
"backgroundPadding": -10,
|
|
3407
|
+
"radius": 60,
|
|
3408
|
+
"space": -6,
|
|
3409
|
+
"innerStrokeColor": "#919191",
|
|
3410
|
+
"outerStrokeColor": "#db9594",
|
|
3411
|
+
"outerStrokeGradientStopColor": "#e0b1b0",
|
|
3412
|
+
"innerStrokeWidth": 2,
|
|
3413
|
+
"backgroundGradient": true,
|
|
3414
|
+
"backgroundColor": "#dd2e13",
|
|
3415
|
+
"backgroundGradientStopColor": "#dd2e13",
|
|
3416
|
+
"backgroundStroke": "#d3cfcf",
|
|
3417
|
+
"title": [
|
|
3418
|
+
|
|
3419
|
+
"%"
|
|
3420
|
+
],
|
|
3421
|
+
// titleFontSize: 12,
|
|
3422
|
+
// "subtitleFontSize": 20,
|
|
3423
|
+
"animateTitle": false,
|
|
3424
|
+
"animationDuration": 1000,
|
|
3425
|
+
"showUnits": false,
|
|
3426
|
+
"clockwise":true
|
|
3427
|
+
|
|
3428
|
+
//"backgroundStrokeWidth": "0",
|
|
3429
|
+
"backgroundGradient": true,
|
|
3430
|
+
//"backgroundColor": "#dd2e13",
|
|
3431
|
+
"backgroundGradientStopColor": "#dd2e13",
|
|
3432
|
+
"backgroundStroke": "#000000",
|
|
3433
|
+
"backgroundPadding": -10,
|
|
3434
|
+
"radius": 60,
|
|
3435
|
+
"unitsFontWeight": "600",
|
|
3436
|
+
"unitsColor": "#f2f2f2",
|
|
3437
|
+
"outerStrokeGradient": true,
|
|
3438
|
+
"outerStrokeColor": "#e0b1b0",
|
|
3439
|
+
"outerStrokeGradientStopColor": "#e0b1b0",
|
|
3440
|
+
"outerStrokeLinecap": "inherit",
|
|
3441
|
+
"innerStrokeColor": "#f6dfdf",
|
|
3442
|
+
"title": [
|
|
3443
|
+
|
|
3444
|
+
"%"
|
|
3445
|
+
],
|
|
3446
|
+
"titleColor": "#e7d9d9",
|
|
3447
|
+
"titleFontSize": "31",
|
|
3448
|
+
"titleFontWeight": "100",
|
|
3449
|
+
"subtitleColor": "#f7f7f7",
|
|
3450
|
+
"subtitleFontSize": "36",
|
|
3451
|
+
"subtitleFontWeight": "900",
|
|
3452
|
+
"animateTitle": false,
|
|
3453
|
+
"animationDuration": 1000,
|
|
3454
|
+
"showTitle": true,
|
|
3455
|
+
"showUnits": true,
|
|
3456
|
+
"clockwise": false,
|
|
3457
|
+
"startFromZero": true,
|
|
3458
|
+
"showZeroOuterStroke": false,
|
|
3459
|
+
"lazy": true})*/
|
|
3460
|
+
NgCircleProgressModule.forRoot({
|
|
3461
|
+
"backgroundGradient": true,
|
|
3462
|
+
"backgroundColor": "#e29d98",
|
|
3463
|
+
"backgroundGradientStopColor": "#c5281c",
|
|
3464
|
+
"backgroundStroke": "#ece4e4",
|
|
3465
|
+
"backgroundStrokeWidth": 0,
|
|
3466
|
+
"backgroundPadding": -10,
|
|
3467
|
+
"radius": 60,
|
|
3468
|
+
"space": 4,
|
|
3469
|
+
"maxPercent": 100,
|
|
3470
|
+
"unitsFontSize": "35",
|
|
3471
|
+
"unitsColor": "#f0ebeb",
|
|
3472
|
+
"outerStrokeGradient": true,
|
|
3473
|
+
"outerStrokeWidth": 10,
|
|
3474
|
+
"outerStrokeColor": "#f7c0bf",
|
|
3475
|
+
"outerStrokeGradientStopColor": "#f9c9c8",
|
|
3476
|
+
"innerStrokeWidth": 0,
|
|
3477
|
+
"titleColor": "#f3eded",
|
|
3478
|
+
"titleFontSize": "40",
|
|
3479
|
+
"subtitleColor": "#444444",
|
|
3480
|
+
"showSubtitle": false
|
|
3481
|
+
})] });
|
|
3482
|
+
}
|
|
3483
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: NxtAppModule, decorators: [{
|
|
3484
|
+
type: NgModule,
|
|
3485
|
+
args: [{
|
|
3486
|
+
declarations: [NxtAppComponent,
|
|
3487
|
+
QuestionnaireComponent,
|
|
3488
|
+
PickLocationComponent,
|
|
3489
|
+
CustomInputComponent,
|
|
3490
|
+
CustomTextAreaComponent,
|
|
3491
|
+
CustomTableComponent,
|
|
3492
|
+
CustomDatePickerComponent,
|
|
3493
|
+
DropdownWithFlagComponent,
|
|
3494
|
+
CustomDropdownComponent,
|
|
3495
|
+
BookletComponent,
|
|
3496
|
+
SearchBoxComponent
|
|
3497
|
+
],
|
|
3498
|
+
imports: [
|
|
3499
|
+
CommonModule, FormsModule,
|
|
3500
|
+
MyDatePickerModule,
|
|
3501
|
+
OwlDateTimeModule,
|
|
3502
|
+
OwlNativeDateTimeModule,
|
|
3503
|
+
HttpClientModule,
|
|
3504
|
+
NgSelectModule,
|
|
3505
|
+
GoogleMapsModule,
|
|
3506
|
+
//AgmCoreModule.forRoot({
|
|
3507
|
+
// apiKey: GOOGLE_MAP_API_KEY,
|
|
3508
|
+
// libraries: ['geometry', 'places', 'visualization', 'drawing']
|
|
3509
|
+
// }),
|
|
3510
|
+
ReactiveFormsModule, NgxSpinnerModule,
|
|
3511
|
+
/*NgCircleProgressModule.forRoot({
|
|
3512
|
+
"backgroundPadding": -10,
|
|
3513
|
+
"radius": 60,
|
|
3514
|
+
"space": -6,
|
|
3515
|
+
"innerStrokeColor": "#919191",
|
|
3516
|
+
"outerStrokeColor": "#db9594",
|
|
3517
|
+
"outerStrokeGradientStopColor": "#e0b1b0",
|
|
3518
|
+
"innerStrokeWidth": 2,
|
|
3519
|
+
"backgroundGradient": true,
|
|
3520
|
+
"backgroundColor": "#dd2e13",
|
|
3521
|
+
"backgroundGradientStopColor": "#dd2e13",
|
|
3522
|
+
"backgroundStroke": "#d3cfcf",
|
|
3523
|
+
"title": [
|
|
3524
|
+
|
|
3525
|
+
"%"
|
|
3526
|
+
],
|
|
3527
|
+
// titleFontSize: 12,
|
|
3528
|
+
// "subtitleFontSize": 20,
|
|
3529
|
+
"animateTitle": false,
|
|
3530
|
+
"animationDuration": 1000,
|
|
3531
|
+
"showUnits": false,
|
|
3532
|
+
"clockwise":true
|
|
3533
|
+
|
|
3534
|
+
//"backgroundStrokeWidth": "0",
|
|
3535
|
+
"backgroundGradient": true,
|
|
3536
|
+
//"backgroundColor": "#dd2e13",
|
|
3537
|
+
"backgroundGradientStopColor": "#dd2e13",
|
|
3538
|
+
"backgroundStroke": "#000000",
|
|
3539
|
+
"backgroundPadding": -10,
|
|
3540
|
+
"radius": 60,
|
|
3541
|
+
"unitsFontWeight": "600",
|
|
3542
|
+
"unitsColor": "#f2f2f2",
|
|
3543
|
+
"outerStrokeGradient": true,
|
|
3544
|
+
"outerStrokeColor": "#e0b1b0",
|
|
3545
|
+
"outerStrokeGradientStopColor": "#e0b1b0",
|
|
3546
|
+
"outerStrokeLinecap": "inherit",
|
|
3547
|
+
"innerStrokeColor": "#f6dfdf",
|
|
3548
|
+
"title": [
|
|
3549
|
+
|
|
3550
|
+
"%"
|
|
3551
|
+
],
|
|
3552
|
+
"titleColor": "#e7d9d9",
|
|
3553
|
+
"titleFontSize": "31",
|
|
3554
|
+
"titleFontWeight": "100",
|
|
3555
|
+
"subtitleColor": "#f7f7f7",
|
|
3556
|
+
"subtitleFontSize": "36",
|
|
3557
|
+
"subtitleFontWeight": "900",
|
|
3558
|
+
"animateTitle": false,
|
|
3559
|
+
"animationDuration": 1000,
|
|
3560
|
+
"showTitle": true,
|
|
3561
|
+
"showUnits": true,
|
|
3562
|
+
"clockwise": false,
|
|
3563
|
+
"startFromZero": true,
|
|
3564
|
+
"showZeroOuterStroke": false,
|
|
3565
|
+
"lazy": true})*/
|
|
3566
|
+
NgCircleProgressModule.forRoot({
|
|
3567
|
+
"backgroundGradient": true,
|
|
3568
|
+
"backgroundColor": "#e29d98",
|
|
3569
|
+
"backgroundGradientStopColor": "#c5281c",
|
|
3570
|
+
"backgroundStroke": "#ece4e4",
|
|
3571
|
+
"backgroundStrokeWidth": 0,
|
|
3572
|
+
"backgroundPadding": -10,
|
|
3573
|
+
"radius": 60,
|
|
3574
|
+
"space": 4,
|
|
3575
|
+
"maxPercent": 100,
|
|
3576
|
+
"unitsFontSize": "35",
|
|
3577
|
+
"unitsColor": "#f0ebeb",
|
|
3578
|
+
"outerStrokeGradient": true,
|
|
3579
|
+
"outerStrokeWidth": 10,
|
|
3580
|
+
"outerStrokeColor": "#f7c0bf",
|
|
3581
|
+
"outerStrokeGradientStopColor": "#f9c9c8",
|
|
3582
|
+
"innerStrokeWidth": 0,
|
|
3583
|
+
"titleColor": "#f3eded",
|
|
3584
|
+
"titleFontSize": "40",
|
|
3585
|
+
"subtitleColor": "#444444",
|
|
3586
|
+
"showSubtitle": false
|
|
3587
|
+
})
|
|
3588
|
+
],
|
|
3589
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
3590
|
+
exports: [NxtAppComponent,
|
|
3591
|
+
QuestionnaireComponent,
|
|
3592
|
+
BookletComponent
|
|
3593
|
+
]
|
|
3594
|
+
// providers: [
|
|
3595
|
+
// { provide: OWL_MOMENT_DATE_TIME_ADAPTER_OPTIONS, useValue: { useUtc: false } },
|
|
3596
|
+
// { provide: OWL_DATE_TIME_FORMATS, useValue: MY_CUSTOM_FORMATS },
|
|
3597
|
+
// ]
|
|
3598
|
+
}]
|
|
3599
|
+
}] });
|
|
3600
|
+
|
|
3601
|
+
/*
|
|
3602
|
+
* Public API Surface of nxt-app
|
|
3603
|
+
*/
|
|
3604
|
+
|
|
3605
|
+
/**
|
|
3606
|
+
* Generated bundle index. Do not edit.
|
|
3607
|
+
*/
|
|
3608
|
+
|
|
3609
|
+
export { BookletComponent, NxtAppComponent, NxtAppModule, NxtAppService, QuestionnaireComponent, SalesforceService };
|
|
3610
|
+
//# sourceMappingURL=rangertechnologies-ngnxt.mjs.map
|