diff --git a/base/context_processors.py b/base/context_processors.py
index 2d4816fbf..f043eb0f4 100644
--- a/base/context_processors.py
+++ b/base/context_processors.py
@@ -5,6 +5,7 @@ This module is used to register context processor`
"""
from django.urls import path
from django.http import HttpResponse
+from attendance.models import AttendanceGeneralSetting
from base.models import Company
from base.urls import urlpatterns
from offboarding.models import OffboardingGeneralSetting
@@ -102,3 +103,14 @@ def resignation_request_enabled(request):
if first:
enabled_resignation_request = first.resignation_request
return {"enabled_resignation_request": enabled_resignation_request}
+
+
+def timerunner_enabled(request):
+ """
+ Check weather resignation_request enabled of not in offboarding
+ """
+ first = AttendanceGeneralSetting.objects.first()
+ enabled_timerunner = True
+ if first:
+ enabled_timerunner = first.time_runner
+ return {"enabled_timerunner": enabled_timerunner}
diff --git a/base/forms.py b/base/forms.py
index 58a432eb3..7c127af64 100644
--- a/base/forms.py
+++ b/base/forms.py
@@ -24,6 +24,7 @@ from base.models import (
AnnouncementComment,
AnnouncementExpire,
Attachment,
+ BaserequestFile,
Company,
Department,
DynamicEmailConfiguration,
@@ -50,6 +51,8 @@ from base.methods import reload_queryset
from horilla_audit.models import AuditTag
from horilla_widgets.widgets.horilla_multi_select_field import HorillaMultiSelectField
from horilla_widgets.widgets.select_widgets import HorillaMultiSelectWidget
+from employee.forms import MultipleFileField
+
# your form here
@@ -1550,6 +1553,48 @@ class ShiftrequestcommentForm(ModelForm):
model = ShiftrequestComment
fields = ('comment',)
+
+
+class shiftCommentForm(ModelForm):
+ """
+ Shift request comment model form
+ """
+
+ verbose_name = "Add Comment"
+
+ class Meta:
+ model = ShiftrequestComment
+ fields = "__all__"
+
+ def __init__(self, *args, **kwargs):
+ super().__init__(*args, **kwargs)
+ self.fields["files"] = MultipleFileField(label="files")
+ self.fields["files"].required = False
+
+ def as_p(self):
+ """
+ Render the form fields as HTML table rows with Bootstrap styling.
+ """
+ context = {"form": self}
+ table_html = render_to_string("common_form.html", context)
+ return table_html
+
+ def save(self, commit: bool = ...) -> Any:
+ multiple_files_ids = []
+ files = None
+ if self.files.getlist("files"):
+ files = self.files.getlist("files")
+ self.instance.attachemnt = files[0]
+ multiple_files_ids = []
+ for attachemnt in files:
+ file_instance = BaserequestFile()
+ file_instance.file = attachemnt
+ file_instance.save()
+ multiple_files_ids.append(file_instance.pk)
+ instance = super().save(commit)
+ if commit:
+ instance.files.add(*multiple_files_ids)
+ return instance, files
class WorktyperequestcommentForm(ModelForm):
diff --git a/base/templates/base/general_settings.html b/base/templates/base/general_settings.html
index 4022c2afc..b5340f031 100644
--- a/base/templates/base/general_settings.html
+++ b/base/templates/base/general_settings.html
@@ -3,5 +3,6 @@
{% include "announcement/expiry_day.html" %}
{% include "offboarding/settings/settings.html" %}
+{% include "attendance/settings/settings.html" %}
{% endblock settings %}
\ No newline at end of file
diff --git a/base/templates/shift_request/htmx/requests.html b/base/templates/shift_request/htmx/requests.html
index ca23891fd..82ad7e8b4 100755
--- a/base/templates/shift_request/htmx/requests.html
+++ b/base/templates/shift_request/htmx/requests.html
@@ -97,8 +97,8 @@ style="cursor: pointer;"
-