ordering-ui-admin-external 1.43.30 → 1.43.31

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.
@@ -0,0 +1,224 @@
1
+ import styled, { css } from 'styled-components'
2
+
3
+ export const BusinessLogsContainer = styled.div`
4
+ height: calc(100% - 100px);
5
+ padding: 20px;
6
+
7
+ h1 {
8
+ font-size: 20px;
9
+ font-weight: 700;
10
+ margin-top: 5px;
11
+ }
12
+
13
+ ${({ disabled }) => disabled && css`
14
+ opacity: 0.7;
15
+ pointer-events: none;
16
+ `}
17
+ `
18
+
19
+ export const TableWrapper = styled.div`
20
+ overflow: auto;
21
+ height: 100%;
22
+ `
23
+
24
+ export const SeeChanges = styled.span`
25
+ color: ${props => props.theme.colors.primary};
26
+ cursor: pointer;
27
+ &:hover {
28
+ text-decoration: underline;
29
+ }
30
+ `
31
+
32
+ export const Table = styled.table`
33
+ width: 100%;
34
+ min-width: 1000px;
35
+ color: ${props => props.theme.colors?.headingColor};
36
+
37
+ thead {
38
+ tr {
39
+ border-bottom: solid 1px ${props => props.theme.colors.disabled};
40
+ th {
41
+ padding: 13px 0;
42
+ font-size: 12px;
43
+ &:first-child {
44
+ width: 10%;
45
+ ${props => props.theme?.rtl ? css`
46
+ padding-left: 15px;
47
+ ` : css`
48
+ padding-right: 15px;
49
+ `}
50
+ box-sizing: border-box;
51
+ }
52
+ &:nth-child(3) {
53
+ width: 35%;
54
+ padding-left: 15px;
55
+ padding-right: 15px;
56
+ box-sizing: border-box;
57
+ }
58
+ &:nth-child(4) {
59
+ ${props => props.theme?.rtl ? css`
60
+ padding-right: 15px;
61
+ ` : css`
62
+ padding-left: 15px;
63
+ `}
64
+ box-sizing: border-box;
65
+ }
66
+ }
67
+ }
68
+ }
69
+
70
+ > tbody {
71
+ border-bottom: 1px solid ${props => props.theme.colors.borderColor};
72
+ td {
73
+ padding: 13px 0;
74
+ font-size: 12px;
75
+ &:first-child {
76
+ width: 10%;
77
+ ${props => props.theme?.rtl ? css`
78
+ padding-left: 15px;
79
+ ` : css`
80
+ padding-right: 15px;
81
+ `}
82
+ box-sizing: border-box;
83
+ }
84
+ &:nth-child(3) {
85
+ width: 35%;
86
+ }
87
+ &:nth-child(4) {
88
+ ${props => props.theme?.rtl ? css`
89
+ padding-right: 15px;
90
+ ` : css`
91
+ padding-left: 15px;
92
+ `}
93
+ box-sizing: border-box;
94
+ }
95
+ }
96
+ }
97
+ `
98
+
99
+ export const UserInfoContainer = styled.div`
100
+ p {
101
+ color: ${props => props.theme.colors.lightGray};
102
+ margin: 0px;
103
+ font-size: 12px;
104
+ &:first-child {
105
+ color: ${props => props.theme.colors.headingColor};
106
+ font-weight: 500;
107
+ }
108
+ }
109
+ `
110
+
111
+ export const DateTimeWrapper = styled.div`
112
+ white-space: nowrap;
113
+ font-size: 12px;
114
+ min-height: 36px;
115
+ display: flex;
116
+ align-items: center;
117
+
118
+ ${props => props.theme?.rtl ? css`
119
+ padding-left: 15px;
120
+ margin-left: 15px;
121
+ border-left: 1px solid ${props => props.theme.colors.borderColor};
122
+ ` : css`
123
+ padding-right: 15px;
124
+ margin-right: 15px;
125
+ border-right: 1px solid ${props => props.theme.colors.borderColor};
126
+ `}
127
+ `
128
+
129
+ export const NoData = styled.div`
130
+ font-size: 16px;
131
+ `
132
+ export const WrapperPagination = styled.div`
133
+ display: flex;
134
+ align-items: center;
135
+ padding: 20px 0;
136
+ `
137
+
138
+ export const DataListTable = styled.table`
139
+ width: 100%;
140
+ border-right: 1px solid ${props => props.theme.colors.borderColor};
141
+
142
+ tbody {
143
+ border-bottom: none;
144
+ td {
145
+ box-sizing: border-box;
146
+ &:first-child {
147
+ width: 50% !important;
148
+ padding-left: 15px;
149
+ padding-right: 15px;
150
+ box-sizing: border-box;
151
+ }
152
+ &:not(:first-child) {
153
+ width: initial !important;
154
+ }
155
+ white-space: nowrap;
156
+ padding-top: 10px;
157
+ padding-bottom: 10px;
158
+ ${props => props.theme?.rtl ? css`
159
+ padding-left: 15px;
160
+ ` : css`
161
+ padding-right: 15px;
162
+ `}
163
+ }
164
+ }
165
+ `
166
+
167
+ export const EventTypeContainer = styled.div`
168
+ white-space: nowrap;
169
+ font-size: 12px;
170
+ min-height: 36px;
171
+ display: flex;
172
+ align-items: center;
173
+ padding-right: 15px;
174
+ padding-left: 15px;
175
+ margin-left: 15px;
176
+ margin-right: 10px;
177
+ border-right: 1px solid ${props => props.theme.colors.borderColor};
178
+ border-left: 1px solid ${props => props.theme.colors.borderColor};
179
+ p{
180
+ margin-bottom: 0px;
181
+ }
182
+ `
183
+
184
+ export const SchedulesWrapper = styled.div`
185
+ display: flex;
186
+ flex-direction: row;
187
+ gap: 30px;
188
+ justify-content: center;
189
+
190
+ ${props => props?.border && css`
191
+ div:first-child {
192
+ border-right: 1px solid #E9ECEF;
193
+ padding-right: 30px;
194
+ `
195
+ }
196
+ `
197
+
198
+ export const Schedules = styled.div`
199
+ display: flex;
200
+ flex-direction: column;
201
+ gap: 20px;
202
+ `
203
+
204
+ export const ScheduleDay = styled.div`
205
+ display: flex;
206
+ align-items: center;
207
+ gap: 10px;
208
+ justify-content: space-between;
209
+ `
210
+
211
+ export const ScheduleLapses = styled.div`
212
+ display: flex;
213
+ flex-direction: column;
214
+ border-left: 1px solid #E9ECEF;
215
+ padding-left: 10px;
216
+
217
+ p {
218
+ margin: 0px;
219
+ }
220
+ `
221
+
222
+ export const ScheduleTitle = styled.h2`
223
+ text-align: center;
224
+ `
@@ -74,7 +74,7 @@ export const BusinessSummary = (props) => {
74
74
  window.open(storeUrl, '_blank')
75
75
  }
76
76
 
77
- const itemsExcluded = !!spoonityConfig ? ['publishing', 'personalization'] : ['publishing', 'spoonity_key', 'personalization']
77
+ const itemsExcluded = spoonityConfig ? ['publishing', 'personalization', 'logs'] : ['publishing', 'spoonity_key', 'personalization', 'logs']
78
78
 
79
79
  const businessConfigs = [
80
80
  {
@@ -141,13 +141,15 @@ export const BusinessSummary = (props) => {
141
141
  key: 'webhooks',
142
142
  value: t('WEBHOOKS', 'Webhooks')
143
143
  },
144
- // {
145
- // key: 'places',
146
- // value: t('PLACES', 'Places')
147
- // },
148
144
  {
145
+ key: 'places',
146
+ value: t('PLACES', 'Places')
147
+ }, {
149
148
  key: 'spoonity_key',
150
149
  value: t('SPOONITY_KEY', 'Sponity key')
150
+ }, {
151
+ key: 'logs',
152
+ value: t('LOGS', 'Logs')
151
153
  }
152
154
  ]
153
155
 
@@ -17,6 +17,7 @@ import { BusinessImages } from './BusinessImages'
17
17
  import { BusinessInformation } from './BusinessInformation'
18
18
  import { BusinessInfoSettingList } from './BusinessInfoSettingList'
19
19
  import { BusinessLocation } from './BusinessLocation'
20
+ import { BusinessLogs } from './BusinessLogs'
20
21
  import { BusinessMenu } from './BusinessMenu'
21
22
  import { BusinessNotifications } from './BusinessNotifications'
22
23
  import { BusinessOrderingChannels } from './BusinessOrderingChannels'
@@ -135,6 +136,7 @@ export {
135
136
  BusinessInformation,
136
137
  BusinessInfoSettingList,
137
138
  BusinessLocation,
139
+ BusinessLogs,
138
140
  BusinessMenu,
139
141
  BusinessNotifications,
140
142
  BusinessOrderingChannels,
@@ -6,10 +6,11 @@ import parsePhoneNumber from 'libphonenumber-js'
6
6
  import { formatPhoneNumber } from 'react-phone-number-input'
7
7
  import { Alert, InputPhoneNumber, RangeCalendar } from '../../Shared'
8
8
  import { sortInputFields } from '../../../utils'
9
- import { Switch, Input, Button } from '../../../styles'
9
+ import { Switch, Input, Button, DefaultSelect } from '../../../styles'
10
10
  import { Eye, EyeSlash } from 'react-bootstrap-icons'
11
11
  import { UserTypeSelector } from '../UserTypeSelector'
12
12
  import { OccupationSelector } from '../OccupationSelector'
13
+ import { timezones } from '../../../config/constants'
13
14
 
14
15
  import {
15
16
  FormInput,
@@ -19,7 +20,8 @@ import {
19
20
  WrapperPassword,
20
21
  TogglePassword,
21
22
  CalendarWrapper,
22
- WrapperUserTypeSelector
23
+ WrapperUserTypeSelector,
24
+ InputWrapper
23
25
  } from './styles'
24
26
 
25
27
  export const UserFormDetailsUI = (props) => {
@@ -49,6 +51,8 @@ export const UserFormDetailsUI = (props) => {
49
51
  const [isValidPhoneNumber, setIsValidPhoneNumber] = useState(null)
50
52
  const [userPhoneNumber, setUserPhoneNumber] = useState(null)
51
53
  const [alertState, setAlertState] = useState({ open: false, content: [] })
54
+ const [timezonesOptions, setTimezonesOptions] = useState([])
55
+ const [timezoneSearchValue, setTimezoneSearchValue] = useState('')
52
56
  const [, { setUserCustomer }] = useCustomer()
53
57
  const emailInput = useRef(null)
54
58
 
@@ -219,6 +223,18 @@ export const UserFormDetailsUI = (props) => {
219
223
  })
220
224
  }, [formMethods])
221
225
 
226
+ useEffect(() => {
227
+ const _timezonesOptions = timezones
228
+ .filter(timezone => timezone.toLocaleLowerCase().includes(timezoneSearchValue.toLocaleLowerCase()))
229
+ .map(timezone => {
230
+ return {
231
+ value: timezone,
232
+ content: timezone
233
+ }
234
+ })
235
+ setTimezonesOptions(_timezonesOptions)
236
+ }, [timezoneSearchValue])
237
+
222
238
  return (
223
239
  <>
224
240
  <FormInput onSubmit={formMethods.handleSubmit(onSubmit)} isCheckout={isCheckout}>
@@ -269,6 +285,20 @@ export const UserFormDetailsUI = (props) => {
269
285
  </React.Fragment>
270
286
  )
271
287
  )}
288
+ <InputWrapper isTimezone>
289
+ <DefaultSelect
290
+ placeholder={t('SELECT_TIMEZONE', 'Select a timezone')}
291
+ defaultValue={formState?.changes?.timezone ?? user?.timezone ?? ''}
292
+ options={timezonesOptions}
293
+ onChange={val => handleChangeSwtich('timezone', val)}
294
+ optionInnerMaxHeight='300px'
295
+ isShowSearchBar
296
+ searchBarIsCustomLayout
297
+ searchBarIsNotLazyLoad
298
+ searchValue={timezoneSearchValue}
299
+ handleChangeSearch={setTimezoneSearchValue}
300
+ />
301
+ </InputWrapper>
272
302
  {isProfessional && occupations?.length > 0 && (
273
303
  <OccupationSelector
274
304
  occupationId={user?.occupation_id}
@@ -171,3 +171,29 @@ export const WrapperUserTypeSelector = styled.div`
171
171
  color: ${props => props.theme.colors.secundaryContrast};
172
172
  }
173
173
  `
174
+ export const InputWrapper = styled.div`
175
+ display: flex;
176
+ flex-direction: column;
177
+ width: 100%;
178
+ margin-bottom: 20px;
179
+
180
+ .select {
181
+ padding-top: 4px;
182
+ padding-bottom: 4px;
183
+ border: none;
184
+ background-color: ${props => props.theme.colors.secundary};
185
+ font-size: 14px;
186
+
187
+ ${({ isTimezone }) => isTimezone && css`
188
+ > div:first-child {
189
+ > div {
190
+ overflow: hidden;
191
+ }
192
+ }
193
+ .list-wrapper {
194
+ font-size: 12px;
195
+ max-height: 220px;
196
+ }
197
+ `}
198
+ }
199
+ `
package/src/index.js CHANGED
@@ -245,6 +245,7 @@ import {
245
245
  BusinessOwners,
246
246
  BusinessTypes,
247
247
  BusinessLocation,
248
+ BusinessLogs,
248
249
  BusinessImages,
249
250
  BusinessVideos,
250
251
  SeoOptions,
@@ -674,6 +675,7 @@ export {
674
675
  BusinessOwners,
675
676
  BusinessTypes,
676
677
  BusinessLocation,
678
+ BusinessLogs,
677
679
  BusinessImages,
678
680
  BusinessVideos,
679
681
  SeoOptions,
@@ -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
+ }