feat: add create & edit & delete in credit note.

This commit is contained in:
elforjani13
2021-11-30 21:04:36 +02:00
parent 15fa1729a2
commit eeb16f4362
29 changed files with 644 additions and 235 deletions

View File

@@ -2,13 +2,13 @@ import t from 'store/types';
export const setCreditNotesTableState = (queries) => {
return {
type: t.CREDIT_NOTE_TABLE_STATE_SET,
type: t.CREDIT_NOTES_TABLE_STATE_SET,
payload: { queries },
};
};
export const resetCreditNotesTableState = () => {
return {
type: t.CREDIT_NOTE_TABLE_STATE_RESET,
type: t.CREDIT_NOTES_TABLE_STATE_RESET,
};
};

View File

@@ -15,7 +15,7 @@ const initialState = {
tableState: defaultTableQuery,
};
const STORAGE_KEY = 'bigcapital:CreditNotes';
const STORAGE_KEY = 'bigcapital:creditNotes';
const CONFIG = {
key: STORAGE_KEY,

View File

@@ -3,8 +3,7 @@ import { paginationLocationQuery } from 'store/selectors';
import { createDeepEqualSelector } from 'utils';
import { defaultTableQuery } from './creditNotes.reducer';
const creditNotesTableStateSelector = (state) =>
state.creditNotes?.tableState;
const creditNotesTableStateSelector = (state) => state.creditNotes.tableState;
/**
* Retrieve credit note table state.

View File

@@ -1,4 +1,4 @@
export default {
CREDIT_NOTE_TABLE_STATE_SET: 'CREDIT_NOTE/TABLES_STATE_SET',
CREDIT_NOTE_TABLE_STATE_RESET: 'CREDIT_NOTE/TABLE_STATE/RESET',
CREDIT_NOTES_TABLE_STATE_SET: 'CREDIT_NOTE/TABLE_STATE_SET',
CREDIT_NOTES_TABLE_STATE_RESET: 'CREDIT_NOTE/TABLE_STATE_RESET',
};