ordering-ui-admin-external 1.43.30 → 1.43.32

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 (39) hide show
  1. package/_bundles/{ordering-ui-admin.2175191dd9617085f573.js → ordering-ui-admin.395af03194f63ca488ce.js} +2 -2
  2. package/_modules/components/Delivery/DriverGroupSelectorHeader/index.js +14 -13
  3. package/_modules/components/Delivery/DriversGroupLogs/index.js +2 -75
  4. package/_modules/components/Delivery/DriversTimeDisplay/UserList.js +10 -18
  5. package/_modules/components/Delivery/DriversTimeDisplay/index.js +63 -16
  6. package/_modules/components/Delivery/DriversTimeDisplay/styles.js +7 -6
  7. package/_modules/components/Orders/DriverMultiSelector/index.js +46 -17
  8. package/_modules/components/Stores/BusinessDetails/index.js +4 -1
  9. package/_modules/components/Stores/BusinessLogs/index.js +185 -0
  10. package/_modules/components/Stores/BusinessLogs/styles.js +73 -0
  11. package/_modules/components/Stores/BusinessSummary/index.js +8 -7
  12. package/_modules/components/Stores/index.js +7 -0
  13. package/_modules/components/Users/UserFormDetails/index.js +48 -13
  14. package/_modules/components/Users/UserFormDetails/styles.js +8 -2
  15. package/_modules/index.js +6 -0
  16. package/_modules/styles/MultiSelect/index.js +56 -10
  17. package/_modules/styles/MultiSelect/styles.js +16 -5
  18. package/_modules/styles/Selects/index.js +62 -51
  19. package/_modules/utils/index.js +107 -30
  20. package/package.json +2 -2
  21. package/src/components/Delivery/DriverGroupSelectorHeader/index.js +21 -21
  22. package/src/components/Delivery/DriversGroupLogs/index.js +1 -32
  23. package/src/components/Delivery/DriversTimeDisplay/UserList.js +35 -41
  24. package/src/components/Delivery/DriversTimeDisplay/index.js +89 -34
  25. package/src/components/Delivery/DriversTimeDisplay/styles.js +22 -4
  26. package/src/components/Orders/DriverMultiSelector/index.js +46 -10
  27. package/src/components/Stores/BusinessDetails/index.js +6 -0
  28. package/src/components/Stores/BusinessLogs/index.js +304 -0
  29. package/src/components/Stores/BusinessLogs/styles.js +224 -0
  30. package/src/components/Stores/BusinessSummary/index.js +7 -5
  31. package/src/components/Stores/index.js +2 -0
  32. package/src/components/Users/UserFormDetails/index.js +32 -2
  33. package/src/components/Users/UserFormDetails/styles.js +26 -0
  34. package/src/index.js +2 -0
  35. package/src/styles/MultiSelect/index.js +104 -33
  36. package/src/styles/MultiSelect/styles.js +16 -1
  37. package/src/styles/Selects/index.js +14 -10
  38. package/src/utils/index.js +62 -29
  39. /package/_bundles/{ordering-ui-admin.2175191dd9617085f573.js.LICENSE.txt → ordering-ui-admin.395af03194f63ca488ce.js.LICENSE.txt} +0 -0
@@ -3,7 +3,7 @@ import EnChevronDown from '@meronex/icons/en/EnChevronDown'
3
3
  import { CheckSquareFill, Square } from 'react-bootstrap-icons'
4
4
  import MdClose from '@meronex/icons/md/MdClose'
5
5
  import { Button } from '../Buttons'
6
- import { SearchBar } from '../../components/Shared'
6
+ import { Pagination, SearchBar } from '../../components/Shared'
7
7
 
