@extends('layouts.head_office_app') @section('title','Create/Edit National Alert') @section('content')
@if(!isset($nationalAlert))Create New @else Edit @endif Patient Safety Alert
@if ($errors->any())
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif
@csrf @if(request()->query('copying'))
Copying will create a new alert!
@endif @if(isset($nationalAlert) && $nationalAlert->created_by == 'head_office') @elseif(request()->query('cloning')) @endif

@foreach(\App\Models\NationalAlert::$types as $type) @endforeach
type != "Medicines Recall" && $nationalAlert->type != "Company-Led Medicines Recall/Notification")) style="display:none;" @endif> Medicines Recall

type != 'Custom' ) style="display:none" @endif > type == 'Custom' ) value="{{$nationalAlert->custom_type}}" @endif>
hasOriginator('Custom')) style="display:none" @endif> hasOriginator('Custom')) value="{{$nationalAlert->custom_originator}}" @endif>
action_within != 'Custom' ) style="display:none" @endif> action_within == 'Custom') value="{{$nationalAlert->action_within_days}}" @endif >
schedule_later != 'yes') style="display:none" @endif >
@if(request()->query('cloning') == 0 && isset($nationalAlert) && $nationalAlert->canEditScheduleDateTime() == false) You cannot change this option now. The alert is already dispatched. @endif
query('cloning') == 0 && isset($nationalAlert) && $nationalAlert->canEditScheduleDateTime() == false) readonly @endif name="schedule_date" class="datepicker schedule_date form-control" min="{{date('Y-m-d',strtotime('+1 day'))}}" @if(isset($nationalAlert) && $nationalAlert->schedule_later == 'yes') value="{{date('Y-m-d',strtotime($nationalAlert->start_time))}}" @endif >

query('cloning') == 0 && isset($nationalAlert) && $nationalAlert->canEditScheduleDateTime() == false) readonly @endif name="schedule_time" class="datepicker schedule_time form-control" @if(isset($nationalAlert) && $nationalAlert->schedule_later == 'yes') value="{{date('H:i',strtotime($nationalAlert->start_time))}}" @endif>
@endsection @section('styles') @endsection @section('scripts') @endsection