Merge branch 'develop' into devTee

This commit is contained in:
STW_TTTY\stwtt 2024-08-13 12:07:02 +07:00
commit fb02203151
26 changed files with 129 additions and 120 deletions

View file

@ -19,6 +19,7 @@ const {
messageError,
success,
date2Thai,
pathRegistryEmp,
} = mixin;
const historyDialog = ref<boolean>(false);
@ -26,9 +27,7 @@ const mode = ref<string>("table");
const dialog = ref<boolean>(false);
const route = useRoute();
const id = ref<string>(route.params.id.toString());
const empType = ref<string>(
route.name === "registryNewByid" ? "" : "-employee"
);
const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
const dialogStatus = ref<string>("create");
const editId = ref<string>("");
const keyword = ref<string>("");

View file

@ -21,13 +21,13 @@ const {
messageError,
success,
date2Thai,
pathRegistryEmp,
} = mixin;
const route = useRoute();
const id = ref<string>(route.params.id.toString());
const empType = ref<string>(
route.name === "registryNewByid" ? "" : "-employee"
);
const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
const dialog = ref<boolean>(false);
const mode = ref<string>("table");
const columns = ref<QTableProps["columns"]>([

View file

@ -30,13 +30,12 @@ const {
hideLoader,
messageError,
dialogConfirm,
pathRegistryEmp,
} = mixin;
const profileId = ref<string>(
route.params.id ? route.params.id.toString() : ""
);
const empType = ref<string>(
route.name === "registryNewByid" ? "" : "-employee"
);
const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
const id = ref<string>("");
const insigniaType = ref<string>("");

View file

@ -22,13 +22,12 @@ const {
showLoader,
hideLoader,
dialogConfirm,
pathRegistryEmp,
} = mixin;
const profileId = ref<string>(
route.params.id ? route.params.id.toString() : ""
);
const empType = ref<string>(
route.name === "registryNewByid" ? "" : "-employee"
);
const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
const id = ref<string>("");
const issueDateYear = ref<number>(0);

View file

@ -26,13 +26,12 @@ const {
showLoader,
hideLoader,
dialogConfirm,
pathRegistryEmp,
} = mixin;
const profileId = ref<string>(
route.params.id ? route.params.id.toString() : ""
);
const empType = ref<string>(
route.name === "registryNewByid" ? "" : "-employee"
);
const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
const id = ref<string>("");
const resPerformForm = reactive<RequestItemsObject>({

View file

@ -27,12 +27,11 @@ const {
showLoader,
hideLoader,
success,
pathRegistryEmp,
} = mixin;
const profileId = ref<string>(route.params.id.toString());
const empType = ref<string>(
route.name === "registryNewByid" ? "" : "-employee"
);
const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
/** ตัวแปรข้อมูลหลัก */
const formMain = reactive<FormMain>({
ocId: "", //

View file

@ -17,12 +17,7 @@ import DialogHistory from "@/modules/04_registryPerson/components/detail/Governm
import { useRoute } from "vue-router";
const route = useRoute();
const profileId = ref<string>(
route.params.id ? route.params.id.toString() : ""
);
const empType = ref<string>(
route.name === "registryNewByid" ? "" : "-employee"
);
const $q = useQuasar();
const mixin = useCounterMixin();
const {
@ -32,9 +27,15 @@ const {
hideLoader,
messageError,
success,
pathRegistryEmp,
dialogRemove,
} = mixin;
const profileId = ref<string>(
route.params.id ? route.params.id.toString() : ""
);
const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
const disciplineData = reactive<RequestItemsObject>({
date: null,
level: "",

View file

@ -19,7 +19,10 @@ const id = defineModel<string>("id", { required: true });
const $q = useQuasar();
const route = useRoute();
const mixin = useCounterMixin();
const { showLoader, hideLoader, messageError, date2Thai } = mixin;
const { showLoader, hideLoader, messageError, date2Thai, pathRegistryEmp } =
mixin;
const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
const currentPage = ref<number>(1);
const maxPage = ref<number>(1);
@ -147,9 +150,6 @@ const columns = ref<QTableProps["columns"]>([
},
]);
const empType = ref<string>(
route.name === "registryNewByid" ? "" : "-employee"
);
function getHistory() {
showLoader();
http

View file

@ -23,12 +23,7 @@ import config from "@/app.config";
const rowsTotal = ref<ResponseTotalObject[]>([]);
const id = ref<string>("");
const route = useRoute();
const profileId = ref<string>(
route.params.id ? route.params.id.toString() : ""
);
const empType = ref<string>(
route.name === "registryNewByid" ? "" : "-employee"
);
const $q = useQuasar();
const mixin = useCounterMixin();
const {
@ -39,8 +34,14 @@ const {
success,
date2Thai,
dateToISO,
pathRegistryEmp,
} = mixin;
const profileId = ref<string>(
route.params.id ? route.params.id.toString() : ""
);
const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
const pagination = ref({
page: 1,
rowsPerPage: 10,
@ -618,7 +619,6 @@ onMounted(() => {
<q-space />
<div>
<q-btn
color="deep-purple"
icon="mdi-history"
flat

View file

@ -19,11 +19,11 @@ const id = defineModel<string>("id", { required: true });
const $q = useQuasar();
const route = useRoute();
const mixin = useCounterMixin();
const { showLoader, hideLoader, messageError, date2Thai } = mixin;
const { showLoader, hideLoader, messageError, date2Thai, pathRegistryEmp } =
mixin;
const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
const empType = ref<string>(
route.name === "registryNewByid" ? "" : "-employee"
);
const filterKeyword = ref<string>("");
const rows = ref<DetailData[]>([]); //select data history
const formFilter = reactive<FormFilter>({

View file

@ -21,9 +21,7 @@ const route = useRoute();
const profileId = ref<string>(
route.params.id ? route.params.id.toString() : ""
);
const empType = ref<string>(
route.name === "registryNewByid" ? "" : "-employee"
);
const $q = useQuasar();
const mixin = useCounterMixin();
const {
@ -33,8 +31,11 @@ const {
showLoader,
hideLoader,
success,
pathRegistryEmp,
} = mixin;
const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
const modal = ref<boolean>(false);
const edit = ref<boolean>(false);
const modalHistory = ref<boolean>(false);

View file

@ -19,11 +19,11 @@ const id = defineModel<string>("id", { required: true });
const route = useRoute();
const $q = useQuasar();
const mixin = useCounterMixin();
const { showLoader, hideLoader, messageError, date2Thai } = mixin;
const { showLoader, hideLoader, messageError, date2Thai, pathRegistryEmp } =
mixin;
const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
const empType = ref<string>(
route.name === "registryNewByid" ? "" : "-employee"
);
const currentPage = ref<number>(1);
const maxPage = ref<number>(1);
const filterKeyword = ref<string>("");

View file

@ -25,6 +25,7 @@ const {
messageError,
dialogRemove,
dialogConfirm,
pathRegistryEmp,
} = mixin;
const id = ref<string>("");
@ -36,9 +37,8 @@ const pagination = ref({
const profileId = ref<string>(
route.params.id ? route.params.id.toString() : ""
);
const empType = ref<string>(
route.name === "registryNewByid" ? "" : "-employee"
);
const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
const mode = ref<string>("table");
const filterKeyword = ref<string>("");
const rows = ref<RowList[]>([]);

View file

@ -21,7 +21,8 @@ const id = defineModel<string>("id", { required: true });
const $q = useQuasar();
const route = useRoute();
const mixin = useCounterMixin();
const { showLoader, hideLoader, messageError, date2Thai } = mixin;
const { showLoader, hideLoader, messageError, date2Thai, pathRegistryEmp } =
mixin;
const historyPagination = ref({
page: 1,
rowsPerPage: 10,
@ -42,9 +43,7 @@ const formFilter = reactive<FormFilter>({
isShowRetire: false,
isProbation: false,
});
const empType = ref<string>(
route.name === "registryNewByid" ? "" : "-employee"
);
const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
const visibleColumns = ref<String[]>([
"date",

View file

@ -52,7 +52,11 @@ const profileId = ref<string>(
route.params.id ? route.params.id.toString() : ""
);
const empType = ref<string>(
route.name === "registryNewByid" ? "" : "-employee"
route.name === "registryNewByid"
? ""
: route.name === "registry-employeeId"
? "-temp"
: "-employee"
);
const modal = ref<boolean>(false);

View file

@ -39,6 +39,7 @@ const {
messageError,
showLoader,
hideLoader,
pathRegistryEmp,
} = useCounterMixin();
/**
@ -50,9 +51,8 @@ const props = defineProps({
const submitDisable = ref<boolean>(true);
const profileId = ref<string>(route.params.id.toString());
const empType = ref<string>(
route.name === "registryNewByid" ? "" : "-employee"
);
const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
const editId = ref<string>("");
const dialog = ref<boolean>(false);
const dialogStatus = ref<string>("create");

View file

@ -33,13 +33,12 @@ const {
showLoader,
hideLoader,
dialogConfirm,
pathRegistryEmp,
} = mixin;
const profileId = ref<string>(
route.params.id ? route.params.id.toString() : ""
);
const empType = ref<string>(
route.name === "registryNewByid" ? "" : "-employee"
);
const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
const currentPage = ref<number>(1);
const maxPage = ref<number>(1);

View file

@ -23,16 +23,20 @@ const $q = useQuasar();
const route = useRoute();
const store = useProfileDataStore();
const { fetchPerson, filterSelector } = store;
const { dialogConfirm, showLoader, hideLoader, messageError, success } =
useCounterMixin();
const { filterSelector } = store;
const {
dialogConfirm,
showLoader,
hideLoader,
messageError,
success,
pathRegistryEmp,
} = useCounterMixin();
const profileId = ref<string>(
route.params.id ? route.params.id.toString() : ""
);
const empType = ref<string>(
route.name === "registryNewByid" ? "" : "-employee"
);
const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
/** TableHisoty*/
const visibleColumns = ref<String[]>([

View file

@ -22,6 +22,7 @@ const {
messageError,
success,
date2Thai,
pathRegistryEmp,
} = mixin;
const dialog = ref<boolean>(false);
@ -402,9 +403,8 @@ const historyRows = ref<ResponseObject[]>([]);
const editId = ref<string>("");
const route = useRoute();
const id = ref<string>(route.params.id.toString());
const empType = ref<string>(
route.name === "registryNewByid" ? "" : "-employee"
);
const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
const isDate = ref<string>("false");
const educationOption = ref([
{ label: "ใช่", value: true },

View file

@ -22,6 +22,7 @@ const {
messageError,
success,
date2Thai,
pathRegistryEmp,
} = mixin;
const columns = ref<QTableProps["columns"]>([
{
@ -147,9 +148,8 @@ const rows = ref<ResponseObject[]>([]);
const historyRows = ref<ResponseObject[]>([]);
const route = useRoute();
const id = ref<string>(route.params.id.toString());
const empType = ref<string>(
route.name === "registryNewByid" ? "" : "-employee"
);
const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
const editId = ref<string>("");
const keyword = ref<string>("");
const historyKeyword = ref<string>("");

View file

@ -26,9 +26,7 @@ const route = useRoute();
const profileId = ref<string>(
route.params.id ? route.params.id.toString() : ""
);
const empType = ref<string>(
route.name === "registryNewByid" ? "" : "-employee"
);
const store = useSalaryDataStore();
const {
date2Thai,
@ -37,8 +35,11 @@ const {
hideLoader,
messageError,
success,
pathRegistryEmp,
} = useCounterMixin();
const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
const baseColumns = ref<QTableProps["columns"]>([
{
name: "date",
@ -609,9 +610,8 @@ const classInput = (val: boolean) => {
>
<template v-slot:header="props">
<q-tr :props="props">
<q-th auto-width v-if="checkPermission($route)?.attrIsUpdate" />
<q-th auto-width v-if="checkPermission($route)?.attrIsUpdate" />
<q-th auto-width />
<q-th v-if="checkPermission($route)?.attrIsUpdate" auto-width />
<q-th v-for="col in props.cols" :key="col.name" :props="props">
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
@ -619,31 +619,7 @@ const classInput = (val: boolean) => {
</template>
<template v-slot:body="props">
<q-tr :props="props">
<q-td auto-width v-if="checkPermission($route)?.attrIsUpdate">
<q-btn
dense
flat
round
:color="props.rowIndex + 1 == 1 ? 'grey' : 'green'"
:disable="props.rowIndex + 1 == 1"
icon="mdi-arrow-up-bold"
@click="onSwapUp(props.row.id)"
>
</q-btn>
</q-td>
<q-td auto-width v-if="checkPermission($route)?.attrIsUpdate">
<q-btn
dense
flat
round
:color="rows.length == props.rowIndex + 1 ? 'grey' : 'red'"
:disable="rows.length == props.rowIndex + 1"
icon="mdi-arrow-down-bold"
@click="onSwapDown(props.row.id)"
>
</q-btn>
</q-td>
<q-td auto-width>
<q-td>
<q-btn
flat
dense
@ -668,6 +644,29 @@ const classInput = (val: boolean) => {
<q-tooltip>แกไขขอม</q-tooltip>
</q-btn>
</q-td>
<q-td v-if="checkPermission($route)?.attrIsUpdate">
<q-btn
dense
flat
round
:color="props.rowIndex + 1 == 1 ? 'grey' : 'green'"
:disable="props.rowIndex + 1 == 1"
icon="mdi-arrow-up-bold"
@click="onSwapUp(props.row.id)"
>
</q-btn>
<q-btn
dense
flat
round
:color="rows.length == props.rowIndex + 1 ? 'grey' : 'red'"
:disable="rows.length == props.rowIndex + 1"
icon="mdi-arrow-down-bold"
@click="onSwapDown(props.row.id)"
>
</q-btn>
</q-td>
<q-td v-for="col in props.cols" :key="col.id">
<div class="table_ellipsis">
{{ col.value ? col.value : "-" }}

View file

@ -20,11 +20,10 @@ const {
hideLoader,
messageError,
success,
pathRegistryEmp,
} = useCounterMixin();
const empType = ref<string>(
route.name === "registryNewByid" ? "" : "-employee"
);
const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
const modal = defineModel<boolean>("modal", { required: true });
const salaryId = defineModel<string>("salaryId", { required: true });

View file

@ -24,14 +24,13 @@ const {
messageError,
success,
dialogRemove,
pathRegistryEmp,
} = useCounterMixin();
const id = ref<string>("");
const profileId = ref<string>(
route.params.id ? route.params.id.toString() : ""
);
const empType = ref<string>(
route.name === "registryNewByid" ? "" : "-employee"
);
const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
const modelView = ref<string>("table");
const modalDialog = ref<boolean>(false);

View file

@ -14,11 +14,10 @@ import DialogHeader from "@/components/DialogHeader.vue";
const route = useRoute();
const $q = useQuasar();
const mixin = useCounterMixin();
const { showLoader, hideLoader, messageError, date2Thai } = mixin;
const { showLoader, hideLoader, messageError, date2Thai, pathRegistryEmp } =
mixin;
const empType = ref<string>(
route.name === "registryNewByid" ? "" : "-employee"
);
const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
const modal = defineModel<boolean>("modal", { required: true });
const id = defineModel<string>("id", { required: true });

View file

@ -40,6 +40,7 @@ const {
date2Thai,
dateToISO,
dialogMessageNotify,
pathRegistryEmp,
} = useCounterMixin();
/** ถึงเเก่กรรม */
@ -53,9 +54,7 @@ const reasonDeath = ref("");
const dialogImage = ref<boolean>(false);
const profileId = ref<string>(route.params.id.toString());
const empType = ref<string>(
route.name === "registryNewByid" ? "" : "-employee"
);
const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
const formDetail = ref<ResponseObject>();
const itemsMenu = ref<DataOption[]>([