8
8
  import {
9
9
  Select as SelectInput,
@@ -18,7 +18,9 @@ import {
18
18
  } from '../Selects'
19
19
 
20
20
  import {
21
- CheckBox
21
+ CheckBox,
22
+ TextFormatted,
23
+ PaginationWrapper
22
24
  } from './styles'
23
25
 
24
26
  export const MultiSelect = (props) => {
@@ -33,7 +35,17 @@ export const MultiSelect = (props) => {
33
35
  searchBarPlaceholder,
34
36
  searchBarIsCustomLayout,
35
37
  searchValue,
36
- handleChangeSearch
38
+ handleChangeSearch,
39
+ useTextStyle,
40
+ textClassnames,
41
+ hideChevronIcon,
42
+ andText,
43
+ pagination,
44
+ handleChangePage,
45
+ handleChangePageSize,
46
+ useLazyPagination,
47
+ isLoading,
48
+ optionsPosition
37
49
  } = props
38
50
 
39
51
  const [open, setOpen] = useState(false)
@@ -48,7 +60,7 @@ export const MultiSelect = (props) => {
48
60
  }
49
61
 
50
62
  const closeSelect = (e) => {
51
- if (open) {
63
+ if (open && !isLoading) {
52
64
  const outsideDropdown = !dropdownReference.current?.contains(e.target)
53
65
  if (outsideDropdown) {
54
66
  setOpen(false)
@@ -62,7 +74,9 @@ export const MultiSelect = (props) => {
62
74
  const _defaultOption = options?.filter(
63
75
  (option) => defaultValue.includes(option.value)
64
76
  )
65
- setSelectedOptions(_defaultOption)
77
+ if (!(useLazyPagination && pagination)) {
78
+ setSelectedOptions(_defaultOption)
79
+ }
66
80
  setValues(defaultValue)
67
81
  }, [defaultValue, options, searchValue])
68
82
 
@@ -75,6 +89,11 @@ export const MultiSelect = (props) => {
75
89
  return () => document.removeEventListener('click', closeSelect)
76
90
  }, [open])
77
91
 
92
+ const handlerChangePage = (page) => {
93
+ setOpen(true)
94
+ handleChangePage(page)
95
+ }
96
+
78
97
  const handleSelectOption = (option) => {
79
98
  if (option.value === null || option.value === 'default') return
80
99
  const _selectedOptions = [...selectedOptions]
@@ -96,48 +115,89 @@ export const MultiSelect = (props) => {
96
115
  onChange && onChange(option.value)
97
116
  }
98
117
 
118
+ const optionsTextFormatted = (selectedOption, index) => {
119
+ if (index <= 2) {
120
+ return `${selectedOption.showOnSelected || selectedOption.content}${index + 1 !== selectedOptions?.length && index <= 2 ? ', ' : ' '}`
121
+ }
122
+ if (index + 1 === selectedOptions?.length && selectedOptions?.length >= 4) {
123
+ return `${andText || 'And'} ${index - 2} +`
124
+ }
125
+ return null
126
+ }
127
+
128
+ const filterFunction = (_, index) => {
129
+ if (!pagination || useLazyPagination) return true
130
+ const validation = pagination?.currentPage === 1
131
+ ? index < (pagination.pageSize * pagination.currentPage)
132
+ : (index >= (pagination.pageSize * (pagination.currentPage - 1))) && (index < (pagination.pageSize * pagination.currentPage))
133
+ return validation
134
+ }
135
+
99
136
  return (
100
- <SelectInput className={className || 'multi-select'}>
137
+ <SelectInput useTextStyle={useTextStyle} className={className || 'multi-select'}>
101
138
  {selectedOptions.length === 0 ? (
102
- <Selected onClick={(e) => handleSelectClick(e)}>
103
- {placeholder || ''}
104
- <Chevron>
105
- <EnChevronDown />
106
- </Chevron>
139
+ <Selected useTextStyle={useTextStyle} onClick={(e) => handleSelectClick(e)}>
140
+ {useTextStyle ? (
141
+ <Header>
142
+ <TextFormatted className={textClassnames}>
143
+ {placeholder || ''}
144
+ </TextFormatted>
145
+ </Header>
146
+ ) : (
147
+ <>
148
+ {placeholder || ''}
149
+ </>
150
+ )}
151
+ {!hideChevronIcon && (
152
+ <Chevron>
153
+ <EnChevronDown />
154
+ </Chevron>
155
+ )}
107
156
  </Selected>
108
157
  ) : (
109
158
  <Selected onClick={(e) => handleSelectClick(e)}>
110
- <Header>
111
- {selectedOptions.map((selectedOption) => (
159
+ <Header useTextStyle={useTextStyle}>
160
+ {selectedOptions.map((selectedOption, index) => (
112
161
  <React.Fragment key={selectedOption.value}>
113
- <MultiSelectOption>
114
- {selectedOption.showOnSelected || selectedOption.content}
115
- {selectedOption?.value !== 'default' && (
116
- <Button
117
- circle
118
- outline
119
- color='primary'
120
- type='reset'
121
- className='remove_option'
122
- onClick={() => onChange && onChange(selectedOption.value)}
123
- >
124
- <MdClose />
125
- </Button>
126
- )}
127
- </MultiSelectOption>
162
+ {
163
+ useTextStyle ? (
164
+ <TextFormatted className={textClassnames} primary>
165
+ {optionsTextFormatted(selectedOption, index)}
166
+ </TextFormatted>
167
+ ) : (
168
+ <MultiSelectOption>
169
+ {selectedOption.showOnSelected || selectedOption.content}
170
+ {selectedOption?.value !== 'default' && (
171
+ <Button
172
+ circle
173
+ outline
174
+ color='primary'
175
+ type='reset'
176
+ className='remove_option'
177
+ onClick={() => onChange && onChange(selectedOption.value)}
178
+ >
179
+ <MdClose />
180
+ </Button>
181
+ )}
182
+ </MultiSelectOption>
183
+ )
184
+ }
128
185
  </React.Fragment>
129
186
  ))}
130
187
  </Header>
131
- <Chevron>
132
- <EnChevronDown />
133
- </Chevron>
188
+ {!hideChevronIcon && (
189
+ <Chevron>
190
+ <EnChevronDown />
191
+ </Chevron>
192
+ )}
134
193
  </Selected>
135
194
  )}
136
195
  {open && options && (
137
196
  <Options
138
197
  isAbsolute
139
- position='right'
198
+ position={optionsPosition ?? 'right'}
140
199
  ref={dropdownReference}
200
+ minWidth='330px'
141
201
  >
142
202
  {isShowSearchBar && (
143
203
  <SearchBarWrapper
@@ -156,7 +216,7 @@ export const MultiSelect = (props) => {
156
216
  optionInnerMargin={props.optionInnerMargin}
157
217
  optionInnerMaxHeight={props.optionInnerMaxHeight}
158
218
  >
159
- {options.map((option, i) => (
219
+ {options.filter(filterFunction).map((option, i) => (
160
220
  <MultiOption
161
221
  key={i}
162
222
  color={option.color}
@@ -174,6 +234,17 @@ export const MultiSelect = (props) => {
174
234
  </MultiOption>
175
235
  ))}
176
236
  </OptionsInner>
237
+ {pagination && handleChangePageSize && handleChangePage && (
238
+ <PaginationWrapper>
239
+ <Pagination
240
+ currentPage={pagination?.currentPage}
241
+ totalPages={pagination?.totalPages}
242
+ handleChangePage={handlerChangePage}
243
+ handleChangePageSize={handleChangePageSize}
244
+ defaultPageSize={pagination?.pageSize}
245
+ />
246
+ </PaginationWrapper>
247
+ )}
177
248
  </Options>
178
249
  )}
179
250
  </SelectInput>
@@ -1,4 +1,4 @@
1
- import styled from 'styled-components'
1
+ import styled, { css } from 'styled-components'
2
2
 
3
3
  export const CheckBox = styled.div`
4
4
  color: ${props => props.theme.colors.primary};
@@ -7,3 +7,18 @@ export const CheckBox = styled.div`
7
7
  font-size: 16px;
8
8
  }
9
9
  `
10
+
11
+ export const TextFormatted = styled.span`
12
+ ${({ primary, theme }) => primary && css`
13
+ color: ${theme?.colors?.primary};
14
+ `}
15
+
16
+ div {
17
+ font-size: 14px;
18
+ color: ${props => props.theme.colors.primary};
19
+ }
20
+ `
21
+
22
+ export const PaginationWrapper = styled.div`
23
+ margin: 20px;
24
+ `
@@ -59,7 +59,7 @@ export const Option = styled.div`
59
59
  `
60
60
 
61
61
  export const Options = styled.div`
62
- min-width: 100%;
62
+ min-width: ${({ minWidth }) => minWidth || '100%'};
63
63
  background: ${props => props.theme.colors?.backgroundPage || '#FFF'};
64
64
  z-index: 10000;
65
65
  border-width: 1px;
@@ -102,8 +102,10 @@ export const OptionsInner = styled.div`
102
102
  overscroll-behavior: contain;
103
103
  `
104
104
  export const Selected = styled.div`
105
- padding-left: 15px;
106
- padding-right: 15px;
105
+ ${({ useTextStyle }) => !useTextStyle && css`
106
+ padding-left: 15px;
107
+ padding-right: 15px;
108
+ `}
107
109
  cursor: pointer;
108
110
  position: relative;
109
111
  display: flex;
@@ -136,14 +138,16 @@ export const Selected = styled.div`
136
138
 
137
139
  export const Select = styled.div`
138
140
  display: inline-block;
139
- border-radius: 7.6px;
140
- line-height: 34px;
141
- border-width: 1px;
142
- border-style: solid;
143
- border-color: #DEE2E6;
144
141
  color: #344050;
145
142
  position: relative;
146
143
 
144
+ ${props => !props.useTextStyle && css`
145
+ border-radius: 7.6px;
146
+ line-height: 34px;
147
+ border-width: 1px;
148
+ border-style: solid;
149
+ border-color: #DEE2E6;
150
+ `}
147
151
  ${props => props.open && css`
148
152
  background-color: ${darken(0.07, '#CCC')};
149
153
  `}
@@ -175,7 +179,7 @@ export const Chevron = styled.div`
175
179
  export const Header = styled.div`
176
180
  flex: 1;
177
181
  overflow: auto;
178
- white-space: nowrap;
182
+ white-space: ${({ useTextStyle }) => useTextStyle ? 'pre-wrap' : 'nowrap'};
179
183
  display: flex;
180
184
  align-items: center;
181
185
  `
@@ -262,7 +266,7 @@ export const MultiOption = styled.div`
262
266
 
263
267
  ${props => props.selected && css`
264
268
  background-color: ${darken(0.07, '#fafafa')};
265
-
269
+
266
270
  &:hover {
267
271
  background-color: ${darken(0.07, '#fafafa')};
268
272
  }
@@ -354,55 +354,55 @@ export const reviewCommentList = (type) => {
354
354
  const reviews = {
355
355
  1: {
356
356
  1: {
357
- title: t('CUSTOMER_QUICK_COMMENT_TITLE_1', "What went wrong?"),
357
+ title: t('CUSTOMER_QUICK_COMMENT_TITLE_1', 'What went wrong?'),
358
358
  list: [
359
- { key: 0, content: t('CUSTOMER_QUICK_COMMENT_1_0', "Not handled with care") },
360
- { key: 1, content: t('CUSTOMER_QUICK_COMMENT_1_1', "Poor communication") },
361
- { key: 2, content: t('CUSTOMER_QUICK_COMMENT_1_2', "COVID-19 issue") },
359
+ { key: 0, content: t('CUSTOMER_QUICK_COMMENT_1_0', 'Not handled with care') },
360
+ { key: 1, content: t('CUSTOMER_QUICK_COMMENT_1_1', 'Poor communication') },
361
+ { key: 2, content: t('CUSTOMER_QUICK_COMMENT_1_2', 'COVID-19 issue') },
362
362
  { key: 3, content: t('CUSTOMER_QUICK_COMMENT_1_3', "Didn't follow instructions") },
363
- { key: 4, content: t('CUSTOMER_QUICK_COMMENT_1_4', "Rude") },
364
- { key: 5, content: t('CUSTOMER_QUICK_COMMENT_1_5', "Not on-time") }
363
+ { key: 4, content: t('CUSTOMER_QUICK_COMMENT_1_4', 'Rude') },
364
+ { key: 5, content: t('CUSTOMER_QUICK_COMMENT_1_5', 'Not on-time') }
365
365
  ]
366
366
  },
367
367
  2: {
368
- title: t('CUSTOMER_QUICK_COMMENT_TITLE_2', "What went wrong?"),
368
+ title: t('CUSTOMER_QUICK_COMMENT_TITLE_2', 'What went wrong?'),
369
369
  list: [
370
- { key: 0, content: t('CUSTOMER_QUICK_COMMENT_2_0', "Not handled with care") },
371
- { key: 1, content: t('CUSTOMER_QUICK_COMMENT_2_1', "Poor communication") },
372
- { key: 2, content: t('CUSTOMER_QUICK_COMMENT_2_2', "COVID-19 issue") },
370
+ { key: 0, content: t('CUSTOMER_QUICK_COMMENT_2_0', 'Not handled with care') },
371
+ { key: 1, content: t('CUSTOMER_QUICK_COMMENT_2_1', 'Poor communication') },
372
+ { key: 2, content: t('CUSTOMER_QUICK_COMMENT_2_2', 'COVID-19 issue') },
373
373
  { key: 3, content: t('CUSTOMER_QUICK_COMMENT_2_3', "Didn't follow instructions") },
374
- { key: 4, content: t('CUSTOMER_QUICK_COMMENT_2_4', "Rude") },
375
- { key: 5, content: t('CUSTOMER_QUICK_COMMENT_2_5', "Not on-time") }
374
+ { key: 4, content: t('CUSTOMER_QUICK_COMMENT_2_4', 'Rude') },
375
+ { key: 5, content: t('CUSTOMER_QUICK_COMMENT_2_5', 'Not on-time') }
376
376
  ]
377
377
  },
378
378
  3: {
379
- title: t('CUSTOMER_QUICK_COMMENT_TITLE_3', "What could have been better?"),
379
+ title: t('CUSTOMER_QUICK_COMMENT_TITLE_3', 'What could have been better?'),
380
380
  list: [
381
- { key: 0, content: t('CUSTOMER_QUICK_COMMENT_3_0', "Not handled with care") },
382
- { key: 1, content: t('CUSTOMER_QUICK_COMMENT_3_1', "Poor communication") },
383
- { key: 2, content: t('CUSTOMER_QUICK_COMMENT_3_2', "COVID-19 issue") },
381
+ { key: 0, content: t('CUSTOMER_QUICK_COMMENT_3_0', 'Not handled with care') },
382
+ { key: 1, content: t('CUSTOMER_QUICK_COMMENT_3_1', 'Poor communication') },
383
+ { key: 2, content: t('CUSTOMER_QUICK_COMMENT_3_2', 'COVID-19 issue') },
384
384
  { key: 3, content: t('CUSTOMER_QUICK_COMMENT_3_3', "Didn't follow instructions") },
385
- { key: 4, content: t('CUSTOMER_QUICK_COMMENT_3_4', "Rude") },
386
- { key: 5, content: t('CUSTOMER_QUICK_COMMENT_3_5', "Not on-time") }
385
+ { key: 4, content: t('CUSTOMER_QUICK_COMMENT_3_4', 'Rude') },
386
+ { key: 5, content: t('CUSTOMER_QUICK_COMMENT_3_5', 'Not on-time') }
387
387
  ]
388
388
  },
389
389
  4: {
390
- title: t('CUSTOMER_QUICK_COMMENT_TITLE_4', " Tell us more"),
390
+ title: t('CUSTOMER_QUICK_COMMENT_TITLE_4', ' Tell us more'),
391
391
  list: [
392
- { key: 0, content: t('CUSTOMER_QUICK_COMMENT_4_0', "Not handled with care") },
393
- { key: 1, content: t('CUSTOMER_QUICK_COMMENT_4_1', "Poor communication") },
394
- { key: 2, content: t('CUSTOMER_QUICK_COMMENT_4_2', "COVID-19 issue") },
392
+ { key: 0, content: t('CUSTOMER_QUICK_COMMENT_4_0', 'Not handled with care') },
393
+ { key: 1, content: t('CUSTOMER_QUICK_COMMENT_4_1', 'Poor communication') },
394
+ { key: 2, content: t('CUSTOMER_QUICK_COMMENT_4_2', 'COVID-19 issue') },
395
395
  { key: 3, content: t('CUSTOMER_QUICK_COMMENT_4_3', "Didn't follow instructions") },
396
- { key: 4, content: t('CUSTOMER_QUICK_COMMENT_4_4', "Rude") },
397
- { key: 5, content: t('CUSTOMER_QUICK_COMMENT_4_5', "Not on-time") }
396
+ { key: 4, content: t('CUSTOMER_QUICK_COMMENT_4_4', 'Rude') },
397
+ { key: 5, content: t('CUSTOMER_QUICK_COMMENT_4_5', 'Not on-time') }
398
398
  ]
399
399
  },
400
400
  5: {
401
- title: t('CUSTOMER_QUICK_COMMENT_TITLE_5', "What went well?"),
401
+ title: t('CUSTOMER_QUICK_COMMENT_TITLE_5', 'What went well?'),
402
402
  list: [
403
- { key: 0, content: t('CUSTOMER_QUICK_COMMENT_5_0', "Good communication") },
404
- { key: 1, content: t('CUSTOMER_QUICK_COMMENT_5_1', "Friendly") },
405
- { key: 2, content: t('CUSTOMER_QUICK_COMMENT_5_2', "Above and beyond") }
403
+ { key: 0, content: t('CUSTOMER_QUICK_COMMENT_5_0', 'Good communication') },
404
+ { key: 1, content: t('CUSTOMER_QUICK_COMMENT_5_1', 'Friendly') },
405
+ { key: 2, content: t('CUSTOMER_QUICK_COMMENT_5_2', 'Above and beyond') }
406
406
  ]
407
407
  }
408
408
  }
@@ -460,7 +460,7 @@ export const getOrderStatuPickUp = (status) => {
460
460
  { key: 16, value: 'Canceled by customer', slug: 'CANCELED_BY_CUSTOMER', percentage: 0 },
461
461
  { key: 17, value: 'Not picked by customer', slug: 'NOT_PICKED_BY_CUSTOMER', percentage: 0 },
462
462
  { key: 20, value: 'Customer almost arrived to business', slug: 'CUSTOMER_ALMOST_ARRIVED_TO_BUSINESS', percentage: 70 },
463
- { key: 21, value: 'Customer arrived to business', slug: 'CUSTOMER_ARRIVED_TO_BUSINESS', percentage: 90 },
463
+ { key: 21, value: 'Customer arrived to business', slug: 'CUSTOMER_ARRIVED_TO_BUSINESS', percentage: 90 }
464
464
  ]
465
465
 
466
466
  const objectStatus = orderStatus.find((o) => o.key === status)
@@ -676,3 +676,36 @@ export const TwentyFourHours = [
676
676
  '22:00',
677
677
  '23:00'
678
678
  ]
679
+
680
+ export const getAttributeName = (key) => {
681
+ const [, t] = useLanguage()
682
+ const attributes = [
683
+ { key: 'autoassign_amount_drivers', content: t('AUTO_ASSIGN_GROUP_ORDERS_TO_DRIVERS', 'Auto assign the order of group to this amount of drivers') },
684
+ { key: 'orders_group_max_orders', content: t('MAX_NUMBER_ORDERS', 'Maximum Number of Orders') },
685
+ { key: 'autoassign_autoaccept_by_driver', content: t('ORDER_CONFIRMED_ACCEPTED_BY_DRIVER', 'Accepted by Driver') },
686
+ { key: 'orders_group_max_time_between', content: t('MAX_ORDER_TIME_BETWEEN', 'Maximum time between orders in seconds') },
687
+ { key: 'orders_group_max_distance_between_pickup', content: t('MAX_DISTANCE_BETWEEN_BUSINESS', 'Maximum distance between businesses in meters') },
688
+ { key: 'orders_group_max_distance_between_delivery', content: t('MAX_DISTANCE_BETWEEN_DELIVERY', 'Maximum distance between deliveries in meters') },
689
+ { key: 'orders_group_use_maps_api', content: t('USE_MAPS_API', 'Use maps api') },
690
+ { key: 'orders_group_max_time_between_pickup', content: t('MAX_DISTANCE_BETWEEN_BUSINESS', 'Maximum distance between businesses in meters') },
691
+ { key: 'orders_group_max_time_between_delivery', content: t('MAX_DISTANCE_BETWEEN_DELIVERY', 'Maximum distance between deliveries in meters') },
692
+ { key: 'autoassign_forced_assignment', content: t('AUTO_ASSIGN_FORCED_ASSIGNMENT', 'Forced assignment') },
693
+ { key: 'autoassign_customer_max_distance_from_business', content: t('MAX_CUSTOMER_DISTANCE_FROM_BUSINESS', 'Max distance between customer and business') },
694
+ { key: 'autoassign_initial_radius', content: t('INITIAL_RADIUS', 'Initial radius in meters') },
695
+ { key: 'autoassign_increment_radius', content: t('INCREMENT_RADIUS', 'Radius increase in meters') },
696
+ { key: 'autoassign_max_radius', content: t('MAX_RADIUS', 'Maximum radius in meters') },
697
+ { key: 'autoassign_autoreject_time', content: t('AUTO_REJECT_ORDER_GROUP_AFTER', 'Auto reject Orders After') },
698
+ { key: 'autoassign_max_orders', content: t('MAX_AMOUNT_ORDERS_PER_DRIVER', 'Maximum amount of orders per drivers') },
699
+ { key: 'autoassign_max_in_pending', content: t('ORDER_PENDING', 'Pending') },
700
+ { key: 'available', content: t('AVAILABLE', 'Available') },
701
+ { key: 'enabled', content: t('ENABLED', 'Enabled') },
702
+ { key: 'last_available_at', content: t('LAST_AVAILABLE_AT', 'Last available at') },
703
+ { key: 'busy', content: t('BUSY', 'Busy') }
704
+ ]
705
+ const found = attributes.find(attribute => attribute.key === key)
706
+ if (found) {
707
+ return found.content
708
+ } else {
709
+ return key
710
+ }
711
+ }