merge: estimate work branch to master

This commit is contained in:
Ahmed Bouhuolia
2020-10-26 14:34:54 +02:00
parent 4ed96e5143
commit 40fa6aa71f
25 changed files with 419 additions and 96 deletions

View File

@@ -65,21 +65,21 @@ export const fetchPaymentMadesTable = ({ query = {} }) => {
dispatch({
type: t.PAYMENT_MADES_PAGE_SET,
payload: {
bill_payments: response.data.bill_payments.results,
pagination: response.data.bill_payments.pagination,
bill_payments: response.data.bill_payments,
pagination: response.data.pagination,
customViewId: response.data.customViewId || -1,
},
});
dispatch({
type: t.PAYMENT_MADES_ITEMS_SET,
payload: {
bill_payments: response.data.bill_payments.results,
bill_payments: response.data.bill_payments,
},
});
dispatch({
type: t.PAYMENT_MADES_PAGINATION_SET,
payload: {
pagination: response.data.bill_payments.pagination,
pagination: response.data.pagination,
customViewId: response.data.customViewId || -1,
},
});
@@ -102,14 +102,6 @@ export const fetchPaymentMade = ({ id }) => {
new Promise((resovle, reject) => {
ApiService.get(`purchases/bill_payments/${id}`, {})
.then((response) => {
// dispatch({
// type: t.RELOAD_INVOICES,
// payload: {
// sales_invoices: response.data.paymentReceive.entries.map(
// (e) => e.invoice,
// ),
// },
// });
dispatch({
type: t.PAYMENT_MADE_SET,
payload: {

View File

@@ -12,6 +12,7 @@ const initialState = {
page_size: 5,
page: 1,
},
nextPaymentNumberChanged: false,
};
const defaultPaymentMade = {
@@ -84,5 +85,11 @@ const reducer = createReducer(initialState, {
},
};
},
[t.PAYMENT_MADES_NUMBER_CHANGED]:(state,action)=>{
const { isChanged } = action.payload;
state.nextPaymentNumberChanged = isChanged
}
});
export default createTableQueryReducers('bill_payments', reducer);

View File

@@ -8,4 +8,5 @@ export default {
PAYMENT_MADES_PAGE_SET: 'PAYMENT_MADES_PAGE_SET',
PAYMENT_MADES_ITEMS_SET: 'PAYMENT_MADES_ITEMS_SET',
PAYMENT_MADES_PAGINATION_SET: 'PAYMENT_MADES_PAGINATION_SET',
PAYMENT_MADES_NUMBER_CHANGED:'PAYMENT_MADES_NUMBER_CHANGED'
};