refactor: update type imports to use 'type' for better TypeScript compatibility across the codebase

This commit is contained in:
2026-05-11 19:06:54 +02:00
parent fd18692110
commit 5ac2dc5277
40 changed files with 75 additions and 74 deletions
@@ -1,6 +1,6 @@
"use server"
import { AssetWithAssignment } from "@/lib/types"
import type { AssetWithAssignment } from "@/lib/types"
import { AssetService } from "@/services/asset.service"
import { ItemService } from "@/services/item.service"
import { RecipientService } from "@/services/recipient.service"
@@ -9,10 +9,10 @@ import { SubmitButton } from "@/components/forms/submitButton"
import { ItemStatus } from "@/generated/prisma/client"
import { updateAssetAction } from "@/lib/actions/asset.actions"
import {
UpdateAssetFormType,
type UpdateAssetFormType,
updateAssetSchema,
} from "@/lib/schemas/asset.schemas"
import {
import type {
AssetWithAssignment,
Item,
Recipient,
@@ -9,10 +9,10 @@ import { SubmitButton } from "@/components/forms/submitButton"
import { ItemStatus } from "@/generated/prisma/client"
import { createAssetAction } from "@/lib/actions/asset.actions"
import {
CreateAssetFormType,
type CreateAssetFormType,
createAssetSchema,
} from "@/lib/schemas/asset.schemas"
import { ItemWithoutStock, Recipient } from "@/lib/types"
import type { ItemWithoutStock, Recipient } from "@/lib/types"
interface NewAssetFormProps {
items: ItemWithoutStock[]
@@ -8,10 +8,10 @@ import { toast } from "sonner"
import { SubmitButton } from "@/components/forms/submitButton"
import { updateCategoryAction } from "@/lib/actions/category.actions"
import {
UpdateCategoryFormType,
type UpdateCategoryFormType,
updateCategorySchema,
} from "@/lib/schemas/category.schemas"
import { CategorySummary } from "@/lib/types"
import type { CategorySummary } from "@/lib/types"
export default function EditCategoryForm({
category,
@@ -8,7 +8,7 @@ import { toast } from "sonner"
import { SubmitButton } from "@/components/forms/submitButton"
import { createCategoryAction } from "@/lib/actions/category.actions"
import {
CreateCategoryFormType,
type CreateCategoryFormType,
createCategorySchema,
} from "@/lib/schemas/category.schemas"
@@ -8,10 +8,10 @@ import { toast } from "sonner"
import { SubmitButton } from "@/components/forms/submitButton"
import { createItemAction } from "@/lib/actions/item.actions"
import {
CreateItemFormType,
type CreateItemFormType,
createItemSchema,
} from "@/lib/schemas/item.schemas"
import { CategorySummary } from "@/lib/types"
import type { CategorySummary } from "@/lib/types"
export default function NewItemForm({
categories,
@@ -8,10 +8,10 @@ import { toast } from "sonner"
import { SubmitButton } from "@/components/forms/submitButton"
import { updateItemAction } from "@/lib/actions/item.actions"
import {
UpdateItemFormType,
type UpdateItemFormType,
updateItemSchema,
} from "@/lib/schemas/item.schemas"
import { CategorySummary, ItemWithAssetCount } from "@/lib/types"
import type { CategorySummary, ItemWithAssetCount } from "@/lib/types"
export default function UpdateItemForm({
categories,