ordering-ui-admin-external 1.15.1 → 1.16.0

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 (80) hide show
  1. package/_bundles/{ordering-ui-admin.7c0f4e22698e5dbd9b25.js → ordering-ui-admin.8e64a367ec831986000e.js} +2 -2
  2. package/_modules/components/Delivery/DeliveryUsersListing/index.js +11 -5
  3. package/_modules/components/Delivery/DriversGroupBusinesses/index.js +4 -2
  4. package/_modules/components/Delivery/DriversGroupBusinesses/styles.js +17 -14
  5. package/_modules/components/Delivery/DriversGroupDeliveryDetails/index.js +5 -2
  6. package/_modules/components/Delivery/DriversGroupDeliveryDetails/styles.js +9 -4
  7. package/_modules/components/Delivery/DriversGroupDetails/index.js +6 -3
  8. package/_modules/components/Delivery/DriversGroupGeneralForm/index.js +3 -1
  9. package/_modules/components/Delivery/DriversGroupGeneralForm/styles.js +8 -5
  10. package/_modules/components/Delivery/DriversGroupLogistics/index.js +5 -2
  11. package/_modules/components/Delivery/DriversGroupLogistics/styles.js +16 -13
  12. package/_modules/components/Delivery/DriversGroupLogs/index.js +8 -4
  13. package/_modules/components/Delivery/DriversGroupLogs/styles.js +19 -16
  14. package/_modules/components/Delivery/DriversGroupPaymethods/index.js +5 -2
  15. package/_modules/components/Delivery/DriversGroupPaymethods/styles.js +14 -11
  16. package/_modules/components/Delivery/DriversGroupsList/index.js +5 -2
  17. package/_modules/components/Delivery/DriversGroupsList/styles.js +5 -2
  18. package/_modules/components/Delivery/DriversGroupsListing/index.js +9 -5
  19. package/_modules/components/Delivery/UserAddForm/index.js +29 -3
  20. package/_modules/components/Delivery/UserAddForm/styles.js +21 -3
  21. package/_modules/components/Delivery/UserDetails/index.js +9 -4
  22. package/_modules/components/Delivery/UsersList/index.js +6 -3
  23. package/_modules/components/Delivery/UsersList/styles.js +10 -7
  24. package/_modules/components/Delivery/UsersListingHeader/index.js +8 -4
  25. package/_modules/components/MyProducts/OrderingWidgets/index.js +77 -0
  26. package/_modules/components/MyProducts/OrderingWidgets/styles.js +29 -0
  27. package/_modules/components/MyProducts/index.js +8 -1
  28. package/_modules/components/Orders/GiftCardsListing/index.js +144 -0
  29. package/_modules/components/Orders/GiftCardsListing/styles.js +57 -0
  30. package/_modules/components/Orders/OrderBill/index.js +5 -3
  31. package/_modules/components/Orders/OrderDetails/index.js +11 -11
  32. package/_modules/components/Orders/index.js +7 -0
  33. package/_modules/components/SidebarMenu/index.js +5 -0
  34. package/_modules/components/Stores/PaymentOption/index.js +4 -4
  35. package/_modules/components/Users/UsersDeleteButton/index.js +3 -2
  36. package/_modules/components/Users/UsersExportCSV/index.js +3 -2
  37. package/_modules/index.js +12 -0
  38. package/package.json +2 -2
  39. package/src/components/Delivery/DeliveryUsersListing/index.js +7 -2
  40. package/src/components/Delivery/DriversGroupBusinesses/index.js +3 -1
  41. package/src/components/Delivery/DriversGroupBusinesses/styles.js +4 -0
  42. package/src/components/Delivery/DriversGroupDeliveryDetails/index.js +5 -2
  43. package/src/components/Delivery/DriversGroupDeliveryDetails/styles.js +5 -1
  44. package/src/components/Delivery/DriversGroupDetails/index.js +4 -1
  45. package/src/components/Delivery/DriversGroupGeneralForm/index.js +2 -1
  46. package/src/components/Delivery/DriversGroupGeneralForm/styles.js +4 -0
  47. package/src/components/Delivery/DriversGroupLogistics/index.js +5 -2
  48. package/src/components/Delivery/DriversGroupLogistics/styles.js +4 -0
  49. package/src/components/Delivery/DriversGroupLogs/index.js +6 -3
  50. package/src/components/Delivery/DriversGroupLogs/styles.js +4 -0
  51. package/src/components/Delivery/DriversGroupPaymethods/index.js +5 -2
  52. package/src/components/Delivery/DriversGroupPaymethods/styles.js +4 -0
  53. package/src/components/Delivery/DriversGroupsList/index.js +4 -1
  54. package/src/components/Delivery/DriversGroupsList/styles.js +6 -0
  55. package/src/components/Delivery/DriversGroupsListing/index.js +6 -2
  56. package/src/components/Delivery/UserAddForm/index.js +42 -3
  57. package/src/components/Delivery/UserAddForm/styles.js +34 -0
  58. package/src/components/Delivery/UserDetails/index.js +6 -4
  59. package/src/components/Delivery/UsersList/index.js +8 -3
  60. package/src/components/Delivery/UsersList/styles.js +5 -0
  61. package/src/components/Delivery/UsersListingHeader/index.js +5 -1
  62. package/src/components/MyProducts/OrderingWidgets/index.js +118 -0
  63. package/src/components/MyProducts/OrderingWidgets/styles.js +84 -0
  64. package/src/components/MyProducts/index.js +3 -1
  65. package/src/components/Orders/GiftCardsListing/index.js +178 -0
  66. package/src/components/Orders/GiftCardsListing/styles.js +116 -0
  67. package/src/components/Orders/OrderBill/index.js +5 -1
  68. package/src/components/Orders/OrderDetails/index.js +11 -11
  69. package/src/components/Orders/index.js +2 -0
  70. package/src/components/SidebarMenu/index.js +6 -0
  71. package/src/components/Stores/PaymentOption/index.js +1 -1
  72. package/src/components/Users/UsersDeleteButton/index.js +3 -2
  73. package/src/components/Users/UsersExportCSV/index.js +3 -2
  74. package/src/index.js +5 -1
  75. package/template/app.js +8 -1
  76. package/template/components/ListenPageChanges/index.js +2 -0
  77. package/template/helmetdata.json +7 -0
  78. package/template/pages/GiftCardsList/index.js +12 -0
  79. package/template/pages/OrderingWidgets/index.js +12 -0
  80. /package/_bundles/{ordering-ui-admin.7c0f4e22698e5dbd9b25.js.LICENSE.txt → ordering-ui-admin.8e64a367ec831986000e.js.LICENSE.txt} +0 -0
