From 461e694dab18804a46fc4acea2bad686c2dd9313 Mon Sep 17 00:00:00 2001 From: rmmayo Date: Thu, 9 Jan 2025 21:56:08 +0000 Subject: [PATCH] #2517 - add backed support for approval message --- .../src/components/skills/selfReport/RejectSkillModal.vue | 2 +- .../src/components/skills/selfReport/SelfReportService.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dashboard/src/components/skills/selfReport/RejectSkillModal.vue b/dashboard/src/components/skills/selfReport/RejectSkillModal.vue index 32f23720e..79ffe3945 100644 --- a/dashboard/src/components/skills/selfReport/RejectSkillModal.vue +++ b/dashboard/src/components/skills/selfReport/RejectSkillModal.vue @@ -59,7 +59,7 @@ const rejectOrApproveSkills = (values) => { emit('do-reject', ids); }); } else { - return SelfReportService.approve(route.params.projectId, ids/*, values.approvalRequiredMsg*/).then(() => { + return SelfReportService.approve(route.params.projectId, ids, values.approvalRequiredMsg).then(() => { emit('do-approve', ids); }); } diff --git a/dashboard/src/components/skills/selfReport/SelfReportService.js b/dashboard/src/components/skills/selfReport/SelfReportService.js index e088dd4e5..170cad4c8 100644 --- a/dashboard/src/components/skills/selfReport/SelfReportService.js +++ b/dashboard/src/components/skills/selfReport/SelfReportService.js @@ -26,9 +26,9 @@ export default { return axios.get(url, { params }) .then((response) => response.data); }, - approve(projectId, approvalIds) { + approve(projectId, approvalIds, approvalMsg) { const url = `/admin/projects/${encodeURIComponent(projectId)}/approvals/approve`; - return axios.post(url, { skillApprovalIds: approvalIds }) + return axios.post(url, { skillApprovalIds: approvalIds, approvalMessage: approvalMsg }) .then((response) => response.data); }, reject(projectId, approvalIds, rejectMsg) {