mozrest-sdk-react-dev 0.2.89 → 0.2.91

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 CHANGED
@@ -103102,52 +103102,52 @@ const ReservationsAnalytics = ({ userEmail, userFullName }) => {
103102
103102
  totalDays
103103
103103
  }));
103104
103104
  };
103105
- const mainConatiner$2 = "_mainConatiner_1lp6e_48";
103106
- const mainTableContainer = "_mainTableContainer_1lp6e_58";
103107
- const mainSidebarContainer = "_mainSidebarContainer_1lp6e_66";
103108
- const headerReferece = "_headerReferece_1lp6e_76";
103109
- const sidebarCloseIcon = "_sidebarCloseIcon_1lp6e_79";
103110
- const headerContainer = "_headerContainer_1lp6e_131";
103111
- const searchContainer = "_searchContainer_1lp6e_137";
103112
- const buttonList = "_buttonList_1lp6e_145";
103113
- const buttonItem = "_buttonItem_1lp6e_150";
103114
- const addReservationButton = "_addReservationButton_1lp6e_159";
103115
- const tableTopHeader = "_tableTopHeader_1lp6e_168";
103116
- const tableTopHeaderContent = "_tableTopHeaderContent_1lp6e_182";
103117
- const tableTopHeaderContentText = "_tableTopHeaderContentText_1lp6e_189";
103118
- const tableRowContainer = "_tableRowContainer_1lp6e_198";
103119
- const tableRowCard = "_tableRowCard_1lp6e_204";
103120
- const fadeInX = "_fadeInX_1lp6e_1";
103121
- const noData = "_noData_1lp6e_212";
103122
- const tableRowHour = "_tableRowHour_1lp6e_219";
103123
- const tableRowHourText = "_tableRowHourText_1lp6e_235";
103124
- const hours = "_hours_1lp6e_243";
103125
- const tableRowContent = "_tableRowContent_1lp6e_249";
103126
- const rowImage = "_rowImage_1lp6e_264";
103127
- const rowContactContainer = "_rowContactContainer_1lp6e_278";
103128
- const rowContactText = "_rowContactText_1lp6e_290";
103129
- const rowContactPhone = "_rowContactPhone_1lp6e_296";
103130
- const rowSectionContainer = "_rowSectionContainer_1lp6e_303";
103131
- const rowSection = "_rowSection_1lp6e_303";
103132
- const rowSectionText = "_rowSectionText_1lp6e_316";
103133
- const rowSectionSecText = "_rowSectionSecText_1lp6e_322";
103134
- const rowActionButton = "_rowActionButton_1lp6e_329";
103135
- const bookingInfoContainer = "_bookingInfoContainer_1lp6e_342";
103136
- const bookingInfoCardRow = "_bookingInfoCardRow_1lp6e_346";
103137
- const bookingInfoCardContainer = "_bookingInfoCardContainer_1lp6e_354";
103138
- const bookingInfoCard = "_bookingInfoCard_1lp6e_346";
103139
- const bookingInfoCardContent = "_bookingInfoCardContent_1lp6e_366";
103140
- const bookingInfoCardTitle = "_bookingInfoCardTitle_1lp6e_372";
103141
- const bookingInfoCardText = "_bookingInfoCardText_1lp6e_375";
103105
+ const mainConatiner$2 = "_mainConatiner_1y6wx_48";
103106
+ const mainTableContainer = "_mainTableContainer_1y6wx_58";
103107
+ const mainSidebarContainer = "_mainSidebarContainer_1y6wx_66";
103108
+ const headerReferece = "_headerReferece_1y6wx_76";
103109
+ const sidebarCloseIcon = "_sidebarCloseIcon_1y6wx_79";
103110
+ const headerContainer = "_headerContainer_1y6wx_131";
103111
+ const searchContainer = "_searchContainer_1y6wx_137";
103112
+ const buttonList = "_buttonList_1y6wx_148";
103113
+ const buttonItem = "_buttonItem_1y6wx_153";
103114
+ const addReservationButton = "_addReservationButton_1y6wx_162";
103115
+ const tableTopHeader = "_tableTopHeader_1y6wx_171";
103116
+ const tableTopHeaderContent = "_tableTopHeaderContent_1y6wx_185";
103117
+ const tableTopHeaderContentText = "_tableTopHeaderContentText_1y6wx_192";
103118
+ const tableRowContainer = "_tableRowContainer_1y6wx_201";
103119
+ const tableRowCard = "_tableRowCard_1y6wx_207";
103120
+ const fadeInX = "_fadeInX_1y6wx_1";
103121
+ const noData = "_noData_1y6wx_215";
103122
+ const tableRowHour = "_tableRowHour_1y6wx_222";
103123
+ const tableRowHourText = "_tableRowHourText_1y6wx_238";
103124
+ const hours = "_hours_1y6wx_246";
103125
+ const tableRowContent = "_tableRowContent_1y6wx_252";
103126
+ const rowImage = "_rowImage_1y6wx_267";
103127
+ const rowContactContainer = "_rowContactContainer_1y6wx_281";
103128
+ const rowContactText = "_rowContactText_1y6wx_293";
103129
+ const rowContactPhone = "_rowContactPhone_1y6wx_299";
103130
+ const rowSectionContainer = "_rowSectionContainer_1y6wx_306";
103131
+ const rowSection = "_rowSection_1y6wx_306";
103132
+ const rowSectionText = "_rowSectionText_1y6wx_319";
103133
+ const rowSectionSecText = "_rowSectionSecText_1y6wx_325";
103134
+ const rowActionButton = "_rowActionButton_1y6wx_332";
103135
+ const bookingInfoContainer = "_bookingInfoContainer_1y6wx_345";
103136
+ const bookingInfoCardRow = "_bookingInfoCardRow_1y6wx_349";
103137
+ const bookingInfoCardContainer = "_bookingInfoCardContainer_1y6wx_357";
103138
+ const bookingInfoCard = "_bookingInfoCard_1y6wx_349";
103139
+ const bookingInfoCardContent = "_bookingInfoCardContent_1y6wx_369";
103140
+ const bookingInfoCardTitle = "_bookingInfoCardTitle_1y6wx_375";
103141
+ const bookingInfoCardText = "_bookingInfoCardText_1y6wx_378";
103142
103142
  var styles$l = {
103143
103143
  mainConatiner: mainConatiner$2,
103144
103144
  mainTableContainer,
103145
103145
  mainSidebarContainer,
103146
103146
  headerReferece,
103147
103147
  sidebarCloseIcon,
103148
- "mainSidebarContainer--open": "_mainSidebarContainer--open_1lp6e_87",
103149
- "mainSidebarContainer--close": "_mainSidebarContainer--close_1lp6e_93",
103150
- "sidebarCloseIcon--show": "_sidebarCloseIcon--show_1lp6e_101",
103148
+ "mainSidebarContainer--open": "_mainSidebarContainer--open_1y6wx_87",
103149
+ "mainSidebarContainer--close": "_mainSidebarContainer--close_1y6wx_93",
103150
+ "sidebarCloseIcon--show": "_sidebarCloseIcon--show_1y6wx_101",
103151
103151
  headerContainer,
103152
103152
  searchContainer,
103153
103153
  buttonList,
@@ -106950,16 +106950,23 @@ const ConfirmationModal = ({ onAccept, isLoading, title: title2, text: text2 = "
106950
106950
  isLoading
106951
106951
  }, t2("ACCEPT")))));
