hide bottom space rule
This commit is contained in:
parent
3c12d849f6
commit
a95c2fcbb4
10 changed files with 469 additions and 494 deletions
|
|
@ -61,7 +61,6 @@
|
|||
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||
<q-select
|
||||
:class="getClass(edit)"
|
||||
hide-bottom-space
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
|
|
@ -81,7 +80,6 @@
|
|||
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
hide-bottom-space
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
|
|
@ -97,7 +95,6 @@
|
|||
<q-input
|
||||
type="number"
|
||||
:class="getClass(edit)"
|
||||
hide-bottom-space
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
|
|
@ -112,7 +109,6 @@
|
|||
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
hide-bottom-space
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
|
|
@ -144,7 +140,6 @@
|
|||
<q-input
|
||||
:class="getClass(edit)"
|
||||
class="datepicker"
|
||||
hide-bottom-space
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
|
|
@ -178,11 +173,11 @@
|
|||
</q-form>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
<q-dialog :model-value="modalConsend" persistent>
|
||||
<!-- <q-dialog :model-value="modalConsend" persistent>
|
||||
<q-card style="min-width: 800px">
|
||||
<Conference :ok="consendOk" :close="consenClose" />
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
</q-dialog> -->
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref, watch } from 'vue'
|
||||
|
|
@ -234,7 +229,7 @@ const scores = ref<number | null>()
|
|||
const name = ref<string>()
|
||||
const duration = ref<[Date, Date]>([new Date(), new Date()])
|
||||
const myForm = ref<any>() //form data input
|
||||
const edit = ref<boolean>(false) //เช็คการกดปุ่มแก้ไขใน dialog
|
||||
const edit = ref<boolean>(true) //เช็คการกดปุ่มแก้ไขใน dialog
|
||||
const modal = ref<boolean>(false) //modal add detail
|
||||
const modalEdit = ref<boolean>(false) //modal ที่แสดงใช้สำหรับแก้ไขหรือไม่
|
||||
const rawItem = ref<RequestItemsObject>() //ข้อมูลเดิมที่เลือกใน row นั้น
|
||||
|
|
@ -244,7 +239,7 @@ const next = ref<boolean>() //แสดงปุ่มดูข้อมูล
|
|||
const editRow = ref<boolean>(false) //เช็คมีการแก้ไขข้อมูล
|
||||
const statusCode = ref<number>()
|
||||
const checkValidate = ref<boolean>(false) //validate data ผ่านหรือไม่
|
||||
const modalConsend = ref<boolean>(false)
|
||||
// const modalConsend = ref<boolean>(false)
|
||||
const rows = ref<RequestItemsObject[]>([])
|
||||
const candidateId = ref<string>('2223ba53-2fb2-470b-8dc1-27e5471b0331')
|
||||
const filter = ref<string>('') //search data table
|
||||
|
|
@ -413,7 +408,7 @@ const checkRowPage = () => {
|
|||
* กดปุ่มแก้ไขใน dialog
|
||||
*/
|
||||
const clickEdit = () => {
|
||||
edit.value = true
|
||||
// edit.value = true
|
||||
next.value = false
|
||||
previous.value = false
|
||||
}
|
||||
|
|
@ -450,11 +445,11 @@ const clickDeleteRow = async () => {
|
|||
.finally(async () => {
|
||||
loader.value = false
|
||||
await fetchData()
|
||||
edit.value = false
|
||||
// edit.value = false
|
||||
})
|
||||
} else {
|
||||
await fetchData()
|
||||
edit.value = false
|
||||
// edit.value = false
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -464,15 +459,15 @@ const clickDeleteRow = async () => {
|
|||
const clickSave = async () => {
|
||||
myForm.value.validate().then(async (result: boolean) => {
|
||||
if (result) {
|
||||
if (store.consend == true) {
|
||||
if (modalEdit.value) {
|
||||
await editData()
|
||||
} else {
|
||||
await saveData()
|
||||
}
|
||||
// if (store.consend == true) {
|
||||
if (modalEdit.value) {
|
||||
await editData()
|
||||
} else {
|
||||
modalConsend.value = true
|
||||
await saveData()
|
||||
}
|
||||
// } else {
|
||||
// modalConsend.value = true
|
||||
// }
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
@ -502,7 +497,7 @@ const saveData = async () => {
|
|||
})
|
||||
.finally(async () => {
|
||||
loader.value = false
|
||||
edit.value = false
|
||||
// edit.value = false
|
||||
modal.value = false
|
||||
await fetchData()
|
||||
})
|
||||
|
|
@ -533,7 +528,7 @@ const editData = async () => {
|
|||
})
|
||||
.finally(async () => {
|
||||
loader.value = false
|
||||
edit.value = false
|
||||
// edit.value = false
|
||||
modal.value = false
|
||||
await fetchData()
|
||||
})
|
||||
|
|
@ -575,12 +570,12 @@ const selectData = (props: DataProps) => {
|
|||
name.value = props.row.name
|
||||
duration.value = props.row.duration
|
||||
id.value = props.row.id
|
||||
if (edit.value == true) {
|
||||
next.value = false
|
||||
previous.value = false
|
||||
} else {
|
||||
checkRowPage()
|
||||
}
|
||||
// if (edit.value == true) {
|
||||
next.value = false
|
||||
previous.value = false
|
||||
// } else {
|
||||
// checkRowPage()
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -597,21 +592,21 @@ const addRow = () => {
|
|||
duration.value = [new Date(), new Date()]
|
||||
}
|
||||
|
||||
const consenClose = () => {
|
||||
modalConsend.value = false
|
||||
}
|
||||
// const consenClose = () => {
|
||||
// modalConsend.value = false
|
||||
// }
|
||||
|
||||
const consendOk = () => {
|
||||
modalConsend.value = false
|
||||
store.consend = true
|
||||
clickSave()
|
||||
}
|
||||
// const consendOk = () => {
|
||||
// modalConsend.value = false
|
||||
// store.consend = true
|
||||
// clickSave()
|
||||
// }
|
||||
|
||||
/**
|
||||
* ฟังก์ชันปุ่มยกเลิกการแก้ไขข้อมูล
|
||||
*/
|
||||
const clickCancel = async () => {
|
||||
edit.value = false
|
||||
// edit.value = false
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue