updated build-sites
This commit is contained in:
@@ -100,7 +100,7 @@ export function PeopleDataTableUpdate({
|
||||
const dataIds = React.useMemo<UniqueIdentifier[]>(() => data?.map(({ _id }) => _id) || [], [data])
|
||||
|
||||
const deleteMutation = useDeleteBuildAddressMutation()
|
||||
const deleteHandler = (id: string) => { deleteMutation.mutate({ uuid: id }); setTimeout(() => { refetchTable() }, 200) }
|
||||
const deleteHandler = (id: string) => { deleteMutation.mutate({ uuid: id }); setTimeout(() => { refetchTable() }, 400) }
|
||||
const columns = getColumns(router, deleteHandler);
|
||||
const pagination = React.useMemo(() => ({ pageIndex: currentPage - 1, pageSize: pageSize, }), [currentPage, pageSize])
|
||||
const totalPages = Math.ceil(totalCount / pageSize)
|
||||
|
||||
@@ -99,7 +99,7 @@ export function BuildAddressDataTable({
|
||||
const dataIds = React.useMemo<UniqueIdentifier[]>(() => data?.map(({ _id }) => _id) || [], [data])
|
||||
|
||||
const deleteMutation = useDeleteBuildAddressMutation()
|
||||
const deleteHandler = (id: string) => { deleteMutation.mutate({ uuid: id }); setTimeout(() => { refetchTable() }, 200) }
|
||||
const deleteHandler = (id: string) => { deleteMutation.mutate({ uuid: id }); setTimeout(() => { refetchTable() }, 400) }
|
||||
const columns = getColumns(router, deleteHandler);
|
||||
const pagination = React.useMemo(() => ({ pageIndex: currentPage - 1, pageSize: pageSize }), [currentPage, pageSize])
|
||||
const totalPages = Math.ceil(totalCount / pageSize)
|
||||
|
||||
@@ -1,17 +1,10 @@
|
||||
import { z } from "zod"
|
||||
|
||||
export const buildAddressUpdateSchema = z.object({
|
||||
buildNumber: z.string().optional(),
|
||||
doorNumber: z.string().optional(),
|
||||
floorNumber: z.string().optional(),
|
||||
commentAddress: z.string().optional(),
|
||||
letterAddress: z.string().optional(),
|
||||
shortLetterAddress: z.string().optional(),
|
||||
latitude: z.number().optional(),
|
||||
longitude: z.number().optional(),
|
||||
street: z.string().optional(),
|
||||
expiryStarts: z.string().optional(),
|
||||
siteNo: z.string().optional(),
|
||||
siteName: z.string().optional(),
|
||||
expiryEnds: z.string().optional(),
|
||||
expiryStarts: z.string().optional(),
|
||||
});
|
||||
|
||||
export type BuildAddressUpdate = z.infer<typeof buildAddressUpdateSchema>;
|
||||
|
||||
@@ -100,7 +100,7 @@ export function BuildAddressDataTableUpdate({
|
||||
const dataIds = React.useMemo<UniqueIdentifier[]>(() => data?.map(({ _id }) => _id) || [], [data])
|
||||
|
||||
const deleteMutation = useDeletePersonMutation()
|
||||
const deleteHandler = (id: string) => { deleteMutation.mutate({ uuid: id }); setTimeout(() => { refetchTable() }, 200) }
|
||||
const deleteHandler = (id: string) => { deleteMutation.mutate({ uuid: id }); setTimeout(() => { refetchTable() }, 400) }
|
||||
const columns = getColumns(router, deleteHandler);
|
||||
const pagination = React.useMemo(() => ({ pageIndex: currentPage - 1, pageSize: pageSize, }), [currentPage, pageSize])
|
||||
const totalPages = Math.ceil(totalCount / pageSize)
|
||||
|
||||
Reference in New Issue
Block a user