mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 22:00:31 +00:00
feat(branche & warehouse ) add mark primary alert.
This commit is contained in:
@@ -27,22 +27,27 @@ function BranchesDataTable({
|
||||
// Table columns.
|
||||
const columns = useBranchesTableColumns();
|
||||
|
||||
const Time = true;
|
||||
|
||||
const { branches, isBranchesLoading, isBranchesFetching } =
|
||||
useBranchesContext();
|
||||
|
||||
// Handle edit branch.
|
||||
const handleEditBranch = ({ id }) => {
|
||||
openDialog('branch-form', { branchId: id, action: 'edit' });
|
||||
};
|
||||
|
||||
// Handle delete branch.
|
||||
const handleDeleteBranch = ({ id }) => {
|
||||
openAlert('branch-delete', { branchId: id });
|
||||
};
|
||||
|
||||
if (Time) {
|
||||
return <BranchesEmptyStatus />;
|
||||
}
|
||||
// Handle mark primary branch.
|
||||
const handleMarkPrimaryBranch = ({ id }) => {
|
||||
openAlert('branch-mark-primary', { branchId: id });
|
||||
};
|
||||
|
||||
// if (type) {
|
||||
// return <BranchesEmptyStatus />;
|
||||
// }
|
||||
|
||||
return (
|
||||
<BranchesTableCard>
|
||||
@@ -58,6 +63,7 @@ function BranchesDataTable({
|
||||
payload={{
|
||||
onEdit: handleEditBranch,
|
||||
onDelete: handleDeleteBranch,
|
||||
onMarkPrimary: handleMarkPrimaryBranch,
|
||||
}}
|
||||
/>
|
||||
</BranchesTableCard>
|
||||
|
||||
Reference in New Issue
Block a user