diff --git a/views/corporate/dashboardpic/dashboardpic.templ b/views/corporate/dashboardpic/dashboardpic.templ index 24ad5c6..acaf178 100644 --- a/views/corporate/dashboardpic/dashboardpic.templ +++ b/views/corporate/dashboardpic/dashboardpic.templ @@ -41,7 +41,14 @@ templ DashboardPic( } templ JSDashboardPIC() { - + } templ CSSDashboardPIC() { diff --git a/views/corporate/dashboardpic/dashboardpic_templ.go b/views/corporate/dashboardpic/dashboardpic_templ.go index 8e01cc8..b7ac9d3 100644 --- a/views/corporate/dashboardpic/dashboardpic_templ.go +++ b/views/corporate/dashboardpic/dashboardpic_templ.go @@ -104,6 +104,10 @@ func JSDashboardPIC() templ.Component { templ_7745c5c3_Var2 = templ.NopComponent } ctx = templ.ClearChildren(ctx) + _, 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) } diff --git a/views/corporate/patient/patient.templ b/views/corporate/patient/patient.templ index ace9061..1afdb26 100644 --- a/views/corporate/patient/patient.templ +++ b/views/corporate/patient/patient.templ @@ -152,6 +152,13 @@ templ JSDashboardPat() { } }); + + document.body.addEventListener('htmx:configRequest', function(evt) { + const token = localStorage.getItem("token"); + if (token) { + evt.detail.headers['Authentication'] = "Bearer " + token; + } + }); } diff --git a/views/corporate/patient/patient_templ.go b/views/corporate/patient/patient_templ.go index b4c594f..da13271 100644 --- a/views/corporate/patient/patient_templ.go +++ b/views/corporate/patient/patient_templ.go @@ -267,7 +267,7 @@ func JSDashboardPat() templ.Component { templ_7745c5c3_Var7 = 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 }