fix: renamed assignments table to deal_employees
This commit is contained in:
@@ -4,7 +4,7 @@ import useEmployeeTableColumns from "../hooks/useEmployeesTableColumns.tsx";
|
||||
import { ActionIcon, Flex, Tooltip } from "@mantine/core";
|
||||
import { IconTrash } from "@tabler/icons-react";
|
||||
import { MRT_TableOptions } from "mantine-react-table";
|
||||
import { AssignmentSchema } from "../../../../../client";
|
||||
import { DealEmployeesSchema } from "../../../../../client";
|
||||
import useEmployeesTab from "../hooks/useEmployeesTab.tsx";
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ const EmployeesTable = () => {
|
||||
|
||||
return (
|
||||
<BaseTable
|
||||
data={deal?.assignments}
|
||||
data={deal?.employees}
|
||||
columns={columns}
|
||||
restProps={
|
||||
{
|
||||
@@ -33,7 +33,7 @@ const EmployeesTable = () => {
|
||||
</Tooltip>
|
||||
</Flex>
|
||||
),
|
||||
} as MRT_TableOptions<AssignmentSchema>
|
||||
} as MRT_TableOptions<DealEmployeesSchema>
|
||||
}
|
||||
/>
|
||||
);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { notifications } from "../../../../../shared/lib/notifications.ts";
|
||||
import { modals } from "@mantine/modals";
|
||||
import { useDealPageContext } from "../../../contexts/DealPageContext.tsx";
|
||||
import { AssignmentSchema, DealService } from "../../../../../client";
|
||||
import { DealEmployeesSchema, DealService } from "../../../../../client";
|
||||
|
||||
const useEmployeesTab = () => {
|
||||
const { selectedDeal: deal, refetchDeal } = useDealPageContext();
|
||||
@@ -44,7 +44,7 @@ const useEmployeesTab = () => {
|
||||
});
|
||||
};
|
||||
|
||||
const onUnassignEmployeeClick = (assignment: AssignmentSchema) => {
|
||||
const onUnassignEmployeeClick = (assignment: DealEmployeesSchema) => {
|
||||
if (!deal) return;
|
||||
manageEmployee(deal.id, assignment.user.id, false);
|
||||
};
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { useMemo } from "react";
|
||||
import { MRT_ColumnDef } from "mantine-react-table";
|
||||
import { AssignmentSchema } from "../../../../../client";
|
||||
import { DealEmployeesSchema } from "../../../../../client";
|
||||
|
||||
|
||||
const useEmployeeTableColumns = () => {
|
||||
return useMemo<MRT_ColumnDef<AssignmentSchema>[]>(
|
||||
return useMemo<MRT_ColumnDef<DealEmployeesSchema>[]>(
|
||||
() => [
|
||||
{
|
||||
accessorKey: "createdAt",
|
||||
|
||||
Reference in New Issue
Block a user