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