@extends('crm.master') @section('title', 'Edit Closure') @section('content')

Edit Closure

{{ $closure->name }}

Back
@include('crm.components.alerts')
@csrf @method('PUT')
Closure Details
@error('name')
{{ $message }}
@enderror
@error('start_date')
{{ $message }}
@enderror
@error('end_date')
{{ $message }}
@enderror
Schedule
@foreach(['everyday' => 'Everyday', 'weekdays' => 'Weekdays', 'weekends' => 'Weekends', 'custom' => 'Custom'] as $val => $label) schedule) === $val ? 'checked' : '' }} onchange="toggleCustomDays()"> @endforeach
@php $savedCustomDays = $closure->applicable_days ?? []; $currentCustomDays = old('applicable_days', $savedCustomDays); $currentSchedule = old('schedule', $closure->schedule); @endphp
@foreach(['Mon','Tue','Wed','Thu','Fri','Sat','Sun'] as $day)
@endforeach
@error('applicable_days')
{{ $message }}
@enderror
Products

Select products to apply this closure to.

apply_to_all_products ? '1' : '0') == '1' ? 'checked' : '' }} onchange="toggleProductList()">
@php $selectedIds = old('product_ids', $closure->products->pluck('id')->toArray()); @endphp
@include('crm.components.product-selector')
Settings
enabled ? '1' : '0') == '1' ? 'checked' : '' }}>
Cancel
@endsection