From 68a385e55ce2f13e36d3e6b4652733ca9470fc72 Mon Sep 17 00:00:00 2001 From: elforjani3 Date: Fri, 16 Oct 2020 18:42:28 +0200 Subject: [PATCH 1/2] register wizard style --- .../src/style/pages/register-wizard-page.scss | 38 +++++++++++-------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/client/src/style/pages/register-wizard-page.scss b/client/src/style/pages/register-wizard-page.scss index 1af53e8ea..fc5be885b 100644 --- a/client/src/style/pages/register-wizard-page.scss +++ b/client/src/style/pages/register-wizard-page.scss @@ -19,7 +19,7 @@ font-size: 22px; } h1, - h3{ + h3 { font-weight: 500; color: #6b7382; } @@ -195,7 +195,7 @@ margin: 0 auto; padding: 45px 0 20px; - &__title-wrap{ + &__title-wrap { margin-bottom: 32px; h1 { @@ -203,12 +203,12 @@ margin-bottom: 10px; color: #565e6c; } - .paragraph{ + .paragraph { opacity: 0.75; } } - &__form{ + &__form { h3 { margin-bottom: 1rem; } @@ -222,12 +222,21 @@ } } + .form-group--language { + margin-left: 10px; + } + .bp3-button:not([class*='bp3-intent-']):not(.bp3-minimal) { width: 100%; height: 38px; + padding: 8px; } - .register-org-note{ + .bp3-text-muted { + color: #000000; + } + + .register-org-note { font-size: 13px; padding-bottom: 10px; border-bottom: 1px solid #e1e1e1; @@ -282,33 +291,32 @@ width: 70%; margin: 0 auto; color: #2e4266; - } + } } } -.setup-congrats{ +.setup-congrats { width: 600px; margin: 0 auto; text-align: center; padding-top: 80px; - &__page{ - + &__page { } - &__text{ + &__text { margin-top: 30px; - h1{ - color: #2D2B43; + h1 { + color: #2d2b43; margin-bottom: 12px; } - .paragraph{ + .paragraph { font-size: 15px; opacity: 0.85; margin-bottom: 14px; } - .bp3-button{ + .bp3-button { height: 38px; padding-left: 25px; padding-right: 25px; @@ -316,4 +324,4 @@ margin-top: 12px; } } -} \ No newline at end of file +} From 9bda188ca433ed82a1633e9663762f9ca7ac453a Mon Sep 17 00:00:00 2001 From: elforjani3 Date: Sat, 17 Oct 2020 18:12:54 +0200 Subject: [PATCH 2/2] Fix: fontent api --- client/src/components/AccountsTypesSelect.js | 6 ++-- .../src/store/customers/customers.actions.js | 6 ++-- client/src/store/expenses/expenses.actions.js | 8 ++--- .../itemCategories/itemsCategory.actions.js | 2 +- client/src/store/items/items.actions.js | 6 ++-- .../manualJournals/manualJournals.actions.js | 36 ++++++++++--------- client/src/store/vendors/vendors.actions.js | 10 +++--- 7 files changed, 37 insertions(+), 37 deletions(-) diff --git a/client/src/components/AccountsTypesSelect.js b/client/src/components/AccountsTypesSelect.js index 1dd4b6fd3..ef80c0f3e 100644 --- a/client/src/components/AccountsTypesSelect.js +++ b/client/src/components/AccountsTypesSelect.js @@ -12,7 +12,7 @@ export default function AccountsTypesSelect({ }) { // Filters accounts types items. const filterAccountTypeItems = (query, accountType, _index, exactMatch) => { - const normalizedTitle = accountType.name.toLowerCase(); + const normalizedTitle = accountType.label.toLowerCase(); const normalizedQuery = query.toLowerCase(); if (exactMatch) { @@ -28,7 +28,7 @@ export default function AccountsTypesSelect({ }; const items = accountsTypes.map((type) => ({ - id: type.id, name: type.name, + id: type.id, label: type.label, })); return ( @@ -36,7 +36,7 @@ export default function AccountsTypesSelect({ items={items} selectedItemProp={'id'} selectedItem={selectedTypeId} - labelProp={'name'} + labelProp={'label'} defaultText={defaultSelectText} onItemSelect={handleItemSelected} itemPredicate={filterAccountTypeItems} diff --git a/client/src/store/customers/customers.actions.js b/client/src/store/customers/customers.actions.js index 6e2a131a5..3154ebe06 100644 --- a/client/src/store/customers/customers.actions.js +++ b/client/src/store/customers/customers.actions.js @@ -66,14 +66,14 @@ export const fetchCustomers = ({ query }) => { .then((response) => { dispatch({ type: t.CUSTOMER_SET, - customers: response.data.customers.results, + customers: response.data.customers, }); dispatch({ type: t.CUSTOMERS_PAGE_SET, - customers: response.data.customers.results, + customers: response.data.customers, customViewId: response.data.customers.customViewId, - paginationMeta: response.data.customers.pagination, + paginationMeta: response.data.pagination, }); dispatch({ type: t.CUSTOMERS_TABLE_LOADING, diff --git a/client/src/store/expenses/expenses.actions.js b/client/src/store/expenses/expenses.actions.js index 4f27a56fe..03147e8a3 100644 --- a/client/src/store/expenses/expenses.actions.js +++ b/client/src/store/expenses/expenses.actions.js @@ -18,21 +18,21 @@ export const fetchExpensesTable = ({ query } = {}) => { dispatch({ type: t.EXPENSES_PAGE_SET, payload: { - expenses: response.data.expenses.results, - pagination: response.data.expenses.pagination, + expenses: response.data.expenses, + pagination: response.data.pagination, customViewId: response.data.customViewId || -1, }, }); dispatch({ type: t.EXPENSES_ITEMS_SET, payload: { - expenses: response.data.expenses.results, + expenses: response.data.expenses, } }); dispatch({ type: t.EXPENSES_PAGINATION_SET, payload: { - pagination: response.data.expenses.pagination, + pagination: response.data.pagination, customViewId: response.data.customViewId || -1, } }); diff --git a/client/src/store/itemCategories/itemsCategory.actions.js b/client/src/store/itemCategories/itemsCategory.actions.js index 352f2b237..4de3b2bce 100644 --- a/client/src/store/itemCategories/itemsCategory.actions.js +++ b/client/src/store/itemCategories/itemsCategory.actions.js @@ -23,7 +23,7 @@ export const fetchItemCategories = ({ query }) => { .then((response) => { dispatch({ type: t.ITEMS_CATEGORY_LIST_SET, - categories: response.data.categories, + categories: response.data.item_categories, }); dispatch({ type: t.SET_DASHBOARD_REQUEST_COMPLETED, diff --git a/client/src/store/items/items.actions.js b/client/src/store/items/items.actions.js index 963890492..6aa79ead9 100644 --- a/client/src/store/items/items.actions.js +++ b/client/src/store/items/items.actions.js @@ -25,13 +25,13 @@ export const fetchItems = ({ query }) => { .then((response) => { dispatch({ type: t.ITEMS_SET, - items: response.data.items.results, + items: response.data.items, }); dispatch({ type: t.ITEMS_PAGE_SET, - items: response.data.items.results, + items: response.data.items, customViewId: response.data.customViewId, - paginationMeta: response.data.items.pagination, + paginationMeta: response.data.pagination, }); dispatch({ type: t.ITEMS_TABLE_LOADING, diff --git a/client/src/store/manualJournals/manualJournals.actions.js b/client/src/store/manualJournals/manualJournals.actions.js index e4a1f6501..b334f4c56 100644 --- a/client/src/store/manualJournals/manualJournals.actions.js +++ b/client/src/store/manualJournals/manualJournals.actions.js @@ -5,7 +5,7 @@ import t from 'store/types'; export const makeJournalEntries = ({ form }) => { return (dispatch) => new Promise((resolve, reject) => { - ApiService.post('accounting/make-journal-entries', form) + ApiService.post('manual-journals', form) .then((response) => { resolve(response); }) @@ -21,13 +21,13 @@ export const makeJournalEntries = ({ form }) => { export const fetchManualJournal = ({ id }) => { return (dispatch) => new Promise((resolve, reject) => { - ApiService.get(`accounting/manual-journals/${id}`) + ApiService.get(`manual-journals/${id}`) .then((response) => { dispatch({ type: t.MANUAL_JOURNAL_SET, payload: { id, - manualJournal: response.data.manual_journal, + manualJournal: response.data.manualJournal, }, }); resolve(response); @@ -41,7 +41,7 @@ export const fetchManualJournal = ({ id }) => { export const editManualJournal = ({ form, id }) => { return (dispatch) => new Promise((resolve, reject) => { - ApiService.post(`accounting/manual-journals/${id}`, form) + ApiService.post(`manual-journals/${id}`, form) .then((response) => { resolve(response); }) @@ -53,11 +53,10 @@ export const editManualJournal = ({ form, id }) => { }); }); }; - export const deleteManualJournal = ({ id }) => { return (dispatch) => new Promise((resolve, reject) => { - ApiService.delete(`accounting/manual-journals/${id}`) + ApiService.delete(`manual-journals/${id}`) .then((response) => { dispatch({ type: t.MANUAL_JOURNAL_REMOVE, @@ -74,7 +73,7 @@ export const deleteManualJournal = ({ id }) => { export const deleteBulkManualJournals = ({ ids }) => { return (dispatch) => new Promise((resolve, reject) => { - ApiService.delete('accounting/manual-journals', { params: { ids } }) + ApiService.delete('manual-journals', { params: { ids } }) .then((response) => { dispatch({ type: t.MANUAL_JOURNALS_BULK_DELETE, @@ -91,7 +90,7 @@ export const deleteBulkManualJournals = ({ ids }) => { export const publishManualJournal = ({ id }) => { return (dispatch) => new Promise((resolve, reject) => { - ApiService.post(`accounting/manual-journals/${id}/publish`) + ApiService.post(`manual-journals/${id}/publish`) .then((response) => { dispatch({ type: t.MANUAL_JOURNAL_PUBLISH, @@ -113,34 +112,37 @@ export const fetchManualJournalsTable = ({ query } = {}) => { if (pageQuery.filter_roles) { pageQuery = { ...omit(pageQuery, ['filter_roles']), - stringified_filter_roles: JSON.stringify(pageQuery.filter_roles) || '', + stringified_filter_roles: + JSON.stringify(pageQuery.filter_roles) || '', }; } dispatch({ type: t.MANUAL_JOURNALS_TABLE_LOADING, loading: true, }); - ApiService.get('accounting/manual-journals', { + ApiService.get('manual-journals', { params: { ...pageQuery, ...query }, }) .then((response) => { dispatch({ type: t.MANUAL_JOURNALS_PAGE_SET, payload: { - manualJournals: response.data.manualJournals.results, - customViewId: response.data.manualJournals?.viewMeta?.customViewId || -1, - pagination: response.data.manualJournals.pagination, - } + manualJournals: response.data.manual_journals, + customViewId: + response.data.manual_journals?.viewMeta?.customViewId || -1, + pagination: response.data.pagination, + }, }); dispatch({ type: t.MANUAL_JOURNALS_ITEMS_SET, - manual_journals: response.data.manualJournals.results, + manual_journals: response.data.manual_journals, }); dispatch({ type: 'MANUAL_JOURNALS_PAGINATION_SET', payload: { - pagination: response.data.manualJournals.pagination, - customViewId: response.data.manualJournals?.viewMeta?.customViewId || -1, + pagination: response.data.pagination, + customViewId: + response.data.manual_journals?.viewMeta?.customViewId || -1, }, }); dispatch({ diff --git a/client/src/store/vendors/vendors.actions.js b/client/src/store/vendors/vendors.actions.js index 0df781fc6..0bad6b0ca 100644 --- a/client/src/store/vendors/vendors.actions.js +++ b/client/src/store/vendors/vendors.actions.js @@ -15,21 +15,21 @@ export const fetchVendorsTable = ({ query }) => { dispatch({ type: t.VENDORS_PAGE_SET, payload: { - vendors: response.data.vendors.results, - pagination: response.data.vendors.pagination, + vendors: response.data.vendors, + pagination: response.data.pagination, customViewId: response.data.customViewId, }, }); dispatch({ type: t.VENDORS_ITEMS_SET, payload: { - vendors: response.data.vendors.results, + vendors: response.data.vendors, }, }); dispatch({ type: t.VENDORS_PAGINATION_SET, payload: { - pagination: response.data.vendors.pagination, + pagination: response.data.pagination, customViewId: response.data.customViewId || -1, }, }); @@ -49,10 +49,8 @@ export const fetchVendorsTable = ({ query }) => { export const editVendor = ({ form, id }) => { return (dispatch) => new Promise((resolve, reject) => { - ApiService.post(`vendors/${id}`, form) .then((response) => { - resolve(response); }) .catch((error) => {