price adjustment and stock adjustments
This commit is contained in:
@@ -26,10 +26,24 @@ export function CountStatusBadge({ status }: { status: CountStatus }) {
|
||||
)
|
||||
}
|
||||
|
||||
const adjustmentLabel: Record<AdjustmentStatus, string> = {
|
||||
Draft: "Draft",
|
||||
PendingApproval: "Pending",
|
||||
PendingSecondApproval: "Pending 2nd",
|
||||
Posted: "Posted",
|
||||
Rejected: "Rejected",
|
||||
Cancelled: "Withdrawn",
|
||||
}
|
||||
|
||||
export function AdjustmentStatusBadge({ status }: { status: AdjustmentStatus }) {
|
||||
const tone =
|
||||
status === "Posted" ? success
|
||||
: status === "Rejected" ? destructive
|
||||
: status === "Cancelled" ? "bg-muted text-muted-foreground border-transparent"
|
||||
: warning
|
||||
return (
|
||||
<Badge variant="outline" className={`${badgeSize} ${success}`}>
|
||||
{status}
|
||||
<Badge variant="outline" className={`${badgeSize} ${tone}`}>
|
||||
{adjustmentLabel[status]}
|
||||
</Badge>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user