690602:1503 ADR-033-233 #05
This commit is contained in:
@@ -42,6 +42,7 @@ export default function OrganizationsPage() {
|
||||
const { data: organizations, isLoading } = useOrganizations({
|
||||
search: search || undefined,
|
||||
});
|
||||
const organizationList: Organization[] = Array.isArray(organizations) ? (organizations as Organization[]) : [];
|
||||
|
||||
const deleteOrg = useDeleteOrganization();
|
||||
|
||||
@@ -171,7 +172,7 @@ export default function OrganizationsPage() {
|
||||
))}
|
||||
</div>
|
||||
) : (
|
||||
<DataTable columns={columns} data={organizations || []} />
|
||||
<DataTable columns={columns} data={organizationList} />
|
||||
)}
|
||||
|
||||
<OrganizationDialog open={dialogOpen} onOpenChange={setDialogOpen} organization={selectedOrganization} />
|
||||
|
||||
@@ -52,6 +52,7 @@ type ProjectFormData = z.infer<typeof projectSchema>;
|
||||
export default function ProjectsPage() {
|
||||
const [search, setSearch] = useState('');
|
||||
const { data: projects, isLoading } = useProjects({ search: search || undefined });
|
||||
const projectList: Project[] = Array.isArray(projects) ? (projects as Project[]) : [];
|
||||
|
||||
const createProject = useCreateProject();
|
||||
const updateProject = useUpdateProject();
|
||||
@@ -212,7 +213,7 @@ export default function ProjectsPage() {
|
||||
))}
|
||||
</div>
|
||||
) : (
|
||||
<DataTable columns={columns} data={projects || []} />
|
||||
<DataTable columns={columns} data={projectList} />
|
||||
)}
|
||||
|
||||
<Dialog open={dialogOpen} onOpenChange={setDialogOpen}>
|
||||
|
||||
@@ -37,6 +37,7 @@ export default function NumberingLogsPage() {
|
||||
queryKey: ['numbering-errors'],
|
||||
queryFn: logService.getNumberingErrors,
|
||||
});
|
||||
const errorList: NumberingError[] = Array.isArray(errors) ? (errors as NumberingError[]) : [];
|
||||
|
||||
const columns: ColumnDef<NumberingError>[] = [
|
||||
{
|
||||
@@ -82,7 +83,7 @@ export default function NumberingLogsPage() {
|
||||
<RefreshCw className="h-8 w-8 animate-spin text-muted-foreground" />
|
||||
</div>
|
||||
) : (
|
||||
<DataTable columns={columns} data={errors} />
|
||||
<DataTable columns={columns} data={errorList} />
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user