@extends('admin.pros.view')
@section('content-inner')

    <div class="form-contents"><div class="failed-form-contents">

    <h4 class="d-flex m-0 p-3 stag-heading stag-heading-modal">
        <div>Payment Schedule Add New</div>
        <div class="ml-auto">
            <a class="text-secondary" href="#" up-close>
                <i class="fa fa-times"></i>
            </a>
        </div>
    </h4>

    <form action="/post-to-api"
          up-target="#main-content" up-history="false" up-fail-target=".failed-form-contents" up-reveal="true"
          method="post" enctype="multipart/form-data"
          class="border-top px-3 pt-3 pb-1 custom-submit">
        @csrf

        @if (session('message'))
            <div class="alert alert-danger">{{ session('message') }}</div>
        @endif

        <input type="hidden" name="_uid" value="{{ $record->uid }}">
        <input type="hidden" name="_api" value="/api/proRate/create">
        <input type="hidden" name="_success" value="{{route('pros_SINGLE-SUB_payment_schedule', ['uid' => $record->uid])}}">
        <input type="hidden" name="_return" value="{{route('pros_SINGLE-ACTION_payment_scheduleAddNew', ['uid' => $record->uid])}}">
        <input class='form-control' type='hidden' name='proUid' value='{{ old('proUid') ? old('proUid') : $record->uid }}' >
<div class='form-group mb-3'>
<label class='control-label'>Responsibility </label>
<select class='form-control' name='responsibility' value='{{ old('responsibility') ? old('responsibility') : '' }}' >
<option value=''>-- Select --</option>
<option <?= 'HCP' === (old('responsibility') ? old('responsibility') : '') ? 'selected' : '' ?> value='HCP'>HCP</option>
<option <?= 'NA' === (old('responsibility') ? old('responsibility') : '') ? 'selected' : '' ?> value='NA'>NA</option>
<option <?= 'CM' === (old('responsibility') ? old('responsibility') : '') ? 'selected' : '' ?> value='CM'>CM</option>
<option <?= 'RME' === (old('responsibility') ? old('responsibility') : '') ? 'selected' : '' ?> value='RME'>RME</option>
<option <?= 'RMM' === (old('responsibility') ? old('responsibility') : '') ? 'selected' : '' ?> value='RMM'>RMM</option>
</select>
</div>
<div class='form-group mb-3'>
<label class='control-label'>Code </label>
<select class='form-control' name='code' value='{{ old('code') ? old('code') : '' }}' >
<option value=''>-- Select --</option>
<option <?= 'CM20' === (old('code') ? old('code') : '') ? 'selected' : '' ?> value='CM20'>CM20</option>
<option <?= 'CM30' === (old('code') ? old('code') : '') ? 'selected' : '' ?> value='CM30'>CM30</option>
<option <?= 'CM60' === (old('code') ? old('code') : '') ? 'selected' : '' ?> value='CM60'>CM60</option>
<option <?= 'CM90' === (old('code') ? old('code') : '') ? 'selected' : '' ?> value='CM90'>CM90</option>
<option <?= 'RM20' === (old('code') ? old('code') : '') ? 'selected' : '' ?> value='RM20'>RM20</option>
<option <?= 'RM1' === (old('code') ? old('code') : '') ? 'selected' : '' ?> value='RM1'>RM1</option>
<option <?= 'RM20' === (old('code') ? old('code') : '') ? 'selected' : '' ?> value='RM20'>RM20</option>
<option <?= 'RM30' === (old('code') ? old('code') : '') ? 'selected' : '' ?> value='RM30'>RM30</option>
<option <?= 'RM60' === (old('code') ? old('code') : '') ? 'selected' : '' ?> value='RM60'>RM60</option>
</select>
</div>
<div class='form-group mb-3'>
<label class='control-label'>Amount </label>
<input class='form-control' type='number' name='amount' value='{{ old('amount') ? old('amount') : '' }}' >
</div>
        <div class="form-group mb-3 d-flex justify-content-center">
            <button class="btn btn-sm btn-primary mr-3 px-5">Submit</button>
            <a href="{{route('pros_SINGLE-SUB_payment_schedule', ['uid' => $record->uid])}}" class="btn btn-sm btn-default px-5" up-close>Cancel</a>
        </div>
    </form>

    </div></div>

@endsection
