Skip to content
Merged
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
1 change: 1 addition & 0 deletions app/Enums/VacationType.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ enum VacationType: string
case Training = "training_vacation";
case Childcare = "childcare_vacation";
case Volunteering = "volunteering_vacation";
case BloodDonation = "blood_donation_vacation";
case Absence = "absence";

public static function casesToSelect(): array
Expand Down
17 changes: 17 additions & 0 deletions config/vacation_types.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,23 @@
VacationTypeConfigRetriever::KEY_IS_VACATION => true,
VacationTypeConfigRetriever::KEY_DURING_NON_WORKDAYS => false,
],
VacationType::BloodDonation->value => [
VacationTypeConfigRetriever::KEY_TECHNICAL_APPROVAL => false,
VacationTypeConfigRetriever::KEY_ADMINISTRATIVE_APPROVAL => true,
VacationTypeConfigRetriever::KEY_BILLABLE => true,
VacationTypeConfigRetriever::KEY_HAS_LIMIT => false,
VacationTypeConfigRetriever::KEY_AVAILABLE_FOR => [
EmploymentForm::EmploymentContract,
],
VacationTypeConfigRetriever::KEY_REQUEST_ALLOWED_FOR => [
Role::Employee,
Role::Administrator,
Role::AdministrativeApprover,
Role::TechnicalApprover,
],
VacationTypeConfigRetriever::KEY_IS_VACATION => true,
VacationTypeConfigRetriever::KEY_DURING_NON_WORKDAYS => false,
],
VacationType::Unpaid->value => [
VacationTypeConfigRetriever::KEY_TECHNICAL_APPROVAL => true,
VacationTypeConfigRetriever::KEY_ADMINISTRATIVE_APPROVAL => true,
Expand Down
1 change: 1 addition & 0 deletions lang/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"absence": "Nieobecność",
"remote_work": "Praca zdalna",
"delegation": "Delegacja",
"blood_donation_vacation": "Oddanie krwi",
"employee": "Pracownik",
"administrator": "Administrator",
"technical_approver": "Techniczny akceptujący",
Expand Down
8 changes: 8 additions & 0 deletions resources/js/Composables/vacationTypeInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import CalendarRemoveIcon from 'vue-material-design-icons/CalendarRemove.vue'
import HomeCityIcon from 'vue-material-design-icons/HomeCity.vue'
import PlusIcon from 'vue-material-design-icons/Plus.vue'
import PlaneTrainIcon from 'vue-material-design-icons/PlaneTrain.vue'
import WaterPlusIcon from 'vue-material-design-icons/WaterPlus.vue'

const types = [
{
Expand Down Expand Up @@ -76,6 +77,13 @@ const types = [
color: 'text-rose-500',
border: 'border-rose-500',
},
{
text: 'Oddanie krwi',
value: 'blood_donation_vacation',
icon: WaterPlusIcon,
color: 'text-rose-500',
border: 'border-rose-500',
},
{
text: 'Nieobecność',
value: 'absence',
Expand Down
5 changes: 5 additions & 0 deletions tests/Feature/VacationRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -861,6 +861,7 @@ public function testCorrectVacationTypesAreAvailableForEmployee(): void
["label" => "Urlop szkoleniowy", "value" => "training_vacation"],
["label" => "Opieka nad dzieckiem (art. 188 kp)", "value" => "childcare_vacation"],
["label" => "Wolontariat", "value" => "volunteering_vacation"],
["label" => "Oddanie krwi", "value" => "blood_donation_vacation"],
]);
}

Expand All @@ -887,6 +888,7 @@ public function testCorrectVacationTypesAreAvailableForTechnicalApprover(): void
["label" => "Urlop szkoleniowy", "value" => "training_vacation"],
["label" => "Opieka nad dzieckiem (art. 188 kp)", "value" => "childcare_vacation"],
["label" => "Wolontariat", "value" => "volunteering_vacation"],
["label" => "Oddanie krwi", "value" => "blood_donation_vacation"],
]);
}

Expand Down Expand Up @@ -914,6 +916,7 @@ public function testCorrectVacationTypesAreAvailableForAdministrativeApprover():
["label" => "Urlop szkoleniowy", "value" => "training_vacation"],
["label" => "Opieka nad dzieckiem (art. 188 kp)", "value" => "childcare_vacation"],
["label" => "Wolontariat", "value" => "volunteering_vacation"],
["label" => "Oddanie krwi", "value" => "blood_donation_vacation"],
]);
}

Expand Down Expand Up @@ -941,6 +944,7 @@ public function testCorrectVacationTypesAreAvailableForAdmin(): void
["label" => "Urlop szkoleniowy", "value" => "training_vacation"],
["label" => "Opieka nad dzieckiem (art. 188 kp)", "value" => "childcare_vacation"],
["label" => "Wolontariat", "value" => "volunteering_vacation"],
["label" => "Oddanie krwi", "value" => "blood_donation_vacation"],
]);
}

Expand Down Expand Up @@ -1024,6 +1028,7 @@ public function testEmployeeWithPermissionToCreateOnBehalfSeesAllVacationTypesFo
["label" => "Urlop szkoleniowy", "value" => "training_vacation"],
["label" => "Opieka nad dzieckiem (art. 188 kp)", "value" => "childcare_vacation"],
["label" => "Wolontariat", "value" => "volunteering_vacation"],
["label" => "Oddanie krwi", "value" => "blood_donation_vacation"],
]);
}
}
Loading