-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Development programs backend #12481
Conversation
public function rules(): array | ||
{ | ||
return [ | ||
// developmentProgramId validated in the Create/UpdateCommunityInterestInputValidator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, it's a bit awkward that we can't validate this member of the input in its own validator. We don't have the community_id at this level and having two validators for the same field doesn't seem to work in Laravel.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've elected to not back-end localize this enum. On the applicant side, the UI uses the first person "I'm..." form of description and I don't see the descriptions on the admin side at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! π Learned some new laravel stuff while reviewing this π
Looks like you just need to update the one test to match the new method args.
->withCommunityInterests() |
'description_for_profile' => FactoryHelpers::toFakeLocalizedString($this->faker->sentence()), | ||
'description_for_nominations' => FactoryHelpers::toFakeLocalizedString($this->faker->sentence()), | ||
'community_id' => function () { | ||
$community = Community::inRandomOrder()->firstOr(fn () => Community::factory()->withWorkStreams()->create()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh this is cool! I did not know about firstOr
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So simple but so helpful π
π€ Resolves #12099
π Introduction
Adds backend modelling for development programs.
π΅οΈ Details
π§ͺ Testing
Some queries:
Query dev programs
Query my interest in dev programs
CreateCommunityInterest
UpdateCommunityInterest
DeleteDevProgramInterest
πΈ Screenshot
π Deployment