แก้คำผิด และปิด column คำอธิบายของรอบการปฏิบัติงาน
This commit is contained in:
parent
d2a50125a5
commit
1c4776c68e
4 changed files with 41 additions and 52 deletions
|
|
@ -10,7 +10,6 @@ interface dataRowRound {
|
|||
amOut: string
|
||||
pm: string
|
||||
pmOut: string
|
||||
note: string
|
||||
status: boolean
|
||||
isDefault: boolean
|
||||
}
|
||||
|
|
@ -22,7 +21,6 @@ interface roundShow {
|
|||
pmOut: string;
|
||||
amRound: string;
|
||||
pmRound: string;
|
||||
note: string;
|
||||
status: boolean;
|
||||
isDefault: boolean;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,15 +45,6 @@ export const useRoundDataStore = defineStore(
|
|||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "note",
|
||||
align: "left",
|
||||
label: "คำอธิบาย",
|
||||
sortable: true,
|
||||
field: "note",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "status",
|
||||
align: "center",
|
||||
|
|
@ -77,7 +68,6 @@ export const useRoundDataStore = defineStore(
|
|||
pmOut: e.pmOut,
|
||||
amRound:`${e.am}-${e.amOut}`,
|
||||
pmRound:`${e.pm}-${e.pmOut}`,
|
||||
note: e.note === '' ? '-':e.note,
|
||||
status: e.status,
|
||||
isDefault: e.isDefault,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ function changTab() {
|
|||
<q-tab
|
||||
@click="changTab"
|
||||
name="1"
|
||||
label="รายการลาที่อยู่ระหว่างดำเนิดการ"
|
||||
label="รายการลาที่อยู่ระหว่างดำเนินการ"
|
||||
>
|
||||
<q-badge
|
||||
color="grey-4"
|
||||
|
|
|
|||
|
|
@ -3,15 +3,15 @@ import { ref, useAttrs, onMounted } from "vue";
|
|||
|
||||
import router from "@/router";
|
||||
import { useQuasar } from "quasar";
|
||||
import DialogForm from '@/modules/09_leave/components/3_WorkTime/DialogForm.vue'
|
||||
import { useRoundDataStore } from '@/modules/09_leave/stores/RoundStores'
|
||||
import DialogForm from "@/modules/09_leave/components/3_WorkTime/DialogForm.vue";
|
||||
import { useRoundDataStore } from "@/modules/09_leave/stores/RoundStores";
|
||||
const dataStore = useRoundDataStore();
|
||||
const { fetchData } = dataStore;
|
||||
|
||||
const $q = useQuasar(); //ใช้ noti quasar
|
||||
const modal = ref<boolean>(false)
|
||||
const detailData = ref<any>()
|
||||
const editCheck = ref<string>('')
|
||||
const modal = ref<boolean>(false);
|
||||
const detailData = ref<any>();
|
||||
const editCheck = ref<string>("");
|
||||
// ค้นหาในตาราง
|
||||
const filterKeyword = ref<string>("");
|
||||
const filterRef = ref<HTMLInputElement | null>(null);
|
||||
|
|
@ -35,17 +35,17 @@ const paginationLabel = (start: string, end: string, total: string) => {
|
|||
else return start + "-" + end + " ใน " + total;
|
||||
};
|
||||
|
||||
function openModal(data:any,check:string){
|
||||
modal.value = true
|
||||
editCheck.value = check
|
||||
if(check === 'edit'){
|
||||
detailData.value = data
|
||||
}
|
||||
};
|
||||
function openModal(data: any, check: string) {
|
||||
modal.value = true;
|
||||
editCheck.value = check;
|
||||
if (check === "edit") {
|
||||
detailData.value = data;
|
||||
}
|
||||
}
|
||||
|
||||
function closeDialog(){
|
||||
modal.value = false
|
||||
editCheck.value = 'add'
|
||||
function closeDialog() {
|
||||
modal.value = false;
|
||||
editCheck.value = "add";
|
||||
}
|
||||
onMounted(() => {
|
||||
dataStore.fetchData([
|
||||
|
|
@ -54,36 +54,32 @@ onMounted(() => {
|
|||
amOut: "12:00",
|
||||
pm: "13:00",
|
||||
pmOut: "15:30",
|
||||
note: "",
|
||||
status: true,
|
||||
isDefault:true
|
||||
isDefault: true,
|
||||
},
|
||||
{
|
||||
am: "08:30",
|
||||
amOut: "12:00",
|
||||
pm: "13:00",
|
||||
pmOut: "15:30",
|
||||
note: "",
|
||||
status: false,
|
||||
isDefault:false
|
||||
isDefault: false,
|
||||
},
|
||||
{
|
||||
am: "09:30",
|
||||
amOut: "12:00",
|
||||
pm: "13:00",
|
||||
pmOut: "15:30",
|
||||
note: "",
|
||||
status: true,
|
||||
isDefault:false
|
||||
isDefault: false,
|
||||
},
|
||||
{
|
||||
am: "10:30",
|
||||
amOut: "12:00",
|
||||
pm: "13:00",
|
||||
pmOut: "15:30",
|
||||
note: "",
|
||||
status: true,
|
||||
isDefault:false
|
||||
isDefault: false,
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
|
@ -97,7 +93,7 @@ onMounted(() => {
|
|||
<div>
|
||||
<q-btn
|
||||
for="#addInvestigatefacts"
|
||||
@click="openModal(null,'add')"
|
||||
@click="openModal(null, 'add')"
|
||||
size="12px"
|
||||
flat
|
||||
round
|
||||
|
|
@ -172,9 +168,9 @@ onMounted(() => {
|
|||
v-for="col in props.cols"
|
||||
:key="col.name"
|
||||
:props="props"
|
||||
style="color: #000000; font-weight: 500;"
|
||||
style="color: #000000; font-weight: 500"
|
||||
>
|
||||
<span class="text-weight-medium ">{{ col.label }}</span>
|
||||
<span class="text-weight-medium">{{ col.label }}</span>
|
||||
</q-th>
|
||||
</q-tr>
|
||||
</template>
|
||||
|
|
@ -182,15 +178,20 @@ onMounted(() => {
|
|||
<q-tr :props="props" class="cursor-pointer">
|
||||
<q-td auto-width>
|
||||
<q-icon
|
||||
v-if="props.row.isDefault === true"
|
||||
name="mdi-bookmark"
|
||||
size="xs"
|
||||
color="primary"
|
||||
>
|
||||
<q-tooltip>เวลา Default</q-tooltip>
|
||||
v-if="props.row.isDefault === true"
|
||||
name="mdi-bookmark"
|
||||
size="xs"
|
||||
color="primary"
|
||||
>
|
||||
<q-tooltip>เวลา Default</q-tooltip>
|
||||
</q-icon>
|
||||
</q-td>
|
||||
<q-td v-for="col in props.cols" :key="col.name" :props="props" @click.prevent="openModal(props.row,'edit')">
|
||||
<q-td
|
||||
v-for="col in props.cols"
|
||||
:key="col.name"
|
||||
:props="props"
|
||||
@click.prevent="openModal(props.row, 'edit')"
|
||||
>
|
||||
<div v-if="col.name === 'status'" class="text-center">
|
||||
<q-icon
|
||||
v-if="props.row.status === true"
|
||||
|
|
@ -214,12 +215,12 @@ onMounted(() => {
|
|||
</d-table>
|
||||
</div>
|
||||
</q-card>
|
||||
<DialogForm
|
||||
:modal="modal"
|
||||
:closeDialog="closeDialog"
|
||||
:editCheck="editCheck"
|
||||
:detailData="detailData"
|
||||
/>
|
||||
<DialogForm
|
||||
:modal="modal"
|
||||
:closeDialog="closeDialog"
|
||||
:editCheck="editCheck"
|
||||
:detailData="detailData"
|
||||
/>
|
||||
</template>
|
||||
<style scoped lang="scss">
|
||||
.q-table tbody td:before.no-background {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue