refactor: changes to inventory status (approved/unapprove)
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user