fix positions
Deploy to Shared Hosting / Shared hosting deploy (push) Failing after 54s
Tests / PHPUnit (push) Successful in 1m22s

This commit is contained in:
root
2026-09-03 03:21:37 -04:00
parent 6936a822c8
commit c70f6bdc6e
12 changed files with 344 additions and 18 deletions
+14 -4
View File
@@ -3,7 +3,7 @@
<div class="container-fluid mt-4">
<div class="d-flex justify-content-between align-items-center mb-3">
<h2>Open Positions</h2>
<h2>Job Positions</h2>
<div class="d-flex gap-2">
<a href="<?= site_url('administrator/job-postings/applications') ?>" class="btn btn-outline-secondary">Applications</a>
<a href="<?= site_url('administrator/job-postings/templates') ?>" class="btn btn-primary">New Position</a>
@@ -13,18 +13,28 @@
<?php if (session('error')): ?><div class="alert alert-danger"><?= esc(session('error')) ?></div><?php endif; ?>
<div class="table-responsive">
<table class="table table-striped table-bordered no-mgmt-sticky">
<thead><tr><th>Title</th><th>Department</th><th>Location</th><th>Type</th><th>Status</th><th>Actions</th></tr></thead>
<thead><tr><th>Title</th><th>Department</th><th>Location</th><th>Type</th><th>Status</th><th>Post Date</th><th>Actions</th></tr></thead>
<tbody>
<?php foreach ($positions as $position): ?>
<?php
$status = strtolower((string) ($position['status'] ?? 'draft'));
$statusBadgeClass = match ($status) {
'open' => 'bg-success',
'filled' => 'bg-primary',
'closed' => 'bg-secondary',
default => 'bg-warning text-dark',
};
?>
<tr>
<td><?= esc($position['title']) ?></td>
<td><?= esc($position['department'] ?? '') ?></td>
<td><?= esc($position['location'] ?? '') ?></td>
<td><?= esc($position['employment_type'] ?? '') ?></td>
<td><?= esc(ucfirst($position['status'])) ?></td>
<td><span class="badge <?= esc($statusBadgeClass) ?>"><?= esc(ucfirst($status)) ?></span></td>
<td><?= !empty($position['posted_at']) ? esc(date('M j, Y', strtotime((string) $position['posted_at']))) : '&mdash;' ?></td>
<td>
<a class="btn btn-sm btn-outline-primary" href="<?= site_url('administrator/job-postings/positions/' . $position['position_id'] . '/edit') ?>">Edit</a>
<?php if ($position['status'] === 'open'): ?>
<?php if ($status === 'open'): ?>
<a class="btn btn-sm btn-outline-secondary" href="<?= site_url('careers/' . $position['position_id']) ?>">Public View</a>
<?php endif; ?>
</td>
+5 -1
View File
@@ -1,6 +1,10 @@
<?= $this->extend('layout/main_layout') ?>
<?= $this->extend('layout/careers_layout') ?>
<?= $this->section('styles') ?>
<style>
body {
background-color: var(--sage);
}
.job-apply-page {
max-width: 920px;
margin: 0 auto;
+1 -1
View File
@@ -1,4 +1,4 @@
<?= $this->extend('layout/main_layout') ?>
<?= $this->extend('layout/careers_layout') ?>
<?= $this->section('content') ?>
<div class="container py-5">
+6 -1
View File
@@ -1,6 +1,10 @@
<?= $this->extend('layout/main_layout') ?>
<?= $this->extend('layout/careers_layout') ?>
<?= $this->section('styles') ?>
<style>
body {
background-color: var(--sage);
}
.job-posting-copy,
.job-posting-copy p,
.job-posting-copy li {
@@ -89,6 +93,7 @@ $renderPostingText = static function (?string $text): string {
<?= esc($position['department'] ?? '') ?>
<?php if (!empty($position['location'])): ?> &middot; <?= esc($position['location']) ?><?php endif; ?>
<?php if (!empty($position['employment_type'])): ?> &middot; <?= esc($position['employment_type']) ?><?php endif; ?>
<?php if (!empty($position['posted_at'])): ?><br><?= esc(date('M j, Y', strtotime((string) $position['posted_at']))) ?><?php endif; ?>
</p>
<h2 class="h4 mt-4">Description</h2>
<div><?= $renderPostingText($position['description'] ?? '') ?></div>