sf-i-events 1.0.951 → 1.0.953
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/dev/index.html +4 -4
- package/package.json +1 -1
- package/sf-i-events.d.ts +1 -0
- package/sf-i-events.js +39 -1
- package/src/sf-i-events.ts +49 -4
package/dev/index.html
CHANGED
|
@@ -941,7 +941,7 @@
|
|
|
941
941
|
</div>
|
|
942
942
|
|
|
943
943
|
</sf-i-events> -->
|
|
944
|
-
<sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer"
|
|
944
|
+
<!-- <sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer"
|
|
945
945
|
apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute"
|
|
946
946
|
apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition"
|
|
947
947
|
apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat"
|
|
@@ -970,7 +970,7 @@
|
|
|
970
970
|
<sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
|
|
971
971
|
</div>
|
|
972
972
|
|
|
973
|
-
</sf-i-events>
|
|
973
|
+
</sf-i-events> -->
|
|
974
974
|
<!-- <sf-i-events id="sf-i-events-next" name="Next Compliances" apiid="dwqyez2puoxmu.cloudfront.net/event"
|
|
975
975
|
apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute" apiidcompliances="dnytrdlrmxgsy.cloudfront.net/compliance"
|
|
976
976
|
apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat"
|
|
@@ -985,7 +985,7 @@
|
|
|
985
985
|
allowdownload="yes"></sf-i-uploader></div>
|
|
986
986
|
<div slot="reporting"><sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting></div>
|
|
987
987
|
</sf-i-events> -->
|
|
988
|
-
|
|
988
|
+
<sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer"
|
|
989
989
|
apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute"
|
|
990
990
|
apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition"
|
|
991
991
|
apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat"
|
|
@@ -1013,7 +1013,7 @@
|
|
|
1013
1013
|
<sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
|
|
1014
1014
|
</div>
|
|
1015
1015
|
|
|
1016
|
-
</sf-i-events>
|
|
1016
|
+
</sf-i-events>
|
|
1017
1017
|
<!-- <sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer"
|
|
1018
1018
|
apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute"
|
|
1019
1019
|
apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition"
|
package/package.json
CHANGED
package/sf-i-events.d.ts
CHANGED
|
@@ -772,6 +772,7 @@ export declare class SfIEvents extends LitElement {
|
|
|
772
772
|
uploadReport: (entityId: string, locationId: string, mmddyyyy: string, eventid: string, comments: string, doc: string, docs: any, event: any, reportformatvalues: string | undefined, reportformatschema: string | undefined, module: string | undefined, percentage: string | undefined, makercheckers: any, reportedlocations?: string) => Promise<boolean>;
|
|
773
773
|
uploadReportsBulk: (bulkBody: any, showSuccess?: boolean) => Promise<void>;
|
|
774
774
|
sendSuggestions: (eventid: string, eventdelta: any) => Promise<boolean>;
|
|
775
|
+
exportRegister: () => Promise<void>;
|
|
775
776
|
uploadMapping: () => Promise<void>;
|
|
776
777
|
uploadEvents: () => Promise<void>;
|
|
777
778
|
uploadReprogramTrigger: (eventid: string, timestamp: string) => Promise<void>;
|
package/sf-i-events.js
CHANGED
|
@@ -5970,6 +5970,9 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
5970
5970
|
var html = '';
|
|
5971
5971
|
this.csvDataRegisters = '';
|
|
5972
5972
|
let flagUpdateFilters = Object.keys(this.registerFilters).length == 0;
|
|
5973
|
+
html += '<div class="d-flex flex-col align-end">';
|
|
5974
|
+
html += '<button id="button-export" part="button" class="d-flex justify-center align-center mr-10"><span class="material-symbols-outlined">download</span> <span>Export Register</span></button>';
|
|
5975
|
+
html += '</div>';
|
|
5973
5976
|
html += '<div class="d-flex scroll-x w-100p">';
|
|
5974
5977
|
for (var i = 0; i < Object.keys(events).length; i++) {
|
|
5975
5978
|
const country = Object.keys(events)[i];
|
|
@@ -6174,6 +6177,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
6174
6177
|
divRegisterList.innerHTML = html;
|
|
6175
6178
|
console.log('registerFilters', flagUpdateFilters, this.registerFilters, html.indexOf('input-select-filter-0-0'));
|
|
6176
6179
|
// console.log('csvdataregisters', this.csvDataRegisters);
|
|
6180
|
+
let buttonExportRegister = this._SfRegisterContainer.querySelector('.calendar-right-data-register').querySelector('#button-export');
|
|
6181
|
+
buttonExportRegister === null || buttonExportRegister === void 0 ? void 0 : buttonExportRegister.addEventListener('click', () => {
|
|
6182
|
+
this.exportRegister();
|
|
6183
|
+
});
|
|
6177
6184
|
if (this.selectedRegisterIndex >= 0) {
|
|
6178
6185
|
const divFilterString = this._SfRegisterContainer.querySelector('.calendar-right-data-register').querySelector('#filter-string');
|
|
6179
6186
|
let filterString = "";
|
|
@@ -13189,7 +13196,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
13189
13196
|
};
|
|
13190
13197
|
this.renewRCMResource = async (listEvent, reportformatvalues) => {
|
|
13191
13198
|
var _a;
|
|
13192
|
-
let url = "https://" + this.apiIdRCMResources + "/
|
|
13199
|
+
let url = "https://" + this.apiIdRCMResources + "/reopen1";
|
|
13193
13200
|
console.log('renewing', reportformatvalues);
|
|
13194
13201
|
//console.log('fetch calendar url', url);
|
|
13195
13202
|
let urlBody = { projectid: this.projectId, objectid: listEvent.id, newvalues: reportformatvalues == "" ? null : JSON.parse(reportformatvalues), published: true, terminated: ((_a = JSON.parse(reportformatvalues).terminated) !== null && _a !== void 0 ? _a : false) };
|
|
@@ -22280,6 +22287,37 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
22280
22287
|
}
|
|
22281
22288
|
return retValue;
|
|
22282
22289
|
};
|
|
22290
|
+
this.exportRegister = async () => {
|
|
22291
|
+
let url = "https://" + this.apiId + "/scheduleregisterexportjob";
|
|
22292
|
+
const body = {
|
|
22293
|
+
"projectid": this.projectId,
|
|
22294
|
+
"userid": this.userProfileId,
|
|
22295
|
+
"role": this.myRole,
|
|
22296
|
+
};
|
|
22297
|
+
console.log('exporting Register...', body);
|
|
22298
|
+
const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
22299
|
+
const xhr = (await this.prepareXhr(body, url, this._SfLoader, authorization));
|
|
22300
|
+
this._SfLoader.innerHTML = '';
|
|
22301
|
+
if (xhr.status == 200) {
|
|
22302
|
+
const jsonRespose = JSON.parse(xhr.responseText);
|
|
22303
|
+
console.log('jsonResponse sync', jsonRespose);
|
|
22304
|
+
this.setSuccess("Register export started successfully! Youwill get an email with your register landscape.");
|
|
22305
|
+
setTimeout(() => {
|
|
22306
|
+
this.clearMessages();
|
|
22307
|
+
}, 5000);
|
|
22308
|
+
}
|
|
22309
|
+
else {
|
|
22310
|
+
if (xhr.status == 401) {
|
|
22311
|
+
let changeEvent = new CustomEvent('tokenExpired', { bubbles: true });
|
|
22312
|
+
this.dispatchEvent(changeEvent);
|
|
22313
|
+
}
|
|
22314
|
+
const jsonRespose = JSON.parse(xhr.responseText);
|
|
22315
|
+
this.setError(jsonRespose.error);
|
|
22316
|
+
setTimeout(() => {
|
|
22317
|
+
this.clearMessages();
|
|
22318
|
+
}, 3000);
|
|
22319
|
+
}
|
|
22320
|
+
};
|
|
22283
22321
|
this.uploadMapping = async () => {
|
|
22284
22322
|
let url = "https://" + this.apiId + "/mapevents";
|
|
22285
22323
|
const mapping = this.transformMappingsForUpload({
|
package/src/sf-i-events.ts
CHANGED
|
@@ -6449,7 +6449,7 @@ export class SfIEvents extends LitElement {
|
|
|
6449
6449
|
(listReportingContainer.querySelector('#reporting-location-container-' + indexRepLoc) as HTMLDivElement).classList.remove('hide')
|
|
6450
6450
|
selectReportingLocation.value = event.reportedlocations != null ? (Util.isJSONParsable(event.reportedlocations) ? JSON.parse(event.reportedlocations)[indexRepLoc] : event.reportedlocations) : "";
|
|
6451
6451
|
})
|
|
6452
|
-
if(selectReportingLocation.innerHTML == ''){
|
|
6452
|
+
if (selectReportingLocation.innerHTML == '') {
|
|
6453
6453
|
for (let country of Object.keys(projectUserMap)) {
|
|
6454
6454
|
if (country == "roles") {
|
|
6455
6455
|
continue;
|
|
@@ -8530,6 +8530,9 @@ export class SfIEvents extends LitElement {
|
|
|
8530
8530
|
|
|
8531
8531
|
this.csvDataRegisters = '';
|
|
8532
8532
|
let flagUpdateFilters = Object.keys(this.registerFilters).length == 0;
|
|
8533
|
+
html += '<div class="d-flex flex-col align-end">'
|
|
8534
|
+
html += '<button id="button-export" part="button" class="d-flex justify-center align-center mr-10"><span class="material-symbols-outlined">download</span> <span>Export Register</span></button>';
|
|
8535
|
+
html += '</div>'
|
|
8533
8536
|
html += '<div class="d-flex scroll-x w-100p">';
|
|
8534
8537
|
|
|
8535
8538
|
for (var i = 0; i < Object.keys(events).length; i++) {
|
|
@@ -8760,6 +8763,10 @@ export class SfIEvents extends LitElement {
|
|
|
8760
8763
|
divRegisterList!.innerHTML = html;
|
|
8761
8764
|
console.log('registerFilters', flagUpdateFilters, this.registerFilters, html.indexOf('input-select-filter-0-0'));
|
|
8762
8765
|
// console.log('csvdataregisters', this.csvDataRegisters);
|
|
8766
|
+
let buttonExportRegister = (this._SfRegisterContainer.querySelector('.calendar-right-data-register') as HTMLDivElement).querySelector('#button-export') as HTMLButtonElement
|
|
8767
|
+
buttonExportRegister?.addEventListener('click', () => {
|
|
8768
|
+
this.exportRegister();
|
|
8769
|
+
})
|
|
8763
8770
|
if (this.selectedRegisterIndex >= 0) {
|
|
8764
8771
|
const divFilterString = (this._SfRegisterContainer.querySelector('.calendar-right-data-register') as HTMLDivElement).querySelector('#filter-string') as HTMLDivElement
|
|
8765
8772
|
let filterString = ""
|
|
@@ -17033,7 +17040,7 @@ export class SfIEvents extends LitElement {
|
|
|
17033
17040
|
|
|
17034
17041
|
renewRCMResource = async (listEvent: any, reportformatvalues: any) => {
|
|
17035
17042
|
|
|
17036
|
-
let url = "https://" + this.apiIdRCMResources + "/
|
|
17043
|
+
let url = "https://" + this.apiIdRCMResources + "/reopen1";
|
|
17037
17044
|
|
|
17038
17045
|
console.log('renewing', reportformatvalues)
|
|
17039
17046
|
//console.log('fetch calendar url', url);
|
|
@@ -18658,7 +18665,7 @@ export class SfIEvents extends LitElement {
|
|
|
18658
18665
|
|
|
18659
18666
|
if (this.mode == "consumer" || this.mode == "next") {
|
|
18660
18667
|
let eventDetailReportingContainer = (this._SfDetailContainer as HTMLDivElement).querySelector('#reporting-view-container') as HTMLDivElement
|
|
18661
|
-
if(eventDetailReportingContainer != null){
|
|
18668
|
+
if (eventDetailReportingContainer != null) {
|
|
18662
18669
|
this.renderEventDetailReporting(eventDetailReportingContainer, event, mmddyyyy, (this._SfDetailContainer as HTMLDivElement))
|
|
18663
18670
|
}
|
|
18664
18671
|
}
|
|
@@ -18898,7 +18905,7 @@ export class SfIEvents extends LitElement {
|
|
|
18898
18905
|
selectReportingLocation.value = event.reportedlocations != null ? (Util.isJSONParsable(event.reportedlocations) ? JSON.parse(event.reportedlocations)[indexRepLoc] : event.reportedlocations) : "";
|
|
18899
18906
|
})
|
|
18900
18907
|
|
|
18901
|
-
if(selectReportingLocation.innerHTML == ''){
|
|
18908
|
+
if (selectReportingLocation.innerHTML == '') {
|
|
18902
18909
|
for (let country of Object.keys(projectUserMap)) {
|
|
18903
18910
|
if (country == "roles") {
|
|
18904
18911
|
continue;
|
|
@@ -28118,6 +28125,44 @@ export class SfIEvents extends LitElement {
|
|
|
28118
28125
|
return retValue;
|
|
28119
28126
|
}
|
|
28120
28127
|
|
|
28128
|
+
exportRegister = async () => {
|
|
28129
|
+
|
|
28130
|
+
let url = "https://" + this.apiId + "/scheduleregisterexportjob";
|
|
28131
|
+
|
|
28132
|
+
const body = {
|
|
28133
|
+
"projectid": this.projectId,
|
|
28134
|
+
"userid": this.userProfileId,
|
|
28135
|
+
"role": this.myRole,
|
|
28136
|
+
}
|
|
28137
|
+
|
|
28138
|
+
console.log('exporting Register...', body);
|
|
28139
|
+
|
|
28140
|
+
const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
28141
|
+
const xhr: any = (await this.prepareXhr(body, url, this._SfLoader, authorization)) as any;
|
|
28142
|
+
this._SfLoader.innerHTML = '';
|
|
28143
|
+
if (xhr.status == 200) {
|
|
28144
|
+
|
|
28145
|
+
const jsonRespose = JSON.parse(xhr.responseText);
|
|
28146
|
+
console.log('jsonResponse sync', jsonRespose);
|
|
28147
|
+
this.setSuccess("Register export started successfully! Youwill get an email with your register landscape.");
|
|
28148
|
+
setTimeout(() => {
|
|
28149
|
+
this.clearMessages();
|
|
28150
|
+
}, 5000);
|
|
28151
|
+
|
|
28152
|
+
} else {
|
|
28153
|
+
if (xhr.status == 401) {
|
|
28154
|
+
let changeEvent = new CustomEvent('tokenExpired', { bubbles: true });
|
|
28155
|
+
this.dispatchEvent(changeEvent);
|
|
28156
|
+
}
|
|
28157
|
+
const jsonRespose = JSON.parse(xhr.responseText);
|
|
28158
|
+
this.setError(jsonRespose.error);
|
|
28159
|
+
setTimeout(() => {
|
|
28160
|
+
this.clearMessages()
|
|
28161
|
+
}, 3000);
|
|
28162
|
+
}
|
|
28163
|
+
}
|
|
28164
|
+
|
|
28165
|
+
|
|
28121
28166
|
uploadMapping = async () => {
|
|
28122
28167
|
|
|
28123
28168
|
let url = "https://" + this.apiId + "/mapevents";
|