-
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #341 from MineTrax/develop
Feat: Staff Recruitment System v1
- Loading branch information
Showing
246 changed files
with
7,652 additions
and
1,366 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
namespace App\Enums; | ||
|
||
use BenSampo\Enum\Enum; | ||
|
||
final class CommentType extends Enum | ||
{ | ||
const DEFAULT = null; | ||
|
||
const RECRUITMENT_APPLICANT_MESSAGE = 'recruitment_applicant_message'; | ||
const RECRUITMENT_STAFF_MESSAGE = 'recruitment_staff_message'; | ||
|
||
const RECRUITMENT_STAFF_WHISPER = 'recruitment_staff_whisper'; | ||
|
||
const RECRUITMENT_ACTION = 'recruitment_action'; | ||
|
||
public function toArray(): mixed | ||
{ | ||
return [ | ||
'key' => $this->key, | ||
'value' => $this->value, | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
|
||
namespace App\Enums; | ||
|
||
use BenSampo\Enum\Enum; | ||
|
||
final class RecruitmentFormStatus extends Enum | ||
{ | ||
const DRAFT = 'draft'; | ||
|
||
const ACTIVE = 'active'; | ||
|
||
const DISABLED = 'disabled'; | ||
|
||
const ARCHIVED = 'archived'; | ||
|
||
public function toArray(): mixed | ||
{ | ||
return [ | ||
'key' => $this->key, | ||
'value' => $this->value, | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
namespace App\Enums; | ||
|
||
use BenSampo\Enum\Enum; | ||
|
||
final class RecruitmentSubmissionStatus extends Enum | ||
{ | ||
const PENDING = 'pending'; | ||
|
||
const INPROGRESS = 'inprogress'; | ||
|
||
const APPROVED = 'approved'; | ||
|
||
const REJECTED = 'rejected'; | ||
|
||
const WITHDRAWN = 'withdrawn'; | ||
|
||
const ONHOLD = 'onhold'; | ||
|
||
public function toArray(): mixed | ||
{ | ||
return [ | ||
'key' => $this->key, | ||
'value' => $this->value, | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
namespace App\Events; | ||
|
||
use App\Models\Comment; | ||
use App\Models\RecruitmentSubmission; | ||
use App\Models\User; | ||
use Illuminate\Broadcasting\InteractsWithSockets; | ||
use Illuminate\Broadcasting\PrivateChannel; | ||
use Illuminate\Foundation\Events\Dispatchable; | ||
use Illuminate\Queue\SerializesModels; | ||
|
||
class RecruitmentSubmissionCommentCreated | ||
{ | ||
use Dispatchable, InteractsWithSockets, SerializesModels; | ||
|
||
/** | ||
* Create a new event instance. | ||
*/ | ||
public function __construct(public Comment $comment, public RecruitmentSubmission $submission, public User $causer) | ||
{ | ||
// | ||
} | ||
|
||
/** | ||
* Get the channels the event should broadcast on. | ||
* | ||
* @return array<int, \Illuminate\Broadcasting\Channel> | ||
*/ | ||
public function broadcastOn(): array | ||
{ | ||
return [ | ||
new PrivateChannel('channel-name'), | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
|
||
namespace App\Events; | ||
|
||
use App\Models\RecruitmentSubmission; | ||
use Illuminate\Broadcasting\Channel; | ||
use Illuminate\Broadcasting\InteractsWithSockets; | ||
use Illuminate\Broadcasting\PresenceChannel; | ||
use Illuminate\Broadcasting\PrivateChannel; | ||
use Illuminate\Contracts\Broadcasting\ShouldBroadcast; | ||
use Illuminate\Foundation\Events\Dispatchable; | ||
use Illuminate\Queue\SerializesModels; | ||
|
||
class RecruitmentSubmissionCreated | ||
{ | ||
use Dispatchable, InteractsWithSockets, SerializesModels; | ||
|
||
/** | ||
* Create a new event instance. | ||
*/ | ||
public function __construct(public RecruitmentSubmission $submission) | ||
{ | ||
// | ||
} | ||
|
||
/** | ||
* Get the channels the event should broadcast on. | ||
* | ||
* @return array<int, \Illuminate\Broadcasting\Channel> | ||
*/ | ||
public function broadcastOn(): array | ||
{ | ||
return [ | ||
new PrivateChannel('channel-name'), | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
|
||
namespace App\Events; | ||
|
||
use App\Enums\RecruitmentSubmissionStatus; | ||
use App\Models\RecruitmentSubmission; | ||
use Illuminate\Broadcasting\InteractsWithSockets; | ||
use Illuminate\Broadcasting\PrivateChannel; | ||
use Illuminate\Foundation\Events\Dispatchable; | ||
use Illuminate\Queue\SerializesModels; | ||
|
||
class RecruitmentSubmissionStatusChanged | ||
{ | ||
use Dispatchable, InteractsWithSockets, SerializesModels; | ||
|
||
/** | ||
* Create a new event instance. | ||
*/ | ||
public function __construct( | ||
public RecruitmentSubmission $submission, | ||
public $causer, | ||
public RecruitmentSubmissionStatus $previousStatus | ||
) { | ||
// | ||
} | ||
|
||
/** | ||
* Get the channels the event should broadcast on. | ||
* | ||
* @return array<int, \Illuminate\Broadcasting\Channel> | ||
*/ | ||
public function broadcastOn(): array | ||
{ | ||
return [ | ||
new PrivateChannel('channel-name'), | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.