From 8f818f9e941a0b7da212be894497d2fa3ce6eec2 Mon Sep 17 00:00:00 2001 From: adibwp Date: Tue, 18 Jun 2024 09:54:58 +0700 Subject: [PATCH] add testign script auth guard --- ..._employee_analytic.templ => layout_dashboard.templ} | 10 +++++++++- ...yee_analytic_templ.go => layout_dashboard_templ.go} | 6 +++--- views/corporate/dashboardpic/dashboardpic.templ | 2 +- views/corporate/dashboardpic/dashboardpic_templ.go | 2 +- views/corporate/mcu/mcudetail.templ | 2 +- views/corporate/mcu/mcudetail_templ.go | 2 +- views/corporate/patient/patient.templ | 2 +- views/corporate/patient/patient_templ.go | 2 +- views/dev/employeeanalytic/employeeanalytic.templ | 2 +- views/dev/employeeanalytic/employeeanalytic_templ.go | 2 +- views/dev/mcu/mcudetail.templ | 2 +- views/dev/mcu/mcudetail_templ.go | 2 +- 12 files changed, 22 insertions(+), 14 deletions(-) rename layout/{layout_employee_analytic.templ => layout_dashboard.templ} (95%) rename layout/{layout_employee_analytic_templ.go => layout_dashboard_templ.go} (73%) diff --git a/layout/layout_employee_analytic.templ b/layout/layout_dashboard.templ similarity index 95% rename from layout/layout_employee_analytic.templ rename to layout/layout_dashboard.templ index ca1554e..df42bdc 100644 --- a/layout/layout_employee_analytic.templ +++ b/layout/layout_dashboard.templ @@ -1,6 +1,6 @@ package layout -templ EmployeeAnalyticLayout( +templ DashboardLayout( title string, css templ.Component, js templ.Component, @@ -102,6 +102,14 @@ templ EmployeeAnalyticLayout( +
diff --git a/layout/layout_employee_analytic_templ.go b/layout/layout_dashboard_templ.go similarity index 73% rename from layout/layout_employee_analytic_templ.go rename to layout/layout_dashboard_templ.go index 177c3f2..e56d98d 100644 --- a/layout/layout_employee_analytic_templ.go +++ b/layout/layout_dashboard_templ.go @@ -10,7 +10,7 @@ import "context" import "io" import "bytes" -func EmployeeAnalyticLayout( +func DashboardLayout( title string, css templ.Component, js templ.Component, @@ -36,7 +36,7 @@ func EmployeeAnalyticLayout( var templ_7745c5c3_Var2 string templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(title) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `layout\layout_employee_analytic.templ`, Line: 16, Col: 34} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `layout\layout_dashboard.templ`, Line: 16, Col: 34} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) if templ_7745c5c3_Err != nil { @@ -50,7 +50,7 @@ func EmployeeAnalyticLayout( if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
\"Logo\"
") + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
\"Logo\"
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } diff --git a/views/corporate/dashboardpic/dashboardpic.templ b/views/corporate/dashboardpic/dashboardpic.templ index 61ca1ea..24ad5c6 100644 --- a/views/corporate/dashboardpic/dashboardpic.templ +++ b/views/corporate/dashboardpic/dashboardpic.templ @@ -104,7 +104,7 @@ templ ShowDashboardPic( navbaruser templ.Component, userprofile templ.Component, ) { - @layout.EmployeeAnalyticLayout(title, css, js, navbaruser, userprofile) { + @layout.DashboardLayout(title, css, js, navbaruser, userprofile) { @cmp } } \ No newline at end of file diff --git a/views/corporate/dashboardpic/dashboardpic_templ.go b/views/corporate/dashboardpic/dashboardpic_templ.go index 6085405..8e01cc8 100644 --- a/views/corporate/dashboardpic/dashboardpic_templ.go +++ b/views/corporate/dashboardpic/dashboardpic_templ.go @@ -204,7 +204,7 @@ func ShowDashboardPic( } return templ_7745c5c3_Err }) - templ_7745c5c3_Err = layout.EmployeeAnalyticLayout(title, css, js, navbaruser, userprofile).Render(templ.WithChildren(ctx, templ_7745c5c3_Var5), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = layout.DashboardLayout(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/mcu/mcudetail.templ b/views/corporate/mcu/mcudetail.templ index e1451f8..2685c3b 100644 --- a/views/corporate/mcu/mcudetail.templ +++ b/views/corporate/mcu/mcudetail.templ @@ -68,7 +68,7 @@ templ ShowMcuDetail( navbaruser templ.Component, userprofile templ.Component, ) { - @layout.EmployeeAnalyticLayout(title, css, js, navbaruser, userprofile) { + @layout.DashboardLayout(title, css, js, navbaruser, userprofile) { @cmp } } \ No newline at end of file diff --git a/views/corporate/mcu/mcudetail_templ.go b/views/corporate/mcu/mcudetail_templ.go index ea0aaa3..e21bbff 100644 --- a/views/corporate/mcu/mcudetail_templ.go +++ b/views/corporate/mcu/mcudetail_templ.go @@ -140,7 +140,7 @@ func ShowMcuDetail( } return templ_7745c5c3_Err }) - templ_7745c5c3_Err = layout.EmployeeAnalyticLayout(title, css, js, navbaruser, userprofile).Render(templ.WithChildren(ctx, templ_7745c5c3_Var5), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = layout.DashboardLayout(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/patient.templ b/views/corporate/patient/patient.templ index 51b61c8..37c04f4 100644 --- a/views/corporate/patient/patient.templ +++ b/views/corporate/patient/patient.templ @@ -116,7 +116,7 @@ templ ShowDashboardPat( navbaruser templ.Component, userprofile templ.Component, ) { - @layout.EmployeeAnalyticLayout(title, css, js, navbaruser, userprofile) { + @layout.DashboardLayout(title, css, js, navbaruser, userprofile) { @cmp } } diff --git a/views/corporate/patient/patient_templ.go b/views/corporate/patient/patient_templ.go index 2efc8c8..429656c 100644 --- a/views/corporate/patient/patient_templ.go +++ b/views/corporate/patient/patient_templ.go @@ -218,7 +218,7 @@ func ShowDashboardPat( } return templ_7745c5c3_Err }) - templ_7745c5c3_Err = layout.EmployeeAnalyticLayout(title, css, js, navbaruser, userprofile).Render(templ.WithChildren(ctx, templ_7745c5c3_Var5), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = layout.DashboardLayout(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/dev/employeeanalytic/employeeanalytic.templ b/views/dev/employeeanalytic/employeeanalytic.templ index 91d4f42..c9ce07b 100644 --- a/views/dev/employeeanalytic/employeeanalytic.templ +++ b/views/dev/employeeanalytic/employeeanalytic.templ @@ -175,7 +175,7 @@ templ ShowEmployeeAnalytic( navbaruser templ.Component, userprofile templ.Component, ) { - @layout.EmployeeAnalyticLayout(title, css, js, navbaruser, userprofile) { + @layout.DashboardLayout(title, css, js, navbaruser, userprofile) { @cmp } } \ No newline at end of file diff --git a/views/dev/employeeanalytic/employeeanalytic_templ.go b/views/dev/employeeanalytic/employeeanalytic_templ.go index aea4c28..c247b77 100644 --- a/views/dev/employeeanalytic/employeeanalytic_templ.go +++ b/views/dev/employeeanalytic/employeeanalytic_templ.go @@ -208,7 +208,7 @@ func ShowEmployeeAnalytic( } return templ_7745c5c3_Err }) - templ_7745c5c3_Err = layout.EmployeeAnalyticLayout(title, css, js, navbaruser, userprofile).Render(templ.WithChildren(ctx, templ_7745c5c3_Var5), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = layout.DashboardLayout(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/dev/mcu/mcudetail.templ b/views/dev/mcu/mcudetail.templ index 61d70b3..7e4b353 100644 --- a/views/dev/mcu/mcudetail.templ +++ b/views/dev/mcu/mcudetail.templ @@ -137,7 +137,7 @@ templ ShowDetailMcu( navbaruser templ.Component, userprofile templ.Component, ) { - @layout.EmployeeAnalyticLayout(title, css, js, navbaruser, userprofile) { + @layout.DashboardLayout(title, css, js, navbaruser, userprofile) { @cmp } } \ No newline at end of file diff --git a/views/dev/mcu/mcudetail_templ.go b/views/dev/mcu/mcudetail_templ.go index 6f71516..ba84232 100644 --- a/views/dev/mcu/mcudetail_templ.go +++ b/views/dev/mcu/mcudetail_templ.go @@ -138,7 +138,7 @@ func ShowDetailMcu( } return templ_7745c5c3_Err }) - templ_7745c5c3_Err = layout.EmployeeAnalyticLayout(title, css, js, navbaruser, userprofile).Render(templ.WithChildren(ctx, templ_7745c5c3_Var5), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = layout.DashboardLayout(title, css, js, navbaruser, userprofile).Render(templ.WithChildren(ctx, templ_7745c5c3_Var5), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err }