diff --git a/src/containers/Preferences/Branches/BranchesDataTable.js b/src/containers/Preferences/Branches/BranchesDataTable.js
index 2f238fafa..abdab2a13 100644
--- a/src/containers/Preferences/Branches/BranchesDataTable.js
+++ b/src/containers/Preferences/Branches/BranchesDataTable.js
@@ -3,6 +3,7 @@ import styled from 'styled-components';
import { DataTable } from 'components';
import TableSkeletonRows from 'components/Datatable/TableSkeletonRows';
+import BranchesEmptyStatus from './BranchesEmptyStatus';
import { useBranchesTableColumns, ActionsMenu } from './components';
import { useBranchesContext } from './BranchesProvider';
@@ -24,6 +25,8 @@ function BranchesDataTable({
// Table columns.
const columns = useBranchesTableColumns();
+ const Time = true;
+
const { branches, isBranchesLoading, isBranchesFetching } =
useBranchesContext();
@@ -35,6 +38,10 @@ function BranchesDataTable({
openAlert('branch-delete', { branchId: id });
};
+ if (Time) {
+ return ;
+ }
+
return (
{
+ openDialog('branch-activate', {});
+ };
+
+ return (
+
+
+
+
+
+ }
+ />
+ );
+}
+export default compose(withDialogActions)(BranchesEmptyStatus);
diff --git a/src/containers/Preferences/Warehouses/Warehouses.js b/src/containers/Preferences/Warehouses/Warehouses.js
index 30e1c0388..936d954c1 100644
--- a/src/containers/Preferences/Warehouses/Warehouses.js
+++ b/src/containers/Preferences/Warehouses/Warehouses.js
@@ -4,27 +4,15 @@ import styled from 'styled-components';
import { useWarehousesContext } from './WarehousesProvider';
import WarehousesGridItems from './WarehousesGridItems';
-import withDashboardActions from 'containers/Dashboard/withDashboardActions';
-
-import { compose } from 'utils';
/**
* Warehouses.
* @returns
*/
-function Warehouses({
- // #withDashboardActions
- changePreferencesPageTitle,
-}) {
+export default function Warehouses() {
const { warehouses } = useWarehousesContext();
- React.useEffect(() => {
- changePreferencesPageTitle(intl.get('warehouses.label'));
- }, [changePreferencesPageTitle]);
-
return warehouses.map((warehouse) => (
));
}
-
-export default compose(withDashboardActions)(Warehouses);
diff --git a/src/containers/Preferences/Warehouses/WarehousesEmptyStatus.js b/src/containers/Preferences/Warehouses/WarehousesEmptyStatus.js
new file mode 100644
index 000000000..51b6543b4
--- /dev/null
+++ b/src/containers/Preferences/Warehouses/WarehousesEmptyStatus.js
@@ -0,0 +1,43 @@
+import React from 'react';
+import styled from 'styled-components';
+import { Button, Intent } from '@blueprintjs/core';
+import { FormattedMessage as T, EmptyStatus } from '../../../components';
+import withDialogActions from 'containers/Dialog/withDialogActions';
+
+import { compose } from 'utils';
+
+function WarehousesEmptyStatus({
+ // #withDialogActions
+ openDialog,
+}) {
+ // Handle activate action warehouse.
+ const handleActivateWarehouse = () => {
+ openDialog('warehouse-activate', {});
+ };
+
+ return (
+
+
+
+
+
+ }
+ />
+ );
+}
+
+export default compose(withDialogActions)(WarehousesEmptyStatus);
diff --git a/src/containers/Preferences/Warehouses/WarehousesList.js b/src/containers/Preferences/Warehouses/WarehousesList.js
new file mode 100644
index 000000000..fc6051b3a
--- /dev/null
+++ b/src/containers/Preferences/Warehouses/WarehousesList.js
@@ -0,0 +1,24 @@
+import React from 'react';
+import intl from 'react-intl-universal';
+import Warehouses from './Warehouses';
+import WarehousesEmptyStatus from './WarehousesEmptyStatus';
+import withDashboardActions from 'containers/Dashboard/withDashboardActions';
+
+import { compose } from 'utils';
+
+function WarehousesList({
+ // #withDashboardActions
+ changePreferencesPageTitle,
+}) {
+ React.useEffect(() => {
+ changePreferencesPageTitle(intl.get('warehouses.label'));
+ }, [changePreferencesPageTitle]);
+
+ // if () {
+ // return ;
+ // }
+
+ return ;
+}
+
+export default compose(withDashboardActions)(WarehousesList);
diff --git a/src/containers/Preferences/Warehouses/index.js b/src/containers/Preferences/Warehouses/index.js
index 5a7270e10..e3d8066e4 100644
--- a/src/containers/Preferences/Warehouses/index.js
+++ b/src/containers/Preferences/Warehouses/index.js
@@ -1,6 +1,6 @@
import React from 'react';
import { WarehousesProvider } from './WarehousesProvider';
-import Warehouses from './Warehouses';
+import WarehousesList from './WarehousesList';
/**
* Warehouses Preferences.
@@ -9,7 +9,7 @@ import Warehouses from './Warehouses';
export default function WarehousesPerences() {
return (
-
+
);
}