From 37f4d5a941ecd5a6fba7975587f571d25281869d Mon Sep 17 00:00:00 2001 From: louispaulb Date: Wed, 3 Jun 2026 19:20:04 -0400 Subject: [PATCH] =?UTF-8?q?Wizard:=20section=20Installation=20(palier=20fi?= =?UTF-8?q?nanc=C3=A9)=20=C3=A0=20l'=C3=A9tape=20Items?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Presets Standard 360→240 (10$/mois) / Simple 180→120 (5$/mois) / Aucune - 2 cases éditables Prix original / Prix financé + aperçu live (barré, $/mois, crédité→0$) - Alimente install_fee/install_regular du Service Contract → page d'acceptation affiche le détail - Placé sous Code de référence dans la vue résidentielle Co-Authored-By: Claude Opus 4.8 (1M context) --- .../src/components/shared/ProjectWizard.vue | 48 +++++++++++++++++++ apps/ops/src/composables/useWizardPublish.js | 3 ++ 2 files changed, 51 insertions(+) diff --git a/apps/ops/src/components/shared/ProjectWizard.vue b/apps/ops/src/components/shared/ProjectWizard.vue index 0d2d26a..ed9ebbd 100644 --- a/apps/ops/src/components/shared/ProjectWizard.vue +++ b/apps/ops/src/components/shared/ProjectWizard.vue @@ -488,6 +488,42 @@ {{ referralError }} + +
+ +
+
Installation
+
Financée sur {{ maxContractMonths }} mois, créditée chaque mois — 0 $ net pour le client tant qu'abonné
+
+
+ +
+
+
+
+ + + +
+
+ +
+
+
+ {{ Number(installRegular).toFixed(2) }}$ + {{ Number(installFee).toFixed(2) }}$ +
+
+{{ (Number(installFee) / (maxContractMonths || 24)).toFixed(2) }}$/mois · crédité → 0$
+
+
+ @@ -1697,6 +1733,7 @@ const { publish } = useWizardPublish({ acceptanceSentVia, publishedJobCount, sendTo, sendChannel, publishedContractName, + installFee, installRegular, cancel () { cancel() }, }, }) @@ -1900,6 +1937,17 @@ const referralApplied = ref(false) const referralChecking = ref(false) const referralError = ref('') +// Installation financée (CRTC-compliant) — alimente install_fee / install_regular du contrat. +const installRegular = ref(0) // prix de référence barré (marketing) +const installFee = ref(0) // montant réellement financé/dû (créance) +const INSTALL_PRESETS = [ + { key: 'standard', label: 'Standard', regular: 360, fee: 240 }, + { key: 'simple', label: 'Simple', regular: 180, fee: 120 }, + { key: 'none', label: 'Aucune', regular: 0, fee: 0 }, +] +function setInstallPreset (p) { installRegular.value = p.regular; installFee.value = p.fee } +function isInstallPreset (p) { return Number(installFee.value) === p.fee && Number(installRegular.value) === p.regular } + async function applyReferralCode () { const code = referralCode.value.trim().toUpperCase() if (!code) return diff --git a/apps/ops/src/composables/useWizardPublish.js b/apps/ops/src/composables/useWizardPublish.js index 3699b72..f0ac2b3 100644 --- a/apps/ops/src/composables/useWizardPublish.js +++ b/apps/ops/src/composables/useWizardPublish.js @@ -13,6 +13,7 @@ export function useWizardPublish ({ props, emit, state }) { acceptanceSentVia, publishedJobCount, sendTo, sendChannel, publishedContractName, + installFee, installRegular, } = state async function resolveAddress () { @@ -265,6 +266,8 @@ export function useWizardPublish ({ props, emit, state }) { duration_months: durationMonths, monthly_rate: monthlyRate, monthly_regular: monthlyRegular > monthlyRate ? monthlyRegular : 0, + install_fee: installFee?.value || 0, + install_regular: (installRegular?.value || 0) > (installFee?.value || 0) ? installRegular.value : 0, service_location: serviceLocation, quotation: orderDocName, start_date: today,