othr
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
import {FC, useEffect, useState} from "react";
|
||||
import styles from './LeadsPage.module.css';
|
||||
import Board from "../../../components/Dnd/Board/Board.tsx";
|
||||
import {DragDropContext} from "@hello-pangea/dnd";
|
||||
import {DragDropContext, DropResult, OnDragEndResponder, ResponderProvided} from "@hello-pangea/dnd";
|
||||
import {useDealSummaries} from "../hooks/useDealSummaries.tsx";
|
||||
import {DealStatus} from "../../../shared/enums/DealStatus.ts";
|
||||
import PageBlock from "../../../components/PageBlock/PageBlock.tsx";
|
||||
import DealEditDrawer from "../drawers/DealEditDrawer/DealEditDrawer.tsx";
|
||||
import {DealPageContextProvider} from "../contexts/DealPageContext.tsx";
|
||||
import {modals} from "@mantine/modals";
|
||||
import {DealSummaryReorderRequest} from "../../../client";
|
||||
|
||||
|
||||
export const LeadsPage: FC = () => {
|
||||
@@ -15,15 +17,18 @@ export const LeadsPage: FC = () => {
|
||||
useEffect(() => {
|
||||
setSummaries(summariesRaw);
|
||||
}, [summariesRaw]);
|
||||
const onDragEnd = () => {
|
||||
// if (!result.destination) return;
|
||||
//
|
||||
// const newStatus = getDealStatusByName(
|
||||
// result.destination.droppableId
|
||||
// );
|
||||
// const summaryId = parseInt(result.draggableId);
|
||||
//
|
||||
// return;
|
||||
const onDragEnd = async (result: DropResult, provided: ResponderProvided) => {
|
||||
const dealId = parseInt(result.draggableId);
|
||||
|
||||
const request: DealSummaryReorderRequest = {}
|
||||
modals.openContextModal({
|
||||
modal: 'enterDeadline',
|
||||
title: "Необходимо указать дедлайн",
|
||||
innerProps: {
|
||||
onSubmit: (event) => console.log(event)
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
return (
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user