@7365admin1/layer-common 4.102.0 → 4.103.0
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/CHANGELOG.md +6 -0
- package/components/OnlineFormFill.vue +34 -15
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @iservice365/layer-common
|
|
2
2
|
|
|
3
|
+
## 4.103.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 2ca1c40: Online forms review screen: read-only answers stay legible (readonly instead of greyed disabled); a short how-to line; "Request resubmission" and remarks labels that match iMA365 and say the resident sees them; Confirm reads Confirm approval / Confirm rejection / Send back to resident; the page can clear the Confirm spinner when a save fails.
|
|
8
|
+
|
|
3
9
|
## 4.102.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
v-if="field.fieldType === 'text'"
|
|
108
108
|
v-model="values[field.key]"
|
|
109
109
|
density="comfortable"
|
|
110
|
-
:
|
|
110
|
+
:readonly="readonly"
|
|
111
111
|
:rules="!readonly && field.required ? [requiredRule] : []"
|
|
112
112
|
/>
|
|
113
113
|
<v-text-field
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
v-model.number="values[field.key]"
|
|
116
116
|
type="number"
|
|
117
117
|
density="comfortable"
|
|
118
|
-
:
|
|
118
|
+
:readonly="readonly"
|
|
119
119
|
:rules="!readonly && field.required ? [requiredRule] : []"
|
|
120
120
|
/>
|
|
121
121
|
<v-text-field
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
v-model="values[field.key]"
|
|
124
124
|
type="date"
|
|
125
125
|
density="comfortable"
|
|
126
|
-
:
|
|
126
|
+
:readonly="readonly"
|
|
127
127
|
:rules="!readonly && field.required ? [requiredRule] : []"
|
|
128
128
|
/>
|
|
129
129
|
<v-select
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
v-model="values[field.key]"
|
|
132
132
|
:items="field.options || []"
|
|
133
133
|
density="comfortable"
|
|
134
|
-
:
|
|
134
|
+
:readonly="readonly"
|
|
135
135
|
:rules="!readonly && field.required ? [requiredRule] : []"
|
|
136
136
|
/>
|
|
137
137
|
<v-textarea
|
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
density="comfortable"
|
|
141
141
|
rows="3"
|
|
142
142
|
auto-grow
|
|
143
|
-
:
|
|
143
|
+
:readonly="readonly"
|
|
144
144
|
:rules="!readonly && field.required ? [requiredRule] : []"
|
|
145
145
|
/>
|
|
146
146
|
</v-col>
|
|
@@ -153,7 +153,7 @@
|
|
|
153
153
|
v-if="block.field.fieldType === 'text'"
|
|
154
154
|
v-model="values[block.field.key]"
|
|
155
155
|
density="comfortable"
|
|
156
|
-
:
|
|
156
|
+
:readonly="readonly"
|
|
157
157
|
:rules="!readonly && block.field.required ? [requiredRule] : []"
|
|
158
158
|
/>
|
|
159
159
|
<v-text-field
|
|
@@ -161,7 +161,7 @@
|
|
|
161
161
|
v-model.number="values[block.field.key]"
|
|
162
162
|
type="number"
|
|
163
163
|
density="comfortable"
|
|
164
|
-
:
|
|
164
|
+
:readonly="readonly"
|
|
165
165
|
:rules="!readonly && block.field.required ? [requiredRule] : []"
|
|
166
166
|
/>
|
|
167
167
|
<v-text-field
|
|
@@ -169,7 +169,7 @@
|
|
|
169
169
|
v-model="values[block.field.key]"
|
|
170
170
|
type="date"
|
|
171
171
|
density="comfortable"
|
|
172
|
-
:
|
|
172
|
+
:readonly="readonly"
|
|
173
173
|
:rules="!readonly && block.field.required ? [requiredRule] : []"
|
|
174
174
|
/>
|
|
175
175
|
<v-select
|
|
@@ -177,7 +177,7 @@
|
|
|
177
177
|
v-model="values[block.field.key]"
|
|
178
178
|
:items="block.field.options || []"
|
|
179
179
|
density="comfortable"
|
|
180
|
-
:
|
|
180
|
+
:readonly="readonly"
|
|
181
181
|
:rules="!readonly && block.field.required ? [requiredRule] : []"
|
|
182
182
|
/>
|
|
183
183
|
<v-textarea
|
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
density="comfortable"
|
|
187
187
|
rows="3"
|
|
188
188
|
auto-grow
|
|
189
|
-
:
|
|
189
|
+
:readonly="readonly"
|
|
190
190
|
:rules="!readonly && block.field.required ? [requiredRule] : []"
|
|
191
191
|
/>
|
|
192
192
|
</div>
|
|
@@ -227,7 +227,7 @@
|
|
|
227
227
|
density="compact"
|
|
228
228
|
hide-details
|
|
229
229
|
class="mt-0 pt-0 flex-shrink-0"
|
|
230
|
-
:
|
|
230
|
+
:readonly="readonly"
|
|
231
231
|
/>
|
|
232
232
|
<div class="flex-grow-1">
|
|
233
233
|
<span class="text-body-2" style="line-height: 1.4">{{ item.label }}</span>
|
|
@@ -392,14 +392,17 @@
|
|
|
392
392
|
v-if="readonly && approvalMode"
|
|
393
393
|
class="online-form-fill__approve"
|
|
394
394
|
>
|
|
395
|
+
<p class="text-caption text-medium-emphasis mb-2" data-test="online-form-review-hint">
|
|
396
|
+
{{ reviewHint }}
|
|
397
|
+
</p>
|
|
395
398
|
<v-text-field
|
|
396
399
|
v-model="adminRemarks"
|
|
397
|
-
label="
|
|
400
|
+
:label="remarksLabel"
|
|
398
401
|
density="compact"
|
|
399
402
|
variant="outlined"
|
|
400
403
|
:hide-details="adminRemarks.trim().length > 0"
|
|
401
404
|
:error="remarksRequired && adminRemarks.trim().length === 0"
|
|
402
|
-
:error-messages="remarksRequired && adminRemarks.trim().length === 0 ? '
|
|
405
|
+
:error-messages="remarksRequired && adminRemarks.trim().length === 0 ? 'Please add remarks - the resident sees them' : ''"
|
|
403
406
|
/>
|
|
404
407
|
<!-- The three verdicts keep their colour coding - it is what tells them
|
|
405
408
|
apart - but on the theme's own status colours rather than fixed
|
|
@@ -413,7 +416,7 @@
|
|
|
413
416
|
color="warning"
|
|
414
417
|
class="text-none"
|
|
415
418
|
@click="selectAction('resubmission')"
|
|
416
|
-
>
|
|
419
|
+
>Request resubmission</v-btn>
|
|
417
420
|
<v-btn
|
|
418
421
|
:variant="selectedAction === 'rejected' ? 'flat' : 'tonal'"
|
|
419
422
|
color="error"
|
|
@@ -433,7 +436,7 @@
|
|
|
433
436
|
:disabled="!canConfirm"
|
|
434
437
|
:loading="updatingStatus"
|
|
435
438
|
@click="confirmStatusUpdate"
|
|
436
|
-
>
|
|
439
|
+
>{{ confirmLabel }}</v-btn>
|
|
437
440
|
</div>
|
|
438
441
|
</div>
|
|
439
442
|
|
|
@@ -592,6 +595,20 @@ watch(() => props.initialManagementValues, (saved) => {
|
|
|
592
595
|
|
|
593
596
|
const remarksRequired = computed(() => !!selectedAction.value);
|
|
594
597
|
|
|
598
|
+
// Same wording as the iMA365 review screen, so office and phone read alike.
|
|
599
|
+
const REVIEW_TEXT: Record<string, { remarks: string; confirm: string }> = {
|
|
600
|
+
approved: { remarks: "Remarks (the resident sees this)", confirm: "Confirm approval" },
|
|
601
|
+
rejected: { remarks: "Reason for rejection (the resident sees this)", confirm: "Confirm rejection" },
|
|
602
|
+
resubmission: { remarks: "Reason for resubmission (the resident sees this)", confirm: "Send back to resident" },
|
|
603
|
+
};
|
|
604
|
+
const remarksLabel = computed(() => REVIEW_TEXT[selectedAction.value]?.remarks ?? "Remarks (the resident sees this)");
|
|
605
|
+
const confirmLabel = computed(() => REVIEW_TEXT[selectedAction.value]?.confirm ?? "Confirm");
|
|
606
|
+
const reviewHint = computed(() =>
|
|
607
|
+
selectedAction.value === "approved" && managementUseItems.value.length
|
|
608
|
+
? "Fill in the For Management Use Only box and your remarks, then confirm."
|
|
609
|
+
: "Choose Approve, Request resubmission or Reject, add your remarks, then confirm.",
|
|
610
|
+
);
|
|
611
|
+
|
|
595
612
|
const managementComplete = computed(() => {
|
|
596
613
|
if (selectedAction.value !== "approved") return true;
|
|
597
614
|
return managementUseItems.value.every(item => (managementValues.value[item] ?? "").trim().length > 0);
|
|
@@ -629,6 +646,8 @@ function confirmStatusUpdate() {
|
|
|
629
646
|
status: selectedAction.value,
|
|
630
647
|
remarks: adminRemarks.value,
|
|
631
648
|
managementValues: managementValues.value,
|
|
649
|
+
// The page calls this when the save finished or failed, so Confirm never stays spinning.
|
|
650
|
+
done: () => (updatingStatus.value = false),
|
|
632
651
|
});
|
|
633
652
|
}
|
|
634
653
|
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@7365admin1/layer-common",
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "4.
|
|
5
|
+
"version": "4.103.0",
|
|
6
6
|
"author": "7365admin1",
|
|
7
7
|
"main": "./nuxt.config.ts",
|
|
8
8
|
"//files": "What a consumer extending this layer actually loads. Without this npm ships the whole working tree - the changesets, the CI workflows, the render harness in tools/ and any scratch directory that happened to exist at publish time. Nuxt resolves a layer by directory, so every runtime directory below has to stay listed; adding a new top-level runtime directory means adding it here too.",
|