hezarfen_backend
Clone
https://git.tahinli.com/archive/hezarfen_backend.git
0 watching0 forksRust8.3 MiB6d68754Ahmet Kaan Gümüş2 months ago566 commits
| 1 | //! Work-log surfacing: the check-in/check-out pair, the staff log, and the |
| 2 | //! manager corrections. The queries live in [`crate::db::work_entry`] — both |
| 3 | //! transitions are single atomic writes the database itself arbitrates (the |
| 4 | //! `work_entry_open` partial unique index refuses a second check-in; the |
| 5 | //! check-out's conditional `UPDATE` takes the one open row), so this domain |
| 6 | //! has no workflow of its own. |
| 7 | |
| 8 | use crateDatabase; |
| 9 | use cratework_entry; |
| 10 | use crateTimestamp; |
| 11 | use crateUserId; |
| 12 | use crateWorkEntry; |
| 13 | use crateWorkEntryId; |
| 14 | use crateAppError; |
| 15 | |
| 16 | /// Check in (`409` while already checked in). |
| 17 | pub async |
| 18 | |
| 19 | |
| 20 | |
| 21 | /// Check out (`409` when not checked in). |
| 22 | pub async |
| 23 | |
| 24 | |
| 25 | |
| 26 | pub async |
| 27 | |
| 28 | |
| 29 | |
| 30 | /// Every stint of `user`, newest first — the open one included. |
| 31 | pub async |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | |
| 37 | |
| 38 | |
| 39 | |
| 40 | /// Persist corrected instants on a closed entry; `None` keeps the field. |
| 41 | pub async |
| 42 | |
| 43 | |
| 44 | |
| 45 | |
| 46 | |
| 47 | |
| 48 | |
| 49 | |
| 50 | pub async |
| 51 | |
| 52 |