<?php $__env->startSection('title','Create New Remark | '); ?>
<?php $__env->startSection('content'); ?>
<!-- Content Header (Page header) -->
<div class="content-header">
    <div class="container-fluid">
        <div class="row mb-2">
            <div class="col-sm-6">
                <h1 class="m-0">New Remark</h1>
            </div><!-- /.col -->
            <div class="col-sm-6">
                <ol class="breadcrumb float-sm-right">
                    <li class="breadcrumb-item"><a href="#">Home</a></li>
                    <li class="breadcrumb-item active">Remarks</li>
                </ol>
            </div><!-- /.col -->
        </div><!-- /.row -->
    </div><!-- /.container-fluid -->
</div>
<!-- /.content-header -->
<!-- Main content -->
<section class="content">
    <div class="container-fluid">
        <?php if($type == 1): ?>
            <a class="btn btn-primary m-1" href="<?php echo e(route('list.all.claims')); ?>">Back</a>
        <?php else: ?> 
            <a class="btn btn-primary m-1" href="<?php echo e(route('list.all.cases')); ?>">Back</a>
        <?php endif; ?>
        <div class="card card-default">
            <div class="card-header">
                <h3 class="card-title">Create New Remark</h3>
            </div>
            <!-- /.card-header -->

            <div class="card-body">
                <div class="row">
                    <div class="col-md-6 offset-md-3">
                        <?php if(session('success')): ?>
                        <div class="alert alert-success alert-dismissible fade show" role="alert">
                            <strong><?php echo e(session('success')); ?></strong>
                            <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                                <span aria-hidden="true">&times;</span>
                            </button>
                        </div>
                        <?php endif; ?>
                        <?php if(session('error')): ?>
                        <div class="alert alert-danger alert-dismissible fade show" role="alert">
                            <strong><?php echo e(session('error')); ?></strong>
                            <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                                <span aria-hidden="true">&times;</span>
                            </button>
                        </div>
                        <?php endif; ?>
                        <?php if(session('warning')): ?>
                        <div class="alert alert-warning alert-dismissible fade show" role="alert">
                            <strong><?php echo e(session('warning')); ?></strong>
                            <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                                <span aria-hidden="true">&times;</span>
                            </button>
                        </div>
                        <?php endif; ?>
                    </div>
                </div>

                <form action="<?php echo e(route('store.remark')); ?>" method="post" autocomplete="off">
                    <?php echo csrf_field(); ?>
                    <input type="hidden" name="parent_id" value="<?php echo e($data->id); ?>">
                    <input type="hidden" name="type" value="<?php echo e($type); ?>">
                    <div class="row">
                        <div class="col-md-6 offset-md-3">
                            <div class="row">
                                <div class="col-md-6">
                                    <div class="form-group">
                                        <label for="remark_for">Remark For</label>
                                        <input type="text" name="remark_for"
                                            class="form-control <?php if( $errors->has('remark_for')): ?> is-invalid border-danger  <?php endif; ?>"
                                            id="remark_for" value="<?php echo e(($type == 1) ? 'Claim' : 'Case'); ?>"
                                            placeholder="Remark For" readonly>
                                        <?php if($errors->has('remark_for')): ?>
                                        <span id="remark_for-error"
                                            class="error text-danger invalid-feedback"><?php echo e($errors->first('remark_for')); ?></span>
                                        <small></small>
                                        <?php endif; ?>
                                    </div>
                                </div>
                                <?php if($type == 1): ?>
                                <div class="col-md-6">
                                    <div class="form-group">
                                        <label for="claimed_for">Claimed For</label>
                                        <input type="text" name="claimed_for"
                                            class="form-control <?php if( $errors->has('claimed_for')): ?> is-invalid border-danger  <?php endif; ?>"
                                            id="claimed_for" value="<?php echo e($data->claim_category); ?>"
                                            placeholder="Claimed For" readonly>
                                        <?php if($errors->has('claimed_for')): ?>
                                        <span id="claimed_for-error"
                                            class="error text-danger invalid-feedback"><?php echo e($errors->first('claimed_for')); ?></span>
                                        <small></small>
                                        <?php endif; ?>
                                    </div>
                                </div>
                                <?php endif; ?>
                            </div>
                        </div>

                        <div class="col-md-6 offset-md-3">
                            <div class="form-group">
                                <label for="status">Status</label>
                                <select name="status" id="status"
                                    class="custom-select  <?php if( $errors->has('status')): ?> is-invalid border-danger  <?php endif; ?>">
                                    <option value="" <?php echo e(($data->status == '') ? 'selected' : ''); ?>>-- Select Status --
                                    </option>
                                    <option value="1" <?php echo e(($data->status == '1') ? 'selected' : ''); ?>>Pending</option>
                                    <option value="2" <?php echo e(($data->status == '2') ? 'selected' : ''); ?>>Processing</option>
                                    <option value="3" <?php echo e(($data->status == '3') ? 'selected' : ''); ?>>Done</option>
                                </select>
                                <?php if($errors->has('status')): ?>
                                <span id="status-error"
                                    class="error text-danger invalid-feedback"><?php echo e($errors->first('status')); ?></span>
                                <small></small>
                                <?php endif; ?>
                            </div>
                        </div>
                        <div class="col-md-6 offset-md-3">
                            <div class="form-group">
                                <label for="remark">Remark</label>
                                <textarea name="remark" id="remark"
                                    class="form-control <?php if( $errors->has('remark')): ?> is-invalid border-danger  <?php endif; ?>"
                                    rows="4" placeholder="Remark"><?php echo e(old('remark')); ?></textarea>
                                <?php if($errors->has('remark')): ?>
                                <small class="text-danger remark_error"><?php echo e($errors->first('remark')); ?></small>
                                <?php endif; ?>
                            </div>
                        </div>
                        <?php if($data->status != 3): ?>
                        <div class="col-md-6 offset-md-3">
                            <div class="form-group">
                                <input type="submit" value="Save Remark" class="btn btn-primary">
                            </div>
                        </div>
                        <?php else: ?> 
                        <div class="col-md-6 offset-md-3">
                        <p class="p-0 m-0 text-secondary border-muted">
                            <strong>Already Closed</strong>
                        </p>
                        </div>   
                        <?php endif; ?>
                    </div>
                </form>
            </div>
        </div>
        <!-- /.card -->
    </div>
    <!--/. container-fluid -->
</section>
<!-- /.content -->
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /var/www/html/claim_and_case_management/resources/views/pages/remarks/createRemark.blade.php ENDPATH**/ ?>