ordering-ui-admin-external 1.43.62 → 1.43.64

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 (27) hide show
  1. package/_bundles/{ordering-ui-admin.79f59e9bee862210166d.js → ordering-ui-admin.59d6b5f2801dce338f86.js} +2 -2
  2. package/_modules/components/BusinessIntelligence/InvoiceBusinessManager/index.js +4 -0
  3. package/_modules/components/BusinessIntelligence/InvoiceBusinessPdf/index.js +9 -3
  4. package/_modules/components/BusinessIntelligence/InvoiceDriverPdf/index.js +1 -1
  5. package/_modules/components/Stores/BusinessDeliveryPickupMore/index.js +2 -1
  6. package/_modules/components/Stores/BusinessDetail/index.js +2 -1
  7. package/_modules/components/Stores/BusinessOrderingChannels/index.js +2 -1
  8. package/_modules/components/Stores/ProductDesktopPreview/index.js +9 -7
  9. package/_modules/components/Stores/ProductDesktopPreview/styles.js +4 -4
  10. package/_modules/components/Stores/ProductSummary/index.js +9 -2
  11. package/_modules/styles/Checkbox/index.js +16 -2
  12. package/_modules/styles/index.js +6 -0
  13. package/_modules/utils/index.js +40 -1
  14. package/package.json +2 -2
  15. package/src/components/BusinessIntelligence/InvoiceBusinessManager/index.js +1 -0
  16. package/src/components/BusinessIntelligence/InvoiceBusinessPdf/index.js +8 -5
  17. package/src/components/BusinessIntelligence/InvoiceDriverPdf/index.js +1 -1
  18. package/src/components/Stores/BusinessDeliveryPickupMore/index.js +2 -1
  19. package/src/components/Stores/BusinessDetail/index.js +2 -1
  20. package/src/components/Stores/BusinessOrderingChannels/index.js +2 -1
  21. package/src/components/Stores/ProductDesktopPreview/index.js +7 -12
  22. package/src/components/Stores/ProductDesktopPreview/styles.js +6 -3
  23. package/src/components/Stores/ProductSummary/index.js +10 -2
  24. package/src/styles/Checkbox/index.js +53 -0
  25. package/src/styles/index.js +2 -1
  26. package/src/utils/index.js +40 -0
  27. /package/_bundles/{ordering-ui-admin.79f59e9bee862210166d.js.LICENSE.txt → ordering-ui-admin.59d6b5f2801dce338f86.js.LICENSE.txt} +0 -0
@@ -54,3 +54,56 @@ export const Checkbox = styled.input.attrs({ type: 'checkbox' })`
54
54
  `}
55
55
  }
