@bnsights/bbsf-admin-portal 1.0.74 → 1.0.76
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 +5 -1
- package/{bnsights-bbsf-admin-portal-1.0.74.tgz → bnsights-bbsf-admin-portal-1.0.76.tgz} +0 -0
- package/bundles/bnsights-bbsf-admin-portal.umd.js +603 -299
- package/bundles/bnsights-bbsf-admin-portal.umd.js.map +1 -1
- package/esm2015/lib/Pages/shared/components/external-url/external-url.component.js +2 -2
- package/esm2015/lib/Pages/shared/components/survey/delete-survey/delete-survey.component.js +2 -1
- package/esm2015/lib/Pages/shared/components/survey/survey-info/add-question/add-question.component.js +148 -91
- package/esm2015/lib/Pages/shared/components/survey/survey-info/edit-question/edit-question.component.js +159 -97
- package/esm2015/lib/Pages/shared/components/survey/survey-info/preview/preview.component.js +2 -2
- package/esm2015/lib/Pages/shared/components/survey/survey-info/survey-info.component.js +8 -3
- package/esm2015/lib/Pages/shared/components/survey/survey.component.js +94 -47
- package/esm2015/lib/Pages/shared/components/survey-form/survey-form.component.js +219 -87
- package/fesm2015/bnsights-bbsf-admin-portal.js +616 -312
- package/fesm2015/bnsights-bbsf-admin-portal.js.map +1 -1
- package/lib/Pages/shared/components/survey/survey-info/add-question/add-question.component.d.ts +1 -0
- package/lib/Pages/shared/components/survey/survey-info/edit-question/edit-question.component.d.ts +1 -0
- package/lib/Pages/shared/components/survey/survey.component.d.ts +1 -0
- package/package.json +2 -2
|
@@ -25066,10 +25066,10 @@ class SurveyFormComponent {
|
|
|
25066
25066
|
this.checkList = [];
|
|
25067
25067
|
this.showedChildQuestion = [];
|
|
25068
25068
|
this.isFirstValid = true;
|
|
25069
|
-
this.labelClass =
|
|
25069
|
+
this.labelClass = 'Testtsadfv';
|
|
25070
25070
|
this.toCamel = (obj) => {
|
|
25071
25071
|
if (Array.isArray(obj)) {
|
|
25072
|
-
return obj.map(v => this.toCamel(v));
|
|
25072
|
+
return obj.map((v) => this.toCamel(v));
|
|
25073
25073
|
}
|
|
25074
25074
|
else if (obj != null && obj.constructor === Object) {
|
|
25075
25075
|
return Object.keys(obj).reduceRight((result, key) => (Object.assign(Object.assign({}, result), { [(key.charAt(0).toUpperCase() + key.slice(1) || key).toString()]: this.toCamel(obj[key]) })), {});
|
|
@@ -25083,7 +25083,7 @@ class SurveyFormComponent {
|
|
|
25083
25083
|
this.filedGroup = new FormGroup({});
|
|
25084
25084
|
this.group.addControl(this.options.Name, this.filedGroup);
|
|
25085
25085
|
this.group.statusChanges.subscribe((e) => {
|
|
25086
|
-
console.log(
|
|
25086
|
+
console.log('Group', e);
|
|
25087
25087
|
});
|
|
25088
25088
|
for (let index = 0; index < this.options.QuestionList.length; index++) {
|
|
25089
25089
|
var element = this.options.QuestionList[index];
|
|
@@ -25091,15 +25091,21 @@ class SurveyFormComponent {
|
|
|
25091
25091
|
///TextBox
|
|
25092
25092
|
case SurveyOptionType.Text.toLocaleLowerCase():
|
|
25093
25093
|
var Text = new TextBoxOptions();
|
|
25094
|
-
Text.Name =
|
|
25095
|
-
Text.LabelValue = this.utilityService.isCurrentLanguageArabic()
|
|
25094
|
+
Text.Name = 'q' + element.iD_GUID;
|
|
25095
|
+
Text.LabelValue = this.utilityService.isCurrentLanguageArabic()
|
|
25096
|
+
? element.text.arabic + `.${element.questionTypeItemID}`
|
|
25097
|
+
: element.text.english + `.${element.questionTypeItemID}`;
|
|
25096
25098
|
Text.HideLabel = false;
|
|
25097
|
-
Text.IsRequired = element.isRelatedToSurveyQuestion
|
|
25099
|
+
Text.IsRequired = element.isRelatedToSurveyQuestion
|
|
25100
|
+
? false
|
|
25101
|
+
: element.options.isRequired;
|
|
25098
25102
|
Text.IsReadonly = element.isRelatedToSurveyQuestion;
|
|
25099
25103
|
Text.IsDisabled = this.options.Readonly;
|
|
25100
25104
|
Text.LabelExtraClasses = this.labelClass;
|
|
25101
25105
|
Text.ViewType = ControlLayout.Vertical;
|
|
25102
|
-
Text.LabelDescription = this.utilityService.isCurrentLanguageArabic()
|
|
25106
|
+
Text.LabelDescription = this.utilityService.isCurrentLanguageArabic()
|
|
25107
|
+
? element.options.description.arabic
|
|
25108
|
+
: element.options.description.english;
|
|
25103
25109
|
if (element.value.text)
|
|
25104
25110
|
Text.Value = element.value.text;
|
|
25105
25111
|
if (element.options.maxLength)
|
|
@@ -25113,15 +25119,21 @@ class SurveyFormComponent {
|
|
|
25113
25119
|
break;
|
|
25114
25120
|
case SurveyOptionType.Email.toLocaleLowerCase():
|
|
25115
25121
|
let Email = new TextBoxOptions();
|
|
25116
|
-
Email.Name =
|
|
25117
|
-
Email.LabelValue = this.utilityService.isCurrentLanguageArabic()
|
|
25122
|
+
Email.Name = 'q' + element.iD_GUID;
|
|
25123
|
+
Email.LabelValue = this.utilityService.isCurrentLanguageArabic()
|
|
25124
|
+
? element.text.arabic + `.${element.questionTypeItemID}`
|
|
25125
|
+
: element.text.english + `.${element.questionTypeItemID}`;
|
|
25118
25126
|
Email.HideLabel = false;
|
|
25119
25127
|
Email.LabelExtraClasses = this.labelClass;
|
|
25120
|
-
Email.IsRequired = element.isRelatedToSurveyQuestion
|
|
25128
|
+
Email.IsRequired = element.isRelatedToSurveyQuestion
|
|
25129
|
+
? false
|
|
25130
|
+
: element.options.isRequired;
|
|
25121
25131
|
Email.IsReadonly = element.isRelatedToSurveyQuestion;
|
|
25122
25132
|
Email.ViewType = ControlLayout.Vertical;
|
|
25123
25133
|
Email.IsDisabled = this.options.Readonly;
|
|
25124
|
-
Email.LabelDescription = this.utilityService.isCurrentLanguageArabic()
|
|
25134
|
+
Email.LabelDescription = this.utilityService.isCurrentLanguageArabic()
|
|
25135
|
+
? element.options.description.arabic
|
|
25136
|
+
: element.options.description.english;
|
|
25125
25137
|
Email.Type = InputType.Email;
|
|
25126
25138
|
if (element.value.text)
|
|
25127
25139
|
Email.Value = element.value.text;
|
|
@@ -25131,15 +25143,22 @@ class SurveyFormComponent {
|
|
|
25131
25143
|
break;
|
|
25132
25144
|
case SurveyOptionType.Number.toLocaleLowerCase():
|
|
25133
25145
|
let Number = new TextBoxOptions();
|
|
25134
|
-
Number.Name =
|
|
25146
|
+
Number.Name = 'q' + element.iD_GUID;
|
|
25135
25147
|
Number.HideLabel = false;
|
|
25136
25148
|
Number.LabelExtraClasses = this.labelClass;
|
|
25137
|
-
Number.LabelValue = this.utilityService.isCurrentLanguageArabic()
|
|
25138
|
-
|
|
25149
|
+
Number.LabelValue = this.utilityService.isCurrentLanguageArabic()
|
|
25150
|
+
? element.text.arabic + `.${element.questionTypeItemID}`
|
|
25151
|
+
: element.text.english + `.${element.questionTypeItemID}`;
|
|
25152
|
+
Number.IsRequired = element.isRelatedToSurveyQuestion
|
|
25153
|
+
? false
|
|
25154
|
+
: element.options.isRequired;
|
|
25139
25155
|
Number.IsReadonly = element.isRelatedToSurveyQuestion;
|
|
25140
25156
|
Number.ViewType = ControlLayout.Vertical;
|
|
25141
25157
|
Number.IsDisabled = this.options.Readonly;
|
|
25142
|
-
Number.LabelDescription =
|
|
25158
|
+
Number.LabelDescription =
|
|
25159
|
+
this.utilityService.isCurrentLanguageArabic()
|
|
25160
|
+
? element.options.description.arabic
|
|
25161
|
+
: element.options.description.english;
|
|
25143
25162
|
Number.Type = InputType.Number;
|
|
25144
25163
|
let rangeNumber = new RangeNumber();
|
|
25145
25164
|
rangeNumber.To = element.options.maxLength;
|
|
@@ -25154,15 +25173,21 @@ class SurveyFormComponent {
|
|
|
25154
25173
|
///DateTime
|
|
25155
25174
|
case SurveyOptionType.Date.toLocaleLowerCase():
|
|
25156
25175
|
let Date = new DatePickerOptions();
|
|
25157
|
-
Date.Name =
|
|
25176
|
+
Date.Name = 'q' + element.iD_GUID;
|
|
25158
25177
|
Date.HideLabel = false;
|
|
25159
25178
|
Date.LabelExtraClasses = this.labelClass;
|
|
25160
|
-
Date.LabelValue = this.utilityService.isCurrentLanguageArabic()
|
|
25161
|
-
|
|
25179
|
+
Date.LabelValue = this.utilityService.isCurrentLanguageArabic()
|
|
25180
|
+
? element.text.arabic + `.${element.questionTypeItemID}`
|
|
25181
|
+
: element.text.english + `.${element.questionTypeItemID}`;
|
|
25182
|
+
Date.IsRequired = element.isRelatedToSurveyQuestion
|
|
25183
|
+
? false
|
|
25184
|
+
: element.options.isRequired;
|
|
25162
25185
|
Date.IsReadonly = element.isRelatedToSurveyQuestion;
|
|
25163
25186
|
Date.ViewType = ControlLayout.Vertical;
|
|
25164
25187
|
Date.IsDisabled = this.options.Readonly;
|
|
25165
|
-
Date.LabelDescription = this.utilityService.isCurrentLanguageArabic()
|
|
25188
|
+
Date.LabelDescription = this.utilityService.isCurrentLanguageArabic()
|
|
25189
|
+
? element.options.description.arabic
|
|
25190
|
+
: element.options.description.english;
|
|
25166
25191
|
Date.PickerType = PickerType.Calendar;
|
|
25167
25192
|
Date.SelectMode = SelectMode.Single;
|
|
25168
25193
|
Date.StartView = StartView.Month;
|
|
@@ -25174,15 +25199,22 @@ class SurveyFormComponent {
|
|
|
25174
25199
|
break;
|
|
25175
25200
|
case SurveyOptionType.DateTime.toLocaleLowerCase():
|
|
25176
25201
|
let DateTime = new DatePickerOptions();
|
|
25177
|
-
DateTime.Name =
|
|
25202
|
+
DateTime.Name = 'q' + element.iD_GUID;
|
|
25178
25203
|
DateTime.HideLabel = false;
|
|
25179
25204
|
DateTime.LabelExtraClasses = this.labelClass;
|
|
25180
|
-
DateTime.LabelValue = this.utilityService.isCurrentLanguageArabic()
|
|
25181
|
-
|
|
25205
|
+
DateTime.LabelValue = this.utilityService.isCurrentLanguageArabic()
|
|
25206
|
+
? element.text.arabic + `.${element.questionTypeItemID}`
|
|
25207
|
+
: element.text.english + `.${element.questionTypeItemID}`;
|
|
25208
|
+
DateTime.IsRequired = element.isRelatedToSurveyQuestion
|
|
25209
|
+
? false
|
|
25210
|
+
: element.options.isRequired;
|
|
25182
25211
|
DateTime.IsReadonly = element.isRelatedToSurveyQuestion;
|
|
25183
25212
|
DateTime.ViewType = ControlLayout.Vertical;
|
|
25184
25213
|
DateTime.IsDisabled = this.options.Readonly;
|
|
25185
|
-
DateTime.LabelDescription =
|
|
25214
|
+
DateTime.LabelDescription =
|
|
25215
|
+
this.utilityService.isCurrentLanguageArabic()
|
|
25216
|
+
? element.options.description.arabic
|
|
25217
|
+
: element.options.description.english;
|
|
25186
25218
|
DateTime.PickerType = PickerType.Both;
|
|
25187
25219
|
DateTime.SelectMode = SelectMode.Single;
|
|
25188
25220
|
DateTime.StartView = StartView.Month;
|
|
@@ -25195,22 +25227,33 @@ class SurveyFormComponent {
|
|
|
25195
25227
|
//Dropdown
|
|
25196
25228
|
case SurveyOptionType.SingleSelect.toLocaleLowerCase():
|
|
25197
25229
|
let SingleSelect = new DropdownOptions();
|
|
25198
|
-
SingleSelect.Name =
|
|
25230
|
+
SingleSelect.Name = 'q' + element.iD_GUID;
|
|
25199
25231
|
SingleSelect.HideLabel = false;
|
|
25200
25232
|
SingleSelect.LabelExtraClasses = this.labelClass;
|
|
25201
|
-
SingleSelect.LabelValue =
|
|
25202
|
-
|
|
25233
|
+
SingleSelect.LabelValue =
|
|
25234
|
+
this.utilityService.isCurrentLanguageArabic()
|
|
25235
|
+
? element.text.arabic + `.${element.questionTypeItemID}`
|
|
25236
|
+
: element.text.english + `.${element.questionTypeItemID}`;
|
|
25237
|
+
SingleSelect.IsRequired = element.isRelatedToSurveyQuestion
|
|
25238
|
+
? false
|
|
25239
|
+
: element.options.isRequired;
|
|
25203
25240
|
SingleSelect.IsReadonly = element.isRelatedToSurveyQuestion;
|
|
25204
|
-
SingleSelect.Placeholder =
|
|
25241
|
+
SingleSelect.Placeholder =
|
|
25242
|
+
this.utilityService.getResourceValue('DefaultOptionText');
|
|
25205
25243
|
SingleSelect.ViewType = ControlLayout.Vertical;
|
|
25206
25244
|
SingleSelect.IsDisabled = this.options.Readonly;
|
|
25207
|
-
SingleSelect.LabelDescription =
|
|
25245
|
+
SingleSelect.LabelDescription =
|
|
25246
|
+
this.utilityService.isCurrentLanguageArabic()
|
|
25247
|
+
? element.options.description.arabic
|
|
25248
|
+
: element.options.description.english;
|
|
25208
25249
|
let dataSource = [];
|
|
25209
25250
|
for (let index = 0; index < element.questionOptions.length; index++) {
|
|
25210
25251
|
const option = element.questionOptions[index];
|
|
25211
25252
|
let item = {};
|
|
25212
25253
|
item.key = option.iD_GUID;
|
|
25213
|
-
item.value = this.utilityService.isCurrentLanguageArabic()
|
|
25254
|
+
item.value = this.utilityService.isCurrentLanguageArabic()
|
|
25255
|
+
? option.name.arabic
|
|
25256
|
+
: option.name.english;
|
|
25214
25257
|
dataSource.push(item);
|
|
25215
25258
|
}
|
|
25216
25259
|
SingleSelect.DataSource = dataSource;
|
|
@@ -25225,21 +25268,30 @@ class SurveyFormComponent {
|
|
|
25225
25268
|
break;
|
|
25226
25269
|
case SurveyOptionType.RadioButton.toLocaleLowerCase():
|
|
25227
25270
|
let radioButton = new RadioButtonOptions();
|
|
25228
|
-
radioButton.Name =
|
|
25271
|
+
radioButton.Name = 'q' + element.iD_GUID;
|
|
25229
25272
|
radioButton.HideLabel = false;
|
|
25230
25273
|
radioButton.LabelExtraClasses = this.labelClass;
|
|
25231
|
-
radioButton.LabelValue = this.utilityService.isCurrentLanguageArabic()
|
|
25232
|
-
|
|
25274
|
+
radioButton.LabelValue = this.utilityService.isCurrentLanguageArabic()
|
|
25275
|
+
? element.text.arabic + `.${element.questionTypeItemID}`
|
|
25276
|
+
: element.text.english + `.${element.questionTypeItemID}`;
|
|
25277
|
+
radioButton.IsRequired = element.isRelatedToSurveyQuestion
|
|
25278
|
+
? false
|
|
25279
|
+
: element.options.isRequired;
|
|
25233
25280
|
radioButton.IsReadonly = element.isRelatedToSurveyQuestion;
|
|
25234
25281
|
radioButton.ViewType = ControlLayout.Vertical;
|
|
25235
25282
|
radioButton.IsDisabled = this.options.Readonly;
|
|
25236
|
-
radioButton.LabelDescription =
|
|
25283
|
+
radioButton.LabelDescription =
|
|
25284
|
+
this.utilityService.isCurrentLanguageArabic()
|
|
25285
|
+
? element.options.description.arabic
|
|
25286
|
+
: element.options.description.english;
|
|
25237
25287
|
let dataSourceRadio = [];
|
|
25238
25288
|
for (let index = 0; index < element.questionOptions.length; index++) {
|
|
25239
25289
|
const option = element.questionOptions[index];
|
|
25240
25290
|
let item = {};
|
|
25241
25291
|
item.Value = option.iD_GUID;
|
|
25242
|
-
item.Text = this.utilityService.isCurrentLanguageArabic()
|
|
25292
|
+
item.Text = this.utilityService.isCurrentLanguageArabic()
|
|
25293
|
+
? option.name.arabic
|
|
25294
|
+
: option.name.english;
|
|
25243
25295
|
dataSourceRadio.push(item);
|
|
25244
25296
|
}
|
|
25245
25297
|
radioButton.Items = dataSourceRadio;
|
|
@@ -25251,22 +25303,33 @@ class SurveyFormComponent {
|
|
|
25251
25303
|
break;
|
|
25252
25304
|
case SurveyOptionType.MultipleSelect.toLocaleLowerCase():
|
|
25253
25305
|
let MulipleSelect = new DropdownOptions();
|
|
25254
|
-
MulipleSelect.Name =
|
|
25306
|
+
MulipleSelect.Name = 'q' + element.iD_GUID;
|
|
25255
25307
|
MulipleSelect.HideLabel = false;
|
|
25256
25308
|
MulipleSelect.LabelExtraClasses = this.labelClass;
|
|
25257
|
-
MulipleSelect.LabelValue =
|
|
25258
|
-
|
|
25309
|
+
MulipleSelect.LabelValue =
|
|
25310
|
+
this.utilityService.isCurrentLanguageArabic()
|
|
25311
|
+
? element.text.arabic + `.${element.questionTypeItemID}`
|
|
25312
|
+
: element.text.english + `.${element.questionTypeItemID}`;
|
|
25313
|
+
MulipleSelect.IsRequired = element.isRelatedToSurveyQuestion
|
|
25314
|
+
? false
|
|
25315
|
+
: element.options.isRequired;
|
|
25259
25316
|
MulipleSelect.IsReadonly = element.isRelatedToSurveyQuestion;
|
|
25260
|
-
MulipleSelect.Placeholder =
|
|
25317
|
+
MulipleSelect.Placeholder =
|
|
25318
|
+
this.utilityService.getResourceValue('DefaultOptionText');
|
|
25261
25319
|
MulipleSelect.ViewType = ControlLayout.Vertical;
|
|
25262
25320
|
MulipleSelect.IsDisabled = this.options.Readonly;
|
|
25263
|
-
MulipleSelect.LabelDescription =
|
|
25321
|
+
MulipleSelect.LabelDescription =
|
|
25322
|
+
this.utilityService.isCurrentLanguageArabic()
|
|
25323
|
+
? element.options.description.arabic
|
|
25324
|
+
: element.options.description.english;
|
|
25264
25325
|
let multipleSelectDataSource = [];
|
|
25265
25326
|
for (let index = 0; index < element.questionOptions.length; index++) {
|
|
25266
25327
|
const option = element.questionOptions[index];
|
|
25267
25328
|
let item = {};
|
|
25268
25329
|
item.key = option.iD_GUID;
|
|
25269
|
-
item.value = this.utilityService.isCurrentLanguageArabic()
|
|
25330
|
+
item.value = this.utilityService.isCurrentLanguageArabic()
|
|
25331
|
+
? option.name.arabic
|
|
25332
|
+
: option.name.english;
|
|
25270
25333
|
multipleSelectDataSource.push(item);
|
|
25271
25334
|
}
|
|
25272
25335
|
MulipleSelect.DataSource = multipleSelectDataSource;
|
|
@@ -25281,15 +25344,22 @@ class SurveyFormComponent {
|
|
|
25281
25344
|
break;
|
|
25282
25345
|
case SurveyOptionType.Country.toLocaleLowerCase():
|
|
25283
25346
|
let Country = new DropdownOptions();
|
|
25284
|
-
Country.Name =
|
|
25347
|
+
Country.Name = 'q' + element.iD_GUID;
|
|
25285
25348
|
Country.HideLabel = false;
|
|
25286
25349
|
Country.LabelExtraClasses = this.labelClass;
|
|
25287
|
-
Country.LabelValue = this.utilityService.isCurrentLanguageArabic()
|
|
25288
|
-
|
|
25350
|
+
Country.LabelValue = this.utilityService.isCurrentLanguageArabic()
|
|
25351
|
+
? element.text.arabic + `.${element.questionTypeItemID}`
|
|
25352
|
+
: element.text.english + `.${element.questionTypeItemID}`;
|
|
25353
|
+
Country.IsRequired = element.isRelatedToSurveyQuestion
|
|
25354
|
+
? false
|
|
25355
|
+
: element.options.isRequired;
|
|
25289
25356
|
Country.IsReadonly = element.isRelatedToSurveyQuestion;
|
|
25290
25357
|
Country.ViewType = ControlLayout.Vertical;
|
|
25291
25358
|
Country.IsDisabled = this.options.Readonly;
|
|
25292
|
-
Country.LabelDescription =
|
|
25359
|
+
Country.LabelDescription =
|
|
25360
|
+
this.utilityService.isCurrentLanguageArabic()
|
|
25361
|
+
? element.options.description.arabic
|
|
25362
|
+
: element.options.description.english;
|
|
25293
25363
|
Country.SingleSelection = true;
|
|
25294
25364
|
Country.ShowCheckbox = false;
|
|
25295
25365
|
Country.AllowSearchFilter = true;
|
|
@@ -25303,15 +25373,22 @@ class SurveyFormComponent {
|
|
|
25303
25373
|
//FileUpload
|
|
25304
25374
|
case SurveyOptionType.MultiFile.toLocaleLowerCase():
|
|
25305
25375
|
let MultiFile = new FileUploadOptions();
|
|
25306
|
-
MultiFile.Name =
|
|
25376
|
+
MultiFile.Name = 'q' + element.iD_GUID;
|
|
25307
25377
|
MultiFile.HideLabel = false;
|
|
25308
25378
|
MultiFile.LabelExtraClasses = this.labelClass;
|
|
25309
|
-
MultiFile.LabelValue = this.utilityService.isCurrentLanguageArabic()
|
|
25310
|
-
|
|
25379
|
+
MultiFile.LabelValue = this.utilityService.isCurrentLanguageArabic()
|
|
25380
|
+
? element.text.arabic + `.${element.questionTypeItemID}`
|
|
25381
|
+
: element.text.english + `.${element.questionTypeItemID}`;
|
|
25382
|
+
MultiFile.IsRequired = element.isRelatedToSurveyQuestion
|
|
25383
|
+
? false
|
|
25384
|
+
: element.options.isRequired;
|
|
25311
25385
|
MultiFile.IsReadonly = element.isRelatedToSurveyQuestion;
|
|
25312
25386
|
MultiFile.ViewType = ControlLayout.Vertical;
|
|
25313
25387
|
MultiFile.IsDisabled = this.options.Readonly;
|
|
25314
|
-
MultiFile.LabelDescription =
|
|
25388
|
+
MultiFile.LabelDescription =
|
|
25389
|
+
this.utilityService.isCurrentLanguageArabic()
|
|
25390
|
+
? element.options.description.arabic
|
|
25391
|
+
: element.options.description.english;
|
|
25315
25392
|
MultiFile.MaxSizeForAllFilesInMB = element.options.maxFileSizeInMB;
|
|
25316
25393
|
MultiFile.MaxNoOfFiles = element.options.maxFileCount;
|
|
25317
25394
|
MultiFile.IsMultipleFile = true;
|
|
@@ -25319,15 +25396,21 @@ class SurveyFormComponent {
|
|
|
25319
25396
|
for (let index = 0; index < element.options.allowedExtensions.length; index++) {
|
|
25320
25397
|
const elementValue = element.options.allowedExtensions[index];
|
|
25321
25398
|
switch (elementValue) {
|
|
25322
|
-
case
|
|
25399
|
+
case '0':
|
|
25323
25400
|
acceptedTypes.push(FileType.PDF);
|
|
25324
25401
|
break;
|
|
25325
|
-
case
|
|
25402
|
+
case '1':
|
|
25326
25403
|
acceptedTypes.push(FileType.Word);
|
|
25327
25404
|
break;
|
|
25328
|
-
case
|
|
25405
|
+
case '2':
|
|
25329
25406
|
acceptedTypes.push(FileType.Excel);
|
|
25330
25407
|
break;
|
|
25408
|
+
case '3':
|
|
25409
|
+
acceptedTypes.push(FileType.ImageTypes);
|
|
25410
|
+
break;
|
|
25411
|
+
case '15':
|
|
25412
|
+
acceptedTypes.push(FileType.PowerPoint);
|
|
25413
|
+
break;
|
|
25331
25414
|
default:
|
|
25332
25415
|
break;
|
|
25333
25416
|
}
|
|
@@ -25343,30 +25426,42 @@ class SurveyFormComponent {
|
|
|
25343
25426
|
break;
|
|
25344
25427
|
case SurveyOptionType.File.toLocaleLowerCase():
|
|
25345
25428
|
let File = new FileUploadOptions();
|
|
25346
|
-
File.Name =
|
|
25429
|
+
File.Name = 'q' + element.iD_GUID;
|
|
25347
25430
|
File.HideLabel = false;
|
|
25348
25431
|
File.LabelExtraClasses = this.labelClass;
|
|
25349
|
-
File.LabelValue = this.utilityService.isCurrentLanguageArabic()
|
|
25350
|
-
|
|
25432
|
+
File.LabelValue = this.utilityService.isCurrentLanguageArabic()
|
|
25433
|
+
? element.text.arabic + `.${element.questionTypeItemID}`
|
|
25434
|
+
: element.text.english + `.${element.questionTypeItemID}`;
|
|
25435
|
+
File.IsRequired = element.isRelatedToSurveyQuestion
|
|
25436
|
+
? false
|
|
25437
|
+
: element.options.isRequired;
|
|
25351
25438
|
File.IsReadonly = element.isRelatedToSurveyQuestion;
|
|
25352
25439
|
File.ViewType = ControlLayout.Vertical;
|
|
25353
25440
|
File.IsDisabled = this.options.Readonly;
|
|
25354
|
-
File.LabelDescription = this.utilityService.isCurrentLanguageArabic()
|
|
25441
|
+
File.LabelDescription = this.utilityService.isCurrentLanguageArabic()
|
|
25442
|
+
? element.options.description.arabic
|
|
25443
|
+
: element.options.description.english;
|
|
25355
25444
|
File.FileMaxSizeInMB = element.options.maxFileSizeInMB;
|
|
25356
25445
|
let acceptedTypesFile = [];
|
|
25357
25446
|
debugger;
|
|
25358
25447
|
for (let index = 0; index < element.options.allowedExtensions.length; index++) {
|
|
25359
25448
|
const elementValue = element.options.allowedExtensions[index];
|
|
25360
25449
|
switch (elementValue) {
|
|
25361
|
-
case
|
|
25450
|
+
case '0':
|
|
25362
25451
|
acceptedTypesFile.push(FileType.PDF);
|
|
25363
25452
|
break;
|
|
25364
|
-
case
|
|
25453
|
+
case '1':
|
|
25365
25454
|
acceptedTypesFile.push(FileType.Word);
|
|
25366
25455
|
break;
|
|
25367
|
-
case
|
|
25456
|
+
case '2':
|
|
25368
25457
|
acceptedTypesFile.push(FileType.Excel);
|
|
25369
25458
|
break;
|
|
25459
|
+
case '3':
|
|
25460
|
+
acceptedTypesFile.push(FileType.ImageTypes);
|
|
25461
|
+
break;
|
|
25462
|
+
case '15':
|
|
25463
|
+
acceptedTypesFile.push(FileType.PowerPoint);
|
|
25464
|
+
break;
|
|
25370
25465
|
default:
|
|
25371
25466
|
break;
|
|
25372
25467
|
}
|
|
@@ -25383,15 +25478,21 @@ class SurveyFormComponent {
|
|
|
25383
25478
|
//ImageUpload
|
|
25384
25479
|
case SurveyOptionType.Image.toLocaleLowerCase():
|
|
25385
25480
|
let Image = new ImageUploadOptions();
|
|
25386
|
-
Image.Name =
|
|
25481
|
+
Image.Name = 'q' + element.iD_GUID;
|
|
25387
25482
|
Image.HideLabel = false;
|
|
25388
25483
|
Image.LabelExtraClasses = this.labelClass;
|
|
25389
|
-
Image.LabelValue = this.utilityService.isCurrentLanguageArabic()
|
|
25390
|
-
|
|
25484
|
+
Image.LabelValue = this.utilityService.isCurrentLanguageArabic()
|
|
25485
|
+
? element.text.arabic + `.${element.questionTypeItemID}`
|
|
25486
|
+
: element.text.english + `.${element.questionTypeItemID}`;
|
|
25487
|
+
Image.IsRequired = element.isRelatedToSurveyQuestion
|
|
25488
|
+
? false
|
|
25489
|
+
: element.options.isRequired;
|
|
25391
25490
|
Image.IsReadonly = element.isRelatedToSurveyQuestion;
|
|
25392
25491
|
Image.ViewType = ControlLayout.Vertical;
|
|
25393
25492
|
Image.IsDisabled = this.options.Readonly;
|
|
25394
|
-
Image.LabelDescription = this.utilityService.isCurrentLanguageArabic()
|
|
25493
|
+
Image.LabelDescription = this.utilityService.isCurrentLanguageArabic()
|
|
25494
|
+
? element.options.description.arabic
|
|
25495
|
+
: element.options.description.english;
|
|
25395
25496
|
if (element.options.maxFileSizeInMB)
|
|
25396
25497
|
Image.FileMaxSizeInMB = element.options.maxFileSizeInMB;
|
|
25397
25498
|
if (element.isRelatedToSurveyQuestion)
|
|
@@ -25403,15 +25504,23 @@ class SurveyFormComponent {
|
|
|
25403
25504
|
//MultilineText
|
|
25404
25505
|
case SurveyOptionType.MultilineText.toLocaleLowerCase():
|
|
25405
25506
|
let MultilineText = new TextAreaOptions();
|
|
25406
|
-
MultilineText.Name =
|
|
25507
|
+
MultilineText.Name = 'q' + element.iD_GUID;
|
|
25407
25508
|
MultilineText.HideLabel = false;
|
|
25408
25509
|
MultilineText.LabelExtraClasses = this.labelClass;
|
|
25409
|
-
MultilineText.LabelValue =
|
|
25410
|
-
|
|
25510
|
+
MultilineText.LabelValue =
|
|
25511
|
+
this.utilityService.isCurrentLanguageArabic()
|
|
25512
|
+
? element.text.arabic + `.${element.questionTypeItemID}`
|
|
25513
|
+
: element.text.english + `.${element.questionTypeItemID}`;
|
|
25514
|
+
MultilineText.IsRequired = element.isRelatedToSurveyQuestion
|
|
25515
|
+
? false
|
|
25516
|
+
: element.options.isRequired;
|
|
25411
25517
|
MultilineText.IsReadonly = element.isRelatedToSurveyQuestion;
|
|
25412
25518
|
MultilineText.ViewType = ControlLayout.Vertical;
|
|
25413
25519
|
MultilineText.IsDisabled = this.options.Readonly;
|
|
25414
|
-
MultilineText.LabelDescription =
|
|
25520
|
+
MultilineText.LabelDescription =
|
|
25521
|
+
this.utilityService.isCurrentLanguageArabic()
|
|
25522
|
+
? element.options.description.arabic
|
|
25523
|
+
: element.options.description.english;
|
|
25415
25524
|
if (element.options.maxLength)
|
|
25416
25525
|
MultilineText.MaxLength = element.options.maxLength;
|
|
25417
25526
|
if (element.options.minLength)
|
|
@@ -25421,13 +25530,16 @@ class SurveyFormComponent {
|
|
|
25421
25530
|
MultilineText.Value = element.value.text;
|
|
25422
25531
|
if (element.isRelatedToSurveyQuestion)
|
|
25423
25532
|
this.checkList.push(MultilineText);
|
|
25424
|
-
MultilineText.ForceDirection =
|
|
25533
|
+
MultilineText.ForceDirection =
|
|
25534
|
+
this.utilityService.isCurrentLanguageArabic()
|
|
25535
|
+
? ForceDirection.Arabic
|
|
25536
|
+
: ForceDirection.English;
|
|
25425
25537
|
this.renderComponentService.renderDynamicComponent(viewContainerRef, SurveyFormItemComponent, this.filedGroup, MultilineText, element.options.size);
|
|
25426
25538
|
break;
|
|
25427
25539
|
//HTML
|
|
25428
25540
|
case SurveyOptionType.Boolean.toLocaleLowerCase():
|
|
25429
25541
|
let Boolean = new ToggleSlideOptions();
|
|
25430
|
-
Boolean.Name =
|
|
25542
|
+
Boolean.Name = 'q' + element.iD_GUID;
|
|
25431
25543
|
Boolean.LabelExtraClasses = this.labelClass;
|
|
25432
25544
|
Boolean.ViewType = ControlLayout.Vertical;
|
|
25433
25545
|
Boolean.IsReadonly = element.isRelatedToSurveyQuestion;
|
|
@@ -25437,8 +25549,13 @@ class SurveyFormComponent {
|
|
|
25437
25549
|
Boolean.Value = element.value.boolean;
|
|
25438
25550
|
if (element.isRelatedToSurveyQuestion)
|
|
25439
25551
|
this.checkList.push(Boolean);
|
|
25440
|
-
Boolean.LabelValue = this.utilityService.isCurrentLanguageArabic()
|
|
25441
|
-
|
|
25552
|
+
Boolean.LabelValue = this.utilityService.isCurrentLanguageArabic()
|
|
25553
|
+
? element.text.arabic + `.${element.questionTypeItemID}`
|
|
25554
|
+
: element.text.english + `.${element.questionTypeItemID}`;
|
|
25555
|
+
Boolean.LabelDescription =
|
|
25556
|
+
this.utilityService.isCurrentLanguageArabic()
|
|
25557
|
+
? element.options.description.arabic
|
|
25558
|
+
: element.options.description.english;
|
|
25442
25559
|
this.renderComponentService.renderDynamicComponent(viewContainerRef, SurveyFormItemComponent, this.filedGroup, Boolean, element.options.size);
|
|
25443
25560
|
break;
|
|
25444
25561
|
//Location
|
|
@@ -25464,7 +25581,7 @@ class SurveyFormComponent {
|
|
|
25464
25581
|
let score = 0;
|
|
25465
25582
|
let element = this.filedGroup.controls[key];
|
|
25466
25583
|
let id = key.replace('q', '');
|
|
25467
|
-
var filteredItem = this.options.QuestionList.filter(item => item.iD_GUID == id)[0];
|
|
25584
|
+
var filteredItem = this.options.QuestionList.filter((item) => item.iD_GUID == id)[0];
|
|
25468
25585
|
let item = new SurveyFiledValueDTO();
|
|
25469
25586
|
item.QuestionFieldID = id;
|
|
25470
25587
|
item.QuestionTypeItemID = filteredItem.questionTypeItemID;
|
|
@@ -25495,13 +25612,17 @@ class SurveyFormComponent {
|
|
|
25495
25612
|
this.addShowedChildQuestions(element.value);
|
|
25496
25613
|
debugger;
|
|
25497
25614
|
if (filteredItem.isAllowScoring)
|
|
25498
|
-
score = ((_a = filteredItem.questionOptions.filter(item => item.iD_GUID == element.value)[0]) === null || _a === void 0 ? void 0 : _a.score)
|
|
25615
|
+
score = ((_a = filteredItem.questionOptions.filter((item) => item.iD_GUID == element.value)[0]) === null || _a === void 0 ? void 0 : _a.score)
|
|
25616
|
+
? (_b = filteredItem.questionOptions) === null || _b === void 0 ? void 0 : _b.filter((item) => item.iD_GUID == element.value)[0].score
|
|
25617
|
+
: 0;
|
|
25499
25618
|
break;
|
|
25500
25619
|
case SurveyOptionType.RadioButton.toLocaleLowerCase():
|
|
25501
25620
|
item.SelectedIDs = [element.value];
|
|
25502
25621
|
this.addShowedChildQuestions(element.value);
|
|
25503
25622
|
if (filteredItem.isAllowScoring)
|
|
25504
|
-
score = ((_c = filteredItem.questionOptions.filter(item => item.iD_GUID == element.value)[0]) === null || _c === void 0 ? void 0 : _c.score)
|
|
25623
|
+
score = ((_c = filteredItem.questionOptions.filter((item) => item.iD_GUID == element.value)[0]) === null || _c === void 0 ? void 0 : _c.score)
|
|
25624
|
+
? (_d = filteredItem.questionOptions) === null || _d === void 0 ? void 0 : _d.filter((item) => item.iD_GUID == element.value)[0].score
|
|
25625
|
+
: 0;
|
|
25505
25626
|
break;
|
|
25506
25627
|
case SurveyOptionType.MultipleSelect.toLocaleLowerCase():
|
|
25507
25628
|
item.SelectedIDs = element.value;
|
|
@@ -25510,7 +25631,9 @@ class SurveyFormComponent {
|
|
|
25510
25631
|
const item = element.value[index];
|
|
25511
25632
|
this.addShowedChildQuestions(item);
|
|
25512
25633
|
if (filteredItem.isAllowScoring) {
|
|
25513
|
-
let scoreValue = ((_e = filteredItem.questionOptions.filter(itemOptions => itemOptions.iD_GUID == item)[0]) === null || _e === void 0 ? void 0 : _e.score)
|
|
25634
|
+
let scoreValue = ((_e = filteredItem.questionOptions.filter((itemOptions) => itemOptions.iD_GUID == item)[0]) === null || _e === void 0 ? void 0 : _e.score)
|
|
25635
|
+
? (_f = filteredItem.questionOptions) === null || _f === void 0 ? void 0 : _f.filter((itemOptions) => itemOptions.iD_GUID == item)[0].score
|
|
25636
|
+
: 0;
|
|
25514
25637
|
score = scoreValue + score;
|
|
25515
25638
|
}
|
|
25516
25639
|
}
|
|
@@ -25523,7 +25646,9 @@ class SurveyFormComponent {
|
|
|
25523
25646
|
break;
|
|
25524
25647
|
case SurveyOptionType.File.toLocaleLowerCase():
|
|
25525
25648
|
if (element.value)
|
|
25526
|
-
item.FileDTO = element.value.File
|
|
25649
|
+
item.FileDTO = element.value.File
|
|
25650
|
+
? element.value.File
|
|
25651
|
+
: element.value;
|
|
25527
25652
|
break;
|
|
25528
25653
|
case SurveyOptionType.MultiFile.toLocaleLowerCase():
|
|
25529
25654
|
item.FileCorrelationDTO = element.value;
|
|
@@ -25543,11 +25668,11 @@ class SurveyFormComponent {
|
|
|
25543
25668
|
addShowedChildQuestions(newKey) {
|
|
25544
25669
|
for (let index = 0; index < this.options.QuestionList.length; index++) {
|
|
25545
25670
|
var questionOption = this.options.QuestionList[index].questionOptions;
|
|
25546
|
-
let Option = questionOption.filter(x => x.iD_GUID === newKey)[0];
|
|
25671
|
+
let Option = questionOption.filter((x) => x.iD_GUID === newKey)[0];
|
|
25547
25672
|
if (Option && (Option === null || Option === void 0 ? void 0 : Option.linkedQuestions.length) > 0) {
|
|
25548
25673
|
for (let index = 0; index < Option.linkedQuestions.length; index++) {
|
|
25549
25674
|
const linkedQuestion = Option.linkedQuestions[index];
|
|
25550
|
-
let checkIsQuestionExist = this.showedChildQuestion.some(x => x === `q${linkedQuestion}`);
|
|
25675
|
+
let checkIsQuestionExist = this.showedChildQuestion.some((x) => x === `q${linkedQuestion}`);
|
|
25551
25676
|
if (!checkIsQuestionExist)
|
|
25552
25677
|
this.showedChildQuestion.push(`q${linkedQuestion}`);
|
|
25553
25678
|
}
|
|
@@ -25557,16 +25682,23 @@ class SurveyFormComponent {
|
|
|
25557
25682
|
changeHiddenQuestionsStatus() {
|
|
25558
25683
|
let questions = this.showedChildQuestion;
|
|
25559
25684
|
for (let index = 0; index < this.checkList.length; index++) {
|
|
25560
|
-
let checkIfExist = this.showedChildQuestion.some(x => x === this.checkList[index].Name);
|
|
25685
|
+
let checkIfExist = this.showedChildQuestion.some((x) => x === this.checkList[index].Name);
|
|
25561
25686
|
if (checkIfExist) {
|
|
25562
25687
|
let questionId = this.checkList[index].Name.replace('q', '');
|
|
25563
|
-
let Question = this.options.QuestionList.filter(item => item.iD_GUID == questionId)[0];
|
|
25688
|
+
let Question = this.options.QuestionList.filter((item) => item.iD_GUID == questionId)[0];
|
|
25564
25689
|
this.checkList[index].IsReadonly = false;
|
|
25565
25690
|
if (Question.options.isRequired && !this.checkList[index].IsRequired) {
|
|
25566
25691
|
this.checkList[index].IsRequired = true;
|
|
25567
|
-
this.filedGroup
|
|
25568
|
-
|
|
25569
|
-
|
|
25692
|
+
this.filedGroup
|
|
25693
|
+
.get(this.checkList[index].Name)
|
|
25694
|
+
.addValidators(Validators.required);
|
|
25695
|
+
if (this.filedGroup.get(this.checkList[index].Name).value == null ||
|
|
25696
|
+
this.filedGroup.get(this.checkList[index].Name).value ==
|
|
25697
|
+
undefined ||
|
|
25698
|
+
this.filedGroup.get(this.checkList[index].Name).value == '')
|
|
25699
|
+
this.filedGroup
|
|
25700
|
+
.get(this.checkList[index].Name)
|
|
25701
|
+
.setErrors({ required: true });
|
|
25570
25702
|
else
|
|
25571
25703
|
this.filedGroup.get(this.checkList[index].Name).setErrors(null);
|
|
25572
25704
|
}
|
|
@@ -25588,7 +25720,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImpo
|
|
|
25588
25720
|
args: [{
|
|
25589
25721
|
selector: 'survey-form',
|
|
25590
25722
|
templateUrl: './survey-form.component.html',
|
|
25591
|
-
providers: [FormGroupDirective]
|
|
25723
|
+
providers: [FormGroupDirective],
|
|
25592
25724
|
}]
|
|
25593
25725
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i6.RenderComponentService }, { type: i1.UtilityService }, { type: i11$1.FormGroupDirective }]; }, propDecorators: { group: [{
|
|
25594
25726
|
type: Input
|
|
@@ -25633,7 +25765,6 @@ class PreviewComponent extends AppBaseComponent {
|
|
|
25633
25765
|
this.breadCrumb = [];
|
|
25634
25766
|
this.breadCrumb.push(new BreadCrumb(this.l("Home"), false, "/"), new BreadCrumb(this.l("Survey_Details"), false, `../../../../info/${this.surveyID}`), new BreadCrumb(this.l("Preview_Details"), true));
|
|
25635
25767
|
this.pageHeaderOptions = new PageHeaderOptions();
|
|
25636
|
-
this.pageHeaderOptions.TitleValue = this.l("Preview_Details");
|
|
25637
25768
|
this.pageHeaderOptions.SearchTextBox.Active = false;
|
|
25638
25769
|
this.pageHeaderOptions.BreadCrumb.Active = true;
|
|
25639
25770
|
this.pageHeaderOptions.BreadCrumb.BreadCrumbItems = this.breadCrumb;
|
|
@@ -25651,6 +25782,7 @@ class PreviewComponent extends AppBaseComponent {
|
|
|
25651
25782
|
this.previewSurveyOptions.OnSuccessHandler = this.onSuccessDeleteHandler;
|
|
25652
25783
|
this.previewSurveyOptions.DisableSuccessNotification = true;
|
|
25653
25784
|
this.surveyInfo = res;
|
|
25785
|
+
this.pageHeaderOptions.TitleValue = this.surveyInfo.title.current_FailOver;
|
|
25654
25786
|
if (this.surveyInfo.declaration.english || this.surveyInfo.declaration.arabic) {
|
|
25655
25787
|
this.declarationCheckBoxForm = new CheckBoxOptions();
|
|
25656
25788
|
this.declarationCheckBoxForm.Name = "declaration";
|
|
@@ -26105,6 +26237,7 @@ class DeleteSurveyComponent extends AppBaseComponent {
|
|
|
26105
26237
|
this.deleteConfirmationOptions.ServiceSubmitFunction = this.delete;
|
|
26106
26238
|
this.deleteConfirmationOptions.OnSuccessHandler = this.onSuccessHandler ? this.onSuccessHandler : this.onSuccessDeleteHandler;
|
|
26107
26239
|
this.deleteConfirmationOptions.DisableSuccessNotification = true;
|
|
26240
|
+
this.deleteConfirmationOptions.ConfirmationHeader = this.l('ContinueConfirmationDeleteSurveyMessage');
|
|
26108
26241
|
this.deleteConfirmationOptions.ConfirmationBody = this.l('ContinueConfirmationMessage');
|
|
26109
26242
|
}
|
|
26110
26243
|
showDeleteModal(id) {
|
|
@@ -26203,7 +26336,9 @@ class AddQuestionComponent extends AppBaseComponent {
|
|
|
26203
26336
|
this.isImage = false;
|
|
26204
26337
|
this.optionList = [];
|
|
26205
26338
|
this.errorMessage = null;
|
|
26206
|
-
this.surveyQuestionService
|
|
26339
|
+
this.surveyQuestionService
|
|
26340
|
+
.loadAddDropdown(this.surveyID)
|
|
26341
|
+
.subscribe((res) => {
|
|
26207
26342
|
let result = res;
|
|
26208
26343
|
this.Questions = result.questions;
|
|
26209
26344
|
this.addModelForm = new FormGroup({});
|
|
@@ -26211,146 +26346,148 @@ class AddQuestionComponent extends AppBaseComponent {
|
|
|
26211
26346
|
this.addSurveyQuestionFormOptions = new FormOptions();
|
|
26212
26347
|
this.addSurveyQuestionFormOptions.FormGroup = this.addModelForm;
|
|
26213
26348
|
this.addSurveyQuestionFormOptions.GetModelFunction = this.getAddModel;
|
|
26214
|
-
this.addSurveyQuestionFormOptions.ServiceSubmitFunction =
|
|
26349
|
+
this.addSurveyQuestionFormOptions.ServiceSubmitFunction =
|
|
26350
|
+
this.getAddFunction;
|
|
26215
26351
|
this.addSurveyQuestionFormOptions.PagingReference = this.pagingElement;
|
|
26216
|
-
this.addSurveyQuestionFormOptions.OnSuccessHandler =
|
|
26352
|
+
this.addSurveyQuestionFormOptions.OnSuccessHandler =
|
|
26353
|
+
this.onSuccessAddHandler;
|
|
26217
26354
|
this.addSurveyQuestionFormOptions.DisableSuccessNotification = true;
|
|
26218
26355
|
this.addQuestion = new MultiLingualTextBoxOptions();
|
|
26219
|
-
this.addQuestion.Name =
|
|
26220
|
-
this.addQuestion.ArabicLabelKey =
|
|
26221
|
-
this.addQuestion.EnglishLabelKey =
|
|
26356
|
+
this.addQuestion.Name = 'Text';
|
|
26357
|
+
this.addQuestion.ArabicLabelKey = 'QuestionInArabic';
|
|
26358
|
+
this.addQuestion.EnglishLabelKey = 'QuestionInEnglish';
|
|
26222
26359
|
this.addQuestion.IsRequired = true;
|
|
26223
26360
|
this.addQuestion.MaxLength = 4000;
|
|
26224
26361
|
this.addQuestion.LanguageMode = this.getLanguageModeValue();
|
|
26225
26362
|
this.addDescription = new MultiLingualTextAreaOptions();
|
|
26226
|
-
this.addDescription.Name =
|
|
26227
|
-
this.addDescription.ArabicLabelKey =
|
|
26228
|
-
this.addDescription.EnglishLabelKey =
|
|
26363
|
+
this.addDescription.Name = 'Description';
|
|
26364
|
+
this.addDescription.ArabicLabelKey = 'DescriptionInArabic';
|
|
26365
|
+
this.addDescription.EnglishLabelKey = 'DescriptionInEnglish';
|
|
26229
26366
|
this.addDescription.IsRequired = false;
|
|
26230
26367
|
this.addDescription.MaxLength = 250;
|
|
26231
26368
|
this.addDescription.Rows = 2;
|
|
26232
26369
|
this.addDescription.LanguageMode = this.getLanguageModeValue();
|
|
26233
|
-
this.addDescription.ArabicLabelDescription = this.l(
|
|
26234
|
-
this.addDescription.EnglishLabelDescription = this.l(
|
|
26370
|
+
this.addDescription.ArabicLabelDescription = this.l('QuestionDescriptionHintArabic');
|
|
26371
|
+
this.addDescription.EnglishLabelDescription = this.l('QuestionDescriptionHintEnglish');
|
|
26235
26372
|
this.addQuestionType = new DropdownOptions();
|
|
26236
|
-
this.addQuestionType.Name =
|
|
26237
|
-
this.addQuestionType.LabelKey =
|
|
26373
|
+
this.addQuestionType.Name = 'QuestionTypeItemID';
|
|
26374
|
+
this.addQuestionType.LabelKey = 'Type';
|
|
26238
26375
|
this.addQuestionType.IsRequired = true;
|
|
26239
26376
|
this.addQuestionType.AllowSearchFilter = true;
|
|
26240
26377
|
this.addQuestionType.DataSource = result.optionTypes;
|
|
26241
26378
|
this.addQuestionType.SingleSelection = true;
|
|
26242
|
-
this.addQuestionType.NotFoundText = this.l(
|
|
26379
|
+
this.addQuestionType.NotFoundText = this.l('NoResultFound');
|
|
26243
26380
|
this.audience = new DropdownOptions();
|
|
26244
|
-
this.audience.Name =
|
|
26245
|
-
this.audience.LabelKey =
|
|
26381
|
+
this.audience.Name = 'AudienceItemID';
|
|
26382
|
+
this.audience.LabelKey = 'Audience';
|
|
26246
26383
|
this.audience.IsRequired = true;
|
|
26247
26384
|
this.audience.ViewType = ControlLayout.Vertical;
|
|
26248
26385
|
this.audience.SingleSelection = true;
|
|
26249
26386
|
this.audience.ShowCheckbox = false;
|
|
26250
26387
|
this.audience.DataSource = result.audiences;
|
|
26251
26388
|
this.audience.SelectedItems = audienceType;
|
|
26252
|
-
this.audience.LabelDescription = this.l(
|
|
26389
|
+
this.audience.LabelDescription = this.l('AudienceDescriptionHint');
|
|
26253
26390
|
this.addSize = new DropdownOptions();
|
|
26254
|
-
this.addSize.Name =
|
|
26255
|
-
this.addSize.LabelKey =
|
|
26391
|
+
this.addSize.Name = 'Size';
|
|
26392
|
+
this.addSize.LabelKey = 'Size';
|
|
26256
26393
|
this.addSize.IsRequired = true;
|
|
26257
26394
|
this.addSize.AllowSearchFilter = true;
|
|
26258
26395
|
this.addSize.DataSource = this.SizeList;
|
|
26259
26396
|
this.addSize.SingleSelection = true;
|
|
26260
26397
|
this.addSize.SelectedItems = 12;
|
|
26261
|
-
this.addSize.NotFoundText = this.l(
|
|
26398
|
+
this.addSize.NotFoundText = this.l('NoResultFound');
|
|
26262
26399
|
this.addRequired = new ToggleSlideOptions();
|
|
26263
|
-
this.addRequired.Name =
|
|
26264
|
-
this.addRequired.LabelKey =
|
|
26265
|
-
this.addRequired.LabelDescription = this.l(
|
|
26400
|
+
this.addRequired.Name = 'IsRequired';
|
|
26401
|
+
this.addRequired.LabelKey = 'IsRequired';
|
|
26402
|
+
this.addRequired.LabelDescription = this.l('RequiredDescriptionHint');
|
|
26266
26403
|
this.addAllowScore = new ToggleSlideOptions();
|
|
26267
|
-
this.addAllowScore.Name =
|
|
26268
|
-
this.addAllowScore.LabelKey =
|
|
26269
|
-
this.addAllowScore.LabelDescription = this.l(
|
|
26404
|
+
this.addAllowScore.Name = 'IsAllowScoring';
|
|
26405
|
+
this.addAllowScore.LabelKey = 'AllowScore';
|
|
26406
|
+
this.addAllowScore.LabelDescription = this.l('AllowScoreDescription');
|
|
26270
26407
|
this.addHasSearch = new ToggleSlideOptions();
|
|
26271
|
-
this.addHasSearch.Name =
|
|
26272
|
-
this.addHasSearch.LabelKey =
|
|
26408
|
+
this.addHasSearch.Name = 'HasSearch';
|
|
26409
|
+
this.addHasSearch.LabelKey = 'HasSearch';
|
|
26273
26410
|
this.addIsActive = new ToggleSlideOptions();
|
|
26274
|
-
this.addIsActive.Name =
|
|
26275
|
-
this.addIsActive.LabelKey =
|
|
26411
|
+
this.addIsActive.Name = 'IsVisible';
|
|
26412
|
+
this.addIsActive.LabelKey = 'Visible';
|
|
26276
26413
|
this.addIsActive.Value = true;
|
|
26277
|
-
this.addIsActive.LabelDescription = this.l(
|
|
26414
|
+
this.addIsActive.LabelDescription = this.l('GenericVisibleHint');
|
|
26278
26415
|
this.addMaxLength = new TextBoxOptions();
|
|
26279
|
-
this.addMaxLength.Name =
|
|
26280
|
-
this.addMaxLength.LabelKey =
|
|
26416
|
+
this.addMaxLength.Name = 'MaxLength';
|
|
26417
|
+
this.addMaxLength.LabelKey = 'MaxLength';
|
|
26281
26418
|
this.addMaxLength.IsRequired = true;
|
|
26282
26419
|
this.addMaxLength.NumberRange = new RangeNumber();
|
|
26283
|
-
this.addMaxLength.NumberRange.From = 1;
|
|
26284
|
-
this.addMaxLength.NumberRange.To = 4000;
|
|
26285
26420
|
this.addMaxLength.Type = InputType.Number;
|
|
26421
|
+
this.addMaxLength.LabelDescription = this.l('MaxHint');
|
|
26286
26422
|
this.addMinLength = new TextBoxOptions();
|
|
26287
|
-
this.addMinLength.Name =
|
|
26288
|
-
this.addMinLength.LabelKey =
|
|
26423
|
+
this.addMinLength.Name = 'MinLength';
|
|
26424
|
+
this.addMinLength.LabelKey = 'MinLength';
|
|
26289
26425
|
this.addMinLength.IsRequired = true;
|
|
26290
26426
|
this.addMinLength.NumberRange = new RangeNumber();
|
|
26291
|
-
this.addMinLength.NumberRange.From = 1;
|
|
26292
|
-
this.addMinLength.NumberRange.To = 4000;
|
|
26293
26427
|
this.addMinLength.Type = InputType.Number;
|
|
26428
|
+
this.addMinLength.LabelDescription = this.l('MinHint');
|
|
26294
26429
|
this.addRowsNumber = new TextBoxOptions();
|
|
26295
|
-
this.addRowsNumber.Name =
|
|
26296
|
-
this.addRowsNumber.LabelKey =
|
|
26430
|
+
this.addRowsNumber.Name = 'Rows';
|
|
26431
|
+
this.addRowsNumber.LabelKey = 'Rows';
|
|
26297
26432
|
this.addRowsNumber.IsRequired = true;
|
|
26298
26433
|
this.addRowsNumber.NumberRange = new RangeNumber();
|
|
26299
26434
|
this.addRowsNumber.NumberRange.From = 1;
|
|
26300
26435
|
this.addRowsNumber.NumberRange.To = 20;
|
|
26301
26436
|
this.addRowsNumber.Type = InputType.Number;
|
|
26302
26437
|
this.addMaxFileSize = new TextBoxOptions();
|
|
26303
|
-
this.addMaxFileSize.Name =
|
|
26304
|
-
this.addMaxFileSize.LabelKey =
|
|
26438
|
+
this.addMaxFileSize.Name = 'MaxFileSizeInMB';
|
|
26439
|
+
this.addMaxFileSize.LabelKey = 'MaxFileSizeInMB';
|
|
26305
26440
|
this.addMaxFileSize.IsRequired = true;
|
|
26306
26441
|
this.addMaxFileSize.NumberRange = new RangeNumber();
|
|
26307
26442
|
this.addMaxFileSize.NumberRange.From = 1;
|
|
26308
26443
|
this.addMaxFileSize.NumberRange.To = 100;
|
|
26309
26444
|
this.addMaxFileSize.Type = InputType.Number;
|
|
26310
26445
|
this.addMaxFileCount = new TextBoxOptions();
|
|
26311
|
-
this.addMaxFileCount.Name =
|
|
26312
|
-
this.addMaxFileCount.LabelKey =
|
|
26446
|
+
this.addMaxFileCount.Name = 'MaxFileCount';
|
|
26447
|
+
this.addMaxFileCount.LabelKey = 'MaxFilesCount';
|
|
26313
26448
|
this.addMaxFileCount.IsRequired = true;
|
|
26314
26449
|
this.addMaxFileCount.NumberRange = new RangeNumber();
|
|
26315
26450
|
this.addMaxFileCount.NumberRange.From = 1;
|
|
26316
26451
|
this.addMaxFileCount.NumberRange.To = 50;
|
|
26317
26452
|
this.addMaxFileCount.Type = InputType.Number;
|
|
26453
|
+
this.addMaxFileCount.LabelDescription = this.l('MaxFileCountHint');
|
|
26318
26454
|
this.addMaxFileCount.CustomValidation = [this.numberValidation];
|
|
26319
26455
|
this.addFilesExtensions = new DropdownOptions();
|
|
26320
|
-
this.addFilesExtensions.Name =
|
|
26321
|
-
this.addFilesExtensions.LabelKey =
|
|
26456
|
+
this.addFilesExtensions.Name = 'AllowedExtensions';
|
|
26457
|
+
this.addFilesExtensions.LabelKey = 'Extensions';
|
|
26322
26458
|
this.addFilesExtensions.IsRequired = true;
|
|
26323
26459
|
this.addFilesExtensions.AllowSearchFilter = true;
|
|
26324
26460
|
this.addFilesExtensions.DataSource = result.extensions;
|
|
26325
26461
|
this.addFilesExtensions.SingleSelection = false;
|
|
26326
|
-
this.addFilesExtensions.
|
|
26327
|
-
|
|
26462
|
+
this.addFilesExtensions.LabelDescription = this.l('ExtensionHint');
|
|
26463
|
+
this.addFilesExtensions.NotFoundText = this.l('NoResultFound');
|
|
26464
|
+
this.addModelForm.addValidators(this.fromTo('MinLength', 'MaxLength'));
|
|
26328
26465
|
this.addNameOption = new MultiLingualTextBoxOptions();
|
|
26329
|
-
this.addNameOption.Name =
|
|
26330
|
-
this.addNameOption.ArabicLabelKey =
|
|
26331
|
-
this.addNameOption.EnglishLabelKey =
|
|
26466
|
+
this.addNameOption.Name = 'NameOption';
|
|
26467
|
+
this.addNameOption.ArabicLabelKey = 'NameInArabic';
|
|
26468
|
+
this.addNameOption.EnglishLabelKey = 'NameInEnglish';
|
|
26332
26469
|
this.addNameOption.IsRequired = true;
|
|
26333
26470
|
this.addNameOption.MaxLength = 225;
|
|
26334
26471
|
this.addNameOption.LanguageMode = this.getLanguageModeValue();
|
|
26335
26472
|
this.displayOrderOption = new TextBoxOptions();
|
|
26336
|
-
this.displayOrderOption.Name =
|
|
26473
|
+
this.displayOrderOption.Name = 'DisplayOrder';
|
|
26337
26474
|
this.scoreNumber = new TextBoxOptions();
|
|
26338
|
-
this.scoreNumber.Name =
|
|
26339
|
-
this.scoreNumber.LabelKey =
|
|
26475
|
+
this.scoreNumber.Name = 'Score';
|
|
26476
|
+
this.scoreNumber.LabelKey = 'Score';
|
|
26340
26477
|
this.scoreNumber.IsRequired = true;
|
|
26341
26478
|
this.scoreNumber.Type = InputType.Number;
|
|
26342
26479
|
let rangeNumber = new RangeNumber();
|
|
26343
26480
|
rangeNumber.To = 1000000;
|
|
26344
|
-
rangeNumber.From =
|
|
26481
|
+
rangeNumber.From = 1;
|
|
26345
26482
|
this.scoreNumber.NumberRange = rangeNumber;
|
|
26346
26483
|
this.addOptionLinkedQuestions = new DropdownOptions();
|
|
26347
|
-
this.addOptionLinkedQuestions.Name =
|
|
26348
|
-
this.addOptionLinkedQuestions.LabelKey =
|
|
26484
|
+
this.addOptionLinkedQuestions.Name = 'LinkedQuestions';
|
|
26485
|
+
this.addOptionLinkedQuestions.LabelKey = 'LinkedQuestions';
|
|
26349
26486
|
this.addOptionLinkedQuestions.AllowSearchFilter = true;
|
|
26350
26487
|
this.addOptionLinkedQuestions.DataSource = result.questions;
|
|
26351
26488
|
this.addOptionLinkedQuestions.SingleSelection = false;
|
|
26352
|
-
this.addOptionLinkedQuestions.NotFoundText = this.l(
|
|
26353
|
-
this.addOptionLinkedQuestions.LabelDescription = this.l(
|
|
26489
|
+
this.addOptionLinkedQuestions.NotFoundText = this.l('NoResultFound');
|
|
26490
|
+
this.addOptionLinkedQuestions.LabelDescription = this.l('LinkedQuestionDescriptionHint');
|
|
26354
26491
|
this.openModal(this.AddModal, 'xl');
|
|
26355
26492
|
this.stopBlockUI();
|
|
26356
26493
|
});
|
|
@@ -26360,12 +26497,16 @@ class AddQuestionComponent extends AppBaseComponent {
|
|
|
26360
26497
|
let resultOptionModel = this.addOptionForm.value;
|
|
26361
26498
|
let resultModel = this.addModelForm.value;
|
|
26362
26499
|
if (this.isSelect) {
|
|
26363
|
-
if ((resultOptionModel.NameOption.Arabic != undefined &&
|
|
26364
|
-
|
|
26500
|
+
if ((resultOptionModel.NameOption.Arabic != undefined &&
|
|
26501
|
+
resultOptionModel.NameOption.Arabic != '') ||
|
|
26502
|
+
(resultOptionModel.NameOption.English != undefined &&
|
|
26503
|
+
resultOptionModel.NameOption.English != '') ||
|
|
26504
|
+
(resultOptionModel.Score != undefined && resultOptionModel.Score > 0)) {
|
|
26505
|
+
this.errorMessage = this.l('OptionPendingDataErrorMessage');
|
|
26365
26506
|
return;
|
|
26366
26507
|
}
|
|
26367
26508
|
if (this.optionList.length == 0 && this.isSelect) {
|
|
26368
|
-
this.errorMessage = this.l(
|
|
26509
|
+
this.errorMessage = this.l('OptionErrorMessage');
|
|
26369
26510
|
return;
|
|
26370
26511
|
}
|
|
26371
26512
|
}
|
|
@@ -26425,12 +26566,12 @@ class AddQuestionComponent extends AppBaseComponent {
|
|
|
26425
26566
|
return null;
|
|
26426
26567
|
}
|
|
26427
26568
|
if (!control.value.toString().match(/^[0-9]*$/)) {
|
|
26428
|
-
this.numberValidation.massage = this.l(
|
|
26429
|
-
return {
|
|
26569
|
+
this.numberValidation.massage = this.l('IntegerNumberValidationKey');
|
|
26570
|
+
return { customerError: true };
|
|
26430
26571
|
}
|
|
26431
26572
|
if (!control.value.toString().match(/^[+]?([.]\d+|\d+[.]?\d*)$/)) {
|
|
26432
|
-
this.numberValidation.massage = this.l(
|
|
26433
|
-
return {
|
|
26573
|
+
this.numberValidation.massage = this.l('PositiveNumberValidationKey');
|
|
26574
|
+
return { customerError: true };
|
|
26434
26575
|
}
|
|
26435
26576
|
return null;
|
|
26436
26577
|
};
|
|
@@ -26443,11 +26584,44 @@ class AddQuestionComponent extends AppBaseComponent {
|
|
|
26443
26584
|
this.addOptionForm.controls['Score'].updateValueAndValidity();
|
|
26444
26585
|
}
|
|
26445
26586
|
}
|
|
26587
|
+
updateLengthValidator(name, max, min) {
|
|
26588
|
+
let control = this.addOptionForm.controls[name];
|
|
26589
|
+
if (control) {
|
|
26590
|
+
control.setErrors(null);
|
|
26591
|
+
control.clearValidators();
|
|
26592
|
+
control.updateValueAndValidity();
|
|
26593
|
+
let validationRules = [];
|
|
26594
|
+
validationRules.push(Validators.min(min));
|
|
26595
|
+
validationRules.push(Validators.max(max));
|
|
26596
|
+
validationRules.push(Validators.required);
|
|
26597
|
+
control.addValidators(validationRules);
|
|
26598
|
+
control.updateValueAndValidity();
|
|
26599
|
+
}
|
|
26600
|
+
}
|
|
26446
26601
|
changeDataType(key) {
|
|
26447
26602
|
this.updateFormStatus(key);
|
|
26448
26603
|
switch (key) {
|
|
26449
26604
|
case SurveyOptionType.Text:
|
|
26605
|
+
this.updateLengthValidator(this.addMaxLength.Name, 255, 1);
|
|
26606
|
+
this.updateLengthValidator(this.addMinLength.Name, 255, 1);
|
|
26607
|
+
this.addMaxLength.NumberRange.From = 1;
|
|
26608
|
+
this.addMaxLength.NumberRange.To = 255;
|
|
26609
|
+
this.addMinLength.NumberRange.From = 1;
|
|
26610
|
+
this.addMinLength.NumberRange.To = 255;
|
|
26611
|
+
this.isText = true;
|
|
26612
|
+
this.isNumber = false;
|
|
26613
|
+
this.isFile = false;
|
|
26614
|
+
this.isMultiFile = false;
|
|
26615
|
+
this.isImage = false;
|
|
26616
|
+
this.isSelect = false;
|
|
26617
|
+
break;
|
|
26450
26618
|
case SurveyOptionType.MultilineText:
|
|
26619
|
+
this.updateLengthValidator(this.addMaxLength.Name, 4000, 1);
|
|
26620
|
+
this.updateLengthValidator(this.addMinLength.Name, 4000, 1);
|
|
26621
|
+
this.addMaxLength.NumberRange.From = 1;
|
|
26622
|
+
this.addMaxLength.NumberRange.To = 4000;
|
|
26623
|
+
this.addMinLength.NumberRange.From = 1;
|
|
26624
|
+
this.addMinLength.NumberRange.To = 4000;
|
|
26451
26625
|
this.isText = true;
|
|
26452
26626
|
this.isNumber = false;
|
|
26453
26627
|
this.isFile = false;
|
|
@@ -26456,6 +26630,12 @@ class AddQuestionComponent extends AppBaseComponent {
|
|
|
26456
26630
|
this.isSelect = false;
|
|
26457
26631
|
break;
|
|
26458
26632
|
case SurveyOptionType.Number:
|
|
26633
|
+
this.updateLengthValidator(this.addMaxLength.Name, 100, 1);
|
|
26634
|
+
this.updateLengthValidator(this.addMinLength.Name, 100, 1);
|
|
26635
|
+
this.addMaxLength.NumberRange.From = 1;
|
|
26636
|
+
this.addMaxLength.NumberRange.To = 100;
|
|
26637
|
+
this.addMinLength.NumberRange.From = 1;
|
|
26638
|
+
this.addMinLength.NumberRange.To = 100;
|
|
26459
26639
|
this.isNumber = true;
|
|
26460
26640
|
this.isText = false;
|
|
26461
26641
|
this.isFile = false;
|
|
@@ -26509,7 +26689,7 @@ class AddQuestionComponent extends AppBaseComponent {
|
|
|
26509
26689
|
this.ngWizardService.reset();
|
|
26510
26690
|
}
|
|
26511
26691
|
getLinkedQuestions(option) {
|
|
26512
|
-
return this.Questions.filter(item => option.LinkedQuestions.includes(item.key)).map(item => item.value);
|
|
26692
|
+
return this.Questions.filter((item) => option.LinkedQuestions.includes(item.key)).map((item) => item.value);
|
|
26513
26693
|
}
|
|
26514
26694
|
AddOption() {
|
|
26515
26695
|
this.totalScore = 0;
|
|
@@ -26522,11 +26702,11 @@ class AddQuestionComponent extends AppBaseComponent {
|
|
|
26522
26702
|
for (let index = 0; index < this.optionList.length; index++) {
|
|
26523
26703
|
let element = this.optionList[index].Score;
|
|
26524
26704
|
if (element > 1000000) {
|
|
26525
|
-
this.errorMessage = this.l(
|
|
26705
|
+
this.errorMessage = this.l('MaxOptionScoreErrorMessage');
|
|
26526
26706
|
return;
|
|
26527
26707
|
}
|
|
26528
|
-
if (element <
|
|
26529
|
-
this.errorMessage = this.l(
|
|
26708
|
+
if (element < 1) {
|
|
26709
|
+
this.errorMessage = this.l('MinOptionScoreErrorMessage');
|
|
26530
26710
|
return;
|
|
26531
26711
|
}
|
|
26532
26712
|
}
|
|
@@ -26545,11 +26725,11 @@ class AddQuestionComponent extends AppBaseComponent {
|
|
|
26545
26725
|
if (this.showScoreOption)
|
|
26546
26726
|
option.Score = Number.parseFloat(resultModel.Score);
|
|
26547
26727
|
this.addOptionForm.reset();
|
|
26548
|
-
this.addOptionForm.controls[
|
|
26549
|
-
this.addOptionForm.controls[
|
|
26550
|
-
this.addOptionForm.controls[
|
|
26728
|
+
this.addOptionForm.controls['NameOption'].reset();
|
|
26729
|
+
this.addOptionForm.controls['DisplayOrder'].reset();
|
|
26730
|
+
this.addOptionForm.controls['LinkedQuestions'].reset();
|
|
26551
26731
|
if (this.showScoreOption)
|
|
26552
|
-
this.addOptionForm.controls[
|
|
26732
|
+
this.addOptionForm.controls['Score'].reset();
|
|
26553
26733
|
this.optionList.splice(option.DisplayOrder - 1, 0, option);
|
|
26554
26734
|
this.showOptionList = true;
|
|
26555
26735
|
this.isOptionInEditMode = false;
|
|
@@ -26558,12 +26738,13 @@ class AddQuestionComponent extends AppBaseComponent {
|
|
|
26558
26738
|
return option.DisplayOrder;
|
|
26559
26739
|
}
|
|
26560
26740
|
deleteOption(option) {
|
|
26561
|
-
this.optionList = this.optionList.filter(item => item != option);
|
|
26741
|
+
this.optionList = this.optionList.filter((item) => item != option);
|
|
26562
26742
|
}
|
|
26563
26743
|
editOption(option) {
|
|
26564
26744
|
var _a, _b;
|
|
26565
26745
|
debugger;
|
|
26566
|
-
if ((this.addOptionForm.touched == true && this.addOptionForm.valid) ||
|
|
26746
|
+
if ((this.addOptionForm.touched == true && this.addOptionForm.valid) ||
|
|
26747
|
+
this.addOptionForm.touched == false)
|
|
26567
26748
|
this.AddOption();
|
|
26568
26749
|
else {
|
|
26569
26750
|
this.addOptionForm.markAllAsTouched();
|
|
@@ -26572,26 +26753,35 @@ class AddQuestionComponent extends AppBaseComponent {
|
|
|
26572
26753
|
let name = new EnglishArabicDTO();
|
|
26573
26754
|
name.Arabic = (_a = option.Name.Arabic) !== null && _a !== void 0 ? _a : null;
|
|
26574
26755
|
name.English = (_b = option.Name.English) !== null && _b !== void 0 ? _b : null;
|
|
26575
|
-
this.addOptionForm.controls[
|
|
26576
|
-
this.addOptionForm.controls[
|
|
26577
|
-
this.addOptionForm.controls[
|
|
26756
|
+
this.addOptionForm.controls['NameOption'].setValue(name);
|
|
26757
|
+
this.addOptionForm.controls['DisplayOrder'].setValue(option.DisplayOrder);
|
|
26758
|
+
this.addOptionForm.controls['LinkedQuestions'].setValue(option.LinkedQuestions);
|
|
26578
26759
|
if (this.showScoreOption)
|
|
26579
|
-
this.addOptionForm.controls[
|
|
26580
|
-
this.optionList = this.optionList.filter(item => item != option);
|
|
26760
|
+
this.addOptionForm.controls['Score'].setValue(option.Score);
|
|
26761
|
+
this.optionList = this.optionList.filter((item) => item != option);
|
|
26581
26762
|
this.isOptionInEditMode = true;
|
|
26582
26763
|
}
|
|
26583
26764
|
fromTo(fromField, toField) {
|
|
26584
26765
|
return (formGroup) => {
|
|
26585
26766
|
const fromDate = formGroup.get(fromField);
|
|
26586
26767
|
const toDate = formGroup.get(toField);
|
|
26587
|
-
if (
|
|
26588
|
-
if (
|
|
26768
|
+
if (fromDate !== null && toDate !== null) {
|
|
26769
|
+
if (fromDate.value !== null &&
|
|
26770
|
+
toDate.value !== null &&
|
|
26771
|
+
parseInt(fromDate.value) > parseInt(toDate.value)) {
|
|
26589
26772
|
fromDate.markAsTouched();
|
|
26590
26773
|
toDate.markAsTouched();
|
|
26591
|
-
toDate.setErrors({
|
|
26774
|
+
toDate.setErrors({
|
|
26775
|
+
errorMassage: this.l('GreaterThanOrEqualTo'),
|
|
26776
|
+
});
|
|
26592
26777
|
return null;
|
|
26593
26778
|
}
|
|
26594
|
-
|
|
26779
|
+
if (fromDate.value !== null &&
|
|
26780
|
+
toDate.value !== null &&
|
|
26781
|
+
parseInt(fromDate.value) < parseInt(toDate.value) &&
|
|
26782
|
+
parseInt(toDate.value) < 255 &&
|
|
26783
|
+
parseInt(fromDate.value) < 255)
|
|
26784
|
+
toDate.setErrors(null);
|
|
26595
26785
|
}
|
|
26596
26786
|
return null;
|
|
26597
26787
|
};
|
|
@@ -26712,7 +26902,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImpo
|
|
|
26712
26902
|
type: Component,
|
|
26713
26903
|
args: [{
|
|
26714
26904
|
selector: 'app-add-question',
|
|
26715
|
-
templateUrl: './add-question.component.html'
|
|
26905
|
+
templateUrl: './add-question.component.html',
|
|
26716
26906
|
}]
|
|
26717
26907
|
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: SurveyQuestionService }, { type: i2.NgWizardService }]; }, propDecorators: { AddModal: [{
|
|
26718
26908
|
type: ViewChild,
|
|
@@ -26770,31 +26960,33 @@ class EditQuestionComponent extends AppBaseComponent {
|
|
|
26770
26960
|
this.editSurveyQuestionFormOptions = new FormOptions();
|
|
26771
26961
|
this.editSurveyQuestionFormOptions.FormGroup = this.editModelForm;
|
|
26772
26962
|
this.editSurveyQuestionFormOptions.GetModelFunction = this.getEditModel;
|
|
26773
|
-
this.editSurveyQuestionFormOptions.ServiceSubmitFunction =
|
|
26963
|
+
this.editSurveyQuestionFormOptions.ServiceSubmitFunction =
|
|
26964
|
+
this.getEditFunction;
|
|
26774
26965
|
this.editSurveyQuestionFormOptions.PagingReference = this.pagingElement;
|
|
26775
|
-
this.editSurveyQuestionFormOptions.OnSuccessHandler =
|
|
26966
|
+
this.editSurveyQuestionFormOptions.OnSuccessHandler =
|
|
26967
|
+
this.onSuccessEditHandler;
|
|
26776
26968
|
this.editSurveyQuestionFormOptions.DisableSuccessNotification = true;
|
|
26777
26969
|
let text = new EnglishArabicDTO();
|
|
26778
26970
|
text.Arabic = this.question.text.arabic;
|
|
26779
26971
|
text.English = this.question.text.english;
|
|
26780
26972
|
this.editQuestion = new MultiLingualTextBoxOptions();
|
|
26781
|
-
this.editQuestion.Name =
|
|
26782
|
-
this.editQuestion.ArabicLabelKey =
|
|
26783
|
-
this.editQuestion.EnglishLabelKey =
|
|
26973
|
+
this.editQuestion.Name = 'Text';
|
|
26974
|
+
this.editQuestion.ArabicLabelKey = 'QuestionInArabic';
|
|
26975
|
+
this.editQuestion.EnglishLabelKey = 'QuestionInEnglish';
|
|
26784
26976
|
this.editQuestion.IsRequired = true;
|
|
26785
26977
|
this.editQuestion.MaxLength = 4000;
|
|
26786
26978
|
this.editQuestion.LanguageMode = this.getLanguageModeValue();
|
|
26787
26979
|
this.editQuestion.Value = text;
|
|
26788
26980
|
this.editQuestion.IsDisabled = isViewOnly;
|
|
26789
26981
|
this.editDescription = new MultiLingualTextAreaOptions();
|
|
26790
|
-
this.editDescription.Name =
|
|
26791
|
-
this.editDescription.ArabicLabelKey =
|
|
26792
|
-
this.editDescription.EnglishLabelKey =
|
|
26982
|
+
this.editDescription.Name = 'Description';
|
|
26983
|
+
this.editDescription.ArabicLabelKey = 'DescriptionInArabic';
|
|
26984
|
+
this.editDescription.EnglishLabelKey = 'DescriptionInEnglish';
|
|
26793
26985
|
this.editDescription.IsRequired = false;
|
|
26794
26986
|
this.editDescription.MaxLength = 250;
|
|
26795
26987
|
this.editDescription.Rows = 2;
|
|
26796
|
-
this.editDescription.ArabicLabelDescription = this.l(
|
|
26797
|
-
this.editDescription.EnglishLabelDescription = this.l(
|
|
26988
|
+
this.editDescription.ArabicLabelDescription = this.l('QuestionDescriptionHintArabic');
|
|
26989
|
+
this.editDescription.EnglishLabelDescription = this.l('QuestionDescriptionHintEnglish');
|
|
26798
26990
|
this.editDescription.IsDisabled = isViewOnly;
|
|
26799
26991
|
this.editDescription.LanguageMode = this.getLanguageModeValue();
|
|
26800
26992
|
let description = new EnglishArabicDTO();
|
|
@@ -26802,59 +26994,59 @@ class EditQuestionComponent extends AppBaseComponent {
|
|
|
26802
26994
|
description.English = this.question.description.english;
|
|
26803
26995
|
this.editDescription.Value = description;
|
|
26804
26996
|
this.editQuestionType = new DropdownOptions();
|
|
26805
|
-
this.editQuestionType.Name =
|
|
26806
|
-
this.editQuestionType.LabelKey =
|
|
26997
|
+
this.editQuestionType.Name = 'QuestionTypeItemID';
|
|
26998
|
+
this.editQuestionType.LabelKey = 'PropertyType';
|
|
26807
26999
|
this.editQuestionType.IsRequired = true;
|
|
26808
27000
|
this.editQuestionType.AllowSearchFilter = true;
|
|
26809
27001
|
this.editQuestionType.DataSource = result.optionTypes;
|
|
26810
27002
|
this.editQuestionType.SingleSelection = true;
|
|
26811
27003
|
this.editQuestionType.SelectedItems = this.question.questionTypeItemID;
|
|
26812
|
-
this.editQuestionType.NotFoundText = this.l(
|
|
27004
|
+
this.editQuestionType.NotFoundText = this.l('NoResultFound');
|
|
26813
27005
|
this.editQuestionType.IsDisabled = true;
|
|
26814
27006
|
this.audience = new DropdownOptions();
|
|
26815
|
-
this.audience.Name =
|
|
26816
|
-
this.audience.LabelKey =
|
|
27007
|
+
this.audience.Name = 'AudienceItemID';
|
|
27008
|
+
this.audience.LabelKey = 'Audience';
|
|
26817
27009
|
this.audience.IsRequired = true;
|
|
26818
27010
|
this.audience.ViewType = ControlLayout.Vertical;
|
|
26819
27011
|
this.audience.SingleSelection = true;
|
|
26820
27012
|
this.audience.ShowCheckbox = false;
|
|
26821
27013
|
this.audience.DataSource = result.audiences;
|
|
26822
27014
|
this.audience.SelectedItems = this.question.audienceItemID;
|
|
26823
|
-
this.audience.LabelDescription = this.l(
|
|
27015
|
+
this.audience.LabelDescription = this.l('AudienceDescriptionHint');
|
|
26824
27016
|
this.audience.IsDisabled = isViewOnly;
|
|
26825
27017
|
this.editSize = new DropdownOptions();
|
|
26826
|
-
this.editSize.Name =
|
|
26827
|
-
this.editSize.LabelKey =
|
|
27018
|
+
this.editSize.Name = 'Size';
|
|
27019
|
+
this.editSize.LabelKey = 'Size';
|
|
26828
27020
|
this.editSize.IsRequired = true;
|
|
26829
27021
|
this.editSize.AllowSearchFilter = true;
|
|
26830
27022
|
this.editSize.DataSource = this.SizeList;
|
|
26831
27023
|
this.editSize.SingleSelection = true;
|
|
26832
27024
|
this.editSize.SelectedItems = this.question.options.size;
|
|
26833
|
-
this.editSize.NotFoundText = this.l(
|
|
27025
|
+
this.editSize.NotFoundText = this.l('NoResultFound');
|
|
26834
27026
|
this.editSize.IsDisabled = isViewOnly;
|
|
26835
27027
|
this.editRequired = new ToggleSlideOptions();
|
|
26836
|
-
this.editRequired.Name =
|
|
26837
|
-
this.editRequired.LabelKey =
|
|
27028
|
+
this.editRequired.Name = 'IsRequired';
|
|
27029
|
+
this.editRequired.LabelKey = 'IsRequired';
|
|
26838
27030
|
this.editRequired.Value = this.question.isRequired;
|
|
26839
|
-
this.editRequired.LabelDescription = this.l(
|
|
27031
|
+
this.editRequired.LabelDescription = this.l('RequiredDescriptionHint');
|
|
26840
27032
|
this.editRequired.IsDisabled = isViewOnly;
|
|
26841
27033
|
this.editAllowScore = new ToggleSlideOptions();
|
|
26842
|
-
this.editAllowScore.Name =
|
|
26843
|
-
this.editAllowScore.LabelKey =
|
|
27034
|
+
this.editAllowScore.Name = 'IsAllowScoring';
|
|
27035
|
+
this.editAllowScore.LabelKey = 'AllowScore';
|
|
26844
27036
|
this.editAllowScore.Value = this.question.isAllowScoring;
|
|
26845
|
-
this.editAllowScore.LabelDescription = this.l(
|
|
26846
|
-
this.editAllowScore.LabelDescription = this.l(
|
|
27037
|
+
this.editAllowScore.LabelDescription = this.l('AllowScoreDescription');
|
|
27038
|
+
this.editAllowScore.LabelDescription = this.l('AllowScoreDescription');
|
|
26847
27039
|
this.editAllowScore.IsDisabled = isViewOnly;
|
|
26848
27040
|
this.editHasSearch = new ToggleSlideOptions();
|
|
26849
|
-
this.editHasSearch.Name =
|
|
26850
|
-
this.editHasSearch.LabelKey =
|
|
27041
|
+
this.editHasSearch.Name = 'HasSearch';
|
|
27042
|
+
this.editHasSearch.LabelKey = 'HasSearch';
|
|
26851
27043
|
this.editHasSearch.IsDisabled = isViewOnly;
|
|
26852
27044
|
this.editIsActive = new ToggleSlideOptions();
|
|
26853
|
-
this.editIsActive.Name =
|
|
26854
|
-
this.editIsActive.LabelKey =
|
|
27045
|
+
this.editIsActive.Name = 'IsVisible';
|
|
27046
|
+
this.editIsActive.LabelKey = 'Visible';
|
|
26855
27047
|
this.editIsActive.Value = true;
|
|
26856
27048
|
this.editIsActive.Value = this.question.isVisible;
|
|
26857
|
-
this.editIsActive.LabelDescription = this.l(
|
|
27049
|
+
this.editIsActive.LabelDescription = this.l('VisibleDescriptionHint');
|
|
26858
27050
|
this.editIsActive.IsDisabled = isViewOnly;
|
|
26859
27051
|
// this.editDisplayOrder = new TextBoxOptions();
|
|
26860
27052
|
// this.editDisplayOrder.Name = "DisplayOrder";
|
|
@@ -26866,28 +27058,26 @@ class EditQuestionComponent extends AppBaseComponent {
|
|
|
26866
27058
|
// this.editDisplayOrder.Value = this.question.displayOrder;
|
|
26867
27059
|
// this.editDisplayOrder.CustomValidation = [this.numberValidation];
|
|
26868
27060
|
this.editMaxLength = new TextBoxOptions();
|
|
26869
|
-
this.editMaxLength.Name =
|
|
26870
|
-
this.editMaxLength.LabelKey =
|
|
27061
|
+
this.editMaxLength.Name = 'MaxLength';
|
|
27062
|
+
this.editMaxLength.LabelKey = 'MaxLength';
|
|
26871
27063
|
this.editMaxLength.IsRequired = true;
|
|
26872
27064
|
this.editMaxLength.NumberRange = new RangeNumber();
|
|
26873
|
-
this.editMaxLength.NumberRange.From = 1;
|
|
26874
|
-
this.editMaxLength.NumberRange.To = 4000;
|
|
26875
27065
|
this.editMaxLength.Type = InputType.Number;
|
|
26876
27066
|
this.editMaxLength.Value = this.question.options.maxLength;
|
|
26877
27067
|
this.editMaxLength.IsDisabled = isViewOnly;
|
|
27068
|
+
this.editMaxLength.LabelDescription = this.l('MaxHint');
|
|
26878
27069
|
this.editMinLength = new TextBoxOptions();
|
|
26879
|
-
this.editMinLength.Name =
|
|
26880
|
-
this.editMinLength.LabelKey =
|
|
27070
|
+
this.editMinLength.Name = 'MinLength';
|
|
27071
|
+
this.editMinLength.LabelKey = 'MinLength';
|
|
26881
27072
|
this.editMinLength.IsRequired = true;
|
|
26882
27073
|
this.editMinLength.NumberRange = new RangeNumber();
|
|
26883
|
-
this.editMinLength.NumberRange.From = 1;
|
|
26884
|
-
this.editMinLength.NumberRange.To = 4000;
|
|
26885
27074
|
this.editMinLength.Type = InputType.Number;
|
|
26886
27075
|
this.editMinLength.Value = this.question.options.minLength;
|
|
26887
27076
|
this.editMinLength.IsDisabled = isViewOnly;
|
|
27077
|
+
this.editMinLength.LabelDescription = this.l('MinHint');
|
|
26888
27078
|
this.editRowsNumber = new TextBoxOptions();
|
|
26889
|
-
this.editRowsNumber.Name =
|
|
26890
|
-
this.editRowsNumber.LabelKey =
|
|
27079
|
+
this.editRowsNumber.Name = 'Rows';
|
|
27080
|
+
this.editRowsNumber.LabelKey = 'Rows';
|
|
26891
27081
|
this.editRowsNumber.IsRequired = true;
|
|
26892
27082
|
this.editRowsNumber.NumberRange = new RangeNumber();
|
|
26893
27083
|
this.editRowsNumber.NumberRange.From = 1;
|
|
@@ -26896,8 +27086,8 @@ class EditQuestionComponent extends AppBaseComponent {
|
|
|
26896
27086
|
this.editRowsNumber.Value = this.question.options.rows;
|
|
26897
27087
|
this.editRowsNumber.IsDisabled = isViewOnly;
|
|
26898
27088
|
this.editMaxFileSize = new TextBoxOptions();
|
|
26899
|
-
this.editMaxFileSize.Name =
|
|
26900
|
-
this.editMaxFileSize.LabelKey =
|
|
27089
|
+
this.editMaxFileSize.Name = 'MaxFileSizeInMB';
|
|
27090
|
+
this.editMaxFileSize.LabelKey = 'MaxFileSizeInMB';
|
|
26901
27091
|
this.editMaxFileSize.IsRequired = true;
|
|
26902
27092
|
this.editMaxFileSize.NumberRange = new RangeNumber();
|
|
26903
27093
|
this.editMaxFileSize.NumberRange.From = 1;
|
|
@@ -26906,63 +27096,72 @@ class EditQuestionComponent extends AppBaseComponent {
|
|
|
26906
27096
|
this.editMaxFileSize.Value = this.question.options.maxFileSizeInMB;
|
|
26907
27097
|
this.editMaxFileSize.IsDisabled = isViewOnly;
|
|
26908
27098
|
this.editMaxFileCount = new TextBoxOptions();
|
|
26909
|
-
this.editMaxFileCount.Name =
|
|
26910
|
-
this.editMaxFileCount.LabelKey =
|
|
27099
|
+
this.editMaxFileCount.Name = 'MaxFileCount';
|
|
27100
|
+
this.editMaxFileCount.LabelKey = 'MaxFilesCount';
|
|
26911
27101
|
this.editMaxFileCount.IsRequired = true;
|
|
26912
27102
|
this.editMaxFileCount.NumberRange = new RangeNumber();
|
|
26913
27103
|
this.editMaxFileCount.NumberRange.From = 1;
|
|
26914
27104
|
this.editMaxFileCount.NumberRange.To = 50;
|
|
26915
27105
|
this.editMaxFileCount.Type = InputType.Number;
|
|
27106
|
+
this.editMaxFileCount.LabelDescription = this.l('MaxFileCountHint');
|
|
26916
27107
|
this.editMaxFileCount.Value = this.question.options.maxFileCount;
|
|
26917
27108
|
this.editMaxFileCount.CustomValidation = [this.numberValidation];
|
|
26918
27109
|
this.editMaxFileCount.IsDisabled = isViewOnly;
|
|
26919
|
-
let FilesExtensionResult = this.question.options
|
|
26920
|
-
|
|
27110
|
+
let FilesExtensionResult = this.question.options
|
|
27111
|
+
.allowedExtensions;
|
|
27112
|
+
let FilesExtensions = FilesExtensionResult
|
|
27113
|
+
? result.extensions
|
|
27114
|
+
.filter((item) => {
|
|
27115
|
+
return FilesExtensionResult.includes(item.key);
|
|
27116
|
+
})
|
|
27117
|
+
.map((item) => item.key)
|
|
27118
|
+
: [];
|
|
26921
27119
|
this.editFilesExtensions = new DropdownOptions();
|
|
26922
|
-
this.editFilesExtensions.Name =
|
|
26923
|
-
this.editFilesExtensions.LabelKey =
|
|
27120
|
+
this.editFilesExtensions.Name = 'AllowedExtensions';
|
|
27121
|
+
this.editFilesExtensions.LabelKey = 'Extensions';
|
|
26924
27122
|
this.editFilesExtensions.IsRequired = true;
|
|
26925
27123
|
this.editFilesExtensions.AllowSearchFilter = true;
|
|
26926
27124
|
this.editFilesExtensions.DataSource = result.extensions;
|
|
26927
27125
|
this.editFilesExtensions.SingleSelection = false;
|
|
26928
27126
|
this.editFilesExtensions.SelectedItems = FilesExtensions;
|
|
26929
|
-
this.editFilesExtensions.
|
|
27127
|
+
this.editFilesExtensions.LabelDescription = this.l('ExtensionHint');
|
|
27128
|
+
this.editFilesExtensions.NotFoundText = this.l('NoResultFound');
|
|
26930
27129
|
this.editFilesExtensions.IsDisabled = isViewOnly;
|
|
26931
|
-
|
|
27130
|
+
this.editModelForm.addValidators(this.fromTo("MinLength", "MaxLength"));
|
|
26932
27131
|
this.changeDataType(this.question.questionTypeItemID);
|
|
26933
27132
|
this.changeScoring(this.question.isAllowScoring);
|
|
26934
27133
|
this.editOptionId = new TextBoxOptions();
|
|
26935
|
-
this.editOptionId.Name =
|
|
27134
|
+
this.editOptionId.Name = 'Id';
|
|
26936
27135
|
this.editOptionId.HideLabel = true;
|
|
26937
27136
|
this.editOptionId.Type = InputType.Text;
|
|
26938
27137
|
this.editNameOption = new MultiLingualTextBoxOptions();
|
|
26939
|
-
this.editNameOption.Name =
|
|
26940
|
-
this.editNameOption.ArabicLabelKey =
|
|
26941
|
-
this.editNameOption.EnglishLabelKey =
|
|
27138
|
+
this.editNameOption.Name = 'NameOption';
|
|
27139
|
+
this.editNameOption.ArabicLabelKey = 'NameInArabic';
|
|
27140
|
+
this.editNameOption.EnglishLabelKey = 'NameInEnglish';
|
|
26942
27141
|
this.editNameOption.IsRequired = true;
|
|
26943
27142
|
this.editNameOption.MaxLength = 225;
|
|
26944
27143
|
this.editNameOption.LanguageMode = this.getLanguageModeValue();
|
|
26945
27144
|
this.scoreNumber = new TextBoxOptions();
|
|
26946
|
-
this.scoreNumber.Name =
|
|
26947
|
-
this.scoreNumber.LabelKey =
|
|
27145
|
+
this.scoreNumber.Name = 'Score';
|
|
27146
|
+
this.scoreNumber.LabelKey = 'Score';
|
|
26948
27147
|
this.scoreNumber.IsRequired = true;
|
|
26949
27148
|
this.scoreNumber.Type = InputType.Number;
|
|
26950
27149
|
let rangeNumber = new RangeNumber();
|
|
26951
27150
|
rangeNumber.To = 1000000;
|
|
26952
|
-
rangeNumber.From =
|
|
27151
|
+
rangeNumber.From = 1;
|
|
26953
27152
|
this.scoreNumber.NumberRange = rangeNumber;
|
|
26954
27153
|
this.displayOrderOption = new TextBoxOptions();
|
|
26955
|
-
this.displayOrderOption.Name =
|
|
27154
|
+
this.displayOrderOption.Name = 'DisplayOrder';
|
|
26956
27155
|
this.idOption = new TextBoxOptions();
|
|
26957
|
-
this.idOption.Name =
|
|
27156
|
+
this.idOption.Name = 'IdOption';
|
|
26958
27157
|
this.editOptionLinkedQuestions = new DropdownOptions();
|
|
26959
|
-
this.editOptionLinkedQuestions.Name =
|
|
26960
|
-
this.editOptionLinkedQuestions.LabelKey =
|
|
27158
|
+
this.editOptionLinkedQuestions.Name = 'LinkedQuestions';
|
|
27159
|
+
this.editOptionLinkedQuestions.LabelKey = 'LinkedQuestions';
|
|
26961
27160
|
this.editOptionLinkedQuestions.AllowSearchFilter = true;
|
|
26962
27161
|
this.editOptionLinkedQuestions.DataSource = result.questions;
|
|
26963
27162
|
this.editOptionLinkedQuestions.SingleSelection = false;
|
|
26964
|
-
this.editOptionLinkedQuestions.NotFoundText = this.l(
|
|
26965
|
-
this.editOptionLinkedQuestions.LabelDescription = this.l(
|
|
27163
|
+
this.editOptionLinkedQuestions.NotFoundText = this.l('NoResultFound');
|
|
27164
|
+
this.editOptionLinkedQuestions.LabelDescription = this.l('LinkedQuestionDescriptionHint');
|
|
26966
27165
|
if (this.question.questionOptions.length > 0) {
|
|
26967
27166
|
for (let index = 0; index < this.question.questionOptions.length; index++) {
|
|
26968
27167
|
const element = this.question.questionOptions[index];
|
|
@@ -26978,12 +27177,16 @@ class EditQuestionComponent extends AppBaseComponent {
|
|
|
26978
27177
|
let resultOptionModel = this.editOptionForm.value;
|
|
26979
27178
|
let resultModel = this.editModelForm.value;
|
|
26980
27179
|
if (this.isSelect) {
|
|
26981
|
-
if ((resultOptionModel.NameOption.Arabic != undefined &&
|
|
26982
|
-
|
|
27180
|
+
if ((resultOptionModel.NameOption.Arabic != undefined &&
|
|
27181
|
+
resultOptionModel.NameOption.Arabic != '') ||
|
|
27182
|
+
(resultOptionModel.NameOption.English != undefined &&
|
|
27183
|
+
resultOptionModel.NameOption.English != '') ||
|
|
27184
|
+
(resultOptionModel.Score != undefined && resultOptionModel.Score > 0)) {
|
|
27185
|
+
this.errorMessage = this.l('OptionPendingDataErrorMessage');
|
|
26983
27186
|
return;
|
|
26984
27187
|
}
|
|
26985
27188
|
if (this.optionList.length == 0 && this.isSelect) {
|
|
26986
|
-
this.errorMessage = this.l(
|
|
27189
|
+
this.errorMessage = this.l('OptionErrorMessage');
|
|
26987
27190
|
return;
|
|
26988
27191
|
}
|
|
26989
27192
|
}
|
|
@@ -27043,12 +27246,12 @@ class EditQuestionComponent extends AppBaseComponent {
|
|
|
27043
27246
|
return null;
|
|
27044
27247
|
}
|
|
27045
27248
|
if (!control.value.toString().match(/^[0-9]*$/)) {
|
|
27046
|
-
this.numberValidation.massage = this.l(
|
|
27047
|
-
return {
|
|
27249
|
+
this.numberValidation.massage = this.l('IntegerNumberValidationKey');
|
|
27250
|
+
return { customerError: true };
|
|
27048
27251
|
}
|
|
27049
27252
|
if (!control.value.toString().match(/^[+]?([.]\d+|\d+[.]?\d*)$/)) {
|
|
27050
|
-
this.numberValidation.massage = this.l(
|
|
27051
|
-
return {
|
|
27253
|
+
this.numberValidation.massage = this.l('PositiveNumberValidationKey');
|
|
27254
|
+
return { customerError: true };
|
|
27052
27255
|
}
|
|
27053
27256
|
return null;
|
|
27054
27257
|
};
|
|
@@ -27061,11 +27264,44 @@ class EditQuestionComponent extends AppBaseComponent {
|
|
|
27061
27264
|
this.editOptionForm.controls['Score'].updateValueAndValidity();
|
|
27062
27265
|
}
|
|
27063
27266
|
}
|
|
27267
|
+
updateLengthValidator(name, max, min) {
|
|
27268
|
+
let control = this.editOptionForm.controls[name];
|
|
27269
|
+
if (control) {
|
|
27270
|
+
control.setErrors(null);
|
|
27271
|
+
control.clearValidators();
|
|
27272
|
+
control.updateValueAndValidity();
|
|
27273
|
+
let validationRules = [];
|
|
27274
|
+
validationRules.push(Validators.min(min));
|
|
27275
|
+
validationRules.push(Validators.max(max));
|
|
27276
|
+
validationRules.push(Validators.required);
|
|
27277
|
+
control.addValidators(validationRules);
|
|
27278
|
+
control.updateValueAndValidity();
|
|
27279
|
+
}
|
|
27280
|
+
}
|
|
27064
27281
|
changeDataType(key) {
|
|
27065
27282
|
this.updateFormStatus(key);
|
|
27066
27283
|
switch (key) {
|
|
27067
27284
|
case SurveyOptionType.Text:
|
|
27285
|
+
this.updateLengthValidator(this.editMaxLength.Name, 255, 1);
|
|
27286
|
+
this.updateLengthValidator(this.editMinLength.Name, 255, 1);
|
|
27287
|
+
this.editMaxLength.NumberRange.From = 1;
|
|
27288
|
+
this.editMaxLength.NumberRange.To = 255;
|
|
27289
|
+
this.editMinLength.NumberRange.From = 1;
|
|
27290
|
+
this.editMinLength.NumberRange.To = 255;
|
|
27291
|
+
this.isText = true;
|
|
27292
|
+
this.isNumber = false;
|
|
27293
|
+
this.isFile = false;
|
|
27294
|
+
this.isMultiFile = false;
|
|
27295
|
+
this.isImage = false;
|
|
27296
|
+
this.isSelect = false;
|
|
27297
|
+
break;
|
|
27068
27298
|
case SurveyOptionType.MultilineText:
|
|
27299
|
+
this.updateLengthValidator(this.editMaxLength.Name, 4000, 1);
|
|
27300
|
+
this.updateLengthValidator(this.editMinLength.Name, 4000, 1);
|
|
27301
|
+
this.editMaxLength.NumberRange.From = 1;
|
|
27302
|
+
this.editMaxLength.NumberRange.To = 4000;
|
|
27303
|
+
this.editMinLength.NumberRange.From = 1;
|
|
27304
|
+
this.editMinLength.NumberRange.To = 4000;
|
|
27069
27305
|
this.isText = true;
|
|
27070
27306
|
this.isNumber = false;
|
|
27071
27307
|
this.isFile = false;
|
|
@@ -27074,6 +27310,12 @@ class EditQuestionComponent extends AppBaseComponent {
|
|
|
27074
27310
|
this.isSelect = false;
|
|
27075
27311
|
break;
|
|
27076
27312
|
case SurveyOptionType.Number:
|
|
27313
|
+
this.updateLengthValidator(this.editMaxLength.Name, 100, 1);
|
|
27314
|
+
this.updateLengthValidator(this.editMinLength.Name, 100, 1);
|
|
27315
|
+
this.editMaxLength.NumberRange.From = 1;
|
|
27316
|
+
this.editMaxLength.NumberRange.To = 100;
|
|
27317
|
+
this.editMinLength.NumberRange.From = 1;
|
|
27318
|
+
this.editMinLength.NumberRange.To = 100;
|
|
27077
27319
|
this.isNumber = true;
|
|
27078
27320
|
this.isText = false;
|
|
27079
27321
|
this.isFile = false;
|
|
@@ -27129,7 +27371,7 @@ class EditQuestionComponent extends AppBaseComponent {
|
|
|
27129
27371
|
this.isEditFormChange = value;
|
|
27130
27372
|
}
|
|
27131
27373
|
getLinkedQuestions(option) {
|
|
27132
|
-
return this.Questions.filter(item => option.LinkedQuestions.includes(item.key)).map(item => item.value);
|
|
27374
|
+
return this.Questions.filter((item) => option.LinkedQuestions.includes(item.key)).map((item) => item.value);
|
|
27133
27375
|
}
|
|
27134
27376
|
addOption() {
|
|
27135
27377
|
this.totalScore = 0;
|
|
@@ -27142,11 +27384,11 @@ class EditQuestionComponent extends AppBaseComponent {
|
|
|
27142
27384
|
for (let index = 0; index < this.optionList.length; index++) {
|
|
27143
27385
|
let element = this.optionList[index].Score;
|
|
27144
27386
|
if (element > 1000000) {
|
|
27145
|
-
this.errorMessage = this.l(
|
|
27387
|
+
this.errorMessage = this.l('MaxOptionScoreErrorMessage');
|
|
27146
27388
|
return;
|
|
27147
27389
|
}
|
|
27148
|
-
if (element <
|
|
27149
|
-
this.errorMessage = this.l(
|
|
27390
|
+
if (element < 1) {
|
|
27391
|
+
this.errorMessage = this.l('MinOptionScoreErrorMessage');
|
|
27150
27392
|
return;
|
|
27151
27393
|
}
|
|
27152
27394
|
}
|
|
@@ -27165,24 +27407,25 @@ class EditQuestionComponent extends AppBaseComponent {
|
|
|
27165
27407
|
if (this.showScoreOption)
|
|
27166
27408
|
option.Score = Number.parseFloat(resultModel.Score);
|
|
27167
27409
|
this.editOptionForm.reset();
|
|
27168
|
-
this.editOptionForm.controls[
|
|
27169
|
-
this.editOptionForm.controls[
|
|
27170
|
-
this.editOptionForm.controls[
|
|
27171
|
-
this.editOptionForm.controls[
|
|
27410
|
+
this.editOptionForm.controls['NameOption'].reset();
|
|
27411
|
+
this.editOptionForm.controls['IdOption'].reset();
|
|
27412
|
+
this.editOptionForm.controls['DisplayOrder'].reset();
|
|
27413
|
+
this.editOptionForm.controls['LinkedQuestions'].reset();
|
|
27172
27414
|
if (this.showScoreOption)
|
|
27173
|
-
this.editOptionForm.controls[
|
|
27415
|
+
this.editOptionForm.controls['Score'].reset();
|
|
27174
27416
|
this.optionList.splice(option.DisplayOrder - 1, 0, option);
|
|
27175
27417
|
this.isEditFormChange = true;
|
|
27176
27418
|
this.isOptionInEditMode = false;
|
|
27177
27419
|
}
|
|
27178
27420
|
deleteOption(option) {
|
|
27179
|
-
this.optionList = this.optionList.filter(item => item != option);
|
|
27421
|
+
this.optionList = this.optionList.filter((item) => item != option);
|
|
27180
27422
|
this.isEditFormChange = true;
|
|
27181
27423
|
}
|
|
27182
27424
|
editOption(option) {
|
|
27183
27425
|
var _a, _b;
|
|
27184
27426
|
debugger;
|
|
27185
|
-
if ((this.editOptionForm.touched == true && this.editOptionForm.valid) ||
|
|
27427
|
+
if ((this.editOptionForm.touched == true && this.editOptionForm.valid) ||
|
|
27428
|
+
this.editOptionForm.touched == false)
|
|
27186
27429
|
this.addOption();
|
|
27187
27430
|
else {
|
|
27188
27431
|
this.editOptionForm.markAllAsTouched();
|
|
@@ -27191,13 +27434,13 @@ class EditQuestionComponent extends AppBaseComponent {
|
|
|
27191
27434
|
let name = new EnglishArabicDTO();
|
|
27192
27435
|
name.Arabic = (_a = option.Name.Arabic) !== null && _a !== void 0 ? _a : null;
|
|
27193
27436
|
name.English = (_b = option.Name.English) !== null && _b !== void 0 ? _b : null;
|
|
27194
|
-
this.editOptionForm.controls[
|
|
27195
|
-
this.editOptionForm.controls[
|
|
27196
|
-
this.editOptionForm.controls[
|
|
27197
|
-
this.editOptionForm.controls[
|
|
27437
|
+
this.editOptionForm.controls['NameOption'].setValue(name);
|
|
27438
|
+
this.editOptionForm.controls['IdOption'].setValue(option.ID_GUID);
|
|
27439
|
+
this.editOptionForm.controls['DisplayOrder'].setValue(option.DisplayOrder);
|
|
27440
|
+
this.editOptionForm.controls['LinkedQuestions'].setValue(option.LinkedQuestions);
|
|
27198
27441
|
if (this.showScoreOption)
|
|
27199
|
-
this.editOptionForm.controls[
|
|
27200
|
-
this.optionList = this.optionList.filter(item => item != option);
|
|
27442
|
+
this.editOptionForm.controls['Score'].setValue(option.Score);
|
|
27443
|
+
this.optionList = this.optionList.filter((item) => item != option);
|
|
27201
27444
|
this.isEditFormChange = true;
|
|
27202
27445
|
this.isOptionInEditMode = true;
|
|
27203
27446
|
}
|
|
@@ -27205,14 +27448,23 @@ class EditQuestionComponent extends AppBaseComponent {
|
|
|
27205
27448
|
return (formGroup) => {
|
|
27206
27449
|
const fromDate = formGroup.get(fromField);
|
|
27207
27450
|
const toDate = formGroup.get(toField);
|
|
27208
|
-
if (
|
|
27209
|
-
if (
|
|
27451
|
+
if (fromDate !== null && toDate !== null) {
|
|
27452
|
+
if (fromDate.value !== null &&
|
|
27453
|
+
toDate.value !== null &&
|
|
27454
|
+
parseInt(fromDate.value) > parseInt(toDate.value)) {
|
|
27210
27455
|
fromDate.markAsTouched();
|
|
27211
27456
|
toDate.markAsTouched();
|
|
27212
|
-
toDate.setErrors({
|
|
27457
|
+
toDate.setErrors({
|
|
27458
|
+
errorMassage: this.l('GreaterThanOrEqualTo'),
|
|
27459
|
+
});
|
|
27213
27460
|
return null;
|
|
27214
27461
|
}
|
|
27215
|
-
|
|
27462
|
+
if (fromDate.value !== null &&
|
|
27463
|
+
toDate.value !== null &&
|
|
27464
|
+
parseInt(fromDate.value) < parseInt(toDate.value) &&
|
|
27465
|
+
parseInt(toDate.value) < 255 &&
|
|
27466
|
+
parseInt(fromDate.value) < 255)
|
|
27467
|
+
toDate.setErrors(null);
|
|
27216
27468
|
}
|
|
27217
27469
|
return null;
|
|
27218
27470
|
};
|
|
@@ -27323,7 +27575,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImpo
|
|
|
27323
27575
|
type: Component,
|
|
27324
27576
|
args: [{
|
|
27325
27577
|
selector: 'app-edit-question',
|
|
27326
|
-
templateUrl: './edit-question.component.html'
|
|
27578
|
+
templateUrl: './edit-question.component.html',
|
|
27327
27579
|
}]
|
|
27328
27580
|
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: SurveyQuestionService }]; }, propDecorators: { EditModal: [{
|
|
27329
27581
|
type: ViewChild,
|
|
@@ -27858,6 +28110,7 @@ class SurveyInfoComponent extends AppBaseComponent {
|
|
|
27858
28110
|
let yAxis = chart.yAxes.push(am5xy.ValueAxis.new(root, {
|
|
27859
28111
|
baseValue: 0,
|
|
27860
28112
|
maxPrecision: 0,
|
|
28113
|
+
min: 0,
|
|
27861
28114
|
extraTooltipPrecision: 100,
|
|
27862
28115
|
renderer: am5xy.AxisRendererY.new(root, {})
|
|
27863
28116
|
}));
|
|
@@ -27912,7 +28165,7 @@ class SurveyInfoComponent extends AppBaseComponent {
|
|
|
27912
28165
|
if (Object.prototype.hasOwnProperty.call(item.results, key)) {
|
|
27913
28166
|
const value = item.results[key];
|
|
27914
28167
|
let object = {
|
|
27915
|
-
category: "
|
|
28168
|
+
category: "<=" + key,
|
|
27916
28169
|
value: value
|
|
27917
28170
|
};
|
|
27918
28171
|
data.push(object);
|
|
@@ -27922,6 +28175,7 @@ class SurveyInfoComponent extends AppBaseComponent {
|
|
|
27922
28175
|
let yAxis = chart.yAxes.push(am5xy.ValueAxis.new(root, {
|
|
27923
28176
|
baseValue: 0,
|
|
27924
28177
|
maxPrecision: 0,
|
|
28178
|
+
min: 0,
|
|
27925
28179
|
extraTooltipPrecision: 100,
|
|
27926
28180
|
renderer: am5xy.AxisRendererY.new(root, {})
|
|
27927
28181
|
}));
|
|
@@ -27996,7 +28250,10 @@ class SurveyInfoComponent extends AppBaseComponent {
|
|
|
27996
28250
|
this.pageHeaderOptions.BreadCrumb.Active = true;
|
|
27997
28251
|
this.pageHeaderOptions.BreadCrumb.BreadCrumbItems = this.breadCrumb;
|
|
27998
28252
|
this.pageHeaderOptions.DropDownActions.Active = true;
|
|
27999
|
-
this.pageHeaderOptions.DropDownActions.DropdownActionItems.push(new DropdownActionItem(this.l("
|
|
28253
|
+
this.pageHeaderOptions.DropDownActions.DropdownActionItems.push(new DropdownActionItem(this.l("Delete"), '/assets/images/Trash.svg', this.showDeleteModal), new DropdownActionItem(this.l("Export"), '/assets/images/export.svg', this.export));
|
|
28254
|
+
if (this.survey.statusItemID.toLocaleLowerCase() == this.SurveyStatusEnum.ScoringTypeEnum_Draft.toLocaleLowerCase()
|
|
28255
|
+
|| this.survey.statusItemID.toLocaleLowerCase() == this.SurveyStatusEnum.ScoringTypeEnum_Upcoming.toLocaleLowerCase())
|
|
28256
|
+
this.pageHeaderOptions.DropDownActions.DropdownActionItems.push(new DropdownActionItem(this.l("Edit"), "/assets/images/Edit.svg", this.showEditModal));
|
|
28000
28257
|
if (this.survey.totalQuestionCount > 0)
|
|
28001
28258
|
this.pageHeaderOptions.DropDownActions.DropdownActionItems.push(new DropdownActionItem(this.l("Preview"), '/assets/images/views.svg', this.previewSurvey));
|
|
28002
28259
|
if (this.survey.statusItemID.toLocaleLowerCase() == this.SurveyStatusEnum.ScoringTypeEnum_Published.toLocaleLowerCase())
|
|
@@ -28548,8 +28805,8 @@ class SurveyComponent extends AppBaseComponent {
|
|
|
28548
28805
|
super(injector);
|
|
28549
28806
|
this.injector = injector;
|
|
28550
28807
|
this.surveyService = surveyService;
|
|
28551
|
-
this.pageTitle =
|
|
28552
|
-
this.subTitle =
|
|
28808
|
+
this.pageTitle = '';
|
|
28809
|
+
this.subTitle = '';
|
|
28553
28810
|
this.surveyForm = new FormGroup({});
|
|
28554
28811
|
this.SurveyStatusEnum = SurveyStatusEnum;
|
|
28555
28812
|
this.pagingResult = [];
|
|
@@ -28566,12 +28823,13 @@ class SurveyComponent extends AppBaseComponent {
|
|
|
28566
28823
|
this.showFilters = !this.showFilters;
|
|
28567
28824
|
this.loading = true;
|
|
28568
28825
|
this.isFiltersDataLoaded = false;
|
|
28569
|
-
this.pageHeaderOptions.FiltersButton.ShowLoadingInFiltersBox =
|
|
28826
|
+
this.pageHeaderOptions.FiltersButton.ShowLoadingInFiltersBox =
|
|
28827
|
+
this.loading;
|
|
28570
28828
|
}
|
|
28571
28829
|
this.flipping = !this.flipping;
|
|
28572
28830
|
};
|
|
28573
28831
|
this.loadFiltersData = () => {
|
|
28574
|
-
this.surveyService.loadFiltersDropdown().subscribe(r => {
|
|
28832
|
+
this.surveyService.loadFiltersDropdown().subscribe((r) => {
|
|
28575
28833
|
let result = r;
|
|
28576
28834
|
this.statusDropdownOptions.DataSource = result.statuses;
|
|
28577
28835
|
this.sortDropdownOptions.DataSource = result.surveySortingTypes;
|
|
@@ -28580,7 +28838,8 @@ class SurveyComponent extends AppBaseComponent {
|
|
|
28580
28838
|
this.showFilters = true;
|
|
28581
28839
|
this.isFiltersDataLoaded = true;
|
|
28582
28840
|
this.loading = false;
|
|
28583
|
-
this.pageHeaderOptions.FiltersButton.ShowLoadingInFiltersBox =
|
|
28841
|
+
this.pageHeaderOptions.FiltersButton.ShowLoadingInFiltersBox =
|
|
28842
|
+
this.loading;
|
|
28584
28843
|
});
|
|
28585
28844
|
};
|
|
28586
28845
|
this.resetFilters = () => {
|
|
@@ -28606,94 +28865,114 @@ class SurveyComponent extends AppBaseComponent {
|
|
|
28606
28865
|
};
|
|
28607
28866
|
}
|
|
28608
28867
|
ngOnInit() {
|
|
28609
|
-
this.pageTitle = this.l(
|
|
28868
|
+
this.pageTitle = this.l('Surveys_Header');
|
|
28610
28869
|
this.updatePageTitle(this.pageTitle);
|
|
28611
28870
|
this.breadCrumb = [];
|
|
28612
28871
|
this.searchTextBoxOptions = new TextBoxOptions();
|
|
28613
|
-
this.searchTextBoxOptions.Name =
|
|
28872
|
+
this.searchTextBoxOptions.Name = 'SearchTextBox';
|
|
28614
28873
|
this.searchTextBoxOptions.Type = InputType.Text;
|
|
28615
|
-
this.searchTextBoxOptions.Placeholder = this.l(
|
|
28616
|
-
this.searchTextBoxOptions.ExtraClasses =
|
|
28874
|
+
this.searchTextBoxOptions.Placeholder = this.l('Search');
|
|
28875
|
+
this.searchTextBoxOptions.ExtraClasses =
|
|
28876
|
+
'form-control form-control-sm form-control-solid search-box';
|
|
28617
28877
|
this.searchTextBoxOptions.HideLabel = true;
|
|
28618
|
-
this.searchTextBoxOptions.Icon =
|
|
28878
|
+
this.searchTextBoxOptions.Icon = '../../../assets/images/search.svg';
|
|
28619
28879
|
this.searchTextFilter = new FilterItem();
|
|
28620
28880
|
this.searchTextFilter.FormControlName = this.searchTextBoxOptions.Name;
|
|
28621
|
-
this.searchTextFilter.ActionParameterName =
|
|
28881
|
+
this.searchTextFilter.ActionParameterName = 'SearchText';
|
|
28622
28882
|
this.searchTextFilter.IsFormControl = true;
|
|
28623
28883
|
this.searchTextFilter.FilterType = FilterType.TextBox;
|
|
28624
28884
|
this.visibleDropdownOptions = new DropdownOptions();
|
|
28625
|
-
this.visibleDropdownOptions.Name =
|
|
28626
|
-
this.visibleDropdownOptions.LabelKey =
|
|
28885
|
+
this.visibleDropdownOptions.Name = 'visibleSurvey';
|
|
28886
|
+
this.visibleDropdownOptions.LabelKey = 'Visibility';
|
|
28627
28887
|
this.visibleDropdownOptions.SingleSelection = true;
|
|
28628
28888
|
this.visiblePanelDropdownFilter = new FilterItem();
|
|
28629
|
-
this.visiblePanelDropdownFilter.FormControlName =
|
|
28630
|
-
|
|
28889
|
+
this.visiblePanelDropdownFilter.FormControlName =
|
|
28890
|
+
this.visibleDropdownOptions.Name;
|
|
28891
|
+
this.visiblePanelDropdownFilter.ActionParameterName = 'ActiveStatus';
|
|
28631
28892
|
this.visiblePanelDropdownFilter.IsFormControl = true;
|
|
28632
28893
|
this.visiblePanelDropdownFilter.FilterType = FilterType.DropdownList;
|
|
28633
28894
|
this.statusDropdownOptions = new DropdownOptions();
|
|
28634
|
-
this.statusDropdownOptions.Name =
|
|
28635
|
-
this.statusDropdownOptions.LabelKey =
|
|
28895
|
+
this.statusDropdownOptions.Name = 'Status';
|
|
28896
|
+
this.statusDropdownOptions.LabelKey = 'Status';
|
|
28636
28897
|
this.statusDropdownOptions.SingleSelection = true;
|
|
28637
|
-
this.statusDropdownOptions.NotFoundText = this.l(
|
|
28898
|
+
this.statusDropdownOptions.NotFoundText = this.l('NoResultFound');
|
|
28638
28899
|
this.statusDropdownFilter = new FilterItem();
|
|
28639
28900
|
this.statusDropdownFilter.FormControlName = this.statusDropdownOptions.Name;
|
|
28640
|
-
this.statusDropdownFilter.ActionParameterName =
|
|
28901
|
+
this.statusDropdownFilter.ActionParameterName = 'SurveyStatus';
|
|
28641
28902
|
this.statusDropdownFilter.IsFormControl = true;
|
|
28642
28903
|
this.statusDropdownFilter.FilterType = FilterType.DropdownList;
|
|
28643
28904
|
this.DatePickerWithRangeMode = new DatePickerOptions();
|
|
28644
|
-
this.DatePickerWithRangeMode.Name =
|
|
28645
|
-
this.DatePickerWithRangeMode.LabelKey =
|
|
28905
|
+
this.DatePickerWithRangeMode.Name = 'DatePickerWithRangeMode';
|
|
28906
|
+
this.DatePickerWithRangeMode.LabelKey = 'Date';
|
|
28646
28907
|
this.DatePickerWithRangeMode.ViewType = ControlLayout.Vertical;
|
|
28647
28908
|
this.DatePickerWithRangeMode.StartView = StartView.Month;
|
|
28648
28909
|
this.DatePickerWithRangeMode.PickerType = PickerType.Calendar;
|
|
28649
28910
|
this.DatePickerWithRangeMode.SelectMode = SelectMode.Range;
|
|
28650
28911
|
this.DatePickerWithRangeFilter = new FilterItem();
|
|
28651
|
-
this.DatePickerWithRangeFilter.FormControlName =
|
|
28652
|
-
|
|
28912
|
+
this.DatePickerWithRangeFilter.FormControlName =
|
|
28913
|
+
this.DatePickerWithRangeMode.Name;
|
|
28914
|
+
this.DatePickerWithRangeFilter.ActionParameterName = 'Date';
|
|
28653
28915
|
this.DatePickerWithRangeFilter.IsFormControl = true;
|
|
28654
28916
|
this.DatePickerWithRangeFilter.FilterType = FilterType.DatePicker;
|
|
28655
28917
|
this.sortDropdownOptions = new DropdownOptions();
|
|
28656
|
-
this.sortDropdownOptions.Name =
|
|
28657
|
-
this.sortDropdownOptions.LabelKey =
|
|
28918
|
+
this.sortDropdownOptions.Name = 'Sort';
|
|
28919
|
+
this.sortDropdownOptions.LabelKey = 'Sort';
|
|
28658
28920
|
this.sortDropdownOptions.SingleSelection = true;
|
|
28659
|
-
this.sortDropdownOptions.NotFoundText = this.l(
|
|
28921
|
+
this.sortDropdownOptions.NotFoundText = this.l('NoResultFound');
|
|
28660
28922
|
this.sortDropdownFilter = new FilterItem();
|
|
28661
28923
|
this.sortDropdownFilter.FormControlName = this.sortDropdownOptions.Name;
|
|
28662
|
-
this.sortDropdownFilter.ActionParameterName =
|
|
28924
|
+
this.sortDropdownFilter.ActionParameterName = 'SortBy';
|
|
28663
28925
|
this.sortDropdownFilter.IsFormControl = true;
|
|
28664
28926
|
this.sortDropdownFilter.FilterType = FilterType.DropdownList;
|
|
28665
28927
|
this.sortTypeDropdownOptions = new DropdownOptions();
|
|
28666
|
-
this.sortTypeDropdownOptions.Name =
|
|
28667
|
-
this.sortTypeDropdownOptions.LabelKey =
|
|
28928
|
+
this.sortTypeDropdownOptions.Name = 'SortType';
|
|
28929
|
+
this.sortTypeDropdownOptions.LabelKey = 'SortType';
|
|
28668
28930
|
this.sortTypeDropdownOptions.SingleSelection = true;
|
|
28669
|
-
this.sortTypeDropdownOptions.NotFoundText = this.l(
|
|
28931
|
+
this.sortTypeDropdownOptions.NotFoundText = this.l('NoResultFound');
|
|
28670
28932
|
this.sortTypeDropdownFilter = new FilterItem();
|
|
28671
|
-
this.sortTypeDropdownFilter.FormControlName =
|
|
28672
|
-
|
|
28933
|
+
this.sortTypeDropdownFilter.FormControlName =
|
|
28934
|
+
this.sortTypeDropdownOptions.Name;
|
|
28935
|
+
this.sortTypeDropdownFilter.ActionParameterName = 'SortType';
|
|
28673
28936
|
this.sortTypeDropdownFilter.IsFormControl = true;
|
|
28674
28937
|
this.sortTypeDropdownFilter.FilterType = FilterType.DropdownList;
|
|
28675
28938
|
this.pageHeaderOptions = new PageHeaderOptions();
|
|
28676
28939
|
this.pageHeaderOptions.TitleKey = this.pageTitle;
|
|
28677
|
-
this.pageHeaderOptions.SubTitleKey = this.l(
|
|
28940
|
+
this.pageHeaderOptions.SubTitleKey = this.l('Survey_SubHeader');
|
|
28678
28941
|
this.pageHeaderOptions.SearchTextBox.Active = true;
|
|
28679
|
-
this.pageHeaderOptions.SearchTextBox.TextSearchBoxOptions =
|
|
28942
|
+
this.pageHeaderOptions.SearchTextBox.TextSearchBoxOptions =
|
|
28943
|
+
this.searchTextBoxOptions;
|
|
28680
28944
|
this.pageHeaderOptions.BreadCrumb.Active = true;
|
|
28681
28945
|
this.pageHeaderOptions.BreadCrumb.BreadCrumbItems = this.breadCrumb;
|
|
28682
28946
|
this.pageHeaderOptions.EditButton.Active = false;
|
|
28683
28947
|
this.pageHeaderOptions.ExportButton.Active = false;
|
|
28684
28948
|
this.pageHeaderOptions.AddButton.Active = true;
|
|
28685
|
-
this.pageHeaderOptions.AddButton.ButtonTextKey = this.l(
|
|
28949
|
+
this.pageHeaderOptions.AddButton.ButtonTextKey = this.l('Add');
|
|
28686
28950
|
this.pageHeaderOptions.AddButton.Function = this.showAddModal;
|
|
28687
28951
|
this.pageHeaderOptions.FiltersButton.Active = true;
|
|
28688
|
-
this.pageHeaderOptions.FiltersButton.ButtonTextKey = this.l(
|
|
28952
|
+
this.pageHeaderOptions.FiltersButton.ButtonTextKey = this.l('Filters');
|
|
28689
28953
|
this.pageHeaderOptions.FiltersButton.Function = this.loadFilters;
|
|
28690
28954
|
this.pageHeaderOptions.Filters.ApplyFunction = this.search;
|
|
28691
28955
|
this.pageHeaderOptions.Filters.RestFunction = this.resetFilters;
|
|
28692
|
-
this.pageHeaderOptions.Filters.ControlsOptions.push({
|
|
28693
|
-
|
|
28694
|
-
|
|
28695
|
-
|
|
28696
|
-
this.pageHeaderOptions.Filters.ControlsOptions.push({
|
|
28956
|
+
this.pageHeaderOptions.Filters.ControlsOptions.push({
|
|
28957
|
+
key: DataType.SingleSelect,
|
|
28958
|
+
value: this.visibleDropdownOptions,
|
|
28959
|
+
});
|
|
28960
|
+
this.pageHeaderOptions.Filters.ControlsOptions.push({
|
|
28961
|
+
key: DataType.SingleSelect,
|
|
28962
|
+
value: this.statusDropdownOptions,
|
|
28963
|
+
});
|
|
28964
|
+
this.pageHeaderOptions.Filters.ControlsOptions.push({
|
|
28965
|
+
key: DataType.Date,
|
|
28966
|
+
value: this.DatePickerWithRangeMode,
|
|
28967
|
+
});
|
|
28968
|
+
this.pageHeaderOptions.Filters.ControlsOptions.push({
|
|
28969
|
+
key: DataType.SingleSelect,
|
|
28970
|
+
value: this.sortDropdownOptions,
|
|
28971
|
+
});
|
|
28972
|
+
this.pageHeaderOptions.Filters.ControlsOptions.push({
|
|
28973
|
+
key: DataType.SingleSelect,
|
|
28974
|
+
value: this.sortTypeDropdownOptions,
|
|
28975
|
+
});
|
|
28697
28976
|
this.pageHeaderOptions.Listing = true;
|
|
28698
28977
|
this.EN = this.utilityService.isCurrentLanguageEnglish();
|
|
28699
28978
|
this.pagingOptions = new PagingOptions();
|
|
@@ -28701,8 +28980,17 @@ class SurveyComponent extends AppBaseComponent {
|
|
|
28701
28980
|
this.pagingOptions.DisableBlockUI = true;
|
|
28702
28981
|
this.pagingOptions.ActionPostURL = this.apiURL + 'GetAll';
|
|
28703
28982
|
this.pageHeaderOptions.Listing = true;
|
|
28704
|
-
this.pagingOptions.OnKeyPressFiltersControlNames = [
|
|
28705
|
-
|
|
28983
|
+
this.pagingOptions.OnKeyPressFiltersControlNames = [
|
|
28984
|
+
this.searchTextBoxOptions.Name,
|
|
28985
|
+
];
|
|
28986
|
+
this.pagingOptions.Filters = [
|
|
28987
|
+
this.searchTextFilter,
|
|
28988
|
+
this.visiblePanelDropdownFilter,
|
|
28989
|
+
this.statusDropdownFilter,
|
|
28990
|
+
this.DatePickerWithRangeFilter,
|
|
28991
|
+
this.sortDropdownFilter,
|
|
28992
|
+
this.sortTypeDropdownFilter,
|
|
28993
|
+
];
|
|
28706
28994
|
}
|
|
28707
28995
|
ngAfterViewInit() {
|
|
28708
28996
|
this.loadingPage = true;
|
|
@@ -28722,6 +29010,22 @@ class SurveyComponent extends AppBaseComponent {
|
|
|
28722
29010
|
showDeleteModal(id) {
|
|
28723
29011
|
this.deleteConfirmationModalControl.showDeleteModal(id);
|
|
28724
29012
|
}
|
|
29013
|
+
isEditable(status) {
|
|
29014
|
+
let allowEdit = false;
|
|
29015
|
+
switch (status.toLocaleLowerCase()) {
|
|
29016
|
+
case this.SurveyStatusEnum.ScoringTypeEnum_Draft.toLocaleLowerCase():
|
|
29017
|
+
case this.SurveyStatusEnum.ScoringTypeEnum_Upcoming.toLocaleLowerCase():
|
|
29018
|
+
allowEdit = true;
|
|
29019
|
+
break;
|
|
29020
|
+
case this.SurveyStatusEnum.ScoringTypeEnum_Closed.toLocaleLowerCase():
|
|
29021
|
+
case this.SurveyStatusEnum.ScoringTypeEnum_Published.toLocaleLowerCase():
|
|
29022
|
+
allowEdit = false;
|
|
29023
|
+
break;
|
|
29024
|
+
default:
|
|
29025
|
+
break;
|
|
29026
|
+
}
|
|
29027
|
+
return allowEdit;
|
|
29028
|
+
}
|
|
28725
29029
|
getStatus(status) {
|
|
28726
29030
|
var Statuses = '';
|
|
28727
29031
|
switch (status.toLocaleLowerCase()) {
|
|
@@ -28744,12 +29048,12 @@ class SurveyComponent extends AppBaseComponent {
|
|
|
28744
29048
|
}
|
|
28745
29049
|
}
|
|
28746
29050
|
SurveyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SurveyComponent, deps: [{ token: i0.Injector }, { token: SurveyService }], target: i0.ɵɵFactoryTarget.Component });
|
|
28747
|
-
SurveyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: SurveyComponent, selector: "app-survey", viewQueries: [{ propertyName: "pagingElement", first: true, predicate: ["pagingViewElement"], descendants: true }, { propertyName: "addModal", first: true, predicate: ["addModal"], descendants: true }, { propertyName: "editModal", first: true, predicate: ["editModal"], descendants: true }, { propertyName: "deleteConfirmationModalControl", first: true, predicate: ["deleteConfirmationModalControl"], descendants: true }, { propertyName: "duplicateModal", first: true, predicate: ["duplicateModal"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<!--toolbar-->\r\n<bbsf-page-header-component [options]=\"pageHeaderOptions\" [group]=\"filtersForm\"></bbsf-page-header-component>\r\n<!--End toolbar-->\r\n<div class=\"container-xxl\">\r\n <div class=\"row\">\r\n <div class=\"col-md-6 col-xl-6 d-flex\" *ngFor=\"let item of pagingResult\">\r\n <div class=\"card card-listing w-icon-boxes survey-card\">\r\n <div class=\"card-header\">\r\n <div class=\"card-title line-clamp\">\r\n <a [routerLink]=\"['../info', item.iD_GUID]\">\r\n {{item.localizedTitle}}\r\n </a>\r\n </div>\r\n <div class=\"card-toolbar d-flex flex-nowrap flex-stack\">\r\n <span class=\"badge badge-light bagde-xs me-2\" *ngIf=\"!item.visible\"> {{l(\"NotVisible\")}} </span>\r\n <span class=\"badge bagde-xs badge-light me-2\" [ngClass]=\"getStatus(item.statusItemID)\">{{item.localizedStatus}}</span>\r\n <div ngbDropdown container=\"body\" class=\"dropdown-custom\" [placement]=\"EN ? 'bottom-right' : 'bottom-left'\">\r\n <button type=\"button\" class=\"dropdown-toggle-custom btn btn-clear btn-sm\"\r\n ngbDropdownToggle>\r\n <span class=\"svg-icon svg-icon-3\" [inlineSVG]=\"'/assets/images/card-dropdown.svg'\"></span>\r\n </button>\r\n <div ngbDropdownMenu class=\"dropdown-menu-custom\">\r\n <button (click)=\"showEditModal(item.iD_GUID)\" apppreventdoubleclick type=\"button\" ngbDropdownItem class=\"dropdown-button\">\r\n <span class=\"svg-icon svg-icon-3\" [inlineSVG]=\"'/assets/images/Edit.svg'\">\r\n </span>\r\n {{l(\"Edit\")}}\r\n </button>\r\n <button (click)=\"showDuplicateModal(item.iD_GUID)\" apppreventdoubleclick type=\"button\" ngbDropdownItem class=\"dropdown-button\">\r\n <span class=\"svg-icon svg-icon-3\" [inlineSVG]=\"'/assets/images/copy.svg'\">\r\n </span>\r\n {{l(\"Duplicate\")}}\r\n </button>\r\n <button type=\"button\" (click)=\"showDeleteModal(item.iD_GUID)\" apppreventdoubleclick ngbDropdownItem class=\"dropdown-button\">\r\n <span class=\"svg-icon svg-icon-3\"\r\n [inlineSVG]=\"'/assets/images/Trash.svg'\"></span> {{l(\"Delete\")}}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"card-body mb-4\">\r\n <p class=\"line-clamp-1\">\r\n {{item.localizedDesc}}\r\n </p>\r\n </div>\r\n <!--footer type one-->\r\n <div class=\"card-footer pt-0\">\r\n <div>\r\n <div class=\"survey-counter\">\r\n <span class=\"survey-counter-title\">{{l('Question')}}</span>\r\n <span class=\"badge badge-light-brand badge-square \">{{item.totalQuestionCount}}</span>\r\n </div>\r\n <div class=\"survey-counter\">\r\n <span class=\"survey-counter-title\">{{l('Submissions')}}</span>\r\n <span class=\"badge badge-light-brand badge-square \">{{item.totalSubmissionsCount}}</span>\r\n </div>\r\n </div>\r\n <div class=\"survery-date\">\r\n <div class=\"icon-boxes align-items-baseline\">\r\n <div class=\"icon-box w-100\">\r\n <div class=\"symbol\">\r\n <span class=\"symbol-label\">\r\n <span class=\"svg-icon svg-icon-4\" [inlineSVG]=\"'/assets/images/calendar.svg'\">\r\n </span>\r\n </span>\r\n </div>\r\n <span class=\"survey-counter-title\" *ngIf=\"item.startDate==null\">\r\n {{l('NotStartedYet')}}\r\n </span>\r\n <div *ngIf=\"item.startDate!=null\" class=\"d-flex flex-stack w-100\">\r\n <span class=\"survey-counter-title\">\r\n {{item.startDate |surveyDate}}\r\n <span *ngIf=\"item.endDate!=null\"> - {{(item.endDate|surveyDate)}}</span>\r\n </span>\r\n <span class=\"badge badge-light\" *ngIf=\"item.endDate==null\">{{l('HasNoEnd')}}</span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <BBSF-Paging (Items)=\"setListingResult($event)\" *ngIf=\"loadingPage\" [options]=\"pagingOptions\" [group]=\"filtersForm\"\r\n #pagingViewElement></BBSF-Paging>\r\n</div>\r\n\r\n\r\n\r\n<app-no-results *ngIf=\"pagingResult.length == 0 && showPageContent\"></app-no-results>\r\n<app-add-survey #addModal [pagingElement]=\"pagingElement\"></app-add-survey>\r\n<app-edit-survey #editModal [pagingElement]=\"pagingElement\"></app-edit-survey>\r\n<app-delete-survey #deleteConfirmationModalControl [pagingElement]=\"pagingElement\"></app-delete-survey>\r\n<app-duplicate-survey #duplicateModal [pagingElement]=\"pagingElement\"></app-duplicate-survey>\r\n", components: [{ type: i6.PageHeaderComponentComponent, selector: "bbsf-page-header-component", inputs: ["group", "options"] }, { type: i6.PagingComponent, selector: "BBSF-Paging", inputs: ["options", "group"], outputs: ["Items"] }, { type: NoResultsComponent, selector: "app-no-results" }, { type: AddSurveyComponent, selector: "app-add-survey", inputs: ["pagingElement"] }, { type: EditSurveyComponent, selector: "app-edit-survey", inputs: ["pagingElement", "onSuccessHandler"] }, { type: DeleteSurveyComponent, selector: "app-delete-survey", inputs: ["onSuccessHandler", "pagingElement"] }, { type: DuplicateSurveyComponent, selector: "app-duplicate-survey", inputs: ["onSuccessHandler", "pagingElement"] }], directives: [{ type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1$1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["routerLink", "target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i5.NgbDropdown, selector: "[ngbDropdown]", inputs: ["open", "placement", "container", "autoClose", "display", "dropdownClass"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { type: i5.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { type: i11.InlineSVGDirective, selector: "[inlineSVG]", inputs: ["resolveSVGUrl", "replaceContents", "prepend", "injectComponent", "cacheSVG", "forceEvalStyles", "evalScripts", "inlineSVG", "setSVGAttributes", "removeSVGAttributes", "fallbackImgUrl", "onSVGLoaded"], outputs: ["onSVGInserted", "onSVGFailed"] }, { type: i5.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { type: i5.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["disabled"] }], pipes: { "surveyDate": SurveyDatePipe } });
|
|
29051
|
+
SurveyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: SurveyComponent, selector: "app-survey", viewQueries: [{ propertyName: "pagingElement", first: true, predicate: ["pagingViewElement"], descendants: true }, { propertyName: "addModal", first: true, predicate: ["addModal"], descendants: true }, { propertyName: "editModal", first: true, predicate: ["editModal"], descendants: true }, { propertyName: "deleteConfirmationModalControl", first: true, predicate: ["deleteConfirmationModalControl"], descendants: true }, { propertyName: "duplicateModal", first: true, predicate: ["duplicateModal"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<!--toolbar-->\r\n<bbsf-page-header-component [options]=\"pageHeaderOptions\" [group]=\"filtersForm\"></bbsf-page-header-component>\r\n<!--End toolbar-->\r\n<div class=\"container-xxl\">\r\n <div class=\"row\">\r\n <div class=\"col-md-6 col-xl-6 d-flex\" *ngFor=\"let item of pagingResult\">\r\n <div class=\"card card-listing w-icon-boxes survey-card\">\r\n <div class=\"card-header\">\r\n <div class=\"card-title line-clamp\">\r\n <a [routerLink]=\"['../info', item.iD_GUID]\">\r\n {{item.localizedTitle}}\r\n </a>\r\n </div>\r\n <div class=\"card-toolbar d-flex flex-nowrap flex-stack\">\r\n <span class=\"badge badge-light bagde-xs me-2\" *ngIf=\"!item.visible\"> {{l(\"NotVisible\")}} </span>\r\n <span class=\"badge bagde-xs badge-light me-2\" [ngClass]=\"getStatus(item.statusItemID)\">{{item.localizedStatus}}</span>\r\n <div ngbDropdown container=\"body\" class=\"dropdown-custom\" [placement]=\"EN ? 'bottom-right' : 'bottom-left'\">\r\n <button type=\"button\" class=\"dropdown-toggle-custom btn btn-clear btn-sm\"\r\n ngbDropdownToggle>\r\n <span class=\"svg-icon svg-icon-3\" [inlineSVG]=\"'/assets/images/card-dropdown.svg'\"></span>\r\n </button>\r\n <div ngbDropdownMenu class=\"dropdown-menu-custom\">\r\n <button *ngIf=\"isEditable(item.statusItemID)\" (click)=\"showEditModal(item.iD_GUID)\" apppreventdoubleclick type=\"button\" ngbDropdownItem class=\"dropdown-button\">\r\n <span class=\"svg-icon svg-icon-3\" [inlineSVG]=\"'/assets/images/Edit.svg'\">\r\n </span>\r\n {{l(\"Edit\")}}\r\n </button>\r\n <button (click)=\"showDuplicateModal(item.iD_GUID)\" apppreventdoubleclick type=\"button\" ngbDropdownItem class=\"dropdown-button\">\r\n <span class=\"svg-icon svg-icon-3\" [inlineSVG]=\"'/assets/images/copy.svg'\">\r\n </span>\r\n {{l(\"Duplicate\")}}\r\n </button>\r\n <button type=\"button\" (click)=\"showDeleteModal(item.iD_GUID)\" apppreventdoubleclick ngbDropdownItem class=\"dropdown-button\">\r\n <span class=\"svg-icon svg-icon-3\"\r\n [inlineSVG]=\"'/assets/images/Trash.svg'\"></span> {{l(\"Delete\")}}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"card-body mb-4\">\r\n <p class=\"line-clamp-1\">\r\n {{item.localizedDesc}}\r\n </p>\r\n </div>\r\n <!--footer type one-->\r\n <div class=\"card-footer pt-0\">\r\n <div>\r\n <div class=\"survey-counter\">\r\n <span class=\"survey-counter-title\">{{l('Question')}}</span>\r\n <span class=\"badge badge-light-brand badge-square \">{{item.totalQuestionCount}}</span>\r\n </div>\r\n <div class=\"survey-counter\">\r\n <span class=\"survey-counter-title\">{{l('Submissions')}}</span>\r\n <span class=\"badge badge-light-brand badge-square \">{{item.totalSubmissionsCount}}</span>\r\n </div>\r\n </div>\r\n <div class=\"survery-date\">\r\n <div class=\"icon-boxes align-items-baseline\">\r\n <div class=\"icon-box w-100\">\r\n <div class=\"symbol\">\r\n <span class=\"symbol-label\">\r\n <span class=\"svg-icon svg-icon-4\" [inlineSVG]=\"'/assets/images/calendar.svg'\">\r\n </span>\r\n </span>\r\n </div>\r\n <span class=\"survey-counter-title\" *ngIf=\"item.startDate==null\">\r\n {{l('NotStartedYet')}}\r\n </span>\r\n <div *ngIf=\"item.startDate!=null\" class=\"d-flex flex-stack w-100\">\r\n <span class=\"survey-counter-title\">\r\n {{item.startDate |surveyDate}}\r\n <span *ngIf=\"item.endDate!=null\"> - {{(item.endDate|surveyDate)}}</span>\r\n </span>\r\n <span class=\"badge badge-light\" *ngIf=\"item.endDate==null\">{{l('HasNoEnd')}}</span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <BBSF-Paging (Items)=\"setListingResult($event)\" *ngIf=\"loadingPage\" [options]=\"pagingOptions\" [group]=\"filtersForm\"\r\n #pagingViewElement></BBSF-Paging>\r\n</div>\r\n\r\n\r\n\r\n<app-no-results *ngIf=\"pagingResult.length == 0 && showPageContent\"></app-no-results>\r\n<app-add-survey #addModal [pagingElement]=\"pagingElement\"></app-add-survey>\r\n<app-edit-survey #editModal [pagingElement]=\"pagingElement\"></app-edit-survey>\r\n<app-delete-survey #deleteConfirmationModalControl [pagingElement]=\"pagingElement\"></app-delete-survey>\r\n<app-duplicate-survey #duplicateModal [pagingElement]=\"pagingElement\"></app-duplicate-survey>\r\n", components: [{ type: i6.PageHeaderComponentComponent, selector: "bbsf-page-header-component", inputs: ["group", "options"] }, { type: i6.PagingComponent, selector: "BBSF-Paging", inputs: ["options", "group"], outputs: ["Items"] }, { type: NoResultsComponent, selector: "app-no-results" }, { type: AddSurveyComponent, selector: "app-add-survey", inputs: ["pagingElement"] }, { type: EditSurveyComponent, selector: "app-edit-survey", inputs: ["pagingElement", "onSuccessHandler"] }, { type: DeleteSurveyComponent, selector: "app-delete-survey", inputs: ["onSuccessHandler", "pagingElement"] }, { type: DuplicateSurveyComponent, selector: "app-duplicate-survey", inputs: ["onSuccessHandler", "pagingElement"] }], directives: [{ type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1$1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["routerLink", "target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i5.NgbDropdown, selector: "[ngbDropdown]", inputs: ["open", "placement", "container", "autoClose", "display", "dropdownClass"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { type: i5.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { type: i11.InlineSVGDirective, selector: "[inlineSVG]", inputs: ["resolveSVGUrl", "replaceContents", "prepend", "injectComponent", "cacheSVG", "forceEvalStyles", "evalScripts", "inlineSVG", "setSVGAttributes", "removeSVGAttributes", "fallbackImgUrl", "onSVGLoaded"], outputs: ["onSVGInserted", "onSVGFailed"] }, { type: i5.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { type: i5.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["disabled"] }], pipes: { "surveyDate": SurveyDatePipe } });
|
|
28748
29052
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SurveyComponent, decorators: [{
|
|
28749
29053
|
type: Component,
|
|
28750
29054
|
args: [{
|
|
28751
29055
|
selector: 'app-survey',
|
|
28752
|
-
templateUrl: './survey.component.html'
|
|
29056
|
+
templateUrl: './survey.component.html',
|
|
28753
29057
|
}]
|
|
28754
29058
|
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: SurveyService }]; }, propDecorators: { pagingElement: [{
|
|
28755
29059
|
type: ViewChild,
|
|
@@ -28951,7 +29255,7 @@ class ExternalUrlComponent extends AppBaseComponent {
|
|
|
28951
29255
|
}
|
|
28952
29256
|
}
|
|
28953
29257
|
ExternalUrlComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ExternalUrlComponent, deps: [{ token: i0.Injector }, { token: i1.BBSFTranslateService }, { token: SurveyService }, { token: i1$1.ActivatedRoute }, { token: i1$1.Router }, { token: i1.MasterLayoutService }, { token: AnonymousLayoutService$1 }, { token: i1.AuthService }], target: i0.ɵɵFactoryTarget.Component });
|
|
28954
|
-
ExternalUrlComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: ExternalUrlComponent, selector: "app-external-url", inputs: { pagingElement: "pagingElement" }, viewQueries: [{ propertyName: "surveyQuestionModal", first: true, predicate: ["SurveyQuestionModal"], descendants: true }, { propertyName: "submitConfirmationModalControl", first: true, predicate: ["submitConfirmationModalControl"], descendants: true }], usesInheritance: true, ngImport: i0, template: "\r\n<div class=\"external-user\">\r\n <div class=\"container\">\r\n <div class=\"external-body\">\r\n <div class=\"logo-container\">\r\n <a href=\"/\">\r\n <img alt=\"Logo\" src=\"../../../../assets/images/moe-logo-ar.svg\" *ngIf=\"language == 'ar'\" class=\"logo-image\" />\r\n <img alt=\"Logo\" src=\"../../../../assets/images/moe-logo-en.svg\" *ngIf=\"language == 'en'\" class=\"logo-image\" />\r\n </a>\r\n <div class=\"btn btn-sm btn-light\" ngbTooltip=\"Arabic\" *ngIf=\"language == 'en'\" (click)=\"switchLang('ar')\">\r\n <span class=\"svg-icon svg-icon-5\" [inlineSVG]=\"'/assets/images/lang.svg'\">\r\n </span>\r\n \u0627\u0644\u0639\u0631\u0628\u064A\u0629\r\n </div>\r\n <div class=\"btn btn-sm btn-light\" ngbTooltip=\"English\" *ngIf=\"language == 'ar'\" (click)=\"switchLang('en')\">\r\n <span class=\"svg-icon svg-icon-5\" [inlineSVG]=\"'/assets/images/lang.svg'\">\r\n </span>\r\n English\r\n </div>\r\n </div>\r\n <div class=\"wrapper-info\" *ngIf=\"isDateLoaded&&surveyInfo.isSurveyAvailable&&!surveyInfo.isSurveyTakenBefore&&!showInternalErrorMessage&&!isSubmitted\">\r\n <div class=\"info-container mb-8\">\r\n <h4 class=\"card-title\">{{EN?surveyInfo.title.english:surveyInfo.title.arabic}} </h4>\r\n <p class=\"card-description\">\r\n {{EN?surveyInfo.description.english:surveyInfo.description.arabic}}\r\n </p>\r\n </div>\r\n <div *ngIf=\"show\">\r\n <BBSF-Form [options]=\"surveyUserInfoOptions\">\r\n <div class=\"external-form\">\r\n <BBSF-MultiLingualTextBox [options]=\"name\" [group]=\"surveyUserInfoForm\">\r\n </BBSF-MultiLingualTextBox>\r\n <BBSF-TextBox [options]=\"email\" [group]=\"surveyUserInfoForm\"></BBSF-TextBox>\r\n </div>\r\n <div class=\"externalurl-footer\">\r\n <button class=\"btn btn-sm btn-brand\" type=\"submit\" > {{l(\"Next\")}}</button>\r\n </div>\r\n </BBSF-Form>\r\n </div>\r\n <div *ngIf=\"!show\">\r\n <BBSF-Form [options]=\"surveySurveyOptions\">\r\n <survey-form #SurveyQuestionModal [options]=\"surveyFormField\" [group]=\"surveyForm\"></survey-form>\r\n <div class=\"col-6\" *ngIf=\"surveyInfo.hasCaptchaForExternal\">\r\n <BBSF-Recaptcha [options]=\"RecaptchaFormField\" [group]=\"surveyForm\"></BBSF-Recaptcha>\r\n </div>\r\n <div class=\"survey-preview\" *ngIf=\"surveyInfo.declaration.english||surveyInfo.declaration.arabic\">\r\n <div class=\"survey-preview-data\">\r\n <span class=\"question-number\" ngbTooltip=\"Question Number\"></span>\r\n <div class=\"survey-preview-question\">\r\n <div class=\"survey-answer\">\r\n <BBSF-CheckBox [options]=\"declarationCheckBoxForm\" [group]=\"surveyForm\"></BBSF-CheckBox>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"externalurl-footer\">\r\n <button type=\"submit\" class=\"btn btn-sm btn-brand\"> {{l(\"Submit\")}}</button>\r\n </div>\r\n </BBSF-Form>\r\n\r\n </div>\r\n </div>\r\n <div class=\"survey-message\" *ngIf=\"isDateLoaded&&showInternalErrorMessage\">\r\n <p class=\"alert alert-warning\"> {{l(\"InternalUserErrorMessage\")}}<a [routerLink]=\"['/imo/survey/submission',surveyInfo.iD_GUID]\">{{surveyInfo.title.current_FailOver}}</a> ?\r\n </p>\r\n </div>\r\n <div class=\"survey-message\" *ngIf=\"isDateLoaded&&!surveyInfo.isSurveyAvailable\">\r\n <p class=\"alert alert-danger\"> {{l(\"SurveyAvailableError\")}}</p>\r\n </div>\r\n <div class=\"survey-message\" *ngIf=\"isDateLoaded&&surveyInfo.isSurveyTakenBefore\">\r\n <p class=\"alert alert-danger\"> {{l(\"SurveyTakenBeforeError\")}}</p>\r\n </div>\r\n <div class=\"survey-message\" *ngIf=\"isSubmitted\">\r\n <p class=\"alert alert-success\"> {{l(\"Survey_Submit_Confirmation\")}} <span *ngIf=\"surveyInfo.
|
|
29258
|
+
ExternalUrlComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: ExternalUrlComponent, selector: "app-external-url", inputs: { pagingElement: "pagingElement" }, viewQueries: [{ propertyName: "surveyQuestionModal", first: true, predicate: ["SurveyQuestionModal"], descendants: true }, { propertyName: "submitConfirmationModalControl", first: true, predicate: ["submitConfirmationModalControl"], descendants: true }], usesInheritance: true, ngImport: i0, template: "\r\n<div class=\"external-user\">\r\n <div class=\"container\">\r\n <div class=\"external-body\">\r\n <div class=\"logo-container\">\r\n <a href=\"/\">\r\n <img alt=\"Logo\" src=\"../../../../assets/images/moe-logo-ar.svg\" *ngIf=\"language == 'ar'\" class=\"logo-image\" />\r\n <img alt=\"Logo\" src=\"../../../../assets/images/moe-logo-en.svg\" *ngIf=\"language == 'en'\" class=\"logo-image\" />\r\n </a>\r\n <div class=\"btn btn-sm btn-light\" ngbTooltip=\"Arabic\" *ngIf=\"language == 'en'\" (click)=\"switchLang('ar')\">\r\n <span class=\"svg-icon svg-icon-5\" [inlineSVG]=\"'/assets/images/lang.svg'\">\r\n </span>\r\n \u0627\u0644\u0639\u0631\u0628\u064A\u0629\r\n </div>\r\n <div class=\"btn btn-sm btn-light\" ngbTooltip=\"English\" *ngIf=\"language == 'ar'\" (click)=\"switchLang('en')\">\r\n <span class=\"svg-icon svg-icon-5\" [inlineSVG]=\"'/assets/images/lang.svg'\">\r\n </span>\r\n English\r\n </div>\r\n </div>\r\n <div class=\"wrapper-info\" *ngIf=\"isDateLoaded&&surveyInfo.isSurveyAvailable&&!surveyInfo.isSurveyTakenBefore&&!showInternalErrorMessage&&!isSubmitted\">\r\n <div class=\"info-container mb-8\">\r\n <h4 class=\"card-title\">{{EN?surveyInfo.title.english:surveyInfo.title.arabic}} </h4>\r\n <p class=\"card-description\">\r\n {{EN?surveyInfo.description.english:surveyInfo.description.arabic}}\r\n </p>\r\n </div>\r\n <div *ngIf=\"show\">\r\n <BBSF-Form [options]=\"surveyUserInfoOptions\">\r\n <div class=\"external-form\">\r\n <BBSF-MultiLingualTextBox [options]=\"name\" [group]=\"surveyUserInfoForm\">\r\n </BBSF-MultiLingualTextBox>\r\n <BBSF-TextBox [options]=\"email\" [group]=\"surveyUserInfoForm\"></BBSF-TextBox>\r\n </div>\r\n <div class=\"externalurl-footer\">\r\n <button class=\"btn btn-sm btn-brand\" type=\"submit\" > {{l(\"Next\")}}</button>\r\n </div>\r\n </BBSF-Form>\r\n </div>\r\n <div *ngIf=\"!show\">\r\n <BBSF-Form [options]=\"surveySurveyOptions\">\r\n <survey-form #SurveyQuestionModal [options]=\"surveyFormField\" [group]=\"surveyForm\"></survey-form>\r\n <div class=\"col-6\" *ngIf=\"surveyInfo.hasCaptchaForExternal\">\r\n <BBSF-Recaptcha [options]=\"RecaptchaFormField\" [group]=\"surveyForm\"></BBSF-Recaptcha>\r\n </div>\r\n <div class=\"survey-preview\" *ngIf=\"surveyInfo.declaration.english||surveyInfo.declaration.arabic\">\r\n <div class=\"survey-preview-data\">\r\n <span class=\"question-number\" ngbTooltip=\"Question Number\"></span>\r\n <div class=\"survey-preview-question\">\r\n <div class=\"survey-answer\">\r\n <BBSF-CheckBox [options]=\"declarationCheckBoxForm\" [group]=\"surveyForm\"></BBSF-CheckBox>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"externalurl-footer\">\r\n <button type=\"submit\" class=\"btn btn-sm btn-brand\"> {{l(\"Submit\")}}</button>\r\n </div>\r\n </BBSF-Form>\r\n\r\n </div>\r\n </div>\r\n <div class=\"survey-message\" *ngIf=\"isDateLoaded&&showInternalErrorMessage\">\r\n <p class=\"alert alert-warning\"> {{l(\"InternalUserErrorMessage\")}}<a [routerLink]=\"['/imo/survey/submission',surveyInfo.iD_GUID]\">{{surveyInfo.title.current_FailOver}}</a> ?\r\n </p>\r\n </div>\r\n <div class=\"survey-message\" *ngIf=\"isDateLoaded&&!surveyInfo.isSurveyAvailable\">\r\n <p class=\"alert alert-danger\"> {{l(\"SurveyAvailableError\")}}</p>\r\n </div>\r\n <div class=\"survey-message\" *ngIf=\"isDateLoaded&&surveyInfo.isSurveyTakenBefore\">\r\n <p class=\"alert alert-danger\"> {{l(\"SurveyTakenBeforeError\")}}</p>\r\n </div>\r\n <div class=\"survey-message\" *ngIf=\"isSubmitted\">\r\n <p class=\"alert alert-success\"> {{l(\"Survey_Submit_Confirmation\")}} <span *ngIf=\"surveyInfo.isShowScoreAfterSubmission\">{{l(\"Score\") + \": \"+totalScore}}</span>\r\n </p>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n\r\n\r\n\r\n<!-- <BBSF-ConfirmationModal [options]=\"submitConfirmationOptions\" #submitConfirmationModalControl></BBSF-ConfirmationModal> -->\r\n", styles: ["body{background-color:#f9f9f9}.logo-container{display:flex;justify-content:space-between;align-items:center;margin:1.5rem 0}.logo-image{width:200px}.wrapper-info{padding:20px;background:#ffffff;border-radius:1rem;border:1px solid #ececec}.card-title{font-size:1.5rem!important}.externalurl-footer{display:flex;align-items:center;justify-content:end}\n"], components: [{ type: i6.FormComponent, selector: "BBSF-Form", inputs: ["options"], outputs: ["OnChange"] }, { type: i6.MultiLingualTextBoxComponent, selector: "BBSF-MultiLingualTextBox", inputs: ["group", "options"], outputs: ["OnChange"] }, { type: i6.TextboxComponent, selector: "BBSF-TextBox", inputs: ["group", "options"], outputs: ["OnChange"] }, { type: SurveyFormComponent, selector: "survey-form", inputs: ["group", "options"] }, { type: i6.RecaptchaComponent, selector: "BBSF-Recaptcha", inputs: ["group", "options"], outputs: ["OnChange"] }, { type: i6.CheckBoxComponent, selector: "BBSF-CheckBox", inputs: ["group", "options"], outputs: ["OnChange"] }], directives: [{ type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "triggers", "container", "disableTooltip", "tooltipClass", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { type: i11.InlineSVGDirective, selector: "[inlineSVG]", inputs: ["resolveSVGUrl", "replaceContents", "prepend", "injectComponent", "cacheSVG", "forceEvalStyles", "evalScripts", "inlineSVG", "setSVGAttributes", "removeSVGAttributes", "fallbackImgUrl", "onSVGLoaded"], outputs: ["onSVGInserted", "onSVGFailed"] }, { type: i1$1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["routerLink", "target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo"] }] });
|
|
28955
29259
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ExternalUrlComponent, decorators: [{
|
|
28956
29260
|
type: Component,
|
|
28957
29261
|
args: [{
|