diff --git a/src/client/models/DealGeneralInfoSchema.ts b/src/client/models/DealGeneralInfoSchema.ts index a66fd4c..210cbb2 100644 --- a/src/client/models/DealGeneralInfoSchema.ts +++ b/src/client/models/DealGeneralInfoSchema.ts @@ -8,5 +8,7 @@ export type DealGeneralInfoSchema = { isCompleted: boolean; comment: string; shippingWarehouse?: (string | null); + deliveryDate?: (string | null); + receivingSlotDate?: (string | null); }; diff --git a/src/client/models/DealSummary.ts b/src/client/models/DealSummary.ts index 3f6c781..e417810 100644 --- a/src/client/models/DealSummary.ts +++ b/src/client/models/DealSummary.ts @@ -3,6 +3,7 @@ /* tslint:disable */ /* eslint-disable */ import type { BaseMarketplaceSchema } from './BaseMarketplaceSchema'; +import type { DealBillRequestSchema } from './DealBillRequestSchema'; export type DealSummary = { id: number; name: string; @@ -19,5 +20,6 @@ export type DealSummary = { shipmentWarehouseName: (string | null); deliveryDate?: (string | null); receivingSlotDate?: (string | null); + billRequest?: (DealBillRequestSchema | null); }; diff --git a/src/components/Dnd/DealSummaryCard/DealSummaryCard.tsx b/src/components/Dnd/DealSummaryCard/DealSummaryCard.tsx index 3eaf97e..86724b9 100644 --- a/src/components/Dnd/DealSummaryCard/DealSummaryCard.tsx +++ b/src/components/Dnd/DealSummaryCard/DealSummaryCard.tsx @@ -13,11 +13,13 @@ import { Popover, rem, Text, + Tooltip, } from "@mantine/core"; import { useDealPageContext } from "../../../pages/LeadsPage/contexts/DealPageContext.tsx"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faCheck } from "@fortawesome/free-solid-svg-icons"; import { DealStatus } from "../../../shared/enums/DealStatus.ts"; +import { IconCheck } from "@tabler/icons-react"; type Props = { dealSummary: DealSummary; @@ -31,8 +33,6 @@ const DealSummaryCard: FC = ({ dealSummary }) => { }); }; const getIndicatorProps = (): IndicatorProps => { - // check if deal status is less then in delivery and delivery_date - current date is less then 3 days, then show indicator - // and if current status is less then in_delivery, then show indicator if (!dealSummary.deliveryDate) return { disabled: true }; @@ -42,7 +42,6 @@ const DealSummaryCard: FC = ({ dealSummary }) => { const diffDays = Math.ceil(diff / (1000 * 3600 * 24)); if (dealSummary.status < DealStatus.IN_DELIVERY) { - // if less than 2 days left, show yellow, if less than 1 day left, show red if (diffDays <= 2 && diffDays > 1) { return { color: "yellow", @@ -124,43 +123,53 @@ const DealSummaryCard: FC = ({ dealSummary }) => { )} - - {({ copy, copied }) => ( - - -
{ - e.stopPropagation(); - copy(); - }} - className={styles["flex-item"]}> - - ID: {dealSummary.id} - -
-
- - - - - ID сделки скопирован - - - -
+ + + {({ copy, copied }) => ( + + +
{ + e.stopPropagation(); + copy(); + }} + className={styles["flex-item"]}> + + ID: {dealSummary.id} + +
+
+ + + + + ID сделки скопирован + + + +
+ )} +
+ {dealSummary.billRequest?.paid && ( + + + + + )} -
+
+ = (props) => { const dispatch = useAppDispatch(); return ( <> - {/*{uiState.hideNavbar && (*/} = (props) => { }} className={stylesCss["icon"]} - // color={"#2d2d2d"} radius="xl" size={45}> )} - {/*)*/} - {/*}*/} );