56
56
  `
57
+ export const RadioButton = styled.input.attrs({ type: 'checkbox' })`
58
+ position: relative;
59
+ cursor: pointer;
60
+ width: 18px;
61
+ height: 18px;
62
+ border: none;
63
+ appearance: none;
64
+
65
+ &:before {
66
+ content: "";
67
+ display: block;
68
+ position: absolute;
69
+ width: 18px;
70
+ height: 18px;
71
+ top: 0;
72
+ left: 0;
73
+ border: 1px solid #B1BCCC;
74
+ border-radius: 50%;
75
+ background: ${props => props.theme.colors?.backgroundPage || '#FFF'};
76
+ }
77
+
78
+ &:checked:before {
79
+ content: "";
80
+ display: block;
81
+ position: absolute;
82
+ width: 18px;
83
+ height: 18px;
84
+ top: 0;
85
+ ${props => props.theme?.rtl ? css`
86
+ right: 0;
87
+ ` : css`
88
+ left: 0;
89
+ `}
90
+ background-color: ${props => props.theme.colors.primary};
91
+ border: none;
92
+ }
93
+
94
+ &:checked:after {
95
+ content: "";
96
+ display: block;
97
+ width: 8px;
98
+ height: 8px;
99
+ border-radius: 50%;
100
+ background: white;
101
+ position: absolute;
102
+ top: 5.2px;
103
+ ${props => props.theme?.rtl ? css`
104
+ right: 5.1px;
105
+ ` : css`
106
+ left: 5.1px;
107
+ `}
108
+ }
109
+ `
@@ -1,5 +1,5 @@
1
1
  import { Button, IconButton, LinkButton } from './Buttons'
2
- import { Checkbox } from './Checkbox'
2
+ import { Checkbox, RadioButton } from './Checkbox'
3
3
  import { Input, TextArea } from './Inputs'
4
4
  import { MultiSelect } from './MultiSelect'
5
5
  import { Select as SecondSelect } from './Select'
@@ -12,6 +12,7 @@ export {
12
12
  IconButton,
13
13
  LinkButton,
14
14
  Checkbox,
15
+ RadioButton,
15
16
  Input,
16
17
  MultiSelect,
17
18
  Switch,
@@ -441,6 +441,46 @@ export const orderStatus = [
441
441
  { key: 26, value: 'Driver arrived to customer', slug: 'ORDER_DRIVER_ARRIVED_CUSTOMER', percentage: 80 }
442
442
  ]
443
443
 
444
+ export const getOrderStatusPrefix = (s, dictionary, prefixForVariable = '') => {
445
+ if (!dictionary) return s
446
+
447
+ const orderStatus = {
448
+ 0: dictionary?.[prefixForVariable ? `${prefixForVariable}_PENDING` : 'PENDING'] ?? 'Pending',
449
+ 1: dictionary?.[prefixForVariable ? `${prefixForVariable}_COMPLETED_BY_ADMIN` : 'COMPLETED_BY_ADMIN'] ?? 'Completed by admin',
450
+ 2: dictionary?.[prefixForVariable ? `${prefixForVariable}_REJECTED` : 'REJECTED'] ?? 'Rejected',
451
+ 3: dictionary?.[prefixForVariable ? `${prefixForVariable}_ORDER_STATUS_IN_BUSINESS` : 'ORDER_STATUS_IN_BUSINESS'] ?? 'Driver arrived to business',
452
+ 4: dictionary?.[prefixForVariable ? `${prefixForVariable}_PREPARATION_COMPLETED` : 'PREPARATION_COMPLETED'] ?? 'Preparation Completed',
453
+ 5: dictionary?.[prefixForVariable ? `${prefixForVariable}_REJECTED_BY_BUSINESS` : 'REJECTED_BY_BUSINESS'] ?? 'Rejected by business',
454
+ 6: dictionary?.[prefixForVariable ? `${prefixForVariable}_REJECTED_BY_DRIVER` : 'REJECTED_BY_DRIVER'] ?? 'Rejected by Driver',
455
+ 7: dictionary?.[prefixForVariable ? `${prefixForVariable}_ACCEPTED_BY_BUSINESS` : 'ACCEPTED_BY_BUSINESS'] ?? 'Accepted by business',
456
+ 8: dictionary?.[prefixForVariable ? `${prefixForVariable}_ACCEPTED_BY_DRIVER` : 'ACCEPTED_BY_DRIVER'] ?? 'Accepted by driver',
457
+ 9: dictionary?.[prefixForVariable ? `${prefixForVariable}_PICK_UP_COMPLETED_BY_DRIVER` : 'PICK_UP_COMPLETED_BY_DRIVER'] ?? 'Pick up completed by driver',
458
+ 10: dictionary?.[prefixForVariable ? `${prefixForVariable}_PICK_UP_FAILED_BY_DRIVER` : 'PICK_UP_FAILED_BY_DRIVER'] ?? 'Pick up Failed by driver',
459
+ 11: dictionary?.[prefixForVariable ? `${prefixForVariable}_DELIVERY_COMPLETED_BY_DRIVER` : 'DELIVERY_COMPLETED_BY_DRIVER'] ?? 'Delivery completed by driver',
460
+ 12: dictionary?.[prefixForVariable ? `${prefixForVariable}_DELIVERY_FAILED_BY_DRIVER` : 'DELIVERY_FAILED_BY_DRIVER'] ?? 'Delivery Failed by driver',
461
+ 13: dictionary?.[prefixForVariable ? `${prefixForVariable}_PREORDER` : 'PREORDER'] ?? 'PreOrder',
462
+ 14: dictionary?.[prefixForVariable ? `${prefixForVariable}_ORDER_NOT_READY` : 'ORDER_NOT_READY'] ?? 'Order not ready',
463
+ 15: dictionary?.[prefixForVariable ? `${prefixForVariable}_ORDER_PICKEDUP_COMPLETED_BY_CUSTOMER` : 'ORDER_PICKEDUP_COMPLETED_BY_CUSTOMER'] ?? 'Order picked up completed by customer',
464
+ 16: dictionary?.[prefixForVariable ? `${prefixForVariable}_ORDER_STATUS_CANCELLED_BY_CUSTOMER` : 'ORDER_STATUS_CANCELLED_BY_CUSTOMER'] ?? 'Order cancelled by customer',
465
+ 17: dictionary?.[prefixForVariable ? `${prefixForVariable}_ORDER_NOT_PICKEDUP_BY_CUSTOMER` : 'ORDER_NOT_PICKEDUP_BY_CUSTOMER'] ?? 'Order not picked up by customer',
466
+ 18: dictionary?.[prefixForVariable ? `${prefixForVariable}_ORDER_DRIVER_ALMOST_ARRIVED_BUSINESS` : 'ORDER_DRIVER_ALMOST_ARRIVED_BUSINESS'] ?? 'Driver almost arrived to business',
467
+ 19: dictionary?.[prefixForVariable ? `${prefixForVariable}_ORDER_DRIVER_ALMOST_ARRIVED_CUSTOMER` : 'ORDER_DRIVER_ALMOST_ARRIVED_CUSTOMER'] ?? 'Driver almost arrived to customer',
468
+ 20: dictionary?.[prefixForVariable ? `${prefixForVariable}_ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS` : 'ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS'] ?? 'Customer almost arrived to business',
469
+ 21: dictionary?.[prefixForVariable ? `${prefixForVariable}_ORDER_CUSTOMER_ARRIVED_BUSINESS` : 'ORDER_CUSTOMER_ARRIVED_BUSINESS'] ?? 'Customer arrived to business',
470
+ 22: dictionary?.[prefixForVariable ? `${prefixForVariable}_ORDER_LOOKING_FOR_DRIVER` : 'ORDER_LOOKING_FOR_DRIVER'] ?? 'Looking for driver',
471
+ 23: dictionary?.[prefixForVariable ? `${prefixForVariable}_ORDER_DRIVER_ON_WAY` : 'ORDER_DRIVER_ON_WAY'] ?? 'Driver on way',
472
+ 24: dictionary?.[prefixForVariable ? `${prefixForVariable}_ORDER_STATUS_DRIVER_WAITING_FOR_ORDER` : 'ORDER_STATUS_DRIVER_WAITING_FOR_ORDER'] ?? 'Driver waiting for order',
473
+ 25: dictionary?.[prefixForVariable ? `${prefixForVariable}_ORDER_STATUS_ACCEPTED_BY_DRIVER_COMPANY` : 'ORDER_STATUS_ACCEPTED_BY_DRIVER_COMPANY'] ?? 'Accepted by driver company',
474
+ 26: dictionary?.[prefixForVariable ? `${prefixForVariable}_ORDER_DRIVER_ARRIVED_CUSTOMER` : 'ORDER_DRIVER_ARRIVED_CUSTOMER'] ?? 'Driver arrived to customer',
475
+ 50: dictionary?.[prefixForVariable ? `${prefixForVariable}_DRIVER_ASSIGNED` : 'DRIVER_ASSIGNED'] ?? 'Driver assigned',
476
+ 51: dictionary?.[prefixForVariable ? `${prefixForVariable}_DRIVER_CLOSE` : 'DRIVER_CLOSE'] ?? 'Driver is close',
477
+ 53: dictionary?.[prefixForVariable ? `${prefixForVariable}_NEW_BUSINESS_OWNER_SIGNUP` : 'NEW_BUSINESS_OWNER_SIGNUP'] ?? 'New Business owner Signup',
478
+ 54: dictionary?.[prefixForVariable ? `${prefixForVariable}_NEW_DRIVER_SIGNUP` : 'NEW_DRIVER_SIGNUP'] ?? 'New Driver owner Signup'
479
+ }
480
+
481
+ return orderStatus?.[Number(s)] ?? s
482
+ }
483
+
444
484
  export const getOrderStatus = (status) => {
445
485
  const objectStatus = orderStatus.find((o) => o.key === status)
446
486
  return objectStatus && objectStatus