feat: add the house manager questionnaire per travel and compact the questionnaire layout
This commit is contained in:
1 parent
d760ed3cdf
commit
bfef08b519
50 files changed
+2763
-180
No files matched your search
@@ -5,6 +5,11 @@ namespace App\Enum;
|
||||
/**
|
||||
* The kinds of question a questionnaire definition may use. Each maps to exactly one form field
|
||||
* in QuestionnaireType; adding one means a case here and a line there, nothing more.
|
||||
*
|
||||
* TEAMER_GUIDINGS, TEAMER_COURSES and PROGRAMME are the house manager's bespoke widgets: their
|
||||
* options are the guiding types, course types and programme items, and each picked option carries
|
||||
* numbers of its own. The two teamer types offer the travel's placements, so they need the form's
|
||||
* `travel` option.
|
||||
*/
|
||||
enum QuestionType: string
|
||||
{
|
||||
@@ -14,9 +19,17 @@ enum QuestionType: string
|
||||
case MULTI = 'multi';
|
||||
case DATE = 'date';
|
||||
case RATING = 'rating';
|
||||
case TEAMER_GUIDINGS = 'teamer_guidings';
|
||||
case TEAMER_COURSES = 'teamer_courses';
|
||||
case PROGRAMME = 'programme';
|
||||
|
||||
public function hasOptions(): bool
|
||||
{
|
||||
return self::CHOICE === $this || self::MULTI === $this;
|
||||
return self::TEXT !== $this && self::TEXTAREA !== $this && self::DATE !== $this && self::RATING !== $this;
|
||||
}
|
||||
|
||||
public function needsTravel(): bool
|
||||
{
|
||||
return self::TEAMER_GUIDINGS === $this || self::TEAMER_COURSES === $this;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user