Add shift templates, unit duty roster grid, and Nursing Services hub.
Deploy Ladill Care / deploy (push) Successful in 1m0s

Phase 3 staff management: real shift entities, week roster linked to temporary assignments, and a nursing ops module surface (registry, today’s allocation, unit shortcuts).

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-20 10:40:25 +00:00
co-authored by Cursor
parent 9eb6c21828
commit b2cebe2908
20 changed files with 1439 additions and 8 deletions
+54
View File
@@ -0,0 +1,54 @@
<?php
namespace App\Models;
use App\Models\Concerns\BelongsToOwner;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\SoftDeletes;
class Shift extends Model
{
use BelongsToOwner, SoftDeletes;
protected $table = 'care_shifts';
protected $fillable = [
'owner_ref',
'organization_id',
'code',
'label',
'start_time',
'end_time',
'color',
'sort_order',
'is_active',
];
protected function casts(): array
{
return [
'is_active' => 'boolean',
'sort_order' => 'integer',
];
}
public function organization(): BelongsTo
{
return $this->belongsTo(Organization::class, 'organization_id');
}
public function rosterEntries(): HasMany
{
return $this->hasMany(RosterEntry::class, 'shift_id');
}
public function timeLabel(): string
{
$start = substr((string) $this->start_time, 0, 5);
$end = substr((string) $this->end_time, 0, 5);
return $start.''.$end;
}
}