From 4a83ed1b86783634097c50a39d7ec73fc989f657 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Wed, 30 Aug 2023 13:41:38 +0530 Subject: added contact info to clients list --- css/manage/_client.scss | 14 +++++++++++++- src/app/manage/client/list/address.rs | 4 +++- src/app/manage/client/list/list_item.rs | 15 +++++++++++++-- 3 files changed, 29 insertions(+), 4 deletions(-) diff --git a/css/manage/_client.scss b/css/manage/_client.scss index 7908333..36ff66a 100644 --- a/css/manage/_client.scss +++ b/css/manage/_client.scss @@ -9,6 +9,7 @@ border-bottom: 1px solid var(--link-fg); display: flex; flex-direction: column; + gap: 1rem; .header { display: flex; @@ -27,8 +28,19 @@ } .details { - width: 90%; + margin: auto; + width: 98%; display: grid; + grid-template-columns: 1fr 1fr 2fr; + + .contact-info, .client-address { + display: flex; + flex-direction: column; + + .title { + font-weight: bold; + } + } } } } diff --git a/src/app/manage/client/list/address.rs b/src/app/manage/client/list/address.rs index c57ac89..233de92 100644 --- a/src/app/manage/client/list/address.rs +++ b/src/app/manage/client/list/address.rs @@ -22,6 +22,7 @@ use crate::models::client; #[derive(Properties, PartialEq)] pub struct Props { pub address: client::Address, + pub title: String, } #[function_component(Address)] @@ -29,7 +30,8 @@ pub fn address(props: &Props) -> Html { html! {
- {props.address.address_text.clone()} + {props.title.clone()} + {props.address.address_text.clone()}
} } diff --git a/src/app/manage/client/list/list_item.rs b/src/app/manage/client/list/list_item.rs index b2d9ca9..8b78ad7 100644 --- a/src/app/manage/client/list/list_item.rs +++ b/src/app/manage/client/list/list_item.rs @@ -36,14 +36,25 @@ pub fn list_item(props: &Props) -> Html {
-
+
+ {"Contact Details:"} + {"Name - "}{props.client.contact.contact_name.clone()} + {"Phone - "}{props.client.contact.phone_number.clone()} + {"E-Mail - "}{props.client.contact.email_address.clone()} + {"Website - "}{props.client.contact.website.clone()}
- +
+ +
+

+ {"Options (To Be Added)"} +

+
} } -- cgit v1.2.3