diff --git a/packages/webapp/src/components/App.tsx b/packages/webapp/src/components/App.tsx index d8f3d21a1..2aa9e0f3b 100644 --- a/packages/webapp/src/components/App.tsx +++ b/packages/webapp/src/components/App.tsx @@ -32,7 +32,9 @@ const RegisterVerify = lazy( const OneClickDemoPage = lazy( () => import('@/containers/OneClickDemo/OneClickDemoPage'), ); - +const PaymentPortalPage = lazy( + () => import('@/containers/PaymentPortal/PaymentPortalPage'), +); /** * App inner. */ @@ -57,6 +59,7 @@ function AppInsider({ history }) { children={} /> } /> + } /> } /> diff --git a/packages/webapp/src/containers/PaymentPortal/PaymentPortal.module.scss b/packages/webapp/src/containers/PaymentPortal/PaymentPortal.module.scss new file mode 100644 index 000000000..6baf62ae9 --- /dev/null +++ b/packages/webapp/src/containers/PaymentPortal/PaymentPortal.module.scss @@ -0,0 +1,88 @@ + +.companyLogoWrap { + height: 50px; + width :50px; + border-radius: 50px; + background-color: #fff; + background: #dfdfdf; +} + +.root { + border-radius: 8px; + box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1); + width: 600px; + margin: 40px auto; + color: #000; + background-color: #fff; +} + +.bigTitle{ + margin: 0; + font-weight: 500; + color: #111; + font-size: 26px; +} + +.invoiceDueDate{ + font-size: 16px; +} + +.invoiceNumber { + font-size: 18px; + color: #333; +} + +.body { + padding: 30px; +} + +.footer{ + padding: 20px 30px; + background-color: #FAFAFA; + border-top: 1px solid #DCE0E5; + border-radius: 0 0 8px 8px; + color: #333; + font-size: 12px; +} + +.customerName{ + font-size: 16px; + font-weight: 600; +} +.totals { + +} + +.totalItem { + padding: 6px 0; + + &.borderBottomGray { + border-bottom: 1px solid #DADADA; + } + &.borderBottomDark{ + border-bottom: 1px solid #000; + } +} + +.footerButton{ + height: 40px; + line-height: 40px; + font-size: 16px; +} +.downloadInvoiceButton:global(.bp4-button.bp4-minimal){ + box-shadow: 0 0 0 1px #DCE0E5; +} +.viewInvoiceButton:global(.bp4-button:not([class*=bp4-intent-]):not(.bp4-minimal)){ + background-color: #EDEFF2; +} +.buyButton{ + +} + +.footerText{ + color: #666; +} + +.buyNote{ + font-size: 12px; +} \ No newline at end of file diff --git a/packages/webapp/src/containers/PaymentPortal/PaymentPortal.tsx b/packages/webapp/src/containers/PaymentPortal/PaymentPortal.tsx new file mode 100644 index 000000000..875909bc6 --- /dev/null +++ b/packages/webapp/src/containers/PaymentPortal/PaymentPortal.tsx @@ -0,0 +1,112 @@ +import { Text, Classes, Button, Intent } from '@blueprintjs/core'; +import clsx from 'classnames'; +import { Box, Group, Stack } from '@/components'; +import styles from './PaymentPortal.module.scss'; + +export function PaymentPortal() { + return ( + + + + + Bigcapital Technology, Inc. + + + +

+ Bigcapital Technology, Inc. Sent an Invoice for $1000.00 +

+ + Invoice due September 13, 2024 + +
+ + + Ahmed Bouhuolia + Bigcapital Technology, Inc. + 131 Continental Dr Suite 305 Newark, + Delaware 19713 + United States + ahmed@bigcapital.app + + +

Invoice INV-000001

+ + + + Sub Total + 11.00 + + + + Total + 11.00 + + + + Paid Amount (-) + 11.00 + + + + Due Amount + 11.00 + + + + + + + + + + + By confirming your payment, you allow Bigcapital Technology, Inc. to + charge you for this payment and save your payment information in + accordance with their terms. + +
+ + + + + Bigcapital Technology, Inc. + + 131 Continental Dr Suite 305 Newark, + Delaware 19713 + United States + ahmed@bigcapital.app + + + + © 2024 Bigcapital Technology, Inc. +
+ All rights reserved. +
+
+
+ ); +} diff --git a/packages/webapp/src/containers/PaymentPortal/PaymentPortalBoot.tsx b/packages/webapp/src/containers/PaymentPortal/PaymentPortalBoot.tsx new file mode 100644 index 000000000..c9e3d1bb6 --- /dev/null +++ b/packages/webapp/src/containers/PaymentPortal/PaymentPortalBoot.tsx @@ -0,0 +1,34 @@ +import React, { createContext, useContext, ReactNode } from 'react'; + +interface PaymentPortalContextType { + // Define the context type here + paymentAmount: number; + setPaymentAmount: (amount: number) => void; +} + +const PaymentPortalContext = createContext( + {} as PaymentPortalContextType, +); + +export const PaymentPortalBoot: React.FC<{ children: ReactNode }> = ({ + children, +}) => { + const [paymentAmount, setPaymentAmount] = React.useState(0); + + return ( + + {children} + + ); +}; + +export const usePaymentPortalBoot = (): PaymentPortalContextType => { + const context = useContext(PaymentPortalContext); + + if (!context) { + throw new Error( + 'usePaymentPortal must be used within a PaymentPortalProvider', + ); + } + return context; +}; diff --git a/packages/webapp/src/containers/PaymentPortal/PaymentPortalPage.tsx b/packages/webapp/src/containers/PaymentPortal/PaymentPortalPage.tsx new file mode 100644 index 000000000..cdadb8df3 --- /dev/null +++ b/packages/webapp/src/containers/PaymentPortal/PaymentPortalPage.tsx @@ -0,0 +1,5 @@ +import { PaymentPortal } from './PaymentPortal'; + +export default function PaymentPortalPage() { + return ; +}