diff --git a/hr_leave_dashboard/README.rst b/hr_leave_dashboard/README.rst new file mode 100644 index 000000000..ca7cf349a --- /dev/null +++ b/hr_leave_dashboard/README.rst @@ -0,0 +1,50 @@ +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +Hr Leave Dashboard +================== +This module helps you to brings a multipurpose graphical dashboard for Time Off module and making the relationship management better and easier. + +Configuration +============= +* No Additional configuration is needed. + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +General Public License, Version 3 (AGPL v3). +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Credits +------- +* Developer: + (V16) Rahul Rajeev, + (V17) Jumana Haseen, + (V18) Gayathri V +Contact: odoo@cybrosys.com + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com +* Website : https://cybrosys.com + +Bug Tracker +----------- +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Maintainer +========== +.. image:: https://cybrosys.com/images/logo.png + :target: https://cybrosys.com + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit `Our Website `__ + +Further information +=================== +HTML Description: ``__ diff --git a/hr_leave_dashboard/__init__.py b/hr_leave_dashboard/__init__.py new file mode 100644 index 000000000..4180c5154 --- /dev/null +++ b/hr_leave_dashboard/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Gayathri V (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from . import models +from . import report diff --git a/hr_leave_dashboard/__manifest__.py b/hr_leave_dashboard/__manifest__.py new file mode 100644 index 000000000..6096ef8b7 --- /dev/null +++ b/hr_leave_dashboard/__manifest__.py @@ -0,0 +1,65 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Gayathri V (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +{ + 'name': "Hr Leave Dashboard", + 'version': '18.0.1.0.0', + 'category': 'Human Resources', + 'summary': """Advanced Leave Dashboard helps to view your and your + subordinate's details""", + 'description': """Advanced Leave Dashboard brings a multipurpose graphical + dashboard for Time Off module and making the relationship management better + and easier""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'depends': ['base', 'hr_holidays', 'hr_org_chart'], + 'data': [ + 'report/hr_leave_reports.xml', + 'report/hr_leave_report_templates.xml', + ], + 'assets': { + 'web.assets_backend': [ + 'hr_leave_dashboard/static/src/js/calendar_model.js', + 'hr_leave_dashboard/static/src/js/calendar_year_renderer.js', + 'hr_leave_dashboard/static/src/js/hooks.js', + 'hr_leave_dashboard/static/src/js/emp_org_chart.js', + 'hr_leave_dashboard/static/src/js/time_off_emp_card.js', + 'hr_leave_dashboard/static/src/js/time_off_emp_dashboard.js', + 'hr_leave_dashboard/static/src/xml/approval_status_card_templates.xml', + 'hr_leave_dashboard/static/src/xml/time_off_emp_dashboard_templates.xml', + 'hr_leave_dashboard/static/src/xml/emp_org_chart_templates.xml', + 'hr_leave_dashboard/static/src/xml/emp_department_card_templates.xml', + 'hr_leave_dashboard/static/src/xml/time_off_emp_card_templates.xml', + 'hr_leave_dashboard/static/src/css/hr_leave_dashboard.css', + 'hr_org_chart/static/src/fields/hr_org_chart.scss', + 'hr_leave_dashboard/static/src/scss/time_off_dashboard.scss', + 'hr_holidays/static/src/dashboard/time_off_card.scss', + 'hr_leave_dashboard/static/src/scss/calendar_renderer.scss' + ], + }, + 'images': ['static/description/banner.jpg'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/hr_leave_dashboard/doc/RELEASE_NOTES.md b/hr_leave_dashboard/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..372d9b167 --- /dev/null +++ b/hr_leave_dashboard/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 13.11.2024 +#### Version 18.0.1.0.0 +#### ADD + +- Initial Commit Hr Leave Dashboard diff --git a/hr_leave_dashboard/models/__init__.py b/hr_leave_dashboard/models/__init__.py new file mode 100644 index 000000000..7c2746cea --- /dev/null +++ b/hr_leave_dashboard/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Gayathri V(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from . import hr_employee +from . import hr_leave diff --git a/hr_leave_dashboard/models/hr_employee.py b/hr_leave_dashboard/models/hr_employee.py new file mode 100644 index 000000000..539628a4b --- /dev/null +++ b/hr_leave_dashboard/models/hr_employee.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Gayathri V (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from odoo import models + + +class HrEmployee(models.Model): + """Inherit the model hr.employee to add the functionality for retrieving + public holiday information""" + _inherit = 'hr.employee' + + def get_public_holidays(self, start_date, end_date): + """The function get_public_holidays takes in a start date and end + date as arguments and returns a dictionary with all the public + holidays within that range. It does this by calling the + _get_public_holidays method and then iterating through the results to + add each holiday to the dictionary.""" + all_days = {} + user = self or self.env.user.employee_id + public_holidays = user._get_public_holidays(start_date, end_date) + for holiday in public_holidays: + num_days = (holiday.date_to - holiday.date_from).days + for day in range(num_days + 1): + all_days[str(holiday.date_from.date())] = day + return all_days + + def _get_public_holidays(self, start_date, end_date): + """The _get_public_holidays function searches for public holidays + within a given date range, for all companies associated with the + current environment's user. It returns a recordset of + resource.calendar.leaves that match the search criteria.""" + public_holidays = self.env['resource.calendar.leaves'].search([ + ('date_from', '<=', end_date), + ('date_to', '>=', start_date), + ('resource_id', '=', False), + ('company_id', 'in', self.env.companies.ids), + ]) + return public_holidays diff --git a/hr_leave_dashboard/models/hr_leave.py b/hr_leave_dashboard/models/hr_leave.py new file mode 100644 index 000000000..070157575 --- /dev/null +++ b/hr_leave_dashboard/models/hr_leave.py @@ -0,0 +1,172 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Gayathri V(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +import pytz +from odoo import api, fields, models + + +class HrLeave(models.Model): + """Inherit the model hr.leave to introduce supplementary functionality + aimed at incorporating specific employee details.""" + _inherit = 'hr.leave' + + def _prepare_employee_data(self, employee): + """Function to prepare employee data for the dashboard""" + return { + 'id': employee.id, + 'name': employee.name, + 'job_id': employee.job_id.name, + 'approval_status_count': self.get_approval_status_count(employee.id) + } + + @api.model + def get_current_employee(self): + """This function fetches current employee details in a dictionary""" + current_employee = self.env.user.employee_ids + return { + 'id': current_employee.id, + 'name': current_employee.name, + 'job_id': current_employee.job_id.id, + 'image_1920': current_employee.image_1920, + 'work_email': current_employee.work_email, + 'work_phone': current_employee.work_phone, + 'resource_calendar_id': current_employee.resource_calendar_id.name, + 'link': '/mail/view?model=%s&res_id=%s' % ( + 'hr.employee.public', current_employee.id,), + 'department_id': current_employee.department_id.name, + 'company': current_employee.company_id.name, + 'job_position': current_employee.job_id.name, + 'parent_id': current_employee.parent_id.ids, + 'child_ids': current_employee.child_ids.ids, + 'child_all_count': current_employee.child_all_count, + 'manager': self._prepare_employee_data( + current_employee.parent_id) if ( + current_employee.parent_id) else {}, + 'manager_all_count': len(current_employee.parent_id.ids), + 'children': [self._prepare_employee_data(child) for child in + current_employee.child_ids if + child != current_employee], + } + + @api.model + def get_absentees(self): + """The function retrieves a list of employees who are absent on the + current date by querying the hr_leave table and comparing the + date_from and date_to fields of validated leave requests. It returns + a list of dictionaries containing the employee's name, employee_id, + date_from, and date_to""" + current_employee = self.env.user.employee_ids + children = [self._prepare_employee_data(child) for child in + current_employee.child_ids if + child != current_employee] + child_list = [child.get('id') for child in children] + if len(child_list) > 1: + query = "SELECT employee_id,name,date_from,date_to FROM hr_leave " \ + "INNER JOIN hr_employee ON hr_leave.employee_id = " \ + "hr_employee.id WHERE state = 'validate' AND " \ + "employee_id in %s" % str(tuple(child_list)) + self._cr.execute(query) + elif len(child_list) == 1: + query = "SELECT employee_id,name,date_from,date_to FROM hr_leave " \ + "INNER JOIN hr_employee ON hr_leave.employee_id = " \ + "hr_employee.id WHERE state = 'validate' AND " \ + "employee_id = %s" % child_list[0] + self._cr.execute(query) + leave = self._cr.dictfetchall() + absentees = [ + leave[leave_date] for leave_date in range(len(leave)) + if leave[leave_date].get('date_from') <= fields.datetime.now() <= leave[ + leave_date].get('date_to') + ] + return absentees + + @api.model + def get_current_shift(self): + """ This function fetches current employee's current shift""" + current_employee = self.env.user.employee_ids + employee_tz = current_employee.tz or self.env.context.get('tz') + employee_pytz = pytz.timezone(employee_tz) if employee_tz else pytz.utc + employee_datetime = fields.datetime.now().astimezone(employee_pytz) + hour = employee_datetime.strftime("%H") + minute = employee_datetime.strftime("%M") + day = employee_datetime.strftime("%A") + time = hour + '.' + minute + day_num = '0' if day == 'Monday' else '1' if day == 'Tuesday' \ + else '2' if day == 'Wednesday' else '3' if day == 'Thursday' \ + else '4' if day == 'Friday' else '5' if day == 'Saturday' else '6' + for shift in current_employee.resource_calendar_id.attendance_ids: + if shift.dayofweek == day_num and shift.hour_from <= float( + time) <= shift.hour_to: + return shift.name + return False + + @api.model + def get_upcoming_holidays(self): + """ This function fetches upcoming holidays""" + current_employee = self.env.user.employee_ids + employee_tz = current_employee.tz or self.env.context.get('tz') + employee_pytz = pytz.timezone(employee_tz) if employee_tz else pytz.utc + employee_datetime = fields.datetime.now().astimezone(employee_pytz) + query = "SELECT * FROM public.resource_calendar_leaves WHERE " \ + "resource_id is null" + self._cr.execute(query) + holidays = self._cr.dictfetchall() + upcoming_holidays = [holiday for holiday in holidays if + employee_datetime.date() < holiday.get( + 'date_to').date()] + return upcoming_holidays + + @api.model + def get_approval_status_count(self, current_employee): + """ This function fetches approval status count""" + return { + 'validate_count': self.env['hr.leave'].search_count([ + ('employee_id', '=', current_employee), + ('state', '=', 'validate') + ]), + 'confirm_count': self.env['hr.leave'].search_count([ + ('employee_id', '=', current_employee), + ('state', '=', 'confirm') + ]), + 'refuse_count': self.env['hr.leave'].search_count([ + ('employee_id', '=', current_employee), + ('state', '=', 'refuse') + ]) + } + + @api.model + def get_all_validated_leaves(self): + """ This function fetches all validated leaves""" + leaves = self.env['hr.leave'].search([('state', '=', 'validate')]) + all_validated_leaves = [ + { + 'id': leave.id, + 'employee_id': leave.employee_id.id, + 'employee_name': leave.employee_id.name, + 'request_date_from': leave.request_date_from, + 'request_date_to': leave.request_date_to, + 'leave_type_id': leave.holiday_status_id.id, + 'leave_type': leave.holiday_status_id.name, + 'number_of_days': leave.number_of_days + } + for leave in leaves + ] + return all_validated_leaves diff --git a/hr_leave_dashboard/report/__init__.py b/hr_leave_dashboard/report/__init__.py new file mode 100644 index 000000000..46fb2a8d0 --- /dev/null +++ b/hr_leave_dashboard/report/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Jumana Haseen (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from . import hr_leave_report diff --git a/hr_leave_dashboard/report/hr_leave_report.py b/hr_leave_dashboard/report/hr_leave_report.py new file mode 100644 index 000000000..da8a33fcb --- /dev/null +++ b/hr_leave_dashboard/report/hr_leave_report.py @@ -0,0 +1,108 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Jumana Haseen (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from datetime import timedelta +from odoo import api, fields, models +from odoo.tools import date_utils + + +class HrLeaveReport(models.AbstractModel): + """Model for the dashboard for viewing the employees leave""" + _name = 'report.hr_leave_dashboard.hr_leave_report' + _description = 'HR Leave Report' + + @api.model + def _get_report_values(self, docids, data=None): + """Function for getting the report values""" + today = fields.Date.today() + if data.get('duration') == 'this_month': + start_of_month = date_utils.start_of(today, 'month') + end_of_month = date_utils.end_of(today, 'month') - timedelta(days=1) + option = self.generate_date_range(start_of_month, end_of_month) + elif data.get('duration') == 'this_year': + start_of_year = date_utils.start_of(today, 'year') + end_of_year = date_utils.end_of(today, 'year') - timedelta(days=1) + option = self.generate_date_range(start_of_year, end_of_year) + elif data.get('duration') == 'this_week': + start_of_week = date_utils.start_of(today, 'week') + end_of_week = date_utils.end_of(today, 'week') + option = self.generate_date_range(start_of_week, end_of_week) + else: + option = [str(today)] + + if not self.env.user.employee_ids.child_ids: + query = """SELECT l.id, lt.id as hr_leave_type_id, e.id as + emp_id, e.name as emp_name, e.department_id as emp_department, + e.parent_id as emp_parent_id, request_date_from, request_date_to, + l.number_of_days, lt.name ::jsonb->> 'en_US' as leave_type, + SUM(al.number_of_days) AS allocated_days, SUM(CASE WHEN l.state = + 'validate' THEN l.number_of_days ELSE 0 END) AS taken_days, + SUM(al.number_of_days) - SUM(CASE WHEN l.state = 'validate' THEN + l.number_of_days ELSE 0 END) AS balance_days FROM hr_employee e + inner join hr_leave_allocation al ON al.employee_id = e.id inner + join hr_leave l on l.employee_id = e.id inner join hr_leave_type + lt on l.holiday_status_id = lt.id WHERE l.state = 'validate' AND + e.department_id = '%s' GROUP BY e.id,lt.id,l.id""" % \ + self.env.user.employee_ids.department_id.id + else: + query = """SELECT l.id, lt.id as hr_leave_type_id, e.id as + emp_id, e.name as emp_name, e.department_id as emp_department, + e.parent_id as emp_parent_id, request_date_from, request_date_to, + l.number_of_days, lt.name ::jsonb->> 'en_US' as leave_type, + SUM(al.number_of_days) AS allocated_days, SUM(CASE WHEN l.state = + 'validate' THEN l.number_of_days ELSE 0 END) AS taken_days, + SUM(al.number_of_days) - SUM(CASE WHEN l.state = 'validate' THEN + l.number_of_days ELSE 0 END) AS balance_days FROM hr_employee e + inner join hr_leave_allocation al ON al.employee_id = e.id inner + join hr_leave l on l.employee_id = e.id inner join hr_leave_type + lt on l.holiday_status_id = lt.id WHERE l.state = 'validate' + GROUP BY e.id,lt.id,l.id""" + + self.env.cr.execute(query) + leave_data = self.env.cr.dictfetchall() + filtered_list = [] + filtered_tuple = [] + for leave in leave_data: + leave_list = self.generate_date_range(leave.get('request_date_from'), + leave.get('request_date_to') - timedelta(days=1)) + for date in leave_list: + if date in option: + filtered_list.append(leave) + break + for leave in filtered_list: + if (leave.get('hr_leave_type_id'), leave.get('emp_id')) in filtered_tuple: + filtered_list.remove(leave) + else: + filtered_tuple.append( + (leave.get('hr_leave_type_id'), leave.get('emp_id'))) + return { + 'duration': data.get('duration'), + 'filtered_list': filtered_list, + } + + def generate_date_range(self, start_date, end_date): + """Generate a list of dates within the given range""" + date_list = [] + current_date = start_date + while current_date <= end_date: + date_list.append(current_date.strftime("%Y-%m-%d")) + current_date += timedelta(days=1) + return date_list diff --git a/hr_leave_dashboard/report/hr_leave_report_templates.xml b/hr_leave_dashboard/report/hr_leave_report_templates.xml new file mode 100644 index 000000000..0c85ee162 --- /dev/null +++ b/hr_leave_dashboard/report/hr_leave_report_templates.xml @@ -0,0 +1,89 @@ + + + + + diff --git a/hr_leave_dashboard/report/hr_leave_reports.xml b/hr_leave_dashboard/report/hr_leave_reports.xml new file mode 100644 index 000000000..a7e32cc9f --- /dev/null +++ b/hr_leave_dashboard/report/hr_leave_reports.xml @@ -0,0 +1,11 @@ + + + + + Leave report + hr.leave.report + qweb-pdf + hr_leave_dashboard.hr_leave_report + hr_leave_dashboard.hr_leave_report + + diff --git a/hr_leave_dashboard/static/description/assets/cybro-icon.png b/hr_leave_dashboard/static/description/assets/cybro-icon.png new file mode 100644 index 000000000..06e73e11d Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/cybro-icon.png differ diff --git a/hr_leave_dashboard/static/description/assets/cybro-odoo.png b/hr_leave_dashboard/static/description/assets/cybro-odoo.png new file mode 100644 index 000000000..ed02e07a4 Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/cybro-odoo.png differ diff --git a/hr_leave_dashboard/static/description/assets/icons/arrows-repeat.svg b/hr_leave_dashboard/static/description/assets/icons/arrows-repeat.svg new file mode 100644 index 000000000..1d7efabc5 --- /dev/null +++ b/hr_leave_dashboard/static/description/assets/icons/arrows-repeat.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/hr_leave_dashboard/static/description/assets/icons/banner-1.png b/hr_leave_dashboard/static/description/assets/icons/banner-1.png new file mode 100644 index 000000000..c180db172 Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/icons/banner-1.png differ diff --git a/hr_leave_dashboard/static/description/assets/icons/banner-2.svg b/hr_leave_dashboard/static/description/assets/icons/banner-2.svg new file mode 100644 index 000000000..e606d97d9 --- /dev/null +++ b/hr_leave_dashboard/static/description/assets/icons/banner-2.svg @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/hr_leave_dashboard/static/description/assets/icons/banner-bg.png b/hr_leave_dashboard/static/description/assets/icons/banner-bg.png new file mode 100644 index 000000000..a8238d3c0 Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/icons/banner-bg.png differ diff --git a/hr_leave_dashboard/static/description/assets/icons/banner-bg.svg b/hr_leave_dashboard/static/description/assets/icons/banner-bg.svg new file mode 100644 index 000000000..b1378103e --- /dev/null +++ b/hr_leave_dashboard/static/description/assets/icons/banner-bg.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/hr_leave_dashboard/static/description/assets/icons/banner-call.svg b/hr_leave_dashboard/static/description/assets/icons/banner-call.svg new file mode 100644 index 000000000..96c687e81 --- /dev/null +++ b/hr_leave_dashboard/static/description/assets/icons/banner-call.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/hr_leave_dashboard/static/description/assets/icons/banner-mail.svg b/hr_leave_dashboard/static/description/assets/icons/banner-mail.svg new file mode 100644 index 000000000..cbf0d158d --- /dev/null +++ b/hr_leave_dashboard/static/description/assets/icons/banner-mail.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/hr_leave_dashboard/static/description/assets/icons/banner-pattern.svg b/hr_leave_dashboard/static/description/assets/icons/banner-pattern.svg new file mode 100644 index 000000000..9c1c7e101 --- /dev/null +++ b/hr_leave_dashboard/static/description/assets/icons/banner-pattern.svg @@ -0,0 +1,343 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/hr_leave_dashboard/static/description/assets/icons/banner-promo.svg b/hr_leave_dashboard/static/description/assets/icons/banner-promo.svg new file mode 100644 index 000000000..d52791b11 --- /dev/null +++ b/hr_leave_dashboard/static/description/assets/icons/banner-promo.svg @@ -0,0 +1,147 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/hr_leave_dashboard/static/description/assets/icons/brand-pair.svg b/hr_leave_dashboard/static/description/assets/icons/brand-pair.svg new file mode 100644 index 000000000..d8db7fc1e --- /dev/null +++ b/hr_leave_dashboard/static/description/assets/icons/brand-pair.svg @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/hr_leave_dashboard/static/description/assets/icons/capture (1).png b/hr_leave_dashboard/static/description/assets/icons/capture (1).png new file mode 100644 index 000000000..8824deafc Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/icons/capture (1).png differ diff --git a/hr_leave_dashboard/static/description/assets/icons/check.png b/hr_leave_dashboard/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/icons/check.png differ diff --git a/hr_leave_dashboard/static/description/assets/icons/chevron.png b/hr_leave_dashboard/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/icons/chevron.png differ diff --git a/hr_leave_dashboard/static/description/assets/icons/close-icon.svg b/hr_leave_dashboard/static/description/assets/icons/close-icon.svg new file mode 100644 index 000000000..df8cce37a --- /dev/null +++ b/hr_leave_dashboard/static/description/assets/icons/close-icon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/hr_leave_dashboard/static/description/assets/icons/cogs.png b/hr_leave_dashboard/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/icons/cogs.png differ diff --git a/hr_leave_dashboard/static/description/assets/icons/collabarate-icon.svg b/hr_leave_dashboard/static/description/assets/icons/collabarate-icon.svg new file mode 100644 index 000000000..dd4e10518 --- /dev/null +++ b/hr_leave_dashboard/static/description/assets/icons/collabarate-icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/hr_leave_dashboard/static/description/assets/icons/consultation.png b/hr_leave_dashboard/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/icons/consultation.png differ diff --git a/hr_leave_dashboard/static/description/assets/icons/cybro-logo.png b/hr_leave_dashboard/static/description/assets/icons/cybro-logo.png new file mode 100644 index 000000000..ff4b78220 Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/icons/cybro-logo.png differ diff --git a/hr_leave_dashboard/static/description/assets/icons/down.svg b/hr_leave_dashboard/static/description/assets/icons/down.svg new file mode 100644 index 000000000..f21c36271 --- /dev/null +++ b/hr_leave_dashboard/static/description/assets/icons/down.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/hr_leave_dashboard/static/description/assets/icons/ecom-black.png b/hr_leave_dashboard/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/icons/ecom-black.png differ diff --git a/hr_leave_dashboard/static/description/assets/icons/education-black.png b/hr_leave_dashboard/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/icons/education-black.png differ diff --git a/hr_leave_dashboard/static/description/assets/icons/faq.png b/hr_leave_dashboard/static/description/assets/icons/faq.png new file mode 100644 index 000000000..4250b5b81 Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/icons/faq.png differ diff --git a/hr_leave_dashboard/static/description/assets/icons/feature-icon.svg b/hr_leave_dashboard/static/description/assets/icons/feature-icon.svg new file mode 100644 index 000000000..fa0ea6850 --- /dev/null +++ b/hr_leave_dashboard/static/description/assets/icons/feature-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/hr_leave_dashboard/static/description/assets/icons/feature.png b/hr_leave_dashboard/static/description/assets/icons/feature.png new file mode 100644 index 000000000..ac7a785c0 Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/icons/feature.png differ diff --git a/hr_leave_dashboard/static/description/assets/icons/gear.svg b/hr_leave_dashboard/static/description/assets/icons/gear.svg new file mode 100644 index 000000000..0cc66b6ea --- /dev/null +++ b/hr_leave_dashboard/static/description/assets/icons/gear.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/hr_leave_dashboard/static/description/assets/icons/hero.gif b/hr_leave_dashboard/static/description/assets/icons/hero.gif new file mode 100644 index 000000000..241dd6a01 Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/icons/hero.gif differ diff --git a/hr_leave_dashboard/static/description/assets/icons/hire-odoo.svg b/hr_leave_dashboard/static/description/assets/icons/hire-odoo.svg new file mode 100644 index 000000000..e1ac089b0 --- /dev/null +++ b/hr_leave_dashboard/static/description/assets/icons/hire-odoo.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/hr_leave_dashboard/static/description/assets/icons/hotel-black.png b/hr_leave_dashboard/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/icons/hotel-black.png differ diff --git a/hr_leave_dashboard/static/description/assets/icons/img.png b/hr_leave_dashboard/static/description/assets/icons/img.png new file mode 100644 index 000000000..70197f477 Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/icons/img.png differ diff --git a/hr_leave_dashboard/static/description/assets/icons/license.png b/hr_leave_dashboard/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/icons/license.png differ diff --git a/hr_leave_dashboard/static/description/assets/icons/life-ring-icon.svg b/hr_leave_dashboard/static/description/assets/icons/life-ring-icon.svg new file mode 100644 index 000000000..3ae6e1d89 --- /dev/null +++ b/hr_leave_dashboard/static/description/assets/icons/life-ring-icon.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/hr_leave_dashboard/static/description/assets/icons/lifebuoy.png b/hr_leave_dashboard/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/icons/lifebuoy.png differ diff --git a/hr_leave_dashboard/static/description/assets/icons/mail.svg b/hr_leave_dashboard/static/description/assets/icons/mail.svg new file mode 100644 index 000000000..1eedde695 --- /dev/null +++ b/hr_leave_dashboard/static/description/assets/icons/mail.svg @@ -0,0 +1,3 @@ + + + diff --git a/hr_leave_dashboard/static/description/assets/icons/manufacturing-black.png b/hr_leave_dashboard/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/icons/manufacturing-black.png differ diff --git a/hr_leave_dashboard/static/description/assets/icons/notes.png b/hr_leave_dashboard/static/description/assets/icons/notes.png new file mode 100644 index 000000000..ee5e95404 Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/icons/notes.png differ diff --git a/hr_leave_dashboard/static/description/assets/icons/notification icon.svg b/hr_leave_dashboard/static/description/assets/icons/notification icon.svg new file mode 100644 index 000000000..053189973 --- /dev/null +++ b/hr_leave_dashboard/static/description/assets/icons/notification icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/hr_leave_dashboard/static/description/assets/icons/odoo-consultancy.svg b/hr_leave_dashboard/static/description/assets/icons/odoo-consultancy.svg new file mode 100644 index 000000000..e05f65bde --- /dev/null +++ b/hr_leave_dashboard/static/description/assets/icons/odoo-consultancy.svg @@ -0,0 +1,4 @@ + + + + diff --git a/hr_leave_dashboard/static/description/assets/icons/odoo-licencing.svg b/hr_leave_dashboard/static/description/assets/icons/odoo-licencing.svg new file mode 100644 index 000000000..2606c88b0 --- /dev/null +++ b/hr_leave_dashboard/static/description/assets/icons/odoo-licencing.svg @@ -0,0 +1,3 @@ + + + diff --git a/hr_leave_dashboard/static/description/assets/icons/odoo-logo.png b/hr_leave_dashboard/static/description/assets/icons/odoo-logo.png new file mode 100644 index 000000000..0e4d0eb5a Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/icons/odoo-logo.png differ diff --git a/hr_leave_dashboard/static/description/assets/icons/patter.svg b/hr_leave_dashboard/static/description/assets/icons/patter.svg new file mode 100644 index 000000000..25c9c0a8f --- /dev/null +++ b/hr_leave_dashboard/static/description/assets/icons/patter.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/hr_leave_dashboard/static/description/assets/icons/pattern1.png b/hr_leave_dashboard/static/description/assets/icons/pattern1.png new file mode 100644 index 000000000..09ab0fb2d Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/icons/pattern1.png differ diff --git a/hr_leave_dashboard/static/description/assets/icons/photo-capture.png b/hr_leave_dashboard/static/description/assets/icons/photo-capture.png new file mode 100644 index 000000000..06c111758 Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/icons/photo-capture.png differ diff --git a/hr_leave_dashboard/static/description/assets/icons/pos-black.png b/hr_leave_dashboard/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/icons/pos-black.png differ diff --git a/hr_leave_dashboard/static/description/assets/icons/puzzle-piece-icon.svg b/hr_leave_dashboard/static/description/assets/icons/puzzle-piece-icon.svg new file mode 100644 index 000000000..3e9ad9373 --- /dev/null +++ b/hr_leave_dashboard/static/description/assets/icons/puzzle-piece-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/hr_leave_dashboard/static/description/assets/icons/puzzle.png b/hr_leave_dashboard/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/icons/puzzle.png differ diff --git a/hr_leave_dashboard/static/description/assets/icons/replace-icon.svg b/hr_leave_dashboard/static/description/assets/icons/replace-icon.svg new file mode 100644 index 000000000..d0e3a7af1 --- /dev/null +++ b/hr_leave_dashboard/static/description/assets/icons/replace-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/hr_leave_dashboard/static/description/assets/icons/restaurant-black.png b/hr_leave_dashboard/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/icons/restaurant-black.png differ diff --git a/hr_leave_dashboard/static/description/assets/icons/screenshot-main.png b/hr_leave_dashboard/static/description/assets/icons/screenshot-main.png new file mode 100644 index 000000000..575f8e676 Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/icons/screenshot-main.png differ diff --git a/hr_leave_dashboard/static/description/assets/icons/screenshot.png b/hr_leave_dashboard/static/description/assets/icons/screenshot.png new file mode 100644 index 000000000..cef272529 Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/icons/screenshot.png differ diff --git a/hr_leave_dashboard/static/description/assets/icons/service-black.png b/hr_leave_dashboard/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/icons/service-black.png differ diff --git a/hr_leave_dashboard/static/description/assets/icons/skype-fill.svg b/hr_leave_dashboard/static/description/assets/icons/skype-fill.svg new file mode 100644 index 000000000..c17423639 --- /dev/null +++ b/hr_leave_dashboard/static/description/assets/icons/skype-fill.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/hr_leave_dashboard/static/description/assets/icons/skype.png b/hr_leave_dashboard/static/description/assets/icons/skype.png new file mode 100644 index 000000000..51b409fb3 Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/icons/skype.png differ diff --git a/hr_leave_dashboard/static/description/assets/icons/skype.svg b/hr_leave_dashboard/static/description/assets/icons/skype.svg new file mode 100644 index 000000000..df3dad39b --- /dev/null +++ b/hr_leave_dashboard/static/description/assets/icons/skype.svg @@ -0,0 +1,3 @@ + + + diff --git a/hr_leave_dashboard/static/description/assets/icons/star-1.svg b/hr_leave_dashboard/static/description/assets/icons/star-1.svg new file mode 100644 index 000000000..7e55ab162 --- /dev/null +++ b/hr_leave_dashboard/static/description/assets/icons/star-1.svg @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/hr_leave_dashboard/static/description/assets/icons/star-2.svg b/hr_leave_dashboard/static/description/assets/icons/star-2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/hr_leave_dashboard/static/description/assets/icons/star-2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/hr_leave_dashboard/static/description/assets/icons/support.png b/hr_leave_dashboard/static/description/assets/icons/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/icons/support.png differ diff --git a/hr_leave_dashboard/static/description/assets/icons/test-1 - Copy.png b/hr_leave_dashboard/static/description/assets/icons/test-1 - Copy.png new file mode 100644 index 000000000..f6a902663 Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/icons/test-1 - Copy.png differ diff --git a/hr_leave_dashboard/static/description/assets/icons/test-1.png b/hr_leave_dashboard/static/description/assets/icons/test-1.png new file mode 100644 index 000000000..0908add2b Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/icons/test-1.png differ diff --git a/hr_leave_dashboard/static/description/assets/icons/test-2.png b/hr_leave_dashboard/static/description/assets/icons/test-2.png new file mode 100644 index 000000000..4671fe91e Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/icons/test-2.png differ diff --git a/hr_leave_dashboard/static/description/assets/icons/trading-black.png b/hr_leave_dashboard/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/icons/trading-black.png differ diff --git a/hr_leave_dashboard/static/description/assets/icons/training.png b/hr_leave_dashboard/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/icons/training.png differ diff --git a/hr_leave_dashboard/static/description/assets/icons/translate.svg b/hr_leave_dashboard/static/description/assets/icons/translate.svg new file mode 100644 index 000000000..af9c8a1aa --- /dev/null +++ b/hr_leave_dashboard/static/description/assets/icons/translate.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/hr_leave_dashboard/static/description/assets/icons/update.png b/hr_leave_dashboard/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/icons/update.png differ diff --git a/hr_leave_dashboard/static/description/assets/icons/user.png b/hr_leave_dashboard/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/icons/user.png differ diff --git a/hr_leave_dashboard/static/description/assets/icons/video.png b/hr_leave_dashboard/static/description/assets/icons/video.png new file mode 100644 index 000000000..576705b17 Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/icons/video.png differ diff --git a/hr_leave_dashboard/static/description/assets/icons/whatsapp.png b/hr_leave_dashboard/static/description/assets/icons/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/icons/whatsapp.png differ diff --git a/hr_leave_dashboard/static/description/assets/icons/wrench-icon.svg b/hr_leave_dashboard/static/description/assets/icons/wrench-icon.svg new file mode 100644 index 000000000..174b5a465 --- /dev/null +++ b/hr_leave_dashboard/static/description/assets/icons/wrench-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/hr_leave_dashboard/static/description/assets/icons/wrench.png b/hr_leave_dashboard/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/icons/wrench.png differ diff --git a/hr_leave_dashboard/static/description/assets/misc/Cybrosys R.png b/hr_leave_dashboard/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/misc/Cybrosys R.png differ diff --git a/hr_leave_dashboard/static/description/assets/misc/email.svg b/hr_leave_dashboard/static/description/assets/misc/email.svg new file mode 100644 index 000000000..15291cdc3 --- /dev/null +++ b/hr_leave_dashboard/static/description/assets/misc/email.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/hr_leave_dashboard/static/description/assets/misc/logo-horizontal (1).png b/hr_leave_dashboard/static/description/assets/misc/logo-horizontal (1).png new file mode 100644 index 000000000..e64152348 Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/misc/logo-horizontal (1).png differ diff --git a/hr_leave_dashboard/static/description/assets/misc/phone.svg b/hr_leave_dashboard/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/hr_leave_dashboard/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/hr_leave_dashboard/static/description/assets/misc/star (1) 2.svg b/hr_leave_dashboard/static/description/assets/misc/star (1) 2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/hr_leave_dashboard/static/description/assets/misc/star (1) 2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/hr_leave_dashboard/static/description/assets/misc/support (1) 1.svg b/hr_leave_dashboard/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/hr_leave_dashboard/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/hr_leave_dashboard/static/description/assets/misc/support-email.svg b/hr_leave_dashboard/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/hr_leave_dashboard/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/hr_leave_dashboard/static/description/assets/misc/tick-mark.svg b/hr_leave_dashboard/static/description/assets/misc/tick-mark.svg new file mode 100644 index 000000000..2dbb40187 --- /dev/null +++ b/hr_leave_dashboard/static/description/assets/misc/tick-mark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/hr_leave_dashboard/static/description/assets/misc/whatsapp 1.svg b/hr_leave_dashboard/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/hr_leave_dashboard/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/hr_leave_dashboard/static/description/assets/misc/whatsapp.svg b/hr_leave_dashboard/static/description/assets/misc/whatsapp.svg new file mode 100644 index 000000000..b618aea1d --- /dev/null +++ b/hr_leave_dashboard/static/description/assets/misc/whatsapp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/hr_leave_dashboard/static/description/assets/modules/1.gif b/hr_leave_dashboard/static/description/assets/modules/1.gif new file mode 100644 index 000000000..ae3a880a2 Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/modules/1.gif differ diff --git a/hr_leave_dashboard/static/description/assets/modules/1.jpg b/hr_leave_dashboard/static/description/assets/modules/1.jpg new file mode 100644 index 000000000..08bbafeb6 Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/modules/1.jpg differ diff --git a/hr_leave_dashboard/static/description/assets/modules/1.png b/hr_leave_dashboard/static/description/assets/modules/1.png new file mode 100644 index 000000000..000ef5949 Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/modules/1.png differ diff --git a/hr_leave_dashboard/static/description/assets/modules/2.gif b/hr_leave_dashboard/static/description/assets/modules/2.gif new file mode 100644 index 000000000..d19e2b352 Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/modules/2.gif differ diff --git a/hr_leave_dashboard/static/description/assets/modules/2.png b/hr_leave_dashboard/static/description/assets/modules/2.png new file mode 100644 index 000000000..a1209a01f Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/modules/2.png differ diff --git a/hr_leave_dashboard/static/description/assets/modules/3.jpg b/hr_leave_dashboard/static/description/assets/modules/3.jpg new file mode 100644 index 000000000..3d171226b Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/modules/3.jpg differ diff --git a/hr_leave_dashboard/static/description/assets/modules/3.png b/hr_leave_dashboard/static/description/assets/modules/3.png new file mode 100644 index 000000000..8513873ea Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/modules/3.png differ diff --git a/hr_leave_dashboard/static/description/assets/modules/4.jpg b/hr_leave_dashboard/static/description/assets/modules/4.jpg new file mode 100644 index 000000000..1f3f2e27f Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/modules/4.jpg differ diff --git a/hr_leave_dashboard/static/description/assets/modules/4.png b/hr_leave_dashboard/static/description/assets/modules/4.png new file mode 100644 index 000000000..3bedf7981 Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/modules/4.png differ diff --git a/hr_leave_dashboard/static/description/assets/modules/5.jpg b/hr_leave_dashboard/static/description/assets/modules/5.jpg new file mode 100644 index 000000000..0db717519 Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/modules/5.jpg differ diff --git a/hr_leave_dashboard/static/description/assets/modules/5.png b/hr_leave_dashboard/static/description/assets/modules/5.png new file mode 100644 index 000000000..0e311ca87 Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/modules/5.png differ diff --git a/hr_leave_dashboard/static/description/assets/modules/6.jpg b/hr_leave_dashboard/static/description/assets/modules/6.jpg new file mode 100644 index 000000000..67c7f7062 Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/modules/6.jpg differ diff --git a/hr_leave_dashboard/static/description/assets/modules/6.png b/hr_leave_dashboard/static/description/assets/modules/6.png new file mode 100644 index 000000000..f808106b9 Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/modules/6.png differ diff --git a/hr_leave_dashboard/static/description/assets/modules/dashboard_pos.jpg b/hr_leave_dashboard/static/description/assets/modules/dashboard_pos.jpg new file mode 100644 index 000000000..2c258bc8d Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/modules/dashboard_pos.jpg differ diff --git a/hr_leave_dashboard/static/description/assets/modules/dynamic_accounts_report.jpg b/hr_leave_dashboard/static/description/assets/modules/dynamic_accounts_report.jpg new file mode 100644 index 000000000..b967912c5 Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/modules/dynamic_accounts_report.jpg differ diff --git a/hr_leave_dashboard/static/description/assets/modules/hr_payroll_community.jpg b/hr_leave_dashboard/static/description/assets/modules/hr_payroll_community.jpg new file mode 100644 index 000000000..2c2b887f1 Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/modules/hr_payroll_community.jpg differ diff --git a/hr_leave_dashboard/static/description/assets/modules/invoice_format_editor.jpg b/hr_leave_dashboard/static/description/assets/modules/invoice_format_editor.jpg new file mode 100644 index 000000000..606ce2051 Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/modules/invoice_format_editor.jpg differ diff --git a/hr_leave_dashboard/static/description/assets/modules/pos_greetings.jpg b/hr_leave_dashboard/static/description/assets/modules/pos_greetings.jpg new file mode 100644 index 000000000..d9dd6d429 Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/modules/pos_greetings.jpg differ diff --git a/hr_leave_dashboard/static/description/assets/modules/pos_order_line_image.jpg b/hr_leave_dashboard/static/description/assets/modules/pos_order_line_image.jpg new file mode 100644 index 000000000..4d3d30f4d Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/modules/pos_order_line_image.jpg differ diff --git a/hr_leave_dashboard/static/description/assets/screenshots/1.png b/hr_leave_dashboard/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..4d0a58dd9 Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/screenshots/1.png differ diff --git a/hr_leave_dashboard/static/description/assets/screenshots/2.png b/hr_leave_dashboard/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..515dbcd16 Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/screenshots/2.png differ diff --git a/hr_leave_dashboard/static/description/assets/screenshots/3.png b/hr_leave_dashboard/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..e23ad3006 Binary files /dev/null and b/hr_leave_dashboard/static/description/assets/screenshots/3.png differ diff --git a/hr_leave_dashboard/static/description/banner.jpg b/hr_leave_dashboard/static/description/banner.jpg new file mode 100644 index 000000000..e4022da3b Binary files /dev/null and b/hr_leave_dashboard/static/description/banner.jpg differ diff --git a/hr_leave_dashboard/static/description/icon.png b/hr_leave_dashboard/static/description/icon.png new file mode 100644 index 000000000..29258135b Binary files /dev/null and b/hr_leave_dashboard/static/description/icon.png differ diff --git a/hr_leave_dashboard/static/description/index.html b/hr_leave_dashboard/static/description/index.html new file mode 100644 index 000000000..b0be7cbff --- /dev/null +++ b/hr_leave_dashboard/static/description/index.html @@ -0,0 +1,942 @@ + + + + + + Hr Leave Dashboard + + + + + + + + + + +
+
+ + + +
+
+ Community +
+
+ Enterprise +
+
+
+ +
+
+
+
+

