tab view mcu bagian daftar peserta

This commit is contained in:
2024-06-13 20:54:28 +07:00
parent 7f3e75a8e3
commit b508eb68da
4 changed files with 306 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
package dev_handlers
import (
"cpone/utils"
dev_mcudaftarpeserta "cpone/views/dev/mcu/daftarpeserta"
"github.com/labstack/echo/v4"
)
type McuDaftarPesertaServices interface {
}
type McuDaftarPesertaHandler struct {
McuDaftarPesertaServices McuDaftarPesertaServices
}
func NewMcuDaftarPeserta(mdp McuDaftarPesertaServices) *McuDaftarPesertaHandler {
return &McuDaftarPesertaHandler{
McuDaftarPesertaServices: mdp,
}
}
func (mdp *McuDaftarPesertaHandler) HandleShowMcuDaftarPeserta(c echo.Context) error {
title := "Daftar Peserta"
content := dev_mcudaftarpeserta.McuDaftarPesertaScreen()
css := dev_mcudaftarpeserta.CSSMcuDaftarPeserta()
js := dev_mcudaftarpeserta.JsMcuDaftarPeserta()
view := dev_mcudaftarpeserta.ShowMcuDafterPeserta(
title,
content,
css,
js,
)
return utils.View(c, view)
}

View File

@@ -0,0 +1,13 @@
package dev_services
import "cpone/db"
type McuDaftarPesertaServices struct {
McuDaftarPesertaStore db.AppStore
}
func NewMcuDaftarPesertaServices(uStore db.AppStore) *McuDaftarPesertaServices {
return &McuDaftarPesertaServices{
McuDaftarPesertaStore: uStore,
}
}

View File

@@ -0,0 +1,134 @@
package dev_mcudaftarpeserta
import "cpone/layout"
templ McuDaftarPesertaScreen() {
<div>
<table class="table table-hover table-borderless">
<thead>
<tr>
<th scope="col" width="5%">NO LAB</th>
<th scope="col" width="25%">NAMA</th>
<th scope="col" width="10%">JENIS KELAMIN</th>
<th scope="col" width="10%">UMUR</th>
<th scope="col" width="35%">KESIMPULAN</th>
<th scope="col" width="15%" s>AKSI</th>
</tr>
</thead>
<tbody>
<tr>
<td>21304</td>
<td>Abraham Kurniawan</td>
<td>Laki - Laki</td>
<td>24</td>
<td>
<div class="row">
<div class="col-2">
<span class="label-text fit"> Fit </span>
<!-- <span class="label label-inline label-text"> FIT </span> -->
</div>
<div class="col-10 kesimpulan-desc"></div>
</div>
</td>
<td>
<div>
<a
class="btn btn-icon"
onclick="ShowModal('Abraham Kurniawan','21304')"
>
<span
class="iconify iconify-btn"
data-icon="heroicons-solid:document-text"
></span>
</a>
<a href="mcu/hasil-lab.html" class="btn btn-icon">
<span
class="iconify iconify-btn"
data-icon="heroicons-solid:pencil"
></span>
</a>
<a
class="btn btn-icon"
onclick="ShowModalAkses('Abraham@gmail.com','Abraham Kurniawan','unchecked')"
>
<span
class="iconify iconify-btn"
data-icon="heroicons:shield-exclamation-16-solid"
></span>
</a>
</div>
</td>
</tr>
<tr>
<td>21305</td>
<td>Anastasia Claudia</td>
<td>Perempuan</td>
<td>24</td>
<td>
<div class="row">
<div class="col-2 col-xl-2 col-lg-2 col-md-12 col-sm-12">
<span class="label-text unfit"> Unfit </span>
<!-- <span class="label label-inline label-text"> FIT </span> -->
</div>
<div
class="col-10 col-xl-10 col-lg-10 col-md-12 col-sm-12 kesimpulan-desc"
>
Anti HBs (Positif : 752), Cholesterol sedikit meningkat
(218), LDL Cholesterol Direct meningkat (173)
</div>
</div>
</td>
<td>
<div>
<!-- data-target="#exampleModalSizeLg" -->
<a
class="btn btn-icon"
data-toggle="modal"
onclick="ShowModal('Anastasia Claudia', '21305')"
>
<span
class="iconify iconify-btn"
data-icon="heroicons-solid:document-text"
></span>
</a>
<a href="mcu/hasil-lab.html" class="btn btn-icon">
<span
class="iconify iconify-btn"
data-icon="heroicons-solid:pencil"
></span>
</a>
<a
class="btn btn-icon"
onclick="ShowModalAkses('Anastasia@gmail.com','Anastasia Claudia','checked')"
>
<span
class="iconify iconify-btn"
data-icon="heroicons:shield-exclamation-16-solid"
></span>
</a>
</div>
</td>
</tr>
</tbody>
</table>
</div>
}
templ CSSMcuDaftarPeserta() {
}
templ JsMcuDaftarPeserta() {
}
templ ShowMcuDafterPeserta(
title string,
cmp templ.Component,
css templ.Component,
js templ.Component,
) {
@layout.PlaygroundLayout(title, css, js) {
@cmp
}
}

View File

@@ -0,0 +1,121 @@
// Code generated by templ - DO NOT EDIT.
// templ: version: v0.2.663
package dev_mcudaftarpeserta
//lint:file-ignore SA4006 This context is only used if a nested component is present.
import "github.com/a-h/templ"
import "context"
import "io"
import "bytes"
import "cpone/layout"
func McuDaftarPesertaScreen() templ.Component {
return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) {
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer)
if !templ_7745c5c3_IsBuffer {
templ_7745c5c3_Buffer = templ.GetBuffer()
defer templ.ReleaseBuffer(templ_7745c5c3_Buffer)
}
ctx = templ.InitializeContext(ctx)
templ_7745c5c3_Var1 := templ.GetChildren(ctx)
if templ_7745c5c3_Var1 == nil {
templ_7745c5c3_Var1 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div><table class=\"table table-hover table-borderless\"><thead><tr><th scope=\"col\" width=\"5%\">NO LAB</th><th scope=\"col\" width=\"25%\">NAMA</th><th scope=\"col\" width=\"10%\">JENIS KELAMIN</th><th scope=\"col\" width=\"10%\">UMUR</th><th scope=\"col\" width=\"35%\">KESIMPULAN</th><th scope=\"col\" width=\"15%\" s>AKSI</th></tr></thead> <tbody><tr><td>21304</td><td>Abraham Kurniawan</td><td>Laki - Laki</td><td>24</td><td><div class=\"row\"><div class=\"col-2\"><span class=\"label-text fit\">Fit </span><!-- <span class=\"label label-inline label-text\"> FIT </span> --></div><div class=\"col-10 kesimpulan-desc\"></div></div></td><td><div><a class=\"btn btn-icon\" onclick=\"ShowModal(&#39;Abraham Kurniawan&#39;,&#39;21304&#39;)\"><span class=\"iconify iconify-btn\" data-icon=\"heroicons-solid:document-text\"></span></a> <a href=\"mcu/hasil-lab.html\" class=\"btn btn-icon\"><span class=\"iconify iconify-btn\" data-icon=\"heroicons-solid:pencil\"></span></a> <a class=\"btn btn-icon\" onclick=\"ShowModalAkses(&#39;Abraham@gmail.com&#39;,&#39;Abraham Kurniawan&#39;,&#39;unchecked&#39;)\"><span class=\"iconify iconify-btn\" data-icon=\"heroicons:shield-exclamation-16-solid\"></span></a></div></td></tr><tr><td>21305</td><td>Anastasia Claudia</td><td>Perempuan</td><td>24</td><td><div class=\"row\"><div class=\"col-2 col-xl-2 col-lg-2 col-md-12 col-sm-12\"><span class=\"label-text unfit\">Unfit </span><!-- <span class=\"label label-inline label-text\"> FIT </span> --></div><div class=\"col-10 col-xl-10 col-lg-10 col-md-12 col-sm-12 kesimpulan-desc\">Anti HBs (Positif : 752), Cholesterol sedikit meningkat\r (218), LDL Cholesterol Direct meningkat (173)\r</div></div></td><td><div><!-- data-target=\"#exampleModalSizeLg\" --><a class=\"btn btn-icon\" data-toggle=\"modal\" onclick=\"ShowModal(&#39;Anastasia Claudia&#39;, &#39;21305&#39;)\"><span class=\"iconify iconify-btn\" data-icon=\"heroicons-solid:document-text\"></span></a> <a href=\"mcu/hasil-lab.html\" class=\"btn btn-icon\"><span class=\"iconify iconify-btn\" data-icon=\"heroicons-solid:pencil\"></span></a> <a class=\"btn btn-icon\" onclick=\"ShowModalAkses(&#39;Anastasia@gmail.com&#39;,&#39;Anastasia Claudia&#39;,&#39;checked&#39;)\"><span class=\"iconify iconify-btn\" data-icon=\"heroicons:shield-exclamation-16-solid\"></span></a></div></td></tr></tbody></table></div>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
if !templ_7745c5c3_IsBuffer {
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_W)
}
return templ_7745c5c3_Err
})
}
func CSSMcuDaftarPeserta() templ.Component {
return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) {
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer)
if !templ_7745c5c3_IsBuffer {
templ_7745c5c3_Buffer = templ.GetBuffer()
defer templ.ReleaseBuffer(templ_7745c5c3_Buffer)
}
ctx = templ.InitializeContext(ctx)
templ_7745c5c3_Var2 := templ.GetChildren(ctx)
if templ_7745c5c3_Var2 == nil {
templ_7745c5c3_Var2 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
if !templ_7745c5c3_IsBuffer {
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_W)
}
return templ_7745c5c3_Err
})
}
func JsMcuDaftarPeserta() templ.Component {
return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) {
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer)
if !templ_7745c5c3_IsBuffer {
templ_7745c5c3_Buffer = templ.GetBuffer()
defer templ.ReleaseBuffer(templ_7745c5c3_Buffer)
}
ctx = templ.InitializeContext(ctx)
templ_7745c5c3_Var3 := templ.GetChildren(ctx)
if templ_7745c5c3_Var3 == nil {
templ_7745c5c3_Var3 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
if !templ_7745c5c3_IsBuffer {
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_W)
}
return templ_7745c5c3_Err
})
}
func ShowMcuDafterPeserta(
title string,
cmp templ.Component,
css templ.Component,
js templ.Component,
) templ.Component {
return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) {
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer)
if !templ_7745c5c3_IsBuffer {
templ_7745c5c3_Buffer = templ.GetBuffer()
defer templ.ReleaseBuffer(templ_7745c5c3_Buffer)
}
ctx = templ.InitializeContext(ctx)
templ_7745c5c3_Var4 := templ.GetChildren(ctx)
if templ_7745c5c3_Var4 == nil {
templ_7745c5c3_Var4 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
templ_7745c5c3_Var5 := templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) {
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer)
if !templ_7745c5c3_IsBuffer {
templ_7745c5c3_Buffer = templ.GetBuffer()
defer templ.ReleaseBuffer(templ_7745c5c3_Buffer)
}
templ_7745c5c3_Err = cmp.Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
if !templ_7745c5c3_IsBuffer {
_, templ_7745c5c3_Err = io.Copy(templ_7745c5c3_W, templ_7745c5c3_Buffer)
}
return templ_7745c5c3_Err
})
templ_7745c5c3_Err = layout.PlaygroundLayout(title, css, js).Render(templ.WithChildren(ctx, templ_7745c5c3_Var5), templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
if !templ_7745c5c3_IsBuffer {
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_W)
}
return templ_7745c5c3_Err
})
}