mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-20 14:50:32 +00:00
feat: style tweaks in the public payment page
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
|
import { Knex } from 'knex';
|
||||||
import { Service, Inject } from 'typedi';
|
import { Service, Inject } from 'typedi';
|
||||||
import JournalPoster from '@/services/Accounting/JournalPoster';
|
import JournalPoster from '@/services/Accounting/JournalPoster';
|
||||||
import TenancyService from '@/services/Tenancy/TenancyService';
|
import TenancyService from '@/services/Tenancy/TenancyService';
|
||||||
import JournalCommands from '@/services/Accounting/JournalCommands';
|
import JournalCommands from '@/services/Accounting/JournalCommands';
|
||||||
import Knex from 'knex';
|
|
||||||
|
|
||||||
@Service()
|
@Service()
|
||||||
export default class JournalPosterService {
|
export default class JournalPosterService {
|
||||||
|
|||||||
@@ -3,23 +3,31 @@
|
|||||||
height: 50px;
|
height: 50px;
|
||||||
width :50px;
|
width :50px;
|
||||||
border-radius: 50px;
|
border-radius: 50px;
|
||||||
background-color: #fff;
|
background-color: #dfdfdf;
|
||||||
background: #dfdfdf;
|
background-image: url('https://pbs.twimg.com/profile_images/1381635804397703182/x5chIdsO_400x400.png');
|
||||||
|
background-position: center center;
|
||||||
|
background-size: cover;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
border: 1px solid #e8e8e8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rootBodyPage {
|
||||||
|
background: #181a30;
|
||||||
}
|
}
|
||||||
|
|
||||||
.root {
|
.root {
|
||||||
border-radius: 8px;
|
border-radius: 10px;
|
||||||
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
|
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
|
||||||
width: 600px;
|
width: 600px;
|
||||||
margin: 40px auto;
|
margin: 40px auto;
|
||||||
color: #000;
|
color: #222;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bigTitle{
|
.bigTitle{
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #111;
|
color: #222;
|
||||||
font-size: 26px;
|
font-size: 26px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -28,16 +36,17 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.invoiceNumber {
|
.invoiceNumber {
|
||||||
font-size: 18px;
|
font-size: 16px;
|
||||||
color: #333;
|
color: #333;
|
||||||
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
.body {
|
.body {
|
||||||
padding: 30px;
|
padding: 30px 26px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.footer{
|
.footer{
|
||||||
padding: 20px 30px;
|
padding: 20px 26px;
|
||||||
background-color: #FAFAFA;
|
background-color: #FAFAFA;
|
||||||
border-top: 1px solid #DCE0E5;
|
border-top: 1px solid #DCE0E5;
|
||||||
border-radius: 0 0 8px 8px;
|
border-radius: 0 0 8px 8px;
|
||||||
@@ -50,7 +59,7 @@
|
|||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
.totals {
|
.totals {
|
||||||
|
color: #000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.totalItem {
|
.totalItem {
|
||||||
@@ -64,6 +73,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.footerButtons{
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
.footerButton{
|
.footerButton{
|
||||||
height: 40px;
|
height: 40px;
|
||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
@@ -84,5 +97,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.buyNote{
|
.buyNote{
|
||||||
|
margin-top: 16px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
@@ -9,71 +9,75 @@ export function PaymentPortal() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Box className={styles.root}>
|
<Box className={styles.root}>
|
||||||
<Stack className={styles.body}>
|
<Stack spacing={0} className={styles.body}>
|
||||||
<Group spacing={8}>
|
<Stack>
|
||||||
<Box className={styles.companyLogoWrap}></Box>
|
<Group spacing={10}>
|
||||||
<Text>{sharableLinkMeta?.companyName}</Text>
|
<Box className={styles.companyLogoWrap}></Box>
|
||||||
</Group>
|
<Text>{sharableLinkMeta?.companyName}</Text>
|
||||||
|
|
||||||
<Stack spacing={6}>
|
|
||||||
<h1 className={styles.bigTitle}>
|
|
||||||
{sharableLinkMeta?.companyName} Sent an Invoice for{' '}
|
|
||||||
{sharableLinkMeta?.totalFormatted}
|
|
||||||
</h1>
|
|
||||||
<Text className={clsx(Classes.TEXT_MUTED, styles.invoiceDueDate)}>
|
|
||||||
Invoice due {sharableLinkMeta?.dueDateFormatted}
|
|
||||||
</Text>
|
|
||||||
</Stack>
|
|
||||||
|
|
||||||
<Stack spacing={2}>
|
|
||||||
<Box className={styles.customerName}>{sharableLinkMeta?.customerName}</Box>
|
|
||||||
<Box>Bigcapital Technology, Inc.</Box>
|
|
||||||
<Box>131 Continental Dr Suite 305 Newark,</Box>
|
|
||||||
<Box>Delaware 19713</Box>
|
|
||||||
<Box>United States</Box>
|
|
||||||
<Box>ahmed@bigcapital.app</Box>
|
|
||||||
</Stack>
|
|
||||||
|
|
||||||
<h2 className={styles.invoiceNumber}>
|
|
||||||
Invoice {sharableLinkMeta?.invoiceNo}
|
|
||||||
</h2>
|
|
||||||
|
|
||||||
<Stack spacing={0} className={styles.totals}>
|
|
||||||
<Group
|
|
||||||
position={'apart'}
|
|
||||||
className={clsx(styles.totalItem, styles.borderBottomGray)}
|
|
||||||
>
|
|
||||||
<Text>Sub Total</Text>
|
|
||||||
<Text>{sharableLinkMeta?.subtotalFormatted}</Text>
|
|
||||||
</Group>
|
</Group>
|
||||||
|
|
||||||
<Group position={'apart'} className={styles.totalItem}>
|
<Stack spacing={6}>
|
||||||
<Text>Total</Text>
|
<h1 className={styles.bigTitle}>
|
||||||
<Text style={{ fontWeight: 600 }}>
|
{sharableLinkMeta?.companyName} Sent an Invoice for{' '}
|
||||||
{sharableLinkMeta?.totalFormatted}
|
{sharableLinkMeta?.totalFormatted}
|
||||||
|
</h1>
|
||||||
|
<Text className={clsx(Classes.TEXT_MUTED, styles.invoiceDueDate)}>
|
||||||
|
Invoice due {sharableLinkMeta?.dueDateFormatted}
|
||||||
</Text>
|
</Text>
|
||||||
</Group>
|
</Stack>
|
||||||
|
|
||||||
<Group
|
<Stack spacing={2}>
|
||||||
position={'apart'}
|
<Box className={styles.customerName}>
|
||||||
className={clsx(styles.totalItem, styles.borderBottomDark)}
|
{sharableLinkMeta?.customerName}
|
||||||
>
|
</Box>
|
||||||
<Text>Paid Amount (-)</Text>
|
<Box>Bigcapital Technology, Inc.</Box>
|
||||||
<Text>{sharableLinkMeta?.paymentAmountFormatted}</Text>
|
<Box>131 Continental Dr Suite 305 Newark,</Box>
|
||||||
</Group>
|
<Box>Delaware 19713</Box>
|
||||||
|
<Box>United States</Box>
|
||||||
|
<Box>ahmed@bigcapital.app</Box>
|
||||||
|
</Stack>
|
||||||
|
|
||||||
<Group
|
<h2 className={styles.invoiceNumber}>
|
||||||
position={'apart'}
|
Invoice {sharableLinkMeta?.invoiceNo}
|
||||||
className={clsx(styles.totalItem, styles.borderBottomDark)}
|
</h2>
|
||||||
>
|
|
||||||
<Text>Due Amount</Text>
|
<Stack spacing={0} className={styles.totals}>
|
||||||
<Text style={{ fontWeight: 600 }}>
|
<Group
|
||||||
{sharableLinkMeta?.dueAmountFormatted}
|
position={'apart'}
|
||||||
</Text>
|
className={clsx(styles.totalItem, styles.borderBottomGray)}
|
||||||
</Group>
|
>
|
||||||
|
<Text>Sub Total</Text>
|
||||||
|
<Text>{sharableLinkMeta?.subtotalFormatted}</Text>
|
||||||
|
</Group>
|
||||||
|
|
||||||
|
<Group position={'apart'} className={styles.totalItem}>
|
||||||
|
<Text>Total</Text>
|
||||||
|
<Text style={{ fontWeight: 600 }}>
|
||||||
|
{sharableLinkMeta?.totalFormatted}
|
||||||
|
</Text>
|
||||||
|
</Group>
|
||||||
|
|
||||||
|
<Group
|
||||||
|
position={'apart'}
|
||||||
|
className={clsx(styles.totalItem, styles.borderBottomGray)}
|
||||||
|
>
|
||||||
|
<Text>Paid Amount (-)</Text>
|
||||||
|
<Text>{sharableLinkMeta?.paymentAmountFormatted}</Text>
|
||||||
|
</Group>
|
||||||
|
|
||||||
|
<Group
|
||||||
|
position={'apart'}
|
||||||
|
className={clsx(styles.totalItem, styles.borderBottomDark)}
|
||||||
|
>
|
||||||
|
<Text>Due Amount</Text>
|
||||||
|
<Text style={{ fontWeight: 600 }}>
|
||||||
|
{sharableLinkMeta?.dueAmountFormatted}
|
||||||
|
</Text>
|
||||||
|
</Group>
|
||||||
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|
||||||
<Stack spacing={8}>
|
<Stack spacing={8} className={styles.footerButtons}>
|
||||||
<Button
|
<Button
|
||||||
minimal
|
minimal
|
||||||
className={clsx(styles.footerButton, styles.downloadInvoiceButton)}
|
className={clsx(styles.footerButton, styles.downloadInvoiceButton)}
|
||||||
@@ -100,7 +104,7 @@ export function PaymentPortal() {
|
|||||||
</Text>
|
</Text>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|
||||||
<Stack className={styles.footer}>
|
<Stack spacing={18} className={styles.footer}>
|
||||||
<Stack spacing={0}>
|
<Stack spacing={0}>
|
||||||
<Box>
|
<Box>
|
||||||
<strong>Bigcapital Technology, Inc.</strong>
|
<strong>Bigcapital Technology, Inc.</strong>
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import {
|
|||||||
GetSharableLinkMetaResponse,
|
GetSharableLinkMetaResponse,
|
||||||
useGetSharableLinkMeta,
|
useGetSharableLinkMeta,
|
||||||
} from '@/hooks/query/payment-link';
|
} from '@/hooks/query/payment-link';
|
||||||
|
import { Spinner } from '@blueprintjs/core';
|
||||||
|
|
||||||
interface PaymentPortalContextType {
|
interface PaymentPortalContextType {
|
||||||
sharableLinkMeta: GetSharableLinkMetaResponse | undefined;
|
sharableLinkMeta: GetSharableLinkMetaResponse | undefined;
|
||||||
@@ -29,6 +30,9 @@ export const PaymentPortalBoot: React.FC<PaymentPortalBootProps> = ({
|
|||||||
sharableLinkMeta,
|
sharableLinkMeta,
|
||||||
isSharableLinkMetaLoading,
|
isSharableLinkMetaLoading,
|
||||||
};
|
};
|
||||||
|
if (isSharableLinkMetaLoading) {
|
||||||
|
return <Spinner size={20} />;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<PaymentPortalContext.Provider value={value}>
|
<PaymentPortalContext.Provider value={value}>
|
||||||
|
|||||||
@@ -1,13 +1,17 @@
|
|||||||
import { useParams } from 'react-router-dom';
|
import { useParams } from 'react-router-dom';
|
||||||
import { PaymentPortal } from './PaymentPortal';
|
import { PaymentPortal } from './PaymentPortal';
|
||||||
import { PaymentPortalBoot } from './PaymentPortalBoot';
|
import { PaymentPortalBoot } from './PaymentPortalBoot';
|
||||||
|
import BodyClassName from 'react-body-classname';
|
||||||
|
import styles from './PaymentPortal.module.scss';
|
||||||
|
|
||||||
export default function PaymentPortalPage() {
|
export default function PaymentPortalPage() {
|
||||||
const { linkId } = useParams<{ linkId: string}>();
|
const { linkId } = useParams<{ linkId: string }>();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<PaymentPortalBoot linkId={linkId}>
|
<BodyClassName className={styles.rootBodyPage}>
|
||||||
<PaymentPortal />
|
<PaymentPortalBoot linkId={linkId}>
|
||||||
</PaymentPortalBoot>
|
<PaymentPortal />
|
||||||
|
</PaymentPortalBoot>
|
||||||
|
</BodyClassName>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user