diff --git a/src/widjets-display-territory-tzcld.js b/src/widjets-display-territory-tzcld.js index 6f3687f5c431e993009fb94f788fc6ab0fa8c629..bf0c5a5dc7d89f9effb208b7db9c45f6a28ca5fb 100644 --- a/src/widjets-display-territory-tzcld.js +++ b/src/widjets-display-territory-tzcld.js @@ -86,28 +86,39 @@ import("./utils.js").then((utils) => { tzcldprofile[ignore.trim()] = null; } } - let render = `<div class="segment full">`; + let render = `<div class="segment full margin-bottom-xxlarge">`; for(let job of tzcldprofile.locations) { + let phones = await job.phones ; + let emails = await job.emails ; - render += `<div class="segment half padding-left-xxlarge padding-right-xxlarge margin-top-xxlarge margin-bottom-xxlarge">`; + render += `<div class="segment half padding-left-xxlarge padding-right-xxlarge margin-top-xxlarge margin-bottom-none">`; if(await job.name !="") { render += `<h3 class="position text-medium text-color-secondary text-xlarge margin-top-none">${await job.name}</h3>`; } else { } - render += `<div class="address padding-bottom-small">${await job.address} <br/> ${await job.postal_code} ${await job.city}</div>`; - if ((await job.mobile_phone != '') || (await job.phone != '')) { - render += `<div class="phone-email segment block padding-bottom-small">`; + render += `<div class="full address padding-bottom-small"> + <div class="segment icontz-mdi_map-marker icon-third text-xxlarge text-top padding-right-xsmall"></div> + <div class="segment width-90">${await job.address} <br/> ${await job.postal_code} ${await job.city}</div> + </div>`; + if (await phones.getLdpContains().length > 0) { + render += `<div class="full phone padding-bottom-small"> + <div class="segment icontz-ic_call icon-third text-xxlarge text-top padding-right-xsmall"></div> + <solid-display class="segment width-90" bind-resources="" fields="phones" + widget-phones="customtzcld-display-user-profile-phones" + data-src="${await job}" solid-resource=""></solid-display> + </div>`; + } + + if (await emails.getLdpContains().length > 0 ) { + render += `<div class="full email padding-bottom-small"> + <div class="segment icontz-mdi_email-outline icon-third text-xxlarge text-top padding-right-xsmall"></div> + <solid-display class="segment width-90" bind-resources="" fields="emails" + widget-emails="customtzcld-display-user-profile-emails" + data-src="${await job}" solid-resource=""></solid-display> + </div>`; } - - render += `<solid-display class="segment block margin-bottom-small" bind-resources="" fields="phones" - widget-phones="customtzcld-display-user-profile-phones" - data-src="${await job}" solid-resource=""></solid-display>`; - render += `<solid-display class="segment block" bind-resources="" fields="emails" - widget-emails="customtzcld-display-user-profile-emails" - data-src="${await job}" solid-resource=""></solid-display>`; - render += `</div>`; render += `</div>`; }