แก้ลูกจ้าง
This commit is contained in:
parent
4e2b6e9313
commit
262dd67b42
4 changed files with 21 additions and 14 deletions
|
|
@ -26,7 +26,7 @@ import WorkFlow from "@/components/Workflow/Main.vue";
|
|||
const $q = useQuasar();
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const checkRoutePermisson = ref<boolean>(route.name == "resignDetailbyid");
|
||||
const checkRoutePermisson = ref<boolean>(route.name == "resignDetailbyidEMP");
|
||||
const mixin = useCounterMixin();
|
||||
const {
|
||||
messageError,
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ import WorkFlow from "@/components/Workflow/Main.vue";
|
|||
const $q = useQuasar();
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const checkRoutePermisson = ref<boolean>(route.name == "resignDetailReject");
|
||||
const checkRoutePermisson = ref<boolean>(route.name == "resignDetailRejectEMP");
|
||||
const mixin = useCounterMixin();
|
||||
const {
|
||||
messageError,
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ const modal = ref<boolean>(false);
|
|||
const filterKeyword2 = ref<string>("");
|
||||
const filterKeyword = ref<string>("");
|
||||
|
||||
const status = ref<string>("");
|
||||
const statusEMP = ref<string>("");
|
||||
const optionStatus = ref<any[]>([]);
|
||||
|
||||
/**Setting pagination */
|
||||
|
|
@ -150,9 +150,9 @@ function closeModal() {
|
|||
/** */
|
||||
async function openModalOrder() {
|
||||
const pathAPI =
|
||||
stroeResign.mainTabs === "1"
|
||||
? `${config.API.listResign()}?type=APPROVE`
|
||||
: `${config.API.listResign()}/cancel?type=APPROVE`;
|
||||
stroeResign.mainTabsEMP === "1"
|
||||
? `${config.API.listResignEMP()}?type=APPROVE`
|
||||
: `${config.API.listResignEMP()}/cancel?type=APPROVE`;
|
||||
showLoader();
|
||||
await http
|
||||
.get(pathAPI)
|
||||
|
|
@ -183,8 +183,8 @@ async function openModalOrder() {
|
|||
async function fecthlist() {
|
||||
const pathAPI =
|
||||
stroeResign.mainTabsEMP === "1"
|
||||
? `${config.API.listResignEMP()}?type=${status.value}`
|
||||
: `${config.API.listResignEMP()}/cancel?type=${status.value}`;
|
||||
? `${config.API.listResignEMP()}?type=${statusEMP.value}`
|
||||
: `${config.API.listResignEMP()}/cancel?type=${statusEMP.value}`;
|
||||
showLoader();
|
||||
await http
|
||||
.get(pathAPI)
|
||||
|
|
@ -207,8 +207,8 @@ async function fecthlist() {
|
|||
*/
|
||||
function filterOption(val: string, update: Function) {
|
||||
update(() => {
|
||||
status.value = val ? "" : stroeResign.formQurey.status;
|
||||
optionStatus.value = stroeResign.optionStatus.filter(
|
||||
statusEMP.value = val ? "" : stroeResign.formQureyEMP.status;
|
||||
optionStatus.value = stroeResign.optionStatusEMP.filter(
|
||||
(v: any) => v.name.indexOf(val) > -1
|
||||
);
|
||||
});
|
||||
|
|
@ -221,7 +221,7 @@ function onRedirectToDetail(type: string, id: string) {
|
|||
|
||||
/**Hook */
|
||||
onMounted(async () => {
|
||||
status.value = stroeResign.formQurey.status;
|
||||
statusEMP.value = stroeResign.formQureyEMP.status;
|
||||
optionStatus.value = stroeResign.optionStatusEMP;
|
||||
await fecthlist();
|
||||
});
|
||||
|
|
@ -233,7 +233,7 @@ onMounted(async () => {
|
|||
<div class="row col-12">
|
||||
<div class="row q-gutter-sm">
|
||||
<q-select
|
||||
v-model="status"
|
||||
v-model="statusEMP"
|
||||
:label="`${'สถานะ'}`"
|
||||
option-label="name"
|
||||
:options="optionStatus"
|
||||
|
|
@ -246,7 +246,7 @@ onMounted(async () => {
|
|||
outlined
|
||||
use-input
|
||||
@update:model-value="
|
||||
(stroeResign.formQurey.status = status), fecthlist()
|
||||
(stroeResign.formQureyEMP.status = statusEMP), fecthlist()
|
||||
"
|
||||
@filter="(inputValue:string,doneFn:Function) => filterOption(inputValue, doneFn) "
|
||||
>
|
||||
|
|
|
|||
|
|
@ -58,6 +58,13 @@ export const useDataStore = defineStore("resign", () => {
|
|||
page: 1,
|
||||
rowsPerPage: 10,
|
||||
});
|
||||
|
||||
const formQureyEMP = reactive({
|
||||
status: "WAITTING",
|
||||
page: 1,
|
||||
rowsPerPage: 10,
|
||||
});
|
||||
|
||||
const optionStatus = computed(() => {
|
||||
return baseOptionStatus.value.filter(
|
||||
(option) => option.group === mainTabs.value
|
||||
|
|
@ -76,5 +83,5 @@ export const useDataStore = defineStore("resign", () => {
|
|||
formQurey.status = "WAITTING";
|
||||
});
|
||||
|
||||
return { mainTabs, mainTabsEMP, formQurey, optionStatus, optionStatusEMP };
|
||||
return { mainTabs, mainTabsEMP, formQurey,formQureyEMP, optionStatus, optionStatusEMP };
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue