fix: stop tracking db file, fix warranty date format, add serial number input

This commit is contained in:
duongcamcute
2026-01-24 23:09:32 +07:00
parent 911b121707
commit d4e145040d
5 changed files with 13 additions and 3 deletions

6
.gitignore vendored
View File

@@ -33,7 +33,11 @@ yarn-error.log*
# env files (can opt-in for committing if needed)
# env files
.env*
!dev.db
*.db
*.db-journal
prisma/dev.db
prisma/*.db
# vercel
.vercel

View File

@@ -1,6 +1,6 @@
{
"name": "tech-gadget-manager",
"version": "1.2.2",
"version": "1.3.1",
"private": true,
"prisma": {
"seed": "tsx prisma/seed.ts"

Binary file not shown.

View File

@@ -238,7 +238,9 @@ function EditMode({ item, locations, onCancel, onClose }: { item: any, locations
status: item.status,
dueDate: item.lendingRecords?.[0]?.dueDate ? new Date(item.lendingRecords[0].dueDate).toISOString().split('T')[0] : null,
borrowDate: item.lendingRecords?.[0]?.borrowDate ? new Date(item.lendingRecords[0].borrowDate).toISOString().split('T')[0] : new Date().toISOString().split('T')[0],
borrowerName: item.lendingRecords?.[0]?.borrowerName || ""
borrowerName: item.lendingRecords?.[0]?.borrowerName || "",
warrantyEnd: item.warrantyEnd ? new Date(item.warrantyEnd).toISOString().split('T')[0] : null,
serialNumber: item.serialNumber || ""
}
});

View File

@@ -458,6 +458,10 @@ export function SmartAddForm({ locations, onSuccess }: SmartAddFormProps) {
<Label>Model ()</Label>
<Input {...form.register("model")} placeholder="A2337..." className="h-10 font-mono text-sm" />
</div>
<div className="space-y-1.5 col-span-2 lg:col-span-1">
<Label>Serial Number</Label>
<Input {...form.register("serialNumber")} placeholder="S/N..." className="h-10 font-mono text-sm" />
</div>
<div className="space-y-1.5 col-span-2 lg:col-span-1">
<Label>Trạng thái</Label>
<Select {...form.register("status")} className="bg-white focus:border-primary-500 h-10">