dev #84

Merged
ksenia_mikhailova merged 141 commits from dev into main 2024-10-03 15:30:24 +03:00
1 changed files with 10 additions and 7 deletions
Showing only changes of commit 70c34906e3 - Show all commits

View File

@ -109,7 +109,10 @@ const changeParametres = () => {
}
const calc_full_section = () => (full_sections * length) + (full_sections * fence_length) + fence_length
let total_length_calc = calc_full_section()
if (Math.round(total_length_mm - total_length_calc) > 0 && Math.round(total_length_mm - total_length_calc) <= fence_length) {
if (
Math.round(total_length_mm - total_length_calc) > 0
&& Math.round(total_length_mm - total_length_calc) <= fence_length
) {
full_sections -= 1
total_length_calc = calc_full_section()
}
@ -183,7 +186,6 @@ const calc_table = computed(() => {
</script>
<template>
<div class="form">
<div class="form-group">
<div class="form-row form-row_picker">
<label for="lamelle_color">Цвет ламелей</label>
@ -256,7 +258,12 @@ const calc_table = computed(() => {
</div>
<div class="form-group">
<template v-if="(form_state.total_length * 1000) >= parametric.length.min">
<p v-if="form_state.total_length * 1000 < (parametric.length.min) || form_state.full_sections == 0"
class="text-ioprim text-sm">
Выбранный размер забора слишком мал для расчета стоимости. Пожалуйста, выберите больший
размер, чтобы продолжить.
</p>
<template v-else>
<div class="grid calc_table w-full">
<div class="grid grid-cols-4 relative">
<template v-for="item in calc_table">
@ -269,10 +276,6 @@ const calc_table = computed(() => {
<button @click.prevent="toggleModal">Рассчитать</button>
</div>
</template>
<p v-if="form_state.total_length_mm < parametric.length.min" class="text-ioprim text-sm">
Выбранный размер забора слишком мал для расчета стоимости. Пожалуйста, выберите больший
размер, чтобы продолжить.
</p>
</div>
</div>
</template>