Skip to content

Commit

Permalink
feat: adds new status 'inquiry' for applications
Browse files Browse the repository at this point in the history
  • Loading branch information
TiSiE committed Mar 19, 2021
1 parent 4ad1771 commit 7e4162f
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 1 deletion.
3 changes: 2 additions & 1 deletion module/Applications/src/Entity/Status.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ class Status extends AbstractEntity implements StatusInterface
protected static $orderMap = [
self::INCOMING => 10,
self::CONFIRMED => 20,
self::ACCEPTED =>25,
self::ACCEPTED => 25,
self::INQUIRY => 29,
self::INVITED => 30,
self::REJECTED => 40,
];
Expand Down
5 changes: 5 additions & 0 deletions module/Applications/src/Entity/StatusInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ interface StatusInterface extends EntityInterface
*/
const ACCEPTED = 'accepted';

/**
* application is in process, but further actions from the applicant are needed
*/
const INQUIRY = 'inquiry';

/**
* An applicant ist invited to in interview
*/
Expand Down
3 changes: 3 additions & 0 deletions module/Applications/src/Listener/StatusChange.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ public function prepareFormData(ApplicationEvent $e)
case Status::REJECTED:
$key = 'mailRejectionText';
break;
case Status::INQUIRY:
$key = 'mailInquiryText';
break;
default:
throw new \InvalidArgumentException('Unknown status value: ' .$status);
}
Expand Down
18 changes: 18 additions & 0 deletions module/Applications/view/applications/manage/detail.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,15 @@ endif;
),
);
}
$actionButtons[ Status::INQUIRY ] = [
'href' => $this->url(
'lang/applications/detail/status',
[ 'status' => Status::INQUIRY ],
true
),
'label' => $this->translate('Inquiry'),
'title' => $this->translate('Send an inquiry to the applicant'),
];
$actionButtons[ Status::REJECTED ] = [
'href' => $this->url(
'lang/applications/detail/status',
Expand Down Expand Up @@ -157,6 +166,15 @@ endif;
),
);
}
$actionButtons[ Status::INQUIRY ] = [
'href' => $this->url(
'lang/applications/detail/status',
[ 'status' => Status::INQUIRY ],
true
),
'label' => $this->translate('Inquiry'),
'title' => $this->translate('Send an inquiry to the applicant'),
];
$actionButtons[ Status::REJECTED ] = [
'href' => $this->url(
'lang/applications/detail/status',
Expand Down

0 comments on commit 7e4162f

Please sign in to comment.