Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Korjaus ryhmäpostilaatikon näkyvyyteen kun työntekijä luvitettiin toiseen ryhmään #6151

Merged
merged 1 commit into from
Dec 18, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import fi.espoo.evaka.shared.StaffAttendanceRealtimeId
import fi.espoo.evaka.shared.auth.AuthenticatedUser
import fi.espoo.evaka.shared.auth.UserRole
import fi.espoo.evaka.shared.auth.insertDaycareAclRow
import fi.espoo.evaka.shared.auth.insertDaycareGroupAcl
import fi.espoo.evaka.shared.auth.syncDaycareGroupAcl
import fi.espoo.evaka.shared.db.Database
import fi.espoo.evaka.shared.dev.DevDaycareGroup
import fi.espoo.evaka.shared.dev.DevDaycareGroupAcl
Expand Down Expand Up @@ -84,8 +84,8 @@ class MobileRealtimeStaffAttendanceControllerIntegrationTest :
tx.insert(employee)
tx.insertDaycareAclRow(testDaycare.id, employee.id, UserRole.STAFF)
tx.insertDaycareAclRow(testDaycare2.id, employee.id, UserRole.STAFF)
tx.insertDaycareGroupAcl(testDaycare.id, employee.id, listOf(groupId), now)
tx.insertDaycareGroupAcl(testDaycare2.id, employee.id, listOf(groupId2), now)
tx.syncDaycareGroupAcl(testDaycare.id, employee.id, listOf(groupId), now)
tx.syncDaycareGroupAcl(testDaycare2.id, employee.id, listOf(groupId2), now)

tx.markStaffArrival(
employee.id,
Expand All @@ -110,7 +110,7 @@ class MobileRealtimeStaffAttendanceControllerIntegrationTest :
tx.insert(employee)
tx.insert(DevEmployeePin(userId = employee.id, pin = pinCode))
tx.insertDaycareAclRow(testDaycare.id, employee.id, UserRole.STAFF)
tx.insertDaycareGroupAcl(testDaycare.id, employee.id, listOf(groupId), now)
tx.syncDaycareGroupAcl(testDaycare.id, employee.id, listOf(groupId), now)
}

val arrivalTime = HelsinkiDateTime.of(today, LocalTime.of(8, 0))
Expand Down Expand Up @@ -146,7 +146,7 @@ class MobileRealtimeStaffAttendanceControllerIntegrationTest :
tx.insert(employee)
tx.insert(DevEmployeePin(userId = employee.id, pin = pinCode))
tx.insertDaycareAclRow(testDaycare.id, employee.id, UserRole.STAFF)
tx.insertDaycareGroupAcl(testDaycare.id, employee.id, listOf(groupId), now)
tx.syncDaycareGroupAcl(testDaycare.id, employee.id, listOf(groupId), now)
}

val arrivalTime = HelsinkiDateTime.of(today, LocalTime.of(8, 0))
Expand Down Expand Up @@ -176,7 +176,7 @@ class MobileRealtimeStaffAttendanceControllerIntegrationTest :
tx.insert(employee)
tx.insert(DevEmployeePin(userId = employee.id, pin = pinCode))
tx.insertDaycareAclRow(testDaycare.id, employee.id, UserRole.STAFF)
tx.insertDaycareGroupAcl(testDaycare.id, employee.id, listOf(groupId), now)
tx.syncDaycareGroupAcl(testDaycare.id, employee.id, listOf(groupId), now)
}

