feat: Optimize SCSS architecture.

This commit is contained in:
a.bouhuolia
2021-01-17 12:17:15 +02:00
parent a747750d88
commit 09db5df686
154 changed files with 2814 additions and 2772 deletions

View File

@@ -17,7 +17,7 @@ export const mapBalanceSheetToTableRows = (accounts) => {
? [
{
name: `Total ${account.name}`,
row_types: rowTypes,
row_types: ['total-row', account.section_type],
total: { ...account.total },
...(account.total_periods && {
total_periods: account.total_periods,
@@ -104,7 +104,7 @@ export const ARAgingSummaryTableRowsMapper = (sheet, total) => {
return [
...rows,
{
name: 'TOTAL',
name: 'Total Aged Receivable',
rowType: 'total',
current: sheet.total.current.formatted_amount,
...mapAging(sheet.total.aging),
@@ -115,11 +115,12 @@ export const ARAgingSummaryTableRowsMapper = (sheet, total) => {
export const mapTrialBalanceSheetToRows = (sheet) => {
return [
...sheet.accounts,
{
name: 'Total',
rowTypes: ['total'],
...sheet.total,
},
...sheet.accounts,
];
};

View File

@@ -81,7 +81,6 @@ export default createReducer(initialState, {
...financialStatementFilterToggle('BALANCE_SHEET', 'balanceSheet'),
[t.TRAIL_BALANCE_STATEMENT_SET]: (state, action) => {
debugger;
const trailBalanceSheet = {
sheet: action.data.data,
tableRows: mapTrialBalanceSheetToRows(action.data.data),
@@ -155,11 +154,8 @@ export default createReducer(initialState, {
const { refresh } = action.payload;
state.profitLoss.refresh = !!refresh;
},
...financialStatementFilterToggle('PROFIT_LOSS', 'profitLoss'),
[t.RECEIVABLE_AGING_SUMMARY_SET]: (state, action) => {
const { customers, total, columns, query } = action.payload;