Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ public function __construct
),
new OA\Parameter(
name: 'filter',
description: 'Filter by id, not_id, first_name, last_name, email, full_name, member_id, member_user_external_id, has_accepted_presentations, has_alternate_presentations, has_rejected_presentations, presentations_track_id, presentations_track_group_id, presentations_selection_plan_id, presentations_type_id, presentations_title, presentations_abstract, presentations_submitter_full_name, presentations_submitter_email, has_media_upload_with_type, has_not_media_upload_with_type. Operands supported: == (equal), @@ (contains), =@ (starts with).',
description: 'Filter by id, not_id, first_name, last_name, email, full_name, member_id, member_user_external_id, has_accepted_presentations, has_alternate_presentations, has_rejected_presentations, has_published_presentations, presentations_track_id, presentations_track_group_id, presentations_selection_plan_id, presentations_type_id, presentations_title, presentations_abstract, presentations_submitter_full_name, presentations_submitter_email, has_media_upload_with_type, has_not_media_upload_with_type. Operands supported: == (equal), @@ (contains), =@ (starts with).',
in: 'query',
required: false,
schema: new OA\Schema(type: 'string')
Expand Down Expand Up @@ -315,6 +315,7 @@ function () {
'has_accepted_presentations' => ['=='],
'has_alternate_presentations' => ['=='],
'has_rejected_presentations' => ['=='],
'has_published_presentations' => ['=='],
'presentations_track_id' => ['=='],
'presentations_track_group_id' => ['=='],
'presentations_selection_plan_id' => ['=='],
Expand All @@ -340,6 +341,7 @@ function () {
'has_accepted_presentations' => 'sometimes|string|in:true,false',
'has_alternate_presentations' => 'sometimes|string|in:true,false',
'has_rejected_presentations' => 'sometimes|string|in:true,false',
'has_published_presentations' => 'sometimes|string|in:true,false',
'presentations_track_id' => 'sometimes|integer',
'presentations_track_group_id' => 'sometimes|integer',
'presentations_selection_plan_id' => 'sometimes|integer',
Expand Down Expand Up @@ -412,7 +414,7 @@ function ($page, $per_page, $filter, $order, $applyExtraFilters) use ($summit) {
),
new OA\Parameter(
name: 'filter',
description: 'Filter query (supports multiple operators). Filterable fields: id, not_id, first_name, last_name, email, full_name, member_id, member_user_external_id, has_accepted_presentations, has_alternate_presentations, has_rejected_presentations, presentations_track_id, presentations_track_group_id, presentations_selection_plan_id, presentations_type_id, presentations_title, presentations_abstract, presentations_submitter_full_name, presentations_submitter_email, has_media_upload_with_type, has_not_media_upload_with_type.',
description: 'Filter query (supports multiple operators). Filterable fields: id, not_id, first_name, last_name, email, full_name, member_id, member_user_external_id, has_accepted_presentations, has_alternate_presentations, has_rejected_presentations, has_published_presentations, presentations_track_id, presentations_track_group_id, presentations_selection_plan_id, presentations_type_id, presentations_title, presentations_abstract, presentations_submitter_full_name, presentations_submitter_email, has_media_upload_with_type, has_not_media_upload_with_type.',
in: 'query',
required: false,
schema: new OA\Schema(type: 'string')
Expand Down Expand Up @@ -455,6 +457,7 @@ public function getSpeakersActivitiesCount($summit_id)
'has_accepted_presentations' => ['=='],
'has_alternate_presentations' => ['=='],
'has_rejected_presentations' => ['=='],
'has_published_presentations' => ['=='],
'presentations_track_id' => ['=='],
'presentations_track_group_id' => ['=='],
'presentations_selection_plan_id' => ['=='],
Expand All @@ -481,6 +484,7 @@ public function getSpeakersActivitiesCount($summit_id)
'has_accepted_presentations' => 'sometimes|string|in:true,false',
'has_alternate_presentations' => 'sometimes|string|in:true,false',
'has_rejected_presentations' => 'sometimes|string|in:true,false',
'has_published_presentations' => 'sometimes|string|in:true,false',
'presentations_track_id' => 'sometimes|integer',
'presentations_track_group_id' => 'sometimes|integer',
'presentations_selection_plan_id' => 'sometimes|integer',
Expand Down Expand Up @@ -530,7 +534,7 @@ public function getSpeakersActivitiesCount($summit_id)
),
new OA\Parameter(
name: 'filter',
description: 'Filter by id, not_id, first_name, last_name, email, full_name, member_id, member_user_external_id, has_accepted_presentations, has_alternate_presentations, has_rejected_presentations, presentations_track_id, presentations_track_group_id, presentations_selection_plan_id, presentations_type_id, presentations_title, presentations_abstract, presentations_submitter_full_name, presentations_submitter_email, has_media_upload_with_type, has_not_media_upload_with_type. Operands supported: == (equal), @@ (contains), =@ (starts with).',
description: 'Filter by id, not_id, first_name, last_name, email, full_name, member_id, member_user_external_id, has_accepted_presentations, has_alternate_presentations, has_rejected_presentations, has_published_presentations, presentations_track_id, presentations_track_group_id, presentations_selection_plan_id, presentations_type_id, presentations_title, presentations_abstract, presentations_submitter_full_name, presentations_submitter_email, has_media_upload_with_type, has_not_media_upload_with_type. Operands supported: == (equal), @@ (contains), =@ (starts with).',
in: 'query',
required: false,
schema: new OA\Schema(type: 'string')
Expand Down Expand Up @@ -596,6 +600,7 @@ function () {
'has_accepted_presentations' => ['=='],
'has_alternate_presentations' => ['=='],
'has_rejected_presentations' => ['=='],
'has_published_presentations' => ['=='],
'presentations_track_id' => ['=='],
'presentations_track_group_id' => ['=='],
'presentations_selection_plan_id' => ['=='],
Expand All @@ -621,6 +626,7 @@ function () {
'has_accepted_presentations' => 'sometimes|string|in:true,false',
'has_alternate_presentations' => 'sometimes|string|in:true,false',
'has_rejected_presentations' => 'sometimes|string|in:true,false',
'has_published_presentations' => 'sometimes|string|in:true,false',
'presentations_track_id' => 'sometimes|integer',
'presentations_track_group_id' => 'sometimes|integer',
'presentations_selection_plan_id' => 'sometimes|integer',
Expand Down Expand Up @@ -3194,7 +3200,7 @@ public function deleteSpeakerBigPhoto($speaker_id)
),
new OA\Parameter(
name: 'filter',
description: 'Filter speakers by id, first_name, last_name, email, full_name, has_accepted_presentations, has_alternate_presentations, has_rejected_presentations, presentations_track_id, presentations_track_group_id, presentations_selection_plan_id, presentations_type_id, presentations_title, presentations_abstract, presentations_submitter_full_name, presentations_submitter_email, has_media_upload_with_type, has_not_media_upload_with_type',
description: 'Filter speakers by id, first_name, last_name, email, full_name, has_accepted_presentations, has_alternate_presentations, has_rejected_presentations, has_published_presentations, presentations_track_id, presentations_track_group_id, presentations_selection_plan_id, presentations_type_id, presentations_title, presentations_abstract, presentations_submitter_full_name, presentations_submitter_email, has_media_upload_with_type, has_not_media_upload_with_type',
in: 'query',
required: false,
schema: new OA\Schema(type: 'string')
Expand Down Expand Up @@ -3260,6 +3266,7 @@ public function send($summit_id)
'has_accepted_presentations' => ['=='],
'has_alternate_presentations' => ['=='],
'has_rejected_presentations' => ['=='],
'has_published_presentations' => ['=='],
'presentations_track_id' => ['=='],
'presentations_track_group_id' => ['=='],
'presentations_selection_plan_id' => ['=='],
Expand All @@ -3286,6 +3293,7 @@ public function send($summit_id)
'has_accepted_presentations' => 'sometimes|string|in:true,false',
'has_alternate_presentations' => 'sometimes|string|in:true,false',
'has_rejected_presentations' => 'sometimes|string|in:true,false',
'has_published_presentations' => 'sometimes|string|in:true,false',
'presentations_track_id' => 'sometimes|integer',
'presentations_track_group_id' => 'sometimes|integer',
'presentations_selection_plan_id' => 'sometimes|integer',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ function () {
'has_accepted_presentations' => ['=='],
'has_alternate_presentations' => ['=='],
'has_rejected_presentations' => ['=='],
'has_published_presentations' => ['=='],
'presentations_track_id' => ['=='],
'presentations_track_group_id' => ['=='],
'presentations_selection_plan_id' => ['=='],
Expand All @@ -181,6 +182,7 @@ function () {
'has_accepted_presentations' => 'sometimes|string|in:true,false',
'has_alternate_presentations' => 'sometimes|string|in:true,false',
'has_rejected_presentations' => 'sometimes|string|in:true,false',
'has_published_presentations' => 'sometimes|string|in:true,false',
'presentations_track_id' => 'sometimes|integer',
'presentations_track_group_id' => 'sometimes|integer',
'presentations_selection_plan_id' => 'sometimes|integer',
Expand Down Expand Up @@ -301,6 +303,7 @@ function () {
'has_accepted_presentations' => ['=='],
'has_alternate_presentations' => ['=='],
'has_rejected_presentations' => ['=='],
'has_published_presentations' => ['=='],
'presentations_track_id' => ['=='],
'presentations_track_group_id' => ['=='],
'presentations_selection_plan_id' => ['=='],
Expand All @@ -327,6 +330,7 @@ function () {
'has_accepted_presentations' => 'sometimes|string|in:true,false',
'has_alternate_presentations' => 'sometimes|string|in:true,false',
'has_rejected_presentations' => 'sometimes|string|in:true,false',
'has_published_presentations' => 'sometimes|string|in:true,false',
'presentations_track_id' => 'sometimes|integer',
'presentations_track_group_id' => 'sometimes|integer',
'presentations_selection_plan_id' => 'sometimes|integer',
Expand Down Expand Up @@ -454,6 +458,7 @@ public function send($summit_id)
'has_accepted_presentations' => ['=='],
'has_alternate_presentations' => ['=='],
'has_rejected_presentations' => ['=='],
'has_published_presentations' => ['=='],
'presentations_track_id' => ['=='],
'presentations_track_group_id' => ['=='],
'presentations_selection_plan_id' => ['=='],
Expand Down Expand Up @@ -483,6 +488,7 @@ public function send($summit_id)
'has_accepted_presentations' => 'sometimes|string|in:true,false',
'has_alternate_presentations' => 'sometimes|string|in:true,false',
'has_rejected_presentations' => 'sometimes|string|in:true,false',
'has_published_presentations' => 'sometimes|string|in:true,false',
'presentations_track_id' => 'sometimes|integer',
'presentations_track_group_id' => 'sometimes|integer',
'presentations_selection_plan_id' => 'sometimes|integer',
Expand Down Expand Up @@ -523,7 +529,7 @@ public function send($summit_id)
name: "filter",
in: "query",
required: false,
description: "Filter query (supports multiple operators). Filterable fields: id, not_id, first_name, last_name, email, full_name, member_id, member_user_external_id, has_accepted_presentations, has_alternate_presentations, has_rejected_presentations, presentations_track_id, presentations_selection_plan_id, presentations_type_id, presentations_title, presentations_abstract, presentations_submitter_full_name, presentations_submitter_email, is_speaker, has_media_upload_with_type, has_not_media_upload_with_type.",
description: "Filter query (supports multiple operators). Filterable fields: id, not_id, first_name, last_name, email, full_name, member_id, member_user_external_id, has_accepted_presentations, has_alternate_presentations, has_rejected_presentations, has_published_presentations, presentations_track_id, presentations_selection_plan_id, presentations_type_id, presentations_title, presentations_abstract, presentations_submitter_full_name, presentations_submitter_email, is_speaker, has_media_upload_with_type, has_not_media_upload_with_type.",
schema: new OA\Schema(type: "string", example: "has_accepted_presentations==true")
),
],
Expand Down Expand Up @@ -564,6 +570,7 @@ public function getSubmittersActivitiesCount($summit_id)
'has_accepted_presentations' => ['=='],
'has_alternate_presentations' => ['=='],
'has_rejected_presentations' => ['=='],
'has_published_presentations' => ['=='],
'presentations_track_id' => ['=='],
'presentations_track_group_id' => ['=='],
'presentations_selection_plan_id' => ['=='],
Expand Down Expand Up @@ -591,6 +598,7 @@ public function getSubmittersActivitiesCount($summit_id)
'has_accepted_presentations' => 'sometimes|string|in:true,false',
'has_alternate_presentations' => 'sometimes|string|in:true,false',
'has_rejected_presentations' => 'sometimes|string|in:true,false',
'has_published_presentations' => 'sometimes|string|in:true,false',
'presentations_track_id' => 'sometimes|integer',
'presentations_track_group_id' => 'sometimes|integer',
'presentations_selection_plan_id' => 'sometimes|integer',
Expand Down
19 changes: 19 additions & 0 deletions app/Repositories/Summit/DoctrineMemberRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,25 @@ protected function getFilterMappings()
),
]
),
'has_published_presentations' =>
new DoctrineSwitchFilterMapping([
'true' => new DoctrineCaseFilterMapping(
'true',
'EXISTS (
SELECT __p15.id FROM models\summit\Presentation __p15
JOIN __p15.created_by __c15 WITH __c15 = e.id
WHERE __p15.summit = :summit AND __p15.published = 1
)'
),
'false' => new DoctrineCaseFilterMapping(
'false',
'NOT EXISTS (
SELECT __p15.id FROM models\summit\Presentation __p15
JOIN __p15.created_by __c15 WITH __c15 = e.id
WHERE __p15.summit = :summit AND __p15.published = 1
)'
),
]),
'has_alternate_presentations' =>
new DoctrineSwitchFilterMapping([
'true' => new DoctrineCaseFilterMapping(
Expand Down
27 changes: 27 additions & 0 deletions app/Repositories/Summit/DoctrineSpeakerRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,33 @@ protected function getFilterMappings()

]
),
'has_published_presentations' =>
new DoctrineSwitchFilterMapping([
'true' => new DoctrineCaseFilterMapping(
'true',
'EXISTS (
SELECT __p15.id FROM models\summit\Presentation __p15
JOIN __p15.speakers __spk15 WITH __spk15.speaker = e.id
WHERE __p15.summit = :summit AND __p15.published = 1
) OR EXISTS (
SELECT __p16.id FROM models\summit\Presentation __p16
JOIN __p16.moderator __md16 WITH __md16.id = e.id
WHERE __p16.summit = :summit AND __p16.published = 1
)'
),
'false' => new DoctrineCaseFilterMapping(
'false',
'NOT EXISTS (
SELECT __p15.id FROM models\summit\Presentation __p15
JOIN __p15.speakers __spk15 WITH __spk15.speaker = e.id
WHERE __p15.summit = :summit AND __p15.published = 1
) AND NOT EXISTS (
SELECT __p16.id FROM models\summit\Presentation __p16
JOIN __p16.moderator __md16 WITH __md16.id = e.id
WHERE __p16.summit = :summit AND __p16.published = 1
)'
),
]),
'has_alternate_presentations' =>
new DoctrineSwitchFilterMapping([
'true' => new DoctrineCaseFilterMapping(
Expand Down
Loading
Loading