Add Care Units, beds, and dated staff assignments.
Deploy Ladill Care / deploy (push) Successful in 1m8s
Deploy Ladill Care / deploy (push) Successful in 1m8s
Models employment as department/unit/shift placements with primary and temporary kinds so nurses are not permanently bound to a ward. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -5,6 +5,7 @@ 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 Department extends Model
|
||||
@@ -27,6 +28,13 @@ class Department extends Model
|
||||
return $this->belongsTo(Branch::class, 'branch_id');
|
||||
}
|
||||
|
||||
public function careUnits(): HasMany
|
||||
{
|
||||
return $this->hasMany(CareUnit::class, 'department_id')
|
||||
->orderBy('sort_order')
|
||||
->orderBy('name');
|
||||
}
|
||||
|
||||
/**
|
||||
* Select option label — includes branch when set so multi-branch duplicates are distinguishable.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user