mozrest-sdk-react-dev 0.3.18 → 0.3.20
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 +12 -4
- package/package.json +1 -1
package/mozrest-sdk.es.js
CHANGED
|
@@ -124509,10 +124509,11 @@ const ChannelCard = ({
|
|
|
124509
124509
|
});
|
|
124510
124510
|
};
|
|
124511
124511
|
const GetConnectedBookingChannels$1 = async () => {
|
|
124512
|
+
var _a2;
|
|
124512
124513
|
const data2 = await instance$1.get(
|
|
124513
124514
|
`/company/booking-channels/connected`
|
|
124514
124515
|
);
|
|
124515
|
-
return data2.data;
|
|
124516
|
+
return (_a2 = data2 == null ? void 0 : data2.data) == null ? void 0 : _a2.filter((channel) => !(channel == null ? void 0 : channel.internal));
|
|
124516
124517
|
};
|
|
124517
124518
|
const GetBookingChannels = async ({ params }) => {
|
|
124518
124519
|
const data2 = await instance$1.get(
|
|
@@ -125975,9 +125976,14 @@ const Chart = ({
|
|
|
125975
125976
|
};
|
|
125976
125977
|
if (day2.reservationPortal) {
|
|
125977
125978
|
day2.reservationPortal.map((rp) => {
|
|
125979
|
+
const source2 = sources2.find((s2) => s2.code === rp.name);
|
|
125980
|
+
const sourceName = (source2 == null ? void 0 : source2.name) || rp.name;
|
|
125981
|
+
const displayName = sourceName === "Resbook" ? "Widget" : sourceName;
|
|
125982
|
+
const sourceCode = (source2 == null ? void 0 : source2.code) || rp.name;
|
|
125978
125983
|
info = {
|
|
125979
125984
|
...info,
|
|
125980
|
-
[
|
|
125985
|
+
[sourceCode]: rp.total,
|
|
125986
|
+
[`${sourceCode}_name`]: displayName
|
|
125981
125987
|
};
|
|
125982
125988
|
});
|
|
125983
125989
|
info = {
|
|
@@ -125988,10 +125994,10 @@ const Chart = ({
|
|
|
125988
125994
|
}
|
|
125989
125995
|
});
|
|
125990
125996
|
setStatsToDisplay(by === "day" ? elements : populateStatsBy(elements, by));
|
|
125991
|
-
}, [dataCollection, displayType, displayConcept, displayBy]);
|
|
125997
|
+
}, [dataCollection, displayType, displayConcept, displayBy, sources2]);
|
|
125992
125998
|
useEffect(() => {
|
|
125993
125999
|
calculateStats();
|
|
125994
|
-
}, [dataCollection, displayType, displayConcept, displayBy]);
|
|
126000
|
+
}, [dataCollection, displayType, displayConcept, displayBy, sources2]);
|
|
125995
126001
|
useEffect(() => {
|
|
125996
126002
|
if (params && (params == null ? void 0 : params["filters[from]"]) && (params == null ? void 0 : params["filters[till]"])) {
|
|
125997
126003
|
setDataCollection({});
|
|
@@ -126082,8 +126088,10 @@ const Chart = ({
|
|
|
126082
126088
|
border: "1px solid var(--moz-cta-content-sec-bg)"
|
|
126083
126089
|
}
|
|
126084
126090
|
}), sources2.map((src) => {
|
|
126091
|
+
const displayName = src.name === "Resbook" ? "Widget" : src.name;
|
|
126085
126092
|
return /* @__PURE__ */ jsx$1(Bar, {
|
|
126086
126093
|
dataKey: src.code,
|
|
126094
|
+
name: displayName,
|
|
126087
126095
|
stackId: "a",
|
|
126088
126096
|
fill: src.hubDisplayColor ?? getColor(src.code)
|
|
126089
126097
|
}, src.id);
|