89 lines
3.4 KiB
PHP
89 lines
3.4 KiB
PHP
<?php
|
|
require_once 'db/config.php';
|
|
require_once 'includes/functions.php';
|
|
|
|
$work_order_uuid = isset($_GET['uuid']) ? $_GET['uuid'] : '';
|
|
$work_order = null;
|
|
|
|
if (!empty($work_order_uuid)) {
|
|
$work_order = get_work_order_by_uuid($work_order_uuid);
|
|
}
|
|
?>
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Work Order Status - Flatlogic</title>
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons/font/bootstrap-icons.css" rel="stylesheet">
|
|
<link href="assets/css/custom.css?v=<?php echo time(); ?>" rel="stylesheet">
|
|
<style>
|
|
body {
|
|
background-color: #f8f9fa;
|
|
}
|
|
.portal-container {
|
|
max-width: 800px;
|
|
margin: 50px auto;
|
|
background: #fff;
|
|
padding: 30px;
|
|
border-radius: 12px;
|
|
box-shadow: 0 4px 12px rgba(0,0,0,0.05);
|
|
}
|
|
.portal-header {
|
|
text-align: center;
|
|
margin-bottom: 30px;
|
|
}
|
|
.portal-header .logo {
|
|
font-size: 2rem;
|
|
font-weight: bold;
|
|
color: #0A84FF;
|
|
}
|
|
.status-badge {
|
|
font-size: 1.2rem;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="portal-container">
|
|
<div class="portal-header">
|
|
<div class="logo"><i class="bi bi-buildings me-2"></i>Flatlogic</div>
|
|
<h2 class="mt-3">Work Order Status</h2>
|
|
</div>
|
|
|
|
<?php if ($work_order): ?>
|
|
<div class="text-center mb-4">
|
|
<h4>Work Order #<?php echo str_pad($work_order['id'], 4, '0', STR_PAD_LEFT); ?></h4>
|
|
<p><strong>Status:</strong> <span class="badge rounded-pill bg-primary status-badge"><?php echo htmlspecialchars($work_order['status']); ?></span></p>
|
|
</div>
|
|
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<p><strong>Customer:</strong> <?php echo htmlspecialchars($work_order['customer_name']); ?></p>
|
|
<p><strong>Job Type:</strong> <?php echo htmlspecialchars($work_order['job_type']); ?></p>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<p><strong>Assigned Technician:</strong> <?php echo htmlspecialchars($work_order['assigned_technician'] ?? 'Not Assigned'); ?></p>
|
|
<p><strong>Last Updated:</strong> <?php echo date("F j, Y, g:i a", strtotime($work_order['updated_at'])); ?></p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php else: ?>
|
|
<div class="alert alert-danger text-center" role="alert">
|
|
<h4><i class="bi bi-exclamation-triangle-fill me-2"></i>Invalid Work Order</h4>
|
|
<p>The work order you are looking for could not be found. Please check the link and try again.</p>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<div class="text-center mt-4 text-muted">
|
|
<small>Powered by Flatlogic</small>
|
|
</div>
|
|
</div>
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
|
|
</body>
|
|
</html>
|