+ This Module Helps You to View Your and Your + Subordinate's Details. +

+

+ Hr Leave Dashboard +

+
+
+ +
+ +
+ +
+
+
+ +
+
+ +
+
+ +
+
+
+

Key + Highlights

+
+
+
+
+ +
+
+ View your and your subordinate's details and + approval status of your all employees.. +
+
+
+
+
+
+ +
+
+ Print hr leave report on basis of today, + this week, this month and this year in pdf + format.
+
+
+
+
+ +
+
+
+ Hr Leave Dashboard +

+ Are you ready to make your business more + organized? +
Improve now! +

+ +
+
+ +
+
+
+ + + + +
+
+ +
+
+
+
+ acc_bg +
+ +
+
+
+
+

+ HR Leave + + Dashboard +

+
+
+
+ +
+
+
+
+
+
+
+
+
+

+ Select The + Filter +

+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+

+ HR Leave PDF + Report +

+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+ +
+

+ View your and your subordinate's + details and approval status of + your all employees. +

+
+ +
+
+
+
+
+
+ +
+

+ Print hr leave report on basis + of today, this week, this month + and this year in pdf format.

+
+
+
+
+
+
+
+
+
+
+ +
+ +
+ +
+

+ The HR Leave Dashboard module provides a centralized dashboard for managing employee leave requests and balances. It allows HR managers and employees to easily view leave statuses, track leave allocations, and monitor remaining leave days. +

