<div class="">
    <div class="">
        <div class="d-flex align-items-center mb-2 border-bottom pb-2">
            <p class="font-weight-bold text-secondary m-0 mr-2">RM Reasons</p>
        </div>
        @if(!$careMonth->rmReasons || !count($careMonth->rmReasons))
            <span class="text-secondary">None</span>
        @else
            <div>
                @foreach($careMonth->rmReasons as $reason)
                    <div class="border-bottom pb-1 mb-1 d-flex align-items-start">
                        <b class="width-90px">{{$reason->code}}</b>
                        <span class="width-200px">{{$reason->description}}</span>
                        <div moe class="ml-3">
                            <a start show><i class="fa fa-edit on-hover-opaque"></i></a>
                            <form url="/api/careMonthCmRmReason/updateBasic" class="mcp-theme-1">
                                <input type="hidden" name="uid" value="{{$reason->uid}}">
                                <div class="mb-2">
                                    <label class="text-sm mb-1 text-secondary">Code *</label>
                                    <input type="text" class="form-control form-control-sm"
                                           name="code" value="{{$reason->code}}" required>
                                </div>
                                <div class="mb-2">
                                    <label class="text-sm mb-1 text-secondary">Description</label>
                                    <input type="text" class="form-control form-control-sm"
                                           name="description" value="{{$reason->description}}">
                                </div>
                                <div>
                                    <button submit class="btn btn-sm btn-primary mr-1">Submit</button>
                                    <button cancel class="btn btn-sm btn-default border">Cancel</button>
                                </div>
                            </form>
                        </div>
                    </div>
                @endforeach
            </div>
        @endif
        <div>
            <div moe>
                <a start show>+ Add</a>
                <form url="/api/careMonthCmRmReason/create" class="mcp-theme-1">
                    <input type="hidden" name="careMonthUid" value="{{$careMonth->uid}}">
                    <input type="hidden" name="cmOrRm" value="RM">
                    <div class="mb-2">
                        <label class="text-sm mb-1 text-secondary">Code *</label>
                        <input type="text" class="form-control form-control-sm"
                               name="code" value="" required>
                    </div>
                    <div class="mb-2">
                        <label class="text-sm mb-1 text-secondary">Description</label>
                        <input type="text" class="form-control form-control-sm"
                               name="description" value="">
                    </div>
                    <div>
                        <button submit class="btn btn-sm btn-primary mr-1">Submit</button>
                        <button cancel class="btn btn-sm btn-default border">Cancel</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>