feat: updated docs and added description to files
This commit is contained in:
48
Backend/templates/pdfPage.templ
Normal file
48
Backend/templates/pdfPage.templ
Normal file
@@ -0,0 +1,48 @@
|
||||
package templates
|
||||
|
||||
// this file has all templates for the /pdf page
|
||||
|
||||
import (
|
||||
"arbeitszeitmessung/helper"
|
||||
"arbeitszeitmessung/models"
|
||||
"fmt"
|
||||
"time"
|
||||
)
|
||||
|
||||
templ PDFForm(teamMembers []models.User) {
|
||||
@BasePage()
|
||||
@headerComponent()
|
||||
<form class="grid-main divide-y-1" action="pdf/generate" method="get">
|
||||
<div class="grid-cell col-span-full bg-neutral-300">
|
||||
<h1 class="text-xl uppercase font-bold">Monatsabrechnung erstellen</h1>
|
||||
</div>
|
||||
<div class="grid-sub divide-x-1 responsive">
|
||||
<div class="grid-cell">Zeitraum wählen</div>
|
||||
<div class="grid-cell col-span-3">
|
||||
<label class="block mb-1 text-sm text-neutral-700">Abrechnungsmonat</label>
|
||||
<input name="start_date" type="date" value={ helper.GetFirstOfMonth(time.Now()).Format(time.DateOnly) } class="btn bg-neutral-100"/>
|
||||
</div>
|
||||
<div></div>
|
||||
</div>
|
||||
<div class="grid-sub divide-x-1 responsive">
|
||||
<div class="grid-cell">Mitarbeiter wählen</div>
|
||||
<div class="grid-cell col-span-3 flex flex-col gap-2">
|
||||
<div class="flex flex-row gap-2">
|
||||
<button class="btn" type="button" onclick={ templ.JSFuncCall("checkAll", "pdf-", templ.JSExpression("true")) }>Alle</button>
|
||||
<button class="btn" type="button" onclick={ templ.JSFuncCall("checkAll", "pdf-", templ.JSExpression("false")) }>Keine</button>
|
||||
</div>
|
||||
for _, member := range teamMembers {
|
||||
@CheckboxComponent(member.PersonalNummer, fmt.Sprintf("%s %s", member.Vorname, member.Name))
|
||||
}
|
||||
</div>
|
||||
<div></div>
|
||||
</div>
|
||||
<div class="grid-sub divide-x-1 responsive">
|
||||
<div class="grid-cell">PDFs Bündeln</div>
|
||||
<div class="grid-cell col-span-3 flex gap-2 flex-col md:flex-row">
|
||||
<button class="btn" type="submit" name="output" value="download">Einzeln</button>
|
||||
<button class="btn" type="submit" name="output" value="render" onclick="">Bündel</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
}
|
||||
Reference in New Issue
Block a user