iobroker.time-tracker 0.3.0 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -15
- package/build/lib/web/api.js +5 -2
- package/build/lib/web/api.js.map +2 -2
- package/io-package.json +27 -27
- package/package.json +1 -1
- package/src-pwa/src/i18n/de.json +5 -1
- package/src-pwa/src/i18n/en.json +5 -1
- package/src-pwa/src/i18n/es.json +5 -1
- package/src-pwa/src/i18n/fr.json +5 -1
- package/src-pwa/src/i18n/it.json +5 -1
- package/src-pwa/src/i18n/nl.json +5 -1
- package/src-pwa/src/i18n/pl.json +5 -1
- package/src-pwa/src/i18n/pt.json +5 -1
- package/src-pwa/src/i18n/ru.json +5 -1
- package/src-pwa/src/i18n/uk.json +5 -1
- package/src-pwa/src/i18n/zh-cn.json +5 -1
- package/www/assets/index-D7f1X_an.js +119 -0
- package/www/assets/index-D7f1X_an.js.map +1 -0
- package/www/index.html +1 -1
- package/www/sw.js +1 -1
- package/www/sw.js.map +1 -1
- package/www/assets/index-BW4HvYbk.js +0 -119
- package/www/assets/index-BW4HvYbk.js.map +0 -1
package/README.md
CHANGED
|
@@ -353,6 +353,23 @@ local SQLite file, access is role-based, and every correction is written to an a
|
|
|
353
353
|
|
|
354
354
|
### **WORK IN PROGRESS**
|
|
355
355
|
|
|
356
|
+
### 0.3.2 (2026-09-22)
|
|
357
|
+
|
|
358
|
+
- (Alex) fix: the automation rules are a **list** now — one row per rule with its caption, kind, time, target and
|
|
359
|
+
weekdays, plus the buttons for *active*, *edit* and *delete* on the right. The form only opens in a dialog, for a
|
|
360
|
+
new or an edited rule, so the list stays readable. The save button of the card says “**Regeln speichern**” (it
|
|
361
|
+
carried the caption of the break rules before). New texts in all 11 languages, and an end-to-end test keeps both
|
|
362
|
+
findings
|
|
363
|
+
|
|
364
|
+
### 0.3.1 (2026-09-22)
|
|
365
|
+
|
|
366
|
+
- (Alex) fix: the presence board shows the **real running** time of the day now. Two things kept it frozen:
|
|
367
|
+
`/terminal/users` answered with the stored day aggregate, which only changes on a punch (it counts finished
|
|
368
|
+
pairs), and the tile “ticker” measured the seconds since the last server answer — a refresh every 60 s never let
|
|
369
|
+
it grow beyond 0. The API adds the minutes of an open punch to its answer now, the tile shows that value directly,
|
|
370
|
+
and the board refreshes every 20 s (was 60 s). The API test moves the clock ten minutes and expects the open punch
|
|
371
|
+
in the answer
|
|
372
|
+
|
|
356
373
|
### 0.3.0 (2026-09-22)
|
|
357
374
|
|
|
358
375
|
- (Alex) new: the presence board can show the working time of today on the employee tiles — `1:23` next to
|
|
@@ -379,21 +396,6 @@ local SQLite file, access is role-based, and every correction is written to an a
|
|
|
379
396
|
up in `events.*` (`lastType`, `lastUser`, `lastDirection`, `lastSource`) and reaches the web app live. The punch was
|
|
380
397
|
stored in the database but never sent to the event bus, so the event states kept the previous punch
|
|
381
398
|
|
|
382
|
-
### 0.2.5 (2026-09-21)
|
|
383
|
-
|
|
384
|
-
- (Alex) docs: the installation chapter leads with the normal way now — install the npm package (`iobroker install
|
|
385
|
-
iobroker.time-tracker` or the admin’s “Install from custom URL”), which creates the instance `time-tracker.0`
|
|
386
|
-
automatically. Building from a checkout is only the developer path, and the chapter explains why a Git install
|
|
387
|
-
reports `cannot find start file!` (`build/` and `www/` are not part of the repository)
|
|
388
|
-
|
|
389
|
-
### 0.2.4 (2026-09-21)
|
|
390
|
-
|
|
391
|
-
- (Alex) `commands.punchUserId` does what it promises now: writing an employee id selects the employee the punch
|
|
392
|
-
buttons apply to (`0` = the only employee again), and the adapter mirrors the current choice back into the state.
|
|
393
|
-
For the user the README has a new *Commands (states)* section and `docs/erste-schritte.md` explains all six command
|
|
394
|
-
states — both with copy-ready examples and the two traps (buttons act on `true` only, a wrong period answers in the
|
|
395
|
-
log)
|
|
396
|
-
|
|
397
399
|
Older entries are kept in [`CHANGELOG_OLD.md`](CHANGELOG_OLD.md).
|
|
398
400
|
|
|
399
401
|
## Provenance
|
package/build/lib/web/api.js
CHANGED
|
@@ -1961,13 +1961,16 @@ function createApi(deps) {
|
|
|
1961
1961
|
return (0, import_router.json)(200, {
|
|
1962
1962
|
users: visible.map((user) => {
|
|
1963
1963
|
var _a3, _b2;
|
|
1964
|
-
const
|
|
1964
|
+
const date = (0, import_time.localDate)(timestamp, user.timezone);
|
|
1965
|
+
const day = aggregation.recalculateDay(user.id, date, { now: timestamp });
|
|
1966
|
+
const open = (day == null ? void 0 : day.hasOpenEntry) ? entries.listByDate(user.id, date).at(-1) : void 0;
|
|
1967
|
+
const runningMin = open ? Math.max(0, Math.floor((timestamp - open.tsUtc) / 60)) : 0;
|
|
1965
1968
|
const showWorkedTime = ((_a3 = users.getWorkProfile(user.id)) == null ? void 0 : _a3.showWorkedTime) === true;
|
|
1966
1969
|
return {
|
|
1967
1970
|
id: user.id,
|
|
1968
1971
|
displayName: user.displayName,
|
|
1969
1972
|
present: (day == null ? void 0 : day.hasOpenEntry) === true,
|
|
1970
|
-
workedMin: showWorkedTime ? (_b2 = day == null ? void 0 : day.workedMin) != null ? _b2 : 0 : void 0,
|
|
1973
|
+
workedMin: showWorkedTime ? ((_b2 = day == null ? void 0 : day.workedMin) != null ? _b2 : 0) + runningMin : void 0,
|
|
1971
1974
|
// the picture is fetched by the browser from its own route; the session of this device travels
|
|
1972
1975
|
// in the query, so a plain `<img>` can load it
|
|
1973
1976
|
avatarUrl: user.avatar ? `/api/users/${user.id}/avatar?terminalSession=${encodeURIComponent(terminalSession)}&v=${user.updatedAt}` : null
|