refacter พ้นจากราชการ

This commit is contained in:
AnandaTon 2023-09-20 13:03:54 +07:00
parent 0e5dc057b8
commit 9d0f0eaabf
12 changed files with 34 additions and 63 deletions

View file

@ -5,12 +5,9 @@ import { useQuasar } from "quasar";
import { useRouter } from "vue-router";
import { useCounterMixin } from "@/stores/mixin";
import { useTransferDataStore } from "@/modules/05_placement/store";
import http from "@/plugins/http";
import config from "@/app.config";
import DialogHeader from "@/modules/06_retirement/components/DialogHeader.vue";
import type { ResponseData } from "@/modules/06_retirement/interface/response/discharged";
const selected = ref<ResponseData[]>([]);
@ -52,7 +49,9 @@ const visibleColumns2 = ref<string[]>([
"positionLevel",
"organizationPositionOld",
"statustext",
]); //
]);
//
const filterKeyword = ref<string>("");
const filterKeyword2 = ref<string>("");
const filterRef = ref<any>(null);
@ -263,7 +262,6 @@ const deleteData = async (id: string) => {
.delete(config.API.dischargeByid(id))
.then((res) => {
success($q, "ลบข้อมูลสำเร็จ");
console.log(res);
})
.catch((e) => {
messageError($q, e);
@ -273,6 +271,7 @@ const deleteData = async (id: string) => {
});
};
//
const saveOrder = async () => {
const id = selected.value.map((r) => r.id);
const body = {

View file

@ -20,7 +20,6 @@ const mixin = useCounterMixin();
const dataId = route.params.id.toString();
const {
date2Thai,
dialogMessage,
messageError,
showLoader,
hideLoader,
@ -61,7 +60,6 @@ const responseData = ref<ResponseDataDetail>({
onMounted(async () => {
if (keycloak.tokenParsed != null) {
roleAdmin.value = await keycloak.tokenParsed.role.includes("placement1");
console.log("roleAdmin===>", roleAdmin.value);
}
await getData();
});
@ -124,6 +122,7 @@ const conditionSave = async () => {
}
};
//
const saveData = async () => {
const body = {
organization: organization.value,
@ -139,8 +138,6 @@ const saveData = async () => {
await http
.put(config.API.dischargeByid(dataId), body)
.then((res: any) => {
// const data = res.data.result;
// console.log(data);
success($q, "แก้ไขข้อมูลเพื่อลงบัญชีแนบท้ายสำเร็จ");
edit.value = false;
})