@@ -0,0 +1,178 @@
1
+ import React from 'react'
2
+ import { useLanguage, GiftCardsList as GiftCardsListController } from 'ordering-components-admin-external'
3
+ import Skeleton from 'react-loading-skeleton'
4
+ import { useInfoShare } from '../../../contexts/InfoShareContext'
5
+ import { List as MenuIcon } from 'react-bootstrap-icons'
6
+ import { IconButton } from '../../../styles'
7
+ import { Pagination, SearchBar } from '../../Shared'
8
+
9
+ import {
10
+ Container,
11
+ HeaderContainer,
12
+ HeaderTitle,
13
+ TabsWrapper,
14
+ Tab,
15
+ GiftCardsTableWrapper,
16
+ GiftCardRow,
17
+ UserInfoContainer,
18
+ PaginationWarpper,
19
+ ActionsWrapper
20
+ } from './styles'
21
+
22
+ const GiftCardsListingUI = (props) => {
23
+ const {
24
+ giftCards,
25
+ paginationProps,
26
+ activeStatus,
27
+ setActiveStatus,
28
+ getGiftCards,
29
+ searchValue,
30
+ onSearch
31
+ } = props
32
+
33
+ const [, t] = useLanguage()
34
+ const [{ isCollapse }, { handleMenuCollapse }] = useInfoShare()
35
+
36
+ const handleChangePage = (page) => {
37
+ getGiftCards(page, paginationProps.pageSize)
38
+ }
39
+
40
+ const handleChangePageSize = (pageSize) => {
41
+ const expectedPage = Math.ceil(paginationProps.from / pageSize)
42
+ getGiftCards(expectedPage, pageSize)
43
+ }
44
+
45
+ return (
46
+ <Container>
47
+ <HeaderContainer>
48
+ <HeaderTitle>
49
+ {isCollapse && (
50
+ <IconButton
51
+ color='black'
52
+ onClick={() => handleMenuCollapse(false)}
53
+ >
54
+ <MenuIcon />
55
+ </IconButton>
56
+ )}
57
+ <h1>{t('GIFT_CARD_MANAGER', 'Gift card manager')}</h1>
58
+ </HeaderTitle>
59
+ <ActionsWrapper>
60
+ <SearchBar
61
+ isCustomLayout
62
+ lazyLoad
63
+ onSearch={onSearch}
64
+ search={searchValue}
65
+ placeholder={t('SEARCH', 'Search')}
66
+ />
67
+ </ActionsWrapper>
68
+ </HeaderContainer>
69
+ <TabsWrapper>
70
+ <Tab
71
+ active={activeStatus === 'pending'}
72
+ onClick={() => setActiveStatus('pending')}
73
+ >
74
+ {t('ORDER_PENDING', 'Pending')}
75
+ </Tab>
76
+ <Tab
77
+ active={activeStatus === 'activated'}
78
+ onClick={() => setActiveStatus('activated')}
79
+ >
80
+ {t('REDEEMED', 'Redeemed')}
81
+ </Tab>
82
+ </TabsWrapper>
83
+ <GiftCardsTableWrapper>
84
+ <table>
85
+ <thead>
86
+ <tr>
87
+ <th>{t('ID', 'ID')}</th>
88
+ <th>{t('PURCHASED_BY', 'Purchased by')}</th>
89
+ <th>{t('REDEEMED_BY', 'Redeemed by')}</th>
90
+ <th>{t('PURCHASED_DATE', 'Purchased date')}</th>
91
+ <th>{t('REDEEMED_DATE', 'Redeemed date')}</th>
92
+ </tr>
93
+ </thead>
94
+ {giftCards.loading ? (
95
+ [...Array(10).keys()].map(i => (
96
+ <GiftCardRow key={i}>
97
+ <tr>
98
+ <td><Skeleton width={20} /></td>
99
+ <td>
100
+ <UserInfoContainer>
101
+ <Skeleton width={38} height={38} />
102
+ <div>
103
+ <p className='name'><Skeleton width={100} /></p>
104
+ <p className='phone'><Skeleton width={80} /></p>
105
+ </div>
106
+ </UserInfoContainer>
107
+ </td>
108
+ <td>
109
+ <UserInfoContainer>
110
+ <Skeleton width={38} height={38} />
111
+ <div>
112
+ <p className='name'><Skeleton width={100} /></p>
113
+ <p className='phone'><Skeleton width={80} /></p>
114
+ </div>
115
+ </UserInfoContainer>
116
+ </td>
117
+ <td><Skeleton width={100} /></td>
118
+ <td><Skeleton width={100} /></td>
119
+ </tr>
120
+ </GiftCardRow>
121
+ ))
122
+ ) : (
123
+ giftCards.list.map(card => (
124
+ <GiftCardRow key={card.id}>
125
+ <tr>
126
+ <td>{card.id}</td>
127
+ <td>
128
+ <UserInfoContainer>
129
+ <img src={card.author?.photo} alt='' />
130
+ <div>
131
+ <p className='name'>{card.author?.name} {card.author?.lastname}</p>
132
+ <p className='phone'>{card.author?.cellphone}</p>
133
+ </div>
134
+ </UserInfoContainer>
135
+ </td>
136
+ <td>
137
+ {card.activater && (
138
+ <UserInfoContainer>
139
+ <img src={card.activater?.photo} alt='' />
140
+ <div>
141
+ <p className='name'>{card.activater?.name} {card.activater?.lastname}</p>
142
+ <p className='phone'>{card.activater?.cellphone}</p>
143
+ </div>
144
+ </UserInfoContainer>
145
+ )}
146
+ </td>
147
+ <td>{card.created_at}</td>
148
+ <td>{card.activated_at}</td>
149
+ </tr>
150
+ </GiftCardRow>
151
+ ))
152
+ )}
153
+ </table>
154
+ </GiftCardsTableWrapper>
155
+ <PaginationWarpper>
156
+ <Pagination
157
+ currentPage={paginationProps.currentPage}
158
+ totalPages={paginationProps.totalPages}
159
+ handleChangePage={handleChangePage}
160
+ defaultPageSize={paginationProps.pageSize}
161
+ handleChangePageSize={handleChangePageSize}
162
+ />
163
+ </PaginationWarpper>
164
+ </Container>
165
+ )
166
+ }
167
+
168
+ export const GiftCardsListing = (props) => {
169
+ const giftCardsProps = {
170
+ ...props,
171
+ UIComponent: GiftCardsListingUI,
172
+ isSearchById: true,
173
+ isSearchByAuthorName: true,
174
+ isSearchByAuthorEmail: true,
175
+ isSearchByAuthorPhone: true
176
+ }
177
+ return <GiftCardsListController {...giftCardsProps} />
178
+ }
@@ -0,0 +1,116 @@
1
+ import styled, { css } from 'styled-components'
2
+
3
+ export const Container = styled.div`
4
+ flex: 1;
5
+ padding: 20px;
6
+ box-sizing: border-box;
7
+ transition: all 0.5s;
8
+ overflow: hidden;
9
+ `
10
+ export const HeaderContainer = styled.div`
11
+ display: flex;
12
+ flex-direction: column;
13
+
14
+ @media (min-width: 768px) {
15
+ flex-direction: row;
16
+ align-items: center;
17
+ justify-content: space-between;
18
+ }
19
+ `
20
+ export const HeaderTitle = styled.div`
21
+ display: flex;
22
+ align-items: center;
23
+
24
+ h1 {
25
+ font-size: 20px;
26
+ font-weight: 700;
27
+ margin: 0;
28
+ }
29
+ `
30
+ export const ActionsWrapper = styled.div`
31
+ margin-top: 15px;
32
+ @media (min-width: 768px) {
33
+ margin-top: 0;
34
+ }
35
+ `
36
+ export const TabsWrapper = styled.div`
37
+ display: flex;
38
+ align-items: center;
39
+ border-bottom: 1px solid ${props => props.theme.colors.borderColor};
40
+ margin: 20px 0 10px 0;
41
+ `
42
+ export const Tab = styled.div`
43
+ padding: 10px 0px;
44
+ cursor: pointer;
45
+ color: ${props => props.theme.colors?.headingColor};
46
+ white-space: nowrap;
47
+ font-size: 14px;
48
+
49
+ ${props => props.theme?.rtl ? css`
50
+ margin-left: 30px;
51
+ ` : css`
52
+ margin-right: 30px;
53
+ `}
54
+
55
+ ${({ active }) => active && css`
56
+ border-bottom: 2px solid;
57
+ font-weight: 500;
58
+ `}
59
+
60
+ ${({ active }) => !active && css`
61
+ color: ${props => props.theme.colors.lightGray};
62
+ `}
63
+ `
64
+ export const GiftCardsTableWrapper = styled.div`
65
+ table {
66
+ width: 100%;
67
+ border-collapse: collapse;
68
+ td, th {
69
+ padding: 10px 0;
70
+ font-size: 14px;
71
+ }
72
+ thead {
73
+ border-bottom: 1px solid ${props => props.theme.colors.disabled};
74
+ }
75
+ }
76
+ `
77
+ export const GiftCardRow = styled.tbody`
78
+ border-bottom: 1px solid ${props => props.theme.colors.borderColor};
79
+ `
80
+ export const UserInfoContainer = styled.div`
81
+ display: flex;
82
+ align-items: center;
83
+
84
+ img {
85
+ width: 38px;
86
+ height: 38px;
87
+ border-radius: 8px;
88
+ object-fit: cover;
89
+ box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.1);
90
+ }
91
+
92
+ div {
93
+ ${props => props.theme?.rtl ? css`
94
+ margin-right: 9px;
95
+ ` : css`
96
+ margin-left: 9px;
97
+ `}
98
+ p.name {
99
+ margin: 0;
100
+ font-weight: 500;
101
+ font-size: 14px;
102
+ line-height: 21px;
103
+ }
104
+ p.phone {
105
+ margin: 0;
106
+ font-size: 10px;
107
+ line-height: 15px;
108
+ color: ${props => props.theme.colors.lightGray};
109
+ }
110
+ }
111
+ `
112
+ export const PaginationWarpper = styled.div`
113
+ display: flex;
114
+ justify-content: flex-end;
115
+ margin: 20px 0;
116
+ `
@@ -246,7 +246,11 @@ export const OrderBill = (props) => {
246
246
  ? walletName[event?.wallet_event?.wallet?.type]?.name
247
247
  : t(event?.paymethod?.name?.toUpperCase()?.replaceAll(' ', '_'), event?.paymethod?.name)}
