step 3 : route, handler dan services
This commit is contained in:
@@ -87,14 +87,19 @@ License: You must have a valid license purchased only from themeforest(the above
|
||||
class="header-fixed header-mobile-fixed subheader-enabled subheader-fixed subheader-mobile-fixed aside-enabled aside-fixed aside-minimize-hoverable page-loading"
|
||||
>
|
||||
<style>
|
||||
body {
|
||||
background-color: var(--white);
|
||||
}
|
||||
.card-control {
|
||||
width: 390px;
|
||||
height: 1212px;
|
||||
background-image: url("asset-corporate-portal/media/kartukontrol/bg-kartuKontrol.svg");
|
||||
background-size: 390px 1212px;
|
||||
background-repeat: no-repeat;
|
||||
margin: auto;
|
||||
/* margin: auto; */
|
||||
margin-bottom: 14vh;
|
||||
}
|
||||
|
||||
.foto {
|
||||
width: 70px;
|
||||
height: 79px;
|
||||
@@ -167,6 +172,16 @@ License: You must have a valid license purchased only from themeforest(the above
|
||||
<li><h6>ACG</h6></li>
|
||||
<li><h6>Treadmill</h6></li>
|
||||
<li><h6>Pemeriksaan Fisik</h6></li>
|
||||
<li><h6>Hematologi Lengkap</h6></li>
|
||||
<li><h6>Urine Lengkap</h6></li>
|
||||
<li><h6>ACG</h6></li>
|
||||
<li><h6>Treadmill</h6></li>
|
||||
<li><h6>Pemeriksaan Fisik</h6></li>
|
||||
<li><h6>Hematologi Lengkap</h6></li>
|
||||
<li><h6>Urine Lengkap</h6></li>
|
||||
<li><h6>ACG</h6></li>
|
||||
<li><h6>Treadmill</h6></li>
|
||||
<li><h6>Pemeriksaan Fisik</h6></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
50
handlers/dev/kartukontrol.handlers.go
Normal file
50
handlers/dev/kartukontrol.handlers.go
Normal file
@@ -0,0 +1,50 @@
|
||||
package dev_handlers
|
||||
|
||||
import (
|
||||
"cpone/models"
|
||||
"cpone/utils"
|
||||
kartukontrol "cpone/views/dev/kartukontrol"
|
||||
|
||||
"github.com/labstack/echo/v4"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
type KartuKontrolService interface {
|
||||
GetkartuKontrolById(id string) ([]models.KartuKontrolModel, error)
|
||||
}
|
||||
|
||||
func NewKartuKontrolHandler(us KartuKontrolService) *KartuKontrolHandler {
|
||||
return &KartuKontrolHandler{
|
||||
KartuKontrolService: us,
|
||||
}
|
||||
}
|
||||
|
||||
type KartuKontrolHandler struct {
|
||||
KartuKontrolService KartuKontrolService
|
||||
}
|
||||
|
||||
func (lh *KartuKontrolHandler) HandlerShowKartuKontrol(c echo.Context) error {
|
||||
|
||||
id := c.Param("id")
|
||||
// id := "1"
|
||||
logger, _ := zap.NewProduction()
|
||||
defer logger.Sync()
|
||||
|
||||
dataKartuKontrol, err := lh.KartuKontrolService.GetkartuKontrolById(id)
|
||||
|
||||
if err != nil {
|
||||
logger.Info("Error",
|
||||
zap.Any("Error", err),
|
||||
zap.Any("prm", id),
|
||||
)
|
||||
return err
|
||||
}
|
||||
logger.Info("SHOW DATA KARTU KONTROL handler",
|
||||
zap.Any("return", dataKartuKontrol),
|
||||
zap.Any("prm", id),
|
||||
)
|
||||
|
||||
si := kartukontrol.ShowKartuKontrol("Kartu Kontrol", kartukontrol.MainContentKartuKontrolLayout(dataKartuKontrol), kartukontrol.CssKartuKontrol(), kartukontrol.JsKartuKontrol())
|
||||
|
||||
return utils.View(c, si)
|
||||
}
|
||||
@@ -206,4 +206,9 @@ func SetupRoutesDev(app *echo.Echo, appStore db.AppStore) {
|
||||
|
||||
// clientgroup.GET("/usergroup/edit", mastermenuusergroupHandler.ChangeFormEdit)
|
||||
// clientgroup.GET("/usergroup/pagination", mastermenuusergroupHandler.HandleChangePage)
|
||||
|
||||
// kartu kontrol
|
||||
devKartuKontrolServices := dev_services.NewServicesKartuKontrol(appStore)
|
||||
devKartuKontrolhandlers := dev_handlers.NewKartuKontrolHandler(devKartuKontrolServices)
|
||||
dev.GET("/kartukontrol/:id", devKartuKontrolhandlers.HandlerShowKartuKontrol)
|
||||
}
|
||||
|
||||
33
models/kartukontrol.models.go
Normal file
33
models/kartukontrol.models.go
Normal file
@@ -0,0 +1,33 @@
|
||||
package models
|
||||
|
||||
type KartuKontrolModel struct {
|
||||
KartuKontrolDataPasienList []DataPasien `json:"kartuKontrolDataPasien"`
|
||||
KartuKontrolDataPemeriksaanList []DataPemeriksaanList `json:"kartuKontrolDataPemeriksaanList"`
|
||||
KartuKontrolDataPemeriksaanPengambilanSample []DataPemeriksaanPengambilanSample `json:"kartuKontrolDataPemeriksaanPengambilanSample"`
|
||||
}
|
||||
|
||||
type DataPasien struct {
|
||||
NomorRegistrasi string `json:"nomorRegistrasi"`
|
||||
NomorLab string `json:"nomorLab"`
|
||||
NamaPasien string `json:"namaPasien"`
|
||||
TanggalLahir string `json:"tanggalLahir"`
|
||||
Umur string `json:"umur"`
|
||||
JenisKelamin string `json:"jenisKelamin"`
|
||||
NamaDivisi string `json:"namaDivisi"`
|
||||
NamaCompany string `json:"namaCompany"`
|
||||
}
|
||||
|
||||
type DataPemeriksaanList struct {
|
||||
NamaPemeriksaanList string `json:"namaPemeriksaanList"`
|
||||
}
|
||||
|
||||
type SampleTypeList struct {
|
||||
SampleTypeName string `json:"sampleTypeName"`
|
||||
SampleTypeDateTime string `json:"sampleTypeDateTime"`
|
||||
SampleTypeStatus string `json:"sampleTypeStatus"`
|
||||
}
|
||||
|
||||
type DataPemeriksaanPengambilanSample struct {
|
||||
NamaPemeriksaanPengambilanSample string `json:"namaPemeriksaanPengambilanSample"`
|
||||
SampleTypeListData []SampleTypeList `json:"sampleTypeListData"`
|
||||
}
|
||||
112
services/dev/kartukontrol.services.go
Normal file
112
services/dev/kartukontrol.services.go
Normal file
@@ -0,0 +1,112 @@
|
||||
package dev_services
|
||||
|
||||
import (
|
||||
"cpone/db"
|
||||
"cpone/models"
|
||||
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
func NewServicesKartuKontrol(uStore db.AppStore) *ServicesKartuKontrol {
|
||||
|
||||
return &ServicesKartuKontrol{
|
||||
KartuKontrolStore: uStore,
|
||||
}
|
||||
}
|
||||
|
||||
type ServicesKartuKontrol struct {
|
||||
KartuKontrolStore db.AppStore
|
||||
}
|
||||
|
||||
func (su *ServicesKartuKontrol) GetkartuKontrolById(id string) ([]models.KartuKontrolModel, error) {
|
||||
|
||||
logger, _ := zap.NewProduction()
|
||||
defer logger.Sync()
|
||||
logger.Info("QUERY SEARCH GET KARTU KONTROL",
|
||||
zap.String("query search", ""),
|
||||
)
|
||||
|
||||
dataPasien := []models.DataPasien{
|
||||
{
|
||||
NomorRegistrasi: "00234",
|
||||
NomorLab: "LA90002",
|
||||
NamaPasien: "Hendra Setiawan",
|
||||
TanggalLahir: "2000-01-01",
|
||||
Umur: "24 tahun",
|
||||
JenisKelamin: "Laki-laki",
|
||||
NamaDivisi: "Development",
|
||||
NamaCompany: "PT. Sadhana Abiyasa Sampoerna",
|
||||
},
|
||||
}
|
||||
|
||||
dataPemeriksaanList := []models.DataPemeriksaanList{
|
||||
{NamaPemeriksaanList: "Hematologi Lengkap"},
|
||||
{NamaPemeriksaanList: "Urine Lengkap"},
|
||||
{NamaPemeriksaanList: "ACG"},
|
||||
{NamaPemeriksaanList: "Treadmill"},
|
||||
{NamaPemeriksaanList: "Pemeriksaan Fisik"},
|
||||
{NamaPemeriksaanList: "Hematologi Lengkap"},
|
||||
{NamaPemeriksaanList: "Urine Lengkap"},
|
||||
{NamaPemeriksaanList: "ACG"},
|
||||
{NamaPemeriksaanList: "Treadmill"},
|
||||
{NamaPemeriksaanList: "Pemeriksaan Fisik"},
|
||||
{NamaPemeriksaanList: "Hematologi Lengkap"},
|
||||
{NamaPemeriksaanList: "Urine Lengkap"},
|
||||
{NamaPemeriksaanList: "ACG"},
|
||||
{NamaPemeriksaanList: "Treadmill"},
|
||||
{NamaPemeriksaanList: "Pemeriksaan Fisik"},
|
||||
{NamaPemeriksaanList: "Hematologi Lengkap"},
|
||||
{NamaPemeriksaanList: "Urine Lengkap"},
|
||||
{NamaPemeriksaanList: "ACG"},
|
||||
{NamaPemeriksaanList: "Treadmill"},
|
||||
{NamaPemeriksaanList: "Pemeriksaan Fisik"},
|
||||
}
|
||||
|
||||
dataPemeriksaanPengambilanSample := []models.DataPemeriksaanPengambilanSample{
|
||||
{
|
||||
NamaPemeriksaanPengambilanSample: "Laboratorium",
|
||||
SampleTypeListData: []models.SampleTypeList{
|
||||
{
|
||||
SampleTypeName: "Darah",
|
||||
SampleTypeDateTime: "15-05-2024 10:00",
|
||||
SampleTypeStatus: "Sudah",
|
||||
},
|
||||
{
|
||||
SampleTypeName: "Urine",
|
||||
SampleTypeDateTime: "15-05-2024 10:00",
|
||||
SampleTypeStatus: "Sudah",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
NamaPemeriksaanPengambilanSample: "Rontgen",
|
||||
SampleTypeListData: []models.SampleTypeList{
|
||||
{
|
||||
SampleTypeName: "Thorax AP (PCR)",
|
||||
SampleTypeDateTime: "",
|
||||
SampleTypeStatus: "Sudah",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
NamaPemeriksaanPengambilanSample: "Elektromedis",
|
||||
SampleTypeListData: []models.SampleTypeList{
|
||||
{
|
||||
SampleTypeName: "ECG",
|
||||
SampleTypeStatus: "Belum",
|
||||
SampleTypeDateTime: "",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
kartuKontrol := []models.KartuKontrolModel{
|
||||
{
|
||||
KartuKontrolDataPasienList: dataPasien,
|
||||
KartuKontrolDataPemeriksaanList: dataPemeriksaanList,
|
||||
KartuKontrolDataPemeriksaanPengambilanSample: dataPemeriksaanPengambilanSample,
|
||||
},
|
||||
}
|
||||
|
||||
return kartuKontrol, nil
|
||||
}
|
||||
177
views/dev/kartukontrol/kartukontrol.templ
Normal file
177
views/dev/kartukontrol/kartukontrol.templ
Normal file
@@ -0,0 +1,177 @@
|
||||
package kartukontrol
|
||||
|
||||
import (
|
||||
"cpone/models"
|
||||
"cpone/layout"
|
||||
)
|
||||
|
||||
templ MainContentKartuKontrolLayout(dataKartuKontrol []models.KartuKontrolModel) {
|
||||
<div class="content-fluid bg-white">
|
||||
<div class="card-control py-19 px-9">
|
||||
if len(dataKartuKontrol) > 0 {
|
||||
@ContentDataPasienList(dataKartuKontrol[0].KartuKontrolDataPasienList)
|
||||
@ContentPemeriksaanLayout(dataKartuKontrol[0].KartuKontrolDataPemeriksaanList, dataKartuKontrol[0].KartuKontrolDataPemeriksaanPengambilanSample)
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
templ ContentDataPasienList(dataPasienList []models.DataPasien) {
|
||||
<!-- begin::Data Pasien -->
|
||||
<div class="left pt-6 pl-7" style="position: relative">
|
||||
<div class="foto top-right mt-7 mr-6"></div>
|
||||
<div class="card-label">
|
||||
<h4>Data Pasien</h4>
|
||||
</div>
|
||||
<div class="pt-4">
|
||||
<h5 class="text-primary">No Registrasi</h5>
|
||||
<h5>{ dataPasienList[0].NomorRegistrasi }</h5>
|
||||
</div>
|
||||
<div class="pt-4">
|
||||
<h5 class="text-primary">Nomor Lab</h5>
|
||||
<h5>{ dataPasienList[0].NomorLab }</h5>
|
||||
</div>
|
||||
<div class="pt-4">
|
||||
<h5 class="text-primary">Nama Pasien</h5>
|
||||
<h5>{ dataPasienList[0].NamaPasien }</h5>
|
||||
</div>
|
||||
<div class="pt-4">
|
||||
<h5 class="text-primary">Tanggal Lahir / Umur</h5>
|
||||
<h5>{ dataPasienList[0].TanggalLahir } / { dataPasienList[0].Umur }</h5>
|
||||
</div>
|
||||
<div class="pt-4">
|
||||
<h5 class="text-primary">Jenis Kelamin</h5>
|
||||
<h5>{ dataPasienList[0].JenisKelamin }</h5>
|
||||
</div>
|
||||
<div class="pt-4">
|
||||
<h5 class="text-primary">Divisi</h5>
|
||||
<h5>{ dataPasienList[0].NamaDivisi }</h5>
|
||||
</div>
|
||||
<div class="pt-4">
|
||||
<h5 class="text-primary">Company</h5>
|
||||
<h5>{ dataPasienList[0].NamaCompany }</h5>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end::Data Pasien -->
|
||||
}
|
||||
|
||||
templ ContentPemeriksaanLayout(dataPemeriksaanList []models.DataPemeriksaanList, dataPemeriksaanPengambilanSample []models.DataPemeriksaanPengambilanSample) {
|
||||
<div class="card shadow-sm py-2 mt-29">
|
||||
@ContentPemeriksaanList(dataPemeriksaanList)
|
||||
</div>
|
||||
@ContentPengambilanSampleList(dataPemeriksaanPengambilanSample)
|
||||
}
|
||||
|
||||
templ ContentPemeriksaanList(dataPemeriksaan []models.DataPemeriksaanList) {
|
||||
<div class="card-body px-3 py-2">
|
||||
<h5 class="card-title">Daftar Pemeriksaan</h5>
|
||||
if len(dataPemeriksaan) > 0 {
|
||||
<ul class="list-group text-grey ml-7 mt-1">
|
||||
for _, v := range dataPemeriksaan {
|
||||
<li><h6>{ v.NamaPemeriksaanList }</h6></li>
|
||||
}
|
||||
</ul>
|
||||
} else {
|
||||
<h6>Belum Ada Daftar Pemeriksaan</h6>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
||||
templ ContentPengambilanSampleList(dataPemeriksaanPengambilanSample []models.DataPemeriksaanPengambilanSample) {
|
||||
<div class="card py-2 mt-6">
|
||||
<div class="card-body px-3 py-2">
|
||||
<!-- begin::Pemeriksaan/Pengambilan Sample -->
|
||||
<h5 class="card-title">Pemeriksaan / Pengambilan Sample</h5>
|
||||
if len(dataPemeriksaanPengambilanSample) > 0 {
|
||||
for _, v := range dataPemeriksaanPengambilanSample {
|
||||
<div class="text-grey mb-3">
|
||||
<h5>{ v.NamaPemeriksaanPengambilanSample }</h5>
|
||||
if len(v.SampleTypeListData) > 0 {
|
||||
<ul class="list-group ml-7 mt-1">
|
||||
for _, k := range v.SampleTypeListData {
|
||||
<li class="justify-content-center align-items-center mb-3">
|
||||
<div class="row">
|
||||
<div class="col-9 d-flex">
|
||||
<h6>{ k.SampleTypeName }</h6>
|
||||
if len(k.SampleTypeDateTime) > 0 {
|
||||
<span class="smallf pl-5 vertical">{ k.SampleTypeDateTime }</span>
|
||||
}
|
||||
</div>
|
||||
<div class="col-3">
|
||||
<span class="label label-inline font-weight-bold kartukontrol-sudah-label mr-2 shadow-sm">{ k.SampleTypeStatus }</span>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
} else {
|
||||
<h6>Belum Ada Data Pengambilan Sample</h6>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
} else {
|
||||
<h6>Belum Ada Data Pemeriksaan & Pengambilan Sample</h6>
|
||||
}
|
||||
<!-- end::Pemeriksaan/Pengambilan Sample -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height: 14vh;"></div>
|
||||
}
|
||||
|
||||
templ CssKartuKontrol() {
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="assets/css/googlefont/poppins.css"
|
||||
/>
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="assets/css/googlefont/publicsans.css"
|
||||
/>
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="assets/css/googlefont/roboto.css"
|
||||
/>
|
||||
<style>
|
||||
body {
|
||||
background-color: var(--white)
|
||||
}
|
||||
.card-control {
|
||||
width: 390px;
|
||||
height: 1212px;
|
||||
background-image: url("asset-corporate-portal/media/kartukontrol/bg-kartuKontrol.svg");
|
||||
background-size: 390px 1212px;
|
||||
background-repeat: no-repeat;
|
||||
margin: auto;
|
||||
}
|
||||
.foto {
|
||||
width: 70px;
|
||||
height: 79px;
|
||||
background-image: url("assets/media/svg/avatars/001-boy.svg");
|
||||
background-size: 70px 79px;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
.top-right {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
h5 {
|
||||
font-size: 14px;
|
||||
}
|
||||
h6 {
|
||||
font-size: 12px;
|
||||
}
|
||||
.smallf {
|
||||
font-size: 10px;
|
||||
}
|
||||
</style>
|
||||
}
|
||||
|
||||
templ JsKartuKontrol() {
|
||||
}
|
||||
|
||||
templ ShowKartuKontrol(title string, cmp templ.Component, css templ.Component, js templ.Component) {
|
||||
@layout.PlaygroundLayout(title, css, js) {
|
||||
@cmp
|
||||
}
|
||||
}
|
||||
495
views/dev/kartukontrol/kartukontrol_templ.go
Normal file
495
views/dev/kartukontrol/kartukontrol_templ.go
Normal file
@@ -0,0 +1,495 @@
|
||||
// Code generated by templ - DO NOT EDIT.
|
||||
|
||||
// templ: version: v0.2.663
|
||||
package kartukontrol
|
||||
|
||||
//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"
|
||||
"cpone/models"
|
||||
)
|
||||
|
||||
func MainContentKartuKontrolLayout(dataKartuKontrol []models.KartuKontrolModel) 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 class=\"content-fluid bg-white\"><div class=\"card-control py-19 px-9\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
if len(dataKartuKontrol) > 0 {
|
||||
templ_7745c5c3_Err = ContentDataPasienList(dataKartuKontrol[0].KartuKontrolDataPasienList).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = ContentPemeriksaanLayout(dataKartuKontrol[0].KartuKontrolDataPemeriksaanList, dataKartuKontrol[0].KartuKontrolDataPemeriksaanPengambilanSample).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div></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 ContentDataPasienList(dataPasienList []models.DataPasien) 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)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<!-- begin::Data Pasien --><div class=\"left pt-6 pl-7\" style=\"position: relative\"><div class=\"foto top-right mt-7 mr-6\"></div><div class=\"card-label\"><h4>Data Pasien</h4></div><div class=\"pt-4\"><h5 class=\"text-primary\">No Registrasi</h5><h5>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var3 string
|
||||
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(dataPasienList[0].NomorRegistrasi)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\kartukontrol\kartukontrol.templ`, Line: 28, Col: 42}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</h5></div><div class=\"pt-4\"><h5 class=\"text-primary\">Nomor Lab</h5><h5>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var4 string
|
||||
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(dataPasienList[0].NomorLab)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\kartukontrol\kartukontrol.templ`, Line: 32, Col: 35}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</h5></div><div class=\"pt-4\"><h5 class=\"text-primary\">Nama Pasien</h5><h5>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var5 string
|
||||
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(dataPasienList[0].NamaPasien)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\kartukontrol\kartukontrol.templ`, Line: 36, Col: 37}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</h5></div><div class=\"pt-4\"><h5 class=\"text-primary\">Tanggal Lahir / Umur</h5><h5>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var6 string
|
||||
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(dataPasienList[0].TanggalLahir)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\kartukontrol\kartukontrol.templ`, Line: 40, Col: 39}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" / ")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var7 string
|
||||
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(dataPasienList[0].Umur)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\kartukontrol\kartukontrol.templ`, Line: 40, Col: 68}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</h5></div><div class=\"pt-4\"><h5 class=\"text-primary\">Jenis Kelamin</h5><h5>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var8 string
|
||||
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(dataPasienList[0].JenisKelamin)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\kartukontrol\kartukontrol.templ`, Line: 44, Col: 39}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</h5></div><div class=\"pt-4\"><h5 class=\"text-primary\">Divisi</h5><h5>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var9 string
|
||||
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(dataPasienList[0].NamaDivisi)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\kartukontrol\kartukontrol.templ`, Line: 48, Col: 37}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</h5></div><div class=\"pt-4\"><h5 class=\"text-primary\">Company</h5><h5>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var10 string
|
||||
templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(dataPasienList[0].NamaCompany)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\kartukontrol\kartukontrol.templ`, Line: 52, Col: 38}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</h5></div></div><!-- end::Data Pasien -->")
|
||||
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 ContentPemeriksaanLayout(dataPemeriksaanList []models.DataPemeriksaanList, dataPemeriksaanPengambilanSample []models.DataPemeriksaanPengambilanSample) 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_Var11 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var11 == nil {
|
||||
templ_7745c5c3_Var11 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"card shadow-sm py-2 mt-29\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = ContentPemeriksaanList(dataPemeriksaanList).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = ContentPengambilanSampleList(dataPemeriksaanPengambilanSample).Render(ctx, 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
|
||||
})
|
||||
}
|
||||
|
||||
func ContentPemeriksaanList(dataPemeriksaan []models.DataPemeriksaanList) 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_Var12 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var12 == nil {
|
||||
templ_7745c5c3_Var12 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"card-body px-3 py-2\"><h5 class=\"card-title\">Daftar Pemeriksaan</h5>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
if len(dataPemeriksaan) > 0 {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<ul class=\"list-group text-grey ml-7 mt-1\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
for _, v := range dataPemeriksaan {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<li><h6>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var13 string
|
||||
templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(v.NamaPemeriksaanList)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\kartukontrol\kartukontrol.templ`, Line: 71, Col: 36}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</h6></li>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</ul>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
} else {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<h6>Belum Ada Daftar Pemeriksaan</h6>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</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 ContentPengambilanSampleList(dataPemeriksaanPengambilanSample []models.DataPemeriksaanPengambilanSample) 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_Var14 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var14 == nil {
|
||||
templ_7745c5c3_Var14 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"card py-2 mt-6\"><div class=\"card-body px-3 py-2\"><!-- begin::Pemeriksaan/Pengambilan Sample --><h5 class=\"card-title\">Pemeriksaan / Pengambilan Sample</h5>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
if len(dataPemeriksaanPengambilanSample) > 0 {
|
||||
for _, v := range dataPemeriksaanPengambilanSample {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"text-grey mb-3\"><h5>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var15 string
|
||||
templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(v.NamaPemeriksaanPengambilanSample)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\kartukontrol\kartukontrol.templ`, Line: 88, Col: 46}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</h5>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
if len(v.SampleTypeListData) > 0 {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<ul class=\"list-group ml-7 mt-1\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
for _, k := range v.SampleTypeListData {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<li class=\"justify-content-center align-items-center mb-3\"><div class=\"row\"><div class=\"col-9 d-flex\"><h6>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var16 string
|
||||
templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs(k.SampleTypeName)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\kartukontrol\kartukontrol.templ`, Line: 95, Col: 34}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</h6>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
if len(k.SampleTypeDateTime) > 0 {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<span class=\"smallf pl-5 vertical\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var17 string
|
||||
templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(k.SampleTypeDateTime)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\kartukontrol\kartukontrol.templ`, Line: 97, Col: 70}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</span>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div><div class=\"col-3\"><span class=\"label label-inline font-weight-bold kartukontrol-sudah-label mr-2 shadow-sm\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var18 string
|
||||
templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.JoinStringErrs(k.SampleTypeStatus)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\kartukontrol\kartukontrol.templ`, Line: 101, Col: 122}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var18))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</span></div></div></li>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</ul>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
} else {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<h6>Belum Ada Data Pengambilan Sample</h6>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<h6>Belum Ada Data Pemeriksaan & Pengambilan Sample</h6>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<!-- end::Pemeriksaan/Pengambilan Sample --></div></div><div style=\"height: 14vh;\"></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 CssKartuKontrol() 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_Var19 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var19 == nil {
|
||||
templ_7745c5c3_Var19 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<link rel=\"stylesheet\" href=\"assets/css/googlefont/poppins.css\"><link rel=\"stylesheet\" href=\"assets/css/googlefont/publicsans.css\"><link rel=\"stylesheet\" href=\"assets/css/googlefont/roboto.css\"><style>\r\n body {\r\n background-color: var(--white)\r\n }\r\n\t\t.card-control {\r\n\t\t\twidth: 390px;\r\n\t\t\theight: 1212px;\r\n\t\t\tbackground-image: url(\"asset-corporate-portal/media/kartukontrol/bg-kartuKontrol.svg\");\r\n\t\t\tbackground-size: 390px 1212px;\r\n\t\t\tbackground-repeat: no-repeat;\r\n margin: auto;\r\n\t\t}\r\n\t\t.foto {\r\n\t\t\twidth: 70px;\r\n\t\t\theight: 79px;\r\n\t\t\tbackground-image: url(\"assets/media/svg/avatars/001-boy.svg\");\r\n\t\t\tbackground-size: 70px 79px;\r\n\t\t\tbackground-repeat: no-repeat;\r\n\t\t}\r\n\t\t.top-right {\r\n\t\t\tposition: absolute;\r\n\t\t\ttop: 0;\r\n\t\t\tright: 0;\r\n\t\t}\r\n\t\th5 {\r\n\t\t\tfont-size: 14px;\r\n\t\t}\r\n\t\th6 {\r\n\t\t\tfont-size: 12px;\r\n\t\t}\r\n\t\t.smallf {\r\n\t\t\tfont-size: 10px;\r\n\t\t}\r\n\t</style>")
|
||||
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 JsKartuKontrol() 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_Var20 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var20 == nil {
|
||||
templ_7745c5c3_Var20 = 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 ShowKartuKontrol(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_Var21 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var21 == nil {
|
||||
templ_7745c5c3_Var21 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
templ_7745c5c3_Var22 := 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_Var22), 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
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user