- Organize database seeds.

- Optimize design dashboard top bar.
This commit is contained in:
Ahmed Bouhuolia
2020-03-26 22:34:02 +02:00
parent a399052a30
commit d695188d3a
18 changed files with 121 additions and 45 deletions

View File

@@ -51,9 +51,7 @@ function AccountsDataTable({
]);
});
useEffect(() => {
fetchHook.execute();
}, [filterConditions]);
useEffect(() => { fetchHook.execute(); }, [filterConditions]);
// Refetch accounts list after custom view id change.
useEffect(() => {
@@ -64,20 +62,13 @@ function AccountsDataTable({
changeCurrentView(customViewId);
setTopbarEditView(customViewId);
}
if (customViewId && viewMeta) {
changePageSubtitle(viewMeta.name);
} else {
changePageSubtitle('');
}
changePageSubtitle((customViewId && viewMeta) ? viewMeta.name : '');
}, [customViewId]);
useEffect(
() => () => {
// Clear page subtitle when unmount the page.
changePageSubtitle('');
},
[]
);
useEffect(() => () => {
// Clear page subtitle when unmount the page.
changePageSubtitle('');
}, []);
const handleEditAccount = account => () => {
openDialog('account-form', { action: 'edit', id: account.id });
@@ -91,12 +82,10 @@ function AccountsDataTable({
<MenuDivider />
<MenuItem
text='Inactivate Account'
onClick={() => onInactiveAccount(account)}
/>
onClick={() => onInactiveAccount(account)} />
<MenuItem
text='Delete Account'
onClick={() => onDeleteAccount(account)}
/>
onClick={() => onDeleteAccount(account)} />
</Menu>
);