Fixes on track chairs
Change-Id: I6b2f32a2a02e13384918ca3cf65d369048200489 Signed-off-by: smarcet <smarcet@gmail.com>
This commit is contained in:
parent
d4b350a5ad
commit
1e1650f213
@ -13,6 +13,7 @@
|
||||
**/
|
||||
use App\Jobs\Emails\AbstractEmailJob;
|
||||
use models\summit\SummitCategoryChange;
|
||||
use Illuminate\Support\Facades\Config;
|
||||
/**
|
||||
* Class PresentationCategoryChangeRequestCreatedEmail
|
||||
* @package App\Jobs\Emails\PresentationSelections
|
||||
@ -55,7 +56,7 @@ class PresentationCategoryChangeRequestCreatedEmail extends AbstractEmailJob
|
||||
$payload['status'] = $request->getNiceStatus();
|
||||
$payload['presentation_title'] = $presentation->getTitle();
|
||||
$payload['presentation_id'] = $presentation->getId();
|
||||
$payload['review_link'] = ''; //TBD
|
||||
$payload['review_link'] = sprintf(Config::get("track_chairs.review_link"), $summit->getRawSlug());
|
||||
$template_identifier = $this->getEmailTemplateIdentifierFromEmailEvent($summit);
|
||||
|
||||
parent::__construct($payload, $template_identifier, implode(",", $to_emails));
|
||||
|
@ -39,6 +39,7 @@ class PresentationCategoryChangeRequestResolvedEmail extends AbstractEmailJob
|
||||
$requester = $request->getRequester();
|
||||
$old_category = $request->getOldCategory();
|
||||
$new_category = $request->getNewCategory();
|
||||
|
||||
foreach($old_category->getTrackChairs() as $chair){
|
||||
$to_emails[] = $chair->getMember()->getEmail();
|
||||
}
|
||||
|
@ -441,6 +441,7 @@ final class SummitSelectionPlanService
|
||||
$presentation->setCategory($newCategory);
|
||||
$presentation->addTrackChairNotification
|
||||
(
|
||||
$current_member,
|
||||
sprintf
|
||||
(
|
||||
"{member} approved %s's request to move this presentation from %s to %s",
|
||||
@ -449,22 +450,13 @@ final class SummitSelectionPlanService
|
||||
$newCategory->getTitle()
|
||||
)
|
||||
);
|
||||
$presentation->addTrackChairNotification
|
||||
(
|
||||
$current_member,
|
||||
sprintf(
|
||||
"{member} rejected %s's request to move this presentation from %s to %s because : %s" ,
|
||||
$change_request->getRequester()->getFullName(),
|
||||
$category->getTitle(),
|
||||
$newCategory->getTitle(),
|
||||
$reason
|
||||
)
|
||||
);
|
||||
|
||||
foreach($presentation->getPendingCategoryChangeRequests() as $pending_request){
|
||||
if($pending_request->getId() == $change_request->getId()) continue;
|
||||
$pending_request->reject($current_member, sprintf( "Request ID %s was approved instead.", $change_request->getId()));
|
||||
}
|
||||
}
|
||||
|
||||
else{
|
||||
$change_request->reject($current_member, $reason);
|
||||
$presentation->addTrackChairNotification(
|
||||
|
@ -16,4 +16,5 @@ return [
|
||||
'weight_select' => env('TRACK_CHAIR_WEIGHT_PASS', 2),
|
||||
'weight_maybe' => env('TRACK_CHAIRS_WEIGHT_MAYBE', 1),
|
||||
'weight_pass' => env('TRACK_CHAIRS_WEIGHT_PASS', -1),
|
||||
'review_link' => env('TRACK_CHAIRS_REVIEW_LINK',''),
|
||||
];
|
Loading…
Reference in New Issue
Block a user