ordering-ui-admin-external 1.40.2 → 1.40.4
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/_bundles/{ordering-ui-admin.2240a88cc5f89d9bc1ba.js → ordering-ui-admin.1c6dbec9fac48143a97a.js} +2 -2
- package/_modules/components/Orders/OrdersTable/Order.js +11 -0
- package/_modules/components/Orders/OrdersTable/index.js +3 -0
- package/_modules/components/Orders/OrdersTable/styles.js +6 -2
- package/_modules/components/Settings/index.js +15 -1
- package/_modules/components/Stores/ProductExtras/index.js +4 -2
- package/_modules/index.js +18 -0
- package/package.json +2 -2
- package/src/components/Orders/OrdersTable/Order.js +13 -1
- package/src/components/Orders/OrdersTable/index.js +4 -0
- package/src/components/Orders/OrdersTable/styles.js +17 -0
- package/src/components/Settings/index.js +5 -1
- package/src/components/Stores/ProductExtras/index.js +2 -2
- package/src/index.js +8 -1
- /package/_bundles/{ordering-ui-admin.2240a88cc5f89d9bc1ba.js.LICENSE.txt → ordering-ui-admin.1c6dbec9fac48143a97a.js.LICENSE.txt} +0 -0
|
@@ -110,6 +110,17 @@ var Order = exports.Order = /*#__PURE__*/_react.default.memo(function (props) {
|
|
|
110
110
|
className: "bold"
|
|
111
111
|
}, getOrderStatus(order.status))));
|
|
112
112
|
}
|
|
113
|
+
if (column === 'agent') {
|
|
114
|
+
var _order$agent, _order$agent2;
|
|
115
|
+
return /*#__PURE__*/_react.default.createElement("td", {
|
|
116
|
+
className: "statusInfo",
|
|
117
|
+
key: "agentInfo".concat(i, "-").concat(index)
|
|
118
|
+
}, /*#__PURE__*/_react.default.createElement(_styles.InfoWrapper, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
119
|
+
className: "info"
|
|
120
|
+
}, /*#__PURE__*/_react.default.createElement("p", {
|
|
121
|
+
className: "bold"
|
|
122
|
+
}, order === null || order === void 0 || (_order$agent = order.agent) === null || _order$agent === void 0 ? void 0 : _order$agent.name), /*#__PURE__*/_react.default.createElement("p", null, order === null || order === void 0 || (_order$agent2 = order.agent) === null || _order$agent2 === void 0 ? void 0 : _order$agent2.email))));
|
|
123
|
+
}
|
|
113
124
|
if (column === 'cartGroupId') {
|
|
114
125
|
return /*#__PURE__*/_react.default.createElement("td", {
|
|
115
126
|
className: "orderGroupId",
|
|
@@ -98,6 +98,9 @@ var OrdersTable = exports.OrdersTable = /*#__PURE__*/(0, _react.memo)(function (
|
|
|
98
98
|
}, {
|
|
99
99
|
value: 'orderNumber',
|
|
100
100
|
content: t('INVOICE_ORDER_NO', 'Order No.')
|
|
101
|
+
}, {
|
|
102
|
+
value: 'agent',
|
|
103
|
+
content: t('AGENT', 'Agent')
|
|
101
104
|
}, {
|
|
102
105
|
value: 'cartGroupId',
|
|
103
106
|
content: t('GROUP_ORDER', 'Group Order')
|
|
@@ -4,9 +4,9 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.WrapperPagination = exports.WrapperImage = exports.WrapOrderStatusSelector = exports.Timestatus = exports.Timer = exports.Table = exports.StatusInfo = exports.PriorityDot = exports.OrdersCountWrapper = exports.OrdersContainer = exports.OrderType = exports.OrderTbody = exports.OrderNumberContainer = exports.LogisticStatusDot = exports.DriversInfo = exports.DragTh = exports.CustomerInfo = exports.CheckBox = exports.BusinessInfo = void 0;
|
|
7
|
+
exports.WrapperPagination = exports.WrapperImage = exports.WrapOrderStatusSelector = exports.Timestatus = exports.Timer = exports.Table = exports.StatusInfo = exports.PriorityDot = exports.OrdersCountWrapper = exports.OrdersContainer = exports.OrderType = exports.OrderTbody = exports.OrderNumberContainer = exports.LogisticStatusDot = exports.InfoWrapper = exports.DriversInfo = exports.DragTh = exports.CustomerInfo = exports.CheckBox = exports.BusinessInfo = void 0;
|
|
8
8
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
9
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26, _templateObject27, _templateObject28, _templateObject29, _templateObject30, _templateObject31, _templateObject32, _templateObject33, _templateObject34, _templateObject35, _templateObject36, _templateObject37, _templateObject38, _templateObject39, _templateObject40, _templateObject41, _templateObject42, _templateObject43, _templateObject44, _templateObject45, _templateObject46, _templateObject47, _templateObject48, _templateObject49, _templateObject50, _templateObject51, _templateObject52, _templateObject53, _templateObject54;
|
|
9
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26, _templateObject27, _templateObject28, _templateObject29, _templateObject30, _templateObject31, _templateObject32, _templateObject33, _templateObject34, _templateObject35, _templateObject36, _templateObject37, _templateObject38, _templateObject39, _templateObject40, _templateObject41, _templateObject42, _templateObject43, _templateObject44, _templateObject45, _templateObject46, _templateObject47, _templateObject48, _templateObject49, _templateObject50, _templateObject51, _templateObject52, _templateObject53, _templateObject54, _templateObject55, _templateObject56, _templateObject57;
|
|
10
10
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
11
11
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
12
12
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
@@ -194,4 +194,8 @@ var DragTh = exports.DragTh = _styledComponents.default.th(_templateObject53 ||
|
|
|
194
194
|
return selectedDragOver && (0, _styledComponents.css)(_templateObject54 || (_templateObject54 = _taggedTemplateLiteral(["\n border: 1px solid ", ";\n "])), function (props) {
|
|
195
195
|
return props.theme.colors.primary;
|
|
196
196
|
});
|
|
197
|
+
});
|
|
198
|
+
var InfoWrapper = exports.InfoWrapper = _styledComponents.default.div(_templateObject55 || (_templateObject55 = _taggedTemplateLiteral(["\n position: relative;\n ", "\n .bold {\n max-width: 150px;\n font-weight: 600;\n margin: 0;\n }\n &:hover > div {\n visibility: visible;\n opacity: 1;\n }\n"])), function (props) {
|
|
199
|
+
var _props$theme8;
|
|
200
|
+
return (_props$theme8 = props.theme) !== null && _props$theme8 !== void 0 && _props$theme8.rtl ? (0, _styledComponents.css)(_templateObject56 || (_templateObject56 = _taggedTemplateLiteral(["\n margin-left: 4px;\n "]))) : (0, _styledComponents.css)(_templateObject57 || (_templateObject57 = _taggedTemplateLiteral(["\n margin-right: 4px;\n "])));
|
|
197
201
|
});
|
|
@@ -177,6 +177,12 @@ Object.defineProperty(exports, "SettingsDetail", {
|
|
|
177
177
|
return _SettingsDetail.SettingsDetail;
|
|
178
178
|
}
|
|
179
179
|
});
|
|
180
|
+
Object.defineProperty(exports, "SettingsImage", {
|
|
181
|
+
enumerable: true,
|
|
182
|
+
get: function get() {
|
|
183
|
+
return _SettingsImage.SettingsImage;
|
|
184
|
+
}
|
|
185
|
+
});
|
|
180
186
|
Object.defineProperty(exports, "SettingsList", {
|
|
181
187
|
enumerable: true,
|
|
182
188
|
get: function get() {
|
|
@@ -195,6 +201,12 @@ Object.defineProperty(exports, "SettingsSelectUI", {
|
|
|
195
201
|
return _SettingsSelectUI.SettingsSelectUI;
|
|
196
202
|
}
|
|
197
203
|
});
|
|
204
|
+
Object.defineProperty(exports, "SitesAuthSettings", {
|
|
205
|
+
enumerable: true,
|
|
206
|
+
get: function get() {
|
|
207
|
+
return _SitesAuthSettings.SitesAuthSettings;
|
|
208
|
+
}
|
|
209
|
+
});
|
|
198
210
|
Object.defineProperty(exports, "WebhookDelaySelector", {
|
|
199
211
|
enumerable: true,
|
|
200
212
|
get: function get() {
|
|
@@ -254,4 +266,6 @@ var _LanguageTransSpread = require("./LanguageTransSpread");
|
|
|
254
266
|
var _LanguageTransTable = require("./LanguageTransTable");
|
|
255
267
|
var _MultiCountrySettings = require("./MultiCountrySettings");
|
|
256
268
|
var _CardFieldsSetting = require("./CardFieldsSetting");
|
|
257
|
-
var _GuestCheckoutFieldsSetting = require("./GuestCheckoutFieldsSetting");
|
|
269
|
+
var _GuestCheckoutFieldsSetting = require("./GuestCheckoutFieldsSetting");
|
|
270
|
+
var _SitesAuthSettings = require("./SitesAuthSettings");
|
|
271
|
+
var _SettingsImage = require("./SettingsImage");
|
|
@@ -37,6 +37,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
37
37
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
38
38
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
39
39
|
var ProductExtrasUI = function ProductExtrasUI(props) {
|
|
40
|
+
var _extrasState$extras4;
|
|
40
41
|
var productState = props.productState,
|
|
41
42
|
extrasState = props.extrasState,
|
|
42
43
|
isAddMode = props.isAddMode,
|
|
@@ -219,7 +220,8 @@ var ProductExtrasUI = function ProductExtrasUI(props) {
|
|
|
219
220
|
(0, _react.useEffect)(function () {
|
|
220
221
|
var extraId = query.get('extra');
|
|
221
222
|
if (extraId) {
|
|
222
|
-
var
|
|
223
|
+
var _extrasState$extras3;
|
|
224
|
+
var initExtra = extrasState === null || extrasState === void 0 || (_extrasState$extras3 = extrasState.extras) === null || _extrasState$extras3 === void 0 ? void 0 : _extrasState$extras3.find(function (extra) {
|
|
223
225
|
return extra.id === Number(extraId);
|
|
224
226
|
});
|
|
225
227
|
initExtra && handleOpenExtraDetails(null, initExtra, true);
|
|
@@ -231,7 +233,7 @@ var ProductExtrasUI = function ProductExtrasUI(props) {
|
|
|
231
233
|
onClick: function onClick() {
|
|
232
234
|
return handleOpenAddForm();
|
|
233
235
|
}
|
|
234
|
-
}, t('ADD_PRODUCT_OPTION', 'Add product option'))), (extrasState === null || extrasState === void 0 ? void 0 : extrasState.extras) && (extrasState === null || extrasState === void 0 ? void 0 :
|
|
236
|
+
}, t('ADD_PRODUCT_OPTION', 'Add product option'))), (extrasState === null || extrasState === void 0 ? void 0 : extrasState.extras) && (extrasState === null || extrasState === void 0 || (_extrasState$extras4 = extrasState.extras) === null || _extrasState$extras4 === void 0 ? void 0 : _extrasState$extras4.sort(function (a, b) {
|
|
235
237
|
return a.rank - b.rank;
|
|
236
238
|
}).map(function (extra, index) {
|
|
237
239
|
var _theme$images$icons, _extraIds$includes;
|
package/_modules/index.js
CHANGED
|
@@ -1179,6 +1179,12 @@ Object.defineProperty(exports, "GoogleGpsButton", {
|
|
|
1179
1179
|
return _Delivery.GoogleGpsButton;
|
|
1180
1180
|
}
|
|
1181
1181
|
});
|
|
1182
|
+
Object.defineProperty(exports, "GuestCheckoutFieldsSetting", {
|
|
1183
|
+
enumerable: true,
|
|
1184
|
+
get: function get() {
|
|
1185
|
+
return _Settings.GuestCheckoutFieldsSetting;
|
|
1186
|
+
}
|
|
1187
|
+
});
|
|
1182
1188
|
Object.defineProperty(exports, "HomePage", {
|
|
1183
1189
|
enumerable: true,
|
|
1184
1190
|
get: function get() {
|
|
@@ -2151,6 +2157,12 @@ Object.defineProperty(exports, "SettingsDetail", {
|
|
|
2151
2157
|
return _Settings.SettingsDetail;
|
|
2152
2158
|
}
|
|
2153
2159
|
});
|
|
2160
|
+
Object.defineProperty(exports, "SettingsImage", {
|
|
2161
|
+
enumerable: true,
|
|
2162
|
+
get: function get() {
|
|
2163
|
+
return _Settings.SettingsImage;
|
|
2164
|
+
}
|
|
2165
|
+
});
|
|
2154
2166
|
Object.defineProperty(exports, "SettingsList", {
|
|
2155
2167
|
enumerable: true,
|
|
2156
2168
|
get: function get() {
|
|
@@ -2205,6 +2217,12 @@ Object.defineProperty(exports, "SingleBusinessSubCateogries", {
|
|
|
2205
2217
|
return _Stores.SingleBusinessSubCateogries;
|
|
2206
2218
|
}
|
|
2207
2219
|
});
|
|
2220
|
+
Object.defineProperty(exports, "SitesAuthSettings", {
|
|
2221
|
+
enumerable: true,
|
|
2222
|
+
get: function get() {
|
|
2223
|
+
return _Settings.SitesAuthSettings;
|
|
2224
|
+
}
|
|
2225
|
+
});
|
|
2208
2226
|
Object.defineProperty(exports, "SpinnerLoader", {
|
|
2209
2227
|
enumerable: true,
|
|
2210
2228
|
get: function get() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ordering-ui-admin-external",
|
|
3
|
-
"version": "1.40.
|
|
3
|
+
"version": "1.40.4",
|
|
4
4
|
"description": "Ordering UI Admin Components",
|
|
5
5
|
"main": "./_modules/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"lodash": "^4.17.20",
|
|
84
84
|
"moment": "^2.29.1",
|
|
85
85
|
"moment-range": "^4.0.2",
|
|
86
|
-
"ordering-components-admin-external": "1.40.
|
|
86
|
+
"ordering-components-admin-external": "1.40.3",
|
|
87
87
|
"polished": "^3.6.7",
|
|
88
88
|
"prop-types": "^15.7.2",
|
|
89
89
|
"react-big-calendar": "^1.4.2",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import { BusinessInfo, CheckBox, CustomerInfo, LogisticStatusDot, OrderNumberContainer, OrdersCountWrapper, PriorityDot, StatusInfo, Timer, Timestatus, WrapperImage } from './styles'
|
|
2
|
+
import { BusinessInfo, CheckBox, CustomerInfo, LogisticStatusDot, OrderNumberContainer, OrdersCountWrapper, PriorityDot, StatusInfo, Timer, Timestatus, WrapperImage, InfoWrapper } from './styles'
|
|
3
3
|
import RiCheckboxFill from '@meronex/icons/ri/RiCheckboxFill'
|
|
4
4
|
import RiCheckboxBlankLine from '@meronex/icons/ri/RiCheckboxBlankLine'
|
|
5
5
|
import { useLanguage, useUtils } from 'ordering-components-admin-external'
|
|
@@ -119,6 +119,18 @@ export const Order = React.memo((props) => {
|
|
|
119
119
|
</td>
|
|
120
120
|
)
|
|
121
121
|
}
|
|
122
|
+
if (column === 'agent') {
|
|
123
|
+
return (
|
|
124
|
+
<td className='statusInfo' key={`agentInfo${i}-${index}`}>
|
|
125
|
+
<InfoWrapper>
|
|
126
|
+
<div className='info'>
|
|
127
|
+
<p className='bold'>{order?.agent?.name}</p>
|
|
128
|
+
<p>{order?.agent?.email}</p>
|
|
129
|
+
</div>
|
|
130
|
+
</InfoWrapper>
|
|
131
|
+
</td>
|
|
132
|
+
)
|
|
133
|
+
}
|
|
122
134
|
if (column === 'cartGroupId') {
|
|
123
135
|
return (
|
|
124
136
|
<td className='orderGroupId' key={`cart_group_id${i}-${index}`}>
|
|
@@ -95,6 +95,10 @@ export const OrdersTable = memo((props) => {
|
|
|
95
95
|
value: 'orderNumber',
|
|
96
96
|
content: t('INVOICE_ORDER_NO', 'Order No.')
|
|
97
97
|
},
|
|
98
|
+
{
|
|
99
|
+
value: 'agent',
|
|
100
|
+
content: t('AGENT', 'Agent')
|
|
101
|
+
},
|
|
98
102
|
{
|
|
99
103
|
value: 'cartGroupId',
|
|
100
104
|
content: t('GROUP_ORDER', 'Group Order')
|
|
@@ -411,3 +411,20 @@ export const DragTh = styled.th`
|
|
|
411
411
|
border: 1px solid ${props => props.theme.colors.primary};
|
|
412
412
|
`}
|
|
413
413
|
`
|
|
414
|
+
export const InfoWrapper = styled.div`
|
|
415
|
+
position: relative;
|
|
416
|
+
${props => props.theme?.rtl ? css`
|
|
417
|
+
margin-left: 4px;
|
|
418
|
+
` : css`
|
|
419
|
+
margin-right: 4px;
|
|
420
|
+
`}
|
|
421
|
+
.bold {
|
|
422
|
+
max-width: 150px;
|
|
423
|
+
font-weight: 600;
|
|
424
|
+
margin: 0;
|
|
425
|
+
}
|
|
426
|
+
&:hover > div {
|
|
427
|
+
visibility: visible;
|
|
428
|
+
opacity: 1;
|
|
429
|
+
}
|
|
430
|
+
`
|
|
@@ -34,6 +34,8 @@ import { LanguageTransTable } from './LanguageTransTable'
|
|
|
34
34
|
import { MultiCountrySettings } from './MultiCountrySettings'
|
|
35
35
|
import { CardFieldsSetting } from './CardFieldsSetting'
|
|
36
36
|
import { GuestCheckoutFieldsSetting } from './GuestCheckoutFieldsSetting'
|
|
37
|
+
import { SitesAuthSettings } from './SitesAuthSettings'
|
|
38
|
+
import { SettingsImage } from './SettingsImage'
|
|
37
39
|
export {
|
|
38
40
|
Cms,
|
|
39
41
|
IntegrationListing,
|
|
@@ -70,5 +72,7 @@ export {
|
|
|
70
72
|
LanguageTransTable,
|
|
71
73
|
MultiCountrySettings,
|
|
72
74
|
CardFieldsSetting,
|
|
73
|
-
GuestCheckoutFieldsSetting
|
|
75
|
+
GuestCheckoutFieldsSetting,
|
|
76
|
+
SitesAuthSettings,
|
|
77
|
+
SettingsImage
|
|
74
78
|
}
|
|
@@ -153,7 +153,7 @@ const ProductExtrasUI = (props) => {
|
|
|
153
153
|
useEffect(() => {
|
|
154
154
|
const extraId = query.get('extra')
|
|
155
155
|
if (extraId) {
|
|
156
|
-
const initExtra = extrasState?.extras
|
|
156
|
+
const initExtra = extrasState?.extras?.find(extra => extra.id === Number(extraId))
|
|
157
157
|
initExtra && handleOpenExtraDetails(null, initExtra, true)
|
|
158
158
|
}
|
|
159
159
|
}, [])
|
|
@@ -171,7 +171,7 @@ const ProductExtrasUI = (props) => {
|
|
|
171
171
|
{t('ADD_PRODUCT_OPTION', 'Add product option')}
|
|
172
172
|
</Button>
|
|
173
173
|
</Header>
|
|
174
|
-
{extrasState?.extras && extrasState?.extras
|
|
174
|
+
{extrasState?.extras && extrasState?.extras?.sort((a, b) => a.rank - b.rank).map((extra, index) => {
|
|
175
175
|
const isLastExtra = index === extrasState.extras.length - 1
|
|
176
176
|
return (
|
|
177
177
|
<ExtraOption
|
package/src/index.js
CHANGED
|
@@ -205,7 +205,10 @@ import {
|
|
|
205
205
|
LanguageTransSpread,
|
|
206
206
|
LanguageTransTable,
|
|
207
207
|
MultiCountrySettings,
|
|
208
|
-
CardFieldsSetting
|
|
208
|
+
CardFieldsSetting,
|
|
209
|
+
GuestCheckoutFieldsSetting,
|
|
210
|
+
SitesAuthSettings,
|
|
211
|
+
SettingsImage
|
|
209
212
|
} from './components/Settings'
|
|
210
213
|
import {
|
|
211
214
|
BusinessBrandListing,
|
|
@@ -626,6 +629,10 @@ export {
|
|
|
626
629
|
LanguageTransTable,
|
|
627
630
|
MultiCountrySettings,
|
|
628
631
|
CardFieldsSetting,
|
|
632
|
+
GuestCheckoutFieldsSetting,
|
|
633
|
+
SitesAuthSettings,
|
|
634
|
+
SettingsImage,
|
|
635
|
+
|
|
629
636
|
Support,
|
|
630
637
|
|
|
631
638
|
BusinessBrandListing,
|