updated approved

This commit is contained in:
Warunee Tamkoo 2024-08-16 10:18:00 +07:00
parent 113081b5ed
commit a0334a04b4
2 changed files with 27 additions and 7 deletions

View file

@ -51,12 +51,14 @@ const pagination = ref({
rowsPerPage: 10,
});
function onClickApprove(type: string = "") {
async function onClickApprove(type: string = "") {
if (store.selected.length !== 0) {
const userIds = store.selected.map((user: ResEvaluatorAssessor) => user.id);
const userIds = await store.selected.map(
(user: ResEvaluatorAssessor) => user.id
);
dialogConfirm(
$q,
() => {
async () => {
showLoader();
const url =
store.tabMainevaluator === "2" || store.tabMainevaluator === "4"
@ -77,7 +79,7 @@ function onClickApprove(type: string = "") {
: undefined,
id: userIds,
};
http
await http
.post(config.API.kpiEvaluation + `/admin/${url}`, body)
.then(async () => {
store.selected = [];