nucleus-core-ts 0.10.57 → 0.10.58
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/dist/.build-ok
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.10.
|
|
1
|
+
0.10.58
|
|
@@ -54,13 +54,37 @@ export function PendingTab({ pendingAction, decideAction, uploadSignatureAction,
|
|
|
54
54
|
signature_id: signatureId
|
|
55
55
|
} : {}
|
|
56
56
|
},
|
|
57
|
-
onAfterHandle: ()=>{
|
|
57
|
+
onAfterHandle: (res)=>{
|
|
58
|
+
/*
|
|
59
|
+
* This API answers a REFUSED decision with HTTP 200 and
|
|
60
|
+
* `success: false`, and `onAfterHandle` fires on the status code. So
|
|
61
|
+
* closing the card here unconditionally is how a refusal came to look
|
|
62
|
+
* exactly like an approval.
|
|
63
|
+
*
|
|
64
|
+
* Measured on a leaflet install: a reviewer who had also submitted the
|
|
65
|
+
* version pressed Approve, the engine answered "The person who
|
|
66
|
+
* submitted this for verification cannot decide it", the card closed,
|
|
67
|
+
* nothing was recorded, and the item sat back in the queue with no
|
|
68
|
+
* explanation. The same silence covered every other refusal the engine
|
|
69
|
+
* makes -- wrong role, already decided, account switched off.
|
|
70
|
+
*
|
|
71
|
+
* The engine's own sentence is shown instead of a generic failure: it
|
|
72
|
+
* already says exactly what is wrong, and a reviewer can act on
|
|
73
|
+
* "cannot decide it" in a way they cannot act on "something failed".
|
|
74
|
+
*/ if (res && res.success === false) {
|
|
75
|
+
setSignatureNote(res.message || say.decisionRefused);
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
58
78
|
store.setDecidingId(null);
|
|
59
79
|
store.setDecisionReason('');
|
|
60
80
|
setSignatureFile(null);
|
|
61
81
|
setSignatureNote(null);
|
|
62
82
|
onDecisionMade?.(item.entity_name, item.entity_id);
|
|
63
83
|
loadPending();
|
|
84
|
+
},
|
|
85
|
+
onErrorHandle: (err)=>{
|
|
86
|
+
const msg = err?.message;
|
|
87
|
+
setSignatureNote(msg || say.decisionRefused);
|
|
64
88
|
}
|
|
65
89
|
});
|
|
66
90
|
});
|
|
@@ -97,6 +97,8 @@ export type VerificationFlowLabels = {
|
|
|
97
97
|
signatureUploadFailed: string;
|
|
98
98
|
/** Shown when the host wired no upload action at all. */
|
|
99
99
|
signatureUnavailable: string;
|
|
100
|
+
/** Fallback when a decision is refused and the engine sent no sentence. */
|
|
101
|
+
decisionRefused: string;
|
|
100
102
|
recipientAllVerifiers: string;
|
|
101
103
|
recipientStepVerifier: string;
|
|
102
104
|
recipientEntityCreator: string;
|
|
@@ -77,6 +77,7 @@
|
|
|
77
77
|
signatureUploading: 'Uploading signature…',
|
|
78
78
|
signatureUploadFailed: 'The signature could not be uploaded. The decision was not sent.',
|
|
79
79
|
signatureUnavailable: 'This step requires a signature, but signing is not available on this screen. Nobody can complete it here — remove the signature requirement from the step, or wire an upload action.',
|
|
80
|
+
decisionRefused: 'The decision was refused and nothing was recorded.',
|
|
80
81
|
recipientAllVerifiers: 'All Verifiers',
|
|
81
82
|
recipientStepVerifier: 'Step Verifier',
|
|
82
83
|
recipientEntityCreator: 'Entity Creator',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nucleus-core-ts",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.58",
|
|
4
4
|
"description": "Production-ready, enterprise-grade TypeScript framework for building multi-tenant APIs",
|
|
5
5
|
"author": "Hidayet Can Özcan <hidayetcan@gmail.com>",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|