feat (generate-file) hopefully resume.html doesnt make any trouble

This commit is contained in:
dpurbosakti
2025-11-27 13:30:45 +07:00
parent 04add70ac5
commit abfbc568b0
4 changed files with 78 additions and 29 deletions

No files matched your search

+65 -29
View File
@@ -438,35 +438,55 @@
<table style="page-break-inside: avoid !important;">
<tr>
<td>
<h4 class="section-title" style="margin-top: 3rem;">Obat yang diberikan</h4>
<table class="border-table" style="margin-top: 0.4rem;">
<thead>
<tr>
<th>
Terapi (Farmakologi & Non Farmakologi) Selama Perawatan
</th>
<th>
Terapi (Farmakologi & Non Farmakologi) Waktu Pulang
</th>
</tr>
</thead>
<tbody>
{{ $dataLen := len .Medications }}
{{ if gt $dataLen 0 }}
<!-- If we have data, show all of it -->
{{ range .Medications }}
<tr>
<td>
<h4 class="section-title" style="margin-top: 3rem;">Obat yang diberikan</i></h4>
<table class="border-table" style="margin-top: 0.4rem;">
<tr>
<th>
Terapi (Farmakologi & Non Farmakologi) Selawa Perawatan
</th>
<th>
Terapi (Farmakologi & Non Farmakologi) Selawa Pulang
</th>
</tr>
<tr>
<td>{{ .NIK }}</td>
<td>{{ .NIK }}</td>
</tr>
<tr>
<td>{{ .NIK }}</td>
<td>{{ .NIK }}</td>
</tr>
<tr>
<td>{{ .NIK }}</td>
<td>{{ .NIK }}</td>
</tr>
</table>
</td>
<td>{{ .DuringTreatment }}</td>
<td>{{ .AtDischarge }}</td>
</tr>
{{ end }}
</table>
<!-- If data is less than 2, fill remaining rows -->
{{ if eq $dataLen 1 }}
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
{{ end }}
{{ else }}
<!-- If no data, show 2 empty rows -->
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
{{ end }}
</tbody>
</table>
</td>
</tr>
</table>
@@ -501,7 +521,11 @@
<p class="description-label"><i>Blood Pressure</i></p>
</td>
<td class="data-colon">: </td>
{{ if and .BloodPressure (ne .BloodPressure "0/0") (ne .BloodPressure "") }}
<td>{{ .BloodPressure }} mmHg</td>
{{ else }}
<td></td>
{{ end }}
<td>
</tr>
@@ -512,7 +536,11 @@
</td>
</td>
<td class="data-colon">: </td>
<td>{{ .BodyTemperature }} C</td>
{{ if ne .BodyTemperature 0.0 }}
<td>{{ .BodyTemperature }} C</td>
{{ else }}
<td></td>
{{ end }}
<td>
</tr>
<tr>
@@ -521,7 +549,11 @@
<p class="description-label"><i>Pulse</i></p>
</td>
<td class="data-colon">: </td>
<td>{{ .HeartRate }} x/Menit</td>
{{ if ne .HeartRate 0.0 }}
<td>{{ .HeartRate }} x/Menit</td>
{{ else }}
<td></td>
{{ end }}
</td>
</tr>
</table>
@@ -535,7 +567,11 @@
</td>
</td>
<td class="data-colon">: </td>
<td>{{ .RespirationRate }}</td>
{{ if ne .RespirationRate 0.0 }}
<td>{{ .RespirationRate }} x/Menit</td>
{{ else }}
<td></td>
{{ end }}
</td>
</tr>
<tr>