WIP on PHP 8.4 conversion
This commit is contained in:
1 parent
9110643383
commit
3bb4be3127
16 files changed
+204
-157
No files matched your search
@@ -10,7 +10,7 @@ Layout::bareHead(); ?>
|
||||
<form hx-patch="/request/snooze?id=<?=$req->id?>" hx-target=#journalItems hx-swap=outerHTML>
|
||||
<div class="form-floating pb-3">
|
||||
<input type=date id=until name=until class=form-control
|
||||
min="<?=(new DateTimeImmutable('now'))->format('Y-m-d')?>" required>
|
||||
min="<?=new DateTimeImmutable('now')->format('Y-m-d')?>" required>
|
||||
<label for=until>Until</label>
|
||||
</div>
|
||||
<p class="text-end mb-0"><button type=submit class="btn btn-primary">Snooze</button>
|
||||
|
||||
@@ -28,7 +28,7 @@ Layout::pageHead('Full Request');?>
|
||||
<h6 class="card-subtitle text-muted mb-2"><?php
|
||||
if (!is_null($answered)) { ?>
|
||||
Answered <?=$answered->format('F j, Y')?>
|
||||
(<?= RelativeDate::between('now', $req->history[0]->asOf);?>) •<?php
|
||||
(<?=RelativeDate::between('now', $req->history[0]->asOf);?>) •<?php
|
||||
} ?>
|
||||
Prayed <?=number_format($prayed)?> times • Open <?=number_format($daysOpen)?> days
|
||||
</h6>
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
use BitBadger\PDODocument\Patch;
|
||||
use MyPrayerJournal\Domain\Note;
|
||||
use MyPrayerJournal\Table;
|
||||
use MyPrayerJournal\Domain\Note;
|
||||
|
||||
require '../../start.php';
|
||||
|
||||
$req = validate_request($_GET['id'], ['POST'], false);
|
||||
|
||||
array_unshift($req->notes, new Note((new DateTimeImmutable('now'))->format('c'), $_POST['notes']));
|
||||
array_unshift($req->notes, new Note(new DateTimeImmutable('now')->format('c'), $_POST['notes']));
|
||||
Patch::byId(Table::REQUEST, $req->id, ['notes' => $req->notes]);
|
||||
|
||||
hide_modal('notes');
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
use BitBadger\PDODocument\Patch;
|
||||
use MyPrayerJournal\Domain\{History, RecurrencePeriod, RequestAction};
|
||||
use MyPrayerJournal\Table;
|
||||
use MyPrayerJournal\Domain\{History, RecurrencePeriod, RequestAction};
|
||||
use MyPrayerJournal\UI\Component;
|
||||
|
||||
require '../../start.php';
|
||||
|
||||
@@ -14,7 +14,7 @@ $reqs = Request::active();
|
||||
Layout::pageHead('Active Requests'); ?>
|
||||
<article class="container mt-3">
|
||||
<h2 class=pb-3>Active Requests</h2><?php
|
||||
if ($reqs->hasItems()) {
|
||||
if ($reqs->hasItems) {
|
||||
Component::requestList($reqs);
|
||||
} else {
|
||||
Component::noResults('No Active Requests', '/journal', 'Return to your journal',
|
||||
|
||||
@@ -14,7 +14,7 @@ $reqs = Request::answered();
|
||||
Layout::pageHead('Answered Requests'); ?>
|
||||
<article class="container mt-3">
|
||||
<h2 class=pb-3>Answered Requests</h2><?php
|
||||
if ($reqs->hasItems()) {
|
||||
if ($reqs->hasItems) {
|
||||
Component::requestList($reqs);
|
||||
} else {
|
||||
Component::noResults('No Answered Requests', '/journal', 'Return to your journal', <<<'TEXT'
|
||||
|
||||
@@ -14,7 +14,7 @@ $reqs = Request::snoozed();
|
||||
Layout::pageHead('Snoozed Requests'); ?>
|
||||
<article class="container mt-3">
|
||||
<h2 class=pb-3>Snoozed Requests</h2><?php
|
||||
if ($reqs->hasItems()) {
|
||||
if ($reqs->hasItems) {
|
||||
Component::requestList($reqs);
|
||||
} else {
|
||||
Component::noResults('No Snoozed Requests', '/journal', 'Return to your journal',
|
||||
|
||||
Reference in new issue
Block a user