182 lines
10 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- ============================================================== -->
<!-- 1. REUSABLE DASHBOARD SIDEBAR COMPONENT -->
<!-- ============================================================== -->
<template id="dashboard_sidebar" name="Dashboard Sidebar">
<aside class="o_saas_sidebar">
<div class="o_sidebar_top">
<!-- Logo Brand -->
<a href="/" class="o_sidebar_brand text-decoration-none">
<svg class="o_brand_logo_svg" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M18 4C14.5 4 12 6.5 12 9.5C10 9.8 8.5 11.5 8.5 13.5C8.5 15.2 9.6 16.6 11.2 17.1C11.1 17.5 11 18 11 18.5C11 21.5 13.5 24 16.5 24H19.5C22.5 24 25 21.5 25 18.5C25 18 24.9 17.5 24.8 17.1C26.4 16.6 27.5 15.2 27.5 13.5C27.5 11.5 26 9.8 24 9.5C24 6.5 21.5 4 18 4Z" fill="#fee2e2" stroke="#e50000" stroke-width="2.2" stroke-linejoin="round"/>
<path d="M12 24V28C12 29.1 12.9 30 14 30H22C23.1 30 24 29.1 24 28V24" stroke="#e50000" stroke-width="2.2" stroke-linecap="round"/>
<path d="M14 27H22" stroke="#e50000" stroke-width="1.8" stroke-linecap="round"/>
</svg>
<div>
<div class="o_brand_title">Dine<span class="text-danger">360</span></div>
<div class="o_brand_tagline">
<t t-if="is_saas_master">Restaurant Management Platform</t>
<t t-else=""><t t-esc="stats.get('company_name', 'Restaurant Platform')"/></t>
</div>
</div>
</a>
<!-- Nav Menu -->
<nav class="o_sidebar_nav">
<!-- SaaS Master Nav Items -->
<t t-if="is_saas_master">
<a href="/" t-att-class="'o_nav_link ' + ('active' if active_page == 'dashboard' else '')">
<i class="fa fa-home o_nav_icon"/>
<span>Dashboard</span>
</a>
<a href="/dashboard/restaurants" t-att-class="'o_nav_link ' + ('active' if active_page == 'restaurants' else '')">
<i class="fa fa-cutlery o_nav_icon"/>
<span>Restaurants</span>
</a>
<a href="/dashboard/reservations" t-att-class="'o_nav_link ' + ('active' if active_page == 'reservations' else '')">
<i class="fa fa-calendar o_nav_icon"/>
<span>Reservations</span>
</a>
<a href="/dashboard/tables" t-att-class="'o_nav_link ' + ('active' if active_page == 'tables' else '')">
<i class="fa fa-th o_nav_icon"/>
<span>Table Management</span>
</a>
<a href="/dashboard/apps" t-att-class="'o_nav_link ' + ('active' if active_page == 'apps' else '')">
<i class="fa fa-th-large o_nav_icon"/>
<span>Apps</span>
</a>
<a href="/dashboard/settings" t-att-class="'o_nav_link ' + ('active' if active_page == 'settings' else '')">
<i class="fa fa-cog o_nav_icon"/>
<span>Settings</span>
</a>
</t>
<!-- Tenant Restaurant Nav Items -->
<t t-else="">
<a href="/" t-att-class="'o_nav_link ' + ('active' if active_page == 'dashboard' else '')">
<i class="fa fa-home o_nav_icon"/>
<span>Dashboard</span>
</a>
<a href="/dashboard/orders" t-att-class="'o_nav_link ' + ('active' if active_page == 'orders' else '')">
<i class="fa fa-shopping-bag o_nav_icon"/>
<span>Online Orders</span>
</a>
<a href="/pos/web" target="_blank" class="o_nav_link">
<i class="fa fa-desktop o_nav_icon"/>
<span>Point of Sale</span>
</a>
<a href="/dashboard/tables" t-att-class="'o_nav_link ' + ('active' if active_page == 'tables' else '')">
<i class="fa fa-th o_nav_icon"/>
<span>Tables</span>
</a>
<a href="/dashboard/reservations" t-att-class="'o_nav_link ' + ('active' if active_page == 'reservations' else '')">
<i class="fa fa-calendar o_nav_icon"/>
<span>Reservations</span>
</a>
<a href="/dashboard/kds" class="o_nav_link">
<i class="fa fa-cutlery o_nav_icon"/>
<span>Kitchen (KDS)</span>
</a>
<a href="/dashboard/apps" t-att-class="'o_nav_link ' + ('active' if active_page == 'apps' else '')">
<i class="fa fa-th-large o_nav_icon"/>
<span>Apps</span>
</a>
<a href="/dashboard/settings" t-att-class="'o_nav_link ' + ('active' if active_page == 'settings' else '')">
<i class="fa fa-cog o_nav_icon"/>
<span>Settings</span>
</a>
</t>
</nav>
</div>
<!-- Bottom Promo Card -->
<div class="o_sidebar_promo">
<div class="o_promo_icon">
<svg width="20" height="20" viewBox="0 0 24 24" fill="#e50000">
<path d="M21.9 8.2l-1.9-4.7C19.7 2.6 18.8 2 17.8 2H6.2c-1 0-1.9.6-2.2 1.5L2.1 8.2c-.3.7-.1 1.5.4 2 .4.4 1 .7 1.6.7h.1c.9 0 1.7-.5 2.1-1.3l.9-1.8.9 1.8c.4.8 1.2 1.3 2.1 1.3s1.7-.5 2.1-1.3l.9-1.8.9 1.8c.4.8 1.2 1.3 2.1 1.3h.1c.6 0 1.2-.3 1.6-.7.5-.5.7-1.3.4-2zM4 12.1V20c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-7.9c-.6.3-1.3.4-2 .4-1.2 0-2.3-.6-3-1.6-.7 1-1.8 1.6-3 1.6s-2.3-.6-3-1.6c-.7 1-1.8 1.6-3 1.6-.7 0-1.4-.1-2-.5zM10 20v-5h4v5h-4z"/>
</svg>
</div>
<t t-if="is_saas_master">
<div class="o_promo_title">Grow Your Business</div>
<div class="o_promo_desc">Manage multiple restaurants with Dine360</div>
<a href="/dashboard/restaurants" class="o_promo_btn">
Learn More <i class="fa fa-arrow-right ms-1"/>
</a>
</t>
<t t-else="">
<div class="o_promo_title">Online Storefront</div>
<div class="o_promo_desc">Customer ordering website is active and accepting orders</div>
<a href="/shop" target="_blank" class="o_promo_btn">
Open Store <i class="fa fa-arrow-right ms-1"/>
</a>
</t>
</div>
</aside>
</template>
<!-- ============================================================== -->
<!-- 2. REUSABLE DASHBOARD TOPBAR COMPONENT -->
<!-- ============================================================== -->
<template id="dashboard_topbar" name="Dashboard Topbar">
<header class="o_saas_topbar">
<div class="o_search_container">
<i class="fa fa-search o_search_icon"/>
<input type="text" placeholder="Search restaurants, users, or anything..." class="o_search_input"/>
</div>
<div class="o_topbar_actions">
<div class="o_icon_btn" title="Notifications">
<i class="fa fa-bell-o"/>
<span class="o_notif_badge">3</span>
</div>
<div class="o_icon_btn" title="Help &amp; Documentation">
<i class="fa fa-question-circle-o"/>
</div>
<a href="/web#action=base.action_res_users_my" class="o_user_pill" title="User Profile">
<div class="o_user_avatar_letter">
<t t-if="user_id and user_id.name"><t t-esc="user_id.name[0].upper()"/></t>
<t t-else="">A</t>
</div>
<span class="o_user_pill_name">
<t t-if="user_id and user_id.name"><t t-esc="user_id.name"/></t>
<t t-else="">Admin</t>
</span>
<i class="fa fa-angle-down text-muted"/>
</a>
</div>
</header>
</template>
<!-- ============================================================== -->
<!-- 3. REUSABLE DASHBOARD MASTER WRAPPER LAYOUT -->
<!-- ============================================================== -->
<template id="dashboard_layout" name="Dashboard Master Layout">
<t t-call="web.frontend_layout">
<t t-set="no_footer" t-value="True"/>
<t t-set="no_header" t-value="True"/>
<t t-set="pageName" t-value="'home_dashboard'"/>
<t t-set="body_classname" t-value="'o_saas_admin_body' if is_saas_master else 'o_restaurant_body'"/>
<link rel="preconnect" href="https://fonts.googleapis.com"/>
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="anonymous"/>
<link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&amp;display=swap" rel="stylesheet"/>
<link rel="stylesheet" type="text/css" href="/dine360_dashboard/static/src/css/home_menu.css?v=6.0"/>
<script type="text/javascript" src="/dine360_dashboard/static/src/js/dashboard_pages.js?v=6.0"/>
<div class="o_saas_layout">
<!-- Shared Dine360 Sidebar -->
<t t-call="dine360_dashboard.dashboard_sidebar"/>
<!-- Shared Content Container -->
<main class="o_saas_main">
<!-- Shared Dine360 Topbar -->
<t t-call="dine360_dashboard.dashboard_topbar"/>
<!-- Page-Specific Injected Content -->
<t t-out="0"/>
</main>
</div>
</t>
</template>
</odoo>