ordering-ui-react-native 0.14.82 → 0.14.83
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 +1 -1
- package/src/components/BusinessesListing/index.tsx +1 -1
- package/src/components/Checkout/index.tsx +1 -1
- package/themes/original/src/components/BusinessesListing/index.tsx +2 -7
- package/themes/original/src/components/Checkout/index.tsx +1 -3
- package/themes/original/src/components/WalletTransactionItem/index.tsx +3 -2
- package/themes/original/src/components/Wallets/index.tsx +16 -8
package/package.json
CHANGED
|
@@ -167,7 +167,7 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
|
|
|
167
167
|
>
|
|
168
168
|
<OText size={14} numberOfLines={1} ellipsizeMode='tail'>
|
|
169
169
|
{orderState.options?.moment
|
|
170
|
-
? parseDate(orderState
|
|
170
|
+
? parseDate(orderState?.options?.moment, { outputFormat: configs?.dates_moment_format?.value })
|
|
171
171
|
: t('ASAP_ABBREVIATION', 'ASAP')}
|
|
172
172
|
</OText>
|
|
173
173
|
</WrapMomentOption>
|
|
@@ -326,7 +326,7 @@ const CheckoutUI = (props: any) => {
|
|
|
326
326
|
<OText size={18} numberOfLines={1} ellipsizeMode='tail'>
|
|
327
327
|
{options?.moment
|
|
328
328
|
? parseDate(options?.moment, {
|
|
329
|
-
outputFormat: configs?.
|
|
329
|
+
outputFormat: configs?.dates_moment_format?.value
|
|
330
330
|
})
|
|
331
331
|
: t('ASAP_ABBREVIATION', 'ASAP')}
|
|
332
332
|
</OText>
|
|
@@ -287,13 +287,8 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
|
|
|
287
287
|
numberOfLines={1}
|
|
288
288
|
ellipsizeMode="tail"
|
|
289
289
|
color={theme.colors.textSecondary}>
|
|
290
|
-
{orderState.options?.
|
|
291
|
-
? parseDate(orderState.options?.moment, {
|
|
292
|
-
outputFormat:
|
|
293
|
-
configs?.format_time?.value === '12'
|
|
294
|
-
? 'MM/DD hh:mma'
|
|
295
|
-
: 'MM/DD HH:mm',
|
|
296
|
-
})
|
|
290
|
+
{orderState.options?.momentß
|
|
291
|
+
? parseDate(orderState.options?.moment, { outputFormat: configs?.dates_moment_format?.value })
|
|
297
292
|
: t('ASAP_ABBREVIATION', 'ASAP')}
|
|
298
293
|
</OText>
|
|
299
294
|
<OIcon
|
|
@@ -265,9 +265,7 @@ const CheckoutUI = (props: any) => {
|
|
|
265
265
|
>
|
|
266
266
|
<OText size={12} numberOfLines={1} ellipsizeMode='tail' color={theme.colors.textSecondary}>
|
|
267
267
|
{options?.moment
|
|
268
|
-
? parseDate(options?.moment, {
|
|
269
|
-
outputFormat: configs?.format_time?.value === '12' ? 'MM/DD hh:mma' : 'MM/DD HH:mm'
|
|
270
|
-
})
|
|
268
|
+
? parseDate(options?.moment, { outputFormat: configs?.dates_moment_format?.value })
|
|
271
269
|
: t('ASAP_ABBREVIATION', 'ASAP')}
|
|
272
270
|
</OText>
|
|
273
271
|
<OIcon
|
|
@@ -15,7 +15,8 @@ export const WalletTransactionItem = (props: any) => {
|
|
|
15
15
|
const {
|
|
16
16
|
item,
|
|
17
17
|
idx,
|
|
18
|
-
type
|
|
18
|
+
type,
|
|
19
|
+
withFormatPrice
|
|
19
20
|
} = props
|
|
20
21
|
|
|
21
22
|
const theme = useTheme()
|
|
@@ -38,7 +39,7 @@ export const WalletTransactionItem = (props: any) => {
|
|
|
38
39
|
fontWeight: 'bold'
|
|
39
40
|
}}
|
|
40
41
|
>
|
|
41
|
-
{item?.amount > 0 && '+ '}{parsePrice(item?.amount)}
|
|
42
|
+
{item?.amount > 0 && '+ '}{withFormatPrice ? parsePrice(item?.amount) : item?.amount}
|
|
42
43
|
</OText>
|
|
43
44
|
</DateBlock>
|
|
44
45
|
<MessageBlock>
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
} from './styles'
|
|
20
20
|
|
|
21
21
|
import NavBar from '../NavBar'
|
|
22
|
-
import {
|
|
22
|
+
import { OText } from '../shared';
|
|
23
23
|
import { NotFoundSource } from '../NotFoundSource';
|
|
24
24
|
import { WalletTransactionItem } from '../WalletTransactionItem'
|
|
25
25
|
|
|
@@ -28,15 +28,15 @@ const WalletsUI = (props: any) => {
|
|
|
28
28
|
navigation,
|
|
29
29
|
walletList,
|
|
30
30
|
transactionsList,
|
|
31
|
-
setWalletSelected
|
|
31
|
+
setWalletSelected,
|
|
32
|
+
isWalletCashEnabled,
|
|
33
|
+
isWalletPointsEnabled
|
|
32
34
|
} = props
|
|
33
35
|
|
|
34
36
|
const [, t] = useLanguage()
|
|
35
37
|
const theme = useTheme()
|
|
36
|
-
const [{ parsePrice
|
|
38
|
+
const [{ parsePrice }] = useUtils()
|
|
37
39
|
const [{ configs }] = useConfig()
|
|
38
|
-
const isWalletCashEnabled = configs?.wallet_cash_enabled?.value === '1'
|
|
39
|
-
const isWalletPointsEnabled = configs?.wallet_credit_point_enabled?.value === '1'
|
|
40
40
|
|
|
41
41
|
const [tabSelected, setTabSelected] = useState(isWalletCashEnabled ? 'cash' : 'credit_point')
|
|
42
42
|
|
|
@@ -119,7 +119,6 @@ const WalletsUI = (props: any) => {
|
|
|
119
119
|
: t('POINTS', 'Points')}
|
|
120
120
|
</OText>
|
|
121
121
|
</BalanceElement>
|
|
122
|
-
{console.log(transactionsList)}
|
|
123
122
|
|
|
124
123
|
<View style={{ marginTop: 20, width: '100%', paddingHorizontal: 1, paddingBottom: 40 }}>
|
|
125
124
|
{!transactionsList?.loading &&
|
|
@@ -137,6 +136,7 @@ const WalletsUI = (props: any) => {
|
|
|
137
136
|
type={currentWalletSelected?.type}
|
|
138
137
|
key={transaction.id}
|
|
139
138
|
item={transaction}
|
|
139
|
+
withFormatPrice={currentWalletSelected?.type === 'cash'}
|
|
140
140
|
/>
|
|
141
141
|
))}
|
|
142
142
|
</TransactionsWrapper>
|
|
@@ -155,7 +155,8 @@ const WalletsUI = (props: any) => {
|
|
|
155
155
|
</View>
|
|
156
156
|
)}
|
|
157
157
|
|
|
158
|
-
{!
|
|
158
|
+
{!transactionsList?.loading &&
|
|
159
|
+
!(transactionsList?.loading && transactionsList.list?.[`wallet:${currentWalletSelected?.id}`]) &&
|
|
159
160
|
(transactionsList?.error ||
|
|
160
161
|
!transactionsList.list?.[`wallet:${currentWalletSelected?.id}`]?.length) &&
|
|
161
162
|
(
|
|
@@ -208,9 +209,16 @@ const WalletsUI = (props: any) => {
|
|
|
208
209
|
}
|
|
209
210
|
|
|
210
211
|
export const Wallets = (props: any) => {
|
|
212
|
+
const [{ configs }] = useConfig()
|
|
213
|
+
|
|
214
|
+
const isWalletCashEnabled = configs?.wallet_cash_enabled?.value === '1'
|
|
215
|
+
const isWalletPointsEnabled = configs?.wallet_credit_point_enabled?.value === '1'
|
|
216
|
+
|
|
211
217
|
const walletsProps = {
|
|
212
218
|
...props,
|
|
213
|
-
UIComponent: WalletsUI
|
|
219
|
+
UIComponent: WalletsUI,
|
|
220
|
+
isWalletCashEnabled,
|
|
221
|
+
isWalletPointsEnabled
|
|
214
222
|
}
|
|
215
223
|
return (
|
|
216
224
|
<WalletList {...walletsProps} />
|