-
Notifications
You must be signed in to change notification settings - Fork 120
/
Copy pathmaternity-paternity-calculator.rb
67 lines (63 loc) · 1.63 KB
/
maternity-paternity-calculator.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
module SmartAnswer
class MaternityPaternityCalculatorFlow < Flow
def define
content_id "05d5412d-455b-485e-a570-020c9176a46e"
name 'maternity-paternity-calculator'
status :published
satisfies_need "100990"
## Q1
multiple_choice :what_type_of_leave? do
save_input_as :leave_type
option :maternity
option :paternity
option :adoption
calculate :leave_spp_claim_link do
nil
end
calculate :notice_of_leave_deadline do
nil
end
calculate :monthly_pay_method do
nil
end
calculate :smp_calculation_method do
nil
end
calculate :pay_pattern do
nil
end
calculate :sap_calculation_method do
nil
end
calculate :above_lower_earning_limit do
nil
end
calculate :paternity_adoption do
nil
end
calculate :spp_calculation_method do
nil
end
calculate :has_contract do
nil
end
calculate :paternity_employment_start do
nil
end
next_node(permitted: :auto) do |response|
case response
when 'maternity'
question :baby_due_date_maternity?
when 'paternity'
question :leave_or_pay_for_adoption?
when 'adoption'
question :taking_paternity_leave_for_adoption?
end
end
end
use_shared_logic ("adoption-calculator")
use_shared_logic ("paternity-calculator")
use_shared_logic ("maternity-calculator")
end
end
end