106952
106952
  };
106953
+ const ExportResbookReservationAnalytics = async ({ params, venueId }) => {
106954
+ await instance$1.get(
106955
+ `reports/resbook-booking-summary/${venueId}`,
106956
+ { params }
106957
+ );
106958
+ return { data: "requested" };
106959
+ };
106953
106960
  const ExportBookingModal = ({ open, onClose: onClose2, isExportLoading, setIsExportLoading, userEmail, userFullName, currentVenue }) => {
106954
106961
  const { t: t2 } = useTranslation();
106955
106962
  const [exportFilters, setExportFilters] = useState({
106956
- ["filters[from]"]: hooks().format("YYYY-MM-DD"),
106957
- ["filters[till]"]: hooks().format("YYYY-MM-DD")
106963
+ ["filters[fromZ]"]: hooks().format("YYYY-MM-DD"),
106964
+ ["filters[tillZ]"]: hooks().format("YYYY-MM-DD")
106958
106965
  });
106959
106966
  const [openConfirmationModal, setOpenConfirmationModal] = useState(false);
106960
106967
  const onOpenConfirmationModal = () => setOpenConfirmationModal(true);
106961
106968
  const onCloseConfirmationModal = () => setOpenConfirmationModal(false);
106962
- const { isExecuting, execute, error: error3 } = useService(ExportReservationAnalytics, {
106969
+ const { isExecuting, execute, error: error3 } = useService(ExportResbookReservationAnalytics, {
106963
106970
  onSuccess: async () => {
106964
106971
  onClose2();
106965
106972
  setIsExportLoading(false);
@@ -106975,8 +106982,8 @@ const ExportBookingModal = ({ open, onClose: onClose2, isExportLoading, setIsExp
106975
106982
  if (!currentVenue)
106976
106983
  return;
106977
106984
  execute({
106985
+ venueId: currentVenue,
106978
106986
  params: {
106979
- "filters[venues]": [currentVenue],
106980
106987
  ...exportFilters,
106981
106988
  ...userEmail ? {
106982
106989
  ["filters[userEmail]"]: userEmail
@@ -106999,13 +107006,13 @@ const ExportBookingModal = ({ open, onClose: onClose2, isExportLoading, setIsExp
106999
107006
  }, /* @__PURE__ */ React__default.createElement(DatePicker, {
107000
107007
  id: "dateRange",
107001
107008
  label: t2("BOOKINGCREATIONDATERANGE"),
107002
- range: { from: exportFilters["filters[from]"], till: exportFilters["filters[till]"] },
107009
+ range: { from: exportFilters["filters[fromZ]"], till: exportFilters["filters[tillZ]"] },
107003
107010
  onChange: ({ from: from2, till }) => {
107004
107011
  if (from2 && till) {
107005
107012
  setExportFilters({
107006
107013
  ...exportFilters,
107007
- ["filters[from]"]: hooks(from2).format("YYYY-MM-DD"),
107008
- ["filters[till]"]: hooks(till).format("YYYY-MM-DD")
107014
+ ["filters[fromZ]"]: hooks(from2).format("YYYY-MM-DD"),
107015
+ ["filters[tillZ]"]: hooks(till).format("YYYY-MM-DD")
107009
107016
  });
107010
107017
  }
107011
107018
  }
@@ -107020,7 +107027,7 @@ const ExportBookingModal = ({ open, onClose: onClose2, isExportLoading, setIsExp
107020
107027
  open: openConfirmationModal,
107021
107028
  onClose: onCloseConfirmationModal,
107022
107029
  onAccept: () => onRequestExcel(),
107023
- text: `Do you want to export an excel file from ${exportFilters["filters[from]"]} until ${exportFilters["filters[till]"]}? You will receive shortly the report on you email inbox.`,
107030
+ text: `Do you want to export an excel file from ${exportFilters["filters[fromZ]"]} until ${exportFilters["filters[tillZ]"]}? You will receive shortly the report on you email inbox.`,
107024
107031
  width: 500,
107025
107032
  isLoading: isExportLoading || isExecuting,
107026
107033
  icon: "calendar"
@@ -107149,9 +107156,7 @@ const index$c = ({ filters: filters2, setFilters, currentVenue, userEmail, userF
107149
107156
  mode: "tertiary",
107150
107157
  className: styles$l.buttonItem,
107151
107158
  onClick: () => selectDate("tomorrow")
107152
- }, t2("TOMORROW")), /* @__PURE__ */ React__default.createElement("div", {
107153
- style: { display: "flex", gap: 5, justifyContent: "center", alignItems: "center" }
107154
- }, /* @__PURE__ */ React__default.createElement(Button, {
107159
+ }, t2("TOMORROW")), /* @__PURE__ */ React__default.createElement(Button, {
107155
107160
  mode: "primary",
107156
107161
  onClick: () => setDatePickerOpen(true)
107157
107162
  }, t2("SELECTADAY")), /* @__PURE__ */ React__default.createElement(CustomDatePicker, {
@@ -107188,7 +107193,7 @@ const index$c = ({ filters: filters2, setFilters, currentVenue, userEmail, userF
107188
107193
  setDatePickerOpen(false);
107189
107194
  }
107190
107195
  }, t2("TOMORROW")))
107191
- })), canEdit && /* @__PURE__ */ React__default.createElement(Button, {
107196
+ }), canEdit && /* @__PURE__ */ React__default.createElement(Button, {
107192
107197
  className: styles$l.addReservationButton,
107193
107198
  mode: "success",
107194
107199
  onClick: () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mozrest-sdk-react-dev",
3
- "version": "0.2.89",
3
+ "version": "0.2.91",
4
4
  "main": "mozrest-sdk.es.js",
5
5
  "keywords": ["mozrest"],
6
6
  "author": {