diff --git a/assets/andy/cobaform.html b/assets/andy/cobaform.html index 212ec6d..4b92bae 100644 --- a/assets/andy/cobaform.html +++ b/assets/andy/cobaform.html @@ -92,6 +92,7 @@ hx-on::reponse-error="cobaerror()" hx-on::send-error="cobaerror()" id="kt_form_1" + hx-include="#cobaid, #test" >
@@ -131,7 +132,23 @@ submit +
+
;adkj;djf; @@ -144,6 +161,21 @@ > Show live toast +
+
+
+
+
+

Card Blocking

+
+
+
+
+
+ + + Please enter your Address. +
+
+ + + Please enter your Address 2. +
+
+
+
+
+
+
diff --git a/assets/asset-corporate-portal/css/sas.bundle.css b/assets/asset-corporate-portal/css/sas.bundle.css index 35dd29b..138b79f 100644 --- a/assets/asset-corporate-portal/css/sas.bundle.css +++ b/assets/asset-corporate-portal/css/sas.bundle.css @@ -5200,6 +5200,40 @@ a.text-hover-tosca:hover .svg-icon svg:hover g [fill], height: auto; } +/* ### OVERLAY */ +.overlay-loading { + position: relative !important; +} +.overlay-loading .overlay-layer { + position: absolute !important ; + top: 0 !important; + bottom: 0 !important; + left: 0 !important; + right: 0 !important; + display: -webkit-box !important; + display: -ms-flexbox !important; + display: flex !important; + -webkit-box-pack: center !important; + -ms-flex-pack: center !important; + justify-content: center !important; + -webkit-box-align: center !important; + -ms-flex-align: center !important; + align-items: center !important; + background-color: rgba(0, 0, 0, 0.05) !important; + -webkit-transition: all 0.3s ease !important; + transition: all 0.3s ease !important; + opacity: 0 !important; +} +.overlay-loading.overlay-block .overlay-layer, +.overlay-layer { + -webkit-transition: all 0.3s ease !important; + transition: all 0.3s ease !important; + opacity: 1 !important; +} +.overlay-loading.overlay-block { + cursor: wait !important; +} + /* ### BUTTON HOVER TEXT */ /* ### */ /* ## PRIMARY */ diff --git a/assets/mcu/mike/t0007.html b/assets/mcu/mike/t0007.html index 48c51b7..0270201 100644 --- a/assets/mcu/mike/t0007.html +++ b/assets/mcu/mike/t0007.html @@ -2109,7 +2109,40 @@ License: You must have a valid license purchased only from themeforest(the above
+ +
+ +
+} diff --git a/component/customtextfieldsearch/customtextfieldsearch_templ.go b/component/customtextfieldsearch/customtextfieldsearch_templ.go index 9ef2c77..1faf702 100644 --- a/component/customtextfieldsearch/customtextfieldsearch_templ.go +++ b/component/customtextfieldsearch/customtextfieldsearch_templ.go @@ -308,3 +308,181 @@ func MainCustomTextFieldSearchV1( return templ_7745c5c3_Err }) } + +func MainCustomTextFieldSearchV2( + inpId, + inpName, + inpPlaceHolder, + inpType, + hxGet, + hxTrigger, + hxTarget, + hxIndicator, + value, + hxSwap string, + hxInclude 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_Var21 := templ.GetChildren(ctx) + if templ_7745c5c3_Var21 == nil { + templ_7745c5c3_Var21 = 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) + } + return templ_7745c5c3_Err + }) +} diff --git a/component/navbar/navbar.templ b/component/navbar/navbar.templ index aac478f..75da30c 100644 --- a/component/navbar/navbar.templ +++ b/component/navbar/navbar.templ @@ -2,7 +2,7 @@ package navbar import ( "cpone/component/sidebarmaster" - services "cpone/services/dev" + "cpone/models" ) @@ -40,7 +40,7 @@ templ Navbar(dataUser models.User) { } -templ NavbarMenu(datamenu []services.MasterMenu) { +templ NavbarMenu(datamenu []models.Menu) {
+
+ for i:=0; i{ strconv.Itoa(i+1) } + } else { + { strconv.Itoa(i+1) } + } + } +
+
+ @customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "currpage" + paginationID, + Type: "hidden", + Value: strconv.Itoa(currentPage)}) +} diff --git a/component/pagination/paginationv2_templ.go b/component/pagination/paginationv2_templ.go new file mode 100644 index 0000000..4b60dbb --- /dev/null +++ b/component/pagination/paginationv2_templ.go @@ -0,0 +1,238 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.663 +package pagination + +//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 "strconv" +import "cpone/component/customtextfield" +import "cpone/models" + +func PaginationV2(length int, + currentPage int, + link string, + paginationID string, + hxInclude string, + hxTarget string, + hxSwap string, + hxIndicator 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 := 0; i < length; i++ { + if (i + 1) == currentPage { + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var8 string + templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(i + 1)) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\pagination\paginationv2.templ`, Line: 30, Col: 25} + } + _, 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("") + 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 + } + var templ_7745c5c3_Var14 string + templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(i + 1)) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\pagination\paginationv2.templ`, Line: 41, Col: 25} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14)) + 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 + } + templ_7745c5c3_Err = customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "currpage" + paginationID, + Type: "hidden", + Value: strconv.Itoa(currentPage)}).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 + }) +} diff --git a/component/sidebarmaster/sidebarmaster.templ b/component/sidebarmaster/sidebarmaster.templ index 7dda4f3..686839e 100644 --- a/component/sidebarmaster/sidebarmaster.templ +++ b/component/sidebarmaster/sidebarmaster.templ @@ -1,7 +1,7 @@ package sidebarmaster import ( - services "cpone/services/dev" + "cpone/models" ) templ MenuDashboard(ParentMenuName string, ParentMenuUrl string) { @@ -50,7 +50,7 @@ templ ListMenuChildren(ChildrenMenuURL string, ChildrenMenuName string) { } -templ ListMenuNavbar(ParentMenuName string, datamenuchildren []services.ChildrenMenu) { +templ ListMenuNavbar(ParentMenuName string, datamenuchildren []models.ChildrenMenu) {
-} \ No newline at end of file +
+} diff --git a/component/table/tablev3.templ b/component/table/tablev3.templ new file mode 100644 index 0000000..432eb50 --- /dev/null +++ b/component/table/tablev3.templ @@ -0,0 +1,27 @@ +package tablecomponent + +templ TableV3(thName []string, thWidth []string, trComponent templ.Component) { +
+ if len(thName) != len(thWidth) { +
length array thname berbeda dengan array thwidth
+ } else { +
+ + + + for i, item := range thName { + + } + + + + @trComponent + +
{ item }
+ } +
+} + +templ DivEmptyV3() { +
+} diff --git a/component/table/tablev3_templ.go b/component/table/tablev3_templ.go new file mode 100644 index 0000000..80090b7 --- /dev/null +++ b/component/table/tablev3_templ.go @@ -0,0 +1,118 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.663 +package tablecomponent + +//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" + +func TableV3(thName []string, thWidth []string, trComponent 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 + } + if len(thName) != len(thWidth) { + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
length array thname berbeda dengan array thwidth
") + 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 + } + for i, item := range thName { + _, 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 + } + templ_7745c5c3_Err = trComponent.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 + } + var templ_7745c5c3_Var3 string + templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(item) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\table\tablev3.templ`, Line: 13, Col: 50} + } + _, 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("
") + 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 DivEmptyV3() 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_Var4 := templ.GetChildren(ctx) + if templ_7745c5c3_Var4 == nil { + templ_7745c5c3_Var4 = 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) + } + return templ_7745c5c3_Err + }) +} diff --git a/handlers/dev/mastermenuusergroup.handlers.go b/handlers/dev/mastermenuusergroup.handlers.go index c247909..061cdf0 100644 --- a/handlers/dev/mastermenuusergroup.handlers.go +++ b/handlers/dev/mastermenuusergroup.handlers.go @@ -2,7 +2,6 @@ package dev_handlers import ( "fmt" - "math" "strings" "strconv" @@ -15,6 +14,7 @@ import ( mastermenuusergroup "cpone/views/dev/mastermenuusergroup" "cpone/views/dev/mastermenuusergrouptryandy" + globalservices "cpone/services" services "cpone/services/dev" "github.com/a-h/templ" @@ -40,6 +40,7 @@ type MasterMenuUserGroupService interface { GetListMasterUserGroupBySearch(search string) ([]models.UserGroupV1, error) GetListMasterUserGroupPagination(search string, currentPage int, rowPerPage int) ([]models.UserGroupV1, error) GetListMasterUserGroupFilteredBySearch(search string) ([]models.UserGroupV1, error) + GetListMasterUserGroupV2(search string, currentPage int, rowPerPage int) ([]models.UserGroupV1, int, error) } func NewMasterMenuUserGroupHandler(us MasterMenuUserGroupService) *MasterMenuUserGroupHandler { @@ -155,11 +156,11 @@ func (uh *MasterMenuUserGroupHandler) View(c echo.Context, cmp templ.Component) // try func (lh *MasterMenuUserGroupHandler) HandlerShowMasterMenuUserGroupV1(c echo.Context) error { - // var toastComponent templ.Component - contentIDHtmxExtension := utils.GenerateRandomID("htmxExtmgu") logger, _ := zap.NewProduction() - dataMenu, err := lh.MasterMenuUserGroupService.GetMasterMenus() + //get sidebarmenu + + dataMenu, err := globalservices.GetMenu() fmt.Println(dataMenu) fmt.Println(err) if err != nil { @@ -167,7 +168,8 @@ func (lh *MasterMenuUserGroupHandler) HandlerShowMasterMenuUserGroupV1(c echo.Co return err } - dataUser, err := services.GetUser() + //get user login + dataUser, err := globalservices.GetUserLogin() fmt.Println(dataUser) fmt.Println(err) if err != nil { @@ -175,31 +177,16 @@ func (lh *MasterMenuUserGroupHandler) HandlerShowMasterMenuUserGroupV1(c echo.Co return err } - rowPerPage := 2 - dataUserGroup, err := lh.MasterMenuUserGroupService.GetListMasterUserGroupPagination("", 1, rowPerPage) - fmt.Println(dataUserGroup) - fmt.Println(err) + dataUserGroup, totalpage, err := lh.MasterMenuUserGroupService.GetListMasterUserGroupV2("", 1, 5) if err != nil { defer logger.Sync() - logger.Info("ERROR LIST USER GROUP DEV", + logger.Info("ERROR GET USER GROUP", zap.Any("error", err), ) fmt.Println(dataUserGroup) return err } - dataUserGroupAll, err := lh.MasterMenuUserGroupService.GetListMasterUserGroup() - fmt.Println(dataUserGroupAll) - fmt.Println(err) - if err != nil { - defer logger.Sync() - logger.Info("ERROR LIST USER GROUP ALL DEV", - zap.Any("error", err), - ) - fmt.Println(dataUserGroupAll) - return err - } - // si := mastermenuusergroup.ListMasterUserGroupInitial(dataUserGroup) defer logger.Sync() @@ -207,16 +194,9 @@ func (lh *MasterMenuUserGroupHandler) HandlerShowMasterMenuUserGroupV1(c echo.Co zap.Any("data", dataUserGroup), ) - // si := mastermenuusergroup.ListMasterUserGroupInitial(dataUserGroup) - - // si := mastermenuusergroup.ShowMasterMenuUserGroupV1( - // "Master Menu", - // mastermenuusergroup.ListMasterUserGroupInitial(dataUserGroup), - // mastermenuusergroup.CssMasterMenuUserGroupV1(), - // mastermenuusergroup.JsMasterMenuUserGroupV1(), - // ) - - contentID := utils.GenerateRandomID("tablebody") + tableID := utils.GenerateRandomID("tablebody") + paginationID := utils.GenerateRandomID("paginationid") + searchID := utils.GenerateRandomID("searchid") paramTitleBreadcrumbConvert := "Master User Group" @@ -232,8 +212,6 @@ func (lh *MasterMenuUserGroupHandler) HandlerShowMasterMenuUserGroupV1(c echo.Co return err } - // si := mastermenuusergroup.ListMasterUserGroupInitial(dataBreadCrumb) - defer logger.Sync() logger.Info("LOAD BREADCRUMB DEV", zap.Any("data", dataBreadCrumb), @@ -248,40 +226,35 @@ func (lh *MasterMenuUserGroupHandler) HandlerShowMasterMenuUserGroupV1(c echo.Co // sidebar sidebaruserprofileComponent := sidebaruserprofile.Navbaruserprofile(dataUser) - // inputan search - // inputansearchComponent := customtextfieldsearch.MainCustomTextFieldSearchV1("q", "Cari User Group", "text", "/dev/searchusergroupv1", "input changed delay:500ms, search", "#idbaru", "#indicator") + // totalPages := int(math.Ceil(float64(len(dataUserGroupAll)) / float64(rowPerPage))) - contentIDSearch := utils.GenerateRandomID("qsearch") - totalPages := int(math.Ceil(float64(len(dataUserGroupAll)) / float64(rowPerPage))) - link := "currentPage=1&page=" + strconv.Itoa(totalPages) + "&contentID=" + contentID + contentUserGroupComponent := mastermenuusergroup.TableUserGroup( + dataUserGroup, tableID) - inputansearchComponent := customtextfieldsearch.MainCustomTextFieldSearchV1("#"+contentIDSearch, "q", "Cari User Group", "text", "/dev/searchusergroupv1?"+link, "input changed delay:500ms, search", "#"+contentID, "#indicator", "", contentIDHtmxExtension) - - // toast - // contentIDToast := utils.GenerateRandomID("toastmgu") - // toastComponent = customtoast.CustomToastV1("", contentIDHtmxExtension) - - // table user group - - searchQueryParam := "&q=" - tabelusergroupComponent := tablecomponent.TableV2( - []string{"KODE", "USERGROUP", "AKSI"}, - []string{"40%", "40%", "20%"}, - mastermenuusergroup.TableRowV1(dataUserGroup), - pagination.PaginationV1(totalPages, 1, "/dev/usergroupv1pagination", contentID, searchQueryParam), - contentID, - inputansearchComponent, + usergroupFilterComponent := customtextfieldsearch.MainCustomTextFieldSearchV2(searchID, + "search", + "Cari Kode/Nama", + "text", + "/dev/searchusergroupv1", + "input changed delay:500ms, search", + "#"+paginationID, "", "", "outerHTML", "#tableID, #paginationID") + // @pagination.PaginationV2(pageLength, 1, paginationLink, contentId, "#search"+contentId+", #contentID") + userGroupPaginationComponent := pagination.PaginationV2( + totalpage, + 1, + "/dev/usergroupv1pagination", + paginationID, + "#tableID, #searchID, #paginationID", "#"+paginationID, "outerHTML", "", ) si := mastermenuusergroup.ShowMasterMenuUserGroupV1x( "Master Menu", mastermenuusergroup.ContentMasterMenuUserGroupV1( - contentID, + tableID, paginationID, searchID, breadcrumbadmin.MainBreadcrumbAdminV1(dataBreadCrumb), - tabelusergroupComponent, - inputansearchComponent, - // toastComponent, - // contentIDToast, + contentUserGroupComponent, + usergroupFilterComponent, + userGroupPaginationComponent, ), mastermenuusergroup.CssMasterMenuUserGroupV1x(), @@ -441,94 +414,43 @@ func (lh *MasterMenuUserGroupHandler) DeleteUserGroup(c echo.Context) error { } func (lh *MasterMenuUserGroupHandler) HandlerShowMasterMenuUserGroupSearchV1(c echo.Context) error { - search := c.QueryParam("q") + search := c.QueryParam("search") + tableID := c.QueryParam("tableID") + paginationID := c.QueryParam("paginationID") logger, _ := zap.NewProduction() - // dataUserGroup, err := lh.MasterMenuUserGroupService.GetListMasterUserGroupBySearch(search) - rowPerPage := 2 - pageparam := c.QueryParam("page") - page, err := strconv.Atoi(pageparam) + dataUserGroup, totalpage, err := lh.MasterMenuUserGroupService.GetListMasterUserGroupV2(search, 1, 5) if err != nil { defer logger.Sync() - logger.Info("ERROR CONVERT PAGE PARAM", - zap.Any("page", page), - zap.Any("error ", err), - ) - return err - } - - currentPageParam := c.QueryParam("currentPage") - currentPage, err := strconv.Atoi(currentPageParam) - if err != nil { - defer logger.Sync() - logger.Info("ERROR CONVERT CURRENT PAGE PARAM", - zap.Any("page", page), - zap.Any("error ", err), - ) - return err - } - - dataUserGroup, err := lh.MasterMenuUserGroupService.GetListMasterUserGroupPagination(search, currentPage, rowPerPage) - fmt.Println(dataUserGroup) - fmt.Println(err) - if err != nil { - defer logger.Sync() - logger.Info("ERROR SEARCH USER GROUP DEV", + logger.Info("ERROR GET USER GROUP", zap.Any("error", err), - zap.Any("search param", search), ) fmt.Println(dataUserGroup) return err } - defer logger.Sync() - logger.Info("LOAD USER GROUP DEV BY SEARCH", - zap.Any("data", dataUserGroup), - ) + // totalPages := int(math.Ceil(float64(len(dataUserGroupFiltered)) / float64(rowPerPage))) - // data user filtered - dataUserGroupFiltered, err := lh.MasterMenuUserGroupService.GetListMasterUserGroupFilteredBySearch(search) - fmt.Println(dataUserGroupFiltered) - fmt.Println(err) - if err != nil { - defer logger.Sync() - logger.Info("ERROR SEARCH USER GROUP FILTERED BY SEARCH DEV", - zap.Any("error", err), - zap.Any("search param", search), - ) - fmt.Println(dataUserGroupFiltered) - return err - } + contentUserGroupComponent := mastermenuusergroup.TableUserGroup( + dataUserGroup, tableID) + // userGroupPaginationComponent := pagination.PaginationV2( + // totalpage, + // 1, + // "/dev/usergroupv1pagination", + // paginationID, + // "#tableID, #"+searchID, "#"+tableID, "outerHTML", "", + // ) - defer logger.Sync() - logger.Info("LOAD SEARCH USER GROUP FILTERED BY SEARCH DEV", - zap.Any("data", dataUserGroupFiltered), - ) - // si := mastermenuusergroup.ListMasterUserGroupInitial(dataUserGroup) + userGroupPaginationComponent := pagination.PaginationV2(totalpage, + 1, + "/dev/usergroupv1pagination", + paginationID, + "#tableID, #searchID, #paginationID", "#"+paginationID, "outerHTML", "") - contentID := utils.GenerateRandomID("tablebody") + swapTable := + mastermenuusergroup.SwapTableUserGroup(userGroupPaginationComponent, contentUserGroupComponent) - // tabelusergroupComponent := mastermenuusergroup.TableRowV1(dataUserGroup) - totalPages := int(math.Ceil(float64(len(dataUserGroupFiltered)) / float64(rowPerPage))) - searchQueryParam := "&q=" + search - - // contentIDSearch := utils.GenerateRandomID("qsearch") - // link := "currentPage=1&page=" + strconv.Itoa(totalPages) + "&contentID=" + contentID - - // contentIDHtmxExtension := utils.GenerateRandomID("htmxExtmgu") - // inputansearchComponent := customtextfieldsearch.MainCustomTextFieldSearchV1("#"+contentIDSearch, "q", "Cari User Group", "text", "/dev/searchusergroupv1?"+link, "input changed delay:500ms, search", "#"+contentID, "#indicator", search, contentIDHtmxExtension) - - inputansearchComponent := tablecomponent.DivEmpty() - tabelusergroupComponent := tablecomponent.TableV2( - []string{"KODE", "USERGROUP", "AKSI"}, - []string{"40%", "40%", "20%"}, - mastermenuusergroup.TableRowV1(dataUserGroup), - pagination.PaginationV1(totalPages, 1, "/dev/usergroupv1pagination", contentID, searchQueryParam), - contentID, - inputansearchComponent, - ) - - si := tabelusergroupComponent + si := swapTable return utils.View(c, si) } @@ -536,8 +458,11 @@ func (lh *MasterMenuUserGroupHandler) HandlerShowMasterMenuUserGroupSearchV1(c e func (lh *MasterMenuUserGroupHandler) HandlerShowMasterMenuUserGroupPaginationV1(c echo.Context) error { logger, _ := zap.NewProduction() - search := c.QueryParam("q") + search := c.QueryParam("search") pageparam := c.QueryParam("page") + tableID := c.QueryParam("tableID") + // searchID := c.QueryParam("searchID") + paginationID := c.QueryParam("paginationID") page, err := strconv.Atoi(pageparam) if err != nil { defer logger.Sync() @@ -548,93 +473,29 @@ func (lh *MasterMenuUserGroupHandler) HandlerShowMasterMenuUserGroupPaginationV1 return err } - dataUserGroupAll, err := lh.MasterMenuUserGroupService.GetListMasterUserGroup() - fmt.Println(dataUserGroupAll) - fmt.Println(err) + dataUserGroup, totalpage, err := lh.MasterMenuUserGroupService.GetListMasterUserGroupV2(search, page, 5) if err != nil { defer logger.Sync() - logger.Info("ERROR LIST USER GROUP ALL DEV", + logger.Info("ERROR GET USER GROUP", zap.Any("error", err), ) - fmt.Println(dataUserGroupAll) - return err - } - - currentPageParam := c.QueryParam("currentPage") - currentPage, err := strconv.Atoi(currentPageParam) - if err != nil { - defer logger.Sync() - logger.Info("ERROR CONVERT CURRENT PAGE PARAM", - zap.Any("page", page), - zap.Any("error ", err), - ) - return err - } - - rowPerPage := 2 - dataUserGroup, err := lh.MasterMenuUserGroupService.GetListMasterUserGroupPagination(search, currentPage, rowPerPage) - fmt.Println(dataUserGroup) - fmt.Println(err) - if err != nil { - defer logger.Sync() - logger.Info("ERROR SEARCH USER GROUP DEV", - zap.Any("error", err), - zap.Any("search param", search), - ) fmt.Println(dataUserGroup) return err } - // si := mastermenuusergroup.ListMasterUserGroupInitial(dataUserGroup) + contentUserGroupComponent := mastermenuusergroup.TableUserGroup( + dataUserGroup, tableID) - defer logger.Sync() - logger.Info("LOAD USER GROUP DEV BY SEARCH", - zap.Any("data", dataUserGroup), - ) + userGroupPaginationComponent := pagination.PaginationV2(totalpage, + page, + "/dev/usergroupv1pagination", + paginationID, + "#tableID, #searchID, #paginationID", "#"+paginationID, "outerHTML", "") - // data user filtered - dataUserGroupFiltered, err := lh.MasterMenuUserGroupService.GetListMasterUserGroupFilteredBySearch(search) - fmt.Println(dataUserGroupFiltered) - fmt.Println(err) - if err != nil { - defer logger.Sync() - logger.Info("ERROR SEARCH USER GROUP FILTERED BY SEARCH DEV", - zap.Any("error", err), - zap.Any("search param", search), - ) - fmt.Println(dataUserGroupFiltered) - return err - } + swapTable := + mastermenuusergroup.SwapTableUserGroup(userGroupPaginationComponent, contentUserGroupComponent) - defer logger.Sync() - logger.Info("LOAD SEARCH USER GROUP FILTERED BY SEARCH DEV", - zap.Any("data", dataUserGroupFiltered), - ) - - contentID := utils.GenerateRandomID("tablebody") - - // table user group - searchQueryParam := "&q=" + search - totalPages := int(math.Ceil(float64(len(dataUserGroupFiltered)) / float64(rowPerPage))) - // contentIDSearch := utils.GenerateRandomID("qsearch") - // link := "currentPage=1&page=" + strconv.Itoa(totalPages) + "&contentID=" + contentID - - // contentIDHtmxExtension := utils.GenerateRandomID("htmxExtmgu") - // inputansearchComponent := customtextfieldsearch.MainCustomTextFieldSearchV1("#"+contentIDSearch, "q", "Cari User Group", "text", "/dev/searchusergroupv1?"+link, "input changed delay:500ms, search", "#"+contentID, "#indicator", search, contentIDHtmxExtension) - - inputansearchComponent := tablecomponent.DivEmpty() - tabelusergroupComponent := tablecomponent.TableV2( - []string{"KODE", "USERGROUP", "AKSI"}, - []string{"40%", "40%", "20%"}, - mastermenuusergroup.TableRowV1(dataUserGroup), - pagination.PaginationV1(totalPages, currentPage, "/dev/usergroupv1pagination", contentID, searchQueryParam), - contentID, - inputansearchComponent, - ) - - // tabelusergroupComponent := mastermenuusergroup.TableRowV1(dataUserGroup) - - si := tabelusergroupComponent + si := swapTable return utils.View(c, si) } @@ -642,7 +503,7 @@ func (lh *MasterMenuUserGroupHandler) HandlerShowMasterMenuUserGroupPaginationV1 // Coba Anndy func (lh *MasterMenuUserGroupHandler) HandlerShowMasterMenuUserGroupTryAndy(c echo.Context) error { logger, _ := zap.NewProduction() - dataMenu, err := lh.MasterMenuUserGroupService.GetMasterMenus() + dataMenu, err := globalservices.GetMenu() fmt.Println(dataMenu) fmt.Println(err) if err != nil { diff --git a/models/CustomTextField.models.go b/models/CustomTextField.models.go index f4193f3..1e5c04d 100644 --- a/models/CustomTextField.models.go +++ b/models/CustomTextField.models.go @@ -12,4 +12,5 @@ type CustomTextFieldv2Prm struct { Type string `default:"text"` Value string `default:""` ErrorMsg string `default:""` + ID string } diff --git a/models/menu.models.go b/models/menu.models.go new file mode 100644 index 0000000..8c24fac --- /dev/null +++ b/models/menu.models.go @@ -0,0 +1,17 @@ +package models + +type Menu struct { + ID string `json:"id"` + ParentMenuID string `json:"parent_menu_id"` + ParentMenuName string `json:"parent_menu_name"` + ParentUrl string `json:"parent_url"` + ParentIcon string `json:"parent_icon"` + Children []ChildrenMenu `json:"children"` +} +type ChildrenMenu struct { + ChildrenParentID string `json:"children_parent_id"` + ChildrenMenuID string `json:"children_menu_id"` + ChildrenMenuName string `json:"children_menu_name"` + ChildrenMenuURL string `json:"children_menu_url"` + // Breadcrumb []Breadcrumb `json:"breadcrumb"` +} diff --git a/services/app.services.go b/services/app.services.go new file mode 100644 index 0000000..7607385 --- /dev/null +++ b/services/app.services.go @@ -0,0 +1,516 @@ +package services + +import "cpone/models" + +//Func get menu sidebar +func GetMenu() ([]models.Menu, error) { + + // dummyBreadcrumb := []Breadcrumb{ + // { + // Name: "Dashboard", + // Url: "/client/dashboard", + // }, + // { + // Name: "Front Office", + // Url: "/client/usermanagement", + // }, + // } + + dummyMenu := []models.Menu{ + // 1. Dashboard + { + ID: "1", + ParentMenuID: "0", + ParentMenuName: "Dashboard", + ParentUrl: "/client/md/dashboard", + ParentIcon: "", + Children: []models.ChildrenMenu{ + { + ChildrenParentID: "1", + ChildrenMenuID: "1", + ChildrenMenuName: "Master User", + ChildrenMenuURL: "/client/md/user", + // Breadcrumb: []Breadcrumb{ + // { + // IDBreadcrumb: "1", + // Title: "Dashboard", + // IsActive: "Y", + // }, + // }, + }, + }, + }, + + // 2. Front Office + { + ID: "2", + ParentMenuID: "1", + ParentMenuName: "Front Office", + ParentUrl: "#", + ParentIcon: "", + Children: []models.ChildrenMenu{ + { + ChildrenParentID: "1", + ChildrenMenuID: "1", + ChildrenMenuName: "Registrasi", + ChildrenMenuURL: "/fo/registrasi", + // Breadcrumb: []Breadcrumb{ + // { + // IDBreadcrumb: "1", + // Title: "Dashboard", + // IsActive: "N", + // }, + // { + // IDBreadcrumb: "2", + // Title: "Master", + // IsActive: "N", + // }, + // { + // IDBreadcrumb: "3", + // Title: "User", + // IsActive: "Y", + // }, + // }, + }, + }, + }, + + // 3. Station + { + ID: "3", + ParentMenuID: "2", + ParentMenuName: "Station", + ParentUrl: "#", + ParentIcon: "", + Children: []models.ChildrenMenu{ + { + ChildrenParentID: "2", + ChildrenMenuID: "1", + ChildrenMenuName: "Sample Station", + ChildrenMenuURL: "/station/sample", + // Breadcrumb: []Breadcrumb{ + // { + // IDBreadcrumb: "1", + // Title: "Dashboard", + // IsActive: "N", + // }, + // { + // IDBreadcrumb: "2", + // Title: "Master", + // IsActive: "N", + // }, + // { + // IDBreadcrumb: "3", + // Title: "User", + // IsActive: "Y", + // }, + // }, + }, + }, + }, + + // 4. Management MCU + { + ID: "4", + ParentMenuID: "3", + ParentMenuName: "Management MCU", + ParentUrl: "#", + ParentIcon: "", + Children: []models.ChildrenMenu{ + { + ChildrenParentID: "3", + ChildrenMenuID: "1", + ChildrenMenuName: "Setup MCU", + ChildrenMenuURL: "/mcu/setup", + // Breadcrumb: []Breadcrumb{ + // { + // IDBreadcrumb: "1", + // Title: "Dashboard", + // IsActive: "N", + // }, + // { + // IDBreadcrumb: "2", + // Title: "Master", + // IsActive: "N", + // }, + // { + // IDBreadcrumb: "3", + // Title: "User", + // IsActive: "Y", + // }, + // }, + }, + { + ChildrenParentID: "3", + ChildrenMenuID: "2", + ChildrenMenuName: "Pre-Registrasi", + ChildrenMenuURL: "/mcu/preregister", + // Breadcrumb: []Breadcrumb{ + // { + // IDBreadcrumb: "1", + // Title: "Dashboard", + // IsActive: "N", + // }, + // { + // IDBreadcrumb: "2", + // Title: "Master", + // IsActive: "N", + // }, + // { + // IDBreadcrumb: "3", + // Title: "User", + // IsActive: "Y", + // }, + // }, + }, + }, + }, + + // 5. Master Data + { + ID: "5", + ParentMenuID: "4", + ParentMenuName: "Master Data", + ParentUrl: "#", + ParentIcon: "", + Children: []models.ChildrenMenu{ + // * Master User + { + ChildrenParentID: "4", + ChildrenMenuID: "1", + ChildrenMenuName: "Master User", + ChildrenMenuURL: "/client/md/user", + // Breadcrumb: []Breadcrumb{ + // { + // IDBreadcrumb: "1", + // Title: "Dashboard", + // IsActive: "N", + // }, + // { + // IDBreadcrumb: "2", + // Title: "Master", + // IsActive: "N", + // }, + // { + // IDBreadcrumb: "3", + // Title: "User", + // IsActive: "Y", + // }, + // }, + }, + + // * Master User Group + { + ChildrenParentID: "4", + ChildrenMenuID: "2", + ChildrenMenuName: "Master User Group", + ChildrenMenuURL: "/client/md/usergroup", + // Breadcrumb: []Breadcrumb{ + // { + // IDBreadcrumb: "1", + // Title: "Dashboard", + // IsActive: "N", + // }, + // { + // IDBreadcrumb: "2", + // Title: "Master", + // IsActive: "N", + // }, + // { + // IDBreadcrumb: "3", + // Title: "User Group", + // IsActive: "Y", + // }, + // }, + }, + + // * Master Corporate + { + ChildrenParentID: "4", + ChildrenMenuID: "3", + ChildrenMenuName: "Corporate", + ChildrenMenuURL: "/client/md/corp", + // Breadcrumb: []Breadcrumb{ + // { + // IDBreadcrumb: "1", + // Title: "Dashboard", + // IsActive: "N", + // }, + // { + // IDBreadcrumb: "2", + // Title: "Master", + // IsActive: "N", + // }, + // { + // IDBreadcrumb: "3", + // Title: "User Group", + // IsActive: "Y", + // }, + // }, + }, + + // * Test + { + ChildrenParentID: "4", + ChildrenMenuID: "4", + ChildrenMenuName: "Test", + ChildrenMenuURL: "/client/md/test", + // Breadcrumb: []Breadcrumb{ + // { + // IDBreadcrumb: "1", + // Title: "Dashboard", + // IsActive: "N", + // }, + // { + // IDBreadcrumb: "2", + // Title: "Master", + // IsActive: "N", + // }, + // { + // IDBreadcrumb: "3", + // Title: "User Group", + // IsActive: "Y", + // }, + // }, + }, + + // * Bahan + { + ChildrenParentID: "4", + ChildrenMenuID: "5", + ChildrenMenuName: "Bahan", + ChildrenMenuURL: "/client/md/bahan", + // Breadcrumb: []Breadcrumb{ + // { + // IDBreadcrumb: "1", + // Title: "Dashboard", + // IsActive: "N", + // }, + // { + // IDBreadcrumb: "2", + // Title: "Master", + // IsActive: "N", + // }, + // { + // IDBreadcrumb: "3", + // Title: "User Group", + // IsActive: "Y", + // }, + // }, + }, + + // * Sample Type + { + ChildrenParentID: "4", + ChildrenMenuID: "6", + ChildrenMenuName: "Sample Type", + ChildrenMenuURL: "/client/sample/type", + // Breadcrumb: []Breadcrumb{ + // { + // IDBreadcrumb: "1", + // Title: "Dashboard", + // IsActive: "N", + // }, + // { + // IDBreadcrumb: "2", + // Title: "Master", + // IsActive: "N", + // }, + // { + // IDBreadcrumb: "3", + // Title: "User Group", + // IsActive: "Y", + // }, + // }, + }, + + // * Sample Station + { + ChildrenParentID: "4", + ChildrenMenuID: "7", + ChildrenMenuName: "Sample Station", + ChildrenMenuURL: "/station/sample", + // Breadcrumb: []Breadcrumb{ + // { + // IDBreadcrumb: "1", + // Title: "Dashboard", + // IsActive: "N", + // }, + // { + // IDBreadcrumb: "2", + // Title: "Master", + // IsActive: "N", + // }, + // { + // IDBreadcrumb: "3", + // Title: "User Group", + // IsActive: "Y", + // }, + // }, + }, + + // * Result Non Lab + { + ChildrenParentID: "4", + ChildrenMenuID: "8", + ChildrenMenuName: "Result Non Lab", + ChildrenMenuURL: "/client/md/resultnonlab", + // Breadcrumb: []Breadcrumb{ + // { + // IDBreadcrumb: "1", + // Title: "Dashboard", + // IsActive: "N", + // }, + // { + // IDBreadcrumb: "2", + // Title: "Master", + // IsActive: "N", + // }, + // { + // IDBreadcrumb: "3", + // Title: "User Group", + // IsActive: "Y", + // }, + // }, + }, + + // * Template Fisik + { + ChildrenParentID: "4", + ChildrenMenuID: "9", + ChildrenMenuName: "Template Fisik", + ChildrenMenuURL: "/client/md/template-fisik", + // Breadcrumb: []Breadcrumb{ + // { + // IDBreadcrumb: "1", + // Title: "Dashboard", + // IsActive: "N", + // }, + // { + // IDBreadcrumb: "2", + // Title: "Master", + // IsActive: "N", + // }, + // { + // IDBreadcrumb: "3", + // Title: "User Group", + // IsActive: "Y", + // }, + // }, + }, + + // * Pasien + { + ChildrenParentID: "4", + ChildrenMenuID: "10", + ChildrenMenuName: "Pasien", + ChildrenMenuURL: "/client/md/pasien", + // Breadcrumb: []Breadcrumb{ + // { + // IDBreadcrumb: "1", + // Title: "Dashboard", + // IsActive: "N", + // }, + // { + // IDBreadcrumb: "2", + // Title: "Master", + // IsActive: "N", + // }, + // { + // IDBreadcrumb: "3", + // Title: "User Group", + // IsActive: "Y", + // }, + // }, + }, + + // * Dokter + { + ChildrenParentID: "4", + ChildrenMenuID: "11", + ChildrenMenuName: "Dokter", + ChildrenMenuURL: "/client/md/dokter", + // Breadcrumb: []Breadcrumb{ + // { + // IDBreadcrumb: "1", + // Title: "Dashboard", + // IsActive: "N", + // }, + // { + // IDBreadcrumb: "2", + // Title: "Master", + // IsActive: "N", + // }, + // { + // IDBreadcrumb: "3", + // Title: "User Group", + // IsActive: "Y", + // }, + // }, + }, + + // * Paket + { + ChildrenParentID: "4", + ChildrenMenuID: "12", + ChildrenMenuName: "Paket", + ChildrenMenuURL: "/client/md/paket", + // Breadcrumb: []Breadcrumb{ + // { + // IDBreadcrumb: "1", + // Title: "Dashboard", + // IsActive: "N", + // }, + // { + // IDBreadcrumb: "2", + // Title: "Master", + // IsActive: "N", + // }, + // { + // IDBreadcrumb: "3", + // Title: "User Group", + // IsActive: "Y", + // }, + // }, + }, + + // * Harga Single + { + ChildrenParentID: "4", + ChildrenMenuID: "13", + ChildrenMenuName: "Harga Single", + ChildrenMenuURL: "/client/md/hargasingle", + // Breadcrumb: []Breadcrumb{ + // { + // IDBreadcrumb: "1", + // Title: "Dashboard", + // IsActive: "N", + // }, + // { + // IDBreadcrumb: "2", + // Title: "Master", + // IsActive: "N", + // }, + // { + // IDBreadcrumb: "3", + // Title: "User Group", + // IsActive: "Y", + // }, + // }, + }, + }, + }, + } + + return dummyMenu, nil +} + +func GetUserLogin() (models.User, error) { + a := models.User{ + UserID: 1, + Username: "andy", + UserFullName: "Alfianto Andy P", + UserPosition: "Software Developer", + } + return a, nil +} diff --git a/services/dev/mastermenuusergroup.services.go b/services/dev/mastermenuusergroup.services.go index 541d5cf..3a411fc 100644 --- a/services/dev/mastermenuusergroup.services.go +++ b/services/dev/mastermenuusergroup.services.go @@ -2,7 +2,9 @@ package dev_services import ( "fmt" + "math" "strconv" + "strings" "cpone/db" "cpone/models" @@ -913,3 +915,41 @@ func (su *ServicesMasterMenuUserGroup) GetListMasterUserGroupPagination(search s return userGroupList, nil } + +func (su *ServicesMasterMenuUserGroup) GetListMasterUserGroupV2(search string, currentPage int, rowPerPage int) ([]models.UserGroupV1, int, error) { + var userGroupList []models.UserGroupV1 + var totalData int + offset := (currentPage - 1) * rowPerPage + prm := "%" + strings.TrimSpace(search) + "%" + querytotal := ` + SELECT COUNT(*) + FROM m_usergroup + WHERE M_UserGroupIsActive = 'Y' + AND (M_UserGroupCode LIKE ? OR M_UserGroupName LIKE ?) + ` + if err := dbx.Handlex.Get(&totalData, querytotal, prm, prm); err != nil { + return nil, 0, fmt.Errorf("error querying database: %v", err) + } + query := ` + SELECT + ROW_NUMBER() OVER () AS nomor, + M_UserGroupID, + M_UserGroupCode, + M_UserGroupName, + M_UserGroupCreated, + M_UserGroupLastUpdated, + M_UserGroupIsActive + FROM m_usergroup + WHERE M_UserGroupIsActive = 'Y' + AND (M_UserGroupCode LIKE ? OR M_UserGroupName LIKE ?) + order by M_UserGroupID ASC + LIMIT ? OFFSET ? + ` + + if err := dbx.Handlex.Select(&userGroupList, query, prm, prm, rowPerPage, offset); err != nil { + return nil, 0, fmt.Errorf("error querying database: %v", err) + } + totalPage := int(math.Ceil(float64(totalData) / float64(rowPerPage))) + + return userGroupList, totalPage, nil +} diff --git a/views/dev/mastermenuusergroup/mastermenuusergroup.templ b/views/dev/mastermenuusergroup/mastermenuusergroup.templ index 8b9e4ad..9180e38 100644 --- a/views/dev/mastermenuusergroup/mastermenuusergroup.templ +++ b/views/dev/mastermenuusergroup/mastermenuusergroup.templ @@ -39,7 +39,7 @@ templ ContentMasterMenuUserGroup(ugData []models.UserGroup, contentID string) { - @modalcomponent.Modal("dialogNew", "New - User Group", DialogNewBody("", ""), DialogNewAction(), BtnCloseNew()) + @modalcomponent.Modal("dialogNew", "New - User Group", DialogNewBody("", "", "", "", ""), DialogNewAction(), BtnCloseNew()) @modalcomponent.Modal("dialogEdit", "Edit - User Group", DialogEditBody("", ""), DialogEditAction(), BtnCloseNew()) @JSku() diff --git a/views/dev/mastermenuusergroup/mastermenuusergroup_templ.go b/views/dev/mastermenuusergroup/mastermenuusergroup_templ.go index 4602002..b180c4e 100644 --- a/views/dev/mastermenuusergroup/mastermenuusergroup_templ.go +++ b/views/dev/mastermenuusergroup/mastermenuusergroup_templ.go @@ -66,7 +66,7 @@ func ContentMasterMenuUserGroup(ugData []models.UserGroup, contentID string) tem if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = modalcomponent.Modal("dialogNew", "New - User Group", DialogNewBody("", ""), DialogNewAction(), BtnCloseNew()).Render(ctx, templ_7745c5c3_Buffer) + templ_7745c5c3_Err = modalcomponent.Modal("dialogNew", "New - User Group", DialogNewBody("", "", "", "", ""), DialogNewAction(), BtnCloseNew()).Render(ctx, templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } diff --git a/views/dev/mastermenuusergroup/mastermenuusergroupv1.templ b/views/dev/mastermenuusergroup/mastermenuusergroupv1.templ index c1dbd05..76269ff 100644 --- a/views/dev/mastermenuusergroup/mastermenuusergroupv1.templ +++ b/views/dev/mastermenuusergroup/mastermenuusergroupv1.templ @@ -5,11 +5,33 @@ import ( "cpone/models" "cpone/component/modal" "strconv" + "cpone/component/table" + "cpone/component/customtextfield" ) // "cpone/component/sidebar_user_profile" -templ ContentMasterMenuUserGroupV1(contentID string, breadcrumb templ.Component, tablecontent templ.Component, inputanSearch templ.Component) { +templ ContentMasterMenuUserGroupV1( + tableID string, + paginationID string, + searchID string, + breadcrumb templ.Component, + tablecontent templ.Component, + filterUserGroup templ.Component, + paginationUserGroup templ.Component, +) {
+ @customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "tableID", + Name: "tableID", + Type: "hidden", + Value: tableID}) + @customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "paginationID", + Name: "paginationID", + Type: "hidden", + Value: paginationID}) + @customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "searchID", + Name: "searchID", + Type: "hidden", + Value: searchID})
@breadcrumb @@ -29,14 +51,30 @@ templ ContentMasterMenuUserGroupV1(contentID string, breadcrumb templ.Component,
+ @filterUserGroup // table content @tablecontent + @paginationUserGroup
- @modalcomponent.Modal("dialogNew", "New - User Group", DialogNewBody("", ""), DialogNewAction(), BtnCloseNew()) + // hx-on::after-request="showtoast()" + // hx-on::reponse-error="cobaerror()" + // hx-on::send-error="cobaerror()" +
+ @modalcomponent.Modal("dialogNew", + "New - User Group", + DialogNewBody("", "", "New", "", ""), + DialogNewAction(), + BtnCloseNew()) +
@modalcomponent.Modal("dialogEdit", "Edit - User Group", DialogEditBody("", ""), DialogEditAction(), BtnCloseNew()) @JSku()
@@ -73,15 +111,16 @@ templ TableRowV1(data []models.UserGroupV1) {
Edit Hapus @@ -152,25 +191,6 @@ templ JSkuV1() { } -templ PaginationV1() { -
-
- - - ... - 23 - 24 - 25 - 26 - 27 - 28 - ... - - -
-
-} - templ CssMasterMenuUserGroupV1x() { + @tablecomponent.TableV3([]string{"KODE", "USERGROUP", "AKSI"}, + []string{"40%", "40%", "20%"}, + TableRowV1(data)) + +} + +templ SwapTableUserGroup(pagination templ.Component, table templ.Component) { + @pagination + @table +} diff --git a/views/dev/mastermenuusergroup/mastermenuusergroupv1_templ.go b/views/dev/mastermenuusergroup/mastermenuusergroupv1_templ.go index adee32d..4c297ec 100644 --- a/views/dev/mastermenuusergroup/mastermenuusergroupv1_templ.go +++ b/views/dev/mastermenuusergroup/mastermenuusergroupv1_templ.go @@ -11,14 +11,24 @@ import "io" import "bytes" import ( + "cpone/component/customtextfield" "cpone/component/modal" + "cpone/component/table" "cpone/layout" "cpone/models" "strconv" ) // "cpone/component/sidebar_user_profile" -func ContentMasterMenuUserGroupV1(contentID string, breadcrumb templ.Component, tablecontent templ.Component, inputanSearch templ.Component) templ.Component { +func ContentMasterMenuUserGroupV1( + tableID string, + paginationID string, + searchID string, + breadcrumb templ.Component, + tablecontent templ.Component, + filterUserGroup templ.Component, + paginationUserGroup 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 { @@ -31,7 +41,32 @@ func ContentMasterMenuUserGroupV1(contentID string, breadcrumb 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 = customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "tableID", + Name: "tableID", + Type: "hidden", + Value: tableID}).Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + 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: "searchID", + Name: "searchID", + Type: "hidden", + Value: searchID}).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 } @@ -43,15 +78,31 @@ func ContentMasterMenuUserGroupV1(contentID string, breadcrumb templ.Component, if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } + templ_7745c5c3_Err = filterUserGroup.Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } templ_7745c5c3_Err = tablecontent.Render(ctx, templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + templ_7745c5c3_Err = paginationUserGroup.Render(ctx, templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = modalcomponent.Modal("dialogNew", "New - User Group", DialogNewBody("", ""), DialogNewAction(), BtnCloseNew()).Render(ctx, templ_7745c5c3_Buffer) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = modalcomponent.Modal("dialogNew", + "New - User Group", + DialogNewBody("", "", "New", "", ""), + DialogNewAction(), + BtnCloseNew()).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 } @@ -101,7 +152,7 @@ func TableRowV1(data []models.UserGroupV1) templ.Component { var templ_7745c5c3_Var3 string templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(v.M_UserGroupCode) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mastermenuusergroup\mastermenuusergroupv1.templ`, Line: 69, Col: 26} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mastermenuusergroup\mastermenuusergroupv1.templ`, Line: 107, Col: 26} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) if templ_7745c5c3_Err != nil { @@ -114,33 +165,33 @@ func TableRowV1(data []models.UserGroupV1) templ.Component { var templ_7745c5c3_Var4 string templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(v.M_UserGroupName) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mastermenuusergroup\mastermenuusergroupv1.templ`, Line: 70, Col: 26} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mastermenuusergroup\mastermenuusergroupv1.templ`, Line: 108, Col: 26} } _, 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("
") - 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 CssMasterMenuUserGroupV1x() 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("") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err @@ -306,9 +333,9 @@ func JsMasterMenuUserGroupV1x() templ.Component { 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 + templ_7745c5c3_Var11 := templ.GetChildren(ctx) + if templ_7745c5c3_Var11 == nil { + templ_7745c5c3_Var11 = templ.NopComponent } ctx = templ.ClearChildren(ctx) if !templ_7745c5c3_IsBuffer { @@ -329,12 +356,12 @@ func ShowMasterMenuUserGroupV1x(title string, cmp templ.Component, css templ.Com defer templ.ReleaseBuffer(templ_7745c5c3_Buffer) } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var13 := templ.GetChildren(ctx) - if templ_7745c5c3_Var13 == nil { - templ_7745c5c3_Var13 = templ.NopComponent + templ_7745c5c3_Var12 := templ.GetChildren(ctx) + if templ_7745c5c3_Var12 == nil { + templ_7745c5c3_Var12 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Var14 := templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var13 := 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() @@ -349,7 +376,98 @@ func ShowMasterMenuUserGroupV1x(title string, cmp templ.Component, css templ.Com } return templ_7745c5c3_Err }) - templ_7745c5c3_Err = layout.CorporateLayout(title, css, js, navbarmenu, navbaruser, userprofile).Render(templ.WithChildren(ctx, templ_7745c5c3_Var14), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = layout.CorporateLayout(title, css, js, navbarmenu, navbaruser, userprofile).Render(templ.WithChildren(ctx, templ_7745c5c3_Var13), 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 + }) +} + +// []string{"KODE", "USERGROUP", "AKSI"}, +// +// []string{"40%", "40%", "20%"}, +func TableUserGroup(data []models.UserGroupV1, tableID 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_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("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = tablecomponent.TableV3([]string{"KODE", "USERGROUP", "AKSI"}, + []string{"40%", "40%", "20%"}, + TableRowV1(data)).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 SwapTableUserGroup(pagination templ.Component, table 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_Var17 := templ.GetChildren(ctx) + if templ_7745c5c3_Var17 == nil { + templ_7745c5c3_Var17 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + templ_7745c5c3_Err = pagination.Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = table.Render(ctx, templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } diff --git a/views/dev/mastermenuusergroup/modaladdusergroup.templ b/views/dev/mastermenuusergroup/modaladdusergroup.templ index e2245b7..e40ef90 100644 --- a/views/dev/mastermenuusergroup/modaladdusergroup.templ +++ b/views/dev/mastermenuusergroup/modaladdusergroup.templ @@ -5,8 +5,17 @@ import ( "cpone/component/customtextfield" ) -templ DialogNewBody(code string, name string) { +templ DialogNewBody(code string, name string, id string, codeErrorMsg string, nameErrorMsg string) {
+ @customtextfield.CustomTextFieldv2( + models.CustomTextFieldv2Prm{ + Label: "id user group", + Name: "usergroupid", + Placeholder: "id user Group", + Type: "hidden", + Value: code, + ErrorMsg: codeErrorMsg, + }) @customtextfield.CustomTextFieldv2( models.CustomTextFieldv2Prm{ Label: "Kode user group", @@ -14,6 +23,7 @@ templ DialogNewBody(code string, name string) { Placeholder: "Kode user Group", Type: "text", Value: code, + ErrorMsg: codeErrorMsg, }) @customtextfield.CustomTextFieldv2( models.CustomTextFieldv2Prm{ @@ -22,6 +32,7 @@ templ DialogNewBody(code string, name string) { Placeholder: "Nama User Group", Type: "text", Value: name, + ErrorMsg: nameErrorMsg, })
} diff --git a/views/dev/mastermenuusergroup/modaladdusergroup_templ.go b/views/dev/mastermenuusergroup/modaladdusergroup_templ.go index f5240b3..58b2061 100644 --- a/views/dev/mastermenuusergroup/modaladdusergroup_templ.go +++ b/views/dev/mastermenuusergroup/modaladdusergroup_templ.go @@ -15,7 +15,7 @@ import ( "cpone/models" ) -func DialogNewBody(code string, name string) templ.Component { +func DialogNewBody(code string, name string, id string, codeErrorMsg string, nameErrorMsg 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 { @@ -32,6 +32,18 @@ func DialogNewBody(code string, name string) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } + templ_7745c5c3_Err = customtextfield.CustomTextFieldv2( + models.CustomTextFieldv2Prm{ + Label: "id user group", + Name: "usergroupid", + Placeholder: "id user Group", + Type: "hidden", + Value: code, + ErrorMsg: codeErrorMsg, + }).Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } templ_7745c5c3_Err = customtextfield.CustomTextFieldv2( models.CustomTextFieldv2Prm{ Label: "Kode user group", @@ -39,6 +51,7 @@ func DialogNewBody(code string, name string) templ.Component { Placeholder: "Kode user Group", Type: "text", Value: code, + ErrorMsg: codeErrorMsg, }).Render(ctx, templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err @@ -50,6 +63,7 @@ func DialogNewBody(code string, name string) templ.Component { Placeholder: "Nama User Group", Type: "text", Value: name, + ErrorMsg: nameErrorMsg, }).Render(ctx, templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err diff --git a/views/dev/mastermenuusergrouptryandy/mastermenuusergroupv1.templ b/views/dev/mastermenuusergrouptryandy/mastermenuusergroupv1.templ index 928aa27..77242a4 100644 --- a/views/dev/mastermenuusergrouptryandy/mastermenuusergroupv1.templ +++ b/views/dev/mastermenuusergrouptryandy/mastermenuusergroupv1.templ @@ -152,25 +152,6 @@ templ JSkuV1() { } -templ PaginationV1() { -
-
- - - ... - 23 - 24 - 25 - 26 - 27 - 28 - ... - - -
-
-} - templ CssMasterMenuUserGroupV1x() {
") - 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 CssMasterMenuUserGroupV1x() 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("") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err @@ -308,9 +284,9 @@ func JsMasterMenuUserGroupV1x() templ.Component { 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 + templ_7745c5c3_Var11 := templ.GetChildren(ctx) + if templ_7745c5c3_Var11 == nil { + templ_7745c5c3_Var11 = templ.NopComponent } ctx = templ.ClearChildren(ctx) if !templ_7745c5c3_IsBuffer { @@ -331,12 +307,12 @@ func ShowMasterMenuUserGroupV1x(title string, cmp templ.Component, css templ.Com defer templ.ReleaseBuffer(templ_7745c5c3_Buffer) } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var13 := templ.GetChildren(ctx) - if templ_7745c5c3_Var13 == nil { - templ_7745c5c3_Var13 = templ.NopComponent + templ_7745c5c3_Var12 := templ.GetChildren(ctx) + if templ_7745c5c3_Var12 == nil { + templ_7745c5c3_Var12 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Var14 := templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var13 := 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() @@ -351,7 +327,7 @@ func ShowMasterMenuUserGroupV1x(title string, cmp templ.Component, css templ.Com } return templ_7745c5c3_Err }) - templ_7745c5c3_Err = layout.CorporateLayout(title, css, js, navbarmenu, navbaruser, userprofile).Render(templ.WithChildren(ctx, templ_7745c5c3_Var14), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = layout.CorporateLayout(title, css, js, navbarmenu, navbaruser, userprofile).Render(templ.WithChildren(ctx, templ_7745c5c3_Var13), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err }