@drawbridge/components 0.1.28 → 0.1.29
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.
|
@@ -1091,6 +1091,7 @@ const FormOrganizationWorkflowEdit = ({
|
|
|
1091
1091
|
const onSubmit = async ({
|
|
1092
1092
|
steps
|
|
1093
1093
|
}) => {
|
|
1094
|
+
var _a2;
|
|
1094
1095
|
try {
|
|
1095
1096
|
const body = {
|
|
1096
1097
|
steps: steps.map(({ connectionId, discount, enabled, members, message, score, settings: parts, slug, subject, text, type, url }, index) => {
|
|
@@ -1124,6 +1125,10 @@ const FormOrganizationWorkflowEdit = ({
|
|
|
1124
1125
|
endpoint: "/organization/" + (values == null ? void 0 : values.organization) + "/campaign/" + (values == null ? void 0 : values.campaign) + "/workflow/" + event,
|
|
1125
1126
|
method: "PUT"
|
|
1126
1127
|
});
|
|
1128
|
+
(((_a2 = response == null ? void 0 : response.result) == null ? void 0 : _a2.steps) || []).forEach((step, index) => {
|
|
1129
|
+
setValue("steps." + index + ".connectionId", step.connectionId || "");
|
|
1130
|
+
setValue("steps." + index + ".slug", step.slug || "");
|
|
1131
|
+
});
|
|
1127
1132
|
onSuccess(response);
|
|
1128
1133
|
} catch (error) {
|
|
1129
1134
|
onError(error);
|
|
@@ -1038,6 +1038,7 @@ const FormOrganizationWorkflowEdit = ({
|
|
|
1038
1038
|
const onSubmit = async ({
|
|
1039
1039
|
steps
|
|
1040
1040
|
}) => {
|
|
1041
|
+
var _a2;
|
|
1041
1042
|
try {
|
|
1042
1043
|
const body = {
|
|
1043
1044
|
steps: steps.map(({ connectionId, discount, enabled, members, message, score, settings: parts, slug, subject, text, type, url }, index) => {
|
|
@@ -1071,6 +1072,10 @@ const FormOrganizationWorkflowEdit = ({
|
|
|
1071
1072
|
endpoint: "/organization/" + (values == null ? void 0 : values.organization) + "/campaign/" + (values == null ? void 0 : values.campaign) + "/workflow/" + event,
|
|
1072
1073
|
method: "PUT"
|
|
1073
1074
|
});
|
|
1075
|
+
(((_a2 = response == null ? void 0 : response.result) == null ? void 0 : _a2.steps) || []).forEach((step, index) => {
|
|
1076
|
+
setValue("steps." + index + ".connectionId", step.connectionId || "");
|
|
1077
|
+
setValue("steps." + index + ".slug", step.slug || "");
|
|
1078
|
+
});
|
|
1074
1079
|
onSuccess(response);
|
|
1075
1080
|
} catch (error) {
|
|
1076
1081
|
onError(error);
|