diff --git a/base/admin.py b/base/admin.py index 048a645c4..8273c8b0f 100644 --- a/base/admin.py +++ b/base/admin.py @@ -32,6 +32,7 @@ from base.models import ( ShiftRequest, WorkTypeRequest, WorktyperequestComment, + DashboardEmployeeCharts, ) # Register your models here. @@ -60,3 +61,4 @@ admin.site.register(DynamicPagination) admin.site.register(Announcement) admin.site.register(Attachment) admin.site.register(EmailLog) +admin.site.register(DashboardEmployeeCharts) \ No newline at end of file diff --git a/base/models.py b/base/models.py index 3cf4f1a8f..aad3c1aad 100644 --- a/base/models.py +++ b/base/models.py @@ -1377,3 +1377,14 @@ class DriverViewed(models.Model): This method is used to access all the viewd driver """ return self.user.driverviewed_set.values_list("viewed", flat=True) + + +class DashboardEmployeeCharts(HorillaModel): + from employee.models import Employee + + employee = models.ForeignKey(Employee, on_delete=models.CASCADE) + charts = models.JSONField(blank=True, null=True) + + def __str__(self): + return f"{self.employee} - charts" + \ No newline at end of file diff --git a/base/templates/request_and_approve/attendance_validate.html b/base/templates/request_and_approve/attendance_validate.html index 9ee24e99f..e46cf2250 100644 --- a/base/templates/request_and_approve/attendance_validate.html +++ b/base/templates/request_and_approve/attendance_validate.html @@ -5,53 +5,11 @@ {% trans 'Attendance To Validate' %} -
- {% if validate_attendances.has_previous %} - - - - {% endif %} - - {% if validate_attendances.has_next %} - - - - {% endif %} - {% if validate_attendances.has_next or validate_attendances.has_previous %} - - {% trans "Page" %} {{ validate_attendances.number }} {%trans "of" %} - {{validate_attendances.paginator.num_pages }} - - {% endif %} -
+ + close + -
+
{% if validate_attendances %}
@@ -131,3 +89,48 @@
{% endif %}
+
+ {% if validate_attendances.has_previous %} + + + + {% endif %} + + {% if validate_attendances.has_next %} + + + + {% endif %} + {% if validate_attendances.has_next or validate_attendances.has_previous %} + + {% trans "Page" %} {{ validate_attendances.number }} {%trans "of" %} + {{validate_attendances.paginator.num_pages }} + + {% endif %} +
\ No newline at end of file diff --git a/base/templates/request_and_approve/overtime_approve.html b/base/templates/request_and_approve/overtime_approve.html index dd1176343..ad0fa4ede 100644 --- a/base/templates/request_and_approve/overtime_approve.html +++ b/base/templates/request_and_approve/overtime_approve.html @@ -6,53 +6,12 @@ {% trans 'Overtime To Approve' %} -
- {% if overtime_attendances.has_previous %} - - - - {% endif %} - {% if overtime_attendances.has_next %} - - - - {% endif %} - {% if overtime_attendances.has_next or overtime_attendances.has_previous %} - - {% trans "Page" %} {{ overtime_attendances.number }} {%trans "of" %} - {{overtime_attendances.paginator.num_pages }} - - {% endif %} -
+ + close +
-
+
{% if overtime_attendances %}
@@ -132,3 +91,47 @@
{% endif %}
+
+ {% if overtime_attendances.has_previous %} + + + + {% endif %} + {% if overtime_attendances.has_next %} + + + + {% endif %} + {% if overtime_attendances.has_next or overtime_attendances.has_previous %} + + {% trans "Page" %} {{ overtime_attendances.number }} {%trans "of" %} + {{overtime_attendances.paginator.num_pages }} + + {% endif %} +
\ No newline at end of file diff --git a/base/urls.py b/base/urls.py index c9fc5fdc6..5d6111af1 100644 --- a/base/urls.py +++ b/base/urls.py @@ -893,4 +893,6 @@ urlpatterns = [ "announcement-viewed-by", announcement.viewed_by, name="announcement-viewed-by" ), path("driver-viewed", views.driver_viewed_status, name="driver-viewed"), + path("employee-charts", views.employee_charts, name="employee-charts"), + path("employee-chart-show", views.employee_chart_show, name="employee-chart-show"), ] diff --git a/base/views.py b/base/views.py index 8573d3291..83acf934f 100644 --- a/base/views.py +++ b/base/views.py @@ -91,6 +91,7 @@ from base.models import ( AnnouncementView, BaserequestFile, Company, + DashboardEmployeeCharts, DynamicEmailConfiguration, DynamicPagination, JobPosition, @@ -137,6 +138,7 @@ from payroll.models.tax_models import PayrollSettings from helpdesk.models import DepartmentManager, TicketType from helpdesk.forms import TicketTypeForm from recruitment.models import RejectReason +from django.db.models import F def custom404(request): @@ -370,6 +372,9 @@ def home(request): last_day_of_week = first_day_of_week + timedelta(days=6) employees_with_pending = [] + employee_charts = DashboardEmployeeCharts.objects.get_or_create( + employee=request.user.employee_get + )[0] # List of field names to focus on fields_to_focus = [ @@ -416,20 +421,16 @@ def home(request): "completed_field_count": "0", }, ) - announcements = Announcement.objects.filter(expire_date__gte = datetime.today()).order_by("-created_on") - announcement_list = announcements.filter(employees=request.user.employee_get) - announcement_list = announcement_list | announcements.filter(employees__isnull=True) - if request.user.has_perm("base.view_announcement"): - announcement_list = announcements + announcements = Announcement.objects.all() general_expire = AnnouncementExpire.objects.all().first() general_expire_date = 30 if not general_expire else general_expire.days - for announcement in announcement_list: - if announcement.expire_date is None: - calculated_expire_date = announcement.created_on + timedelta( - days=general_expire_date - ) - announcement.expire_date = calculated_expire_date + for announcement in announcements.filter(expire_date__isnull=True): + calculated_expire_date = announcement.created_on + timedelta( + days=general_expire_date + ) + announcement.expire_date = calculated_expire_date + announcement.save() # Check if the user has viewed the announcement announcement_view = AnnouncementView.objects.filter( @@ -439,12 +440,20 @@ def home(request): announcement_view is not None and announcement_view.viewed ) + announcements = announcements.exclude(expire_date__lt = datetime.today().date()).order_by("-created_on") + + announcement_list = announcements.filter(employees=request.user.employee_get) + announcement_list = announcement_list | announcements.filter(employees__isnull=True) + if request.user.has_perm("base.view_announcement"): + announcement_list = announcements + context = { "first_day_of_week": first_day_of_week.strftime("%Y-%m-%d"), "last_day_of_week": last_day_of_week.strftime("%Y-%m-%d"), "employees_with_pending": employees_with_pending, "announcement": announcement_list, "general_expire_date": general_expire_date, + "charts": employee_charts.charts, } return render(request, "index.html", context) @@ -4780,8 +4789,6 @@ def clear_form_fields_and_remove_extra_fields(form, managers): form.fields.pop(field_name, None) -from django.db.models import F - @login_required def multiple_level_approval_edit(request, condition_id): create = False @@ -5243,6 +5250,7 @@ def action_type_create(request): return HttpResponse("") else: from django.urls import reverse + url = reverse("create-actions") instance = Actiontype.objects.all().order_by("-id").first() mutable_get = request.GET.copy() @@ -5309,3 +5317,127 @@ def driver_viewed_status(request): if form.is_valid(): form.save() return HttpResponse("") + + +@login_required +def employee_charts(request): + employee_charts = DashboardEmployeeCharts.objects.get_or_create( + employee=request.user.employee_get + )[0] + charts = employee_charts.charts or [] + chart_id = request.GET.get("chart_id") + if chart_id and chart_id not in charts: + charts.append(chart_id) + employee_charts.charts = charts + employee_charts.save() + return HttpResponse("") + + +def check_permission(request, charts): + from recruitment.templatetags.recruitmentfilters import ( + is_stagemanager, + is_recruitmentmangers, + ) + + permissions = { + "offline_employees": "employee.view_employee", + "online_employees": "employee.view_employee", + "overall_leave_chart": "leave.view_leaverequest", + "hired_candidates": "recruitment.view_candidate", + "onboarding_candidates": "recruitment.view_candidate", + "recruitment_analytics": "recruitment.view_recruitment", + "attendance_analytic": "attendance.view_attendance", + "hours_chart": "attendance.view_attendance", + "objective_status": "pms.view_employeeobjective", + "key_result_status": "pms.view_employeekeyresult", + "feedback_status": "pms.view_feedback", + "shift_request_approve": "base.change_shiftrequest", + "work_type_request_approve": "base.change_worktyperequest", + "overtime_approve": "attendance.change_attendance", + "attendance_validate": "attendance.change_attendance", + "leave_request_approve": "leave.change_leaverequest", + "leave_allocation_approve": "leave.change_leaveallocationrequest", + "asset_request_approve": "asset.change_assetrequest", + } + chart_list = [] + need_recruitment_manager = [ + "offline_employees", + "online_employees", + "attendance_analytic", + "hours_chart", + "objective_status", + "key_result_status", + "feedback_status", + "shift_request_approve", + "work_type_request_approve", + "overtime_approve", + "attendance_validate", + "leave_request_approve", + "leave_allocation_approve", + "asset_request_approve", + ] + need_stage_manager = [ + "hired_candidates", + "onboarding_candidates", + "recruitment_analytics", + ] + for chart in charts: + if chart[0] in permissions.keys() or chart[0] in need_recruitment_manager or chart[0] in need_stage_manager: + if request.user.has_perm(permissions[chart[0]]): + chart_list.append(chart) + elif chart[0] in need_recruitment_manager: + if is_recruitmentmangers(request.user): + chart_list.append(chart) + elif chart[0] in need_stage_manager: + if is_stagemanager(request.user): + chart_list.append(chart) + else: + chart_list.append(chart) + + return chart_list + + +@login_required +def employee_chart_show(request): + employee_charts = DashboardEmployeeCharts.objects.filter( + employee=request.user.employee_get + ).first() + charts = [ + ("offline_employees", _("Offline Employees")), + ("online_employees", _("Online Employees")), + ("overall_leave_chart", _("Overall Leave Chart")), + ("hired_candidates", _("Hired Candidates")), + ("onboarding_candidates", _("Onboarding Candidates")), + ("recruitment_analytics", _("Recruitment Analytics")), + ("attendance_analytic", _("Attendance analytics")), + ("hours_chart", _("Hours Chart")), + ("employees_chart", _("Employee Chart")), + ("department_chart", _("Department Chart")), + ("gender_chart", _("Gender Chart")), + ("objective_status", _("Objective Status")), + ("key_result_status", _("Key Result Status")), + ("feedback_status", _("Feedback Status")), + ("shift_request_approve", _("Shift Request to Approve")), + ("work_type_request_approve", _("Work Type Request to Approve")), + ("overtime_approve", _("Overtime to Approve")), + ("attendance_validate", _("Attendance to Validate")), + ("leave_request_approve", _("Leave Request to Approve")), + ("leave_allocation_approve", _("Leave Allocation to Approve")), + ("feedback_answer", _("Feedbacks to Answer")), + ("asset_request_approve", _("Asset Request to Approve")), + ] + charts = check_permission(request, charts) + if request.POST: + data = request.POST + for chart in charts: + if chart[0] not in data.keys() and chart[0] not in employee_charts.charts: + employee_charts.charts.append(chart[0]) + elif chart[0] in data.keys() and chart[0] in employee_charts.charts: + employee_charts.charts.remove(chart[0]) + else: + pass + + employee_charts.save() + return HttpResponse("") + context = {"dashboard_charts": charts, "employee_chart": employee_charts.charts} + return render(request, "dashboard_chart_form.html", context) diff --git a/employee/templates/dashboard/not_in_yet.html b/employee/templates/dashboard/not_in_yet.html index ff097c7e6..131f9a22f 100644 --- a/employee/templates/dashboard/not_in_yet.html +++ b/employee/templates/dashboard/not_in_yet.html @@ -1,66 +1,126 @@ {% load i18n %} -
-
- - {% trans 'Offline Employees' %} -
- {% if employees.has_previous %} - - - - {% endif %} - {% if employees.has_next %} - - +
+
+ {% trans 'Offline Employees' %} - {% endif %} - {% if employees.has_previous or employees.has_next %} - - {% trans "Page" %} {{ employees.number }} - {%trans "of" %} {{employees.paginator.num_pages }} - - {% endif %} + + close +
-
- {% if employees %} -
-
-
-
- {% for emp in employees %} -
-
-
-
- -
- - {{ emp.get_full_name }} - {{ emp.get_leave_status }} - -
-
-
- -
-
- {% endfor %} -
-
-
+ {% if employees %} +
+
+
+
+ {% for emp in employees %} +
+
+
+
+ +
+ + {{ emp.get_full_name }} + {{ emp.get_leave_status }} + +
+
+
+ +
+
+ {% endfor %} +
+
+
+
+ {% else %} +
+
+ +

+ {% trans "No data Found..." %} +

+
+
+ {% endif %} +
+ {% if employees.has_previous %} + + + + {% endif %} + {% if employees.has_next %} + + + + {% endif %} + {% if employees.has_previous or employees.has_next %} + + {% trans "Page" %} {{ employees.number }} {%trans "of" %} + {{employees.paginator.num_pages }} + + {% endif %}
- {% else %} -
-
- -

{% trans "No data Found..." %}

-
-
- {% endif %}
diff --git a/employee/templates/dashboard/not_out_yet.html b/employee/templates/dashboard/not_out_yet.html index fec7bc710..0a0fb781a 100644 --- a/employee/templates/dashboard/not_out_yet.html +++ b/employee/templates/dashboard/not_out_yet.html @@ -2,6 +2,9 @@
{% trans 'Online Employees' %} + + close +
{% if employees %}
diff --git a/static/css/style.css b/static/css/style.css new file mode 100644 index 000000000..5270e430c --- /dev/null +++ b/static/css/style.css @@ -0,0 +1,470 @@ +@font-face { + font-family: "Material Icons"; + font-style: normal; + font-weight: 400; + src: url("../fonts/material_icons.woff2") format("woff2"); +} + +.material-icons { + font-family: "Material Icons"; + font-weight: normal; + font-style: normal; + font-size: 24px; + line-height: 1; + letter-spacing: normal; + text-transform: none; + display: inline-block; + white-space: nowrap; + word-wrap: normal; + direction: ltr; + -webkit-font-feature-settings: "liga"; + -webkit-font-smoothing: antialiased; +} + +@font-face { + font-family: 'Material Symbols Outlined'; + font-style: normal; + font-weight: 400; + src: url("../fonts/material_icons_outlined.woff2") format('woff2'); + } + +.material-symbols-outlined { +font-family: 'Material Symbols Outlined'; +font-weight: normal; +font-style: normal; +font-size: 24px; +line-height: 1; +letter-spacing: normal; +text-transform: none; +display: inline-block; +white-space: nowrap; +word-wrap: normal; +direction: ltr; +-webkit-font-feature-settings: 'liga'; +-webkit-font-smoothing: antialiased; +} + +.note-modal-backdrop { + z-index: 1020; +} + +.note-editing-area { + background-color: white; +} + +.oh-activity-sidebar__body { + overflow-y: auto !important; + min-height: calc(100% - 90px) !important; + max-height: calc(110% - 90px) !important; +} + +#main-section { + padding-top: 60px !important; +} + +#mainNav { + padding: 0 !important; +} + +.oh-modal__close--custom { + border: none; + background: none; + font-size: 1.5rem; + opacity: 0.7; + position: absolute; + top: 25px; + right: 15px; + cursor: pointer; + -webkit-transition: all 0.3s ease-in-out; + transition: all 0.3s ease-in-out; +} + +ul.errorlist { + color: #d9534f; + background-color: #f0d8d8; + border-color: #d6e9c6; + padding: 15px; + margin-bottom: 20px; + border: 1px solid transparent; + border-radius: 4px; + +} + +ul:not(.ul) { + list-style-type: none; +} + +ion-icon { + pointer-events: none; +} + +.row-status--purple { + border-left: 4px solid rgba(128, 128, 128, 0.482); + border-radius: 5px; +} + +.row-status--cyan { + border-left: 4px solid cyan; + border-radius: 5px; +} + +.row-status--yellow { + border-left: 4px solid yellowgreen; + border-radius: 5px; +} + +.row-status--red { + border-left: 4px solid red; + border-radius: 5px; +} + +.row-status--black { + border-left: 4px solid black; + border-radius: 5px; +} + +.row-status--gray { + border-left: 4px solid gray; + border-radius: 5px; +} + +.row-status--orange { + border-left: 4px solid orange; + border-radius: 5px; +} + +.row-status--gray { + border-left: 4px solid gray; + border-radius: 5px; +} + +.row-status--yellow { + border-left: 4px solid yellowgreen; + border-radius: 5px; +} + +.row-status--blue { + border-left: 4px solid rgb(103, 171, 238); + border-radius: 5px; +} + +form label { + font-weight: 700; +} + +.oh-modal .oh-modal__dialog-title { + font-weight: 600; + color: #4f4a4a; +} + +.flexbox { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -ms-flex-wrap: wrap; + flex-wrap: wrap; +} + +.flexbox>div { + width: 300px; + height: 300px; + -webkit-box-flex: 0; + -ms-flex: 0 0 25%; + flex: 0 0 25%; + border: 1px solid rgba(255, 255, 255, 0.1); + -webkit-box-sizing: border-box; + box-sizing: border-box; + margin: 0; + position: relative; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + overflow: hidden; +} + +.triple-spinner { + display: block; + position: relative; + width: 125px; + height: 125px; + border-radius: 50%; + border: 4px solid transparent; + border-top: 4px solid #FF5722; + -webkit-animation: spin 2s linear infinite; + animation: spin 2s linear infinite; +} + +.triple-spinner::before, +.triple-spinner::after { + content: ""; + position: absolute; + border-radius: 50%; + border: 4px solid transparent; +} + +.triple-spinner::before { + top: 5px; + left: 5px; + right: 5px; + bottom: 5px; + border-top-color: #FF9800; + -webkit-animation: spin 3s linear infinite; + animation: spin 3.5s linear infinite; +} + +.triple-spinner::after { + top: 15px; + left: 15px; + right: 15px; + bottom: 15px; + border-top-color: #FFC107; + -webkit-animation: spin 1.5s linear infinite; + animation: spin 1.75s linear infinite; +} + +@-webkit-keyframes spin { + -webkit-from { + -webkit-transform: rotate(0deg); + -ms-transform: rotate(0deg); + transform: rotate(0deg); + } + + -webkit-to { + -webkit-transform: rotate(360deg); + -ms-transform: rotate(360deg); + transform: rotate(360deg); + } +} + +@-webkit-keyframes spin { + from { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + + to { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } +} + +@keyframes spin { + from { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + + to { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } +} + +.oh-titlebar__tag.filter-field { + border: solid 1px #ff450033; +} + +.oh-titlebar__tag--custom { + background-color: rgba(255, 68, 0, 0.543) !important; + color: white; +} + +.loader-container { + position: relative; + width: 120px; + height: 120px; + margin-left: 199px; +} + +.loader { + border: 10px solid #f3f3f3; + border-radius: 50%; + border-top: 10px solid #a4a3a3; + width: 100%; + height: 100%; + -webkit-animation: spin 2s linear infinite; + /* Safari */ + animation: spin 2s linear infinite; +} + +.loader-text { + position: absolute; + top: 52%; + left: 50%; + transform: translate(-50%, -50%); + font-size: 15px; + font-weight: bold; + color: #000; +} + +/* Safari */ +@-webkit-keyframes spin { + 0% { + -webkit-transform: rotate(0deg); + } + + 100% { + -webkit-transform: rotate(360deg); + } +} + +@keyframes spin { + 0% { + transform: rotate(0deg); + } + + 100% { + transform: rotate(360deg); + } +} + +.oh-accordion-meta__header .oh-accordion-meta__title { + font-weight: 600; +} + + +.exclude-accordion-style { + cursor: pointer; +} + +.panel { + display: none; + background-color: white; + overflow: hidden; + +} + +.perm-accordion { + border: 1px solid #6c757d1c !important; + margin: 0 0 2px 0 !important; + width: -100%; +} + +.app-permissions { + background-color: rgba(242, 249, 255, 0.586); +} + +.perm-accordion-active { + background-color: rgba(215, 233, 251, 0.621) !important; +} + +.perm-accordion-active:hover { + background-color: rgba(215, 233, 251, 0.408) !important; +} + +.arrow-up::before { + content: '\21D1'; + font-size: 15px; + display: inline-block; + margin-right: 5px; +} + +.arrow-down::before { + content: '\21D3'; + font-size: 15px; + display: inline-block; + margin-right: 5px; +} + +.arrow-up-down::before { + content: '\21C5'; + font-size: 15px; + display: inline-block; + margin-right: 5px; +} + +.oh-activity-sidebar__header { + position: relative; +} + +.delete-all-link { + position: absolute; + color: rgb(63 124 242); + top: -5px; + right: 10px; + margin: 10px; + cursor: pointer; +} + +.oh-sticky-table__right { + position: sticky; + right: 0; + background-color: #fff; +} + +.select2-container .select2-selection.select2-selection--multiple { + padding: 5px !important; + max-height: 90px !important; + overflow: hidden; + overflow-y: scroll; +} + +@media screen and (max-width: 575.98px) { + .at-work-seconds { + font-size: 10px; + } + + #attendance-activity-container .oh-btn { + padding: 0.5rem 0.2rem; + } + + .oh-pagination { + margin-bottom: 10px; + + } +} + +.oh-main__topbar { + padding-bottom: 1rem; +} + +.oh-inner-sidebar-content { + padding-top: 0; +} + +.hydrated:not(.close-icon) { + margin-right: 4px; +} + +.required-star::after { + content: "*"; + padding-left: 5px; + color: red; +} + +.oh-badge--small { + margin-top: 0px !important; + width: 20px !important; + height: 20px !important; + display: flex !important; + font-size: 0.7rem !important; + align-items: center !important; + /* line-height: 0; */ + justify-content: center !important; +} + +.oh-navbar { + z-index: 15 !important; +} + +.swal2-actions { + direction: rtl; +} + +.oh-dropdown__menu { + z-index: 15 +} + +.chart_close_button { + display: none; +} + +.oh-card-dashboard:hover .chart_close_button { + display: block; +} \ No newline at end of file diff --git a/static/fonts/material_icons_outlined.woff2 b/static/fonts/material_icons_outlined.woff2 new file mode 100644 index 000000000..5b2397ea6 Binary files /dev/null and b/static/fonts/material_icons_outlined.woff2 differ diff --git a/templates/dashboard.html b/templates/dashboard.html index b1bd46693..26497a560 100755 --- a/templates/dashboard.html +++ b/templates/dashboard.html @@ -152,497 +152,598 @@
{% endif %}
- {% if perms.candidate.view_employee or request.user|is_reportingmanager %} -
- {% include "dashboard/not_in_yet.html" %} -
- + {% if not 'offline_employees' in charts %} + {% if perms.employee.view_employee or request.user|is_reportingmanager %} +
+ {% include "dashboard/not_in_yet.html" %} +
+ {% endif %} {% endif %} - {% if perms.candidate.view_employee or request.user|is_reportingmanager %} -
- {% include "dashboard/not_out_yet.html" %} -
- + {% if not 'online_employees' in charts %} + {% if perms.employee.view_employee or request.user|is_reportingmanager %} +
+ {% include "dashboard/not_out_yet.html" %} +
+ {% endif %} {% endif %} - {% if perms.leave.veiw_leaverequest %} -
+ {% if not 'overall_leave_chart' in charts %} + {% if perms.leave.view_leaverequest %}
- {% trans "Overall Leave" %} - -
-
- -
-
-
- {% endif %} {% if perms.candidate.view_candidate or request.user|is_stagemanager %} -
-
-
- {% trans "Hired Candidates" %} -
-
- -
-
-
-
-
-
- {% trans "Candidates Started Onboarding" %} -
-
- -
-
-
- {% endif %} {% if request.user|is_stagemanager or perms.recruitment.view_recruitment %} -
-
-
- {% trans "Recruitment Analytics" %} -
-
- -
-
-
- {% endif %} {% if request.user|is_reportingmanager or perms.attendance.view_attendance %} -
-
-
-
- {% trans "Attendance Analytics" %} -
-
- + + + + - - +
+
+ +
+
+
+ {% endif %} + {% endif %} + {% if perms.recruitment.view_candidate or request.user|is_stagemanager %} + {% if not 'hired_candidates' in charts %} +
+
+
+ {% trans "Hired Candidates" %} + + close + +
+
+ +
+
+
+ {% endif %} + {% if not 'onboarding_candidates' in charts %} +
+
+
+ {% trans "Candidates Started Onboarding" %} + + close + +
+
+ +
+
+
+ {% endif %} + {% endif %} + {% if not 'recruitment_analytics' in charts %} + {% if request.user|is_stagemanager or perms.recruitment.view_recruitment %} +
+
+
+ {% trans "Recruitment Analytics" %} + + close + +
+
+ +
+
+
+ {% endif %} + {% endif %} + {% if not 'attendance_analytic' in charts %} + {% if request.user|is_reportingmanager or perms.attendance.view_attendance %} +
+
+
+
+ {% trans "Attendance Analytics" %} + + close + +
+
+ + + + +
+
+
+ +
+
+
+ {% endif %} + {% endif %} + {% if not 'hours_chart' in charts %} + {% if request.user|is_reportingmanager or perms.attendance.view_attendance %} +
+
+
+
+ {% trans "Hours Chart" %} + + close + +
+
+ +
+
+ +
+
+
+
+ {% endif %} + {% endif %} + {% if not 'employees_chart' in charts %} +
+
+
+ {% trans "Employees Chart" %} + + close
- +
-
- {% endif %} {% if request.user|is_reportingmanager or perms.attendance.view_attendance %} -
-
-
-
- {% trans "Hours Chart" %} -
-
- -
-
- -
-
-
-
{% endif %} -
+ {% if not 'department_chart' in charts %}
- {% trans "Employees Chart" %} -
-
- -
-
-
-
-
-
- {% trans "Department Chart" %} -
-
- -
-
-
-
-
-
- {% trans "Gender Chart" %} -
-
- -
-
-
- {% if perms.pms.view_employeeobjective or request.user|is_reportingmanager %} -
-
-
- {% trans "Objective Status" %} -
-
- -
-
-
- {% endif %} {% if perms.pms.view_employeekeyresult or request.user|is_reportingmanager %} -
-
-
- {% trans "Key Result Status" %} -
-
- -
-
-
- {% endif %} {% if perms.pms.view_feedback or request.user|is_reportingmanager %} -
-
-
- {% trans "Feedback Status" %} -
-
+ {% trans "Department Chart" %} + + close + +
- +
-
{% endif %} - - {% if perms.base.change_shiftrequest or request.user|is_reportingmanager %} -
+ {% if not 'gender_chart' in charts %}
- {% trans "Shift Requests To Approve" %} -
-
- {% include "request_and_approve/shift_request.html" %} + {% trans "Gender Chart" %} + + close + +
+
+ +
-
{% endif %} - {% if perms.base.change_worktyperequest or request.user|is_reportingmanager %} -
+ {% if not 'objective_status' in charts %} + {% if perms.pms.view_employeeobjective or request.user|is_reportingmanager %} +
+
+
+ {% trans "Objective Status" %} + + close + +
+
+ +
+
+
+ {% endif %} + {% endif %} + {% if not 'key_result_status' in charts %} + {% if perms.pms.view_employeekeyresult or request.user|is_reportingmanager %} +
+
+
+ {% trans "Key Result Status" %} + + close + +
+
+ +
+
+
+ {% endif %} + {% endif %} + {% if not 'feedback_status' in charts %} + {% if perms.pms.view_feedback or request.user|is_reportingmanager %} +
+
+
+ {% trans "Feedback Status" %} + + close + +
+
+
+ +
+
+
+
+ {% endif %} + {% endif %} + {% if not 'shift_request_approve' in charts %} + {% if perms.base.change_shiftrequest or request.user|is_reportingmanager %} +
+
+
+ {% trans "Shift Requests To Approve" %} + + close + +
+
+ {% include "request_and_approve/shift_request.html" %} +
+
+
+ {% endif %} + {% endif %} + {% if not 'work_type_request_approve' in charts %} + {% if perms.base.change_worktyperequest or request.user|is_reportingmanager %} +
+
+
+ {% trans "Work Type Requests To Approve" %} + + close + +
+
+ {% include "request_and_approve/work_type_request.html" %} +
+
+
+ {% endif %} + {% endif %} + {% if not 'overtime_approve' in charts %} + {% if perms.attendance.change_attendance or request.user|is_reportingmanager %} +
+
+ {% include "request_and_approve/overtime_approve.html" %} +
+
+ {% endif %} + {% endif %} + {% if not 'attendance_validate' in charts %} + {% if perms.attendance.change_attendance or request.user|is_reportingmanager %} +
+
+ {% include "request_and_approve/attendance_validate.html" %} +
+
+ {% endif %} + {% endif %} + {% if not 'leave_request_approve' in charts %} + {% if perms.leave.change_leaverequest or request.user|is_reportingmanager %} +
+
+
+ {% trans "Leave Requests To Approve" %} + + close + +
+
+
+
+
+ {% endif %} + {% endif %} + {% if not 'leave_allocation_approve' in charts %} + {% if perms.leave.change_leaveallocationrequest or request.user|is_reportingmanager %} +
+
+
+ {% trans "Leave Allocation Request To Approve" %} + + close + +
+
+ {% include "request_and_approve/leave_request_approve.html" %} +
+
+
+ {% endif %} + {% endif %} + {% if not 'feedback_answer' in charts %}
- {% trans "Work Type Requests To Approve" %} -
-
- {% include "request_and_approve/work_type_request.html" %} -
-
-
- {% endif %} - {% if perms.attendance.change_attendance or request.user|is_reportingmanager %} -
-
- {% include "request_and_approve/overtime_approve.html" %} -
-
- {% endif %} - {% if perms.attendance.change_attendance or request.user|is_reportingmanager %} -
-
- {% include "request_and_approve/attendance_validate.html" %} -
-
- {% endif %} - {% if perms.leave.change_leaverequest or request.user|is_reportingmanager %} -
-
-
- {% trans "Leave Requests To Approve" %}{% trans "Feedback To Answers" %} + + close + +
+
-
-
-
-
-
- {% endif %} - {% if perms.leave.change_leaveallocationrequest or request.user|is_reportingmanager %} -
-
-
- {% trans "Leave Allocation Request To Approve" %} -
-
- {% include "request_and_approve/leave_request_approve.html" %} -
-
-
- {% endif %} -
-
-
- {% trans "Feedback To Answers" %} -
-
- {% include "request_and_approve/feedback_answer.html" %} + {% include "request_and_approve/feedback_answer.html" %} +
-
- {% if perms.asset.change_assetrequest or request.user|is_reportingmanager %} -
-
+ {% endif %} + {% if not 'asset_request_approve' in charts %} + {% if perms.asset.change_assetrequest or request.user|is_reportingmanager %}
- {% trans "Asset Requests To Approve" %} +
+ {% trans "Asset Requests To Approve" %} + + close + +
+
+ {% include "request_and_approve/asset_requests_approve.html" %} +
+
-
- {% include "request_and_approve/asset_requests_approve.html" %} -
-
-
+ {% endif %} {% endif %}
@@ -682,41 +783,39 @@
-
+
{% if not announcement %} -
-
- Page not found. 404. -
{% trans "No Announcements to show." %}
-
+
+
+ Page not found. 404. +
{% trans "No Announcements to show." %}
+
{% else %} {% for i in announcement %} {% endfor %} {% endif %} diff --git a/templates/dashboard_chart_form.html b/templates/dashboard_chart_form.html new file mode 100644 index 000000000..acd173f14 --- /dev/null +++ b/templates/dashboard_chart_form.html @@ -0,0 +1,74 @@ +{% load i18n %} {% load static %} +
+

+ {% trans "Dashboard Chart Select" %} +

+ +
+ + +
+
+
+
+
+
+
+ {% trans "Charts" %} +
+
+ {% trans "View" %} +
+
+
+ {% for chart in dashboard_charts %} +
+
+
+
+ +
+ {{chart.1}} +
+
+
+
+
+ +
+
+
+
+ {% endfor %} +
+
+
+
+ +
+
+
+
diff --git a/templates/floating_button.html b/templates/floating_button.html index 80c8da128..5ae47b9ac 100644 --- a/templates/floating_button.html +++ b/templates/floating_button.html @@ -66,6 +66,10 @@ bottom: 400px; } + .inner-fabs.show .fab:nth-child(8) { + bottom: 450px; + } + .inner-fabs.show + .fab i { transform: rotate(135deg); } @@ -105,6 +109,17 @@
+
@@ -183,11 +200,13 @@ hx-get="{% url 'request-new-attendance' %}" hx-target="#objectCreateModalTarget" > - fingerprint + + person_add +
-
+
add
@@ -211,6 +230,7 @@ "fab6", "fab7", "fab8", + "fab9", "fabIcon", ]; let isCloseButton = diff --git a/templates/index.html b/templates/index.html index 3d5b28e80..6111ef2f1 100755 --- a/templates/index.html +++ b/templates/index.html @@ -23,11 +23,11 @@ - {% comment %} {% endcomment %} + @@ -42,393 +42,6 @@ {% block styles %} {% endblock styles %} - {% comment %}
{% endcomment %}