Compare commits
7 Commits
6a70a4a6ae
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 870c36a15d | |||
| 7cd90e8b6e | |||
| 853cefa0fe | |||
| 225f33ac63 | |||
| e1b1f77d81 | |||
| 9bb7a71d86 | |||
| e84a700a8b |
19
.gitea/workflows/test.yml
Normal file
19
.gitea/workflows/test.yml
Normal 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
|
||||
@@ -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
|
||||
|
||||
@@ -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) {
|
||||
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')
|
||||
// Add the current time as the "exit" for the last entry.
|
||||
day.exitTime.push(`${hh}:${mm}:${ss}`)
|
||||
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user