wbhuman_resources 1.57.1__py2.py3-none-any.whl → 1.58.0__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- wbhuman_resources/viewsets/absence.py +0 -20
- {wbhuman_resources-1.57.1.dist-info → wbhuman_resources-1.58.0.dist-info}/METADATA +1 -1
- {wbhuman_resources-1.57.1.dist-info → wbhuman_resources-1.58.0.dist-info}/RECORD +4 -4
- {wbhuman_resources-1.57.1.dist-info → wbhuman_resources-1.58.0.dist-info}/WHEEL +0 -0
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import wbcore.serializers as wb_serializers
|
|
2
1
|
from django.contrib.messages import info, warning
|
|
3
2
|
from django.db.models import Case, CharField, F, Q, Sum, Value, When
|
|
4
3
|
from django.db.models.functions import Concat, Extract
|
|
@@ -56,11 +55,6 @@ from wbhuman_resources.viewsets.titles import (
|
|
|
56
55
|
)
|
|
57
56
|
|
|
58
57
|
from ..models.absence import can_validate_or_deny_request
|
|
59
|
-
from ..serializers.absence import (
|
|
60
|
-
CurrentUserDefaultPeriodDateTimeRange,
|
|
61
|
-
get_lower_time_choices,
|
|
62
|
-
get_upper_time_choices,
|
|
63
|
-
)
|
|
64
58
|
from .mixins import EmployeeViewMixin
|
|
65
59
|
|
|
66
60
|
|
|
@@ -114,20 +108,6 @@ class AbsenceRequestModelViewSet(EmployeeViewMixin, viewsets.ModelViewSet):
|
|
|
114
108
|
return can_validate_or_deny_request(obj, self.request.user)
|
|
115
109
|
return False
|
|
116
110
|
|
|
117
|
-
def get_serializer_class(self):
|
|
118
|
-
if employee := getattr(self.request.user.profile, "human_resources", None):
|
|
119
|
-
|
|
120
|
-
class Serializer(AbsenceRequestModelSerializer):
|
|
121
|
-
period = wb_serializers.DateTimeRangeField(
|
|
122
|
-
default_timezone=employee.calendar.timezone,
|
|
123
|
-
default=CurrentUserDefaultPeriodDateTimeRange(),
|
|
124
|
-
lower_time_choices=get_lower_time_choices,
|
|
125
|
-
upper_time_choices=get_upper_time_choices,
|
|
126
|
-
)
|
|
127
|
-
|
|
128
|
-
return Serializer
|
|
129
|
-
return AbsenceRequestModelSerializer
|
|
130
|
-
|
|
131
111
|
def add_messages(
|
|
132
112
|
self,
|
|
133
113
|
request,
|
|
@@ -69,7 +69,7 @@ wbhuman_resources/tests/models/test_employees.py,sha256=vubEioP9LDcH5OCi4gK4Mrto
|
|
|
69
69
|
wbhuman_resources/tests/models/test_review.py,sha256=YZHxBmvqEpvbSaePldJZ1vzFk7F6Hq1paDrrrODIoGY,4527
|
|
70
70
|
wbhuman_resources/tests/models/test_utils.py,sha256=f3df5rpk7--6_kM1XGspeCrDUYto0m97i8Cs8pYM7B4,4676
|
|
71
71
|
wbhuman_resources/viewsets/__init__.py,sha256=Yg_nkFnzkf_HGmScY6jcZBXcFcwJ4ePW5gKwpaG2ybU,2142
|
|
72
|
-
wbhuman_resources/viewsets/absence.py,sha256=
|
|
72
|
+
wbhuman_resources/viewsets/absence.py,sha256=eY67-chD5RXX7_jt3rPVSZTili_p2jY52QMNy13h1jU,13191
|
|
73
73
|
wbhuman_resources/viewsets/absence_charts.py,sha256=1z8lKt-8O7MhePBVHZTbgeZlD0X0IcP8JnhA_gKU7qw,12303
|
|
74
74
|
wbhuman_resources/viewsets/calendars.py,sha256=qX5rPnw6f6LBYd8_vxc17AUtX22LGwhZs5_fiO2sBbE,3153
|
|
75
75
|
wbhuman_resources/viewsets/employee.py,sha256=ffJpIrV2f2n_a2I-Dx6XXlirLO6G3D83cdpwZDKBAVI,7345
|
|
@@ -106,6 +106,6 @@ wbhuman_resources/viewsets/titles/absence.py,sha256=4F4ENgmZBGKiDuC8DmgrklNXEsRo
|
|
|
106
106
|
wbhuman_resources/viewsets/titles/employee.py,sha256=VP_AC3E-3fpbO8-RUvi2haXcoJr9LVLYtJifGawVRGo,565
|
|
107
107
|
wbhuman_resources/viewsets/titles/kpis.py,sha256=OSH_vIsIjfThWn17X_K7ykBKAFqNvz8M4PyFCF8BRQo,491
|
|
108
108
|
wbhuman_resources/viewsets/titles/review.py,sha256=fL_PqTNAIK7alk_-7RaklkiR9guh54u8oS0m5AWOSSc,2458
|
|
109
|
-
wbhuman_resources-1.
|
|
110
|
-
wbhuman_resources-1.
|
|
111
|
-
wbhuman_resources-1.
|
|
109
|
+
wbhuman_resources-1.58.0.dist-info/METADATA,sha256=4L5RJBogz78tH_bsG_AqPJRVzkTw0eV50mBfcgIAESM,272
|
|
110
|
+
wbhuman_resources-1.58.0.dist-info/WHEEL,sha256=tkmg4JIqwd9H8mL30xA7crRmoStyCtGp0VWshokd1Jc,105
|
|
111
|
+
wbhuman_resources-1.58.0.dist-info/RECORD,,
|
|
File without changes
|