sf-i-events 1.0.867 → 1.0.868
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.js +121 -15
- package/src/sf-i-events.ts +111 -10
- package/src/util.ts +9 -1
- package/util.d.ts +4 -0
- package/util.js +9 -1
package/dev/index.html
CHANGED
|
@@ -738,7 +738,7 @@
|
|
|
738
738
|
</div>
|
|
739
739
|
|
|
740
740
|
</sf-i-events> -->
|
|
741
|
-
|
|
741
|
+
<sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer"
|
|
742
742
|
apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute"
|
|
743
743
|
apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition"
|
|
744
744
|
apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat"
|
|
@@ -764,8 +764,8 @@
|
|
|
764
764
|
<sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
|
|
765
765
|
</div>
|
|
766
766
|
|
|
767
|
-
</sf-i-events>
|
|
768
|
-
<sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer"
|
|
767
|
+
</sf-i-events>
|
|
768
|
+
<!-- <sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer"
|
|
769
769
|
apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute"
|
|
770
770
|
apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition"
|
|
771
771
|
apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat"
|
|
@@ -791,7 +791,7 @@
|
|
|
791
791
|
<sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
|
|
792
792
|
</div>
|
|
793
793
|
|
|
794
|
-
</sf-i-events>
|
|
794
|
+
</sf-i-events> -->
|
|
795
795
|
<!-- <sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer" apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute" apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition" apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat" apiidnotices="gghnbi7hku2qj5twrea6xxcaya0aqeis.lambda-url.us-east-1.on.aws" fill="solid" username="Viewer J1" userprofileid="344c84d2-5976-47ff-949b-49f6fa9627eb" projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" projectname="ABC Global" countryid="07d73b44-648d-4301-82c4-d6df43397824" myrole="viewer" showregisterexport="false" features="["notices"]" eventfielddependencies="[{"type": "foreignkey", "parent": "country", "child": "state"},{"type": "foreignkey", "parent": "category", "child": "subcategory"},{"type": "foreignkey", "parent": "frequency", "child": "subfrequency"}]" eventfields="[{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/riskarea", "field": "riskarea"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/jurisdiction", "field": "jurisdiction"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/updatetype", "field": "updatetype"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/country", "field": "country"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/specificity", "field": "specificity"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/risk", "field": "risk"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/frequency", "field": "frequency"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/category", "field": "category"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/obligationtype", "field": "obligationtype"},{"type": "sf-i-sub-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/state", "field": "state"},{"type": "sf-i-sub-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/subfrequency", "field": "subfrequency"},{"type": "sf-i-sub-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/subcategory", "field": "subcategory"},{"type": "sf-i-form", "apiId": "dnytrdlrmxgsy.cloudfront.net/statute", "field": "statute", "projectField": "name"}]" eventpreviewfields="["obligation"]" eventhidefields="["comments","documents","lastupdated","approved","tags"]" calendarstartdd="01" calendarstartmm="04" calendarstartyyyy="2025">
|
|
796
796
|
|
|
797
797
|
<div slot="uploader">
|
package/package.json
CHANGED
package/sf-i-events.js
CHANGED
|
@@ -2515,7 +2515,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2515
2515
|
return html;
|
|
2516
2516
|
};
|
|
2517
2517
|
this.renderCalendarRowDivItemDivStart = (mmdd, event, itemNumber, partStatus, bgStatus) => {
|
|
2518
|
-
var _a, _b;
|
|
2518
|
+
var _a, _b, _c, _f;
|
|
2519
2519
|
var html = '';
|
|
2520
2520
|
var remarks = "";
|
|
2521
2521
|
var occurrenceDate = "";
|
|
@@ -2543,10 +2543,64 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2543
2543
|
html += '<div class="stream-events-container flex-grow" part="' + bgStatus + '">';
|
|
2544
2544
|
html += '<div class="hidden-tags hide">' + JSON.stringify(event['tags']) + '</div>';
|
|
2545
2545
|
html += '<div class="hidden-title hide"><table><thead><th part="badge-filtered"><i>not filtered</i></th></thead></table></div>';
|
|
2546
|
-
html += '<div part="stream-events-event-title" class="stream-events-event-title d-flex align-center pl-5 pb-5">' + '<input id="button-select-' + mmdd.replace('/', '-') + '-' + itemNumber + '-' + (((event.makercheckers != null && (event.makercheckers).length > 0)) ? '1' : '0') + '-' + (((event.docs != null && (event.docs).length > 0)) ? '1' : '0') + '-' + event.entityid.replace(/-/g, '_') + '-' + event.locationid.replace(/-/g, '_') + '-' + event.id.replace(/-/g, '_') + '-' + event.duedate.split('/')[1] + '-' + event.duedate.split('/')[0] + '-' + event.duedate.split('/')[2] + '-' + partStatus.replace(/-/g, '_') + '-' + ((
|
|
2546
|
+
// html += '<div part="stream-events-event-title" class="stream-events-event-title d-flex align-center pl-5 pb-5">' + '<input id="button-select-' + mmdd.replace('/', '-') + '-' + itemNumber + '-' + (((event.makercheckers != null && (event.makercheckers).length > 0)) ? '1' : '0') + '-' + (((event.docs != null && (event.docs).length > 0)) ? '1' : '0') + '-' + event.entityid.replace(/-/g, '_') + '-' + event.locationid.replace(/-/g, '_') + '-' + event.id.replace(/-/g, '_') + '-' + event.duedate.split('/')[1] + '-' + event.duedate.split('/')[0] + '-' + event.duedate.split('/')[2] + '-' + partStatus.replace(/-/g, '_') + '-' + ((event.module ?? false) ? event.module : 'compliance') + '-' + ((event.isbulk == null || event.isbulk == false) ? "" : "bulk") + (((event.reportformat != null && event.reportformat.length > 0) || (event.isbulk != null && event.isbulk == true) || (event.customreporting != null)) ? "reportformat" : "") + '" class="button-select mr-10 ' + (((event.reportformat != null && event.reportformat.length > 0) || (event.isbulk != null && event.isbulk == true) || (event.customreporting != null)) ? 'hide' : '') + '" type="checkbox"/>' + (event.isbulk != null && event.isbulk == true ? '<div class="lds-dual-ring1 bulk-loader mr-10"></div>' : '') + '<sf-i-elastic-text class="stream-event-title' + (event.isbulk == null || event.isbulk == false ? ' button-event-title' : '') + '" id="stream-event-title-' + mmdd.replace(/\//g, '-') + '-' + itemNumber + '-' + ((event.module ?? false) ? event.module : 'compliance') + '" text="' + event['obligationtitle'] + '" minLength="' + (event.reporters != null ? "100" : "60") + '"></sf-i-elastic-text>' + event.reporters != null ? ('') : ('<div part="stream-event-location" class="stream-event-location ml-5">' + event.locationname.replace(/ *\([^)]*\) */g, "") + '</div><div part="stream-event-risk-' + event.risk[0].toLowerCase().replace(/ /g, '-') + '" class="stream-event-risk ml-5">' + event.risk[0] + '</div>') + (((event.reportformat != null && event.reportformat.length > 0) || (event.customreporting != null)) ? '' : ('<button id="button-list-reporting-' + mmdd.replace('/', '-') + '-' + itemNumber + '" part="button-list-reporting" class="material-icons ml-10 button-list-reporting">edit_note</button>')) + ((event.reporters != null && lastUpdated.length > 0) ? (' <div part="event-last-updated-time" class="d-flex align-center">' + lastUpdated + '</div>') : "") + '</div>';
|
|
2547
|
+
const isBulk = event.isbulk === true;
|
|
2548
|
+
const hasReportFormat = ((_a = event.reportformat) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
2549
|
+
const hasCustomReporting = event.customreporting != null;
|
|
2550
|
+
const hasMakerCheckers = ((_b = event.makercheckers) === null || _b === void 0 ? void 0 : _b.length) > 0;
|
|
2551
|
+
const hasDocs = ((_c = event.docs) === null || _c === void 0 ? void 0 : _c.length) > 0;
|
|
2552
|
+
const moduleType = (_f = event.module) !== null && _f !== void 0 ? _f : 'compliance';
|
|
2553
|
+
const partStatusSanitized = partStatus.replace(/-/g, '_');
|
|
2554
|
+
const entityIdSanitized = event.entityid.replace(/-/g, '_');
|
|
2555
|
+
const locationIdSanitized = event.locationid.replace(/-/g, '_');
|
|
2556
|
+
const eventIdSanitized = event.id.replace(/-/g, '_');
|
|
2557
|
+
const mmddSanitized = mmdd.replace(/\//g, '-');
|
|
2558
|
+
const dueDateParts = event.duedate.split('/');
|
|
2559
|
+
const showCheckbox = !(hasReportFormat || isBulk || hasCustomReporting);
|
|
2560
|
+
const showReportingButton = !hasReportFormat && !hasCustomReporting && event.reporters == null;
|
|
2561
|
+
const showLocationRisk = event.reporters == null;
|
|
2562
|
+
const showLastUpdated = event.reporters != null && lastUpdated.length > 0;
|
|
2563
|
+
html += `
|
|
2564
|
+
<div part="stream-events-event-title" class="stream-events-event-title d-flex align-center pl-5 pb-5">
|
|
2565
|
+
<input
|
|
2566
|
+
id="button-select-${mmddSanitized}-${itemNumber}-${hasMakerCheckers ? '1' : '0'}-${hasDocs ? '1' : '0'}-${entityIdSanitized}-${locationIdSanitized}-${eventIdSanitized}-${dueDateParts[1]}-${dueDateParts[0]}-${dueDateParts[2]}-${partStatusSanitized}-${moduleType}-${isBulk ? 'bulk' : ''}${(hasReportFormat || isBulk || hasCustomReporting) ? 'reportformat' : ''}"
|
|
2567
|
+
class="button-select mr-10 ${showCheckbox ? '' : 'hide'}"
|
|
2568
|
+
type="checkbox"
|
|
2569
|
+
/>
|
|
2570
|
+
${isBulk ? '<div class="lds-dual-ring1 bulk-loader mr-10"></div>' : ''}
|
|
2571
|
+
<sf-i-elastic-text
|
|
2572
|
+
class="stream-event-title${!isBulk ? ' button-event-title' : ''}"
|
|
2573
|
+
id="stream-event-title-${mmddSanitized}-${itemNumber}-${moduleType}"
|
|
2574
|
+
text="${event.obligationtitle}"
|
|
2575
|
+
minLength="${event.reporters != null ? '100' : '60'}">
|
|
2576
|
+
</sf-i-elastic-text>
|
|
2577
|
+
${showLocationRisk ? `
|
|
2578
|
+
<div part="stream-event-location" class="stream-event-location ml-5">
|
|
2579
|
+
${event.locationname.replace(/ *\([^)]*\) */g, "")}
|
|
2580
|
+
</div>
|
|
2581
|
+
<div part="stream-event-risk-${event.risk[0].toLowerCase().replace(/ /g, '-')}" class="stream-event-risk ml-5">
|
|
2582
|
+
${event.risk[0]}
|
|
2583
|
+
</div>
|
|
2584
|
+
` : ''}
|
|
2585
|
+
${showReportingButton ? `
|
|
2586
|
+
<button
|
|
2587
|
+
id="button-list-reporting-${mmddSanitized}-${itemNumber}"
|
|
2588
|
+
part="button-list-reporting"
|
|
2589
|
+
class="material-icons ml-10 button-list-reporting">
|
|
2590
|
+
edit_note
|
|
2591
|
+
</button>
|
|
2592
|
+
` : ''}
|
|
2593
|
+
${showLastUpdated ? `
|
|
2594
|
+
<div part="event-last-updated-time" class="d-flex align-center">
|
|
2595
|
+
${lastUpdated}
|
|
2596
|
+
</div>
|
|
2597
|
+
` : ''}
|
|
2598
|
+
</div>
|
|
2599
|
+
`;
|
|
2547
2600
|
if (event.reporters != null && remarks.length > 0) {
|
|
2548
2601
|
html += '<div part="stream-events-event-subtitle" class="stream-events-event-subtitle">' + remarks + ', occurred on ' + occurrenceDate + '</div>';
|
|
2549
2602
|
}
|
|
2603
|
+
console.log('returning divstarthtml', html);
|
|
2550
2604
|
return html;
|
|
2551
2605
|
};
|
|
2552
2606
|
this.renderCalendarRowDivItemDivEnd = () => {
|
|
@@ -4211,6 +4265,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
4211
4265
|
filterButton.innerHTML = (filterList.style.display != 'block' ? 'category' : 'close');
|
|
4212
4266
|
const filterSubmitButton = filterList.querySelector('#button-submit-features');
|
|
4213
4267
|
filterSubmitButton.addEventListener('click', () => {
|
|
4268
|
+
Util.setFeatures(this.selectedFeatures);
|
|
4214
4269
|
this.enableCustom();
|
|
4215
4270
|
this.renderTabs(this.selectedTab);
|
|
4216
4271
|
// this.processDateSelection(eventsContainer);
|
|
@@ -4891,6 +4946,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
4891
4946
|
filterButton.innerHTML = (filterList.style.display != 'block' ? 'category' : 'close');
|
|
4892
4947
|
const filterSubmitButton = filterList.querySelector('#button-submit-features');
|
|
4893
4948
|
filterSubmitButton.addEventListener('click', () => {
|
|
4949
|
+
Util.setFeatures(this.selectedFeatures);
|
|
4894
4950
|
this.renderTabs(this.selectedTab);
|
|
4895
4951
|
this.processDateSelectionViewer(eventsContainer);
|
|
4896
4952
|
});
|
|
@@ -7560,6 +7616,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
7560
7616
|
filterButton.innerHTML = (filterList.style.display != 'block' ? 'category' : 'close');
|
|
7561
7617
|
const filterSubmitButton = filterList.querySelector('#button-submit-features');
|
|
7562
7618
|
filterSubmitButton.addEventListener('click', async () => {
|
|
7619
|
+
Util.setFeatures(this.selectedFeatures);
|
|
7563
7620
|
const dateResult = this.calculateStartAndEndDateOfStream(index);
|
|
7564
7621
|
console.log('dateresult', dateResult, index);
|
|
7565
7622
|
console.log('selectedfeatures', this.selectedFeatures);
|
|
@@ -8029,6 +8086,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
8029
8086
|
filterButton.innerHTML = (filterList.style.display != 'block' ? 'category' : 'close');
|
|
8030
8087
|
const filterSubmitButton = filterList.querySelector('#button-submit-features');
|
|
8031
8088
|
filterSubmitButton.addEventListener('click', async () => {
|
|
8089
|
+
Util.setFeatures(this.selectedFeatures);
|
|
8032
8090
|
const dateResult = this.calculateStartAndEndDateOfStream(index);
|
|
8033
8091
|
const monthResult = this.calculateMonthFromIndex(index);
|
|
8034
8092
|
console.log('monthResult', monthResult);
|
|
@@ -10022,6 +10080,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10022
10080
|
console.log('renewing', reportformatvalues);
|
|
10023
10081
|
//console.log('fetch calendar url', url);
|
|
10024
10082
|
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) };
|
|
10083
|
+
// console.log('reopen body', url, urlBody)
|
|
10025
10084
|
const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
10026
10085
|
const xhr = (await this.prepareXhr(urlBody, url, this._SfLoader, authorization, 'Preparing'));
|
|
10027
10086
|
this._SfLoader.innerHTML = '';
|
|
@@ -15088,39 +15147,64 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
15088
15147
|
html += '<button class="tab-button" id="consumer-tab-viewer" part="' + (this.myRole == this.TAB_VIEWER ? 'calendar-tab-button-selected' : 'calendar-tab-button-not-selected') + '">Viewer</button>';
|
|
15089
15148
|
this._SfRoleTabContainer.innerHTML = html;
|
|
15090
15149
|
(_a = this._SfRoleTabContainer.querySelector('#consumer-tab-reporter')) === null || _a === void 0 ? void 0 : _a.addEventListener('click', async () => {
|
|
15091
|
-
var _a;
|
|
15150
|
+
var _a, _b;
|
|
15092
15151
|
this.myRole = this.TAB_REPORTER;
|
|
15093
15152
|
this.renderRoleTabs();
|
|
15094
15153
|
// this.proceedToCalendar();
|
|
15095
|
-
(
|
|
15154
|
+
if (this.selectedFeatures.indexOf('agreements') >= 0) {
|
|
15155
|
+
(_a = this._SfTabContainer.querySelector('#calendar-tab-custom')) === null || _a === void 0 ? void 0 : _a.click();
|
|
15156
|
+
}
|
|
15157
|
+
else {
|
|
15158
|
+
(_b = this._SfTabContainer.querySelector('#calendar-tab-month')) === null || _b === void 0 ? void 0 : _b.click();
|
|
15159
|
+
}
|
|
15096
15160
|
});
|
|
15097
15161
|
(_b = this._SfRoleTabContainer.querySelector('#consumer-tab-approver')) === null || _b === void 0 ? void 0 : _b.addEventListener('click', async () => {
|
|
15098
|
-
var _a;
|
|
15162
|
+
var _a, _b;
|
|
15099
15163
|
this.myRole = this.TAB_APPROVER;
|
|
15100
15164
|
this.renderRoleTabs();
|
|
15101
15165
|
// this.proceedToCalendar();
|
|
15102
|
-
(
|
|
15166
|
+
if (this.selectedFeatures.indexOf('agreements') >= 0) {
|
|
15167
|
+
(_a = this._SfTabContainer.querySelector('#calendar-tab-custom')) === null || _a === void 0 ? void 0 : _a.click();
|
|
15168
|
+
}
|
|
15169
|
+
else {
|
|
15170
|
+
(_b = this._SfTabContainer.querySelector('#calendar-tab-month')) === null || _b === void 0 ? void 0 : _b.click();
|
|
15171
|
+
}
|
|
15103
15172
|
});
|
|
15104
15173
|
(_c = this._SfRoleTabContainer.querySelector('#consumer-tab-functionhead')) === null || _c === void 0 ? void 0 : _c.addEventListener('click', async () => {
|
|
15105
|
-
var _a;
|
|
15174
|
+
var _a, _b;
|
|
15106
15175
|
this.myRole = this.TAB_FUNCTION_HEAD;
|
|
15107
15176
|
this.renderRoleTabs();
|
|
15108
15177
|
// this.proceedToCalendar();
|
|
15109
|
-
(
|
|
15178
|
+
if (this.selectedFeatures.indexOf('agreements') >= 0) {
|
|
15179
|
+
(_a = this._SfTabContainer.querySelector('#calendar-tab-custom')) === null || _a === void 0 ? void 0 : _a.click();
|
|
15180
|
+
}
|
|
15181
|
+
else {
|
|
15182
|
+
(_b = this._SfTabContainer.querySelector('#calendar-tab-month')) === null || _b === void 0 ? void 0 : _b.click();
|
|
15183
|
+
}
|
|
15110
15184
|
});
|
|
15111
15185
|
(_f = this._SfRoleTabContainer.querySelector('#consumer-tab-auditor')) === null || _f === void 0 ? void 0 : _f.addEventListener('click', async () => {
|
|
15112
|
-
var _a;
|
|
15186
|
+
var _a, _b;
|
|
15113
15187
|
this.myRole = this.TAB_AUDITOR;
|
|
15114
15188
|
this.renderRoleTabs();
|
|
15115
15189
|
// this.proceedToCalendar();
|
|
15116
|
-
(
|
|
15190
|
+
if (this.selectedFeatures.indexOf('agreements') >= 0) {
|
|
15191
|
+
(_a = this._SfTabContainer.querySelector('#calendar-tab-custom')) === null || _a === void 0 ? void 0 : _a.click();
|
|
15192
|
+
}
|
|
15193
|
+
else {
|
|
15194
|
+
(_b = this._SfTabContainer.querySelector('#calendar-tab-month')) === null || _b === void 0 ? void 0 : _b.click();
|
|
15195
|
+
}
|
|
15117
15196
|
});
|
|
15118
15197
|
(_g = this._SfRoleTabContainer.querySelector('#consumer-tab-viewer')) === null || _g === void 0 ? void 0 : _g.addEventListener('click', async () => {
|
|
15119
|
-
var _a;
|
|
15198
|
+
var _a, _b;
|
|
15120
15199
|
this.myRole = this.TAB_VIEWER;
|
|
15121
15200
|
this.renderRoleTabs();
|
|
15122
15201
|
// this.proceedToCalendar();
|
|
15123
|
-
(
|
|
15202
|
+
if (this.selectedFeatures.indexOf('agreements') >= 0) {
|
|
15203
|
+
(_a = this._SfTabContainer.querySelector('#calendar-tab-custom')) === null || _a === void 0 ? void 0 : _a.click();
|
|
15204
|
+
}
|
|
15205
|
+
else {
|
|
15206
|
+
(_b = this._SfTabContainer.querySelector('#calendar-tab-month')) === null || _b === void 0 ? void 0 : _b.click();
|
|
15207
|
+
}
|
|
15124
15208
|
});
|
|
15125
15209
|
};
|
|
15126
15210
|
this.csvmaker = (data) => {
|
|
@@ -19506,6 +19590,13 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
19506
19590
|
}
|
|
19507
19591
|
};
|
|
19508
19592
|
this.renderWithFeatures = async (startDate = "", endDate = "", searchString = "", list = "yes", month = "00", year = this.calendarStartYYYY) => {
|
|
19593
|
+
this.selectedFeatures = Util.getFeatures();
|
|
19594
|
+
for (let feature of this.selectedFeatures) {
|
|
19595
|
+
if (this.getFeatures().indexOf(feature) < 0) {
|
|
19596
|
+
this.selectedFeatures = ['compliances'];
|
|
19597
|
+
break;
|
|
19598
|
+
}
|
|
19599
|
+
}
|
|
19509
19600
|
this.events = [];
|
|
19510
19601
|
console.log('rendering and fetching', startDate, endDate, searchString, list, month);
|
|
19511
19602
|
if (this.selectedFeatures.indexOf('compliances') >= 0) {
|
|
@@ -21156,7 +21247,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
21156
21247
|
}
|
|
21157
21248
|
};
|
|
21158
21249
|
this.loadMode = async () => {
|
|
21159
|
-
var _a, _b;
|
|
21250
|
+
var _a, _b, _c;
|
|
21160
21251
|
Chart.register(...registerables);
|
|
21161
21252
|
//Chart.register(Colors);
|
|
21162
21253
|
if (this.mode == "rcmnotifications") {
|
|
@@ -21210,8 +21301,23 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
21210
21301
|
}
|
|
21211
21302
|
else {
|
|
21212
21303
|
//console.log('stream received rendering year', this.stream);
|
|
21213
|
-
this.
|
|
21214
|
-
(
|
|
21304
|
+
this.selectedFeatures = Util.getFeatures();
|
|
21305
|
+
for (let feature of this.selectedFeatures) {
|
|
21306
|
+
if (this.getFeatures().indexOf(feature) < 0) {
|
|
21307
|
+
this.selectedFeatures = ['compliances'];
|
|
21308
|
+
break;
|
|
21309
|
+
}
|
|
21310
|
+
}
|
|
21311
|
+
if (this.selectedFeatures.indexOf('agreements') >= 0) {
|
|
21312
|
+
this.renderTabs(this.TAB_CUSTOM);
|
|
21313
|
+
(_b = this._SfTabContainer.querySelector('#calendar-tab-custom')) === null || _b === void 0 ? void 0 : _b.click();
|
|
21314
|
+
}
|
|
21315
|
+
else {
|
|
21316
|
+
this.renderTabs(this.TAB_STREAM);
|
|
21317
|
+
(_c = this._SfTabContainer.querySelector('#calendar-tab-month')) === null || _c === void 0 ? void 0 : _c.click();
|
|
21318
|
+
}
|
|
21319
|
+
// this.renderTabs(this.TAB_STREAM);
|
|
21320
|
+
// ((this._SfTabContainer as HTMLDivElement).querySelector('#calendar-tab-month') as HTMLButtonElement)?.click();
|
|
21215
21321
|
}
|
|
21216
21322
|
//await this.fetchUserCalendar_2();
|
|
21217
21323
|
// if(this.events != null && !this.foundCalendarInLocal()) {
|
package/src/sf-i-events.ts
CHANGED
|
@@ -4737,11 +4737,67 @@ export class SfIEvents extends LitElement {
|
|
|
4737
4737
|
html += '<div class="stream-events-container flex-grow" part="' + bgStatus + '">';
|
|
4738
4738
|
html += '<div class="hidden-tags hide">' + JSON.stringify(event['tags']) + '</div>'
|
|
4739
4739
|
html += '<div class="hidden-title hide"><table><thead><th part="badge-filtered"><i>not filtered</i></th></thead></table></div>'
|
|
4740
|
-
html += '<div part="stream-events-event-title" class="stream-events-event-title d-flex align-center pl-5 pb-5">' + '<input id="button-select-' + mmdd.replace('/', '-') + '-' + itemNumber + '-' + (((event.makercheckers != null && (event.makercheckers).length > 0)) ? '1' : '0') + '-' + (((event.docs != null && (event.docs).length > 0)) ? '1' : '0') + '-' + event.entityid.replace(/-/g, '_') + '-' + event.locationid.replace(/-/g, '_') + '-' + event.id.replace(/-/g, '_') + '-' + event.duedate.split('/')[1] + '-' + event.duedate.split('/')[0] + '-' + event.duedate.split('/')[2] + '-' + partStatus.replace(/-/g, '_') + '-' + ((event.module ?? false) ? event.module : 'compliance') + '-' + ((event.isbulk == null || event.isbulk == false) ? "" : "bulk") + (((event.reportformat != null && event.reportformat.length > 0) || (event.isbulk != null && event.isbulk == true) || (event.customreporting != null)) ? "reportformat" : "") + '" class="button-select mr-10 ' + (((event.reportformat != null && event.reportformat.length > 0) || (event.isbulk != null && event.isbulk == true) || (event.customreporting != null)) ? 'hide' : '') + '" type="checkbox"/>' + (event.isbulk != null && event.isbulk == true ? '<div class="lds-dual-ring1 bulk-loader mr-10"></div>' : '') + '<sf-i-elastic-text class="stream-event-title' + (event.isbulk == null || event.isbulk == false ? ' button-event-title' : '') + '" id="stream-event-title-' + mmdd.replace(/\//g, '-') + '-' + itemNumber + '-' + ((event.module ?? false) ? event.module : 'compliance') + '" text="' + event['obligationtitle'] + '" minLength="' + (event.reporters != null ? "100" : "60") + '"></sf-i-elastic-text>' + event.reporters != null ? ('') : ('<div part="stream-event-location" class="stream-event-location ml-5">' + event.locationname.replace(/ *\([^)]*\) */g, "") + '</div><div part="stream-event-risk-' + event.risk[0].toLowerCase().replace(/ /g, '-') + '" class="stream-event-risk ml-5">' + event.risk[0] + '</div>') + (((event.reportformat != null && event.reportformat.length > 0) || (event.customreporting != null)) ? '' : ('<button id="button-list-reporting-' + mmdd.replace('/', '-') + '-' + itemNumber + '" part="button-list-reporting" class="material-icons ml-10 button-list-reporting">edit_note</button>')) + ((event.reporters != null && lastUpdated.length > 0) ? (' <div part="event-last-updated-time" class="d-flex align-center">' + lastUpdated + '</div>') : "") + '</div>';
|
|
4740
|
+
// html += '<div part="stream-events-event-title" class="stream-events-event-title d-flex align-center pl-5 pb-5">' + '<input id="button-select-' + mmdd.replace('/', '-') + '-' + itemNumber + '-' + (((event.makercheckers != null && (event.makercheckers).length > 0)) ? '1' : '0') + '-' + (((event.docs != null && (event.docs).length > 0)) ? '1' : '0') + '-' + event.entityid.replace(/-/g, '_') + '-' + event.locationid.replace(/-/g, '_') + '-' + event.id.replace(/-/g, '_') + '-' + event.duedate.split('/')[1] + '-' + event.duedate.split('/')[0] + '-' + event.duedate.split('/')[2] + '-' + partStatus.replace(/-/g, '_') + '-' + ((event.module ?? false) ? event.module : 'compliance') + '-' + ((event.isbulk == null || event.isbulk == false) ? "" : "bulk") + (((event.reportformat != null && event.reportformat.length > 0) || (event.isbulk != null && event.isbulk == true) || (event.customreporting != null)) ? "reportformat" : "") + '" class="button-select mr-10 ' + (((event.reportformat != null && event.reportformat.length > 0) || (event.isbulk != null && event.isbulk == true) || (event.customreporting != null)) ? 'hide' : '') + '" type="checkbox"/>' + (event.isbulk != null && event.isbulk == true ? '<div class="lds-dual-ring1 bulk-loader mr-10"></div>' : '') + '<sf-i-elastic-text class="stream-event-title' + (event.isbulk == null || event.isbulk == false ? ' button-event-title' : '') + '" id="stream-event-title-' + mmdd.replace(/\//g, '-') + '-' + itemNumber + '-' + ((event.module ?? false) ? event.module : 'compliance') + '" text="' + event['obligationtitle'] + '" minLength="' + (event.reporters != null ? "100" : "60") + '"></sf-i-elastic-text>' + event.reporters != null ? ('') : ('<div part="stream-event-location" class="stream-event-location ml-5">' + event.locationname.replace(/ *\([^)]*\) */g, "") + '</div><div part="stream-event-risk-' + event.risk[0].toLowerCase().replace(/ /g, '-') + '" class="stream-event-risk ml-5">' + event.risk[0] + '</div>') + (((event.reportformat != null && event.reportformat.length > 0) || (event.customreporting != null)) ? '' : ('<button id="button-list-reporting-' + mmdd.replace('/', '-') + '-' + itemNumber + '" part="button-list-reporting" class="material-icons ml-10 button-list-reporting">edit_note</button>')) + ((event.reporters != null && lastUpdated.length > 0) ? (' <div part="event-last-updated-time" class="d-flex align-center">' + lastUpdated + '</div>') : "") + '</div>';
|
|
4741
|
+
|
|
4742
|
+
const isBulk = event.isbulk === true;
|
|
4743
|
+
const hasReportFormat = event.reportformat?.length > 0;
|
|
4744
|
+
const hasCustomReporting = event.customreporting != null;
|
|
4745
|
+
const hasMakerCheckers = event.makercheckers?.length > 0;
|
|
4746
|
+
const hasDocs = event.docs?.length > 0;
|
|
4747
|
+
const moduleType = event.module ?? 'compliance';
|
|
4748
|
+
const partStatusSanitized = partStatus.replace(/-/g, '_');
|
|
4749
|
+
const entityIdSanitized = event.entityid.replace(/-/g, '_');
|
|
4750
|
+
const locationIdSanitized = event.locationid.replace(/-/g, '_');
|
|
4751
|
+
const eventIdSanitized = event.id.replace(/-/g, '_');
|
|
4752
|
+
const mmddSanitized = mmdd.replace(/\//g, '-');
|
|
4753
|
+
const dueDateParts = event.duedate.split('/');
|
|
4754
|
+
const showCheckbox = !(hasReportFormat || isBulk || hasCustomReporting);
|
|
4755
|
+
const showReportingButton = !hasReportFormat && !hasCustomReporting && event.reporters == null;
|
|
4756
|
+
const showLocationRisk = event.reporters == null;
|
|
4757
|
+
const showLastUpdated = event.reporters != null && lastUpdated.length > 0;
|
|
4758
|
+
|
|
4759
|
+
html += `
|
|
4760
|
+
<div part="stream-events-event-title" class="stream-events-event-title d-flex align-center pl-5 pb-5">
|
|
4761
|
+
<input
|
|
4762
|
+
id="button-select-${mmddSanitized}-${itemNumber}-${hasMakerCheckers ? '1' : '0'}-${hasDocs ? '1' : '0'}-${entityIdSanitized}-${locationIdSanitized}-${eventIdSanitized}-${dueDateParts[1]}-${dueDateParts[0]}-${dueDateParts[2]}-${partStatusSanitized}-${moduleType}-${isBulk ? 'bulk' : ''}${(hasReportFormat || isBulk || hasCustomReporting) ? 'reportformat' : ''}"
|
|
4763
|
+
class="button-select mr-10 ${showCheckbox ? '' : 'hide'}"
|
|
4764
|
+
type="checkbox"
|
|
4765
|
+
/>
|
|
4766
|
+
${isBulk ? '<div class="lds-dual-ring1 bulk-loader mr-10"></div>' : ''}
|
|
4767
|
+
<sf-i-elastic-text
|
|
4768
|
+
class="stream-event-title${!isBulk ? ' button-event-title' : ''}"
|
|
4769
|
+
id="stream-event-title-${mmddSanitized}-${itemNumber}-${moduleType}"
|
|
4770
|
+
text="${event.obligationtitle}"
|
|
4771
|
+
minLength="${event.reporters != null ? '100' : '60'}">
|
|
4772
|
+
</sf-i-elastic-text>
|
|
4773
|
+
${showLocationRisk ? `
|
|
4774
|
+
<div part="stream-event-location" class="stream-event-location ml-5">
|
|
4775
|
+
${event.locationname.replace(/ *\([^)]*\) */g, "")}
|
|
4776
|
+
</div>
|
|
4777
|
+
<div part="stream-event-risk-${event.risk[0].toLowerCase().replace(/ /g, '-')}" class="stream-event-risk ml-5">
|
|
4778
|
+
${event.risk[0]}
|
|
4779
|
+
</div>
|
|
4780
|
+
` : ''}
|
|
4781
|
+
${showReportingButton ? `
|
|
4782
|
+
<button
|
|
4783
|
+
id="button-list-reporting-${mmddSanitized}-${itemNumber}"
|
|
4784
|
+
part="button-list-reporting"
|
|
4785
|
+
class="material-icons ml-10 button-list-reporting">
|
|
4786
|
+
edit_note
|
|
4787
|
+
</button>
|
|
4788
|
+
` : ''}
|
|
4789
|
+
${showLastUpdated ? `
|
|
4790
|
+
<div part="event-last-updated-time" class="d-flex align-center">
|
|
4791
|
+
${lastUpdated}
|
|
4792
|
+
</div>
|
|
4793
|
+
` : ''}
|
|
4794
|
+
</div>
|
|
4795
|
+
`;
|
|
4796
|
+
|
|
4741
4797
|
if (event.reporters != null && remarks.length > 0) {
|
|
4742
4798
|
html += '<div part="stream-events-event-subtitle" class="stream-events-event-subtitle">' + remarks + ', occurred on ' + occurrenceDate + '</div>';
|
|
4743
4799
|
}
|
|
4744
|
-
|
|
4800
|
+
console.log('returning divstarthtml', html);
|
|
4745
4801
|
return html;
|
|
4746
4802
|
|
|
4747
4803
|
}
|
|
@@ -6633,6 +6689,7 @@ export class SfIEvents extends LitElement {
|
|
|
6633
6689
|
filterButton.innerHTML = (filterList.style.display != 'block' ? 'category' : 'close')
|
|
6634
6690
|
const filterSubmitButton = filterList.querySelector('#button-submit-features') as HTMLButtonElement
|
|
6635
6691
|
filterSubmitButton.addEventListener('click', () => {
|
|
6692
|
+
Util.setFeatures(this.selectedFeatures);
|
|
6636
6693
|
this.enableCustom();
|
|
6637
6694
|
this.renderTabs(this.selectedTab);
|
|
6638
6695
|
// this.processDateSelection(eventsContainer);
|
|
@@ -7423,6 +7480,7 @@ export class SfIEvents extends LitElement {
|
|
|
7423
7480
|
filterButton.innerHTML = (filterList.style.display != 'block' ? 'category' : 'close')
|
|
7424
7481
|
const filterSubmitButton = filterList.querySelector('#button-submit-features') as HTMLButtonElement
|
|
7425
7482
|
filterSubmitButton.addEventListener('click', () => {
|
|
7483
|
+
Util.setFeatures(this.selectedFeatures);
|
|
7426
7484
|
this.renderTabs(this.selectedTab)
|
|
7427
7485
|
this.processDateSelectionViewer(eventsContainer);
|
|
7428
7486
|
})
|
|
@@ -10648,6 +10706,7 @@ export class SfIEvents extends LitElement {
|
|
|
10648
10706
|
filterButton.innerHTML = (filterList.style.display != 'block' ? 'category' : 'close')
|
|
10649
10707
|
const filterSubmitButton = filterList.querySelector('#button-submit-features') as HTMLButtonElement
|
|
10650
10708
|
filterSubmitButton.addEventListener('click', async () => {
|
|
10709
|
+
Util.setFeatures(this.selectedFeatures);
|
|
10651
10710
|
const dateResult = this.calculateStartAndEndDateOfStream(index);
|
|
10652
10711
|
console.log('dateresult', dateResult, index);
|
|
10653
10712
|
console.log('selectedfeatures', this.selectedFeatures);
|
|
@@ -11219,6 +11278,7 @@ export class SfIEvents extends LitElement {
|
|
|
11219
11278
|
filterButton.innerHTML = (filterList.style.display != 'block' ? 'category' : 'close')
|
|
11220
11279
|
const filterSubmitButton = filterList.querySelector('#button-submit-features') as HTMLButtonElement
|
|
11221
11280
|
filterSubmitButton.addEventListener('click', async () => {
|
|
11281
|
+
Util.setFeatures(this.selectedFeatures);
|
|
11222
11282
|
const dateResult = this.calculateStartAndEndDateOfStream(index);
|
|
11223
11283
|
const monthResult = this.calculateMonthFromIndex(index);
|
|
11224
11284
|
console.log('monthResult', monthResult);
|
|
@@ -13642,7 +13702,7 @@ export class SfIEvents extends LitElement {
|
|
|
13642
13702
|
console.log('renewing', reportformatvalues)
|
|
13643
13703
|
//console.log('fetch calendar url', url);
|
|
13644
13704
|
let urlBody: any = { projectid: this.projectId, objectid: listEvent.id, newvalues: reportformatvalues == "" ? null : JSON.parse(reportformatvalues), published: true, terminated: (JSON.parse(reportformatvalues).terminated ?? false) };
|
|
13645
|
-
|
|
13705
|
+
// console.log('reopen body', url, urlBody)
|
|
13646
13706
|
const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
13647
13707
|
const xhr: any = (await this.prepareXhr(urlBody, url, this._SfLoader, authorization, 'Preparing')) as any;
|
|
13648
13708
|
this._SfLoader.innerHTML = '';
|
|
@@ -20089,7 +20149,11 @@ export class SfIEvents extends LitElement {
|
|
|
20089
20149
|
this.myRole = this.TAB_REPORTER;
|
|
20090
20150
|
this.renderRoleTabs();
|
|
20091
20151
|
// this.proceedToCalendar();
|
|
20092
|
-
(
|
|
20152
|
+
if (this.selectedFeatures.indexOf('agreements') >= 0) {
|
|
20153
|
+
((this._SfTabContainer as HTMLDivElement).querySelector('#calendar-tab-custom') as HTMLButtonElement)?.click();
|
|
20154
|
+
} else {
|
|
20155
|
+
((this._SfTabContainer as HTMLDivElement).querySelector('#calendar-tab-month') as HTMLButtonElement)?.click();
|
|
20156
|
+
}
|
|
20093
20157
|
|
|
20094
20158
|
});
|
|
20095
20159
|
|
|
@@ -20098,7 +20162,11 @@ export class SfIEvents extends LitElement {
|
|
|
20098
20162
|
this.myRole = this.TAB_APPROVER;
|
|
20099
20163
|
this.renderRoleTabs();
|
|
20100
20164
|
// this.proceedToCalendar();
|
|
20101
|
-
(
|
|
20165
|
+
if (this.selectedFeatures.indexOf('agreements') >= 0) {
|
|
20166
|
+
((this._SfTabContainer as HTMLDivElement).querySelector('#calendar-tab-custom') as HTMLButtonElement)?.click();
|
|
20167
|
+
} else {
|
|
20168
|
+
((this._SfTabContainer as HTMLDivElement).querySelector('#calendar-tab-month') as HTMLButtonElement)?.click();
|
|
20169
|
+
}
|
|
20102
20170
|
|
|
20103
20171
|
});
|
|
20104
20172
|
|
|
@@ -20107,7 +20175,11 @@ export class SfIEvents extends LitElement {
|
|
|
20107
20175
|
this.myRole = this.TAB_FUNCTION_HEAD;
|
|
20108
20176
|
this.renderRoleTabs();
|
|
20109
20177
|
// this.proceedToCalendar();
|
|
20110
|
-
(
|
|
20178
|
+
if (this.selectedFeatures.indexOf('agreements') >= 0) {
|
|
20179
|
+
((this._SfTabContainer as HTMLDivElement).querySelector('#calendar-tab-custom') as HTMLButtonElement)?.click();
|
|
20180
|
+
} else {
|
|
20181
|
+
((this._SfTabContainer as HTMLDivElement).querySelector('#calendar-tab-month') as HTMLButtonElement)?.click();
|
|
20182
|
+
}
|
|
20111
20183
|
|
|
20112
20184
|
});
|
|
20113
20185
|
|
|
@@ -20116,7 +20188,11 @@ export class SfIEvents extends LitElement {
|
|
|
20116
20188
|
this.myRole = this.TAB_AUDITOR;
|
|
20117
20189
|
this.renderRoleTabs();
|
|
20118
20190
|
// this.proceedToCalendar();
|
|
20119
|
-
(
|
|
20191
|
+
if (this.selectedFeatures.indexOf('agreements') >= 0) {
|
|
20192
|
+
((this._SfTabContainer as HTMLDivElement).querySelector('#calendar-tab-custom') as HTMLButtonElement)?.click();
|
|
20193
|
+
} else {
|
|
20194
|
+
((this._SfTabContainer as HTMLDivElement).querySelector('#calendar-tab-month') as HTMLButtonElement)?.click();
|
|
20195
|
+
}
|
|
20120
20196
|
|
|
20121
20197
|
});
|
|
20122
20198
|
|
|
@@ -20126,7 +20202,11 @@ export class SfIEvents extends LitElement {
|
|
|
20126
20202
|
this.myRole = this.TAB_VIEWER;
|
|
20127
20203
|
this.renderRoleTabs();
|
|
20128
20204
|
// this.proceedToCalendar();
|
|
20129
|
-
(
|
|
20205
|
+
if (this.selectedFeatures.indexOf('agreements') >= 0) {
|
|
20206
|
+
((this._SfTabContainer as HTMLDivElement).querySelector('#calendar-tab-custom') as HTMLButtonElement)?.click();
|
|
20207
|
+
} else {
|
|
20208
|
+
((this._SfTabContainer as HTMLDivElement).querySelector('#calendar-tab-month') as HTMLButtonElement)?.click();
|
|
20209
|
+
}
|
|
20130
20210
|
|
|
20131
20211
|
});
|
|
20132
20212
|
|
|
@@ -25501,6 +25581,13 @@ export class SfIEvents extends LitElement {
|
|
|
25501
25581
|
}
|
|
25502
25582
|
|
|
25503
25583
|
renderWithFeatures = async (startDate: string = "", endDate: string = "", searchString: string = "", list: string = "yes", month: string = "00", year: string = this.calendarStartYYYY) => {
|
|
25584
|
+
this.selectedFeatures = Util.getFeatures();
|
|
25585
|
+
for (let feature of this.selectedFeatures) {
|
|
25586
|
+
if (this.getFeatures().indexOf(feature) < 0) {
|
|
25587
|
+
this.selectedFeatures = ['compliances']
|
|
25588
|
+
break;
|
|
25589
|
+
}
|
|
25590
|
+
}
|
|
25504
25591
|
this.events = []
|
|
25505
25592
|
console.log('rendering and fetching', startDate, endDate, searchString, list, month)
|
|
25506
25593
|
if (this.selectedFeatures.indexOf('compliances') >= 0) {
|
|
@@ -27493,8 +27580,22 @@ export class SfIEvents extends LitElement {
|
|
|
27493
27580
|
((this._SfTabContainer as HTMLDivElement).querySelector('#calendar-tab-year') as HTMLButtonElement)?.click();
|
|
27494
27581
|
} else {
|
|
27495
27582
|
//console.log('stream received rendering year', this.stream);
|
|
27496
|
-
this.
|
|
27497
|
-
(
|
|
27583
|
+
this.selectedFeatures = Util.getFeatures();
|
|
27584
|
+
for (let feature of this.selectedFeatures) {
|
|
27585
|
+
if (this.getFeatures().indexOf(feature) < 0) {
|
|
27586
|
+
this.selectedFeatures = ['compliances']
|
|
27587
|
+
break;
|
|
27588
|
+
}
|
|
27589
|
+
}
|
|
27590
|
+
if (this.selectedFeatures.indexOf('agreements') >= 0) {
|
|
27591
|
+
this.renderTabs(this.TAB_CUSTOM);
|
|
27592
|
+
((this._SfTabContainer as HTMLDivElement).querySelector('#calendar-tab-custom') as HTMLButtonElement)?.click();
|
|
27593
|
+
} else {
|
|
27594
|
+
this.renderTabs(this.TAB_STREAM);
|
|
27595
|
+
((this._SfTabContainer as HTMLDivElement).querySelector('#calendar-tab-month') as HTMLButtonElement)?.click();
|
|
27596
|
+
}
|
|
27597
|
+
// this.renderTabs(this.TAB_STREAM);
|
|
27598
|
+
// ((this._SfTabContainer as HTMLDivElement).querySelector('#calendar-tab-month') as HTMLButtonElement)?.click();
|
|
27498
27599
|
}
|
|
27499
27600
|
//await this.fetchUserCalendar_2();
|
|
27500
27601
|
|
package/src/util.ts
CHANGED
|
@@ -505,8 +505,16 @@ function getUsermap() {
|
|
|
505
505
|
return userMapHome;
|
|
506
506
|
}
|
|
507
507
|
|
|
508
|
+
function setFeatures(features:any){
|
|
509
|
+
localStorage.setItem('features', JSON.stringify(features))
|
|
510
|
+
}
|
|
511
|
+
function getFeatures(){
|
|
512
|
+
let features = JSON.parse(localStorage.getItem('features') ?? '["compliances"]')
|
|
513
|
+
return features
|
|
514
|
+
}
|
|
515
|
+
|
|
508
516
|
const exportFunctions = {
|
|
509
|
-
callApiPresignedDelete, callApiPresignedGet, callApiPresigned, jsonObjectToHtml, clearListeners, isInteger, callApi, validateName, readCookie, timeSince, createDiagonalPattern1, createDiagonalPattern2, createDiagonalPattern3, getRandomColor, convertToCSV, parseCsv, titleCase, alphabeticalSort, percentageString, getCurrentFiscal, getDateTimeStrings, getUsermap
|
|
517
|
+
callApiPresignedDelete, callApiPresignedGet, callApiPresigned, jsonObjectToHtml, clearListeners, isInteger, callApi, validateName, readCookie, timeSince, createDiagonalPattern1, createDiagonalPattern2, createDiagonalPattern3, getRandomColor, convertToCSV, parseCsv, titleCase, alphabeticalSort, percentageString, getCurrentFiscal, getDateTimeStrings, getUsermap, setFeatures, getFeatures
|
|
510
518
|
};
|
|
511
519
|
|
|
512
520
|
export default exportFunctions;
|
package/util.d.ts
CHANGED
|
@@ -18,6 +18,8 @@ declare function percentageString(val: number, valTotal: number): string;
|
|
|
18
18
|
declare function getCurrentFiscal(): number;
|
|
19
19
|
declare function getDateTimeStrings(unixTimestamp: number): string;
|
|
20
20
|
declare function getUsermap(): any;
|
|
21
|
+
declare function setFeatures(features: any): void;
|
|
22
|
+
declare function getFeatures(): any;
|
|
21
23
|
declare const exportFunctions: {
|
|
22
24
|
callApiPresignedDelete: typeof callApiPresignedDelete;
|
|
23
25
|
callApiPresignedGet: typeof callApiPresignedGet;
|
|
@@ -41,6 +43,8 @@ declare const exportFunctions: {
|
|
|
41
43
|
getCurrentFiscal: typeof getCurrentFiscal;
|
|
42
44
|
getDateTimeStrings: typeof getDateTimeStrings;
|
|
43
45
|
getUsermap: typeof getUsermap;
|
|
46
|
+
setFeatures: typeof setFeatures;
|
|
47
|
+
getFeatures: typeof getFeatures;
|
|
44
48
|
};
|
|
45
49
|
export default exportFunctions;
|
|
46
50
|
//# sourceMappingURL=util.d.ts.map
|
package/util.js
CHANGED
|
@@ -424,8 +424,16 @@ function getUsermap() {
|
|
|
424
424
|
let userMapHome = JSON.parse(JSON.parse((userinfo.user.usermap.S).replace(/_QUOTES_/g, "\\\"")));
|
|
425
425
|
return userMapHome;
|
|
426
426
|
}
|
|
427
|
+
function setFeatures(features) {
|
|
428
|
+
localStorage.setItem('features', JSON.stringify(features));
|
|
429
|
+
}
|
|
430
|
+
function getFeatures() {
|
|
431
|
+
var _a;
|
|
432
|
+
let features = JSON.parse((_a = localStorage.getItem('features')) !== null && _a !== void 0 ? _a : '["compliances"]');
|
|
433
|
+
return features;
|
|
434
|
+
}
|
|
427
435
|
const exportFunctions = {
|
|
428
|
-
callApiPresignedDelete, callApiPresignedGet, callApiPresigned, jsonObjectToHtml, clearListeners, isInteger, callApi, validateName, readCookie, timeSince, createDiagonalPattern1, createDiagonalPattern2, createDiagonalPattern3, getRandomColor, convertToCSV, parseCsv, titleCase, alphabeticalSort, percentageString, getCurrentFiscal, getDateTimeStrings, getUsermap
|
|
436
|
+
callApiPresignedDelete, callApiPresignedGet, callApiPresigned, jsonObjectToHtml, clearListeners, isInteger, callApi, validateName, readCookie, timeSince, createDiagonalPattern1, createDiagonalPattern2, createDiagonalPattern3, getRandomColor, convertToCSV, parseCsv, titleCase, alphabeticalSort, percentageString, getCurrentFiscal, getDateTimeStrings, getUsermap, setFeatures, getFeatures
|
|
429
437
|
};
|
|
430
438
|
export default exportFunctions;
|
|
431
439
|
//# sourceMappingURL=util.js.map
|