From 1ae56e77cf3719f0b0d8fcd58df0949888793f04 Mon Sep 17 00:00:00 2001 From: Calum Mackervoy Date: Thu, 9 Jan 2020 09:00:21 +0000 Subject: [PATCH] Don't display null customer details --- .../layout/project-profile/project-profile.scss | 2 +- src/templates/hd-customer.pug | 16 +++++++--------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/styles/layout/project-profile/project-profile.scss b/src/styles/layout/project-profile/project-profile.scss index b2c594e..2656725 100644 --- a/src/styles/layout/project-profile/project-profile.scss +++ b/src/styles/layout/project-profile/project-profile.scss @@ -150,7 +150,7 @@ li { margin-bottom: 0.5em; - &::before { + span::before { color: $color-43-100-50; font-size: 2.2rem; margin: 0 1rem 0 0; diff --git a/src/templates/hd-customer.pug b/src/templates/hd-customer.pug index df6beba..51563c2 100644 --- a/src/templates/hd-customer.pug +++ b/src/templates/hd-customer.pug @@ -5,15 +5,13 @@ sib-widget(name='hd-customer') h3 Client: ul li #[span Business name: ]${await value.name} - li #[span Company register: ]${await value.companyRegister} - li - span Address: - br - p ${await value.address} + li ${await value.companyRegister ? `Company register: ${await value.companyRegister}` : ``} + li ${await value.address ? `Address:

${await value.address}

`: ``} div h3 Contact: ul - li(class='mdi-account-outline') #[span ${await value.firstName} ${await value.lastName}], ${await value.role} - li(class='mdi-email-outline') - a(href='mailto:${await value.email}') ${await value.email} - li(class='mdi-cellphone-iphone') ${await value.phone} + li #[span(class='mdi-account-outline') ${await value.firstName} ${await value.lastName ? await value.lastName : ""}]${await value.role ? `, ${await value.role}` : ""} + li + span(class='mdi-email-outline') + a(href='mailto:${await value.email}') ${await value.email} + span ${await value.phone ? `
  • ${await value.phone}
  • ` : ``}