From c95759f30270b3f418769dde10ed28dd45500bf9 Mon Sep 17 00:00:00 2001 From: joan Date: Thu, 26 Jan 2023 14:56:17 +0100 Subject: [PATCH] Updated summary with computed data --- .prettierrc.js | 2 +- src/components/ui/CardSummary.vue | 5 + src/pages/Customer/Card/CustomerSummary.vue | 263 ++++++++++++++++---- 3 files changed, 214 insertions(+), 56 deletions(-) diff --git a/.prettierrc.js b/.prettierrc.js index 7f8297442..eaeeaa5eb 100644 --- a/.prettierrc.js +++ b/.prettierrc.js @@ -1,6 +1,6 @@ module.exports = { singleQuote: true, - printWidth: 120, + printWidth: 90, tabWidth: 4, semi: true, endOfLine: 'auto', diff --git a/src/components/ui/CardSummary.vue b/src/components/ui/CardSummary.vue index 262d9c9be..a5659fea9 100644 --- a/src/components/ui/CardSummary.vue +++ b/src/components/ui/CardSummary.vue @@ -15,6 +15,11 @@ onMounted(() => fetch()); const entity = ref(); const entityId = toRef(props, 'id'); +defineExpose({ + entity, + fetch, +}); + async function fetch() { const id = entityId.value; const { data } = await axios.get(`Clients/${id}/summary`); diff --git a/src/pages/Customer/Card/CustomerSummary.vue b/src/pages/Customer/Card/CustomerSummary.vue index ca21504b4..27d104092 100644 --- a/src/pages/Customer/Card/CustomerSummary.vue +++ b/src/pages/Customer/Card/CustomerSummary.vue @@ -1,5 +1,5 @@