From 1e008663ae20b6156917b2281dc3d82a98a284e9 Mon Sep 17 00:00:00 2001 From: Zacgoose <107489668+Zacgoose@users.noreply.github.com> Date: Thu, 23 Apr 2026 00:05:37 +0800 Subject: [PATCH] fix: show all api responses not just last --- .../CippWizardVacationConfirmation.jsx | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/components/CippWizard/CippWizardVacationConfirmation.jsx b/src/components/CippWizard/CippWizardVacationConfirmation.jsx index 4c1e81483a3c..2b2604d85d5f 100644 --- a/src/components/CippWizard/CippWizardVacationConfirmation.jsx +++ b/src/components/CippWizard/CippWizardVacationConfirmation.jsx @@ -41,21 +41,21 @@ export const CippWizardVacationConfirmation = (props) => { const handleSubmit = () => { if (values.enableCAExclusion) { const policies = Array.isArray(values.PolicyId) ? values.PolicyId : [values.PolicyId] - policies.forEach((policy) => { - caExclusion.mutate({ - url: '/api/ExecCAExclusion', - data: { - tenantFilter, - Users: values.Users, - PolicyId: policy?.value ?? policy, - StartDate: values.startDate, - EndDate: values.endDate, - vacation: true, - reference: values.reference || null, - postExecution: values.postExecution || [], - excludeLocationAuditAlerts: values.excludeLocationAuditAlerts || false, - }, - }) + const policyData = policies.map((policy) => ({ + tenantFilter, + Users: values.Users, + PolicyId: policy?.value ?? policy, + StartDate: values.startDate, + EndDate: values.endDate, + vacation: true, + reference: values.reference || null, + postExecution: values.postExecution || [], + excludeLocationAuditAlerts: values.excludeLocationAuditAlerts || false, + })) + caExclusion.mutate({ + url: '/api/ExecCAExclusion', + data: policyData, + bulkRequest: true, }) }