Skip to content

Commit

Permalink
COMMERCE-2908 JS improvements and small fixes on Account Selector
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabio Diego mastrorilli authored and brianchandotcom committed Jan 26, 2021
1 parent 34eb3b9 commit 4aa3853
Show file tree
Hide file tree
Showing 12 changed files with 401 additions and 317 deletions.
1 change: 1 addition & 0 deletions modules/apps/commerce/commerce-frontend-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"@clayui/form": "3.14.2",
"@clayui/icon": "3.1.0",
"@clayui/label": "3.4.1",
"@clayui/layout": "3.2.0",
"@clayui/link": "3.2.0",
"@clayui/list": "3.4.5",
"@clayui/loading-indicator": "3.2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@ function resolveCatalogPath(basePath = '') {
}

export default (basePath) => ({
baseURL: resolveCatalogPath(basePath),
getAccounts: () => AJAX.GET(resolveCatalogPath(basePath)),
});
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,15 @@

import AJAX from '../../../utilities/AJAX/index';

const ACCOUNTS_PATH = '/orders';
const ORDERS_PATH = '/orders';

const VERSION = 'v1.0';

function resolveCatalogPath(basePath = '') {
return `${basePath}${VERSION}${ACCOUNTS_PATH}`;
return `${basePath}${VERSION}${ORDERS_PATH}`;
}

export default (basePath) => ({
getAccounts: () => AJAX.GET(resolveCatalogPath(basePath)),
baseURL: resolveCatalogPath(basePath),
getOrders: () => AJAX.GET(resolveCatalogPath(basePath)),
});
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
* details.
*/

export {default as accountAPI} from './Order';
export {default as orderAPI} from './Order';
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,16 @@
* details.
*/

import AdminAccountAPI from './commerce-admin-account/index';
import AdminCatalogAPI from './commerce-admin-catalog/index';
import AdminOrderAPI from './commerce-admin-order/index';
import AdminPricingAPI from './commerce-admin-pricing/index';
import DeliveryCartAPI from './commerce-delivery-cart/index';

const ServiceProvider = {
AdminAccountAPI,
AdminCatalogAPI,
AdminOrderAPI,
AdminPricingAPI,
DeliveryCartAPI,
};
Expand Down
Loading

0 comments on commit 4aa3853

Please sign in to comment.