Add NFC chore submission feature and enhance family settings
- Introduced NFC support for chore submissions, allowing specific person credit after Head of Household approval. - Updated family settings to include NFC base URL, scan cooldown, and confirmation page options. - Enhanced chore management with options for anyone to complete chores and NFC link generation. - Improved API endpoints for handling NFC tokens and chore submissions. - Updated readme to reflect new NFC features and settings.
This commit is contained in:
@@ -7,7 +7,7 @@ if ($_SERVER['REQUEST_METHOD'] !== 'POST') {
|
||||
sendJson(['success' => false, 'error' => 'Method not allowed'], 405);
|
||||
}
|
||||
|
||||
$people = normalizePeopleList(readJsonFile('people.json'));
|
||||
$people = migrateAllPeople(normalizePeopleList(readJsonFile('people.json')));
|
||||
$actor = requireActivePerson($people);
|
||||
$actorId = (string) ($actor['id'] ?? '');
|
||||
if ($actorId === '') {
|
||||
@@ -34,7 +34,7 @@ if (($row['status'] ?? '') !== 'active') {
|
||||
}
|
||||
|
||||
$assignees = $row['assignee_ids'] ?? [];
|
||||
if (!is_array($assignees) || !in_array($actorId, $assignees, true)) {
|
||||
if (empty($row['anyone_can_complete']) && (!is_array($assignees) || !in_array($actorId, $assignees, true))) {
|
||||
sendJson(['success' => false, 'error' => 'Only assignees can mark this chore complete'], 403);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user