diff --git a/assets/andy/usergroup.html b/assets/andy/usergroup.html new file mode 100644 index 0000000..86b1985 --- /dev/null +++ b/assets/andy/usergroup.html @@ -0,0 +1,336 @@ + + + + + + + + Company Portal | { title } + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + +
KODEUSERGROUPAKSI
001Admin +
+ + +
+
002Tes +
+ + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/asset-corporate-portal/css/sas.bundle.css b/assets/asset-corporate-portal/css/sas.bundle.css index dad9a39..9d4b59f 100644 --- a/assets/asset-corporate-portal/css/sas.bundle.css +++ b/assets/asset-corporate-portal/css/sas.bundle.css @@ -193,7 +193,7 @@ a.text-white:focus { background-color: var(--grey) !important; } .bg-header-table { - background-color: var(--text-header-table) !important; + background-color: var(--header-table-bg) !important; } .bg-primary { background-color: var(--primary) !important; @@ -565,15 +565,48 @@ a.text-white:focus { -webkit-box-shadow: 0 0 0 0.2rem rgba(54, 153, 255, 0.5); box-shadow: 0 0 0 0.2rem rgba(54, 153, 255, 0.5); } +/* ## BUTTON OUTLINE TOSCA*/ +.btn-outline-tosca { + color: var(--tosca) !important; + border-color: var(--tosca) !important; +} +.btn-outline-tosca:hover { + color: #ffffff !important; + background-color: var(--tosca) !important; + border-color: var(--tosca) !important; +} +.btn-outline-tosca:focus, +.btn-outline-tosca.focus { + -webkit-box-shadow: 0 0 0 0.2rem rgba(54, 153, 255, 0.5); + box-shadow: 0 0 0 0.2rem rgba(54, 153, 255, 0.5); +} +.btn-outline-tosca.disabled, +.btn-outline-tosca:disabled { + color: var(--tosca) !important; + background-color: transparent; +} +.btn-outline-tosca:not(:disabled):not(.disabled):active, +.btn-outline-tosca:not(:disabled):not(.disabled).active, +.show > .btn-outline-tosca.dropdown-toggle { + color: #ffffff !important; + background-color: var(--tosca) !important; + border-color: var(--tosca) !important; +} +.btn-outline-tosca:not(:disabled):not(.disabled):active:focus, +.btn-outline-tosca:not(:disabled):not(.disabled).active:focus, +.show > .btn-outline-tosca.dropdown-toggle:focus { + -webkit-box-shadow: 0 0 0 0.2rem rgba(54, 153, 255, 0.5); + box-shadow: 0 0 0 0.2rem rgba(54, 153, 255, 0.5); +} /* ## BUTTON OUTLINE SECONDARY*/ .btn-outline-secondary { - color: var(--secondary) !important; - border-color: var(--secondary) !important; + color: var(--text-black) !important; + border-color: var(--grey) !important; } .btn-outline-secondary:hover { - color: #181c32; - background-color: var(--secondary) !important; + color: var(--white); + background-color: var(--grey) !important; border-color: var(--secondary) !important; } .btn-outline-secondary:focus, @@ -919,6 +952,147 @@ a.text-white:focus { .show .btn.btn-light-primary.btn-dropdown.dropdown-toggle:after { color: #ffffff !important; } + +/* ## BUTTON LIGHT TOSCA*/ + +.btn.btn-light-tosca { + color: var(--tosca) !important; + background-color: var(--toscabg) !important; + border-color: transparent; +} +.btn.btn-light-tosca i { + color: var(--tosca) !important; +} +.btn.btn-light-tosca .svg-icon svg g [fill] { + -webkit-transition: fill 0.3s ease; + transition: fill 0.3s ease; + fill: var(--tosca) !important; +} +.btn.btn-light-tosca .svg-icon svg:hover g [fill] { + -webkit-transition: fill 0.3s ease; + transition: fill 0.3s ease; +} +.btn.btn-light-tosca.dropdown-toggle:after { + color: var(--tosca) !important; +} +.btn.btn-light-tosca:hover:not(.btn-text):not(:disabled):not(.disabled), +.btn.btn-light-tosca:focus:not(.btn-text), +.btn.btn-light-tosca.focus:not(.btn-text) { + color: #ffffff !important; + background-color: var(--tosca) !important; + border-color: transparent; +} +.btn.btn-light-tosca:hover:not(.btn-text):not(:disabled):not(.disabled) i, +.btn.btn-light-tosca:focus:not(.btn-text) i, +.btn.btn-light-tosca.focus:not(.btn-text) i { + color: #ffffff !important; +} +.btn.btn-light-tosca:hover:not(.btn-text):not(:disabled):not(.disabled) + .svg-icon + svg + g + [fill], +.btn.btn-light-tosca:focus:not(.btn-text) .svg-icon svg g [fill], +.btn.btn-light-tosca.focus:not(.btn-text) .svg-icon svg g [fill] { + -webkit-transition: fill 0.3s ease; + transition: fill 0.3s ease; + fill: #ffffff !important; +} +.btn.btn-light-tosca:hover:not(.btn-text):not(:disabled):not(.disabled) + .svg-icon + svg:hover + g + [fill], +.btn.btn-light-tosca:focus:not(.btn-text) .svg-icon svg:hover g [fill], +.btn.btn-light-tosca.focus:not(.btn-text) .svg-icon svg:hover g [fill] { + -webkit-transition: fill 0.3s ease; + transition: fill 0.3s ease; +} +.btn.btn-light-tosca:hover:not(.btn-text):not(:disabled):not( + .disabled + ).dropdown-toggle:after, +.btn.btn-light-tosca:focus:not(.btn-text).dropdown-toggle:after, +.btn.btn-light-tosca.focus:not(.btn-text).dropdown-toggle:after { + color: #ffffff !important; +} +.btn.btn-light-tosca.disabled, +.btn.btn-light-tosca:disabled { + color: var(--tosca) !important; + background-color: #e1f0ff; + border-color: transparent; +} +.btn.btn-light-tosca.disabled i, +.btn.btn-light-tosca:disabled i { + color: var(--tosca) !important; +} +.btn.btn-light-tosca.disabled .svg-icon svg g [fill], +.btn.btn-light-tosca:disabled .svg-icon svg g [fill] { + -webkit-transition: fill 0.3s ease; + transition: fill 0.3s ease; + fill: var(--tosca) !important; +} +.btn.btn-light-tosca.disabled .svg-icon svg:hover g [fill], +.btn.btn-light-tosca:disabled .svg-icon svg:hover g [fill] { + -webkit-transition: fill 0.3s ease; + transition: fill 0.3s ease; +} +.btn.btn-light-tosca.disabled.dropdown-toggle:after, +.btn.btn-light-tosca:disabled.dropdown-toggle:after { + color: var(--tosca) !important; +} +.btn.btn-light-tosca:not(:disabled):not(.disabled):active:not(.btn-text), +.btn.btn-light-tosca:not(:disabled):not(.disabled).active, +.show > .btn.btn-light-tosca.dropdown-toggle, +.show .btn.btn-light-tosca.btn-dropdown { + color: #ffffff !important; + background-color: var(--tosca) !important; + border-color: transparent; +} +.btn.btn-light-tosca:not(:disabled):not(.disabled):active:not(.btn-text) i, +.btn.btn-light-tosca:not(:disabled):not(.disabled).active i, +.show > .btn.btn-light-tosca.dropdown-toggle i, +.show .btn.btn-light-tosca.btn-dropdown i { + color: #ffffff !important; +} +.btn.btn-light-tosca:not(:disabled):not(.disabled):active:not(.btn-text) + .svg-icon + svg + g + [fill], +.btn.btn-light-tosca:not(:disabled):not(.disabled).active + .svg-icon + svg + g + [fill], +.show > .btn.btn-light-tosca.dropdown-toggle .svg-icon svg g [fill], +.show .btn.btn-light-tosca.btn-dropdown .svg-icon svg g [fill] { + -webkit-transition: fill 0.3s ease; + transition: fill 0.3s ease; + fill: #ffffff !important; +} +.btn.btn-light-tosca:not(:disabled):not(.disabled):active:not(.btn-text) + .svg-icon + svg:hover + g + [fill], +.btn.btn-light-tosca:not(:disabled):not(.disabled).active + .svg-icon + svg:hover + g + [fill], +.show > .btn.btn-light-tosca.dropdown-toggle .svg-icon svg:hover g [fill], +.show .btn.btn-light-tosca.btn-dropdown .svg-icon svg:hover g [fill] { + -webkit-transition: fill 0.3s ease; + transition: fill 0.3s ease; +} +.btn.btn-light-tosca:not(:disabled):not(.disabled):active:not( + .btn-text + ).dropdown-toggle:after, +.btn.btn-light-tosca:not(:disabled):not(.disabled).active.dropdown-toggle:after, +.show > .btn.btn-light-tosca.dropdown-toggle.dropdown-toggle:after, +.show .btn.btn-light-tosca.btn-dropdown.dropdown-toggle:after { + color: #ffffff !important; +} /* ## BUTTON LIGHT SECONDARY*/ .btn.btn-light-secondary { @@ -1689,6 +1863,65 @@ a.text-white:focus { .show .btn.btn-hover-light-primary.btn-dropdown.dropdown-toggle:after { color: var(--primary) !important; } + +/* ## BUTTON HOVER LIGHT TOSCA*/ +.btn.btn-hover-light-tosca:not(:disabled):not(.disabled):active:not(.btn-text), +.btn.btn-hover-light-tosca:not(:disabled):not(.disabled).active, +.show > .btn.btn-hover-light-tosca.dropdown-toggle, +.show .btn.btn-hover-light-tosca.btn-dropdown { + color: var(--tosca) !important; + background-color: var(--toscabg) !important; + border-color: transparent; +} +.btn.btn-hover-light-tosca:not(:disabled):not(.disabled):active:not(.btn-text) + i, +.btn.btn-hover-light-tosca:not(:disabled):not(.disabled).active i, +.show > .btn.btn-hover-light-tosca.dropdown-toggle i, +.show .btn.btn-hover-light-tosca.btn-dropdown i { + color: var(--tosca) !important; +} +.btn.btn-hover-light-tosca:not(:disabled):not(.disabled):active:not(.btn-text) + .svg-icon + svg + g + [fill], +.btn.btn-hover-light-tosca:not(:disabled):not(.disabled).active + .svg-icon + svg + g + [fill], +.show > .btn.btn-hover-light-tosca.dropdown-toggle .svg-icon svg g [fill], +.show .btn.btn-hover-light-tosca.btn-dropdown .svg-icon svg g [fill] { + -webkit-transition: fill 0.3s ease; + transition: fill 0.3s ease; + fill: var(--tosca) !important; +} +.btn.btn-hover-light-tosca:not(:disabled):not(.disabled):active:not(.btn-text) + .svg-icon + svg:hover + g + [fill], +.btn.btn-hover-light-tosca:not(:disabled):not(.disabled).active + .svg-icon + svg:hover + g + [fill], +.show > .btn.btn-hover-light-tosca.dropdown-toggle .svg-icon svg:hover g [fill], +.show .btn.btn-hover-light-tosca.btn-dropdown .svg-icon svg:hover g [fill] { + -webkit-transition: fill 0.3s ease; + transition: fill 0.3s ease; +} +.btn.btn-hover-light-tosca:not(:disabled):not(.disabled):active:not( + .btn-text + ).dropdown-toggle:after, +.btn.btn-hover-light-tosca:not(:disabled):not( + .disabled + ).active.dropdown-toggle:after, +.show > .btn.btn-hover-light-tosca.dropdown-toggle.dropdown-toggle:after, +.show .btn.btn-hover-light-tosca.btn-dropdown.dropdown-toggle:after { + color: var(--tosca) !important; +} + /* ## BUTTON HOVER LIGHT SECONDARY*/ .btn.btn-hover-light-secondary:hover:not(.btn-text):not(:disabled):not( @@ -2286,6 +2519,15 @@ a.text-white:focus { color: var(--warning); } +/* ## BUTTON WARNING */ +.btn.btn-text-tosca { + color: var(--tosca); +} +.btn.btn-text-tosca.disabled, +.btn.btn-text-tosca:disabled { + color: var(--tosca); +} + /* ### BUTTON HOVER BG */ /* ## BUTTON HOVER BG PRIMARY */ .btn.btn-hover-bg-primary:hover:not(.btn-text):not(:disabled):not(.disabled), @@ -2378,6 +2620,23 @@ a.text-white:focus { background-color: var(--danger) !important; border-color: var(--danger) !important; } + +/* ## BUTTON HOVER BG TOSCA */ +.btn.btn-hover-bg-tosca:hover:not(.btn-text):not(:disabled):not(.disabled), +.btn.btn-hover-bg-tosca:focus:not(.btn-text), +.btn.btn-hover-bg-tosca.focus:not(.btn-text) { + background-color: var(--tosca) !important; + border-color: var(--tosca) !important; +} + +.btn.btn-hover-bg-tosca:not(:disabled):not(.disabled):active:not(.btn-text), +.btn.btn-hover-bg-tosca:not(:disabled):not(.disabled).active, +.show > .btn.btn-hover-bg-tosca.dropdown-toggle, +.show .btn.btn-hover-bg-tosca.btn-dropdown { + background-color: var(--tosca) !important; + border-color: var(--tosca) !important; +} + /* ### BUTTON HOVER */ /* ## BUTTON HOVER PRIMARY */ .btn.btn-hover-primary:hover:not(.btn-text):not(:disabled):not(.disabled), @@ -2960,6 +3219,101 @@ a.text-white:focus { .show .btn.btn-hover-warning.btn-dropdown.dropdown-toggle:after { color: #ffffff !important; } +/* ## BUTTON HOVER TOSCA */ +.btn.btn-hover-tosca:hover:not(.btn-text):not(:disabled):not(.disabled), +.btn.btn-hover-tosca:focus:not(.btn-text), +.btn.btn-hover-tosca.focus:not(.btn-text) { + color: #ffffff !important; + background-color: var(--tosca) !important; + border-color: var(--tosca) !important; +} +.btn.btn-hover-tosca:hover:not(.btn-text):not(:disabled):not(.disabled) i, +.btn.btn-hover-tosca:focus:not(.btn-text) i, +.btn.btn-hover-tosca.focus:not(.btn-text) i { + color: #ffffff !important; +} +.btn.btn-hover-tosca:hover:not(.btn-text):not(:disabled):not(.disabled) + .svg-icon + svg + g + [fill], +.btn.btn-hover-tosca:focus:not(.btn-text) .svg-icon svg g [fill], +.btn.btn-hover-tosca.focus:not(.btn-text) .svg-icon svg g [fill] { + -webkit-transition: fill 0.3s ease; + transition: fill 0.3s ease; + fill: #ffffff !important; +} +.btn.btn-hover-tosca:hover:not(.btn-text):not(:disabled):not(.disabled) + .svg-icon + svg:hover + g + [fill], +.btn.btn-hover-tosca:focus:not(.btn-text) .svg-icon svg:hover g [fill], +.btn.btn-hover-tosca.focus:not(.btn-text) .svg-icon svg:hover g [fill] { + -webkit-transition: fill 0.3s ease; + transition: fill 0.3s ease; +} +.btn.btn-hover-tosca:hover:not(.btn-text):not(:disabled):not( + .disabled + ).dropdown-toggle:after, +.btn.btn-hover-tosca:focus:not(.btn-text).dropdown-toggle:after, +.btn.btn-hover-tosca.focus:not(.btn-text).dropdown-toggle:after { + color: #ffffff !important; +} + +.btn.btn-hover-tosca:not(:disabled):not(.disabled):active:not(.btn-text), +.btn.btn-hover-tosca:not(:disabled):not(.disabled).active, +.show > .btn.btn-hover-tosca.dropdown-toggle, +.show .btn.btn-hover-tosca.btn-dropdown { + color: #ffffff !important; + background-color: var(--tosca) !important; + border-color: var(--tosca) !important; +} +.btn.btn-hover-tosca:not(:disabled):not(.disabled):active:not(.btn-text) i, +.btn.btn-hover-tosca:not(:disabled):not(.disabled).active i, +.show > .btn.btn-hover-tosca.dropdown-toggle i, +.show .btn.btn-hover-tosca.btn-dropdown i { + color: #ffffff !important; +} +.btn.btn-hover-tosca:not(:disabled):not(.disabled):active:not(.btn-text) + .svg-icon + svg + g + [fill], +.btn.btn-hover-tosca:not(:disabled):not(.disabled).active + .svg-icon + svg + g + [fill], +.show > .btn.btn-hover-tosca.dropdown-toggle .svg-icon svg g [fill], +.show .btn.btn-hover-tosca.btn-dropdown .svg-icon svg g [fill] { + -webkit-transition: fill 0.3s ease; + transition: fill 0.3s ease; + fill: #ffffff !important; +} +.btn.btn-hover-tosca:not(:disabled):not(.disabled):active:not(.btn-text) + .svg-icon + svg:hover + g + [fill], +.btn.btn-hover-tosca:not(:disabled):not(.disabled).active + .svg-icon + svg:hover + g + [fill], +.show > .btn.btn-hover-tosca.dropdown-toggle .svg-icon svg:hover g [fill], +.show .btn.btn-hover-tosca.btn-dropdown .svg-icon svg:hover g [fill] { + -webkit-transition: fill 0.3s ease; + transition: fill 0.3s ease; +} +.btn.btn-hover-tosca:not(:disabled):not(.disabled):active:not( + .btn-text + ).dropdown-toggle:after, +.btn.btn-hover-tosca:not(:disabled):not(.disabled).active.dropdown-toggle:after, +.show > .btn.btn-hover-tosca.dropdown-toggle.dropdown-toggle:after, +.show .btn.btn-hover-tosca.btn-dropdown.dropdown-toggle:after { + color: #ffffff !important; +} /* ### BUTTON LINK */ /* ## BUTTON LINK PRIMARY*/ @@ -3535,6 +3889,7 @@ a.text-white:focus { .show .btn.btn-link-info.btn-dropdown.dropdown-toggle:after { color: var(--info) !important; } + /* ## BUTTON LINK WARNING*/ .btn.btn-link-warning { border: 0; @@ -3679,6 +4034,7 @@ a.text-white:focus { .show .btn.btn-link-warning.btn-dropdown.dropdown-toggle:after { color: var(--warning) !important; } + /* ## BUTTON LINK DANGER*/ .btn.btn-link-danger { border: 0; @@ -3822,6 +4178,145 @@ a.text-white:focus { color: var(--danger) !important; } +/* ## BUTTON LINK TOSCA*/ +.btn.btn-link-tosca { + border: 0; + padding: 0 !important; + border-radius: 0 !important; + color: var(--tosca) !important; + background-color: transparent !important; + border-color: transparent !important; +} +.btn.btn-link-tosca i { + color: var(--tosca) !important; +} +.btn.btn-link-tosca .svg-icon svg g [fill] { + -webkit-transition: fill 0.3s ease; + transition: fill 0.3s ease; + fill: var(--tosca) !important; +} +.btn.btn-link-tosca .svg-icon svg:hover g [fill] { + -webkit-transition: fill 0.3s ease; + transition: fill 0.3s ease; +} +.btn.btn-link-tosca.dropdown-toggle:after { + color: var(--tosca) !important; +} +.btn.btn-link-tosca:hover:not(.btn-text):not(:disabled):not(.disabled), +.btn.btn-link-tosca:focus:not(.btn-text), +.btn.btn-link-tosca.focus:not(.btn-text) { + color: var(--tosca) !important; + background-color: transparent !important; + border-color: transparent !important; +} +.btn.btn-link-tosca:hover:not(.btn-text):not(:disabled):not(.disabled) i, +.btn.btn-link-tosca:focus:not(.btn-text) i, +.btn.btn-link-tosca.focus:not(.btn-text) i { + color: var(--tosca) !important; +} +.btn.btn-link-tosca:hover:not(.btn-text):not(:disabled):not(.disabled) + .svg-icon + svg + g + [fill], +.btn.btn-link-tosca:focus:not(.btn-text) .svg-icon svg g [fill], +.btn.btn-link-tosca.focus:not(.btn-text) .svg-icon svg g [fill] { + -webkit-transition: fill 0.3s ease; + transition: fill 0.3s ease; + fill: var(--tosca) !important; +} +.btn.btn-link-tosca:hover:not(.btn-text):not(:disabled):not(.disabled) + .svg-icon + svg:hover + g + [fill], +.btn.btn-link-tosca:focus:not(.btn-text) .svg-icon svg:hover g [fill], +.btn.btn-link-tosca.focus:not(.btn-text) .svg-icon svg:hover g [fill] { + -webkit-transition: fill 0.3s ease; + transition: fill 0.3s ease; +} +.btn.btn-link-tosca:hover:not(.btn-text):not(:disabled):not( + .disabled + ).dropdown-toggle:after, +.btn.btn-link-tosca:focus:not(.btn-text).dropdown-toggle:after, +.btn.btn-link-tosca.focus:not(.btn-text).dropdown-toggle:after { + color: var(--tosca) !important; +} +.btn.btn-link-tosca.disabled, +.btn.btn-link-tosca:disabled { + color: var(--tosca) !important; + background-color: transparent !important; + border-color: transparent !important; +} +.btn.btn-link-tosca.disabled i, +.btn.btn-link-tosca:disabled i { + color: var(--tosca) !important; +} +.btn.btn-link-tosca.disabled .svg-icon svg g [fill], +.btn.btn-link-tosca:disabled .svg-icon svg g [fill] { + -webkit-transition: fill 0.3s ease; + transition: fill 0.3s ease; + fill: var(--tosca) !important; +} +.btn.btn-link-tosca.disabled .svg-icon svg:hover g [fill], +.btn.btn-link-tosca:disabled .svg-icon svg:hover g [fill] { + -webkit-transition: fill 0.3s ease; + transition: fill 0.3s ease; +} +.btn.btn-link-tosca.disabled.dropdown-toggle:after, +.btn.btn-link-tosca:disabled.dropdown-toggle:after { + color: var(--tosca) !important; +} +.btn.btn-link-tosca:not(:disabled):not(.disabled):active:not(.btn-text), +.btn.btn-link-tosca:not(:disabled):not(.disabled).active, +.show > .btn.btn-link-tosca.dropdown-toggle, +.show .btn.btn-link-tosca.btn-dropdown { + color: var(--tosca) !important; + background-color: transparent !important; + border-color: transparent !important; +} +.btn.btn-link-tosca:not(:disabled):not(.disabled):active:not(.btn-text) i, +.btn.btn-link-tosca:not(:disabled):not(.disabled).active i, +.show > .btn.btn-link-tosca.dropdown-toggle i, +.show .btn.btn-link-tosca.btn-dropdown i { + color: var(--tosca) !important; +} +.btn.btn-link-tosca:not(:disabled):not(.disabled):active:not(.btn-text) + .svg-icon + svg + g + [fill], +.btn.btn-link-tosca:not(:disabled):not(.disabled).active .svg-icon svg g [fill], +.show > .btn.btn-link-tosca.dropdown-toggle .svg-icon svg g [fill], +.show .btn.btn-link-tosca.btn-dropdown .svg-icon svg g [fill] { + -webkit-transition: fill 0.3s ease; + transition: fill 0.3s ease; + fill: var(--tosca) !important; +} +.btn.btn-link-tosca:not(:disabled):not(.disabled):active:not(.btn-text) + .svg-icon + svg:hover + g + [fill], +.btn.btn-link-tosca:not(:disabled):not(.disabled).active + .svg-icon + svg:hover + g + [fill], +.show > .btn.btn-link-tosca.dropdown-toggle .svg-icon svg:hover g [fill], +.show .btn.btn-link-tosca.btn-dropdown .svg-icon svg:hover g [fill] { + -webkit-transition: fill 0.3s ease; + transition: fill 0.3s ease; +} +.btn.btn-link-tosca:not(:disabled):not(.disabled):active:not( + .btn-text + ).dropdown-toggle:after, +.btn.btn-link-tosca:not(:disabled):not(.disabled).active.dropdown-toggle:after, +.show > .btn.btn-link-tosca.dropdown-toggle.dropdown-toggle:after, +.show .btn.btn-link-tosca.btn-dropdown.dropdown-toggle:after { + color: var(--tosca) !important; +} + /* ### BUTTON SHADOW */ /* ## BUTTON SHADOW PRIMARY */ .btn.btn-primary.btn-shadow { @@ -4002,6 +4497,41 @@ a.text-white:focus { -webkit-box-shadow: 0px 9px 16px 0px rgba(var(--dangerrgb), var(--opacity03)) !important; box-shadow: 0px 9px 16px 0px rgba(var(--dangerrgb), var(--opacity03)) !important; } +/* ## BUTTON SHADOW TOSCA */ +.btn.btn-tosca.btn-shadow { + -webkit-box-shadow: 0px 9px 16px 0px rgba(var(--toscargb), var(--opacity02)) !important; + box-shadow: 0px 9px 16px 0px rgba(var(--toscargb), var(--opacity02)) !important; +} +.btn.btn-tosca.btn-shadow:hover:not(.btn-text):not(:disabled):not(.disabled), +.btn.btn-tosca.btn-shadow:focus:not(.btn-text), +.btn.btn-tosca.btn-shadow.focus:not(.btn-text) { + -webkit-box-shadow: 0px 9px 16px 0px rgba(var(--toscargb), var(--opacity03)) !important; + box-shadow: 0px 9px 16px 0px rgba(var(--toscargb), var(--opacity03)) !important; +} +.btn.btn-tosca.btn-shadow:not(:disabled):not(.disabled):active:not(.btn-text), +.btn.btn-tosca.btn-shadow:not(:disabled):not(.disabled).active, +.show > .btn.btn-tosca.btn-shadow.dropdown-toggle { + -webkit-box-shadow: 0px 9px 16px 0px rgba(var(--toscargb), var(--opacity03)) !important; + box-shadow: 0px 9px 16px 0px rgba(var(--toscargb), var(--opacity03)) !important; +} + +.btn.btn-tosca.btn-shadow-hover:hover:not(.btn-text):not(:disabled):not( + .disabled + ), +.btn.btn-tosca.btn-shadow-hover:focus:not(.btn-text), +.btn.btn-tosca.btn-shadow-hover.focus:not(.btn-text) { + -webkit-box-shadow: 0px 9px 16px 0px rgba(var(--toscargb), var(--opacity03)) !important; + box-shadow: 0px 9px 16px 0px rgba(var(--toscargb), var(--opacity03)) !important; +} + +.btn.btn-tosca.btn-shadow-hover:not(:disabled):not(.disabled):active:not( + .btn-text + ), +.btn.btn-tosca.btn-shadow-hover:not(:disabled):not(.disabled).active, +.show > .btn.btn-tosca.btn-shadow-hover.dropdown-toggle { + -webkit-box-shadow: 0px 9px 16px 0px rgba(var(--toscargb), var(--opacity03)) !important; + box-shadow: 0px 9px 16px 0px rgba(var(--toscargb), var(--opacity03)) !important; +} /* ## PRIMARY */ .btn.btn-hover-text-primary:not(:disabled):not(.disabled):active:not(.btn-text), @@ -4103,6 +4633,550 @@ a.text-white:focus { line-height: 22px !important; text-align: center !important; } +/* ### TABLE */ +/* ## BORDER RADIUS */ +table th { + background-color: var(--header-table-bg) !important; +} +th { + color: var(--text-header-table) !important; + font-family: Poppins !important; + font-size: 12px !important; + font-style: normal !important; + font-weight: 600 !important; + line-height: normal !important; + letter-spacing: 0.36px !important; +} +td { + color: var(--text-black) !important; + font-family: Poppins !important; + justify-content: center !important; + vertical-align: middle !important; + font-size: 14px !important; + font-style: normal !important; + font-weight: 600 !important; + line-height: normal !important; + padding-top: 20px !important; + padding-bottom: 20px !important; +} + +td:first-child, +th:first-child { + border-radius: 6px 0 0 6px !important; + padding-left: 20px !important; +} +td:last-child, +th:last-child { + border-radius: 0 6px 6px 0 !important; +} + +/* ### TEXT HOVER */ +/* ## TEXT HOVER PRIMARY */ +a.text-hover-primary, +.text-hover-primary { + -webkit-transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, -webkit-box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, -webkit-box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, box-shadow 0.15s ease, + -webkit-box-shadow 0.15s ease; +} +a.text-hover-primary:hover, +.text-hover-primary:hover { + -webkit-transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, -webkit-box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, -webkit-box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, box-shadow 0.15s ease, + -webkit-box-shadow 0.15s ease; + color: var(--primary-hover) !important; +} +a.text-hover-primary:hover i, +.text-hover-primary:hover i { + color: var(--primary-hover) !important; +} +a.text-hover-primary:hover .svg-icon svg g [fill], +.text-hover-primary:hover .svg-icon svg g [fill] { + -webkit-transition: fill 0.3s ease; + transition: fill 0.3s ease; + fill: var(--primary-hover); +} +a.text-hover-primary:hover .svg-icon svg:hover g [fill], +.text-hover-primary:hover .svg-icon svg:hover g [fill] { + -webkit-transition: fill 0.3s ease; + transition: fill 0.3s ease; +} + +.hoverable:hover a.text-hover-primary, +.hoverable:hover .text-hover-primary { + -webkit-transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, -webkit-box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, -webkit-box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, box-shadow 0.15s ease, + -webkit-box-shadow 0.15s ease; + color: var(--primary-hover) !important; +} +.hoverable:hover a.text-hover-primary i, +.hoverable:hover .text-hover-primary i { + color: var(--primary-hover) !important; +} +.hoverable:hover a.text-hover-primary .svg-icon svg g [fill], +.hoverable:hover .text-hover-primary .svg-icon svg g [fill] { + -webkit-transition: fill 0.3s ease; + transition: fill 0.3s ease; + fill: var(--primary-hover) !important; +} +.hoverable:hover a.text-hover-primary .svg-icon svg:hover g [fill], +.hoverable:hover .text-hover-primary .svg-icon svg:hover g [fill] { + -webkit-transition: fill 0.3s ease; + transition: fill 0.3s ease; +} + +/* ## TEXT HOVER SECONDARY */ +a.text-hover-secondary, +.text-hover-secondary { + -webkit-transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, -webkit-box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, -webkit-box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, box-shadow 0.15s ease, + -webkit-box-shadow 0.15s ease; +} +a.text-hover-secondary:hover, +.text-hover-secondary:hover { + -webkit-transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, -webkit-box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, -webkit-box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, box-shadow 0.15s ease, + -webkit-box-shadow 0.15s ease; + color: var(--secondary-hover) !important; +} +a.text-hover-secondary:hover i, +.text-hover-secondary:hover i { + color: var(--secondary-hover) !important; +} +a.text-hover-secondary:hover .svg-icon svg g [fill], +.text-hover-secondary:hover .svg-icon svg g [fill] { + -webkit-transition: fill 0.3s ease; + transition: fill 0.3s ease; + fill: var(--secondary-hover); +} +a.text-hover-secondary:hover .svg-icon svg:hover g [fill], +.text-hover-secondary:hover .svg-icon svg:hover g [fill] { + -webkit-transition: fill 0.3s ease; + transition: fill 0.3s ease; +} + +.hoverable:hover a.text-hover-secondary, +.hoverable:hover .text-hover-secondary { + -webkit-transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, -webkit-box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, -webkit-box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, box-shadow 0.15s ease, + -webkit-box-shadow 0.15s ease; + color: var(--secondary-hover) !important; +} +.hoverable:hover a.text-hover-secondary i, +.hoverable:hover .text-hover-secondary i { + color: var(--secondary-hover) !important; +} +.hoverable:hover a.text-hover-secondary .svg-icon svg g [fill], +.hoverable:hover .text-hover-secondary .svg-icon svg g [fill] { + -webkit-transition: fill 0.3s ease; + transition: fill 0.3s ease; + fill: var(--secondary-hover) !important; +} +.hoverable:hover a.text-hover-secondary .svg-icon svg:hover g [fill], +.hoverable:hover .text-hover-secondary .svg-icon svg:hover g [fill] { + -webkit-transition: fill 0.3s ease; + transition: fill 0.3s ease; +} + +/* ## TEXT HOVER SUCCESS */ +a.text-hover-success, +.text-hover-success { + -webkit-transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, -webkit-box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, -webkit-box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, box-shadow 0.15s ease, + -webkit-box-shadow 0.15s ease; +} +a.text-hover-success:hover, +.text-hover-success:hover { + -webkit-transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, -webkit-box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, -webkit-box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, box-shadow 0.15s ease, + -webkit-box-shadow 0.15s ease; + color: var(--success-hover) !important; +} +a.text-hover-success:hover i, +.text-hover-success:hover i { + color: var(--success-hover) !important; +} +a.text-hover-success:hover .svg-icon svg g [fill], +.text-hover-success:hover .svg-icon svg g [fill] { + -webkit-transition: fill 0.3s ease; + transition: fill 0.3s ease; + fill: var(--success-hover); +} +a.text-hover-success:hover .svg-icon svg:hover g [fill], +.text-hover-success:hover .svg-icon svg:hover g [fill] { + -webkit-transition: fill 0.3s ease; + transition: fill 0.3s ease; +} + +.hoverable:hover a.text-hover-success, +.hoverable:hover .text-hover-success { + -webkit-transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, -webkit-box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, -webkit-box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, box-shadow 0.15s ease, + -webkit-box-shadow 0.15s ease; + color: var(--success-hover) !important; +} +.hoverable:hover a.text-hover-success i, +.hoverable:hover .text-hover-success i { + color: var(--success-hover) !important; +} +.hoverable:hover a.text-hover-success .svg-icon svg g [fill], +.hoverable:hover .text-hover-success .svg-icon svg g [fill] { + -webkit-transition: fill 0.3s ease; + transition: fill 0.3s ease; + fill: var(--success-hover) !important; +} +.hoverable:hover a.text-hover-success .svg-icon svg:hover g [fill], +.hoverable:hover .text-hover-success .svg-icon svg:hover g [fill] { + -webkit-transition: fill 0.3s ease; + transition: fill 0.3s ease; +} + +/* ## TEXT HOVER INFO */ +a.text-hover-info, +.text-hover-info { + -webkit-transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, -webkit-box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, -webkit-box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, box-shadow 0.15s ease, + -webkit-box-shadow 0.15s ease; +} +a.text-hover-info:hover, +.text-hover-info:hover { + -webkit-transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, -webkit-box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, -webkit-box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, box-shadow 0.15s ease, + -webkit-box-shadow 0.15s ease; + color: var(--info-hover) !important; +} +a.text-hover-info:hover i, +.text-hover-info:hover i { + color: var(--info-hover) !important; +} +a.text-hover-info:hover .svg-icon svg g [fill], +.text-hover-info:hover .svg-icon svg g [fill] { + -webkit-transition: fill 0.3s ease; + transition: fill 0.3s ease; + fill: var(--info-hover); +} +a.text-hover-info:hover .svg-icon svg:hover g [fill], +.text-hover-info:hover .svg-icon svg:hover g [fill] { + -webkit-transition: fill 0.3s ease; + transition: fill 0.3s ease; +} + +.hoverable:hover a.text-hover-info, +.hoverable:hover .text-hover-info { + -webkit-transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, -webkit-box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, -webkit-box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, box-shadow 0.15s ease, + -webkit-box-shadow 0.15s ease; + color: var(--info-hover) !important; +} +.hoverable:hover a.text-hover-info i, +.hoverable:hover .text-hover-info i { + color: var(--info-hover) !important; +} +.hoverable:hover a.text-hover-info .svg-icon svg g [fill], +.hoverable:hover .text-hover-info .svg-icon svg g [fill] { + -webkit-transition: fill 0.3s ease; + transition: fill 0.3s ease; + fill: var(--info-hover) !important; +} +.hoverable:hover a.text-hover-info .svg-icon svg:hover g [fill], +.hoverable:hover .text-hover-info .svg-icon svg:hover g [fill] { + -webkit-transition: fill 0.3s ease; + transition: fill 0.3s ease; +} + +/* ## TEXT HOVER WARNING */ +a.text-hover-warning, +.text-hover-warning { + -webkit-transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, -webkit-box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, -webkit-box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, box-shadow 0.15s ease, + -webkit-box-shadow 0.15s ease; +} +a.text-hover-warning:hover, +.text-hover-warning:hover { + -webkit-transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, -webkit-box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, -webkit-box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, box-shadow 0.15s ease, + -webkit-box-shadow 0.15s ease; + color: var(--warning-hover) !important; +} +a.text-hover-warning:hover i, +.text-hover-warning:hover i { + color: var(--warning-hover) !important; +} +a.text-hover-warning:hover .svg-icon svg g [fill], +.text-hover-warning:hover .svg-icon svg g [fill] { + -webkit-transition: fill 0.3s ease; + transition: fill 0.3s ease; + fill: var(--warning-hover); +} +a.text-hover-warning:hover .svg-icon svg:hover g [fill], +.text-hover-warning:hover .svg-icon svg:hover g [fill] { + -webkit-transition: fill 0.3s ease; + transition: fill 0.3s ease; +} + +.hoverable:hover a.text-hover-warning, +.hoverable:hover .text-hover-warning { + -webkit-transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, -webkit-box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, -webkit-box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, box-shadow 0.15s ease, + -webkit-box-shadow 0.15s ease; + color: var(--warning-hover) !important; +} +.hoverable:hover a.text-hover-warning i, +.hoverable:hover .text-hover-warning i { + color: var(--warning-hover) !important; +} +.hoverable:hover a.text-hover-warning .svg-icon svg g [fill], +.hoverable:hover .text-hover-warning .svg-icon svg g [fill] { + -webkit-transition: fill 0.3s ease; + transition: fill 0.3s ease; + fill: var(--warning-hover) !important; +} +.hoverable:hover a.text-hover-warning .svg-icon svg:hover g [fill], +.hoverable:hover .text-hover-warning .svg-icon svg:hover g [fill] { + -webkit-transition: fill 0.3s ease; + transition: fill 0.3s ease; +} + +/* ## TEXT HOVER DANGER */ +a.text-hover-danger, +.text-hover-danger { + -webkit-transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, -webkit-box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, -webkit-box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, box-shadow 0.15s ease, + -webkit-box-shadow 0.15s ease; +} +a.text-hover-danger:hover, +.text-hover-danger:hover { + -webkit-transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, -webkit-box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, -webkit-box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, box-shadow 0.15s ease, + -webkit-box-shadow 0.15s ease; + color: var(--danger-hover) !important; +} +a.text-hover-danger:hover i, +.text-hover-danger:hover i { + color: var(--danger-hover) !important; +} +a.text-hover-danger:hover .svg-icon svg g [fill], +.text-hover-danger:hover .svg-icon svg g [fill] { + -webkit-transition: fill 0.3s ease; + transition: fill 0.3s ease; + fill: var(--danger-hover); +} +a.text-hover-danger:hover .svg-icon svg:hover g [fill], +.text-hover-danger:hover .svg-icon svg:hover g [fill] { + -webkit-transition: fill 0.3s ease; + transition: fill 0.3s ease; +} + +.hoverable:hover a.text-hover-danger, +.hoverable:hover .text-hover-danger { + -webkit-transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, -webkit-box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, -webkit-box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, box-shadow 0.15s ease, + -webkit-box-shadow 0.15s ease; + color: var(--danger-hover) !important; +} +.hoverable:hover a.text-hover-danger i, +.hoverable:hover .text-hover-danger i { + color: var(--danger-hover) !important; +} +.hoverable:hover a.text-hover-danger .svg-icon svg g [fill], +.hoverable:hover .text-hover-danger .svg-icon svg g [fill] { + -webkit-transition: fill 0.3s ease; + transition: fill 0.3s ease; + fill: var(--danger-hover) !important; +} +.hoverable:hover a.text-hover-danger .svg-icon svg:hover g [fill], +.hoverable:hover .text-hover-danger .svg-icon svg:hover g [fill] { + -webkit-transition: fill 0.3s ease; + transition: fill 0.3s ease; +} + +/* ## TEXT HOVER TOSCA */ +a.text-hover-tosca, +.text-hover-tosca { + -webkit-transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, -webkit-box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, -webkit-box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, box-shadow 0.15s ease, + -webkit-box-shadow 0.15s ease; +} +a.text-hover-tosca:hover, +.text-hover-tosca:hover { + -webkit-transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, -webkit-box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, -webkit-box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, box-shadow 0.15s ease, + -webkit-box-shadow 0.15s ease; + color: var(--tosca-hover) !important; +} +a.text-hover-tosca:hover i, +.text-hover-tosca:hover i { + color: var(--tosca-hover) !important; +} +a.text-hover-tosca:hover .svg-icon svg g [fill], +.text-hover-tosca:hover .svg-icon svg g [fill] { + -webkit-transition: fill 0.3s ease; + transition: fill 0.3s ease; + fill: var(--tosca-hover); +} +a.text-hover-tosca:hover .svg-icon svg:hover g [fill], +.text-hover-tosca:hover .svg-icon svg:hover g [fill] { + -webkit-transition: fill 0.3s ease; + transition: fill 0.3s ease; +} + +.hoverable:hover a.text-hover-tosca, +.hoverable:hover .text-hover-tosca { + -webkit-transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, -webkit-box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, -webkit-box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, box-shadow 0.15s ease; + transition: color 0.15s ease, background-color 0.15s ease, + border-color 0.15s ease, box-shadow 0.15s ease, + -webkit-box-shadow 0.15s ease; + color: var(--tosca-hover) !important; +} +.hoverable:hover a.text-hover-tosca i, +.hoverable:hover .text-hover-tosca i { + color: var(--tosca-hover) !important; +} +.hoverable:hover a.text-hover-tosca .svg-icon svg g [fill], +.hoverable:hover .text-hover-tosca .svg-icon svg g [fill] { + -webkit-transition: fill 0.3s ease; + transition: fill 0.3s ease; + fill: var(--tosca-hover) !important; +} +.hoverable:hover a.text-hover-tosca .svg-icon svg:hover g [fill], +.hoverable:hover .text-hover-tosca .svg-icon svg:hover g [fill] { + -webkit-transition: fill 0.3s ease; + transition: fill 0.3s ease; +} + +.htmx-indicator { + display: none; +} +.htmx-request .htmx-indicator { + display: inline; +} +.htmx-request.htmx-indicator { + display: inline; +} /* ### BUTTON HOVER TEXT */ /* ### */ /* ## PRIMARY */ diff --git a/assets/asset-corporate-portal/js/ktappsetting.js b/assets/asset-corporate-portal/js/ktappsetting.js new file mode 100644 index 0000000..ed678af --- /dev/null +++ b/assets/asset-corporate-portal/js/ktappsetting.js @@ -0,0 +1,58 @@ +var KTAppSettings = { + breakpoints: { + sm: 576, + md: 768, + lg: 992, + xl: 1200, + xxl: 1400, + }, + colors: { + theme: { + base: { + white: "#ffffff", + primary: "#3699FF", + secondary: "#E5EAEE", + success: "#1BC5BD", + info: "#8950FC", + warning: "#FFA800", + danger: "#F64E60", + light: "#E4E6EF", + dark: "#181C32", + }, + light: { + white: "#ffffff", + primary: "#E1F0FF", + secondary: "#EBEDF3", + success: "#C9F7F5", + info: "#EEE5FF", + warning: "#FFF4DE", + danger: "#FFE2E5", + light: "#F3F6F9", + dark: "#D6D6E0", + }, + inverse: { + white: "#ffffff", + primary: "#ffffff", + secondary: "#3F4254", + success: "#ffffff", + info: "#ffffff", + warning: "#ffffff", + danger: "#ffffff", + light: "#464E5F", + dark: "#ffffff", + }, + }, + gray: { + "gray-100": "#F3F6F9", + "gray-200": "#EBEDF3", + "gray-300": "#E4E6EF", + "gray-400": "#D1D3E0", + "gray-500": "#B5B5C3", + "gray-600": "#7E8299", + "gray-700": "#5E6278", + "gray-800": "#3F4254", + "gray-900": "#181C32", + }, + }, + "font-family": "Poppins", +}; \ No newline at end of file diff --git a/handlers/mastermenuusergroup.handlers.go b/handlers/mastermenuusergroup.handlers.go index ec88c46..4383882 100644 --- a/handlers/mastermenuusergroup.handlers.go +++ b/handlers/mastermenuusergroup.handlers.go @@ -6,8 +6,11 @@ import ( "strconv" "github.com/a-h/templ" + "github.com/emarifer/go-templ-project-structure/models" "github.com/emarifer/go-templ-project-structure/services" "github.com/emarifer/go-templ-project-structure/views/component/customtextfieldautocomplete" + "github.com/emarifer/go-templ-project-structure/views/component/pagination" + tablecomponent "github.com/emarifer/go-templ-project-structure/views/component/table" mastermenuusergroup "github.com/emarifer/go-templ-project-structure/views/mastermenuusergroup" "github.com/labstack/echo/v4" ) @@ -15,6 +18,8 @@ import ( type MasterMenuUserGroupService interface { GetMasterMenus() ([]services.MasterMenu, error) GetAutoComplete(param string, pageOf string, limit string) (string, string, string, []services.AutoComplete, error) + GetUserGroup() ([]models.UserGroup, error) + GetUserGroupByID(id string) (models.UserGroup, error) } func NewMasterMenuUserGroupHandler(us MasterMenuUserGroupService) *MasterMenuUserGroupHandler { @@ -35,18 +40,28 @@ func (lh *MasterMenuUserGroupHandler) HandlerShowMasterMenuUserGroup(c echo.Cont fmt.Println(dataMenu) return err } - // fmt.Printf("%+v\n", dataMenu) - // si := mastermenu.ShowMasterMenu("Master Menu", - // mastermenu.MainMasterMenu(dataMenu), - // mastermenu.CssMasterMenu(), - // mastermenu.JsMasterMenu(), - // ) + dataUser, err := services.GetUser() + fmt.Println(dataUser) + fmt.Println(err) + if err != nil { + fmt.Println(dataUser) + return err + } + dataUserGroup, err := lh.MasterMenuUserGroupService.GetUserGroup() + fmt.Println(dataUserGroup) + fmt.Println(err) + if err != nil { + fmt.Println(dataUserGroup) + return err + } si := mastermenuusergroup.ShowMasterMenuUserGroup( "Master Menu", - mastermenuusergroup.MainMasterMenuUserGroup(dataMenu), + mastermenuusergroup.ContentMasterMenuUserGroup(dataUserGroup), mastermenuusergroup.CssMasterMenuUserGroup(), mastermenuusergroup.JsMasterMenuUserGroup(), + dataMenu, + dataUser, ) return lh.View(c, si) @@ -219,6 +234,42 @@ func (lh *MasterMenuUserGroupHandler) HandlerAutoCompleteExample(c echo.Context) return lh.View(c, si) } +func (lh *MasterMenuUserGroupHandler) ChangeFormEdit(c echo.Context) error { + id := c.QueryParam("id") + dataUserGroup, err := lh.MasterMenuUserGroupService.GetUserGroupByID(id) + fmt.Println(dataUserGroup) + fmt.Println(err) + if err != nil { + fmt.Println(dataUserGroup) + return err + } + vw := mastermenuusergroup.DialogEditForm(dataUserGroup.UserGroupKode, dataUserGroup.UserGroupName) + + return lh.View(c, vw) +} +func (lh *MasterMenuUserGroupHandler) HandleChangePage(c echo.Context) error { + page := c.QueryParam("page") + currPage := c.QueryParam("currentPage") + dataUserGroup, err := lh.MasterMenuUserGroupService.GetUserGroup() + + if err != nil { + fmt.Println(dataUserGroup) + return err + } + pageInt, err := strconv.Atoi(page) + if err != nil { + fmt.Println("page err") + return err + } + currPageInt, err := strconv.Atoi(currPage) + if err != nil { + fmt.Println("currpage err") + return err + } + vw := tablecomponent.Table([]string{"KODE", "USERGROUP", "AKSI"}, []string{"40%", "40%", "20%"}, mastermenuusergroup.TableRow(dataUserGroup), pagination.Pagination(pageInt, currPageInt)) + + return lh.View(c, vw) +} func (uh *MasterMenuUserGroupHandler) View(c echo.Context, cmp templ.Component) error { c.Response().Header().Set(echo.HeaderContentType, echo.MIMETextHTML) diff --git a/handlers/routes.go b/handlers/routes.go index dab2983..14aab5b 100644 --- a/handlers/routes.go +++ b/handlers/routes.go @@ -18,6 +18,9 @@ func SetupRoutesLogin(app *echo.Echo, h *LoginHandler) { func SetupRoutesXsample(app *echo.Echo, h *XsampleHandler) { xSample := app.Group("/xsample") xSample.GET("/xsample01", h.Hello) + xSample.GET("/coba", h.ShowCoba) + xSample.GET("/counter", h.ShowCounter) + xSample.GET("/counterchange", h.ChangeCounter) } func SetupRoutesLandingPage(app *echo.Echo, h *LandingPageHandler, mastermenuusergroupHandler *MasterMenuUserGroupHandler) { Lp := app.Group("/landing_page") @@ -30,6 +33,8 @@ func SetupRoutesLandingPage(app *echo.Echo, h *LandingPageHandler, mastermenuuse autocomplete.GET("/autocomplete", mastermenuusergroupHandler.HandlerListAutoComplete) autocomplete.GET("/autoCompleteLoadMore/:pageOf/:searchParam/:limit", mastermenuusergroupHandler.HandlerListAutoCompleteLoadMore) autocomplete.GET("/autoCompleteSetValue/:setvalue", mastermenuusergroupHandler.HandlerListAutoCompleteAfterSelected) + clientgroup.GET("/usergroup/edit", mastermenuusergroupHandler.ChangeFormEdit) + clientgroup.GET("/usergroup/pagination", mastermenuusergroupHandler.HandleChangePage) } func SetupRoutesPieChart(app *echo.Echo, h *PiechartHandler) { diff --git a/handlers/xsample.handlers.go b/handlers/xsample.handlers.go index 9253c6b..8292816 100644 --- a/handlers/xsample.handlers.go +++ b/handlers/xsample.handlers.go @@ -1,13 +1,19 @@ package handlers import ( + "fmt" + "strconv" + "github.com/a-h/templ" + "github.com/emarifer/go-templ-project-structure/services" + "github.com/emarifer/go-templ-project-structure/utils" "github.com/emarifer/go-templ-project-structure/views/xsample" "github.com/labstack/echo/v4" ) type XsampleService interface { + GetListMenus() ([]services.MasterMenu, error) } func NewXsampleHandler(us XsampleService) *XsampleHandler { @@ -24,6 +30,66 @@ func (uh *XsampleHandler) Hello(c echo.Context) error { helo := xsample.ShowHelo("Hello World", xsample.HelloWorld("Hello World"), xsample.CssHelo(), xsample.JsHelo()) return uh.View(c, helo) } +func (uh *XsampleHandler) ShowCoba(c echo.Context) error { + dataMenu, err := uh.XsampleService.GetListMenus() + fmt.Println(dataMenu) + fmt.Println(err) + if err != nil { + fmt.Println(dataMenu) + return err + } + randomID := utils.GenerateRandomID("coba") + fmt.Println(randomID) + dataUser, err := services.GetUser() + fmt.Println(dataUser) + fmt.Println(err) + if err != nil { + fmt.Println(dataUser) + return err + } + helo := xsample.ShowCoba("Hello World", xsample.Coba("Hello World"), xsample.CssCoba(), xsample.JsCoba(), dataMenu, dataUser) + return uh.View(c, helo) +} +func (uh *XsampleHandler) ShowCounter(c echo.Context) error { + typectr := c.QueryParam("type") + + counter := c.QueryParam("counter") + if counter == "" { + counter = "0" + } + ctr, err := strconv.Atoi(counter) + if err != nil { + fmt.Println("Error counter parse int") + return err + } + + if typectr == "min" { + ctr = ctr - 1 + } else if typectr == "plus" { + ctr = ctr + 1 + } + helo := xsample.Page(ctr) + return uh.View(c, helo) +} +func (uh *XsampleHandler) ChangeCounter(c echo.Context) error { + + typectr := c.QueryParam("type") + + counter := c.QueryParam("counter") + ctr, err := strconv.Atoi(counter) + if err != nil { + fmt.Println("Error counter parse int") + return err + } + + if typectr == "min" { + ctr = ctr - 1 + } else { + ctr = ctr + 1 + } + helo := xsample.Counts(ctr) + return uh.View(c, helo) +} func (uh *XsampleHandler) View(c echo.Context, cmp templ.Component) error { c.Response().Header().Set(echo.HeaderContentType, echo.MIMETextHTML) diff --git a/models/CustomTextField.models.go b/models/CustomTextField.models.go new file mode 100644 index 0000000..6fc167c --- /dev/null +++ b/models/CustomTextField.models.go @@ -0,0 +1,14 @@ +package models + +// inpLabelText, +// inpName, +// inpPlaceHolder, +// inpType string +// MainCustomTextField +type CustomTextFieldv2Prm struct { + Label string `default:"Label"` + Name string `default:"name"` + Placeholder string `default:"Placeholder"` + Type string `default:"text"` + Value string `default:""` +} diff --git a/models/table.models.go b/models/table.models.go new file mode 100644 index 0000000..76d0d99 --- /dev/null +++ b/models/table.models.go @@ -0,0 +1,15 @@ +package models + +type TableHead struct { + Name string `json:"name"` + Width string `json:"width"` +} + +func GetTableHead() []TableHead { + a := []TableHead{ + {Name: "Kode", Width: "30%"}, + {Name: "User Group", Width: "40%"}, + {Name: "Aksi", Width: "30%"}, + } + return a +} diff --git a/models/user.models.go b/models/user.models.go new file mode 100644 index 0000000..bb118c8 --- /dev/null +++ b/models/user.models.go @@ -0,0 +1,8 @@ +package models + +type User struct { + UserID int `json:"userID"` + Username string `json:"username"` + UserFullName string `json:"userFullName"` + UserPosition string `json:"userPosition"` +} diff --git a/models/usergroup.models.go b/models/usergroup.models.go new file mode 100644 index 0000000..1aa130a --- /dev/null +++ b/models/usergroup.models.go @@ -0,0 +1,7 @@ +package models + +type UserGroup struct { + UserGroupID int `json:"user_group_id"` + UserGroupKode string `json:"user_group_kode"` + UserGroupName string `json:"user_group_name"` +} diff --git a/services/mastermenuusergroup.services.go b/services/mastermenuusergroup.services.go index 711f2bc..93b256f 100644 --- a/services/mastermenuusergroup.services.go +++ b/services/mastermenuusergroup.services.go @@ -5,6 +5,7 @@ import ( "strconv" "github.com/emarifer/go-templ-project-structure/db" + "github.com/emarifer/go-templ-project-structure/models" ) func NewServicesMasterMenuUserGroup(u MasterMenu, uStore db.MasterMenuUserGroupStore) *ServicesMasterMenuUserGroup { @@ -740,6 +741,35 @@ func (su *ServicesMasterMenuUserGroup) GetAutoComplete(param string, pageOfParam return strconv.Itoa(totalData), strconv.Itoa(foundCount), textFound, results, nil } +func (ug *ServicesMasterMenuUserGroup) GetUserGroup() ([]models.UserGroup, error) { + data := []models.UserGroup{ + {UserGroupID: 1, UserGroupKode: "A", UserGroupName: "UG1"}, + {UserGroupID: 2, UserGroupKode: "B", UserGroupName: "UG2"}, + {UserGroupID: 3, UserGroupKode: "C", UserGroupName: "UG3"}, + } + return data, nil +} + +func (ug *ServicesMasterMenuUserGroup) GetUserGroupByID(id string) (models.UserGroup, error) { + listdata := []models.UserGroup{ + {UserGroupID: 1, UserGroupKode: "A", UserGroupName: "UG1"}, + {UserGroupID: 2, UserGroupKode: "B", UserGroupName: "UG2"}, + {UserGroupID: 3, UserGroupKode: "C", UserGroupName: "UG3"}, + } + var data models.UserGroup + idData, err := strconv.Atoi(id) + if err != nil { + return data, fmt.Errorf("pack %v: %w", "Error", err) + } + for _, v := range listdata { + + if v.UserGroupID == idData { + data = v + } + } + // time.Sleep(5 * time.Second) + return data, nil +} // func (su *ServicesMasterMenuUserGroup) GetAllMasterMenus() ([]MasterMenu, error) { // query := `SELECT id, MasterMenuname, email, created_at FROM MasterMenus ORDER BY created_at DESC` diff --git a/services/user.services.go b/services/user.services.go index 37e071b..63f63f8 100644 --- a/services/user.services.go +++ b/services/user.services.go @@ -4,6 +4,7 @@ import ( "time" "github.com/emarifer/go-templ-project-structure/db" + "github.com/emarifer/go-templ-project-structure/models" ) func NewServicesUser(u User, uStore db.UserStore) *ServicesUser { @@ -84,3 +85,13 @@ func ConverDateTime(tz string, dt time.Time) string { return dt.In(loc).Format(time.RFC822Z) } + +func GetUser() (models.User, error) { + a := models.User{ + UserID: 1, + Username: "andy", + UserFullName: "Alfianto Andy P", + UserPosition: "Software Developer", + } + return a, nil +} diff --git a/services/xsample.services.go b/services/xsample.services.go index fc24081..517f131 100644 --- a/services/xsample.services.go +++ b/services/xsample.services.go @@ -78,3 +78,505 @@ func (su *ServicesXsample) GetXsampleById(id int) (Xsample, error) { return su.Xsample, nil } + +func (su *ServicesXsample) GetListMenus() ([]MasterMenu, error) { + + // dummyBreadcrumb := []Breadcrumb{ + // { + // Name: "Dashboard", + // Url: "/client/dashboard", + // }, + // { + // Name: "Front Office", + // Url: "/client/usermanagement", + // }, + // } + + dummyMenu := []MasterMenu{ + // 1. Dashboard + { + ID: "1", + ParentMenuID: "0", + ParentMenuName: "Dashboard", + ParentUrl: "/client/md/dashboard", + ParentIcon: "", + Children: []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: []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: []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: []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: []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 +} diff --git a/utils/generaterandomid.utils.go b/utils/generaterandomid.utils.go new file mode 100644 index 0000000..5b69c70 --- /dev/null +++ b/utils/generaterandomid.utils.go @@ -0,0 +1,16 @@ +package utils + +import ( + "crypto/md5" + "encoding/hex" + "strings" + "time" +) + +func GenerateRandomID(text string) string { + seed := text + time.Now().String() + hash := md5.Sum([]byte(seed)) + randomID := hex.EncodeToString(hash[:]) + randomID = strings.ReplaceAll(randomID, "-", "") + return randomID +} diff --git a/views/component/customtextfield/customtextfield.templ b/views/component/customtextfield/customtextfield.templ index 189b9be..73c5598 100644 --- a/views/component/customtextfield/customtextfield.templ +++ b/views/component/customtextfield/customtextfield.templ @@ -11,7 +11,7 @@ templ MainCustomTextField(inpLabelText, name={ inpName } type={ inpType } placeholder={ inpPlaceHolder } - class="form-control bg-field border-0" + class="form-control bg-field border-0 h-auto py-6 px-6 rounded-lg" /> } diff --git a/views/component/customtextfield/customtextfield_templ.go b/views/component/customtextfield/customtextfield_templ.go index eaa6d1d..52c41ac 100644 --- a/views/component/customtextfield/customtextfield_templ.go +++ b/views/component/customtextfield/customtextfield_templ.go @@ -91,7 +91,7 @@ func MainCustomTextField(inpLabelText, if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" class=\"form-control bg-field border-0\">") + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" class=\"form-control bg-field border-0 h-auto py-6 px-6 rounded-lg\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } diff --git a/views/component/customtextfield/customtextfieldv2.templ b/views/component/customtextfield/customtextfieldv2.templ new file mode 100644 index 0000000..c24ff90 --- /dev/null +++ b/views/component/customtextfield/customtextfieldv2.templ @@ -0,0 +1,17 @@ +package customtextfield + +import "github.com/emarifer/go-templ-project-structure/models" + +templ CustomTextFieldv2(inp models.CustomTextFieldv2Prm) { +
+ + +
+} diff --git a/views/component/customtextfield/customtextfieldv2_templ.go b/views/component/customtextfield/customtextfieldv2_templ.go new file mode 100644 index 0000000..8b20ddb --- /dev/null +++ b/views/component/customtextfield/customtextfieldv2_templ.go @@ -0,0 +1,115 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.663 +package customtextfield + +//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 "github.com/emarifer/go-templ-project-structure/models" + +func CustomTextFieldv2(inp models.CustomTextFieldv2Prm) 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 !templ_7745c5c3_IsBuffer { + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_W) + } + return templ_7745c5c3_Err + }) +} diff --git a/views/component/modal/modal.templ b/views/component/modal/modal.templ new file mode 100644 index 0000000..9742c2f --- /dev/null +++ b/views/component/modal/modal.templ @@ -0,0 +1,30 @@ +package modalcomponent + +templ Modal(modalID string, modalTitle string, modalBody templ.Component, modalAction templ.Component, btnClose templ.Component) { + +} diff --git a/views/component/modal/modal_confirmation.templ b/views/component/modal/modal_confirmation.templ new file mode 100644 index 0000000..3e3503b --- /dev/null +++ b/views/component/modal/modal_confirmation.templ @@ -0,0 +1,52 @@ +package modalcomponent + +templ ModalConfirmation( + id string, + modalTitle string, + message string, + btnClose templ.Component, + datHeader []string, + dataText []string, + modalAction templ.Component) { + +} diff --git a/views/component/modal/modal_confirmation_templ.go b/views/component/modal/modal_confirmation_templ.go new file mode 100644 index 0000000..eeb1046 --- /dev/null +++ b/views/component/modal/modal_confirmation_templ.go @@ -0,0 +1,143 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.663 +package modalcomponent + +//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 ModalConfirmation( + id string, + modalTitle string, + message string, + btnClose templ.Component, + datHeader []string, + dataText []string, + modalAction 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 + } + var templ_7745c5c3_Var3 string + templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(modalTitle) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\component\modal\modal_confirmation.templ`, Line: 23, Col: 18} + } + _, 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 = btnClose.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_Var4 string + templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(message) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\component\modal\modal_confirmation.templ`, Line: 28, Col: 17} + } + _, 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 + } + for _, v := range datHeader { + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var5 string + templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(v) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\component\modal\modal_confirmation.templ`, Line: 33, Col: 66} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5)) + 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 + } + for _, v := range dataText { + _, 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(v) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\component\modal\modal_confirmation.templ`, Line: 39, Col: 13} + } + _, 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 + } + } + _, 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/views/component/modal/modal_templ.go b/views/component/modal/modal_templ.go new file mode 100644 index 0000000..7f79716 --- /dev/null +++ b/views/component/modal/modal_templ.go @@ -0,0 +1,85 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.663 +package modalcomponent + +//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 Modal(modalID string, modalTitle string, modalBody templ.Component, modalAction templ.Component, btnClose 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 + } + var templ_7745c5c3_Var3 string + templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(modalTitle) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\component\modal\modal.templ`, Line: 17, Col: 18} + } + _, 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 = btnClose.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 = modalBody.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 + }) +} diff --git a/views/component/navbar/navbar.templ b/views/component/navbar/navbar.templ new file mode 100644 index 0000000..c892f01 --- /dev/null +++ b/views/component/navbar/navbar.templ @@ -0,0 +1,74 @@ +package navbar + +import ( + "github.com/emarifer/go-templ-project-structure/views/component/sidebarmaster" + "github.com/emarifer/go-templ-project-structure/services" + "github.com/emarifer/go-templ-project-structure/models" +) + +templ Navbar(dataUser models.User) { +
+ +
+ +
+ + +
+ +
+
+ Hi, + { dataUser.Username } + + + +
+
+ +
+ +
+ +
+} + +templ NavbarMenu(datamenu []services.MasterMenu) { +
+ +
+ + + +
+ +
+} diff --git a/views/component/navbar/navbar_templ.go b/views/component/navbar/navbar_templ.go new file mode 100644 index 0000000..4b166a5 --- /dev/null +++ b/views/component/navbar/navbar_templ.go @@ -0,0 +1,112 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.663 +package navbar + +//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 ( + "github.com/emarifer/go-templ-project-structure/models" + "github.com/emarifer/go-templ-project-structure/services" + "github.com/emarifer/go-templ-project-structure/views/component/sidebarmaster" +) + +func Navbar(dataUser models.User) 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("
Hi, ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var2 string + templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(dataUser.Username) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\component\navbar\navbar.templ`, Line: 29, Col: 26} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) + 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 NavbarMenu(datamenu []services.MasterMenu) 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_Var3 := templ.GetChildren(ctx) + if templ_7745c5c3_Var3 == nil { + templ_7745c5c3_Var3 = 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/views/component/pagination/pagination.templ b/views/component/pagination/pagination.templ new file mode 100644 index 0000000..9dd55bd --- /dev/null +++ b/views/component/pagination/pagination.templ @@ -0,0 +1,17 @@ +package pagination + +import "strconv" + +templ Pagination(length int, currentPage int) { +
+
+ for i:=0; i{ strconv.Itoa(i+1) } + } else { + { strconv.Itoa(i+1) } + } + } +
+
+} diff --git a/views/component/pagination/pagination_templ.go b/views/component/pagination/pagination_templ.go new file mode 100644 index 0000000..eaf1a44 --- /dev/null +++ b/views/component/pagination/pagination_templ.go @@ -0,0 +1,80 @@ +// 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" + +func Pagination(length int, currentPage int) 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_Var2 string + templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(i + 1)) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\component\pagination\pagination.templ`, Line: 10, Col: 118} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) + 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_Var3 string + templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(i + 1)) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\component\pagination\pagination.templ`, Line: 12, Col: 93} + } + _, 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 + }) +} diff --git a/views/component/sidebar_user_profile/sidebar_user_profile.templ b/views/component/sidebar_user_profile/sidebar_user_profile.templ new file mode 100644 index 0000000..7e2242c --- /dev/null +++ b/views/component/sidebar_user_profile/sidebar_user_profile.templ @@ -0,0 +1,82 @@ +package sidebaruserprofile + +import "github.com/emarifer/go-templ-project-structure/models" + +templ Navbaruserprofile(dataUser models.User) { +
+ +
+

+ User Profile + // 12 messages +

+ + + +
+ + +
+ + @ProfileHeader(dataUser) + + +
+ + +
+ +
+ Recent Notifications +
+ + + @NotificationCard() + +
+ +
+ +
+} + +templ ProfileHeader(dataUser models.User) { +
+
+ //
+ // + +
+
+ + { dataUser.UserFullName } + +
+ { dataUser.UserPosition } +
+ +
+
+} + +templ NotificationCard() { +
+ + + + + + +
+ + Another + purpose persuade + + Due in 2 Days +
+
+} diff --git a/views/component/sidebar_user_profile/sidebar_user_profile_templ.go b/views/component/sidebar_user_profile/sidebar_user_profile_templ.go new file mode 100644 index 0000000..779eb04 --- /dev/null +++ b/views/component/sidebar_user_profile/sidebar_user_profile_templ.go @@ -0,0 +1,127 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.663 +package sidebaruserprofile + +//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 "github.com/emarifer/go-templ-project-structure/models" + +func Navbaruserprofile(dataUser models.User) 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("

User Profile\r

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = ProfileHeader(dataUser).Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
Recent Notifications\r
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = NotificationCard().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 ProfileHeader(dataUser models.User) templ.Component { + return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) { + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer) + if !templ_7745c5c3_IsBuffer { + templ_7745c5c3_Buffer = templ.GetBuffer() + defer templ.ReleaseBuffer(templ_7745c5c3_Buffer) + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var2 := templ.GetChildren(ctx) + if templ_7745c5c3_Var2 == nil { + templ_7745c5c3_Var2 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var3 string + templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(dataUser.UserFullName) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\component\sidebar_user_profile\sidebar_user_profile.templ`, Line: 52, Col: 27} + } + _, 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 + } + var templ_7745c5c3_Var4 string + templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(dataUser.UserPosition) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\component\sidebar_user_profile\sidebar_user_profile.templ`, Line: 55, Col: 27} + } + _, 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 NotificationCard() 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("
Another\r purpose persuade\r Due in 2 Days
") + 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/views/component/table/table.templ b/views/component/table/table.templ new file mode 100644 index 0000000..ef66f32 --- /dev/null +++ b/views/component/table/table.templ @@ -0,0 +1,25 @@ +package tablecomponent + +templ Table(thName []string, thWidth []string, trComponent templ.Component, pagination templ.Component) { + if len(thName) != len(thWidth) { +
length array thname berbeda dengan array thwidth
+ } else { +
+ + + + for i, item := range thName { + + } + + + + @trComponent + +
{ item }
+
+
+ @pagination +
+ } +} diff --git a/views/component/table/table_templ.go b/views/component/table/table_templ.go new file mode 100644 index 0000000..78877c7 --- /dev/null +++ b/views/component/table/table_templ.go @@ -0,0 +1,94 @@ +// 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 Table(thName []string, thWidth []string, trComponent templ.Component, pagination 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) + 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: `views\component\table\table.templ`, Line: 12, 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 = pagination.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 + }) +} diff --git a/views/layout/canvas_layout.templ b/views/layout/canvas_layout.templ index 4557116..5aeaf2a 100644 --- a/views/layout/canvas_layout.templ +++ b/views/layout/canvas_layout.templ @@ -94,72 +94,8 @@ templ CanvasLayout(title string, css templ.Component, js templ.Component) { { children... } - - - - + + diff --git a/views/layout/canvas_layout_templ.go b/views/layout/canvas_layout_templ.go index 006f939..6685c82 100644 --- a/views/layout/canvas_layout_templ.go +++ b/views/layout/canvas_layout_templ.go @@ -52,7 +52,7 @@ func CanvasLayout(title string, css templ.Component, js templ.Component) templ.C if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } diff --git a/views/layout/layout_corporate.templ b/views/layout/layout_corporate.templ new file mode 100644 index 0000000..43d3df4 --- /dev/null +++ b/views/layout/layout_corporate.templ @@ -0,0 +1,237 @@ +package layout + +import ( + "github.com/emarifer/go-templ-project-structure/services" + "github.com/emarifer/go-templ-project-structure/views/component/navbar" + "github.com/emarifer/go-templ-project-structure/views/component/sidebar_user_profile" + "github.com/emarifer/go-templ-project-structure/models" +) + +// LAYOUT PLAYGROUND +templ CorporateLayout(title string, css templ.Component, js templ.Component, datamenu []services.MasterMenu, dataUser models.User) { + + + + + + + + Company Portal | { title } + + + + + + + + + + + + + + + + + + + + + + + @css + + + + + // htmx + + +
+ + + Logo + + + +
+ + + + + + +
+ +
+ + +
+ +
+ +
+ +
+ + + + + + +
+ + + @navbar.NavbarMenu(datamenu) + +
+ + +
+ + @navbar.Navbar(dataUser) + + +
+ { children... } +
+ +
+ +
+ +
+ + @sidebaruserprofile.Navbaruserprofile(dataUser) + + + + + + + + + + @js + + + + +} diff --git a/views/layout/layout_corporate_templ.go b/views/layout/layout_corporate_templ.go new file mode 100644 index 0000000..9d8d95a --- /dev/null +++ b/views/layout/layout_corporate_templ.go @@ -0,0 +1,104 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.663 +package layout + +//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 ( + "github.com/emarifer/go-templ-project-structure/models" + "github.com/emarifer/go-templ-project-structure/services" + "github.com/emarifer/go-templ-project-structure/views/component/navbar" + "github.com/emarifer/go-templ-project-structure/views/component/sidebar_user_profile" +) + +// LAYOUT PLAYGROUND +func CorporateLayout(title string, css templ.Component, js templ.Component, datamenu []services.MasterMenu, dataUser models.User) 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("Company Portal | ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + 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: `views\layout\layout_corporate.templ`, Line: 30, Col: 34} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) + 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 = css.Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
\"Logo\"
\"Logo\"
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = navbar.NavbarMenu(datamenu).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 = navbar.Navbar(dataUser).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_Var1.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 = sidebaruserprofile.Navbaruserprofile(dataUser).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 = js.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 + }) +} diff --git a/views/layout/playground_layout.templ b/views/layout/playground_layout.templ index 014e012..80354d2 100644 --- a/views/layout/playground_layout.templ +++ b/views/layout/playground_layout.templ @@ -97,71 +97,7 @@ templ PlaygroundLayout(title string, css templ.Component, js templ.Component) { { children... } - - - + diff --git a/views/layout/playground_layout_templ.go b/views/layout/playground_layout_templ.go index 8c1df4b..6af2408 100644 --- a/views/layout/playground_layout_templ.go +++ b/views/layout/playground_layout_templ.go @@ -53,7 +53,7 @@ func PlaygroundLayout(title string, css templ.Component, js templ.Component) tem if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } diff --git a/views/mastermenuusergroup/mastermenuusergroup.templ b/views/mastermenuusergroup/mastermenuusergroup.templ index 5523021..1d919f1 100644 --- a/views/mastermenuusergroup/mastermenuusergroup.templ +++ b/views/mastermenuusergroup/mastermenuusergroup.templ @@ -1,732 +1,177 @@ package mastermenuusergroup import ( + "github.com/emarifer/go-templ-project-structure/views/component/breadcrumbadmin" "github.com/emarifer/go-templ-project-structure/views/layout" "github.com/emarifer/go-templ-project-structure/services" - "github.com/emarifer/go-templ-project-structure/views/component/sidebarmaster" - "github.com/emarifer/go-templ-project-structure/views/component/breadcrumbadmin" - "github.com/emarifer/go-templ-project-structure/views/component/customtextfieldautocomplete" + "github.com/emarifer/go-templ-project-structure/models" + "github.com/emarifer/go-templ-project-structure/views/component/table" + "github.com/emarifer/go-templ-project-structure/views/component/modal" + "strconv" + "github.com/emarifer/go-templ-project-structure/views/component/pagination" ) -templ MainNavbar(datamenu []services.MasterMenu) { -
- -
- - - +// "github.com/emarifer/go-templ-project-structure/views/component/sidebar_user_profile" +templ ContentMasterMenuUserGroup(ugData []models.UserGroup) { +
+
+
+ @breadcrumadmin.MainBreadcrumbAdmin() +
+
+ //
+
+ +
+
+
+ +
- +
+ @tablecomponent.Table([]string{"KODE", "USERGROUP", "AKSI"}, []string{"40%", "40%", "20%"}, TableRow(ugData), pagination.Pagination(20, 1)) +
+ @modalcomponent.Modal("dialogNew", "New - User Group", DialogNewBody("", ""), DialogNewAction(), BtnCloseNew()) + @modalcomponent.Modal("dialogEdit", "Edit - User Group", DialogEditBody("", ""), DialogEditAction(), BtnCloseNew()) + @JSku()
} -templ MainMasterMenuUserGroup(datamenu []services.MasterMenu) { - - -
- - - Logo - - - -
- - - - - - - - - -
- -
- -
- -
- -
- -
- - - - - - + Hapus + @modalcomponent.Modal("dialogEdit"+strconv.Itoa(v.UserGroupID), + "Edit - User Group", + DialogEditBody(v.UserGroupKode, v.UserGroupName), + DialogEditAction(), + BtnCloseNew()) + @modalcomponent.ModalConfirmation( + "dialogDelete"+strconv.Itoa(v.UserGroupID), + "Konfirmasi", + "Apakah anda yakin menghapus user group berikut ?", BtnCloseDelete(), + []string{"Kode", "User Group"}, []string{v.UserGroupKode, v.UserGroupName}, DialogDeleteAction())
- - - @MainNavbar(datamenu) - -
- - -
- -
- -
- -
- - -
- -
-
- Hi, - Sean - - S - -
-
- -
- -
- -
- - -
-
- @breadcrumadmin.MainBreadcrumbAdmin() - // inputan autocomplete - @customtextfieldautocomplete.ShowCustomAutoComplete("", customtextfieldautocomplete.MainCustomAutoComplete(""), customtextfieldautocomplete.CssCustomAutoComplete(), customtextfieldautocomplete.JsCustomAutoComplete()) -
-
- - - - -
- -
- + + + } +} + +templ DialogDeleteAction() { +
+ +
- - -
- -
-

- User Profile - 12 messages -

- - - +} + +templ BtnCloseDelete() { + +} + +templ JSku() { + +} + +templ Pagination() { +
+
+ + + ... + 23 + 24 + 25 + 26 + 27 + 28 + ... + +
- - -
- -
-
-
- -
- -
- - -
- - - - - -
- - -
- -
- Recent Notifications -
- - -
- - - - - - - - - - - - - - +28% -
- - -
- - - - - - - - - - - - -
- - Would - be to people - - Due in 2 Days -
- +50% -
- - -
- - - - - - - - - - - - - - -27% -
- - -
- - - - - - - - - - - - - - -
- - The - best product - - Due in 2 Days -
- +8% -
- -
- -
-
- - -
- - - - - - - - - - -
- } templ CssMasterMenuUserGroup() { @@ -766,8 +211,8 @@ templ CssMasterMenuUserGroup() { templ JsMasterMenuUserGroup() { } -templ ShowMasterMenuUserGroup(title string, cmp templ.Component, css templ.Component, js templ.Component) { - @layout.PlaygroundLayout(title, css, js) { +templ ShowMasterMenuUserGroup(title string, cmp templ.Component, css templ.Component, js templ.Component, dataMenu []services.MasterMenu, dataUser models.User) { + @layout.CorporateLayout(title, css, js, dataMenu, dataUser) { @cmp } } diff --git a/views/mastermenuusergroup/mastermenuusergroup_templ.go b/views/mastermenuusergroup/mastermenuusergroup_templ.go index 8edb06b..4aaa747 100644 --- a/views/mastermenuusergroup/mastermenuusergroup_templ.go +++ b/views/mastermenuusergroup/mastermenuusergroup_templ.go @@ -11,14 +11,18 @@ import "io" import "bytes" import ( + "github.com/emarifer/go-templ-project-structure/models" "github.com/emarifer/go-templ-project-structure/services" "github.com/emarifer/go-templ-project-structure/views/component/breadcrumbadmin" - "github.com/emarifer/go-templ-project-structure/views/component/customtextfieldautocomplete" - "github.com/emarifer/go-templ-project-structure/views/component/sidebarmaster" + "github.com/emarifer/go-templ-project-structure/views/component/modal" + "github.com/emarifer/go-templ-project-structure/views/component/pagination" + "github.com/emarifer/go-templ-project-structure/views/component/table" "github.com/emarifer/go-templ-project-structure/views/layout" + "strconv" ) -func MainNavbar(datamenu []services.MasterMenu) templ.Component { +// "github.com/emarifer/go-templ-project-structure/views/component/sidebar_user_profile" +func ContentMasterMenuUserGroup(ugData []models.UserGroup) 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,41 +35,39 @@ func MainNavbar(datamenu []services.MasterMenu) 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 } - for index, d := range datamenu { - if index == 0 { - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = sidebarmaster.MenuDashboard(d.ParentMenuName, d.ParentUrl).Render(ctx, templ_7745c5c3_Buffer) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
  • Menu

  • ") - 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 index+1 < len(datamenu) { - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = sidebarmaster.ListMenuNavbar(datamenu[index+1].ParentMenuName, datamenu[index+1].Children).Render(ctx, templ_7745c5c3_Buffer) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - } + templ_7745c5c3_Err = breadcrumadmin.MainBreadcrumbAdmin().Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err } - _, 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 = tablecomponent.Table([]string{"KODE", "USERGROUP", "AKSI"}, []string{"40%", "40%", "20%"}, TableRow(ugData), pagination.Pagination(20, 1)).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 = modalcomponent.Modal("dialogNew", "New - User Group", DialogNewBody("", ""), DialogNewAction(), BtnCloseNew()).Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = modalcomponent.Modal("dialogEdit", "Edit - User Group", DialogEditBody("", ""), DialogEditAction(), BtnCloseNew()).Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = JSku().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 } @@ -76,7 +78,7 @@ func MainNavbar(datamenu []services.MasterMenu) templ.Component { }) } -func MainMasterMenuUserGroup(datamenu []services.MasterMenu) templ.Component { +func TableRow(data []models.UserGroup) 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 { @@ -89,27 +91,177 @@ func MainMasterMenuUserGroup(datamenu []services.MasterMenu) templ.Component { templ_7745c5c3_Var2 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
\"Logo\"
\"Logo\"
") + for _, v := range data { + _, 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(v.UserGroupKode) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\mastermenuusergroup\mastermenuusergroup.templ`, Line: 64, Col: 24} + } + _, 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 + } + var templ_7745c5c3_Var4 string + templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(v.UserGroupName) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\mastermenuusergroup\mastermenuusergroup.templ`, Line: 65, Col: 24} + } + _, 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("
Edit\r Hapus") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = modalcomponent.Modal("dialogEdit"+strconv.Itoa(v.UserGroupID), + "Edit - User Group", + DialogEditBody(v.UserGroupKode, v.UserGroupName), + DialogEditAction(), + BtnCloseNew()).Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = modalcomponent.ModalConfirmation( + "dialogDelete"+strconv.Itoa(v.UserGroupID), + "Konfirmasi", + "Apakah anda yakin menghapus user group berikut ?", BtnCloseDelete(), + []string{"Kode", "User Group"}, []string{v.UserGroupKode, v.UserGroupName}, DialogDeleteAction()).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 DialogDeleteAction() 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_Var7 := templ.GetChildren(ctx) + if templ_7745c5c3_Var7 == nil { + templ_7745c5c3_Var7 = 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 = MainNavbar(datamenu).Render(ctx, templ_7745c5c3_Buffer) + if !templ_7745c5c3_IsBuffer { + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_W) + } + return templ_7745c5c3_Err + }) +} + +func BtnCloseDelete() 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_7745c5c3_Buffer.WriteString("") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
Hi, Sean S
") + if !templ_7745c5c3_IsBuffer { + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_W) + } + return templ_7745c5c3_Err + }) +} + +func JSku() 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_Var9 := templ.GetChildren(ctx) + if templ_7745c5c3_Var9 == nil { + templ_7745c5c3_Var9 = 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 = breadcrumadmin.MainBreadcrumbAdmin().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) } - templ_7745c5c3_Err = customtextfieldautocomplete.ShowCustomAutoComplete("", customtextfieldautocomplete.MainCustomAutoComplete(""), customtextfieldautocomplete.CssCustomAutoComplete(), customtextfieldautocomplete.JsCustomAutoComplete()).Render(ctx, templ_7745c5c3_Buffer) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err + return templ_7745c5c3_Err + }) +} + +func Pagination() 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) } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var10 := templ.GetChildren(ctx) + if templ_7745c5c3_Var10 == nil { + templ_7745c5c3_Var10 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -128,9 +280,9 @@ func CssMasterMenuUserGroup() templ.Component { defer templ.ReleaseBuffer(templ_7745c5c3_Buffer) } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var3 := templ.GetChildren(ctx) - if templ_7745c5c3_Var3 == nil { - templ_7745c5c3_Var3 = templ.NopComponent + 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("") @@ -152,9 +304,9 @@ func JsMasterMenuUserGroup() templ.Component { 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 + templ_7745c5c3_Var12 := templ.GetChildren(ctx) + if templ_7745c5c3_Var12 == nil { + templ_7745c5c3_Var12 = templ.NopComponent } ctx = templ.ClearChildren(ctx) if !templ_7745c5c3_IsBuffer { @@ -164,7 +316,7 @@ func JsMasterMenuUserGroup() templ.Component { }) } -func ShowMasterMenuUserGroup(title string, cmp templ.Component, css templ.Component, js templ.Component) templ.Component { +func ShowMasterMenuUserGroup(title string, cmp templ.Component, css templ.Component, js templ.Component, dataMenu []services.MasterMenu, dataUser models.User) 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 { @@ -172,12 +324,12 @@ func ShowMasterMenuUserGroup(title string, cmp templ.Component, css templ.Compon 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 + templ_7745c5c3_Var13 := templ.GetChildren(ctx) + if templ_7745c5c3_Var13 == nil { + templ_7745c5c3_Var13 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Var6 := templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) { + templ_7745c5c3_Var14 := 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() @@ -192,7 +344,7 @@ func ShowMasterMenuUserGroup(title string, cmp templ.Component, css templ.Compon } return templ_7745c5c3_Err }) - templ_7745c5c3_Err = layout.PlaygroundLayout(title, css, js).Render(templ.WithChildren(ctx, templ_7745c5c3_Var6), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = layout.CorporateLayout(title, css, js, dataMenu, dataUser).Render(templ.WithChildren(ctx, templ_7745c5c3_Var14), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } diff --git a/views/mastermenuusergroup/modaladdusergroup.templ b/views/mastermenuusergroup/modaladdusergroup.templ new file mode 100644 index 0000000..c4303fd --- /dev/null +++ b/views/mastermenuusergroup/modaladdusergroup.templ @@ -0,0 +1,56 @@ +package mastermenuusergroup + +import ( + "github.com/emarifer/go-templ-project-structure/models" + "github.com/emarifer/go-templ-project-structure/views/component/customtextfield" +) + +templ DialogNewBody(code string, name string) { +
+ @customtextfield.CustomTextFieldv2( + models.CustomTextFieldv2Prm{ + Label: "Kode user group", + Name: "usergroupcode", + Placeholder: "Kode user Group", + Type: "text", + Value: code, + }) + @customtextfield.CustomTextFieldv2( + models.CustomTextFieldv2Prm{ + Label: "Nama User Group", + Name: "usergroupname", + Placeholder: "Nama User Group", + Type: "text", + Value: name, + }) +
+} + +templ DialogNewAction() { +
+ + +
+} + +templ BtnCloseNew() { + +} diff --git a/views/mastermenuusergroup/modaladdusergroup_templ.go b/views/mastermenuusergroup/modaladdusergroup_templ.go new file mode 100644 index 0000000..cf7559d --- /dev/null +++ b/views/mastermenuusergroup/modaladdusergroup_templ.go @@ -0,0 +1,114 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.663 +package mastermenuusergroup + +//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 ( + "github.com/emarifer/go-templ-project-structure/models" + "github.com/emarifer/go-templ-project-structure/views/component/customtextfield" +) + +func DialogNewBody(code string, name 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 + } + templ_7745c5c3_Err = customtextfield.CustomTextFieldv2( + models.CustomTextFieldv2Prm{ + Label: "Kode user group", + Name: "usergroupcode", + Placeholder: "Kode user Group", + Type: "text", + Value: code, + }).Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = customtextfield.CustomTextFieldv2( + models.CustomTextFieldv2Prm{ + Label: "Nama User Group", + Name: "usergroupname", + Placeholder: "Nama User Group", + Type: "text", + Value: name, + }).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 DialogNewAction() templ.Component { + return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) { + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer) + if !templ_7745c5c3_IsBuffer { + templ_7745c5c3_Buffer = templ.GetBuffer() + defer templ.ReleaseBuffer(templ_7745c5c3_Buffer) + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var2 := templ.GetChildren(ctx) + if templ_7745c5c3_Var2 == nil { + templ_7745c5c3_Var2 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + 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 BtnCloseNew() 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_Var3 := templ.GetChildren(ctx) + if templ_7745c5c3_Var3 == nil { + templ_7745c5c3_Var3 = 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/views/mastermenuusergroup/modaleditusergroup.templ b/views/mastermenuusergroup/modaleditusergroup.templ new file mode 100644 index 0000000..4be0c5b --- /dev/null +++ b/views/mastermenuusergroup/modaleditusergroup.templ @@ -0,0 +1,79 @@ +package mastermenuusergroup + +import ( + "github.com/emarifer/go-templ-project-structure/models" + "github.com/emarifer/go-templ-project-structure/views/component/customtextfield" +) + +templ DialogEditForm(code string, name string) { + @customtextfield.CustomTextFieldv2( + models.CustomTextFieldv2Prm{ + Label: "Kode user group", + Name: "usergroupcode", + Placeholder: "Kode user Group", + Type: "text", + Value: code, + }) + @customtextfield.CustomTextFieldv2( + models.CustomTextFieldv2Prm{ + Label: "Nama User Group", + Name: "usergroupname", + Placeholder: "Nama User Group", + Type: "text", + Value: name, + }) +} + +templ DialogEditBody(code string, name string) { +
+ @DialogEditForm(code, name) +
+
+ //
+ //
+ //
+
+} + +templ LoadingSpinner() { +
+
+
+
+
+} + +templ DialogEditAction() { +
+ + +
+} + +templ BtnCloseEdit() { + +} diff --git a/views/mastermenuusergroup/modaleditusergroup_templ.go b/views/mastermenuusergroup/modaleditusergroup_templ.go new file mode 100644 index 0000000..28abe48 --- /dev/null +++ b/views/mastermenuusergroup/modaleditusergroup_templ.go @@ -0,0 +1,162 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.663 +package mastermenuusergroup + +//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 ( + "github.com/emarifer/go-templ-project-structure/models" + "github.com/emarifer/go-templ-project-structure/views/component/customtextfield" +) + +func DialogEditForm(code string, name 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 = customtextfield.CustomTextFieldv2( + models.CustomTextFieldv2Prm{ + Label: "Kode user group", + Name: "usergroupcode", + Placeholder: "Kode user Group", + Type: "text", + Value: code, + }).Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = customtextfield.CustomTextFieldv2( + models.CustomTextFieldv2Prm{ + Label: "Nama User Group", + Name: "usergroupname", + Placeholder: "Nama User Group", + Type: "text", + Value: name, + }).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 + }) +} + +func DialogEditBody(code string, name 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_Var2 := templ.GetChildren(ctx) + if templ_7745c5c3_Var2 == nil { + templ_7745c5c3_Var2 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = DialogEditForm(code, name).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 LoadingSpinner() 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_Var3 := templ.GetChildren(ctx) + if templ_7745c5c3_Var3 == nil { + templ_7745c5c3_Var3 = 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 + }) +} + +func DialogEditAction() 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 + }) +} + +func BtnCloseEdit() 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 + } + if !templ_7745c5c3_IsBuffer { + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_W) + } + return templ_7745c5c3_Err + }) +} diff --git a/views/xsample/coba.templ b/views/xsample/coba.templ new file mode 100644 index 0000000..1fe07c8 --- /dev/null +++ b/views/xsample/coba.templ @@ -0,0 +1,67 @@ +package xsample + +import ( + "github.com/emarifer/go-templ-project-structure/views/layout" + "github.com/emarifer/go-templ-project-structure/services" + "github.com/emarifer/go-templ-project-structure/models" + "github.com/emarifer/go-templ-project-structure/views/component/table" +) + +templ Coba(title string) { +
{ title }
+ @tablecomponent.Table([]string{"kode", "user group", "aksi"}, []string{"40%", "40%", "20%"}, tr(), pagination()) +} + +templ CssCoba() { +} + +templ JsCoba() { +} + +templ tr() { + + 001 + Admin + +
+ + +
+ + + + 002 + Tes + +
+ + +
+ + +} + +templ pagination() { +
+
+ + + ... + 23 + 24 + 25 + 26 + 27 + 28 + ... + + +
+
+} + +templ ShowCoba(title string, cmp templ.Component, css templ.Component, js templ.Component, dataMenu []services.MasterMenu, dataUser models.User) { + @layout.CorporateLayout(title, css, js, dataMenu, dataUser) { + @cmp + } +} diff --git a/views/xsample/coba_templ.go b/views/xsample/coba_templ.go new file mode 100644 index 0000000..d6be95f --- /dev/null +++ b/views/xsample/coba_templ.go @@ -0,0 +1,186 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.663 +package xsample + +//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 ( + "github.com/emarifer/go-templ-project-structure/models" + "github.com/emarifer/go-templ-project-structure/services" + "github.com/emarifer/go-templ-project-structure/views/component/table" + "github.com/emarifer/go-templ-project-structure/views/layout" +) + +func Coba(title 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 + } + 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: `views\xsample\coba.templ`, Line: 11, Col: 13} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) + 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 = tablecomponent.Table([]string{"kode", "user group", "aksi"}, []string{"40%", "40%", "20%"}, tr(), pagination()).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 + }) +} + +func CssCoba() 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_Var3 := templ.GetChildren(ctx) + if templ_7745c5c3_Var3 == nil { + templ_7745c5c3_Var3 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + if !templ_7745c5c3_IsBuffer { + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_W) + } + return templ_7745c5c3_Err + }) +} + +func JsCoba() 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) + if !templ_7745c5c3_IsBuffer { + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_W) + } + return templ_7745c5c3_Err + }) +} + +func tr() 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("001Admin
002Tes
") + 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 pagination() 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_Var6 := templ.GetChildren(ctx) + if templ_7745c5c3_Var6 == nil { + templ_7745c5c3_Var6 = 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 + }) +} + +func ShowCoba(title string, cmp templ.Component, css templ.Component, js templ.Component, dataMenu []services.MasterMenu, dataUser models.User) 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_Var7 := templ.GetChildren(ctx) + if templ_7745c5c3_Var7 == nil { + templ_7745c5c3_Var7 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + templ_7745c5c3_Var8 := 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) + } + templ_7745c5c3_Err = cmp.Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + if !templ_7745c5c3_IsBuffer { + _, templ_7745c5c3_Err = io.Copy(templ_7745c5c3_W, templ_7745c5c3_Buffer) + } + return templ_7745c5c3_Err + }) + templ_7745c5c3_Err = layout.CorporateLayout(title, css, js, dataMenu, dataUser).Render(templ.WithChildren(ctx, templ_7745c5c3_Var8), 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/views/xsample/trycounter.templ b/views/xsample/trycounter.templ new file mode 100644 index 0000000..9f41ba4 --- /dev/null +++ b/views/xsample/trycounter.templ @@ -0,0 +1,51 @@ +package xsample + +import "strconv" +import ( + "github.com/emarifer/go-templ-project-structure/views/layout" +) + +templ Counts(counter int) { +
counter: { strconv.Itoa(counter) }
+} + +templ Form(counter int) { + // /show?team=x-men&member=wolverine + // hx-get="/xsample/counterchange?type=min&counter" + // /xsample/counterchange?type=min&counter= +
+ +1 +
+
+ -1 +
+} + +templ CssCtr() { +} + +templ JsCtr() { +} + +templ Page(counter int) { + @layout.PlaygroundLayout("Coba counter", CssCtr(), JsCtr()) { +
+ @Counts(counter) + @Form(counter) +
+ } +} diff --git a/views/xsample/trycounter_templ.go b/views/xsample/trycounter_templ.go new file mode 100644 index 0000000..0650659 --- /dev/null +++ b/views/xsample/trycounter_templ.go @@ -0,0 +1,194 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.663 +package xsample + +//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 ( + "github.com/emarifer/go-templ-project-structure/views/layout" +) + +func Counts(counter int) 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("
counter: ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var2 string + templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(counter)) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\xsample\trycounter.templ`, Line: 9, Col: 48} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) + 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 Form(counter int) 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_Var3 := templ.GetChildren(ctx) + if templ_7745c5c3_Var3 == nil { + templ_7745c5c3_Var3 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
+1
-1
") + 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 CssCtr() 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_Var6 := templ.GetChildren(ctx) + if templ_7745c5c3_Var6 == nil { + templ_7745c5c3_Var6 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + if !templ_7745c5c3_IsBuffer { + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_W) + } + return templ_7745c5c3_Err + }) +} + +func JsCtr() 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_Var7 := templ.GetChildren(ctx) + if templ_7745c5c3_Var7 == nil { + templ_7745c5c3_Var7 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + if !templ_7745c5c3_IsBuffer { + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_W) + } + return templ_7745c5c3_Err + }) +} + +func Page(counter int) 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_Var9 := 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) + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = Counts(counter).Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = Form(counter).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 = io.Copy(templ_7745c5c3_W, templ_7745c5c3_Buffer) + } + return templ_7745c5c3_Err + }) + templ_7745c5c3_Err = layout.PlaygroundLayout("Coba counter", CssCtr(), JsCtr()).Render(templ.WithChildren(ctx, templ_7745c5c3_Var9), 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 + }) +}