This commit is contained in:
grey-cat-1908 2024-08-27 13:08:38 +03:00
parent f5680504ac
commit c456558baf
2 changed files with 1 additions and 12 deletions

View file

@ -1,8 +0,0 @@
import { ref } from 'vue'
import { defineStore } from 'pinia'
export const useFormViewStore = defineStore('formView', () => {
const error = ref('');
return { error }
})

View file

@ -9,7 +9,6 @@ import { useRoute } from 'vue-router'
import { PhInfo, PhCardsThree } from '@phosphor-icons/vue' import { PhInfo, PhCardsThree } from '@phosphor-icons/vue'
import { validateSNILS, validateTIN } from '@/utils/validators' import { validateSNILS, validateTIN } from '@/utils/validators'
import { useFormViewStore } from '@/stores/formView'
const route = useRoute() const route = useRoute()
@ -21,8 +20,6 @@ const answers = ref([])
const isFormNotFound = ref(true) const isFormNotFound = ref(true)
const isSent = ref(false) const isSent = ref(false)
const formViewStore = useFormViewStore;
async function prepareNewPage() { async function prepareNewPage() {
currentPage.value = data.value.pages[currentPageNumber.value] currentPage.value = data.value.pages[currentPageNumber.value]
currentPage.value.questions.forEach((q) => { currentPage.value.questions.forEach((q) => {
@ -100,7 +97,7 @@ onMounted(async () => {
<div v-else class="view-form"> <div v-else class="view-form">
<div class="view-form-title view-form-container default-card"> <div class="view-form-title view-form-container default-card">
<div class="view-form-info"> <div class="view-form-info">
<PhCardsThree :size="23" class="view-form-info--sign" :class="{ 'form-red': formViewStore.error }" /> <PhCardsThree :size="23" class="view-form-info--sign" />
<div class="view-form-info--text">Страница {{ currentPageNumber + 1 }} из {{ data.pages.length }}</div> <div class="view-form-info--text">Страница {{ currentPageNumber + 1 }} из {{ data.pages.length }}</div>
</div> </div>
<h2 class="form-title">{{ data.name }}</h2> <h2 class="form-title">{{ data.name }}</h2>