Nelze vybrat více než 25 témat
Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
|
- @extends('layout')
- @includes('includes/small-feature')
- <div class="container mx-auto px-8 py-8 md:py-16">
- <h1 class="text-3xl font-bold">
- Withdraw stock — {{ $item->name }}
- </h1>
-
- @if(count($stock) === 0)
- <p class="text-gray-500 my-4">There's no stock anywhere to withdraw from.</p>
- @endif
-
- @if(count($stock) > 0)
- <form
- method="post"
- action="{{ $withdrawAction }}"
- class="flex flex-col w-full space-y-4 max-w-xl my-4"
- >
- @if(session()->has('withdraw_errors'))
- <ol class="list-disc text-red-500">
- @foreach(session('withdraw_errors') as $field => $errors)
- @foreach($errors as $error)
- <li>{{ $error }}</li>
- @endforeach
- @endforeach
- </ol>
- @endif
- <input type="hidden" name="csrf" value="{{ $csrf }}" />
- <label for="location_id" class="flex flex-col w-full">
- <span class="flex">Location:</span>
- <select
- id="location_id"
- name="location_id"
- class="bg-gray-50 rounded-lg p-2 text-gray-900"
- >
- @foreach($stock as $row)
- <option value="{{ $row->location_id }}">{{ $row->location->code }} — {{ $row->location->name }} ({{ $row->quantity }} available)</option>
- @endforeach
- </select>
- </label>
- <label for="quantity" class="flex flex-col w-full">
- <span class="flex">Quantity:</span>
- <input
- id="quantity"
- name="quantity"
- type="number"
- class="bg-gray-50 rounded-lg p-2 text-gray-900"
- placeholder="1"
- />
- </label>
- <label for="notes" class="flex flex-col w-full">
- <span class="flex">Notes (optional):</span>
- <input
- id="notes"
- name="notes"
- type="text"
- class="bg-gray-50 rounded-lg p-2 text-gray-900"
- />
- </label>
- <button
- type="submit"
- class="bg-indigo-500 rounded-lg p-2 text-white"
- >
- Withdraw
- </button>
- </form>
- @endif
- </div>
|