re-structure to monorepo.

This commit is contained in:
a.bouhuolia
2023-02-03 01:02:31 +02:00
parent 8242ec64ba
commit 7a0a13f9d5
10400 changed files with 46966 additions and 17223 deletions

View File

@@ -0,0 +1,34 @@
// @ts-nocheck
import { connect } from 'react-redux';
export default (mapState) => {
const mapStateToProps = (state, props) => {
const mapped = {
organizationSettings: state.settings.data.organization,
manualJournalsSettings: state.settings.data.manualJournals,
billPaymentSettings: state.settings.data.billPayments,
billsettings: state.settings.data.bills,
paymentReceiveSettings: state.settings.data.paymentReceives,
estimatesSettings: state.settings.data.salesEstimates,
receiptSettings: state.settings.data.salesReceipts,
invoiceSettings: state.settings.data.salesInvoices,
itemsSettings: state.settings.data.items,
expenseSettings: state.settings.data.expenses,
accountsSettings: state.settings.data.accounts,
customersSettings: state.settings.data.customers,
vendorsSettings: state.settings.data.vendors,
cashflowSettings: state.settings.data.cashflowAccounts,
cashflowTransactionsSettings: state.settings.data.cashflowTransactions,
cashflowSetting: state.settings.data.cashflow,
creditNoteSettings: state.settings.data.creditNote,
vendorsCreditNoteSetting: state.settings.data.vendorCredit,
warehouseTransferSettings: state.settings.data.warehouseTransfers,
projectSettings:state.settings.data.projects,
projectTasksSettings:state.settings.data.projectTasks,
timesheetsSettings:state.settings.data.timesheets
};
return mapState ? mapState(mapped, state, props) : mapped;
};
return connect(mapStateToProps);
};

View File

@@ -0,0 +1,15 @@
// @ts-nocheck
import { connect } from 'react-redux';
import {
FetchOptions,
submitOptions,
addSettings
} from '@/store/settings/settings.actions';
export const mapDispatchToProps = (dispatch) => ({
requestSubmitOptions: (form) => dispatch(submitOptions({ form })),
requestFetchOptions: () => dispatch(FetchOptions({})),
addSetting: (group, key, value) => dispatch(addSettings(group, key, value)),
});
export default connect(null, mapDispatchToProps);