mirror of
https://github.com/duongcamcute/tech-gadget-manager.git
synced 2026-03-03 02:27:01 +00:00
fix: stop tracking db file, fix warranty date format, add serial number input
This commit is contained in:
6
.gitignore
vendored
6
.gitignore
vendored
@@ -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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "tech-gadget-manager",
|
||||
"version": "1.2.2",
|
||||
"version": "1.3.1",
|
||||
"private": true,
|
||||
"prisma": {
|
||||
"seed": "tsx prisma/seed.ts"
|
||||
|
||||
BIN
prisma/dev.db
BIN
prisma/dev.db
Binary file not shown.
@@ -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 || ""
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -458,6 +458,10 @@ export function SmartAddForm({ locations, onSuccess }: SmartAddFormProps) {
|
||||
<Label>Model (Mã)</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">
|
||||
|
||||
Reference in New Issue
Block a user