even better
This commit is contained in:
parent
fd9ccfc89a
commit
70a9003080
@ -16,15 +16,15 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
}
|
||||
}
|
||||
|
||||
$sql = "INSERT INTO participants (
|
||||
full_legal_name, ndis_participant_number, date_of_birth, preferred_contact_method,
|
||||
$sql = "INSERT INTO clients (
|
||||
full_legal_name, ndis_client_number, date_of_birth, preferred_contact_method,
|
||||
primary_phone, email, address, emergency_contact_name, emergency_contact_phone,
|
||||
ndis_plan_start_date, ndis_plan_end_date, plan_manager_name, plan_manager_contact,
|
||||
ndis_funding_budget_total, primary_disability, support_needs_summary,
|
||||
communication_aids_methods, behaviours_of_concern, risk_assessment_summary,
|
||||
safety_plan, consent_for_info_sharing, intake_notes
|
||||
) VALUES (
|
||||
:full_legal_name, :ndis_participant_number, :date_of_birth, :preferred_contact_method,
|
||||
:full_legal_name, :ndis_client_number, :date_of_birth, :preferred_contact_method,
|
||||
:primary_phone, :email, :address, :emergency_contact_name, :emergency_contact_phone,
|
||||
:ndis_plan_start_date, :ndis_plan_end_date, :plan_manager_name, :plan_manager_contact,
|
||||
:ndis_funding_budget_total, :primary_disability, :support_needs_summary,
|
||||
@ -37,7 +37,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
$consent = isset($_POST['consent_for_info_sharing']) ? 1 : 0;
|
||||
|
||||
$stmt->bindParam(':full_legal_name', $_POST['full_legal_name']);
|
||||
$stmt->bindParam(':ndis_participant_number', $_POST['ndis_participant_number']);
|
||||
$stmt->bindParam(':ndis_client_number', $_POST['ndis_client_number']);
|
||||
$stmt->bindParam(':date_of_birth', $_POST['date_of_birth']);
|
||||
$stmt->bindParam(':preferred_contact_method', $_POST['preferred_contact_method']);
|
||||
$stmt->bindParam(':primary_phone', $_POST['primary_phone']);
|
||||
@ -61,7 +61,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
|
||||
$stmt->execute();
|
||||
|
||||
$message = "Participant successfully added!";
|
||||
$message = "Client successfully added!";
|
||||
|
||||
} catch (Exception $e) {
|
||||
$error = "Error: " . $e->getMessage();
|
||||
@ -76,7 +76,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
</style>
|
||||
|
||||
<header>
|
||||
<h1>Add New Participant</h1>
|
||||
<h1>Add New Client</h1>
|
||||
</header>
|
||||
|
||||
<?php if ($message): ?>
|
||||
@ -87,7 +87,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
<div class="feedback error"><?php echo $error; ?></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<form action="add_participant.php" method="POST">
|
||||
<form action="add_client.php" method="POST">
|
||||
<div class="ai-section">
|
||||
<h3>AI-Assisted Intake</h3>
|
||||
<div class="form-group">
|
||||
@ -99,14 +99,14 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
|
||||
<div class="form-grid">
|
||||
<div class="form-section">
|
||||
<h3>Participant Details</h3>
|
||||
<h3>Client Details</h3>
|
||||
<div class="form-group">
|
||||
<label for="full_legal_name">Full Legal Name *</label>
|
||||
<input type="text" id="full_legal_name" name="full_legal_name" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="ndis_participant_number">NDIS Participant Number</label>
|
||||
<input type="text" id="ndis_participant_number" name="ndis_participant_number">
|
||||
<label for="ndis_client_number">NDIS Client Number</label>
|
||||
<input type="text" id="ndis_client_number" name="ndis_client_number">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="date_of_birth">Date of Birth</label>
|
||||
@ -208,8 +208,8 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 2rem;">
|
||||
<button type="submit" class="btn btn-primary">Add Participant</button>
|
||||
<a href="participants.php" class="btn btn-secondary">Cancel</a>
|
||||
<button type="submit" class="btn btn-primary">Add Client</button>
|
||||
<a href="clients.php" class="btn btn-secondary">Cancel</a>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@ -13,7 +13,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
throw new Exception("Full Name is a required field.");
|
||||
}
|
||||
|
||||
$sql = "INSERT INTO support_workers (
|
||||
$sql = "INSERT INTO care_staff (
|
||||
full_name, contact_info, ndis_worker_screening_number,
|
||||
ndis_worker_screening_expiry, first_aid_expiry, qualifications, hourly_rate
|
||||
) VALUES (
|
||||
@ -33,7 +33,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
|
||||
$stmt->execute();
|
||||
|
||||
$message = "Support worker successfully added!";
|
||||
$message = "Care staff member successfully added!";
|
||||
|
||||
} catch (Exception $e) {
|
||||
$error = "Error: " . $e->getMessage();
|
||||
@ -42,7 +42,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
?>
|
||||
|
||||
<header>
|
||||
<h1>Add New Support Worker</h1>
|
||||
<h1>Add New Staff Member</h1>
|
||||
</header>
|
||||
|
||||
<?php if ($message): ?>
|
||||
@ -53,7 +53,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
<div class="feedback error"><?php echo $error; ?></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<form action="add_worker.php" method="POST">
|
||||
<form action="add_staff.php" method="POST">
|
||||
<div class="form-grid" style="grid-template-columns: 1fr;">
|
||||
<div class="form-group">
|
||||
<label for="full_name">Full Name *</label>
|
||||
@ -68,7 +68,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
<textarea id="qualifications" name="qualifications" rows="3"></textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="ndis_worker_screening_number">NDIS Worker Screening Check Number</label>
|
||||
<label for="ndis_worker_screening_number">NDIS Staff Screening Check Number</label>
|
||||
<input type="text" id="ndis_worker_screening_number" name="ndis_worker_screening_number">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@ -86,8 +86,8 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 2rem;">
|
||||
<button type="submit" class="btn btn-primary">Add Worker</button>
|
||||
<a href="workers.php" class="btn">Cancel</a>
|
||||
<button type="submit" class="btn btn-primary">Add Staff Member</button>
|
||||
<a href="care_staff.php" class="btn">Cancel</a>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@ -1,14 +1,27 @@
|
||||
/* General Styles */
|
||||
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
|
||||
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
|
||||
|
||||
:root {
|
||||
--primary-color: #3498db;
|
||||
--secondary-color: #2ecc71;
|
||||
--background-color: #f4f7f6;
|
||||
--surface-color: #ffffff;
|
||||
--text-color: #34495e;
|
||||
--light-gray-color: #ecf0f1;
|
||||
--border-color: #e0e0e0;
|
||||
--primary-color: #0A2240; /* Navy Blue */
|
||||
--secondary-color: #F0F2F5; /* Soft Grey */
|
||||
--accent-color: #48E5C2; /* Teal */
|
||||
--text-color: #333333;
|
||||
--text-secondary-color: #6c757d;
|
||||
--background-color: #F8F9FA;
|
||||
--surface-color: #FFFFFF;
|
||||
--border-color: #E9ECEF;
|
||||
--danger-color: #e74c3c;
|
||||
|
||||
--font-family-sans-serif: 'Inter', sans-serif;
|
||||
|
||||
--space-1: 4px;
|
||||
--space-2: 8px;
|
||||
--space-3: 12px;
|
||||
--space-4: 16px;
|
||||
--space-5: 24px;
|
||||
--space-6: 32px;
|
||||
--space-7: 48px;
|
||||
--space-8: 64px;
|
||||
}
|
||||
|
||||
* {
|
||||
@ -18,7 +31,7 @@
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'Poppins', sans-serif;
|
||||
font-family: var(--font-family-sans-serif);
|
||||
background-color: var(--background-color);
|
||||
color: var(--text-color);
|
||||
display: flex;
|
||||
@ -27,47 +40,47 @@ body {
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: var(--primary-color);
|
||||
color: var(--accent-color);
|
||||
transition: color 0.3s ease;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #2980b9;
|
||||
color: #36c1a2;
|
||||
}
|
||||
|
||||
/* Sidebar Navigation */
|
||||
.sidebar {
|
||||
width: 250px;
|
||||
background-color: var(--surface-color);
|
||||
padding: 2rem 1rem;
|
||||
width: 240px;
|
||||
background-color: var(--primary-color);
|
||||
padding: var(--space-5);
|
||||
position: fixed;
|
||||
height: 100%;
|
||||
border-right: 1px solid var(--border-color);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
color: var(--secondary-color);
|
||||
}
|
||||
|
||||
.sidebar .logo {
|
||||
font-size: 1.5rem;
|
||||
font-weight: 600;
|
||||
font-size: 1.8rem;
|
||||
font-weight: 700;
|
||||
text-align: center;
|
||||
margin-bottom: 2rem;
|
||||
color: var(--primary-color);
|
||||
margin-bottom: var(--space-6);
|
||||
color: var(--surface-color);
|
||||
}
|
||||
|
||||
.sidebar nav a {
|
||||
display: block;
|
||||
padding: 0.9rem 1.5rem;
|
||||
margin-bottom: 0.5rem;
|
||||
border-radius: 8px;
|
||||
color: var(--text-color);
|
||||
padding: var(--space-3) var(--space-4);
|
||||
margin-bottom: var(--space-2);
|
||||
border-radius: var(--space-1);
|
||||
color: var(--secondary-color);
|
||||
font-weight: 500;
|
||||
transition: background-color 0.3s ease, color 0.3s ease;
|
||||
transition: background-color 0.2s ease, color 0.2s ease;
|
||||
}
|
||||
|
||||
.sidebar nav a:hover,
|
||||
.sidebar nav a.active {
|
||||
background-color: var(--primary-color);
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
color: var(--surface-color);
|
||||
}
|
||||
|
||||
@ -75,14 +88,14 @@ a:hover {
|
||||
margin-top: auto;
|
||||
text-align: center;
|
||||
font-size: 0.8rem;
|
||||
color: #95a5a6;
|
||||
color: #a0a8b3;
|
||||
}
|
||||
|
||||
/* Main Content Area */
|
||||
.main-content {
|
||||
margin-left: 250px;
|
||||
margin-left: 240px;
|
||||
flex-grow: 1;
|
||||
padding: 2rem;
|
||||
padding: var(--space-6);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
@ -91,25 +104,26 @@ a:hover {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 2rem;
|
||||
margin-bottom: var(--space-6);
|
||||
}
|
||||
|
||||
.main-content header h1 {
|
||||
font-size: 2rem;
|
||||
font-weight: 600;
|
||||
font-size: 2.2rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
/* Buttons */
|
||||
.btn,
|
||||
button,
|
||||
input[type="submit"] {
|
||||
background-color: var(--primary-color);
|
||||
color: white;
|
||||
padding: 0.75rem 1.5rem;
|
||||
background-color: var(--accent-color);
|
||||
color: var(--primary-color);
|
||||
padding: var(--space-3) var(--space-5);
|
||||
border: none;
|
||||
border-radius: 8px;
|
||||
border-radius: var(--space-2);
|
||||
cursor: pointer;
|
||||
font-family: 'Poppins', sans-serif;
|
||||
font-weight: 500;
|
||||
font-family: var(--font-family-sans-serif);
|
||||
font-weight: 600;
|
||||
transition: background-color 0.3s ease, transform 0.2s ease;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
@ -118,208 +132,209 @@ input[type="submit"] {
|
||||
.btn:hover,
|
||||
button:hover,
|
||||
input[type="submit"]:hover {
|
||||
background-color: #2980b9;
|
||||
background-color: #36c1a2;
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background-color: var(--primary-color);
|
||||
color: var(--surface-color);
|
||||
}
|
||||
.btn-primary:hover {
|
||||
background-color: #081b33;
|
||||
}
|
||||
|
||||
.btn-secondary {
|
||||
background-color: var(--secondary-color);
|
||||
color: var(--text-color);
|
||||
border: 1px solid var(--border-color);
|
||||
}
|
||||
.btn-secondary:hover {
|
||||
background-color: #27ae60;
|
||||
background-color: #e2e6ea;
|
||||
}
|
||||
|
||||
.btn-danger {
|
||||
background-color: #e74c3c;
|
||||
background-color: var(--danger-color);
|
||||
color: var(--surface-color);
|
||||
}
|
||||
.btn-danger:hover {
|
||||
background-color: #c0392b;
|
||||
}
|
||||
|
||||
|
||||
/* Dashboard Cards */
|
||||
.card-container {
|
||||
/* Info Cards (Dashboard) & Data Cards (Lists) */
|
||||
.card-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
||||
gap: 1.5rem;
|
||||
animation: fadeIn 1s ease-out;
|
||||
gap: var(--space-5);
|
||||
}
|
||||
|
||||
.card {
|
||||
background-color: var(--surface-color);
|
||||
border-radius: 12px;
|
||||
padding: 1.5rem;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
|
||||
border-radius: var(--space-2);
|
||||
padding: var(--space-5);
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
|
||||
border: 1px solid var(--border-color);
|
||||
transition: transform 0.3s ease, box-shadow 0.3s ease;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.card:hover {
|
||||
transform: translateY(-5px);
|
||||
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
|
||||
transform: translateY(-4px);
|
||||
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
|
||||
}
|
||||
|
||||
.card h3 {
|
||||
font-size: 1.2rem;
|
||||
font-weight: 600;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.card p {
|
||||
font-size: 2.5rem;
|
||||
font-weight: 700;
|
||||
color: var(--primary-color);
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.card .card-link {
|
||||
font-weight: 600;
|
||||
align-self: flex-start;
|
||||
}
|
||||
|
||||
/* Tables */
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
background-color: var(--surface-color);
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
th, td {
|
||||
padding: 1rem;
|
||||
text-align: left;
|
||||
.card-header {
|
||||
margin-bottom: var(--space-4);
|
||||
padding-bottom: var(--space-3);
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
}
|
||||
|
||||
th {
|
||||
background-color: var(--light-gray-color);
|
||||
.card-header h3 {
|
||||
font-size: 1.1rem;
|
||||
font-weight: 600;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.card-body p {
|
||||
font-size: 2.2rem;
|
||||
font-weight: 700;
|
||||
color: var(--primary-color);
|
||||
margin-bottom: var(--space-2);
|
||||
}
|
||||
|
||||
.card-footer {
|
||||
margin-top: auto;
|
||||
padding-top: var(--space-4);
|
||||
}
|
||||
|
||||
.card-footer a {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
tbody tr:last-child td {
|
||||
border-bottom: none;
|
||||
.status-tag {
|
||||
display: inline-block;
|
||||
padding: var(--space-1) var(--space-2);
|
||||
font-size: 0.75rem;
|
||||
font-weight: 600;
|
||||
border-radius: var(--space-1);
|
||||
color: var(--surface-color);
|
||||
}
|
||||
.status-tag.active { background-color: #2ecc71; }
|
||||
.status-tag.inactive { background-color: var(--text-secondary-color); }
|
||||
.status-tag.expiring { background-color: #f39c12; }
|
||||
.status-tag.unbilled { background-color: var(--danger-color); }
|
||||
|
||||
tbody tr:hover {
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
|
||||
/* Forms */
|
||||
form {
|
||||
background-color: var(--surface-color);
|
||||
padding: 2rem;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
|
||||
padding: var(--space-6);
|
||||
border-radius: var(--space-2);
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
|
||||
border: 1px solid var(--border-color);
|
||||
}
|
||||
|
||||
.form-group {
|
||||
margin-bottom: 1.5rem;
|
||||
margin-bottom: var(--space-4);
|
||||
}
|
||||
|
||||
.form-group label {
|
||||
display: block;
|
||||
margin-bottom: 0.5rem;
|
||||
font-weight: 500;
|
||||
margin-bottom: var(--space-2);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.form-group input,
|
||||
.form-group select,
|
||||
.form-group textarea {
|
||||
width: 100%;
|
||||
padding: 0.75rem;
|
||||
padding: var(--space-3);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 8px;
|
||||
font-family: 'Poppins', sans-serif;
|
||||
border-radius: var(--space-2);
|
||||
font-family: var(--font-family-sans-serif);
|
||||
background-color: var(--background-color);
|
||||
}
|
||||
|
||||
.form-group input:focus,
|
||||
.form-group select:focus,
|
||||
.form-group textarea:focus {
|
||||
outline: none;
|
||||
border-color: var(--primary-color);
|
||||
box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
|
||||
border-color: var(--accent-color);
|
||||
box-shadow: 0 0 0 3px rgba(72, 229, 194, 0.2);
|
||||
}
|
||||
|
||||
/* Detail Views */
|
||||
.detail-container {
|
||||
background-color: var(--surface-color);
|
||||
padding: 2rem;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.detail-container h1 {
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
.detail-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 2fr;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.detail-grid strong {
|
||||
font-weight: 600;
|
||||
padding: var(--space-6);
|
||||
border-radius: var(--space-2);
|
||||
box-shadow: 0 4px 12px rgba(0,0,0,0.04);
|
||||
border: 1px solid var(--border-color);
|
||||
}
|
||||
|
||||
.detail-actions {
|
||||
margin-top: 2rem;
|
||||
margin-top: var(--space-5);
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
gap: var(--space-3);
|
||||
}
|
||||
|
||||
|
||||
/* Animations */
|
||||
@keyframes fadeIn {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(20px);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
/* Tables (legacy, for reference) */
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
background-color: var(--surface-color);
|
||||
border-radius: var(--space-2);
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
|
||||
overflow: hidden;
|
||||
border: 1px solid var(--border-color);
|
||||
}
|
||||
|
||||
.main-content > * {
|
||||
animation: fadeIn 0.5s ease-out forwards;
|
||||
th, td {
|
||||
padding: var(--space-4);
|
||||
text-align: left;
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
}
|
||||
|
||||
/* Feedback/Alerts */
|
||||
.feedback {
|
||||
padding: 1rem;
|
||||
margin-bottom: 1.5rem;
|
||||
border-radius: 8px;
|
||||
color: var(--surface-color);
|
||||
}
|
||||
.feedback.success {
|
||||
th {
|
||||
background-color: var(--secondary-color);
|
||||
font-weight: 600;
|
||||
}
|
||||
.feedback.error {
|
||||
background-color: #e74c3c;
|
||||
tbody tr:last-child td { border-bottom: none; }
|
||||
tbody tr:hover { background-color: #fcfcfd; }
|
||||
|
||||
/* Empty States */
|
||||
.empty-state {
|
||||
text-align: center;
|
||||
padding: var(--space-8) var(--space-5);
|
||||
background-color: var(--surface-color);
|
||||
border: 2px dashed var(--border-color);
|
||||
border-radius: var(--space-2);
|
||||
}
|
||||
.empty-state h3 {
|
||||
font-size: 1.5rem;
|
||||
margin-bottom: var(--space-3);
|
||||
}
|
||||
.empty-state p {
|
||||
color: var(--text-secondary-color);
|
||||
margin-bottom: var(--space-4);
|
||||
}
|
||||
|
||||
/* Charts */
|
||||
.charts-container {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
|
||||
gap: 1.5rem;
|
||||
margin-top: 2rem;
|
||||
gap: var(--space-5);
|
||||
margin-top: var(--space-5);
|
||||
}
|
||||
|
||||
.chart-card {
|
||||
background-color: var(--surface-color);
|
||||
border-radius: 12px;
|
||||
padding: 1.5rem;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
|
||||
border-radius: var(--space-2);
|
||||
padding: var(--space-5);
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
|
||||
border: 1px solid var(--border-color);
|
||||
}
|
||||
|
||||
.chart-card h3 {
|
||||
font-size: 1.2rem;
|
||||
font-weight: 600;
|
||||
margin-bottom: 1rem;
|
||||
margin-bottom: var(--space-4);
|
||||
}
|
||||
|
||||
@ -2,27 +2,27 @@
|
||||
require_once 'db/config.php';
|
||||
require_once 'header.php';
|
||||
|
||||
$logs = [];
|
||||
$bookings = [];
|
||||
try {
|
||||
$db = db();
|
||||
$sql = "SELECT
|
||||
sl.id,
|
||||
sl.service_date,
|
||||
p.full_legal_name AS participant_name,
|
||||
w.full_name AS worker_name,
|
||||
p.full_legal_name AS client_name,
|
||||
w.full_name AS staff_name,
|
||||
sl.ndis_line_item,
|
||||
sl.duration_minutes,
|
||||
sl.billing_status
|
||||
FROM
|
||||
service_logs sl
|
||||
bookings sl
|
||||
JOIN
|
||||
participants p ON sl.participant_id = p.id
|
||||
clients p ON sl.client_id = p.id
|
||||
JOIN
|
||||
support_workers w ON sl.worker_id = w.id
|
||||
care_staff w ON sl.staff_id = w.id
|
||||
ORDER BY
|
||||
sl.service_date DESC";
|
||||
$stmt = $db->query($sql);
|
||||
$logs = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||
$bookings = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||
} catch (PDOException $e) {
|
||||
echo '<div class="feedback error">Error: ' . $e->getMessage() . '</div>';
|
||||
}
|
||||
@ -57,32 +57,32 @@ function get_status_chip_class($status) {
|
||||
</style>
|
||||
|
||||
<header>
|
||||
<h1>Service Logs</h1>
|
||||
<a href="log_service.php" class="btn btn-primary">Log New Service</a>
|
||||
<h1>Bookings</h1>
|
||||
<a href="log_booking.php" class="btn btn-primary">Log New Booking</a>
|
||||
</header>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Service Date</th>
|
||||
<th>Participant</th>
|
||||
<th>Support Worker</th>
|
||||
<th>Client</th>
|
||||
<th>Care Staff</th>
|
||||
<th>Duration (mins)</th>
|
||||
<th>NDIS Line Item</th>
|
||||
<th>Billing Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if (empty($logs)): ?>
|
||||
<?php if (empty($bookings)):
|
||||
<tr>
|
||||
<td colspan="6" style="text-align: center;">No service logs found.</td>
|
||||
<td colspan="6" style="text-align: center;">No bookings found.</td>
|
||||
</tr>
|
||||
<?php else: ?>
|
||||
<?php foreach ($logs as $log): ?>
|
||||
<?php else:
|
||||
<?php foreach ($bookings as $log):
|
||||
<tr>
|
||||
<td><?php echo htmlspecialchars(date('d M Y, H:i', strtotime($log['service_date']))); ?></td>
|
||||
<td><?php echo htmlspecialchars($log['participant_name']); ?></td>
|
||||
<td><?php echo htmlspecialchars($log['worker_name']); ?></td>
|
||||
<td><?php echo htmlspecialchars($log['client_name']); ?></td>
|
||||
<td><?php echo htmlspecialchars($log['staff_name']); ?></td>
|
||||
<td><?php echo htmlspecialchars($log['duration_minutes']); ?></td>
|
||||
<td><?php echo htmlspecialchars($log['ndis_line_item']); ?></td>
|
||||
<td>
|
||||
@ -2,11 +2,11 @@
|
||||
require_once 'db/config.php';
|
||||
require_once 'header.php';
|
||||
|
||||
$workers = [];
|
||||
$care_staff = [];
|
||||
try {
|
||||
$db = db();
|
||||
$stmt = $db->query("SELECT id, full_name, ndis_worker_screening_number, first_aid_expiry FROM support_workers ORDER BY created_at DESC");
|
||||
$workers = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||
$stmt = $db->query("SELECT id, full_name, ndis_worker_screening_number, first_aid_expiry FROM care_staff ORDER BY created_at DESC");
|
||||
$care_staff = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||
} catch (PDOException $e) {
|
||||
echo '<div class="feedback error">Error: ' . $e->getMessage() . '</div>';
|
||||
}
|
||||
@ -14,8 +14,8 @@ try {
|
||||
?>
|
||||
|
||||
<header>
|
||||
<h1>Support Workers</h1>
|
||||
<a href="add_worker.php" class="btn btn-primary">Add New Worker</a>
|
||||
<h1>Care Staff</h1>
|
||||
<a href="add_staff.php" class="btn btn-primary">Add New Staff Member</a>
|
||||
</header>
|
||||
|
||||
<table>
|
||||
@ -28,18 +28,18 @@ try {
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if (empty($workers)): ?>
|
||||
<?php if (empty($care_staff)):
|
||||
<tr>
|
||||
<td colspan="4" style="text-align: center;">No support workers found.</td>
|
||||
<td colspan="4" style="text-align: center;">No care staff found.</td>
|
||||
</tr>
|
||||
<?php else: ?>
|
||||
<?php foreach ($workers as $w): ?>
|
||||
<?php else:
|
||||
<?php foreach ($care_staff as $w):
|
||||
<tr>
|
||||
<td><?php echo htmlspecialchars($w['full_name']); ?></td>
|
||||
<td><?php echo htmlspecialchars($w['ndis_worker_screening_number']); ?></td>
|
||||
<td><?php echo htmlspecialchars(date("d M Y", strtotime($w['first_aid_expiry']))); ?></td>
|
||||
<td>
|
||||
<a href="worker_detail.php?id=<?php echo $w['id']; ?>" class="btn">View</a>
|
||||
<a href="staff_detail.php?id=<?php echo $w['id']; ?>" class="btn">View</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
@ -3,26 +3,26 @@ require_once 'db/config.php';
|
||||
require_once 'header.php';
|
||||
|
||||
if (!isset($_GET['id']) || !filter_var($_GET['id'], FILTER_VALIDATE_INT)) {
|
||||
echo '<div class="feedback error">Invalid participant ID.</div>';
|
||||
echo '<div class="feedback error">Invalid client ID.</div>';
|
||||
require_once 'footer.php';
|
||||
exit;
|
||||
}
|
||||
|
||||
$participant_id = $_GET['id'];
|
||||
$participant = null;
|
||||
$client_id = $_GET['id'];
|
||||
$client = null;
|
||||
|
||||
try {
|
||||
$db = db();
|
||||
$stmt = $db->prepare("SELECT * FROM participants WHERE id = :id");
|
||||
$stmt->bindParam(':id', $participant_id, PDO::PARAM_INT);
|
||||
$stmt = $db->prepare("SELECT * FROM clients WHERE id = :id");
|
||||
$stmt->bindParam(':id', $client_id, PDO::PARAM_INT);
|
||||
$stmt->execute();
|
||||
$participant = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||
$client = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||
} catch (PDOException $e) {
|
||||
echo '<div class="feedback error">Error: ' . $e->getMessage() . '</div>';
|
||||
}
|
||||
|
||||
if (!$participant) {
|
||||
echo '<div class="feedback error">Participant not found.</div>';
|
||||
if (!$client) {
|
||||
echo '<div class="feedback error">Client not found.</div>';
|
||||
require_once 'footer.php';
|
||||
exit;
|
||||
}
|
||||
@ -59,55 +59,55 @@ function render_detail_area($label, $value) {
|
||||
</style>
|
||||
|
||||
<div class="detail-header">
|
||||
<h1><?php echo htmlspecialchars($participant['full_legal_name']); ?></h1>
|
||||
<h1><?php echo htmlspecialchars($client['full_legal_name']); ?></h1>
|
||||
<div class="detail-actions">
|
||||
<a href="edit_participant.php?id=<?php echo $participant['id']; ?>" class="btn btn-primary">Edit</a>
|
||||
<form action="delete_participant.php" method="POST" onsubmit="return confirm('Are you sure you want to delete this participant? This cannot be undone.');">
|
||||
<input type="hidden" name="id" value="<?php echo $participant['id']; ?>">
|
||||
<a href="edit_client.php?id=<?php echo $client['id']; ?>" class="btn btn-primary">Edit</a>
|
||||
<form action="delete_client.php" method="POST" onsubmit="return confirm('Are you sure you want to delete this client? This cannot be undone.');">
|
||||
<input type="hidden" name="id" value="<?php echo $client['id']; ?>">
|
||||
<button type="submit" class="btn btn-danger">Delete</button>
|
||||
</form>
|
||||
<a href="participants.php" class="btn">Back to List</a>
|
||||
<a href="clients.php" class="btn">Back to List</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="detail-grid">
|
||||
<div class="detail-section">
|
||||
<h2>Participant Details</h2>
|
||||
<?php render_detail_item('NDIS Number', $participant['ndis_participant_number']); ?>
|
||||
<?php render_detail_item('Date of Birth', date("d M Y", strtotime($participant['date_of_birth']))); ?>
|
||||
<?php render_detail_item('Contact Method', $participant['preferred_contact_method']); ?>
|
||||
<h2>Client Details</h2>
|
||||
<?php render_detail_item('NDIS Number', $client['ndis_client_number']); ?>
|
||||
<?php render_detail_item('Date of Birth', date("d M Y", strtotime($client['date_of_birth']))); ?>
|
||||
<?php render_detail_item('Contact Method', $client['preferred_contact_method']); ?>
|
||||
</div>
|
||||
<div class="detail-section">
|
||||
<h2>Contact Info</h2>
|
||||
<?php render_detail_item('Phone', $participant['primary_phone']); ?>
|
||||
<?php render_detail_item('Email', $participant['email']); ?>
|
||||
<?php render_detail_item('Address', $participant['address']); ?>
|
||||
<?php render_detail_item('Emergency Contact', $participant['emergency_contact_name']); ?>
|
||||
<?php render_detail_item('Emergency Phone', $participant['emergency_contact_phone']); ?>
|
||||
<?php render_detail_item('Phone', $client['primary_phone']); ?>
|
||||
<?php render_detail_item('Email', $client['email']); ?>
|
||||
<?php render_detail_item('Address', $client['address']); ?>
|
||||
<?php render_detail_item('Emergency Contact', $client['emergency_contact_name']); ?>
|
||||
<?php render_detail_item('Emergency Phone', $client['emergency_contact_phone']); ?>
|
||||
</div>
|
||||
<div class="detail-section">
|
||||
<h2>NDIS Plan</h2>
|
||||
<?php render_detail_item('Plan Start', date("d M Y", strtotime($participant['ndis_plan_start_date']))); ?>
|
||||
<?php render_detail_item('Plan End', date("d M Y", strtotime($participant['ndis_plan_end_date']))); ?>
|
||||
<?php render_detail_item('Plan Manager', $participant['plan_manager_name']); ?>
|
||||
<?php render_detail_item('Manager Contact', $participant['plan_manager_contact']); ?>
|
||||
<?php render_detail_item('Total Budget', $participant['ndis_funding_budget_total'], true); ?>
|
||||
<?php render_detail_item('Plan Start', date("d M Y", strtotime($client['ndis_plan_start_date']))); ?>
|
||||
<?php render_detail_item('Plan End', date("d M Y", strtotime($client['ndis_plan_end_date']))); ?>
|
||||
<?php render_detail_item('Plan Manager', $client['plan_manager_name']); ?>
|
||||
<?php render_detail_item('Manager Contact', $client['plan_manager_contact']); ?>
|
||||
<?php render_detail_item('Total Budget', $client['ndis_funding_budget_total'], true); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="detail-section" style="margin-top: 2rem;">
|
||||
<h2>Disability, Needs & Risks</h2>
|
||||
<?php render_detail_area('Primary Disability', $participant['primary_disability']); ?>
|
||||
<?php render_detail_area('Support Needs', $participant['support_needs_summary']); ?>
|
||||
<?php render_detail_area('Communication Aids', $participant['communication_aids_methods']); ?>
|
||||
<?php render_detail_area('Behaviours of Concern', $participant['behaviours_of_concern']); ?>
|
||||
<?php render_detail_area('Risk Summary', $participant['risk_assessment_summary']); ?>
|
||||
<?php render_detail_area('Safety Plan', $participant['safety_plan']); ?>
|
||||
<?php render_detail_area('Primary Disability', $client['primary_disability']); ?>
|
||||
<?php render_detail_area('Support Needs', $client['support_needs_summary']); ?>
|
||||
<?php render_detail_area('Communication Aids', $client['communication_aids_methods']); ?>
|
||||
<?php render_detail_area('Behaviours of Concern', $client['behaviours_of_concern']); ?>
|
||||
<?php render_detail_area('Risk Summary', $client['risk_assessment_summary']); ?>
|
||||
<?php render_detail_area('Safety Plan', $client['safety_plan']); ?>
|
||||
</div>
|
||||
|
||||
<div class="detail-section" style="margin-top: 2rem;">
|
||||
<h2>Intake Notes</h2>
|
||||
<?php render_detail_area('Raw notes from intake', $participant['intake_notes']); ?>
|
||||
<?php render_detail_area('Raw notes from intake', $client['intake_notes']); ?>
|
||||
</div>
|
||||
|
||||
<?php require_once 'footer.php'; ?>
|
||||
@ -5,8 +5,8 @@ require_once 'header.php';
|
||||
$logs = [];
|
||||
try {
|
||||
$db = db();
|
||||
$stmt = $db->query("SELECT id, full_legal_name, ndis_participant_number, primary_phone, email FROM participants ORDER BY created_at DESC");
|
||||
$participants = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||
$stmt = $db->query("SELECT id, full_legal_name, ndis_client_number, primary_phone, email FROM clients ORDER BY created_at DESC");
|
||||
$clients = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||
} catch (PDOException $e) {
|
||||
echo '<div class="feedback error">Error: ' . $e->getMessage() . '</div>';
|
||||
}
|
||||
@ -17,12 +17,12 @@ $error = $_GET['error'] ?? '';
|
||||
?>
|
||||
|
||||
<header>
|
||||
<h1>Participants</h1>
|
||||
<a href="add_participant.php" class="btn btn-primary">Add New Participant</a>
|
||||
<h1>Clients</h1>
|
||||
<a href="add_client.php" class="btn btn-primary">Add New Client</a>
|
||||
</header>
|
||||
|
||||
<?php if ($message === 'deleted'): ?>
|
||||
<div class="feedback success">Participant successfully deleted.</div>
|
||||
<div class="feedback success">Client successfully deleted.</div>
|
||||
<?php endif; ?>
|
||||
<?php if ($error): ?>
|
||||
<div class="feedback error">An error occurred. <?php echo htmlspecialchars($error); ?></div>
|
||||
@ -39,19 +39,19 @@ $error = $_GET['error'] ?? '';
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if (empty($participants)): ?>
|
||||
<?php if (empty($clients)): ?>
|
||||
<tr>
|
||||
<td colspan="5" style="text-align: center;">No participants found.</td>
|
||||
<td colspan="5" style="text-align: center;">No clients found.</td>
|
||||
</tr>
|
||||
<?php else: ?>
|
||||
<?php foreach ($participants as $p): ?>
|
||||
<?php foreach ($clients as $p): ?>
|
||||
<tr>
|
||||
<td><?php echo htmlspecialchars($p['full_legal_name']); ?></td>
|
||||
<td><?php echo htmlspecialchars($p['ndis_participant_number']); ?></td>
|
||||
<td><?php echo htmlspecialchars($p['ndis_client_number']); ?></td>
|
||||
<td><?php echo htmlspecialchars($p['primary_phone']); ?></td>
|
||||
<td><?php echo htmlspecialchars($p['email']); ?></td>
|
||||
<td>
|
||||
<a href="participant_detail.php?id=<?php echo $p['id']; ?>" class="btn">View</a>
|
||||
<a href="client_detail.php?id=<?php echo $p['id']; ?>" class="btn">View</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
@ -12,19 +12,19 @@ try {
|
||||
$ninety_days_from_now = date('Y-m-d', strtotime('+90 days'));
|
||||
|
||||
// NDIS Plan Reviews
|
||||
$plan_stmt = $db->prepare("SELECT id, full_legal_name, ndis_plan_end_date FROM participants WHERE ndis_plan_end_date <= :end_date AND ndis_plan_end_date >= CURDATE() ORDER BY ndis_plan_end_date ASC");
|
||||
$plan_stmt = $db->prepare("SELECT id, full_legal_name, ndis_plan_end_date FROM clients WHERE ndis_plan_end_date <= :end_date AND ndis_plan_end_date >= CURDATE() ORDER BY ndis_plan_end_date ASC");
|
||||
$plan_stmt->bindParam(':end_date', $ninety_days_from_now);
|
||||
$plan_stmt->execute();
|
||||
$plan_alerts = $plan_stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||
|
||||
// Worker Screening Expiries
|
||||
$screening_stmt = $db->prepare("SELECT id, full_name, ndis_worker_screening_expiry FROM support_workers WHERE ndis_worker_screening_expiry <= :end_date AND ndis_worker_screening_expiry >= CURDATE() ORDER BY ndis_worker_screening_expiry ASC");
|
||||
// Staff Screening Expiries
|
||||
$screening_stmt = $db->prepare("SELECT id, full_name, ndis_worker_screening_expiry FROM care_staff WHERE ndis_worker_screening_expiry <= :end_date AND ndis_worker_screening_expiry >= CURDATE() ORDER BY ndis_worker_screening_expiry ASC");
|
||||
$screening_stmt->bindParam(':end_date', $ninety_days_from_now);
|
||||
$screening_stmt->execute();
|
||||
$screening_alerts = $screening_stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||
|
||||
// First Aid Expiries
|
||||
$fa_stmt = $db->prepare("SELECT id, full_name, first_aid_expiry FROM support_workers WHERE first_aid_expiry <= :end_date AND first_aid_expiry >= CURDATE() ORDER BY first_aid_expiry ASC");
|
||||
$fa_stmt = $db->prepare("SELECT id, full_name, first_aid_expiry FROM care_staff WHERE first_aid_expiry <= :end_date AND first_aid_expiry >= CURDATE() ORDER BY first_aid_expiry ASC");
|
||||
$fa_stmt->bindParam(':end_date', $ninety_days_from_now);
|
||||
$fa_stmt->execute();
|
||||
$first_aid_alerts = $fa_stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||
@ -108,7 +108,7 @@ function get_days_until_badge($date) {
|
||||
<?php else: ?>
|
||||
<?php foreach ($plan_alerts as $alert): ?>
|
||||
<li>
|
||||
<a href="participant_detail.php?id=<?php echo $alert['id']; ?>"><?php echo htmlspecialchars($alert['full_legal_name']); ?></a>
|
||||
<a href="client_detail.php?id=<?php echo $alert['id']; ?>"><?php echo htmlspecialchars($alert['full_legal_name']); ?></a>
|
||||
<div><?php echo htmlspecialchars(date("d M Y", strtotime($alert['ndis_plan_end_date']))); ?> <?php echo get_days_until_badge($alert['ndis_plan_end_date']); ?></div>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
@ -117,14 +117,14 @@ function get_days_until_badge($date) {
|
||||
</div>
|
||||
|
||||
<div class="alert-card">
|
||||
<h2>Worker Screening Expiries</h2>
|
||||
<h2>Staff Screening Expiries</h2>
|
||||
<ul class="alert-list">
|
||||
<?php if (empty($screening_alerts)): ?>
|
||||
<li>No upcoming screening expiries.</li>
|
||||
<?php else: ?>
|
||||
<?php foreach ($screening_alerts as $alert): ?>
|
||||
<li>
|
||||
<a href="worker_detail.php?id=<?php echo $alert['id']; ?>"><?php echo htmlspecialchars($alert['full_name']); ?></a>
|
||||
<a href="staff_detail.php?id=<?php echo $alert['id']; ?>"><?php echo htmlspecialchars($alert['full_name']); ?></a>
|
||||
<div><?php echo htmlspecialchars(date("d M Y", strtotime($alert['ndis_worker_screening_expiry']))); ?> <?php echo get_days_until_badge($alert['ndis_worker_screening_expiry']); ?></div>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
@ -140,7 +140,7 @@ function get_days_until_badge($date) {
|
||||
<?php else: ?>
|
||||
<?php foreach ($first_aid_alerts as $alert): ?>
|
||||
<li>
|
||||
<a href="worker_detail.php?id=<?php echo $alert['id']; ?>"><?php echo htmlspecialchars($alert['full_name']); ?></a>
|
||||
<a href="staff_detail.php?id=<?php echo $alert['id']; ?>"><?php echo htmlspecialchars($alert['full_name']); ?></a>
|
||||
<div><?php echo htmlspecialchars(date("d M Y", strtotime($alert['first_aid_expiry']))); ?> <?php echo get_days_until_badge($alert['first_aid_expiry']); ?></div>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
|
||||
@ -4,11 +4,11 @@ require_once 'config.php';
|
||||
try {
|
||||
$db = db();
|
||||
$sql = <<<SQL
|
||||
CREATE TABLE IF NOT EXISTS `participants` (
|
||||
CREATE TABLE IF NOT EXISTS `clients` (
|
||||
`id` INT AUTO_INCREMENT PRIMARY KEY,
|
||||
`created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
`full_legal_name` VARCHAR(255) NOT NULL,
|
||||
`ndis_participant_number` VARCHAR(50),
|
||||
`ndis_client_number` VARCHAR(50),
|
||||
`date_of_birth` DATE,
|
||||
`preferred_contact_method` VARCHAR(100),
|
||||
`primary_phone` VARCHAR(50),
|
||||
@ -27,11 +27,12 @@ try {
|
||||
`behaviours_of_concern` TEXT,
|
||||
`risk_assessment_summary` TEXT,
|
||||
`safety_plan` TEXT,
|
||||
`consent_for_info_sharing` BOOLEAN DEFAULT FALSE
|
||||
`consent_for_info_sharing` BOOLEAN DEFAULT FALSE,
|
||||
`intake_notes` TEXT
|
||||
);
|
||||
SQL;
|
||||
$db->exec($sql);
|
||||
echo "Table `participants` created successfully." . PHP_EOL;
|
||||
echo "Table `clients` created successfully." . PHP_EOL;
|
||||
} catch (PDOException $e) {
|
||||
die("DB ERROR: " . $e->getMessage());
|
||||
}
|
||||
|
||||
@ -4,22 +4,22 @@ require_once 'config.php';
|
||||
try {
|
||||
$db = db();
|
||||
$sql = <<<SQL
|
||||
CREATE TABLE IF NOT EXISTS `service_logs` (
|
||||
CREATE TABLE IF NOT EXISTS `bookings` (
|
||||
`id` INT AUTO_INCREMENT PRIMARY KEY,
|
||||
`participant_id` INT NOT NULL,
|
||||
`worker_id` INT NOT NULL,
|
||||
`client_id` INT NOT NULL,
|
||||
`staff_id` INT NOT NULL,
|
||||
`service_date` DATETIME NOT NULL,
|
||||
`ndis_line_item` VARCHAR(255),
|
||||
`duration_minutes` INT,
|
||||
`service_notes` TEXT,
|
||||
`billing_status` ENUM('Pending', 'Billed', 'Paid') DEFAULT 'Pending',
|
||||
`created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
FOREIGN KEY (`participant_id`) REFERENCES `participants`(`id`) ON DELETE CASCADE,
|
||||
FOREIGN KEY (`worker_id`) REFERENCES `support_workers`(`id`) ON DELETE CASCADE
|
||||
FOREIGN KEY (`client_id`) REFERENCES `clients`(`id`) ON DELETE CASCADE,
|
||||
FOREIGN KEY (`staff_id`) REFERENCES `care_staff`(`id`) ON DELETE CASCADE
|
||||
);
|
||||
SQL;
|
||||
$db->exec($sql);
|
||||
echo "Table `service_logs` created successfully." . PHP_EOL;
|
||||
echo "Table `bookings` created successfully." . PHP_EOL;
|
||||
} catch (PDOException $e) {
|
||||
die("DB ERROR: " . $e->getMessage());
|
||||
}
|
||||
@ -4,7 +4,7 @@ require_once 'config.php';
|
||||
try {
|
||||
$db = db();
|
||||
$sql = <<<SQL
|
||||
CREATE TABLE IF NOT EXISTS `support_workers` (
|
||||
CREATE TABLE IF NOT EXISTS `care_staff` (
|
||||
`id` INT AUTO_INCREMENT PRIMARY KEY,
|
||||
`created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
`full_name` VARCHAR(255) NOT NULL,
|
||||
@ -17,7 +17,7 @@ try {
|
||||
);
|
||||
SQL;
|
||||
$db->exec($sql);
|
||||
echo "Table `support_workers` created successfully." . PHP_EOL;
|
||||
echo "Table `care_staff` created successfully." . PHP_EOL;
|
||||
} catch (PDOException $e) {
|
||||
die("DB ERROR: " . $e->getMessage());
|
||||
}
|
||||
33
delete_client.php
Normal file
33
delete_client.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
require_once 'db/config.php';
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] !== 'POST') {
|
||||
header('Location: clients.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!isset($_POST['id']) || !filter_var($_POST['id'], FILTER_VALIDATE_INT)) {
|
||||
header('Location: clients.php?error=invalid_id');
|
||||
exit;
|
||||
}
|
||||
|
||||
$client_id = $_POST['id'];
|
||||
|
||||
try {
|
||||
$db = db();
|
||||
$stmt = $db->prepare("DELETE FROM clients WHERE id = :id");
|
||||
$stmt->bindParam(':id', $client_id, PDO::PARAM_INT);
|
||||
$stmt->execute();
|
||||
|
||||
if ($stmt->rowCount() > 0) {
|
||||
header('Location: clients.php?message=deleted');
|
||||
} else {
|
||||
header('Location: clients.php?error=not_found');
|
||||
}
|
||||
exit;
|
||||
|
||||
} catch (PDOException $e) {
|
||||
// In a real app, you'd log this error, not expose it
|
||||
header('Location: clients.php?error=db_error');
|
||||
exit;
|
||||
}
|
||||
@ -1,33 +0,0 @@
|
||||
<?php
|
||||
require_once 'db/config.php';
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] !== 'POST') {
|
||||
header('Location: participants.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!isset($_POST['id']) || !filter_var($_POST['id'], FILTER_VALIDATE_INT)) {
|
||||
header('Location: participants.php?error=invalid_id');
|
||||
exit;
|
||||
}
|
||||
|
||||
$participant_id = $_POST['id'];
|
||||
|
||||
try {
|
||||
$db = db();
|
||||
$stmt = $db->prepare("DELETE FROM participants WHERE id = :id");
|
||||
$stmt->bindParam(':id', $participant_id, PDO::PARAM_INT);
|
||||
$stmt->execute();
|
||||
|
||||
if ($stmt->rowCount() > 0) {
|
||||
header('Location: participants.php?message=deleted');
|
||||
} else {
|
||||
header('Location: participants.php?error=not_found');
|
||||
}
|
||||
exit;
|
||||
|
||||
} catch (PDOException $e) {
|
||||
// In a real app, you'd log this error, not expose it
|
||||
header('Location: participants.php?error=db_error');
|
||||
exit;
|
||||
}
|
||||
@ -4,25 +4,25 @@ require_once 'header.php';
|
||||
|
||||
$message = '';
|
||||
$error = '';
|
||||
$participant = null;
|
||||
$client = null;
|
||||
|
||||
if (!isset($_GET['id']) && !isset($_POST['id'])) {
|
||||
echo '<div class="feedback error">No participant ID specified.</div>';
|
||||
echo '<div class="feedback error">No client ID specified.</div>';
|
||||
require_once 'footer.php';
|
||||
exit;
|
||||
}
|
||||
|
||||
$participant_id = $_GET['id'] ?? $_POST['id'];
|
||||
$client_id = $_GET['id'] ?? $_POST['id'];
|
||||
|
||||
try {
|
||||
$db = db();
|
||||
$stmt = $db->prepare("SELECT * FROM participants WHERE id = :id");
|
||||
$stmt->bindParam(':id', $participant_id, PDO::PARAM_INT);
|
||||
$stmt = $db->prepare("SELECT * FROM clients WHERE id = :id");
|
||||
$stmt->bindParam(':id', $client_id, PDO::PARAM_INT);
|
||||
$stmt->execute();
|
||||
$participant = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||
$client = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
if (!$participant) {
|
||||
throw new Exception("Participant not found.");
|
||||
if (!$client) {
|
||||
throw new Exception("Client not found.");
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
$error = "Error: " . $e->getMessage();
|
||||
@ -42,9 +42,9 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
}
|
||||
}
|
||||
|
||||
$sql = "UPDATE participants SET
|
||||
$sql = "UPDATE clients SET
|
||||
full_legal_name = :full_legal_name,
|
||||
ndis_participant_number = :ndis_participant_number,
|
||||
ndis_client_number = :ndis_client_number,
|
||||
date_of_birth = :date_of_birth,
|
||||
preferred_contact_method = :preferred_contact_method,
|
||||
primary_phone = :primary_phone,
|
||||
@ -70,11 +70,11 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
$stmt = $db->prepare($sql);
|
||||
|
||||
$consent = isset($_POST['consent_for_info_sharing']) ? 1 : 0;
|
||||
$participant_id = $_POST['id'];
|
||||
$client_id = $_POST['id'];
|
||||
|
||||
$stmt->bindParam(':id', $participant_id, PDO::PARAM_INT);
|
||||
$stmt->bindParam(':id', $client_id, PDO::PARAM_INT);
|
||||
$stmt->bindParam(':full_legal_name', $_POST['full_legal_name']);
|
||||
$stmt->bindParam(':ndis_participant_number', $_POST['ndis_participant_number']);
|
||||
$stmt->bindParam(':ndis_client_number', $_POST['ndis_client_number']);
|
||||
$stmt->bindParam(':date_of_birth', $_POST['date_of_birth']);
|
||||
$stmt->bindParam(':preferred_contact_method', $_POST['preferred_contact_method']);
|
||||
$stmt->bindParam(':primary_phone', $_POST['primary_phone']);
|
||||
@ -98,7 +98,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
|
||||
$stmt->execute();
|
||||
|
||||
header("Location: participant_detail.php?id=" . $participant_id . "&message=updated");
|
||||
header("Location: client_detail.php?id=" . $client_id . "&message=updated");
|
||||
exit;
|
||||
|
||||
} catch (Exception $e) {
|
||||
@ -114,7 +114,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
</style>
|
||||
|
||||
<header>
|
||||
<h1>Edit Participant: <?php echo htmlspecialchars($participant['full_legal_name']); ?></h1>
|
||||
<h1>Edit Client: <?php echo htmlspecialchars($client['full_legal_name']); ?></h1>
|
||||
</header>
|
||||
|
||||
<?php if ($message): ?>
|
||||
@ -125,36 +125,36 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
<div class="feedback error"><?php echo $error; ?></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<form action="edit_participant.php" method="POST">
|
||||
<input type="hidden" name="id" value="<?php echo $participant['id']; ?>">
|
||||
<form action="edit_client.php" method="POST">
|
||||
<input type="hidden" name="id" value="<?php echo $client['id']; ?>">
|
||||
|
||||
<div class="ai-section">
|
||||
<h3>AI-Assisted Intake</h3>
|
||||
<div class="form-group">
|
||||
<label for="intake_notes">Raw Intake Notes</label>
|
||||
<textarea id="intake_notes" name="intake_notes" rows="6" placeholder="Paste the full, unstructured intake notes here..."><?php echo htmlspecialchars($participant['intake_notes']); ?></textarea>
|
||||
<textarea id="intake_notes" name="intake_notes" rows="6" placeholder="Paste the full, unstructured intake notes here..."><?php echo htmlspecialchars($client['intake_notes']); ?></textarea>
|
||||
</div>
|
||||
<button type="button" class="btn btn-secondary" id="summarize-with-ai">Summarize with AI</button>
|
||||
</div>
|
||||
|
||||
<div class="form-grid">
|
||||
<div class="form-section">
|
||||
<h3>Participant Details</h3>
|
||||
<h3>Client Details</h3>
|
||||
<div class="form-group">
|
||||
<label for="full_legal_name">Full Legal Name *</label>
|
||||
<input type="text" id="full_legal_name" name="full_legal_name" value="<?php echo htmlspecialchars($participant['full_legal_name']); ?>" required>
|
||||
<input type="text" id="full_legal_name" name="full_legal_name" value="<?php echo htmlspecialchars($client['full_legal_name']); ?>" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="ndis_participant_number">NDIS Participant Number</label>
|
||||
<input type="text" id="ndis_participant_number" name="ndis_participant_number" value="<?php echo htmlspecialchars($participant['ndis_participant_number']); ?>">
|
||||
<label for="ndis_client_number">NDIS Client Number</label>
|
||||
<input type="text" id="ndis_client_number" name="ndis_client_number" value="<?php echo htmlspecialchars($client['ndis_client_number']); ?>">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="date_of_birth">Date of Birth</label>
|
||||
<input type="date" id="date_of_birth" name="date_of_birth" value="<?php echo htmlspecialchars($participant['date_of_birth']); ?>">
|
||||
<input type="date" id="date_of_birth" name="date_of_birth" value="<?php echo htmlspecialchars($client['date_of_birth']); ?>">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="preferred_contact_method">Preferred Contact Method</label>
|
||||
<input type="text" id="preferred_contact_method" name="preferred_contact_method" value="<?php echo htmlspecialchars($participant['preferred_contact_method']); ?>">
|
||||
<input type="text" id="preferred_contact_method" name="preferred_contact_method" value="<?php echo htmlspecialchars($client['preferred_contact_method']); ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -162,23 +162,23 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
<h3>Contact Info</h3>
|
||||
<div class="form-group">
|
||||
<label for="primary_phone">Primary Phone</label>
|
||||
<input type="tel" id="primary_phone" name="primary_phone" value="<?php echo htmlspecialchars($participant['primary_phone']); ?>">
|
||||
<input type="tel" id="primary_phone" name="primary_phone" value="<?php echo htmlspecialchars($client['primary_phone']); ?>">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="email">Email</label>
|
||||
<input type="email" id="email" name="email" value="<?php echo htmlspecialchars($participant['email']); ?>">
|
||||
<input type="email" id="email" name="email" value="<?php echo htmlspecialchars($client['email']); ?>">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="address">Address</label>
|
||||
<textarea id="address" name="address" rows="1"><?php echo htmlspecialchars($participant['address']); ?></textarea>
|
||||
<textarea id="address" name="address" rows="1"><?php echo htmlspecialchars($client['address']); ?></textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="emergency_contact_name">Emergency Contact Name</label>
|
||||
<input type="text" id="emergency_contact_name" name="emergency_contact_name" value="<?php echo htmlspecialchars($participant['emergency_contact_name']); ?>">
|
||||
<input type="text" id="emergency_contact_name" name="emergency_contact_name" value="<?php echo htmlspecialchars($client['emergency_contact_name']); ?>">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="emergency_contact_phone">Emergency Contact Phone</label>
|
||||
<input type="tel" id="emergency_contact_phone" name="emergency_contact_phone" value="<?php echo htmlspecialchars($participant['emergency_contact_phone']); ?>">
|
||||
<input type="tel" id="emergency_contact_phone" name="emergency_contact_phone" value="<?php echo htmlspecialchars($client['emergency_contact_phone']); ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -186,23 +186,23 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
<h3>Plan Details</h3>
|
||||
<div class="form-group">
|
||||
<label for="ndis_plan_start_date">NDIS Plan Start Date</label>
|
||||
<input type="date" id="ndis_plan_start_date" name="ndis_plan_start_date" value="<?php echo htmlspecialchars($participant['ndis_plan_start_date']); ?>">
|
||||
<input type="date" id="ndis_plan_start_date" name="ndis_plan_start_date" value="<?php echo htmlspecialchars($client['ndis_plan_start_date']); ?>">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="ndis_plan_end_date">NDIS Plan End Date</label>
|
||||
<input type="date" id="ndis_plan_end_date" name="ndis_plan_end_date" value="<?php echo htmlspecialchars($participant['ndis_plan_end_date']); ?>">
|
||||
<input type="date" id="ndis_plan_end_date" name="ndis_plan_end_date" value="<?php echo htmlspecialchars($client['ndis_plan_end_date']); ?>">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="plan_manager_name">Plan Manager Name</label>
|
||||
<input type="text" id="plan_manager_name" name="plan_manager_name" value="<?php echo htmlspecialchars($participant['plan_manager_name']); ?>">
|
||||
<input type="text" id="plan_manager_name" name="plan_manager_name" value="<?php echo htmlspecialchars($client['plan_manager_name']); ?>">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="plan_manager_contact">Plan Manager Contact</label>
|
||||
<input type="text" id="plan_manager_contact" name="plan_manager_contact" value="<?php echo htmlspecialchars($participant['plan_manager_contact']); ?>">
|
||||
<input type="text" id="plan_manager_contact" name="plan_manager_contact" value="<?php echo htmlspecialchars($client['plan_manager_contact']); ?>">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="ndis_funding_budget_total">NDIS Funding Budget (Total)</label>
|
||||
<input type="number" step="0.01" id="ndis_funding_budget_total" name="ndis_funding_budget_total" value="<?php echo htmlspecialchars($participant['ndis_funding_budget_total']); ?>">
|
||||
<input type="number" step="0.01" id="ndis_funding_budget_total" name="ndis_funding_budget_total" value="<?php echo htmlspecialchars($client['ndis_funding_budget_total']); ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -210,15 +210,15 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
<h3>Disability & Needs</h3>
|
||||
<div class="form-group">
|
||||
<label for="primary_disability">Primary Disability</label>
|
||||
<textarea id="primary_disability" name="primary_disability" rows="2"><?php echo htmlspecialchars($participant['primary_disability']); ?></textarea>
|
||||
<textarea id="primary_disability" name="primary_disability" rows="2"><?php echo htmlspecialchars($client['primary_disability']); ?></textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="support_needs_summary">Support Needs Summary</label>
|
||||
<textarea id="support_needs_summary" name="support_needs_summary" rows="2"><?php echo htmlspecialchars($participant['support_needs_summary']); ?></textarea>
|
||||
<textarea id="support_needs_summary" name="support_needs_summary" rows="2"><?php echo htmlspecialchars($client['support_needs_summary']); ?></textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="communication_aids_methods">Communication Aids/Methods</label>
|
||||
<textarea id="communication_aids_methods" name="communication_aids_methods" rows="2"><?php echo htmlspecialchars($participant['communication_aids_methods']); ?></textarea>
|
||||
<textarea id="communication_aids_methods" name="communication_aids_methods" rows="2"><?php echo htmlspecialchars($client['communication_aids_methods']); ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -226,22 +226,22 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
<h3>Risk & Safety</h3>
|
||||
<div class="form-group">
|
||||
<label for="behaviours_of_concern">Known Behaviours of Concern</label>
|
||||
<textarea id="behaviours_of_concern" name="behaviours_of_concern" rows="3"><?php echo htmlspecialchars($participant['behaviours_of_concern']); ?></textarea>
|
||||
<textarea id="behaviours_of_concern" name="behaviours_of_concern" rows="3"><?php echo htmlspecialchars($client['behaviours_of_concern']); ?></textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="risk_assessment_summary">Detailed Risk Assessment Summary</label>
|
||||
<textarea id="risk_assessment_summary" name="risk_assessment_summary" rows="3"><?php echo htmlspecialchars($participant['risk_assessment_summary']); ?></textarea>
|
||||
<textarea id="risk_assessment_summary" name="risk_assessment_summary" rows="3"><?php echo htmlspecialchars($client['risk_assessment_summary']); ?></textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="safety_plan">Safety/Restrictive Practices Plan</label>
|
||||
<textarea id="safety_plan" name="safety_plan" rows="3"><?php echo htmlspecialchars($participant['safety_plan']); ?></textarea>
|
||||
<textarea id="safety_plan" name="safety_plan" rows="3"><?php echo htmlspecialchars($client['safety_plan']); ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-section">
|
||||
<h3>Consent</h3>
|
||||
<div class="form-group">
|
||||
<input type="checkbox" id="consent_for_info_sharing" name="consent_for_info_sharing" value="1" <?php echo $participant['consent_for_info_sharing'] ? 'checked' : ''; ?> style="width: auto; margin-right: 10px;">
|
||||
<input type="checkbox" id="consent_for_info_sharing" name="consent_for_info_sharing" value="1" <?php echo $client['consent_for_info_sharing'] ? 'checked' : ''; ?> style="width: auto; margin-right: 10px;">
|
||||
<label for="consent_for_info_sharing">Consent for information sharing has been recorded.</label>
|
||||
</div>
|
||||
</div>
|
||||
@ -249,7 +249,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
|
||||
<div style="margin-top: 2rem;">
|
||||
<button type="submit" class="btn btn-primary">Save Changes</button>
|
||||
<a href="participant_detail.php?id=<?php echo $participant['id']; ?>" class="btn">Cancel</a>
|
||||
<a href="client_detail.php?id=<?php echo $client['id']; ?>" class="btn">Cancel</a>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@ -4,25 +4,25 @@ require_once 'header.php';
|
||||
|
||||
$message = '';
|
||||
$error = '';
|
||||
$worker = null;
|
||||
$staff = null;
|
||||
|
||||
if (!isset($_GET['id']) && !isset($_POST['id'])) {
|
||||
echo '<div class="feedback error">No worker ID specified.</div>';
|
||||
echo '<div class="feedback error">No staff ID specified.</div>';
|
||||
require_once 'footer.php';
|
||||
exit;
|
||||
}
|
||||
|
||||
$worker_id = $_GET['id'] ?? $_POST['id'];
|
||||
$staff_id = $_GET['id'] ?? $_POST['id'];
|
||||
|
||||
try {
|
||||
$db = db();
|
||||
$stmt = $db->prepare("SELECT * FROM support_workers WHERE id = :id");
|
||||
$stmt->bindParam(':id', $worker_id, PDO::PARAM_INT);
|
||||
$stmt = $db->prepare("SELECT * FROM care_staff WHERE id = :id");
|
||||
$stmt->bindParam(':id', $staff_id, PDO::PARAM_INT);
|
||||
$stmt->execute();
|
||||
$worker = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||
$staff = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
if (!$worker) {
|
||||
throw new Exception("Support worker not found.");
|
||||
if (!$staff) {
|
||||
throw new Exception("Care staff member not found.");
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
$error = "Error: " . $e->getMessage();
|
||||
@ -39,7 +39,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
throw new Exception("Full Name and ID are required fields.");
|
||||
}
|
||||
|
||||
$sql = "UPDATE support_workers SET
|
||||
$sql = "UPDATE care_staff SET
|
||||
full_name = :full_name,
|
||||
contact_info = :contact_info,
|
||||
ndis_worker_screening_number = :ndis_worker_screening_number,
|
||||
@ -51,9 +51,9 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
|
||||
$stmt = $db->prepare($sql);
|
||||
|
||||
$worker_id = $_POST['id'];
|
||||
$staff_id = $_POST['id'];
|
||||
|
||||
$stmt->bindParam(':id', $worker_id, PDO::PARAM_INT);
|
||||
$stmt->bindParam(':id', $staff_id, PDO::PARAM_INT);
|
||||
$stmt->bindParam(':full_name', $_POST['full_name']);
|
||||
$stmt->bindParam(':contact_info', $_POST['contact_info']);
|
||||
$stmt->bindParam(':ndis_worker_screening_number', $_POST['ndis_worker_screening_number']);
|
||||
@ -64,7 +64,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
|
||||
$stmt->execute();
|
||||
|
||||
header("Location: worker_detail.php?id=" . $worker_id . "&message=updated");
|
||||
header("Location: staff_detail.php?id=" . $staff_id . "&message=updated");
|
||||
exit;
|
||||
|
||||
} catch (Exception $e) {
|
||||
@ -74,7 +74,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
?>
|
||||
|
||||
<header>
|
||||
<h1>Edit Support Worker: <?php echo htmlspecialchars($worker['full_name']); ?></h1>
|
||||
<h1>Edit Staff Member: <?php echo htmlspecialchars($staff['full_name']); ?></h1>
|
||||
</header>
|
||||
|
||||
<?php if ($message): ?>
|
||||
@ -85,42 +85,42 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
<div class="feedback error"><?php echo $error; ?></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<form action="edit_worker.php" method="POST">
|
||||
<input type="hidden" name="id" value="<?php echo $worker['id']; ">
|
||||
<form action="edit_staff.php" method="POST">
|
||||
<input type="hidden" name="id" value="<?php echo $staff['id']; ">
|
||||
<div class="form-grid" style="grid-template-columns: 1fr;">
|
||||
<div class="form-group">
|
||||
<label for="full_name">Full Name *</label>
|
||||
<input type="text" id="full_name" name="full_name" value="<?php echo htmlspecialchars($worker['full_name']); ?>" required>
|
||||
<input type="text" id="full_name" name="full_name" value="<?php echo htmlspecialchars($staff['full_name']); ?>" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="contact_info">Contact Info (Phone/Email)</label>
|
||||
<textarea id="contact_info" name="contact_info" rows="2"><?php echo htmlspecialchars($worker['contact_info']); ?></textarea>
|
||||
<textarea id="contact_info" name="contact_info" rows="2"><?php echo htmlspecialchars($staff['contact_info']); ?></textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="qualifications">Qualifications/Certificates</label>
|
||||
<textarea id="qualifications" name="qualifications" rows="3"><?php echo htmlspecialchars($worker['qualifications']); ?></textarea>
|
||||
<textarea id="qualifications" name="qualifications" rows="3"><?php echo htmlspecialchars($staff['qualifications']); ?></textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="ndis_worker_screening_number">NDIS Worker Screening Check Number</label>
|
||||
<input type="text" id="ndis_worker_screening_number" name="ndis_worker_screening_number" value="<?php echo htmlspecialchars($worker['ndis_worker_screening_number']); ?>">
|
||||
<label for="ndis_worker_screening_number">NDIS Staff Screening Check Number</label>
|
||||
<input type="text" id="ndis_worker_screening_number" name="ndis_worker_screening_number" value="<?php echo htmlspecialchars($staff['ndis_worker_screening_number']); ?>">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="ndis_worker_screening_expiry">Screening Check Expiry Date</label>
|
||||
<input type="date" id="ndis_worker_screening_expiry" name="ndis_worker_screening_expiry" value="<?php echo htmlspecialchars($worker['ndis_worker_screening_expiry']); ?>">
|
||||
<input type="date" id="ndis_worker_screening_expiry" name="ndis_worker_screening_expiry" value="<?php echo htmlspecialchars($staff['ndis_worker_screening_expiry']); ?>">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="first_aid_expiry">First Aid Certificate Expiry Date</label>
|
||||
<input type="date" id="first_aid_expiry" name="first_aid_expiry" value="<?php echo htmlspecialchars($worker['first_aid_expiry']); ?>">
|
||||
<input type="date" id="first_aid_expiry" name="first_aid_expiry" value="<?php echo htmlspecialchars($staff['first_aid_expiry']); ?>">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="hourly_rate">Hourly Rate</label>
|
||||
<input type="number" step="0.01" id="hourly_rate" name="hourly_rate" value="<?php echo htmlspecialchars($worker['hourly_rate']); ?>">
|
||||
<input type="number" step="0.01" id="hourly_rate" name="hourly_rate" value="<?php echo htmlspecialchars($staff['hourly_rate']); ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 2rem;">
|
||||
<button type="submit" class="btn btn-primary">Save Changes</button>
|
||||
<a href="worker_detail.php?id=<?php echo $worker['id']; ?>" class="btn">Cancel</a>
|
||||
<a href="staff_detail.php?id=<?php echo $staff['id']; ?>" class="btn">Cancel</a>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@ -14,10 +14,9 @@
|
||||
$current_page = basename($_SERVER['PHP_SELF']);
|
||||
$pages = [
|
||||
'index.php' => 'Dashboard',
|
||||
'participants.php' => 'Participants',
|
||||
'workers.php' => 'Support Workers',
|
||||
'service_logs.php' => 'Service Logs',
|
||||
'compliance.php' => 'Compliance',
|
||||
'clients.php' => 'Clients',
|
||||
'care_staff.php' => 'Care Staff',
|
||||
'bookings.php' => 'Bookings', 'compliance.php' => 'Compliance',
|
||||
];
|
||||
?>
|
||||
|
||||
|
||||
86
index.php
86
index.php
@ -3,31 +3,31 @@ require_once 'db/config.php';
|
||||
require_once 'header.php';
|
||||
|
||||
// Fetch counts for dashboard cards
|
||||
$participant_count = db()->query("SELECT COUNT(*) FROM participants")->fetchColumn();
|
||||
$worker_count = db()->query("SELECT COUNT(*) FROM support_workers")->fetchColumn();
|
||||
$service_log_count = db()->query("SELECT COUNT(*) FROM service_logs")->fetchColumn();
|
||||
$client_count = db()->query("SELECT COUNT(*) FROM clients")->fetchColumn();
|
||||
$staff_count = db()->query("SELECT COUNT(*) FROM care_staff")->fetchColumn();
|
||||
$booking_count = db()->query("SELECT COUNT(*) FROM bookings")->fetchColumn();
|
||||
|
||||
// Fetch upcoming compliance alerts (e.g., expiring in 90 days)
|
||||
$ninety_days_from_now = date('Y-m-d', strtotime('+90 days'));
|
||||
$compliance_alerts = db()->query("SELECT COUNT(*) FROM participants WHERE ndis_plan_end_date <= '$ninety_days_from_now'")->fetchColumn();
|
||||
$worker_alerts = db()->query("SELECT COUNT(*) FROM support_workers WHERE ndis_worker_screening_expiry <= '$ninety_days_from_now' OR first_aid_expiry <= '$ninety_days_from_now'")->fetchColumn();
|
||||
$compliance_alerts = db()->query("SELECT COUNT(*) FROM clients WHERE ndis_plan_end_date <= '$ninety_days_from_now'")->fetchColumn();
|
||||
$worker_alerts = db()->query("SELECT COUNT(*) FROM care_staff WHERE ndis_worker_screening_expiry <= '$ninety_days_from_now' OR first_aid_expiry <= '$ninety_days_from_now'")->fetchColumn();
|
||||
$total_alerts = $compliance_alerts + $worker_alerts;
|
||||
|
||||
// Chart Data
|
||||
// Participants per month
|
||||
$participants_per_month_q = db()->query("SELECT DATE_FORMAT(created_at, '%Y-%m') as month, COUNT(*) as count FROM participants GROUP BY month ORDER BY month");
|
||||
$participants_per_month = $participants_per_month_q->fetchAll(PDO::FETCH_ASSOC);
|
||||
$participant_months = json_encode(array_column($participants_per_month, 'month'));
|
||||
$participant_counts = json_encode(array_column($participants_per_month, 'count'));
|
||||
// Clients per month
|
||||
$clients_per_month_q = db()->query("SELECT DATE_FORMAT(created_at, '%Y-%m') as month, COUNT(*) as count FROM clients GROUP BY month ORDER BY month");
|
||||
$clients_per_month = $clients_per_month_q->fetchAll(PDO::FETCH_ASSOC);
|
||||
$client_months = json_encode(array_column($clients_per_month, 'month'));
|
||||
$client_counts = json_encode(array_column($clients_per_month, 'count'));
|
||||
|
||||
// Services per month
|
||||
$services_per_month_q = db()->query("SELECT DATE_FORMAT(service_date, '%Y-%m') as month, COUNT(*) as count FROM service_logs GROUP BY month ORDER BY month");
|
||||
$services_per_month = $services_per_month_q->fetchAll(PDO::FETCH_ASSOC);
|
||||
$service_months = json_encode(array_column($services_per_month, 'month'));
|
||||
$service_counts = json_encode(array_column($services_per_month, 'count'));
|
||||
// Bookings per month
|
||||
$bookings_per_month_q = db()->query("SELECT DATE_FORMAT(service_date, '%Y-%m') as month, COUNT(*) as count FROM bookings GROUP BY month ORDER BY month");
|
||||
$bookings_per_month = $bookings_per_month_q->fetchAll(PDO::FETCH_ASSOC);
|
||||
$booking_months = json_encode(array_column($bookings_per_month, 'month'));
|
||||
$booking_counts = json_encode(array_column($bookings_per_month, 'count'));
|
||||
|
||||
// Billing status
|
||||
$billing_status_q = db()->query("SELECT billing_status, COUNT(*) as count FROM service_logs GROUP BY billing_status");
|
||||
$billing_status_q = db()->query("SELECT billing_status, COUNT(*) as count FROM bookings GROUP BY billing_status");
|
||||
$billing_status = $billing_status_q->fetchAll(PDO::FETCH_ASSOC);
|
||||
$billing_status_labels = json_encode(array_column($billing_status, 'billing_status'));
|
||||
$billing_status_counts = json_encode(array_column($billing_status, 'count'));
|
||||
@ -36,24 +36,24 @@ $billing_status_counts = json_encode(array_column($billing_status, 'count'));
|
||||
|
||||
<header>
|
||||
<h1>Dashboard</h1>
|
||||
<a href="log_service.php" class="btn btn-primary">Log a New Service</a>
|
||||
<a href="log_booking.php" class="btn btn-primary">Log a New Booking</a>
|
||||
</header>
|
||||
|
||||
<div class="card-container">
|
||||
<div class="card">
|
||||
<h3>Total Participants</h3>
|
||||
<p><?php echo $participant_count; ?></p>
|
||||
<a href="participants.php" class="card-link">Manage Participants →</a>
|
||||
<h3>Total Clients</h3>
|
||||
<p><?php echo $client_count; ?></p>
|
||||
<a href="clients.php" class="card-link">Manage Clients →</a>
|
||||
</div>
|
||||
<div class="card">
|
||||
<h3>Total Support Workers</h3>
|
||||
<p><?php echo $worker_count; ?></p>
|
||||
<a href="workers.php" class="card-link">Manage Workers →</a>
|
||||
<h3>Total Care Staff</h3>
|
||||
<p><?php echo $staff_count; ?></p>
|
||||
<a href="care_staff.php" class="card-link">Manage Care Staff →</a>
|
||||
</div>
|
||||
<div class="card">
|
||||
<h3>Services Logged</h3>
|
||||
<p><?php echo $service_log_count; ?></p>
|
||||
<a href="service_logs.php" class="card-link">View Service Logs →</a>
|
||||
<h3>Bookings Logged</h3>
|
||||
<p><?php echo $booking_count; ?></p>
|
||||
<a href="bookings.php" class="card-link">View Bookings →</a>
|
||||
</div>
|
||||
<div class="card">
|
||||
<h3>Compliance Alerts</h3>
|
||||
@ -64,30 +64,30 @@ $billing_status_counts = json_encode(array_column($billing_status, 'count'));
|
||||
|
||||
<div class="charts-container">
|
||||
<div class="chart-card">
|
||||
<h3>Participants Added Per Month</h3>
|
||||
<canvas id="participantsChart"></canvas>
|
||||
<h3>Clients Added Per Month</h3>
|
||||
<canvas id="clientsChart"></canvas>
|
||||
</div>
|
||||
<div class="chart-card">
|
||||
<h3>Services Provided Per Month</h3>
|
||||
<canvas id="servicesChart"></canvas>
|
||||
<h3>Bookings Per Month</h3>
|
||||
<canvas id="bookingsChart"></canvas>
|
||||
</div>
|
||||
<div class="chart-card">
|
||||
<h3>Service Billing Status</h3>
|
||||
<h3>Booking Billing Status</h3>
|
||||
<canvas id="billingChart"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
// Participants Chart
|
||||
var participantsCtx = document.getElementById('participantsChart').getContext('2d');
|
||||
new Chart(participantsCtx, {
|
||||
// Clients Chart
|
||||
var clientsCtx = document.getElementById('clientsChart').getContext('2d');
|
||||
new Chart(clientsCtx, {
|
||||
type: 'bar',
|
||||
data: {
|
||||
labels: <?php echo $participant_months; ?>,
|
||||
labels: <?php echo $client_months; ?>,
|
||||
datasets: [{
|
||||
label: 'New Participants',
|
||||
data: <?php echo $participant_counts; ?>,
|
||||
label: 'New Clients',
|
||||
data: <?php echo $client_counts; ?>,
|
||||
backgroundColor: 'rgba(54, 162, 235, 0.2)',
|
||||
borderColor: 'rgba(54, 162, 235, 1)',
|
||||
borderWidth: 1
|
||||
@ -95,15 +95,15 @@ $billing_status_counts = json_encode(array_column($billing_status, 'count'));
|
||||
}
|
||||
});
|
||||
|
||||
// Services Chart
|
||||
var servicesCtx = document.getElementById('servicesChart').getContext('2d');
|
||||
new Chart(servicesCtx, {
|
||||
// Bookings Chart
|
||||
var bookingsCtx = document.getElementById('bookingsChart').getContext('2d');
|
||||
new Chart(bookingsCtx, {
|
||||
type: 'bar',
|
||||
data: {
|
||||
labels: <?php echo $service_months; ?>,
|
||||
labels: <?php echo $booking_months; ?>,
|
||||
datasets: [{
|
||||
label: 'Services Logged',
|
||||
data: <?php echo $service_counts; ?>,
|
||||
label: 'Bookings Logged',
|
||||
data: <?php echo $booking_counts; ?>,
|
||||
backgroundColor: 'rgba(255, 99, 132, 0.2)',
|
||||
borderColor: 'rgba(255, 99, 132, 1)',
|
||||
borderWidth: 1
|
||||
|
||||
@ -4,36 +4,36 @@ require_once 'header.php';
|
||||
|
||||
$message = '';
|
||||
$error = '';
|
||||
$participants = [];
|
||||
$workers = [];
|
||||
$clients = [];
|
||||
$care_staff = [];
|
||||
|
||||
try {
|
||||
$db = db();
|
||||
$participants = $db->query("SELECT id, full_legal_name FROM participants ORDER BY full_legal_name ASC")->fetchAll(PDO::FETCH_ASSOC);
|
||||
$workers = $db->query("SELECT id, full_name FROM support_workers ORDER BY full_name ASC")->fetchAll(PDO::FETCH_ASSOC);
|
||||
$clients = $db->query("SELECT id, full_legal_name FROM clients ORDER BY full_legal_name ASC")->fetchAll(PDO::FETCH_ASSOC);
|
||||
$care_staff = $db->query("SELECT id, full_name FROM care_staff ORDER BY full_name ASC")->fetchAll(PDO::FETCH_ASSOC);
|
||||
} catch (Exception $e) {
|
||||
$error = "Failed to fetch participants or workers: " . $e->getMessage();
|
||||
$error = "Failed to fetch clients or care staff: " . $e->getMessage();
|
||||
}
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
try {
|
||||
if (empty($_POST['participant_id']) || empty($_POST['worker_id']) || empty($_POST['service_date'])) {
|
||||
throw new Exception("Participant, Worker, and Service Date are required fields.");
|
||||
if (empty($_POST['client_id']) || empty($_POST['staff_id']) || empty($_POST['service_date'])) {
|
||||
throw new Exception("Client, Care Staff, and Service Date are required fields.");
|
||||
}
|
||||
|
||||
$db = db();
|
||||
$sql = "INSERT INTO service_logs (
|
||||
participant_id, worker_id, service_date, ndis_line_item,
|
||||
$sql = "INSERT INTO bookings (
|
||||
client_id, staff_id, service_date, ndis_line_item,
|
||||
duration_minutes, service_notes, billing_status
|
||||
) VALUES (
|
||||
:participant_id, :worker_id, :service_date, :ndis_line_item,
|
||||
:client_id, :staff_id, :service_date, :ndis_line_item,
|
||||
:duration_minutes, :service_notes, :billing_status
|
||||
)";
|
||||
|
||||
$stmt = $db->prepare($sql);
|
||||
|
||||
$stmt->bindParam(':participant_id', $_POST['participant_id'], PDO::PARAM_INT);
|
||||
$stmt->bindParam(':worker_id', $_POST['worker_id'], PDO::PARAM_INT);
|
||||
$stmt->bindParam(':client_id', $_POST['client_id'], PDO::PARAM_INT);
|
||||
$stmt->bindParam(':staff_id', $_POST['staff_id'], PDO::PARAM_INT);
|
||||
$stmt->bindParam(':service_date', $_POST['service_date']);
|
||||
$stmt->bindParam(':ndis_line_item', $_POST['ndis_line_item']);
|
||||
$stmt->bindParam(':duration_minutes', $_POST['duration_minutes'], PDO::PARAM_INT);
|
||||
@ -42,7 +42,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
|
||||
$stmt->execute();
|
||||
|
||||
$message = "Service log successfully added!";
|
||||
$message = "Booking successfully added!";
|
||||
|
||||
} catch (Exception $e) {
|
||||
$error = "Error: " . $e->getMessage();
|
||||
@ -51,7 +51,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
?>
|
||||
|
||||
<header>
|
||||
<h1>Log a New Service</h1>
|
||||
<h1>Log a New Booking</h1>
|
||||
</header>
|
||||
|
||||
<?php if ($message): ?>
|
||||
@ -62,22 +62,22 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
<div class="feedback error"><?php echo $error; ?></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<form action="log_service.php" method="POST">
|
||||
<form action="log_booking.php" method="POST">
|
||||
<div class="form-grid">
|
||||
<div class="form-group">
|
||||
<label for="participant_id">Participant *</label>
|
||||
<select id="participant_id" name="participant_id" required>
|
||||
<option value="">Select a participant...</option>
|
||||
<?php foreach ($participants as $p): ?>
|
||||
<label for="client_id">Client *</label>
|
||||
<select id="client_id" name="client_id" required>
|
||||
<option value="">Select a client...</option>
|
||||
<?php foreach ($clients as $p): ?>
|
||||
<option value="<?php echo $p['id']; ?>"><?php echo htmlspecialchars($p['full_legal_name']); ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="worker_id">Support Worker *</label>
|
||||
<select id="worker_id" name="worker_id" required>
|
||||
<option value="">Select a worker...</option>
|
||||
<?php foreach ($workers as $w): ?>
|
||||
<label for="staff_id">Care Staff *</label>
|
||||
<select id="staff_id" name="staff_id" required>
|
||||
<option value="">Select a staff member...</option>
|
||||
<?php foreach ($care_staff as $w): ?>
|
||||
<option value="<?php echo $w['id']; ?>"><?php echo htmlspecialchars($w['full_name']); ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
@ -109,8 +109,8 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 2rem;">
|
||||
<button type="submit" class="btn btn-primary">Log Service</button>
|
||||
<a href="service_logs.php" class="btn">Cancel</a>
|
||||
<button type="submit" class="btn btn-primary">Log Booking</button>
|
||||
<a href="bookings.php" class="btn">Cancel</a>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@ -3,26 +3,26 @@ require_once 'db/config.php';
|
||||
require_once 'header.php';
|
||||
|
||||
if (!isset($_GET['id']) || !filter_var($_GET['id'], FILTER_VALIDATE_INT)) {
|
||||
echo '<div class="feedback error">Invalid worker ID.</div>';
|
||||
echo '<div class="feedback error">Invalid staff ID.</div>';
|
||||
require_once 'footer.php';
|
||||
exit;
|
||||
}
|
||||
|
||||
$worker_id = $_GET['id'];
|
||||
$worker = null;
|
||||
$staff_id = $_GET['id'];
|
||||
$staff = null;
|
||||
|
||||
try {
|
||||
$db = db();
|
||||
$stmt = $db->prepare("SELECT * FROM support_workers WHERE id = :id");
|
||||
$stmt->bindParam(':id', $worker_id, PDO::PARAM_INT);
|
||||
$stmt = $db->prepare("SELECT * FROM care_staff WHERE id = :id");
|
||||
$stmt->bindParam(':id', $staff_id, PDO::PARAM_INT);
|
||||
$stmt->execute();
|
||||
$worker = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||
$staff = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||
} catch (PDOException $e) {
|
||||
echo '<div class="feedback error">Error: ' . $e->getMessage() . '</div>';
|
||||
}
|
||||
|
||||
if (!$worker) {
|
||||
echo '<div class="feedback error">Support worker not found.</div>';
|
||||
if (!$staff) {
|
||||
echo '<div class="feedback error">Care staff member not found.</div>';
|
||||
require_once 'footer.php';
|
||||
exit;
|
||||
}
|
||||
@ -58,33 +58,33 @@ function render_detail_area($label, $value) {
|
||||
</style>
|
||||
|
||||
<div class="detail-header">
|
||||
<h1><?php echo htmlspecialchars($worker['full_name']); ?></h1>
|
||||
<h1><?php echo htmlspecialchars($staff['full_name']); ?></h1>
|
||||
<div class="detail-actions">
|
||||
<a href="edit_worker.php?id=<?php echo $worker['id']; ?>" class="btn btn-primary">Edit</a>
|
||||
<form action="delete_worker.php" method="POST" onsubmit="return confirm('Are you sure you want to delete this worker? This cannot be undone.');">
|
||||
<input type="hidden" name="id" value="<?php echo $worker['id']; ?>">
|
||||
<a href="edit_staff.php?id=<?php echo $staff['id']; ?>" class="btn btn-primary">Edit</a>
|
||||
<form action="delete_staff.php" method="POST" onsubmit="return confirm('Are you sure you want to delete this staff member? This cannot be undone.');">
|
||||
<input type="hidden" name="id" value="<?php echo $staff['id']; ?>">
|
||||
<button type="submit" class="btn btn-danger">Delete</button>
|
||||
</form>
|
||||
<a href="workers.php" class="btn">Back to List</a>
|
||||
<a href="care_staff.php" class="btn">Back to List</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="detail-grid">
|
||||
<div class="detail-section">
|
||||
<h2>Personal & Contact</h2>
|
||||
<?php render_detail_item('Full Name', $worker['full_name']); ?>
|
||||
<?php render_detail_area('Contact Info', $worker['contact_info']); ?>
|
||||
<?php render_detail_item('Full Name', $staff['full_name']); ?>
|
||||
<?php render_detail_area('Contact Info', $staff['contact_info']); ?>
|
||||
</div>
|
||||
<div class="detail-section">
|
||||
<h2>Compliance</h2>
|
||||
<?php render_detail_item('Screening Number', $worker['ndis_worker_screening_number']); ?>
|
||||
<?php render_detail_item('Screening Expiry', date("d M Y", strtotime($worker['ndis_worker_screening_expiry']))); ?>
|
||||
<?php render_detail_item('First Aid Expiry', date("d M Y", strtotime($worker['first_aid_expiry']))); ?>
|
||||
<?php render_detail_item('Screening Number', $staff['ndis_worker_screening_number']); ?>
|
||||
<?php render_detail_item('Screening Expiry', date("d M Y", strtotime($staff['ndis_worker_screening_expiry']))); ?>
|
||||
<?php render_detail_item('First Aid Expiry', date("d M Y", strtotime($staff['first_aid_expiry']))); ?>
|
||||
</div>
|
||||
<div class="detail-section">
|
||||
<h2>Work Details</h2>
|
||||
<?php render_detail_item('Hourly Rate', $worker['hourly_rate'], true); ?>
|
||||
<?php render_detail_area('Qualifications', $worker['qualifications']); ?>
|
||||
<?php render_detail_item('Hourly Rate', $staff['hourly_rate'], true); ?>
|
||||
<?php render_detail_area('Qualifications', $staff['qualifications']); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user