diff --git a/app/models/user/slack_profile.rb b/app/models/user/slack_profile.rb index fd52f8b8..e17c97a7 100644 --- a/app/models/user/slack_profile.rb +++ b/app/models/user/slack_profile.rb @@ -14,6 +14,7 @@ def set_status(type:, emoji:, until_date:) # i18n-tasks-use t("users.slack_profile.paid_status_text") # i18n-tasks-use t("users.slack_profile.sick_status_text") # i18n-tasks-use t("users.slack_profile.unpaid_status_text") + # i18n-tasks-use t("users.slack_profile.non_working_status_text") Slack.instance.set_status(slack_id: ensure_slack_id!, text: I18n.t("users.slack_profile.#{type}_status_text"), emoji:, until_time: until_date.end_of_day) end diff --git a/app/views/leaves/_leave.html.slim b/app/views/leaves/_leave.html.slim index 39eb382f..8c824f4c 100644 --- a/app/views/leaves/_leave.html.slim +++ b/app/views/leaves/_leave.html.slim @@ -5,7 +5,7 @@ .card__icon = leave.unicode_emoji .card__header-content .card__title = [leave.user.display_name, leave.title].map(&:presence).compact.join(" / ") - .card__subtitle #{date_range leave.leave_during.min, leave.leave_during.max, format: :long} (#{leave.days.count} days) + .card__subtitle #{date_range leave.days.first, leave.days.last, format: :long} (#{leave.days.count} days) / i18n-tasks-use t('leave.status.approved') / i18n-tasks-use t('leave.status.rejected') / i18n-tasks-use t('leave.status.pending_approval') diff --git a/config/locales/en.yml b/config/locales/en.yml index 9e192024..f117fd1a 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -87,6 +87,7 @@ en: remaining_holidays: Remaining holidays salary_history: Salary History slack_profile: + non_working_status_text: Non-working day paid_status_text: On vacation sick_status_text: On sick leave unpaid_status_text: Away diff --git a/spec/models/sprint_spec.rb b/spec/models/sprint_spec.rb index dc66887b..df36ae3f 100644 --- a/spec/models/sprint_spec.rb +++ b/spec/models/sprint_spec.rb @@ -93,6 +93,7 @@ end it "mentions birthdays" do + travel_to "2023-01-23" john.update! born_on: "1989-02-01", hired_on: "2019-04-25" sprint.send_sprint_start_notification text = <<~TEXT