feat: billing for groups of deals

This commit is contained in:
2024-11-15 20:29:59 +04:00
parent 90530f0530
commit 70aff26dcd
8 changed files with 29 additions and 9 deletions

View File

@@ -66,6 +66,9 @@ const DealSummaryCard: FC<Props> = ({ dealSummary, color }) => {
}
return { disabled: true };
};
const isPaid = () => {
return dealSummary.billRequest?.paid || dealSummary.group?.billRequest?.paid;
}
return (
<Indicator
position={"top-end"}
@@ -194,15 +197,12 @@ const DealSummaryCard: FC<Props> = ({ dealSummary, color }) => {
</Popover>
)}
</CopyButton>
{dealSummary.billRequest?.paid && (
{isPaid() && (
<Tooltip label={"Оплачен"}>
<ThemeIcon variant={"transparent"}>
<IconCheck />
</ThemeIcon>
</Tooltip>
)}
</Flex>