ordering-ui-admin-external 1.22.1 → 1.22.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.
@@ -119,7 +119,7 @@ var DriversGroupLogsUI = function DriversGroupLogsUI(props) {
119
119
  }, [logsList.logs, paginationProps]);
120
120
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles.DriversGroupLogsContainer, {
121
121
  disabled: actionDisabled
122
- }, /*#__PURE__*/_react.default.createElement(_styles.TableWrapper, null, logsList.loading || logsList.logs.length > 0 ? /*#__PURE__*/_react.default.createElement(_styles.Table, null, /*#__PURE__*/_react.default.createElement("thead", null, /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("th", null, t('CONTROL_PANEL_USERS', 'Users')), /*#__PURE__*/_react.default.createElement("th", null, t('DETAILS', 'Details')), /*#__PURE__*/_react.default.createElement("th", null, t('EXPORT_DATE', 'Date')), /*#__PURE__*/_react.default.createElement("th", null, t('USER_AGENT', 'User agent')))), logsList.loading ? _toConsumableArray(Array(10).keys()).map(function (i) {
122
+ }, /*#__PURE__*/_react.default.createElement(_styles.TableWrapper, null, logsList.loading || logsList.logs.length > 0 ? /*#__PURE__*/_react.default.createElement(_styles.Table, null, /*#__PURE__*/_react.default.createElement("thead", null, /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("th", null, t('CONTROL_PANEL_USERS', 'Users')), /*#__PURE__*/_react.default.createElement("th", null, t('EVENTS_TYPE', 'Events type')), /*#__PURE__*/_react.default.createElement("th", null, t('DETAILS', 'Details')), /*#__PURE__*/_react.default.createElement("th", null, t('EXPORT_DATE', 'Date')), /*#__PURE__*/_react.default.createElement("th", null, t('USER_AGENT', 'User agent')))), logsList.loading ? _toConsumableArray(Array(10).keys()).map(function (i) {
123
123
  return /*#__PURE__*/_react.default.createElement("tbody", {
124
124
  key: i
125
125
  }, /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement(_styles.UserInfoContainer, null, /*#__PURE__*/_react.default.createElement("p", null, /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
@@ -137,7 +137,7 @@ var DriversGroupLogsUI = function DriversGroupLogsUI(props) {
137
137
  var _log$user, _log$user2, _log$user3;
138
138
  return /*#__PURE__*/_react.default.createElement("tbody", {
139
139
  key: log.id
140
- }, /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement(_styles.UserInfoContainer, null, /*#__PURE__*/_react.default.createElement("p", null, log === null || log === void 0 ? void 0 : (_log$user = log.user) === null || _log$user === void 0 ? void 0 : _log$user.name, " ", log === null || log === void 0 ? void 0 : (_log$user2 = log.user) === null || _log$user2 === void 0 ? void 0 : _log$user2.lastname), /*#__PURE__*/_react.default.createElement("p", null, log === null || log === void 0 ? void 0 : (_log$user3 = log.user) === null || _log$user3 === void 0 ? void 0 : _log$user3.email))), /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement(_styles.DataListTable, null, (log === null || log === void 0 ? void 0 : log.data) && (_typeof(log === null || log === void 0 ? void 0 : log.data) === 'object' ? Object.values(log === null || log === void 0 ? void 0 : log.data) : log === null || log === void 0 ? void 0 : log.data).map(function (item, i) {
140
+ }, /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement(_styles.UserInfoContainer, null, /*#__PURE__*/_react.default.createElement("p", null, log === null || log === void 0 ? void 0 : (_log$user = log.user) === null || _log$user === void 0 ? void 0 : _log$user.name, " ", log === null || log === void 0 ? void 0 : (_log$user2 = log.user) === null || _log$user2 === void 0 ? void 0 : _log$user2.lastname), /*#__PURE__*/_react.default.createElement("p", null, log === null || log === void 0 ? void 0 : (_log$user3 = log.user) === null || _log$user3 === void 0 ? void 0 : _log$user3.email))), /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement(_styles.EventTypeContainer, null, /*#__PURE__*/_react.default.createElement("p", null, t(log === null || log === void 0 ? void 0 : log.event)))), /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement(_styles.DataListTable, null, (log === null || log === void 0 ? void 0 : log.data) && (_typeof(log === null || log === void 0 ? void 0 : log.data) === 'object' ? Object.values(log === null || log === void 0 ? void 0 : log.data) : log === null || log === void 0 ? void 0 : log.data).map(function (item, i) {
141
141
  return /*#__PURE__*/_react.default.createElement("tbody", {
142
142
  key: i
143
143
  }, /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, getAttributeName(item === null || item === void 0 ? void 0 : item.attribute)), /*#__PURE__*/_react.default.createElement("td", null, typeof (item === null || item === void 0 ? void 0 : item.new) !== 'undefined' ? "".concat(item === null || item === void 0 ? void 0 : item.new) : (item === null || item === void 0 ? void 0 : item.added.length) > 0 ? item === null || item === void 0 ? void 0 : item.added.toString() : t('NONE', 'None')), /*#__PURE__*/_react.default.createElement("td", null, typeof (item === null || item === void 0 ? void 0 : item.old) !== 'undefined' ? "".concat(item === null || item === void 0 ? void 0 : item.old) : (item === null || item === void 0 ? void 0 : item.removed.length) > 0 ? item === null || item === void 0 ? void 0 : item.removed.toString() : t('NONE', 'None'))));
@@ -4,9 +4,9 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.WrapperPagination = exports.UserInfoContainer = exports.TableWrapper = exports.Table = exports.NoData = exports.DriversGroupLogsContainer = exports.DateTimeWrapper = exports.DataListTable = void 0;
7
+ exports.WrapperPagination = exports.UserInfoContainer = exports.TableWrapper = exports.Table = exports.NoData = exports.EventTypeContainer = exports.DriversGroupLogsContainer = exports.DateTimeWrapper = exports.DataListTable = 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;
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;
10
10
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
11
11
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
12
12
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
@@ -17,7 +17,7 @@ var DriversGroupLogsContainer = _styledComponents.default.div(_templateObject ||
17
17
  exports.DriversGroupLogsContainer = DriversGroupLogsContainer;
18
18
  var TableWrapper = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n overflow: auto;\n height: 100%;\n"])));
19
19
  exports.TableWrapper = TableWrapper;
20
- var Table = _styledComponents.default.table(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n width: 100%;\n min-width: 1000px;\n color: ", ";\n\n thead {\n tr {\n border-bottom: solid 1px ", ";\n th {\n padding: 13px 0;\n font-size: 12px;\n &:first-child {\n width: 10%;\n ", "\n box-sizing: border-box;\n }\n &:nth-child(2) {\n width: 35%;\n padding-left: 15px;\n padding-right: 15px;\n box-sizing: border-box;\n }\n &:nth-child(3) {\n ", "\n box-sizing: border-box;\n }\n }\n }\n }\n\n > tbody {\n border-bottom: 1px solid ", ";\n td {\n padding: 13px 0;\n font-size: 12px;\n &:first-child {\n width: 10%;\n ", "\n box-sizing: border-box;\n }\n &:nth-child(2) {\n width: 35%;\n }\n &:nth-child(3) {\n ", "\n box-sizing: border-box;\n }\n }\n }\n"])), function (props) {
20
+ var Table = _styledComponents.default.table(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n width: 100%;\n min-width: 1000px;\n color: ", ";\n\n thead {\n tr {\n border-bottom: solid 1px ", ";\n th {\n padding: 13px 0;\n font-size: 12px;\n &:first-child {\n width: 10%;\n ", "\n box-sizing: border-box;\n }\n &:nth-child(3) {\n width: 35%\n padding-left: 15px;\n padding-right: 15px;\n box-sizing: border-box;\n }\n &:nth-child(4) {\n ", "\n box-sizing: border-box;\n }\n }\n }\n }\n\n > tbody {\n border-bottom: 1px solid ", ";\n td {\n padding: 13px 0;\n font-size: 12px;\n &:first-child {\n width: 10%;\n ", "\n box-sizing: border-box;\n }\n &:nth-child(3) {\n width: 35%;\n }\n &:nth-child(4) {\n ", "\n box-sizing: border-box;\n }\n }\n }\n"])), function (props) {
21
21
  var _props$theme$colors;
22
22
  return (_props$theme$colors = props.theme.colors) === null || _props$theme$colors === void 0 ? void 0 : _props$theme$colors.headingColor;
23
23
  }, function (props) {
@@ -65,4 +65,13 @@ var DataListTable = _styledComponents.default.table(_templateObject19 || (_templ
65
65
  var _props$theme6;
66
66
  return (_props$theme6 = props.theme) !== null && _props$theme6 !== void 0 && _props$theme6.rtl ? (0, _styledComponents.css)(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n padding-left: 15px;\n "]))) : (0, _styledComponents.css)(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n padding-right: 15px;\n "])));
67
67
  });
68
- exports.DataListTable = DataListTable;
68
+ exports.DataListTable = DataListTable;
69
+ var EventTypeContainer = _styledComponents.default.div(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n white-space: nowrap;\n font-size: 12px;\n min-height: 36px;\n display: flex;\n align-items: center;\n p{\n margin-bottom: 0px;\n }\n ", "\n"])), function (props) {
70
+ var _props$theme7;
71
+ return (_props$theme7 = props.theme) !== null && _props$theme7 !== void 0 && _props$theme7.rtl ? (0, _styledComponents.css)(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["\n padding-right: 15px;\n margin-right: 15px;\n border-right: 1px solid ", ";\n "])), function (props) {
72
+ return props.theme.colors.borderColor;
73
+ }) : (0, _styledComponents.css)(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["\n padding-left: 15px;\n margin-left: 15px;\n border-left: 1px solid ", ";\n "])), function (props) {
74
+ return props.theme.colors.borderColor;
75
+ });
76
+ });
77
+ exports.EventTypeContainer = EventTypeContainer;
@@ -29,6 +29,7 @@ var OrdersDashboardList = function OrdersDashboardList(props) {
29
29
  isSearchByCustomerEmail: true,
30
30
  isSearchByCustomerPhone: true,
31
31
  isSearchByBusinessName: true,
32
+ isSearchByDriverName: true,
32
33
  driverId: props.driverId
33
34
  });
34
35
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, isMessagesView ? /*#__PURE__*/_react.default.createElement(_orderingComponentsAdminExternal.DashboardOrdersList, _extends({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-ui-admin-external",
3
- "version": "1.22.1",
3
+ "version": "1.22.3",
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.22.0",
86
+ "ordering-components-admin-external": "1.22.1",
87
87
  "polished": "^3.6.7",
88
88
  "prop-types": "^15.7.2",
89
89
  "react-big-calendar": "^1.4.2",
@@ -11,7 +11,8 @@ import {
11
11
  DateTimeWrapper,
12
12
  NoData,
13
13
  WrapperPagination,
14
- DataListTable
14
+ DataListTable,
15
+ EventTypeContainer
15
16
  } from './styles'
16
17
 
17
18
  export const DriversGroupLogsUI = (props) => {
@@ -82,6 +83,7 @@ export const DriversGroupLogsUI = (props) => {
82
83
  <thead>
83
84
  <tr>
84
85
  <th>{t('CONTROL_PANEL_USERS', 'Users')}</th>
86
+ <th>{t('EVENTS_TYPE', 'Events type')}</th>
85
87
  <th>{t('DETAILS', 'Details')}</th>
86
88
  <th>{t('EXPORT_DATE', 'Date')}</th>
87
89
  <th>{t('USER_AGENT', 'User agent')}</th>
@@ -129,6 +131,11 @@ export const DriversGroupLogsUI = (props) => {
129
131
  <p>{log?.user?.email}</p>
130
132
  </UserInfoContainer>
131
133
  </td>
134
+ <td>
135
+ <EventTypeContainer>
136
+ <p>{t(log?.event)}</p>
137
+ </EventTypeContainer>
138
+ </td>
132
139
  <td>
133
140
  <DataListTable>
134
141
  {log?.data && (typeof log?.data === 'object' ? Object.values(log?.data) : log?.data).map((item, i) => (
@@ -33,13 +33,13 @@ export const Table = styled.table`
33
33
  `}
34
34
  box-sizing: border-box;
35
35
  }
36
- &:nth-child(2) {
37
- width: 35%;
36
+ &:nth-child(3) {
37
+ width: 35%
38
38
  padding-left: 15px;
39
39
  padding-right: 15px;
40
40
  box-sizing: border-box;
41
41
  }
42
- &:nth-child(3) {
42
+ &:nth-child(4) {
43
43
  ${props => props.theme?.rtl ? css`
44
44
  padding-right: 15px;
45
45
  ` : css`
@@ -65,10 +65,10 @@ export const Table = styled.table`
65
65
  `}
66
66
  box-sizing: border-box;
67
67
  }
68
- &:nth-child(2) {
68
+ &:nth-child(3) {
69
69
  width: 35%;
70
70
  }
71
- &:nth-child(3) {
71
+ &:nth-child(4) {
72
72
  ${props => props.theme?.rtl ? css`
73
73
  padding-right: 15px;
74
74
  ` : css`
@@ -148,3 +148,23 @@ export const DataListTable = styled.table`
148
148
  }
149
149
  }
150
150
  `
151
+
152
+ export const EventTypeContainer = styled.div`
153
+ white-space: nowrap;
154
+ font-size: 12px;
155
+ min-height: 36px;
156
+ display: flex;
157
+ align-items: center;
158
+ p{
159
+ margin-bottom: 0px;
160
+ }
161
+ ${props => props.theme?.rtl ? css`
162
+ padding-right: 15px;
163
+ margin-right: 15px;
164
+ border-right: 1px solid ${props => props.theme.colors.borderColor};
165
+ ` : css`
166
+ padding-left: 15px;
167
+ margin-left: 15px;
168
+ border-left: 1px solid ${props => props.theme.colors.borderColor};
169
+ `}
170
+ `
@@ -22,6 +22,7 @@ export const OrdersDashboardList = (props) => {
22
22
  isSearchByCustomerEmail: true,
23
23
  isSearchByCustomerPhone: true,
24
24
  isSearchByBusinessName: true,
25
+ isSearchByDriverName: true,
25
26
  driverId: props.driverId
26
27
  }
27
28