Add approval of hours and lock opening for management

- Time entries store who approved them and when. Approved hours are
  locked: cells, task page edits and removals are refused.
- "Hyväksy viikko" in the weekly view approves the user's own week;
  subcontractors' hours are approved by management.
- Management gets an approval page (unapproved weeks by person, recently
  approved weeks) and can open anyone's week read-only to approve it or
  cancel its approval, which only management may do.
- Only management may move a done job back to an earlier status, which
  opens the lock on its hours and expenses; the history marks it.
- The Clock contract gets now() for approval times.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-11-24 08:24:34 +02:00
co-authored by Claude Opus 5.5
parent 54d98d9d2f
commit d5cbf9d6eb
43 changed files with 1183 additions and 34 deletions
+40
View File
@@ -2,6 +2,8 @@
return [
'title' => 'Tuntikirjaus',
'other_title' => 'Tuntikirjaus: :name',
'other_intro' => 'Katselet toisen käyttäjän tunteja. Voit hyväksyä viikon tai perua sen hyväksynnän, mutta et muuttaa tunteja.',
'week_heading' => 'Viikko :number: :from–:to',
'previous_week' => 'Edellinen viikko',
'this_week' => 'Tämä viikko',
@@ -62,5 +64,43 @@ return [
'not_found' => 'Tehtävää tai kirjausta ei löytynyt. Päivitä sivu.',
'date_required' => 'Anna päivä.',
'invalid_date' => 'Anna päivämäärä muodossa pp.kk.vvvv.',
'approved' => 'Tunnit on hyväksytty, joten niitä ei voi muuttaa. Pyydä johtoa perumaan hyväksyntä.',
],
'approval' => [
'title' => 'Viikon hyväksyntä',
'unapproved' => 'Hyväksymättä :hours h.',
'no_hours' => 'Viikolla ei ole tunteja.',
'approved_by' => 'Hyväksytty :date (:name).',
'approve_week' => 'Hyväksy viikko',
'approve_week_of' => 'Hyväksy viikko: :name, :week',
'approved' => ':week hyväksytty. Hyväksytyt tunnit on lukittu.',
'approved_for' => ':name: :week hyväksytty.',
'nothing_to_approve' => 'Viikolla ei ole hyväksymättömiä tunteja.',
'management_approves' => 'Johto hyväksyy tuntisi.',
'cancel' => 'Peru hyväksyntä',
'cancel_title' => 'Perutaanko hyväksyntä?',
'cancel_question' => 'Perutaanko viikon :week hyväksyntä? Tunteja voi sen jälkeen muuttaa, ja ne on hyväksyttävä uudelleen.',
'cancelled' => ':week: hyväksyntä peruttu.',
'cell_approved' => 'hyväksytty',
'back_to_list' => 'Takaisin tuntien hyväksyntään',
],
'approvals' => [
'title' => 'Tuntien hyväksyntä',
'intro' => 'Työntekijät ja harjoittelijat hyväksyvät omat tuntinsa; johto hyväksyy alihankkijoiden tunnit ja voi hyväksyä kenen tahansa. Hyväksyntä lukitsee tunnit. Hyväksynnän voi perua viikon sivulla.',
'pending' => 'Hyväksymättä',
'approved' => 'Hyväksytyt (8 viikkoa)',
'none_pending' => 'Kaikki tunnit on hyväksytty.',
'none_approved' => 'Ei hyväksyttyjä tunteja.',
'person' => 'Henkilö',
'all_people' => 'Kaikki',
'week' => 'Viikko',
'hours' => 'Tunnit',
'approver' => 'Hyväksyjä',
'actions' => 'Toiminnot',
'open_week' => 'Avaa viikko',
'open_week_of' => 'Avaa viikko: :name, :week',
'approver_value' => ':name, :date',
],
];