diff --git a/component/modal/modal.templ b/component/modal/modal.templ
index 8a4b936..90e51b4 100644
--- a/component/modal/modal.templ
+++ b/component/modal/modal.templ
@@ -57,3 +57,29 @@ templ ModalXL(modalID string, modalTitle string, modalBody templ.Component, moda
}
+
+templ ModalViewXL(modalID string, modalTitle string, modalBody templ.Component, btnClose templ.Component) {
+
-
+
-
+
-
+
-
+
-
+
diff --git a/views/corporate/mcu/mcutabview_templ.go b/views/corporate/mcu/mcutabview_templ.go
index 1ccf847..5decf58 100644
--- a/views/corporate/mcu/mcutabview_templ.go
+++ b/views/corporate/mcu/mcutabview_templ.go
@@ -51,7 +51,72 @@ func TabViewMcuDetail(
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" hx-target=\"#tabdaftarpeserta\">Daftar Peserta
")
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" hx-target=\"#tabdaftarpeserta\">Daftar Peserta
")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
diff --git a/views/corporate/patient/listingpatient.templ b/views/corporate/patient/listingpatient.templ
new file mode 100644
index 0000000..93a2702
--- /dev/null
+++ b/views/corporate/patient/listingpatient.templ
@@ -0,0 +1,90 @@
+package corporate_patient
+
+import "cpone/models"
+import "strconv"
+
+templ ListingData(
+ data []models.DashboardPatient,
+ listID string,
+ hxGetCetak string,
+ hxTargetCetak string,
+ hxSwapCetak string,
+ hxIncludeCetak string,
+) {
+
+
+
+ for i, d := range data {
+ if i == (len(data) - 1) {
+
+ @ItemCard(d,
+ hxGetCetak,
+ hxTargetCetak,
+ hxSwapCetak,
+ hxIncludeCetak,
+ )
+
+ } else {
+
+ @ItemCard(d,
+ hxGetCetak,
+ hxTargetCetak,
+ hxSwapCetak,
+ hxIncludeCetak,
+ )
+
+ }
+ }
+
+
+
+}
+
+templ ItemCard(
+ data models.DashboardPatient,
+ hxGetCetak string,
+ hxTargetCetak string,
+ hxSwapCetak string,
+ hxIncludeCetak string,
+) {
+
+
+
{ data.T_OrderHeaderLabNumber }
+
+
+
{ data.T_OrderHeaderDate }
+
+
+
+}
+
+script HandleBeforeRequestRow(id string) {
+ var cusid_ele = document.getElementsByClassName('btncetak');
+ for (var i = 0; i < cusid_ele.length; ++i) {
+ var item = cusid_ele[i];
+ item.classList.add('disabled');
+ }
+ console.log(id)
+}
+
+script HandleAfterRequestRow(id string) {
+ var cusid_ele = document.getElementsByClassName('btncetak');
+ for (var i = 0; i < cusid_ele.length; ++i) {
+ var item = cusid_ele[i];
+ item.classList.remove('disabled');
+ }
+ console.log(id)
+}
\ No newline at end of file
diff --git a/views/corporate/patient/listingpatient_templ.go b/views/corporate/patient/listingpatient_templ.go
new file mode 100644
index 0000000..1a66eab
--- /dev/null
+++ b/views/corporate/patient/listingpatient_templ.go
@@ -0,0 +1,291 @@
+// Code generated by templ - DO NOT EDIT.
+
+// templ: version: v0.2.663
+package corporate_patient
+
+//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/models"
+import "strconv"
+
+func ListingData(
+ data []models.DashboardPatient,
+ listID string,
+ hxGetCetak string,
+ hxTargetCetak string,
+ hxSwapCetak string,
+ hxIncludeCetak string,
+) 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("
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ for i, d := range data {
+ if i == (len(data) - 1) {
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = ItemCard(d,
+ hxGetCetak,
+ hxTargetCetak,
+ hxSwapCetak,
+ hxIncludeCetak,
+ ).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
+ }
+ } else {
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = ItemCard(d,
+ hxGetCetak,
+ hxTargetCetak,
+ hxSwapCetak,
+ hxIncludeCetak,
+ ).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 = templ_7745c5c3_Buffer.WriteString("
")
+ 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 ItemCard(
+ data models.DashboardPatient,
+ hxGetCetak string,
+ hxTargetCetak string,
+ hxSwapCetak string,
+ hxIncludeCetak string,
+) 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_Var5 := templ.GetChildren(ctx)
+ if templ_7745c5c3_Var5 == nil {
+ templ_7745c5c3_Var5 = templ.NopComponent
+ }
+ ctx = templ.ClearChildren(ctx)
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var6 string
+ templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(data.T_OrderHeaderLabNumber)
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\patient\listingpatient.templ`, Line: 52, Col: 64}
+ }
+ _, 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(data.T_OrderHeaderDate)
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\corporate\patient\listingpatient.templ`, Line: 55, Col: 59}
+ }
+ _, 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(" ")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templ.RenderScriptItems(ctx, templ_7745c5c3_Buffer, HandleBeforeRequestRow(strconv.Itoa(data.T_OrderHeaderID)), HandleAfterRequestRow(strconv.Itoa(data.T_OrderHeaderID)))
+ 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
+ }
+ if !templ_7745c5c3_IsBuffer {
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_W)
+ }
+ return templ_7745c5c3_Err
+ })
+}
+
+func HandleBeforeRequestRow(id string) templ.ComponentScript {
+ return templ.ComponentScript{
+ Name: `__templ_HandleBeforeRequestRow_24b2`,
+ Function: `function __templ_HandleBeforeRequestRow_24b2(id){var cusid_ele = document.getElementsByClassName('btncetak');
+ for (var i = 0; i < cusid_ele.length; ++i) {
+ var item = cusid_ele[i];
+ item.classList.add('disabled');
+ }
+ console.log(id)
+}`,
+ Call: templ.SafeScript(`__templ_HandleBeforeRequestRow_24b2`, id),
+ CallInline: templ.SafeScriptInline(`__templ_HandleBeforeRequestRow_24b2`, id),
+ }
+}
+
+func HandleAfterRequestRow(id string) templ.ComponentScript {
+ return templ.ComponentScript{
+ Name: `__templ_HandleAfterRequestRow_f077`,
+ Function: `function __templ_HandleAfterRequestRow_f077(id){var cusid_ele = document.getElementsByClassName('btncetak');
+ for (var i = 0; i < cusid_ele.length; ++i) {
+ var item = cusid_ele[i];
+ item.classList.remove('disabled');
+ }
+ console.log(id)
+}`,
+ Call: templ.SafeScript(`__templ_HandleAfterRequestRow_f077`, id),
+ CallInline: templ.SafeScriptInline(`__templ_HandleAfterRequestRow_f077`, id),
+ }
+}
diff --git a/views/corporate/patient/patient.templ b/views/corporate/patient/patient.templ
index b2dfa42..504aacf 100644
--- a/views/corporate/patient/patient.templ
+++ b/views/corporate/patient/patient.templ
@@ -1,40 +1,122 @@
-package corporate_company
+package corporate_patient
import (
- "cpone/component/under_development"
"cpone/layout"
+ "cpone/component/customtextfield"
+ "cpone/models"
)
-templ Content() {
-
- @under_development.UnderDevelopment()
-
+
+templ DashboardPat(
+ listID string,
+ paginationID string,
+ dialogID string,
+ dialogBodyID string,
+ breadcrumb templ.Component,
+ listingcomponent templ.Component,
+ paginationcomponent templ.Component,
+ modaldialog templ.Component,
+) {
+
+ @customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "listID",
+ Name: "listID",
+ Type: "hidden",
+ Value: listID})
+ @customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "paginationID",
+ Name: "paginationID",
+ Type: "hidden",
+ Value: paginationID})
+ @customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "dialogID",
+ Name: "dialogID",
+ Type: "hidden",
+ Value: dialogID})
+ @customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "dialogBodyID",
+ Name: "dialogBodyID",
+ Type: "hidden",
+ Value: dialogBodyID})
+
+
+ @listingcomponent
+ @paginationcomponent
+ @modaldialog
+
+
+
+
}
-templ Css() {
-
+templ CSSDashboardPat() {
+
+
+
+
}
-templ Js() {
+script BeforeRequestContent() {
+ const loadingParent = document.getElementById("loading-parent");
+ const loadingChild = document.getElementById("loading-child");
+ const loadingSpinner = document.getElementById("loading-spinner");
+
+ loadingParent.classList.add("overlay");
+ loadingParent.classList.add("overlay-block");
+ loadingChild.classList.add("overlay-layer");
+ loadingSpinner.classList.remove("d-none");
}
-templ Show() {
- @layout.PlaygroundLayout("Corp Patient", Css(), Js()) {
- @Content()
- }
+script AfterRequestContent() {
+ const loadingParent = document.getElementById("loading-parent");
+ const loadingChild = document.getElementById("loading-child");
+ const loadingSpinner = document.getElementById("loading-spinner");
+
+ loadingParent.classList.remove("overlay");
+ loadingParent.classList.remove("overlay-block");
+ loadingChild.classList.remove("overlay-layer");
+ loadingSpinner.classList.add("d-none");
+}
+
+templ JSDashboardPat() {
+}
+
+templ ShowDashboardPat(
+ title string,
+ cmp templ.Component,
+ css templ.Component,
+ js templ.Component,
+ navbaruser templ.Component,
+ userprofile templ.Component,
+) {
+ @layout.EmployeeAnalyticLayout(title, css, js, navbaruser, userprofile) {
+ @cmp
+ }
}
diff --git a/views/corporate/patient/patient_templ.go b/views/corporate/patient/patient_templ.go
index ae0cfb4..2efc8c8 100644
--- a/views/corporate/patient/patient_templ.go
+++ b/views/corporate/patient/patient_templ.go
@@ -1,7 +1,7 @@
// Code generated by templ - DO NOT EDIT.
// templ: version: v0.2.663
-package corporate_company
+package corporate_patient
//lint:file-ignore SA4006 This context is only used if a nested component is present.
@@ -11,11 +11,21 @@ import "io"
import "bytes"
import (
- "cpone/component/under_development"
+ "cpone/component/customtextfield"
"cpone/layout"
+ "cpone/models"
)
-func Content() templ.Component {
+func DashboardPat(
+ listID string,
+ paginationID string,
+ dialogID string,
+ dialogBodyID string,
+ breadcrumb templ.Component,
+ listingcomponent templ.Component,
+ paginationcomponent templ.Component,
+ modaldialog 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 {
@@ -28,15 +38,63 @@ func Content() templ.Component {
templ_7745c5c3_Var1 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
")
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- templ_7745c5c3_Err = under_development.UnderDevelopment().Render(ctx, templ_7745c5c3_Buffer)
+ templ_7745c5c3_Err = customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "listID",
+ Name: "listID",
+ Type: "hidden",
+ Value: listID}).Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
")
+ templ_7745c5c3_Err = customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "paginationID",
+ Name: "paginationID",
+ Type: "hidden",
+ Value: paginationID}).Render(ctx, templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "dialogID",
+ Name: "dialogID",
+ Type: "hidden",
+ Value: dialogID}).Render(ctx, templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "dialogBodyID",
+ Name: "dialogBodyID",
+ Type: "hidden",
+ Value: dialogBodyID}).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 = breadcrumb.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 = listingcomponent.Render(ctx, templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = paginationcomponent.Render(ctx, templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = modaldialog.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
}
@@ -47,7 +105,7 @@ func Content() templ.Component {
})
}
-func Css() templ.Component {
+func CSSDashboardPat() 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 {
@@ -60,7 +118,7 @@ func Css() templ.Component {
templ_7745c5c3_Var2 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("")
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -71,7 +129,41 @@ func Css() templ.Component {
})
}
-func Js() templ.Component {
+func BeforeRequestContent() templ.ComponentScript {
+ return templ.ComponentScript{
+ Name: `__templ_BeforeRequestContent_5717`,
+ Function: `function __templ_BeforeRequestContent_5717(){const loadingParent = document.getElementById("loading-parent");
+ const loadingChild = document.getElementById("loading-child");
+ const loadingSpinner = document.getElementById("loading-spinner");
+
+ loadingParent.classList.add("overlay");
+ loadingParent.classList.add("overlay-block");
+ loadingChild.classList.add("overlay-layer");
+ loadingSpinner.classList.remove("d-none");
+}`,
+ Call: templ.SafeScript(`__templ_BeforeRequestContent_5717`),
+ CallInline: templ.SafeScriptInline(`__templ_BeforeRequestContent_5717`),
+ }
+}
+
+func AfterRequestContent() templ.ComponentScript {
+ return templ.ComponentScript{
+ Name: `__templ_AfterRequestContent_077f`,
+ Function: `function __templ_AfterRequestContent_077f(){const loadingParent = document.getElementById("loading-parent");
+ const loadingChild = document.getElementById("loading-child");
+ const loadingSpinner = document.getElementById("loading-spinner");
+
+ loadingParent.classList.remove("overlay");
+ loadingParent.classList.remove("overlay-block");
+ loadingChild.classList.remove("overlay-layer");
+ loadingSpinner.classList.add("d-none");
+}`,
+ Call: templ.SafeScript(`__templ_AfterRequestContent_077f`),
+ CallInline: templ.SafeScriptInline(`__templ_AfterRequestContent_077f`),
+ }
+}
+
+func JSDashboardPat() 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 {
@@ -91,7 +183,14 @@ func Js() templ.Component {
})
}
-func Show() templ.Component {
+func ShowDashboardPat(
+ title string,
+ cmp templ.Component,
+ css templ.Component,
+ js templ.Component,
+ navbaruser templ.Component,
+ userprofile 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 {
@@ -110,7 +209,7 @@ func Show() templ.Component {
templ_7745c5c3_Buffer = templ.GetBuffer()
defer templ.ReleaseBuffer(templ_7745c5c3_Buffer)
}
- templ_7745c5c3_Err = Content().Render(ctx, templ_7745c5c3_Buffer)
+ templ_7745c5c3_Err = cmp.Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -119,7 +218,7 @@ func Show() templ.Component {
}
return templ_7745c5c3_Err
})
- templ_7745c5c3_Err = layout.PlaygroundLayout("Corp Patient", Css(), Js()).Render(templ.WithChildren(ctx, templ_7745c5c3_Var5), templ_7745c5c3_Buffer)
+ templ_7745c5c3_Err = layout.EmployeeAnalyticLayout(title, css, js, navbaruser, userprofile).Render(templ.WithChildren(ctx, templ_7745c5c3_Var5), templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
diff --git a/views/corporate/patient/patientmodal.templ b/views/corporate/patient/patientmodal.templ
new file mode 100644
index 0000000..5a154a0
--- /dev/null
+++ b/views/corporate/patient/patientmodal.templ
@@ -0,0 +1,147 @@
+package corporate_patient
+
+import "cpone/component/modal"
+
+templ PatientModal(
+ id string,
+ title string,
+ body templ.Component,
+ closebtn templ.Component,
+) {
+
+ @modalcomponent.ModalViewXL(id,
+ title,
+ body,
+ closebtn,
+ )
+
+}
+
+templ BodyModal(
+ hxOnLoad templ.ComponentScript,
+) {
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+}
+
+templ PatientDialogForm(
+ componentID string,
+ linkPost string,
+ hxTarget string,
+ hxSwap string,
+ hxInclude string,
+ modalID string,
+ modalTitle string,
+ dialogBody templ.Component,
+ dialogClose templ.Component,
+) {
+
+ @modalcomponent.ModalViewXL(modalID,
+ modalTitle,
+ dialogBody,
+ dialogClose,
+ )
+
+}
+
+script HandleFormBeforeRequest() {
+ const btnActCancel = document.querySelectorAll('.btnactcancel');
+
+ for (let i = 0; i < btnActCancel.length; i++) {
+ btnActCancel[i].setAttribute('disabled', 'true');
+ }
+}
+
+script HandleFormAfterRequest() {
+ const btnActCancel = document.querySelectorAll('.btnactcancel');
+
+ for (let i = 0; i < btnActCancel.length; i++) {
+ btnActCancel[i].removeAttribute('disabled');
+ }
+}
+
+templ BodyDialogPat(
+ compoenentID string,
+ hxOnLoad templ.ComponentScript,
+) {
+
+ TESTING
+
+
+}
+
+templ BtnClosePat(linkClose string, targetClose string, hxSwapClose string, modalID string) {
+
+
+
+}
+
+script JSHideModal(modalID string) {
+ $(modalID).modal('hide')
+}
+
+script JSShowModal(modalID string) {
+ $(modalID).modal('show')
+
+ const btnActCancel = document.querySelectorAll('.btnactcancel');
+
+ for (let i = 0; i < btnActCancel.length; i++) {
+ btnActCancel[i].removeAttribute('disabled');
+ }
+}
\ No newline at end of file
diff --git a/views/corporate/patient/patientmodal_templ.go b/views/corporate/patient/patientmodal_templ.go
new file mode 100644
index 0000000..ea41fba
--- /dev/null
+++ b/views/corporate/patient/patientmodal_templ.go
@@ -0,0 +1,448 @@
+// Code generated by templ - DO NOT EDIT.
+
+// templ: version: v0.2.663
+package corporate_patient
+
+//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/component/modal"
+
+func PatientModal(
+ id string,
+ title string,
+ body templ.Component,
+ closebtn 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_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("
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = modalcomponent.ModalViewXL(id,
+ title,
+ body,
+ closebtn,
+ ).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
+ }
+ if !templ_7745c5c3_IsBuffer {
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_W)
+ }
+ return templ_7745c5c3_Err
+ })
+}
+
+func BodyModal(
+ hxOnLoad templ.ComponentScript,
+) 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.RenderScriptItems(ctx, templ_7745c5c3_Buffer, hxOnLoad)
+ 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
+ }
+ if !templ_7745c5c3_IsBuffer {
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_W)
+ }
+ return templ_7745c5c3_Err
+ })
+}
+
+func PatientDialogForm(
+ componentID string,
+ linkPost string,
+ hxTarget string,
+ hxSwap string,
+ hxInclude string,
+ modalID string,
+ modalTitle string,
+ dialogBody templ.Component,
+ dialogClose 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_Var8 := templ.GetChildren(ctx)
+ if templ_7745c5c3_Var8 == nil {
+ templ_7745c5c3_Var8 = templ.NopComponent
+ }
+ ctx = templ.ClearChildren(ctx)
+ templ_7745c5c3_Err = templ.RenderScriptItems(ctx, templ_7745c5c3_Buffer, HandleFormBeforeRequest(), HandleFormAfterRequest())
+ 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 = modalcomponent.ModalViewXL(modalID,
+ modalTitle,
+ dialogBody,
+ dialogClose,
+ ).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
+ }
+ if !templ_7745c5c3_IsBuffer {
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_W)
+ }
+ return templ_7745c5c3_Err
+ })
+}
+
+func HandleFormBeforeRequest() templ.ComponentScript {
+ return templ.ComponentScript{
+ Name: `__templ_HandleFormBeforeRequest_7fcd`,
+ Function: `function __templ_HandleFormBeforeRequest_7fcd(){const btnActCancel = document.querySelectorAll('.btnactcancel');
+
+ for (let i = 0; i < btnActCancel.length; i++) {
+ btnActCancel[i].setAttribute('disabled', 'true');
+ }
+}`,
+ Call: templ.SafeScript(`__templ_HandleFormBeforeRequest_7fcd`),
+ CallInline: templ.SafeScriptInline(`__templ_HandleFormBeforeRequest_7fcd`),
+ }
+}
+
+func HandleFormAfterRequest() templ.ComponentScript {
+ return templ.ComponentScript{
+ Name: `__templ_HandleFormAfterRequest_b055`,
+ Function: `function __templ_HandleFormAfterRequest_b055(){const btnActCancel = document.querySelectorAll('.btnactcancel');
+
+ for (let i = 0; i < btnActCancel.length; i++) {
+ btnActCancel[i].removeAttribute('disabled');
+ }
+}`,
+ Call: templ.SafeScript(`__templ_HandleFormAfterRequest_b055`),
+ CallInline: templ.SafeScriptInline(`__templ_HandleFormAfterRequest_b055`),
+ }
+}
+
+func BodyDialogPat(
+ compoenentID string,
+ hxOnLoad templ.ComponentScript,
+) 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_Var16 := templ.GetChildren(ctx)
+ if templ_7745c5c3_Var16 == nil {
+ templ_7745c5c3_Var16 = templ.NopComponent
+ }
+ ctx = templ.ClearChildren(ctx)
+ templ_7745c5c3_Err = templ.RenderScriptItems(ctx, templ_7745c5c3_Buffer, hxOnLoad)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
TESTING\r
")
+ 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 BtnClosePat(linkClose string, targetClose string, hxSwapClose string, modalID string) 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.RenderScriptItems(ctx, templ_7745c5c3_Buffer, JSHideModal(modalID))
+ 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
+ }
+ if !templ_7745c5c3_IsBuffer {
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_W)
+ }
+ return templ_7745c5c3_Err
+ })
+}
+
+func JSHideModal(modalID string) templ.ComponentScript {
+ return templ.ComponentScript{
+ Name: `__templ_JSHideModal_4530`,
+ Function: `function __templ_JSHideModal_4530(modalID){$(modalID).modal('hide')
+}`,
+ Call: templ.SafeScript(`__templ_JSHideModal_4530`, modalID),
+ CallInline: templ.SafeScriptInline(`__templ_JSHideModal_4530`, modalID),
+ }
+}
+
+func JSShowModal(modalID string) templ.ComponentScript {
+ return templ.ComponentScript{
+ Name: `__templ_JSShowModal_c20c`,
+ Function: `function __templ_JSShowModal_c20c(modalID){$(modalID).modal('show')
+
+ const btnActCancel = document.querySelectorAll('.btnactcancel');
+
+ for (let i = 0; i < btnActCancel.length; i++) {
+ btnActCancel[i].removeAttribute('disabled');
+ }
+}`,
+ Call: templ.SafeScript(`__templ_JSShowModal_c20c`, modalID),
+ CallInline: templ.SafeScriptInline(`__templ_JSShowModal_c20c`, modalID),
+ }
+}