feat: close final competitive gap — professional review workflow + multi-country (MY/SG/UK)
Closes the 4th and final gap from the competitive benchmark: the human-in-the-loop professional tier every commercial competitor pairs with their software. Deliberately NOT a marketplace or payment integration — a structured review-request status on each member's Wassiyah (not_requested -> requested -> reviewed, with reviewer name recorded), surfaced on the Mutawalli dashboard so nothing quietly ships as final without the legally-required review being flagged. Paired with a new whole-app jurisdiction setting since 'necessary in certain countries' only makes sense per-jurisdiction: - nf_families.jurisdiction (MY/SG/UK), owner-only to change — first UPDATE policy ever added to nf_families, which previously had none. - New Settings-tab jurisdiction selector (JurisdictionSetting.svelte). - Wassiyah tab and the draft will document now carry jurisdiction- specific legal notes: Wills Act 1959 + state Syariah (Malaysia), Wills Act 1838 + AMLA (Singapore), Wills Act 1837 (UK). Singapore added as a full third jurisdiction option, not just a stub. - Zakat calculator's currency label and Nisab default now follow the family's jurisdiction (RM/SGD/GBP) instead of a hardcoded RM guess. Covered by e2e-jurisdiction-review.cjs (13/13). Full regression: 253/253 across all suites (2 reruns confirmed as pre-existing parallel-load flakes, not regressions).
This commit is contained in:
+13
-1
@@ -13,6 +13,17 @@ function esc(s) {
|
||||
return String(s || '').replace(/[&<>"']/g, c => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }[c]));
|
||||
}
|
||||
|
||||
export const JURISDICTION_LABELS = { MY: 'Malaysia', SG: 'Singapore', UK: 'United Kingdom' };
|
||||
|
||||
// Execution requirements genuinely differ by jurisdiction — kept short and
|
||||
// factual (statute names, witness rules), not legal advice on how they
|
||||
// apply to any specific estate.
|
||||
export const JURISDICTION_NOTES = {
|
||||
MY: "Execution under the Wills Act 1959 applies to non-Muslims and to the discretionary Wassiyah portion for Muslims; the signature must be made or acknowledged in the presence of two witnesses present at the same time, who then also sign. The remainder of the estate is subject to Faraid under the relevant State Islamic law — requirements and the recognized process vary across Malaysia's states, so confirm the current position with a Wasiyyah provider or Syariah-qualified lawyer before relying on this draft.",
|
||||
SG: "Execution under the Wills Act 1838 (Cap. 352) requires the testator's signature made or acknowledged in the presence of two witnesses present at the same time, who then also sign in the testator's presence. For Muslims, the Administration of Muslim Law Act (AMLA) governs Faraid distribution of the remainder through the Syariah Court, while the Wassiyah (discretionary one-third) portion is still executed as a civil will under the Wills Act — have this draft reviewed by a Singapore-qualified lawyer before relying on it.",
|
||||
UK: "Execution under the Wills Act 1837 requires the testator's signature made or acknowledged in the presence of two witnesses present at the same time, who then also sign in the testator's presence. A UK Islamic will operates as an ordinary civil will for legal purposes — English/Scottish/Northern Irish succession law does not itself apply Faraid, so the Wassiyah structure here only takes effect through this document being properly executed. Have this draft reviewed by a UK-qualified solicitor before relying on it."
|
||||
};
|
||||
|
||||
export function buildWillDocumentHtml({ testatorName, email, jurisdiction, witness1, witness2, executorName, bequests, estateTotal, cap, generatedDate }) {
|
||||
const name = testatorName?.trim() || '[FULL LEGAL NAME NOT YET ENTERED]';
|
||||
const exec = executorName?.trim() || '[EXECUTOR NOT YET NAMED]';
|
||||
@@ -58,7 +69,8 @@ export function buildWillDocumentHtml({ testatorName, email, jurisdiction, witne
|
||||
<p>I, <strong>${esc(name)}</strong>${email ? ` (${esc(email)})` : ''}, being of sound mind, declare this to be my Will, and I hereby revoke all previous wills and testamentary dispositions made by me. This document expresses my Wassiyah — the portion of my estate I direct outside the fixed Faraid distribution — and does not purport to override any Faraid share owed to my heirs.</p>
|
||||
|
||||
<h2>2. Jurisdiction</h2>
|
||||
<p>This Will is intended to take effect under the laws of <strong>${esc(jurisdiction || '[JURISDICTION NOT YET ENTERED]')}</strong>, in accordance with Shariah principles governing Wassiyah.</p>
|
||||
<p>This Will is intended to take effect under the laws of <strong>${esc(JURISDICTION_LABELS[jurisdiction] || jurisdiction || '[JURISDICTION NOT YET ENTERED]')}</strong>, in accordance with Shariah principles governing Wassiyah.</p>
|
||||
<p>${JURISDICTION_NOTES[jurisdiction] || 'Jurisdiction-specific execution requirements were not available for this selection — confirm requirements with a locally qualified lawyer before relying on this draft.'}</p>
|
||||
|
||||
<h2>3. Appointment of Executor</h2>
|
||||
<p>I appoint <strong>${esc(exec)}</strong> as Executor of this Will, to administer my estate, settle my debts, and distribute both the Wassiyah bequests below and the remaining estate according to Faraid.</p>
|
||||
|
||||
Reference in New Issue
Block a user