+
+
+ +
+ +
+

+ Yes, employees can submit leave requests directly from the dashboard. They can select the leave type, specify the dates, and add any necessary comments. Once submitted, requests go to the manager for approval. +

+
+
+ +
+ +
+

+ Yes, the dashboard shows each employee’s leave balance, including total allocated days, used days, and remaining days. This helps employees and managers keep track of available leave and plan accordingly. +

+
+
+
+ +
+
+
+
+
+
+ +
+
+

+ Latest Release 18.0.1.0.0 +

+ + 13th November, 2024 + +
+
+
+
+
+ Add +
+
+
+
    +
  • + Initial Commit +
  • + +
+
+
+
+
+
+
+
+
+
+ + + +
+

+ Related Products +

+ +
+ + +
+

+ Our Services

+ +
+ +
+
+ .... +
+
+ +
+ + +
+
+ + + + + + diff --git a/hr_leave_dashboard/static/src/css/hr_leave_dashboard.css b/hr_leave_dashboard/static/src/css/hr_leave_dashboard.css new file mode 100644 index 000000000..90fe352bc --- /dev/null +++ b/hr_leave_dashboard/static/src/css/hr_leave_dashboard.css @@ -0,0 +1,91 @@ +td.fc-day.fc-widget-content.fc-public-holiday{ + background-color:red !important; +} + +td.fc-day.fc-day-sat{ + background-color:red !important; +} +td.fc-day.fc-day-sun{ + background-color:red !important; +} +.holidaay{ +display :none !important; +} +.o_timeoff_duration{ + margin-top:12px !important; +} +.employee_details{ + font-size:12px !important; + margin-top: 12px; + margin-bottom: 12px; +} +.o_timeoff_card:not(:last-child) { + font-size: 12px !important; + padding: 12px !important; + position:relative; +} +.o_timeoff_card .o_timeoff_duration{ + margin-bottom:12px !important; +} +.o_treeEntry:before, .o_treeEntry:after{ + background: #7a539e !important; +} +.duration{ + width: 190px; + float: left; + margin: 1px 2px 0px 10px; + height: 29px; + padding: 5px; + margin-bottom: 21px; +} +.time_off_dashboard_table tr th{ + background-color: #eaeef3 !important; + font-size: 11px; +} +.employee_image{ + border-radius: 50%; + width: 50px; + height: 50px; + overflow: hidden; + position: relative; +} +.employee_name{ + font-size: 16px !important; + width: 165px; + /* position: absolute; */ + right:62px; + top:24px; +} +.employee_box{ + display:flex; + justify-content:center; + align-items:center; +} +.divider-box{ +float: left; + margin-bottom: 12px; + text-align: center; + display: flex; + align-items: center; + justify-content: center; +} +.box-content{ +width: 100%; + margin-right: 2px; + padding: 10px; + display: flex; + align-items: center; + justify-content: center; + height: 80px; + margin-top: 0px; + border: 1px solid #cebce1; + background-color: #eaedf3; + color: #573674; +} +.divide-leave{ +padding:10px; +border: 1px solid #cebce1; +background-color: #eaedf3; +color: #573674; +margin-top:10px; +} diff --git a/hr_leave_dashboard/static/src/js/calendar_model.js b/hr_leave_dashboard/static/src/js/calendar_model.js new file mode 100644 index 000000000..c96aab05b --- /dev/null +++ b/hr_leave_dashboard/static/src/js/calendar_model.js @@ -0,0 +1,31 @@ +/** @odoo-module */ +import { TimeOffCalendarModel } from '@hr_holidays/views/calendar/calendar_model'; +import { serializeDate } from "@web/core/l10n/dates"; +import { patch } from "@web/core/utils/patch"; +//The patch function to modify the TimeOffCalendarModel prototype by adding or +//modifying several methods and properties: setup, updateData, +//fetchPublicHolidays, and a getter for publicHolidays. +patch(TimeOffCalendarModel.prototype,{ + setup(params, services) { + super.setup(params, services); + this.data.publicHolidays = {}; + if (this.env.isSmall) { + this.meta.scale = 'month'; + } + }, + async updateData(data) { + await super.updateData(data); + data.publicHolidays = await this.fetchPublicHolidays(data); + }, + // Fetches public holidays in a year + async fetchPublicHolidays(data) { + return this.orm.call("hr.employee", "get_public_holidays", [ + this.employeeId, + serializeDate(data.range.start, "datetime"), + serializeDate(data.range.end, "datetime"), + ]); + }, + get publicHolidays() { + return this.data.publicHolidays; + } +}); diff --git a/hr_leave_dashboard/static/src/js/calendar_year_renderer.js b/hr_leave_dashboard/static/src/js/calendar_year_renderer.js new file mode 100644 index 000000000..56add69d3 --- /dev/null +++ b/hr_leave_dashboard/static/src/js/calendar_year_renderer.js @@ -0,0 +1,15 @@ +/** @odoo-module */ +import { patch } from "@web/core/utils/patch"; +import { TimeOffCalendarYearRenderer } from "@hr_holidays/views/calendar/year/calendar_year_renderer"; +import { usePublicHolidays } from "@hr_leave_dashboard/js/hooks"; + +patch(TimeOffCalendarYearRenderer.prototype, { + setup() { + super.setup(); + this.publicHolidays = usePublicHolidays(this.props); + }, + onDayRender(info) { + super.onDayRender(info); + this.publicHolidays(info); + } +}); diff --git a/hr_leave_dashboard/static/src/js/emp_org_chart.js b/hr_leave_dashboard/static/src/js/emp_org_chart.js new file mode 100644 index 000000000..d23291de9 --- /dev/null +++ b/hr_leave_dashboard/static/src/js/emp_org_chart.js @@ -0,0 +1,112 @@ +/** @odoo-module */ +import { useService } from "@web/core/utils/hooks"; +import { usePopover } from "@web/core/popover/popover_hook"; +import { onEmployeeSubRedirect } from "@hr_org_chart/fields/hooks" +const { Component, onWillStart, onWillRender, useState } = owl; +import { session } from "@web/session"; +import { registry } from "@web/core/registry"; +import { user } from "@web/core/user"; +import { rpc } from "@web/core/network/rpc"; + + +//Class TimeOffEmpOrgChartPopover that extends +//the Component class. It is a custom component used for handling +//popovers in an employee organization chart. +class TimeOffEmpOrgChartPopover extends Component { + setup() { + super.setup(); + this.rpc = rpc; + this.orm = useService('orm'); + this.user = user + this.actionService = useService("action"); + } + /** + * Redirect to the employee form view. + * + * @private + * @param {MouseEvent} event + * @returns {Promise} action loaded + */ + async _onEmployeeRedirect(employeeId) { + const action = await this.orm.call('hr.employee', 'get_formview_action', [employeeId]); + this.actionService.doAction(action); + } +} +TimeOffEmpOrgChartPopover.template = 'hr_leave_dashboard.hr_orgchart_emp_popover'; +//Exports a class TimeOffEmpOrgChart that extends the Component class. +//It is a custom component used for displaying an employee organization chart. +export class TimeOffEmpOrgChart extends Component { + async setup() { + super.setup(); + this.rpc = rpc; + this.orm = useService('orm'); + this.popover = usePopover(TimeOffEmpOrgChartPopover); + this.actionService = useService("action"); + this.jsonStringify = JSON.stringify; + this.state = useState({'employee_id': null}); + this._onEmployeeSubRedirect = onEmployeeSubRedirect(); + onWillStart(this.handleComponentUpdate.bind(this)); + onWillRender(this.handleComponentUpdate.bind(this)); + } + /** + * Called on start and on render + */ + async handleComponentUpdate() { + this.employee = this.props.id; + // The widget is either displayed in the context of a hr.employee form or a res.users form + this.state.employee_id = this.props; + const forceReload = this.lastRecord !== this.props.record; + this.lastRecord = this.props.record; + await this.fetchEmployeeData(this.state.employee_id, forceReload); + } + async fetchEmployeeData(employeeId, force = false) { + employeeId = this.props.id + if (!employeeId) { + this.managers = []; + this.children = []; + if (this.view_employee_id) { + this.render(true); + } + this.view_employee_id = null; + } else if (employeeId !== this.view_employee_id || force) { + this.view_employee_id = employeeId; + var orgData = await this.rpc( + '/hr/get_org_chart', + { + employee_id: employeeId, + context: session.user_context, + } + ); + if (Object.keys(orgData).length === 0) { + orgData = { + managers: [], + children: [], + } + } + this.managers = orgData.managers; + + this.children = orgData.children; + this.managers_more = orgData.managers_more; + this.self = orgData.self; + this.render(true); + } + } + + _onOpenPopover(event, employee) { + this.popover.open(event.currentTarget, { employee }); + } + async _onEmployeeRedirect(employeeId) { + const action = await this.orm.call('hr.employee', 'get_formview_action', [employeeId]); + this.actionService.doAction(action); + } + + async _onEmployeeMoreManager(managerId) { + await this.fetchEmployeeData(managerId); + this.state.employee_id = managerId; + } +} +TimeOffEmpOrgChart.template = 'hr_leave_dashboard.hr_org_chart'; + +TimeOffEmpOrgChart.components = { + Popover: TimeOffEmpOrgChartPopover, +}; diff --git a/hr_leave_dashboard/static/src/js/hooks.js b/hr_leave_dashboard/static/src/js/hooks.js new file mode 100644 index 000000000..467497c04 --- /dev/null +++ b/hr_leave_dashboard/static/src/js/hooks.js @@ -0,0 +1,23 @@ +/** @odoo-module */ +//Exports a custom hook usePublicHolidays that takes in props as a parameter. +//This hook is likely intended to be used in a calendar component to mark public holidays. +/** @odoo-module **/ +import { useService } from "@web/core/utils/hooks"; + +/** + * Redirect to the sub employee kanban view. + * + * @private + * @param {MouseEvent} event + * @returns {Promise} action loaded + * + */ +export function usePublicHolidays(props) { + return (info) => { + const date = luxon.DateTime.fromJSDate(info.date).toISODate(); + const publicHolidays = props.model.publicHolidays[date]; + if (publicHolidays) { + info.el.classList.add('fc-public-holiday'); + } + } +} diff --git a/hr_leave_dashboard/static/src/js/time_off_emp_card.js b/hr_leave_dashboard/static/src/js/time_off_emp_card.js new file mode 100644 index 000000000..0eabed9bb --- /dev/null +++ b/hr_leave_dashboard/static/src/js/time_off_emp_card.js @@ -0,0 +1,65 @@ +/* @odoo-module */ +import { useService } from "@web/core/utils/hooks"; +import { user } from "@web/core/user"; +import { rpc } from "@web/core/network/rpc"; +import { Component, onWillStart, useState } from "@odoo/owl"; +export class TimeOffEmpCard extends Component {} +TimeOffEmpCard.template = 'hr_leave_dashboard.TimeOffEmpCard'; +TimeOffEmpCard.props = ['name', 'id', 'department_id', 'job_position', +'children', 'image_1920', 'work_email', 'work_phone', 'company', 'resource_calendar_id']; +//Exports a class TimeOffEmpOrgChart that extends the Component class. +//It is a custom component used for managing an employee organization +//chart in the context of time off and holidays. +export class TimeOffEmpOrgChart extends Component { + setup() { + super.setup(); + this.props; + this.userService = user; + onWillStart(async () => { + this.manager = await this.userService.hasGroup("hr_holidays.group_hr_holidays_manager"); + }); + + } +} +TimeOffEmpOrgChart.template = 'hr_leave_dashboard.hr_org_chart'; +TimeOffEmpOrgChart.props = ['name', 'id', 'department_id', 'job_position', 'children']; +export class EmpDepartmentCard extends Component {} +EmpDepartmentCard.template = 'hr_leave_dashboard.EmpDepartmentCard'; +EmpDepartmentCard.props = ['name', 'id', 'department_id', 'child_all_count', +'children', 'absentees', 'current_shift', 'upcoming_holidays']; +//Exports a class ApprovalStatusCard that extends the Component class. +//It is a custom component used for managing the approval status of +//a card, possibly related to HR leave requests. +export class ApprovalStatusCard extends Component { + setup() { + super.setup(); + this.userService = user; + this.state = useState({ + select : 'today' + }) + this.props; + this.rpc = rpc; + this.actionService = useService("action"); + onWillStart(async () => { + await this.userService.hasGroup('hr_holidays.group_hr_holidays_manager').then(hasGroup => { + this.manager = hasGroup; + }) + }); + } + async printPdfReport() { + const duration = this.state.select + return this.actionService.doAction({ + type: "ir.actions.report", + report_type: "qweb-pdf", + report_name: "hr_leave_dashboard.hr_leave_report", + report_file: "hr_leave_dashboard.hr_leave_report", + data: { + 'duration': duration, + 'all_validated_leaves': this.props.all_validated_leaves, + } + }); + } +} +ApprovalStatusCard.template = 'hr_leave_dashboard.ApprovalStatusCard'; +ApprovalStatusCard.props = ['id','name','approval_status_count','child_ids', +'children', 'all_validated_leaves']; diff --git a/hr_leave_dashboard/static/src/js/time_off_emp_dashboard.js b/hr_leave_dashboard/static/src/js/time_off_emp_dashboard.js new file mode 100644 index 000000000..862cd9961 --- /dev/null +++ b/hr_leave_dashboard/static/src/js/time_off_emp_dashboard.js @@ -0,0 +1,102 @@ +/** @odoo-module */ +import { patch } from "@web/core/utils/patch"; +import { TimeOffDashboard } from '@hr_holidays/dashboard/time_off_dashboard'; +import { user } from "@web/core/user"; +import { TimeOffCard } from '@hr_holidays/dashboard/time_off_card'; +import { TimeOffEmpCard } from './time_off_emp_card'; +import { TimeOffEmpOrgChart } from './emp_org_chart'; +import { EmpDepartmentCard } from './time_off_emp_card'; +import { ApprovalStatusCard } from './time_off_emp_card'; +import { Component, onWillStart, useState } from "@odoo/owl"; +import { useService } from "@web/core/utils/hooks"; + +//The code is a patch that modifies the loadDashboardData method of the TimeOffDashboard class. +patch(TimeOffDashboard.prototype,{ + + setup() { + super.setup(); + this.userService = user; + this.currentEmployee = useState({ + data: {} + }) + this.currentAbsentees = useState({ + data: {} + }) + this.currentShift = useState({ + data: {} + }) + this.upcoming_holidays = useState({ + data: {} + }) + + onWillStart(async() => { + await this.userService.hasGroup('hr_holidays.group_hr_holidays_manager').then(hasGroup => { + this.manager = hasGroup; + }) + this.currentEmployee.data = await this.orm.call( + 'hr.leave', + 'get_current_employee', + [], + { + context: { + employee_id: this.props.employeeId + } + } + ); + this.currentAbsentees.data = await this.orm.call( + 'hr.leave', + 'get_absentees', + [], + { + context: { + employee_id: this.props.employeeId + } + } + ); + this.currentShift.data = await this.orm.call( + 'hr.leave', + 'get_current_shift', + [], + { + context: { + employee_id: this.props.employeeId + } + } + ); + this.upcoming_holidays.data = await this.orm.call( + 'hr.leave', + 'get_upcoming_holidays', + [], + { + context: { + employee_id: this.props.employeeId + } + } + ); + this.approval_status_count = await this.orm.call( + 'hr.leave', + 'get_approval_status_count', + [this.currentEmployee.data.id], + { + context: { + employee_id: this.props.employeeId + } + } + ); + this.all_validated_leaves = await this.orm.call( + 'hr.leave', + 'get_all_validated_leaves', + [], + { + context: { + employee_id: this.props.employeeId + } + } + ); + if (this.props.employeeId == null) { + this.props.employeeId = this.currentEmployee.data.id; + } + }) + }, +}); +TimeOffDashboard.components = { ...TimeOffDashboard.components, TimeOffCard, TimeOffEmpCard ,TimeOffEmpOrgChart, EmpDepartmentCard, ApprovalStatusCard}; diff --git a/hr_leave_dashboard/static/src/scss/calendar_renderer.scss b/hr_leave_dashboard/static/src/scss/calendar_renderer.scss new file mode 100644 index 000000000..50a78e3da --- /dev/null +++ b/hr_leave_dashboard/static/src/scss/calendar_renderer.scss @@ -0,0 +1,16 @@ +.o_timeoff_calendar { + .o_calendar_renderer { + height: unset; + .o_calendar_widget { + @for $size from 1 through length($o-colors) { + .hr_public_holiday_#{$size - 1}:not(.fc-disabled-day) { + background: nth($o-colors, $size) !important; + opacity: 0.4; + } + } + } + .fc-bgevent { + border-radius: 25px; + } + } +} diff --git a/hr_leave_dashboard/static/src/scss/time_off_dashboard.scss b/hr_leave_dashboard/static/src/scss/time_off_dashboard.scss new file mode 100644 index 000000000..070f58ccb --- /dev/null +++ b/hr_leave_dashboard/static/src/scss/time_off_dashboard.scss @@ -0,0 +1,11 @@ +.o_timeoff_dashboard { + display: flex; + justify-content: space-between; + height: auto; + box-shadow: inset 0 -1px 0 $border-color; + position: sticky; + top: 0; + z-index: 100; + background-color: $o-webclient-background-color; +} + diff --git a/hr_leave_dashboard/static/src/xml/approval_status_card_templates.xml b/hr_leave_dashboard/static/src/xml/approval_status_card_templates.xml new file mode 100644 index 000000000..108a71e27 --- /dev/null +++ b/hr_leave_dashboard/static/src/xml/approval_status_card_templates.xml @@ -0,0 +1,70 @@ + + + + + +
+ + + +
+ + + +
+ Approved +
+ + + +
+ To Approve +
+ + + +
+ Refused +
+
+
+ +
+
+ + +
+ + + + + + + + + + + + + + + + + + + +
NameApprovedTo ApproveRefused
+
+
+
+
diff --git a/hr_leave_dashboard/static/src/xml/emp_department_card_templates.xml b/hr_leave_dashboard/static/src/xml/emp_department_card_templates.xml new file mode 100644 index 000000000..027d4d27c --- /dev/null +++ b/hr_leave_dashboard/static/src/xml/emp_department_card_templates.xml @@ -0,0 +1,45 @@ + + + + + +
+ + + + + + + + + + + +
+
+ Current Shift: +
+
+
+
Upcoming Holidays
+ +
+ +
+
+ () +
+
+
+
+
On Leave
+ +
+ +
+
+
+
+
diff --git a/hr_leave_dashboard/static/src/xml/emp_org_chart_templates.xml b/hr_leave_dashboard/static/src/xml/emp_org_chart_templates.xml new file mode 100644 index 000000000..ccda6b55d --- /dev/null +++ b/hr_leave_dashboard/static/src/xml/emp_org_chart_templates.xml @@ -0,0 +1,168 @@ + + + + + + +
+
+ + + +
+
+ +
+ + + +
+
+ +
+ + +
+
+
+ + + + +
+ + + + + + + +
+ + + + + + + +
+ + + + + + + + + + +
+
+ See All +
+
+
+
+
+ + + + diff --git a/hr_leave_dashboard/static/src/xml/time_off_emp_card_templates.xml b/hr_leave_dashboard/static/src/xml/time_off_emp_card_templates.xml new file mode 100644 index 000000000..779b62b4a --- /dev/null +++ b/hr_leave_dashboard/static/src/xml/time_off_emp_card_templates.xml @@ -0,0 +1,77 @@ + + + + + +
+ + + + + + + + + + + +
+
+ + + +
+ + + +
+
+
+
+ Job Position: + +
+
+
+
+ Working Hours: + +
+
+
+
+ EMAIL: +
+
+
+
+ PHONE: +
+
+
+
+ Department: +
+
+
+
+ Company: +
+
+
+
+
diff --git a/hr_leave_dashboard/static/src/xml/time_off_emp_dashboard_templates.xml b/hr_leave_dashboard/static/src/xml/time_off_emp_dashboard_templates.xml new file mode 100644 index 000000000..b2418bf02 --- /dev/null +++ b/hr_leave_dashboard/static/src/xml/time_off_emp_dashboard_templates.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + +