- @extends('layout')
- @includes('includes/small-feature')
- <div class="container mx-auto px-8 py-8 md:py-16">
- <h1 class="text-3xl font-bold">
- Add an item
- </h1>
- <form
- method="post"
- action="{{ $createAction }}"
- class="flex flex-col w-full space-y-4 max-w-xl my-4"
- >
- @if(session()->has('create_item_errors'))
- <ol class="list-disc text-red-500">
- @foreach(session('create_item_errors') as $field => $errors)
- @foreach($errors as $error)
- <li>{{ $error }}</li>
- @endforeach
- @endforeach
- </ol>
- @endif
- <input type="hidden" name="csrf" value="{{ $csrf }}" />
- <label for="sku" class="flex flex-col w-full">
- <span class="flex">SKU:</span>
- <input
- id="sku"
- name="sku"
- type="text"
- class="bg-gray-50 rounded-lg p-2 text-gray-900"
- placeholder="WH-001"
- />
- </label>
- <label for="name" class="flex flex-col w-full">
- <span class="flex">Name:</span>
- <input
- id="name"
- name="name"
- type="text"
- class="bg-gray-50 rounded-lg p-2 text-gray-900"
- placeholder="Packing tape"
- />
- </label>
- <label for="description" class="flex flex-col w-full">
- <span class="flex">Description:</span>
- <input
- id="description"
- name="description"
- type="text"
- class="bg-gray-50 rounded-lg p-2 text-gray-900"
- />
- </label>
- <label for="reorder_level" class="flex flex-col w-full">
- <span class="flex">Reorder level (0 = no alert):</span>
- <input
- id="reorder_level"
- name="reorder_level"
- type="number"
- class="bg-gray-50 rounded-lg p-2 text-gray-900"
- placeholder="10"
- />
- </label>
- <button
- type="submit"
- class="bg-indigo-500 rounded-lg p-2 text-white"
- >
- Add item
- </button>
- </form>
- </div>
|