The Tech bonuses top menu now goes to /tech_bonuses/current, which redirects to the week containing today. The index (week picker and weeks run) is limited to Run tech bonuses: View tech bonuses only covers a week's page, whose title links to the index only for those who can run the bonus. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
25 lines
1.8 KiB
Ruby
25 lines
1.8 KiB
Ruby
#The MIT License (MIT)
|
|
#
|
|
#Copyright (c) 2026 rick barrette
|
|
#
|
|
#Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
#
|
|
#The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
#
|
|
#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
|
RedmineApp::Application.routes.draw do
|
|
|
|
# Weekly bonus: the weeks run, a week's hours and bonuses (by its Sunday, e.g. /tech_bonuses/2026-11-15)
|
|
get 'tech_bonuses', to: 'tech_bonuses#index', as: :tech_bonuses
|
|
get 'tech_bonuses/current', to: 'tech_bonuses#current', as: :current_tech_bonus_week
|
|
get 'tech_bonuses/:week', to: 'tech_bonuses#show', as: :tech_bonus_week, constraints: { week: /\d{4}-\d{2}-\d{2}/ }
|
|
post 'tech_bonuses/:week', to: 'tech_bonuses#create', constraints: { week: /\d{4}-\d{2}-\d{2}/ }
|
|
get 'tech_bonuses/credits/:id/pdf', to: 'tech_bonuses#pdf', as: :tech_bonus_credit_pdf
|
|
post 'tech_bonuses/credits/:id/resend', to: 'tech_bonuses#resend', as: :resend_tech_bonus_credit
|
|
|
|
# Administration » Bonus technicians
|
|
resources :bonus_technicians, except: [:show]
|
|
|
|
end
|