<?php $__env->startSection('title','Service & Warranty'); ?>
<?php $__env->startSection('content'); ?>
<div class="page-head"><div><h1 class="page-title">Service & Warranty</h1><div class="page-subtitle">Warranty cards, claims, repair tickets and technician assignment</div></div></div>

<div class="grid-2">
<form method="POST" action="<?php echo e(route('admin.service.warranty.store')); ?>" class="card panel-tight grid-2"><?php echo csrf_field(); ?><h3 style="grid-column:1/-1;margin:0">Warranty Card</h3><div><label>Customer</label><select name="customer_id"><option value="">Select</option><?php $__currentLoopData = $customers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $customer): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><option value="<?php echo e($customer->id); ?>"><?php echo e($customer->name); ?></option><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?></select></div><div><label>Product</label><select name="product_id" required><?php $__currentLoopData = $products; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $product): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><option value="<?php echo e($product->id); ?>"><?php echo e($product->product_name); ?></option><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?></select></div><div><label>Invoice No</label><input name="sale_invoice_no"></div><div><label>Serial No</label><input name="serial_no"></div><div><label>Warranty Months</label><input type="number" name="warranty_period_months" value="12"></div><div><label>Start Date</label><input type="date" name="start_date" value="<?php echo e(date('Y-m-d')); ?>"></div><div><label>Status</label><select name="status"><option>Active</option><option>Expired</option><option>Claimed</option></select></div><div style="grid-column:1/-1"><label>Notes</label><textarea name="notes"></textarea></div><div class="form-actions" style="grid-column:1/-1"><button class="btn primary">Create Warranty</button><a class="btn" href="<?php echo e(route('admin.service.warranty.check')); ?>">Warranty Check</a></div></form>
<form method="POST" action="<?php echo e(route('admin.service.claim.store')); ?>" class="card panel-tight grid-2"><?php echo csrf_field(); ?><h3 style="grid-column:1/-1;margin:0">Service Claim</h3><div><label>Customer</label><select name="customer_id"><option value="">Select</option><?php $__currentLoopData = $customers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $customer): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><option value="<?php echo e($customer->id); ?>"><?php echo e($customer->name); ?></option><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?></select></div><div><label>Warranty</label><select name="warranty_id"><option value="">Select</option><?php $__currentLoopData = $warranties; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $warranty): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><option value="<?php echo e($warranty->id); ?>"><?php echo e($warranty->serial_no ?: 'Warranty #'.$warranty->id); ?></option><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?></select></div><div><label>Product</label><select name="product_id" required><?php $__currentLoopData = $products; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $product): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><option value="<?php echo e($product->id); ?>"><?php echo e($product->product_name); ?></option><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?></select></div><div><label>Branch</label><select name="branch_id"><option value="">Select</option><?php $__currentLoopData = $branches; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $branch): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><option value="<?php echo e($branch->id); ?>"><?php echo e($branch->name); ?></option><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?></select></div><div><label>Issue Title</label><input name="issue_title" required></div><div><label>Technician</label><input name="technician_name"></div><div><label>Status</label><select name="status"><option>Received</option><option>In Repair</option><option>Delivered</option><option>Replacement</option><option>Closed</option></select></div><div><label>Service Cost</label><input type="number" step="0.01" name="service_cost"></div><div><label>Received At</label><input type="datetime-local" name="received_at"></div><div><label>Delivered At</label><input type="datetime-local" name="delivered_at"></div><div style="grid-column:1/-1"><label>Issue Details</label><textarea name="issue_details"></textarea></div><div style="grid-column:1/-1"><label>Notes</label><textarea name="notes"></textarea></div><div class="form-actions" style="grid-column:1/-1"><button class="btn primary">Save Claim</button></div></form>
</div>
<div class="card panel-tight table-wrap"><h3>Service Claims</h3><table class="table"><thead><tr><th>Claim</th><th>Product ID</th><th>Technician</th><th>Status</th><th>Cost</th></tr></thead><tbody><?php $__empty_1 = true; $__currentLoopData = $claims; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $claim): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?><tr><td><?php echo e($claim->claim_no); ?></td><td><?php echo e($claim->product_id); ?></td><td><?php echo e($claim->technician_name ?: '—'); ?></td><td><?php echo e($claim->status); ?></td><td><?php echo e($claim->service_cost); ?></td></tr><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?><tr><td colspan="5">No claims found.</td></tr><?php endif; ?></tbody></table><?php echo e($claims->links()); ?></div>

<?php $__env->stopSection(); ?>

<?php echo $__env->make('admin.layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH J:\xampp\htdocs\pos\resources\views/admin/service/index.blade.php ENDPATH**/ ?>