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

@@ -1,7 +1,7 @@
import { useState, useEffect } from "react";
import AuthenticatedLayout from "@/Layouts/AuthenticatedLayout";
import { Head, router, usePage } from "@inertiajs/react";
import { Head, router, usePage, Link } from "@inertiajs/react";
import { Button } from "@/Components/ui/button";
import { Input } from "@/Components/ui/input";
import { Label } from "@/Components/ui/label";
@@ -132,32 +132,6 @@ export default function Show({ auth, order }) {
return (
<AuthenticatedLayout
user={auth.user}
header={
<div className="flex justify-between items-center">
<h2 className="font-semibold text-xl text-gray-800 leading-tight flex items-center gap-2">
<ArrowLeft className="h-5 w-5 cursor-pointer" onClick={() => router.visit(route('inventory.transfer.index'))} />
調 ({order.doc_no})
</h2>
<div className="flex gap-2">
{!isReadOnly && (
<>
<Button variant="destructive" onClick={handleDelete}>
<Trash2 className="h-4 w-4 mr-2" />
</Button>
<Button variant="outline" onClick={handleSave} disabled={isSaving}>
<Save className="h-4 w-4 mr-2" />
稿
</Button>
<Button onClick={handlePost} disabled={items.length === 0}>
<CheckCircle className="h-4 w-4 mr-2" />
</Button>
</>
)}
</div>
</div>
}
breadcrumbs={[
{ label: '首頁', href: '/' },
{ label: '庫存調撥', href: route('inventory.transfer.index') },
@@ -166,8 +140,44 @@ export default function Show({ auth, order }) {
>
<Head title={`調撥單 ${order.doc_no}`} />
<div className="py-12">
<div className="max-w-7xl mx-auto sm:px-6 lg:px-8 space-y-6">
<div className="container mx-auto p-6 max-w-7xl">
<div className="mb-6">
<Link href={route('inventory.transfer.index')}>
<Button
variant="outline"
className="gap-2 button-outlined-primary mb-6"
>
<ArrowLeft className="h-4 w-4" />
調
</Button>
</Link>
<div className="flex justify-between items-center">
<h2 className="font-bold text-2xl text-gray-800 leading-tight flex items-center gap-2">
調 ({order.doc_no})
</h2>
<div className="flex gap-2">
{!isReadOnly && (
<>
<Button variant="destructive" onClick={handleDelete}>
<Trash2 className="h-4 w-4 mr-2" />
</Button>
<Button variant="outline" onClick={handleSave} disabled={isSaving}>
<Save className="h-4 w-4 mr-2" />
稿
</Button>
<Button onClick={handlePost} disabled={items.length === 0}>
<CheckCircle className="h-4 w-4 mr-2" />
</Button>
</>
)}
</div>
</div>
</div>
<div className="space-y-6">
{/* Header Info */}
<div className="bg-white p-6 rounded-lg shadow-sm border border-gray-100 grid grid-cols-1 md:grid-cols-4 gap-6">
<div>