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

Bribe Carol with chocolates to fix order details hot mess for me #18

Merged
merged 1 commit into from
Feb 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const OrderDetailsWrapper = ({ children, onPageReturn, page_title }) => {
return isMobile() ? (
<MobileFullPageModal
className='order-details'
body_className='order-details--body'
height_offset='80px'
is_flex
is_modal_open
Expand Down
16 changes: 16 additions & 0 deletions packages/p2p/src/components/order-details/order-details.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ $card-width: 456px;
max-height: $card-height;
}

&--body {
display: flex;
flex-direction: column;
}

&--warning {
margin-bottom: 1.6rem;

Expand Down Expand Up @@ -51,11 +56,22 @@ $card-width: 456px;
&-column {
display: flex;
flex-direction: column;
padding-left: 1.6rem;
}
&-row {
display: flex;
flex-direction: row;
}

.dc-accordion__item {
border: none;
}

.dc-accordion__item-header {
border: none;
display: flex;
justify-content: space-between;
}
}

&__header {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
import React from 'react';
import { Text } from '@deriv/components';
import { Localize } from 'Components/i18next';
import './payment-method-accordion-content.scss';

const PaymentMethodAccordionContent = ({
advertiser_details,
client_details,
is_my_ad,
// payment_method
}) => {
const PaymentMethodAccordionContent = ({ advertiser_details, client_details, is_my_ad, payment_method }) => {
return (
<React.Fragment>
<div>
<div className='payment-method-accordion-content--field'>
<Text color='less-prominent' size='xxs'>
<Localize i18n_default_text='Name' />
</Text>
Expand All @@ -20,14 +16,26 @@ const PaymentMethodAccordionContent = ({
: `${advertiser_details.first_name} ${advertiser_details.last_name}`}
</Text>
</div>
{Object.entries(payment_method?.fields).map((field, key) => {
return (
<div key={key} className='payment-method-accordion-content--field'>
<Text color='less-prominent' size='xxs'>
{field[1].display_name}
</Text>
<Text color='prominent' size='xs'>
{field[1].value}
</Text>
</div>
);
})}
{/* {payment_method?.fields?.map((field, key) => {
return (
<div key={key}>
<Text color='less-prominent' size='xxs'>
{field?.display_name}
</Text>
<Text color='prominent' size='xs'>
{field?.value}
{field?.value}
</Text>
</div>
);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.payment-method-accordion-content {
&--field {
display: flex;
flex-direction: column;
padding-bottom: 1.6rem;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ const PaymentMethodAccordionHeader = ({ payment_method }) => {
<Text color='prominent' size='xs'>
{payment_method.display_name}
</Text>
<Text color='less-prominent' size='xs'>
{/* {payment_method.fields.bank_name.value} */}
</Text>
</div>
</div>
);
Expand Down