ordering-ui-admin-external 1.43.18 → 1.43.20

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.
Files changed (35) hide show
  1. package/_bundles/{ordering-ui-admin.f259950aaf0e426c1af6.js → ordering-ui-admin.93ac710b95858715130d.js} +2 -2
  2. package/_modules/components/Orders/AdminsSelector/index.js +115 -0
  3. package/_modules/components/Orders/AdminsSelector/styles.js +67 -0
  4. package/_modules/components/Orders/AllInOne/index.js +19 -14
  5. package/_modules/components/Orders/DeliveryDashboard/index.js +1 -8
  6. package/_modules/components/Orders/OrderDashboardSLASetting/index.js +7 -3
  7. package/_modules/components/Orders/OrdersCards/index.js +4 -13
  8. package/_modules/components/Orders/OrdersCards/styles.js +12 -38
  9. package/_modules/components/Orders/OrdersContentHeader/index.js +17 -8
  10. package/_modules/components/Orders/OrdersContentHeader/styles.js +18 -11
  11. package/_modules/components/Orders/OrdersDashboardSLAControls/index.js +22 -2
  12. package/_modules/components/Orders/OrdersDashboardSLAControls/styles.js +1 -1
  13. package/_modules/components/Orders/OrdersFilterGroup/index.js +8 -1
  14. package/_modules/components/Orders/OrdersHeaderFilterGroup/styles.js +3 -4
  15. package/_modules/components/Orders/OrdersManager/index.js +2 -7
  16. package/_modules/components/Orders/WebsocketStatus/index.js +1 -1
  17. package/_modules/contexts/FilterValuesContext/index.js +1 -0
  18. package/package.json +2 -2
  19. package/src/components/Orders/AdminsSelector/index.js +97 -0
  20. package/src/components/Orders/AdminsSelector/styles.js +142 -0
  21. package/src/components/Orders/AllInOne/index.js +14 -14
  22. package/src/components/Orders/DeliveryDashboard/index.js +0 -8
  23. package/src/components/Orders/OrderDashboardSLASetting/index.js +14 -8
  24. package/src/components/Orders/OrdersCards/index.js +4 -9
  25. package/src/components/Orders/OrdersCards/styles.js +2 -22
  26. package/src/components/Orders/OrdersContentHeader/index.js +21 -10
  27. package/src/components/Orders/OrdersContentHeader/styles.js +11 -5
  28. package/src/components/Orders/OrdersDashboardSLAControls/index.js +23 -1
  29. package/src/components/Orders/OrdersDashboardSLAControls/styles.js +1 -1
  30. package/src/components/Orders/OrdersFilterGroup/index.js +8 -0
  31. package/src/components/Orders/OrdersHeaderFilterGroup/styles.js +15 -12
  32. package/src/components/Orders/OrdersManager/index.js +2 -8
  33. package/src/components/Orders/WebsocketStatus/index.js +1 -1
  34. package/src/contexts/FilterValuesContext/index.js +1 -0
  35. /package/_bundles/{ordering-ui-admin.f259950aaf0e426c1af6.js.LICENSE.txt → ordering-ui-admin.93ac710b95858715130d.js.LICENSE.txt} +0 -0
@@ -4,13 +4,13 @@ import { SearchBar } from '../../Shared'
4
4
  import { OrdersFilterGroup } from '../OrdersFilterGroup'
5
5
  import { List as MenuIcon, LifePreserver } from 'react-bootstrap-icons'
6
6
  import { OrdersDashboardSLAControls } from '../OrdersDashboardSLAControls'
7
- import { OrderDashboardSLASetting } from '../OrderDashboardSLASetting'
8
7
  import { IconButton } from '../../../styles'
9
8
  import { useInfoShare } from '../../../contexts/InfoShareContext'
10
9
  import { OverlayTrigger, Tooltip } from 'react-bootstrap'
11
10
  import { useWindowSize } from '../../../hooks/useWindowSize'
12
11
  import { GoogleMapsApiKeySettingButton } from '../GoogleMapsApiKeySettingButton'
13
12
  import { WebsocketStatus } from '../WebsocketStatus'
13
+ import { OrdersHeaderFilterGroup } from '../OrdersHeaderFilterGroup'
14
14
 
