<?php $__env->startSection('content'); ?>

<div class="card">
    <div class="card-header">
        <?php echo e(trans('global.edit')); ?> <?php echo e(trans('cruds.serviceComplaint.title_singular')); ?>

    </div>

    <div class="card-body">
        <form method="POST" action="<?php echo e(route("admin.service-complaints.update", [$serviceComplaint->id])); ?>" enctype="multipart/form-data">
            <?php echo method_field('PUT'); ?>
            <?php echo csrf_field(); ?>
            <div class="form-group">
                <label class="required" for="client_id"><?php echo e(trans('cruds.serviceComplaint.fields.client')); ?></label>
                <select class="form-control select2 <?php echo e($errors->has('client') ? 'is-invalid' : ''); ?>" name="client_id" id="client_id" required disabled>
                    <?php $__currentLoopData = $clients; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $id => $entry): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <option value="<?php echo e($id); ?>" <?php echo e((old('client_id') ? old('client_id') : $serviceComplaint->client->id ?? '') == $id ? 'selected' : ''); ?>><?php echo e($entry); ?></option>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </select>
                <input type="hidden" name="client_id" value="<?php echo e(old('client_id') ? old('client_id') : $serviceComplaint->client->id ?? ''); ?>">
                <?php if($errors->has('client')): ?>
                    <div class="invalid-feedback">
                        <?php echo e($errors->first('client')); ?>

                    </div>
                <?php endif; ?>
                <span class="help-block"><?php echo e(trans('cruds.serviceComplaint.fields.client_helper')); ?></span>
            </div>
            <div class="form-group">
                <label class="required" for="location_id"><?php echo e(trans('cruds.serviceComplaint.fields.location')); ?></label>
                <select class="form-control select2 <?php echo e($errors->has('location') ? 'is-invalid' : ''); ?>" name="location_id" id="location_id" required disabled>
                    <?php $__currentLoopData = $locations; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $id => $entry): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <option value="<?php echo e($id); ?>" <?php echo e((old('location_id') ? old('location_id') : $serviceComplaint->location->id ?? '') == $id ? 'selected' : ''); ?>><?php echo e($entry); ?></option>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </select>
                <input type="hidden" name="location_id" value="<?php echo e(old('location_id') ? old('location_id') : $serviceComplaint->location->id ?? ''); ?>">

                <?php if($errors->has('location')): ?>
                    <div class="invalid-feedback">
                        <?php echo e($errors->first('location')); ?>

                    </div>
                <?php endif; ?>
                <span class="help-block"><?php echo e(trans('cruds.serviceComplaint.fields.location_helper')); ?></span>
            </div>

            <div class="form-group">
                <label for="asset_id"><?php echo e(trans('cruds.serviceComplaint.fields.asset')); ?></label>
                <select class="form-control select2 <?php echo e($errors->has('asset') ? 'is-invalid' : ''); ?>" name="asset_id" id="asset_id">
                    <?php $__currentLoopData = $assets; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $id => $entry): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <option value="<?php echo e($id); ?>" <?php echo e((old('asset_id') ? old('asset_id') : $serviceComplaint->asset_id ?? '') == $id ? 'selected' : ''); ?>><?php echo e($entry); ?></option>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </select>
                <?php if($errors->has('asset')): ?>
                    <div class="invalid-feedback">
                        <?php echo e($errors->first('asset')); ?>

                    </div>
                <?php endif; ?>
                <span class="help-block"><?php echo e(trans('cruds.serviceComplaint.fields.asset_helper')); ?></span>
            </div>

            <div class="form-group">
                <label class="required" for="service_type_id"><?php echo e(trans('cruds.serviceComplaint.fields.service_type')); ?></label>
                <select class="form-control select2 <?php echo e($errors->has('service_type') ? 'is-invalid' : ''); ?>" name="service_type_id" id="service_type_id" required>
                    <?php $__currentLoopData = $service_types; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $id => $entry): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <option value="<?php echo e($id); ?>" <?php echo e((old('service_type_id') ? old('service_type_id') : $serviceComplaint->service_type->id ?? '') == $id ? 'selected' : ''); ?>><?php echo e($entry); ?></option>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </select>
                <?php if($errors->has('service_type')): ?>
                    <div class="invalid-feedback">
                        <?php echo e($errors->first('service_type')); ?>

                    </div>
                <?php endif; ?>
                <span class="help-block"><?php echo e(trans('cruds.serviceComplaint.fields.service_type_helper')); ?></span>
            </div>
            <div class="form-group">
                <label class="required" for="visit_type_id"><?php echo e(trans('cruds.serviceComplaint.fields.visit_type')); ?></label>
                <select class="form-control select2 <?php echo e($errors->has('visit_type') ? 'is-invalid' : ''); ?>" name="visit_type_id" id="visit_type_id" required>
                    <?php $__currentLoopData = $visit_types; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $id => $entry): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <option value="<?php echo e($id); ?>" <?php echo e((old('visit_type_id') ? old('visit_type_id') : $serviceComplaint->visit_type->id ?? '') == $id ? 'selected' : ''); ?>><?php echo e($entry); ?></option>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </select>
                <?php if($errors->has('visit_type')): ?>
                    <div class="invalid-feedback">
                        <?php echo e($errors->first('visit_type')); ?>

                    </div>
                <?php endif; ?>
                <span class="help-block"><?php echo e(trans('cruds.serviceComplaint.fields.visit_type_helper')); ?></span>
            </div>
            <div class="form-group">
                <label class="required" for="status_id"><?php echo e(trans('cruds.serviceComplaint.fields.status')); ?></label>
                <select class="form-control select2 <?php echo e($errors->has('status') ? 'is-invalid' : ''); ?>" name="status_id" id="status_id" required>
                    <?php $__currentLoopData = $statuses; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $id => $entry): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <option value="<?php echo e($id); ?>" <?php echo e((old('status_id') ? old('status_id') : $serviceComplaint->status->id ?? '') == $id ? 'selected' : ''); ?>><?php echo e($entry); ?></option>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </select>
                <?php if($errors->has('status')): ?>
                    <div class="invalid-feedback">
                        <?php echo e($errors->first('status')); ?>

                    </div>
                <?php endif; ?>
                <span class="help-block"><?php echo e(trans('cruds.serviceComplaint.fields.status_helper')); ?></span>
            </div>
            <div class="form-group">
                <label class="required" for="enginner_assigned_id"><?php echo e(trans('cruds.serviceComplaint.fields.enginner_assigned')); ?></label>
                <select class="form-control select2 <?php echo e($errors->has('enginner_assigned') ? 'is-invalid' : ''); ?>" name="enginner_assigned_id" id="enginner_assigned_id" required>
                    <?php $__currentLoopData = $enginner_assigneds; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $id => $entry): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <option value="<?php echo e($id); ?>" <?php echo e((old('enginner_assigned_id') ? old('enginner_assigned_id') : $serviceComplaint->enginner_assigned->id ?? '') == $id ? 'selected' : ''); ?>><?php echo e($entry); ?></option>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </select>
                <?php if($errors->has('enginner_assigned')): ?>
                    <div class="invalid-feedback">
                        <?php echo e($errors->first('enginner_assigned')); ?>

                    </div>
                <?php endif; ?>
                <span class="help-block"><?php echo e(trans('cruds.serviceComplaint.fields.enginner_assigned_helper')); ?></span>
            </div>
            <div class="form-group">
                <label class="required" for="supervisor_assigned_id"><?php echo e(trans('cruds.serviceComplaint.fields.supervisor_assigned')); ?></label>
                <select class="form-control select2 <?php echo e($errors->has('supervisor_assigned') ? 'is-invalid' : ''); ?>" name="supervisor_assigned_id" id="supervisor_assigned_id" required>
                    <?php $__currentLoopData = $supervisor_assigneds; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $id => $entry): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <option value="<?php echo e($id); ?>" <?php echo e((old('supervisor_assigned_id') ? old('supervisor_assigned_id') : $serviceComplaint->supervisor_assigned->id ?? '') == $id ? 'selected' : ''); ?>><?php echo e($entry); ?></option>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </select>
                <?php if($errors->has('supervisor_assigned')): ?>
                    <div class="invalid-feedback">
                        <?php echo e($errors->first('supervisor_assigned')); ?>

                    </div>
                <?php endif; ?>
                <span class="help-block"><?php echo e(trans('cruds.serviceComplaint.fields.supervisor_assigned_helper')); ?></span>
            </div>
            <div class="form-group">
                <label class="required" for="service_date"><?php echo e(trans('cruds.serviceComplaint.fields.service_date')); ?></label>
                <input class="form-control date <?php echo e($errors->has('service_date') ? 'is-invalid' : ''); ?>" type="text" name="service_date" id="service_date" value="<?php echo e(old('service_date', $serviceComplaint->service_date)); ?>" required>
                <?php if($errors->has('service_date')): ?>
                    <div class="invalid-feedback">
                        <?php echo e($errors->first('service_date')); ?>

                    </div>
                <?php endif; ?>
                <span class="help-block"><?php echo e(trans('cruds.serviceComplaint.fields.service_date_helper')); ?></span>
            </div>
            <div class="form-group">
                <label class="required" for="complaint"><?php echo e(trans('cruds.serviceComplaint.fields.complaint')); ?></label>
                <input class="form-control <?php echo e($errors->has('complaint') ? 'is-invalid' : ''); ?>" type="text" name="complaint" id="complaint" value="<?php echo e(old('complaint', $serviceComplaint->complaint)); ?>" required>
                <?php if($errors->has('complaint')): ?>
                    <div class="invalid-feedback">
                        <?php echo e($errors->first('complaint')); ?>

                    </div>
                <?php endif; ?>
                <span class="help-block"><?php echo e(trans('cruds.serviceComplaint.fields.complaint_helper')); ?></span>
            </div>
            <div class="form-group">
                <label for="team_id"><?php echo e(trans('cruds.serviceComplaint.fields.team')); ?></label>
                <select class="form-control select2 <?php echo e($errors->has('team') ? 'is-invalid' : ''); ?>" name="team_id" id="team_id">
                    <?php $__currentLoopData = $teams; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $id => $entry): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <option value="<?php echo e($id); ?>" <?php echo e((old('team_id') ? old('team_id') : $serviceComplaint->team->id ?? '') == $id ? 'selected' : ''); ?>><?php echo e($entry); ?></option>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </select>
                <?php if($errors->has('team')): ?>
                    <div class="invalid-feedback">
                        <?php echo e($errors->first('team')); ?>

                    </div>
                <?php endif; ?>
                <span class="help-block"><?php echo e(trans('cruds.serviceComplaint.fields.team_helper')); ?></span>
            </div>
            <div class="form-group">
                <button class="btn btn-danger btn-lg btn-block" type="submit">
                    <?php echo e(trans('global.save')); ?>

                </button>
            </div>
        </form>
    </div>
</div>



<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.admin', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/newrhytha2/public_html/sfm.fusionengg.in/resources/views/admin/serviceComplaints/edit.blade.php ENDPATH**/ ?>