From 02549e1993cf5c33b84cfb6f8108a61da487d1e7 Mon Sep 17 00:00:00 2001 From: Kseninia Mikhaylova Date: Tue, 24 Sep 2024 11:54:30 +0300 Subject: [PATCH 1/2] calc --- assets/main.scss | 2 +- components/calcValues.vue | 57 ++++++++++++++++++++++----------------- 2 files changed, 34 insertions(+), 25 deletions(-) diff --git a/assets/main.scss b/assets/main.scss index 695e581..23f3939 100644 --- a/assets/main.scss +++ b/assets/main.scss @@ -281,7 +281,7 @@ label { } input { - @apply bg-white border border-gray-300 text-gray-900 text-lg p-2.5 rounded focus:ring-blue-500 focus:border-blue-500 focus-visible:border-blue-500 disabled:cursor-not-allowed disabled:text-black disabled:bg-neutral-300; + @apply bg-white border border-gray-300 text-gray-900 text-lg p-2.5 rounded focus:ring-blue-500 focus:border-blue-500 focus-visible:border-blue-500 disabled:cursor-not-allowed disabled:text-black } input[type=checkbox] { diff --git a/components/calcValues.vue b/components/calcValues.vue index 390a84f..a96ad4c 100644 --- a/components/calcValues.vue +++ b/components/calcValues.vue @@ -148,6 +148,28 @@ const goal = (target: string, params: object) => { (nuxtApp.$metrika as any).reachGoal(target, params || {}) } } +const show_extra = ref(false) +const calc_table = computed(() => { + return [ + { + name: 'Секции', + value: section_count, + extra: 1, + extra_name: 'Дополнительная секция' + }, + { + name: + `Ламели, RAL ${lamelle_color.value}, ${getColorNameFromRal(lamelle_color.value)?.toLowerCase()}`, + value: section_count.value * lamelles_count.value, + extra: 1 * lamelles_count.value + }, + { + name: `Столбы, RAL ${pillar_color.value}, ${getColorNameFromRal(pillar_color.value)?.toLowerCase()}`, + value: !form_state.remove_pillar ? section_count.value + ~~(!!form_state.extra_section) + 1 : `—`, + extra: `—` + }, + ] +})