mirror of
https://github.com/Sea-Haven-Industries/shoc-frontend-new.git
synced 2026-10-07 16:19:01 +00:00
Three divergences in the vendor detail drawer: - The header rendered the company as a subtitle under a title that had already fallen back to the company, printing the same name twice when the row carried no technician. The subtitle is now dropped when it would repeat the title. - The Google Maps link appeared only when a URL was stored, unlabelled, so an empty value left no trace of the field. It is now a labelled field below Address that reads em-dash when unset, as every other field in the panel does. - The status sat immediately beside Total Jobs. It now sits opposite it at the right edge, and reuses the vendors table's dot-plus-text badge so the state never reads by colour alone.
20 lines
623 B
TypeScript
20 lines
623 B
TypeScript
import { Box, Stack } from "@mui/material";
|
|
import { Text } from "@/components/ui/text";
|
|
|
|
/** Dot plus text, so the status never reads by colour alone. */
|
|
export function VendorStatusBadge({ isActive }: { isActive: boolean }) {
|
|
return (
|
|
<Stack direction="row" spacing={1} sx={{ alignItems: "center" }}>
|
|
<Box
|
|
component="span"
|
|
sx={{
|
|
width: 6,
|
|
height: 6,
|
|
borderRadius: "9999px",
|
|
backgroundColor: isActive ? "success.main" : "text.secondary",
|
|
}}
|
|
/>
|
|
<Text variant="description">{isActive ? "Active" : "Inactive"}</Text>
|
|
</Stack>
|
|
);
|
|
}
|