Skip to content

Commit

Permalink
Merge pull request #8 from saniho/patch1
Browse files Browse the repository at this point in the history
Update content-card-maree.js
  • Loading branch information
saniho authored May 7, 2021
2 parents 6c8bf6a + daf1f8f commit eda3189
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions content-card-maree.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,12 @@ class ContentCardMaree extends LitElement {
${this.config.showNextMaree
? html`
<div class="next-block">
<table>
<table width="100%">
<tr>
<td><span class="more-unit">Coefficiant : </span></td>
<td><span class="more-unit">${this.renderTitreCoeff(attributes.next_coeff_1)}</span></td>
<td><span class="coeff">${attributes.next_coeff_1}</span></td>
<td><span class="more-unit">Horaire : </span><span class="heure">${attributes.next_maree_1}</span></td>
<td><span class="more-unit">Horaire : </span></td>
<td><span class="heure">${attributes.next_maree_1}</span></td>
</tr>
</table>
</div>`
Expand All @@ -84,14 +85,14 @@ class ContentCardMaree extends LitElement {
<div class="next-block">
<table width="100%">
<tr>
<td><span class="more-unit">Coefficiant : </span></td>
<td><span class="more-unit">${this.renderTitreCoeff(attributes.next_coeff_1)}</span></td>
<td><span class="coeff">${attributes.next_coeff_1}</span></td>
<td><span class="more-unit">Horaire : </span></td>
<td><span class="heure">${attributes.next_maree_1}</span></td>
<td><span class="etat" >${attributes.next_etat_1}</span></td>
</tr>
<tr>
<td><span class="more-unit">Coefficiant : </span></td>
<td><span class="more-unit">${this.renderTitreCoeff(attributes.next_coeff_2)}</span></td>
<td><span class="coeff">${attributes.next_coeff_2}</span></td>
<td><span class="more-unit">Horaire : </span></td>
<td><span class="heure">${attributes.next_maree_2}</span></td>
Expand Down Expand Up @@ -205,6 +206,16 @@ class ContentCardMaree extends LitElement {
</div>`
}
}
renderTitreCoeff( coeff ) {
if (coeff === "") {
var ch = "" ;
}
else{
var ch = "Coefficient : " ;
}
return html
`${ch}`
}

setConfig(config) {
if (!config.entity) {
Expand Down

0 comments on commit eda3189

Please sign in to comment.