fix family card issue
This commit is contained in:
@@ -10,6 +10,7 @@ use App\Models\StudentModel;
|
||||
use App\Models\UserModel;
|
||||
use App\Services\PhoneFormatterService;
|
||||
use App\Services\SchoolIdService;
|
||||
use App\Services\FamilyDataSyncService;
|
||||
use CodeIgniter\Database\BaseConnection;
|
||||
use CodeIgniter\Database\Exceptions\DatabaseException;
|
||||
use DateTime;
|
||||
@@ -296,6 +297,12 @@ class ParentRegistrationService
|
||||
}
|
||||
}
|
||||
|
||||
// Deleting a student cascades the normalized family_students row, but
|
||||
// intentionally leaves the household and guardian records in place.
|
||||
// Always restore that membership when a child is added again (and heal
|
||||
// older registrations that pre-date the normalized family tables).
|
||||
(new FamilyDataSyncService($this->db))->syncForParent($parentId);
|
||||
|
||||
$this->medicalConditionModel->where('student_id', $studentId)->delete();
|
||||
foreach ((array) $conditions as $condition) {
|
||||
$condition = trim((string) $condition);
|
||||
|
||||
Reference in New Issue
Block a user