refactor: changes to inventory status (approved/unapprove)
All checks were successful
Koori-ERP-Deploy-System / deploy-demo (push) Successful in 1m6s
Koori-ERP-Deploy-System / deploy-production (push) Has been skipped

This commit is contained in:
2026-01-29 13:04:54 +08:00
parent 46753cc3bc
commit 56e30a85bb
11 changed files with 683 additions and 398 deletions

View File

@@ -220,11 +220,11 @@ export default function Index({ auth, docs, warehouses, filters }: any) {
</div>
</div>
<DialogFooter>
<Button type="button" variant="outline" onClick={() => setIsCreateDialogOpen(false)}>
<Button type="button" variant="outline" className="button-outlined-primary" onClick={() => setIsCreateDialogOpen(false)}>
</Button>
<Button type="submit" className="button-filled-primary" disabled={processing || !data.warehouse_id}>
</Button>
</DialogFooter>
</form>
@@ -244,6 +244,7 @@ export default function Index({ auth, docs, warehouses, filters }: any) {
<TableHead></TableHead>
<TableHead></TableHead>
<TableHead></TableHead>
<TableHead></TableHead>
<TableHead></TableHead>
<TableHead></TableHead>
<TableHead className="text-center"></TableHead>
@@ -252,7 +253,7 @@ export default function Index({ auth, docs, warehouses, filters }: any) {
<TableBody>
{docs.data.length === 0 ? (
<TableRow>
<TableCell colSpan={8} className="text-center h-24 text-gray-500">
<TableCell colSpan={9} className="text-center h-24 text-gray-500">
</TableCell>
</TableRow>
@@ -266,6 +267,11 @@ export default function Index({ auth, docs, warehouses, filters }: any) {
<TableCell>{doc.warehouse_name}</TableCell>
<TableCell>{getStatusBadge(doc.status)}</TableCell>
<TableCell className="text-gray-500 text-sm">{doc.snapshot_date}</TableCell>
<TableCell>
<span className="font-medium text-gray-700">{doc.counted_items}</span>
<span className="text-gray-400 mx-1">/</span>
<span className="text-gray-500">{doc.total_items}</span>
</TableCell>
<TableCell className="text-gray-500 text-sm">{doc.completed_at || '-'}</TableCell>
<TableCell className="text-sm">{doc.created_by}</TableCell>
<TableCell className="text-center">
@@ -279,11 +285,10 @@ export default function Index({ auth, docs, warehouses, filters }: any) {
title={doc.status === 'completed' ? '查閱' : '盤點'}
>
{doc.status === 'completed' ? (
<Eye className="w-4 h-4 mr-1" />
<Eye className="w-4 h-4" />
) : (
<Pencil className="w-4 h-4 mr-1" />
<Pencil className="w-4 h-4" />
)}
{doc.status === 'completed' ? '查閱' : '盤點'}
</Button>
</Link>
</Can>