Compare commits
3 Commits
b58bf700df
...
6d2e0241c9
Author | SHA1 | Date | |
---|---|---|---|
6d2e0241c9 | |||
afc5b1f0c6 | |||
4a76ee469b |
@ -15,6 +15,7 @@ type RunnerWithDonations struct {
|
|||||||
DistanceDonations []DistanceDonation `json:"distance_donations" validate:"optional"`
|
DistanceDonations []DistanceDonation `json:"distance_donations" validate:"optional"`
|
||||||
TotalPerDistance int `json:"total_per_distance" validate:"optional"`
|
TotalPerDistance int `json:"total_per_distance" validate:"optional"`
|
||||||
TotalDonations int `json:"total_donations" validate:"optional"`
|
TotalDonations int `json:"total_donations" validate:"optional"`
|
||||||
|
SelfServiceLink string `json:"self_service_link" validate:"required"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type DistanceDonation struct {
|
type DistanceDonation struct {
|
||||||
|
@ -69,7 +69,11 @@ func (b *DefaultBarcodeService) GenerateBarcode(format string, content string, w
|
|||||||
}
|
}
|
||||||
break
|
break
|
||||||
case "qr":
|
case "qr":
|
||||||
generatedCode, err = qr.Encode(content, qr.M, qr.AlphaNumeric)
|
// Always use qr.Auto encoding to support all characters in the content
|
||||||
|
encoding := qr.Auto
|
||||||
|
|
||||||
|
// QR code generation with error correction level M and auto encoding
|
||||||
|
generatedCode, err = qr.Encode(content, qr.M, encoding)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return bytes.Buffer{}, err
|
return bytes.Buffer{}, err
|
||||||
}
|
}
|
||||||
|
@ -87,11 +87,28 @@
|
|||||||
<td>Gesamt</td>
|
<td>Gesamt</td>
|
||||||
<td>{{ formatUnit "euro" $.Locale .TotalPerDistance }} {{ $.CurrencySymbol }}</td>
|
<td>{{ formatUnit "euro" $.Locale .TotalPerDistance }} {{ $.CurrencySymbol }}</td>
|
||||||
<td>{{ formatUnit "euro" $.Locale .TotalDonations }} {{ $.CurrencySymbol }}</td>
|
<td>{{ formatUnit "euro" $.Locale .TotalDonations }} {{ $.CurrencySymbol }}</td>
|
||||||
</tfoot>
|
|
||||||
</table>
|
</table>
|
||||||
</main>
|
</main>
|
||||||
<footer class="certificate-footer">
|
<footer class="certificate-footer">
|
||||||
<p>
|
<table style="border-collapse: collapse; border: none; width: 17cm;">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th style="border: none; width: 50%; text-align: center;">Link zu deinen Rundenzeiten</th>
|
||||||
|
<!-- <th style="border: none; width: 50%; text-align: center;">Spende überweisen</th> -->
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td style="border: none; text-align: center;">
|
||||||
|
<img src="data:image/png;base64,{{ barcode .SelfServiceLink "qr" "" }}" style="height: 2.5cm; padding: 0.2cm">
|
||||||
|
</td>
|
||||||
|
<td style="border: none; text-align: center;">
|
||||||
|
<!-- <img src="data:image/png;base64,{{ barcode ".SelfServiceLink" "qr" "" }}" style="height: 2.5cm; padding: 0.2cm"> -->
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<p style="text-align: center;">
|
||||||
{{ $.Footer }}
|
{{ $.Footer }}
|
||||||
</p>
|
</p>
|
||||||
</footer>
|
</footer>
|
||||||
|
@ -91,6 +91,24 @@
|
|||||||
</table>
|
</table>
|
||||||
</main>
|
</main>
|
||||||
<footer class="certificate-footer">
|
<footer class="certificate-footer">
|
||||||
|
<table style="border-collapse: collapse; border: none; width: 17cm;">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th style="border: none; width: 50%; text-align: center;">Link to your lap times</th>
|
||||||
|
<!-- <th style="border: none; width: 50%; text-align: center;">Transfer donation</th> -->
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td style="border: none; text-align: center;">
|
||||||
|
<img src="data:image/png;base64,{{ barcode .SelfServiceLink "qr" "" }}" style="height: 2.5cm; padding: 0.2cm">
|
||||||
|
</td>
|
||||||
|
<td style="border: none; text-align: center;">
|
||||||
|
<!-- <img src="data:image/png;base64,{{ barcode ".SelfServiceLink" "qr" "" }}" style="height: 2.5cm; padding: 0.2cm"> -->
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
<p>
|
<p>
|
||||||
{{ $.Footer }}
|
{{ $.Footer }}
|
||||||
</p>
|
</p>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user