Skip to content
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

Generate API method to check subscription requirements #10

Open
johanv opened this issue Jan 25, 2017 · 2 comments
Open

Generate API method to check subscription requirements #10

johanv opened this issue Jan 25, 2017 · 2 comments

Comments

@johanv
Copy link
Contributor

johanv commented Jan 25, 2017

I want a Kavo.validateparticipant API with params contact_id, event_id and role_id, that checks whether the contacts can subscribe with given role to the given event.

@johanv
Copy link
Contributor Author

johanv commented Jan 25, 2017

Here are the specs for participants:

A: Je wordt 16 jaar of ouder in het jaar van de cursus.
HA: Je wordt 18 jaar of ouder en je hebt al minstens een jaar leidingservaring.
I: Je wordt 19 jaar of ouder en je hebt de competenties van een animator.

The 'leidingservaring' should be checked using a hook, because it will depend on how this is configured in CiviCRM. (It would probably better to inject the leidingservaring as a dependency, but I'm not sure how this works in CiviCRM).

@johanv
Copy link
Contributor Author

johanv commented Jan 26, 2017

I think I should create a ParticipantWorker and implement Worker::canCreate.

I think will create a ParticipantWorker and implement Worker::validateKavo. (Don't call it canCreate, because it will get confusing because there is also an unrelated Worker::create function.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant