diff --git a/src/containers/Preferences/Warehouses/WarehousesGridItems.js b/src/containers/Preferences/Warehouses/WarehousesGridItems.js
index 4668ce10a..31219b5a2 100644
--- a/src/containers/Preferences/Warehouses/WarehousesGridItems.js
+++ b/src/containers/Preferences/Warehouses/WarehousesGridItems.js
@@ -3,6 +3,7 @@ import styled from 'styled-components';
import { ContextMenu2 } from '@blueprintjs/popover2';
import { WarehouseContextMenu, WarehousesGrid } from './components';
+import { useWarehousesContext } from './WarehousesProvider';
import withAlertsActions from '../../Alert/withAlertActions';
import withDialogActions from '../../Dialog/withDialogActions';
@@ -20,6 +21,8 @@ function WarehousesGridItems({
warehouse,
}) {
+ const { isWarehouesLoading } = useWarehousesContext();
+
// Handle edit warehouse.
const handleEditWarehouse = () => {
openDialog('warehouse-form', { warehouseId: warehouse.id, action: 'edit' });
@@ -45,7 +48,7 @@ function WarehousesGridItems({
/>
}
>
-
+
);
}
diff --git a/src/containers/Preferences/Warehouses/components.js b/src/containers/Preferences/Warehouses/components.js
index 6be10907c..b37ad8e06 100644
--- a/src/containers/Preferences/Warehouses/components.js
+++ b/src/containers/Preferences/Warehouses/components.js
@@ -1,6 +1,8 @@
import React from 'react';
import intl from 'react-intl-universal';
import styled from 'styled-components';
+import { Classes } from '@blueprintjs/core';
+import clsx from 'classnames';
import { Menu, MenuItem, MenuDivider, Intent } from '@blueprintjs/core';
import { If, Icon, Can } from '../../../components';
@@ -37,21 +39,33 @@ export function WarehouseContextMenu({
);
}
-export function WarehousesGrid({ warehouse }) {
+export function WarehousesGrid({ warehouse, loading }) {
return (
- {warehouse.name}
- {warehouse.code}
+
+ {warehouse.name}
+
+
+ {warehouse.code}
+
-
+ {!loading && }
- {warehouse.city}
- {warehouse.country}
- {warehouse.email}
- {warehouse.phone_number}
+
+ {warehouse.city}
+
+
+ {warehouse.country}
+
+
+ {warehouse.email}
+
+
+ {warehouse.phone_number}
+
);
@@ -113,7 +127,7 @@ const WarehouseContent = styled.div`
const WarehouseItem = styled.div`
font-size: 11px;
color: #000;
- line-height: 1.3rem;
+ margin-bottom: 5px;
text-overflow: ellipsis;
overflow: hidden;
`;
diff --git a/src/containers/Sales/Invoices/InvoiceForm/BaseCurrency.js b/src/containers/Sales/Invoices/InvoiceForm/BaseCurrency.js
index c4f72e7cc..eca07ade5 100644
--- a/src/containers/Sales/Invoices/InvoiceForm/BaseCurrency.js
+++ b/src/containers/Sales/Invoices/InvoiceForm/BaseCurrency.js
@@ -10,11 +10,13 @@ import withCurrentOrganization from 'containers/Organization/withCurrentOrganiza
*/
function BaseCurrency({
// #withCurrentOrganization
- organization: { base_currency = '' },
+ organization: { base_currency },
+ isForeignCustomer,
}) {
- // if (base_currency.length <= 0) {
- // return null;
- // }
+ console.log(isForeignCustomer, 'XXXX');
+ if (isForeignCustomer) {
+ return null;
+ }
return (
@@ -26,6 +28,8 @@ function BaseCurrency({
export default R.compose(withCurrentOrganization())(BaseCurrency);
const BaseCurrencySign = styled.div`
+ display: flex;
+ align-items: center;
font-size: 10px;
margin-left: 5px;
span {