feat: implement internship journal entry system with printable reports and approval workflow
This commit is contained in:
@@ -32,8 +32,21 @@ class CareerApplication extends Model
|
||||
'github_repo',
|
||||
'certificate_code',
|
||||
'transcript_markdown',
|
||||
'notebook_supervisor_signed',
|
||||
'notebook_supervisor_name',
|
||||
'notebook_unit_signed',
|
||||
'notebook_unit_name',
|
||||
'notebook_approved',
|
||||
];
|
||||
|
||||
/**
|
||||
* Get the journal entries for the internship application.
|
||||
*/
|
||||
public function journalEntries()
|
||||
{
|
||||
return $this->hasMany(InternshipJournalEntry::class);
|
||||
}
|
||||
|
||||
protected static function booted()
|
||||
{
|
||||
static::saving(function ($model) {
|
||||
@@ -58,6 +71,9 @@ class CareerApplication extends Model
|
||||
{
|
||||
return [
|
||||
'password' => 'hashed',
|
||||
'notebook_supervisor_signed' => 'boolean',
|
||||
'notebook_unit_signed' => 'boolean',
|
||||
'notebook_approved' => 'boolean',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class InternshipJournalEntry extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'career_application_id',
|
||||
'day_number',
|
||||
'date',
|
||||
'content',
|
||||
];
|
||||
|
||||
/**
|
||||
* Get the career application that owns this journal entry.
|
||||
*/
|
||||
public function careerApplication()
|
||||
{
|
||||
return $this->belongsTo(CareerApplication::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user