Referrals ¶
Description ¶
IndeVets makes it a point to compensate any employee willing to provide a referral for employment at IV. For a referral submission an employee is paid $50. If that referral is hired they are offered $5,000. Given this focus on adding new vets, the decision was made to introduce a referral form into the vet portal. As of Thursday, March 10, 2022, this is the only location that referrals are added in CATS.
Implementation ¶
The referral banner UI is placed at the top of the vetportal shell in resources/js/views/VetPortalShell.vue.
When the referral form is submitted, it makes a POST request to /api/referrals which engages the store function in the ReferralController. The ReferralController will store the referral in the referral table and fire off a ReferralSubmitted event which will engage the SendNewReferralNotification listener. The listener sends an email to the IV recruiting team for follow up. The template for this email can be foujnd in resources/views/mail/referral-submitted.blade.php Once completed, the api request returns a 201 created HTTP response along with the referral object that was created.
Testing ¶
Unit tests for this functionality can be found in tests/Http/Api/Referral/Addtest.php
Additional Notes ¶
The contact email for the event notifcication is store in confi->indevets.php
The table used for storing referrals have the follows columns that are worth noting
contacted: DateTime
offered: DateTime
status: String
referral_type: String
data: text
Currently these items are not being used however, in the future they may be used in the following manner.
Contacted - If the referral is contacted, we can store a datetime of when they were contacted. This acts as time of contact while also indicating a binary record of weather or not they have actually been contacted. This can then be referenced in a future UI should we introduce this in cats.
Offered - If the referral has been offered a position at IV, we can store a datetime of when hte offer was made. This acts as time of offering while also indicating a binary record of weather or not they have actually been offered a position. This can then be referenced in a future UI while also serving as a referrence for payment should we introduce this in cats.
Status: There are no real status’ as of now. However, in the future, we can store the status in string for. Exmaples for this could be, contacted->pending-interview->interviewed->offered … etc.
Referral Type: For now, the payload from the referral form defaults to “vet”. However, in the future, this could be opened up to have a referral type of, say, hospital. This helps IV scale the referral concept to being outside of just vets.
Data: This can be used to store any additional information related to the referral. An example of this could be a json object / array that would store additional infromation about the vet or hospital that may not be defined in the current table structure.