vcomply-workflow-engine 6.1.30 → 6.1.32
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/esm2022/lib/log-an-issue/log-an-issue.component.mjs +9 -1
- package/esm2022/lib/report-a-case/components/due-date/due-date.component.mjs +5 -9
- package/esm2022/lib/report-a-case/workflow-case/workflow-case.component.mjs +15 -6
- package/fesm2022/vcomply-workflow-engine.mjs +26 -13
- package/fesm2022/vcomply-workflow-engine.mjs.map +1 -1
- package/lib/log-an-issue/log-an-issue.component.d.ts +1 -0
- package/lib/report-a-case/components/due-date/due-date.component.d.ts +0 -1
- package/lib/report-a-case/workflow-case/workflow-case.component.d.ts +1 -0
- package/lib/workflow-risk/workflow-risk.component.d.ts +1 -1
- package/package.json +1 -1
|
@@ -12450,14 +12450,8 @@ class DueDateComponent {
|
|
|
12450
12450
|
this.initializeDeadlineValues(deadline);
|
|
12451
12451
|
this.initializeStageAssignees(deadline);
|
|
12452
12452
|
}
|
|
12453
|
-
parseDateString(dateStr) {
|
|
12454
|
-
const dateOnly = dateStr.split('T')[0];
|
|
12455
|
-
return new Date(dateOnly + 'T00:00:00');
|
|
12456
|
-
}
|
|
12457
12453
|
initializeDeadlineValues(deadline) {
|
|
12458
|
-
|
|
12459
|
-
this.dueDate = this.parseDateString(deadline.due_date);
|
|
12460
|
-
}
|
|
12454
|
+
this.dueDate = new Date(deadline?.due_date);
|
|
12461
12455
|
this.emailReminder =
|
|
12462
12456
|
deadline.assignee_remind_before || EMAIL_REMINDERS.email_reminder;
|
|
12463
12457
|
this.escalationEmail =
|
|
@@ -12636,6 +12630,8 @@ class DueDateComponent {
|
|
|
12636
12630
|
}
|
|
12637
12631
|
formatDueDate(date) {
|
|
12638
12632
|
const localDate = new Date(date);
|
|
12633
|
+
// Add one day to the date
|
|
12634
|
+
localDate.setDate(localDate.getDate() + 1);
|
|
12639
12635
|
// Set time to midnight
|
|
12640
12636
|
localDate.setHours(0, 0, 0, 0);
|
|
12641
12637
|
return localDate.toISOString();
|
|
@@ -12664,7 +12660,7 @@ class DueDateComponent {
|
|
|
12664
12660
|
};
|
|
12665
12661
|
}
|
|
12666
12662
|
setPayload() {
|
|
12667
|
-
const formattedDate = this.
|
|
12663
|
+
const formattedDate = this.dueDate;
|
|
12668
12664
|
this.payload.caseToWorkflow.resolution_deadline.due_date = formattedDate;
|
|
12669
12665
|
this.setDeadlineReminders();
|
|
12670
12666
|
const stagesAssignees = this.setStagesAssignees();
|
|
@@ -14292,7 +14288,7 @@ class WorkflowCaseComponent {
|
|
|
14292
14288
|
this.addToCasePayload.caseToWorkflow.resolution_deadline =
|
|
14293
14289
|
data?.resolution_deadline;
|
|
14294
14290
|
const date = new Date(data?.resolution_deadline?.due_date);
|
|
14295
|
-
date.setDate(date.getDate()
|
|
14291
|
+
date.setDate(date.getDate() - 1);
|
|
14296
14292
|
date.setHours(0, 0, 0, 0);
|
|
14297
14293
|
this.addToCasePayload.caseToWorkflow.resolution_deadline.due_date =
|
|
14298
14294
|
date.toISOString();
|
|
@@ -14385,6 +14381,12 @@ class WorkflowCaseComponent {
|
|
|
14385
14381
|
this.reportACaseService.getWorkflowDetails(this.params);
|
|
14386
14382
|
}
|
|
14387
14383
|
}
|
|
14384
|
+
handleCaseIdFromResponse(res) {
|
|
14385
|
+
const caseId = res?.data?._id || res?.data?.id;
|
|
14386
|
+
if (caseId && this.openedFrom === 'ASSESSMENT') {
|
|
14387
|
+
sessionStorage.setItem('issue_id', caseId.toString());
|
|
14388
|
+
}
|
|
14389
|
+
}
|
|
14388
14390
|
reportCase() {
|
|
14389
14391
|
if (this.openedFrom === 'COMPLIANCE_WORKROOM' || this.openedFrom === 'ASSESSMENT') {
|
|
14390
14392
|
this.filterResponsibilities(this.payload);
|
|
@@ -14404,6 +14406,7 @@ class WorkflowCaseComponent {
|
|
|
14404
14406
|
this.showSmiley = true;
|
|
14405
14407
|
this.uiKitService.isSmileyOn = true;
|
|
14406
14408
|
this.loader.reportCaseLoader = false;
|
|
14409
|
+
this.handleCaseIdFromResponse(res);
|
|
14407
14410
|
},
|
|
14408
14411
|
error: (err) => {
|
|
14409
14412
|
console.log(err, 'err');
|
|
@@ -14694,11 +14697,10 @@ class WorkflowCaseComponent {
|
|
|
14694
14697
|
return localDate.toISOString();
|
|
14695
14698
|
}
|
|
14696
14699
|
updateDate() {
|
|
14697
|
-
const date = this.addToCasePayload?.caseToWorkflow?.resolution_deadline?.due_date;
|
|
14698
|
-
|
|
14699
|
-
this.addToCasePayload.caseToWorkflow.resolution_deadline.due_date = formattedDate;
|
|
14700
|
+
const date = this.formatDueDate(this.addToCasePayload?.caseToWorkflow?.resolution_deadline?.due_date);
|
|
14701
|
+
this.addToCasePayload.caseToWorkflow.resolution_deadline.due_date = date;
|
|
14700
14702
|
this.addToCasePayload?.caseToWorkflow?.resolution_deadline?.stages_assignees?.forEach((stage) => {
|
|
14701
|
-
stage.due_date =
|
|
14703
|
+
stage.due_date = date;
|
|
14702
14704
|
});
|
|
14703
14705
|
}
|
|
14704
14706
|
addToCase() {
|
|
@@ -14725,6 +14727,7 @@ class WorkflowCaseComponent {
|
|
|
14725
14727
|
this.showSmiley = true;
|
|
14726
14728
|
this.uiKitService.isSmileyOn = true;
|
|
14727
14729
|
this.loader.reportCaseLoader = false;
|
|
14730
|
+
this.handleCaseIdFromResponse(res);
|
|
14728
14731
|
},
|
|
14729
14732
|
error: (err) => {
|
|
14730
14733
|
this.loader.reportCaseLoader = false;
|
|
@@ -14745,6 +14748,7 @@ class WorkflowCaseComponent {
|
|
|
14745
14748
|
this.showSmiley = true;
|
|
14746
14749
|
this.uiKitService.isSmileyOn = true;
|
|
14747
14750
|
this.loader.reportCaseLoader = false;
|
|
14751
|
+
this.handleCaseIdFromResponse(res);
|
|
14748
14752
|
},
|
|
14749
14753
|
error: (err) => {
|
|
14750
14754
|
this.loader.reportCaseLoader = false;
|
|
@@ -14761,6 +14765,7 @@ class WorkflowCaseComponent {
|
|
|
14761
14765
|
this.showSmiley = true;
|
|
14762
14766
|
this.uiKitService.isSmileyOn = true;
|
|
14763
14767
|
this.loader.reportCaseLoader = false;
|
|
14768
|
+
this.handleCaseIdFromResponse(res);
|
|
14764
14769
|
},
|
|
14765
14770
|
error: (err) => {
|
|
14766
14771
|
this.loader.reportCaseLoader = false;
|
|
@@ -42784,6 +42789,12 @@ class LogAnIssueComponent {
|
|
|
42784
42789
|
}
|
|
42785
42790
|
}
|
|
42786
42791
|
}
|
|
42792
|
+
handleIssueIdFromResponse(res) {
|
|
42793
|
+
const issueId = res?.data?._id || res?.data?.id;
|
|
42794
|
+
if (issueId && this.openedFrom === 'ASSESSMENT') {
|
|
42795
|
+
sessionStorage.setItem('issue_id', issueId.toString());
|
|
42796
|
+
}
|
|
42797
|
+
}
|
|
42787
42798
|
addIssue() {
|
|
42788
42799
|
const form = cloneDeep(this.logIssueForm);
|
|
42789
42800
|
if (form.isAssignToMyself) {
|
|
@@ -42851,6 +42862,7 @@ class LogAnIssueComponent {
|
|
|
42851
42862
|
this.uiKitService.isSmileyOn = true;
|
|
42852
42863
|
this.loader = false;
|
|
42853
42864
|
this.uiKitService.isLoader = false;
|
|
42865
|
+
this.handleIssueIdFromResponse(res);
|
|
42854
42866
|
}, (error) => {
|
|
42855
42867
|
this.loader = false;
|
|
42856
42868
|
this.uiKitService.isLoader = false;
|
|
@@ -42864,6 +42876,7 @@ class LogAnIssueComponent {
|
|
|
42864
42876
|
this.uiKitService.isSmileyOn = true;
|
|
42865
42877
|
this.loader = false;
|
|
42866
42878
|
this.uiKitService.isLoader = false;
|
|
42879
|
+
this.handleIssueIdFromResponse(res);
|
|
42867
42880
|
}, (error) => {
|
|
42868
42881
|
this.loader = false;
|
|
42869
42882
|
this.uiKitService.isLoader = false;
|