ordering-ui-admin-external 1.45.6 → 1.45.8
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.b46e1561ca1f8a32ee69.js → ordering-ui-admin.9c076ac5c6cc871c5819.js} +2 -2
- package/_modules/components/Orders/OrdersDashboardSLAControls/index.js +22 -1
- package/_modules/components/Orders/OrdersListing/index.js +1 -1
- package/_modules/contexts/FilterValuesContext/index.js +2 -1
- package/package.json +2 -2
- package/src/components/Orders/OrdersDashboardSLAControls/index.js +10 -1
- package/src/components/Orders/OrdersListing/index.js +1 -1
- package/src/contexts/FilterValuesContext/index.js +2 -1
- /package/_bundles/{ordering-ui-admin.b46e1561ca1f8a32ee69.js.LICENSE.txt → ordering-ui-admin.9c076ac5c6cc871c5819.js.LICENSE.txt} +0 -0
|
@@ -9,6 +9,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
9
9
|
var _orderingComponentsAdminExternal = require("ordering-components-admin-external");
|
|
10
10
|
var _FirstSelect = require("../../../styles/Select/FirstSelect");
|
|
11
11
|
var _OrderDashboardSLASetting = require("../OrderDashboardSLASetting");
|
|
12
|
+
var _FilterValuesContext = require("../../../contexts/FilterValuesContext");
|
|
12
13
|
var _styles = require("./styles");
|
|
13
14
|
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); }
|
|
14
15
|
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 && {}.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; }
|
|
@@ -16,6 +17,11 @@ function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArra
|
|
|
16
17
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
17
18
|
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
18
19
|
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
20
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
21
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
22
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
23
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
24
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
19
25
|
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
20
26
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
21
27
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
@@ -23,9 +29,14 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
|
|
|
23
29
|
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; } }
|
|
24
30
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
25
31
|
var OrdersDashboardSLAControls = exports.OrdersDashboardSLAControls = function OrdersDashboardSLAControls(props) {
|
|
32
|
+
var _filterValues$timeSta;
|
|
26
33
|
var setTimeStatus = props.setTimeStatus,
|
|
27
34
|
setSlaSettingTime = props.setSlaSettingTime;
|
|
28
|
-
var
|
|
35
|
+
var _useFilterValues = (0, _FilterValuesContext.useFilterValues)(),
|
|
36
|
+
_useFilterValues2 = _slicedToArray(_useFilterValues, 2),
|
|
37
|
+
filterValues = _useFilterValues2[0],
|
|
38
|
+
handleFilterValues = _useFilterValues2[1].handleFilterValues;
|
|
39
|
+
var _useState = (0, _react.useState)((_filterValues$timeSta = filterValues === null || filterValues === void 0 ? void 0 : filterValues.timeStatus) !== null && _filterValues$timeSta !== void 0 ? _filterValues$timeSta : 'default'),
|
|
29
40
|
_useState2 = _slicedToArray(_useState, 2),
|
|
30
41
|
defaultOptionValue = _useState2[0],
|
|
31
42
|
setDefaultOptionValue = _useState2[1];
|
|
@@ -86,9 +97,15 @@ var OrdersDashboardSLAControls = exports.OrdersDashboardSLAControls = function O
|
|
|
86
97
|
}
|
|
87
98
|
setDefaultOptionValue(val);
|
|
88
99
|
if (val === 'default') {
|
|
100
|
+
handleFilterValues(_objectSpread(_objectSpread({}, filterValues), {}, {
|
|
101
|
+
timeStatus: null
|
|
102
|
+
}));
|
|
89
103
|
setTimeStatus(null);
|
|
90
104
|
return;
|
|
91
105
|
}
|
|
106
|
+
handleFilterValues(_objectSpread(_objectSpread({}, filterValues), {}, {
|
|
107
|
+
timeStatus: val
|
|
108
|
+
}));
|
|
92
109
|
setTimeStatus(val);
|
|
93
110
|
};
|
|
94
111
|
var handleChangeSearch = function handleChangeSearch(searchValue) {
|
|
@@ -97,6 +114,10 @@ var OrdersDashboardSLAControls = exports.OrdersDashboardSLAControls = function O
|
|
|
97
114
|
}));
|
|
98
115
|
setFilteredTimeStatus(_filteredTimeStatus);
|
|
99
116
|
};
|
|
117
|
+
(0, _react.useEffect)(function () {
|
|
118
|
+
if (filterValues !== null && filterValues !== void 0 && filterValues.timeStatus) return;
|
|
119
|
+
setDefaultOptionValue('default');
|
|
120
|
+
}, [filterValues === null || filterValues === void 0 ? void 0 : filterValues.timeStatus]);
|
|
100
121
|
(0, _react.useEffect)(function () {
|
|
101
122
|
setFilteredTimeStatus(timeStatus);
|
|
102
123
|
}, []);
|
|
@@ -96,7 +96,7 @@ var OrdersListing = exports.OrdersListing = /*#__PURE__*/(0, _react.memo)(functi
|
|
|
96
96
|
}, {
|
|
97
97
|
value: 'dateTime',
|
|
98
98
|
content: t('DATE_TIME', 'Date and time'),
|
|
99
|
-
enabled:
|
|
99
|
+
enabled: !showExternalId
|
|
100
100
|
}, {
|
|
101
101
|
value: 'agent',
|
|
102
102
|
content: t('AGENT', 'Agent'),
|
|
@@ -54,7 +54,8 @@ var FilterValuesProvider = exports.FilterValuesProvider = function FilterValuesP
|
|
|
54
54
|
customerLastname: null,
|
|
55
55
|
coupon: null,
|
|
56
56
|
offerId: null,
|
|
57
|
-
administratorIds: []
|
|
57
|
+
administratorIds: [],
|
|
58
|
+
timeStatus: null
|
|
58
59
|
}),
|
|
59
60
|
_useState2 = _slicedToArray(_useState, 2),
|
|
60
61
|
filterValues = _useState2[0],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ordering-ui-admin-external",
|
|
3
|
-
"version": "1.45.
|
|
3
|
+
"version": "1.45.08",
|
|
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.43.
|
|
86
|
+
"ordering-components-admin-external": "1.43.65",
|
|
87
87
|
"polished": "^3.6.7",
|
|
88
88
|
"prop-types": "^15.7.2",
|
|
89
89
|
"react-big-calendar": "^1.4.2",
|
|
@@ -3,6 +3,7 @@ import { useLanguage } from 'ordering-components-admin-external'
|
|
|
3
3
|
|
|
4
4
|
import { Select as FirstSelect } from '../../../styles/Select/FirstSelect'
|
|
5
5
|
import { OrderDashboardSLASetting } from '../OrderDashboardSLASetting'
|
|
6
|
+
import { useFilterValues } from '../../../contexts/FilterValuesContext'
|
|
6
7
|
|
|
7
8
|
import {
|
|
8
9
|
OrdersDashboardSLAControlsContainer,
|
|
@@ -13,7 +14,8 @@ import {
|
|
|
13
14
|
|
|
14
15
|
export const OrdersDashboardSLAControls = (props) => {
|
|
15
16
|
const { setTimeStatus, setSlaSettingTime } = props
|
|
16
|
-
const [
|
|
17
|
+
const [filterValues, { handleFilterValues }] = useFilterValues()
|
|
18
|
+
const [defaultOptionValue, setDefaultOptionValue] = useState(filterValues?.timeStatus ?? 'default')
|
|
17
19
|
const [filteredTimeStatus, setFilteredTimeStatus] = useState([])
|
|
18
20
|
const [settingOptionOpen, setSettingOptionOpen] = useState(false)
|
|
19
21
|
const [, t] = useLanguage()
|
|
@@ -77,9 +79,11 @@ export const OrdersDashboardSLAControls = (props) => {
|
|
|
77
79
|
}
|
|
78
80
|
setDefaultOptionValue(val)
|
|
79
81
|
if (val === 'default') {
|
|
82
|
+
handleFilterValues({ ...filterValues, timeStatus: null })
|
|
80
83
|
setTimeStatus(null)
|
|
81
84
|
return
|
|
82
85
|
}
|
|
86
|
+
handleFilterValues({ ...filterValues, timeStatus: val })
|
|
83
87
|
setTimeStatus(val)
|
|
84
88
|
}
|
|
85
89
|
|
|
@@ -88,6 +92,11 @@ export const OrdersDashboardSLAControls = (props) => {
|
|
|
88
92
|
setFilteredTimeStatus(_filteredTimeStatus)
|
|
89
93
|
}
|
|
90
94
|
|
|
95
|
+
useEffect(() => {
|
|
96
|
+
if (filterValues?.timeStatus) return
|
|
97
|
+
setDefaultOptionValue('default')
|
|
98
|
+
}, [filterValues?.timeStatus])
|
|
99
|
+
|
|
91
100
|
useEffect(() => {
|
|
92
101
|
setFilteredTimeStatus(timeStatus)
|
|
93
102
|
}, [])
|