Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
# CHANGELOG

## v8.2

* Users are now able to propose corrections to worktimes when they have been marked as for "in review".

## v8.1

* Toil API release `1.13`:
* Added `editUser` endpoint
* Added `getOwnUser` endpoint
* `healthcheck` endpoint now includes the server time (ISO-8601) and API version
* Enhanced `app.json` with the `mobile` section (enable/disable app, enable/disable API token generation within Settings, per-Client rate limit, enable/disable QR-code mobile pairing) - for future mobile app release
* Fixed translations for German and English
* Added example values to `LDAP` section within `app.json`
* The ID of the worktime is now being displayed within `Worktime records` and `All worktime records`.
* Updated `README.md`
* **Update requires DB migration** (see `README.md` section `Database`)
* Added projects (read more within the `README.md`)
* Upgrading composer dependencies, please run `composer update`:
* `simple-router`: `4.3.7.2` to `5.0.0.3`
* Added function to check if current user is admin
* Added function to redirect directly to the suite page if an error occurs
* Fixed an error causing infinite redirects to the 500 HTTP Page when the database is not available.

## v8.0.2

* Small fixes to the web UI
* Updated `README.md`

## v8.0.1

* Readded the `nfclogin` button to the login page
Expand Down
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ TimeTrack aims to be an easy-to-use time recording software for small enterprise

### Requirements

- at least PHP 8.2 (`curl|gd|gmp|intl|mbstring|mysqli|openssl|xsl|gettext|dom|ldap`)
- composer (to install dependencies; phpmailer: for sending emails via smtp, parsedown: markdown parser for the `CHANGELOG.md`, simple-router: does the API routing, yaml: for reading plugin yaml files, ldaptools: for LDAP authentication, dompdf: for PDF generation, phinx: for database migrations)
- PHP 8.2 (`curl|gd|gmp|intl|mbstring|mysqli|openssl|xsl|gettext|dom|ldap`) - tested with PHP 8.2.26
- composer (to install dependencies; phpmailer: for sending emails via smtp, parsedown: markdown parser for the `CHANGELOG.md`, simple-router: does the API routing, yaml: for reading plugin yaml files, ldaptools: for LDAP authentication, dompdf: for PDF generation, phinx: for database migrations, event-dispatcher: for handling events, contracts: for defining events and interfaces)
- Apache2.4 with enabled rewrite mod (optional)

This software has been tested on Debian 11/12, XAMPP, PHP internal server (e.g. `php -S 0.0.0.0:80`).
Expand All @@ -40,6 +40,9 @@ Simply install the software by following these steps:
- Start webserver e.g. `service apache2 stop && php -S 0.0.0.0:80` or using apache2 (then you have to configure the `sites-available` conf yourself)
- You can then access TimeTrack in your browser at `http://localhost`, default login is `admin` with password `admin`. Create yourself a new admin account, login and delete the default account afterwards.

To save log files, please create the subfolder `data/logs` and make it writeable to the web server (e.g. `chown www-data:www-data data/logs && chmod 775 data/logs`).
Please also make sure that the `/data` directory is writable by the webserver, aswell as the plugins directory (default: `api/v1/class/plugins/plugins`).

### Configure app.json

In step 2, you need to configure the `app.json.sample` within the `api/v1/inc` folder:
Expand Down Expand Up @@ -176,6 +179,13 @@ You can access the plugin by navigating to `Plugins` -> `[codeclock] View PIN`.

To login with the PIN navigate to http://BASE_URL/api/v1/toil/code and enter your PIN.

## Projects

Administrators can now create Projects within the `Projects management` tab.
Users can access their projects within the `Projects` tab.

You can create items for their projects and map worktimes to it. The feature will be reworked in the future.

## Updates

TimeTrack has to be updated in two ways: database and application.
Expand All @@ -184,6 +194,7 @@ TimeTrack has to be updated in two ways: database and application.

If downloaded from GitHub you can simply pull the latest release e.g. `git pull`
If downloaded any other way, just make sure to copy and paste the new files into TimeTrack's root directory.
**Check the changelogs**: They usually tell you if you need to update composer dependencies (`composer update`) or if a database migration is required.

### Database

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.0.1
8.1
156 changes: 121 additions & 35 deletions api/v1/class/arbeitszeit.inc.php

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions api/v1/class/benutzer/benutzer.arbeit.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,22 @@ public static function is_admin($user)
}
}

public static function current_user_is_admin(){
if(self::get_current_user()["isAdmin"] == true){
return true;
} else {
return false;
}
}

public static function get_current_user(){
return self::get_user($_SESSION["username"]);
}

public static function get_name_from_id($id){
return self::get_user_from_id($id)["name"];
}

