-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pay with Business accounts #797
Conversation
OmerGery
commented
Dec 31, 2023
•
edited
Loading
edited
…ethods in default payment select
import styled from 'styled-components'; | ||
import moment from 'moment'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unuseds
line-height: 24px; | ||
padding-left: 4px; | ||
`; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move to styles file
`; | ||
const BoldTitle = styled(BaseText)` | ||
font-weight: 700; | ||
`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move to styles file
export const BaseText = styled(Text)` | ||
color: #212229; | ||
font-family: Inter; | ||
font-size: 14px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use theme context
@@ -49,7 +51,7 @@ const margin = `margin-${Start()}`; | |||
const TextContainer = styled(View)` | |||
justify-content: center; | |||
${margin}: 16px; | |||
width: 80%; | |||
width: ${({ noSvg } : { noSvg: boolean}) => (noSvg ? '95%' : '80%')}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use flex
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
undid the changes, it actually doesnt affect anything
@@ -205,6 +232,17 @@ const CardRow = (paymentMethod: any) => { | |||
{paymentMethod.disabledReason} | |||
</Description> | |||
)} | |||
{(paymentMethod.mark && paymentMethod.alignMarkToRight) ? ( | |||
<SvgIcon | |||
style={{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why it needs custom style? you may use flex to place it right
color: #666975; | ||
text-align: center; | ||
font-family: Inter; | ||
font-size: 14px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use theme context
color: #212229; | ||
text-align: center; | ||
font-family: Inter; | ||
font-size: 14px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use theme context
const saveLastRide = async (rideId: string) => { | ||
await StorageService.save({ lastRideId: rideId }); | ||
}; | ||
const saveOrderedRidePaymentMethod = async (rideBusinessAccountId: string | null) => Promise.all([ | ||
StorageService.save({ lastBusinessAccountId: rideBusinessAccountId || PAYMENT_MODES.PERSONAL }), | ||
StorageService.save({ orderedRide: true }), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merge the payment method logic
|
||
const paymentMethodNotAllowedOnService = chosenService && ride?.paymentMethodId | ||
&& !chosenService.allowedPaymentMethods.includes(getPaymentMethod(ride.paymentMethodId)); | ||
const paymentMethodNotAllowedOnService = !businessAccountId |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe split it to 2 variables? will be easier to read
flex: 10; | ||
color: #212229; | ||
font-family: Inter; | ||
font-size: 16px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use theme context