add xs layout echarts

This commit is contained in:
2024-07-08 08:47:56 +07:00
parent f2d8207f25
commit e4364f0c4f
17 changed files with 518 additions and 336 deletions

View File

@@ -1,12 +1,9 @@
package corporate_mcudetail
templ Tabkelainanfisik(
chartbmixs templ.Component,
chartbmimd templ.Component,
chartbmilg templ.Component,
charthprxs templ.Component,
charthprmd templ.Component,
charthprlg templ.Component,
chartsxs []templ.Component,
chartsmd []templ.Component,
chartslg []templ.Component,
) {
<div class="container-fluid">
<div class="d-flex justify-content-center py-10">
@@ -15,29 +12,34 @@ templ Tabkelainanfisik(
// xs
<div class="d-xs-block d-sm-block d-md-none">
<div class="d-flex justify-content-center mb-8">
@chartbmixs
</div>
<div class="d-flex justify-content-center mb-8">
@charthprxs
<div class="row justify-content-center">
for _, c := range chartsxs {
<div class="col-12 my-4">
@ChartCard(c)
</div>
}
</div>
</div>
// md
<div class="d-none d-md-block d-lg-none">
<div class="d-flex justify-content-center mb-8">
@chartbmimd
</div>
<div class="d-flex justify-content-center mb-8">
@charthprmd
<div class="row justify-content-center">
for _, c := range chartsmd {
<div class="col-12 my-4">
@ChartCard(c)
</div>
}
</div>
</div>
// lg
<div class="d-none d-lg-block">
<div class="d-flex justify-content-center mb-8">
@chartbmilg
@charthprlg
<div class="row justify-content-center">
for _, c := range chartslg {
<div class="col-6 my-4">
@ChartCard(c)
</div>
}
</div>
</div>
</div>

View File

@@ -11,12 +11,9 @@ import "io"
import "bytes"
func Tabkelainanfisik(
chartbmixs templ.Component,
chartbmimd templ.Component,
chartbmilg templ.Component,
charthprxs templ.Component,
charthprmd templ.Component,
charthprlg templ.Component,
chartsxs []templ.Component,
chartsmd []templ.Component,
chartslg []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)
@@ -30,49 +27,59 @@ func Tabkelainanfisik(
templ_7745c5c3_Var1 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"container-fluid\"><div class=\"d-flex justify-content-center py-10\"><h2 class=\"title text-black\" style=\"margin-bottom: 0;\">Data Presentase Kelainan Fisik</h2></div><div class=\"d-xs-block d-sm-block d-md-none\"><div class=\"d-flex justify-content-center mb-8\">")
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"container-fluid\"><div class=\"d-flex justify-content-center py-10\"><h2 class=\"title text-black\" style=\"margin-bottom: 0;\">Data Presentase Kelainan Fisik</h2></div><div class=\"d-xs-block d-sm-block d-md-none\"><div class=\"row justify-content-center\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = chartbmixs.Render(ctx, templ_7745c5c3_Buffer)
for _, c := range chartsxs {
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"col-12 my-4\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = ChartCard(c).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 = templ_7745c5c3_Buffer.WriteString("</div></div><div class=\"d-none d-md-block d-lg-none\"><div class=\"row justify-content-center\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div><div class=\"d-flex justify-content-center mb-8\">")
for _, c := range chartsmd {
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"col-12 my-4\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = ChartCard(c).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 = templ_7745c5c3_Buffer.WriteString("</div></div><div class=\"d-none d-lg-block\"><div class=\"row justify-content-center\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = charthprxs.Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div></div><div class=\"d-none d-md-block d-lg-none\"><div class=\"d-flex justify-content-center mb-8\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = chartbmimd.Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div><div class=\"d-flex justify-content-center mb-8\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = charthprmd.Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div></div><div class=\"d-none d-lg-block\"><div class=\"d-flex justify-content-center mb-8\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = chartbmilg.Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = charthprlg.Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
for _, c := range chartslg {
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"col-6 my-4\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = ChartCard(c).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 = templ_7745c5c3_Buffer.WriteString("</div></div></div>")
if templ_7745c5c3_Err != nil {

View File

@@ -1,12 +1,9 @@
package corporate_mcudetail
templ TabKelainanGlobal(
chartmcuxs templ.Component,
chartfisikxs templ.Component,
chartmcumd templ.Component,
chartfisikmd templ.Component,
chartmculg templ.Component,
chartfisiklg templ.Component,
chartsxs []templ.Component,
chartsmd []templ.Component,
chartslg []templ.Component,
) {
<div class="container-fluid">
<div class="d-flex justify-content-center py-10">
@@ -15,31 +12,34 @@ templ TabKelainanGlobal(
// xs
<div class="d-xs-block d-sm-block d-md-none">
<div class="mb-8">
@chartmcuxs
</div>
<div class="mb-8">
@chartfisikxs
<div class="row justify-content-center">
for _, c := range chartsxs {
<div class="col-12 my-4">
@ChartCard(c)
</div>
}
</div>
</div>
// md
<div class="d-none d-md-block d-lg-none">
<div class="mb-8">
@chartmcumd
</div>
<div class="mb-8">
@chartfisikmd
<div class="row justify-content-center">
for _, c := range chartsmd {
<div class="col-12 my-4">
@ChartCard(c)
</div>
}
</div>
</div>
// lg
<div class="d-none d-lg-block">
<div class="mb-8">
@chartmculg
</div>
<div class="mb-8">
@chartfisiklg
<div class="row justify-content-center">
for _, c := range chartslg {
<div class="col-12 my-4">
@ChartCard(c)
</div>
}
</div>
</div>
</div>

View File

@@ -11,12 +11,9 @@ import "io"
import "bytes"
func TabKelainanGlobal(
chartmcuxs templ.Component,
chartfisikxs templ.Component,
chartmcumd templ.Component,
chartfisikmd templ.Component,
chartmculg templ.Component,
chartfisiklg templ.Component,
chartsxs []templ.Component,
chartsmd []templ.Component,
chartslg []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)
@@ -30,53 +27,59 @@ func TabKelainanGlobal(
templ_7745c5c3_Var1 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"container-fluid\"><div class=\"d-flex justify-content-center py-10\"><h2 class=\"title text-black\" style=\"margin-bottom: 0;\">Data Kelainan Global</h2></div><div class=\"d-xs-block d-sm-block d-md-none\"><div class=\"mb-8\">")
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"container-fluid\"><div class=\"d-flex justify-content-center py-10\"><h2 class=\"title text-black\" style=\"margin-bottom: 0;\">Data Kelainan Global</h2></div><div class=\"d-xs-block d-sm-block d-md-none\"><div class=\"row justify-content-center\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = chartmcuxs.Render(ctx, templ_7745c5c3_Buffer)
for _, c := range chartsxs {
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"col-12 my-4\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = ChartCard(c).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 = templ_7745c5c3_Buffer.WriteString("</div></div><div class=\"d-none d-md-block d-lg-none\"><div class=\"row justify-content-center\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div><div class=\"mb-8\">")
for _, c := range chartsmd {
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"col-12 my-4\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = ChartCard(c).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 = templ_7745c5c3_Buffer.WriteString("</div></div><div class=\"d-none d-lg-block\"><div class=\"row justify-content-center\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = chartfisikxs.Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div></div><div class=\"d-none d-md-block d-lg-none\"><div class=\"mb-8\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = chartmcumd.Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div><div class=\"mb-8\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = chartfisikmd.Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div></div><div class=\"d-none d-lg-block\"><div class=\"mb-8\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = chartmculg.Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div><div class=\"mb-8\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = chartfisiklg.Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
for _, c := range chartslg {
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"col-12 my-4\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = ChartCard(c).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 = templ_7745c5c3_Buffer.WriteString("</div></div></div>")
if templ_7745c5c3_Err != nil {

View File

@@ -1,12 +1,10 @@
package corporate_mcudetail
templ TabKelainanLab(
chartpresentase templ.Component,
charthematologi templ.Component,
charturinalisa templ.Component,
chartganghati templ.Component,
chartmetalemak templ.Component,
chartglukosa templ.Component,
chartpresentaselg templ.Component,
chartsxs []templ.Component,
chartsmd []templ.Component,
chartslg []templ.Component,
) {
<div class="container-fluid">
<div class="d-flex justify-content-center py-10">
@@ -15,29 +13,37 @@ templ TabKelainanLab(
// xs
<div class="d-xs-block d-sm-block d-md-none">
<div class="row justify-content-center">
for _, c := range chartsxs {
<div class="col-12 my-4">
@ChartCard(c)
</div>
}
</div>
</div>
// md
<div class="d-none d-md-block d-lg-none">
<div class="row justify-content-center">
for _, c := range chartsmd {
<div class="col-12 my-4">
@ChartCard(c)
</div>
}
</div>
</div>
// lg
<div class="d-none d-lg-block">
<div class="mb-8">
@chartpresentase
</div>
<div class="row mb-8">
@charthematologi
@charturinalisa
</div>
<div class="row mb-8">
@chartganghati
@chartmetalemak
</div>
<div class="row mb-8">
@chartglukosa
<div class="row justify-content-center">
<div class="col-12 my-4">
@ChartCard(chartpresentaselg)
</div>
for _, c := range chartslg{
<div class="col-6 my-4">
@ChartCard(c)
</div>
}
</div>
</div>
</div>

View File

@@ -11,12 +11,10 @@ import "io"
import "bytes"
func TabKelainanLab(
chartpresentase templ.Component,
charthematologi templ.Component,
charturinalisa templ.Component,
chartganghati templ.Component,
chartmetalemak templ.Component,
chartglukosa templ.Component,
chartpresentaselg templ.Component,
chartsxs []templ.Component,
chartsmd []templ.Component,
chartslg []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)
@@ -30,45 +28,67 @@ func TabKelainanLab(
templ_7745c5c3_Var1 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"container-fluid\"><div class=\"d-flex justify-content-center py-10\"><h2 class=\"title text-black\" style=\"margin-bottom: 0;\">Data Kelainan Lab</h2></div><div class=\"d-xs-block d-sm-block d-md-none\"></div><div class=\"d-none d-md-block d-lg-none\"></div><div class=\"d-none d-lg-block\"><div class=\"mb-8\">")
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"container-fluid\"><div class=\"d-flex justify-content-center py-10\"><h2 class=\"title text-black\" style=\"margin-bottom: 0;\">Data Kelainan Lab</h2></div><div class=\"d-xs-block d-sm-block d-md-none\"><div class=\"row justify-content-center\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = chartpresentase.Render(ctx, templ_7745c5c3_Buffer)
for _, c := range chartsxs {
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"col-12 my-4\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = ChartCard(c).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 = templ_7745c5c3_Buffer.WriteString("</div></div><div class=\"d-none d-md-block d-lg-none\"><div class=\"row justify-content-center\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div><div class=\"row mb-8\">")
for _, c := range chartsmd {
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"col-12 my-4\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = ChartCard(c).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 = templ_7745c5c3_Buffer.WriteString("</div></div><div class=\"d-none d-lg-block\"><div class=\"row justify-content-center\"><div class=\"col-12 my-4\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = charthematologi.Render(ctx, templ_7745c5c3_Buffer)
templ_7745c5c3_Err = ChartCard(chartpresentaselg).Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = charturinalisa.Render(ctx, templ_7745c5c3_Buffer)
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div><div class=\"row mb-8\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = chartganghati.Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = chartmetalemak.Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div><div class=\"row mb-8\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = chartglukosa.Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
for _, c := range chartslg {
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"col-6 my-4\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = ChartCard(c).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 = templ_7745c5c3_Buffer.WriteString("</div></div></div>")
if templ_7745c5c3_Err != nil {

View File

@@ -1,8 +1,11 @@
package corporate_mcudetail
templ TabKelainanNonLab(
chartpresentase templ.Component,
chartthorax templ.Component,
// chartpresentase templ.Component,
// chartthorax templ.Component,
chartsxs []templ.Component,
chartsmd []templ.Component,
chartslg []templ.Component,
) {
<div class="container-fluid">
<div class="d-flex justify-content-center py-10">
@@ -11,21 +14,48 @@ templ TabKelainanNonLab(
// xs
<div class="d-xs-block d-sm-block d-md-none">
<div class="row justify-content-center">
for _, c := range chartsxs {
<div class="col-12 my-4">
@ChartCard(c)
</div>
}
</div>
</div>
// md
<div class="d-none d-md-block d-lg-none">
<div class="row justify-content-center">
for _, c := range chartsmd {
<div class="col-12 my-4">
@ChartCard(c)
</div>
}
</div>
</div>
// lg
<div class="d-none d-lg-block">
<div class="mb-8">
@chartpresentase
</div>
<div class="mb-8">
@chartthorax
<div class="row justify-content-center">
// <div class="col-12 my-4">
// <div class="card shadow p-4" style="display: flex; justify-content: center; align-items: center; height: 100%;">
// <div class="d-flex flex-column pt-8">
// @chartpresentase
// </div>
// </div>
// </div>
// <div class="col-12 my-4">
// <div class="card shadow p-4" style="display: flex; justify-content: center; align-items: center; height: 100%;">
// <div class="d-flex flex-column pt-8">
// @chartthorax
// </div>
// </div>
// </div>
for _, c := range chartslg {
<div class="col-12 my-4">
@ChartCard(c)
</div>
}
</div>
</div>
</div>

View File

@@ -11,8 +11,11 @@ import "io"
import "bytes"
func TabKelainanNonLab(
chartpresentase templ.Component,
chartthorax templ.Component,
// chartpresentase templ.Component,
// chartthorax templ.Component,
chartsxs []templ.Component,
chartsmd []templ.Component,
chartslg []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)
@@ -26,21 +29,59 @@ func TabKelainanNonLab(
templ_7745c5c3_Var1 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"container-fluid\"><div class=\"d-flex justify-content-center py-10\"><h2 class=\"title text-black\" style=\"margin-bottom: 0;\">Data Kelainan Non Lab</h2></div><div class=\"d-xs-block d-sm-block d-md-none\"></div><div class=\"d-none d-md-block d-lg-none\"></div><div class=\"d-none d-lg-block\"><div class=\"mb-8\">")
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"container-fluid\"><div class=\"d-flex justify-content-center py-10\"><h2 class=\"title text-black\" style=\"margin-bottom: 0;\">Data Kelainan Non Lab</h2></div><div class=\"d-xs-block d-sm-block d-md-none\"><div class=\"row justify-content-center\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = chartpresentase.Render(ctx, templ_7745c5c3_Buffer)
for _, c := range chartsxs {
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"col-12 my-4\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = ChartCard(c).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 = templ_7745c5c3_Buffer.WriteString("</div></div><div class=\"d-none d-md-block d-lg-none\"><div class=\"row justify-content-center\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div><div class=\"mb-8\">")
for _, c := range chartsmd {
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"col-12 my-4\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = ChartCard(c).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 = templ_7745c5c3_Buffer.WriteString("</div></div><div class=\"d-none d-lg-block\"><div class=\"row justify-content-center\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = chartthorax.Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
for _, c := range chartslg {
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"col-12 my-4\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = ChartCard(c).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 = templ_7745c5c3_Buffer.WriteString("</div></div></div>")
if templ_7745c5c3_Err != nil {

View File

@@ -1,15 +1,9 @@
package corporate_mcudetail
templ TabKepesertaan(
chartalpha templ.Component,
chartbeta templ.Component,
chartdelta templ.Component,
chartalphaxs templ.Component,
chartbetaxs templ.Component,
chartdeltaxs templ.Component,
chartalphamd templ.Component,
chartbetamd templ.Component,
chartdeltamd templ.Component,
chartsxs []templ.Component,
chartsmd []templ.Component,
chartslg []templ.Component,
) {
<div class="container-fluid">
<div class="d-flex justify-content-center py-10">
@@ -18,57 +12,45 @@ templ TabKepesertaan(
// xs
<div class="d-xs-block d-sm-block d-md-none">
<div class="d-flex justify-content-center mb-8">
<div style="width: 400px;">
@chartalphaxs
</div>
</div>
<div class="d-flex justify-content-center mb-8">
<div style="width: 400px;">
@chartbetaxs
</div>
</div>
<div class="d-flex justify-content-center mb-8">
<div style="width: 400px;">
@chartdeltaxs
</div>
<div class="row justify-content-center">
for _, c := range chartsxs {
<div class="col-12 my-4">
@ChartCard(c)
</div>
}
</div>
</div>
// md
<div class="d-none d-md-block d-lg-none">
<div class="d-flex justify-content-center mb-8">
<div style="width: 500px;">
@chartalphamd
</div>
</div>
<div class="d-flex justify-content-center mb-8">
<div style="width: 500px;">
@chartbetamd
</div>
</div>
<div class="d-flex justify-content-center mb-8">
<div style="width: 500px;">
@chartdeltamd
</div>
<div class="row justify-content-center">
for _, c := range chartsmd {
<div class="col-12 my-4">
@ChartCard(c)
</div>
}
</div>
</div>
// lg
<div class="d-none d-lg-block">
<div class="d-flex justify-content-center mb-8">
<div style="width: 600px;">
@chartalpha
</div>
<div style="width: 600px;">
@chartbeta
</div>
</div>
<div class="d-flex justify-content-center mb-8">
<div style="width: 600px;">
@chartdelta
</div>
<div class="row justify-content-center">
for _, c := range chartslg {
<div class="col-6 my-4">
@ChartCard(c)
</div>
}
</div>
</div>
</div>
}
templ ChartCard(
charts templ.Component,
) {
<div class="card shadow p-4" style="display: flex; justify-content: center; align-items: center; height: 100%;">
<div class="d-flex flex-column pt-8">
@charts
</div>
</div>
}

View File

@@ -11,15 +11,9 @@ import "io"
import "bytes"
func TabKepesertaan(
chartalpha templ.Component,
chartbeta templ.Component,
chartdelta templ.Component,
chartalphaxs templ.Component,
chartbetaxs templ.Component,
chartdeltaxs templ.Component,
chartalphamd templ.Component,
chartbetamd templ.Component,
chartdeltamd templ.Component,
chartsxs []templ.Component,
chartsmd []templ.Component,
chartslg []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)
@@ -33,79 +27,95 @@ func TabKepesertaan(
templ_7745c5c3_Var1 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"container-fluid\"><div class=\"d-flex justify-content-center py-10\"><h2 class=\"title text-black\" style=\"margin-bottom: 0;\">Data Kepesertaan MCU</h2></div><div class=\"d-xs-block d-sm-block d-md-none\"><div class=\"d-flex justify-content-center mb-8\"><div style=\"width: 400px;\">")
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"container-fluid\"><div class=\"d-flex justify-content-center py-10\"><h2 class=\"title text-black\" style=\"margin-bottom: 0;\">Data Kepesertaan MCU</h2></div><div class=\"d-xs-block d-sm-block d-md-none\"><div class=\"row justify-content-center\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = chartalphaxs.Render(ctx, templ_7745c5c3_Buffer)
for _, c := range chartsxs {
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"col-12 my-4\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = ChartCard(c).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 = templ_7745c5c3_Buffer.WriteString("</div></div><div class=\"d-none d-md-block d-lg-none\"><div class=\"row justify-content-center\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div></div><div class=\"d-flex justify-content-center mb-8\"><div style=\"width: 400px;\">")
for _, c := range chartsmd {
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"col-12 my-4\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = ChartCard(c).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 = templ_7745c5c3_Buffer.WriteString("</div></div><div class=\"d-none d-lg-block\"><div class=\"row justify-content-center\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = chartbetaxs.Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
for _, c := range chartslg {
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"col-6 my-4\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = ChartCard(c).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 = templ_7745c5c3_Buffer.WriteString("</div></div><div class=\"d-flex justify-content-center mb-8\"><div style=\"width: 400px;\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = chartdeltaxs.Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div></div></div><div class=\"d-none d-md-block d-lg-none\"><div class=\"d-flex justify-content-center mb-8\"><div style=\"width: 500px;\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = chartalphamd.Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div></div><div class=\"d-flex justify-content-center mb-8\"><div style=\"width: 500px;\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = chartbetamd.Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div></div><div class=\"d-flex justify-content-center mb-8\"><div style=\"width: 500px;\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = chartdeltamd.Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div></div></div><div class=\"d-none d-lg-block\"><div class=\"d-flex justify-content-center mb-8\"><div style=\"width: 600px;\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = chartalpha.Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div><div style=\"width: 600px;\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = chartbeta.Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div></div><div class=\"d-flex justify-content-center mb-8\"><div style=\"width: 600px;\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = chartdelta.Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div></div></div></div>")
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div></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 ChartCard(
charts 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_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("<div class=\"card shadow p-4\" style=\"display: flex; justify-content: center; align-items: center; height: 100%;\"><div class=\"d-flex flex-column pt-8\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = charts.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
}