@drawbridge/components 0.1.27 → 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);
|
|
@@ -158,6 +158,14 @@ const TemplateSocketCampaign = ({
|
|
|
158
158
|
};
|
|
159
159
|
}
|
|
160
160
|
);
|
|
161
|
+
if (leads) {
|
|
162
|
+
queryClient.invalidateQueries({
|
|
163
|
+
queryKey: ["campaign-sections", {
|
|
164
|
+
campaign: params == null ? void 0 : params.campaign
|
|
165
|
+
}]
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
;
|
|
161
169
|
},
|
|
162
170
|
"campaign.advertisements": () => {
|
|
163
171
|
queryClient.invalidateQueries({
|
|
@@ -186,6 +194,9 @@ const TemplateSocketCampaign = ({
|
|
|
186
194
|
// the room after any time away has the same blind spot as an outage.
|
|
187
195
|
resync: [
|
|
188
196
|
["campaign", params == null ? void 0 : params.campaign],
|
|
197
|
+
["campaign-sections", {
|
|
198
|
+
campaign: params == null ? void 0 : params.campaign
|
|
199
|
+
}],
|
|
189
200
|
["campaign-advertisements", params == null ? void 0 : params.organization, params == null ? void 0 : params.campaign],
|
|
190
201
|
["organization-campaign-advertisement"],
|
|
191
202
|
["organization-campaign-prizes", params == null ? void 0 : params.organization, params == null ? void 0 : params.campaign]
|
|
@@ -123,6 +123,14 @@ const TemplateSocketCampaign = ({
|
|
|
123
123
|
};
|
|
124
124
|
}
|
|
125
125
|
);
|
|
126
|
+
if (leads) {
|
|
127
|
+
queryClient.invalidateQueries({
|
|
128
|
+
queryKey: ["campaign-sections", {
|
|
129
|
+
campaign: params == null ? void 0 : params.campaign
|
|
130
|
+
}]
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
;
|
|
126
134
|
},
|
|
127
135
|
"campaign.advertisements": () => {
|
|
128
136
|
queryClient.invalidateQueries({
|
|
@@ -151,6 +159,9 @@ const TemplateSocketCampaign = ({
|
|
|
151
159
|
// the room after any time away has the same blind spot as an outage.
|
|
152
160
|
resync: [
|
|
153
161
|
["campaign", params == null ? void 0 : params.campaign],
|
|
162
|
+
["campaign-sections", {
|
|
163
|
+
campaign: params == null ? void 0 : params.campaign
|
|
164
|
+
}],
|
|
154
165
|
["campaign-advertisements", params == null ? void 0 : params.organization, params == null ? void 0 : params.campaign],
|
|
155
166
|
["organization-campaign-advertisement"],
|
|
156
167
|
["organization-campaign-prizes", params == null ? void 0 : params.organization, params == null ? void 0 : params.campaign]
|