แก้ popup รายการรอบการปฏิบัติงาน

This commit is contained in:
setthawutttty 2023-10-31 16:21:04 +07:00
parent 37a39c6037
commit d10c919b2d
4 changed files with 40 additions and 27 deletions

View file

@ -1,6 +1,6 @@
import { defineStore } from "pinia";
import { ref } from "vue";
import type { dataRowRound } from "@/modules/09_leave/interface/response/round.ts";
import type { dataRowRound,roundShow } from "@/modules/09_leave/interface/response/round.ts";
import type { QTableProps } from "quasar";
// store ลา >> รอบการปฏิบัติงาน
@ -10,10 +10,8 @@ export const useRoundDataStore = defineStore(
//ค้นหา คอลัมน์ คอลัมน์ที่แสดง
const visibleColumns = ref<string[]>([
"round",
"am",
"amOut",
"pm",
"pmOut",
"amRound",
"pmRound",
"note",
"status"
]);
@ -30,20 +28,20 @@ export const useRoundDataStore = defineStore(
style: "font-size: 14px",
},
{
name: "am",
name: "amRound",
align: "left",
label: "ช่วงเช้า",
sortable: true,
field: "am",
field: "amRound",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "pm",
name: "pmRound",
align: "left",
label: "ช่วงบ่าย",
sortable: true,
field: "pm",
field: "pmRound",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
@ -70,11 +68,15 @@ export const useRoundDataStore = defineStore(
// ข้อมูลในตาราง
const rows = ref<dataRowRound[]>([]);
function fetchData(data: dataRowRound[]) {
let datalist: dataRowRound[] = data.map((e: dataRowRound) => {
let datalist: roundShow[] = data.map((e: dataRowRound) => {
return {
round:`${e.am}-${e.pmOut}`,
am: `${e.am}-${e.amOut}`,
pm: `${e.pm}-${e.pmOut}`,
am: e.am,
amOut: e.amOut,
pm: e.pm,
pmOut: e.pmOut,
amRound:`${e.am}-${e.amOut}`,
pmRound:`${e.pm}-${e.pmOut}`,
note: e.note === '' ? '-':e.note,
status: e.status,
isDefault: e.isDefault,