15
15
  import {
16
16
  OrderContentHeaderContainer,
@@ -18,10 +18,11 @@ import {
18
18
  HeaderTitle,
19
19
  TopRightSection,
20
20
  SLAControlsWrapper,
21
- WrapperSearchAndFilter
21
+ WrapperSearchAndFilter,
22
+ WrapperHeaderFilterGroup
22
23
  } from './styles'
23
24
 
24
- export const OrdersContentHeader = memo((props) => {
25
+ export const OrdersContentHeader = (props) => {
25
26
  const {
26
27
  isLateralBar,
27
28
  isDisableTitle,
@@ -41,7 +42,8 @@ export const OrdersContentHeader = memo((props) => {
41
42
  setFilterModalOpen,
42
43
  setTimeStatus,
43
44
  setSlaSettingTime,
44
- isShowMapsKeySettingButton
45
+ isShowMapsKeySettingButton,
46
+ adminsList
45
47
  } = props
46
48
 
47
49
  const { width } = useWindowSize()
@@ -91,24 +93,32 @@ export const OrdersContentHeader = memo((props) => {
91
93
 
92
94
  </HeaderSection>
93
95
  )}
94
- <TopRightSection isCustomLayout={isSelectedOrders}>
96
+ <TopRightSection isCustomLayout={isSelectedOrders} isCollapse={isCollapse}>
97
+ <WrapperHeaderFilterGroup>
98
+ <OrdersHeaderFilterGroup
99
+ isSelectedOrders={isSelectedOrders}
100
+ driverGroupList={driverGroupList}
101
+ driversList={driversList}
102
+ searchValue={searchValue}
103
+ handleChangeFilterValues={handleChangeFilterValues}
104
+ handleChangeSearch={handleChangeSearch}
105
+ />
106
+ </WrapperHeaderFilterGroup>
95
107
  <WebsocketStatus />
96
108
  {isShowMapsKeySettingButton && (
97
109
  <GoogleMapsApiKeySettingButton />
98
110
  )}
99
111
  {(configState?.configs?.order_deadlines_enabled?.value === '1') && (
100
112
  <SLAControlsWrapper>
101
- <OrderDashboardSLASetting
102
- setSlaSettingTime={setSlaSettingTime}
103
- />
104
113
  <OrdersDashboardSLAControls
105
114
  setTimeStatus={setTimeStatus}
115
+ setSlaSettingTime={setSlaSettingTime}
106
116
  />
107
117
  </SLAControlsWrapper>
108
118
  )}
109
119
  <WrapperSearchAndFilter
110
120
  fullWidth={isDisableTitle}
111
- >
121
+ >
112
122
  {isShowSearchFilters && (
113
123
  <SearchBar
114
124
  isCustomLayout
@@ -127,6 +137,7 @@ export const OrdersContentHeader = memo((props) => {
127
137
  paymethodsList={paymethodsList}
128
138
  businessesList={businessesList}
129
139
  citiesList={citiesList}
140
+ adminsList={adminsList}
130
141
  handleChangeFilterValues={handleChangeFilterValues}
131
142
  searchValue={searchValue}
132
143
  handleChangeSearch={handleChangeSearch}
@@ -136,4 +147,4 @@ export const OrdersContentHeader = memo((props) => {
136
147
  </OrderContentHeaderContainer>
137
148
  </>
138
149
  )
139
- })
150
+ }
@@ -66,8 +66,10 @@ export const HeaderTitle = styled.p`
66
66
  export const TopRightSection = styled.div`
67
67
  width: 100%;
68
68
  display: flex;
69
- flex-direction: column;
70
- flex-wrap: wrap;
69
+ flex-direction: column-reverse;
70
+ flex-wrap: nowrap;
71
+ margin: 5px 0px 10px 15px;
72
+
71
73
  ${({ isCustomLayout }) => !isCustomLayout && css`
72
74
  justify-content: flex-end;
73
75
  `}
@@ -78,12 +80,16 @@ export const TopRightSection = styled.div`
78
80
  }
79
81
  `}
80
82
 
81
- @media (min-width: 768px) {
82
- flex-direction: row;
83
- align-items: center;
83
+ @media (min-width: 799px) {
84
+ flex-direction: ${({ isCustomLayout }) => (isCustomLayout) ? 'column-reverse' : 'row'};
85
+ align-items: ${({ isCustomLayout }) => (isCustomLayout) ? 'flex-start' : 'center'};
84
86
  }
85
87
  `
86
88
 
89
+ export const WrapperHeaderFilterGroup = styled.div`
90
+ width: 100%;
91
+ max-width: 850px
92
+ `
87
93
  export const SLAControlsWrapper = styled.div`
88
94
  display: flex;
89
95
  align-items: center;
@@ -2,6 +2,7 @@ import React, { useState, useEffect } from 'react'
2
2
  import { useLanguage } from 'ordering-components-admin-external'
3
3
 
4
4
  import { Select as FirstSelect } from '../../../styles/Select/FirstSelect'
5
+ import { OrderDashboardSLASetting } from '../OrderDashboardSLASetting'
5
6
 
6
7
  import {
7
8
  OrdersDashboardSLAControlsContainer,
@@ -11,9 +12,10 @@ import {
11
12
  } from './styles'
12
13
 
13
14
  export const OrdersDashboardSLAControls = (props) => {
14
- const { setTimeStatus } = props
15
+ const { setTimeStatus, setSlaSettingTime } = props
15
16
  const [defaultOptionValue, setDefaultOptionValue] = useState('default')
16
17
  const [filteredTimeStatus, setFilteredTimeStatus] = useState([])
18
+ const [settingOptionOpen, setSettingOptionOpen] = useState(false)
17
19
  const [, t] = useLanguage()
18
20
 
19
21
  const timeStatus = [
@@ -56,10 +58,23 @@ export const OrdersDashboardSLAControls = (props) => {
56
58
  <p>{t('DELAYED', 'Delayed')}</p>
57
59
  </Option>
58
60
  )
61
+ },
62
+ {
63
+ value: 'sla_settings',
64
+ name: t('SLA_SETTING', 'SLA’s settings'),
65
+ content: (
66
+ <Option noPadding>
67
+ <p>{t('SLA_SETTING', 'SLA’s settings')}</p>
68
+ </Option>
69
+ )
59
70
  }
60
71
  ]
61
72
 
62
73
  const changeOrderTimeStatus = (val) => {
74
+ if (val === 'sla_settings') {
75
+ setSettingOptionOpen(true)
76
+ return
77
+ }
63
78
  setDefaultOptionValue(val)
64
79
  if (val === 'default') {
65
80
  setTimeStatus(null)
@@ -92,6 +107,13 @@ export const OrdersDashboardSLAControls = (props) => {
92
107
  handleChangeSearch={handleChangeSearch}
93
108
  />
94
109
  </OrderTimeStatusSelectWrapper>
110
+ {settingOptionOpen && (
111
+ <OrderDashboardSLASetting
112
+ setSlaSettingTime={setSlaSettingTime}
113
+ settingOptionOpen={settingOptionOpen}
114
+ setSettingOptionOpen={setSettingOptionOpen}
115
+ />
116
+ )}
95
117
  </OrdersDashboardSLAControlsContainer>
96
118
  )
97
119
  }
@@ -27,7 +27,7 @@ export const OrdersDashboardSLAControlsContainer = styled.div`
27
27
 
28
28
  export const OrderTimeStatusSelectWrapper = styled.div`
29
29
  .timeStatusSelect {
30
- width: 168px;
30
+ width: fit-content;
31
31
  height: 43px;
32
32
  line-height: 43px;
33
33
  border: none;
@@ -14,6 +14,7 @@ import { PaymethodTypeSelector } from '../PaymethodTypeSelector'
14
14
  import { CountryFilter } from '../CountryFilter'
15
15
  import { Button, IconButton, Input, LinkButton } from '../../../styles'
16
16
  import { CurrencyFilter } from '../CurrencyFilter'
17
+ import { AdminsSelector } from '../AdminsSelector'
17
18
  import { getUniqueId } from '../../../utils'
18
19
  import { Select } from '../../../styles/Select/FirstSelect'
19
20
  import { useFilterValues } from '../../../contexts/FilterValuesContext'
@@ -44,6 +45,7 @@ const OrdersFilterGroupUI = (props) => {
44
45
  paymethodsList,
45
46
  businessesList,
46
47
  citiesList,
48
+ adminsList,
47
49
  handleChangeGroup,
48
50
  handleChangeDateType,
49
51
  handleChangeFromDate,
@@ -61,6 +63,7 @@ const OrdersFilterGroupUI = (props) => {
61
63
  handleChangeCurrency,
62
64
  handleChangeMetaFieldValue,
63
65
  handleAddMetaField,
66
+ handleChangeAdmin,
64
67
  handleDeleteMetafield,
65
68
  handleChangeExternalId,
66
69
  handleChangeChildFilterValue,
@@ -329,6 +332,11 @@ const OrdersFilterGroupUI = (props) => {
329
332
  onChange={(value) => handleChangeChildFilterValue({ assigned: value })}
330
333
  />
331
334
  </SelectWrapper>
335
+ <AdminsSelector
336
+ filterValues={filterValues}
337
+ adminsList={adminsList}
338
+ handleChangeAdmin={handleChangeAdmin}
339
+ />
332
340
  </WrapperRow>
333
341
  {filterValues?.metafield.map(item => (
334
342
  <WrapperRow key={item.id}>
@@ -2,10 +2,8 @@ import styled, { css } from 'styled-components'
2
2
 
3
3
  export const WrapperRow = styled.div`
4
4
  display: flex;
5
- width: 100% !important;
6
- flex-direction: column;
7
- justify-content: flex-start;
8
- padding-top: 10px;
5
+ width: 100%;
6
+ align-items: center;
9
7
  padding-bottom: 0px;
10
8
 
11
9
  & > div {
@@ -13,7 +11,6 @@ export const WrapperRow = styled.div`
13
11
  height: 47px;
14
12
  max-width: 1000px;
15
13
  margin-right: 10px;
16
- margin-bottom: 20px;
17
14
  background-color: ${props => props.theme.colors.secundary};
18
15
  border: none;
19
16
  font-size: 14px;
@@ -53,18 +50,24 @@ export const WrapperRow = styled.div`
53
50
 
54
51
  .external_id {
55
52
  @media (max-width: 1200px) {
56
- flex: auto;
57
- }
58
-
53
+ flex: auto;
54
+ }
59
55
  }
60
56
 
61
- @media (min-width: 992px) {
62
- flex-direction: row;
57
+ @media (max-width: 798px) {
58
+ flex-direction: column !important;
59
+ padding: 10px 15px 0 0px;
60
+ & > div {
61
+ margin-top: 15px;
62
+ }
63
63
  }
64
64
 
65
- ${({ wrapperWidth, isSelectedOrders }) => wrapperWidth < 992 && css`
65
+ ${({ isSelectedOrders }) => isSelectedOrders && css`
66
66
  flex-direction: column !important;
67
- padding: ${!isSelectedOrders && '15px 10px 0 10px'};
67
+ padding: ${!isSelectedOrders && '10px 15px 0 0px'};
68
+ & > div {
69
+ margin-top: 15px;
70
+ }
68
71
  `}
69
72
  `
70
73
  export const Option = styled.div`
@@ -31,6 +31,7 @@ const OrdersManagerUI = (props) => {
31
31
  paymethodsList,
32
32
  businessesList,
33
33
  citiesList,
34
+ adminsList,
34
35
  ordersStatusGroup,
35
36
  filterValues,
36
37
  deletedOrderIds,
@@ -183,6 +184,7 @@ const OrdersManagerUI = (props) => {
183
184
  citiesList={citiesList}
184
185
  paymethodsList={paymethodsList}
185
186
  businessesList={businessesList}
187
+ adminsList={adminsList}
186
188
  handleChangeSearch={handleChangeSearch}
187
189
  handleChangeFilterValues={handleChangeFilterValues}
188
190
  selectedOrderIds={selectedOrderIds}
@@ -195,14 +197,6 @@ const OrdersManagerUI = (props) => {
195
197
  setSlaSettingTime={setSlaSettingTime}
196
198
  isLateralBar={isLateralBar}
197
199
  />
198
- <OrdersHeaderFilterGroup
199
- isSelectedOrders={isSelectedOrders}
200
- driverGroupList={driverGroupList}
201
- driversList={driversList}
202
- searchValue={searchValue}
203
- handleChangeFilterValues={handleChangeFilterValues}
204
- handleChangeSearch={handleChangeSearch}
205
- />
206
200
  <OrderStatusFilterBar
207
201
  isUseQuery={isUseQuery}
208
202
  selectedOrderStatus={ordersStatusGroup}
@@ -72,7 +72,7 @@ const SocketStatusUI = (props) => {
72
72
  onClick={() => setOpenModal(true)}
73
73
  >
74
74
  <StatusContainer>
75
- <span>{t('CONNECTION_STATUS', 'Connection status')}</span>
75
+ <span>{t('CONNECTION', 'Connection')}</span>
76
76
  <WebsocketStatusDot
77
77
  status={socketStatus}
78
78
  />
@@ -35,6 +35,7 @@ export const FilterValuesProvider = ({ children }) => {
35
35
  customerEmail: null,
36
36
  customerCellphone: null,
37
37
  customerLastname: null,
38
+ administratorIds: [],
38
39
  coupon: null,
39
40
  offerId: null
40
41
  })