umwd-components 0.1.694 → 0.1.695
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/node_modules/base64-js/index.js +1 -1
- package/dist/node_modules/ieee754/index.js +1 -1
- package/dist/src/components/e-commerce/opo/TextualManageOpoForm.js +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/components/e-commerce/opo/TextualManageOpoForm.tsx +18 -4
- package/src/data/services/common/cancellation-service.ts +0 -1
- package/src/data/services/common/confirmation-service.ts +0 -1
package/package.json
CHANGED
|
@@ -109,6 +109,9 @@ function CancelOpoDialog({
|
|
|
109
109
|
}) {
|
|
110
110
|
const [reason, setRoason] = useState<string>("");
|
|
111
111
|
const [reasonError, setReasonError] = useState<string>("");
|
|
112
|
+
|
|
113
|
+
const { handleAddMessage } = useSnackbar();
|
|
114
|
+
|
|
112
115
|
return (
|
|
113
116
|
<form>
|
|
114
117
|
<Dialog open={open}>
|
|
@@ -150,10 +153,21 @@ function CancelOpoDialog({
|
|
|
150
153
|
setReasonError("Please provide a reason for the cancellation");
|
|
151
154
|
return;
|
|
152
155
|
}
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
156
|
+
setReasonError("");
|
|
157
|
+
try {
|
|
158
|
+
await cancellationService("opos", orderID, reason);
|
|
159
|
+
handleAddMessage({
|
|
160
|
+
message: "Order cancelled successfully",
|
|
161
|
+
severity: "success",
|
|
162
|
+
});
|
|
163
|
+
revalidateCallback && revalidateCallback();
|
|
164
|
+
handleClose();
|
|
165
|
+
} catch (error) {
|
|
166
|
+
handleAddMessage({
|
|
167
|
+
message: "Error cancelling order",
|
|
168
|
+
severity: "error",
|
|
169
|
+
});
|
|
170
|
+
}
|
|
157
171
|
}}
|
|
158
172
|
>
|
|
159
173
|
Yes
|
|
@@ -4,7 +4,6 @@ import { getAuthToken } from "../get-token";
|
|
|
4
4
|
import { getStrapiURL } from "../../../lib/utils"; //"@/lib/utils";
|
|
5
5
|
import { InvoiceOverwrites } from "../../../types/e-commerce/invoice/types";
|
|
6
6
|
|
|
7
|
-
// TODO move to common services
|
|
8
7
|
export async function confirmationService(
|
|
9
8
|
path: string,
|
|
10
9
|
ids: number[],
|