248
248
  </td>
249
- <td>-{parsePrice(event?.amount, { currency: order?.currency })}</td>
249
+ <td>
250
+ {event?.paymethod?.gateway === 'cash' && order?.cash
251
+ ? parsePrice(order?.cash, { currency: order?.currency })
252
+ : `-${parsePrice(event?.amount, { currency: order?.currency })}`}
253
+ </td>
250
254
  </tr>
251
255
  ))}
252
256
  </tbody>
@@ -76,30 +76,30 @@ const OrderDetailsUI = (props) => {
76
76
  const rejectResonStatuses = [6, 9, 10, 11, 12, 14]
77
77
  const getOrderStatus = (status) => {
78
78
  const orderStatus = [
79
- { key: 0, value: 'Pending Order', slug: 'PENDING_ORDER', percentage: 25 },
79
+ { key: 0, value: 'Pending Order', slug: 'PENDING_ORDER', percentage: 10 },
80
80
  { key: 1, value: 'Completed by admin', slug: 'COMPLETED_BY_ADMIN', percentage: 100 },
81
81
  { key: 2, value: 'Reject by admin', slug: 'REJECT_BY_ADMIN', percentage: 0 },
82
82
  { key: 3, value: 'Driver arrived by business', slug: 'DRIVER_IN_BUSINESS', percentage: 60 },
83
- { key: 4, value: 'Preparation Completed', slug: 'PREPARATION_COMPLETED', percentage: 70 },
83
+ { key: 4, value: 'Preparation Completed', slug: 'PREPARATION_COMPLETED', percentage: 20 },
84
84
  { key: 5, value: 'Reject by business', slug: 'REJECT_BY_BUSINESS', percentage: 0 },
85
85
  { key: 6, value: 'Reject by driver', slug: 'REJECT_BY_DRIVER', percentage: 0 },
86
- { key: 7, value: 'Accepted by business', slug: 'ACCEPTED_BY_BUSINESS', percentage: 35 },
87
- { key: 8, value: 'Accepted by driver', slug: 'ACCEPTED_BY_DRIVER', percentage: 45 },
88
- { key: 9, value: 'Pick up completed by driver', slug: 'PICK_UP_COMPLETED_BY_DRIVER', percentage: 80 },
86
+ { key: 7, value: 'Accepted by business', slug: 'ACCEPTED_BY_BUSINESS', percentage: 15 },
87
+ { key: 8, value: 'Accepted by driver', slug: 'ACCEPTED_BY_DRIVER', percentage: 40 },
88
+ { key: 9, value: 'Pick up completed by driver', slug: 'PICK_UP_COMPLETED_BY_DRIVER', percentage: 70 },
89
89
  { key: 10, value: 'Pick up Failed by driver', slug: 'PICK_UP_FAILED_BY_DRIVER', percentage: 0 },
90
90
  { key: 11, value: 'Delivery completed by driver', slug: 'DELIVERY_COMPLETED_BY_DRIVER', percentage: 100 },
91
91
  { key: 12, value: 'Delivery Failed by driver', slug: 'DELIVERY_FAILED_BY_DRIVER', percentage: 0 },
92
- { key: 13, value: 'Preorder', slug: 'PREORDER', percentage: 25 },
93
- { key: 14, value: 'Order not ready', slug: 'ORDER_NOT_READY', percentage: 65 },
92
+ { key: 13, value: 'Preorder', slug: 'PREORDER', percentage: 0 },
93
+ { key: 14, value: 'Order not ready', slug: 'ORDER_NOT_READY', percentage: 15 },
94
94
  { key: 15, value: 'Pickup completed by customer', slug: 'PICKUP_COMPLETED_BY_CUSTOMER', percentage: 100 },
95
95
  { key: 16, value: 'Canceled by customer', slug: 'CANCELED_BY_CUSTOMER', percentage: 0 },
96
96
  { key: 17, value: 'Not picked by customer', slug: 'NOT_PICKED_BY_CUSTOMER', percentage: 0 },
97
97
  { key: 18, value: 'Driver almost arrived to business', slug: 'DRIVER_ALMOST_ARRIVED_TO_BUSINESS', percentage: 50 },
98
98
  { key: 19, value: 'Driver almost arrived to customer', slug: 'DRIVER_ALMOST_ARRIVED_TO_CUSTOMER', percentage: 90 },
99
- { key: 20, value: 'Customer almost arrived to business', slug: 'CUSTOMER_ALMOST_ARRIVED_TO_BUSINESS', percentage: 50 },
100
- { key: 21, value: 'Customer arrived to business', slug: 'CUSTOMER_ARRIVED_TO_BUSINESS', percentage: 60 },
101
- { key: 22, value: 'Looking for driver', slug: 'ORDER_LOOKING_FOR_DRIVER', percentage: 35 },
102
- { key: 23, value: 'Driver on way', slug: 'ORDER_DRIVER_ON_WAY', percentage: 45 }
99
+ { key: 20, value: 'Customer almost arrived to business', slug: 'CUSTOMER_ALMOST_ARRIVED_TO_BUSINESS', percentage: 90 },
100
+ { key: 21, value: 'Customer arrived to business', slug: 'CUSTOMER_ARRIVED_TO_BUSINESS', percentage: 90 },
101
+ { key: 22, value: 'Looking for driver', slug: 'ORDER_LOOKING_FOR_DRIVER', percentage: 30 },
102
+ { key: 23, value: 'Driver on way', slug: 'ORDER_DRIVER_ON_WAY', percentage: 80 }
103
103
  ]
104
104
 
105
105
  const objectStatus = orderStatus.find((o) => o.key === status)
@@ -1,6 +1,7 @@
1
1
  import { Appointments } from './Appointments'
2
2
  import { DeliveriesManager } from './DeliveriesManager'
3
3
  import { DriversManager } from './DriversManager'
4
+ import { GiftCardsListing } from './GiftCardsListing'
4
5
 
5
6
  import { Messages } from './Messages'
6
7
  import { OrdersContentHeader } from './OrdersContentHeader'
@@ -51,6 +52,7 @@ export {
51
52
  Appointments,
52
53
  DeliveriesManager,
53
54
  DriversManager,
55
+ GiftCardsListing,
54
56
  Messages,
55
57
  OrdersContentHeader,
56
58
  OrdersManager,
@@ -179,6 +179,12 @@ const SidebarMenuUI = (props) => {
179
179
  title: t('CUSTOM_PROJECT', 'Custom Project'),
180
180
  pageName: 'custom_project',
181
181
  url: '/my-products/custom-project'
182
+ },
183
+ {
184
+ id: 9,
185
+ title: t('ORDERING_WIDGETS', 'Ordering Widgets'),
186
+ pageName: 'ordering_widgets',
187
+ url: '/my-products/ordering-widgets'
182
188
  }
183
189
  ]
184
190
 
@@ -44,7 +44,7 @@ export const PaymentOption = (props) => {
44
44
  const [paymentTabs, setPaymentTabs] = useState(sitesState?.sites?.length > 0 ? 0 : 1)
45
45
  const [confirm, setConfirm] = useState({ open: false, content: null, handleOnAccept: null })
46
46
  const [localState, setLocalState] = useState({ allowed_order_types: businessPaymethod?.allowed_order_types, sites: businessPaymethod?.sites })
47
- const filteredOptions = localState?.sites ?? businessPaymethod?.sites.filter(a => sitesState?.sites?.find(b => a.id === b.id))
47
+ const filteredOptions = localState?.sites ?? businessPaymethod?.sites?.filter(a => sitesState?.sites?.find(b => a.id === b.id))
48
48
  const [all, setAll] = useState(!filteredOptions?.length)
49
49
 
50
50
  const setPaymethodInfo = (values) => {
@@ -16,7 +16,8 @@ const UsersDeleteButtonUI = (props) => {
16
16
  getCheckPassword,
17
17
  selectedUsers,
18
18
  deleteUsersActionState,
19
- handleDeleteSeveralUsers
19
+ handleDeleteSeveralUsers,
20
+ disabled
20
21
  } = props
21
22
  const [, t] = useLanguage()
22
23
 
@@ -60,7 +61,7 @@ const UsersDeleteButtonUI = (props) => {
60
61
  <Button
61
62
  borderRadius='5px'
62
63
  color='secundary'
63
- disabled={!selectedUsers.length || deleteUsersActionState.loading}
64
+ disabled={!selectedUsers.length || deleteUsersActionState.loading || disabled}
64
65
  onClick={() => handleModalOpen()}
65
66
  >
66
67
  {t('DELETE', 'Delete')}
@@ -10,7 +10,8 @@ import {
10
10
  const UsersExportCSVUI = (props) => {
11
11
  const {
12
12
  actionStatus,
13
- getCSV
13
+ getCSV,
14
+ disabled
14
15
  } = props
15
16
  const [, t] = useLanguage()
16
17
  const [popoverOpen, setPopoverOpen] = useState(false)
@@ -54,7 +55,7 @@ const UsersExportCSVUI = (props) => {
54
55
  <Button
55
56
  borderRadius='5px'
56
57
  color='secundary'
57
- disabled={actionStatus.loading}
58
+ disabled={actionStatus.loading || disabled}
58
59
  onClick={() => handleCSV()}
59
60
  >
60
61
  {t('CSV', 'CSV')}
package/src/index.js CHANGED
@@ -12,6 +12,7 @@ import {
12
12
  Appointments,
13
13
  DeliveriesManager,
14
14
  DriversManager,
15
+ GiftCardsListing,
15
16
  Messages,
16
17
  OrdersContentHeader,
17
18
  OrdersManager,
@@ -354,7 +355,8 @@ import {
354
355
  PosApp,
355
356
  CallCenterApp,
356
357
  KioskApp,
357
- CustomProject
358
+ CustomProject,
359
+ OrderingWidgets
358
360
  } from './components/MyProducts'
359
361
  import { OpenCartListing, RecoveryActionListing } from './components/CartRecovery'
360
362
  import { FreeProductsList, PurchasedProductsList } from './components/Downloads'
@@ -412,6 +414,7 @@ export {
412
414
  Appointments,
413
415
  DeliveriesManager,
414
416
  DriversManager,
417
+ GiftCardsListing,
415
418
  ForgotPasswordForm,
416
419
  MessagesListing,
417
420
  ChatContactList,
@@ -767,6 +770,7 @@ export {
767
770
  CallCenterApp,
768
771
  KioskApp,
769
772
  CustomProject,
773
+ OrderingWidgets,
770
774
 
771
775
  Layout,
772
776
  SidebarMenu,
package/template/app.js CHANGED
@@ -47,7 +47,7 @@ import { Support } from './pages/Support'
47
47
  import { AdvancedReports } from './pages/AdvancedReports'
48
48
  import { EnterprisePromotionList } from './pages/EnterprisePromotionList'
49
49
  import { Appointments } from './pages/Appointments'
50
- // import { GiftCardsList } from './pages/GiftCardsList'
50
+ import { GiftCardsList } from './pages/GiftCardsList'
51
51
  import { ResetPassword } from './pages/ResetPassword'
52
52
  import { OrderingWebsite } from './pages/OrderingWebsite'
53
53
  import { CustomerApp } from './pages/CustomerApp'
@@ -73,6 +73,7 @@ import { Profile } from './pages/Profile'
73
73
  import settings from './config.json'
74
74
  import { BusinessAdd } from './pages/BusinessAdd'
75
75
  import { CustomProject } from './pages/CustomProject'
76
+ import { OrderingWidgets } from './pages/OrderingWidgets'
76
77
 
77
78
  export const App = () => {
78
79
  const [{ auth, loading, user }] = useSession()
@@ -219,6 +220,9 @@ export const App = () => {
219
220
  <ProtectedRoute path='/appointments' allowedLevels={[0, 2]}>
220
221
  <Appointments />
221
222
  </ProtectedRoute>
223
+ <ProtectedRoute path='/gift-cards' allowedLevels={[0]}>
224
+ <GiftCardsList />
225
+ </ProtectedRoute>
222
226
 
223
227
  <ProtectedRoute path='/messages' allowedLevels={[0, 2]}>
224
228
  <MessagesList />
@@ -321,6 +325,9 @@ export const App = () => {
321
325
  <ProtectedRoute path='/my-products/custom-project' allowedLevels={[0]}>
322
326
  <CustomProject />
323
327
  </ProtectedRoute>
328
+ <ProtectedRoute path='/my-products/ordering-widgets' allowedLevels={[0]}>
329
+ <OrderingWidgets />
330
+ </ProtectedRoute>
324
331
 
325
332
  <ProtectedRoute path='/settings/basic' allowedLevels={[0]}>
326
333
  <BasicSettings />
@@ -15,6 +15,7 @@ export const ListenPageChanges = ({ children }) => {
15
15
  deliveries: '/deliveries',
16
16
  drivers: '/drivers',
17
17
  appointments: '/appointments',
18
+ giftCards: '/gift-cards',
18
19
  messages: '/messages',
19
20
  customers: '/users/customers',
20
21
  managers: '/users/managers',
@@ -46,6 +47,7 @@ export const ListenPageChanges = ({ children }) => {
46
47
  call_center_app: '/my-products/call-center-app',
47
48
  kiosk_app: '/my-products/kiosk-app',
48
49
  custom_project: '/my-products/custom-project',
50
+ ordering_widgets: '/my-products/ordering-widgets',
49
51
  delivery_drivers: '/delivery/drivers-list',
50
52
  drivers_managers: '/delivery/drivers-managers',
51
53
  drivers_companies: '/delivery/drivers-companies',
@@ -293,6 +293,13 @@
293
293
  "robots": "index, follow",
294
294
  "canonicalUrl": ""
295
295
  },
296
+ "ordering_widgets": {
297
+ "title": "Ordering Widgets",
298
+ "description": "a dummy description about this page",
299
+ "keywords": "test, dummy, data",
300
+ "robots": "index, follow",
301
+ "canonicalUrl": ""
302
+ },
296
303
  "support": {
297
304
  "title": "Support",
298
305
  "description": "a dummy description about this page",
@@ -0,0 +1,12 @@
1
+ import React from 'react'
2
+ import { HelmetTags } from '../../components/HelmetTags'
3
+ import { GiftCardsListing as GiftCardsListingController } from '../../../src/components/Orders'
4
+
5
+ export const GiftCardsList = (props) => {
6
+ return (
7
+ <>
8
+ <HelmetTags page='gift_cards' />
9
+ <GiftCardsListingController {...props} />
10
+ </>
11
+ )
12
+ }
@@ -0,0 +1,12 @@
1
+ import React from 'react'
2
+ import { HelmetTags } from '../../components/HelmetTags'
3
+ import { OrderingWidgets as OrderingWidgetsController } from '../../../src/components/MyProducts'
4
+
5
+ export const OrderingWidgets = (props) => {
6
+ return (
7
+ <>
8
+ <HelmetTags page='ordering_widgets' />
9
+ <OrderingWidgetsController {...props} />
10
+ </>
11
+ )
12
+ }