sf-i-events 1.0.964 → 1.0.965
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/package.json +1 -1
- package/sf-i-events.js +108 -67
- package/src/sf-i-events.ts +114 -71
package/package.json
CHANGED
package/sf-i-events.js
CHANGED
|
@@ -3411,7 +3411,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3411
3411
|
this.maxRiskResidual = tempMaxRiskResidualLocal;
|
|
3412
3412
|
}
|
|
3413
3413
|
let showFinRisk = false;
|
|
3414
|
-
if (this.selectedFeatures.indexOf('contracts') < 0 && this.selectedFeatures.indexOf('notices') && this.selectedFeatures.indexOf('licenses') < 0 && this.selectedFeatures.indexOf('rcmresources') < 0 && this.finRiskCurrency != "") {
|
|
3414
|
+
if (this.selectedFeatures.indexOf('contracts') < 0 && this.selectedFeatures.indexOf('notices') && this.selectedFeatures.indexOf('licenses') < 0 && this.selectedFeatures.indexOf('rcmresources') < 0 && this.finRiskCurrency != "" && (this.minRiskResidual > 0 || this.minRiskMitigated > 0 || this.maxRiskResidual > 0 || this.maxRiskMitigated > 0)) {
|
|
3415
3415
|
showFinRisk = true;
|
|
3416
3416
|
}
|
|
3417
3417
|
//console.log('final risk severities', this.riskSeverityData);
|
|
@@ -3723,40 +3723,38 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3723
3723
|
if (event.module != 'contract' && event.module != 'license' && event.module != 'rcmresource') {
|
|
3724
3724
|
html += '<label part="input-label">Date of Completion*</label>';
|
|
3725
3725
|
html += '<input id="input-approver-doc" part="input" type="date" value="' + (dateOfCompletion == "" ? dateOfCompletion : new Date(parseInt(dateOfCompletion)).toISOString().substring(0, 10)) + '" disabled/><br />';
|
|
3726
|
-
html += '<div class="d-flex justify-start align-center flex-wrap">';
|
|
3726
|
+
html += '<div class="d-flex justify-start align-center flex-wrap max-width-100">';
|
|
3727
3727
|
html += '<div class="d-flex flex-col flex-grow">';
|
|
3728
3728
|
html += '<label part="input-label">Completion Percentage</label>';
|
|
3729
3729
|
html += '<input id="input-reporter-percentage" part="input" type="number" value="' + percentage + '" max="100" min="0" step="1" disabled/><br />';
|
|
3730
3730
|
html += '</div>';
|
|
3731
|
-
html += '<div
|
|
3731
|
+
html += '<div class="d-flex flex-col flex-grow max-width-100">';
|
|
3732
|
+
html += '<div id="reporting-entity-container-0" class="reporting-entity-container d-flex flex-col flex-grow ml-20-m-0 hide max-width-100">';
|
|
3732
3733
|
html += '<label part="input-label">Entity</label>';
|
|
3733
3734
|
html += '<select id="input-reporter-entity-0" part="input" disabled></select>';
|
|
3734
3735
|
html += '</div>';
|
|
3735
|
-
html += '<div id="reporting-location-container-0" class="reporting-location-container d-flex flex-col flex-grow ml-20-m-0 hide">';
|
|
3736
|
+
html += '<div id="reporting-location-container-0" class="reporting-location-container d-flex flex-col flex-grow ml-20-m-0 hide max-width-100">';
|
|
3736
3737
|
html += '<label part="input-label">Location</label>';
|
|
3737
3738
|
html += '<select id="input-reporter-location-0" class="input-reporter-location" part="input" disabled></select>';
|
|
3738
3739
|
html += '</div>';
|
|
3739
|
-
// html += '<button id="button-reporter-location-add-0" part="button-icon-small" class="button-reporter-location-add material-icons ml-10 hide">' + (this.reportedLocationsVals.length >= 1 ? 'remove' : 'add') + '</button><br /></div>'
|
|
3740
3740
|
if (this.reportedLocationsVals.length > 1) {
|
|
3741
3741
|
let indexLocation = 1;
|
|
3742
3742
|
while (indexLocation < this.reportedLocationsVals.length) {
|
|
3743
|
-
html += '<div class="d-flex justify-start align-end flex-wrap">';
|
|
3744
|
-
html += '<div class="d-flex flex-col
|
|
3745
|
-
html += '<label class="invisible" part="input-label">Completion Percentage*</label>';
|
|
3746
|
-
html += '</div>';
|
|
3747
|
-
html += '<div id="reporting-entity-container-' + indexLocation + '" class="reporting-entity-container d-flex flex-col flex-grow ml-20-m-0 hide" disabled>';
|
|
3743
|
+
html += '<div class="d-flex justify-start align-end flex-wrap max-width-100">';
|
|
3744
|
+
html += '<div id="reporting-entity-container-' + indexLocation + '" class="reporting-entity-container d-flex flex-col ml-20-m-0 hide max-width-100">';
|
|
3748
3745
|
html += '<label part="input-label">Entity</label>';
|
|
3749
3746
|
html += '<select id="input-reporter-entity-' + indexLocation + '" part="input"></select>';
|
|
3750
3747
|
html += '</div>';
|
|
3751
|
-
html += '<div id="reporting-location-container-' + indexLocation + '" class="reporting-location-container d-flex flex-col flex-grow ml-20-m-0 hide"
|
|
3748
|
+
html += '<div id="reporting-location-container-' + indexLocation + '" class="reporting-location-container d-flex flex-col flex-grow ml-20-m-0 hide max-width-100">';
|
|
3752
3749
|
html += '<label part="input-label">Location</label>';
|
|
3753
|
-
html += '<select id="input-reporter-location-' + indexLocation + '"
|
|
3750
|
+
html += '<select id="input-reporter-location-' + indexLocation + '" class="input-reporter-location" part="input"></select>';
|
|
3754
3751
|
html += '</div>';
|
|
3755
|
-
|
|
3752
|
+
html += '<button id="button-reporter-location-add-' + indexLocation + '" part="button-icon-small" class="button-reporter-location-add material-icons ml-10 hide">remove</button><br /></div>';
|
|
3756
3753
|
indexLocation++;
|
|
3757
3754
|
}
|
|
3758
3755
|
}
|
|
3759
3756
|
html += '</div>';
|
|
3757
|
+
html += '</div>';
|
|
3760
3758
|
}
|
|
3761
3759
|
html += '<div>';
|
|
3762
3760
|
html += '<label part="input-label">Approve?*</label><br />';
|
|
@@ -3804,16 +3802,18 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3804
3802
|
if (event.module != 'contract' && event.module != 'license' && event.module != 'rcmresource') {
|
|
3805
3803
|
html += '<label part="input-label">Date of Completion*</label>';
|
|
3806
3804
|
html += '<input id="input-reporter-doc" part="input" type="date" value="' + (dateOfCompletion == "" ? dateOfCompletion : new Date(parseInt(dateOfCompletion)).toISOString().substring(0, 10)) + '" max="' + (new Date().toISOString().substring(0, 10)) + '"/><br />';
|
|
3807
|
-
html += '<div class="d-flex justify-start align-
|
|
3808
|
-
html += '<div class="d-flex flex-col flex-grow">';
|
|
3805
|
+
html += '<div class="d-flex justify-start align-start flex-wrap">';
|
|
3806
|
+
html += '<div class="d-flex flex-col flex-grow max-width-100">';
|
|
3809
3807
|
html += '<label part="input-label">Completion Percentage*</label>';
|
|
3810
3808
|
html += '<input id="input-reporter-percentage" part="input" type="number" value="' + percentage + '" max="100" min="0" step="1"/>';
|
|
3811
3809
|
html += '</div>';
|
|
3812
|
-
html += '<div
|
|
3810
|
+
html += '<div class="d-flex flex-col max-width-100">';
|
|
3811
|
+
html += '<div class="d-flex justify-start align-end flex-wrap max-width-100">';
|
|
3812
|
+
html += '<div id="reporting-entity-container-0" class="reporting-entity-container d-flex flex-col ml-20-m-0 hide max-width-100">';
|
|
3813
3813
|
html += '<label part="input-label">Entity</label>';
|
|
3814
3814
|
html += '<select id="input-reporter-entity-0" part="input"></select>';
|
|
3815
3815
|
html += '</div>';
|
|
3816
|
-
html += '<div id="reporting-location-container-0" class="reporting-location-container d-flex flex-col flex-grow ml-20-m-0 hide">';
|
|
3816
|
+
html += '<div id="reporting-location-container-0" class="reporting-location-container d-flex flex-col flex-grow ml-20-m-0 hide max-width-100">';
|
|
3817
3817
|
html += '<label part="input-label">Location</label>';
|
|
3818
3818
|
html += '<select id="input-reporter-location-0" class="input-reporter-location" part="input"></select>';
|
|
3819
3819
|
html += '</div>';
|
|
@@ -3821,15 +3821,12 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3821
3821
|
if (this.reportedLocationsVals.length > 1) {
|
|
3822
3822
|
let indexLocation = 1;
|
|
3823
3823
|
while (indexLocation < this.reportedLocationsVals.length) {
|
|
3824
|
-
html += '<div class="d-flex justify-start align-end flex-wrap">';
|
|
3825
|
-
html += '<div class="d-flex flex-col
|
|
3826
|
-
html += '<label class="invisible" part="input-label">Completion Percentage*</label>';
|
|
3827
|
-
html += '</div>';
|
|
3828
|
-
html += '<div id="reporting-entity-container-' + indexLocation + '" class="reporting-entity-container d-flex flex-col flex-grow ml-20-m-0 hide">';
|
|
3824
|
+
html += '<div class="d-flex justify-start align-end flex-wrap max-width-100">';
|
|
3825
|
+
html += '<div id="reporting-entity-container-' + indexLocation + '" class="reporting-entity-container d-flex flex-col ml-20-m-0 hide max-width-100">';
|
|
3829
3826
|
html += '<label part="input-label">Entity</label>';
|
|
3830
3827
|
html += '<select id="input-reporter-entity-' + indexLocation + '" part="input"></select>';
|
|
3831
3828
|
html += '</div>';
|
|
3832
|
-
html += '<div id="reporting-location-container-' + indexLocation + '" class="reporting-location-container d-flex flex-col flex-grow ml-20-m-0 hide">';
|
|
3829
|
+
html += '<div id="reporting-location-container-' + indexLocation + '" class="reporting-location-container d-flex flex-col flex-grow ml-20-m-0 hide max-width-100">';
|
|
3833
3830
|
html += '<label part="input-label">Location</label>';
|
|
3834
3831
|
html += '<select id="input-reporter-location-' + indexLocation + '" class="input-reporter-location" part="input"></select>';
|
|
3835
3832
|
html += '</div>';
|
|
@@ -3837,6 +3834,8 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3837
3834
|
indexLocation++;
|
|
3838
3835
|
}
|
|
3839
3836
|
}
|
|
3837
|
+
html += '</div>';
|
|
3838
|
+
html += '</div>';
|
|
3840
3839
|
html += '<div class="d-flex justify-end align-end mt-10" class="input-report-location-add-container">';
|
|
3841
3840
|
html += '<button id="button-reporter-location-add-0" part="button-icon-small" class="button-reporter-location-add material-icons ml-10-m-0 hide">add</button><br /></div>';
|
|
3842
3841
|
html += '<div part="input-reporter-percentage-message" class="input-reporter-percentage-message mb-20">For reporting full non-compliance, choose 0%. For reporting compliance with gaps, choose the appropriate % value.</div><br />';
|
|
@@ -4133,7 +4132,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
4133
4132
|
}
|
|
4134
4133
|
event.percentage = inputReportingPercentage.value;
|
|
4135
4134
|
event.reportedlocations = JSON.stringify(this.reportedLocationsVals);
|
|
4136
|
-
if (this.reportedLocationsVals.length == 0
|
|
4135
|
+
if (this.reportedLocationsVals.length == 0) {
|
|
4137
4136
|
event.percentage = "100";
|
|
4138
4137
|
}
|
|
4139
4138
|
console.log('rendering list reporting', event.percentage, event.reportedlocations);
|
|
@@ -4148,6 +4147,9 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
4148
4147
|
let selectReportingEntity = listReportingContainer.querySelector('#input-reporter-entity-' + indexRepLoc);
|
|
4149
4148
|
let selectReportingLocation = listReportingContainer.querySelector('#input-reporter-location-' + indexRepLoc);
|
|
4150
4149
|
selectReportingEntity.innerHTML = '';
|
|
4150
|
+
let defaultOption = new Option("Select Location", "", true, true);
|
|
4151
|
+
defaultOption.disabled = true;
|
|
4152
|
+
selectReportingEntity.add(defaultOption);
|
|
4151
4153
|
for (let country of Object.keys(projectUserMap)) {
|
|
4152
4154
|
if (country == "roles") {
|
|
4153
4155
|
continue;
|
|
@@ -4160,6 +4162,9 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
4160
4162
|
}
|
|
4161
4163
|
selectReportingEntity.addEventListener('change', (e) => {
|
|
4162
4164
|
selectReportingLocation.innerHTML = '';
|
|
4165
|
+
let defaultOption = new Option("Select Location", "", true, true);
|
|
4166
|
+
defaultOption.disabled = true;
|
|
4167
|
+
selectReportingLocation.add(defaultOption);
|
|
4163
4168
|
for (let country of Object.keys(projectUserMap)) {
|
|
4164
4169
|
if (country == "roles") {
|
|
4165
4170
|
continue;
|
|
@@ -4179,23 +4184,29 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
4179
4184
|
selectReportingLocation.value = event.reportedlocations != null ? (Util.isJSONParsable(event.reportedlocations) ? JSON.parse(event.reportedlocations)[indexRepLoc] : event.reportedlocations) : "";
|
|
4180
4185
|
});
|
|
4181
4186
|
if (selectReportingLocation.innerHTML == '') {
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
|
|
4187
|
+
let defaultOption = new Option("Select Location", "", true, true);
|
|
4188
|
+
defaultOption.disabled = true;
|
|
4189
|
+
selectReportingLocation.add(defaultOption);
|
|
4190
|
+
// for (let country of Object.keys(projectUserMap)) {
|
|
4191
|
+
// if (country == "roles") {
|
|
4192
|
+
// continue;
|
|
4193
|
+
// }
|
|
4194
|
+
// for (let entity of Object.keys(projectUserMap[country])) {
|
|
4195
|
+
// for (let location of Object.keys(projectUserMap[country][entity])) {
|
|
4196
|
+
// let locationName = location.split(';')[0].replace(/ *\([^)]*\) */g, "")
|
|
4197
|
+
// let option = new Option(locationName, location)
|
|
4198
|
+
// selectReportingLocation.add(option);
|
|
4199
|
+
// break;
|
|
4200
|
+
// }
|
|
4201
|
+
// break;
|
|
4202
|
+
// }
|
|
4203
|
+
// break;
|
|
4204
|
+
// }
|
|
4197
4205
|
}
|
|
4198
4206
|
selectReportingLocation.addEventListener('change', (e) => {
|
|
4207
|
+
if (selectReportingEntity.value == "") {
|
|
4208
|
+
return;
|
|
4209
|
+
}
|
|
4199
4210
|
let index = parseInt(e.target.id.split('-')[3]);
|
|
4200
4211
|
this.reportedLocationsVals[index] = e.target.value;
|
|
4201
4212
|
});
|
|
@@ -10821,19 +10832,34 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10821
10832
|
for (var k = 0; k < cols.length; k++) {
|
|
10822
10833
|
if (!this.EXCLUDE_COLS_FROM_REGS.includes(cols[k].toLowerCase())) {
|
|
10823
10834
|
if (cols[k].toLowerCase() == "attachment") {
|
|
10824
|
-
|
|
10825
|
-
|
|
10826
|
-
|
|
10827
|
-
|
|
10828
|
-
|
|
10829
|
-
|
|
10835
|
+
console.log('attachments', data[k]);
|
|
10836
|
+
if (typeof data[k] === "string") {
|
|
10837
|
+
let attachmentArr = JSON.parse(data[k].toString());
|
|
10838
|
+
if (attachmentArr.length > 0) {
|
|
10839
|
+
html += '<div class="m-20">';
|
|
10840
|
+
html += '<div part="detail-head"><strong>' + cols[k] + '</strong></div>';
|
|
10841
|
+
for (let attachment of attachmentArr) {
|
|
10842
|
+
html += `<sf-i-uploader class="event-attachment" max="10" apiid="1peg5170d3" allowedextensions="["jpg","png","pdf","xls","xlsx","doc","docx"]" prepopulatedInputArr="${JSON.stringify([{ "key": attachment.key, "ext": attachment.ext }]).replace(/"/g, '"')}" extract="no" mode="view" maximize="yes" hidepreview="yes" displaydetail="yes"></sf-i-uploader>`;
|
|
10843
|
+
}
|
|
10844
|
+
html += '</div>';
|
|
10830
10845
|
}
|
|
10831
|
-
|
|
10832
|
-
|
|
10846
|
+
}
|
|
10847
|
+
else {
|
|
10848
|
+
html += '<div class="m-20">';
|
|
10849
|
+
html += '<div part="detail-head"><strong>' + cols[k] + '</strong></div>';
|
|
10850
|
+
for (let attachmentStr of data[k]) {
|
|
10851
|
+
let attachment = {};
|
|
10852
|
+
if (typeof attachmentStr === "object") {
|
|
10853
|
+
attachment = attachmentStr;
|
|
10854
|
+
}
|
|
10855
|
+
else {
|
|
10856
|
+
attachment = JSON.parse(attachmentStr.toString());
|
|
10857
|
+
}
|
|
10858
|
+
html += `<sf-i-uploader class="event-attachment" max="10" apiid="1peg5170d3" allowedextensions="["jpg","png","pdf","xls","xlsx","doc","docx"]" prepopulatedInputArr="${JSON.stringify([{ "key": attachment.key, "ext": attachment.ext }]).replace(/"/g, '"')}" extract="no" mode="view" maximize="yes" hidepreview="yes" displaydetail="yes"></sf-i-uploader>`;
|
|
10833
10859
|
}
|
|
10834
|
-
html +=
|
|
10860
|
+
html += '</div>';
|
|
10835
10861
|
}
|
|
10836
|
-
html += '</div>';
|
|
10862
|
+
// html += '</div>';
|
|
10837
10863
|
}
|
|
10838
10864
|
else {
|
|
10839
10865
|
html += '<div class="m-20">';
|
|
@@ -14909,10 +14935,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
14909
14935
|
}
|
|
14910
14936
|
event.percentage = inputReportingPercentage.value;
|
|
14911
14937
|
event.reportedlocations = JSON.stringify(this.reportedLocationsVals);
|
|
14912
|
-
if (this.reportedLocationsVals.length == 0
|
|
14938
|
+
if (this.reportedLocationsVals.length == 0) {
|
|
14913
14939
|
event.percentage = "100";
|
|
14914
14940
|
}
|
|
14915
|
-
console.log('rendering list reporting', event.percentage, event.reportedlocations);
|
|
14941
|
+
console.log('rendering list reporting', this.reportedLocationsVals, event.percentage, event.reportedlocations);
|
|
14916
14942
|
event.reportercomments = eventDetailReportingContainer.querySelector('#input-reporter-comments').value;
|
|
14917
14943
|
event.dateofcompletion = eventDetailReportingContainer.querySelector('#input-reporter-doc').value.length > 0 ? (new Date(eventDetailReportingContainer.querySelector('#input-reporter-doc').value).getTime() + "") : "";
|
|
14918
14944
|
event.documents = this._SfUploader[0].querySelector('#uploader').selectedValues();
|
|
@@ -14924,6 +14950,9 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
14924
14950
|
let selectReportingEntity = eventDetailReportingContainer.querySelector('#input-reporter-entity-' + indexRepLoc);
|
|
14925
14951
|
let selectReportingLocation = eventDetailReportingContainer.querySelector('#input-reporter-location-' + indexRepLoc);
|
|
14926
14952
|
selectReportingEntity.innerHTML = '';
|
|
14953
|
+
let defaultOption = new Option("Select Entity", "", true, true);
|
|
14954
|
+
defaultOption.disabled = true;
|
|
14955
|
+
selectReportingEntity.add(defaultOption);
|
|
14927
14956
|
for (let country of Object.keys(projectUserMap)) {
|
|
14928
14957
|
if (country == "roles") {
|
|
14929
14958
|
continue;
|
|
@@ -14936,6 +14965,9 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
14936
14965
|
}
|
|
14937
14966
|
selectReportingEntity.addEventListener('change', (e) => {
|
|
14938
14967
|
selectReportingLocation.innerHTML = '';
|
|
14968
|
+
let defaultOption = new Option("Select Location", "", true, true);
|
|
14969
|
+
defaultOption.disabled = true;
|
|
14970
|
+
selectReportingLocation.add(defaultOption);
|
|
14939
14971
|
for (let country of Object.keys(projectUserMap)) {
|
|
14940
14972
|
if (country == "roles") {
|
|
14941
14973
|
continue;
|
|
@@ -14955,27 +14987,33 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
14955
14987
|
selectReportingLocation.value = event.reportedlocations != null ? (Util.isJSONParsable(event.reportedlocations) ? JSON.parse(event.reportedlocations)[indexRepLoc] : event.reportedlocations) : "";
|
|
14956
14988
|
});
|
|
14957
14989
|
if (selectReportingLocation.innerHTML == '') {
|
|
14958
|
-
|
|
14959
|
-
|
|
14960
|
-
|
|
14961
|
-
|
|
14962
|
-
|
|
14963
|
-
|
|
14964
|
-
|
|
14965
|
-
|
|
14966
|
-
|
|
14967
|
-
|
|
14968
|
-
|
|
14969
|
-
|
|
14970
|
-
|
|
14971
|
-
|
|
14972
|
-
|
|
14990
|
+
let defaultOption = new Option("Select Location", "", true, true);
|
|
14991
|
+
defaultOption.disabled = true;
|
|
14992
|
+
selectReportingLocation.add(defaultOption);
|
|
14993
|
+
// for (let country of Object.keys(projectUserMap)) {
|
|
14994
|
+
// if (country == "roles") {
|
|
14995
|
+
// continue;
|
|
14996
|
+
// }
|
|
14997
|
+
// for (let entity of Object.keys(projectUserMap[country])) {
|
|
14998
|
+
// for (let location of Object.keys(projectUserMap[country][entity])) {
|
|
14999
|
+
// let locationName = location.split(';')[0].replace(/ *\([^)]*\) */g, "")
|
|
15000
|
+
// let option = new Option(locationName, location)
|
|
15001
|
+
// selectReportingLocation.add(option);
|
|
15002
|
+
// break;
|
|
15003
|
+
// }
|
|
15004
|
+
// break;
|
|
15005
|
+
// }
|
|
15006
|
+
// break;
|
|
15007
|
+
// }
|
|
14973
15008
|
}
|
|
14974
15009
|
selectReportingLocation.addEventListener('change', (e) => {
|
|
15010
|
+
if (selectReportingEntity.value == "") {
|
|
15011
|
+
return;
|
|
15012
|
+
}
|
|
14975
15013
|
let index = parseInt(e.target.id.split('-')[3]);
|
|
14976
15014
|
this.reportedLocationsVals[index] = e.target.value;
|
|
14977
15015
|
});
|
|
14978
|
-
if (event.reportedlocations != null && event.reportedlocations.length >
|
|
15016
|
+
if (event.reportedlocations != null && event.reportedlocations.length > indexRepLoc) {
|
|
14979
15017
|
console.log('setting reportedlocations', event.reportedlocations);
|
|
14980
15018
|
let tempReportedLocation = Util.isJSONParsable(event.reportedlocations) ? JSON.parse(event.reportedlocations)[indexRepLoc] : event.reportedlocations;
|
|
14981
15019
|
for (let country of Object.keys(projectUserMap)) {
|
|
@@ -27549,6 +27587,9 @@ SfIEvents.styles = css `
|
|
|
27549
27587
|
position: relative;
|
|
27550
27588
|
}
|
|
27551
27589
|
|
|
27590
|
+
.max-width-100{
|
|
27591
|
+
max-width: 100%
|
|
27592
|
+
}
|
|
27552
27593
|
@media (orientation: landscape) {
|
|
27553
27594
|
|
|
27554
27595
|
.lb {
|
package/src/sf-i-events.ts
CHANGED
|
@@ -2779,6 +2779,9 @@ export class SfIEvents extends LitElement {
|
|
|
2779
2779
|
position: relative;
|
|
2780
2780
|
}
|
|
2781
2781
|
|
|
2782
|
+
.max-width-100{
|
|
2783
|
+
max-width: 100%
|
|
2784
|
+
}
|
|
2782
2785
|
@media (orientation: landscape) {
|
|
2783
2786
|
|
|
2784
2787
|
.lb {
|
|
@@ -4915,7 +4918,7 @@ export class SfIEvents extends LitElement {
|
|
|
4915
4918
|
<sf-i-elastic-text exportparts="highlight,highlight-count"
|
|
4916
4919
|
class="stream-event-title${!isBulk ? ' button-event-title' : ''}"
|
|
4917
4920
|
id="stream-event-title-${mmddSanitized}-${itemNumber}-${moduleType}-${(isReportedLocation) ? 'reportedlocations' : ''}"
|
|
4918
|
-
text="${event.obligationtitle.replace(/\\n/g,'')}"
|
|
4921
|
+
text="${event.obligationtitle.replace(/\\n/g, '')}"
|
|
4919
4922
|
minLength="${event.concise == null ? '100' : '60'}">
|
|
4920
4923
|
</sf-i-elastic-text>
|
|
4921
4924
|
${showLocationRisk ? `
|
|
@@ -4956,8 +4959,8 @@ export class SfIEvents extends LitElement {
|
|
|
4956
4959
|
|
|
4957
4960
|
</div>
|
|
4958
4961
|
`;
|
|
4959
|
-
|
|
4960
|
-
|
|
4962
|
+
// ${this.finRiskCurrency == event['localcurrency'] ? `<div part="event-min" class="ml-10 d-flex align-center">${event['minlocal'] ?? ""}</div>` : `<div part="event-min" class="ml-10 d-flex align-center">${event['minglobal'] ?? ""}</div>`}
|
|
4963
|
+
// ${this.finRiskCurrency == event['localcurrency'] ? `<div part="event-min" class="ml-10 d-flex align-center">${((event['maxlocal'] < event['minlocal']) ? event['minlocal'] : event['maxlocal']) ?? ""}</div>` : `<div part="event-min" class="ml-10 d-flex align-center">${((event['maxglobal'] < event['minglobal']) ? event['minglobal'] : event['maxglobal']) ?? ""}</div>`}
|
|
4961
4964
|
if (event.concise == null && remarks.length > 0) {
|
|
4962
4965
|
html += '<div part="stream-events-event-subtitle" class="stream-events-event-subtitle">' + remarks + ', occurred on ' + occurrenceDate + '</div>';
|
|
4963
4966
|
}
|
|
@@ -5728,7 +5731,7 @@ export class SfIEvents extends LitElement {
|
|
|
5728
5731
|
}
|
|
5729
5732
|
|
|
5730
5733
|
let showFinRisk = false
|
|
5731
|
-
if (this.selectedFeatures.indexOf('contracts') < 0 && this.selectedFeatures.indexOf('notices') && this.selectedFeatures.indexOf('licenses') < 0 && this.selectedFeatures.indexOf('rcmresources') < 0 && this.finRiskCurrency != "") {
|
|
5734
|
+
if (this.selectedFeatures.indexOf('contracts') < 0 && this.selectedFeatures.indexOf('notices') && this.selectedFeatures.indexOf('licenses') < 0 && this.selectedFeatures.indexOf('rcmresources') < 0 && this.finRiskCurrency != "" && (this.minRiskResidual > 0 || this.minRiskMitigated > 0 || this.maxRiskResidual > 0 || this.maxRiskMitigated > 0)) {
|
|
5732
5735
|
showFinRisk = true
|
|
5733
5736
|
}
|
|
5734
5737
|
//console.log('final risk severities', this.riskSeverityData);
|
|
@@ -6089,40 +6092,38 @@ export class SfIEvents extends LitElement {
|
|
|
6089
6092
|
if (event.module != 'contract' && event.module != 'license' && event.module != 'rcmresource') {
|
|
6090
6093
|
html += '<label part="input-label">Date of Completion*</label>';
|
|
6091
6094
|
html += '<input id="input-approver-doc" part="input" type="date" value="' + (dateOfCompletion == "" ? dateOfCompletion : new Date(parseInt(dateOfCompletion)).toISOString().substring(0, 10)) + '" disabled/><br />';
|
|
6092
|
-
html += '<div class="d-flex justify-start align-center flex-wrap">';
|
|
6095
|
+
html += '<div class="d-flex justify-start align-center flex-wrap max-width-100">';
|
|
6093
6096
|
html += '<div class="d-flex flex-col flex-grow">';
|
|
6094
6097
|
html += '<label part="input-label">Completion Percentage</label>';
|
|
6095
6098
|
html += '<input id="input-reporter-percentage" part="input" type="number" value="' + percentage + '" max="100" min="0" step="1" disabled/><br />';
|
|
6096
6099
|
html += '</div>'
|
|
6097
|
-
html += '<div
|
|
6100
|
+
html += '<div class="d-flex flex-col flex-grow max-width-100">';
|
|
6101
|
+
html += '<div id="reporting-entity-container-0" class="reporting-entity-container d-flex flex-col flex-grow ml-20-m-0 hide max-width-100">';
|
|
6098
6102
|
html += '<label part="input-label">Entity</label>';
|
|
6099
6103
|
html += '<select id="input-reporter-entity-0" part="input" disabled></select>';
|
|
6100
6104
|
html += '</div>'
|
|
6101
|
-
html += '<div id="reporting-location-container-0" class="reporting-location-container d-flex flex-col flex-grow ml-20-m-0 hide">';
|
|
6105
|
+
html += '<div id="reporting-location-container-0" class="reporting-location-container d-flex flex-col flex-grow ml-20-m-0 hide max-width-100">';
|
|
6102
6106
|
html += '<label part="input-label">Location</label>';
|
|
6103
6107
|
html += '<select id="input-reporter-location-0" class="input-reporter-location" part="input" disabled></select>';
|
|
6104
6108
|
html += '</div>'
|
|
6105
|
-
// html += '<button id="button-reporter-location-add-0" part="button-icon-small" class="button-reporter-location-add material-icons ml-10 hide">' + (this.reportedLocationsVals.length >= 1 ? 'remove' : 'add') + '</button><br /></div>'
|
|
6106
6109
|
if (this.reportedLocationsVals.length > 1) {
|
|
6107
6110
|
let indexLocation = 1;
|
|
6108
6111
|
while (indexLocation < this.reportedLocationsVals.length) {
|
|
6109
|
-
html += '<div class="d-flex justify-start align-end flex-wrap">';
|
|
6110
|
-
html += '<div class="d-flex flex-col
|
|
6111
|
-
html += '<label class="invisible" part="input-label">Completion Percentage*</label>';
|
|
6112
|
-
html += '</div>'
|
|
6113
|
-
html += '<div id="reporting-entity-container-' + indexLocation + '" class="reporting-entity-container d-flex flex-col flex-grow ml-20-m-0 hide" disabled>';
|
|
6112
|
+
html += '<div class="d-flex justify-start align-end flex-wrap max-width-100">';
|
|
6113
|
+
html += '<div id="reporting-entity-container-' + indexLocation + '" class="reporting-entity-container d-flex flex-col ml-20-m-0 hide max-width-100">';
|
|
6114
6114
|
html += '<label part="input-label">Entity</label>';
|
|
6115
6115
|
html += '<select id="input-reporter-entity-' + indexLocation + '" part="input"></select>';
|
|
6116
6116
|
html += '</div>'
|
|
6117
|
-
html += '<div id="reporting-location-container-' + indexLocation + '" class="reporting-location-container d-flex flex-col flex-grow ml-20-m-0 hide"
|
|
6117
|
+
html += '<div id="reporting-location-container-' + indexLocation + '" class="reporting-location-container d-flex flex-col flex-grow ml-20-m-0 hide max-width-100">';
|
|
6118
6118
|
html += '<label part="input-label">Location</label>';
|
|
6119
|
-
html += '<select id="input-reporter-location-' + indexLocation + '"
|
|
6119
|
+
html += '<select id="input-reporter-location-' + indexLocation + '" class="input-reporter-location" part="input"></select>';
|
|
6120
6120
|
html += '</div>'
|
|
6121
|
-
|
|
6121
|
+
html += '<button id="button-reporter-location-add-' + indexLocation + '" part="button-icon-small" class="button-reporter-location-add material-icons ml-10 hide">remove</button><br /></div>'
|
|
6122
6122
|
indexLocation++
|
|
6123
6123
|
}
|
|
6124
6124
|
}
|
|
6125
6125
|
html += '</div>'
|
|
6126
|
+
html += '</div>'
|
|
6126
6127
|
|
|
6127
6128
|
}
|
|
6128
6129
|
html += '<div>'
|
|
@@ -6183,16 +6184,18 @@ export class SfIEvents extends LitElement {
|
|
|
6183
6184
|
if (event.module != 'contract' && event.module != 'license' && event.module != 'rcmresource') {
|
|
6184
6185
|
html += '<label part="input-label">Date of Completion*</label>';
|
|
6185
6186
|
html += '<input id="input-reporter-doc" part="input" type="date" value="' + (dateOfCompletion == "" ? dateOfCompletion : new Date(parseInt(dateOfCompletion)).toISOString().substring(0, 10)) + '" max="' + (new Date().toISOString().substring(0, 10)) + '"/><br />';
|
|
6186
|
-
html += '<div class="d-flex justify-start align-
|
|
6187
|
-
html += '<div class="d-flex flex-col flex-grow">';
|
|
6187
|
+
html += '<div class="d-flex justify-start align-start flex-wrap">';
|
|
6188
|
+
html += '<div class="d-flex flex-col flex-grow max-width-100">';
|
|
6188
6189
|
html += '<label part="input-label">Completion Percentage*</label>';
|
|
6189
6190
|
html += '<input id="input-reporter-percentage" part="input" type="number" value="' + percentage + '" max="100" min="0" step="1"/>';
|
|
6190
6191
|
html += '</div>'
|
|
6191
|
-
html += '<div
|
|
6192
|
+
html += '<div class="d-flex flex-col max-width-100">';
|
|
6193
|
+
html += '<div class="d-flex justify-start align-end flex-wrap max-width-100">';
|
|
6194
|
+
html += '<div id="reporting-entity-container-0" class="reporting-entity-container d-flex flex-col ml-20-m-0 hide max-width-100">';
|
|
6192
6195
|
html += '<label part="input-label">Entity</label>';
|
|
6193
6196
|
html += '<select id="input-reporter-entity-0" part="input"></select>';
|
|
6194
6197
|
html += '</div>'
|
|
6195
|
-
html += '<div id="reporting-location-container-0" class="reporting-location-container d-flex flex-col flex-grow ml-20-m-0 hide">';
|
|
6198
|
+
html += '<div id="reporting-location-container-0" class="reporting-location-container d-flex flex-col flex-grow ml-20-m-0 hide max-width-100">';
|
|
6196
6199
|
html += '<label part="input-label">Location</label>';
|
|
6197
6200
|
html += '<select id="input-reporter-location-0" class="input-reporter-location" part="input"></select>';
|
|
6198
6201
|
html += '</div>'
|
|
@@ -6200,15 +6203,12 @@ export class SfIEvents extends LitElement {
|
|
|
6200
6203
|
if (this.reportedLocationsVals.length > 1) {
|
|
6201
6204
|
let indexLocation = 1;
|
|
6202
6205
|
while (indexLocation < this.reportedLocationsVals.length) {
|
|
6203
|
-
html += '<div class="d-flex justify-start align-end flex-wrap">';
|
|
6204
|
-
html += '<div class="d-flex flex-col
|
|
6205
|
-
html += '<label class="invisible" part="input-label">Completion Percentage*</label>';
|
|
6206
|
-
html += '</div>'
|
|
6207
|
-
html += '<div id="reporting-entity-container-' + indexLocation + '" class="reporting-entity-container d-flex flex-col flex-grow ml-20-m-0 hide">';
|
|
6206
|
+
html += '<div class="d-flex justify-start align-end flex-wrap max-width-100">';
|
|
6207
|
+
html += '<div id="reporting-entity-container-' + indexLocation + '" class="reporting-entity-container d-flex flex-col ml-20-m-0 hide max-width-100">';
|
|
6208
6208
|
html += '<label part="input-label">Entity</label>';
|
|
6209
6209
|
html += '<select id="input-reporter-entity-' + indexLocation + '" part="input"></select>';
|
|
6210
6210
|
html += '</div>'
|
|
6211
|
-
html += '<div id="reporting-location-container-' + indexLocation + '" class="reporting-location-container d-flex flex-col flex-grow ml-20-m-0 hide">';
|
|
6211
|
+
html += '<div id="reporting-location-container-' + indexLocation + '" class="reporting-location-container d-flex flex-col flex-grow ml-20-m-0 hide max-width-100">';
|
|
6212
6212
|
html += '<label part="input-label">Location</label>';
|
|
6213
6213
|
html += '<select id="input-reporter-location-' + indexLocation + '" class="input-reporter-location" part="input"></select>';
|
|
6214
6214
|
html += '</div>'
|
|
@@ -6216,8 +6216,11 @@ export class SfIEvents extends LitElement {
|
|
|
6216
6216
|
indexLocation++
|
|
6217
6217
|
}
|
|
6218
6218
|
}
|
|
6219
|
+
html += '</div>'
|
|
6220
|
+
html += '</div>'
|
|
6219
6221
|
html += '<div class="d-flex justify-end align-end mt-10" class="input-report-location-add-container">';
|
|
6220
6222
|
html += '<button id="button-reporter-location-add-0" part="button-icon-small" class="button-reporter-location-add material-icons ml-10-m-0 hide">add</button><br /></div>'
|
|
6223
|
+
|
|
6221
6224
|
html += '<div part="input-reporter-percentage-message" class="input-reporter-percentage-message mb-20">For reporting full non-compliance, choose 0%. For reporting compliance with gaps, choose the appropriate % value.</div><br />'
|
|
6222
6225
|
|
|
6223
6226
|
// if(docsOptional.length === 0) {
|
|
@@ -6520,7 +6523,7 @@ export class SfIEvents extends LitElement {
|
|
|
6520
6523
|
}
|
|
6521
6524
|
event.percentage = inputReportingPercentage.value;
|
|
6522
6525
|
event.reportedlocations = JSON.stringify(this.reportedLocationsVals)
|
|
6523
|
-
if (this.reportedLocationsVals.length == 0
|
|
6526
|
+
if (this.reportedLocationsVals.length == 0) {
|
|
6524
6527
|
event.percentage = "100";
|
|
6525
6528
|
}
|
|
6526
6529
|
console.log('rendering list reporting', event.percentage, event.reportedlocations)
|
|
@@ -6536,6 +6539,9 @@ export class SfIEvents extends LitElement {
|
|
|
6536
6539
|
let selectReportingEntity = listReportingContainer.querySelector('#input-reporter-entity-' + indexRepLoc) as HTMLSelectElement;
|
|
6537
6540
|
let selectReportingLocation = listReportingContainer.querySelector('#input-reporter-location-' + indexRepLoc) as HTMLSelectElement;
|
|
6538
6541
|
selectReportingEntity.innerHTML = '';
|
|
6542
|
+
let defaultOption = new Option("Select Location", "", true, true)
|
|
6543
|
+
defaultOption.disabled = true
|
|
6544
|
+
selectReportingEntity.add(defaultOption)
|
|
6539
6545
|
for (let country of Object.keys(projectUserMap)) {
|
|
6540
6546
|
if (country == "roles") {
|
|
6541
6547
|
continue;
|
|
@@ -6548,6 +6554,9 @@ export class SfIEvents extends LitElement {
|
|
|
6548
6554
|
}
|
|
6549
6555
|
selectReportingEntity.addEventListener('change', (e: any) => {
|
|
6550
6556
|
selectReportingLocation.innerHTML = ''
|
|
6557
|
+
let defaultOption = new Option("Select Location", "", true, true)
|
|
6558
|
+
defaultOption.disabled = true
|
|
6559
|
+
selectReportingLocation.add(defaultOption)
|
|
6551
6560
|
for (let country of Object.keys(projectUserMap)) {
|
|
6552
6561
|
if (country == "roles") {
|
|
6553
6562
|
continue;
|
|
@@ -6567,23 +6576,29 @@ export class SfIEvents extends LitElement {
|
|
|
6567
6576
|
selectReportingLocation.value = event.reportedlocations != null ? (Util.isJSONParsable(event.reportedlocations) ? JSON.parse(event.reportedlocations)[indexRepLoc] : event.reportedlocations) : "";
|
|
6568
6577
|
})
|
|
6569
6578
|
if (selectReportingLocation.innerHTML == '') {
|
|
6570
|
-
|
|
6571
|
-
|
|
6572
|
-
|
|
6573
|
-
|
|
6574
|
-
|
|
6575
|
-
|
|
6576
|
-
|
|
6577
|
-
|
|
6578
|
-
|
|
6579
|
-
|
|
6580
|
-
|
|
6581
|
-
|
|
6582
|
-
|
|
6583
|
-
|
|
6584
|
-
|
|
6579
|
+
let defaultOption = new Option("Select Location", "", true, true)
|
|
6580
|
+
defaultOption.disabled = true
|
|
6581
|
+
selectReportingLocation.add(defaultOption)
|
|
6582
|
+
// for (let country of Object.keys(projectUserMap)) {
|
|
6583
|
+
// if (country == "roles") {
|
|
6584
|
+
// continue;
|
|
6585
|
+
// }
|
|
6586
|
+
// for (let entity of Object.keys(projectUserMap[country])) {
|
|
6587
|
+
// for (let location of Object.keys(projectUserMap[country][entity])) {
|
|
6588
|
+
// let locationName = location.split(';')[0].replace(/ *\([^)]*\) */g, "")
|
|
6589
|
+
// let option = new Option(locationName, location)
|
|
6590
|
+
// selectReportingLocation.add(option);
|
|
6591
|
+
// break;
|
|
6592
|
+
// }
|
|
6593
|
+
// break;
|
|
6594
|
+
// }
|
|
6595
|
+
// break;
|
|
6596
|
+
// }
|
|
6585
6597
|
}
|
|
6586
6598
|
selectReportingLocation.addEventListener('change', (e: any) => {
|
|
6599
|
+
if(selectReportingEntity.value == ""){
|
|
6600
|
+
return;
|
|
6601
|
+
}
|
|
6587
6602
|
let index = parseInt(e.target.id.split('-')[3])
|
|
6588
6603
|
this.reportedLocationsVals[index] = e.target.value
|
|
6589
6604
|
})
|
|
@@ -14313,18 +14328,34 @@ export class SfIEvents extends LitElement {
|
|
|
14313
14328
|
if (!this.EXCLUDE_COLS_FROM_REGS.includes(cols[k].toLowerCase())) {
|
|
14314
14329
|
|
|
14315
14330
|
if (cols[k].toLowerCase() == "attachment") {
|
|
14316
|
-
|
|
14317
|
-
|
|
14318
|
-
|
|
14319
|
-
let
|
|
14320
|
-
if (
|
|
14321
|
-
|
|
14322
|
-
|
|
14323
|
-
|
|
14331
|
+
|
|
14332
|
+
console.log('attachments', data[k]);
|
|
14333
|
+
if (typeof data[k] === "string") {
|
|
14334
|
+
let attachmentArr = JSON.parse(data[k].toString());
|
|
14335
|
+
if (attachmentArr.length > 0) {
|
|
14336
|
+
html += '<div class="m-20">';
|
|
14337
|
+
html += '<div part="detail-head"><strong>' + cols[k] + '</strong></div>'
|
|
14338
|
+
for (let attachment of attachmentArr) {
|
|
14339
|
+
|
|
14340
|
+
html += `<sf-i-uploader class="event-attachment" max="10" apiid="1peg5170d3" allowedextensions="["jpg","png","pdf","xls","xlsx","doc","docx"]" prepopulatedInputArr="${JSON.stringify([{ "key": attachment.key, "ext": attachment.ext }]).replace(/"/g, '"')}" extract="no" mode="view" maximize="yes" hidepreview="yes" displaydetail="yes"></sf-i-uploader>`
|
|
14341
|
+
}
|
|
14342
|
+
html += '</div>';
|
|
14324
14343
|
}
|
|
14325
|
-
|
|
14344
|
+
} else {
|
|
14345
|
+
html += '<div class="m-20">';
|
|
14346
|
+
html += '<div part="detail-head"><strong>' + cols[k] + '</strong></div>'
|
|
14347
|
+
for (let attachmentStr of data[k]) {
|
|
14348
|
+
let attachment: any = {};
|
|
14349
|
+
if (typeof attachmentStr === "object") {
|
|
14350
|
+
attachment = attachmentStr;
|
|
14351
|
+
} else {
|
|
14352
|
+
attachment = JSON.parse(attachmentStr.toString());
|
|
14353
|
+
}
|
|
14354
|
+
html += `<sf-i-uploader class="event-attachment" max="10" apiid="1peg5170d3" allowedextensions="["jpg","png","pdf","xls","xlsx","doc","docx"]" prepopulatedInputArr="${JSON.stringify([{ "key": attachment.key, "ext": attachment.ext }]).replace(/"/g, '"')}" extract="no" mode="view" maximize="yes" hidepreview="yes" displaydetail="yes"></sf-i-uploader>`
|
|
14355
|
+
}
|
|
14356
|
+
html += '</div>';
|
|
14326
14357
|
}
|
|
14327
|
-
html += '</div>';
|
|
14358
|
+
// html += '</div>';
|
|
14328
14359
|
} else {
|
|
14329
14360
|
html += '<div class="m-20">';
|
|
14330
14361
|
html += '<div part="detail-head"><strong>' + cols[k] + '</strong></div>'
|
|
@@ -16801,7 +16832,7 @@ export class SfIEvents extends LitElement {
|
|
|
16801
16832
|
let reportformatschema: string = "";
|
|
16802
16833
|
if (listEvent.customreporting != null) {
|
|
16803
16834
|
let reportingReporting = (this._SfDetailContainer as HTMLDivElement).querySelector('#reporting-reporting-1') as SfIReporting
|
|
16804
|
-
if(reportingReporting == null){
|
|
16835
|
+
if (reportingReporting == null) {
|
|
16805
16836
|
reportingReporting = (this._SfDetailContainer as HTMLDivElement).querySelector('#reporting-reporting-0') as SfIReporting
|
|
16806
16837
|
}
|
|
16807
16838
|
console.log('reportformatvalues', JSON.stringify(reportingReporting.selectedValues()))
|
|
@@ -18965,10 +18996,10 @@ export class SfIEvents extends LitElement {
|
|
|
18965
18996
|
}
|
|
18966
18997
|
event.percentage = inputReportingPercentage.value;
|
|
18967
18998
|
event.reportedlocations = JSON.stringify(this.reportedLocationsVals)
|
|
18968
|
-
if (this.reportedLocationsVals.length == 0
|
|
18999
|
+
if (this.reportedLocationsVals.length == 0) {
|
|
18969
19000
|
event.percentage = "100";
|
|
18970
19001
|
}
|
|
18971
|
-
console.log('rendering list reporting', event.percentage, event.reportedlocations)
|
|
19002
|
+
console.log('rendering list reporting', this.reportedLocationsVals, event.percentage, event.reportedlocations)
|
|
18972
19003
|
event.reportercomments = (eventDetailReportingContainer.querySelector('#input-reporter-comments') as HTMLInputElement).value;
|
|
18973
19004
|
event.dateofcompletion = (eventDetailReportingContainer.querySelector('#input-reporter-doc') as HTMLInputElement).value.length > 0 ? (new Date((eventDetailReportingContainer.querySelector('#input-reporter-doc') as HTMLInputElement).value).getTime() + "") : "";
|
|
18974
19005
|
event.documents = (this._SfUploader[0].querySelector('#uploader') as SfIUploader)!.selectedValues();
|
|
@@ -18981,6 +19012,9 @@ export class SfIEvents extends LitElement {
|
|
|
18981
19012
|
let selectReportingEntity = eventDetailReportingContainer.querySelector('#input-reporter-entity-' + indexRepLoc) as HTMLSelectElement;
|
|
18982
19013
|
let selectReportingLocation = eventDetailReportingContainer.querySelector('#input-reporter-location-' + indexRepLoc) as HTMLSelectElement;
|
|
18983
19014
|
selectReportingEntity.innerHTML = '';
|
|
19015
|
+
let defaultOption = new Option("Select Entity", "", true, true)
|
|
19016
|
+
defaultOption.disabled = true
|
|
19017
|
+
selectReportingEntity.add(defaultOption)
|
|
18984
19018
|
for (let country of Object.keys(projectUserMap)) {
|
|
18985
19019
|
if (country == "roles") {
|
|
18986
19020
|
continue;
|
|
@@ -18993,6 +19027,9 @@ export class SfIEvents extends LitElement {
|
|
|
18993
19027
|
}
|
|
18994
19028
|
selectReportingEntity.addEventListener('change', (e: any) => {
|
|
18995
19029
|
selectReportingLocation.innerHTML = ''
|
|
19030
|
+
let defaultOption = new Option("Select Location", "", true, true)
|
|
19031
|
+
defaultOption.disabled = true
|
|
19032
|
+
selectReportingLocation.add(defaultOption)
|
|
18996
19033
|
for (let country of Object.keys(projectUserMap)) {
|
|
18997
19034
|
if (country == "roles") {
|
|
18998
19035
|
continue;
|
|
@@ -19013,27 +19050,33 @@ export class SfIEvents extends LitElement {
|
|
|
19013
19050
|
})
|
|
19014
19051
|
|
|
19015
19052
|
if (selectReportingLocation.innerHTML == '') {
|
|
19016
|
-
|
|
19017
|
-
|
|
19018
|
-
|
|
19019
|
-
|
|
19020
|
-
|
|
19021
|
-
|
|
19022
|
-
|
|
19023
|
-
|
|
19024
|
-
|
|
19025
|
-
|
|
19026
|
-
|
|
19027
|
-
|
|
19028
|
-
|
|
19029
|
-
|
|
19030
|
-
|
|
19053
|
+
let defaultOption = new Option("Select Location", "", true, true)
|
|
19054
|
+
defaultOption.disabled = true
|
|
19055
|
+
selectReportingLocation.add(defaultOption)
|
|
19056
|
+
// for (let country of Object.keys(projectUserMap)) {
|
|
19057
|
+
// if (country == "roles") {
|
|
19058
|
+
// continue;
|
|
19059
|
+
// }
|
|
19060
|
+
// for (let entity of Object.keys(projectUserMap[country])) {
|
|
19061
|
+
// for (let location of Object.keys(projectUserMap[country][entity])) {
|
|
19062
|
+
// let locationName = location.split(';')[0].replace(/ *\([^)]*\) */g, "")
|
|
19063
|
+
// let option = new Option(locationName, location)
|
|
19064
|
+
// selectReportingLocation.add(option);
|
|
19065
|
+
// break;
|
|
19066
|
+
// }
|
|
19067
|
+
// break;
|
|
19068
|
+
// }
|
|
19069
|
+
// break;
|
|
19070
|
+
// }
|
|
19031
19071
|
}
|
|
19032
19072
|
selectReportingLocation.addEventListener('change', (e: any) => {
|
|
19073
|
+
if(selectReportingEntity.value == ""){
|
|
19074
|
+
return;
|
|
19075
|
+
}
|
|
19033
19076
|
let index = parseInt(e.target.id.split('-')[3])
|
|
19034
19077
|
this.reportedLocationsVals[index] = e.target.value
|
|
19035
19078
|
})
|
|
19036
|
-
if (event.reportedlocations != null && event.reportedlocations.length >
|
|
19079
|
+
if (event.reportedlocations != null && event.reportedlocations.length > indexRepLoc) {
|
|
19037
19080
|
console.log('setting reportedlocations', event.reportedlocations)
|
|
19038
19081
|
let tempReportedLocation = Util.isJSONParsable(event.reportedlocations) ? JSON.parse(event.reportedlocations)[indexRepLoc] : event.reportedlocations
|
|
19039
19082
|
for (let country of Object.keys(projectUserMap)) {
|