-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add casual contract type and remove maternity or paternal cover type
This commit adds casual contract type to vacancies and also removes the maternity cover type. Going forward parental cover will be handled by the user choosing fixed term contract and selecting is_parental_leave_cover = true
- Loading branch information
1 parent
cac26ec
commit 612fd47
Showing
10 changed files
with
44 additions
and
42 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 |
---|---|---|
@@ -1,11 +1,11 @@ | ||
class Publishers::JobListing::ContractTypeForm < Publishers::JobListing::VacancyForm | ||
attr_accessor :contract_type, :fixed_term_contract_duration, :parental_leave_cover_contract_duration | ||
attr_accessor :contract_type, :fixed_term_contract_duration, :parental_leave_cover_contract_duration, :is_parental_leave_cover | ||
|
||
validates :contract_type, inclusion: { in: Vacancy.contract_types.keys } | ||
validates :fixed_term_contract_duration, presence: true, if: -> { contract_type == "fixed_term" } | ||
validates :parental_leave_cover_contract_duration, presence: true, if: -> { contract_type == "parental_leave_cover" } | ||
validates :is_parental_leave_cover, inclusion: { in: ["true", "false", true, false] }, if: -> { contract_type == "fixed_term" } | ||
|
||
def self.fields | ||
%i[contract_type fixed_term_contract_duration parental_leave_cover_contract_duration] | ||
%i[contract_type fixed_term_contract_duration parental_leave_cover_contract_duration is_parental_leave_cover] | ||
end | ||
end |
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
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
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
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