diff --git a/dashboard_pos/README.rst b/dashboard_pos/README.rst new file mode 100644 index 000000000..e9e2065a6 --- /dev/null +++ b/dashboard_pos/README.rst @@ -0,0 +1,47 @@ +.. 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 + +POS Dashboard +============= +Detailed dashboard view for POS + +Configuration +============= +* No Additional configuration is needed. + +License +------- +General Public License, Version 3 (AGPL-3). +(http://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +Developers: (V13) Irfan, (V14) Jibin, (V15) Irfan, (V16) Amaya Aravind EV, + (V17) Subina P, (V18) Bhagyadev KP, 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/dashboard_pos/__init__.py b/dashboard_pos/__init__.py new file mode 100644 index 000000000..7d45d5569 --- /dev/null +++ b/dashboard_pos/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Bhagyadev KP (odoo@cybrosys.com) +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################ +from . import models diff --git a/dashboard_pos/__manifest__.py b/dashboard_pos/__manifest__.py new file mode 100644 index 000000000..a5161949b --- /dev/null +++ b/dashboard_pos/__manifest__.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Bhagyadev KP (odoo@cybrosys.com) +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################ +{ + 'name': "POS Dashboard", + 'version': '18.0.1.0.0', + 'category': 'Point of Sale', + 'summary': """Detailed dashboard view for POS""", + 'description': """Customized POS dashboard view""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'depends': ['hr', 'point_of_sale', 'web'], + 'data': [ + 'views/pos_order_views.xml' + ], + 'assets': { + 'web.assets_backend': [ + 'dashboard_pos/static/src/xml/pos_dashboard.xml', + 'dashboard_pos/static/src/js/pos_dashboard.js', + 'dashboard_pos/static/src/css/pos_dashboard.css', + 'https://cdnjs.cloudflare.com/ajax/libs/Chart.js/4.4.0/chart.umd.min.js', + 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js' + ], + }, + 'external_dependencies': { + 'python': ['pandas'], + }, + 'images': ['static/description/banner.png'], + 'license': "AGPL-3", + 'installable': True, + 'application': False, +} diff --git a/dashboard_pos/doc/RELEASE_NOTES.md b/dashboard_pos/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..199fa626e --- /dev/null +++ b/dashboard_pos/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 08.10.2024 +#### Version 18.0.1.0.0 +##### ADD +- Initial Commit for POS Dashboard diff --git a/dashboard_pos/models/__init__.py b/dashboard_pos/models/__init__.py new file mode 100644 index 000000000..e331dea42 --- /dev/null +++ b/dashboard_pos/models/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Bhagyadev KP (odoo@cybrosys.com) +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################ +from . import pos_order diff --git a/dashboard_pos/models/pos_order.py b/dashboard_pos/models/pos_order.py new file mode 100644 index 000000000..f2c529bab --- /dev/null +++ b/dashboard_pos/models/pos_order.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Bhagyadev KP (odoo@cybrosys.com) +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################ +import pytz +from datetime import datetime +from odoo import api, models + + +class PosOrder(models.Model): + """ Inherited class of pos dashboard to add features of dashboard""" + _inherit = 'pos.order' + + @api.model + def get_department(self, option): + """ Function to get the order details of company wise""" + + company_id = self.env.company.id + if option == 'pos_hourly_sales': + + user_tz = self.env.user.tz if self.env.user.tz else pytz.UTC + query = '''select EXTRACT(hour FROM date_order at time zone 'utc' at time zone '{}') + as date_month,sum(amount_total) from pos_order where + EXTRACT(month FROM date_order::date) = EXTRACT(month FROM CURRENT_DATE) + AND pos_order.company_id = ''' + str( + company_id) + ''' group by date_month ''' + query = query.format(user_tz) + label = 'HOURS' + elif option == 'pos_monthly_sales': + query = '''select date_order::date as date_month,sum(amount_total) from pos_order where + EXTRACT(month FROM date_order::date) = EXTRACT(month FROM CURRENT_DATE) AND pos_order.company_id = ''' + str( + company_id) + ''' group by date_month ''' + label = 'DAYS' + else: + query = '''select TO_CHAR(date_order,'MON')date_month,sum(amount_total) from pos_order where + EXTRACT(year FROM date_order::date) = EXTRACT(year FROM CURRENT_DATE) AND pos_order.company_id = ''' + str( + company_id) + ''' group by date_month''' + label = 'MONTHS' + self._cr.execute(query) + docs = self._cr.dictfetchall() + order = [] + for record in docs: + order.append(record.get('sum')) + today = [] + for record in docs: + today.append(record.get('date_month')) + final = [order, today, label] + return final + + @api.model + def get_details(self): + """ Function to get the payment details""" + company_id = self.env.company.id + cr = self._cr + cr.execute( + """select pos_payment_method.name ->>'en_US',sum(amount) from pos_payment inner join pos_payment_method on + pos_payment_method.id=pos_payment.payment_method_id group by pos_payment_method.name ORDER + BY sum(amount) DESC; """) + payment_details = cr.fetchall() + cr.execute( + '''select hr_employee.name,sum(pos_order.amount_paid) as total,count(pos_order.amount_paid) as orders + from pos_order inner join hr_employee on pos_order.user_id = hr_employee.user_id + where pos_order.company_id =''' + str( + company_id) + " " + '''GROUP BY hr_employee.name order by total DESC;''') + salesperson = cr.fetchall() + total_sales = [] + for rec in salesperson: + rec = list(rec) + sym_id = rec[1] + company = self.env.company + if company.currency_id.position == 'after': + rec[1] = "%s %s" % (sym_id, company.currency_id.symbol) + else: + rec[1] = "%s %s" % (company.currency_id.symbol, sym_id) + rec = tuple(rec) + total_sales.append(rec) + cr.execute( + '''select DISTINCT(product_template.name) as product_name,sum(qty) as total_quantity from + pos_order_line inner join product_product on product_product.id=pos_order_line.product_id inner join + product_template on product_product.product_tmpl_id = product_template.id where pos_order_line.company_id =''' + str( + company_id) + ''' group by product_template.id ORDER + BY total_quantity DESC Limit 10 ''') + selling_product = cr.fetchall() + sessions = self.env['pos.config'].search([]) + sessions_list = [] + dict = { + 'opened': 'Opened', + 'opening_control': "Opening Control" + } + for session in sessions: + st = dict.get(session.pos_session_state) + if st == None: + sessions_list.append({ + 'session': session.name, + 'status': 'Closed' + }) + else: + sessions_list.append({ + 'session': session.name, + 'status': dict.get(session.pos_session_state) + }) + payments = [] + for rec in payment_details: + rec = list(rec) + sym_id = rec[1] + company = self.env.company + if company.currency_id.position == 'after': + rec[1] = "%s %s" % (sym_id, company.currency_id.symbol) + else: + rec[1] = "%s %s" % (company.currency_id.symbol, sym_id) + rec = tuple(rec) + payments.append(rec) + return { + 'payment_details': payments, + 'salesperson': total_sales, + 'selling_product': sessions_list, + } + + @api.model + def get_refund_details(self): + """ Function to get the Refund details""" + default_date = datetime.today().date() + pos_order = self.env['pos.order'].search([]) + total = 0 + today_refund_total = 0 + total_order_count = 0 + total_refund_count = 0 + today_sale = 0 + a = 0 + for rec in pos_order: + if rec.amount_total < 0.0 and rec.date_order.date() == default_date: + today_refund_total = today_refund_total + 1 + total_sales = rec.amount_total + total = total + total_sales + total_order_count = total_order_count + 1 + if rec.date_order.date() == default_date: + today_sale = today_sale + 1 + if rec.amount_total < 0.0: + total_refund_count = total_refund_count + 1 + magnitude = 0 + while abs(total) >= 1000: + magnitude += 1 + total /= 1000.0 + # add more suffixes if you need them + val = '%.2f%s' % (total, ['', 'K', 'M', 'G', 'T', 'P'][magnitude]) + pos_session = self.env['pos.session'].search([]) + total_session = 0 + for record in pos_session: + total_session = total_session + 1 + return { + 'total_sale': val, + 'total_order_count': total_order_count, + 'total_refund_count': total_refund_count, + 'total_session': total_session, + 'today_refund_total': today_refund_total, + 'today_sale': today_sale, + } + + @api.model + def get_the_top_customer(self, ): + """ To get the top Customer details""" + company_id = self.env.company.id + query = '''select res_partner.name as customer,pos_order.partner_id,sum(pos_order.amount_paid) as amount_total from pos_order + inner join res_partner on res_partner.id = pos_order.partner_id where pos_order.company_id = ''' + str( + company_id) + ''' GROUP BY pos_order.partner_id, + res_partner.name ORDER BY amount_total DESC LIMIT 10;''' + self._cr.execute(query) + docs = self._cr.dictfetchall() + + order = [] + for record in docs: + order.append(record.get('amount_total')) + day = [] + for record in docs: + day.append(record.get('customer')) + final = [order, day] + return final + + @api.model + def get_the_top_products(self): + """ Function to get the top products""" + company_id = self.env.company.id + query = '''select DISTINCT(product_template.name)->>'en_US' as product_name,sum(qty) as total_quantity from + pos_order_line inner join product_product on product_product.id=pos_order_line.product_id inner join + product_template on product_product.product_tmpl_id = product_template.id where pos_order_line.company_id = ''' + str( + company_id) + ''' group by product_template.id ORDER + BY total_quantity DESC Limit 10 ''' + self._cr.execute(query) + top_product = self._cr.dictfetchall() + total_quantity = [] + for record in top_product: + total_quantity.append(record.get('total_quantity')) + product_name = [] + for record in top_product: + product_name.append(record.get('product_name')) + final = [total_quantity, product_name] + return final + + @api.model + def get_the_top_categories(self): + """ Function to get the top Product categories""" + company_id = self.env.company.id + query = '''select DISTINCT(product_category.complete_name) as product_category,sum(qty) as total_quantity + from pos_order_line inner join product_product on product_product.id=pos_order_line.product_id inner join + product_template on product_product.product_tmpl_id = product_template.id inner join product_category on + product_category.id =product_template.categ_id where pos_order_line.company_id = ''' + str( + company_id) + ''' group by product_category ORDER BY total_quantity DESC ''' + self._cr.execute(query) + top_product = self._cr.dictfetchall() + total_quantity = [] + for record in top_product: + total_quantity.append(record.get('total_quantity')) + product_categ = [] + for record in top_product: + product_categ.append(record.get('product_category')) + final = [total_quantity, product_categ] + return final diff --git a/dashboard_pos/static/description/assets/cybro-icon.png b/dashboard_pos/static/description/assets/cybro-icon.png new file mode 100644 index 000000000..06e73e11d Binary files /dev/null and b/dashboard_pos/static/description/assets/cybro-icon.png differ diff --git a/dashboard_pos/static/description/assets/cybro-odoo.png b/dashboard_pos/static/description/assets/cybro-odoo.png new file mode 100644 index 000000000..ed02e07a4 Binary files /dev/null and b/dashboard_pos/static/description/assets/cybro-odoo.png differ diff --git a/dashboard_pos/static/description/assets/icons/arrows-repeat.svg b/dashboard_pos/static/description/assets/icons/arrows-repeat.svg new file mode 100644 index 000000000..1d7efabc5 --- /dev/null +++ b/dashboard_pos/static/description/assets/icons/arrows-repeat.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/dashboard_pos/static/description/assets/icons/banner-1.png b/dashboard_pos/static/description/assets/icons/banner-1.png new file mode 100644 index 000000000..c180db172 Binary files /dev/null and b/dashboard_pos/static/description/assets/icons/banner-1.png differ diff --git a/dashboard_pos/static/description/assets/icons/banner-2.svg b/dashboard_pos/static/description/assets/icons/banner-2.svg new file mode 100644 index 000000000..e606d97d9 --- /dev/null +++ b/dashboard_pos/static/description/assets/icons/banner-2.svg @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dashboard_pos/static/description/assets/icons/banner-bg.png b/dashboard_pos/static/description/assets/icons/banner-bg.png new file mode 100644 index 000000000..a8238d3c0 Binary files /dev/null and b/dashboard_pos/static/description/assets/icons/banner-bg.png differ diff --git a/dashboard_pos/static/description/assets/icons/banner-bg.svg b/dashboard_pos/static/description/assets/icons/banner-bg.svg new file mode 100644 index 000000000..b1378103e --- /dev/null +++ b/dashboard_pos/static/description/assets/icons/banner-bg.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/dashboard_pos/static/description/assets/icons/banner-call.svg b/dashboard_pos/static/description/assets/icons/banner-call.svg new file mode 100644 index 000000000..96c687e81 --- /dev/null +++ b/dashboard_pos/static/description/assets/icons/banner-call.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/dashboard_pos/static/description/assets/icons/banner-mail.svg b/dashboard_pos/static/description/assets/icons/banner-mail.svg new file mode 100644 index 000000000..cbf0d158d --- /dev/null +++ b/dashboard_pos/static/description/assets/icons/banner-mail.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/dashboard_pos/static/description/assets/icons/banner-pattern.svg b/dashboard_pos/static/description/assets/icons/banner-pattern.svg new file mode 100644 index 000000000..9c1c7e101 --- /dev/null +++ b/dashboard_pos/static/description/assets/icons/banner-pattern.svg @@ -0,0 +1,343 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dashboard_pos/static/description/assets/icons/banner-promo.svg b/dashboard_pos/static/description/assets/icons/banner-promo.svg new file mode 100644 index 000000000..d52791b11 --- /dev/null +++ b/dashboard_pos/static/description/assets/icons/banner-promo.svg @@ -0,0 +1,147 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dashboard_pos/static/description/assets/icons/brand-pair.svg b/dashboard_pos/static/description/assets/icons/brand-pair.svg new file mode 100644 index 000000000..d8db7fc1e --- /dev/null +++ b/dashboard_pos/static/description/assets/icons/brand-pair.svg @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dashboard_pos/static/description/assets/icons/check.png b/dashboard_pos/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/dashboard_pos/static/description/assets/icons/check.png differ diff --git a/dashboard_pos/static/description/assets/icons/chevron.png b/dashboard_pos/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/dashboard_pos/static/description/assets/icons/chevron.png differ diff --git a/dashboard_pos/static/description/assets/icons/close-icon.svg b/dashboard_pos/static/description/assets/icons/close-icon.svg new file mode 100644 index 000000000..df8cce37a --- /dev/null +++ b/dashboard_pos/static/description/assets/icons/close-icon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/dashboard_pos/static/description/assets/icons/cogs.png b/dashboard_pos/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/dashboard_pos/static/description/assets/icons/cogs.png differ diff --git a/dashboard_pos/static/description/assets/icons/collabarate-icon.svg b/dashboard_pos/static/description/assets/icons/collabarate-icon.svg new file mode 100644 index 000000000..dd4e10518 --- /dev/null +++ b/dashboard_pos/static/description/assets/icons/collabarate-icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/dashboard_pos/static/description/assets/icons/consultation.png b/dashboard_pos/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/dashboard_pos/static/description/assets/icons/consultation.png differ diff --git a/dashboard_pos/static/description/assets/icons/cybro-logo.png b/dashboard_pos/static/description/assets/icons/cybro-logo.png new file mode 100644 index 000000000..ff4b78220 Binary files /dev/null and b/dashboard_pos/static/description/assets/icons/cybro-logo.png differ diff --git a/dashboard_pos/static/description/assets/icons/down.svg b/dashboard_pos/static/description/assets/icons/down.svg new file mode 100644 index 000000000..f21c36271 --- /dev/null +++ b/dashboard_pos/static/description/assets/icons/down.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dashboard_pos/static/description/assets/icons/ecom-black.png b/dashboard_pos/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/dashboard_pos/static/description/assets/icons/ecom-black.png differ diff --git a/dashboard_pos/static/description/assets/icons/education-black.png b/dashboard_pos/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/dashboard_pos/static/description/assets/icons/education-black.png differ diff --git a/dashboard_pos/static/description/assets/icons/faq.png b/dashboard_pos/static/description/assets/icons/faq.png new file mode 100644 index 000000000..4250b5b81 Binary files /dev/null and b/dashboard_pos/static/description/assets/icons/faq.png differ diff --git a/dashboard_pos/static/description/assets/icons/feature-icon.svg b/dashboard_pos/static/description/assets/icons/feature-icon.svg new file mode 100644 index 000000000..fa0ea6850 --- /dev/null +++ b/dashboard_pos/static/description/assets/icons/feature-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/dashboard_pos/static/description/assets/icons/feature.png b/dashboard_pos/static/description/assets/icons/feature.png new file mode 100644 index 000000000..ac7a785c0 Binary files /dev/null and b/dashboard_pos/static/description/assets/icons/feature.png differ diff --git a/dashboard_pos/static/description/assets/icons/gear.svg b/dashboard_pos/static/description/assets/icons/gear.svg new file mode 100644 index 000000000..0cc66b6ea --- /dev/null +++ b/dashboard_pos/static/description/assets/icons/gear.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/dashboard_pos/static/description/assets/icons/hero.gif b/dashboard_pos/static/description/assets/icons/hero.gif new file mode 100644 index 000000000..380654dfe Binary files /dev/null and b/dashboard_pos/static/description/assets/icons/hero.gif differ diff --git a/dashboard_pos/static/description/assets/icons/hire-odoo.svg b/dashboard_pos/static/description/assets/icons/hire-odoo.svg new file mode 100644 index 000000000..e1ac089b0 --- /dev/null +++ b/dashboard_pos/static/description/assets/icons/hire-odoo.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/dashboard_pos/static/description/assets/icons/hotel-black.png b/dashboard_pos/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/dashboard_pos/static/description/assets/icons/hotel-black.png differ diff --git a/dashboard_pos/static/description/assets/icons/license.png b/dashboard_pos/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/dashboard_pos/static/description/assets/icons/license.png differ diff --git a/dashboard_pos/static/description/assets/icons/life-ring-icon.svg b/dashboard_pos/static/description/assets/icons/life-ring-icon.svg new file mode 100644 index 000000000..3ae6e1d89 --- /dev/null +++ b/dashboard_pos/static/description/assets/icons/life-ring-icon.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/dashboard_pos/static/description/assets/icons/lifebuoy.png b/dashboard_pos/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/dashboard_pos/static/description/assets/icons/lifebuoy.png differ diff --git a/dashboard_pos/static/description/assets/icons/mail.svg b/dashboard_pos/static/description/assets/icons/mail.svg new file mode 100644 index 000000000..1eedde695 --- /dev/null +++ b/dashboard_pos/static/description/assets/icons/mail.svg @@ -0,0 +1,3 @@ + + + diff --git a/dashboard_pos/static/description/assets/icons/manufacturing-black.png b/dashboard_pos/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/dashboard_pos/static/description/assets/icons/manufacturing-black.png differ diff --git a/dashboard_pos/static/description/assets/icons/notes.png b/dashboard_pos/static/description/assets/icons/notes.png new file mode 100644 index 000000000..ee5e95404 Binary files /dev/null and b/dashboard_pos/static/description/assets/icons/notes.png differ diff --git a/dashboard_pos/static/description/assets/icons/notification icon.svg b/dashboard_pos/static/description/assets/icons/notification icon.svg new file mode 100644 index 000000000..053189973 --- /dev/null +++ b/dashboard_pos/static/description/assets/icons/notification icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/dashboard_pos/static/description/assets/icons/odoo-consultancy.svg b/dashboard_pos/static/description/assets/icons/odoo-consultancy.svg new file mode 100644 index 000000000..e05f65bde --- /dev/null +++ b/dashboard_pos/static/description/assets/icons/odoo-consultancy.svg @@ -0,0 +1,4 @@ + + + + diff --git a/dashboard_pos/static/description/assets/icons/odoo-licencing.svg b/dashboard_pos/static/description/assets/icons/odoo-licencing.svg new file mode 100644 index 000000000..2606c88b0 --- /dev/null +++ b/dashboard_pos/static/description/assets/icons/odoo-licencing.svg @@ -0,0 +1,3 @@ + + + diff --git a/dashboard_pos/static/description/assets/icons/odoo-logo.png b/dashboard_pos/static/description/assets/icons/odoo-logo.png new file mode 100644 index 000000000..0e4d0eb5a Binary files /dev/null and b/dashboard_pos/static/description/assets/icons/odoo-logo.png differ diff --git a/dashboard_pos/static/description/assets/icons/patter.svg b/dashboard_pos/static/description/assets/icons/patter.svg new file mode 100644 index 000000000..25c9c0a8f --- /dev/null +++ b/dashboard_pos/static/description/assets/icons/patter.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/dashboard_pos/static/description/assets/icons/pattern1.png b/dashboard_pos/static/description/assets/icons/pattern1.png new file mode 100644 index 000000000..09ab0fb2d Binary files /dev/null and b/dashboard_pos/static/description/assets/icons/pattern1.png differ diff --git a/dashboard_pos/static/description/assets/icons/pos-black.png b/dashboard_pos/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/dashboard_pos/static/description/assets/icons/pos-black.png differ diff --git a/dashboard_pos/static/description/assets/icons/puzzle-piece-icon.svg b/dashboard_pos/static/description/assets/icons/puzzle-piece-icon.svg new file mode 100644 index 000000000..3e9ad9373 --- /dev/null +++ b/dashboard_pos/static/description/assets/icons/puzzle-piece-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/dashboard_pos/static/description/assets/icons/puzzle.png b/dashboard_pos/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/dashboard_pos/static/description/assets/icons/puzzle.png differ diff --git a/dashboard_pos/static/description/assets/icons/replace-icon.svg b/dashboard_pos/static/description/assets/icons/replace-icon.svg new file mode 100644 index 000000000..d0e3a7af1 --- /dev/null +++ b/dashboard_pos/static/description/assets/icons/replace-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/dashboard_pos/static/description/assets/icons/restaurant-black.png b/dashboard_pos/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/dashboard_pos/static/description/assets/icons/restaurant-black.png differ diff --git a/dashboard_pos/static/description/assets/icons/screenshot-main.png b/dashboard_pos/static/description/assets/icons/screenshot-main.png new file mode 100644 index 000000000..575f8e676 Binary files /dev/null and b/dashboard_pos/static/description/assets/icons/screenshot-main.png differ diff --git a/dashboard_pos/static/description/assets/icons/screenshot.png b/dashboard_pos/static/description/assets/icons/screenshot.png new file mode 100644 index 000000000..cef272529 Binary files /dev/null and b/dashboard_pos/static/description/assets/icons/screenshot.png differ diff --git a/dashboard_pos/static/description/assets/icons/service-black.png b/dashboard_pos/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/dashboard_pos/static/description/assets/icons/service-black.png differ diff --git a/dashboard_pos/static/description/assets/icons/skype-fill.svg b/dashboard_pos/static/description/assets/icons/skype-fill.svg new file mode 100644 index 000000000..c17423639 --- /dev/null +++ b/dashboard_pos/static/description/assets/icons/skype-fill.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/dashboard_pos/static/description/assets/icons/skype.png b/dashboard_pos/static/description/assets/icons/skype.png new file mode 100644 index 000000000..51b409fb3 Binary files /dev/null and b/dashboard_pos/static/description/assets/icons/skype.png differ diff --git a/dashboard_pos/static/description/assets/icons/skype.svg b/dashboard_pos/static/description/assets/icons/skype.svg new file mode 100644 index 000000000..df3dad39b --- /dev/null +++ b/dashboard_pos/static/description/assets/icons/skype.svg @@ -0,0 +1,3 @@ + + + diff --git a/dashboard_pos/static/description/assets/icons/star-1.svg b/dashboard_pos/static/description/assets/icons/star-1.svg new file mode 100644 index 000000000..7e55ab162 --- /dev/null +++ b/dashboard_pos/static/description/assets/icons/star-1.svg @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dashboard_pos/static/description/assets/icons/star-2.svg b/dashboard_pos/static/description/assets/icons/star-2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/dashboard_pos/static/description/assets/icons/star-2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/dashboard_pos/static/description/assets/icons/support.png b/dashboard_pos/static/description/assets/icons/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/dashboard_pos/static/description/assets/icons/support.png differ diff --git a/dashboard_pos/static/description/assets/icons/test-1 - Copy.png b/dashboard_pos/static/description/assets/icons/test-1 - Copy.png new file mode 100644 index 000000000..f6a902663 Binary files /dev/null and b/dashboard_pos/static/description/assets/icons/test-1 - Copy.png differ diff --git a/dashboard_pos/static/description/assets/icons/test-1.png b/dashboard_pos/static/description/assets/icons/test-1.png new file mode 100644 index 000000000..0908add2b Binary files /dev/null and b/dashboard_pos/static/description/assets/icons/test-1.png differ diff --git a/dashboard_pos/static/description/assets/icons/test-2.png b/dashboard_pos/static/description/assets/icons/test-2.png new file mode 100644 index 000000000..4671fe91e Binary files /dev/null and b/dashboard_pos/static/description/assets/icons/test-2.png differ diff --git a/dashboard_pos/static/description/assets/icons/trading-black.png b/dashboard_pos/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/dashboard_pos/static/description/assets/icons/trading-black.png differ diff --git a/dashboard_pos/static/description/assets/icons/training.png b/dashboard_pos/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/dashboard_pos/static/description/assets/icons/training.png differ diff --git a/dashboard_pos/static/description/assets/icons/translate.svg b/dashboard_pos/static/description/assets/icons/translate.svg new file mode 100644 index 000000000..af9c8a1aa --- /dev/null +++ b/dashboard_pos/static/description/assets/icons/translate.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/dashboard_pos/static/description/assets/icons/update.png b/dashboard_pos/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/dashboard_pos/static/description/assets/icons/update.png differ diff --git a/dashboard_pos/static/description/assets/icons/user.png b/dashboard_pos/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/dashboard_pos/static/description/assets/icons/user.png differ diff --git a/dashboard_pos/static/description/assets/icons/video.png b/dashboard_pos/static/description/assets/icons/video.png new file mode 100644 index 000000000..576705b17 Binary files /dev/null and b/dashboard_pos/static/description/assets/icons/video.png differ diff --git a/dashboard_pos/static/description/assets/icons/whatsapp.png b/dashboard_pos/static/description/assets/icons/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/dashboard_pos/static/description/assets/icons/whatsapp.png differ diff --git a/dashboard_pos/static/description/assets/icons/wrench-icon.svg b/dashboard_pos/static/description/assets/icons/wrench-icon.svg new file mode 100644 index 000000000..174b5a465 --- /dev/null +++ b/dashboard_pos/static/description/assets/icons/wrench-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/dashboard_pos/static/description/assets/icons/wrench.png b/dashboard_pos/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/dashboard_pos/static/description/assets/icons/wrench.png differ diff --git a/dashboard_pos/static/description/assets/modules/1.gif b/dashboard_pos/static/description/assets/modules/1.gif new file mode 100644 index 000000000..ae3a880a2 Binary files /dev/null and b/dashboard_pos/static/description/assets/modules/1.gif differ diff --git a/dashboard_pos/static/description/assets/modules/2.gif b/dashboard_pos/static/description/assets/modules/2.gif new file mode 100644 index 000000000..d19e2b352 Binary files /dev/null and b/dashboard_pos/static/description/assets/modules/2.gif differ diff --git a/dashboard_pos/static/description/assets/modules/3.png b/dashboard_pos/static/description/assets/modules/3.png new file mode 100644 index 000000000..8513873ea Binary files /dev/null and b/dashboard_pos/static/description/assets/modules/3.png differ diff --git a/dashboard_pos/static/description/assets/modules/4.png b/dashboard_pos/static/description/assets/modules/4.png new file mode 100644 index 000000000..3bedf7981 Binary files /dev/null and b/dashboard_pos/static/description/assets/modules/4.png differ diff --git a/dashboard_pos/static/description/assets/modules/5.png b/dashboard_pos/static/description/assets/modules/5.png new file mode 100644 index 000000000..0e311ca87 Binary files /dev/null and b/dashboard_pos/static/description/assets/modules/5.png differ diff --git a/dashboard_pos/static/description/assets/modules/6.jpg b/dashboard_pos/static/description/assets/modules/6.jpg new file mode 100644 index 000000000..67c7f7062 Binary files /dev/null and b/dashboard_pos/static/description/assets/modules/6.jpg differ diff --git a/dashboard_pos/static/description/assets/screenshots/1.png b/dashboard_pos/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..8b180934d Binary files /dev/null and b/dashboard_pos/static/description/assets/screenshots/1.png differ diff --git a/dashboard_pos/static/description/assets/screenshots/2.png b/dashboard_pos/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..09a19bf54 Binary files /dev/null and b/dashboard_pos/static/description/assets/screenshots/2.png differ diff --git a/dashboard_pos/static/description/assets/screenshots/3.png b/dashboard_pos/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..ade3abad5 Binary files /dev/null and b/dashboard_pos/static/description/assets/screenshots/3.png differ diff --git a/dashboard_pos/static/description/assets/screenshots/hero.gif b/dashboard_pos/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..f486bf7cd Binary files /dev/null and b/dashboard_pos/static/description/assets/screenshots/hero.gif differ diff --git a/dashboard_pos/static/description/banner.png b/dashboard_pos/static/description/banner.png new file mode 100644 index 000000000..127f51e0b Binary files /dev/null and b/dashboard_pos/static/description/banner.png differ diff --git a/dashboard_pos/static/description/icon.png b/dashboard_pos/static/description/icon.png new file mode 100644 index 000000000..20cc3d9ec Binary files /dev/null and b/dashboard_pos/static/description/icon.png differ diff --git a/dashboard_pos/static/description/index.html b/dashboard_pos/static/description/index.html new file mode 100644 index 000000000..26665c787 --- /dev/null +++ b/dashboard_pos/static/description/index.html @@ -0,0 +1,964 @@ + + + + + + POS Dashboard + + + + + + + + + + +
+
+ + + +
+
+ Community +
+
+ Enterprise +
+ + + + +
+
+ +
+
+
+
+

+ This Module Creates a Detailed Dashboard View for POS. +

+

POS Dashboard +

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

Key + Heighlights

+
+
+
+
+ +
+
+ Total POS Orders. +
+
+
+
+
+
+ +
+
+ Sale Report Charts. +
+
+
+
+
+
+ +
+
+ Session Details. +
+
+
+
+
+
+ +
+
+ Refund Details. +
+
+
+
+
+
+ +
+
+ Top Products. +
+
+
+
+
+ +
+
+
+ POS Dashboard +

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

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

+ + +

+
+
+

From POS --> Reporting --> Dashboard , Click on Dashboard. +

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

+ + +

+
+
+

By clicking on each tile, It will go to the respective details in the backend. +

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

+ + +

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

Total POS Orders.

+
+ +
+
+
+
+
+
+ +
+

Sale Report Charts.

+
+
+
+
+
+
+
+ +
+

Session Details.

+
+
+
+
+
+
+
+ +
+

Refund Details.

+
+
+
+
+
+
+
+ +
+

Top Products.

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

Yes you can filter the dashboard hourly, monthly and yearly. +

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

+ Latest Release 18.0.1.0.0 +

+ + 8th october, 2024 + +
+
+
+
+
+ Add +
+
+
+
    +
  • + Initial Commit +
  • + +
+
+
+
+
+
+
+
+
+
+ + + + + + +
+

+ Our Services

+ +
+ +
+
+ .... +
+
+ +
+ + +
+
+ + + + + + diff --git a/dashboard_pos/static/src/css/pos_dashboard.css b/dashboard_pos/static/src/css/pos_dashboard.css new file mode 100644 index 000000000..c3a814434 --- /dev/null +++ b/dashboard_pos/static/src/css/pos_dashboard.css @@ -0,0 +1,1005 @@ +.oh_dashboards{ + padding-top :15px; + background-color: #f8faff !important; +} + +.oh-card h4 { + font-size: 1.1rem; +} +.breadcrumbs { + margin-top: 0; +} + +.buttons button { + margin: 2px 0; } + +/* Button Reset */ +.btn, .button { + display: inline-block; + font-weight: 400; + text-align: center; + white-space: nowrap; + vertical-align: middle; + transition: all .15s ease-in-out; + border-radius: 0; + cursor: pointer; } + + +/* Widget One +---------------------------*/ +.stat-content { + display: inline-block; + width: 66%; +} +.stat-icon{ + display: inline-block; +} + +.stat-widget-one .stat-icon { + vertical-align: top; + margin: auto; + width: 100%; + color: #01c490; +} + +.stat-widget-one .stat-icon i { + font-size: 30px; + font-weight: 900; + display: inline-block; + color: #01c490;} + +.stat-widget-one .stat-text { + font-size: 14px; + color: #868e96; + font-weight: bold; +} + +.stat-widget-one .stat-digit { + font-size: 24px; + color: #02448b; } + +.stat-count { + font-size: 20px; + text-align: center; + color: #00438b;} + +.stat-title { + font-size: 17px; + text-align: center; + color: #00438b; } + +.mb-0 .dash-title { + font-size: 20px; + text-align: center; + color: rgba(255, 255, 255, 0.81); +} +.hr_birthday { + font-size: 28px; + text-align: center; + padding: 20px 0; + color: #00438b; + font-weight: 600; +} + +body .text-color { + color: #00438b; +} +.slice { + stroke: #fff; + stroke-width: 0px; +} + +/* Leave graph */ + +path { stroke: #fff; } +path:hover { opacity:0.9; } +rect:hover { fill:#934da5; } +.axis { font: 10px sans-serif; } +.legend tr{ border-bottom:1px solid grey; } +.legend tr:first-child{ border-top:1px solid grey; } + +.axis path, +.axis line { + fill: none; + stroke: #000; + shape-rendering: crispEdges; +} + +.x.axis path { display: none; } +.legend{ + border-collapse: collapse; + border-spacing: 0px; + display: inline-block; +} +.legend td, .legend .legend_col{ + padding:4px 5px; + vertical-align:bottom; +} +.legendFreq, .legendPerc{ + align:right; + width:50px; +} + +/* Leave broadfactor graph */ + +.broad_factor_graph .axis path, +.broad_factor_graph .axis line { + fill: none; + stroke: black; + shape-rendering: crispEdges; +} +.broad_factor_graph .axis text { + font-family: sans-serif; + font-size: 11px; +} + +.broad_factor_graph rect { + -moz-transition: all 0.3s; + -webkit-transition: all 0.3s; + -o-transition: all 0.3s; + transition: all 0.3s; +} +.broad_factor_graph rect:hover{ + fill: #ff618a; +} + +#broad_factor_pdf { + background-color: #ffffff; + border: 0; + color : #000000; + float: right; +} +#broad_factor_pdf i { + color: red; +} + +.leave_broad_factor{ + overflow-x: auto !important; + overflow-y: hidden !important; + height: auto; +} + +/*=====================New Dashboard===========================*/ + +.oh_dashboards { + background-color: #f8faff !important; + padding: 0px !important; + +} +.container-fluid.o_pos_dashboard { + padding: 0px !important; +} +.employee-prof { + + padding: 0px; + height: 100%; + background-color: #3e6282; + /*background-image: linear-gradient(180deg, #3e6282, #41666f);*/ + position: fixed; + z-index: 999; +} +.employee-prof .oh-card:hover { + + transform:none !important; + box-shadow: none !important; + +} + +/*.dummy{ + height:130vh; +}*/ +.oh-card { + + padding-top: 0px; + padding: 0px; + margin-bottom: 1.5rem; + border-radius: 0px; + box-shadow: none; + background: none; + transition: transform 0.2s ease, box-shadow 0.2s ease; + will-change: transform, box-shadow; + +} +.oh-card:hover { + + transform: translateY(-2px) translateZ(0) !important; + box-shadow: 0 10px 10px 0 rgba(62, 57, 107, 0.12), 0 0 0 transparent !important; + +} +.employee-prof .employee-icon { + + float: left; + padding-right: 0px; + width: 100%; + height: 185px; + overflow: hidden; + background: #fff; + +} +.employee-prof .employee-icon img{ + width: 100%; + background: #fff; +} + +.employee-prof .employee-name h2 { + + text-align: center; + font-weight: 300; + text-transform: uppercase; + font-size: 17px; + margin-top: 12px; + margin-bottom: 2px; + color: #fff; + +} +.media-body.employee-name { + + background: #466b8d; + float: left; + margin: 0; + width: 100% + +} +.employee-prof .employee-name p { + + margin: 0 0 9px; + text-align: center; + font-size: 12px; + color: #f3f3f3; + +} +.employee-prof p { + margin: 0 0 9px; + color: #fff; +} +.employee-gender { + width: 40%; + margin-left: 10%; + padding: 8% 10% 4%; + text-align: center; + border-right: 1px solid #4d769b; + margin-top: 14%; + float: left; + border-bottom: 1px solid #4d769b; +} +.employee-gender p { + margin: 0px 0 4px !important; + color: #fff; +} +.employee-age { + width: 40%; + margin-right: 10%; + padding: 4% 10% 7%; + text-align: center; + margin-top: 18%; + float: left; + border-bottom: 1px solid #4d769b; +} +.employee-age p { + margin: 0 0 1px; + color: #fff; +} +.employee-experience { + + width: 100%; + text-align: center; + padding-top: 8%; + float: left; + padding-bottom: 3%; + +} +.employee-country { + width: 40%; + margin-left: 10%; + padding: 9% 0% 4%; + text-align: center; + border-right: 1px solid #4d769b; + margin-top: 2%; + float: left; + border-top: 1px solid #4d769b; + +} +.employee-country p { + margin: 0px 0 1px !important; + color: #fff; +} +.employee-mobile { + width: 40%; + margin-right: 10%; + padding: 9% 0% 7%; + text-align: center; + margin-top: 2%; + float: left; + border-top: 1px solid #4d769b; +} +.employee-mobile p { + margin: 0 0 1px; + color: #fff; +} +.oh-payslip { + + margin-top: 4.5%; + +} +.oh-payslip .stat-icon { + + width: 30%; + height: 85px; + text-align: center; + background: #ff8762; + color: #fff; + width: 32%; + padding-top: 2%; + font-size: xxx-large; + +} +.oh-payslip .oh-card { + + transition: transform 0.2s ease, box-shadow 0.2s ease; + will-change: transform, box-shadow; + box-shadow: 0 10px 40px 0 rgba(62,57,107,0.07), 0 2px 9px 0 rgba(62,57,107,0.06); + +} +.stat-widget-one .stat-text { + + font-size: 14px; + color: #ff8762; + margin-top: 2.3rem; + margin-left: 1rem; + +} +.stat-widget-one .stat-digit { + font-size: 26px; + color:#993232; + margin-left: 1rem; + margin-top: -1px; + font-family: initial +} + +.stat-widget-one .stat-icon i { + + font-size: 25px; + font-weight: 900; + display: inline-block; + color: #fff; + +} +.stat-widget-one { + + background-color: white; + text-align: left; + +} +.stat-widget-one { + width: 100%; +} +.oh-payslip .stat-icon { + + width: 30%; + height: 85px; + text-align: center; + padding-top: 2%; + +} +.oh-timesheets .stat-icon{ + background: #5ebade !important; +} +.oh-contracts .stat-icon{ + background: #b298e1 !important; +} +.oh-broad-factor .stat-icon{ + background: #70cac1 !important; +} +.oh-timesheets .stat-widget-one .stat-text { + color: #5ebade; +} +.oh-contracts .stat-widget-one .stat-text { + color: #b298e1; +} +.oh-broad-factor .stat-widget-one .stat-text { + color: #70cac1; +} +.leave-manager { + + background-color: #fff; + transition: transform 0.2s ease, box-shadow 0.2s ease; + will-change: transform, box-shadow; + box-shadow: 0 10px 40px 0 rgba(62,57,107,0.07), 0 2px 9px 0 rgba(62,57,107,0.06); + padding: 0px; + margin: 15px; + +} +.hr_leave_request_approve { + padding: 0; + padding-bottom: 0em; + padding-top: 0em; + transition: transform 0.2s ease, box-shadow 0.2s ease; + will-change: transform, box-shadow; +} +.leaves_request_month { + padding: 0; + padding-top: 0px; + padding-bottom: 0px; + padding-bottom: 0em; + padding-top: 0em; + transition: transform 0.2s ease, box-shadow 0.2s ease; + will-change: transform, box-shadow; + border-bottom: 1px solid #f1f1f133; +} +.leaves_request_today{ + padding: 0; + padding-bottom: 0em; + padding-top: 0em; + transition: transform 0.2s ease, box-shadow 0.2s ease; + will-change: transform, box-shadow; + +} +.hr_leave_request_approve:hover, .leaves_request_month:hover, .leaves_request_today:hover{ + transform: translateY(-2px) translateZ(0) !important; + box-shadow: 0 10px 10px 0 rgba(62, 57, 107, 0.12), 0 0 0 transparent !important; +} +.hr_leave_request_approve p { + font-size: 14px; + color: #ff8762; + margin-left: 1rem; + margin-bottom: 0px; + text-align: left; + width: 64%; + font-weight: bold; + float: left; +} +.leaves_request_today p { + font-size: 14px; + color: #5ebade; + margin-left: 1rem; + margin-bottom: 0px; + text-align: left; + width:64%; + float:left; + font-weight: bold; +} +.leaves_request_month p{ + font-size: 14px; + color: #b298e1; + margin-left: 1rem; + margin-bottom:0px; + text-align: left; + width:64%; + float:left; + font-weight: bold; +} +h4 .stat-count { + font-size: 17px; + text-align: center; + color: #000 !important; + margin-top: 0px; + width: 100%; + float: left; + margin: 0; +} +.leave-manager h4 { + float: left; + width: 23%; + +} +.hr_leave_request_approve h4 { + + padding: 5.2rem 0; + margin: 0; + background: #ff8762; + color: #fff; + +} +.leaves_request_today h4 { + + padding: 2.2rem 0; + margin: 0 !important; + background: #5ebade; + color: #fff; + +} +.leaves_request_month h4 { + + padding: 2.1rem 0; + margin: 0 !important; + background: #b298e1; + color: #fff; + +} +.leaves_request_today h4 .stat-count ,.leaves_request_month h4 .stat-count , .hr_leave_request_approve h4 .stat-count +{ + color:#fff !important; +} +.graph_view .legend { + margin-bottom: 27px; + display: inline-block; + border-collapse: collapse; + border-spacing: 0px; + margin-left: 29px; +} +.hr-chart-1{ + margin: 15px 0px; + background: #fff; + padding: 0px !important; + transition: transform 0.2s ease, box-shadow 0.2s ease; + will-change: transform, box-shadow; + box-shadow: 0 10px 40px 0 rgba(62,57,107,0.07), 0 2px 9px 0 rgba(62,57,107,0.06); +} +.hr-chart-1:hover{ + transform: translateY(-2px) translateZ(0) !important; + box-shadow: 0 10px 10px 0 rgba(62, 57, 107, 0.12), 0 0 0 transparent !important; +} +.stat-head { + text-align: left !important; + font-weight: 300; + font-size: 15px; + margin-bottom: 25px; + margin-left: 24px; + width: 100%; +} +.emp_graph { + padding-left: 90px; + height: auto; + padding-bottom: 65px; + text-align: center !important; +} +.hr_leave_allocations_approve p { + font-size: 14px; + color: #ff8762; + margin-left: 1rem; + margin-bottom: 0px; + text-align: left; + width: 70%; + float: left; + font-weight: bold; +} +.hr_leave_allocations_approve h4 { + + padding: 2.5rem 0; + margin: 0; + background: #ff8762; + color: #fff; + width: 26%; + float: left; +} +.hr_leave_allocations_approve .stat-count { + + font-size: 17px; + text-align: center; + color: #fff !important; + margin-top: 0px; + width: 100%; + float: left; + margin: 0; + +} +.hr_leave_allocations_approve { + + padding: 0; + padding-top: 0px; + padding-bottom: 0px; + padding-bottom: 0em; + padding-top: 0em; + box-shadow: 0 10px 40px 0 rgba(62,57,107,0.07), 0 2px 9px 0 rgba(62,57,107,0.06); + transition: transform 0.2s ease, box-shadow 0.2s ease; + will-change: transform, box-shadow; + background: #fff; + height: 80px; + +} +.hr_leave_allocations_approve:hover{ + transform: translateY(-2px) translateZ(0) !important; + box-shadow: 0 10px 10px 0 rgba(62, 57, 107, 0.12), 0 0 0 transparent !important; +} +.leave-manager { + + background-color: #fff; + transition: transform 0.2s ease, box-shadow 0.2s ease; + will-change: transform, box-shadow; + box-shadow: 0 10px 40px 0 rgba(62,57,107,0.07), 0 2px 9px 0 rgba(62,57,107,0.06); + padding: 0px; + margin: 15px; + margin-right: 15px; + margin-right: 0px; + width: 95% !important; + padding: 0; + +} +.hr_job_application_approve { + padding: 0; + padding-top: 0px; + padding-bottom: 0px; + padding-top: 0px; + padding-bottom: 0px; + padding-top: 0px; + padding-bottom: 0px; + padding-bottom: 0em; + padding-top: 0em; + box-shadow: 0 10px 40px 0 rgba(62,57,107,0.07), 0 2px 9px 0 rgba(62,57,107,0.06); + transition: transform 0.2s ease, box-shadow 0.2s ease; + will-change: transform, box-shadow; + background: #fff; + margin-top: 15px; + height: 80px; + +} +.hr_job_application_approve p { + font-size: 14px; + color: #70cac1; + margin-left: 1rem; + margin-bottom: 0px; + text-align: left; + width: 70%; + float: left; + font-weight: bold; +} +.hr_job_application_approve h4 { + + padding: 2.5rem 0; + margin: 0; + background: #70cac1; + color: #fff; + width: 26%; + float: left; + +} +.hr_job_application_approve .stat-count { + + font-size: 17px !important; + color: #fff !important; + margin-top: 0px !important; + width: 100%; + float: left; + margin: 0; + margin: 0px !important; + text-align: center !important; + width: 100% !important; + +} +.hr_job_application_approve:hover{ + transform: translateY(-2px) translateZ(0) !important; + box-shadow: 0 10px 10px 0 rgba(62, 57, 107, 0.12), 0 0 0 transparent !important; +} +.hr_attendance_login .oh-card { + margin: 0; + margin-bottom: 0px; + margin-bottom: 0px; + background: #134c8a; + padding-bottom: 7px; + transition: transform 0.2s ease, box-shadow 0.2s ease; + will-change: transform, box-shadow; + box-shadow: 0 10px 40px 0 rgba(62,57,107,0.07), 0 2px 9px 0 rgba(62,57,107,0.06); +} +.hr_attendance_login .stat-widget-one { + background: none; +} +.hr_attendance_login .stat-widget-one .stat-icon { + text-align: center; + padding-top: 9px; +} +.hr_attendance_login .stat-content { + width: 100%; + color: #fff !important; +} +.hr_attendance_login .stat-widget-one .stat-text { + margin: 0; + text-align: center; + width: 100% !important; + padding: 0; + color: #fff; +} +.hr_attendance_login .stat-widget-one .stat-icon .fa { + font-size: 50px; +} +.hr_attendance_login .stat-widget-one .stat-icon .fa { + font-size: 50px; + margin: 0px; + box-shadow: none; +} +.hr_attendance_login { + margin-top: 1.5%; +} +.monthly_leave_graph_view .oh-card { + background: #fff; + transition: transform 0.2s ease, box-shadow 0.2s ease; + will-change: transform, box-shadow; + box-shadow: 0 10px 40px 0 rgba(62,57,107,0.07), 0 2px 9px 0 rgba(62,57,107,0.06); + padding: 15px; +} +.broad_factor_graph .oh-card { + padding: 15px !important; + background: #fff; + transition: transform 0.2s ease, box-shadow 0.2s ease; + will-change: transform, box-shadow; + box-shadow: 0 10px 40px 0 rgba(62,57,107,0.07), 0 2px 9px 0 rgba(62,57,107,0.06); + padding: 15px; +} +.leave_broad_factor { + overflow-x: auto !important; + overflow-y: hidden !important; + height: 336px; + padding: 0px; + padding-left: 0px; +} +#broad_factor_pdf { + + background-color: #ffffff; + float: right; + border-radius: 30px; + transition: transform 0.2s ease, box-shadow 0.2s ease; + will-change: transform, box-shadow; + box-shadow: 0 10px 40px 0 rgba(62,57,107,0.07), 0 2px 9px 0 rgba(62,57,107,0.06); + border: 1px solid #4ec3b7; + color: #757575; + padding-top: 9px; + color: #4ec3b7; + +} +#broad_factor_pdf:hover{ + transform: translateY(-2px) translateZ(0) !important; + box-shadow: 0 10px 10px 0 rgba(62, 57, 107, 0.12), 0 0 0 transparent !important; +} +.hr_birthday { + font-size: 17px; + text-align: center; + padding: 20px 0; + color: #00438b; + font-weight: 300; +} +.hr_notification img { + width: 40px; + height: 40px; + border-radius: 100%; +} +.hr_notification { + background: #fff; + transition: transform 0.2s ease, box-shadow 0.2s ease; + will-change: transform, box-shadow; + box-shadow: 0 10px 40px 0 rgba(62,57,107,0.07), 0 2px 9px 0 rgba(62,57,107,0.06); + height: 316px; + overflow-y: auto; + margin-bottom: 15px; +} +.hr_notification .media { + border-bottom: 1px solid #e6e6e6; + padding-bottom: 6px; + margin-bottom: 10px; +} +.hr_notification .text-color.display-6 { + margin: 0px 0 3px; + color: #2d2d2d; +} +.hr_notification p { + margin: 0 0 1px; + color: #666; + font-size: 10px; +} +.hr_notification_head { + font-size: 17px; + text-align: center; + padding: 12px 0; + color: #fff; + font-weight: 300; + background: #de6a5e; + margin-bottom: 9px; +} +.monthly_leave_trend .oh-card{ + background: #fff; + transition: none !important; + will-change: none !important; + box-shadow: none !important; + margin-bottom: 5px; +} + +.monthly_leave_trend path { + stroke: #70cac1; + stroke-width: 2; + fill: none; +} + +.monthly_leave_trend .axis path, +.monthly_leave_trend .axis line { + fill: none; + stroke: grey; + stroke-width: 1; + shape-rendering: crispEdges; +} +.monthly_leave_trend circle{ + fill: #ffffff; + stroke: #44b7ac; + stroke-width: 1.5; +} +.hr-chart-1 { + margin: 15px 0px; + background: #fff; + padding: 0px !important; + padding-top: 0px; + transition: transform 0.2s ease, box-shadow 0.2s ease; + will-change: transform, box-shadow; + box-shadow: 0 10px 40px 0 rgba(62,57,107,0.07), 0 2px 9px 0 rgba(62,57,107,0.06); + padding-top: 3px !important; +} +.monthly_leave_trend { + background: #fff; + transition: transform 0.2s ease, box-shadow 0.2s ease; + will-change: transform, box-shadow; + box-shadow: 0 10px 40px 0 rgba(62,57,107,0.07), 0 2px 9px 0 rgba(62,57,107,0.06); +} +.monthly_leave_trend:hover{ + transform: translateY(-2px) translateZ(0) !important; + box-shadow: 0 10px 10px 0 rgba(62, 57, 107, 0.12), 0 0 0 transparent !important; +} + + +/*----------------------*/ +.monthly_join_resign_trend{ + padding-right: 0px !important; +} + +.monthly_join_resign_trend .oh-card { + background: #fff; + transition: transform 0.2s ease, box-shadow 0.2s ease; + will-change: transform, box-shadow; + box-shadow: 0 10px 40px 0 rgba(62,57,107,0.07), 0 2px 9px 0 rgba(62,57,107,0.06); + padding: 15px; +} + +.monthly_join_resign_trend .axis path, +.monthly_join_resign_trend .axis line { + fill: none; + shape-rendering: crispEdges; + } + +.monthly_join_resign_trend .line { + fill: none; + stroke-width: 3px; + + } + +.monthly_join_resign_trend .area { + fill: steelblue; + opacity: 0.5; + } + +.monthly_join_resign_trend .dot { + fill: steelblue; + stroke: steelblue; + stroke-width: 1.5px; + } + +/*----------------------------------------*/ + + +.monthly_attrition_rate path { + stroke: #70cac1; + stroke-width: 2; + fill: none; +} + +.monthly_attrition_rate .axis path, +.monthly_attrition_rate .axis line { + fill: none; + stroke: grey; + stroke-width: 1; + shape-rendering: crispEdges; +} +.monthly_attrition_rate circle{ + fill: #ffffff; + stroke: #44b7ac; + stroke-width: 1.5; +} + +.monthly_attrition_rate .oh-card { + background: #fff; + transition: transform 0.2s ease, box-shadow 0.2s ease; + will-change: transform, box-shadow; + box-shadow: 0 10px 40px 0 rgba(62,57,107,0.07), 0 2px 9px 0 rgba(62,57,107,0.06); + padding: 15px; +} + +.monthly_attrition_rate .oh-card:hover{ + transform: translateY(-2px) translateZ(0) !important; + box-shadow: 0 10px 10px 0 rgba(62, 57, 107, 0.12), 0 0 0 transparent !important; +} + + +.row.main-section { + margin-right: 0px; !important; +} +/* width */ +.hr_notification::-webkit-scrollbar { + width: 4px; +} + +/* Track */ +.hr_notification::-webkit-scrollbar-track { + background: #f1f1f1; +} + +/* Handle */ +.hr_notification::-webkit-scrollbar-thumb { + background: #5ebade; +} + +/* Handle on hover */ +.hr_notification::-webkit-scrollbar-thumb:hover { + background: #598da1; +} + +.oh-card-body { + display: flex; + justify-content: space-between; + align-items: center; +} + +.oh-ribbon { + position: absolute; + left: -5px; top: -5px; + z-index: 1; + overflow: hidden; + width: 150px; height: 150px; + text-align: right; +} +.oh-ribbon span { + font-size: 10px; + font-weight: bold; + color: #FFF; + text-transform: uppercase; + text-align: center; + line-height: 20px; + transform: rotate(-45deg); + -webkit-transform: rotate(-45deg); + width: 200px; + display: block; + background: #79A70A; + background: linear-gradient(#2989d8 0%, #1e5799 100%); + box-shadow: 0 3px 10px -5px rgba(0, 0, 0, 1); + position: absolute; + top: 56px; + left: -35px; +} +.oh-ribbon span::before { + content: ""; + position: absolute; left: 0px; top: 100%; + z-index: -1; + border-left: 3px solid #1e5799; + border-right: 3px solid transparent; + border-bottom: 3px solid transparent; + border-top: 3px solid #1e5799; +} +.oh-ribbon span::after { + content: ""; + position: absolute; right: 0px; top: 100%; + z-index: -1; + border-left: 3px solid transparent; + border-right: 3px solid #1e5799; + border-bottom: 3px solid transparent; + border-top: 3px solid #1e5799; +} + +.o_action_manager{ + overflow-y: scroll !important; + max-width:100%; + } + + .hr_notification { + + margin-top: 20px; +} + +.stat_count{ + margin-top: -111px; + margin-left: 35px; + font-size: 48px; +} + + +.stat-head { + text-align: left !important; + font-weight: 300; + font-size: 18px; + margin-bottom: 25px; + margin-left: 24px; + width: 100%; + margin-top: 57px; +} \ No newline at end of file diff --git a/dashboard_pos/static/src/js/pos_dashboard.js b/dashboard_pos/static/src/js/pos_dashboard.js new file mode 100644 index 000000000..4366c7797 --- /dev/null +++ b/dashboard_pos/static/src/js/pos_dashboard.js @@ -0,0 +1,431 @@ +/** @odoo-module **/ +import { registry } from "@web/core/registry"; +import { session } from "@web/session"; +import { _t } from "@web/core/l10n/translation"; +import { Component } from "@odoo/owl"; +import { onWillStart, onMounted, useState } from "@odoo/owl"; +import { useService } from "@web/core/utils/hooks"; +import { user } from "@web/core/user"; +const actionRegistry = registry.category("actions"); +export class PosDashboard extends Component{ +//Initializes the PosDashboard component, + setup() { + super.setup(...arguments); + this.orm = useService('orm') + this.user = user; + this.actionService = useService("action"); + this.state = useState({ + payment_details : [], + top_salesperson : [], + selling_product : [], + total_sale: [], + total_order_count: [], + total_refund_count : [], + total_session:[], + today_refund_total:[], + today_sale:[], + }); + // When the component is about to start, fetch data in tiles + onWillStart(async () => { + await this.fetch_data(); + }); + //When the component is mounted, render various charts + onMounted(async () => { + await this.render_top_customer_graph(); + await this.render_top_product_graph(); + await this.render_product_category_graph(); + await this.onclick_pos_sales('Hourly'); + }); + } + async fetch_data() { + // Function to fetch all the pos details + var result = await this.orm.call('pos.order','get_refund_details',[]) + this.state.total_sale = result['total_sale'], + this.state.total_order_count = result['total_order_count'] + this.state.total_refund_count = result['total_refund_count'] + this.state.total_session = result['total_session'] + this.state.today_refund_total = result['today_refund_total'] + this.state.today_sale = result['today_sale'] + var data = await this.orm.call('pos.order','get_details',[]) + this.state.payment_details = data['payment_details'] + this.state.top_salesperson = data['salesperson'] + this.state.selling_product = data['selling_product'] + } + pos_order_today (e){ + //To get the details of today's order + var self = this; + var date = new Date(); + var yesterday = new Date(date.getTime()); + yesterday.setDate(date.getDate() - 1); + e.stopPropagation(); + e.preventDefault(); + this.user.hasGroup('hr.group_hr_user').then(function(has_group){ + if(has_group){ + var options = { + on_reverse_breadcrumb: self.on_reverse_breadcrumb, + }; + self.actionService.doAction({ + name: _t("Today Order"), + type: 'ir.actions.act_window', + res_model: 'pos.order', + view_mode: 'tree,form,calendar', + view_type: 'form', + views: [[false, 'list'],[false, 'form']], + domain: [['date_order','<=', date],['date_order', '>=', yesterday]], + target: 'current' + }, options) + } + }); + } + pos_refund_orders (e){ + // To get the details of refund orders + var self = this; + var date = new Date(); + var yesterday = new Date(date.getTime()); + yesterday.setDate(date.getDate() - 1); + e.stopPropagation(); + e.preventDefault(); + this.user.hasGroup('hr.group_hr_user').then(function(has_group){ + if(has_group){ + var options = { + on_reverse_breadcrumb: self.on_reverse_breadcrumb, + }; + self.actionService.doAction({ + name: _t("Refund Orders"), + type: 'ir.actions.act_window', + res_model: 'pos.order', + view_mode: 'tree,form,calendar', + view_type: 'form', + views: [[false, 'list'],[false, 'form']], + domain: [['amount_total', '<', 0.0]], + target: 'current' + }, options) + } + }); + } + pos_refund_today_orders (e){ + // To get the details of today's order + var self = this; + var date = new Date(); + var yesterday = new Date(date.getTime()); + yesterday.setDate(date.getDate() - 1); + e.stopPropagation(); + e.preventDefault(); + this.user.hasGroup('hr.group_hr_user').then(function(has_group){ + if(has_group){ + var options = { + on_reverse_breadcrumb: self.on_reverse_breadcrumb, + }; + self.actionService.doAction({ + name: _t("Refund Orders"), + type: 'ir.actions.act_window', + res_model: 'pos.order', + view_mode: 'tree,form,calendar', + view_type: 'form', + views: [[false, 'list'],[false, 'form']], + domain: [['amount_total', '<', 0.0],['date_order','<=', date],['date_order', '>=', yesterday]], + target: 'current' + }, options) + } + }); + } + pos_order (e){ + // To get total orders details + var self = this; + var date = new Date(); + var yesterday = new Date(date.getTime()); + yesterday.setDate(date.getDate() - 1); + e.stopPropagation(); + e.preventDefault(); + this.user.hasGroup('hr.group_hr_user').then(function(has_group){ + if(has_group){ + var options = { + on_reverse_breadcrumb: self.on_reverse_breadcrumb, + }; + self.actionService.doAction({ + name: _t("Total Order"), + type: 'ir.actions.act_window', + res_model: 'pos.order', + view_mode: 'tree,form,calendar', + view_type: 'form', + views: [[false, 'list'],[false, 'form']], + target: 'current' + }, options) + } + }); + } + pos_session (e){ + // To get the Session wise details + var self = this; + e.stopPropagation(); + e.preventDefault(); + this.user.hasGroup('hr.group_hr_user').then(function(has_group){ + if(has_group){ + var options = { + on_reverse_breadcrumb: self.on_reverse_breadcrumb, + }; + self.actionService.doAction({ + name: _t("sessions"), + type: 'ir.actions.act_window', + res_model: 'pos.session', + view_mode: 'tree,form,calendar', + view_type: 'form', + views: [[false, 'list'],[false, 'form']], + target: 'current' + }, options) + } + }); + } + onclick_pos_sales (events){ + // To get the Sale bar chart + var option = $(events.target).val(); + var self = this + var ctx = $("#canvas_1"); + this.orm.call('pos.order', 'get_department',[option]) + .then(function (arrays) { + var data = { + labels: arrays[1], + datasets: [ + { + label: arrays[2], + data: arrays[0], + backgroundColor: [ + "rgba(255, 99, 132,1)", + "rgba(54, 162, 235,1)", + "rgba(75, 192, 192,1)", + "rgba(153, 102, 255,1)", + "rgba(10,20,30,1)" + ], + borderColor: [ + "rgba(255, 99, 132, 0.2)", + "rgba(54, 162, 235, 0.2)", + "rgba(75, 192, 192, 0.2)", + "rgba(153, 102, 255, 0.2)", + "rgba(10,20,30,0.3)" + ], + borderWidth: 1 + }, + ] + }; + //options + var options = { + responsive: true, + title: { + display: true, + position: "top", + text: "SALE DETAILS", + fontSize: 18, + fontColor: "#111" + }, + legend: { + display: true, + position: "bottom", + labels: { + fontColor: "#333", + fontSize: 16 + } + } + }; + //create Chart class object + if (window.myCharts != undefined) + window.myCharts.destroy(); + window.myCharts = new Chart(ctx, { + type: "bar", + data: data, + options: options + }); + + }); + } + render_top_customer_graph(){ + // To render the top customer pie chart + var self = this + var ctx = $(".top_customer"); + this.orm.call('pos.order', 'get_the_top_customer') + .then(function (arrays) { + var data = { + labels: arrays[1], + datasets: [ + { + label: "", + data: arrays[0], + backgroundColor: [ + "rgb(148, 22, 227)", + "rgba(54, 162, 235)", + "rgba(75, 192, 192)", + "rgba(153, 102, 255)", + "rgba(10,20,30)" + ], + borderColor: [ + "rgba(255, 99, 132,)", + "rgba(54, 162, 235,)", + "rgba(75, 192, 192,)", + "rgba(153, 102, 255,)", + "rgba(10,20,30,)" + ], + borderWidth: 1 + }, + + ] + }; + //options + var options = { + responsive: true, + scales: { + x: { + title: { + display: true, + text: "Top Customer", + position: "top", + fontSize: 24, + color: "#111" + } + } + }, + legend: { + display: true, + position: "bottom", + labels: { + fontColor: "#333", + fontSize: 16 + } + } + }; + //create Chart class object + var chart = new Chart(ctx, { + type: "pie", + data: data, + options: options + }); + + }); + } + render_top_product_graph (){ + // To render the top product graph + var self = this + var ctx = $(".top_selling_product"); + this.orm.call('pos.order', 'get_the_top_products') + .then(function (arrays) { + var data = { + + labels: arrays[1], + datasets: [ + { + label: "Quantity", + data: arrays[0], + backgroundColor: [ + "rgba(255, 99, 132,1)", + "rgba(54, 162, 235,1)", + "rgba(75, 192, 192,1)", + "rgba(153, 102, 255,1)", + "rgba(10,20,30,1)" + ], + borderColor: [ + "rgba(255, 99, 132, 0.2)", + "rgba(54, 162, 235, 0.2)", + "rgba(75, 192, 192, 0.2)", + "rgba(153, 102, 255, 0.2)", + "rgba(10,20,30,0.3)" + ], + borderWidth: 1 + }, + + ] + }; + //options + var options = { + responsive: true, + indexAxis: 'y', + legend: { + display: true, + position: "bottom", + labels: { + fontColor: "#333", + fontSize: 16 + } + }, + scales: { + x: { + title: { + display: true, + text: "Top products", + position: "top", + fontSize: 24, + color: "#111" + } + } + }, + }; + //create Chart class object + var chart = new Chart(ctx, { + type: "bar", + data: data, + options: options + }); + }); + } + render_product_category_graph (){ + // To render the product category graph + var self = this + var ctx = $(".top_product_categories"); + this.orm.call('pos.order', 'get_the_top_categories') + .then(function (arrays) { + var data = { + labels: arrays[1], + datasets: [ + { + label: "Quantity", + data: arrays[0], + backgroundColor: [ + "rgba(255, 99, 132,1)", + "rgba(54, 162, 235,1)", + "rgba(75, 192, 192,1)", + "rgba(153, 102, 255,1)", + "rgba(10,20,30,1)" + ], + borderColor: [ + "rgba(255, 99, 132, 0.2)", + "rgba(54, 162, 235, 0.2)", + "rgba(75, 192, 192, 0.2)", + "rgba(153, 102, 255, 0.2)", + "rgba(10,20,30,0.3)" + ], + borderWidth: 1 + }, + ] + }; + //options + var options = { + responsive: true, + scales: { + x: { + title: { + display: true, + text: "Top product categories", + position: "top", + fontSize: 24, + color: "#111" + } + } + }, + legend: { + display: true, + position: "bottom", + labels: { + fontColor: "#333", + fontSize: 16 + } + }, + indexAxis: 'y', + }; + //create Chart class object + var chart = new Chart(ctx, { + type: "bar", + data: data, + options: options + }); + }); + } +} +PosDashboard.template = 'PosDashboard' +registry.category("actions").add("pos_order_menu", PosDashboard) diff --git a/dashboard_pos/static/src/xml/pos_dashboard.xml b/dashboard_pos/static/src/xml/pos_dashboard.xml new file mode 100644 index 000000000..b7793359b --- /dev/null +++ b/dashboard_pos/static/src/xml/pos_dashboard.xml @@ -0,0 +1,313 @@ + + + + +
+
+
+
+
+
+
+
+
+
Today Orders
+
+
+
+
+
+
+
+
+
+
+
+
+
Total Orders
+
+
+
+
+
+
+
+
+
+
+
+
+
Total Sales
+
+
+
+
+
+
+
+
+
+
+
+
+
Sessions
+
+
+
+
+
+
+ +
+
+
+
+
+
+
Total Refund Orders
+
+
+
+
+
+
+
+
+
+
+
+
+
Today Refund Order
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +

SALE REPORT

+
+
+
+ +
+
+

SALE DETAILS

+
+
+
+

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

+

+
+ +
+
+
+
+
+

+

+
+ +
+
+
+
+
+

+

+
+ +
+
+
+
+ +
+
+
+
+
+ Sale by Salesperson +
+
+
+
+
+
+ + + + + + + + + + + + + + + + + +
Name   OrdersAmount
+

+ +

+
+

+ +

+
+

+ +

+
+
+
+
+
+
+
+
+ Payment Method +
+
+
+
+
+
+ + + + + + + + + + + + + + + +
Payment Method   Amount
+

+ +

+
+

+ +

+
+
+
+
+
+
+
+
+ Session Status +
+
+
+
+
+
+ + + + + + + + + + + + + + + +
Session   Status
+

+ +

+
+

+ +

+
+
+
+
+
+
+
+
+
diff --git a/dashboard_pos/views/pos_order_views.xml b/dashboard_pos/views/pos_order_views.xml new file mode 100644 index 000000000..b7a9353df --- /dev/null +++ b/dashboard_pos/views/pos_order_views.xml @@ -0,0 +1,13 @@ + + + + + Dashboard + pos_order_menu + + + +