From 6daa038bd494aee7bf5eeafc695ad146095eb0f0 Mon Sep 17 00:00:00 2001 From: Alaguraj0361 Date: Mon, 12 Oct 2026 17:27:58 +0530 Subject: [PATCH] add Shivasakthi theme layout, dashboard components, and reservation models --- .../static/src/css/home_menu.css | 424 ++++++++++++++++-- .../static/src/js/dashboard_pages.js | 57 +++ .../views/dashboard_components.xml | 51 ++- addons/dine360_kds/models/pos_order_line.py | 19 +- .../models/reservation_holiday.py | 2 +- .../models/restaurant_reservation.py | 2 +- .../views/reservation_templates.xml | 37 +- .../views/about_page.xml | 2 +- .../views/checkout_address.xml | 9 + .../views/faq_page.xml | 2 +- .../views/layout.xml | 2 +- 11 files changed, 515 insertions(+), 92 deletions(-) diff --git a/addons/dine360_dashboard/static/src/css/home_menu.css b/addons/dine360_dashboard/static/src/css/home_menu.css index 7fba280..29cd082 100644 --- a/addons/dine360_dashboard/static/src/css/home_menu.css +++ b/addons/dine360_dashboard/static/src/css/home_menu.css @@ -1,6 +1,3 @@ -@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap'); -@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css'); - /* Direct FontAwesome font-face declaration with reliable paths */ @font-face { font-family: 'FontAwesome'; @@ -1877,7 +1874,8 @@ body.o_saas_admin_body h4, body.o_saas_admin_body h5, body.o_saas_admin_body h6, background: #ffffff; border: 1px solid #e2e8f0; border-radius: 16px; - overflow: hidden; + overflow-x: auto !important; + -webkit-overflow-scrolling: touch !important; box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.04); } @@ -2468,114 +2466,444 @@ body.o_saas_admin_body h4, body.o_saas_admin_body h5, body.o_saas_admin_body h6, /* ------------------------------------------------------------- Responsive Mobile & Tablet Viewport Adaptations ------------------------------------------------------------- */ + +/* Sidebar Brand Row with Close Button */ +.o_sidebar_brand_row { + display: flex; + align-items: center; + justify-content: space-between; + margin-bottom: 28px; +} + +.o_btn_sidebar_close { + display: none; + border: none; + background: #f1f5f9; + color: #64748b; + width: 34px; + height: 34px; + border-radius: 10px; + align-items: center; + justify-content: center; + cursor: pointer; + font-size: 16px; + transition: all 0.2s ease; +} + +.o_btn_sidebar_close:hover { + background: #fee2e2; + color: #e50000; +} + +/* Off-canvas Overlay Backdrop */ +.o_sidebar_overlay { + position: fixed; + top: 0; + left: 0; + width: 100vw; + height: 100vh; + background: rgba(15, 23, 42, 0.6); + backdrop-filter: blur(4px); + -webkit-backdrop-filter: blur(4px); + z-index: 1040; + opacity: 0; + pointer-events: none; + transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1); +} + +.o_sidebar_overlay.o_sidebar_open { + opacity: 1; + pointer-events: auto; +} + +/* Topbar Left Controls (Hamburger & Brand) */ +.o_topbar_left { + display: flex; + align-items: center; + gap: 14px; + flex: 1; +} + +.o_btn_mobile_toggle { + display: none; + width: 40px; + height: 40px; + border-radius: 10px; + border: 1px solid #e2e8f0; + background: #ffffff; + color: #0f172a; + align-items: center; + justify-content: center; + font-size: 16px; + cursor: pointer; + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04); + transition: all 0.2s ease; +} + +.o_btn_mobile_toggle:hover { + background: #fff1f2; + color: #e50000; + border-color: #fee2e2; +} + +.o_mobile_brand { + display: none; + align-items: center; +} + +/* 1. Large Tablets & Small Desktops (max-width: 1200px) */ @media (max-width: 1200px) { + .o_middle_grid { + grid-template-columns: 1fr 1fr !important; + gap: 18px !important; + } + .o_card_activity { + grid-column: span 2 !important; + } + .o_bottom_grid { + grid-template-columns: 1fr !important; + gap: 18px !important; + } + .o_res_row_card { + grid-template-columns: 1.4fr 1.4fr 1fr !important; + gap: 16px !important; + } + .o_plans_grid { + grid-template-columns: repeat(2, minmax(0, 1fr)) !important; + gap: 20px !important; + } .o_apps_grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 18px !important; } } +/* 2. Standard Tablets & Mobile Viewports (max-width: 991px) */ @media (max-width: 991px) { - .o_saas_layout { - flex-direction: column !important; - width: 100% !important; + html, body, .o_dine_dashboard_root, .o_restaurant_body { + max-width: 100vw !important; overflow-x: hidden !important; } - .o_saas_sidebar { - position: static !important; + + .o_saas_layout { + position: relative !important; + flex-direction: column !important; width: 100% !important; - max-width: 100% !important; - min-width: 0 !important; - height: auto !important; - padding: 14px 16px !important; - border-right: none !important; - border-bottom: 1px solid #e2e8f0 !important; - box-sizing: border-box !important; + max-width: 100vw !important; + overflow-x: hidden !important; } - .o_sidebar_brand { - margin-bottom: 12px !important; + + /* Off-canvas Drawer Navigation */ + .o_saas_sidebar { + position: fixed !important; + top: 0 !important; + left: 0 !important; + bottom: 0 !important; + width: 290px !important; + max-width: 85vw !important; + height: 100vh !important; + z-index: 1050 !important; + background: #ffffff !important; + transform: translateX(-100%) !important; + transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important; + box-shadow: none !important; + padding: 20px 18px !important; + overflow-y: auto !important; } - .o_sidebar_nav { - flex-direction: row !important; - overflow-x: auto !important; - flex-wrap: nowrap !important; - gap: 6px !important; - -webkit-overflow-scrolling: touch !important; - padding-bottom: 4px !important; + + .o_saas_sidebar.o_sidebar_open { + transform: translateX(0) !important; + box-shadow: 0 0 45px rgba(0, 0, 0, 0.35) !important; } - .o_nav_link { - white-space: nowrap !important; - padding: 6px 12px !important; - font-size: 13px !important; - flex-shrink: 0 !important; + + .o_btn_sidebar_close { + display: inline-flex !important; } - .o_nav_link.active::before { - display: none !important; + + .o_btn_mobile_toggle { + display: inline-flex !important; } - .o_sidebar_promo { - display: none !important; + + .o_mobile_brand { + display: inline-flex !important; } + .o_saas_main { margin-left: 0 !important; width: 100% !important; max-width: 100% !important; - padding: 16px 14px !important; + padding: 16px 16px 36px 16px !important; box-sizing: border-box !important; } + + .o_middle_grid { + grid-template-columns: 1fr !important; + gap: 16px !important; + } + .o_card_activity { + grid-column: span 1 !important; + } + + .o_res_row_card { + grid-template-columns: 1fr 1fr !important; + gap: 14px !important; + padding: 18px 20px !important; + } + .o_kpi_grid { - grid-template-columns: repeat(2, 1fr) !important; + grid-template-columns: repeat(2, minmax(0, 1fr)) !important; + gap: 14px !important; + } + + .o_settings_grid { + grid-template-columns: 1fr !important; + gap: 16px !important; } } +/* 3. Small Mobile Devices (max-width: 767px) */ @media (max-width: 767px) { .o_saas_topbar { - flex-direction: column-reverse !important; + flex-direction: column !important; align-items: stretch !important; gap: 12px !important; + margin-bottom: 20px !important; } + + .o_topbar_left { + justify-content: space-between !important; + width: 100% !important; + } + + .o_topbar_actions { + width: 100% !important; + justify-content: flex-end !important; + gap: 8px !important; + } + .o_search_container { width: 100% !important; + max-width: 100% !important; } - .o_topbar_actions { - justify-content: flex-end !important; - width: 100% !important; - } + .o_page_header { flex-direction: column !important; - align-items: flex-start !important; - gap: 12px !important; + align-items: stretch !important; + gap: 14px !important; + margin-bottom: 18px !important; } + + .o_heading_title { + font-size: 22px !important; + } + + .o_heading_subtitle { + font-size: 12px !important; + } + .o_header_controls { - flex-wrap: wrap !important; + flex-direction: column !important; + align-items: stretch !important; + gap: 8px !important; width: 100% !important; } + + .o_status_tag, .o_date_picker_btn { + width: 100% !important; + justify-content: center !important; + text-align: center !important; + } + + .o_btn_red_action { + width: 100% !important; + justify-content: center !important; + padding: 10px 16px !important; + height: 42px !important; + } + + .o_kpi_grid { + grid-template-columns: 1fr !important; + gap: 12px !important; + } + + .o_kpi_card { + padding: 18px 16px !important; + } + + .o_kpi_number { + font-size: 26px !important; + } + + .o_activity_content { + flex-direction: column !important; + align-items: stretch !important; + gap: 16px !important; + } + + .o_substats_col { + border-left: none !important; + border-top: 1px solid #f1f5f9 !important; + padding-left: 0 !important; + padding-top: 16px !important; + width: 100% !important; + } + + .o_res_row_card { + display: flex !important; + flex-direction: column !important; + align-items: stretch !important; + gap: 14px !important; + padding: 16px !important; + } + + .o_res_actions_col { + width: 100% !important; + display: flex !important; + gap: 10px !important; + } + + .o_res_actions_col .o_btn_launch_red, + .o_res_actions_col .o_btn_manage_white { + flex: 1 !important; + text-align: center !important; + } + .o_page_toolbar { flex-direction: column !important; align-items: stretch !important; - gap: 12px !important; + gap: 10px !important; } + .o_toolbar_search { width: 100% !important; } + .o_filter_pills { overflow-x: auto !important; flex-wrap: nowrap !important; padding-bottom: 6px !important; -webkit-overflow-scrolling: touch !important; } + .o_filter_pill { white-space: nowrap !important; flex-shrink: 0 !important; + padding: 6px 12px !important; + font-size: 12px !important; } - .o_kpi_grid { + + .o_modern_table_card { + overflow-x: auto !important; + -webkit-overflow-scrolling: touch !important; + border-radius: 12px !important; + width: 100% !important; + } + + .o_modern_table { + min-width: 580px !important; + } + + .o_modern_table th, + .o_modern_table td { + padding: 12px 14px !important; + font-size: 12.5px !important; + } + + .o_tables_grid { + grid-template-columns: repeat(2, minmax(0, 1fr)) !important; + gap: 12px !important; + } + + .o_table_tile { + padding: 14px 10px !important; + border-radius: 12px !important; + } + + .o_table_num { + font-size: 15px !important; + } + + .o_plans_grid { + grid-template-columns: 1fr !important; + gap: 16px !important; + } + + .o_apps_grid { grid-template-columns: 1fr !important; gap: 14px !important; } - .o_apps_grid { + + .o_quick_apps_grid { grid-template-columns: 1fr !important; - gap: 16px !important; + gap: 10px !important; + } + + .o_modal_dialog { + width: 95% !important; + max-width: 95% !important; + margin: 10px !important; + border-radius: 16px !important; + } + + .o_modal_header { + padding: 16px 18px !important; + } + + .o_modal_body { + padding: 18px !important; + max-height: 80vh !important; + } + + .o_modal_footer { + padding: 14px 18px !important; + flex-direction: column-reverse !important; + } + + .o_modal_footer button { + width: 100% !important; + } +} + +/* 4. Ultra-compact Phones (max-width: 480px) */ +@media (max-width: 480px) { + .o_saas_main { + padding: 12px 10px 28px 10px !important; + } + + .o_heading_title { + font-size: 20px !important; + } + + .o_kpi_card { + padding: 14px 12px !important; + } + + .o_kpi_number { + font-size: 24px !important; + } + + .o_tables_grid { + grid-template-columns: repeat(2, minmax(0, 1fr)) !important; + gap: 8px !important; + } + + .o_table_tile { + padding: 10px 8px !important; + } + + .o_table_icon_wrap { + width: 38px !important; + height: 38px !important; + font-size: 16px !important; + margin-bottom: 8px !important; + } + + .o_btn_toggle_table { + padding: 4px 8px !important; + font-size: 11px !important; } } + \ No newline at end of file diff --git a/addons/dine360_dashboard/static/src/js/dashboard_pages.js b/addons/dine360_dashboard/static/src/js/dashboard_pages.js index 99f787f..81a5a32 100644 --- a/addons/dine360_dashboard/static/src/js/dashboard_pages.js +++ b/addons/dine360_dashboard/static/src/js/dashboard_pages.js @@ -29,6 +29,63 @@ document.addEventListener('DOMContentLoaded', function () { } // ------------------------------------------------------------- + // Mobile Navigation Drawer Toggle & Backdrop Handlers + // ------------------------------------------------------------- + const btnMobileToggle = document.getElementById('btnMobileSidebarToggle'); + const btnSidebarClose = document.getElementById('btnSidebarClose'); + const sidebarBackdrop = document.getElementById('sidebarBackdrop'); + const saasSidebar = document.querySelector('.o_saas_sidebar'); + + function openMobileSidebar() { + if (saasSidebar) saasSidebar.classList.add('o_sidebar_open'); + if (sidebarBackdrop) sidebarBackdrop.classList.add('o_sidebar_open'); + document.body.style.overflow = 'hidden'; + } + + function closeMobileSidebar() { + if (saasSidebar) saasSidebar.classList.remove('o_sidebar_open'); + if (sidebarBackdrop) sidebarBackdrop.classList.remove('o_sidebar_open'); + document.body.style.overflow = ''; + } + + if (btnMobileToggle) { + btnMobileToggle.addEventListener('click', function (e) { + e.preventDefault(); + e.stopPropagation(); + openMobileSidebar(); + }); + } + + if (btnSidebarClose) { + btnSidebarClose.addEventListener('click', function (e) { + e.preventDefault(); + e.stopPropagation(); + closeMobileSidebar(); + }); + } + + if (sidebarBackdrop) { + sidebarBackdrop.addEventListener('click', function (e) { + e.preventDefault(); + closeMobileSidebar(); + }); + } + + // Auto-close drawer on link click in mobile view + document.querySelectorAll('.o_saas_sidebar .o_nav_link').forEach(link => { + link.addEventListener('click', function () { + if (window.innerWidth <= 991) { + closeMobileSidebar(); + } + }); + }); + + // Close on Escape key + document.addEventListener('keydown', function (e) { + if (e.key === 'Escape') { + closeMobileSidebar(); + } + }); // Toast Notification Utility // ------------------------------------------------------------- function showToast(message, type = 'success') { diff --git a/addons/dine360_dashboard/views/dashboard_components.xml b/addons/dine360_dashboard/views/dashboard_components.xml index 4d47ab2..02d5523 100644 --- a/addons/dine360_dashboard/views/dashboard_components.xml +++ b/addons/dine360_dashboard/views/dashboard_components.xml @@ -4,23 +4,28 @@ @@ -108,9 +115,17 @@