ordering-ui-react-native 0.15.88 → 0.15.89
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/package.json
CHANGED
|
@@ -135,7 +135,11 @@ const CheckoutUI = (props: any) => {
|
|
|
135
135
|
const [webviewPaymethod, setWebviewPaymethod] = useState<any>(null)
|
|
136
136
|
|
|
137
137
|
const placeSpotTypes = [3, 4]
|
|
138
|
-
|
|
138
|
+
const businessConfigs = businessDetails?.business?.configs ?? []
|
|
139
|
+
const isWalletCashEnabled = businessConfigs.find((config: any) => config.key === 'wallet_cash_enabled')?.value === '1'
|
|
140
|
+
const isWalletCreditPointsEnabled = businessConfigs.find((config: any) => config.key === 'wallet_credit_point_enabled')?.value === '1'
|
|
141
|
+
const isWalletEnabled = configs?.cash_wallet?.value && configs?.wallet_enabled?.value === '1' && (isWalletCashEnabled || isWalletCreditPointsEnabled)
|
|
142
|
+
|
|
139
143
|
const isPreOrder = configs?.preorder_status_enabled?.value === '1'
|
|
140
144
|
const isDisabledButtonPlace = loading || !cart?.valid || (!paymethodSelected && cart?.balance > 0) || placing || errorCash ||
|
|
141
145
|
cart?.subtotal < cart?.minimum || (placeSpotTypes.includes(options?.type) && !cart?.place) ||
|
|
@@ -109,7 +109,7 @@ const ProfileListUI = (props: ProfileParams) => {
|
|
|
109
109
|
|
|
110
110
|
const [confirm, setConfirm] = useState<any>({ open: false, content: null, handleOnAccept: null, id: null, title: null })
|
|
111
111
|
|
|
112
|
-
|
|
112
|
+
const isWalletEnabled = configs?.cash_wallet?.value && configs?.wallet_enabled?.value === '1' && (configs?.wallet_cash_enabled?.value === '1' || configs?.wallet_credit_point_enabled?.value === '1')
|
|
113
113
|
const IsPromotionsEnabled = configs?.advanced_offers_module?.value === '1' || configs?.advanced_offers_module?.value === true
|
|
114
114
|
const onRedirect = (route: string, params?: any) => {
|
|
115
115
|
navigation.navigate(route, params)
|
|
@@ -61,7 +61,7 @@ const WalletsUI = (props: any) => {
|
|
|
61
61
|
|
|
62
62
|
const [tabSelected, setTabSelected] = useState(isWalletCashEnabled ? 'cash' : 'credit_point')
|
|
63
63
|
|
|
64
|
-
const isWalletEnabled = configs?.wallet_enabled?.value === '1' && (isWalletCashEnabled || isWalletPointsEnabled)
|
|
64
|
+
const isWalletEnabled = configs?.cash_wallet?.value && configs?.wallet_enabled?.value === '1' && (isWalletCashEnabled || isWalletPointsEnabled)
|
|
65
65
|
|
|
66
66
|
const currentWalletSelected = (walletList.wallets?.length > 0 && walletList.wallets?.find((w: any) => w.type === tabSelected)) ?? null
|
|
67
67
|
|