@extends('layouts.admin_app') @section('title','Create/Edit National Alert') @section('content')

@if(!isset($nationalAlert))Create New @else Edit @endif National Alert

@if ($errors->any())
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif
@csrf

@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 >
send_to_head_offices_or_location != 'head_offices') style="display:none;" @endif>
send_to_head_offices_or_location != 'locations') style="display:none;" @endif>
schedule_later != 'yes') style="display:none" @endif >
@if(isset($nationalAlert) && $nationalAlert->canEditScheduleDateTime() == false) You cannot change this option now. The alert is already dispatched. @endif
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 >

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