mozrest-sdk-react-dev 0.2.80 → 0.2.82
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 +205 -69
- package/package.json +1 -1
- package/style.css +1 -1
package/mozrest-sdk.es.js
CHANGED
|
@@ -28756,7 +28756,7 @@ var now_1 = now$1;
|
|
|
28756
28756
|
var isObject$c = isObject_1, now = now_1, toNumber = toNumber_1;
|
|
28757
28757
|
var FUNC_ERROR_TEXT$3 = "Expected a function";
|
|
28758
28758
|
var nativeMax$3 = Math.max, nativeMin = Math.min;
|
|
28759
|
-
function debounce$
|
|
28759
|
+
function debounce$2(func, wait, options2) {
|
|
28760
28760
|
var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
|
|
28761
28761
|
if (typeof func != "function") {
|
|
28762
28762
|
throw new TypeError(FUNC_ERROR_TEXT$3);
|
|
@@ -28837,7 +28837,7 @@ function debounce$1(func, wait, options2) {
|
|
|
28837
28837
|
debounced.flush = flush;
|
|
28838
28838
|
return debounced;
|
|
28839
28839
|
}
|
|
28840
|
-
var debounce_1 = debounce$
|
|
28840
|
+
var debounce_1 = debounce$2;
|
|
28841
28841
|
var RowContext = /* @__PURE__ */ createContext({});
|
|
28842
28842
|
var RowContext$1 = RowContext;
|
|
28843
28843
|
var __rest$7 = globalThis && globalThis.__rest || function(s2, e3) {
|
|
@@ -53997,6 +53997,9 @@ const Notifications = ({
|
|
|
53997
53997
|
cacheId: `user-data`
|
|
53998
53998
|
}
|
|
53999
53999
|
);
|
|
54000
|
+
const showAiPrompt = userData2 == null ? void 0 : userData2.roles.some(
|
|
54001
|
+
(role) => role === "ROLE_COMPANY_SUPER_ADMIN" || role === "ROLE_COMPANY_SUPER_ADMIN_BOT"
|
|
54002
|
+
);
|
|
54000
54003
|
const _reload = () => {
|
|
54001
54004
|
reload();
|
|
54002
54005
|
};
|
|
@@ -54078,7 +54081,7 @@ const Notifications = ({
|
|
|
54078
54081
|
className: styles$1D.item
|
|
54079
54082
|
}, /* @__PURE__ */ React__default.createElement("div", null, /* @__PURE__ */ React__default.createElement(Icon$2, {
|
|
54080
54083
|
icon: "mail"
|
|
54081
|
-
})), t2("NOTDEFINED"))), ((_a3 = userData2 == null ? void 0 : userData2.data) == null ? void 0 : _a3.company) && /* @__PURE__ */ React__default.createElement(Card, {
|
|
54084
|
+
})), t2("NOTDEFINED"))), ((_a3 = userData2 == null ? void 0 : userData2.data) == null ? void 0 : _a3.company) && showAiPrompt && /* @__PURE__ */ React__default.createElement(Card, {
|
|
54082
54085
|
header: {
|
|
54083
54086
|
title: t2("AIPROMPT"),
|
|
54084
54087
|
icon: "edit",
|
|
@@ -74729,7 +74732,7 @@ var findIndex_1 = findIndex$2;
|
|
|
74729
74732
|
var createFind = _createFind, findIndex$1 = findIndex_1;
|
|
74730
74733
|
var find2 = createFind(findIndex$1);
|
|
74731
74734
|
var find_1 = find2;
|
|
74732
|
-
var debounce = debounce_1, isObject$2 = isObject_1;
|
|
74735
|
+
var debounce$1 = debounce_1, isObject$2 = isObject_1;
|
|
74733
74736
|
var FUNC_ERROR_TEXT = "Expected a function";
|
|
74734
74737
|
function throttle(func, wait, options2) {
|
|
74735
74738
|
var leading = true, trailing = true;
|
|
@@ -74740,7 +74743,7 @@ function throttle(func, wait, options2) {
|
|
|
74740
74743
|
leading = "leading" in options2 ? !!options2.leading : leading;
|
|
74741
74744
|
trailing = "trailing" in options2 ? !!options2.trailing : trailing;
|
|
74742
74745
|
}
|
|
74743
|
-
return debounce(func, wait, {
|
|
74746
|
+
return debounce$1(func, wait, {
|
|
74744
74747
|
"leading": leading,
|
|
74745
74748
|
"maxWait": wait,
|
|
74746
74749
|
"trailing": trailing
|
|
@@ -103089,46 +103092,59 @@ const ReservationsAnalytics = ({ userEmail, userFullName }) => {
|
|
|
103089
103092
|
totalDays
|
|
103090
103093
|
}));
|
|
103091
103094
|
};
|
|
103092
|
-
const mainConatiner$2 = "
|
|
103093
|
-
const mainTableContainer = "
|
|
103094
|
-
const mainSidebarContainer = "
|
|
103095
|
-
const
|
|
103096
|
-
const
|
|
103097
|
-
const
|
|
103098
|
-
const
|
|
103099
|
-
const
|
|
103100
|
-
const
|
|
103101
|
-
const
|
|
103102
|
-
const
|
|
103103
|
-
const
|
|
103104
|
-
const
|
|
103105
|
-
const
|
|
103106
|
-
const
|
|
103107
|
-
const
|
|
103108
|
-
const
|
|
103109
|
-
const
|
|
103110
|
-
const
|
|
103111
|
-
const
|
|
103112
|
-
const
|
|
103113
|
-
const
|
|
103114
|
-
const
|
|
103115
|
-
const
|
|
103116
|
-
const
|
|
103117
|
-
const
|
|
103118
|
-
const
|
|
103119
|
-
const
|
|
103095
|
+
const mainConatiner$2 = "_mainConatiner_1kgdn_48";
|
|
103096
|
+
const mainTableContainer = "_mainTableContainer_1kgdn_58";
|
|
103097
|
+
const mainSidebarContainer = "_mainSidebarContainer_1kgdn_66";
|
|
103098
|
+
const sidebarCloseIcon = "_sidebarCloseIcon_1kgdn_76";
|
|
103099
|
+
const headerContainer = "_headerContainer_1kgdn_128";
|
|
103100
|
+
const searchContainer = "_searchContainer_1kgdn_134";
|
|
103101
|
+
const buttonList = "_buttonList_1kgdn_142";
|
|
103102
|
+
const buttonItem = "_buttonItem_1kgdn_147";
|
|
103103
|
+
const tableTopHeader = "_tableTopHeader_1kgdn_157";
|
|
103104
|
+
const tableTopHeaderContent = "_tableTopHeaderContent_1kgdn_171";
|
|
103105
|
+
const tableTopHeaderContentText = "_tableTopHeaderContentText_1kgdn_178";
|
|
103106
|
+
const tableRowContainer = "_tableRowContainer_1kgdn_187";
|
|
103107
|
+
const tableRowCard = "_tableRowCard_1kgdn_193";
|
|
103108
|
+
const noData = "_noData_1kgdn_198";
|
|
103109
|
+
const tableRowHour = "_tableRowHour_1kgdn_205";
|
|
103110
|
+
const tableRowHourText = "_tableRowHourText_1kgdn_221";
|
|
103111
|
+
const hours = "_hours_1kgdn_229";
|
|
103112
|
+
const tableRowContent = "_tableRowContent_1kgdn_235";
|
|
103113
|
+
const rowImage = "_rowImage_1kgdn_250";
|
|
103114
|
+
const rowContactContainer = "_rowContactContainer_1kgdn_264";
|
|
103115
|
+
const rowContactText = "_rowContactText_1kgdn_276";
|
|
103116
|
+
const rowContactPhone = "_rowContactPhone_1kgdn_282";
|
|
103117
|
+
const rowSectionContainer = "_rowSectionContainer_1kgdn_289";
|
|
103118
|
+
const rowSectionText = "_rowSectionText_1kgdn_295";
|
|
103119
|
+
const rowSectionSecText = "_rowSectionSecText_1kgdn_301";
|
|
103120
|
+
const rowActionButton = "_rowActionButton_1kgdn_308";
|
|
103121
|
+
const bookingInfoContainer = "_bookingInfoContainer_1kgdn_314";
|
|
103122
|
+
const bookingInfoCardRow = "_bookingInfoCardRow_1kgdn_318";
|
|
103123
|
+
const bookingInfoCardContainer = "_bookingInfoCardContainer_1kgdn_326";
|
|
103124
|
+
const bookingInfoCard = "_bookingInfoCard_1kgdn_318";
|
|
103125
|
+
const bookingInfoCardContent = "_bookingInfoCardContent_1kgdn_338";
|
|
103126
|
+
const bookingInfoCardTitle = "_bookingInfoCardTitle_1kgdn_344";
|
|
103127
|
+
const bookingInfoCardText = "_bookingInfoCardText_1kgdn_347";
|
|
103120
103128
|
var styles$l = {
|
|
103121
103129
|
mainConatiner: mainConatiner$2,
|
|
103122
103130
|
mainTableContainer,
|
|
103123
103131
|
mainSidebarContainer,
|
|
103132
|
+
sidebarCloseIcon,
|
|
103133
|
+
"mainSidebarContainer--open": "_mainSidebarContainer--open_1kgdn_84",
|
|
103134
|
+
"mainSidebarContainer--close": "_mainSidebarContainer--close_1kgdn_90",
|
|
103135
|
+
"sidebarCloseIcon--show": "_sidebarCloseIcon--show_1kgdn_98",
|
|
103124
103136
|
headerContainer,
|
|
103137
|
+
searchContainer,
|
|
103125
103138
|
buttonList,
|
|
103139
|
+
buttonItem,
|
|
103126
103140
|
tableTopHeader,
|
|
103127
103141
|
tableTopHeaderContent,
|
|
103142
|
+
tableTopHeaderContentText,
|
|
103128
103143
|
tableRowContainer,
|
|
103129
103144
|
tableRowCard,
|
|
103130
103145
|
noData,
|
|
103131
103146
|
tableRowHour,
|
|
103147
|
+
tableRowHourText,
|
|
103132
103148
|
hours,
|
|
103133
103149
|
tableRowContent,
|
|
103134
103150
|
rowImage,
|
|
@@ -106668,6 +106684,7 @@ const Input2 = ({
|
|
|
106668
106684
|
borderLess = false,
|
|
106669
106685
|
rounded = false,
|
|
106670
106686
|
customStyles: customStyles2,
|
|
106687
|
+
className,
|
|
106671
106688
|
...props
|
|
106672
106689
|
}) => {
|
|
106673
106690
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
@@ -106700,7 +106717,8 @@ const Input2 = ({
|
|
|
106700
106717
|
}), icon2 && /* @__PURE__ */ React__default.createElement("div", {
|
|
106701
106718
|
className: classNames$2(
|
|
106702
106719
|
styles$e["inputIcon"],
|
|
106703
|
-
styles$e[`inputIcon--p-${iconPosition}`]
|
|
106720
|
+
styles$e[`inputIcon--p-${iconPosition}`],
|
|
106721
|
+
className ? className : ""
|
|
106704
106722
|
)
|
|
106705
106723
|
}, /* @__PURE__ */ React__default.createElement(Icon, {
|
|
106706
106724
|
icon: icon2,
|
|
@@ -106797,8 +106815,26 @@ const SelectedBookingProvider = ({ children }) => {
|
|
|
106797
106815
|
value: { selectedBooking, setSelectedBooking }
|
|
106798
106816
|
}, children);
|
|
106799
106817
|
};
|
|
106818
|
+
const debounce = (func, delay) => {
|
|
106819
|
+
let timeoutId;
|
|
106820
|
+
return (...args) => {
|
|
106821
|
+
clearTimeout(timeoutId);
|
|
106822
|
+
timeoutId = setTimeout(() => func(...args), delay);
|
|
106823
|
+
};
|
|
106824
|
+
};
|
|
106825
|
+
const ShowSidebarContext = createContext(false);
|
|
106826
|
+
const useShowSidebarContext = () => {
|
|
106827
|
+
return useContext(ShowSidebarContext);
|
|
106828
|
+
};
|
|
106829
|
+
const ShowSidebarProvider = ({ children }) => {
|
|
106830
|
+
const [showSidebar, setShowSidebar] = useState(false);
|
|
106831
|
+
return /* @__PURE__ */ React__default.createElement(ShowSidebarContext.Provider, {
|
|
106832
|
+
value: { showSidebar, setShowSidebar }
|
|
106833
|
+
}, children);
|
|
106834
|
+
};
|
|
106800
106835
|
const index$c = ({ filters: filters2, setFilters }) => {
|
|
106801
106836
|
const { t: t2 } = useTranslation();
|
|
106837
|
+
const { showSidebar, setShowSidebar } = useShowSidebarContext();
|
|
106802
106838
|
const { selectedBooking, setSelectedBooking } = useSelectedBookingContext();
|
|
106803
106839
|
const [datePickerOpen, setDatePickerOpen] = useState(false);
|
|
106804
106840
|
const datePickerRef = useRef(null);
|
|
@@ -106854,14 +106890,25 @@ const index$c = ({ filters: filters2, setFilters }) => {
|
|
|
106854
106890
|
setValue2("fromDate", dateString);
|
|
106855
106891
|
setDatePickerOpen(false);
|
|
106856
106892
|
};
|
|
106893
|
+
const debouncedCriteriaUpdate = useCallback(
|
|
106894
|
+
debounce((criteriaValue) => {
|
|
106895
|
+
setFilters((prevFilters) => ({
|
|
106896
|
+
...prevFilters,
|
|
106897
|
+
criteria: criteriaValue
|
|
106898
|
+
}));
|
|
106899
|
+
}, 500),
|
|
106900
|
+
[setFilters]
|
|
106901
|
+
);
|
|
106857
106902
|
useEffect(() => {
|
|
106858
|
-
setFilters({
|
|
106859
|
-
...
|
|
106860
|
-
|
|
106861
|
-
commingUp
|
|
106862
|
-
|
|
106863
|
-
|
|
106864
|
-
|
|
106903
|
+
setFilters((prevFilters) => ({
|
|
106904
|
+
...prevFilters,
|
|
106905
|
+
fromDate,
|
|
106906
|
+
commingUp
|
|
106907
|
+
}));
|
|
106908
|
+
}, [fromDate, commingUp, setFilters]);
|
|
106909
|
+
useEffect(() => {
|
|
106910
|
+
debouncedCriteriaUpdate(criteria);
|
|
106911
|
+
}, [criteria, debouncedCriteriaUpdate]);
|
|
106865
106912
|
useEffect(() => {
|
|
106866
106913
|
function handleDocumentClick(event) {
|
|
106867
106914
|
var _a2, _b;
|
|
@@ -106876,6 +106923,8 @@ const index$c = ({ filters: filters2, setFilters }) => {
|
|
|
106876
106923
|
}, []);
|
|
106877
106924
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
106878
106925
|
className: styles$l.headerContainer
|
|
106926
|
+
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
106927
|
+
className: styles$l.searchContainer
|
|
106879
106928
|
}, /* @__PURE__ */ React__default.createElement(TextInputField, {
|
|
106880
106929
|
control,
|
|
106881
106930
|
id: "criteria",
|
|
@@ -106891,16 +106940,19 @@ const index$c = ({ filters: filters2, setFilters }) => {
|
|
|
106891
106940
|
borderLess: true,
|
|
106892
106941
|
rounded: true,
|
|
106893
106942
|
customStyles: { backgroundColor: "#2F3349" }
|
|
106894
|
-
}), /* @__PURE__ */ React__default.createElement("div", {
|
|
106943
|
+
})), /* @__PURE__ */ React__default.createElement("div", {
|
|
106895
106944
|
className: styles$l.buttonList
|
|
106896
106945
|
}, /* @__PURE__ */ React__default.createElement(Button, {
|
|
106897
106946
|
mode: "tertiary",
|
|
106947
|
+
className: styles$l.buttonItem,
|
|
106898
106948
|
onClick: () => selectDate("commingUp")
|
|
106899
106949
|
}, t2("COMMINGUP")), /* @__PURE__ */ React__default.createElement(Button, {
|
|
106900
106950
|
mode: "tertiary",
|
|
106951
|
+
className: styles$l.buttonItem,
|
|
106901
106952
|
onClick: () => selectDate("today")
|
|
106902
106953
|
}, t2("TODAY")), /* @__PURE__ */ React__default.createElement(Button, {
|
|
106903
106954
|
mode: "tertiary",
|
|
106955
|
+
className: styles$l.buttonItem,
|
|
106904
106956
|
onClick: () => selectDate("tomorrow")
|
|
106905
106957
|
}, t2("TOMORROW")), /* @__PURE__ */ React__default.createElement("div", {
|
|
106906
106958
|
style: { display: "flex", flexDirection: "column", justifyContent: "center" }
|
|
@@ -106911,6 +106963,7 @@ const index$c = ({ filters: filters2, setFilters }) => {
|
|
|
106911
106963
|
ref: datePickerRef,
|
|
106912
106964
|
onChange: onChange3,
|
|
106913
106965
|
open: datePickerOpen,
|
|
106966
|
+
showToday: false,
|
|
106914
106967
|
style: {
|
|
106915
106968
|
marginTop: "30px",
|
|
106916
106969
|
width: 0,
|
|
@@ -106918,10 +106971,34 @@ const index$c = ({ filters: filters2, setFilters }) => {
|
|
|
106918
106971
|
opacity: 0,
|
|
106919
106972
|
position: "absolute",
|
|
106920
106973
|
pointerEvents: "none"
|
|
106921
|
-
}
|
|
106974
|
+
},
|
|
106975
|
+
renderExtraFooter: () => /* @__PURE__ */ React__default.createElement("div", {
|
|
106976
|
+
className: "ant-custom-footer"
|
|
106977
|
+
}, /* @__PURE__ */ React__default.createElement("button", {
|
|
106978
|
+
className: "ant-button",
|
|
106979
|
+
onClick: () => {
|
|
106980
|
+
selectDate("commingUp");
|
|
106981
|
+
setDatePickerOpen(false);
|
|
106982
|
+
}
|
|
106983
|
+
}, t2("COMMINGUP")), /* @__PURE__ */ React__default.createElement("button", {
|
|
106984
|
+
className: "ant-button",
|
|
106985
|
+
onClick: () => {
|
|
106986
|
+
selectDate("today");
|
|
106987
|
+
setDatePickerOpen(false);
|
|
106988
|
+
}
|
|
106989
|
+
}, t2("TODAY")), /* @__PURE__ */ React__default.createElement("button", {
|
|
106990
|
+
className: "ant-button",
|
|
106991
|
+
onClick: () => {
|
|
106992
|
+
selectDate("tomorrow");
|
|
106993
|
+
setDatePickerOpen(false);
|
|
106994
|
+
}
|
|
106995
|
+
}, t2("TOMORROW")))
|
|
106922
106996
|
})), /* @__PURE__ */ React__default.createElement(Button, {
|
|
106923
106997
|
mode: "success",
|
|
106924
|
-
onClick: () =>
|
|
106998
|
+
onClick: () => {
|
|
106999
|
+
setSelectedBooking(null);
|
|
107000
|
+
setShowSidebar(true);
|
|
107001
|
+
}
|
|
106925
107002
|
}, t2("ADDRESERVATION"))));
|
|
106926
107003
|
};
|
|
106927
107004
|
const injectStyles = () => {
|
|
@@ -107005,6 +107082,24 @@ const injectStyles = () => {
|
|
|
107005
107082
|
.ant-picker-today-btn:hover {
|
|
107006
107083
|
background-color: #4C4F64 !important;
|
|
107007
107084
|
}
|
|
107085
|
+
|
|
107086
|
+
.ant-custom-footer {
|
|
107087
|
+
display: flex;
|
|
107088
|
+
justify-content: space-around;
|
|
107089
|
+
padding: 8px;
|
|
107090
|
+
background: #2F3349;
|
|
107091
|
+
}
|
|
107092
|
+
.ant-custom-footer button {
|
|
107093
|
+
color: white;
|
|
107094
|
+
background: #4C4F64;
|
|
107095
|
+
border: none;
|
|
107096
|
+
padding: 6px 12px;
|
|
107097
|
+
border-radius: 4px;
|
|
107098
|
+
cursor: pointer;
|
|
107099
|
+
}
|
|
107100
|
+
.ant-custom-footer button:hover {
|
|
107101
|
+
background: #3A3D54;
|
|
107102
|
+
}
|
|
107008
107103
|
`;
|
|
107009
107104
|
document.head.appendChild(styleElement);
|
|
107010
107105
|
};
|
|
@@ -107051,6 +107146,7 @@ const TableRow = ({ item: item2, filtersData, venueId }) => {
|
|
|
107051
107146
|
var _a2, _b, _c, _d;
|
|
107052
107147
|
const { t: t2 } = useTranslation();
|
|
107053
107148
|
const { reload: reloadMainTable } = useReloadContext();
|
|
107149
|
+
const { showSidebar, setShowSidebar } = useShowSidebarContext();
|
|
107054
107150
|
const { selectedBooking, setSelectedBooking } = useSelectedBookingContext();
|
|
107055
107151
|
const { execute } = useService(UpdateBookingStatusBooking, {
|
|
107056
107152
|
onSuccess: async () => {
|
|
@@ -107117,10 +107213,15 @@ const TableRow = ({ item: item2, filtersData, venueId }) => {
|
|
|
107117
107213
|
className: styles$l.tableRowCard
|
|
107118
107214
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
107119
107215
|
style: { display: "flex", cursor: "pointer" },
|
|
107120
|
-
onClick: () =>
|
|
107216
|
+
onClick: () => {
|
|
107217
|
+
setSelectedBooking(item2);
|
|
107218
|
+
setShowSidebar(true);
|
|
107219
|
+
}
|
|
107121
107220
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
107122
107221
|
className: styles$l.tableRowHour
|
|
107123
|
-
}, /* @__PURE__ */ React__default.createElement("h2",
|
|
107222
|
+
}, /* @__PURE__ */ React__default.createElement("h2", {
|
|
107223
|
+
className: styles$l.tableRowHourText
|
|
107224
|
+
}, /* @__PURE__ */ React__default.createElement(TimeFormat, {
|
|
107124
107225
|
currentTimeZone: filtersData == null ? void 0 : filtersData.timeZone,
|
|
107125
107226
|
dateTime: item2 == null ? void 0 : item2.date
|
|
107126
107227
|
}))), /* @__PURE__ */ React__default.createElement("div", {
|
|
@@ -107193,7 +107294,11 @@ const TableBody = ({ data: data2, filtersData, venueId }) => {
|
|
|
107193
107294
|
key: key2
|
|
107194
107295
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
107195
107296
|
className: styles$l.tableTopHeaderContent
|
|
107196
|
-
}, /* @__PURE__ */ React__default.createElement("h2",
|
|
107297
|
+
}, /* @__PURE__ */ React__default.createElement("h2", {
|
|
107298
|
+
className: styles$l.tableTopHeaderContentText
|
|
107299
|
+
}, key2), /* @__PURE__ */ React__default.createElement("h2", {
|
|
107300
|
+
className: styles$l.tableTopHeaderContentText
|
|
107301
|
+
}, group.length, " ", t2("RESERVATIONS"))), /* @__PURE__ */ React__default.createElement("div", {
|
|
107197
107302
|
className: styles$l.tableRowContainer
|
|
107198
107303
|
}, group.map((item2) => {
|
|
107199
107304
|
return /* @__PURE__ */ React__default.createElement(TableRow, {
|
|
@@ -107536,8 +107641,21 @@ const BookingInfo = ({ item: item2 }) => {
|
|
|
107536
107641
|
};
|
|
107537
107642
|
const Header = () => {
|
|
107538
107643
|
const { t: t2 } = useTranslation();
|
|
107644
|
+
const { showSidebar, setShowSidebar } = useShowSidebarContext();
|
|
107539
107645
|
const { selectedBooking } = useSelectedBookingContext();
|
|
107540
|
-
return /* @__PURE__ */ React__default.createElement("div", null, /* @__PURE__ */ React__default.createElement("
|
|
107646
|
+
return /* @__PURE__ */ React__default.createElement("div", null, /* @__PURE__ */ React__default.createElement("div", {
|
|
107647
|
+
style: { display: "flex", justifyContent: "space-between", alignItems: "center" }
|
|
107648
|
+
}, /* @__PURE__ */ React__default.createElement("h3", null, t2(selectedBooking ? "UPDATERESERVATION" : "ADDRESERVATION")), /* @__PURE__ */ React__default.createElement(Icon, {
|
|
107649
|
+
className: classNames$2(
|
|
107650
|
+
styles$l["sidebarCloseIcon"],
|
|
107651
|
+
showSidebar ? styles$l["sidebarCloseIcon--show"] : ""
|
|
107652
|
+
),
|
|
107653
|
+
icon: "close",
|
|
107654
|
+
size: "small",
|
|
107655
|
+
onClick: () => {
|
|
107656
|
+
setShowSidebar(!showSidebar);
|
|
107657
|
+
}
|
|
107658
|
+
})), /* @__PURE__ */ React__default.createElement("hr", {
|
|
107541
107659
|
style: { width: "100%", marginTop: 15 }
|
|
107542
107660
|
}));
|
|
107543
107661
|
};
|
|
@@ -107885,6 +108003,7 @@ const index$a = ({ filtersData, venueId }) => {
|
|
|
107885
108003
|
};
|
|
107886
108004
|
function MainComponent({ venueId }) {
|
|
107887
108005
|
const [currentVenue, setCurrentVenue] = useState(null);
|
|
108006
|
+
const { showSidebar, setShowSidebar } = useShowSidebarContext();
|
|
107888
108007
|
const [filters2, setFilters] = useState({
|
|
107889
108008
|
fromDate: hooks().format("YYYY-MM-DD")
|
|
107890
108009
|
});
|
|
@@ -107930,6 +108049,20 @@ function MainComponent({ venueId }) {
|
|
|
107930
108049
|
reloadSelectsData();
|
|
107931
108050
|
}
|
|
107932
108051
|
}, [selectedBooking]);
|
|
108052
|
+
useEffect(() => {
|
|
108053
|
+
function handleOutsideClick(event) {
|
|
108054
|
+
const sidebarElement = document.querySelector(`.${styles$l.mainSidebarContainer}`);
|
|
108055
|
+
if (sidebarElement && !sidebarElement.contains(event.target)) {
|
|
108056
|
+
setShowSidebar(false);
|
|
108057
|
+
}
|
|
108058
|
+
}
|
|
108059
|
+
if (showSidebar) {
|
|
108060
|
+
document.addEventListener("mousedown", handleOutsideClick);
|
|
108061
|
+
}
|
|
108062
|
+
return () => {
|
|
108063
|
+
document.removeEventListener("mousedown", handleOutsideClick);
|
|
108064
|
+
};
|
|
108065
|
+
}, [showSidebar, setShowSidebar]);
|
|
107933
108066
|
return /* @__PURE__ */ React__default.createElement(ReloadProvider, {
|
|
107934
108067
|
reload
|
|
107935
108068
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
@@ -107945,36 +108078,39 @@ function MainComponent({ venueId }) {
|
|
|
107945
108078
|
filtersData,
|
|
107946
108079
|
venueId
|
|
107947
108080
|
})), /* @__PURE__ */ React__default.createElement("div", {
|
|
107948
|
-
className:
|
|
108081
|
+
className: classNames$2(
|
|
108082
|
+
styles$l.mainSidebarContainer,
|
|
108083
|
+
showSidebar ? styles$l[`mainSidebarContainer--open`] : "styles[`mainSidebarContainer--close`]"
|
|
108084
|
+
)
|
|
107949
108085
|
}, /* @__PURE__ */ React__default.createElement(index$a, {
|
|
107950
108086
|
filtersData,
|
|
107951
108087
|
venueId
|
|
107952
108088
|
}))));
|
|
107953
108089
|
}
|
|
107954
108090
|
function Main$2({ venueId }) {
|
|
107955
|
-
return /* @__PURE__ */ React__default.createElement(SelectedBookingProvider, null, /* @__PURE__ */ React__default.createElement(MainComponent, {
|
|
108091
|
+
return /* @__PURE__ */ React__default.createElement(SelectedBookingProvider, null, /* @__PURE__ */ React__default.createElement(ShowSidebarProvider, null, /* @__PURE__ */ React__default.createElement(MainComponent, {
|
|
107956
108092
|
venueId
|
|
107957
|
-
}));
|
|
108093
|
+
})));
|
|
107958
108094
|
}
|
|
107959
|
-
const mainConatiner$1 = "
|
|
107960
|
-
const header$3 = "
|
|
107961
|
-
const content$1 = "
|
|
107962
|
-
const textSecondary$1 = "
|
|
107963
|
-
const sectionCard$1 = "
|
|
107964
|
-
const cardHeader$1 = "
|
|
107965
|
-
const cardTitle$1 = "
|
|
107966
|
-
const cardDesc$1 = "
|
|
107967
|
-
const cardBody$1 = "
|
|
107968
|
-
const cardFooter$1 = "
|
|
107969
|
-
const cardFooterContent$1 = "
|
|
107970
|
-
const sectionManagement$1 = "
|
|
107971
|
-
const sectionFormRow$1 = "
|
|
107972
|
-
const drawerContent$1 = "
|
|
107973
|
-
const scrollableForm$1 = "
|
|
107974
|
-
const fixedActions$1 = "
|
|
108095
|
+
const mainConatiner$1 = "_mainConatiner_au98t_70";
|
|
108096
|
+
const header$3 = "_header_au98t_81";
|
|
108097
|
+
const content$1 = "_content_au98t_87";
|
|
108098
|
+
const textSecondary$1 = "_textSecondary_au98t_96";
|
|
108099
|
+
const sectionCard$1 = "_sectionCard_au98t_100";
|
|
108100
|
+
const cardHeader$1 = "_cardHeader_au98t_105";
|
|
108101
|
+
const cardTitle$1 = "_cardTitle_au98t_108";
|
|
108102
|
+
const cardDesc$1 = "_cardDesc_au98t_112";
|
|
108103
|
+
const cardBody$1 = "_cardBody_au98t_116";
|
|
108104
|
+
const cardFooter$1 = "_cardFooter_au98t_120";
|
|
108105
|
+
const cardFooterContent$1 = "_cardFooterContent_au98t_120";
|
|
108106
|
+
const sectionManagement$1 = "_sectionManagement_au98t_130";
|
|
108107
|
+
const sectionFormRow$1 = "_sectionFormRow_au98t_130";
|
|
108108
|
+
const drawerContent$1 = "_drawerContent_au98t_137";
|
|
108109
|
+
const scrollableForm$1 = "_scrollableForm_au98t_142";
|
|
108110
|
+
const fixedActions$1 = "_fixedActions_au98t_148";
|
|
107975
108111
|
var styles$a = {
|
|
107976
|
-
"my-masonry-grid": "_my-masonry-
|
|
107977
|
-
"my-masonry-grid_column": "_my-masonry-
|
|
108112
|
+
"my-masonry-grid": "_my-masonry-grid_au98t_48",
|
|
108113
|
+
"my-masonry-grid_column": "_my-masonry-grid_column_au98t_59",
|
|
107978
108114
|
mainConatiner: mainConatiner$1,
|
|
107979
108115
|
header: header$3,
|
|
107980
108116
|
content: content$1,
|