updated format code & eslint rule
This commit is contained in:
parent
67c6810def
commit
8a31554f38
102 changed files with 6271 additions and 6164 deletions
|
|
@ -1,8 +1,6 @@
|
|||
interface DataOption {
|
||||
id:string
|
||||
name:string
|
||||
id: string;
|
||||
name: string;
|
||||
}
|
||||
|
||||
export type {
|
||||
DataOption
|
||||
}
|
||||
export type { DataOption };
|
||||
|
|
|
|||
|
|
@ -1,14 +1,11 @@
|
|||
interface MyObjectAppealRef {
|
||||
type: object | null;
|
||||
title: object | null;
|
||||
description: object | null;
|
||||
caseType: object | null;
|
||||
caseNumber: object | null;
|
||||
type: object | null;
|
||||
title: object | null;
|
||||
description: object | null;
|
||||
caseType: object | null;
|
||||
caseNumber: object | null;
|
||||
|
||||
[key: string]: any;
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
|
||||
export type {
|
||||
MyObjectAppealRef
|
||||
}
|
||||
export type { MyObjectAppealRef };
|
||||
|
|
|
|||
|
|
@ -1,68 +1,71 @@
|
|||
interface FormType {
|
||||
status: string
|
||||
type: string
|
||||
year: number
|
||||
status: string;
|
||||
type: string;
|
||||
year: number;
|
||||
}
|
||||
|
||||
interface RowList {
|
||||
id: string
|
||||
title: string
|
||||
description: string
|
||||
status: string
|
||||
type: string
|
||||
year: number
|
||||
caseType: string
|
||||
caseNumber: string
|
||||
fullname: string
|
||||
citizenId: string
|
||||
profileId: string
|
||||
lastUpdatedAt: string | null
|
||||
id: string;
|
||||
title: string;
|
||||
description: string;
|
||||
status: string;
|
||||
type: string;
|
||||
year: number;
|
||||
caseType: string;
|
||||
caseNumber: string;
|
||||
fullname: string;
|
||||
citizenId: string;
|
||||
profileId: string;
|
||||
lastUpdatedAt: string | null;
|
||||
}
|
||||
|
||||
interface MainList {
|
||||
id: string
|
||||
title: string
|
||||
description: string
|
||||
status: string
|
||||
type: string
|
||||
year: number
|
||||
caseType: string
|
||||
caseNumber: string
|
||||
fullname: string
|
||||
citizenId: string
|
||||
profileId: string
|
||||
lastUpdatedAt: Date
|
||||
id: string;
|
||||
title: string;
|
||||
description: string;
|
||||
status: string;
|
||||
type: string;
|
||||
year: number;
|
||||
caseType: string;
|
||||
caseNumber: string;
|
||||
fullname: string;
|
||||
citizenId: string;
|
||||
profileId: string;
|
||||
lastUpdatedAt: Date;
|
||||
}
|
||||
|
||||
interface EditDataList {
|
||||
id: string
|
||||
title: string
|
||||
description: string
|
||||
status: string
|
||||
type: string
|
||||
year: number
|
||||
caseType: string
|
||||
caseNumber: string
|
||||
fullname: string
|
||||
citizenId: string
|
||||
profileId: string
|
||||
lastUpdatedAt: string
|
||||
historyStatus: object | null
|
||||
disciplineComplaint_Appeal_Docs: object | null
|
||||
id: string;
|
||||
title: string;
|
||||
description: string;
|
||||
status: string;
|
||||
type: string;
|
||||
year: number;
|
||||
caseType: string;
|
||||
caseNumber: string;
|
||||
fullname: string;
|
||||
citizenId: string;
|
||||
profileId: string;
|
||||
lastUpdatedAt: string;
|
||||
historyStatus: object | null;
|
||||
disciplineComplaint_Appeal_Docs: object | null;
|
||||
}
|
||||
|
||||
interface HistoryStatusType {
|
||||
status: string
|
||||
createdAt: string
|
||||
status: string;
|
||||
createdAt: string;
|
||||
}
|
||||
interface FileObType {
|
||||
id: string
|
||||
pathName: string
|
||||
fileName: string
|
||||
id: string;
|
||||
pathName: string;
|
||||
fileName: string;
|
||||
}
|
||||
|
||||
export type {
|
||||
FormType, RowList, MainList, EditDataList,
|
||||
FormType,
|
||||
RowList,
|
||||
MainList,
|
||||
EditDataList,
|
||||
HistoryStatusType,
|
||||
FileObType
|
||||
}
|
||||
FileObType,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,15 +1,16 @@
|
|||
import { defineStore } from "pinia";
|
||||
import { ref } from 'vue'
|
||||
import { ref } from "vue";
|
||||
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import type { DataOption } from "@/modules/07_appealComplain/interface/index/main";
|
||||
import type { QTableProps } from "quasar";
|
||||
import type { RowList, MainList } from '@/modules/07_appealComplain/interface/response/mainType'
|
||||
import type {
|
||||
RowList,
|
||||
MainList,
|
||||
} from "@/modules/07_appealComplain/interface/response/mainType";
|
||||
export const useAppealComplainStore = defineStore("appealComplainStore", () => {
|
||||
|
||||
|
||||
const mixin = useCounterMixin()
|
||||
const { date2Thai } = mixin
|
||||
const mixin = useCounterMixin();
|
||||
const { date2Thai } = mixin;
|
||||
|
||||
const rows = ref<RowList[]>([]);
|
||||
const visibleColumns = ref<string[]>([]);
|
||||
|
|
@ -53,11 +54,11 @@ export const useAppealComplainStore = defineStore("appealComplainStore", () => {
|
|||
rows.value = dataList;
|
||||
}
|
||||
|
||||
/**
|
||||
* แปลงข้อมูลที่รับมา เป็น text
|
||||
* @param val status
|
||||
* @returns ส่งค่าที่แปลง ออกไป
|
||||
*/
|
||||
/**
|
||||
* แปลงข้อมูลที่รับมา เป็น text
|
||||
* @param val status
|
||||
* @returns ส่งค่าที่แปลง ออกไป
|
||||
*/
|
||||
const typeConvert = (val: string) => {
|
||||
switch (val) {
|
||||
case "APPEAL":
|
||||
|
|
@ -74,7 +75,7 @@ export const useAppealComplainStore = defineStore("appealComplainStore", () => {
|
|||
* @param val status
|
||||
* @returns ส่งค่าที่แปลง ออกไป
|
||||
*/
|
||||
function statusTothai(val: string){
|
||||
function statusTothai(val: string) {
|
||||
switch (val) {
|
||||
case "NEW":
|
||||
return "ใหม่";
|
||||
|
|
@ -93,7 +94,7 @@ export const useAppealComplainStore = defineStore("appealComplainStore", () => {
|
|||
default:
|
||||
return "-";
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
visibleColumns,
|
||||
|
|
@ -102,7 +103,6 @@ export const useAppealComplainStore = defineStore("appealComplainStore", () => {
|
|||
rows,
|
||||
typeOptions,
|
||||
statusOptions,
|
||||
statusTothai
|
||||
|
||||
statusTothai,
|
||||
};
|
||||
});
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ const route = useRoute();
|
|||
const id = ref<string>(route.params.id as string);
|
||||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin();
|
||||
const { messageError, showLoader, hideLoader } = mixin;
|
||||
const { messageError, showLoader, hideLoader } = mixin;
|
||||
|
||||
const historyStatusOb = reactive<HistoryStatusType>({
|
||||
status: "",
|
||||
|
|
|
|||
|
|
@ -423,16 +423,15 @@ function onSubmit(data: any) {
|
|||
</q-card>
|
||||
</div>
|
||||
</div>
|
||||
<q-separator v-if="!isReadOnly"/>
|
||||
<q-card-actions align="right" class="bg-white text-teal" v-if="!isReadOnly">
|
||||
<q-btn
|
||||
id="onSubmit"
|
||||
type="submit"
|
||||
label="บันทึก"
|
||||
color="secondary"
|
||||
><q-tooltip>บันทึก</q-tooltip></q-btn
|
||||
>
|
||||
|
||||
<q-separator v-if="!isReadOnly" />
|
||||
<q-card-actions
|
||||
align="right"
|
||||
class="bg-white text-teal"
|
||||
v-if="!isReadOnly"
|
||||
>
|
||||
<q-btn id="onSubmit" type="submit" label="บันทึก" color="secondary"
|
||||
><q-tooltip>บันทึก</q-tooltip></q-btn
|
||||
>
|
||||
</q-card-actions>
|
||||
</q-card>
|
||||
</form>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue