Merge branch 'develop' of github.com:Frappet/hrms-mgt into develop

This commit is contained in:
Warunee Tamkoo 2025-07-18 16:57:45 +07:00
commit 0ff2b91d24
31 changed files with 69 additions and 31 deletions

View file

@ -490,5 +490,6 @@ watch(
v-model:modal="modalCommand"
:command-type-code="commandType"
:persons="dataMapToSend"
:fetch-data="props.fetchData"
/>
</template>

View file

@ -534,5 +534,6 @@ watch(
v-model:modal="modalCommand"
:command-type-code="commandType"
:persons="dataMapToSend"
:fetch-data="props.fetchData"
/>
</template>

View file

@ -334,5 +334,6 @@ function onSearch() {
v-model:modal="modalCommand"
:command-type-code="'C-PM-15'"
:persons="dataMapToSend"
:fetch-data="props.getData"
/>
</template>

View file

@ -422,5 +422,6 @@ watch(
v-model:modal="modalCommand"
:command-type-code="commandType"
:persons="dataMapToSend"
:fetch-data="props.fecthlistOthet"
/>
</template>

View file

@ -484,5 +484,6 @@ watch(
v-model:modal="modalCommand"
:command-type-code="commandType"
:persons="dataMapToSend"
:fetch-data="props.fetchData"
/>
</template>

View file

@ -832,13 +832,13 @@ async function getWorkFlow() {
"positionCandidate",
];
}
hideLoader();
})
.catch((e) => {
messageError($q, e);
hideLoader();
})
.finally(() => {});
.finally(() => {
hideLoader();
});
}
function onclickViewinfo(id: string) {
@ -1716,7 +1716,11 @@ onMounted(async () => {
</q-card>
</q-dialog>
<DialogOrders v-model:modal="modalOrder" :rows="rowsOrder" />
<DialogOrders
v-model:modal="modalOrder"
:rows="rowsOrder"
:fetch-data="getTable"
/>
<PopupPersonal
:modal="modalPersonal"
:id="personalId"

View file

@ -398,5 +398,6 @@ watchEffect(() => {
v-model:modal="modalCommand"
:command-type-code="'C-PM-14'"
:persons="dataMapToSend"
:fetch-data="props.fecthlistRecevice"
/>
</template>

View file

@ -16,8 +16,7 @@ import DialogCreateCommand from "@/modules/18_command/components/DialogCreateCom
const $q = useQuasar();
const { statusText } = useTransferDataStore();
const mixin = useCounterMixin();
const { dialogConfirm, findPosMasterNoOld, date2Thai, onSearchDataTable } =
mixin;
const { dialogConfirm, date2Thai, onSearchDataTable } = mixin;
/** props*/
const props = defineProps({
@ -298,5 +297,6 @@ watch(
v-model:modal="modalCommand"
:command-type-code="'C-PM-16'"
:persons="dataMapToSend"
:fetch-data="props.getData"
/>
</template>

View file

@ -292,5 +292,6 @@ watch(
v-model:modal="modalCommand"
command-type-code="C-PM-13"
:persons="dataMapToSend"
:fetch-data="props.fetchData"
/>
</template>

View file

@ -3,8 +3,6 @@ import { ref, watch, computed } from "vue";
import { useQuasar } from "quasar";
import { useRoute } from "vue-router";
import avatar from "@/assets/avatar_user.jpg";
import http from "@/plugins/http";
import config from "@/app.config";
import { useCounterMixin } from "@/stores/mixin";
@ -15,11 +13,7 @@ import { useTransferDataStore } from "@/modules/05_placement/store";
import type { QTableProps } from "quasar";
import type { ResponseData } from "@/modules/05_placement/interface/response/Transfer";
import type { ListCommand } from "@/modules/18_command/interface/index/Main";
import type {
FormMainProbation,
FormMainProbation2,
OpfillterType,
} from "@/modules/05_placement/interface/request/Main";
import type { FormMainProbation } from "@/modules/05_placement/interface/request/Main";
import DialogHeader from "@/components/DialogHeader.vue";
import DialogCreateCommand from "@/modules/18_command/components/DialogCreateCommand.vue";
@ -33,6 +27,14 @@ const storeCommand = useCommandMainStore();
const { dialogConfirm, dateText, showLoader, hideLoader, messageError } = mixin;
const modal = defineModel<boolean>("modal", { required: true });
const props = defineProps({
fetchData: {
type: Function,
default: () => {
console.warn("fetchData function is not ");
},
},
});
const examId = route.params.examId;
const rows = ref<FormMainProbation[]>([]);
@ -212,13 +214,13 @@ async function getList() {
rows.value = data;
totalList.value = Math.ceil(resTotal / pagination.value.rowsPerPage);
total.value = resTotal;
hideLoader();
})
.catch((e) => {
messageError($q, e);
hideLoader();
})
.finally(() => {});
.finally(() => {
hideLoader();
});
}
function updatePagination(newPagination: any) {
@ -426,5 +428,6 @@ watch(
v-model:modal="modalCommand"
:command-type-code="commandType"
:persons="selected ? dataMapToSend : []"
:fetch-data="props.fetchData"
/>
</template>

View file

@ -261,5 +261,6 @@ watchEffect(() => {
:command-type-code="'C-PM-10'"
:persons="selected ? dataMapToSend : []"
:not-person="false"
:fetch-data="props.getData"
/>
</template>

View file

@ -866,5 +866,5 @@ onMounted(() => {
</q-card>
</q-dialog>
<DialogOrder v-model:modal="modalCommand" />
<DialogOrder v-model:modal="modalCommand" :fetch-data="fetchProbationPersonalList" />
</template>

View file

@ -150,6 +150,7 @@ async function fetchData() {
const data = await res.data.result;
rows.value = data;
dataTransfer.value = data;
onSearch();
})
.catch((e) => {
messageError($q, e);

View file

@ -230,6 +230,7 @@ async function fecthlistRecevice() {
rows.value = data;
rowsData.value = data;
filters.value = data;
onSearch();
})
.catch((e) => {
messageError($q, e);

View file

@ -187,6 +187,7 @@ async function getData() {
const data = await res.data.result;
rows.value = data;
rowsData.value = data;
await onSearch();
})
.catch((e) => {
messageError($q, e);
@ -249,7 +250,7 @@ function closeModal() {
filterKeyword2.value = "";
}
function onSearch() {
async function onSearch() {
rows.value = onSearchDataTable(
filterKeyword.value,
rowsData.value,

View file

@ -31,7 +31,7 @@ const {
hideLoader,
success,
dialogRemove,
findPosMasterNoOld,
onSearchDataTable,
} = useCounterMixin();
@ -166,6 +166,7 @@ async function getData() {
const data = await res.data.result;
rows.value = data;
rowsData.value = data;
onSearch();
})
.catch((e) => {
messageError($q, e);

View file

@ -247,7 +247,7 @@ async function fecthlistappointment() {
showLoader();
await http
.get(config.API.appointmentMain() + `?status=${status.value}`)
.then((res) => {
.then(async (res) => {
let response = res.data.result;
listRecevice.value = response;
rows.value = response;
@ -267,6 +267,7 @@ async function fecthlistappointment() {
);
rows2.value = listData;
rows2Data.value = listData;
await onSearch();
})
.catch((e) => {
messageError($q, e);
@ -367,7 +368,7 @@ function clickClose() {
modal.value = false;
}
function onSearch() {
async function onSearch() {
rows.value = onSearchDataTable(
filterKeyword.value,
rowsData.value,

View file

@ -256,6 +256,7 @@ async function fecthlistappointment() {
);
rows2.value = listData;
rows2Data.value = listData;
await onSearch();
})
.catch((e) => {
messageError($q, e);
@ -356,7 +357,7 @@ async function onSave(data: FormDataAppoint) {
});
}
function onSearch() {
async function onSearch() {
rows.value = onSearchDataTable(
filterKeyword.value,
rowsData.value,

View file

@ -181,7 +181,7 @@ async function fecthlistOthet() {
showLoader();
await http
.get(config.API.otherMain() + `?status=${status.value}`)
.then((res) => {
.then(async (res) => {
let response = res.data.result;
rows.value = response;
rowsData.value = response;
@ -199,6 +199,7 @@ async function fecthlistOthet() {
);
rows2.value = listData;
rows2Data.value = listData;
await onSearch();
})
.catch((e) => {
messageError($q, e);
@ -312,7 +313,7 @@ function nextPage(id: string) {
});
}
function onSearch() {
async function onSearch() {
rows.value = onSearchDataTable(
filterKeyword.value,
rowsData.value,

View file

@ -334,5 +334,6 @@ watch(
v-model:modal="modalCommand"
:command-type-code="props.mainTabs === '1' ? 'C-PM-17' : 'C-PM-41'"
:persons="dataMapToSend"
:fetch-data="props.fecthList"
/>
</template>

View file

@ -219,8 +219,9 @@ async function fecthlist() {
.get(pathAPI)
.then(async (res) => {
const data = await res.data.result;
rows.value = data;
rowsData.value = data;
rows.value = data;
onSearch();
})
.catch((e) => {
messageError($q, e);

View file

@ -309,5 +309,6 @@ watch(
v-model:modal="modalCommand"
:command-type-code="props.mainTabs === '1' ? 'C-PM-23' : 'C-PM-42'"
:persons="dataMapToSend"
:fecth-list="props.fecthList"
/>
</template>

View file

@ -215,6 +215,7 @@ async function fecthlist() {
const data = await res.data.result;
rows.value = data;
rowsData.value = data;
onSearch();
})
.catch((e) => {
messageError($q, e);

View file

@ -3,8 +3,6 @@ import { ref, computed, watchEffect } from "vue";
import { useQuasar } from "quasar";
import type { QTableProps } from "quasar";
import http from "@/plugins/http";
import config from "@/app.config";
import { useCounterMixin } from "@/stores/mixin";
import { useTransferDataStore } from "@/modules/05_placement/store";
@ -297,5 +295,6 @@ watchEffect(() => {
v-model:modal="modalCommand"
:command-type-code="'C-PM-18'"
:persons="dataMapToSend"
:fetch-data="props.fecthlistRecevice"
/>
</template>

View file

@ -3,8 +3,6 @@ import { ref, computed, watchEffect } from "vue";
import { useQuasar } from "quasar";
import type { QTableProps } from "quasar";
import http from "@/plugins/http";
import config from "@/app.config";
import { useCounterMixin } from "@/stores/mixin";
import { useTransferDataStore } from "@/modules/05_placement/store";
@ -297,5 +295,6 @@ watchEffect(() => {
v-model:modal="modalCommand"
:command-type-code="'C-PM-43'"
:persons="dataMapToSend"
:fetch-data="props.fecthlistRecevice"
/>
</template>

View file

@ -354,6 +354,7 @@ watch(
v-model:modal="modalCommand"
:command-type-code="'C-PM-21'"
:persons="dataMapToSend"
:fetch-data="props.fetchData"
/>
</template>

View file

@ -322,5 +322,6 @@ watch(
v-model:modal="modalCommand"
:command-type-code="commandType"
:persons="selected ? dataMapToSend : []"
:fetch-data="props.getData"
/>
</template>

View file

@ -46,6 +46,7 @@ const filterKeyword = ref<string>("");
/** props*/
const props = defineProps<{
rows: dataType[];
fetchData: Function;
}>();
/** คอลัมน์ */
@ -324,5 +325,6 @@ watch(
v-model:modal="modalCommand"
:command-type-code="commandType"
:persons="selected ? dataMapToSend : []"
:fetch-data="props.fetchData"
/>
</template>

View file

@ -494,6 +494,10 @@ onMounted(async () => {
</div>
</q-card>
<DialogSendToCommand v-model:modal="modal" :rows="rows2" />
<DialogSendToCommand
v-model:modal="modal"
:rows="rows2"
:fetch-data="getList"
/>
</template>
<style scoped lang="scss"></style>

View file

@ -243,6 +243,7 @@ watch(
v-model:modal="modalCommand"
:command-type-code="'C-PM-32'"
:persons="selected ? dataMapToSend : []"
:fetch-data="props.fetchData"
/>
</template>

View file

@ -35,6 +35,10 @@ const props = defineProps({
type: Boolean,
default: false,
},
fetchData: {
type: Function,
default: () => {},
},
});
const commandOp = ref<ListCommand[]>([]); //
@ -208,6 +212,7 @@ function createCommand(isRedirect: boolean) {
router.push(`/command/edit/${id}`);
} else {
clearValue();
await props.fetchData(); // fetchData props
}
})
.catch((e) => {
@ -253,7 +258,7 @@ function addPersonalToCommand(isRedirect: boolean) {
router.push(`/command/edit/${id}`);
} else {
modal.value = false;
clearValue();
await props.fetchData(); // fetchData props
}
})
.catch((e) => {