mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-23 16:19:49 +00:00
feat(Warehouses|Branches): highlight the primary warehouses and branches.
This commit is contained in:
@@ -55,7 +55,6 @@ function BranchesDataTable({
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
return (
|
||||
<BranchesTableCard>
|
||||
<BranchesTable
|
||||
@@ -86,5 +85,14 @@ const BranchesTableCard = styled(Card)`
|
||||
const BranchesTable = styled(DataTable)`
|
||||
.table .tr {
|
||||
min-height: 38px;
|
||||
|
||||
.td.td-name {
|
||||
.bp3-icon {
|
||||
margin: 0;
|
||||
margin-left: 2px;
|
||||
vertical-align: top;
|
||||
color: #e1b31d;
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -37,6 +37,17 @@ export function ActionsMenu({
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Branch name cell.
|
||||
*/
|
||||
function BranchNameCell({ value, row: { original } }) {
|
||||
return (
|
||||
<span>
|
||||
{value} {original.primary && <Icon icon={'star-18dp'} iconSize={16} />}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve branches table columns
|
||||
* @returns
|
||||
@@ -48,7 +59,7 @@ export function useBranchesTableColumns() {
|
||||
id: 'name',
|
||||
Header: intl.get('branches.column.branch_name'),
|
||||
accessor: 'name',
|
||||
className: 'name',
|
||||
Cell: BranchNameCell,
|
||||
width: '120',
|
||||
disableSortBy: true,
|
||||
textOverview: true,
|
||||
@@ -57,7 +68,6 @@ export function useBranchesTableColumns() {
|
||||
id: 'code',
|
||||
Header: intl.get('branches.column.code'),
|
||||
accessor: 'code',
|
||||
className: 'code',
|
||||
width: '100',
|
||||
disableSortBy: true,
|
||||
textOverview: true,
|
||||
@@ -65,7 +75,6 @@ export function useBranchesTableColumns() {
|
||||
{
|
||||
Header: intl.get('branches.column.address'),
|
||||
accessor: 'address',
|
||||
className: 'address',
|
||||
width: '180',
|
||||
disableSortBy: true,
|
||||
textOverview: true,
|
||||
@@ -73,7 +82,6 @@ export function useBranchesTableColumns() {
|
||||
{
|
||||
Header: intl.get('branches.column.phone_number'),
|
||||
accessor: 'phone_number',
|
||||
className: 'phone_number',
|
||||
width: '120',
|
||||
disableSortBy: true,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user