|
@@ -149,13 +149,17 @@ class Course extends Model
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public function getDetailsName() {
|
|
public function getDetailsName() {
|
|
|
|
|
+ $courseDiscipline = $this->discipline?->name ?? '';
|
|
|
$courseName = $this->name ?? 'Corso Sconosciuto';
|
|
$courseName = $this->name ?? 'Corso Sconosciuto';
|
|
|
$levelName = is_object($this->level) ? $this->level->name : '';
|
|
$levelName = is_object($this->level) ? $this->level->name : '';
|
|
|
$frequencyName = is_object($this->frequency) ? $this->frequency->name : '';
|
|
$frequencyName = is_object($this->frequency) ? $this->frequency->name : '';
|
|
|
$typeName = $this->getFormattedTypeField() ?? '';
|
|
$typeName = $this->getFormattedTypeField() ?? '';
|
|
|
|
|
|
|
|
// Build display name with level and frequency
|
|
// Build display name with level and frequency
|
|
|
- $displayNameParts = [$courseName];
|
|
|
|
|
|
|
+ $displayNameParts = [];
|
|
|
|
|
+ if ($courseDiscipline) $displayNameParts[] = $courseDiscipline;
|
|
|
|
|
+
|
|
|
|
|
+ $displayNameParts[] = $courseName;
|
|
|
if ($levelName) $displayNameParts[] = $levelName;
|
|
if ($levelName) $displayNameParts[] = $levelName;
|
|
|
// if ($typeName) $displayNameParts[] = $typeName;
|
|
// if ($typeName) $displayNameParts[] = $typeName;
|
|
|
if ($frequencyName) $displayNameParts[] = $frequencyName;
|
|
if ($frequencyName) $displayNameParts[] = $frequencyName;
|