|
|
@ -28,6 +28,7 @@ const CrudList = < |
|
|
|
getAddLoading, |
|
|
|
getAddLoading, |
|
|
|
getDeleteErrorMessage, |
|
|
|
getDeleteErrorMessage, |
|
|
|
getDeleteHeader, |
|
|
|
getDeleteHeader, |
|
|
|
|
|
|
|
getDeletePromiseChain = (base, ...args) => base(...args), |
|
|
|
getDeleteSuccessMessage, |
|
|
|
getDeleteSuccessMessage, |
|
|
|
getEditLoading = (previous?: boolean) => previous, |
|
|
|
getEditLoading = (previous?: boolean) => previous, |
|
|
|
listEmpty, |
|
|
|
listEmpty, |
|
|
@ -146,7 +147,11 @@ const CrudList = < |
|
|
|
setConfirmDialogLoading(true); |
|
|
|
setConfirmDialogLoading(true); |
|
|
|
|
|
|
|
|
|
|
|
Promise.all( |
|
|
|
Promise.all( |
|
|
|
checks.map((key) => api.delete(`${entriesUrl}/${key}`)), |
|
|
|
getDeletePromiseChain( |
|
|
|
|
|
|
|
(cl, up) => cl.map((key) => api.delete(`${up}/${key}`)), |
|
|
|
|
|
|
|
checks, |
|
|
|
|
|
|
|
entriesUrl, |
|
|
|
|
|
|
|
), |
|
|
|
) |
|
|
|
) |
|
|
|
.then(() => { |
|
|
|
.then(() => { |
|
|
|
finishConfirm('Success', getDeleteSuccessMessage()); |
|
|
|
finishConfirm('Success', getDeleteSuccessMessage()); |
|
|
|