จัดโค้ดวินัย

This commit is contained in:
setthawutttty 2023-12-25 16:31:24 +07:00
parent 71d3b54ef0
commit 7262000680
37 changed files with 492 additions and 697 deletions

View file

@ -1,6 +1,6 @@
import { defineStore } from "pinia";
import { ref } from 'vue'
import type { listData, dataType ,DataOption} from '@/modules/11_discipline/interface/response/suspend'
import type { listData, dataType, DataOption } from '@/modules/11_discipline/interface/response/suspend'
import type { QTableProps } from "quasar";
import { useCounterMixin } from "@/stores/mixin";
@ -13,7 +13,7 @@ export const useDisciplineSuspendStore = defineStore(
const mixin = useCounterMixin()
const { date2Thai } = mixin
const offenseDetailsOps = ref<DataOption[]>([
{ id: "NOT_SPECIFIED", name: "ยังไม่ระบุ" },
{ id: "NOT_DEADLY", name: "ไม่ร้ายแรง" },
@ -22,7 +22,7 @@ export const useDisciplineSuspendStore = defineStore(
function getData(data: listData[]) {
console.log(data)
const dataList: dataType[] = data.map((item: listData) => ({
const dataList: dataType[] = data.map((item: listData) => ({
id: item.id,
citizenId: item.citizenId,
name: `${item.prefix}${item.firstName} ${item.lastName}`,
@ -37,7 +37,7 @@ export const useDisciplineSuspendStore = defineStore(
status: statusTothai(item.status),
statusEn: item.status,
descriptionSuspend: item.descriptionSuspend,
dateTotal:item.startDateSuspend && item.endDateSuspend ? `${date2Thai(item.startDateSuspend)} - ${date2Thai(item.endDateSuspend)}`:'-',
dateTotal: item.startDateSuspend && item.endDateSuspend ? `${date2Thai(item.startDateSuspend)} - ${date2Thai(item.endDateSuspend)}` : '-',
startDateSuspend: item.startDateSuspend,
endDateSuspend: item.endDateSuspend,
title: item.title,
@ -63,7 +63,7 @@ export const useDisciplineSuspendStore = defineStore(
return "ส่งรายชื่อไปออกคำสั่ง";
case "DONE":
return "ออกคำสั่งเสร็จแล้ว";
default:
return "-";
}