@extends('layouts.main') 
@section('title', 'Due Date Call (CI) Master')
@section('content')

<?php 
    $getstatecodedata = DB::table('state_master')->get();
?>
    <div class="container-fluid">
        <div class="page-header">
            <div class="row align-items-end">
                <div class="col-lg-8">
                    <div class="page-header-title">
                        <i class="ik ik-edit bg-blue"></i>
                        <div class="d-inline">
                            <h5>{{ __('Due Date Call (CI) Master')}}</h5>
                        </div>
                    </div>
                </div>
                <div class="col-lg-4">
                    <nav class="breadcrumb-container" aria-label="breadcrumb">
                        <ol class="breadcrumb">
                            <li class="breadcrumb-item">
                                <a href="{{route('dashboard')}}"><i class="ik ik-home"></i></a>
                            </li>
                            <li class="breadcrumb-item"><a href="#">{{ __('Forms')}}</a></li>
                        </ol>
                    </nav>
                </div>
            </div>
        </div>

        <div class="row">
            <div class="col-md-7 mx-auto">
                <div class="card">
                    <div class="card-header"><h3>{{ __('Due Date Call (CI) Master Form')}}</h3></div>
                    <div class="card-body">
                        <form class="forms-sample"  method='POST' @if(!empty($showdata)) action='{{ url('updateduedate') }}' @else action='{{ url('duedateinsert') }}' @endif>
                            @csrf
                            
                            @if(!empty($showdata))
                            <input type='hidden' name='id' value='{{$showdata[0]->id}}'>
                            @endif
                            
                            <div class="form-group">
                                <label for="due_date_id">{{ __('Due Date Id')}}</label>
                                <input type="number" class="form-control" id="due_date_id" name='due_date_id' <?php if(!empty($showdata)){ ?> value='{{$showdata[0]->due_date_id}}' <?php } ?> placeholder="Enter Due Date Id" required>
                            </div>
                            <div class="form-group">
                                <label for="due_date_outcome">{{ __('Due Date Outcome')}}</label>
                                <input type="text" class="form-control" id="due_date_outcome" name='due_date_outcome' <?php if(!empty($showdata)){ ?> value='{{$showdata[0]->due_date_outcome}}' <?php } ?> placeholder="Enter Due Date Outcome" required>
                            </div>
                            
                            <br><br>
                            <button type="submit" class="btn btn-primary mr-2">{{ __('Submit')}}</button>
                            @if(empty($showdata))
                            <a href='{{'duedate-master'}}' class="btn btn-light">{{ __('Cancel')}}</a>
                            @endif
                          </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
    
    <!-- push external js -->
    @push('script')
        <script src="{{ asset('js/form-components.js') }}"></script>
    @endpush
@endsection