@extends('Admin.master_page')

@section('title') <h5 class="m-0 font-weight-bold text-primary" style="float: left;">Category Update</h5> 

<a href="{{ route('StatusCategory.index') }}" style="float: right;"><i class="fas fa-chevron-circle-left"></i></a>
@endsection

@section('content')

<div class="intro-y box"> 
        
        <form action="{{ route('StatusCategory.update' , $status->id) }}" method="POST">
            @csrf


        <input type="hidden" name="_method" value="put" />
        <label for="Name" >Name:</label>
        <div class="input-group" style="margin-top: 10px;">
           <input type="text" name="name" value="{{ $status->name }}" class="form-control" placeholder="Title">
            @error('name')
            <span class="alert-danger">{{ $message }}</span>
            @enderror
        </div>

        <br>

        <label for="Name" >Status:</label>
        <div class="input-group" style="margin-top: 10px;">
           <select class="form-control" name="status" >
               <option value="">Please Select one</option>
               <option value="1" @if($status->status == 1) selected @endif>Operational</option>
               <option value="2" @if($status->status == 2) selected @endif>Under maintenance</option>
               <option value="3" @if($status->status == 3) selected @endif>Degraded performance</option>
               <option value="4" @if($status->status == 4) selected @endif>Partial outage</option>
               <option value="5" @if($status->status == 5) selected @endif>Major outage</option>
           </select>
            @error('status')
            <span class="alert-danger">{{ $message }}</span>
            @enderror
        </div>

        <br>

        <button type="submit" class="btn btn-primary">Update</button>
        </form>
    </div>



@endsection