แก้ไขการส่งค่าไปยังหน้ารายละเอียดของ การลา
This commit is contained in:
parent
36539b2274
commit
48eb9ebb6c
5 changed files with 21 additions and 5 deletions
|
|
@ -18,7 +18,7 @@ const paramsId = route.params.id;
|
|||
class="q-mr-sm"
|
||||
@click="router.push(`/leave-list`)"
|
||||
/>
|
||||
รายละเอียดการลาของ {{ paramsId }}
|
||||
รายละเอียดการลาของ นายปิยรมย์ ศิริธาราฟ
|
||||
</div>
|
||||
<div>
|
||||
<q-btn
|
||||
|
|
@ -56,7 +56,7 @@ const paramsId = route.params.id;
|
|||
</div>
|
||||
<div class="col-12 row">
|
||||
<div class="col-xs-5 col-sm-3 text-grey-8">ชื่อ - นามสกุล</div>
|
||||
<div class="col text-weight-medium">{{ paramsId }}</div>
|
||||
<div class="col text-weight-medium">นายปิยรมย์ ศิริธาราฟ</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-7 row">
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ const paginationLabel = (start: string, end: string, total: string) => {
|
|||
v-for="col in props.cols"
|
||||
:key="col.name"
|
||||
:props="props"
|
||||
@click.prevent="router.push(`/leave/detail/${props.row.name}`)"
|
||||
@click.prevent="router.push(`/leave/detail/${props.row.id}`)"
|
||||
>
|
||||
<div v-if="col.name == 'no'">
|
||||
{{ props.rowIndex + 1 }}
|
||||
|
|
|
|||
10
src/modules/09_leave/interface/request/leave.ts
Normal file
10
src/modules/09_leave/interface/request/leave.ts
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
interface ListsData {
|
||||
id: string;
|
||||
leaveType: string
|
||||
name: string
|
||||
Date: string
|
||||
status: string
|
||||
}
|
||||
export type {
|
||||
ListsData
|
||||
}
|
||||
|
|
@ -5,6 +5,7 @@ import { useCounterMixin } from "@/stores/mixin";
|
|||
import type { DataOption } from "@/modules/09_leave/interface/index/Main";
|
||||
import type { QTableProps } from "quasar";
|
||||
import type { DataRows } from "@/modules/09_leave/interface/response/leave";
|
||||
import type { ListsData } from "@/modules/09_leave/interface/request/leave";
|
||||
|
||||
const mixin = useCounterMixin();
|
||||
const { date2Thai, showLoader, hideLoader } = mixin;
|
||||
|
|
@ -18,8 +19,9 @@ export const useLeavelistDataStore = defineStore("leave", () => {
|
|||
const columns = ref<QTableProps["columns"]>([]);
|
||||
const visibleColumns = ref<string[]>([]);
|
||||
const loadTable = ref<boolean>(false);
|
||||
async function fetchList(data: DataRows[]) {
|
||||
let datalist = data.map((e: DataRows) => ({
|
||||
async function fetchList(data: ListsData[]) {
|
||||
let datalist = data.map((e: ListsData) => ({
|
||||
id: e.id,
|
||||
leaveType: e.leaveType,
|
||||
name: e.name,
|
||||
Date: date2Thai(e.Date),
|
||||
|
|
|
|||
|
|
@ -17,24 +17,28 @@ onMounted(() => {
|
|||
function fecthLeaveList() {
|
||||
const data = [
|
||||
{
|
||||
id: "00000000-0000-0000-0000-000000000000",
|
||||
leaveType: "ลาป่วย",
|
||||
name: "นายกัณฐิมา กาฬสินธ์ุ",
|
||||
Date: "2023-11-03",
|
||||
status: "NEW",
|
||||
},
|
||||
{
|
||||
id: "00000000-0000-0000-0000-000000000000",
|
||||
leaveType: "ลากิจส่วนตัว",
|
||||
name: "นายนครชัย วันดี",
|
||||
Date: "2023-11-01",
|
||||
status: "APPROVE",
|
||||
},
|
||||
{
|
||||
id: "00000000-0000-0000-0000-000000000000",
|
||||
leaveType: "ลากิจส่วนตัว",
|
||||
name: "นายกัณฐิมา กาฬสินธ์ุ",
|
||||
Date: "2023-11-02",
|
||||
status: "PENDING",
|
||||
},
|
||||
{
|
||||
id: "00000000-0000-0000-0000-000000000000",
|
||||
leaveType: "ลาป่วย",
|
||||
name: "นายปิยรมย์ ศิริธาราฟ",
|
||||
Date: "2023-11-01",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue