施肥散布実績機能を実装し運搬・作業記録・在庫連携を追加
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
import { useEffect, useState, useMemo, useCallback } from 'react';
|
||||
import { useRouter } from 'next/navigation';
|
||||
import { Plus, X, ChevronUp, ChevronDown, Pencil, Check, Truck, ArrowLeft } from 'lucide-react';
|
||||
import { Plus, X, ChevronUp, ChevronDown, Pencil, Check, Truck, ArrowLeft, Sprout } from 'lucide-react';
|
||||
import Navbar from '@/components/Navbar';
|
||||
import { DeliveryPlan, DeliveryAllEntry } from '@/types';
|
||||
import { api } from '@/lib/api';
|
||||
@@ -676,9 +676,20 @@ export default function DeliveryEditPage({ planId }: Props) {
|
||||
運搬計画一覧
|
||||
</button>
|
||||
|
||||
<h1 className="text-xl font-bold text-gray-900 mb-6">
|
||||
{isEdit ? '運搬計画を編集' : '運搬計画を新規作成'}
|
||||
</h1>
|
||||
<div className="mb-6 flex items-center justify-between gap-4">
|
||||
<h1 className="text-xl font-bold text-gray-900">
|
||||
{isEdit ? '運搬計画を編集' : '運搬計画を新規作成'}
|
||||
</h1>
|
||||
{isEdit && planId && (
|
||||
<button
|
||||
onClick={() => router.push(`/fertilizer/spreading?year=${year}&delivery_plan=${planId}`)}
|
||||
className="flex items-center gap-2 rounded-md border border-emerald-300 px-4 py-2 text-sm text-emerald-700 hover:bg-emerald-50"
|
||||
>
|
||||
<Sprout className="h-4 w-4" />
|
||||
この運搬計画から散布実績へ進む
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{saveError && (
|
||||
<div className="flex items-start gap-2 bg-red-50 border border-red-300 text-red-700 rounded-md px-4 py-3 mb-4 text-sm">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import { useEffect, useState } from 'react';
|
||||
import { useRouter } from 'next/navigation';
|
||||
import { Truck, Plus, FileDown, Pencil, Trash2, X } from 'lucide-react';
|
||||
import { Truck, Plus, FileDown, Pencil, Trash2, X, Sprout } from 'lucide-react';
|
||||
import Navbar from '@/components/Navbar';
|
||||
import { api } from '@/lib/api';
|
||||
import { DeliveryPlanListItem } from '@/types';
|
||||
@@ -75,13 +75,22 @@ export default function DeliveryListPage() {
|
||||
<Truck className="h-7 w-7 text-green-700" />
|
||||
<h1 className="text-2xl font-bold text-gray-900">運搬計画</h1>
|
||||
</div>
|
||||
<button
|
||||
onClick={() => router.push('/distribution/new')}
|
||||
className="flex items-center gap-2 px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 transition-colors text-sm font-medium"
|
||||
>
|
||||
<Plus className="h-4 w-4" />
|
||||
新規作成
|
||||
</button>
|
||||
<div className="flex items-center gap-3">
|
||||
<button
|
||||
onClick={() => router.push('/fertilizer/spreading')}
|
||||
className="flex items-center gap-2 rounded-md border border-emerald-300 px-4 py-2 text-sm font-medium text-emerald-700 hover:bg-emerald-50 transition-colors"
|
||||
>
|
||||
<Sprout className="h-4 w-4" />
|
||||
散布実績
|
||||
</button>
|
||||
<button
|
||||
onClick={() => router.push('/distribution/new')}
|
||||
className="flex items-center gap-2 px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 transition-colors text-sm font-medium"
|
||||
>
|
||||
<Plus className="h-4 w-4" />
|
||||
新規作成
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* 年度セレクタ */}
|
||||
|
||||
Reference in New Issue
Block a user