mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-20 23:00:34 +00:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -12,7 +12,7 @@ export default function AccountsTypesSelect({
|
|||||||
}) {
|
}) {
|
||||||
// Filters accounts types items.
|
// Filters accounts types items.
|
||||||
const filterAccountTypeItems = (query, accountType, _index, exactMatch) => {
|
const filterAccountTypeItems = (query, accountType, _index, exactMatch) => {
|
||||||
const normalizedTitle = accountType.name.toLowerCase();
|
const normalizedTitle = accountType.label.toLowerCase();
|
||||||
const normalizedQuery = query.toLowerCase();
|
const normalizedQuery = query.toLowerCase();
|
||||||
|
|
||||||
if (exactMatch) {
|
if (exactMatch) {
|
||||||
@@ -28,7 +28,7 @@ export default function AccountsTypesSelect({
|
|||||||
};
|
};
|
||||||
|
|
||||||
const items = accountsTypes.map((type) => ({
|
const items = accountsTypes.map((type) => ({
|
||||||
id: type.id, name: type.name,
|
id: type.id, label: type.label,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -36,7 +36,7 @@ export default function AccountsTypesSelect({
|
|||||||
items={items}
|
items={items}
|
||||||
selectedItemProp={'id'}
|
selectedItemProp={'id'}
|
||||||
selectedItem={selectedTypeId}
|
selectedItem={selectedTypeId}
|
||||||
labelProp={'name'}
|
labelProp={'label'}
|
||||||
defaultText={defaultSelectText}
|
defaultText={defaultSelectText}
|
||||||
onItemSelect={handleItemSelected}
|
onItemSelect={handleItemSelected}
|
||||||
itemPredicate={filterAccountTypeItems}
|
itemPredicate={filterAccountTypeItems}
|
||||||
|
|||||||
@@ -66,14 +66,14 @@ export const fetchCustomers = ({ query }) => {
|
|||||||
.then((response) => {
|
.then((response) => {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: t.CUSTOMER_SET,
|
type: t.CUSTOMER_SET,
|
||||||
customers: response.data.customers.results,
|
customers: response.data.customers,
|
||||||
});
|
});
|
||||||
|
|
||||||
dispatch({
|
dispatch({
|
||||||
type: t.CUSTOMERS_PAGE_SET,
|
type: t.CUSTOMERS_PAGE_SET,
|
||||||
customers: response.data.customers.results,
|
customers: response.data.customers,
|
||||||
customViewId: response.data.customers.customViewId,
|
customViewId: response.data.customers.customViewId,
|
||||||
paginationMeta: response.data.customers.pagination,
|
paginationMeta: response.data.pagination,
|
||||||
});
|
});
|
||||||
dispatch({
|
dispatch({
|
||||||
type: t.CUSTOMERS_TABLE_LOADING,
|
type: t.CUSTOMERS_TABLE_LOADING,
|
||||||
|
|||||||
@@ -18,21 +18,21 @@ export const fetchExpensesTable = ({ query } = {}) => {
|
|||||||
dispatch({
|
dispatch({
|
||||||
type: t.EXPENSES_PAGE_SET,
|
type: t.EXPENSES_PAGE_SET,
|
||||||
payload: {
|
payload: {
|
||||||
expenses: response.data.expenses.results,
|
expenses: response.data.expenses,
|
||||||
pagination: response.data.expenses.pagination,
|
pagination: response.data.pagination,
|
||||||
customViewId: response.data.customViewId || -1,
|
customViewId: response.data.customViewId || -1,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
dispatch({
|
dispatch({
|
||||||
type: t.EXPENSES_ITEMS_SET,
|
type: t.EXPENSES_ITEMS_SET,
|
||||||
payload: {
|
payload: {
|
||||||
expenses: response.data.expenses.results,
|
expenses: response.data.expenses,
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
dispatch({
|
dispatch({
|
||||||
type: t.EXPENSES_PAGINATION_SET,
|
type: t.EXPENSES_PAGINATION_SET,
|
||||||
payload: {
|
payload: {
|
||||||
pagination: response.data.expenses.pagination,
|
pagination: response.data.pagination,
|
||||||
customViewId: response.data.customViewId || -1,
|
customViewId: response.data.customViewId || -1,
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ export const fetchItemCategories = ({ query }) => {
|
|||||||
.then((response) => {
|
.then((response) => {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: t.ITEMS_CATEGORY_LIST_SET,
|
type: t.ITEMS_CATEGORY_LIST_SET,
|
||||||
categories: response.data.categories,
|
categories: response.data.item_categories,
|
||||||
});
|
});
|
||||||
dispatch({
|
dispatch({
|
||||||
type: t.SET_DASHBOARD_REQUEST_COMPLETED,
|
type: t.SET_DASHBOARD_REQUEST_COMPLETED,
|
||||||
|
|||||||
@@ -25,13 +25,13 @@ export const fetchItems = ({ query }) => {
|
|||||||
.then((response) => {
|
.then((response) => {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: t.ITEMS_SET,
|
type: t.ITEMS_SET,
|
||||||
items: response.data.items.results,
|
items: response.data.items,
|
||||||
});
|
});
|
||||||
dispatch({
|
dispatch({
|
||||||
type: t.ITEMS_PAGE_SET,
|
type: t.ITEMS_PAGE_SET,
|
||||||
items: response.data.items.results,
|
items: response.data.items,
|
||||||
customViewId: response.data.customViewId,
|
customViewId: response.data.customViewId,
|
||||||
paginationMeta: response.data.items.pagination,
|
paginationMeta: response.data.pagination,
|
||||||
});
|
});
|
||||||
dispatch({
|
dispatch({
|
||||||
type: t.ITEMS_TABLE_LOADING,
|
type: t.ITEMS_TABLE_LOADING,
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import t from 'store/types';
|
|||||||
export const makeJournalEntries = ({ form }) => {
|
export const makeJournalEntries = ({ form }) => {
|
||||||
return (dispatch) =>
|
return (dispatch) =>
|
||||||
new Promise((resolve, reject) => {
|
new Promise((resolve, reject) => {
|
||||||
ApiService.post('accounting/make-journal-entries', form)
|
ApiService.post('manual-journals', form)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
resolve(response);
|
resolve(response);
|
||||||
})
|
})
|
||||||
@@ -21,13 +21,13 @@ export const makeJournalEntries = ({ form }) => {
|
|||||||
export const fetchManualJournal = ({ id }) => {
|
export const fetchManualJournal = ({ id }) => {
|
||||||
return (dispatch) =>
|
return (dispatch) =>
|
||||||
new Promise((resolve, reject) => {
|
new Promise((resolve, reject) => {
|
||||||
ApiService.get(`accounting/manual-journals/${id}`)
|
ApiService.get(`manual-journals/${id}`)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: t.MANUAL_JOURNAL_SET,
|
type: t.MANUAL_JOURNAL_SET,
|
||||||
payload: {
|
payload: {
|
||||||
id,
|
id,
|
||||||
manualJournal: response.data.manual_journal,
|
manualJournal: response.data.manualJournal,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
resolve(response);
|
resolve(response);
|
||||||
@@ -41,7 +41,7 @@ export const fetchManualJournal = ({ id }) => {
|
|||||||
export const editManualJournal = ({ form, id }) => {
|
export const editManualJournal = ({ form, id }) => {
|
||||||
return (dispatch) =>
|
return (dispatch) =>
|
||||||
new Promise((resolve, reject) => {
|
new Promise((resolve, reject) => {
|
||||||
ApiService.post(`accounting/manual-journals/${id}`, form)
|
ApiService.post(`manual-journals/${id}`, form)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
resolve(response);
|
resolve(response);
|
||||||
})
|
})
|
||||||
@@ -53,11 +53,10 @@ export const editManualJournal = ({ form, id }) => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
export const deleteManualJournal = ({ id }) => {
|
export const deleteManualJournal = ({ id }) => {
|
||||||
return (dispatch) =>
|
return (dispatch) =>
|
||||||
new Promise((resolve, reject) => {
|
new Promise((resolve, reject) => {
|
||||||
ApiService.delete(`accounting/manual-journals/${id}`)
|
ApiService.delete(`manual-journals/${id}`)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: t.MANUAL_JOURNAL_REMOVE,
|
type: t.MANUAL_JOURNAL_REMOVE,
|
||||||
@@ -74,7 +73,7 @@ export const deleteManualJournal = ({ id }) => {
|
|||||||
export const deleteBulkManualJournals = ({ ids }) => {
|
export const deleteBulkManualJournals = ({ ids }) => {
|
||||||
return (dispatch) =>
|
return (dispatch) =>
|
||||||
new Promise((resolve, reject) => {
|
new Promise((resolve, reject) => {
|
||||||
ApiService.delete('accounting/manual-journals', { params: { ids } })
|
ApiService.delete('manual-journals', { params: { ids } })
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: t.MANUAL_JOURNALS_BULK_DELETE,
|
type: t.MANUAL_JOURNALS_BULK_DELETE,
|
||||||
@@ -91,7 +90,7 @@ export const deleteBulkManualJournals = ({ ids }) => {
|
|||||||
export const publishManualJournal = ({ id }) => {
|
export const publishManualJournal = ({ id }) => {
|
||||||
return (dispatch) =>
|
return (dispatch) =>
|
||||||
new Promise((resolve, reject) => {
|
new Promise((resolve, reject) => {
|
||||||
ApiService.post(`accounting/manual-journals/${id}/publish`)
|
ApiService.post(`manual-journals/${id}/publish`)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: t.MANUAL_JOURNAL_PUBLISH,
|
type: t.MANUAL_JOURNAL_PUBLISH,
|
||||||
@@ -113,34 +112,37 @@ export const fetchManualJournalsTable = ({ query } = {}) => {
|
|||||||
if (pageQuery.filter_roles) {
|
if (pageQuery.filter_roles) {
|
||||||
pageQuery = {
|
pageQuery = {
|
||||||
...omit(pageQuery, ['filter_roles']),
|
...omit(pageQuery, ['filter_roles']),
|
||||||
stringified_filter_roles: JSON.stringify(pageQuery.filter_roles) || '',
|
stringified_filter_roles:
|
||||||
|
JSON.stringify(pageQuery.filter_roles) || '',
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
dispatch({
|
dispatch({
|
||||||
type: t.MANUAL_JOURNALS_TABLE_LOADING,
|
type: t.MANUAL_JOURNALS_TABLE_LOADING,
|
||||||
loading: true,
|
loading: true,
|
||||||
});
|
});
|
||||||
ApiService.get('accounting/manual-journals', {
|
ApiService.get('manual-journals', {
|
||||||
params: { ...pageQuery, ...query },
|
params: { ...pageQuery, ...query },
|
||||||
})
|
})
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: t.MANUAL_JOURNALS_PAGE_SET,
|
type: t.MANUAL_JOURNALS_PAGE_SET,
|
||||||
payload: {
|
payload: {
|
||||||
manualJournals: response.data.manualJournals.results,
|
manualJournals: response.data.manual_journals,
|
||||||
customViewId: response.data.manualJournals?.viewMeta?.customViewId || -1,
|
customViewId:
|
||||||
pagination: response.data.manualJournals.pagination,
|
response.data.manual_journals?.viewMeta?.customViewId || -1,
|
||||||
}
|
pagination: response.data.pagination,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
dispatch({
|
dispatch({
|
||||||
type: t.MANUAL_JOURNALS_ITEMS_SET,
|
type: t.MANUAL_JOURNALS_ITEMS_SET,
|
||||||
manual_journals: response.data.manualJournals.results,
|
manual_journals: response.data.manual_journals,
|
||||||
});
|
});
|
||||||
dispatch({
|
dispatch({
|
||||||
type: 'MANUAL_JOURNALS_PAGINATION_SET',
|
type: 'MANUAL_JOURNALS_PAGINATION_SET',
|
||||||
payload: {
|
payload: {
|
||||||
pagination: response.data.manualJournals.pagination,
|
pagination: response.data.pagination,
|
||||||
customViewId: response.data.manualJournals?.viewMeta?.customViewId || -1,
|
customViewId:
|
||||||
|
response.data.manual_journals?.viewMeta?.customViewId || -1,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
dispatch({
|
dispatch({
|
||||||
|
|||||||
10
client/src/store/vendors/vendors.actions.js
vendored
10
client/src/store/vendors/vendors.actions.js
vendored
@@ -15,21 +15,21 @@ export const fetchVendorsTable = ({ query }) => {
|
|||||||
dispatch({
|
dispatch({
|
||||||
type: t.VENDORS_PAGE_SET,
|
type: t.VENDORS_PAGE_SET,
|
||||||
payload: {
|
payload: {
|
||||||
vendors: response.data.vendors.results,
|
vendors: response.data.vendors,
|
||||||
pagination: response.data.vendors.pagination,
|
pagination: response.data.pagination,
|
||||||
customViewId: response.data.customViewId,
|
customViewId: response.data.customViewId,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
dispatch({
|
dispatch({
|
||||||
type: t.VENDORS_ITEMS_SET,
|
type: t.VENDORS_ITEMS_SET,
|
||||||
payload: {
|
payload: {
|
||||||
vendors: response.data.vendors.results,
|
vendors: response.data.vendors,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
dispatch({
|
dispatch({
|
||||||
type: t.VENDORS_PAGINATION_SET,
|
type: t.VENDORS_PAGINATION_SET,
|
||||||
payload: {
|
payload: {
|
||||||
pagination: response.data.vendors.pagination,
|
pagination: response.data.pagination,
|
||||||
customViewId: response.data.customViewId || -1,
|
customViewId: response.data.customViewId || -1,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@@ -49,10 +49,8 @@ export const fetchVendorsTable = ({ query }) => {
|
|||||||
export const editVendor = ({ form, id }) => {
|
export const editVendor = ({ form, id }) => {
|
||||||
return (dispatch) =>
|
return (dispatch) =>
|
||||||
new Promise((resolve, reject) => {
|
new Promise((resolve, reject) => {
|
||||||
|
|
||||||
ApiService.post(`vendors/${id}`, form)
|
ApiService.post(`vendors/${id}`, form)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
|
|
||||||
resolve(response);
|
resolve(response);
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
font-size: 22px;
|
font-size: 22px;
|
||||||
}
|
}
|
||||||
h1,
|
h1,
|
||||||
h3{
|
h3 {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #6b7382;
|
color: #6b7382;
|
||||||
}
|
}
|
||||||
@@ -195,7 +195,7 @@
|
|||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
padding: 45px 0 20px;
|
padding: 45px 0 20px;
|
||||||
|
|
||||||
&__title-wrap{
|
&__title-wrap {
|
||||||
margin-bottom: 32px;
|
margin-bottom: 32px;
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
@@ -203,12 +203,12 @@
|
|||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
color: #565e6c;
|
color: #565e6c;
|
||||||
}
|
}
|
||||||
.paragraph{
|
.paragraph {
|
||||||
opacity: 0.75;
|
opacity: 0.75;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&__form{
|
&__form {
|
||||||
h3 {
|
h3 {
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
}
|
}
|
||||||
@@ -222,12 +222,21 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.form-group--language {
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
.bp3-button:not([class*='bp3-intent-']):not(.bp3-minimal) {
|
.bp3-button:not([class*='bp3-intent-']):not(.bp3-minimal) {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 38px;
|
height: 38px;
|
||||||
|
padding: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.register-org-note{
|
.bp3-text-muted {
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.register-org-note {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
padding-bottom: 10px;
|
padding-bottom: 10px;
|
||||||
border-bottom: 1px solid #e1e1e1;
|
border-bottom: 1px solid #e1e1e1;
|
||||||
@@ -282,33 +291,32 @@
|
|||||||
width: 70%;
|
width: 70%;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
color: #2e4266;
|
color: #2e4266;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.setup-congrats{
|
.setup-congrats {
|
||||||
width: 600px;
|
width: 600px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding-top: 80px;
|
padding-top: 80px;
|
||||||
|
|
||||||
&__page{
|
&__page {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&__text{
|
&__text {
|
||||||
margin-top: 30px;
|
margin-top: 30px;
|
||||||
|
|
||||||
h1{
|
h1 {
|
||||||
color: #2D2B43;
|
color: #2d2b43;
|
||||||
margin-bottom: 12px;
|
margin-bottom: 12px;
|
||||||
}
|
}
|
||||||
.paragraph{
|
.paragraph {
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
opacity: 0.85;
|
opacity: 0.85;
|
||||||
margin-bottom: 14px;
|
margin-bottom: 14px;
|
||||||
}
|
}
|
||||||
.bp3-button{
|
.bp3-button {
|
||||||
height: 38px;
|
height: 38px;
|
||||||
padding-left: 25px;
|
padding-left: 25px;
|
||||||
padding-right: 25px;
|
padding-right: 25px;
|
||||||
@@ -316,4 +324,4 @@
|
|||||||
margin-top: 12px;
|
margin-top: 12px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user