@bnsights/bbsf-admin-portal 1.0.73 → 1.0.75
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 -0
- package/{bnsights-bbsf-admin-portal-1.0.73.tgz → bnsights-bbsf-admin-portal-1.0.75.tgz} +0 -0
- package/bundles/bnsights-bbsf-admin-portal.umd.js +600 -298
- 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 +5 -2
- 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 +613 -311
- 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
|
@@ -26594,7 +26594,7 @@
|
|
|
26594
26594
|
this.checkList = [];
|
|
26595
26595
|
this.showedChildQuestion = [];
|
|
26596
26596
|
this.isFirstValid = true;
|
|
26597
|
-
this.labelClass =
|
|
26597
|
+
this.labelClass = 'Testtsadfv';
|
|
26598
26598
|
this.toCamel = function (obj) {
|
|
26599
26599
|
if (Array.isArray(obj)) {
|
|
26600
26600
|
return obj.map(function (v) { return _this.toCamel(v); });
|
|
@@ -26614,7 +26614,7 @@
|
|
|
26614
26614
|
this.filedGroup = new i11$1.FormGroup({});
|
|
26615
26615
|
this.group.addControl(this.options.Name, this.filedGroup);
|
|
26616
26616
|
this.group.statusChanges.subscribe(function (e) {
|
|
26617
|
-
console.log(
|
|
26617
|
+
console.log('Group', e);
|
|
26618
26618
|
});
|
|
26619
26619
|
for (var index = 0; index < this.options.QuestionList.length; index++) {
|
|
26620
26620
|
var element = this.options.QuestionList[index];
|
|
@@ -26622,15 +26622,21 @@
|
|
|
26622
26622
|
///TextBox
|
|
26623
26623
|
case SurveyOptionType.Text.toLocaleLowerCase():
|
|
26624
26624
|
var Text = new i6.TextBoxOptions();
|
|
26625
|
-
Text.Name =
|
|
26626
|
-
Text.LabelValue = this.utilityService.isCurrentLanguageArabic()
|
|
26625
|
+
Text.Name = 'q' + element.iD_GUID;
|
|
26626
|
+
Text.LabelValue = this.utilityService.isCurrentLanguageArabic()
|
|
26627
|
+
? element.text.arabic + ("." + element.questionTypeItemID)
|
|
26628
|
+
: element.text.english + ("." + element.questionTypeItemID);
|
|
26627
26629
|
Text.HideLabel = false;
|
|
26628
|
-
Text.IsRequired = element.isRelatedToSurveyQuestion
|
|
26630
|
+
Text.IsRequired = element.isRelatedToSurveyQuestion
|
|
26631
|
+
? false
|
|
26632
|
+
: element.options.isRequired;
|
|
26629
26633
|
Text.IsReadonly = element.isRelatedToSurveyQuestion;
|
|
26630
26634
|
Text.IsDisabled = this.options.Readonly;
|
|
26631
26635
|
Text.LabelExtraClasses = this.labelClass;
|
|
26632
26636
|
Text.ViewType = i6.ControlLayout.Vertical;
|
|
26633
|
-
Text.LabelDescription = this.utilityService.isCurrentLanguageArabic()
|
|
26637
|
+
Text.LabelDescription = this.utilityService.isCurrentLanguageArabic()
|
|
26638
|
+
? element.options.description.arabic
|
|
26639
|
+
: element.options.description.english;
|
|
26634
26640
|
if (element.value.text)
|
|
26635
26641
|
Text.Value = element.value.text;
|
|
26636
26642
|
if (element.options.maxLength)
|
|
@@ -26644,15 +26650,21 @@
|
|
|
26644
26650
|
break;
|
|
26645
26651
|
case SurveyOptionType.Email.toLocaleLowerCase():
|
|
26646
26652
|
var Email = new i6.TextBoxOptions();
|
|
26647
|
-
Email.Name =
|
|
26648
|
-
Email.LabelValue = this.utilityService.isCurrentLanguageArabic()
|
|
26653
|
+
Email.Name = 'q' + element.iD_GUID;
|
|
26654
|
+
Email.LabelValue = this.utilityService.isCurrentLanguageArabic()
|
|
26655
|
+
? element.text.arabic + ("." + element.questionTypeItemID)
|
|
26656
|
+
: element.text.english + ("." + element.questionTypeItemID);
|
|
26649
26657
|
Email.HideLabel = false;
|
|
26650
26658
|
Email.LabelExtraClasses = this.labelClass;
|
|
26651
|
-
Email.IsRequired = element.isRelatedToSurveyQuestion
|
|
26659
|
+
Email.IsRequired = element.isRelatedToSurveyQuestion
|
|
26660
|
+
? false
|
|
26661
|
+
: element.options.isRequired;
|
|
26652
26662
|
Email.IsReadonly = element.isRelatedToSurveyQuestion;
|
|
26653
26663
|
Email.ViewType = i6.ControlLayout.Vertical;
|
|
26654
26664
|
Email.IsDisabled = this.options.Readonly;
|
|
26655
|
-
Email.LabelDescription = this.utilityService.isCurrentLanguageArabic()
|
|
26665
|
+
Email.LabelDescription = this.utilityService.isCurrentLanguageArabic()
|
|
26666
|
+
? element.options.description.arabic
|
|
26667
|
+
: element.options.description.english;
|
|
26656
26668
|
Email.Type = i6.InputType.Email;
|
|
26657
26669
|
if (element.value.text)
|
|
26658
26670
|
Email.Value = element.value.text;
|
|
@@ -26662,15 +26674,22 @@
|
|
|
26662
26674
|
break;
|
|
26663
26675
|
case SurveyOptionType.Number.toLocaleLowerCase():
|
|
26664
26676
|
var Number = new i6.TextBoxOptions();
|
|
26665
|
-
Number.Name =
|
|
26677
|
+
Number.Name = 'q' + element.iD_GUID;
|
|
26666
26678
|
Number.HideLabel = false;
|
|
26667
26679
|
Number.LabelExtraClasses = this.labelClass;
|
|
26668
|
-
Number.LabelValue = this.utilityService.isCurrentLanguageArabic()
|
|
26669
|
-
|
|
26680
|
+
Number.LabelValue = this.utilityService.isCurrentLanguageArabic()
|
|
26681
|
+
? element.text.arabic + ("." + element.questionTypeItemID)
|
|
26682
|
+
: element.text.english + ("." + element.questionTypeItemID);
|
|
26683
|
+
Number.IsRequired = element.isRelatedToSurveyQuestion
|
|
26684
|
+
? false
|
|
26685
|
+
: element.options.isRequired;
|
|
26670
26686
|
Number.IsReadonly = element.isRelatedToSurveyQuestion;
|
|
26671
26687
|
Number.ViewType = i6.ControlLayout.Vertical;
|
|
26672
26688
|
Number.IsDisabled = this.options.Readonly;
|
|
26673
|
-
Number.LabelDescription =
|
|
26689
|
+
Number.LabelDescription =
|
|
26690
|
+
this.utilityService.isCurrentLanguageArabic()
|
|
26691
|
+
? element.options.description.arabic
|
|
26692
|
+
: element.options.description.english;
|
|
26674
26693
|
Number.Type = i6.InputType.Number;
|
|
26675
26694
|
var rangeNumber = new i6.RangeNumber();
|
|
26676
26695
|
rangeNumber.To = element.options.maxLength;
|
|
@@ -26685,15 +26704,21 @@
|
|
|
26685
26704
|
///DateTime
|
|
26686
26705
|
case SurveyOptionType.Date.toLocaleLowerCase():
|
|
26687
26706
|
var Date = new i6.DatePickerOptions();
|
|
26688
|
-
Date.Name =
|
|
26707
|
+
Date.Name = 'q' + element.iD_GUID;
|
|
26689
26708
|
Date.HideLabel = false;
|
|
26690
26709
|
Date.LabelExtraClasses = this.labelClass;
|
|
26691
|
-
Date.LabelValue = this.utilityService.isCurrentLanguageArabic()
|
|
26692
|
-
|
|
26710
|
+
Date.LabelValue = this.utilityService.isCurrentLanguageArabic()
|
|
26711
|
+
? element.text.arabic + ("." + element.questionTypeItemID)
|
|
26712
|
+
: element.text.english + ("." + element.questionTypeItemID);
|
|
26713
|
+
Date.IsRequired = element.isRelatedToSurveyQuestion
|
|
26714
|
+
? false
|
|
26715
|
+
: element.options.isRequired;
|
|
26693
26716
|
Date.IsReadonly = element.isRelatedToSurveyQuestion;
|
|
26694
26717
|
Date.ViewType = i6.ControlLayout.Vertical;
|
|
26695
26718
|
Date.IsDisabled = this.options.Readonly;
|
|
26696
|
-
Date.LabelDescription = this.utilityService.isCurrentLanguageArabic()
|
|
26719
|
+
Date.LabelDescription = this.utilityService.isCurrentLanguageArabic()
|
|
26720
|
+
? element.options.description.arabic
|
|
26721
|
+
: element.options.description.english;
|
|
26697
26722
|
Date.PickerType = i6.PickerType.Calendar;
|
|
26698
26723
|
Date.SelectMode = i6.SelectMode.Single;
|
|
26699
26724
|
Date.StartView = i6.StartView.Month;
|
|
@@ -26705,15 +26730,22 @@
|
|
|
26705
26730
|
break;
|
|
26706
26731
|
case SurveyOptionType.DateTime.toLocaleLowerCase():
|
|
26707
26732
|
var DateTime = new i6.DatePickerOptions();
|
|
26708
|
-
DateTime.Name =
|
|
26733
|
+
DateTime.Name = 'q' + element.iD_GUID;
|
|
26709
26734
|
DateTime.HideLabel = false;
|
|
26710
26735
|
DateTime.LabelExtraClasses = this.labelClass;
|
|
26711
|
-
DateTime.LabelValue = this.utilityService.isCurrentLanguageArabic()
|
|
26712
|
-
|
|
26736
|
+
DateTime.LabelValue = this.utilityService.isCurrentLanguageArabic()
|
|
26737
|
+
? element.text.arabic + ("." + element.questionTypeItemID)
|
|
26738
|
+
: element.text.english + ("." + element.questionTypeItemID);
|
|
26739
|
+
DateTime.IsRequired = element.isRelatedToSurveyQuestion
|
|
26740
|
+
? false
|
|
26741
|
+
: element.options.isRequired;
|
|
26713
26742
|
DateTime.IsReadonly = element.isRelatedToSurveyQuestion;
|
|
26714
26743
|
DateTime.ViewType = i6.ControlLayout.Vertical;
|
|
26715
26744
|
DateTime.IsDisabled = this.options.Readonly;
|
|
26716
|
-
DateTime.LabelDescription =
|
|
26745
|
+
DateTime.LabelDescription =
|
|
26746
|
+
this.utilityService.isCurrentLanguageArabic()
|
|
26747
|
+
? element.options.description.arabic
|
|
26748
|
+
: element.options.description.english;
|
|
26717
26749
|
DateTime.PickerType = i6.PickerType.Both;
|
|
26718
26750
|
DateTime.SelectMode = i6.SelectMode.Single;
|
|
26719
26751
|
DateTime.StartView = i6.StartView.Month;
|
|
@@ -26726,22 +26758,33 @@
|
|
|
26726
26758
|
//Dropdown
|
|
26727
26759
|
case SurveyOptionType.SingleSelect.toLocaleLowerCase():
|
|
26728
26760
|
var SingleSelect = new i6.DropdownOptions();
|
|
26729
|
-
SingleSelect.Name =
|
|
26761
|
+
SingleSelect.Name = 'q' + element.iD_GUID;
|
|
26730
26762
|
SingleSelect.HideLabel = false;
|
|
26731
26763
|
SingleSelect.LabelExtraClasses = this.labelClass;
|
|
26732
|
-
SingleSelect.LabelValue =
|
|
26733
|
-
|
|
26764
|
+
SingleSelect.LabelValue =
|
|
26765
|
+
this.utilityService.isCurrentLanguageArabic()
|
|
26766
|
+
? element.text.arabic + ("." + element.questionTypeItemID)
|
|
26767
|
+
: element.text.english + ("." + element.questionTypeItemID);
|
|
26768
|
+
SingleSelect.IsRequired = element.isRelatedToSurveyQuestion
|
|
26769
|
+
? false
|
|
26770
|
+
: element.options.isRequired;
|
|
26734
26771
|
SingleSelect.IsReadonly = element.isRelatedToSurveyQuestion;
|
|
26735
|
-
SingleSelect.Placeholder =
|
|
26772
|
+
SingleSelect.Placeholder =
|
|
26773
|
+
this.utilityService.getResourceValue('DefaultOptionText');
|
|
26736
26774
|
SingleSelect.ViewType = i6.ControlLayout.Vertical;
|
|
26737
26775
|
SingleSelect.IsDisabled = this.options.Readonly;
|
|
26738
|
-
SingleSelect.LabelDescription =
|
|
26776
|
+
SingleSelect.LabelDescription =
|
|
26777
|
+
this.utilityService.isCurrentLanguageArabic()
|
|
26778
|
+
? element.options.description.arabic
|
|
26779
|
+
: element.options.description.english;
|
|
26739
26780
|
var dataSource = [];
|
|
26740
26781
|
for (var index_1 = 0; index_1 < element.questionOptions.length; index_1++) {
|
|
26741
26782
|
var option = element.questionOptions[index_1];
|
|
26742
26783
|
var item = {};
|
|
26743
26784
|
item.key = option.iD_GUID;
|
|
26744
|
-
item.value = this.utilityService.isCurrentLanguageArabic()
|
|
26785
|
+
item.value = this.utilityService.isCurrentLanguageArabic()
|
|
26786
|
+
? option.name.arabic
|
|
26787
|
+
: option.name.english;
|
|
26745
26788
|
dataSource.push(item);
|
|
26746
26789
|
}
|
|
26747
26790
|
SingleSelect.DataSource = dataSource;
|
|
@@ -26756,21 +26799,30 @@
|
|
|
26756
26799
|
break;
|
|
26757
26800
|
case SurveyOptionType.RadioButton.toLocaleLowerCase():
|
|
26758
26801
|
var radioButton = new i6.RadioButtonOptions();
|
|
26759
|
-
radioButton.Name =
|
|
26802
|
+
radioButton.Name = 'q' + element.iD_GUID;
|
|
26760
26803
|
radioButton.HideLabel = false;
|
|
26761
26804
|
radioButton.LabelExtraClasses = this.labelClass;
|
|
26762
|
-
radioButton.LabelValue = this.utilityService.isCurrentLanguageArabic()
|
|
26763
|
-
|
|
26805
|
+
radioButton.LabelValue = this.utilityService.isCurrentLanguageArabic()
|
|
26806
|
+
? element.text.arabic + ("." + element.questionTypeItemID)
|
|
26807
|
+
: element.text.english + ("." + element.questionTypeItemID);
|
|
26808
|
+
radioButton.IsRequired = element.isRelatedToSurveyQuestion
|
|
26809
|
+
? false
|
|
26810
|
+
: element.options.isRequired;
|
|
26764
26811
|
radioButton.IsReadonly = element.isRelatedToSurveyQuestion;
|
|
26765
26812
|
radioButton.ViewType = i6.ControlLayout.Vertical;
|
|
26766
26813
|
radioButton.IsDisabled = this.options.Readonly;
|
|
26767
|
-
radioButton.LabelDescription =
|
|
26814
|
+
radioButton.LabelDescription =
|
|
26815
|
+
this.utilityService.isCurrentLanguageArabic()
|
|
26816
|
+
? element.options.description.arabic
|
|
26817
|
+
: element.options.description.english;
|
|
26768
26818
|
var dataSourceRadio = [];
|
|
26769
26819
|
for (var index_2 = 0; index_2 < element.questionOptions.length; index_2++) {
|
|
26770
26820
|
var option = element.questionOptions[index_2];
|
|
26771
26821
|
var item = {};
|
|
26772
26822
|
item.Value = option.iD_GUID;
|
|
26773
|
-
item.Text = this.utilityService.isCurrentLanguageArabic()
|
|
26823
|
+
item.Text = this.utilityService.isCurrentLanguageArabic()
|
|
26824
|
+
? option.name.arabic
|
|
26825
|
+
: option.name.english;
|
|
26774
26826
|
dataSourceRadio.push(item);
|
|
26775
26827
|
}
|
|
26776
26828
|
radioButton.Items = dataSourceRadio;
|
|
@@ -26782,22 +26834,33 @@
|
|
|
26782
26834
|
break;
|
|
26783
26835
|
case SurveyOptionType.MultipleSelect.toLocaleLowerCase():
|
|
26784
26836
|
var MulipleSelect = new i6.DropdownOptions();
|
|
26785
|
-
MulipleSelect.Name =
|
|
26837
|
+
MulipleSelect.Name = 'q' + element.iD_GUID;
|
|
26786
26838
|
MulipleSelect.HideLabel = false;
|
|
26787
26839
|
MulipleSelect.LabelExtraClasses = this.labelClass;
|
|
26788
|
-
MulipleSelect.LabelValue =
|
|
26789
|
-
|
|
26840
|
+
MulipleSelect.LabelValue =
|
|
26841
|
+
this.utilityService.isCurrentLanguageArabic()
|
|
26842
|
+
? element.text.arabic + ("." + element.questionTypeItemID)
|
|
26843
|
+
: element.text.english + ("." + element.questionTypeItemID);
|
|
26844
|
+
MulipleSelect.IsRequired = element.isRelatedToSurveyQuestion
|
|
26845
|
+
? false
|
|
26846
|
+
: element.options.isRequired;
|
|
26790
26847
|
MulipleSelect.IsReadonly = element.isRelatedToSurveyQuestion;
|
|
26791
|
-
MulipleSelect.Placeholder =
|
|
26848
|
+
MulipleSelect.Placeholder =
|
|
26849
|
+
this.utilityService.getResourceValue('DefaultOptionText');
|
|
26792
26850
|
MulipleSelect.ViewType = i6.ControlLayout.Vertical;
|
|
26793
26851
|
MulipleSelect.IsDisabled = this.options.Readonly;
|
|
26794
|
-
MulipleSelect.LabelDescription =
|
|
26852
|
+
MulipleSelect.LabelDescription =
|
|
26853
|
+
this.utilityService.isCurrentLanguageArabic()
|
|
26854
|
+
? element.options.description.arabic
|
|
26855
|
+
: element.options.description.english;
|
|
26795
26856
|
var multipleSelectDataSource = [];
|
|
26796
26857
|
for (var index_3 = 0; index_3 < element.questionOptions.length; index_3++) {
|
|
26797
26858
|
var option = element.questionOptions[index_3];
|
|
26798
26859
|
var item = {};
|
|
26799
26860
|
item.key = option.iD_GUID;
|
|
26800
|
-
item.value = this.utilityService.isCurrentLanguageArabic()
|
|
26861
|
+
item.value = this.utilityService.isCurrentLanguageArabic()
|
|
26862
|
+
? option.name.arabic
|
|
26863
|
+
: option.name.english;
|
|
26801
26864
|
multipleSelectDataSource.push(item);
|
|
26802
26865
|
}
|
|
26803
26866
|
MulipleSelect.DataSource = multipleSelectDataSource;
|
|
@@ -26812,15 +26875,22 @@
|
|
|
26812
26875
|
break;
|
|
26813
26876
|
case SurveyOptionType.Country.toLocaleLowerCase():
|
|
26814
26877
|
var Country = new i6.DropdownOptions();
|
|
26815
|
-
Country.Name =
|
|
26878
|
+
Country.Name = 'q' + element.iD_GUID;
|
|
26816
26879
|
Country.HideLabel = false;
|
|
26817
26880
|
Country.LabelExtraClasses = this.labelClass;
|
|
26818
|
-
Country.LabelValue = this.utilityService.isCurrentLanguageArabic()
|
|
26819
|
-
|
|
26881
|
+
Country.LabelValue = this.utilityService.isCurrentLanguageArabic()
|
|
26882
|
+
? element.text.arabic + ("." + element.questionTypeItemID)
|
|
26883
|
+
: element.text.english + ("." + element.questionTypeItemID);
|
|
26884
|
+
Country.IsRequired = element.isRelatedToSurveyQuestion
|
|
26885
|
+
? false
|
|
26886
|
+
: element.options.isRequired;
|
|
26820
26887
|
Country.IsReadonly = element.isRelatedToSurveyQuestion;
|
|
26821
26888
|
Country.ViewType = i6.ControlLayout.Vertical;
|
|
26822
26889
|
Country.IsDisabled = this.options.Readonly;
|
|
26823
|
-
Country.LabelDescription =
|
|
26890
|
+
Country.LabelDescription =
|
|
26891
|
+
this.utilityService.isCurrentLanguageArabic()
|
|
26892
|
+
? element.options.description.arabic
|
|
26893
|
+
: element.options.description.english;
|
|
26824
26894
|
Country.SingleSelection = true;
|
|
26825
26895
|
Country.ShowCheckbox = false;
|
|
26826
26896
|
Country.AllowSearchFilter = true;
|
|
@@ -26834,15 +26904,22 @@
|
|
|
26834
26904
|
//FileUpload
|
|
26835
26905
|
case SurveyOptionType.MultiFile.toLocaleLowerCase():
|
|
26836
26906
|
var MultiFile = new i6.FileUploadOptions();
|
|
26837
|
-
MultiFile.Name =
|
|
26907
|
+
MultiFile.Name = 'q' + element.iD_GUID;
|
|
26838
26908
|
MultiFile.HideLabel = false;
|
|
26839
26909
|
MultiFile.LabelExtraClasses = this.labelClass;
|
|
26840
|
-
MultiFile.LabelValue = this.utilityService.isCurrentLanguageArabic()
|
|
26841
|
-
|
|
26910
|
+
MultiFile.LabelValue = this.utilityService.isCurrentLanguageArabic()
|
|
26911
|
+
? element.text.arabic + ("." + element.questionTypeItemID)
|
|
26912
|
+
: element.text.english + ("." + element.questionTypeItemID);
|
|
26913
|
+
MultiFile.IsRequired = element.isRelatedToSurveyQuestion
|
|
26914
|
+
? false
|
|
26915
|
+
: element.options.isRequired;
|
|
26842
26916
|
MultiFile.IsReadonly = element.isRelatedToSurveyQuestion;
|
|
26843
26917
|
MultiFile.ViewType = i6.ControlLayout.Vertical;
|
|
26844
26918
|
MultiFile.IsDisabled = this.options.Readonly;
|
|
26845
|
-
MultiFile.LabelDescription =
|
|
26919
|
+
MultiFile.LabelDescription =
|
|
26920
|
+
this.utilityService.isCurrentLanguageArabic()
|
|
26921
|
+
? element.options.description.arabic
|
|
26922
|
+
: element.options.description.english;
|
|
26846
26923
|
MultiFile.MaxSizeForAllFilesInMB = element.options.maxFileSizeInMB;
|
|
26847
26924
|
MultiFile.MaxNoOfFiles = element.options.maxFileCount;
|
|
26848
26925
|
MultiFile.IsMultipleFile = true;
|
|
@@ -26850,15 +26927,21 @@
|
|
|
26850
26927
|
for (var index_4 = 0; index_4 < element.options.allowedExtensions.length; index_4++) {
|
|
26851
26928
|
var elementValue = element.options.allowedExtensions[index_4];
|
|
26852
26929
|
switch (elementValue) {
|
|
26853
|
-
case
|
|
26930
|
+
case '0':
|
|
26854
26931
|
acceptedTypes.push(i6.FileType.PDF);
|
|
26855
26932
|
break;
|
|
26856
|
-
case
|
|
26933
|
+
case '1':
|
|
26857
26934
|
acceptedTypes.push(i6.FileType.Word);
|
|
26858
26935
|
break;
|
|
26859
|
-
case
|
|
26936
|
+
case '2':
|
|
26860
26937
|
acceptedTypes.push(i6.FileType.Excel);
|
|
26861
26938
|
break;
|
|
26939
|
+
case '3':
|
|
26940
|
+
acceptedTypes.push(i6.FileType.ImageTypes);
|
|
26941
|
+
break;
|
|
26942
|
+
case '15':
|
|
26943
|
+
acceptedTypes.push(i6.FileType.PowerPoint);
|
|
26944
|
+
break;
|
|
26862
26945
|
default:
|
|
26863
26946
|
break;
|
|
26864
26947
|
}
|
|
@@ -26874,30 +26957,42 @@
|
|
|
26874
26957
|
break;
|
|
26875
26958
|
case SurveyOptionType.File.toLocaleLowerCase():
|
|
26876
26959
|
var File = new i6.FileUploadOptions();
|
|
26877
|
-
File.Name =
|
|
26960
|
+
File.Name = 'q' + element.iD_GUID;
|
|
26878
26961
|
File.HideLabel = false;
|
|
26879
26962
|
File.LabelExtraClasses = this.labelClass;
|
|
26880
|
-
File.LabelValue = this.utilityService.isCurrentLanguageArabic()
|
|
26881
|
-
|
|
26963
|
+
File.LabelValue = this.utilityService.isCurrentLanguageArabic()
|
|
26964
|
+
? element.text.arabic + ("." + element.questionTypeItemID)
|
|
26965
|
+
: element.text.english + ("." + element.questionTypeItemID);
|
|
26966
|
+
File.IsRequired = element.isRelatedToSurveyQuestion
|
|
26967
|
+
? false
|
|
26968
|
+
: element.options.isRequired;
|
|
26882
26969
|
File.IsReadonly = element.isRelatedToSurveyQuestion;
|
|
26883
26970
|
File.ViewType = i6.ControlLayout.Vertical;
|
|
26884
26971
|
File.IsDisabled = this.options.Readonly;
|
|
26885
|
-
File.LabelDescription = this.utilityService.isCurrentLanguageArabic()
|
|
26972
|
+
File.LabelDescription = this.utilityService.isCurrentLanguageArabic()
|
|
26973
|
+
? element.options.description.arabic
|
|
26974
|
+
: element.options.description.english;
|
|
26886
26975
|
File.FileMaxSizeInMB = element.options.maxFileSizeInMB;
|
|
26887
26976
|
var acceptedTypesFile = [];
|
|
26888
26977
|
debugger;
|
|
26889
26978
|
for (var index_5 = 0; index_5 < element.options.allowedExtensions.length; index_5++) {
|
|
26890
26979
|
var elementValue = element.options.allowedExtensions[index_5];
|
|
26891
26980
|
switch (elementValue) {
|
|
26892
|
-
case
|
|
26981
|
+
case '0':
|
|
26893
26982
|
acceptedTypesFile.push(i6.FileType.PDF);
|
|
26894
26983
|
break;
|
|
26895
|
-
case
|
|
26984
|
+
case '1':
|
|
26896
26985
|
acceptedTypesFile.push(i6.FileType.Word);
|
|
26897
26986
|
break;
|
|
26898
|
-
case
|
|
26987
|
+
case '2':
|
|
26899
26988
|
acceptedTypesFile.push(i6.FileType.Excel);
|
|
26900
26989
|
break;
|
|
26990
|
+
case '3':
|
|
26991
|
+
acceptedTypesFile.push(i6.FileType.ImageTypes);
|
|
26992
|
+
break;
|
|
26993
|
+
case '15':
|
|
26994
|
+
acceptedTypesFile.push(i6.FileType.PowerPoint);
|
|
26995
|
+
break;
|
|
26901
26996
|
default:
|
|
26902
26997
|
break;
|
|
26903
26998
|
}
|
|
@@ -26914,15 +27009,21 @@
|
|
|
26914
27009
|
//ImageUpload
|
|
26915
27010
|
case SurveyOptionType.Image.toLocaleLowerCase():
|
|
26916
27011
|
var Image = new i6.ImageUploadOptions();
|
|
26917
|
-
Image.Name =
|
|
27012
|
+
Image.Name = 'q' + element.iD_GUID;
|
|
26918
27013
|
Image.HideLabel = false;
|
|
26919
27014
|
Image.LabelExtraClasses = this.labelClass;
|
|
26920
|
-
Image.LabelValue = this.utilityService.isCurrentLanguageArabic()
|
|
26921
|
-
|
|
27015
|
+
Image.LabelValue = this.utilityService.isCurrentLanguageArabic()
|
|
27016
|
+
? element.text.arabic + ("." + element.questionTypeItemID)
|
|
27017
|
+
: element.text.english + ("." + element.questionTypeItemID);
|
|
27018
|
+
Image.IsRequired = element.isRelatedToSurveyQuestion
|
|
27019
|
+
? false
|
|
27020
|
+
: element.options.isRequired;
|
|
26922
27021
|
Image.IsReadonly = element.isRelatedToSurveyQuestion;
|
|
26923
27022
|
Image.ViewType = i6.ControlLayout.Vertical;
|
|
26924
27023
|
Image.IsDisabled = this.options.Readonly;
|
|
26925
|
-
Image.LabelDescription = this.utilityService.isCurrentLanguageArabic()
|
|
27024
|
+
Image.LabelDescription = this.utilityService.isCurrentLanguageArabic()
|
|
27025
|
+
? element.options.description.arabic
|
|
27026
|
+
: element.options.description.english;
|
|
26926
27027
|
if (element.options.maxFileSizeInMB)
|
|
26927
27028
|
Image.FileMaxSizeInMB = element.options.maxFileSizeInMB;
|
|
26928
27029
|
if (element.isRelatedToSurveyQuestion)
|
|
@@ -26934,15 +27035,23 @@
|
|
|
26934
27035
|
//MultilineText
|
|
26935
27036
|
case SurveyOptionType.MultilineText.toLocaleLowerCase():
|
|
26936
27037
|
var MultilineText = new i6.TextAreaOptions();
|
|
26937
|
-
MultilineText.Name =
|
|
27038
|
+
MultilineText.Name = 'q' + element.iD_GUID;
|
|
26938
27039
|
MultilineText.HideLabel = false;
|
|
26939
27040
|
MultilineText.LabelExtraClasses = this.labelClass;
|
|
26940
|
-
MultilineText.LabelValue =
|
|
26941
|
-
|
|
27041
|
+
MultilineText.LabelValue =
|
|
27042
|
+
this.utilityService.isCurrentLanguageArabic()
|
|
27043
|
+
? element.text.arabic + ("." + element.questionTypeItemID)
|
|
27044
|
+
: element.text.english + ("." + element.questionTypeItemID);
|
|
27045
|
+
MultilineText.IsRequired = element.isRelatedToSurveyQuestion
|
|
27046
|
+
? false
|
|
27047
|
+
: element.options.isRequired;
|
|
26942
27048
|
MultilineText.IsReadonly = element.isRelatedToSurveyQuestion;
|
|
26943
27049
|
MultilineText.ViewType = i6.ControlLayout.Vertical;
|
|
26944
27050
|
MultilineText.IsDisabled = this.options.Readonly;
|
|
26945
|
-
MultilineText.LabelDescription =
|
|
27051
|
+
MultilineText.LabelDescription =
|
|
27052
|
+
this.utilityService.isCurrentLanguageArabic()
|
|
27053
|
+
? element.options.description.arabic
|
|
27054
|
+
: element.options.description.english;
|
|
26946
27055
|
if (element.options.maxLength)
|
|
26947
27056
|
MultilineText.MaxLength = element.options.maxLength;
|
|
26948
27057
|
if (element.options.minLength)
|
|
@@ -26952,13 +27061,16 @@
|
|
|
26952
27061
|
MultilineText.Value = element.value.text;
|
|
26953
27062
|
if (element.isRelatedToSurveyQuestion)
|
|
26954
27063
|
this.checkList.push(MultilineText);
|
|
26955
|
-
MultilineText.ForceDirection =
|
|
27064
|
+
MultilineText.ForceDirection =
|
|
27065
|
+
this.utilityService.isCurrentLanguageArabic()
|
|
27066
|
+
? i6.ForceDirection.Arabic
|
|
27067
|
+
: i6.ForceDirection.English;
|
|
26956
27068
|
this.renderComponentService.renderDynamicComponent(viewContainerRef, SurveyFormItemComponent, this.filedGroup, MultilineText, element.options.size);
|
|
26957
27069
|
break;
|
|
26958
27070
|
//HTML
|
|
26959
27071
|
case SurveyOptionType.Boolean.toLocaleLowerCase():
|
|
26960
27072
|
var Boolean = new i6.ToggleSlideOptions();
|
|
26961
|
-
Boolean.Name =
|
|
27073
|
+
Boolean.Name = 'q' + element.iD_GUID;
|
|
26962
27074
|
Boolean.LabelExtraClasses = this.labelClass;
|
|
26963
27075
|
Boolean.ViewType = i6.ControlLayout.Vertical;
|
|
26964
27076
|
Boolean.IsReadonly = element.isRelatedToSurveyQuestion;
|
|
@@ -26968,8 +27080,13 @@
|
|
|
26968
27080
|
Boolean.Value = element.value.boolean;
|
|
26969
27081
|
if (element.isRelatedToSurveyQuestion)
|
|
26970
27082
|
this.checkList.push(Boolean);
|
|
26971
|
-
Boolean.LabelValue = this.utilityService.isCurrentLanguageArabic()
|
|
26972
|
-
|
|
27083
|
+
Boolean.LabelValue = this.utilityService.isCurrentLanguageArabic()
|
|
27084
|
+
? element.text.arabic + ("." + element.questionTypeItemID)
|
|
27085
|
+
: element.text.english + ("." + element.questionTypeItemID);
|
|
27086
|
+
Boolean.LabelDescription =
|
|
27087
|
+
this.utilityService.isCurrentLanguageArabic()
|
|
27088
|
+
? element.options.description.arabic
|
|
27089
|
+
: element.options.description.english;
|
|
26973
27090
|
this.renderComponentService.renderDynamicComponent(viewContainerRef, SurveyFormItemComponent, this.filedGroup, Boolean, element.options.size);
|
|
26974
27091
|
break;
|
|
26975
27092
|
//Location
|
|
@@ -27027,13 +27144,17 @@
|
|
|
27027
27144
|
_this.addShowedChildQuestions(element_1.value);
|
|
27028
27145
|
debugger;
|
|
27029
27146
|
if (filteredItem.isAllowScoring)
|
|
27030
|
-
score = ((_a = filteredItem.questionOptions.filter(function (item) { return item.iD_GUID == element_1.value; })[0]) === null || _a === void 0 ? void 0 : _a.score)
|
|
27147
|
+
score = ((_a = filteredItem.questionOptions.filter(function (item) { return item.iD_GUID == element_1.value; })[0]) === null || _a === void 0 ? void 0 : _a.score)
|
|
27148
|
+
? (_b = filteredItem.questionOptions) === null || _b === void 0 ? void 0 : _b.filter(function (item) { return item.iD_GUID == element_1.value; })[0].score
|
|
27149
|
+
: 0;
|
|
27031
27150
|
break;
|
|
27032
27151
|
case SurveyOptionType.RadioButton.toLocaleLowerCase():
|
|
27033
27152
|
item.SelectedIDs = [element_1.value];
|
|
27034
27153
|
_this.addShowedChildQuestions(element_1.value);
|
|
27035
27154
|
if (filteredItem.isAllowScoring)
|
|
27036
|
-
score = ((_c = filteredItem.questionOptions.filter(function (item) { return item.iD_GUID == element_1.value; })[0]) === null || _c === void 0 ? void 0 : _c.score)
|
|
27155
|
+
score = ((_c = filteredItem.questionOptions.filter(function (item) { return item.iD_GUID == element_1.value; })[0]) === null || _c === void 0 ? void 0 : _c.score)
|
|
27156
|
+
? (_d = filteredItem.questionOptions) === null || _d === void 0 ? void 0 : _d.filter(function (item) { return item.iD_GUID == element_1.value; })[0].score
|
|
27157
|
+
: 0;
|
|
27037
27158
|
break;
|
|
27038
27159
|
case SurveyOptionType.MultipleSelect.toLocaleLowerCase():
|
|
27039
27160
|
item.SelectedIDs = element_1.value;
|
|
@@ -27042,7 +27163,9 @@
|
|
|
27042
27163
|
var item_1 = element_1.value[index];
|
|
27043
27164
|
_this.addShowedChildQuestions(item_1);
|
|
27044
27165
|
if (filteredItem.isAllowScoring) {
|
|
27045
|
-
var scoreValue = ((_e = filteredItem.questionOptions.filter(function (itemOptions) { return itemOptions.iD_GUID == item_1; })[0]) === null || _e === void 0 ? void 0 : _e.score)
|
|
27166
|
+
var scoreValue = ((_e = filteredItem.questionOptions.filter(function (itemOptions) { return itemOptions.iD_GUID == item_1; })[0]) === null || _e === void 0 ? void 0 : _e.score)
|
|
27167
|
+
? (_f = filteredItem.questionOptions) === null || _f === void 0 ? void 0 : _f.filter(function (itemOptions) { return itemOptions.iD_GUID == item_1; })[0].score
|
|
27168
|
+
: 0;
|
|
27046
27169
|
score = scoreValue + score;
|
|
27047
27170
|
}
|
|
27048
27171
|
};
|
|
@@ -27059,7 +27182,9 @@
|
|
|
27059
27182
|
break;
|
|
27060
27183
|
case SurveyOptionType.File.toLocaleLowerCase():
|
|
27061
27184
|
if (element_1.value)
|
|
27062
|
-
item.FileDTO = element_1.value.File
|
|
27185
|
+
item.FileDTO = element_1.value.File
|
|
27186
|
+
? element_1.value.File
|
|
27187
|
+
: element_1.value;
|
|
27063
27188
|
break;
|
|
27064
27189
|
case SurveyOptionType.MultiFile.toLocaleLowerCase():
|
|
27065
27190
|
item.FileCorrelationDTO = element_1.value;
|
|
@@ -27109,9 +27234,16 @@
|
|
|
27109
27234
|
this_2.checkList[index].IsReadonly = false;
|
|
27110
27235
|
if (Question.options.isRequired && !this_2.checkList[index].IsRequired) {
|
|
27111
27236
|
this_2.checkList[index].IsRequired = true;
|
|
27112
|
-
this_2.filedGroup
|
|
27113
|
-
|
|
27114
|
-
|
|
27237
|
+
this_2.filedGroup
|
|
27238
|
+
.get(this_2.checkList[index].Name)
|
|
27239
|
+
.addValidators(i11$1.Validators.required);
|
|
27240
|
+
if (this_2.filedGroup.get(this_2.checkList[index].Name).value == null ||
|
|
27241
|
+
this_2.filedGroup.get(this_2.checkList[index].Name).value ==
|
|
27242
|
+
undefined ||
|
|
27243
|
+
this_2.filedGroup.get(this_2.checkList[index].Name).value == '')
|
|
27244
|
+
this_2.filedGroup
|
|
27245
|
+
.get(this_2.checkList[index].Name)
|
|
27246
|
+
.setErrors({ required: true });
|
|
27115
27247
|
else
|
|
27116
27248
|
this_2.filedGroup.get(this_2.checkList[index].Name).setErrors(null);
|
|
27117
27249
|
}
|
|
@@ -27138,7 +27270,7 @@
|
|
|
27138
27270
|
args: [{
|
|
27139
27271
|
selector: 'survey-form',
|
|
27140
27272
|
templateUrl: './survey-form.component.html',
|
|
27141
|
-
providers: [i11$1.FormGroupDirective]
|
|
27273
|
+
providers: [i11$1.FormGroupDirective],
|
|
27142
27274
|
}]
|
|
27143
27275
|
}], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: i6__namespace.RenderComponentService }, { type: i1__namespace.UtilityService }, { type: i11__namespace$1.FormGroupDirective }]; }, propDecorators: { group: [{
|
|
27144
27276
|
type: i0.Input
|
|
@@ -27186,7 +27318,6 @@
|
|
|
27186
27318
|
this.breadCrumb = [];
|
|
27187
27319
|
this.breadCrumb.push(new i6.BreadCrumb(this.l("Home"), false, "/"), new i6.BreadCrumb(this.l("Survey_Details"), false, "../../../../info/" + this.surveyID), new i6.BreadCrumb(this.l("Preview_Details"), true));
|
|
27188
27320
|
this.pageHeaderOptions = new i6.PageHeaderOptions();
|
|
27189
|
-
this.pageHeaderOptions.TitleValue = this.l("Preview_Details");
|
|
27190
27321
|
this.pageHeaderOptions.SearchTextBox.Active = false;
|
|
27191
27322
|
this.pageHeaderOptions.BreadCrumb.Active = true;
|
|
27192
27323
|
this.pageHeaderOptions.BreadCrumb.BreadCrumbItems = this.breadCrumb;
|
|
@@ -27204,6 +27335,7 @@
|
|
|
27204
27335
|
_this.previewSurveyOptions.OnSuccessHandler = _this.onSuccessDeleteHandler;
|
|
27205
27336
|
_this.previewSurveyOptions.DisableSuccessNotification = true;
|
|
27206
27337
|
_this.surveyInfo = res;
|
|
27338
|
+
_this.pageHeaderOptions.TitleValue = _this.surveyInfo.title.current_FailOver;
|
|
27207
27339
|
if (_this.surveyInfo.declaration.english || _this.surveyInfo.declaration.arabic) {
|
|
27208
27340
|
_this.declarationCheckBoxForm = new i6.CheckBoxOptions();
|
|
27209
27341
|
_this.declarationCheckBoxForm.Name = "declaration";
|
|
@@ -27679,6 +27811,7 @@
|
|
|
27679
27811
|
this.deleteConfirmationOptions.ServiceSubmitFunction = this.delete;
|
|
27680
27812
|
this.deleteConfirmationOptions.OnSuccessHandler = this.onSuccessHandler ? this.onSuccessHandler : this.onSuccessDeleteHandler;
|
|
27681
27813
|
this.deleteConfirmationOptions.DisableSuccessNotification = true;
|
|
27814
|
+
this.deleteConfirmationOptions.ConfirmationHeader = this.l('ContinueConfirmationDeleteSurveyMessage');
|
|
27682
27815
|
this.deleteConfirmationOptions.ConfirmationBody = this.l('ContinueConfirmationMessage');
|
|
27683
27816
|
};
|
|
27684
27817
|
DeleteSurveyComponent.prototype.showDeleteModal = function (id) {
|
|
@@ -27783,7 +27916,9 @@
|
|
|
27783
27916
|
_this.isImage = false;
|
|
27784
27917
|
_this.optionList = [];
|
|
27785
27918
|
_this.errorMessage = null;
|
|
27786
|
-
_this.surveyQuestionService
|
|
27919
|
+
_this.surveyQuestionService
|
|
27920
|
+
.loadAddDropdown(_this.surveyID)
|
|
27921
|
+
.subscribe(function (res) {
|
|
27787
27922
|
var result = res;
|
|
27788
27923
|
_this.Questions = result.questions;
|
|
27789
27924
|
_this.addModelForm = new i11$1.FormGroup({});
|
|
@@ -27791,146 +27926,148 @@
|
|
|
27791
27926
|
_this.addSurveyQuestionFormOptions = new i6.FormOptions();
|
|
27792
27927
|
_this.addSurveyQuestionFormOptions.FormGroup = _this.addModelForm;
|
|
27793
27928
|
_this.addSurveyQuestionFormOptions.GetModelFunction = _this.getAddModel;
|
|
27794
|
-
_this.addSurveyQuestionFormOptions.ServiceSubmitFunction =
|
|
27929
|
+
_this.addSurveyQuestionFormOptions.ServiceSubmitFunction =
|
|
27930
|
+
_this.getAddFunction;
|
|
27795
27931
|
_this.addSurveyQuestionFormOptions.PagingReference = _this.pagingElement;
|
|
27796
|
-
_this.addSurveyQuestionFormOptions.OnSuccessHandler =
|
|
27932
|
+
_this.addSurveyQuestionFormOptions.OnSuccessHandler =
|
|
27933
|
+
_this.onSuccessAddHandler;
|
|
27797
27934
|
_this.addSurveyQuestionFormOptions.DisableSuccessNotification = true;
|
|
27798
27935
|
_this.addQuestion = new i6.MultiLingualTextBoxOptions();
|
|
27799
|
-
_this.addQuestion.Name =
|
|
27800
|
-
_this.addQuestion.ArabicLabelKey =
|
|
27801
|
-
_this.addQuestion.EnglishLabelKey =
|
|
27936
|
+
_this.addQuestion.Name = 'Text';
|
|
27937
|
+
_this.addQuestion.ArabicLabelKey = 'QuestionInArabic';
|
|
27938
|
+
_this.addQuestion.EnglishLabelKey = 'QuestionInEnglish';
|
|
27802
27939
|
_this.addQuestion.IsRequired = true;
|
|
27803
27940
|
_this.addQuestion.MaxLength = 4000;
|
|
27804
27941
|
_this.addQuestion.LanguageMode = _this.getLanguageModeValue();
|
|
27805
27942
|
_this.addDescription = new i6.MultiLingualTextAreaOptions();
|
|
27806
|
-
_this.addDescription.Name =
|
|
27807
|
-
_this.addDescription.ArabicLabelKey =
|
|
27808
|
-
_this.addDescription.EnglishLabelKey =
|
|
27943
|
+
_this.addDescription.Name = 'Description';
|
|
27944
|
+
_this.addDescription.ArabicLabelKey = 'DescriptionInArabic';
|
|
27945
|
+
_this.addDescription.EnglishLabelKey = 'DescriptionInEnglish';
|
|
27809
27946
|
_this.addDescription.IsRequired = false;
|
|
27810
27947
|
_this.addDescription.MaxLength = 250;
|
|
27811
27948
|
_this.addDescription.Rows = 2;
|
|
27812
27949
|
_this.addDescription.LanguageMode = _this.getLanguageModeValue();
|
|
27813
|
-
_this.addDescription.ArabicLabelDescription = _this.l(
|
|
27814
|
-
_this.addDescription.EnglishLabelDescription = _this.l(
|
|
27950
|
+
_this.addDescription.ArabicLabelDescription = _this.l('QuestionDescriptionHintArabic');
|
|
27951
|
+
_this.addDescription.EnglishLabelDescription = _this.l('QuestionDescriptionHintEnglish');
|
|
27815
27952
|
_this.addQuestionType = new i6.DropdownOptions();
|
|
27816
|
-
_this.addQuestionType.Name =
|
|
27817
|
-
_this.addQuestionType.LabelKey =
|
|
27953
|
+
_this.addQuestionType.Name = 'QuestionTypeItemID';
|
|
27954
|
+
_this.addQuestionType.LabelKey = 'Type';
|
|
27818
27955
|
_this.addQuestionType.IsRequired = true;
|
|
27819
27956
|
_this.addQuestionType.AllowSearchFilter = true;
|
|
27820
27957
|
_this.addQuestionType.DataSource = result.optionTypes;
|
|
27821
27958
|
_this.addQuestionType.SingleSelection = true;
|
|
27822
|
-
_this.addQuestionType.NotFoundText = _this.l(
|
|
27959
|
+
_this.addQuestionType.NotFoundText = _this.l('NoResultFound');
|
|
27823
27960
|
_this.audience = new i6.DropdownOptions();
|
|
27824
|
-
_this.audience.Name =
|
|
27825
|
-
_this.audience.LabelKey =
|
|
27961
|
+
_this.audience.Name = 'AudienceItemID';
|
|
27962
|
+
_this.audience.LabelKey = 'Audience';
|
|
27826
27963
|
_this.audience.IsRequired = true;
|
|
27827
27964
|
_this.audience.ViewType = i6.ControlLayout.Vertical;
|
|
27828
27965
|
_this.audience.SingleSelection = true;
|
|
27829
27966
|
_this.audience.ShowCheckbox = false;
|
|
27830
27967
|
_this.audience.DataSource = result.audiences;
|
|
27831
27968
|
_this.audience.SelectedItems = audienceType;
|
|
27832
|
-
_this.audience.LabelDescription = _this.l(
|
|
27969
|
+
_this.audience.LabelDescription = _this.l('AudienceDescriptionHint');
|
|
27833
27970
|
_this.addSize = new i6.DropdownOptions();
|
|
27834
|
-
_this.addSize.Name =
|
|
27835
|
-
_this.addSize.LabelKey =
|
|
27971
|
+
_this.addSize.Name = 'Size';
|
|
27972
|
+
_this.addSize.LabelKey = 'Size';
|
|
27836
27973
|
_this.addSize.IsRequired = true;
|
|
27837
27974
|
_this.addSize.AllowSearchFilter = true;
|
|
27838
27975
|
_this.addSize.DataSource = _this.SizeList;
|
|
27839
27976
|
_this.addSize.SingleSelection = true;
|
|
27840
27977
|
_this.addSize.SelectedItems = 12;
|
|
27841
|
-
_this.addSize.NotFoundText = _this.l(
|
|
27978
|
+
_this.addSize.NotFoundText = _this.l('NoResultFound');
|
|
27842
27979
|
_this.addRequired = new i6.ToggleSlideOptions();
|
|
27843
|
-
_this.addRequired.Name =
|
|
27844
|
-
_this.addRequired.LabelKey =
|
|
27845
|
-
_this.addRequired.LabelDescription = _this.l(
|
|
27980
|
+
_this.addRequired.Name = 'IsRequired';
|
|
27981
|
+
_this.addRequired.LabelKey = 'IsRequired';
|
|
27982
|
+
_this.addRequired.LabelDescription = _this.l('RequiredDescriptionHint');
|
|
27846
27983
|
_this.addAllowScore = new i6.ToggleSlideOptions();
|
|
27847
|
-
_this.addAllowScore.Name =
|
|
27848
|
-
_this.addAllowScore.LabelKey =
|
|
27849
|
-
_this.addAllowScore.LabelDescription = _this.l(
|
|
27984
|
+
_this.addAllowScore.Name = 'IsAllowScoring';
|
|
27985
|
+
_this.addAllowScore.LabelKey = 'AllowScore';
|
|
27986
|
+
_this.addAllowScore.LabelDescription = _this.l('AllowScoreDescription');
|
|
27850
27987
|
_this.addHasSearch = new i6.ToggleSlideOptions();
|
|
27851
|
-
_this.addHasSearch.Name =
|
|
27852
|
-
_this.addHasSearch.LabelKey =
|
|
27988
|
+
_this.addHasSearch.Name = 'HasSearch';
|
|
27989
|
+
_this.addHasSearch.LabelKey = 'HasSearch';
|
|
27853
27990
|
_this.addIsActive = new i6.ToggleSlideOptions();
|
|
27854
|
-
_this.addIsActive.Name =
|
|
27855
|
-
_this.addIsActive.LabelKey =
|
|
27991
|
+
_this.addIsActive.Name = 'IsVisible';
|
|
27992
|
+
_this.addIsActive.LabelKey = 'Visible';
|
|
27856
27993
|
_this.addIsActive.Value = true;
|
|
27857
|
-
_this.addIsActive.LabelDescription = _this.l(
|
|
27994
|
+
_this.addIsActive.LabelDescription = _this.l('GenericVisibleHint');
|
|
27858
27995
|
_this.addMaxLength = new i6.TextBoxOptions();
|
|
27859
|
-
_this.addMaxLength.Name =
|
|
27860
|
-
_this.addMaxLength.LabelKey =
|
|
27996
|
+
_this.addMaxLength.Name = 'MaxLength';
|
|
27997
|
+
_this.addMaxLength.LabelKey = 'MaxLength';
|
|
27861
27998
|
_this.addMaxLength.IsRequired = true;
|
|
27862
27999
|
_this.addMaxLength.NumberRange = new i6.RangeNumber();
|
|
27863
|
-
_this.addMaxLength.NumberRange.From = 1;
|
|
27864
|
-
_this.addMaxLength.NumberRange.To = 4000;
|
|
27865
28000
|
_this.addMaxLength.Type = i6.InputType.Number;
|
|
28001
|
+
_this.addMaxLength.LabelDescription = _this.l('MaxHint');
|
|
27866
28002
|
_this.addMinLength = new i6.TextBoxOptions();
|
|
27867
|
-
_this.addMinLength.Name =
|
|
27868
|
-
_this.addMinLength.LabelKey =
|
|
28003
|
+
_this.addMinLength.Name = 'MinLength';
|
|
28004
|
+
_this.addMinLength.LabelKey = 'MinLength';
|
|
27869
28005
|
_this.addMinLength.IsRequired = true;
|
|
27870
28006
|
_this.addMinLength.NumberRange = new i6.RangeNumber();
|
|
27871
|
-
_this.addMinLength.NumberRange.From = 1;
|
|
27872
|
-
_this.addMinLength.NumberRange.To = 4000;
|
|
27873
28007
|
_this.addMinLength.Type = i6.InputType.Number;
|
|
28008
|
+
_this.addMinLength.LabelDescription = _this.l('MinHint');
|
|
27874
28009
|
_this.addRowsNumber = new i6.TextBoxOptions();
|
|
27875
|
-
_this.addRowsNumber.Name =
|
|
27876
|
-
_this.addRowsNumber.LabelKey =
|
|
28010
|
+
_this.addRowsNumber.Name = 'Rows';
|
|
28011
|
+
_this.addRowsNumber.LabelKey = 'Rows';
|
|
27877
28012
|
_this.addRowsNumber.IsRequired = true;
|
|
27878
28013
|
_this.addRowsNumber.NumberRange = new i6.RangeNumber();
|
|
27879
28014
|
_this.addRowsNumber.NumberRange.From = 1;
|
|
27880
28015
|
_this.addRowsNumber.NumberRange.To = 20;
|
|
27881
28016
|
_this.addRowsNumber.Type = i6.InputType.Number;
|
|
27882
28017
|
_this.addMaxFileSize = new i6.TextBoxOptions();
|
|
27883
|
-
_this.addMaxFileSize.Name =
|
|
27884
|
-
_this.addMaxFileSize.LabelKey =
|
|
28018
|
+
_this.addMaxFileSize.Name = 'MaxFileSizeInMB';
|
|
28019
|
+
_this.addMaxFileSize.LabelKey = 'MaxFileSizeInMB';
|
|
27885
28020
|
_this.addMaxFileSize.IsRequired = true;
|
|
27886
28021
|
_this.addMaxFileSize.NumberRange = new i6.RangeNumber();
|
|
27887
28022
|
_this.addMaxFileSize.NumberRange.From = 1;
|
|
27888
28023
|
_this.addMaxFileSize.NumberRange.To = 100;
|
|
27889
28024
|
_this.addMaxFileSize.Type = i6.InputType.Number;
|
|
27890
28025
|
_this.addMaxFileCount = new i6.TextBoxOptions();
|
|
27891
|
-
_this.addMaxFileCount.Name =
|
|
27892
|
-
_this.addMaxFileCount.LabelKey =
|
|
28026
|
+
_this.addMaxFileCount.Name = 'MaxFileCount';
|
|
28027
|
+
_this.addMaxFileCount.LabelKey = 'MaxFilesCount';
|
|
27893
28028
|
_this.addMaxFileCount.IsRequired = true;
|
|
27894
28029
|
_this.addMaxFileCount.NumberRange = new i6.RangeNumber();
|
|
27895
28030
|
_this.addMaxFileCount.NumberRange.From = 1;
|
|
27896
28031
|
_this.addMaxFileCount.NumberRange.To = 50;
|
|
27897
28032
|
_this.addMaxFileCount.Type = i6.InputType.Number;
|
|
28033
|
+
_this.addMaxFileCount.LabelDescription = _this.l('MaxFileCountHint');
|
|
27898
28034
|
_this.addMaxFileCount.CustomValidation = [_this.numberValidation];
|
|
27899
28035
|
_this.addFilesExtensions = new i6.DropdownOptions();
|
|
27900
|
-
_this.addFilesExtensions.Name =
|
|
27901
|
-
_this.addFilesExtensions.LabelKey =
|
|
28036
|
+
_this.addFilesExtensions.Name = 'AllowedExtensions';
|
|
28037
|
+
_this.addFilesExtensions.LabelKey = 'Extensions';
|
|
27902
28038
|
_this.addFilesExtensions.IsRequired = true;
|
|
27903
28039
|
_this.addFilesExtensions.AllowSearchFilter = true;
|
|
27904
28040
|
_this.addFilesExtensions.DataSource = result.extensions;
|
|
27905
28041
|
_this.addFilesExtensions.SingleSelection = false;
|
|
27906
|
-
_this.addFilesExtensions.
|
|
27907
|
-
|
|
28042
|
+
_this.addFilesExtensions.LabelDescription = _this.l('ExtensionHint');
|
|
28043
|
+
_this.addFilesExtensions.NotFoundText = _this.l('NoResultFound');
|
|
28044
|
+
_this.addModelForm.addValidators(_this.fromTo('MinLength', 'MaxLength'));
|
|
27908
28045
|
_this.addNameOption = new i6.MultiLingualTextBoxOptions();
|
|
27909
|
-
_this.addNameOption.Name =
|
|
27910
|
-
_this.addNameOption.ArabicLabelKey =
|
|
27911
|
-
_this.addNameOption.EnglishLabelKey =
|
|
28046
|
+
_this.addNameOption.Name = 'NameOption';
|
|
28047
|
+
_this.addNameOption.ArabicLabelKey = 'NameInArabic';
|
|
28048
|
+
_this.addNameOption.EnglishLabelKey = 'NameInEnglish';
|
|
27912
28049
|
_this.addNameOption.IsRequired = true;
|
|
27913
28050
|
_this.addNameOption.MaxLength = 225;
|
|
27914
28051
|
_this.addNameOption.LanguageMode = _this.getLanguageModeValue();
|
|
27915
28052
|
_this.displayOrderOption = new i6.TextBoxOptions();
|
|
27916
|
-
_this.displayOrderOption.Name =
|
|
28053
|
+
_this.displayOrderOption.Name = 'DisplayOrder';
|
|
27917
28054
|
_this.scoreNumber = new i6.TextBoxOptions();
|
|
27918
|
-
_this.scoreNumber.Name =
|
|
27919
|
-
_this.scoreNumber.LabelKey =
|
|
28055
|
+
_this.scoreNumber.Name = 'Score';
|
|
28056
|
+
_this.scoreNumber.LabelKey = 'Score';
|
|
27920
28057
|
_this.scoreNumber.IsRequired = true;
|
|
27921
28058
|
_this.scoreNumber.Type = i6.InputType.Number;
|
|
27922
28059
|
var rangeNumber = new i6.RangeNumber();
|
|
27923
28060
|
rangeNumber.To = 1000000;
|
|
27924
|
-
rangeNumber.From =
|
|
28061
|
+
rangeNumber.From = 1;
|
|
27925
28062
|
_this.scoreNumber.NumberRange = rangeNumber;
|
|
27926
28063
|
_this.addOptionLinkedQuestions = new i6.DropdownOptions();
|
|
27927
|
-
_this.addOptionLinkedQuestions.Name =
|
|
27928
|
-
_this.addOptionLinkedQuestions.LabelKey =
|
|
28064
|
+
_this.addOptionLinkedQuestions.Name = 'LinkedQuestions';
|
|
28065
|
+
_this.addOptionLinkedQuestions.LabelKey = 'LinkedQuestions';
|
|
27929
28066
|
_this.addOptionLinkedQuestions.AllowSearchFilter = true;
|
|
27930
28067
|
_this.addOptionLinkedQuestions.DataSource = result.questions;
|
|
27931
28068
|
_this.addOptionLinkedQuestions.SingleSelection = false;
|
|
27932
|
-
_this.addOptionLinkedQuestions.NotFoundText = _this.l(
|
|
27933
|
-
_this.addOptionLinkedQuestions.LabelDescription = _this.l(
|
|
28069
|
+
_this.addOptionLinkedQuestions.NotFoundText = _this.l('NoResultFound');
|
|
28070
|
+
_this.addOptionLinkedQuestions.LabelDescription = _this.l('LinkedQuestionDescriptionHint');
|
|
27934
28071
|
_this.openModal(_this.AddModal, 'xl');
|
|
27935
28072
|
_this.stopBlockUI();
|
|
27936
28073
|
});
|
|
@@ -27940,12 +28077,16 @@
|
|
|
27940
28077
|
var resultOptionModel = _this.addOptionForm.value;
|
|
27941
28078
|
var resultModel = _this.addModelForm.value;
|
|
27942
28079
|
if (_this.isSelect) {
|
|
27943
|
-
if ((resultOptionModel.NameOption.Arabic != undefined &&
|
|
27944
|
-
|
|
28080
|
+
if ((resultOptionModel.NameOption.Arabic != undefined &&
|
|
28081
|
+
resultOptionModel.NameOption.Arabic != '') ||
|
|
28082
|
+
(resultOptionModel.NameOption.English != undefined &&
|
|
28083
|
+
resultOptionModel.NameOption.English != '') ||
|
|
28084
|
+
(resultOptionModel.Score != undefined && resultOptionModel.Score > 0)) {
|
|
28085
|
+
_this.errorMessage = _this.l('OptionPendingDataErrorMessage');
|
|
27945
28086
|
return;
|
|
27946
28087
|
}
|
|
27947
28088
|
if (_this.optionList.length == 0 && _this.isSelect) {
|
|
27948
|
-
_this.errorMessage = _this.l(
|
|
28089
|
+
_this.errorMessage = _this.l('OptionErrorMessage');
|
|
27949
28090
|
return;
|
|
27950
28091
|
}
|
|
27951
28092
|
}
|
|
@@ -28007,12 +28148,12 @@
|
|
|
28007
28148
|
return null;
|
|
28008
28149
|
}
|
|
28009
28150
|
if (!control.value.toString().match(/^[0-9]*$/)) {
|
|
28010
|
-
_this.numberValidation.massage = _this.l(
|
|
28011
|
-
return {
|
|
28151
|
+
_this.numberValidation.massage = _this.l('IntegerNumberValidationKey');
|
|
28152
|
+
return { customerError: true };
|
|
28012
28153
|
}
|
|
28013
28154
|
if (!control.value.toString().match(/^[+]?([.]\d+|\d+[.]?\d*)$/)) {
|
|
28014
|
-
_this.numberValidation.massage = _this.l(
|
|
28015
|
-
return {
|
|
28155
|
+
_this.numberValidation.massage = _this.l('PositiveNumberValidationKey');
|
|
28156
|
+
return { customerError: true };
|
|
28016
28157
|
}
|
|
28017
28158
|
return null;
|
|
28018
28159
|
};
|
|
@@ -28025,11 +28166,44 @@
|
|
|
28025
28166
|
this.addOptionForm.controls['Score'].updateValueAndValidity();
|
|
28026
28167
|
}
|
|
28027
28168
|
};
|
|
28169
|
+
AddQuestionComponent.prototype.updateLengthValidator = function (name, max, min) {
|
|
28170
|
+
var control = this.addOptionForm.controls[name];
|
|
28171
|
+
if (control) {
|
|
28172
|
+
control.setErrors(null);
|
|
28173
|
+
control.clearValidators();
|
|
28174
|
+
control.updateValueAndValidity();
|
|
28175
|
+
var validationRules = [];
|
|
28176
|
+
validationRules.push(i11$1.Validators.min(min));
|
|
28177
|
+
validationRules.push(i11$1.Validators.max(max));
|
|
28178
|
+
validationRules.push(i11$1.Validators.required);
|
|
28179
|
+
control.addValidators(validationRules);
|
|
28180
|
+
control.updateValueAndValidity();
|
|
28181
|
+
}
|
|
28182
|
+
};
|
|
28028
28183
|
AddQuestionComponent.prototype.changeDataType = function (key) {
|
|
28029
28184
|
this.updateFormStatus(key);
|
|
28030
28185
|
switch (key) {
|
|
28031
28186
|
case SurveyOptionType.Text:
|
|
28187
|
+
this.updateLengthValidator(this.addMaxLength.Name, 255, 1);
|
|
28188
|
+
this.updateLengthValidator(this.addMinLength.Name, 255, 1);
|
|
28189
|
+
this.addMaxLength.NumberRange.From = 1;
|
|
28190
|
+
this.addMaxLength.NumberRange.To = 255;
|
|
28191
|
+
this.addMinLength.NumberRange.From = 1;
|
|
28192
|
+
this.addMinLength.NumberRange.To = 255;
|
|
28193
|
+
this.isText = true;
|
|
28194
|
+
this.isNumber = false;
|
|
28195
|
+
this.isFile = false;
|
|
28196
|
+
this.isMultiFile = false;
|
|
28197
|
+
this.isImage = false;
|
|
28198
|
+
this.isSelect = false;
|
|
28199
|
+
break;
|
|
28032
28200
|
case SurveyOptionType.MultilineText:
|
|
28201
|
+
this.updateLengthValidator(this.addMaxLength.Name, 4000, 1);
|
|
28202
|
+
this.updateLengthValidator(this.addMinLength.Name, 4000, 1);
|
|
28203
|
+
this.addMaxLength.NumberRange.From = 1;
|
|
28204
|
+
this.addMaxLength.NumberRange.To = 4000;
|
|
28205
|
+
this.addMinLength.NumberRange.From = 1;
|
|
28206
|
+
this.addMinLength.NumberRange.To = 4000;
|
|
28033
28207
|
this.isText = true;
|
|
28034
28208
|
this.isNumber = false;
|
|
28035
28209
|
this.isFile = false;
|
|
@@ -28038,6 +28212,12 @@
|
|
|
28038
28212
|
this.isSelect = false;
|
|
28039
28213
|
break;
|
|
28040
28214
|
case SurveyOptionType.Number:
|
|
28215
|
+
this.updateLengthValidator(this.addMaxLength.Name, 100, 1);
|
|
28216
|
+
this.updateLengthValidator(this.addMinLength.Name, 100, 1);
|
|
28217
|
+
this.addMaxLength.NumberRange.From = 1;
|
|
28218
|
+
this.addMaxLength.NumberRange.To = 100;
|
|
28219
|
+
this.addMinLength.NumberRange.From = 1;
|
|
28220
|
+
this.addMinLength.NumberRange.To = 100;
|
|
28041
28221
|
this.isNumber = true;
|
|
28042
28222
|
this.isText = false;
|
|
28043
28223
|
this.isFile = false;
|
|
@@ -28104,11 +28284,11 @@
|
|
|
28104
28284
|
for (var index = 0; index < this.optionList.length; index++) {
|
|
28105
28285
|
var element = this.optionList[index].Score;
|
|
28106
28286
|
if (element > 1000000) {
|
|
28107
|
-
this.errorMessage = this.l(
|
|
28287
|
+
this.errorMessage = this.l('MaxOptionScoreErrorMessage');
|
|
28108
28288
|
return;
|
|
28109
28289
|
}
|
|
28110
|
-
if (element <
|
|
28111
|
-
this.errorMessage = this.l(
|
|
28290
|
+
if (element < 1) {
|
|
28291
|
+
this.errorMessage = this.l('MinOptionScoreErrorMessage');
|
|
28112
28292
|
return;
|
|
28113
28293
|
}
|
|
28114
28294
|
}
|
|
@@ -28127,11 +28307,11 @@
|
|
|
28127
28307
|
if (this.showScoreOption)
|
|
28128
28308
|
option.Score = Number.parseFloat(resultModel.Score);
|
|
28129
28309
|
this.addOptionForm.reset();
|
|
28130
|
-
this.addOptionForm.controls[
|
|
28131
|
-
this.addOptionForm.controls[
|
|
28132
|
-
this.addOptionForm.controls[
|
|
28310
|
+
this.addOptionForm.controls['NameOption'].reset();
|
|
28311
|
+
this.addOptionForm.controls['DisplayOrder'].reset();
|
|
28312
|
+
this.addOptionForm.controls['LinkedQuestions'].reset();
|
|
28133
28313
|
if (this.showScoreOption)
|
|
28134
|
-
this.addOptionForm.controls[
|
|
28314
|
+
this.addOptionForm.controls['Score'].reset();
|
|
28135
28315
|
this.optionList.splice(option.DisplayOrder - 1, 0, option);
|
|
28136
28316
|
this.showOptionList = true;
|
|
28137
28317
|
this.isOptionInEditMode = false;
|
|
@@ -28145,7 +28325,8 @@
|
|
|
28145
28325
|
AddQuestionComponent.prototype.editOption = function (option) {
|
|
28146
28326
|
var _a, _b;
|
|
28147
28327
|
debugger;
|
|
28148
|
-
if ((this.addOptionForm.touched == true && this.addOptionForm.valid) ||
|
|
28328
|
+
if ((this.addOptionForm.touched == true && this.addOptionForm.valid) ||
|
|
28329
|
+
this.addOptionForm.touched == false)
|
|
28149
28330
|
this.AddOption();
|
|
28150
28331
|
else {
|
|
28151
28332
|
this.addOptionForm.markAllAsTouched();
|
|
@@ -28154,11 +28335,11 @@
|
|
|
28154
28335
|
var name = new i6.EnglishArabicDTO();
|
|
28155
28336
|
name.Arabic = (_a = option.Name.Arabic) !== null && _a !== void 0 ? _a : null;
|
|
28156
28337
|
name.English = (_b = option.Name.English) !== null && _b !== void 0 ? _b : null;
|
|
28157
|
-
this.addOptionForm.controls[
|
|
28158
|
-
this.addOptionForm.controls[
|
|
28159
|
-
this.addOptionForm.controls[
|
|
28338
|
+
this.addOptionForm.controls['NameOption'].setValue(name);
|
|
28339
|
+
this.addOptionForm.controls['DisplayOrder'].setValue(option.DisplayOrder);
|
|
28340
|
+
this.addOptionForm.controls['LinkedQuestions'].setValue(option.LinkedQuestions);
|
|
28160
28341
|
if (this.showScoreOption)
|
|
28161
|
-
this.addOptionForm.controls[
|
|
28342
|
+
this.addOptionForm.controls['Score'].setValue(option.Score);
|
|
28162
28343
|
this.optionList = this.optionList.filter(function (item) { return item != option; });
|
|
28163
28344
|
this.isOptionInEditMode = true;
|
|
28164
28345
|
};
|
|
@@ -28167,14 +28348,23 @@
|
|
|
28167
28348
|
return function (formGroup) {
|
|
28168
28349
|
var fromDate = formGroup.get(fromField);
|
|
28169
28350
|
var toDate = formGroup.get(toField);
|
|
28170
|
-
if (
|
|
28171
|
-
if (
|
|
28351
|
+
if (fromDate !== null && toDate !== null) {
|
|
28352
|
+
if (fromDate.value !== null &&
|
|
28353
|
+
toDate.value !== null &&
|
|
28354
|
+
parseInt(fromDate.value) > parseInt(toDate.value)) {
|
|
28172
28355
|
fromDate.markAsTouched();
|
|
28173
28356
|
toDate.markAsTouched();
|
|
28174
|
-
toDate.setErrors({
|
|
28357
|
+
toDate.setErrors({
|
|
28358
|
+
errorMassage: _this.l('GreaterThanOrEqualTo'),
|
|
28359
|
+
});
|
|
28175
28360
|
return null;
|
|
28176
28361
|
}
|
|
28177
|
-
|
|
28362
|
+
if (fromDate.value !== null &&
|
|
28363
|
+
toDate.value !== null &&
|
|
28364
|
+
parseInt(fromDate.value) < parseInt(toDate.value) &&
|
|
28365
|
+
parseInt(toDate.value) < 255 &&
|
|
28366
|
+
parseInt(fromDate.value) < 255)
|
|
28367
|
+
toDate.setErrors(null);
|
|
28178
28368
|
}
|
|
28179
28369
|
return null;
|
|
28180
28370
|
};
|
|
@@ -28296,7 +28486,7 @@
|
|
|
28296
28486
|
type: i0.Component,
|
|
28297
28487
|
args: [{
|
|
28298
28488
|
selector: 'app-add-question',
|
|
28299
|
-
templateUrl: './add-question.component.html'
|
|
28489
|
+
templateUrl: './add-question.component.html',
|
|
28300
28490
|
}]
|
|
28301
28491
|
}], ctorParameters: function () { return [{ type: i0__namespace.Injector }, { type: SurveyQuestionService }, { type: i2__namespace.NgWizardService }]; }, propDecorators: { AddModal: [{
|
|
28302
28492
|
type: i0.ViewChild,
|
|
@@ -28356,31 +28546,33 @@
|
|
|
28356
28546
|
_this.editSurveyQuestionFormOptions = new i6.FormOptions();
|
|
28357
28547
|
_this.editSurveyQuestionFormOptions.FormGroup = _this.editModelForm;
|
|
28358
28548
|
_this.editSurveyQuestionFormOptions.GetModelFunction = _this.getEditModel;
|
|
28359
|
-
_this.editSurveyQuestionFormOptions.ServiceSubmitFunction =
|
|
28549
|
+
_this.editSurveyQuestionFormOptions.ServiceSubmitFunction =
|
|
28550
|
+
_this.getEditFunction;
|
|
28360
28551
|
_this.editSurveyQuestionFormOptions.PagingReference = _this.pagingElement;
|
|
28361
|
-
_this.editSurveyQuestionFormOptions.OnSuccessHandler =
|
|
28552
|
+
_this.editSurveyQuestionFormOptions.OnSuccessHandler =
|
|
28553
|
+
_this.onSuccessEditHandler;
|
|
28362
28554
|
_this.editSurveyQuestionFormOptions.DisableSuccessNotification = true;
|
|
28363
28555
|
var text = new i6.EnglishArabicDTO();
|
|
28364
28556
|
text.Arabic = _this.question.text.arabic;
|
|
28365
28557
|
text.English = _this.question.text.english;
|
|
28366
28558
|
_this.editQuestion = new i6.MultiLingualTextBoxOptions();
|
|
28367
|
-
_this.editQuestion.Name =
|
|
28368
|
-
_this.editQuestion.ArabicLabelKey =
|
|
28369
|
-
_this.editQuestion.EnglishLabelKey =
|
|
28559
|
+
_this.editQuestion.Name = 'Text';
|
|
28560
|
+
_this.editQuestion.ArabicLabelKey = 'QuestionInArabic';
|
|
28561
|
+
_this.editQuestion.EnglishLabelKey = 'QuestionInEnglish';
|
|
28370
28562
|
_this.editQuestion.IsRequired = true;
|
|
28371
28563
|
_this.editQuestion.MaxLength = 4000;
|
|
28372
28564
|
_this.editQuestion.LanguageMode = _this.getLanguageModeValue();
|
|
28373
28565
|
_this.editQuestion.Value = text;
|
|
28374
28566
|
_this.editQuestion.IsDisabled = isViewOnly;
|
|
28375
28567
|
_this.editDescription = new i6.MultiLingualTextAreaOptions();
|
|
28376
|
-
_this.editDescription.Name =
|
|
28377
|
-
_this.editDescription.ArabicLabelKey =
|
|
28378
|
-
_this.editDescription.EnglishLabelKey =
|
|
28568
|
+
_this.editDescription.Name = 'Description';
|
|
28569
|
+
_this.editDescription.ArabicLabelKey = 'DescriptionInArabic';
|
|
28570
|
+
_this.editDescription.EnglishLabelKey = 'DescriptionInEnglish';
|
|
28379
28571
|
_this.editDescription.IsRequired = false;
|
|
28380
28572
|
_this.editDescription.MaxLength = 250;
|
|
28381
28573
|
_this.editDescription.Rows = 2;
|
|
28382
|
-
_this.editDescription.ArabicLabelDescription = _this.l(
|
|
28383
|
-
_this.editDescription.EnglishLabelDescription = _this.l(
|
|
28574
|
+
_this.editDescription.ArabicLabelDescription = _this.l('QuestionDescriptionHintArabic');
|
|
28575
|
+
_this.editDescription.EnglishLabelDescription = _this.l('QuestionDescriptionHintEnglish');
|
|
28384
28576
|
_this.editDescription.IsDisabled = isViewOnly;
|
|
28385
28577
|
_this.editDescription.LanguageMode = _this.getLanguageModeValue();
|
|
28386
28578
|
var description = new i6.EnglishArabicDTO();
|
|
@@ -28388,59 +28580,59 @@
|
|
|
28388
28580
|
description.English = _this.question.description.english;
|
|
28389
28581
|
_this.editDescription.Value = description;
|
|
28390
28582
|
_this.editQuestionType = new i6.DropdownOptions();
|
|
28391
|
-
_this.editQuestionType.Name =
|
|
28392
|
-
_this.editQuestionType.LabelKey =
|
|
28583
|
+
_this.editQuestionType.Name = 'QuestionTypeItemID';
|
|
28584
|
+
_this.editQuestionType.LabelKey = 'PropertyType';
|
|
28393
28585
|
_this.editQuestionType.IsRequired = true;
|
|
28394
28586
|
_this.editQuestionType.AllowSearchFilter = true;
|
|
28395
28587
|
_this.editQuestionType.DataSource = result.optionTypes;
|
|
28396
28588
|
_this.editQuestionType.SingleSelection = true;
|
|
28397
28589
|
_this.editQuestionType.SelectedItems = _this.question.questionTypeItemID;
|
|
28398
|
-
_this.editQuestionType.NotFoundText = _this.l(
|
|
28590
|
+
_this.editQuestionType.NotFoundText = _this.l('NoResultFound');
|
|
28399
28591
|
_this.editQuestionType.IsDisabled = true;
|
|
28400
28592
|
_this.audience = new i6.DropdownOptions();
|
|
28401
|
-
_this.audience.Name =
|
|
28402
|
-
_this.audience.LabelKey =
|
|
28593
|
+
_this.audience.Name = 'AudienceItemID';
|
|
28594
|
+
_this.audience.LabelKey = 'Audience';
|
|
28403
28595
|
_this.audience.IsRequired = true;
|
|
28404
28596
|
_this.audience.ViewType = i6.ControlLayout.Vertical;
|
|
28405
28597
|
_this.audience.SingleSelection = true;
|
|
28406
28598
|
_this.audience.ShowCheckbox = false;
|
|
28407
28599
|
_this.audience.DataSource = result.audiences;
|
|
28408
28600
|
_this.audience.SelectedItems = _this.question.audienceItemID;
|
|
28409
|
-
_this.audience.LabelDescription = _this.l(
|
|
28601
|
+
_this.audience.LabelDescription = _this.l('AudienceDescriptionHint');
|
|
28410
28602
|
_this.audience.IsDisabled = isViewOnly;
|
|
28411
28603
|
_this.editSize = new i6.DropdownOptions();
|
|
28412
|
-
_this.editSize.Name =
|
|
28413
|
-
_this.editSize.LabelKey =
|
|
28604
|
+
_this.editSize.Name = 'Size';
|
|
28605
|
+
_this.editSize.LabelKey = 'Size';
|
|
28414
28606
|
_this.editSize.IsRequired = true;
|
|
28415
28607
|
_this.editSize.AllowSearchFilter = true;
|
|
28416
28608
|
_this.editSize.DataSource = _this.SizeList;
|
|
28417
28609
|
_this.editSize.SingleSelection = true;
|
|
28418
28610
|
_this.editSize.SelectedItems = _this.question.options.size;
|
|
28419
|
-
_this.editSize.NotFoundText = _this.l(
|
|
28611
|
+
_this.editSize.NotFoundText = _this.l('NoResultFound');
|
|
28420
28612
|
_this.editSize.IsDisabled = isViewOnly;
|
|
28421
28613
|
_this.editRequired = new i6.ToggleSlideOptions();
|
|
28422
|
-
_this.editRequired.Name =
|
|
28423
|
-
_this.editRequired.LabelKey =
|
|
28614
|
+
_this.editRequired.Name = 'IsRequired';
|
|
28615
|
+
_this.editRequired.LabelKey = 'IsRequired';
|
|
28424
28616
|
_this.editRequired.Value = _this.question.isRequired;
|
|
28425
|
-
_this.editRequired.LabelDescription = _this.l(
|
|
28617
|
+
_this.editRequired.LabelDescription = _this.l('RequiredDescriptionHint');
|
|
28426
28618
|
_this.editRequired.IsDisabled = isViewOnly;
|
|
28427
28619
|
_this.editAllowScore = new i6.ToggleSlideOptions();
|
|
28428
|
-
_this.editAllowScore.Name =
|
|
28429
|
-
_this.editAllowScore.LabelKey =
|
|
28620
|
+
_this.editAllowScore.Name = 'IsAllowScoring';
|
|
28621
|
+
_this.editAllowScore.LabelKey = 'AllowScore';
|
|
28430
28622
|
_this.editAllowScore.Value = _this.question.isAllowScoring;
|
|
28431
|
-
_this.editAllowScore.LabelDescription = _this.l(
|
|
28432
|
-
_this.editAllowScore.LabelDescription = _this.l(
|
|
28623
|
+
_this.editAllowScore.LabelDescription = _this.l('AllowScoreDescription');
|
|
28624
|
+
_this.editAllowScore.LabelDescription = _this.l('AllowScoreDescription');
|
|
28433
28625
|
_this.editAllowScore.IsDisabled = isViewOnly;
|
|
28434
28626
|
_this.editHasSearch = new i6.ToggleSlideOptions();
|
|
28435
|
-
_this.editHasSearch.Name =
|
|
28436
|
-
_this.editHasSearch.LabelKey =
|
|
28627
|
+
_this.editHasSearch.Name = 'HasSearch';
|
|
28628
|
+
_this.editHasSearch.LabelKey = 'HasSearch';
|
|
28437
28629
|
_this.editHasSearch.IsDisabled = isViewOnly;
|
|
28438
28630
|
_this.editIsActive = new i6.ToggleSlideOptions();
|
|
28439
|
-
_this.editIsActive.Name =
|
|
28440
|
-
_this.editIsActive.LabelKey =
|
|
28631
|
+
_this.editIsActive.Name = 'IsVisible';
|
|
28632
|
+
_this.editIsActive.LabelKey = 'Visible';
|
|
28441
28633
|
_this.editIsActive.Value = true;
|
|
28442
28634
|
_this.editIsActive.Value = _this.question.isVisible;
|
|
28443
|
-
_this.editIsActive.LabelDescription = _this.l(
|
|
28635
|
+
_this.editIsActive.LabelDescription = _this.l('VisibleDescriptionHint');
|
|
28444
28636
|
_this.editIsActive.IsDisabled = isViewOnly;
|
|
28445
28637
|
// this.editDisplayOrder = new TextBoxOptions();
|
|
28446
28638
|
// this.editDisplayOrder.Name = "DisplayOrder";
|
|
@@ -28452,28 +28644,26 @@
|
|
|
28452
28644
|
// this.editDisplayOrder.Value = this.question.displayOrder;
|
|
28453
28645
|
// this.editDisplayOrder.CustomValidation = [this.numberValidation];
|
|
28454
28646
|
_this.editMaxLength = new i6.TextBoxOptions();
|
|
28455
|
-
_this.editMaxLength.Name =
|
|
28456
|
-
_this.editMaxLength.LabelKey =
|
|
28647
|
+
_this.editMaxLength.Name = 'MaxLength';
|
|
28648
|
+
_this.editMaxLength.LabelKey = 'MaxLength';
|
|
28457
28649
|
_this.editMaxLength.IsRequired = true;
|
|
28458
28650
|
_this.editMaxLength.NumberRange = new i6.RangeNumber();
|
|
28459
|
-
_this.editMaxLength.NumberRange.From = 1;
|
|
28460
|
-
_this.editMaxLength.NumberRange.To = 4000;
|
|
28461
28651
|
_this.editMaxLength.Type = i6.InputType.Number;
|
|
28462
28652
|
_this.editMaxLength.Value = _this.question.options.maxLength;
|
|
28463
28653
|
_this.editMaxLength.IsDisabled = isViewOnly;
|
|
28654
|
+
_this.editMaxLength.LabelDescription = _this.l('MaxHint');
|
|
28464
28655
|
_this.editMinLength = new i6.TextBoxOptions();
|
|
28465
|
-
_this.editMinLength.Name =
|
|
28466
|
-
_this.editMinLength.LabelKey =
|
|
28656
|
+
_this.editMinLength.Name = 'MinLength';
|
|
28657
|
+
_this.editMinLength.LabelKey = 'MinLength';
|
|
28467
28658
|
_this.editMinLength.IsRequired = true;
|
|
28468
28659
|
_this.editMinLength.NumberRange = new i6.RangeNumber();
|
|
28469
|
-
_this.editMinLength.NumberRange.From = 1;
|
|
28470
|
-
_this.editMinLength.NumberRange.To = 4000;
|
|
28471
28660
|
_this.editMinLength.Type = i6.InputType.Number;
|
|
28472
28661
|
_this.editMinLength.Value = _this.question.options.minLength;
|
|
28473
28662
|
_this.editMinLength.IsDisabled = isViewOnly;
|
|
28663
|
+
_this.editMinLength.LabelDescription = _this.l('MinHint');
|
|
28474
28664
|
_this.editRowsNumber = new i6.TextBoxOptions();
|
|
28475
|
-
_this.editRowsNumber.Name =
|
|
28476
|
-
_this.editRowsNumber.LabelKey =
|
|
28665
|
+
_this.editRowsNumber.Name = 'Rows';
|
|
28666
|
+
_this.editRowsNumber.LabelKey = 'Rows';
|
|
28477
28667
|
_this.editRowsNumber.IsRequired = true;
|
|
28478
28668
|
_this.editRowsNumber.NumberRange = new i6.RangeNumber();
|
|
28479
28669
|
_this.editRowsNumber.NumberRange.From = 1;
|
|
@@ -28482,8 +28672,8 @@
|
|
|
28482
28672
|
_this.editRowsNumber.Value = _this.question.options.rows;
|
|
28483
28673
|
_this.editRowsNumber.IsDisabled = isViewOnly;
|
|
28484
28674
|
_this.editMaxFileSize = new i6.TextBoxOptions();
|
|
28485
|
-
_this.editMaxFileSize.Name =
|
|
28486
|
-
_this.editMaxFileSize.LabelKey =
|
|
28675
|
+
_this.editMaxFileSize.Name = 'MaxFileSizeInMB';
|
|
28676
|
+
_this.editMaxFileSize.LabelKey = 'MaxFileSizeInMB';
|
|
28487
28677
|
_this.editMaxFileSize.IsRequired = true;
|
|
28488
28678
|
_this.editMaxFileSize.NumberRange = new i6.RangeNumber();
|
|
28489
28679
|
_this.editMaxFileSize.NumberRange.From = 1;
|
|
@@ -28492,63 +28682,72 @@
|
|
|
28492
28682
|
_this.editMaxFileSize.Value = _this.question.options.maxFileSizeInMB;
|
|
28493
28683
|
_this.editMaxFileSize.IsDisabled = isViewOnly;
|
|
28494
28684
|
_this.editMaxFileCount = new i6.TextBoxOptions();
|
|
28495
|
-
_this.editMaxFileCount.Name =
|
|
28496
|
-
_this.editMaxFileCount.LabelKey =
|
|
28685
|
+
_this.editMaxFileCount.Name = 'MaxFileCount';
|
|
28686
|
+
_this.editMaxFileCount.LabelKey = 'MaxFilesCount';
|
|
28497
28687
|
_this.editMaxFileCount.IsRequired = true;
|
|
28498
28688
|
_this.editMaxFileCount.NumberRange = new i6.RangeNumber();
|
|
28499
28689
|
_this.editMaxFileCount.NumberRange.From = 1;
|
|
28500
28690
|
_this.editMaxFileCount.NumberRange.To = 50;
|
|
28501
28691
|
_this.editMaxFileCount.Type = i6.InputType.Number;
|
|
28692
|
+
_this.editMaxFileCount.LabelDescription = _this.l('MaxFileCountHint');
|
|
28502
28693
|
_this.editMaxFileCount.Value = _this.question.options.maxFileCount;
|
|
28503
28694
|
_this.editMaxFileCount.CustomValidation = [_this.numberValidation];
|
|
28504
28695
|
_this.editMaxFileCount.IsDisabled = isViewOnly;
|
|
28505
|
-
var FilesExtensionResult = _this.question.options
|
|
28506
|
-
|
|
28696
|
+
var FilesExtensionResult = _this.question.options
|
|
28697
|
+
.allowedExtensions;
|
|
28698
|
+
var FilesExtensions = FilesExtensionResult
|
|
28699
|
+
? result.extensions
|
|
28700
|
+
.filter(function (item) {
|
|
28701
|
+
return FilesExtensionResult.includes(item.key);
|
|
28702
|
+
})
|
|
28703
|
+
.map(function (item) { return item.key; })
|
|
28704
|
+
: [];
|
|
28507
28705
|
_this.editFilesExtensions = new i6.DropdownOptions();
|
|
28508
|
-
_this.editFilesExtensions.Name =
|
|
28509
|
-
_this.editFilesExtensions.LabelKey =
|
|
28706
|
+
_this.editFilesExtensions.Name = 'AllowedExtensions';
|
|
28707
|
+
_this.editFilesExtensions.LabelKey = 'Extensions';
|
|
28510
28708
|
_this.editFilesExtensions.IsRequired = true;
|
|
28511
28709
|
_this.editFilesExtensions.AllowSearchFilter = true;
|
|
28512
28710
|
_this.editFilesExtensions.DataSource = result.extensions;
|
|
28513
28711
|
_this.editFilesExtensions.SingleSelection = false;
|
|
28514
28712
|
_this.editFilesExtensions.SelectedItems = FilesExtensions;
|
|
28515
|
-
_this.editFilesExtensions.
|
|
28713
|
+
_this.editFilesExtensions.LabelDescription = _this.l('ExtensionHint');
|
|
28714
|
+
_this.editFilesExtensions.NotFoundText = _this.l('NoResultFound');
|
|
28516
28715
|
_this.editFilesExtensions.IsDisabled = isViewOnly;
|
|
28517
|
-
|
|
28716
|
+
_this.editModelForm.addValidators(_this.fromTo("MinLength", "MaxLength"));
|
|
28518
28717
|
_this.changeDataType(_this.question.questionTypeItemID);
|
|
28519
28718
|
_this.changeScoring(_this.question.isAllowScoring);
|
|
28520
28719
|
_this.editOptionId = new i6.TextBoxOptions();
|
|
28521
|
-
_this.editOptionId.Name =
|
|
28720
|
+
_this.editOptionId.Name = 'Id';
|
|
28522
28721
|
_this.editOptionId.HideLabel = true;
|
|
28523
28722
|
_this.editOptionId.Type = i6.InputType.Text;
|
|
28524
28723
|
_this.editNameOption = new i6.MultiLingualTextBoxOptions();
|
|
28525
|
-
_this.editNameOption.Name =
|
|
28526
|
-
_this.editNameOption.ArabicLabelKey =
|
|
28527
|
-
_this.editNameOption.EnglishLabelKey =
|
|
28724
|
+
_this.editNameOption.Name = 'NameOption';
|
|
28725
|
+
_this.editNameOption.ArabicLabelKey = 'NameInArabic';
|
|
28726
|
+
_this.editNameOption.EnglishLabelKey = 'NameInEnglish';
|
|
28528
28727
|
_this.editNameOption.IsRequired = true;
|
|
28529
28728
|
_this.editNameOption.MaxLength = 225;
|
|
28530
28729
|
_this.editNameOption.LanguageMode = _this.getLanguageModeValue();
|
|
28531
28730
|
_this.scoreNumber = new i6.TextBoxOptions();
|
|
28532
|
-
_this.scoreNumber.Name =
|
|
28533
|
-
_this.scoreNumber.LabelKey =
|
|
28731
|
+
_this.scoreNumber.Name = 'Score';
|
|
28732
|
+
_this.scoreNumber.LabelKey = 'Score';
|
|
28534
28733
|
_this.scoreNumber.IsRequired = true;
|
|
28535
28734
|
_this.scoreNumber.Type = i6.InputType.Number;
|
|
28536
28735
|
var rangeNumber = new i6.RangeNumber();
|
|
28537
28736
|
rangeNumber.To = 1000000;
|
|
28538
|
-
rangeNumber.From =
|
|
28737
|
+
rangeNumber.From = 1;
|
|
28539
28738
|
_this.scoreNumber.NumberRange = rangeNumber;
|
|
28540
28739
|
_this.displayOrderOption = new i6.TextBoxOptions();
|
|
28541
|
-
_this.displayOrderOption.Name =
|
|
28740
|
+
_this.displayOrderOption.Name = 'DisplayOrder';
|
|
28542
28741
|
_this.idOption = new i6.TextBoxOptions();
|
|
28543
|
-
_this.idOption.Name =
|
|
28742
|
+
_this.idOption.Name = 'IdOption';
|
|
28544
28743
|
_this.editOptionLinkedQuestions = new i6.DropdownOptions();
|
|
28545
|
-
_this.editOptionLinkedQuestions.Name =
|
|
28546
|
-
_this.editOptionLinkedQuestions.LabelKey =
|
|
28744
|
+
_this.editOptionLinkedQuestions.Name = 'LinkedQuestions';
|
|
28745
|
+
_this.editOptionLinkedQuestions.LabelKey = 'LinkedQuestions';
|
|
28547
28746
|
_this.editOptionLinkedQuestions.AllowSearchFilter = true;
|
|
28548
28747
|
_this.editOptionLinkedQuestions.DataSource = result.questions;
|
|
28549
28748
|
_this.editOptionLinkedQuestions.SingleSelection = false;
|
|
28550
|
-
_this.editOptionLinkedQuestions.NotFoundText = _this.l(
|
|
28551
|
-
_this.editOptionLinkedQuestions.LabelDescription = _this.l(
|
|
28749
|
+
_this.editOptionLinkedQuestions.NotFoundText = _this.l('NoResultFound');
|
|
28750
|
+
_this.editOptionLinkedQuestions.LabelDescription = _this.l('LinkedQuestionDescriptionHint');
|
|
28552
28751
|
if (_this.question.questionOptions.length > 0) {
|
|
28553
28752
|
for (var index = 0; index < _this.question.questionOptions.length; index++) {
|
|
28554
28753
|
var element = _this.question.questionOptions[index];
|
|
@@ -28564,12 +28763,16 @@
|
|
|
28564
28763
|
var resultOptionModel = _this.editOptionForm.value;
|
|
28565
28764
|
var resultModel = _this.editModelForm.value;
|
|
28566
28765
|
if (_this.isSelect) {
|
|
28567
|
-
if ((resultOptionModel.NameOption.Arabic != undefined &&
|
|
28568
|
-
|
|
28766
|
+
if ((resultOptionModel.NameOption.Arabic != undefined &&
|
|
28767
|
+
resultOptionModel.NameOption.Arabic != '') ||
|
|
28768
|
+
(resultOptionModel.NameOption.English != undefined &&
|
|
28769
|
+
resultOptionModel.NameOption.English != '') ||
|
|
28770
|
+
(resultOptionModel.Score != undefined && resultOptionModel.Score > 0)) {
|
|
28771
|
+
_this.errorMessage = _this.l('OptionPendingDataErrorMessage');
|
|
28569
28772
|
return;
|
|
28570
28773
|
}
|
|
28571
28774
|
if (_this.optionList.length == 0 && _this.isSelect) {
|
|
28572
|
-
_this.errorMessage = _this.l(
|
|
28775
|
+
_this.errorMessage = _this.l('OptionErrorMessage');
|
|
28573
28776
|
return;
|
|
28574
28777
|
}
|
|
28575
28778
|
}
|
|
@@ -28631,12 +28834,12 @@
|
|
|
28631
28834
|
return null;
|
|
28632
28835
|
}
|
|
28633
28836
|
if (!control.value.toString().match(/^[0-9]*$/)) {
|
|
28634
|
-
_this.numberValidation.massage = _this.l(
|
|
28635
|
-
return {
|
|
28837
|
+
_this.numberValidation.massage = _this.l('IntegerNumberValidationKey');
|
|
28838
|
+
return { customerError: true };
|
|
28636
28839
|
}
|
|
28637
28840
|
if (!control.value.toString().match(/^[+]?([.]\d+|\d+[.]?\d*)$/)) {
|
|
28638
|
-
_this.numberValidation.massage = _this.l(
|
|
28639
|
-
return {
|
|
28841
|
+
_this.numberValidation.massage = _this.l('PositiveNumberValidationKey');
|
|
28842
|
+
return { customerError: true };
|
|
28640
28843
|
}
|
|
28641
28844
|
return null;
|
|
28642
28845
|
};
|
|
@@ -28649,11 +28852,44 @@
|
|
|
28649
28852
|
this.editOptionForm.controls['Score'].updateValueAndValidity();
|
|
28650
28853
|
}
|
|
28651
28854
|
};
|
|
28855
|
+
EditQuestionComponent.prototype.updateLengthValidator = function (name, max, min) {
|
|
28856
|
+
var control = this.editOptionForm.controls[name];
|
|
28857
|
+
if (control) {
|
|
28858
|
+
control.setErrors(null);
|
|
28859
|
+
control.clearValidators();
|
|
28860
|
+
control.updateValueAndValidity();
|
|
28861
|
+
var validationRules = [];
|
|
28862
|
+
validationRules.push(i11$1.Validators.min(min));
|
|
28863
|
+
validationRules.push(i11$1.Validators.max(max));
|
|
28864
|
+
validationRules.push(i11$1.Validators.required);
|
|
28865
|
+
control.addValidators(validationRules);
|
|
28866
|
+
control.updateValueAndValidity();
|
|
28867
|
+
}
|
|
28868
|
+
};
|
|
28652
28869
|
EditQuestionComponent.prototype.changeDataType = function (key) {
|
|
28653
28870
|
this.updateFormStatus(key);
|
|
28654
28871
|
switch (key) {
|
|
28655
28872
|
case SurveyOptionType.Text:
|
|
28873
|
+
this.updateLengthValidator(this.editMaxLength.Name, 255, 1);
|
|
28874
|
+
this.updateLengthValidator(this.editMinLength.Name, 255, 1);
|
|
28875
|
+
this.editMaxLength.NumberRange.From = 1;
|
|
28876
|
+
this.editMaxLength.NumberRange.To = 255;
|
|
28877
|
+
this.editMinLength.NumberRange.From = 1;
|
|
28878
|
+
this.editMinLength.NumberRange.To = 255;
|
|
28879
|
+
this.isText = true;
|
|
28880
|
+
this.isNumber = false;
|
|
28881
|
+
this.isFile = false;
|
|
28882
|
+
this.isMultiFile = false;
|
|
28883
|
+
this.isImage = false;
|
|
28884
|
+
this.isSelect = false;
|
|
28885
|
+
break;
|
|
28656
28886
|
case SurveyOptionType.MultilineText:
|
|
28887
|
+
this.updateLengthValidator(this.editMaxLength.Name, 4000, 1);
|
|
28888
|
+
this.updateLengthValidator(this.editMinLength.Name, 4000, 1);
|
|
28889
|
+
this.editMaxLength.NumberRange.From = 1;
|
|
28890
|
+
this.editMaxLength.NumberRange.To = 4000;
|
|
28891
|
+
this.editMinLength.NumberRange.From = 1;
|
|
28892
|
+
this.editMinLength.NumberRange.To = 4000;
|
|
28657
28893
|
this.isText = true;
|
|
28658
28894
|
this.isNumber = false;
|
|
28659
28895
|
this.isFile = false;
|
|
@@ -28662,6 +28898,12 @@
|
|
|
28662
28898
|
this.isSelect = false;
|
|
28663
28899
|
break;
|
|
28664
28900
|
case SurveyOptionType.Number:
|
|
28901
|
+
this.updateLengthValidator(this.editMaxLength.Name, 100, 1);
|
|
28902
|
+
this.updateLengthValidator(this.editMinLength.Name, 100, 1);
|
|
28903
|
+
this.editMaxLength.NumberRange.From = 1;
|
|
28904
|
+
this.editMaxLength.NumberRange.To = 100;
|
|
28905
|
+
this.editMinLength.NumberRange.From = 1;
|
|
28906
|
+
this.editMinLength.NumberRange.To = 100;
|
|
28665
28907
|
this.isNumber = true;
|
|
28666
28908
|
this.isText = false;
|
|
28667
28909
|
this.isFile = false;
|
|
@@ -28730,11 +28972,11 @@
|
|
|
28730
28972
|
for (var index = 0; index < this.optionList.length; index++) {
|
|
28731
28973
|
var element = this.optionList[index].Score;
|
|
28732
28974
|
if (element > 1000000) {
|
|
28733
|
-
this.errorMessage = this.l(
|
|
28975
|
+
this.errorMessage = this.l('MaxOptionScoreErrorMessage');
|
|
28734
28976
|
return;
|
|
28735
28977
|
}
|
|
28736
|
-
if (element <
|
|
28737
|
-
this.errorMessage = this.l(
|
|
28978
|
+
if (element < 1) {
|
|
28979
|
+
this.errorMessage = this.l('MinOptionScoreErrorMessage');
|
|
28738
28980
|
return;
|
|
28739
28981
|
}
|
|
28740
28982
|
}
|
|
@@ -28753,12 +28995,12 @@
|
|
|
28753
28995
|
if (this.showScoreOption)
|
|
28754
28996
|
option.Score = Number.parseFloat(resultModel.Score);
|
|
28755
28997
|
this.editOptionForm.reset();
|
|
28756
|
-
this.editOptionForm.controls[
|
|
28757
|
-
this.editOptionForm.controls[
|
|
28758
|
-
this.editOptionForm.controls[
|
|
28759
|
-
this.editOptionForm.controls[
|
|
28998
|
+
this.editOptionForm.controls['NameOption'].reset();
|
|
28999
|
+
this.editOptionForm.controls['IdOption'].reset();
|
|
29000
|
+
this.editOptionForm.controls['DisplayOrder'].reset();
|
|
29001
|
+
this.editOptionForm.controls['LinkedQuestions'].reset();
|
|
28760
29002
|
if (this.showScoreOption)
|
|
28761
|
-
this.editOptionForm.controls[
|
|
29003
|
+
this.editOptionForm.controls['Score'].reset();
|
|
28762
29004
|
this.optionList.splice(option.DisplayOrder - 1, 0, option);
|
|
28763
29005
|
this.isEditFormChange = true;
|
|
28764
29006
|
this.isOptionInEditMode = false;
|
|
@@ -28770,7 +29012,8 @@
|
|
|
28770
29012
|
EditQuestionComponent.prototype.editOption = function (option) {
|
|
28771
29013
|
var _a, _b;
|
|
28772
29014
|
debugger;
|
|
28773
|
-
if ((this.editOptionForm.touched == true && this.editOptionForm.valid) ||
|
|
29015
|
+
if ((this.editOptionForm.touched == true && this.editOptionForm.valid) ||
|
|
29016
|
+
this.editOptionForm.touched == false)
|
|
28774
29017
|
this.addOption();
|
|
28775
29018
|
else {
|
|
28776
29019
|
this.editOptionForm.markAllAsTouched();
|
|
@@ -28779,12 +29022,12 @@
|
|
|
28779
29022
|
var name = new i6.EnglishArabicDTO();
|
|
28780
29023
|
name.Arabic = (_a = option.Name.Arabic) !== null && _a !== void 0 ? _a : null;
|
|
28781
29024
|
name.English = (_b = option.Name.English) !== null && _b !== void 0 ? _b : null;
|
|
28782
|
-
this.editOptionForm.controls[
|
|
28783
|
-
this.editOptionForm.controls[
|
|
28784
|
-
this.editOptionForm.controls[
|
|
28785
|
-
this.editOptionForm.controls[
|
|
29025
|
+
this.editOptionForm.controls['NameOption'].setValue(name);
|
|
29026
|
+
this.editOptionForm.controls['IdOption'].setValue(option.ID_GUID);
|
|
29027
|
+
this.editOptionForm.controls['DisplayOrder'].setValue(option.DisplayOrder);
|
|
29028
|
+
this.editOptionForm.controls['LinkedQuestions'].setValue(option.LinkedQuestions);
|
|
28786
29029
|
if (this.showScoreOption)
|
|
28787
|
-
this.editOptionForm.controls[
|
|
29030
|
+
this.editOptionForm.controls['Score'].setValue(option.Score);
|
|
28788
29031
|
this.optionList = this.optionList.filter(function (item) { return item != option; });
|
|
28789
29032
|
this.isEditFormChange = true;
|
|
28790
29033
|
this.isOptionInEditMode = true;
|
|
@@ -28794,14 +29037,23 @@
|
|
|
28794
29037
|
return function (formGroup) {
|
|
28795
29038
|
var fromDate = formGroup.get(fromField);
|
|
28796
29039
|
var toDate = formGroup.get(toField);
|
|
28797
|
-
if (
|
|
28798
|
-
if (
|
|
29040
|
+
if (fromDate !== null && toDate !== null) {
|
|
29041
|
+
if (fromDate.value !== null &&
|
|
29042
|
+
toDate.value !== null &&
|
|
29043
|
+
parseInt(fromDate.value) > parseInt(toDate.value)) {
|
|
28799
29044
|
fromDate.markAsTouched();
|
|
28800
29045
|
toDate.markAsTouched();
|
|
28801
|
-
toDate.setErrors({
|
|
29046
|
+
toDate.setErrors({
|
|
29047
|
+
errorMassage: _this.l('GreaterThanOrEqualTo'),
|
|
29048
|
+
});
|
|
28802
29049
|
return null;
|
|
28803
29050
|
}
|
|
28804
|
-
|
|
29051
|
+
if (fromDate.value !== null &&
|
|
29052
|
+
toDate.value !== null &&
|
|
29053
|
+
parseInt(fromDate.value) < parseInt(toDate.value) &&
|
|
29054
|
+
parseInt(toDate.value) < 255 &&
|
|
29055
|
+
parseInt(fromDate.value) < 255)
|
|
29056
|
+
toDate.setErrors(null);
|
|
28805
29057
|
}
|
|
28806
29058
|
return null;
|
|
28807
29059
|
};
|
|
@@ -28913,7 +29165,7 @@
|
|
|
28913
29165
|
type: i0.Component,
|
|
28914
29166
|
args: [{
|
|
28915
29167
|
selector: 'app-edit-question',
|
|
28916
|
-
templateUrl: './edit-question.component.html'
|
|
29168
|
+
templateUrl: './edit-question.component.html',
|
|
28917
29169
|
}]
|
|
28918
29170
|
}], ctorParameters: function () { return [{ type: i0__namespace.Injector }, { type: SurveyQuestionService }]; }, propDecorators: { EditModal: [{
|
|
28919
29171
|
type: i0.ViewChild,
|
|
@@ -29620,7 +29872,10 @@
|
|
|
29620
29872
|
_this.pageHeaderOptions.BreadCrumb.Active = true;
|
|
29621
29873
|
_this.pageHeaderOptions.BreadCrumb.BreadCrumbItems = _this.breadCrumb;
|
|
29622
29874
|
_this.pageHeaderOptions.DropDownActions.Active = true;
|
|
29623
|
-
_this.pageHeaderOptions.DropDownActions.DropdownActionItems.push(new i6.DropdownActionItem(_this.l("
|
|
29875
|
+
_this.pageHeaderOptions.DropDownActions.DropdownActionItems.push(new i6.DropdownActionItem(_this.l("Delete"), '/assets/images/Trash.svg', _this.showDeleteModal), new i6.DropdownActionItem(_this.l("Export"), '/assets/images/export.svg', _this.export));
|
|
29876
|
+
if (_this.survey.statusItemID.toLocaleLowerCase() == _this.SurveyStatusEnum.ScoringTypeEnum_Draft.toLocaleLowerCase()
|
|
29877
|
+
|| _this.survey.statusItemID.toLocaleLowerCase() == _this.SurveyStatusEnum.ScoringTypeEnum_Upcoming.toLocaleLowerCase())
|
|
29878
|
+
_this.pageHeaderOptions.DropDownActions.DropdownActionItems.push(new i6.DropdownActionItem(_this.l("Edit"), "/assets/images/Edit.svg", _this.showEditModal));
|
|
29624
29879
|
if (_this.survey.totalQuestionCount > 0)
|
|
29625
29880
|
_this.pageHeaderOptions.DropDownActions.DropdownActionItems.push(new i6.DropdownActionItem(_this.l("Preview"), '/assets/images/views.svg', _this.previewSurvey));
|
|
29626
29881
|
if (_this.survey.statusItemID.toLocaleLowerCase() == _this.SurveyStatusEnum.ScoringTypeEnum_Published.toLocaleLowerCase())
|
|
@@ -30192,8 +30447,8 @@
|
|
|
30192
30447
|
var _this = _super.call(this, injector) || this;
|
|
30193
30448
|
_this.injector = injector;
|
|
30194
30449
|
_this.surveyService = surveyService;
|
|
30195
|
-
_this.pageTitle =
|
|
30196
|
-
_this.subTitle =
|
|
30450
|
+
_this.pageTitle = '';
|
|
30451
|
+
_this.subTitle = '';
|
|
30197
30452
|
_this.surveyForm = new i11$1.FormGroup({});
|
|
30198
30453
|
_this.SurveyStatusEnum = SurveyStatusEnum;
|
|
30199
30454
|
_this.pagingResult = [];
|
|
@@ -30210,7 +30465,8 @@
|
|
|
30210
30465
|
_this.showFilters = !_this.showFilters;
|
|
30211
30466
|
_this.loading = true;
|
|
30212
30467
|
_this.isFiltersDataLoaded = false;
|
|
30213
|
-
_this.pageHeaderOptions.FiltersButton.ShowLoadingInFiltersBox =
|
|
30468
|
+
_this.pageHeaderOptions.FiltersButton.ShowLoadingInFiltersBox =
|
|
30469
|
+
_this.loading;
|
|
30214
30470
|
}
|
|
30215
30471
|
_this.flipping = !_this.flipping;
|
|
30216
30472
|
};
|
|
@@ -30224,7 +30480,8 @@
|
|
|
30224
30480
|
_this.showFilters = true;
|
|
30225
30481
|
_this.isFiltersDataLoaded = true;
|
|
30226
30482
|
_this.loading = false;
|
|
30227
|
-
_this.pageHeaderOptions.FiltersButton.ShowLoadingInFiltersBox =
|
|
30483
|
+
_this.pageHeaderOptions.FiltersButton.ShowLoadingInFiltersBox =
|
|
30484
|
+
_this.loading;
|
|
30228
30485
|
});
|
|
30229
30486
|
};
|
|
30230
30487
|
_this.resetFilters = function () {
|
|
@@ -30251,94 +30508,114 @@
|
|
|
30251
30508
|
return _this;
|
|
30252
30509
|
}
|
|
30253
30510
|
SurveyComponent.prototype.ngOnInit = function () {
|
|
30254
|
-
this.pageTitle = this.l(
|
|
30511
|
+
this.pageTitle = this.l('Surveys_Header');
|
|
30255
30512
|
this.updatePageTitle(this.pageTitle);
|
|
30256
30513
|
this.breadCrumb = [];
|
|
30257
30514
|
this.searchTextBoxOptions = new i6.TextBoxOptions();
|
|
30258
|
-
this.searchTextBoxOptions.Name =
|
|
30515
|
+
this.searchTextBoxOptions.Name = 'SearchTextBox';
|
|
30259
30516
|
this.searchTextBoxOptions.Type = i6.InputType.Text;
|
|
30260
|
-
this.searchTextBoxOptions.Placeholder = this.l(
|
|
30261
|
-
this.searchTextBoxOptions.ExtraClasses =
|
|
30517
|
+
this.searchTextBoxOptions.Placeholder = this.l('Search');
|
|
30518
|
+
this.searchTextBoxOptions.ExtraClasses =
|
|
30519
|
+
'form-control form-control-sm form-control-solid search-box';
|
|
30262
30520
|
this.searchTextBoxOptions.HideLabel = true;
|
|
30263
|
-
this.searchTextBoxOptions.Icon =
|
|
30521
|
+
this.searchTextBoxOptions.Icon = '../../../assets/images/search.svg';
|
|
30264
30522
|
this.searchTextFilter = new i6.FilterItem();
|
|
30265
30523
|
this.searchTextFilter.FormControlName = this.searchTextBoxOptions.Name;
|
|
30266
|
-
this.searchTextFilter.ActionParameterName =
|
|
30524
|
+
this.searchTextFilter.ActionParameterName = 'SearchText';
|
|
30267
30525
|
this.searchTextFilter.IsFormControl = true;
|
|
30268
30526
|
this.searchTextFilter.FilterType = i6.FilterType.TextBox;
|
|
30269
30527
|
this.visibleDropdownOptions = new i6.DropdownOptions();
|
|
30270
|
-
this.visibleDropdownOptions.Name =
|
|
30271
|
-
this.visibleDropdownOptions.LabelKey =
|
|
30528
|
+
this.visibleDropdownOptions.Name = 'visibleSurvey';
|
|
30529
|
+
this.visibleDropdownOptions.LabelKey = 'Visibility';
|
|
30272
30530
|
this.visibleDropdownOptions.SingleSelection = true;
|
|
30273
30531
|
this.visiblePanelDropdownFilter = new i6.FilterItem();
|
|
30274
|
-
this.visiblePanelDropdownFilter.FormControlName =
|
|
30275
|
-
|
|
30532
|
+
this.visiblePanelDropdownFilter.FormControlName =
|
|
30533
|
+
this.visibleDropdownOptions.Name;
|
|
30534
|
+
this.visiblePanelDropdownFilter.ActionParameterName = 'ActiveStatus';
|
|
30276
30535
|
this.visiblePanelDropdownFilter.IsFormControl = true;
|
|
30277
30536
|
this.visiblePanelDropdownFilter.FilterType = i6.FilterType.DropdownList;
|
|
30278
30537
|
this.statusDropdownOptions = new i6.DropdownOptions();
|
|
30279
|
-
this.statusDropdownOptions.Name =
|
|
30280
|
-
this.statusDropdownOptions.LabelKey =
|
|
30538
|
+
this.statusDropdownOptions.Name = 'Status';
|
|
30539
|
+
this.statusDropdownOptions.LabelKey = 'Status';
|
|
30281
30540
|
this.statusDropdownOptions.SingleSelection = true;
|
|
30282
|
-
this.statusDropdownOptions.NotFoundText = this.l(
|
|
30541
|
+
this.statusDropdownOptions.NotFoundText = this.l('NoResultFound');
|
|
30283
30542
|
this.statusDropdownFilter = new i6.FilterItem();
|
|
30284
30543
|
this.statusDropdownFilter.FormControlName = this.statusDropdownOptions.Name;
|
|
30285
|
-
this.statusDropdownFilter.ActionParameterName =
|
|
30544
|
+
this.statusDropdownFilter.ActionParameterName = 'SurveyStatus';
|
|
30286
30545
|
this.statusDropdownFilter.IsFormControl = true;
|
|
30287
30546
|
this.statusDropdownFilter.FilterType = i6.FilterType.DropdownList;
|
|
30288
30547
|
this.DatePickerWithRangeMode = new i6.DatePickerOptions();
|
|
30289
|
-
this.DatePickerWithRangeMode.Name =
|
|
30290
|
-
this.DatePickerWithRangeMode.LabelKey =
|
|
30548
|
+
this.DatePickerWithRangeMode.Name = 'DatePickerWithRangeMode';
|
|
30549
|
+
this.DatePickerWithRangeMode.LabelKey = 'Date';
|
|
30291
30550
|
this.DatePickerWithRangeMode.ViewType = i6.ControlLayout.Vertical;
|
|
30292
30551
|
this.DatePickerWithRangeMode.StartView = i6.StartView.Month;
|
|
30293
30552
|
this.DatePickerWithRangeMode.PickerType = i6.PickerType.Calendar;
|
|
30294
30553
|
this.DatePickerWithRangeMode.SelectMode = i6.SelectMode.Range;
|
|
30295
30554
|
this.DatePickerWithRangeFilter = new i6.FilterItem();
|
|
30296
|
-
this.DatePickerWithRangeFilter.FormControlName =
|
|
30297
|
-
|
|
30555
|
+
this.DatePickerWithRangeFilter.FormControlName =
|
|
30556
|
+
this.DatePickerWithRangeMode.Name;
|
|
30557
|
+
this.DatePickerWithRangeFilter.ActionParameterName = 'Date';
|
|
30298
30558
|
this.DatePickerWithRangeFilter.IsFormControl = true;
|
|
30299
30559
|
this.DatePickerWithRangeFilter.FilterType = i6.FilterType.DatePicker;
|
|
30300
30560
|
this.sortDropdownOptions = new i6.DropdownOptions();
|
|
30301
|
-
this.sortDropdownOptions.Name =
|
|
30302
|
-
this.sortDropdownOptions.LabelKey =
|
|
30561
|
+
this.sortDropdownOptions.Name = 'Sort';
|
|
30562
|
+
this.sortDropdownOptions.LabelKey = 'Sort';
|
|
30303
30563
|
this.sortDropdownOptions.SingleSelection = true;
|
|
30304
|
-
this.sortDropdownOptions.NotFoundText = this.l(
|
|
30564
|
+
this.sortDropdownOptions.NotFoundText = this.l('NoResultFound');
|
|
30305
30565
|
this.sortDropdownFilter = new i6.FilterItem();
|
|
30306
30566
|
this.sortDropdownFilter.FormControlName = this.sortDropdownOptions.Name;
|
|
30307
|
-
this.sortDropdownFilter.ActionParameterName =
|
|
30567
|
+
this.sortDropdownFilter.ActionParameterName = 'SortBy';
|
|
30308
30568
|
this.sortDropdownFilter.IsFormControl = true;
|
|
30309
30569
|
this.sortDropdownFilter.FilterType = i6.FilterType.DropdownList;
|
|
30310
30570
|
this.sortTypeDropdownOptions = new i6.DropdownOptions();
|
|
30311
|
-
this.sortTypeDropdownOptions.Name =
|
|
30312
|
-
this.sortTypeDropdownOptions.LabelKey =
|
|
30571
|
+
this.sortTypeDropdownOptions.Name = 'SortType';
|
|
30572
|
+
this.sortTypeDropdownOptions.LabelKey = 'SortType';
|
|
30313
30573
|
this.sortTypeDropdownOptions.SingleSelection = true;
|
|
30314
|
-
this.sortTypeDropdownOptions.NotFoundText = this.l(
|
|
30574
|
+
this.sortTypeDropdownOptions.NotFoundText = this.l('NoResultFound');
|
|
30315
30575
|
this.sortTypeDropdownFilter = new i6.FilterItem();
|
|
30316
|
-
this.sortTypeDropdownFilter.FormControlName =
|
|
30317
|
-
|
|
30576
|
+
this.sortTypeDropdownFilter.FormControlName =
|
|
30577
|
+
this.sortTypeDropdownOptions.Name;
|
|
30578
|
+
this.sortTypeDropdownFilter.ActionParameterName = 'SortType';
|
|
30318
30579
|
this.sortTypeDropdownFilter.IsFormControl = true;
|
|
30319
30580
|
this.sortTypeDropdownFilter.FilterType = i6.FilterType.DropdownList;
|
|
30320
30581
|
this.pageHeaderOptions = new i6.PageHeaderOptions();
|
|
30321
30582
|
this.pageHeaderOptions.TitleKey = this.pageTitle;
|
|
30322
|
-
this.pageHeaderOptions.SubTitleKey = this.l(
|
|
30583
|
+
this.pageHeaderOptions.SubTitleKey = this.l('Survey_SubHeader');
|
|
30323
30584
|
this.pageHeaderOptions.SearchTextBox.Active = true;
|
|
30324
|
-
this.pageHeaderOptions.SearchTextBox.TextSearchBoxOptions =
|
|
30585
|
+
this.pageHeaderOptions.SearchTextBox.TextSearchBoxOptions =
|
|
30586
|
+
this.searchTextBoxOptions;
|
|
30325
30587
|
this.pageHeaderOptions.BreadCrumb.Active = true;
|
|
30326
30588
|
this.pageHeaderOptions.BreadCrumb.BreadCrumbItems = this.breadCrumb;
|
|
30327
30589
|
this.pageHeaderOptions.EditButton.Active = false;
|
|
30328
30590
|
this.pageHeaderOptions.ExportButton.Active = false;
|
|
30329
30591
|
this.pageHeaderOptions.AddButton.Active = true;
|
|
30330
|
-
this.pageHeaderOptions.AddButton.ButtonTextKey = this.l(
|
|
30592
|
+
this.pageHeaderOptions.AddButton.ButtonTextKey = this.l('Add');
|
|
30331
30593
|
this.pageHeaderOptions.AddButton.Function = this.showAddModal;
|
|
30332
30594
|
this.pageHeaderOptions.FiltersButton.Active = true;
|
|
30333
|
-
this.pageHeaderOptions.FiltersButton.ButtonTextKey = this.l(
|
|
30595
|
+
this.pageHeaderOptions.FiltersButton.ButtonTextKey = this.l('Filters');
|
|
30334
30596
|
this.pageHeaderOptions.FiltersButton.Function = this.loadFilters;
|
|
30335
30597
|
this.pageHeaderOptions.Filters.ApplyFunction = this.search;
|
|
30336
30598
|
this.pageHeaderOptions.Filters.RestFunction = this.resetFilters;
|
|
30337
|
-
this.pageHeaderOptions.Filters.ControlsOptions.push({
|
|
30338
|
-
|
|
30339
|
-
|
|
30340
|
-
|
|
30341
|
-
this.pageHeaderOptions.Filters.ControlsOptions.push({
|
|
30599
|
+
this.pageHeaderOptions.Filters.ControlsOptions.push({
|
|
30600
|
+
key: i6.DataType.SingleSelect,
|
|
30601
|
+
value: this.visibleDropdownOptions,
|
|
30602
|
+
});
|
|
30603
|
+
this.pageHeaderOptions.Filters.ControlsOptions.push({
|
|
30604
|
+
key: i6.DataType.SingleSelect,
|
|
30605
|
+
value: this.statusDropdownOptions,
|
|
30606
|
+
});
|
|
30607
|
+
this.pageHeaderOptions.Filters.ControlsOptions.push({
|
|
30608
|
+
key: i6.DataType.Date,
|
|
30609
|
+
value: this.DatePickerWithRangeMode,
|
|
30610
|
+
});
|
|
30611
|
+
this.pageHeaderOptions.Filters.ControlsOptions.push({
|
|
30612
|
+
key: i6.DataType.SingleSelect,
|
|
30613
|
+
value: this.sortDropdownOptions,
|
|
30614
|
+
});
|
|
30615
|
+
this.pageHeaderOptions.Filters.ControlsOptions.push({
|
|
30616
|
+
key: i6.DataType.SingleSelect,
|
|
30617
|
+
value: this.sortTypeDropdownOptions,
|
|
30618
|
+
});
|
|
30342
30619
|
this.pageHeaderOptions.Listing = true;
|
|
30343
30620
|
this.EN = this.utilityService.isCurrentLanguageEnglish();
|
|
30344
30621
|
this.pagingOptions = new i6.PagingOptions();
|
|
@@ -30346,8 +30623,17 @@
|
|
|
30346
30623
|
this.pagingOptions.DisableBlockUI = true;
|
|
30347
30624
|
this.pagingOptions.ActionPostURL = this.apiURL + 'GetAll';
|
|
30348
30625
|
this.pageHeaderOptions.Listing = true;
|
|
30349
|
-
this.pagingOptions.OnKeyPressFiltersControlNames = [
|
|
30350
|
-
|
|
30626
|
+
this.pagingOptions.OnKeyPressFiltersControlNames = [
|
|
30627
|
+
this.searchTextBoxOptions.Name,
|
|
30628
|
+
];
|
|
30629
|
+
this.pagingOptions.Filters = [
|
|
30630
|
+
this.searchTextFilter,
|
|
30631
|
+
this.visiblePanelDropdownFilter,
|
|
30632
|
+
this.statusDropdownFilter,
|
|
30633
|
+
this.DatePickerWithRangeFilter,
|
|
30634
|
+
this.sortDropdownFilter,
|
|
30635
|
+
this.sortTypeDropdownFilter,
|
|
30636
|
+
];
|
|
30351
30637
|
};
|
|
30352
30638
|
SurveyComponent.prototype.ngAfterViewInit = function () {
|
|
30353
30639
|
this.loadingPage = true;
|
|
@@ -30367,6 +30653,22 @@
|
|
|
30367
30653
|
SurveyComponent.prototype.showDeleteModal = function (id) {
|
|
30368
30654
|
this.deleteConfirmationModalControl.showDeleteModal(id);
|
|
30369
30655
|
};
|
|
30656
|
+
SurveyComponent.prototype.isEditable = function (status) {
|
|
30657
|
+
var allowEdit = false;
|
|
30658
|
+
switch (status.toLocaleLowerCase()) {
|
|
30659
|
+
case this.SurveyStatusEnum.ScoringTypeEnum_Draft.toLocaleLowerCase():
|
|
30660
|
+
case this.SurveyStatusEnum.ScoringTypeEnum_Upcoming.toLocaleLowerCase():
|
|
30661
|
+
allowEdit = true;
|
|
30662
|
+
break;
|
|
30663
|
+
case this.SurveyStatusEnum.ScoringTypeEnum_Closed.toLocaleLowerCase():
|
|
30664
|
+
case this.SurveyStatusEnum.ScoringTypeEnum_Published.toLocaleLowerCase():
|
|
30665
|
+
allowEdit = false;
|
|
30666
|
+
break;
|
|
30667
|
+
default:
|
|
30668
|
+
break;
|
|
30669
|
+
}
|
|
30670
|
+
return allowEdit;
|
|
30671
|
+
};
|
|
30370
30672
|
SurveyComponent.prototype.getStatus = function (status) {
|
|
30371
30673
|
var Statuses = '';
|
|
30372
30674
|
switch (status.toLocaleLowerCase()) {
|
|
@@ -30390,12 +30692,12 @@
|
|
|
30390
30692
|
return SurveyComponent;
|
|
30391
30693
|
}(i6.AppBaseComponent));
|
|
30392
30694
|
SurveyComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: SurveyComponent, deps: [{ token: i0__namespace.Injector }, { token: SurveyService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
30393
|
-
SurveyComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, 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__namespace.PageHeaderComponentComponent, selector: "bbsf-page-header-component", inputs: ["group", "options"] }, { type: i6__namespace.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__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1__namespace$1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["routerLink", "target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo"] }, { type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i5__namespace.NgbDropdown, selector: "[ngbDropdown]", inputs: ["open", "placement", "container", "autoClose", "display", "dropdownClass"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { type: i5__namespace.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { type: i11__namespace.InlineSVGDirective, selector: "[inlineSVG]", inputs: ["resolveSVGUrl", "replaceContents", "prepend", "injectComponent", "cacheSVG", "forceEvalStyles", "evalScripts", "inlineSVG", "setSVGAttributes", "removeSVGAttributes", "fallbackImgUrl", "onSVGLoaded"], outputs: ["onSVGInserted", "onSVGFailed"] }, { type: i5__namespace.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { type: i5__namespace.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["disabled"] }], pipes: { "surveyDate": SurveyDatePipe } });
|
|
30695
|
+
SurveyComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, 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__namespace.PageHeaderComponentComponent, selector: "bbsf-page-header-component", inputs: ["group", "options"] }, { type: i6__namespace.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__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1__namespace$1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["routerLink", "target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo"] }, { type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i5__namespace.NgbDropdown, selector: "[ngbDropdown]", inputs: ["open", "placement", "container", "autoClose", "display", "dropdownClass"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { type: i5__namespace.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { type: i11__namespace.InlineSVGDirective, selector: "[inlineSVG]", inputs: ["resolveSVGUrl", "replaceContents", "prepend", "injectComponent", "cacheSVG", "forceEvalStyles", "evalScripts", "inlineSVG", "setSVGAttributes", "removeSVGAttributes", "fallbackImgUrl", "onSVGLoaded"], outputs: ["onSVGInserted", "onSVGFailed"] }, { type: i5__namespace.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { type: i5__namespace.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["disabled"] }], pipes: { "surveyDate": SurveyDatePipe } });
|
|
30394
30696
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: SurveyComponent, decorators: [{
|
|
30395
30697
|
type: i0.Component,
|
|
30396
30698
|
args: [{
|
|
30397
30699
|
selector: 'app-survey',
|
|
30398
|
-
templateUrl: './survey.component.html'
|
|
30700
|
+
templateUrl: './survey.component.html',
|
|
30399
30701
|
}]
|
|
30400
30702
|
}], ctorParameters: function () { return [{ type: i0__namespace.Injector }, { type: SurveyService }]; }, propDecorators: { pagingElement: [{
|
|
30401
30703
|
type: i0.ViewChild,
|
|
@@ -30606,7 +30908,7 @@
|
|
|
30606
30908
|
return ExternalUrlComponent;
|
|
30607
30909
|
}(i6.AppBaseComponent));
|
|
30608
30910
|
ExternalUrlComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: ExternalUrlComponent, deps: [{ token: i0__namespace.Injector }, { token: i1__namespace.BBSFTranslateService }, { token: SurveyService }, { token: i1__namespace$1.ActivatedRoute }, { token: i1__namespace$1.Router }, { token: i1__namespace.MasterLayoutService }, { token: AnonymousLayoutService$1 }, { token: i1__namespace.AuthService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
30609
|
-
ExternalUrlComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, 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.
|
|
30911
|
+
ExternalUrlComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, 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__namespace.FormComponent, selector: "BBSF-Form", inputs: ["options"], outputs: ["OnChange"] }, { type: i6__namespace.MultiLingualTextBoxComponent, selector: "BBSF-MultiLingualTextBox", inputs: ["group", "options"], outputs: ["OnChange"] }, { type: i6__namespace.TextboxComponent, selector: "BBSF-TextBox", inputs: ["group", "options"], outputs: ["OnChange"] }, { type: SurveyFormComponent, selector: "survey-form", inputs: ["group", "options"] }, { type: i6__namespace.RecaptchaComponent, selector: "BBSF-Recaptcha", inputs: ["group", "options"], outputs: ["OnChange"] }, { type: i6__namespace.CheckBoxComponent, selector: "BBSF-CheckBox", inputs: ["group", "options"], outputs: ["OnChange"] }], directives: [{ type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "triggers", "container", "disableTooltip", "tooltipClass", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { type: i11__namespace.InlineSVGDirective, selector: "[inlineSVG]", inputs: ["resolveSVGUrl", "replaceContents", "prepend", "injectComponent", "cacheSVG", "forceEvalStyles", "evalScripts", "inlineSVG", "setSVGAttributes", "removeSVGAttributes", "fallbackImgUrl", "onSVGLoaded"], outputs: ["onSVGInserted", "onSVGFailed"] }, { type: i1__namespace$1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["routerLink", "target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo"] }] });
|
|
30610
30912
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: ExternalUrlComponent, decorators: [{
|
|
30611
30913
|
type: i0.Component,
|
|
30612
30914
|
args: [{
|