From c63b1a471f5212c40af99d24c387ae2e2d52d3cd Mon Sep 17 00:00:00 2001 From: Kseninia Mikhaylova Date: Tue, 18 Jun 2024 16:05:34 +0300 Subject: [PATCH] calc --- components/modal.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/modal.vue b/components/modal.vue index 890f9e7..994aa1e 100644 --- a/components/modal.vue +++ b/components/modal.vue @@ -15,6 +15,7 @@ const lamelle_color = useState('lamelle_color') const section_count = useState('section_count') const extra_section = useState('extra_section') const total_length = useState('total_length') +const remove_pillar = useState('remove_pillar') const toggleModal = () => { modal_data.phone = undefined @@ -106,11 +107,11 @@ const total = computed(() => { const guides_count = section_count.value const guides = guides_count * parseFloat(guide) * lam_count * 115 return [ - `Столб, ${pillar_count}: (${parseFloat(mortgage)} + ${parseFloat(pillar)}) x ${pillar_count} = ${roubleSign.format(pil)}`, + !remove_pillar.value && `Столб, ${pillar_count}: (${parseFloat(mortgage)} + ${parseFloat(pillar)}) x ${pillar_count} = ${roubleSign.format(pil)}`, `Ламели, ${lam_count}: (${lam_count} x ${length} x ${lamella}) + ${rivets} = ${roubleSign.format(lam)}`, `Направляющая, ${guides_count}: ${guides_count} x ${guide} x ${lam_count} x 115 = ${roubleSign.format(guides)}`, `Верхняя планка, ${top_count}: ${top_count} x ${length} x ${bar} = ${roubleSign.format(top)}`, - ] + ].filter(Boolean) })