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
3 changes: 2 additions & 1 deletion app/operations/medical_shift_recurrences/create.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ def shift_attributes(date)
hospital_name: medical_shift_recurrence.hospital_name,
amount_cents: medical_shift_recurrence.amount_cents,
medical_shift_recurrence_id: medical_shift_recurrence.id,
paid: false
paid: false,
color: medical_shift_recurrence.color
}
end

Expand Down
34 changes: 34 additions & 0 deletions config/locales/en/activerecord.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
en:
activerecord:
models:
medical_shift_recurrence: "Medical Shift Recurrence"
medical_shift: "Medical Shift"
attributes:
medical_shift_recurrence:
day_of_week: "Day of week"
frequency: "Frequency"
start_date: "Start date"
workload: "Workload"
start_hour: "Start hour"
hospital_name: "Hospital name"
amount_cents: "Amount"
color: "Color"
day_of_month: "Day of month"
end_date: "End date"
errors:
models:
medical_shift_recurrence:
attributes:
day_of_week:
blank: "can't be blank"
not_a_number: "is not a number"
greater_than_or_equal_to: "must be greater than or equal to %{count}"
less_than_or_equal_to: "must be less than or equal to %{count}"
medical_shift:
color: "Color"
hospital_name: "Hospital name"
workload: "Workload"
start_date: "Start date"
start_hour: "Start hour"
amount_cents: "Amount"
paid: "Paid"
1 change: 1 addition & 0 deletions spec/operations/medical_shift_recurrences/create_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
expect(shift.hospital_name).to eq("Hospital Teste")
expect(shift.amount_cents).to eq(120_000)
expect(shift.paid).to be false
expect(shift.color).to eq("#ffffff")
end
end
end
Expand Down