Skip to content

Commit fc6e1d1

Browse files
Merge pull request #276 in WALTZ/waltz from WALTZ/waltz-dw:CTCTOWALTZ-2744-survey-instance-due to db-feature/waltz-6440-survey-due-tweaks
* commit '6a2065b2a3be9909f2537df0c16858eab5c799dd': Surveys: Run admin screen instance list should display the 'issued on' value of the instance Surveys: Run admin screen instance list should display the 'issued on' value of the instance
2 parents 832627b + 6a2065b commit fc6e1d1

4 files changed

Lines changed: 43 additions & 13 deletions

File tree

waltz-ng/client/survey/components/survey-run-overview.html

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,13 @@
3333
</div>
3434
<br>
3535
<div class="row">
36-
<div class="col-sm-2 waltz-display-field-label">
37-
Description
36+
<div class="col-sm-2">
37+
<div class="waltz-display-field-label">
38+
Run Description
39+
</div>
40+
<div class="small help-block">
41+
Default description
42+
</div>
3843
</div>
3944
<div class="col-sm-10">
4045
<waltz-markdown text="$ctrl.run.description">
@@ -45,7 +50,10 @@
4550
<br>
4651
<div class="row">
4752
<div class="col-sm-2 waltz-display-field-label">
48-
Submission Due
53+
Run Submission Due Date
54+
<div class="small help-block">
55+
Default submission due date, can be overriden by instances
56+
</div>
4957
</div>
5058
<div class="col-sm-4">
5159
<waltz-editable-field on-save="$ctrl.updateDueDate"
@@ -56,6 +64,9 @@
5664
</div>
5765
<div class="col-sm-2 waltz-display-field-label">
5866
Approval Due
67+
<div class="small help-block">
68+
Default approval due date, can be overriden by instances
69+
</div>
5970
</div>
6071
<div class="col-sm-4">
6172
<waltz-editable-field on-save="$ctrl.updateApprovalDueDate"

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],

waltz-ng/client/survey/survey-run-view.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,16 @@ const columnDefs = [
4747
cellFilter: "toDisplayName:'surveyInstanceStatus'"
4848
}, {
4949
field: "dueDate",
50+
name: "Submission Due",
51+
cellTemplate: `
52+
<div class="ui-grid-cell-contents">
53+
<waltz-from-now timestamp="COL_FIELD"
54+
days-only="true">
55+
</waltz-from-now>
56+
</div>`
57+
}, {
58+
field: "approvalDueDate",
59+
name: "Approval Due",
5060
cellTemplate: `
5161
<div class="ui-grid-cell-contents">
5262
<waltz-from-now timestamp="COL_FIELD"

0 commit comments

Comments
 (0)