Skip to content
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

Merged
merged 43 commits into from
Jan 28, 2024
Merged

Pay with Business accounts #797

merged 43 commits into from
Jan 28, 2024

Conversation

OmerGery
Copy link
Contributor

@OmerGery OmerGery commented Dec 31, 2023

image

import styled from 'styled-components';
import moment from 'moment';
Copy link
Contributor Author

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;
`;

Copy link
Contributor

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;
`;
Copy link
Contributor

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;
Copy link
Contributor

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%')};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use flex

Copy link
Contributor Author

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={{
Copy link
Contributor

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;
Copy link
Contributor

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;
Copy link
Contributor

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 }),
Copy link
Contributor

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
Copy link
Contributor

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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use theme context

@OmerGery OmerGery merged commit 204c7b1 into master Jan 28, 2024
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants