mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 21:30:31 +00:00
Merge branch 'master' of https://github.com/abouolia/Bigcapital
This commit is contained in:
@@ -31,6 +31,8 @@ const billPaginationSelector = (state, props) => {
|
||||
return state.bills.views?.[viewId];
|
||||
};
|
||||
|
||||
const getBillsCurrentViewIdSelector = (state) => state.bills.currentViewId;
|
||||
|
||||
export const getBillTableQueryFactory = () =>
|
||||
createSelector(
|
||||
paginationLocationQuery,
|
||||
@@ -108,3 +110,12 @@ export const getVendorPayableBillsEntriesFactory = () =>
|
||||
}));
|
||||
},
|
||||
);
|
||||
|
||||
// Retreive the current bills view id.
|
||||
export const getBillsCurrentViewIdFactory = () =>
|
||||
createSelector(
|
||||
getBillsCurrentViewIdSelector,
|
||||
(currentViewId) => {
|
||||
return currentViewId;
|
||||
}
|
||||
);
|
||||
@@ -19,6 +19,10 @@ const estimatesPageSelector = (state, props, query) => {
|
||||
return state.salesEstimates.views?.[viewId]?.pages?.[currentPageId];
|
||||
};
|
||||
|
||||
const getEstimatesCurrentViewIdSelector = (state, props) => {
|
||||
return state.salesEstimates.currentViewId;
|
||||
};
|
||||
|
||||
// Retrieve estimates table query.
|
||||
export const getEstimatesTableQueryFactory = () =>
|
||||
createSelector(
|
||||
@@ -58,3 +62,12 @@ export const getEstimatesPaginationMetaFactory = () =>
|
||||
...(estimateView?.paginationMeta || {}),
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
// Retrieve estimates current view id.
|
||||
export const getEstimatesCurrentViewIdFactory = () =>
|
||||
createSelector(
|
||||
getEstimatesCurrentViewIdSelector,
|
||||
(currentViewId) => {
|
||||
return currentViewId;
|
||||
});
|
||||
@@ -27,6 +27,8 @@ const invoicesItemsSelector = (state) => state.salesInvoices.items;
|
||||
const invoicesReceiableCustomerSelector = (state, props) =>
|
||||
state.salesInvoices.receivable.byCustomerId[props.customerId];
|
||||
|
||||
const getInvoicesCurrentViewIdSelector = (state) => state.salesInvoices.currentViewId;
|
||||
|
||||
export const getInvoiceTableQueryFactory = () =>
|
||||
createSelector(
|
||||
paginationLocationQuery,
|
||||
@@ -51,6 +53,8 @@ export const getInvoiceCurrentPageFactory = () =>
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
|
||||
// Retrieve specific invoice by the passed invoice id.
|
||||
export const getInvoiecsByIdFactory = () =>
|
||||
createSelector(invoicesByIdSelector, (invoice) => {
|
||||
@@ -83,3 +87,12 @@ export const getCustomerReceivableInvoicesEntriesFactory = () =>
|
||||
}));
|
||||
},
|
||||
);
|
||||
|
||||
// Retrieve sale invoices current view id.
|
||||
export const getInvoicesCurrentViewIdFactory = () =>
|
||||
createSelector(
|
||||
getInvoicesCurrentViewIdSelector,
|
||||
(currentViewId) => {
|
||||
return currentViewId;
|
||||
}
|
||||
);
|
||||
@@ -27,12 +27,17 @@ const paymentMadeById = (state, props) =>
|
||||
state.paymentMades.items[props.paymentMadeId];
|
||||
|
||||
const paymentMadeEntries = (state, props) => props.paymentMadeEntries;
|
||||
|
||||
const billsItemsSelector = (state, props) => state.bills.items;
|
||||
|
||||
const billsPayableByPaymentMadeSelector = (state, props) =>
|
||||
state.bills.payable.byBillPayamentId[props.paymentMadeId];
|
||||
|
||||
const paymentMadeBillsSelector = (state, props) =>
|
||||
state.bills.byBillPayamentId[props.paymentMadeId];
|
||||
|
||||
const paymentMadesCurrentViewIdSelector = (state) => state.paymentMades.currentViewId;
|
||||
|
||||
export const getPaymentMadeCurrentPageFactory = () =>
|
||||
createSelector(
|
||||
paymentMadesPageSelector,
|
||||
@@ -113,3 +118,12 @@ export const getPaymentMadeEntriesFactory = () =>
|
||||
});
|
||||
},
|
||||
);
|
||||
|
||||
// Retrieve payment mades current view id.
|
||||
export const getPaymentMadesCurrentViewIdFactory = () =>
|
||||
createSelector(
|
||||
paymentMadesCurrentViewIdSelector,
|
||||
(currentViewId) => {
|
||||
return currentViewId;
|
||||
}
|
||||
);
|
||||
@@ -35,6 +35,9 @@ const paymentReceiveInvoicesSelector = (state, props) =>
|
||||
const paymentReceiveByIdSelector = (state, props) =>
|
||||
state.paymentReceives.items[props.paymentReceiveId];
|
||||
|
||||
const paymentReceivesCurrentViewIdSelector = (state) =>
|
||||
state.paymentReceives.currentViewId;
|
||||
|
||||
// Retrieve payment receive current page results.
|
||||
export const getPaymentReceiveCurrentPageFactory = () =>
|
||||
createSelector(
|
||||
@@ -124,3 +127,10 @@ export const getPaymentReceiveEntriesFactory = () =>
|
||||
});
|
||||
},
|
||||
);
|
||||
|
||||
// Retrieve payment receives current view id.
|
||||
export const getPaymentReceivesCurrentViewIdFactory = () =>
|
||||
createSelector(
|
||||
paymentReceivesCurrentViewIdSelector,
|
||||
(currentViewId) => currentViewId,
|
||||
);
|
||||
|
||||
@@ -26,6 +26,8 @@ const customerPageSelector = (state, props) => {
|
||||
|
||||
const customersItemsSelector = (state) => state.customers.items;
|
||||
|
||||
const customersCurrentViewIdSelector = (state) => state.customers.currentViewId;
|
||||
|
||||
export const getCustomerTableQueryFactory = () =>
|
||||
createSelector(
|
||||
paginationLocationQuery,
|
||||
@@ -61,3 +63,8 @@ export const getCustomerPaginationMetaFactory = () =>
|
||||
...(customerPage?.paginationMeta || {}),
|
||||
};
|
||||
});
|
||||
|
||||
export const getCustomersCurrentViewIdFactory = () =>
|
||||
createSelector(customersCurrentViewIdSelector, (currentViewId) => {
|
||||
return currentViewId;
|
||||
});
|
||||
|
||||
@@ -8,6 +8,8 @@ const getPageExpensesQuery = (state, props) => {
|
||||
return currentPageId || 0;
|
||||
};
|
||||
|
||||
const getExpensesCurrentViewIdSelector = (state) => state.expenses.currentViewId;
|
||||
|
||||
const expensesPageSelector = (state, props, query) => {
|
||||
const viewId = state.expenses.currentViewId;
|
||||
const currentPageId = getPageExpensesQuery(state, { viewId });
|
||||
@@ -60,4 +62,12 @@ export const getExpensesPaginationMetaFactory = () => createSelector(
|
||||
(expensesPage) => {
|
||||
return expensesPage?.paginationMeta || {};
|
||||
},
|
||||
);
|
||||
|
||||
// Retrieve expenses current view id.
|
||||
export const getExpensesCurrentViewIdFactory = () => createSelector(
|
||||
getExpensesCurrentViewIdSelector,
|
||||
(currentViewId) => {
|
||||
return currentViewId;
|
||||
},
|
||||
);
|
||||
@@ -1,6 +1,8 @@
|
||||
import { createSelector } from 'reselect';
|
||||
import { pickItemsFromIds, paginationLocationQuery, defaultPaginationMeta } from 'store/selectors';
|
||||
|
||||
const manualJournalsCurrentViewIdSelector = (state) => state.manualJournals.currentViewId;
|
||||
|
||||
const manualJournalsPageSelector = (state) => {
|
||||
const viewId = state.manualJournals.currentViewId;
|
||||
const currentView = state.manualJournals.views?.[viewId];
|
||||
@@ -51,3 +53,12 @@ export const getManualJournalsTableQuery = createSelector(
|
||||
};
|
||||
},
|
||||
);
|
||||
|
||||
// Retrieve manual journals current view id.
|
||||
export const getManualJournalsCurrentViewIdFactory = () =>
|
||||
createSelector(
|
||||
manualJournalsCurrentViewIdSelector,
|
||||
(currentViewId) => {
|
||||
return currentViewId;
|
||||
},
|
||||
);
|
||||
@@ -20,6 +20,8 @@ const receiptTableQuery = (state) => state.salesReceipts.tableQuery;
|
||||
|
||||
const receiptByIdSelector = (state, props) => state.salesReceipts.items[props.receiptId];
|
||||
|
||||
const receiptsCurrentViewIdSelector = (state) => state.salesReceipts.currentViewId;
|
||||
|
||||
// Retrieve current page sale receipts results.
|
||||
export const getReceiptCurrentPageFactory = () =>
|
||||
createSelector(
|
||||
@@ -56,3 +58,9 @@ export const getReceiptsPaginationMetaFactory = () =>
|
||||
createSelector(receiptsPaginationSelector, (receiptPage) => {
|
||||
return receiptPage?.paginationMeta || {};
|
||||
});
|
||||
|
||||
// Retrieve receipts current view id.
|
||||
export const getReceiptsCurrentViewIdFactory = () =>
|
||||
createSelector(
|
||||
receiptsCurrentViewIdSelector,
|
||||
(currentViewId) => currentViewId);
|
||||
Reference in New Issue
Block a user