@php $editing = $part->exists; $input = 'mt-1 block w-full min-h-12 text-base border-gray-300 focus:border-indigo-500 focus:ring-indigo-500 rounded-lg shadow-sm'; $section = 'rounded-xl bg-white p-4 shadow-sm sm:p-6 space-y-4'; $heading = 'text-lg font-semibold text-gray-900'; $categoryId = old('part_category_id', $part->part_category_id); @endphp ← {{ $editing ? $part->name : 'Parts' }}

{{ $editing ? 'Edit product' : ($part->parent_id ? 'Add variant' : 'Add product') }}

@csrf @if ($editing) @method('PUT') @endif @if ($errors->any()) @endif {{-- ========== Product ========== --}}

Product

Short: model + key part + type, e.g. "iPhone 13 Display OLED".

No sub-categories. Add them on the category page.

{{ $editing ? 'You can change it. Must be different from other parts.' : 'Leave empty to make one automatically.' }}

{{-- Variant of another product --}}

Variant (optional): the same product in another colour or version. Each variant is its own product with its own code and stock.

@if ($part->parent)

Variant of {{ $part->parent->name }}

@endif
{{-- ========== Prices and stock ========== --}}

Prices and stock

Only admin sees this. Updated to the average when stock is bought.

@foreach ($levels as $level)
@endforeach

Staff cannot sell or invoice below this. Only an admin can.

Used when VAT is turned on.

Low stock warning at this quantity. 0 = no warning.

@unless ($editing)

Saved as "Opening stock" at your branch, at the cost price above.

@endunless
{{-- ========== Compatible models ========== --}}

Fits these models

One part can fit several models, e.g. the same screen for two phones.

{{-- Chosen --}}

No models chosen yet.

{{-- Search and add --}}
  • No model found. Admin can add models under Devices.
{{-- ========== Photo and notes ========== --}}

Photo and notes

@if ($part->photo_path)
@endif

Resized to 800px and kept private.