val arrivalTime = HelsinkiDateTime.of(today, LocalTime.of(8, 0))
Expand Down Expand Up @@ -211,7 +211,7 @@ class MobileRealtimeStaffAttendanceControllerIntegrationTest :
tx.insert(employee)
tx.insert(DevEmployeePin(userId = employee.id, pin = pinCode))
tx.insertDaycareAclRow(testDaycare.id, employee.id, UserRole.STAFF)
tx.insertDaycareGroupAcl(testDaycare.id, employee.id, listOf(groupId), now)
tx.syncDaycareGroupAcl(testDaycare.id, employee.id, listOf(groupId), now)
tx.insert(
DevStaffAttendancePlan(
employeeId = employee.id,
Expand Down Expand Up @@ -243,7 +243,7 @@ class MobileRealtimeStaffAttendanceControllerIntegrationTest :
tx.insert(employee)
tx.insert(DevEmployeePin(userId = employee.id, pin = pinCode))
tx.insertDaycareAclRow(testDaycare.id, employee.id, UserRole.STAFF)
tx.insertDaycareGroupAcl(testDaycare.id, employee.id, listOf(groupId), now)
tx.syncDaycareGroupAcl(testDaycare.id, employee.id, listOf(groupId), now)
tx.insert(
DevStaffAttendancePlan(
employeeId = employee.id,
Expand Down Expand Up @@ -276,7 +276,7 @@ class MobileRealtimeStaffAttendanceControllerIntegrationTest :
tx.insert(employee)
tx.insert(DevEmployeePin(userId = employee.id, pin = pinCode))
tx.insertDaycareAclRow(testDaycare.id, employee.id, UserRole.STAFF)
tx.insertDaycareGroupAcl(testDaycare.id, employee.id, listOf(groupId), now)
tx.syncDaycareGroupAcl(testDaycare.id, employee.id, listOf(groupId), now)
tx.insert(
DevStaffAttendancePlan(
employeeId = employee.id,
Expand Down Expand Up @@ -309,7 +309,7 @@ class MobileRealtimeStaffAttendanceControllerIntegrationTest :
tx.insert(employee)
tx.insert(DevEmployeePin(userId = employee.id, pin = pinCode))
tx.insertDaycareAclRow(testDaycare.id, employee.id, UserRole.STAFF)
tx.insertDaycareGroupAcl(testDaycare.id, employee.id, listOf(groupId), now)
tx.syncDaycareGroupAcl(testDaycare.id, employee.id, listOf(groupId), now)
tx.insert(
DevStaffAttendancePlan(
employeeId = employee.id,
Expand Down Expand Up @@ -351,7 +351,7 @@ class MobileRealtimeStaffAttendanceControllerIntegrationTest :
tx.insert(employee)
tx.insert(DevEmployeePin(userId = employee.id, pin = pinCode))
tx.insertDaycareAclRow(testDaycare.id, employee.id, UserRole.STAFF)
tx.insertDaycareGroupAcl(testDaycare.id, employee.id, listOf(groupId), now)
tx.syncDaycareGroupAcl(testDaycare.id, employee.id, listOf(groupId), now)
tx.insert(
DevStaffAttendancePlan(
employeeId = employee.id,
Expand All @@ -376,7 +376,7 @@ class MobileRealtimeStaffAttendanceControllerIntegrationTest :
tx.insert(employee)
tx.insert(DevEmployeePin(userId = employee.id, pin = pinCode))
tx.insertDaycareAclRow(testDaycare.id, employee.id, UserRole.STAFF)
tx.insertDaycareGroupAcl(testDaycare.id, employee.id, listOf(groupId), now)
tx.syncDaycareGroupAcl(testDaycare.id, employee.id, listOf(groupId), now)
}

val lastLoginBeforeArrival = db.read { db -> db.getEmployeeLastLogin(employee.id) }
Expand All @@ -402,7 +402,7 @@ class MobileRealtimeStaffAttendanceControllerIntegrationTest :
tx.insert(employee)
tx.insert(DevEmployeePin(userId = employee.id, pin = pinCode))
tx.insertDaycareAclRow(testDaycare.id, employee.id, UserRole.STAFF)
tx.insertDaycareGroupAcl(testDaycare.id, employee.id, listOf(groupId), now)
tx.syncDaycareGroupAcl(testDaycare.id, employee.id, listOf(groupId), now)
tx.insert(
DevStaffAttendancePlan(
employeeId = employee.id,
Expand Down Expand Up @@ -438,7 +438,7 @@ class MobileRealtimeStaffAttendanceControllerIntegrationTest :
tx.insert(employee)
tx.insert(DevEmployeePin(userId = employee.id, pin = pinCode))
tx.insertDaycareAclRow(testDaycare.id, employee.id, UserRole.STAFF)
tx.insertDaycareGroupAcl(testDaycare.id, employee.id, listOf(groupId), now)
tx.syncDaycareGroupAcl(testDaycare.id, employee.id, listOf(groupId), now)
tx.insert(
DevStaffAttendancePlan(
employeeId = employee.id,
Expand All @@ -464,7 +464,7 @@ class MobileRealtimeStaffAttendanceControllerIntegrationTest :
tx.insert(employee)
tx.insert(DevEmployeePin(userId = employee.id, pin = pinCode))
tx.insertDaycareAclRow(testDaycare.id, employee.id, UserRole.STAFF)
tx.insertDaycareGroupAcl(testDaycare.id, employee.id, listOf(groupId), now)
tx.syncDaycareGroupAcl(testDaycare.id, employee.id, listOf(groupId), now)
tx.insert(
DevStaffAttendancePlan(
employeeId = employee.id,
Expand All @@ -488,7 +488,7 @@ class MobileRealtimeStaffAttendanceControllerIntegrationTest :
tx.insert(employee)
tx.insert(DevEmployeePin(userId = employee.id, pin = pinCode))
tx.insertDaycareAclRow(testDaycare.id, employee.id, UserRole.STAFF)
tx.insertDaycareGroupAcl(testDaycare.id, employee.id, listOf(groupId), now)
tx.syncDaycareGroupAcl(testDaycare.id, employee.id, listOf(groupId), now)
tx.insert(
DevStaffAttendancePlan(
employeeId = employee.id,
Expand Down Expand Up @@ -531,7 +531,7 @@ class MobileRealtimeStaffAttendanceControllerIntegrationTest :
tx.insert(employee)
tx.insert(DevEmployeePin(userId = employee.id, pin = pinCode))
tx.insertDaycareAclRow(testDaycare.id, employee.id, UserRole.STAFF)
tx.insertDaycareGroupAcl(testDaycare.id, employee.id, listOf(groupId), now)
tx.syncDaycareGroupAcl(testDaycare.id, employee.id, listOf(groupId), now)
tx.insert(
DevStaffAttendancePlan(
employeeId = employee.id,
Expand Down Expand Up @@ -570,7 +570,7 @@ class MobileRealtimeStaffAttendanceControllerIntegrationTest :
tx.insert(employee)
tx.insert(DevEmployeePin(userId = employee.id, pin = pinCode))
tx.insertDaycareAclRow(testDaycare.id, employee.id, UserRole.STAFF)
tx.insertDaycareGroupAcl(testDaycare.id, employee.id, listOf(groupId), now)
tx.syncDaycareGroupAcl(testDaycare.id, employee.id, listOf(groupId), now)
tx.insert(
DevStaffAttendancePlan(
employeeId = employee.id,
Expand All @@ -596,7 +596,7 @@ class MobileRealtimeStaffAttendanceControllerIntegrationTest :
tx.insert(employee)
tx.insert(DevEmployeePin(userId = employee.id, pin = pinCode))
tx.insertDaycareAclRow(testDaycare.id, employee.id, UserRole.STAFF)
tx.insertDaycareGroupAcl(testDaycare.id, employee.id, listOf(groupId), now)
tx.syncDaycareGroupAcl(testDaycare.id, employee.id, listOf(groupId), now)
tx.insert(
DevStaffAttendancePlan(
employeeId = employee.id,
Expand Down Expand Up @@ -629,7 +629,7 @@ class MobileRealtimeStaffAttendanceControllerIntegrationTest :
tx.insert(employee)
tx.insert(DevEmployeePin(userId = employee.id, pin = pinCode))
tx.insertDaycareAclRow(testDaycare.id, employee.id, UserRole.STAFF)
tx.insertDaycareGroupAcl(testDaycare.id, employee.id, listOf(groupId), now)
tx.syncDaycareGroupAcl(testDaycare.id, employee.id, listOf(groupId), now)
tx.insert(
DevStaffAttendancePlan(
employeeId = employee.id,
Expand Down Expand Up @@ -671,7 +671,7 @@ class MobileRealtimeStaffAttendanceControllerIntegrationTest :
tx.insert(employee)
tx.insert(DevEmployeePin(userId = employee.id, pin = pinCode))
tx.insertDaycareAclRow(testDaycare.id, employee.id, UserRole.STAFF)
tx.insertDaycareGroupAcl(testDaycare.id, employee.id, listOf(groupId), now)
tx.syncDaycareGroupAcl(testDaycare.id, employee.id, listOf(groupId), now)
tx.insert(
DevStaffAttendancePlan(
employeeId = employee.id,
Expand Down Expand Up @@ -708,7 +708,7 @@ class MobileRealtimeStaffAttendanceControllerIntegrationTest :
tx.insert(employee)
tx.insert(DevEmployeePin(userId = employee.id, pin = pinCode))
tx.insertDaycareAclRow(testDaycare.id, employee.id, UserRole.STAFF)
tx.insertDaycareGroupAcl(testDaycare.id, employee.id, listOf(groupId), now)
tx.syncDaycareGroupAcl(testDaycare.id, employee.id, listOf(groupId), now)
tx.insert(
DevStaffAttendancePlan(
employeeId = employee.id,
Expand Down Expand Up @@ -757,7 +757,7 @@ class MobileRealtimeStaffAttendanceControllerIntegrationTest :
tx.insert(employee)
tx.insert(DevEmployeePin(userId = employee.id, pin = pinCode))
tx.insertDaycareAclRow(testDaycare.id, employee.id, UserRole.STAFF)
tx.insertDaycareGroupAcl(testDaycare.id, employee.id, listOf(groupId), now)
tx.syncDaycareGroupAcl(testDaycare.id, employee.id, listOf(groupId), now)
tx.insert(
DevStaffAttendancePlan(
employeeId = employee.id,
Expand Down Expand Up @@ -792,7 +792,7 @@ class MobileRealtimeStaffAttendanceControllerIntegrationTest :
tx.insert(employee)
tx.insert(DevEmployeePin(userId = employee.id, pin = pinCode))
tx.insertDaycareAclRow(testDaycare.id, employee.id, UserRole.STAFF)
tx.insertDaycareGroupAcl(testDaycare.id, employee.id, listOf(groupId), now)
tx.syncDaycareGroupAcl(testDaycare.id, employee.id, listOf(groupId), now)
tx.insert(
DevStaffAttendancePlan(
employeeId = employee.id,
Expand Down Expand Up @@ -828,7 +828,7 @@ class MobileRealtimeStaffAttendanceControllerIntegrationTest :
tx.insert(employee)
tx.insert(DevEmployeePin(userId = employee.id, pin = pinCode))
tx.insertDaycareAclRow(testDaycare.id, employee.id, UserRole.STAFF)
tx.insertDaycareGroupAcl(testDaycare.id, employee.id, listOf(groupId), now)
tx.syncDaycareGroupAcl(testDaycare.id, employee.id, listOf(groupId), now)
tx.insert(
DevStaffAttendancePlan(
employeeId = employee.id,
Expand Down Expand Up @@ -873,7 +873,7 @@ class MobileRealtimeStaffAttendanceControllerIntegrationTest :
tx.insert(employee)
tx.insert(DevEmployeePin(userId = employee.id, pin = pinCode))
tx.insertDaycareAclRow(testDaycare.id, employee.id, UserRole.STAFF)
tx.insertDaycareGroupAcl(testDaycare.id, employee.id, listOf(groupId), now)
tx.syncDaycareGroupAcl(testDaycare.id, employee.id, listOf(groupId), now)
tx.insert(
DevStaffAttendancePlan(
employeeId = employee.id,
Expand Down Expand Up @@ -908,7 +908,7 @@ class MobileRealtimeStaffAttendanceControllerIntegrationTest :
tx.insert(employee)
tx.insert(DevEmployeePin(userId = employee.id, pin = pinCode))
tx.insertDaycareAclRow(testDaycare.id, employee.id, UserRole.STAFF)
tx.insertDaycareGroupAcl(testDaycare.id, employee.id, listOf(groupId), now)
tx.syncDaycareGroupAcl(testDaycare.id, employee.id, listOf(groupId), now)
tx.insert(
DevStaffAttendancePlan(
employeeId = employee.id,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import fi.espoo.evaka.shared.GroupId
import fi.espoo.evaka.shared.auth.AuthenticatedUser
import fi.espoo.evaka.shared.auth.UserRole
import fi.espoo.evaka.shared.auth.insertDaycareAclRow
import fi.espoo.evaka.shared.auth.insertDaycareGroupAcl
import fi.espoo.evaka.shared.auth.syncDaycareGroupAcl
import fi.espoo.evaka.shared.dev.DevDaycareGroup
import fi.espoo.evaka.shared.dev.insert
import fi.espoo.evaka.shared.domain.BadRequest
Expand Down Expand Up @@ -63,7 +63,7 @@ class RealtimeStaffAttendanceControllerIntegrationTest :
tx.insertDaycareAclRow(testDaycare2.id, supervisor.id, UserRole.UNIT_SUPERVISOR)
tx.insertDaycareAclRow(testDaycare.id, staff.id, UserRole.STAFF)
tx.insertDaycareAclRow(testDaycare2.id, staff.id, UserRole.STAFF)
tx.insertDaycareGroupAcl(testDaycare.id, staff.id, listOf(groupId1), now)
tx.syncDaycareGroupAcl(testDaycare.id, staff.id, listOf(groupId1), now)

tx.upsertOccupancyCoefficient(
OccupancyCoefficientUpsert(testDaycare.id, staff.id, BigDecimal(7))
Expand Down
Loading
Loading