Skip to content

Commit da32439

Browse files
committed
Update
1 parent 67969b8 commit da32439

2 files changed

Lines changed: 52 additions & 27 deletions

File tree

documents/documents-tools.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,12 @@ soffice --infilter=impress_pdf_import --convert-to ppt "./input.pdf"
9090
# Convert .md to .docx
9191
pandoc "input.md" -o "output.docx"
9292

93+
# Convert .md to .html
94+
pandoc "input.md" -o "input.html" \
95+
-f markdown-implicit_figures \
96+
--embed-resources --standalone \
97+
-H <(echo '<style>body{font-family:Arial,sans-serif;max-width:700px;margin:0 auto;padding:24px 16px 60px;line-height:1.4;font-size:14px}</style>')
98+
9399

94100
# Count the number of files categorized by their root-level directory and file type
95101
find . -type f | while IFS= read -r file; do

technology/urlaubsverwaltung/readme.md

Lines changed: 46 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1074,33 +1074,48 @@ Two patterns: **employee** (both apps, standard access) and **HR admin** (full p
10741074
**Employee** - can request leave in Urlaubsverwaltung (`USER`) and clock in/out in Zeiterfassung (`ZEITERFASSUNG_USER`):
10751075

10761076
```sh
1077-
new_email="email@website.com"
1078-
new_firstname="Name"
1079-
new_lastname="Lastname"
1080-
new_password=$(openssl rand -base64 10 | tr -dc 'A-Za-z0-9')
1077+
# One row per employee: email|firstname|lastname
1078+
employees=$(cat <<'EOF'
1079+
email@website.com|Name|Lastname
1080+
EOF
1081+
)
10811082

10821083
KEYCLOAK_TOKEN=$(curl -s \
10831084
-d "client_id=admin-cli&grant_type=password" \
10841085
-d "username=${keycloak_admin_user}&password=${keycloak_admin_password}" \
10851086
http://localhost:${keycloak_http_port}/realms/master/protocol/openid-connect/token \
10861087
| python3 -c "import sys,json; print(json.load(sys.stdin)['access_token'])")
10871088

1088-
curl -s -o /dev/null -w "HTTP %{http_code}\n" \
1089-
-H "Authorization: Bearer ${KEYCLOAK_TOKEN}" \
1090-
-H "Content-Type: application/json" \
1091-
http://localhost:${keycloak_http_port}/admin/realms/urlaubsverwaltung/users \
1092-
-d "{
1093-
\"username\": \"${new_email}\",
1094-
\"email\": \"${new_email}\",
1095-
\"firstName\": \"${new_firstname}\",
1096-
\"lastName\": \"${new_lastname}\",
1097-
\"enabled\": true,
1098-
\"emailVerified\": true,
1099-
\"realmRoles\": [\"USER\", \"ZEITERFASSUNG_USER\"],
1100-
\"credentials\": [{\"type\":\"password\",\"value\":\"${new_password}\",\"temporary\":true}]
1101-
}"
1102-
1103-
echo "==> Created employee: ${new_email} / temp password: ${new_password}"
1089+
echo "email,firstname,lastname,temp_password" > new_employees.csv
1090+
1091+
while IFS='|' read -r new_email new_firstname new_lastname; do
1092+
[ -z "$new_email" ] && continue
1093+
new_password=$(openssl rand -base64 10 | tr -dc 'A-Za-z0-9')
1094+
1095+
http_code=$(curl -s -o /dev/null -w "%{http_code}" \
1096+
-H "Authorization: Bearer ${KEYCLOAK_TOKEN}" \
1097+
-H "Content-Type: application/json" \
1098+
http://localhost:${keycloak_http_port}/admin/realms/urlaubsverwaltung/users \
1099+
-d "{
1100+
\"username\": \"${new_email}\",
1101+
\"email\": \"${new_email}\",
1102+
\"firstName\": \"${new_firstname}\",
1103+
\"lastName\": \"${new_lastname}\",
1104+
\"enabled\": true,
1105+
\"emailVerified\": true,
1106+
\"realmRoles\": [\"USER\", \"ZEITERFASSUNG_USER\"],
1107+
\"credentials\": [{\"type\":\"password\",\"value\":\"${new_password}\",\"temporary\":true}]
1108+
}")
1109+
1110+
if [ "$http_code" = "201" ]; then
1111+
echo "==> Created: ${new_email} / temp password: ${new_password}"
1112+
echo "${new_email},${new_firstname},${new_lastname},${new_password}" >> new_employees.csv
1113+
else
1114+
echo "!! FAILED (${http_code}): ${new_email}"
1115+
fi
1116+
done <<< "$employees"
1117+
1118+
echo "==> Done. Credentials saved to new_employees.csv"
11041119
```
11051120

11061121
---
@@ -1218,9 +1233,15 @@ nginx -t && systemctl reload nginx
12181233

12191234
`Manage realms``urlaubsverwaltung``Realm settings``Themes` → Set `Login theme`.
12201235

1236+
### Zeiterfassung
1237+
1238+
`Persons` → HR manager → `Permissions` → Enable all permissions.
1239+
1240+
`Settings``Festschreiben von Zeiteinträgen` → Enable `Enable time entry locking`.
1241+
12211242
### Urlaubsverwaltung
12221243

1223-
Roles to HR manager: `Company``Staff` → Select HR manager → `Account``Permissions``Edit` → Tick: `User`, `Department Head`, `Boss`, `Office`, `Management of sick notes`, `Manage absences`.
1244+
Roles to HR manager: `Company``Employees` → Select HR manager → `Account``Permissions``Edit` → Tick: `User`, `Department Head`, `Boss`, `Office`, `Management of sick notes`, `Manage absences`.
12241245

12251246
Create a department and assign an approver: `Company``Departments``New department`. Set a name, then define `is department head` for specific user(s).
12261247

@@ -1232,14 +1253,12 @@ Create a department and assign an approver: `Company` → `Departments` → `New
12321253
Notifications: User → `Notifications``E-Mail Notifications``Departments`:
12331254

12341255
- HR manager: `Absences of my colleagues` → Enable `Submissions`, `Reminder for waiting absences to be approved`.
1235-
- Hr manager: `Sick notes from my colleagues` → Enable `Created sick notes`, `Edited Sick Notes`.
1236-
- User: `Sick notes from my colleagues` → Enable `Created sick notes`, `Submissions`, `Accepted Sick Notes`, `Edited Sick Notes`.
1256+
- HR manager: `Sick notes from my colleagues` → Enable `Created sick notes`, `Submissions`, `Accepted Sick Notes`, `Edited Sick Notes`.
12371257

1238-
### Zeiterfassung
1258+
`Settings``Overtime`:
12391259

1240-
`Persons` → HR manager → `Permissions` → Enable all permissions.
1241-
1242-
`Settings``Festschreiben von Zeiteinträgen` → Enable `Enable time entry locking`.
1260+
- Enable `Activate overtime management`.
1261+
- Enable `Activate overtime transfer`.
12431262

12441263
---
12451264

0 commit comments

Comments
 (0)