Skip to content

Commit cf08128

Browse files
committed
Surveys: Run admin screen instance list should display the 'issued on' value of the instance
#CTCTOWALTZ-2744 #6440
1 parent 832627b commit cf08128

2 files changed

Lines changed: 19 additions & 10 deletions

File tree

waltz-ng/client/survey/components/svelte/SurveyApproverInfoPanel.svelte

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,13 @@
4444
4545
const tableHeaders = [
4646
{
47+
cellClass: "overdue",
48+
name: "Approval Overdue",
49+
longName: "Approval overdue - surveys past their approval due date",
50+
description: "Survey is past its approval due date within Waltz",
51+
width: "20%",
52+
data: d => d.approvalOverdue
53+
}, {
4754
cellClass: "awaiting-approval",
4855
name: "Awaiting Approval",
4956
longName: "Completed surveys - awaiting approval",
@@ -52,14 +59,14 @@
5259
data: d => d.completed
5360
}, {
5461
cellClass: "overdue",
55-
name: "Overdue",
56-
longName: "Overdue surveys",
57-
description: "Survey is past its submission due date within Waltz", // check approval or submission due date
62+
name: "Submission Overdue",
63+
longName: "Surveys for your approval which have not yet been submitted and are overdue",
64+
description: "Survey is past its submission due date within Waltz",
5865
width: "20%",
59-
data: d => d.overdue
66+
data: d => d.submissionOverdue
6067
}, {
6168
cellClass: "awaiting-completion",
62-
name: "Awaiting Completion",
69+
name: "Awaiting Submission",
6370
longName: "Incomplete surveys - awaiting completion",
6471
description: "Surveys that will need approval once they have been submitted, this includes overdue surveys and those that have not passed their due date",
6572
width: "20%",
@@ -130,15 +137,17 @@
130137
const approved = _.get(surveysByStatus, ["APPROVED"], [])
131138
const rejected = _.get(surveysByStatus, ["REJECTED"], [])
132139
133-
const [overdue, outstanding] = _.partition(incomplete, d => new Date(d.surveyRun.dueDate) < currentDate);
140+
const submissionOverdue = _.filter(incomplete, d => new Date(d.surveyInstance.dueDate) < currentDate);
141+
const approvalOverdue = _.filter(completed, d => new Date(d.surveyInstance.approvalDueDate) < currentDate);
134142
135143
return {
136144
template: templatesById[k],
137145
incomplete,
138146
approved,
139147
rejected,
140148
completed,
141-
overdue,
149+
submissionOverdue,
150+
approvalOverdue
142151
}})
143152
.orderBy(d => d.template.name)
144153
.value();

waltz-ng/client/survey/components/svelte/SurveyRecipientInfoPanel.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,9 @@
137137
const approved = _.get(surveysByStatus, ["APPROVED"], [])
138138
const rejected = _.get(surveysByStatus, ["REJECTED"], [])
139139
140-
const [overdue, outstanding] = _.partition(incomplete, d => new Date(d.surveyRun.dueDate) < currentDate);
141-
const [dueWeek, moreThanWeek] = _.partition(outstanding, d => new Date(d.surveyRun.dueDate) < weekFromNow);
142-
const [dueMonth, future] = _.partition(moreThanWeek, d => new Date(d.surveyRun.dueDate) < monthFromNow);
140+
const [overdue, outstanding] = _.partition(incomplete, d => new Date(d.surveyInstance.dueDate) < currentDate);
141+
const [dueWeek, moreThanWeek] = _.partition(outstanding, d => new Date(d.surveyInstance.dueDate) < weekFromNow);
142+
const [dueMonth, future] = _.partition(moreThanWeek, d => new Date(d.surveyInstance.dueDate) < monthFromNow);
143143
144144
return {
145145
template: templatesById[k],

0 commit comments

Comments
 (0)