mozrest-sdk-react-dev 0.2.25 → 0.2.26
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/mozrest-sdk.es.js +11 -10
- package/package.json +1 -1
package/mozrest-sdk.es.js
CHANGED
|
@@ -2133,7 +2133,9 @@ const useFetch = (uri, params, extra) => {
|
|
|
2133
2133
|
return;
|
|
2134
2134
|
setTimeout(() => revalidate({ retryCount }), 5e3);
|
|
2135
2135
|
},
|
|
2136
|
-
onSuccess: (extra == null ? void 0 : extra.onSuccess) || noop$c
|
|
2136
|
+
onSuccess: (extra == null ? void 0 : extra.onSuccess) || noop$c,
|
|
2137
|
+
revalidateOnFocus: false,
|
|
2138
|
+
revalidateOnReconnect: true
|
|
2137
2139
|
});
|
|
2138
2140
|
return {
|
|
2139
2141
|
data: handleFormat(data2, (extra == null ? void 0 : extra.formatData) || noopFormat),
|
|
@@ -96102,25 +96104,25 @@ const UpdateResbook = async ({
|
|
|
96102
96104
|
await instance$1.put(`${BASE_URL}${venue_id}/tables/${table_id}`, formarTableRules(data2));
|
|
96103
96105
|
return { data: "updated" };
|
|
96104
96106
|
case "opHour":
|
|
96105
|
-
instance$1.put(`${BASE_URL}${venue_id}/opening-hours`, formarRegularHours(data2));
|
|
96107
|
+
await instance$1.put(`${BASE_URL}${venue_id}/opening-hours`, formarRegularHours(data2));
|
|
96106
96108
|
return { data: "updated" };
|
|
96107
96109
|
case "arrRule":
|
|
96108
|
-
instance$1.put(`${BASE_URL}${venue_id}/arrival-rules/${table_id}`, formatArrivalRules(data2));
|
|
96110
|
+
await instance$1.put(`${BASE_URL}${venue_id}/arrival-rules/${table_id}`, formatArrivalRules(data2));
|
|
96109
96111
|
return { data: "updated" };
|
|
96110
96112
|
case "seatingRule":
|
|
96111
|
-
instance$1.put(`${BASE_URL}${venue_id}/seating-rules/${table_id}`, formarSeatingRules(data2));
|
|
96113
|
+
await instance$1.put(`${BASE_URL}${venue_id}/seating-rules/${table_id}`, formarSeatingRules(data2));
|
|
96112
96114
|
return { data: "updated" };
|
|
96113
96115
|
case "specialDate":
|
|
96114
96116
|
if (table_id) {
|
|
96115
|
-
instance$1.put(`${BASE_URL}${venue_id}/special-dates/${table_id}`, formarSpecialHours((_a2 = Object.values(data2)[0]) != null ? _a2 : {}));
|
|
96117
|
+
await instance$1.put(`${BASE_URL}${venue_id}/special-dates/${table_id}`, formarSpecialHours((_a2 = Object.values(data2)[0]) != null ? _a2 : {}));
|
|
96116
96118
|
return { data: "updated" };
|
|
96117
96119
|
} else {
|
|
96118
|
-
instance$1.post(`${BASE_URL}${venue_id}/special-dates`, formarSpecialHours((_b = Object.values(data2)[0]) != null ? _b : {}));
|
|
96120
|
+
await instance$1.post(`${BASE_URL}${venue_id}/special-dates`, formarSpecialHours((_b = Object.values(data2)[0]) != null ? _b : {}));
|
|
96119
96121
|
return { data: "created" };
|
|
96120
96122
|
}
|
|
96121
96123
|
case "deleteSpecialDate":
|
|
96122
96124
|
if (table_id) {
|
|
96123
|
-
instance$1.delete(`${BASE_URL}${venue_id}/special-dates/${table_id}`);
|
|
96125
|
+
await instance$1.delete(`${BASE_URL}${venue_id}/special-dates/${table_id}`);
|
|
96124
96126
|
return { data: "deleted" };
|
|
96125
96127
|
} else {
|
|
96126
96128
|
break;
|
|
@@ -96205,9 +96207,8 @@ const Form$3 = ({
|
|
|
96205
96207
|
onCloseForm();
|
|
96206
96208
|
}
|
|
96207
96209
|
});
|
|
96208
|
-
const handleSubmit = (data2) => {
|
|
96209
|
-
execute({ venue_id: venueId, data: data2, module: "opHour" });
|
|
96210
|
-
reload();
|
|
96210
|
+
const handleSubmit = async (data2) => {
|
|
96211
|
+
await execute({ venue_id: venueId, data: data2, module: "opHour" });
|
|
96211
96212
|
};
|
|
96212
96213
|
return /* @__PURE__ */ React__default.createElement(Modal2, {
|
|
96213
96214
|
open,
|