ordering-ui-admin-external 1.36.1 → 1.36.3

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.
@@ -197,7 +197,7 @@ var CustomOrderDetailsUI = function CustomOrderDetailsUI(props) {
197
197
  }), cart && (cart === null || cart === void 0 ? void 0 : cart.products.length) > 0 && isOrderByProducts && /*#__PURE__*/_react.default.createElement(_Checkout.Checkout, {
198
198
  cartUuid: cart.uuid,
199
199
  onPlaceOrderClick: function onPlaceOrderClick(data, paymethod, cart) {
200
- (cart === null || cart === void 0 ? void 0 : cart.uuid) && handleOpenCustomOrderDetail(cart.uuid);
200
+ (cart === null || cart === void 0 ? void 0 : cart.order_id) && handleOpenCustomOrderDetail(cart.order_id);
201
201
  onClose();
202
202
  },
203
203
  extraFields: extraFields
@@ -150,7 +150,7 @@ var OrdersTable = function OrdersTable(props) {
150
150
  var restHours = Math.floor(restMinOfTargetedMin / 60);
151
151
  var restMins = restMinOfTargetedMin - 60 * restHours;
152
152
  // make standard time format
153
- day = day === 0 ? '' : day + 'day ';
153
+ day = day === 0 ? '' : "".concat(day + ' ' + t('DAY', 'day') + ' ');
154
154
  restHours = restHours < 10 ? '0' + restHours : restHours;
155
155
  restMins = restMins < 10 ? '0' + restMins : restMins;
156
156
  var finalTaget = sign + day + restHours + ':' + restMins;
@@ -154,7 +154,7 @@ var SettingsListUI = function SettingsListUI(props) {
154
154
  width: 70,
155
155
  height: 44
156
156
  })), !settingsState.error && !settingsState.loading && configs && !settingsState.API && /*#__PURE__*/_react.default.createElement(_styles2.GeneralContainer, null, /*#__PURE__*/_react.default.createElement(_styles2.FormContainer, null, configs.length > 0 && configs.map(function (config, i) {
157
- var _config$options, _config$options2, _config$options3, _config$options4;
157
+ var _config$options, _config$options2, _config$options3, _config$options4, _config$value;
158
158
  return /*#__PURE__*/_react.default.createElement("div", {
159
159
  key: i
160
160
  }, config.type === 1 && /*#__PURE__*/_react.default.createElement(_styles2.FormGroupText, {
@@ -224,7 +224,28 @@ var SettingsListUI = function SettingsListUI(props) {
224
224
  })), !(config !== null && config !== void 0 && config.options) && /*#__PURE__*/_react.default.createElement(_styles2.OptionsError, null, t('NO_OPTIONS_VALUE', 'There is no options value')))), config.type === 5 && /*#__PURE__*/_react.default.createElement(_SettingsImage.SettingsImage, {
225
225
  config: config,
226
226
  saveConfig: saveConfig
227
- }));
227
+ }), config.type === 6 && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles2.FormGroupText, {
228
+ className: "form-group"
229
+ }, /*#__PURE__*/_react.default.createElement("label", null, config === null || config === void 0 ? void 0 : config.name), (config === null || config === void 0 ? void 0 : config.description) && /*#__PURE__*/_react.default.createElement(_styles2.Description, null, config === null || config === void 0 ? void 0 : config.description), config === null || config === void 0 || (_config$value = config.value) === null || _config$value === void 0 || (_config$value = _config$value.split('|')) === null || _config$value === void 0 || (_config$value = _config$value.filter(function (value) {
230
+ return valuesTypeSix.includes(value === null || value === void 0 ? void 0 : value.split(',')[0]);
231
+ })) === null || _config$value === void 0 ? void 0 : _config$value.map(function (value, i, hash) {
232
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
233
+ key: "".concat(config === null || config === void 0 ? void 0 : config.id, " ").concat(value)
234
+ }, /*#__PURE__*/_react.default.createElement(_styles2.Description, {
235
+ typeSix: true
236
+ }, t(value === null || value === void 0 ? void 0 : value.split(',')[0], value === null || value === void 0 ? void 0 : value.split(',')[0].replace('_', ' '))), /*#__PURE__*/_react.default.createElement("input", {
237
+ type: "text",
238
+ defaultValue: value === null || value === void 0 ? void 0 : value.split(',')[1],
239
+ onChange: function onChange(e) {
240
+ return handleChangeTypeSix({
241
+ value: e.target.value,
242
+ type: value === null || value === void 0 ? void 0 : value.split(',')[0]
243
+ }, config);
244
+ },
245
+ className: "form-control",
246
+ placeholder: 0
247
+ }));
248
+ }))));
228
249
  }))), !settingsState.loading && settingsState.error && /*#__PURE__*/_react.default.createElement(_Shared.NotFoundSource, {
229
250
  content: t('NOT_FOUND_CONFIG', 'Sorry, we couldn\'t find the config.'),
230
251
  btnTitle: t('PROFILE_CATEGORY_REDIRECT', 'Go to Category Description'),
@@ -83,14 +83,12 @@ var SidebarMenuUI = function SidebarMenuUI(props) {
83
83
  title: t('DRIVERS_DASHBOARD', 'Drivers Dashboard'),
84
84
  pageName: 'drivers',
85
85
  url: '/drivers'
86
- },
87
- // {
88
- // id: 4,
89
- // title: t('ALL_IN_ONE', 'All in one'),
90
- // pageName: 'all_in_one',
91
- // url: '/all-in-one'
92
- // },
93
- {
86
+ }, {
87
+ id: 4,
88
+ title: t('ALL_IN_ONE', 'All in one'),
89
+ pageName: 'all_in_one',
90
+ url: '/all-in-one'
91
+ }, {
94
92
  id: 5,
95
93
  title: t('APPOINTMENTS', 'Appointments'),
96
94
  pageName: 'appointments',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-ui-admin-external",
3
- "version": "1.36.1",
3
+ "version": "1.36.3",
4
4
  "description": "Ordering UI Admin Components",
5
5
  "main": "./_modules/index.js",
6
6
  "exports": {
@@ -195,7 +195,7 @@ const CustomOrderDetailsUI = (props) => {
195
195
  <Checkout
196
196
  cartUuid={cart.uuid}
197
197
  onPlaceOrderClick={(data, paymethod, cart) => {
198
- cart?.uuid && handleOpenCustomOrderDetail(cart.uuid)
198
+ cart?.order_id && handleOpenCustomOrderDetail(cart.order_id)
199
199
  onClose()
200
200
  }}
201
201
  extraFields={extraFields}
@@ -153,7 +153,7 @@ export const OrdersTable = (props) => {
153
153
  let restHours = Math.floor(restMinOfTargetedMin / 60)
154
154
  let restMins = restMinOfTargetedMin - 60 * restHours
155
155
  // make standard time format
156
- day = day === 0 ? '' : day + 'day '
156
+ day = day === 0 ? '' : `${day + ' ' + t('DAY', 'day') + ' '}`
157
157
  restHours = restHours < 10 ? '0' + restHours : restHours
158
158
  restMins = restMins < 10 ? '0' + restMins : restMins
159
159
 
@@ -263,7 +263,7 @@ export const SettingsListUI = (props) => {
263
263
  />
264
264
  )
265
265
  }
266
- {/* {config.type === 6 && (
266
+ {config.type === 6 && (
267
267
  <>
268
268
  <FormGroupText className='form-group'>
269
269
  <label>{config?.name}</label>
@@ -285,7 +285,7 @@ export const SettingsListUI = (props) => {
285
285
  ))}
286
286
  </FormGroupText>
287
287
  </>
288
- )} */}
288
+ )}
289
289
  </div>
290
290
  ))
291
291
  }
@@ -82,12 +82,12 @@ const SidebarMenuUI = (props) => {
82
82
  pageName: 'drivers',
83
83
  url: '/drivers'
84
84
  },
85
- // {
86
- // id: 4,
87
- // title: t('ALL_IN_ONE', 'All in one'),
88
- // pageName: 'all_in_one',
89
- // url: '/all-in-one'
90
- // },
85
+ {
86
+ id: 4,
87
+ title: t('ALL_IN_ONE', 'All in one'),
88
+ pageName: 'all_in_one',
89
+ url: '/all-in-one'
90
+ },
91
91
  {
92
92
  id: 5,
93
93
  title: t('APPOINTMENTS', 'Appointments'),