v0.1
This commit is contained in:
		@@ -1,5 +1,5 @@
 | 
				
			|||||||
import {Box, Drawer, rem, Tabs, Text} from "@mantine/core";
 | 
					import {Box, Drawer, rem, Tabs, Text} from "@mantine/core";
 | 
				
			||||||
import {FC, useRef} from "react";
 | 
					import {FC, useEffect, useRef} from "react";
 | 
				
			||||||
import DealServicesTable from "../../components/DealServicesTable/DealServicesTable.tsx";
 | 
					import DealServicesTable from "../../components/DealServicesTable/DealServicesTable.tsx";
 | 
				
			||||||
import {useDealPageContext} from "../../contexts/DealPageContext.tsx";
 | 
					import {useDealPageContext} from "../../contexts/DealPageContext.tsx";
 | 
				
			||||||
import {DealProductSchema, DealService, DealServiceSchema} from "../../../../client";
 | 
					import {DealProductSchema, DealService, DealServiceSchema} from "../../../../client";
 | 
				
			||||||
@@ -10,6 +10,7 @@ import DealProductsTable from "../../components/DealProductsTable/DealProductsTa
 | 
				
			|||||||
import {IconBarcode, IconBox, IconCalendarUser, IconSettings} from "@tabler/icons-react";
 | 
					import {IconBarcode, IconBox, IconCalendarUser, IconSettings} from "@tabler/icons-react";
 | 
				
			||||||
import DealStatusChangeTable from "../../components/DealStatusChangeTable/DealStatusChangeTable.tsx";
 | 
					import DealStatusChangeTable from "../../components/DealStatusChangeTable/DealStatusChangeTable.tsx";
 | 
				
			||||||
import DealEditDrawerGeneralTab from "./tabs/DealEditDrawerGeneralTab.tsx";
 | 
					import DealEditDrawerGeneralTab from "./tabs/DealEditDrawerGeneralTab.tsx";
 | 
				
			||||||
 | 
					import {useQueryClient} from "@tanstack/react-query";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const useDealServicesTableState = () => {
 | 
					const useDealServicesTableState = () => {
 | 
				
			||||||
    const {selectedDeal, setSelectedDeal} = useDealPageContext();
 | 
					    const {selectedDeal, setSelectedDeal} = useDealPageContext();
 | 
				
			||||||
@@ -314,7 +315,11 @@ const useDealEditDrawerState = () => {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
const DealEditDrawer: FC = () => {
 | 
					const DealEditDrawer: FC = () => {
 | 
				
			||||||
    const {isVisible, onClose} = useDealEditDrawerState();
 | 
					    const {isVisible, onClose} = useDealEditDrawerState();
 | 
				
			||||||
 | 
					    const queryClient = useQueryClient();
 | 
				
			||||||
 | 
					    useEffect(() => {
 | 
				
			||||||
 | 
					        if (isVisible) return;
 | 
				
			||||||
 | 
					        queryClient.invalidateQueries({queryKey: ["getDealSummaries"]})
 | 
				
			||||||
 | 
					    }, [isVisible]);
 | 
				
			||||||
    return (
 | 
					    return (
 | 
				
			||||||
        <Drawer
 | 
					        <Drawer
 | 
				
			||||||
            size={"95%"}
 | 
					            size={"95%"}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -158,8 +158,6 @@ export const LeadsPage: FC = () => {
 | 
				
			|||||||
                                        )}
 | 
					                                        )}
 | 
				
			||||||
                                    </Droppable>
 | 
					                                    </Droppable>
 | 
				
			||||||
                                </div>
 | 
					                                </div>
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                            </Flex>
 | 
					                            </Flex>
 | 
				
			||||||
                        </DragDropContext>
 | 
					                        </DragDropContext>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user