feat: locking group with bill request

This commit is contained in:
2024-11-15 21:01:59 +04:00
parent 70aff26dcd
commit 3c7c0601ec

View File

@@ -69,6 +69,9 @@ const DealSummaryCard: FC<Props> = ({ dealSummary, color }) => {
const isPaid = () => { const isPaid = () => {
return dealSummary.billRequest?.paid || dealSummary.group?.billRequest?.paid; return dealSummary.billRequest?.paid || dealSummary.group?.billRequest?.paid;
} }
const isLockedInsideGroup = () => {
return dealSummary.group && !dealSummary.group.billRequest;
}
return ( return (
<Indicator <Indicator
position={"top-end"} position={"top-end"}
@@ -80,7 +83,7 @@ const DealSummaryCard: FC<Props> = ({ dealSummary, color }) => {
<div <div
onContextMenu={showContextMenu([ onContextMenu={showContextMenu([
...dealSummary.group ? [{ ...isLockedInsideGroup() ? [{
key: "removeFromGroup", key: "removeFromGroup",
onClick: () => onDeleteFromGroup(dealSummary), onClick: () => onDeleteFromGroup(dealSummary),
title: "Убрать из группы", title: "Убрать из группы",