@visns-studio/visns-components 4.10.40 → 4.10.41
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/package.json +1 -1
- package/src/components/crm/Form.jsx +22 -6
package/package.json
CHANGED
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"react-dom": "^17.0.0 || ^18.0.0"
|
|
78
78
|
},
|
|
79
79
|
"name": "@visns-studio/visns-components",
|
|
80
|
-
"version": "4.10.
|
|
80
|
+
"version": "4.10.41",
|
|
81
81
|
"description": "Various packages to assist in the development of our Custom Applications.",
|
|
82
82
|
"main": "src/index.js",
|
|
83
83
|
"files": [
|
|
@@ -269,12 +269,28 @@ function Form({
|
|
|
269
269
|
let contentValue = inputValue[field.trigger.key];
|
|
270
270
|
|
|
271
271
|
if (field.trigger.url && field.trigger.payload) {
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
272
|
+
let setContentPayload;
|
|
273
|
+
|
|
274
|
+
if (field.trigger?.payload?.key?.id) {
|
|
275
|
+
setContentPayload = {
|
|
276
|
+
[field.trigger.payload.key.id]:
|
|
277
|
+
inputValue[field.trigger.payload.value.id],
|
|
278
|
+
[field.trigger.payload.key.content]:
|
|
279
|
+
inputValue[field.trigger.payload.value.content],
|
|
280
|
+
};
|
|
281
|
+
} else {
|
|
282
|
+
setContentPayload = {
|
|
283
|
+
formData: formData,
|
|
284
|
+
[field.trigger.payload.key.content]:
|
|
285
|
+
inputValue[field.trigger.payload.value.content],
|
|
286
|
+
};
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
const res = await CustomFetch(
|
|
290
|
+
field.trigger.url,
|
|
291
|
+
'POST',
|
|
292
|
+
setContentPayload
|
|
293
|
+
);
|
|
278
294
|
|
|
279
295
|
if (res.data.content) {
|
|
280
296
|
contentValue = res.data.content;
|