refactor code

This commit is contained in:
STW_TTTY\stwtt 2024-07-23 11:23:50 +07:00
parent 134af49f25
commit 8c60bf0a3e
9 changed files with 17 additions and 27 deletions

View file

@ -12,14 +12,14 @@ import type {
import { useCounterMixin } from "@/stores/mixin";
const router = useRouter();
const route = useRoute();
const $q = useQuasar();
const mixin = useCounterMixin();
const { showLoader, hideLoader, messageError, date2Thai } = mixin;
const id = ref<string>(route.params.id as string);
const router = useRouter();
const route = useRoute();
const id = ref<string>(route.params.id as string);
const dateOrder = ref<Date | null>(null);
const order = ref<string>("");
@ -81,7 +81,6 @@ function fetchData() {
formMain.level = data.posLevelName ? data.posLevelName : null;
formMain.positionSide = data.posExecutive ? data.posExecutive : null;
formMain.oc = data.org ? data.org : null;
formMainProject.id = data.developmentId ? data.developmentId : null;
formMainProject.project = data.projectName ? data.projectName : null;
formMainProject.year = data.year ? data.year : null;
@ -92,10 +91,7 @@ function fetchData() {
? data.addressAcademic
: null;
formMainProject.topic = data.topicAcademic ? data.topicAcademic : null;
// formMainProject.studyStart = data.dateStudyStart;
// formMainProject.studyEnd = data.dateStudyEnd;
formMainProject.organizingTraining = data.org ? data.org : null;
dateOrder.value = data.dateOrder;
order.value = data.order;
})

View file

@ -6,7 +6,6 @@ import type {
FormFilter,
NewPagination,
} from "@/modules/15_development/interface/index/Main";
import { useDevelopmentDataStore } from "@/modules/15_development/store/developmentStore";
import { useCounterMixin } from "@/stores/mixin";
import { useQuasar, type QTableProps } from "quasar";
@ -44,11 +43,9 @@ const mixin = useCounterMixin();
const { messageError, dialogMessageNotify, showLoader, hideLoader } = mixin;
const modal = defineModel<boolean>("modal", { required: true });
const selected = ref<any[]>([]);
const search = ref<string>("citizenId");
const inputSearch = ref<any>("");
const govOp = ref<DataOption[]>([
{
id: "citizenId",

View file

@ -6,7 +6,6 @@ import type {
FormFilter,
NewPagination,
} from "@/modules/15_development/interface/index/Main";
import { useDevelopmentDataStore } from "@/modules/15_development/store/developmentStore";
import { useCounterMixin } from "@/stores/mixin";
import { useQuasar, type QTableProps } from "quasar";
@ -28,7 +27,6 @@ const {
showLoader,
hideLoader,
} = mixin;
const store = useDevelopmentDataStore();
const modal = defineModel<boolean>("modal", { required: true });