@extends('layouts.master')
@section('title', 'Detail Factor')
@section('content')
    <div class="page-content">
        <nav class="page-breadcrumb">
            <ol class="breadcrumb">
                <li class="breadcrumb-item"><a href="#">Master</a></li>
                <li class="breadcrumb-item"><a href="{{ route('admin.factors.index') }}">Factors</a></li>
                <li class="breadcrumb-item active" aria-current="page">Detail Factor</li>
            </ol>
        </nav>
        <div class="row">
            <div class="col-12 col-lg-6 grid-margin stretch-card">
                <div class="card">
                    <div class="card-body">
                        <h4 class="card-title">Detail Factor</h4>
                        <form class="custom-validation" action="{{ route('admin.factors.update', $factor->id) }}" method="POST" enctype="multipart/form-data">
                            @csrf
                            @method('PUT')
                            <div class="mb-3">
                                <label class="form-label">Name</label>
                                <input type="text" name="name" id="name" class="form-control @error('name') is-invalid @enderror" disabled placeholder="Enter name" value="{{ old('name', $factor->name) }}" />
                                @error('name')
                                    <span class="invalid-feedback" role="alert">
                                        <strong>{{ $message }}</strong>
                                    </span>
                                @enderror
                            </div>
                            <div class="mb-3">
                                <div class="mb-3">
                                    <label class="form-label">Status</label>
                                    <select name="status" id="statusAddiction" class="form-select" disabled>
                                        <option value="active" {{ $factor->status == 'active' ? 'selected' : '' }}>Active</option>
                                        <option value="inactive" {{ $factor->status == 'inactive' ? 'selected' : '' }}>Inactive</option>
                                    </select>
                                </div>
                            </div>
                        </form>

                    </div>
                </div>
            </div>
        </div>
    </div>
@endsection
