-
Notifications
You must be signed in to change notification settings - Fork 51
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
CampProgram: fix create activity #2213
CampProgram: fix create activity #2213
Conversation
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.
Cool, ich kann das sonst morgen versuchen.
api/src/Entity/Activity.php
Outdated
#[ApiProperty(writable: false, example: '["/schedule_entries/1a2b3c4d"]')] | ||
#[Groups(['read'])] | ||
#[Assert\Valid] | ||
#[ApiProperty(writableLink: true, example: '["/schedule_entries/1a2b3c4d"]')] |
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.
Das Example für OpenAPI solltest du noch anpassen, siehe Camp->$periods
. Nur die required Felder würden mir reichen, sodass man einen Startpunkt zum Copy Pasten hat in Swagger.
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.
done
*/ | ||
#[ApiProperty(writable: false, example: '["/schedule_entries/1a2b3c4d"]')] | ||
#[Groups(['read'])] | ||
#[Assert\Valid] |
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.
Beim Camp habe ich noch eine Validierung #[Assert\Count(min: 1, groups: ['create'])]
, wäre hier wohl auch sinnvoll oder? Vorschlag von Forte war ja mal, beim Löschen des letzten ScheduleEntries wird auch die Activity gelöscht.
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.
done
With the changes made with api platform. Also use period iri instead of id to filter activies in Picasso.vue. Remove periodId from the payload and send period iri in DialogActivityCreate.vue. Use category iri to reference the category in DialogActivityForm.vue. Use cascade persist in the Activity Entity to persist created ScheduleEntries. Checked with docker-compose exec php bin/console doctrine:migrations:diff that no migration is necessary. ScheduleEntry already has onDelete=cascade on the joincolumn. Use $this->activity?->getCamp() instead of property access in ScheduleEntry because when an activity is created, the camp is null (this is attached in the persister), and Activity::getCamp returns the camp of the category. Issue: ecamp#2029
Don't append "Id" to embedded entities Use _meta.self as value instead of the object. DialogBase for an edit dialog with embedded Entity is only used in DialogActivityEdit.vue. Relates to ecamp#2198 Issue: ecamp#2029
Patch of an embedded collection did not work. Relates to ecamp#2195 Issue: ecamp#2029
f9daa38
to
d3a5d58
Compare
Unschönheiten:
Fehler: