Ajouter décompte

This commit is contained in:
Victor Lacasse-Beaudoin 2023-09-19 18:25:12 -04:00
parent 7351f970f7
commit 6c09f1fa65
9 changed files with 126 additions and 1 deletions

View file

@ -0,0 +1,4 @@
{{ define "decompte-html" }}
Décompte: {{ .Data.Decompte }}
<button hx-get="/nothing" hx-on:click="document.getElementById('app-dialog').style.display = 'none';">fermer</button>
{{ end }}

View file

@ -6,6 +6,19 @@
<title>AGECEM | Assemblée Générale</title>
<script src="/public/js/htmx.min.js"></script>
<script src="/public/js/membreid-selected-and-cleared.js"></script>
<style>
#app-dialog {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background-color: white;
border: 1px solid #ccc;
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
padding: 20px;
z-index: 555;
}
</style>
</head>
<body>
<h2>Présences en Assemblée Générale</h2>
@ -18,8 +31,15 @@
<button type="submit">enregistrer</button>
</form>
<button hx-get="/decompte" hx-target="#app-dialog" hx-on:click="document.getElementById('app-dialog').style.display = 'block';">Afficher décompte</button>
<div id="app-dialog" style="display: none;">
</div>
<div id="app-content">
</div>
</body>
</html>
{{ end }}

View file

@ -1,3 +1,4 @@
{{ define "scan-html" }}
<h3>{{ .Message }}</h3>
{{ if .Error }}<h3>{{ .Error }}</h3>{{ end }}
{{ end }}