mirror of
https://github.com/grey-cat-1908/formaptix-web.git
synced 2024-11-11 18:47:27 +03:00
fixes
This commit is contained in:
parent
f5680504ac
commit
c456558baf
2 changed files with 1 additions and 12 deletions
|
@ -1,8 +0,0 @@
|
||||||
import { ref } from 'vue'
|
|
||||||
import { defineStore } from 'pinia'
|
|
||||||
|
|
||||||
export const useFormViewStore = defineStore('formView', () => {
|
|
||||||
const error = ref('');
|
|
||||||
|
|
||||||
return { error }
|
|
||||||
})
|
|
|
@ -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>
|
||||||
|
|
Loading…
Reference in a new issue