ลบ component สมัครที่ไม่ใช้
This commit is contained in:
parent
abe8e9186c
commit
98738aa814
14 changed files with 20 additions and 697 deletions
|
|
@ -5,86 +5,43 @@
|
|||
:prefixOptions="prefixOptions"
|
||||
:relationshipOptions="relationshipOptions"
|
||||
:provinceOptions="provinceOptions"
|
||||
v-model:statusEdit="statusEdit"
|
||||
:notiNoEdit="notiNoEdit"
|
||||
:status="status"
|
||||
:btnSave="btnSave"
|
||||
v-model:form="formInformation"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<q-separator class="q-my-lg bg-gray" size="5px" />
|
||||
<div class="q-px-sm">
|
||||
<Address
|
||||
:provinceOptions="provinceOptions"
|
||||
v-model:statusEdit="statusEdit"
|
||||
:notiNoEdit="notiNoEdit"
|
||||
:status="status"
|
||||
:btnSave="btnSave"
|
||||
v-model:form="formAddress"
|
||||
/>
|
||||
<Address :provinceOptions="provinceOptions" :status="status" v-model:form="formAddress" />
|
||||
</div>
|
||||
|
||||
<q-separator class="q-my-lg bg-gray" size="5px" />
|
||||
<div class="q-px-sm">
|
||||
<Family
|
||||
:prefixOptions="prefixOptions"
|
||||
v-model:statusEdit="statusEdit"
|
||||
:notiNoEdit="notiNoEdit"
|
||||
:status="status"
|
||||
:btnSave="btnSave"
|
||||
v-model:form="formFamily"
|
||||
/>
|
||||
<Family :prefixOptions="prefixOptions" :status="status" v-model:form="formFamily" />
|
||||
</div>
|
||||
|
||||
<q-separator class="q-my-lg bg-gray" size="5px" />
|
||||
<div class="q-px-sm">
|
||||
<Occupation
|
||||
v-model:statusEdit="statusEdit"
|
||||
:notiNoEdit="notiNoEdit"
|
||||
:status="status"
|
||||
:btnSave="btnSave"
|
||||
v-model:form="formOccupation"
|
||||
/>
|
||||
<Occupation :status="status" v-model:form="formOccupation" />
|
||||
</div>
|
||||
|
||||
<q-separator class="q-my-lg bg-gray" size="5px" />
|
||||
<div class="q-px-sm">
|
||||
<Education
|
||||
:loader="loader"
|
||||
v-model:statusEdit="statusEdit"
|
||||
:notiNoEdit="notiNoEdit"
|
||||
:status="status"
|
||||
:btnSave="btnSave"
|
||||
/>
|
||||
<Education :status="status" />
|
||||
</div>
|
||||
|
||||
<q-separator class="q-my-lg bg-gray" size="5px" />
|
||||
<div class="q-px-sm">
|
||||
<Career
|
||||
:loader="loader"
|
||||
v-model:statusEdit="statusEdit"
|
||||
:notiNoEdit="notiNoEdit"
|
||||
:status="status"
|
||||
:btnSave="btnSave"
|
||||
/>
|
||||
<Career :status="status" />
|
||||
</div>
|
||||
|
||||
<q-separator class="q-my-lg bg-gray" size="5px" />
|
||||
<div class="q-px-sm">
|
||||
<Document
|
||||
:loader="loader"
|
||||
v-model:statusEdit="statusEdit"
|
||||
:notiNoEdit="notiNoEdit"
|
||||
:status="status"
|
||||
:btnSave="btnSave"
|
||||
/>
|
||||
<Document :status="status" />
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, watch } from 'vue'
|
||||
import { QForm, useQuasar } from 'quasar'
|
||||
import { useCounterMixin } from '@/stores/mixin'
|
||||
import http from '@/plugins/http'
|
||||
import config from '@/app.config'
|
||||
import type { DataOption } from '@/modules/01_exam/interface/index/Main'
|
||||
|
|
@ -97,23 +54,10 @@ import Career from '@/modules/01_exam/components/Form/Career.vue'
|
|||
import Document from '@/modules/01_exam/components/Form/Document.vue'
|
||||
|
||||
const props = defineProps({
|
||||
loader: {
|
||||
//หน้า main มีการอัพเดทค่าให้ refresh data
|
||||
type: Boolean,
|
||||
required: true
|
||||
},
|
||||
statusEdit: {
|
||||
type: Boolean,
|
||||
required: true
|
||||
},
|
||||
status: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
btnSave: {
|
||||
type: Boolean,
|
||||
required: true
|
||||
},
|
||||
formInformation: {
|
||||
type: Object,
|
||||
required: true
|
||||
|
|
@ -132,11 +76,7 @@ const props = defineProps({
|
|||
}
|
||||
})
|
||||
|
||||
const $q = useQuasar()
|
||||
const mixin = useCounterMixin() //เรียกฟังก์ชันกลาง
|
||||
const { modalError } = mixin
|
||||
const loader = ref<boolean>(true)
|
||||
const statusEdit = ref<boolean>(false)
|
||||
const prefixOptions = ref<DataOption[]>([])
|
||||
const relationshipOptions = ref<DataOption[]>([])
|
||||
const provinceOptions = ref<DataOption[]>([])
|
||||
|
|
@ -146,18 +86,12 @@ const formFamily = ref<any>({})
|
|||
const formOccupation = ref<any>({})
|
||||
|
||||
const emit = defineEmits([
|
||||
'update:loader',
|
||||
'update:statusEdit',
|
||||
'update:formInformation',
|
||||
'update:formAddress',
|
||||
'update:formFamily',
|
||||
'update:formOccupation'
|
||||
])
|
||||
|
||||
watch(statusEdit, (count: boolean, prevCount: boolean) => {
|
||||
emit('update:statusEdit', count)
|
||||
})
|
||||
|
||||
watch(formInformation, async (count: Object, prevCount: Object) => {
|
||||
emit('update:formInformation', count)
|
||||
})
|
||||
|
|
@ -233,8 +167,4 @@ const fetchProvince = async () => {
|
|||
loader.value = false
|
||||
})
|
||||
}
|
||||
|
||||
const notiNoEdit = () => {
|
||||
modalError($q, 'ไม่สามารถไม่สามารถแก้ไขข้อมูลได้', 'มีข้อมูลที่ยังไม่ถูกบันทึกข้อมูล')
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue