Repository navigation
Commit 738b1ca
committed
✨ Introduce online mode offline reasons with auto-assign and transfer restrictions
🆕 Offline reasons gain a `mode` field ("Offline Mode" default, "Online mode"), letting operators pick a reason such as "Training" and stay online instead of going offline:
- 🟢 Online mode reasons keep `hide_online = 0`, store the reason on the operator, and start a new online session record (reason stored in the new `online_reason_id` column so `offline_reason_id` is not overwritten).
- ⏱️ Switching reason while online starts a new record but closes the previous one exactly at the new record start, so online hours shows no bogus "sync timeout" gap (zero length gaps are no longer rendered).
- 🔁 Re-selecting the same online mode reason does not create another session record; switching back to plain online clears the reason.
- 📊 Online hours statistics now show both the offline and the online reason.
🔒 Reason enforced restrictions:
- 🚫 `disable_auto_assign`: while online with such a reason the operator's `exclude_autoasign` / `exclude_autoasign_mails` department flags are set so chat/mail auto assignment skips him; the operator's own preference is restored when he switches away.
- 🔀 `disable_transfer`: blocks manual chat/mail transfer and owner change to that operator while this mode is active.
- 👥 `syncAutoAssignStatus` / `isTransferDisabled` helpers applied in setoffline, setopstatus, transferuser modules.
🛠️ Supporting changes:
- 🗄️ Added `update_361.sql`, `structure.json`, `db.dbml`, install scripts and POS definitions for the three new `lh_abstract_offline_reason` columns and `lh_users_online_session.online_reason_id`.
- ⬆️ Bumped `DB_VERSION` to 361 and `LHC_RELEASE` to 496, updated `CHANGELOG.txt`.
- 🖥️ Status control and "Set online status" modal list reasons with their mode, colorize based on active reason, and show online/offline mode groupings in the dropdown.
- 📈 `userstats` modal widened to `xxxl` and gained a "Can be auto assigned" column explaining which flags block auto assignment.
- 📡 `loadinitialdata` / `setopstatus` expose reason `mode` in the API; `syncadmininterface` reports reason even when the operator is online.
🐛 Misc fixes:
- 🔒 Private group chats accept messages/history only from their members (addmessage, loadpreviousmessages).1 parent 9568b2f commit 738b1ca
31 files changed
Lines changed: 442 additions & 58 deletions
File tree
- lhc_web
- cli/lib
- design/defaulttheme
- css
- css_static
- js/svelte
- public/build
- src/LinkActions
- tpl
- lhstatistic
- lhuser
- doc
- update_db
- lib
- core
- lhabstract/fields
- lhcore
- lhdepartament
- lhuser
- models/lhuser
- vendor_lhc/LiveHelperChat/Models/LHCAbstract
- modules
- lhchat
- lhgroupchat
- lhinstall
- lhuser
- pos
- lhabstract/livehelperchat/models/lhcabstract
- lhuser
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
273 | 273 | | |
274 | 274 | | |
275 | 275 | | |
| 276 | + | |
276 | 277 | | |
277 | 278 | | |
278 | 279 | | |
| |||
554 | 555 | | |
555 | 556 | | |
556 | 557 | | |
557 | | - | |
| 558 | + | |
558 | 559 | | |
559 | 560 | | |
560 | 561 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1955 | 1955 | | |
1956 | 1956 | | |
1957 | 1957 | | |
| 1958 | + | |
| 1959 | + | |
| 1960 | + | |
| 1961 | + | |
| 1962 | + | |
| 1963 | + | |
| 1964 | + | |
| 1965 | + | |
| 1966 | + | |
| 1967 | + | |
| 1968 | + | |
| 1969 | + | |
1958 | 1970 | | |
1959 | 1971 | | |
1960 | 1972 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
51 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
52 | 55 | | |
53 | 56 | | |
54 | 57 | | |
| |||
62 | 65 | | |
63 | 66 | | |
64 | 67 | | |
65 | | - | |
| 68 | + | |
66 | 69 | | |
67 | 70 | | |
68 | | - | |
69 | | - | |
| 71 | + | |
| 72 | + | |
70 | 73 | | |
71 | 74 | | |
72 | 75 | | |
| |||
77 | 80 | | |
78 | 81 | | |
79 | 82 | | |
80 | | - | |
| 83 | + | |
81 | 84 | | |
82 | 85 | | |
83 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
84 | 94 | | |
85 | 95 | | |
86 | | - | |
| 96 | + | |
87 | 97 | | |
88 | | - | |
| 98 | + | |
89 | 99 | | |
90 | 100 | | |
91 | 101 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | | - | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | | - | |
| 23 | + | |
| 24 | + | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
29 | | - | |
| 31 | + | |
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
| |||
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
| 42 | + | |
40 | 43 | | |
41 | | - | |
42 | 44 | | |
| 45 | + | |
43 | 46 | | |
44 | 47 | | |
45 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| 86 | + | |
86 | 87 | | |
87 | 88 | | |
88 | 89 | | |
| |||
135 | 136 | | |
136 | 137 | | |
137 | 138 | | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
138 | 162 | | |
139 | 163 | | |
140 | 164 | | |
| |||
0 commit comments