ordering-ui-admin-external 1.24.2 → 1.25.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.
- package/_bundles/main.css +12158 -12158
- package/_bundles/{ordering-ui-admin.0c354f3e7da49f56465b.js → ordering-ui-admin.f2522b983a000252b407.js} +2 -2
- package/_modules/components/CartRecovery/RecoveryActionAdd/index.js +16 -3
- package/_modules/components/CartRecovery/RecoveryActionAdd/styles.js +65 -0
- package/_modules/components/CartRecovery/RecoveryActionList/index.js +1 -1
- package/_modules/components/CartRecovery/RecoveryActionList/styles.js +3 -7
- package/_modules/components/CartRecovery/RecoveryActionListing/index.js +21 -2
- package/_modules/components/CartRecovery/RecoveryActionListing/styles.js +1 -1
- package/_modules/components/CartRecovery/RecoveryNotificationList/index.js +6 -2
- package/_modules/components/CartRecovery/RecoveryNotificationList/styles.js +3 -7
- package/_modules/components/CartRecovery/SingleRecoveryNotification/index.js +67 -21
- package/_modules/components/CartRecovery/SingleRecoveryNotification/styles.js +1 -1
- package/_modules/components/CartRecovery/index.js +8 -1
- package/_modules/components/Delivery/DriversCompaniesList/index.js +1 -1
- package/_modules/components/Delivery/DriversCompaniesList/styles.js +3 -7
- package/_modules/components/Delivery/DriversGroupsList/index.js +1 -1
- package/_modules/components/Delivery/DriversGroupsList/styles.js +3 -10
- package/_modules/components/Delivery/UsersList/index.js +1 -1
- package/_modules/components/Delivery/UsersList/styles.js +8 -15
- package/_modules/components/Marketing/CampaignList/index.js +1 -1
- package/_modules/components/Marketing/CampaignList/styles.js +3 -7
- package/_modules/components/Marketing/EnterprisePromotionDetails/index.js +1 -0
- package/_modules/components/Marketing/EnterprisePromotionList/index.js +1 -1
- package/_modules/components/Marketing/EnterprisePromotionList/styles.js +4 -8
- package/_modules/components/Marketing/EnterprisePromotionListing/index.js +9 -1
- package/_modules/components/Marketing/EnterprisePromotionRules/index.js +7 -2
- package/_modules/components/Messages/MessagesListing/index.js +8 -2
- package/_modules/components/MyProducts/ContentForm/index.js +0 -1
- package/_modules/components/OrderingProducts/OrderingProductsListing/index.js +1 -1
- package/_modules/components/OrderingProducts/OrderingProductsListing/styles.js +7 -11
- package/_modules/components/Orders/DeliveriesManager/index.js +1 -0
- package/_modules/components/Orders/DriversList/index.js +10 -9
- package/_modules/components/Orders/DriversList/styles.js +9 -16
- package/_modules/components/Orders/Logistics/index.js +15 -7
- package/_modules/components/Orders/Logistics/styles.js +1 -1
- package/_modules/components/Orders/OrderDetails/index.js +15 -13
- package/_modules/components/Orders/OrderDetailsHeader/index.js +7 -12
- package/_modules/components/Orders/OrderNotification/index.js +33 -1
- package/_modules/components/Orders/OrdersCards/index.js +11 -10
- package/_modules/components/Orders/OrdersCards/styles.js +1 -1
- package/_modules/components/Orders/OrdersTable/index.js +10 -9
- package/_modules/components/Settings/Cms/index.js +1 -1
- package/_modules/components/Settings/Cms/styles.js +3 -7
- package/_modules/components/Settings/CountriesList/index.js +1 -1
- package/_modules/components/Settings/CountriesList/styles.js +3 -7
- package/_modules/components/Settings/DropdownOptionList/index.js +1 -1
- package/_modules/components/Settings/DropdownOptionList/styles.js +3 -7
- package/_modules/components/Settings/LanguageTransTable/index.js +7 -6
- package/_modules/components/Settings/LanguageTransTable/styles.js +3 -7
- package/_modules/components/Settings/PlaceListing/index.js +1 -1
- package/_modules/components/Settings/PlaceListing/styles.js +3 -7
- package/_modules/components/Settings/SettingsList/index.js +1 -1
- package/_modules/components/Shared/HtmlEditor/InsertImage/index.js +202 -0
- package/_modules/components/Shared/HtmlEditor/InsertImage/styles.js +36 -0
- package/_modules/components/Shared/HtmlEditor/InsertLink/index.js +75 -0
- package/_modules/components/Shared/HtmlEditor/InsertLink/styles.js +16 -0
- package/_modules/components/Shared/HtmlEditor/InsertVideo/index.js +56 -0
- package/_modules/components/Shared/HtmlEditor/InsertVideo/styles.js +14 -0
- package/_modules/components/Shared/HtmlEditor/index.js +181 -0
- package/_modules/components/Shared/HtmlEditor/styles.js +18 -0
- package/_modules/components/Shared/index.js +7 -0
- package/_modules/components/Stores/BusinessBrandListing/index.js +1 -1
- package/_modules/components/Stores/BusinessBrandListing/styles.js +3 -6
- package/_modules/components/Stores/BusinessDeliveryPickupMore/styles.js +1 -1
- package/_modules/components/Stores/BusinessDeliveryZoneList/index.js +2 -2
- package/_modules/components/Stores/BusinessDeliveryZoneList/styles.js +4 -8
- package/_modules/components/Stores/BusinessDetail/styles.js +2 -2
- package/_modules/components/Stores/BusinessDetails/index.js +24 -25
- package/_modules/components/Stores/BusinessDeviceListing/index.js +1 -1
- package/_modules/components/Stores/BusinessDeviceListing/styles.js +1 -4
- package/_modules/components/Stores/BusinessMenu/index.js +2 -2
- package/_modules/components/Stores/BusinessMenu/styles.js +3 -5
- package/_modules/components/Stores/BusinessPlaceGroup/index.js +2 -2
- package/_modules/components/Stores/BusinessPlaceGroup/styles.js +3 -7
- package/_modules/components/Stores/BusinessPlaceGroupList/index.js +2 -2
- package/_modules/components/Stores/BusinessPlaceGroupList/styles.js +3 -7
- package/_modules/components/Stores/BusinessProductList/index.js +7 -6
- package/_modules/components/Stores/BusinessProductList/styles.js +3 -5
- package/_modules/components/Stores/BusinessProductsCategories/index.js +6 -5
- package/_modules/components/Stores/BusinessProductsCategories/styles.js +3 -6
- package/_modules/components/Stores/BusinessProductsListing/index.js +9 -6
- package/_modules/components/Stores/BusinessPromotionList/index.js +2 -2
- package/_modules/components/Stores/BusinessPromotionList/styles.js +3 -5
- package/_modules/components/Stores/BusinessSummary/index.js +7 -12
- package/_modules/components/Stores/BusinessesList/index.js +7 -4
- package/_modules/components/Stores/BusinessesList/styles.js +12 -16
- package/_modules/components/Stores/BusinessesListing/index.js +4 -2
- package/_modules/components/Stores/ImportersButton/index.js +2 -0
- package/_modules/components/Stores/ImportersList/index.js +1 -1
- package/_modules/components/Stores/ImportersList/styles.js +4 -9
- package/_modules/components/Stores/ProductDetails/index.js +19 -20
- package/_modules/components/Stores/ProductExtraOptionDetails/index.js +1 -1
- package/_modules/components/Stores/ProductExtraOptionDetails/styles.js +1 -5
- package/_modules/components/Stores/ProductExtras/index.js +2 -2
- package/_modules/components/Stores/ProductExtras/styles.js +3 -7
- package/_modules/components/Stores/ProductIngredient/index.js +2 -2
- package/_modules/components/Stores/ProductIngredient/styles.js +3 -7
- package/_modules/components/Stores/ProductStep/index.js +13 -7
- package/_modules/components/Stores/ProductSummary/index.js +2 -8
- package/_modules/components/Stores/ProductTagsList/index.js +2 -2
- package/_modules/components/Stores/ProductTagsList/styles.js +1 -5
- package/_modules/components/Stores/RestaurantSelectGuide/index.js +18 -9
- package/_modules/components/Stores/SeoOptions/index.js +25 -10
- package/_modules/components/Stores/SingleBusiness/index.js +18 -11
- package/_modules/components/Users/CustomerDetails/index.js +6 -7
- package/_modules/components/Users/CustomersListing/index.js +10 -4
- package/_modules/components/Users/ProfessionalList/index.js +1 -1
- package/_modules/components/Users/ProfessionalList/styles.js +8 -12
- package/_modules/components/Users/UsersList/index.js +1 -1
- package/_modules/components/Users/UsersList/styles.js +11 -15
- package/_modules/index.js +6 -0
- package/_modules/styles/Buttons/index.js +11 -4
- package/_modules/styles/index.js +6 -0
- package/index-template.js +1 -1
- package/package.json +2 -2
- package/src/components/CartRecovery/RecoveryActionAdd/index.js +13 -3
- package/src/components/CartRecovery/RecoveryActionAdd/styles.js +179 -0
- package/src/components/CartRecovery/RecoveryActionList/index.js +4 -5
- package/src/components/CartRecovery/RecoveryActionList/styles.js +0 -6
- package/src/components/CartRecovery/RecoveryActionListing/index.js +25 -6
- package/src/components/CartRecovery/RecoveryActionListing/styles.js +2 -1
- package/src/components/CartRecovery/RecoveryNotificationList/index.js +7 -3
- package/src/components/CartRecovery/RecoveryNotificationList/styles.js +5 -13
- package/src/components/CartRecovery/SingleRecoveryNotification/index.js +91 -42
- package/src/components/CartRecovery/SingleRecoveryNotification/styles.js +2 -2
- package/src/components/CartRecovery/index.js +3 -1
- package/src/components/Delivery/DriversCompaniesList/index.js +3 -4
- package/src/components/Delivery/DriversCompaniesList/styles.js +0 -6
- package/src/components/Delivery/DriversGroupsList/index.js +3 -4
- package/src/components/Delivery/DriversGroupsList/styles.js +0 -12
- package/src/components/Delivery/UsersList/index.js +3 -4
- package/src/components/Delivery/UsersList/styles.js +0 -12
- package/src/components/Marketing/CampaignList/index.js +3 -4
- package/src/components/Marketing/CampaignList/styles.js +0 -6
- package/src/components/Marketing/EnterprisePromotionDetails/index.js +1 -0
- package/src/components/Marketing/EnterprisePromotionList/index.js +3 -4
- package/src/components/Marketing/EnterprisePromotionList/styles.js +0 -7
- package/src/components/Marketing/EnterprisePromotionListing/index.js +6 -1
- package/src/components/Marketing/EnterprisePromotionRules/index.js +7 -2
- package/src/components/Messages/MessagesListing/index.js +3 -0
- package/src/components/MyProducts/ContentForm/index.js +0 -1
- package/src/components/OrderingProducts/OrderingProductsListing/index.js +3 -4
- package/src/components/OrderingProducts/OrderingProductsListing/styles.js +0 -7
- package/src/components/Orders/DeliveriesManager/index.js +1 -0
- package/src/components/Orders/DriversList/index.js +4 -4
- package/src/components/Orders/DriversList/styles.js +0 -10
- package/src/components/Orders/Logistics/index.js +10 -1
- package/src/components/Orders/Logistics/styles.js +6 -0
- package/src/components/Orders/OrderDetails/index.js +11 -13
- package/src/components/Orders/OrderDetailsHeader/index.js +40 -43
- package/src/components/Orders/OrderNotification/index.js +19 -1
- package/src/components/Orders/OrdersCards/index.js +7 -7
- package/src/components/Orders/OrdersCards/styles.js +3 -1
- package/src/components/Orders/OrdersTable/index.js +8 -8
- package/src/components/Settings/Cms/index.js +4 -5
- package/src/components/Settings/Cms/styles.js +0 -6
- package/src/components/Settings/CountriesList/index.js +4 -5
- package/src/components/Settings/CountriesList/styles.js +0 -6
- package/src/components/Settings/DropdownOptionList/index.js +4 -5
- package/src/components/Settings/DropdownOptionList/styles.js +0 -6
- package/src/components/Settings/LanguageTransTable/index.js +4 -4
- package/src/components/Settings/LanguageTransTable/styles.js +0 -6
- package/src/components/Settings/PlaceListing/index.js +4 -5
- package/src/components/Settings/PlaceListing/styles.js +0 -6
- package/src/components/Settings/SettingsList/index.js +88 -88
- package/src/components/Shared/HtmlEditor/InsertImage/index.js +172 -0
- package/src/components/Shared/HtmlEditor/InsertImage/styles.js +136 -0
- package/src/components/Shared/HtmlEditor/InsertLink/index.js +73 -0
- package/src/components/Shared/HtmlEditor/InsertLink/styles.js +34 -0
- package/src/components/Shared/HtmlEditor/InsertVideo/index.js +51 -0
- package/src/components/Shared/HtmlEditor/InsertVideo/styles.js +23 -0
- package/src/components/Shared/HtmlEditor/index.js +172 -0
- package/src/components/Shared/HtmlEditor/styles.js +30 -0
- package/src/components/Shared/index.js +3 -1
- package/src/components/Stores/BusinessBrandListing/index.js +2 -2
- package/src/components/Stores/BusinessBrandListing/styles.js +0 -7
- package/src/components/Stores/BusinessDeliveryPickupMore/styles.js +0 -4
- package/src/components/Stores/BusinessDeliveryZoneList/index.js +9 -7
- package/src/components/Stores/BusinessDeliveryZoneList/styles.js +1 -11
- package/src/components/Stores/BusinessDetail/styles.js +1 -4
- package/src/components/Stores/BusinessDetails/index.js +12 -17
- package/src/components/Stores/BusinessDeviceListing/index.js +2 -2
- package/src/components/Stores/BusinessDeviceListing/styles.js +0 -7
- package/src/components/Stores/BusinessMenu/index.js +9 -7
- package/src/components/Stores/BusinessMenu/styles.js +1 -6
- package/src/components/Stores/BusinessPlaceGroup/index.js +7 -3
- package/src/components/Stores/BusinessPlaceGroup/styles.js +1 -12
- package/src/components/Stores/BusinessPlaceGroupList/index.js +5 -3
- package/src/components/Stores/BusinessPlaceGroupList/styles.js +1 -12
- package/src/components/Stores/BusinessProductList/index.js +9 -6
- package/src/components/Stores/BusinessProductList/styles.js +1 -6
- package/src/components/Stores/BusinessProductsCategories/index.js +10 -7
- package/src/components/Stores/BusinessProductsCategories/styles.js +1 -6
- package/src/components/Stores/BusinessProductsListing/index.js +5 -2
- package/src/components/Stores/BusinessPromotionList/index.js +7 -5
- package/src/components/Stores/BusinessPromotionList/styles.js +1 -5
- package/src/components/Stores/BusinessSummary/index.js +4 -7
- package/src/components/Stores/BusinessesList/index.js +7 -5
- package/src/components/Stores/BusinessesList/styles.js +0 -8
- package/src/components/Stores/BusinessesListing/index.js +3 -1
- package/src/components/Stores/ImportersButton/index.js +2 -0
- package/src/components/Stores/ImportersList/index.js +3 -4
- package/src/components/Stores/ImportersList/styles.js +1 -13
- package/src/components/Stores/ProductDetails/index.js +12 -16
- package/src/components/Stores/ProductExtraOptionDetails/index.js +3 -3
- package/src/components/Stores/ProductExtraOptionDetails/styles.js +0 -9
- package/src/components/Stores/ProductExtras/index.js +9 -7
- package/src/components/Stores/ProductExtras/styles.js +1 -8
- package/src/components/Stores/ProductIngredient/index.js +9 -7
- package/src/components/Stores/ProductIngredient/styles.js +1 -8
- package/src/components/Stores/ProductStep/index.js +25 -4
- package/src/components/Stores/ProductSummary/index.js +3 -7
- package/src/components/Stores/ProductTagsList/index.js +7 -5
- package/src/components/Stores/ProductTagsList/styles.js +0 -7
- package/src/components/Stores/RestaurantSelectGuide/index.js +54 -24
- package/src/components/Stores/SeoOptions/index.js +15 -1
- package/src/components/Stores/SingleBusiness/index.js +9 -3
- package/src/components/Users/CustomerDetails/index.js +6 -8
- package/src/components/Users/CustomersListing/index.js +4 -1
- package/src/components/Users/ProfessionalList/index.js +3 -4
- package/src/components/Users/ProfessionalList/styles.js +0 -7
- package/src/components/Users/UsersList/index.js +3 -4
- package/src/components/Users/UsersList/styles.js +0 -7
- package/src/index.js +2 -1
- package/src/styles/Buttons/index.js +15 -1
- package/src/styles/index.js +2 -1
- package/template/pages/Login/index.js +2 -4
- /package/_bundles/{ordering-ui-admin.0c354f3e7da49f56465b.js.LICENSE.txt → ordering-ui-admin.f2522b983a000252b407.js.LICENSE.txt} +0 -0
|
@@ -157,11 +157,11 @@ export const OrdersTable = (props) => {
|
|
|
157
157
|
return finalTaget
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
-
const getStatusClassName = (minutes) => {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
}
|
|
160
|
+
// const getStatusClassName = (minutes) => {
|
|
161
|
+
// if (isNaN(Number(minutes))) return 'in_time'
|
|
162
|
+
// const delayTime = configState?.configs?.order_deadlines_delayed_time?.value
|
|
163
|
+
// return minutes > 0 ? 'in_time' : Math.abs(minutes) <= delayTime ? 'at_risk' : 'delayed'
|
|
164
|
+
// }
|
|
165
165
|
|
|
166
166
|
useEffect(() => {
|
|
167
167
|
const interval = setInterval(() => {
|
|
@@ -611,7 +611,7 @@ export const OrdersTable = (props) => {
|
|
|
611
611
|
className={parseInt(orderDetailId) === order.id ? 'active' : ''}
|
|
612
612
|
onClick={(e) => handleClickOrder(order, e)}
|
|
613
613
|
data-tour={i === 0 ? 'tour_start' : ''}
|
|
614
|
-
data-status={isEnabledRowInColor &&
|
|
614
|
+
data-status={isEnabledRowInColor && order?.time_status}
|
|
615
615
|
>
|
|
616
616
|
<tr>
|
|
617
617
|
{Object.keys(allowColumns).filter(col => allowColumns[col]?.visable)
|
|
@@ -621,7 +621,7 @@ export const OrdersTable = (props) => {
|
|
|
621
621
|
return (
|
|
622
622
|
<td key={`slaBar${i}-${index}`}>
|
|
623
623
|
<Timestatus
|
|
624
|
-
timeState={
|
|
624
|
+
timeState={order?.time_status}
|
|
625
625
|
/>
|
|
626
626
|
</td>
|
|
627
627
|
)
|
|
@@ -807,7 +807,7 @@ export const OrdersTable = (props) => {
|
|
|
807
807
|
<td className='timer' key={`timer${i}-${index}`}>
|
|
808
808
|
<Timer>
|
|
809
809
|
<p className='bold'>{t('TIMER', 'Timer')}</p>
|
|
810
|
-
<p className={
|
|
810
|
+
<p className={order?.time_status}>{displayDelayedTime(order)}</p>
|
|
811
811
|
</Timer>
|
|
812
812
|
</td>
|
|
813
813
|
)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react'
|
|
2
2
|
import { useLanguage, PagesList as PagesListController } from 'ordering-components-admin-external'
|
|
3
3
|
import Skeleton from 'react-loading-skeleton'
|
|
4
|
-
import { Button, IconButton, Switch } from '../../../styles'
|
|
4
|
+
import { Button, IconButton, Switch, LinkButton } from '../../../styles'
|
|
5
5
|
import { Modal, Pagination, SearchBar } from '../../Shared'
|
|
6
6
|
import { Dropdown, DropdownButton } from 'react-bootstrap'
|
|
7
7
|
import FiMoreVertical from '@meronex/icons/fi/FiMoreVertical'
|
|
@@ -20,8 +20,7 @@ import {
|
|
|
20
20
|
ActionsContainer,
|
|
21
21
|
EnableWrapper,
|
|
22
22
|
ActionSelectorWrapper,
|
|
23
|
-
PagesBottomContainer
|
|
24
|
-
AddNewPageButton
|
|
23
|
+
PagesBottomContainer
|
|
25
24
|
} from './styles'
|
|
26
25
|
|
|
27
26
|
const CmsUI = (props) => {
|
|
@@ -187,9 +186,9 @@ const CmsUI = (props) => {
|
|
|
187
186
|
</PageListTable>
|
|
188
187
|
{!pagesListState.loading && (
|
|
189
188
|
<PagesBottomContainer>
|
|
190
|
-
<
|
|
189
|
+
<LinkButton onClick={() => handleEditPage(null)}>
|
|
191
190
|
{t('ADD_NEW_STATIC_PAGE', 'Add new static page')}
|
|
192
|
-
</
|
|
191
|
+
</LinkButton>
|
|
193
192
|
{currentPages?.length > 0 && (
|
|
194
193
|
<Pagination
|
|
195
194
|
currentPage={currentPage}
|
|
@@ -6,7 +6,7 @@ import { Pagination, SideBar, Confirm } from '../../Shared'
|
|
|
6
6
|
import { Dropdown, DropdownButton } from 'react-bootstrap'
|
|
7
7
|
import { useTheme } from 'styled-components'
|
|
8
8
|
import FiMoreVertical from '@meronex/icons/fi/FiMoreVertical'
|
|
9
|
-
import { Switch } from '../../../styles'
|
|
9
|
+
import { Switch, LinkButton } from '../../../styles'
|
|
10
10
|
import { CountryDetails } from '../CountryDetails'
|
|
11
11
|
import RiCheckboxBlankLine from '@meronex/icons/ri/RiCheckboxBlankLine'
|
|
12
12
|
import RiCheckboxFill from '@meronex/icons/ri/RiCheckboxFill'
|
|
@@ -19,8 +19,7 @@ import {
|
|
|
19
19
|
CountryWrapper,
|
|
20
20
|
CheckboxWrapper,
|
|
21
21
|
CountryName,
|
|
22
|
-
PagesBottomContainer
|
|
23
|
-
AddNewPageButton
|
|
22
|
+
PagesBottomContainer
|
|
24
23
|
} from './styles'
|
|
25
24
|
|
|
26
25
|
export const CountriesList = (props) => {
|
|
@@ -223,14 +222,14 @@ export const CountriesList = (props) => {
|
|
|
223
222
|
|
|
224
223
|
{!countriesState.loading && (
|
|
225
224
|
<PagesBottomContainer>
|
|
226
|
-
<
|
|
225
|
+
<LinkButton
|
|
227
226
|
onClick={() => {
|
|
228
227
|
setSelectedCountry(null)
|
|
229
228
|
setOpenDetails(true)
|
|
230
229
|
}}
|
|
231
230
|
>
|
|
232
231
|
{t('ADD_NEW_COUNTRY ', 'Add new country')}
|
|
233
|
-
</
|
|
232
|
+
</LinkButton>
|
|
234
233
|
{currentCountries?.length > 0 && (
|
|
235
234
|
<Pagination
|
|
236
235
|
currentPage={currentPage}
|
|
@@ -7,7 +7,7 @@ import { useTheme } from 'styled-components'
|
|
|
7
7
|
import FiMoreVertical from '@meronex/icons/fi/FiMoreVertical'
|
|
8
8
|
import RiCheckboxBlankLine from '@meronex/icons/ri/RiCheckboxBlankLine'
|
|
9
9
|
import RiCheckboxFill from '@meronex/icons/ri/RiCheckboxFill'
|
|
10
|
-
import { Switch } from '../../../styles'
|
|
10
|
+
import { Switch, LinkButton } from '../../../styles'
|
|
11
11
|
import { CitySelector, Confirm, Pagination, SideBar } from '../../Shared'
|
|
12
12
|
import { CountrySelector } from '../CountrySelector'
|
|
13
13
|
import { ZoneDropdownDetails } from '../ZoneDropdownDetails'
|
|
@@ -22,8 +22,7 @@ import {
|
|
|
22
22
|
CityName,
|
|
23
23
|
CountryName,
|
|
24
24
|
CheckboxWrapper,
|
|
25
|
-
PagesBottomContainer
|
|
26
|
-
AddNewPageButton
|
|
25
|
+
PagesBottomContainer
|
|
27
26
|
} from './styles'
|
|
28
27
|
|
|
29
28
|
export const DropdownOptionList = (props) => {
|
|
@@ -237,11 +236,11 @@ export const DropdownOptionList = (props) => {
|
|
|
237
236
|
|
|
238
237
|
{!dropdownOptionsState.loading && (
|
|
239
238
|
<PagesBottomContainer>
|
|
240
|
-
<
|
|
239
|
+
<LinkButton
|
|
241
240
|
onClick={() => handleOpenZoneDropdownDetails(null)}
|
|
242
241
|
>
|
|
243
242
|
{t('ADD_NEW_ZONE_DROPDOWN ', 'Add new zone dropdown')}
|
|
244
|
-
</
|
|
243
|
+
</LinkButton>
|
|
245
244
|
{currentDropdownOptions?.length > 0 && (
|
|
246
245
|
<Pagination
|
|
247
246
|
currentPage={currentPage}
|
|
@@ -2,14 +2,14 @@ import React, { useState, useEffect, useRef } from 'react'
|
|
|
2
2
|
import { useLanguage, LanguageTransTable as LanguageTransTableController } from 'ordering-components-admin-external'
|
|
3
3
|
import Skeleton from 'react-loading-skeleton'
|
|
4
4
|
import { Alert, Pagination } from '../../Shared'
|
|
5
|
+
import { LinkButton } from '../../../styles'
|
|
5
6
|
|
|
6
7
|
import {
|
|
7
8
|
TranslationTableContainer,
|
|
8
9
|
TranslationTable,
|
|
9
10
|
TableHeader,
|
|
10
11
|
TableBody,
|
|
11
|
-
TransBottomContainer
|
|
12
|
-
AddNewTransButton
|
|
12
|
+
TransBottomContainer
|
|
13
13
|
} from './styles'
|
|
14
14
|
|
|
15
15
|
const LanguageTransTableUI = (props) => {
|
|
@@ -183,9 +183,9 @@ const LanguageTransTableUI = (props) => {
|
|
|
183
183
|
</TranslationTable>
|
|
184
184
|
{!translationList.loading && (
|
|
185
185
|
<TransBottomContainer>
|
|
186
|
-
<
|
|
186
|
+
<LinkButton onClick={() => setIsShowCreation(true)}>
|
|
187
187
|
{t('ADD_NEW_KEY', 'Add new key')}
|
|
188
|
-
</
|
|
188
|
+
</LinkButton>
|
|
189
189
|
{currentPages?.length > 0 && (
|
|
190
190
|
<Pagination
|
|
191
191
|
currentPage={currentPage}
|
|
@@ -2,7 +2,7 @@ import React, { useState, useEffect } from 'react'
|
|
|
2
2
|
import { useHistory, useLocation } from 'react-router-dom'
|
|
3
3
|
import { useLanguage, PlaceList as PlaceListController } from 'ordering-components-admin-external'
|
|
4
4
|
import { useInfoShare } from '../../../contexts/InfoShareContext'
|
|
5
|
-
import { Button, IconButton, Switch } from '../../../styles'
|
|
5
|
+
import { Button, IconButton, Switch, LinkButton } from '../../../styles'
|
|
6
6
|
import { List as MenuIcon } from 'react-bootstrap-icons'
|
|
7
7
|
import Skeleton from 'react-loading-skeleton'
|
|
8
8
|
import { Dropdown, DropdownButton } from 'react-bootstrap'
|
|
@@ -32,8 +32,7 @@ import {
|
|
|
32
32
|
CityAdministrator,
|
|
33
33
|
CountryName,
|
|
34
34
|
CheckboxWrapper,
|
|
35
|
-
PagesBottomContainer
|
|
36
|
-
AddNewPageButton
|
|
35
|
+
PagesBottomContainer
|
|
37
36
|
} from './styles'
|
|
38
37
|
|
|
39
38
|
const PlaceListingUI = (props) => {
|
|
@@ -401,11 +400,11 @@ const PlaceListingUI = (props) => {
|
|
|
401
400
|
|
|
402
401
|
{!countriesState.loading && (
|
|
403
402
|
<PagesBottomContainer>
|
|
404
|
-
<
|
|
403
|
+
<LinkButton
|
|
405
404
|
onClick={() => handleOpenCityDetails(null)}
|
|
406
405
|
>
|
|
407
406
|
{t('ADD_NEW_CITY', 'Add new city')}
|
|
408
|
-
</
|
|
407
|
+
</LinkButton>
|
|
409
408
|
{currentCities?.length > 0 && (
|
|
410
409
|
<Pagination
|
|
411
410
|
currentPage={currentPage}
|
|
@@ -33,7 +33,7 @@ export const SettingsListUI = (props) => {
|
|
|
33
33
|
saveConfig
|
|
34
34
|
} = props
|
|
35
35
|
|
|
36
|
-
const settingsNotAllowed = ['
|
|
36
|
+
const settingsNotAllowed = ['']
|
|
37
37
|
|
|
38
38
|
const [, t] = useLanguage()
|
|
39
39
|
const [alertState, setAlertState] = useState({ open: false, content: [] })
|
|
@@ -145,51 +145,51 @@ export const SettingsListUI = (props) => {
|
|
|
145
145
|
{
|
|
146
146
|
configs.length > 0 && configs.map((config, i) => (
|
|
147
147
|
!settingsNotAllowed.includes(config.key) && (
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
)
|
|
148
|
+
<div key={i}>
|
|
149
|
+
{
|
|
150
|
+
config.type === 1 && (
|
|
151
|
+
<FormGroupText className='form-group'>
|
|
152
|
+
<label>{config?.name}</label>
|
|
153
|
+
{config?.description && <Description>{config?.description}</Description>}
|
|
154
|
+
<input
|
|
155
|
+
type='text'
|
|
156
|
+
value={config?.value}
|
|
157
|
+
onChange={(e) => handleInputChange(e.target.value, config?.id)}
|
|
158
|
+
onKeyPress={(e) => handleKeyPress(e, config?.key)}
|
|
159
|
+
className='form-control'
|
|
160
|
+
placeholder={config?.name}
|
|
161
|
+
/>
|
|
162
|
+
</FormGroupText>
|
|
163
|
+
)
|
|
164
|
+
}
|
|
165
|
+
{
|
|
166
|
+
config.type === 2 && (
|
|
167
|
+
config.key === 'country_autocomplete' ? (
|
|
168
|
+
<SettingsCountryFilter
|
|
169
|
+
defaultValue={config?.value}
|
|
170
|
+
handleSelectChange={(value) => handleInputChange(value, config?.id)}
|
|
171
|
+
label={config?.name}
|
|
172
|
+
description={config?.description}
|
|
173
|
+
/>
|
|
174
|
+
) : (
|
|
175
|
+
<SettingsSelectUI
|
|
176
|
+
config={config}
|
|
177
|
+
defaultValue={config?.value}
|
|
178
|
+
handleSelectChange={(value) => handleInputChange(value, config?.id)}
|
|
179
|
+
/>
|
|
181
180
|
)
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
181
|
+
)
|
|
182
|
+
}
|
|
183
|
+
{
|
|
184
|
+
config.type === 3 && (
|
|
185
|
+
<CheckBoxWrapper>
|
|
186
|
+
{config?.name && (
|
|
187
|
+
<label>{config?.name}</label>
|
|
188
|
+
)}
|
|
189
|
+
{config?.description && (
|
|
190
|
+
<p>{config?.description}</p>
|
|
191
|
+
)}
|
|
192
|
+
{
|
|
193
193
|
config?.options?.length > 0 && config?.options?.map((item, j) => (
|
|
194
194
|
<FormGroupWrapper key={j}>
|
|
195
195
|
<FormGroupCheck className='checkbox'>
|
|
@@ -206,36 +206,36 @@ export const SettingsListUI = (props) => {
|
|
|
206
206
|
</FormGroupCheck>
|
|
207
207
|
</FormGroupWrapper>
|
|
208
208
|
))
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
209
|
+
}
|
|
210
|
+
{
|
|
211
|
+
!config?.options && <OptionsError>{t('NO_OPTIONS_VALUE', 'There is no options value')}</OptionsError>
|
|
212
|
+
}
|
|
213
|
+
</CheckBoxWrapper>
|
|
214
|
+
)
|
|
215
|
+
}
|
|
216
|
+
{
|
|
217
|
+
config.type === 4 && (
|
|
218
|
+
config.key === 'driver_tip_options' ? (
|
|
219
|
+
<FormGroupText className='form-group'>
|
|
220
|
+
<label>{config?.name}</label>
|
|
221
|
+
{config?.description && <Description>{config?.description}</Description>}
|
|
222
|
+
<input
|
|
223
|
+
type='text'
|
|
224
|
+
defaultValue={formatArray(config?.value)}
|
|
225
|
+
onChange={(e) => handleInputChange(e.target.value, config?.id)}
|
|
226
|
+
className='form-control'
|
|
227
|
+
placeholder='placeholder'
|
|
228
|
+
/>
|
|
229
|
+
</FormGroupText>
|
|
230
|
+
) : (
|
|
231
|
+
<CheckBoxWrapper>
|
|
232
|
+
{config?.name && (
|
|
220
233
|
<label>{config?.name}</label>
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
className='form-control'
|
|
227
|
-
placeholder='placeholder'
|
|
228
|
-
/>
|
|
229
|
-
</FormGroupText>
|
|
230
|
-
) : (
|
|
231
|
-
<CheckBoxWrapper>
|
|
232
|
-
{config?.name && (
|
|
233
|
-
<label>{config?.name}</label>
|
|
234
|
-
)}
|
|
235
|
-
{config?.description && (
|
|
236
|
-
<p>{config?.description}</p>
|
|
237
|
-
)}
|
|
238
|
-
{
|
|
234
|
+
)}
|
|
235
|
+
{config?.description && (
|
|
236
|
+
<p>{config?.description}</p>
|
|
237
|
+
)}
|
|
238
|
+
{
|
|
239
239
|
config?.options?.length > 0 && config?.options?.map((item, j) => (
|
|
240
240
|
<FormGroupWrapper key={j}>
|
|
241
241
|
<FormGroupCheck className='checkbox'>
|
|
@@ -252,20 +252,20 @@ export const SettingsListUI = (props) => {
|
|
|
252
252
|
</FormGroupCheck>
|
|
253
253
|
</FormGroupWrapper>
|
|
254
254
|
))
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
)
|
|
259
|
-
)
|
|
260
|
-
}
|
|
261
|
-
{
|
|
262
|
-
config.type === 5 && (
|
|
263
|
-
<SettingsImage
|
|
264
|
-
config={config}
|
|
265
|
-
saveConfig={saveConfig}
|
|
266
|
-
/>
|
|
255
|
+
}
|
|
256
|
+
{!config?.options && <OptionsError>{t('NO_OPTIONS_VALUE', 'There is no options value')}</OptionsError>}
|
|
257
|
+
</CheckBoxWrapper>
|
|
267
258
|
)
|
|
268
|
-
|
|
259
|
+
)
|
|
260
|
+
}
|
|
261
|
+
{
|
|
262
|
+
config.type === 5 && (
|
|
263
|
+
<SettingsImage
|
|
264
|
+
config={config}
|
|
265
|
+
saveConfig={saveConfig}
|
|
266
|
+
/>
|
|
267
|
+
)
|
|
268
|
+
}
|
|
269
269
|
{/* {config.type === 6 && (
|
|
270
270
|
<>
|
|
271
271
|
<FormGroupText className='form-group'>
|
|
@@ -289,7 +289,7 @@ export const SettingsListUI = (props) => {
|
|
|
289
289
|
</FormGroupText>
|
|
290
290
|
</>
|
|
291
291
|
)} */}
|
|
292
|
-
|
|
292
|
+
</div>
|
|
293
293
|
)
|
|
294
294
|
))
|
|
295
295
|
}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import React, { useState, useRef, useEffect } from 'react'
|
|
2
|
+
import Skeleton from 'react-loading-skeleton'
|
|
3
|
+
import {
|
|
4
|
+
useLanguage,
|
|
5
|
+
DragAndDrop,
|
|
6
|
+
ExamineClick
|
|
7
|
+
} from 'ordering-components-admin-external'
|
|
8
|
+
import { Button, Input } from '../../../../styles'
|
|
9
|
+
import { XLg } from 'react-bootstrap-icons'
|
|
10
|
+
import BiImage from '@meronex/icons/bi/BiImage'
|
|
11
|
+
import { bytesConverter } from '../../../../utils'
|
|
12
|
+
import { Alert, Confirm } from '../../../Shared'
|
|
13
|
+
|
|
14
|
+
import {
|
|
15
|
+
InsertImageContainer,
|
|
16
|
+
ImageListContainer,
|
|
17
|
+
WrapperImage,
|
|
18
|
+
WrapperInput,
|
|
19
|
+
NewImage,
|
|
20
|
+
Image,
|
|
21
|
+
SkeletonWrapper,
|
|
22
|
+
UploadImageIconContainer,
|
|
23
|
+
UploadImageIcon,
|
|
24
|
+
CloseButton
|
|
25
|
+
} from './styles'
|
|
26
|
+
|
|
27
|
+
export const InsertImage = (props) => {
|
|
28
|
+
const {
|
|
29
|
+
imageListState,
|
|
30
|
+
editorContext,
|
|
31
|
+
onClose,
|
|
32
|
+
handleRestoreEditor,
|
|
33
|
+
insertImageState,
|
|
34
|
+
handleInsertImage,
|
|
35
|
+
handleDeleteImage,
|
|
36
|
+
selectedImageUrl,
|
|
37
|
+
setSelectedImageUrl
|
|
38
|
+
} = props
|
|
39
|
+
const [, t] = useLanguage()
|
|
40
|
+
const [imageUrl, setImageUrl] = useState(null)
|
|
41
|
+
const imageInputRef = useRef(null)
|
|
42
|
+
const [alertState, setAlertState] = useState({ open: false, content: [] })
|
|
43
|
+
const [confirm, setConfirm] = useState({ open: false, content: null, handleOnAccept: null })
|
|
44
|
+
|
|
45
|
+
const handleInsertClick = () => {
|
|
46
|
+
handleRestoreEditor()
|
|
47
|
+
editorContext.invoke('editor.insertImage', imageUrl)
|
|
48
|
+
onClose()
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const handleClickImage = (type) => {
|
|
52
|
+
imageInputRef.current.click()
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const handleFiles = (files) => {
|
|
56
|
+
if (files.length === 1) {
|
|
57
|
+
const type = files[0].type.split('/')[0]
|
|
58
|
+
if (type !== 'image') {
|
|
59
|
+
setAlertState({
|
|
60
|
+
open: true,
|
|
61
|
+
content: [t('ERROR_ONLY_IMAGES', 'Only images can be accepted')]
|
|
62
|
+
})
|
|
63
|
+
return
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if (bytesConverter(files[0]?.size) > 2048) {
|
|
67
|
+
setAlertState({
|
|
68
|
+
open: true,
|
|
69
|
+
content: [t('IMAGE_MAXIMUM_SIZE', 'The maximum image size is 2 megabytes')]
|
|
70
|
+
})
|
|
71
|
+
return
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
setConfirm({
|
|
75
|
+
open: true,
|
|
76
|
+
content: t('QUESTION_ADD_GALLERY_IMAGE', 'Are you sure that you want to add this gallery image?'),
|
|
77
|
+
handleOnAccept: () => {
|
|
78
|
+
setConfirm({ ...confirm, open: false })
|
|
79
|
+
handleInsertImage(files[0])
|
|
80
|
+
}
|
|
81
|
+
})
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const onDeleteClick = (imageId) => {
|
|
86
|
+
setConfirm({
|
|
87
|
+
open: true,
|
|
88
|
+
content: t('QUESTION_DELETE_GALLERY_ITEM', 'Are you sure that you want to delete this image?'),
|
|
89
|
+
handleOnAccept: () => {
|
|
90
|
+
setConfirm({ ...confirm, open: false })
|
|
91
|
+
handleDeleteImage(imageId)
|
|
92
|
+
}
|
|
93
|
+
})
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
useEffect(() => {
|
|
97
|
+
setImageUrl(selectedImageUrl)
|
|
98
|
+
}, [selectedImageUrl])
|
|
99
|
+
|
|
100
|
+
return (
|
|
101
|
+
<InsertImageContainer>
|
|
102
|
+
<h1>{t('INSERT_IMAGE', 'Insert image')}</h1>
|
|
103
|
+
<WrapperInput>
|
|
104
|
+
<label>{t('IMAGE_URL', 'Image URL')}</label>
|
|
105
|
+
<Input
|
|
106
|
+
value={imageUrl || ''}
|
|
107
|
+
onChange={e => setImageUrl(e.target.value)}
|
|
108
|
+
/>
|
|
109
|
+
</WrapperInput>
|
|
110
|
+
<Button
|
|
111
|
+
borderRadius='8px'
|
|
112
|
+
color='primary'
|
|
113
|
+
onClick={() => handleInsertClick()}
|
|
114
|
+
>
|
|
115
|
+
{t('INSERT', 'Insert')}
|
|
116
|
+
</Button>
|
|
117
|
+
<NewImage>
|
|
118
|
+
<Image onClick={() => handleClickImage()} isImage={insertImageState?.change?.soucre}>
|
|
119
|
+
<ExamineClick onFiles={handleFiles} childRef={(e) => { imageInputRef.current = e }} accept='image/png, image/jpeg, image/jpg' disabled={insertImageState.loading}>
|
|
120
|
+
<DragAndDrop onDrop={dataTransfer => handleFiles(dataTransfer.files)} accept='image/png, image/jpeg, image/jpg' disabled={insertImageState.loading}>
|
|
121
|
+
{
|
|
122
|
+
insertImageState.loading
|
|
123
|
+
? (<SkeletonWrapper><Skeleton /></SkeletonWrapper>)
|
|
124
|
+
: insertImageState?.change?.soucre && <img src={insertImageState?.change?.soucre} alt='image' loading='lazy' />
|
|
125
|
+
}
|
|
126
|
+
<UploadImageIconContainer>
|
|
127
|
+
<UploadImageIcon>
|
|
128
|
+
<BiImage />
|
|
129
|
+
<span>{t('DRAG_DROP_IMAGE_HERE', 'Put your image here')}</span>
|
|
130
|
+
</UploadImageIcon>
|
|
131
|
+
</UploadImageIconContainer>
|
|
132
|
+
</DragAndDrop>
|
|
133
|
+
</ExamineClick>
|
|
134
|
+
</Image>
|
|
135
|
+
</NewImage>
|
|
136
|
+
<ImageListContainer>
|
|
137
|
+
{imageListState.images.map(image => (
|
|
138
|
+
<WrapperImage
|
|
139
|
+
key={image.id}
|
|
140
|
+
onClick={() => setSelectedImageUrl(image?.source)}
|
|
141
|
+
>
|
|
142
|
+
<CloseButton
|
|
143
|
+
onClick={() => onDeleteClick(image.id)}
|
|
144
|
+
>
|
|
145
|
+
<XLg />
|
|
146
|
+
</CloseButton>
|
|
147
|
+
<img src={image?.source} alt='' />
|
|
148
|
+
</WrapperImage>
|
|
149
|
+
))}
|
|
150
|
+
</ImageListContainer>
|
|
151
|
+
<Alert
|
|
152
|
+
title={t('WEB_APPNAME', 'ORDERING')}
|
|
153
|
+
content={alertState.content}
|
|
154
|
+
acceptText={t('ACCEPT', 'Accept')}
|
|
155
|
+
open={alertState.open}
|
|
156
|
+
onClose={() => setAlertState({ open: false, content: [] })}
|
|
157
|
+
onAccept={() => setAlertState({ open: false, content: [] })}
|
|
158
|
+
closeOnBackdrop={false}
|
|
159
|
+
/>
|
|
160
|
+
<Confirm
|
|
161
|
+
title={t('WEB_APPNAME', 'Ordering')}
|
|
162
|
+
content={confirm.content}
|
|
163
|
+
acceptText={t('ACCEPT', 'Accept')}
|
|
164
|
+
open={confirm.open}
|
|
165
|
+
onClose={() => setConfirm({ ...confirm, open: false })}
|
|
166
|
+
onCancel={() => setConfirm({ ...confirm, open: false })}
|
|
167
|
+
onAccept={confirm.handleOnAccept}
|
|
168
|
+
closeOnBackdrop={false}
|
|
169
|
+
/>
|
|
170
|
+
</InsertImageContainer>
|
|
171
|
+
)
|
|
172
|
+
}
|