updated format code & eslint rule

This commit is contained in:
Warunee Tamkoo 2024-09-02 14:01:01 +07:00
parent 67c6810def
commit 8a31554f38
102 changed files with 6271 additions and 6164 deletions

View file

@ -1,8 +1,6 @@
interface DataOption {
id:string
name:string
id: string;
name: string;
}
export type {
DataOption
}
export type { DataOption };

View file

@ -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 };

View file

@ -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,
};

View file

@ -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,
};
});

View file

@ -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: "",

View file

@ -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>