mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-21 15:20:34 +00:00
fix: mathcing bank transaction styling
This commit is contained in:
@@ -1,14 +1,22 @@
|
|||||||
|
:root {
|
||||||
|
--aside-topbar-offset: 60px;
|
||||||
|
}
|
||||||
|
|
||||||
.main{
|
.main{
|
||||||
flex: 1 0;
|
flex: 1 0;
|
||||||
|
height: inherit;
|
||||||
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.aside{
|
.aside{
|
||||||
width: 500px;
|
width: 500px;
|
||||||
height: 100dvh;
|
height: 100dvh;
|
||||||
border-left: 1px solid rgba(17, 20, 24, 0.15);
|
border-left: 1px solid rgba(17, 20, 24, 0.15);
|
||||||
|
height: inherit;
|
||||||
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.root {
|
.root {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
height: calc(100dvh - var(--aside-topbar-offset));
|
||||||
}
|
}
|
||||||
@@ -7,4 +7,5 @@
|
|||||||
min-height: 40px;
|
min-height: 40px;
|
||||||
padding: 5px 5px 5px 15px;
|
padding: 5px 5px 5px 15px;
|
||||||
z-index: 0;
|
z-index: 0;
|
||||||
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,21 @@
|
|||||||
|
|
||||||
|
.root {
|
||||||
|
position: relative;
|
||||||
|
padding-bottom: 110px;
|
||||||
|
}
|
||||||
|
|
||||||
.transaction {
|
.transaction {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.matchBar{
|
.matchBar{
|
||||||
padding: 12px 18px;
|
padding: 12px 14px;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border-bottom: 1px solid #E1E2E9;
|
border-bottom: 1px solid #E1E2E9;
|
||||||
border-top: 1px solid #E1E2E9;
|
|
||||||
|
&:not(:first-of-type) {
|
||||||
|
border-top: 1px solid #E1E2E9;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.matchBarTitle {
|
.matchBarTitle {
|
||||||
@@ -18,14 +25,17 @@
|
|||||||
|
|
||||||
.footer {
|
.footer {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.footerActions {
|
.footerActions {
|
||||||
padding: 14px 16px;
|
padding: 14px 16px;
|
||||||
border-top: 1px solid #E1E2E9;
|
border-top: 1px solid #d8d9d9;
|
||||||
}
|
}
|
||||||
|
|
||||||
.footerTotal {
|
.footerTotal {
|
||||||
padding: 8px 16px;
|
padding: 8px 16px;
|
||||||
border: 1px solid #E1E2E9;
|
border-top: 1px solid #d8d9d9;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,20 +3,33 @@
|
|||||||
background: #fff;
|
background: #fff;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
border: 1px solid #D6DBE3;
|
border: 1px solid #D6DBE3;
|
||||||
padding: 12px 16px;
|
padding: 10px 16px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
&.active{
|
&.active{
|
||||||
border-color: #88ABDB;
|
border-color: #88ABDB;
|
||||||
|
box-shadow: 0 0 0 2px rgba(136, 171, 219, 0.2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&:hover:not(.active){
|
||||||
|
border-color: #c0c0c0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.checkbox:global(.bp4-control.bp4-checkbox){
|
.checkbox:global(.bp4-control.bp4-checkbox){
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
.checkbox:global(.bp4-control.bp4-checkbox) :global .bp4-control-indicator{
|
.checkbox:global(.bp4-control.bp4-checkbox) :global .bp4-control-indicator{
|
||||||
border-color: #CBCBCB;
|
border-color: #CBCBCB;
|
||||||
}
|
}
|
||||||
|
.checkbox:global(.bp4-control.bp4-checkbox) :global .bp4-control-indicator{
|
||||||
|
margin-right: 4px;
|
||||||
|
margin-left: 0;
|
||||||
|
height: 16px;
|
||||||
|
width: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.label {
|
||||||
|
color: #10161A;
|
||||||
|
font-size: 15px;
|
||||||
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
// @ts-nocheck
|
// @ts-nocheck
|
||||||
import { isEmpty } from 'lodash';
|
import { isEmpty } from 'lodash';
|
||||||
|
import * as R from 'ramda';
|
||||||
import { AnchorButton, Button, Intent, Tag, Text } from '@blueprintjs/core';
|
import { AnchorButton, Button, Intent, Tag, Text } from '@blueprintjs/core';
|
||||||
import { AppToaster, Box, Group, Stack } from '@/components';
|
import { AppToaster, Box, Group, Stack } from '@/components';
|
||||||
import {
|
import {
|
||||||
@@ -12,6 +13,10 @@ import { FastField, FastFieldProps, Form, Formik } from 'formik';
|
|||||||
import { useMatchTransaction } from '@/hooks/query/bank-rules';
|
import { useMatchTransaction } from '@/hooks/query/bank-rules';
|
||||||
import { MatchingTransactionFormValues } from './types';
|
import { MatchingTransactionFormValues } from './types';
|
||||||
import { transformToReq } from './utils';
|
import { transformToReq } from './utils';
|
||||||
|
import {
|
||||||
|
WithBankingActionsProps,
|
||||||
|
withBankingActions,
|
||||||
|
} from '../withBankingActions';
|
||||||
|
|
||||||
const initialValues = {
|
const initialValues = {
|
||||||
matched: {},
|
matched: {},
|
||||||
@@ -60,7 +65,7 @@ export function MatchingBankTransaction() {
|
|||||||
|
|
||||||
function MatchingBankTransactionContent() {
|
function MatchingBankTransactionContent() {
|
||||||
return (
|
return (
|
||||||
<Box>
|
<Box className={styles.root}>
|
||||||
<PerfectMatchingTransactions />
|
<PerfectMatchingTransactions />
|
||||||
<GoodMatchingTransactions />
|
<GoodMatchingTransactions />
|
||||||
<MatchTransactionFooter />
|
<MatchTransactionFooter />
|
||||||
@@ -84,13 +89,13 @@ function PerfectMatchingTransactions() {
|
|||||||
<Box className={styles.matchBar}>
|
<Box className={styles.matchBar}>
|
||||||
<Group spacing={6}>
|
<Group spacing={6}>
|
||||||
<h2 className={styles.matchBarTitle}>Perfect Matchines</h2>
|
<h2 className={styles.matchBarTitle}>Perfect Matchines</h2>
|
||||||
<Tag minimal intent={Intent.SUCCESS}>
|
<Tag minimal round intent={Intent.SUCCESS}>
|
||||||
2
|
2
|
||||||
</Tag>
|
</Tag>
|
||||||
</Group>
|
</Group>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
<Stack spacing={9} style={{ padding: 15 }}>
|
<Stack spacing={9} style={{ padding: '12px 15px' }}>
|
||||||
{matchingTransactions.map((match, index) => (
|
{matchingTransactions.map((match, index) => (
|
||||||
<MatchTransactionField
|
<MatchTransactionField
|
||||||
key={index}
|
key={index}
|
||||||
@@ -127,7 +132,7 @@ function GoodMatchingTransactions() {
|
|||||||
</Stack>
|
</Stack>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
<Stack spacing={9} style={{ padding: 15 }}>
|
<Stack spacing={9} style={{ padding: '12px 15px' }}>
|
||||||
{matchingTransactions.map((match, index) => (
|
{matchingTransactions.map((match, index) => (
|
||||||
<MatchTransaction
|
<MatchTransaction
|
||||||
key={index}
|
key={index}
|
||||||
@@ -171,34 +176,44 @@ export function CategorizeBankTransactionContent() {
|
|||||||
return <h1>Categorizing</h1>;
|
return <h1>Categorizing</h1>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface MatchTransctionFooterProps extends WithBankingActionsProps {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Renders the match transactions footer.
|
* Renders the match transactions footer.
|
||||||
* @returns {React.ReactNode}
|
* @returns {React.ReactNode}
|
||||||
*/
|
*/
|
||||||
function MatchTransactionFooter() {
|
const MatchTransactionFooter = R.compose(withBankingActions)(
|
||||||
return (
|
({ closeMatchingTransactionAside }: MatchTransctionFooterProps) => {
|
||||||
<Box className={styles.footer}>
|
const handleCancelBtnClick = () => {
|
||||||
<Box className={styles.footerTotal}>
|
closeMatchingTransactionAside();
|
||||||
<Group position={'apart'}>
|
};
|
||||||
<AnchorButton small minimal intent={Intent.PRIMARY}>
|
return (
|
||||||
Add Reconcile Transaction +
|
<Box className={styles.footer}>
|
||||||
</AnchorButton>
|
<Box className={styles.footerTotal}>
|
||||||
<Text style={{ fontSize: 13 }}>Pending $10,000</Text>
|
<Group position={'apart'}>
|
||||||
</Group>
|
<AnchorButton small minimal intent={Intent.PRIMARY}>
|
||||||
</Box>
|
Add Reconcile Transaction +
|
||||||
|
</AnchorButton>
|
||||||
|
<Text style={{ fontSize: 13 }}>Pending $10,000</Text>
|
||||||
|
</Group>
|
||||||
|
</Box>
|
||||||
|
|
||||||
<Box className={styles.footerActions}>
|
<Box className={styles.footerActions}>
|
||||||
<Group spacing={10}>
|
<Group spacing={10}>
|
||||||
<Button
|
<Button
|
||||||
intent={Intent.PRIMARY}
|
intent={Intent.PRIMARY}
|
||||||
style={{ minWidth: 85 }}
|
style={{ minWidth: 85 }}
|
||||||
type="submit"
|
type="submit"
|
||||||
>
|
>
|
||||||
Match
|
Match
|
||||||
</Button>
|
</Button>
|
||||||
<Button>Cancel</Button>
|
|
||||||
</Group>
|
<Button onClick={handleCancelBtnClick}>Cancel</Button>
|
||||||
|
</Group>
|
||||||
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
);
|
||||||
);
|
},
|
||||||
}
|
);
|
||||||
|
|
||||||
|
MatchTransactionFooter.displayName = 'MatchTransactionFooter';
|
||||||
|
|||||||
Reference in New Issue
Block a user