Compare commits

...

7 Commits

Author SHA1 Message Date
870c36a15d add []
All checks were successful
Test runner / check-runner (push) Successful in 6s
2025-10-31 20:33:15 +00:00
7cd90e8b6e chcange branch to master
All checks were successful
Test runner / check-runner (push) Successful in 1m56s
2025-10-31 21:23:14 +01:00
853cefa0fe test action with empty readme 2025-10-31 21:07:04 +01:00
225f33ac63 fix: change runner environment from docker to ubuntu-latest for consistency 2025-10-31 20:41:14 +01:00
e1b1f77d81 test gitea action 2025-10-31 20:35:59 +01:00
9bb7a71d86 fix: update exit time handling in calculateDay function to ensure proper assignment 2025-10-30 18:21:33 +01:00
e84a700a8b refactor: switch baseURL back to API endpoint for consistency 2025-10-29 19:56:56 +01:00
4 changed files with 38 additions and 9 deletions

19
.gitea/workflows/test.yml Normal file
View File

@@ -0,0 +1,19 @@
name: Test runner
on:
push:
branches: [master]
jobs:
check-runner:
runs-on: [ubuntu-latest]
steps:
- name: Print greeting
run: echo "✅ Gitea runner działa poprawnie!"
- name: Show runner info
run: |
echo "System:"
uname -a
echo "Working dir:"
pwd

0
READMEmd Normal file
View File

View File

@@ -4,8 +4,8 @@ import router from '@/router'
import { useAuthStore } from '@/stores/authStore'
const api = axios.create({
// baseURL: '/odoo/api', // Twój backend
baseURL: 'http://localhost:8000', // Twój backend
baseURL: '/odoo/api', // Twój backend
// baseURL: 'http://localhost:8000', // Twój backend
})
// Request interceptor dodawanie tokena

View File

@@ -153,14 +153,24 @@ function calculateDay(day) {
// const exitTimes = [...day.exitTime]
// If there's one more entry than exits, it means the user is currently clocked in.
if (day.entryTime.length > 0 && day.entryTime.length === day.exitTime.length + 1) {
const now = new Date()
const hh = String(now.getHours()).padStart(2, '0')
const mm = String(now.getMinutes()).padStart(2, '0')
const ss = String(now.getSeconds()).padStart(2, '0')
// Add the current time as the "exit" for the last entry.
day.exitTime.push(`${hh}:${mm}:${ss}`)
for (let i = 0; i < day.entryTime.length; i++) {
if (!day.exitTime[i] || typeof day.exitTime[i] !== 'string' || day.exitTime[i].trim() === '') {
const now = new Date()
const hh = String(now.getHours()).padStart(2, '0')
const mm = String(now.getMinutes()).padStart(2, '0')
const ss = String(now.getSeconds()).padStart(2, '0')
day.exitTime[i] = `${hh}:${mm}:${ss}`
}
}
// if (day.entryTime.length > 0 && day.entryTime.length === day.exitTime.length + 1) {
// const now = new Date()
// const hh = String(now.getHours()).padStart(2, '0')
// const mm = String(now.getMinutes()).padStart(2, '0')
// const ss = String(now.getSeconds()).padStart(2, '0')
// // Add the current time as the "exit" for the last entry.
// day.exitTime.push(`${hh}:${mm}:${ss}`)
// }
if (day.entryTime.length === 0) {
day.workedHours = 0