From 8714be1fa77ea4432489770271becff971f3bf6d Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Wed, 3 Jul 2024 23:04:19 +0200 Subject: [PATCH] feat: define new CustomerDescriptorMenu action. Pending reactivity --- .../Customer/Card/CustomerDescriptorMenu.vue | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/pages/Customer/Card/CustomerDescriptorMenu.vue b/src/pages/Customer/Card/CustomerDescriptorMenu.vue index 560ee51c8..bb8e15fff 100644 --- a/src/pages/Customer/Card/CustomerDescriptorMenu.vue +++ b/src/pages/Customer/Card/CustomerDescriptorMenu.vue @@ -40,6 +40,16 @@ const sendSms = async (payload) => { notify(error.message, 'positive'); } }; +const updateSubstitutionAllowed = async () => { + try { + await axios.patch(`Clients/${route.params.id}`, { + substitutionAllowed: !$props.customer.substitutionAllowed, + }); + notify('globals.notificationSent', 'positive'); + } catch (error) { + notify(error.message, 'positive'); + } +};