mozrest-sdk-react-dev 0.2.90 → 0.2.92
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 +79 -76
- package/package.json +1 -1
- package/style.css +1 -1
package/mozrest-sdk.es.js
CHANGED
|
@@ -103102,52 +103102,53 @@ const ReservationsAnalytics = ({ userEmail, userFullName }) => {
|
|
|
103102
103102
|
totalDays
|
|
103103
103103
|
}));
|
|
103104
103104
|
};
|
|
103105
|
-
const mainConatiner$2 = "
|
|
103106
|
-
const mainTableContainer = "
|
|
103107
|
-
const mainSidebarContainer = "
|
|
103108
|
-
const headerReferece = "
|
|
103109
|
-
const sidebarCloseIcon = "
|
|
103110
|
-
const headerContainer = "
|
|
103111
|
-
const searchContainer = "
|
|
103112
|
-
const buttonList = "
|
|
103113
|
-
const buttonItem = "
|
|
103114
|
-
const addReservationButton = "
|
|
103115
|
-
const tableTopHeader = "
|
|
103116
|
-
const tableTopHeaderContent = "
|
|
103117
|
-
const tableTopHeaderContentText = "
|
|
103118
|
-
const tableRowContainer = "
|
|
103119
|
-
const tableRowCard = "
|
|
103120
|
-
const fadeInX = "
|
|
103121
|
-
const
|
|
103122
|
-
const
|
|
103123
|
-
const
|
|
103124
|
-
const
|
|
103125
|
-
const
|
|
103126
|
-
const
|
|
103127
|
-
const
|
|
103128
|
-
const
|
|
103129
|
-
const
|
|
103130
|
-
const
|
|
103131
|
-
const
|
|
103132
|
-
const
|
|
103133
|
-
const
|
|
103134
|
-
const
|
|
103135
|
-
const
|
|
103136
|
-
const
|
|
103137
|
-
const
|
|
103138
|
-
const
|
|
103139
|
-
const
|
|
103140
|
-
const
|
|
103141
|
-
const
|
|
103105
|
+
const mainConatiner$2 = "_mainConatiner_rgobu_48";
|
|
103106
|
+
const mainTableContainer = "_mainTableContainer_rgobu_58";
|
|
103107
|
+
const mainSidebarContainer = "_mainSidebarContainer_rgobu_66";
|
|
103108
|
+
const headerReferece = "_headerReferece_rgobu_76";
|
|
103109
|
+
const sidebarCloseIcon = "_sidebarCloseIcon_rgobu_79";
|
|
103110
|
+
const headerContainer = "_headerContainer_rgobu_131";
|
|
103111
|
+
const searchContainer = "_searchContainer_rgobu_137";
|
|
103112
|
+
const buttonList = "_buttonList_rgobu_148";
|
|
103113
|
+
const buttonItem = "_buttonItem_rgobu_153";
|
|
103114
|
+
const addReservationButton = "_addReservationButton_rgobu_162";
|
|
103115
|
+
const tableTopHeader = "_tableTopHeader_rgobu_171";
|
|
103116
|
+
const tableTopHeaderContent = "_tableTopHeaderContent_rgobu_185";
|
|
103117
|
+
const tableTopHeaderContentText = "_tableTopHeaderContentText_rgobu_192";
|
|
103118
|
+
const tableRowContainer = "_tableRowContainer_rgobu_201";
|
|
103119
|
+
const tableRowCard = "_tableRowCard_rgobu_207";
|
|
103120
|
+
const fadeInX = "_fadeInX_rgobu_1";
|
|
103121
|
+
const canceled = "_canceled_rgobu_215";
|
|
103122
|
+
const noData = "_noData_rgobu_218";
|
|
103123
|
+
const tableRowHour = "_tableRowHour_rgobu_225";
|
|
103124
|
+
const tableRowHourText = "_tableRowHourText_rgobu_241";
|
|
103125
|
+
const hours = "_hours_rgobu_249";
|
|
103126
|
+
const tableRowContent = "_tableRowContent_rgobu_255";
|
|
103127
|
+
const rowImage = "_rowImage_rgobu_270";
|
|
103128
|
+
const rowContactContainer = "_rowContactContainer_rgobu_284";
|
|
103129
|
+
const rowContactText = "_rowContactText_rgobu_296";
|
|
103130
|
+
const rowContactPhone = "_rowContactPhone_rgobu_302";
|
|
103131
|
+
const rowSectionContainer = "_rowSectionContainer_rgobu_309";
|
|
103132
|
+
const rowSection = "_rowSection_rgobu_309";
|
|
103133
|
+
const rowSectionText = "_rowSectionText_rgobu_322";
|
|
103134
|
+
const rowSectionSecText = "_rowSectionSecText_rgobu_328";
|
|
103135
|
+
const rowActionButton = "_rowActionButton_rgobu_335";
|
|
103136
|
+
const bookingInfoContainer = "_bookingInfoContainer_rgobu_348";
|
|
103137
|
+
const bookingInfoCardRow = "_bookingInfoCardRow_rgobu_352";
|
|
103138
|
+
const bookingInfoCardContainer = "_bookingInfoCardContainer_rgobu_360";
|
|
103139
|
+
const bookingInfoCard = "_bookingInfoCard_rgobu_352";
|
|
103140
|
+
const bookingInfoCardContent = "_bookingInfoCardContent_rgobu_372";
|
|
103141
|
+
const bookingInfoCardTitle = "_bookingInfoCardTitle_rgobu_378";
|
|
103142
|
+
const bookingInfoCardText = "_bookingInfoCardText_rgobu_381";
|
|
103142
103143
|
var styles$l = {
|
|
103143
103144
|
mainConatiner: mainConatiner$2,
|
|
103144
103145
|
mainTableContainer,
|
|
103145
103146
|
mainSidebarContainer,
|
|
103146
103147
|
headerReferece,
|
|
103147
103148
|
sidebarCloseIcon,
|
|
103148
|
-
"mainSidebarContainer--open": "_mainSidebarContainer--
|
|
103149
|
-
"mainSidebarContainer--close": "_mainSidebarContainer--
|
|
103150
|
-
"sidebarCloseIcon--show": "_sidebarCloseIcon--
|
|
103149
|
+
"mainSidebarContainer--open": "_mainSidebarContainer--open_rgobu_87",
|
|
103150
|
+
"mainSidebarContainer--close": "_mainSidebarContainer--close_rgobu_93",
|
|
103151
|
+
"sidebarCloseIcon--show": "_sidebarCloseIcon--show_rgobu_101",
|
|
103151
103152
|
headerContainer,
|
|
103152
103153
|
searchContainer,
|
|
103153
103154
|
buttonList,
|
|
@@ -103159,6 +103160,7 @@ var styles$l = {
|
|
|
103159
103160
|
tableRowContainer,
|
|
103160
103161
|
tableRowCard,
|
|
103161
103162
|
fadeInX,
|
|
103163
|
+
canceled,
|
|
103162
103164
|
noData,
|
|
103163
103165
|
tableRowHour,
|
|
103164
103166
|
tableRowHourText,
|
|
@@ -104716,19 +104718,20 @@ const Icon = ({
|
|
|
104716
104718
|
...props
|
|
104717
104719
|
}, React__default.createElement(icons[icon2]));
|
|
104718
104720
|
};
|
|
104719
|
-
const btn = "
|
|
104721
|
+
const btn = "_btn_1och3_1";
|
|
104720
104722
|
var styles$j = {
|
|
104721
104723
|
btn,
|
|
104722
|
-
"btn--large": "_btn--
|
|
104723
|
-
"btn--default": "_btn--
|
|
104724
|
-
"btn--small": "_btn--
|
|
104725
|
-
"btn--mini": "_btn--
|
|
104726
|
-
"btn--primary": "_btn--
|
|
104727
|
-
"btn--secondary": "_btn--
|
|
104728
|
-
"btn--tertiary": "_btn--
|
|
104729
|
-
"btn--inverted": "_btn--
|
|
104730
|
-
"btn--danger": "_btn--
|
|
104731
|
-
"btn--
|
|
104724
|
+
"btn--large": "_btn--large_1och3_16",
|
|
104725
|
+
"btn--default": "_btn--default_1och3_20",
|
|
104726
|
+
"btn--small": "_btn--small_1och3_24",
|
|
104727
|
+
"btn--mini": "_btn--mini_1och3_28",
|
|
104728
|
+
"btn--primary": "_btn--primary_1och3_32",
|
|
104729
|
+
"btn--secondary": "_btn--secondary_1och3_39",
|
|
104730
|
+
"btn--tertiary": "_btn--tertiary_1och3_47",
|
|
104731
|
+
"btn--inverted": "_btn--inverted_1och3_55",
|
|
104732
|
+
"btn--danger": "_btn--danger_1och3_64",
|
|
104733
|
+
"btn--soft-danger": "_btn--soft-danger_1och3_72",
|
|
104734
|
+
"btn--success": "_btn--success_1och3_80"
|
|
104732
104735
|
};
|
|
104733
104736
|
const Button = ({
|
|
104734
104737
|
mode = "primary",
|
|
@@ -107156,9 +107159,7 @@ const index$c = ({ filters: filters2, setFilters, currentVenue, userEmail, userF
|
|
|
107156
107159
|
mode: "tertiary",
|
|
107157
107160
|
className: styles$l.buttonItem,
|
|
107158
107161
|
onClick: () => selectDate("tomorrow")
|
|
107159
|
-
}, t2("TOMORROW")), /* @__PURE__ */ React__default.createElement(
|
|
107160
|
-
style: { display: "flex", gap: 5, justifyContent: "center", alignItems: "center" }
|
|
107161
|
-
}, /* @__PURE__ */ React__default.createElement(Button, {
|
|
107162
|
+
}, t2("TOMORROW")), /* @__PURE__ */ React__default.createElement(Button, {
|
|
107162
107163
|
mode: "primary",
|
|
107163
107164
|
onClick: () => setDatePickerOpen(true)
|
|
107164
107165
|
}, t2("SELECTADAY")), /* @__PURE__ */ React__default.createElement(CustomDatePicker, {
|
|
@@ -107195,13 +107196,7 @@ const index$c = ({ filters: filters2, setFilters, currentVenue, userEmail, userF
|
|
|
107195
107196
|
setDatePickerOpen(false);
|
|
107196
107197
|
}
|
|
107197
107198
|
}, t2("TOMORROW")))
|
|
107198
|
-
}), /* @__PURE__ */ React__default.createElement(Button, {
|
|
107199
|
-
mode: "success",
|
|
107200
|
-
onClick: () => setShowExportBookingConfirmationModal(true)
|
|
107201
|
-
}, /* @__PURE__ */ React__default.createElement(Icon, {
|
|
107202
|
-
icon: "download",
|
|
107203
|
-
size: "xs"
|
|
107204
|
-
}))), canEdit && /* @__PURE__ */ React__default.createElement(Button, {
|
|
107199
|
+
}), canEdit && /* @__PURE__ */ React__default.createElement(Button, {
|
|
107205
107200
|
className: styles$l.addReservationButton,
|
|
107206
107201
|
mode: "success",
|
|
107207
107202
|
onClick: () => {
|
|
@@ -107367,7 +107362,7 @@ const ReloadProvider = ({ children, reload }) => {
|
|
|
107367
107362
|
}, children);
|
|
107368
107363
|
};
|
|
107369
107364
|
const TableRow = ({ index: index2, item: item2, filtersData, venueId }) => {
|
|
107370
|
-
var _a2, _b, _c, _d;
|
|
107365
|
+
var _a2, _b, _c, _d, _e2;
|
|
107371
107366
|
const { t: t2 } = useTranslation();
|
|
107372
107367
|
const { reload: reloadMainTable } = useReloadContext();
|
|
107373
107368
|
const { showSidebar, setShowSidebar } = useShowSidebarContext();
|
|
@@ -107402,7 +107397,7 @@ const TableRow = ({ index: index2, item: item2, filtersData, venueId }) => {
|
|
|
107402
107397
|
};
|
|
107403
107398
|
case "canceled":
|
|
107404
107399
|
return {
|
|
107405
|
-
mode: "danger",
|
|
107400
|
+
mode: "soft-danger",
|
|
107406
107401
|
text: t2("CANCELED"),
|
|
107407
107402
|
icon: "TrashX",
|
|
107408
107403
|
disabled: true
|
|
@@ -107447,7 +107442,7 @@ const TableRow = ({ index: index2, item: item2, filtersData, venueId }) => {
|
|
|
107447
107442
|
}
|
|
107448
107443
|
}
|
|
107449
107444
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
107450
|
-
className: styles$l.tableRowHour
|
|
107445
|
+
className: classNames$2(styles$l.tableRowHour, (item2 == null ? void 0 : item2.status) === "canceled" ? styles$l.canceled : "")
|
|
107451
107446
|
}, /* @__PURE__ */ React__default.createElement("h2", {
|
|
107452
107447
|
className: styles$l.tableRowHourText
|
|
107453
107448
|
}, /* @__PURE__ */ React__default.createElement(TimeFormat, {
|
|
@@ -107459,13 +107454,13 @@ const TableRow = ({ index: index2, item: item2, filtersData, venueId }) => {
|
|
|
107459
107454
|
className: styles$l.rowImage,
|
|
107460
107455
|
src: item2.bookingChannelLogo
|
|
107461
107456
|
}), /* @__PURE__ */ React__default.createElement("div", {
|
|
107462
|
-
className: styles$l.rowContactContainer
|
|
107457
|
+
className: classNames$2(styles$l.rowContactContainer, (item2 == null ? void 0 : item2.status) === "canceled" ? styles$l.canceled : "")
|
|
107463
107458
|
}, /* @__PURE__ */ React__default.createElement("h4", {
|
|
107464
107459
|
className: styles$l.rowContactText
|
|
107465
107460
|
}, item2.name), /* @__PURE__ */ React__default.createElement("p", {
|
|
107466
107461
|
className: styles$l.rowContactPhone
|
|
107467
107462
|
}, (_a2 = item2 == null ? void 0 : item2.contact) == null ? void 0 : _a2.telephone)), /* @__PURE__ */ React__default.createElement("div", {
|
|
107468
|
-
className: styles$l.rowSectionContainer
|
|
107463
|
+
className: classNames$2(styles$l.rowSectionContainer, (item2 == null ? void 0 : item2.status) === "canceled" ? styles$l.canceled : "")
|
|
107469
107464
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
107470
107465
|
className: styles$l.rowSection
|
|
107471
107466
|
}, /* @__PURE__ */ React__default.createElement("h4", {
|
|
@@ -107476,13 +107471,13 @@ const TableRow = ({ index: index2, item: item2, filtersData, venueId }) => {
|
|
|
107476
107471
|
className: styles$l.rowSection
|
|
107477
107472
|
}, /* @__PURE__ */ React__default.createElement("h4", {
|
|
107478
107473
|
className: styles$l.rowSectionText
|
|
107479
|
-
}, (_b = item2 == null ? void 0 : item2.table) == null ? void 0 : _b.name), /* @__PURE__ */ React__default.createElement("p", {
|
|
107474
|
+
}, (_b = item2 == null ? void 0 : item2.table) == null ? void 0 : _b.name), ((_c = item2 == null ? void 0 : item2.table) == null ? void 0 : _c.areaName) && /* @__PURE__ */ React__default.createElement("p", {
|
|
107480
107475
|
className: styles$l.rowSectionSecText
|
|
107481
|
-
}, (
|
|
107476
|
+
}, (_d = item2 == null ? void 0 : item2.table) == null ? void 0 : _d.areaName))), canEdit && /* @__PURE__ */ React__default.createElement("div", {
|
|
107482
107477
|
className: styles$l.rowActionButton
|
|
107483
107478
|
}, /* @__PURE__ */ React__default.createElement(Button, {
|
|
107484
107479
|
icon: statusBuilder(item2.status).icon,
|
|
107485
|
-
disabled: (
|
|
107480
|
+
disabled: (_e2 = statusBuilder(item2.status)) == null ? void 0 : _e2.disabled,
|
|
107486
107481
|
mode: statusBuilder(item2.status).mode,
|
|
107487
107482
|
onClick: () => {
|
|
107488
107483
|
changeStatus();
|
|
@@ -107899,7 +107894,7 @@ const index$a = ({ filtersData, venueId }) => {
|
|
|
107899
107894
|
phone: create$2().nullable().notRequired().test(
|
|
107900
107895
|
"is-valid-phone",
|
|
107901
107896
|
t2("errors.phone"),
|
|
107902
|
-
(value2) => !value2 || new RegExp(
|
|
107897
|
+
(value2) => !value2 || new RegExp(/^\+?[1-9]\d{1,14}$/).test(value2)
|
|
107903
107898
|
),
|
|
107904
107899
|
notes: create$2()
|
|
107905
107900
|
});
|
|
@@ -107980,7 +107975,15 @@ const index$a = ({ filtersData, venueId }) => {
|
|
|
107980
107975
|
const toSend = {
|
|
107981
107976
|
partySize: (_e2 = data22 == null ? void 0 : data22.partySize) == null ? void 0 : _e2.value,
|
|
107982
107977
|
table: (_f = data22 == null ? void 0 : data22.table) == null ? void 0 : _f.value,
|
|
107983
|
-
date: data22.date ? moment$1.tz(`${data22.date} ${(_g = data22.time) == null ? void 0 : _g.value}`, currentTimeZone ? currentTimeZone : "").valueOf() / 1e3 : moment$1.tz(moment$1(), currentTimeZone ? currentTimeZone : "").valueOf() / 1e3
|
|
107978
|
+
date: data22.date ? moment$1.tz(`${data22.date} ${(_g = data22.time) == null ? void 0 : _g.value}`, currentTimeZone ? currentTimeZone : "").valueOf() / 1e3 : moment$1.tz(moment$1(), currentTimeZone ? currentTimeZone : "").valueOf() / 1e3,
|
|
107979
|
+
notes: data22 == null ? void 0 : data22.notes,
|
|
107980
|
+
contact: {
|
|
107981
|
+
firstname: data22 == null ? void 0 : data22.firstName,
|
|
107982
|
+
lastname: data22 == null ? void 0 : data22.lastName,
|
|
107983
|
+
email: data22 == null ? void 0 : data22.email,
|
|
107984
|
+
telephone: data22 == null ? void 0 : data22.phone,
|
|
107985
|
+
locale: "en"
|
|
107986
|
+
}
|
|
107984
107987
|
};
|
|
107985
107988
|
executeUpdate({ data: toSend, venueId, bookingId: selectedBooking.id });
|
|
107986
107989
|
}
|
|
@@ -108137,7 +108140,7 @@ const index$a = ({ filtersData, venueId }) => {
|
|
|
108137
108140
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
108138
108141
|
style: { width: "50%" }
|
|
108139
108142
|
}, /* @__PURE__ */ React__default.createElement(TextInputField, {
|
|
108140
|
-
disabled:
|
|
108143
|
+
disabled: !canEdit,
|
|
108141
108144
|
control,
|
|
108142
108145
|
id: "firstName",
|
|
108143
108146
|
name: "firstName",
|
|
@@ -108148,7 +108151,7 @@ const index$a = ({ filtersData, venueId }) => {
|
|
|
108148
108151
|
})), /* @__PURE__ */ React__default.createElement("div", {
|
|
108149
108152
|
style: { width: "50%" }
|
|
108150
108153
|
}, /* @__PURE__ */ React__default.createElement(TextInputField, {
|
|
108151
|
-
disabled:
|
|
108154
|
+
disabled: !canEdit,
|
|
108152
108155
|
control,
|
|
108153
108156
|
id: "lastName",
|
|
108154
108157
|
name: "lastName",
|
|
@@ -108159,7 +108162,7 @@ const index$a = ({ filtersData, venueId }) => {
|
|
|
108159
108162
|
}))), /* @__PURE__ */ React__default.createElement("div", {
|
|
108160
108163
|
style: { width: "100%" }
|
|
108161
108164
|
}, /* @__PURE__ */ React__default.createElement(TextInputField, {
|
|
108162
|
-
disabled:
|
|
108165
|
+
disabled: !canEdit,
|
|
108163
108166
|
control,
|
|
108164
108167
|
id: "email",
|
|
108165
108168
|
name: "email",
|
|
@@ -108170,7 +108173,7 @@ const index$a = ({ filtersData, venueId }) => {
|
|
|
108170
108173
|
})), /* @__PURE__ */ React__default.createElement("div", {
|
|
108171
108174
|
style: { width: "100%" }
|
|
108172
108175
|
}, /* @__PURE__ */ React__default.createElement(TextInputField, {
|
|
108173
|
-
disabled:
|
|
108176
|
+
disabled: !canEdit,
|
|
108174
108177
|
control,
|
|
108175
108178
|
id: "phone",
|
|
108176
108179
|
name: "phone",
|
|
@@ -108181,7 +108184,7 @@ const index$a = ({ filtersData, venueId }) => {
|
|
|
108181
108184
|
})), /* @__PURE__ */ React__default.createElement("div", {
|
|
108182
108185
|
style: { width: "100%" }
|
|
108183
108186
|
}, /* @__PURE__ */ React__default.createElement(TextAreaField, {
|
|
108184
|
-
disabled:
|
|
108187
|
+
disabled: !canEdit,
|
|
108185
108188
|
control,
|
|
108186
108189
|
id: "notes",
|
|
108187
108190
|
name: "notes",
|