diff --git a/src/frontend/src/containers/pages/paymentmodule/ProgramCycle/ProgramCycleDetails/ProgramCycleDetailsHeader.tsx b/src/frontend/src/containers/pages/paymentmodule/ProgramCycle/ProgramCycleDetails/ProgramCycleDetailsHeader.tsx index ee6adce9a6..021bf9e5fe 100644 --- a/src/frontend/src/containers/pages/paymentmodule/ProgramCycle/ProgramCycleDetails/ProgramCycleDetailsHeader.tsx +++ b/src/frontend/src/containers/pages/paymentmodule/ProgramCycle/ProgramCycleDetails/ProgramCycleDetailsHeader.tsx @@ -91,7 +91,7 @@ export const ProgramCycleDetailsHeader = ({ await finishMutation(); showMessage(t('Programme Cycle Finished')); } catch (e) { - e.data?.forEach((message: string) => showMessage(message)); + showMessage(e?.message); } }; @@ -100,7 +100,7 @@ export const ProgramCycleDetailsHeader = ({ await reactivateMutation(); showMessage(t('Programme Cycle Reactivated')); } catch (e) { - e.data?.forEach((message: string) => showMessage(message)); + showMessage(e?.message); } }; diff --git a/src/frontend/src/containers/tables/ProgramCycle/DeleteProgramCycle.tsx b/src/frontend/src/containers/tables/ProgramCycle/DeleteProgramCycle.tsx index 3ceca7612d..cea9efcdf2 100644 --- a/src/frontend/src/containers/tables/ProgramCycle/DeleteProgramCycle.tsx +++ b/src/frontend/src/containers/tables/ProgramCycle/DeleteProgramCycle.tsx @@ -62,7 +62,7 @@ export const DeleteProgramCycle = ({ await mutateAsync(); showMessage(t('Programme Cycle Deleted')); } catch (e) { - e.data?.forEach((message: string) => showMessage(message)); + showMessage(e?.message); } }; diff --git a/src/frontend/src/containers/tables/ProgramCyclesTable/ProgramCyclesTable.tsx b/src/frontend/src/containers/tables/ProgramCyclesTable/ProgramCyclesTable.tsx index 017cd4c3cb..a406ccca96 100644 --- a/src/frontend/src/containers/tables/ProgramCyclesTable/ProgramCyclesTable.tsx +++ b/src/frontend/src/containers/tables/ProgramCyclesTable/ProgramCyclesTable.tsx @@ -90,7 +90,7 @@ export const ProgramCyclesTablePaymentModule = ({ await finishMutation({ programCycleId: decodedProgramCycleId }); showMessage(t('Programme Cycle Finished')); } catch (e) { - e.data?.forEach((message: string) => showMessage(message)); + showMessage(e?.message); } }; @@ -100,7 +100,7 @@ export const ProgramCyclesTablePaymentModule = ({ await reactivateMutation({ programCycleId: decodedProgramCycleId }); showMessage(t('Programme Cycle Reactivated')); } catch (e) { - e.data?.forEach((message: string) => showMessage(message)); + showMessage(e?.message); } }; diff --git a/src/frontend/src/containers/tables/ProgramCyclesTablePaymentModule/ProgramCyclesTablePaymentModule.tsx b/src/frontend/src/containers/tables/ProgramCyclesTablePaymentModule/ProgramCyclesTablePaymentModule.tsx index ebdbaa2ee7..64c3d63c39 100644 --- a/src/frontend/src/containers/tables/ProgramCyclesTablePaymentModule/ProgramCyclesTablePaymentModule.tsx +++ b/src/frontend/src/containers/tables/ProgramCyclesTablePaymentModule/ProgramCyclesTablePaymentModule.tsx @@ -86,7 +86,7 @@ export const ProgramCyclesTablePaymentModule = ({ await finishMutation({ programCycleId: decodedProgramCycleId }); showMessage(t('Programme Cycle Finished')); } catch (e) { - e.data?.forEach((message: string) => showMessage(message)); + showMessage(e?.message); } }; @@ -96,7 +96,7 @@ export const ProgramCyclesTablePaymentModule = ({ await reactivateMutation({ programCycleId: decodedProgramCycleId }); showMessage(t('Programme Cycle Reactivated')); } catch (e) { - e.data?.forEach((message: string) => showMessage(message)); + showMessage(e?.message); } };