From 0d7d20829623b14c8ea5284bc24e63f7c31d61b7 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Wed, 30 Aug 2023 15:15:31 +0530 Subject: renamed client to customer --- src/components/navbar/nav.rs | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'src/components/navbar/nav.rs') diff --git a/src/components/navbar/nav.rs b/src/components/navbar/nav.rs index dd215a0..5249b60 100644 --- a/src/components/navbar/nav.rs +++ b/src/components/navbar/nav.rs @@ -17,6 +17,7 @@ use yew::prelude::*; use yew_router::prelude::*; +use gloo::utils::document; use crate::app::Route; use crate::components::navbar::nav_link::NavLink; @@ -58,8 +59,8 @@ pub fn nav() -> Html { to: Route::Home, }, Link { - label: String::from("Clients"), - to: Route::ManageClients, + label: String::from("Customers"), + to: Route::ManageCustomers, }, Link { label: String::from("Brands"), @@ -76,7 +77,7 @@ pub fn nav() -> Html { ]); let links_html: Html = match current_route { - Route::ManageClients + Route::ManageCustomers | Route::ManageBrands | Route::ManageItems | Route::ManageInvoices => manage_links, @@ -86,6 +87,19 @@ pub fn nav() -> Html { .map(|link| html!()) .collect(); + // set document title + document().set_title(match current_route { + Route::Home => "", + + Route::ManageMenu => "Manage OpenBills Data", + Route::ManageCustomers => "Manage OpenBills Customers", + Route::ManageBrands => "Manage OpenBills Brands", + Route::ManageItems => "Manage OpenBills Items", + Route::ManageInvoices => "Manage OpenBills Invoices", + + _ => "Hello World", + }); + html! {