{{-- Backdrop --}} @if($isOpen)
@endif {{-- Unsaved Changes Confirmation --}}

Unsaved Changes

You have unsaved changes. Are you sure you want to close?

{{-- Duplicate Confirmation --}} @if($showDuplicateConfirm)

Potential Duplicates Found

Similar designs already exist. Are you sure you want to create a new one?

@foreach($similarDesigns as $match)
RT{{ $match['id'] }} {{ $match['description'] }} @if(!empty($match['reason'])) {{ $match['reason'] }} @endif
@endforeach
@endif {{-- Slide Panel --}}
@if($isOpen && ($this->style || $isNewStyle)) {{-- Header --}}
@if($isNewStyle)

New Style

@else {{ $design_id }}

{{ $design_description }}

@endif @if($isDirty) Unsaved @endif
{{-- Toast Notifications --}} @if(session()->has('message'))
{{ session('message') }}
@endif @if(session()->has('error'))
{{ session('error') }}
@endif {{-- Tabs --}} @if(!$isNewStyle) @endif {{-- Content --}}
@if($isNewStyle) {{-- New Style Form --}}
Creating a new Design & Style

This will create a new Design (RT number). If a design already exists for this product, find it in the list and create a style from there to avoid duplication.

New Style Details

{{-- Validation Errors Summary --}} @if($errors->any())
Please fix the following errors:
    @foreach($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif
@error('new_design_description')
{{ $message }}
@enderror
@error('seasons_id')
{{ $message }}
@enderror
@error('customers_id')
{{ $message }}
@enderror
@error('departments_id')
{{ $message }}
@enderror
@error('factory_id')
{{ $message }}
@enderror
@error('customer_ref')
{{ $message }}
@enderror
@error('category')
{{ $message }}
@enderror
@error('notes')
{{ $message }}
@enderror
@elseif($activeTab === 'details') {{-- Details Tab --}}

Style Information

@error('seasons_id')
{{ $message }}
@enderror
@error('customers_id')
{{ $message }}
@enderror
@error('departments_id')
{{ $message }}
@enderror
@error('category')
{{ $message }}
@enderror
@error('customer_ref')
{{ $message }}
@enderror
@error('design_description')
{{ $message }}
@enderror
@error('notes')
{{ $message }}
@enderror
{{-- Version Section --}} @if($this->style->style_versions->count() > 0)

Version

@if($this->style->style_versions->count() > 1)
@foreach($this->style->style_versions as $version) @endforeach
@endif
@error('version_name')
{{ $message }}
@enderror
@error('factory_id')
{{ $message }}
@enderror
@endif @elseif($activeTab === 'colourways') {{-- Colourways Tab --}}
{{-- Colourway Sidebar --}}
{{ $this->style->style_versions->find($activeVersionId)?->colourways->count() ?? 0 }} Colourways
@if($activeVersionId) @foreach($this->style->style_versions->find($activeVersionId)?->colourways ?? [] as $cw) @endforeach @endif
{{-- Colourway Editor --}}
@if($activeColourwayId) {{-- Action Bar --}}
{{-- Image Upload with Drag & Drop and Paste --}}
@if($new_image) New image @elseif($colourway_image) Current image @else
No Image
@endif {{-- Drag overlay --}}
Drop image here
Drag & drop, paste, or click to upload
Uploading...
{{-- Fields --}}
@error('colourway_name')
{{ $message }}
@enderror
@error('colourway_customer_description')
{{ $message }}
@enderror
@error('colourway_composition')
{{ $message }}
@enderror
@else

Select a colourway to edit

or add a new one
@endif
@else {{-- History Tab --}}
@if($this->auditHistory->isEmpty())

No history available

History tracking was enabled in December 2023
@else @php $hasCreationRecord = $this->auditHistory->contains(fn($a) => $a->event === 'Created' && $a->model_type === 'Style'); @endphp @if(!$hasCreationRecord)
This style was created before history tracking was enabled (Dec 2023)
@endif
@foreach($this->auditHistory as $audit)
@if($audit->event === 'Created') @elseif($audit->event === 'Updated') @elseif($audit->event === 'Deleted') @else @endif
{{ $audit->model_type }}@if($audit->item_name) "{{ Str::limit($audit->item_name, 10) }}"@endif {{ $audit->event }} {{ $audit->user_name }} {{ $audit->created_at->diffForHumans() }}
@if(!empty($audit->changes))
@foreach($audit->changes as $change)
{{ $change['field'] }}: @if($audit->event !== 'Created') {{ $change['old'] }} @endif {{ $change['new'] }}
@endforeach
@endif
@endforeach
@endif
@endif
{{-- Footer --}} @endif