public function editUserProperties(mixed $username_or_id, string $name, mixed $value): bool
{
if($this->nodes()->checkNode("benutzer.inc", "editUserProperties") == false){
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"title": "Benachrichtigungeneintrag bearbeiten",
"title": "Benachrichtigungseintrag bearbeiten",
"label_date": "Datum",
"label_time": "Uhrzeit",
"label_location": "Ort",
Expand Down
19 changes: 19 additions & 0 deletions api/v1/class/i18n/admin/projects/admin/snippets_DE.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"title": "Projekte - Admin",
"existing_projects": "Meine Projekte",
"th_id": "ID",
"th_name": "Name",
"th_deadline": "Deadline",
"th_owner": "Besitzer",
"th_actions": "Aktionen",
"btn_edit": "Bearbeiten",
"btn_delete": "Löschen",
"no_projects": "Keine Projekte gefunden...",
"add_project": "Füge ein neues Projekt hinzu",
"label_name": "Name",
"label_description": "Beschreibung",
"label_deadline": "Deadline",
"label_owner": "Besitzer",
"btn_add": "Projekt hinzufügen",
"delete_confirm": "Bist du sicher, dass du das Projekt löschen möchtest?"
}
19 changes: 19 additions & 0 deletions api/v1/class/i18n/admin/projects/admin/snippets_EN.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"title": "Projects - Admin",
"existing_projects": "Below is a list for which projects you are a member in.",
"th_id": "ID",
"th_name": "Name",
"th_deadline": "Deadline",
"th_owner": "Owner",
"th_actions": "Actions",
"btn_edit": "Edit",
"btn_delete": "Delete",
"no_projects": "No projects found...",
"add_project": "Add a new project",
"label_name": "Name",
"label_description": "Description",
"label_assoc": "Project short name",
"label_owner": "Owner",
"btn_add": "Add project",
"delete_confirm": "Are you sure that you want to delete this project?"
}
9 changes: 9 additions & 0 deletions api/v1/class/i18n/admin/projects/edit/snippets_DE.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"title": "Projekt bearbeiten",
"label_name": "Projektname",
"label_description": "Projektbeschreibung",
"label_deadline": "Fällig bis",
"label_owner": "Projecteigentümer",
"btn_save": "Projekt bearbeiten.",
"btn_cancel": "Zurück."
}
9 changes: 9 additions & 0 deletions api/v1/class/i18n/admin/projects/edit/snippets_EN.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"title": "Edit Project",
"label_name": "Project name",
"label_description": "Project description",
"label_deadline": "Project deadline",
"label_owner": "Project Owner",
"btn_save": "Edit Project.",
"btn_cancel": "Cancel."
}
2 changes: 1 addition & 1 deletion api/v1/class/i18n/admin/users/edit/snippets_DE.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"title": "Benutzer bearbeiten",
"add_user": "Benutzer hinzufügen",
"p1": "Hier kannst du alle Nutzer bearbeiten oder neue hinzufügen oder löschen",
"p1": "Hier kannst du alle Benutzer bearbeiten oder Neue hinzufügen oder löschen",
"th1": "Aktion",
"th2": "Name",
"th3": "Benutzername",
Expand Down
3 changes: 2 additions & 1 deletion api/v1/class/i18n/admin/worktime/all/snippets_DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@
"pbegin": "Pause Start",
"pend": "Pause Ende",
"loc": "Ort",
"type": "Typ"
"type": "Typ",
"id": "ID"
}
3 changes: 2 additions & 1 deletion api/v1/class/i18n/admin/worktime/all/snippets_EN.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@
"pbegin": "Break Start",
"pend": "end of break",
"loc": "location",
"type": "type"
"type": "type",
"id": "ID"
}
3 changes: 2 additions & 1 deletion api/v1/class/i18n/admin/worktime/all/snippets_NL.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@
"pbegin": "Breekstart",
"pend": "einde einde",
"loc": "locatie",
"type": "type"
"type": "type",
"id": "ID"
}
2 changes: 1 addition & 1 deletion api/v1/class/i18n/admin/worktime/sick/all/snippets_DE.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"title": "Alle Krankheiten",
"note1": "Unten siehst du eine Liste aller Krankheiten deiner Mitarbeiter.",
"note1": "Unten siehst du eine Liste aller Krankmeldungen deiner Mitarbeiter.",
"note2": "Geordnet: Neu zu alt, die letzten 100 Einträge",
"t1": "Mitarbeiter",
"t2": "Krankheit Beginn",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"title": "Alle Urlaube",
"note1": "Unten siehst du eine Liste aller Urlaube deiner Mitarbeiter.",
"note1": "Unten siehst du eine Liste aller Urlaubsanträge deiner Mitarbeiter.",
"note2": "Geordnet: Neu zu alt, die letzten 100 Einträge",
"t1": "Mitarbeiter",
"t2": "Urlaub Beginn",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"pending": "Pending",
"or": "or",
"approved": "Approved",
"rejected": "Rejected"
"rejected": "Rejected",
"not_found": "No vacation reports found."
}
}
1 change: 1 addition & 0 deletions api/v1/class/i18n/suite/class/arbeitszeit/snippets_DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"easymode_disabled": "Easymode deaktiviert.",
"to_review": "Zur Prüfung",
"remove_review": "Prüfung aufheben",
"propose_correction": "Änderung vorschlagen",
"print": "(Drucken)",
"csv": "(CSV)",
"delete_entry": "Eintrag löschen",
Expand Down
1 change: 1 addition & 0 deletions api/v1/class/i18n/suite/class/arbeitszeit/snippets_EN.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"easymode_disabled": "Easymode disabled.",
"to_review": "For review",
"remove_review": "Remove review",
"propose_correction": "Propose correction",
"print": "(Print)",
"csv": "(CSV)",
"delete_entry": "Delete entry",
Expand Down
1 change: 1 addition & 0 deletions api/v1/class/i18n/suite/class/arbeitszeit/snippets_NL.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"easymode_disabled": "Easymode uitgeschakeld.",
"to_review": "Ter beoordeling",
"remove_review": "Review verwijderen",
"propose_correction": "Propose Correction",
"print": "(Afdrukken)",
"csv": "(CSV)",
"delete_entry": "Invoer verwijderen",
Expand Down
4 changes: 3 additions & 1 deletion api/v1/class/i18n/suite/nav/snippets_DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
"settings": "Einstellungen",
"own_worktime": "Eigene Arbeitszeiten",
"notifications": "Benachrichtigungen",
"projects": "Projekte",
"logout": "Abmelden",
"a_allworktime": "Alle Arbeitszeiten",
"a_useredit": "Benutzer bearbeiten",
"a_sickness": "Alle Krankheiten",
"a_vacation": "Alle Urlaube",
"a_plugins": "Plugins"
"a_plugins": "Plugins",
"a_projects": "Projektmanagement"
}
4 changes: 3 additions & 1 deletion api/v1/class/i18n/suite/nav/snippets_EN.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
"own_worktime": "Worktime records",
"notifications": "Calendar",
"logout": "Logout",
"projects": "Projects",
"a_allworktime": "All worktime records",
"a_useredit": "Edit users",
"a_sickness": "Sickness reports",
"a_vacation": "Vacation reports",
"a_plugins": "Plugins"
"a_plugins": "Plugins",
"a_projects": "Projects management"
}
4 changes: 3 additions & 1 deletion api/v1/class/i18n/suite/nav/snippets_NL.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
"own_worktime": "Eigen werktijden",
"notifications": "Benachrichtigungen",
"logout": "Uitloggen",
"projects": "Projects",
"a_allworktime": "Alle werktijden",
"a_useredit": "Gebruiker bewerken",
"a_sickness": "Alle ziekten",
"a_vacation": "Alle vakanties",
"a_plugins": "Plug-ins"
"a_plugins": "Plug-ins",
"a_projects": "Projects management"
}
10 changes: 10 additions & 0 deletions api/v1/class/i18n/suite/projects/addUser/snippets_EN.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"title": "Add User to Project",
"title2": "Add User to Project",
"label_userid": "User ID",
"label_role": "Role",
"label_permissions": "Permissions",
"tooltip_permissions": "0 = Member, 1 = Project Admin",
"btn_add": "Add.",
"btn_cancel": "Cancel."
}
7 changes: 7 additions & 0 deletions api/v1/class/i18n/suite/projects/createItem/snippets_EN.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"title": "Create Project Item",
"description": "Description",
"assignee": "Assignee (UserID)",
"btn_save": "Save.",
"btn_cancel": "Cancel."
}
15 changes: 15 additions & 0 deletions api/v1/class/i18n/suite/projects/item/snippets_EN.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"title": "View Item",
"no_description": "No description...",
"project": "Project",
"assignee": "Assignee",
"status": "Status",
"worktimes": "Worktimes",
"th_user": "User",
"th_hours": "Hours",
"th_date": "Date",
"no_worktimes": "No worktimes...",
"btn_edit": "Edit",
"btn_delete": "Delete",
"id": "ID"
}
15 changes: 15 additions & 0 deletions api/v1/class/i18n/suite/projects/overview/snippets_EN.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"title": "Overview - Projects",
"intro": "This is the overview of the projects tab.",
"your_projects": "Your projects",
"link_view_project": "View project",
"no_projects": "No projects...",
"th_item_title": "Item title",
"th_project": "Project",
"th_status": "Status",
"th_actions": "Actions",
"your_items": "Your items",
"btn_view_item": "View item",
"no_items": "No items...",
"id": "ID"
}
23 changes: 23 additions & 0 deletions api/v1/class/i18n/suite/projects/view/snippets_EN.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"title": "View Project",
"no_description": "No description...",
"description": "Description",
"deadline": "Deadline",
"tab_items": "Items",
"tab_members": "Members",
"tab_worktimes": "Worktimes",
"items": "Items",
"th_item": "Item",
"th_assignee": "Assignee",
"th_status": "Status",
"th_actions": "Actions",
"btn_view": "View",
"no_items": "No items...",
"members": "Members",
"no_members": "No members...",
"worktimes": "Worktimes",
"th_user": "User",
"th_hours": "Hours",
"no_worktimes": "No worktimes...",
"id": "ID"
}
Loading
Loading