Compare commits
11 Commits
ab45e62fb1
...
masteruser
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4ce0ff2be8 | ||
|
|
58ad1d9ef5 | ||
|
|
e7b92e3863 | ||
|
|
e941b025dc | ||
|
|
4db28f1a24 | ||
|
|
c4f5fa4545 | ||
|
|
5565c0d48d | ||
|
|
02983cbd1b | ||
|
|
9ab0c7b6f4 | ||
| 7e2c6b5b2e | |||
| d69e830667 |
@@ -5168,6 +5168,38 @@ a.text-hover-tosca:hover .svg-icon svg:hover g [fill],
|
||||
transition: fill 0.3s ease;
|
||||
}
|
||||
|
||||
/* ###SEARCH BAR */
|
||||
.search {
|
||||
position: relative;
|
||||
padding: 0.75rem 1.25rem;
|
||||
margin-bottom: 1rem;
|
||||
border: 1px solid transparent;
|
||||
border-radius: 0.42rem;
|
||||
}
|
||||
|
||||
.search-white {
|
||||
color: #858585;
|
||||
background-color: white;
|
||||
border-color: white;
|
||||
}
|
||||
.search-white hr {
|
||||
border-top-color: #f2f2f2;
|
||||
}
|
||||
.search-white .search-link {
|
||||
color: #6c6c6c;
|
||||
}
|
||||
|
||||
/* ### TOAST */
|
||||
|
||||
.toast-top-right {
|
||||
position: fixed;
|
||||
top: 0vh;
|
||||
right: 0vh;
|
||||
z-index: 9998;
|
||||
width: 350px;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
/* ### BUTTON HOVER TEXT */
|
||||
/* ### */
|
||||
/* ## PRIMARY */
|
||||
|
||||
2196
assets/mcu/mike/t0007.html
Normal file
2196
assets/mcu/mike/t0007.html
Normal file
File diff suppressed because it is too large
Load Diff
881
assets/mcu/mike/t0008.html
Normal file
881
assets/mcu/mike/t0008.html
Normal file
@@ -0,0 +1,881 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
Template Name: Metronic - Bootstrap 4 HTML, React, Angular 9 & VueJS Admin Dashboard Theme
|
||||
Author: KeenThemes
|
||||
Website: http://www.keenthemes.com/
|
||||
Contact: support@keenthemes.com
|
||||
Follow: www.twitter.com/keenthemes
|
||||
Dribbble: www.dribbble.com/keenthemes
|
||||
Like: www.facebook.com/keenthemes
|
||||
Purchase: https://1.envato.market/EA4JP
|
||||
Renew Support: https://1.envato.market/EA4JP
|
||||
License: You must have a valid license purchased only from themeforest(the above link) in order to legally use the theme for your project.
|
||||
-->
|
||||
<html lang="en">
|
||||
<!--begin::Head-->
|
||||
<head>
|
||||
<base href="../../" />
|
||||
<meta charset="utf-8" />
|
||||
<title>Metronic | Dashboard</title>
|
||||
<meta name="description" content="Updates and statistics" />
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width, initial-scale=1, shrink-to-fit=no"
|
||||
/>
|
||||
|
||||
<!--begin::Fonts-->
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700"
|
||||
/>
|
||||
<!--end::Fonts-->
|
||||
|
||||
<!--begin::Page Vendors Styles(used by this page)-->
|
||||
<link
|
||||
href="../../assets/plugins/custom/fullcalendar/fullcalendar.bundle.css"
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
/>
|
||||
<!--end::Page Vendors Styles-->
|
||||
|
||||
<!--begin::Global Theme Styles(used by all pages)-->
|
||||
<link
|
||||
href="../../assets/plugins/global/plugins.bundle.css"
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
/>
|
||||
<link
|
||||
href="../../assets/plugins/custom/prismjs/prismjs.bundle.css"
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
/>
|
||||
<link
|
||||
href="../../assets/css/style.bundle.css"
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
/>
|
||||
<!--end::Global Theme Styles-->
|
||||
|
||||
<!--begin::Layout Themes(used by all pages)-->
|
||||
|
||||
<link
|
||||
href="../../assets/css/themes/layout/header/base/light.css"
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
/>
|
||||
<link
|
||||
href="../../assets/css/themes/layout/header/menu/light.css"
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
/>
|
||||
<link
|
||||
href="../../assets/css/themes/layout/brand/dark.css"
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
/>
|
||||
<link
|
||||
href="../../assets/css/themes/layout/aside/dark.css"
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
/>
|
||||
<!--end::Layout Themes-->
|
||||
|
||||
<link rel="shortcut icon" href="../../assets/media/logos/favicon.ico" />
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="../asset-corporate-portal/css/sas.bundle.css"
|
||||
/>
|
||||
</head>
|
||||
<!--end::Head-->
|
||||
|
||||
<!--begin::Body-->
|
||||
<body
|
||||
id="kt_body"
|
||||
class="header-fixed header-mobile-fixed subheader-enabled subheader-fixed subheader-mobile-fixed aside-enabled aside-fixed aside-minimize-hoverable page-loading"
|
||||
>
|
||||
<!--begin::Menu Navigator-->
|
||||
<div
|
||||
class="aside aside-left aside-fixed d-flex flex-column flex-row-auto"
|
||||
id="kt_aside"
|
||||
>
|
||||
<!--begin::Brand-->
|
||||
<div class="brand flex-column-auto" id="kt_brand">
|
||||
<!--begin::Logo-->
|
||||
<a href="t0001.html" class="brand-logo">
|
||||
<img
|
||||
alt="Logo"
|
||||
class="img-fluid"
|
||||
src="../../asset-corporate-portal/media/logo/logo.png"
|
||||
/>
|
||||
</a>
|
||||
<!--end::Logo-->
|
||||
|
||||
<!--begin::Toggle-->
|
||||
<button class="brand-toggle btn btn-sm px-0" id="kt_aside_toggle">
|
||||
<span class="svg-icon svg-icon svg-icon-xl"
|
||||
><!--begin::Svg Icon | path:../assets/media/svg/icons/Navigation/Angle-double-left.svg--><svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
width="24px"
|
||||
height="24px"
|
||||
viewBox="0 0 24 24"
|
||||
version="1.1"
|
||||
>
|
||||
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<polygon points="0 0 24 0 24 24 0 24" />
|
||||
<path
|
||||
d="M5.29288961,6.70710318 C4.90236532,6.31657888 4.90236532,5.68341391 5.29288961,5.29288961 C5.68341391,4.90236532 6.31657888,4.90236532 6.70710318,5.29288961 L12.7071032,11.2928896 C13.0856821,11.6714686 13.0989277,12.281055 12.7371505,12.675721 L7.23715054,18.675721 C6.86395813,19.08284 6.23139076,19.1103429 5.82427177,18.7371505 C5.41715278,18.3639581 5.38964985,17.7313908 5.76284226,17.3242718 L10.6158586,12.0300721 L5.29288961,6.70710318 Z"
|
||||
fill="#000000"
|
||||
fill-rule="nonzero"
|
||||
transform="translate(8.999997, 11.999999) scale(-1, 1) translate(-8.999997, -11.999999) "
|
||||
/>
|
||||
<path
|
||||
d="M10.7071009,15.7071068 C10.3165766,16.0976311 9.68341162,16.0976311 9.29288733,15.7071068 C8.90236304,15.3165825 8.90236304,14.6834175 9.29288733,14.2928932 L15.2928873,8.29289322 C15.6714663,7.91431428 16.2810527,7.90106866 16.6757187,8.26284586 L22.6757187,13.7628459 C23.0828377,14.1360383 23.1103407,14.7686056 22.7371482,15.1757246 C22.3639558,15.5828436 21.7313885,15.6103465 21.3242695,15.2371541 L16.0300699,10.3841378 L10.7071009,15.7071068 Z"
|
||||
fill="#000000"
|
||||
fill-rule="nonzero"
|
||||
opacity="0.3"
|
||||
transform="translate(15.999997, 11.999999) scale(-1, 1) rotate(-270.000000) translate(-15.999997, -11.999999) "
|
||||
/>
|
||||
</g></svg
|
||||
><!--end::Svg Icon--></span
|
||||
>
|
||||
</button>
|
||||
<!--end::Toolbar-->
|
||||
</div>
|
||||
<!--end::Brand-->
|
||||
|
||||
<!--begin::Aside Menu-->
|
||||
<div
|
||||
class="aside-menu-wrapper flex-column-fluid"
|
||||
id="kt_aside_menu_wrapper"
|
||||
>
|
||||
<!--begin::Menu Container-->
|
||||
<div
|
||||
id="kt_aside_menu"
|
||||
class="aside-menu my-4"
|
||||
data-menu-vertical="1"
|
||||
data-menu-scroll="1"
|
||||
data-menu-dropdown-timeout="500"
|
||||
>
|
||||
<!--begin::Menu Nav-->
|
||||
<ul class="menu-nav">
|
||||
<li class="menu-item menu-item-active" aria-haspopup="true">
|
||||
<a href="index.html" class="menu-link"
|
||||
><span class="svg-icon menu-icon"
|
||||
><!--begin::Svg Icon | path:../assets/media/svg/icons/Design/Layers.svg--><svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
width="24px"
|
||||
height="24px"
|
||||
viewBox="0 0 24 24"
|
||||
version="1.1"
|
||||
>
|
||||
<g
|
||||
stroke="none"
|
||||
stroke-width="1"
|
||||
fill="none"
|
||||
fill-rule="evenodd"
|
||||
>
|
||||
<polygon points="0 0 24 0 24 24 0 24" />
|
||||
<path
|
||||
d="M12.9336061,16.072447 L19.36,10.9564761 L19.5181585,10.8312381 C20.1676248,10.3169571 20.2772143,9.3735535 19.7629333,8.72408713 C19.6917232,8.63415859 19.6104327,8.55269514 19.5206557,8.48129411 L12.9336854,3.24257445 C12.3871201,2.80788259 11.6128799,2.80788259 11.0663146,3.24257445 L4.47482784,8.48488609 C3.82645598,9.00054628 3.71887192,9.94418071 4.23453211,10.5925526 C4.30500305,10.6811601 4.38527899,10.7615046 4.47382636,10.8320511 L4.63,10.9564761 L11.0659024,16.0730648 C11.6126744,16.5077525 12.3871218,16.5074963 12.9336061,16.072447 Z"
|
||||
fill="#000000"
|
||||
fill-rule="nonzero"
|
||||
/>
|
||||
<path
|
||||
d="M11.0563554,18.6706981 L5.33593024,14.122919 C4.94553994,13.8125559 4.37746707,13.8774308 4.06710397,14.2678211 C4.06471678,14.2708238 4.06234874,14.2738418 4.06,14.2768747 L4.06,14.2768747 C3.75257288,14.6738539 3.82516916,15.244888 4.22214834,15.5523151 C4.22358765,15.5534297 4.2250303,15.55454 4.22647627,15.555646 L11.0872776,20.8031356 C11.6250734,21.2144692 12.371757,21.2145375 12.909628,20.8033023 L19.7677785,15.559828 C20.1693192,15.2528257 20.2459576,14.6784381 19.9389553,14.2768974 C19.9376429,14.2751809 19.9363245,14.2734691 19.935,14.2717619 L19.935,14.2717619 C19.6266937,13.8743807 19.0546209,13.8021712 18.6572397,14.1104775 C18.654352,14.112718 18.6514778,14.1149757 18.6486172,14.1172508 L12.9235044,18.6705218 C12.377022,19.1051477 11.6029199,19.1052208 11.0563554,18.6706981 Z"
|
||||
fill="#000000"
|
||||
opacity="0.3"
|
||||
/>
|
||||
</g></svg
|
||||
><!--end::Svg Icon--></span
|
||||
><span class="menu-text">Dashboard</span></a
|
||||
>
|
||||
</li>
|
||||
<li class="menu-section">
|
||||
<h4 class="menu-text">Menu</h4>
|
||||
<i class="menu-icon ki ki-bold-more-hor icon-md"></i>
|
||||
</li>
|
||||
<li
|
||||
class="menu-item menu-item-submenu"
|
||||
aria-haspopup="true"
|
||||
data-menu-toggle="hover"
|
||||
>
|
||||
<a href="javascript:;" class="menu-link menu-toggle"
|
||||
><span class="svg-icon menu-icon"
|
||||
><!--begin::Svg Icon | path:../assets/media/svg/icons/Layout/Layout-4-blocks.svg--><svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
width="24px"
|
||||
height="24px"
|
||||
viewBox="0 0 24 24"
|
||||
version="1.1"
|
||||
>
|
||||
<g
|
||||
stroke="none"
|
||||
stroke-width="1"
|
||||
fill="none"
|
||||
fill-rule="evenodd"
|
||||
>
|
||||
<rect x="0" y="0" width="24" height="24" />
|
||||
<rect
|
||||
fill="#000000"
|
||||
x="4"
|
||||
y="4"
|
||||
width="7"
|
||||
height="7"
|
||||
rx="1.5"
|
||||
/>
|
||||
<path
|
||||
d="M5.5,13 L9.5,13 C10.3284271,13 11,13.6715729 11,14.5 L11,18.5 C11,19.3284271 10.3284271,20 9.5,20 L5.5,20 C4.67157288,20 4,19.3284271 4,18.5 L4,14.5 C4,13.6715729 4.67157288,13 5.5,13 Z M14.5,4 L18.5,4 C19.3284271,4 20,4.67157288 20,5.5 L20,9.5 C20,10.3284271 19.3284271,11 18.5,11 L14.5,11 C13.6715729,11 13,10.3284271 13,9.5 L13,5.5 C13,4.67157288 13.6715729,4 14.5,4 Z M14.5,13 L18.5,13 C19.3284271,13 20,13.6715729 20,14.5 L20,18.5 C20,19.3284271 19.3284271,20 18.5,20 L14.5,20 C13.6715729,20 13,19.3284271 13,18.5 L13,14.5 C13,13.6715729 13.6715729,13 14.5,13 Z"
|
||||
fill="#000000"
|
||||
opacity="0.3"
|
||||
/>
|
||||
</g></svg
|
||||
><!--end::Svg Icon--></span
|
||||
><span class="menu-text">Front Office</span
|
||||
><i class="menu-arrow"></i
|
||||
></a>
|
||||
<div class="menu-submenu">
|
||||
<i class="menu-arrow"></i>
|
||||
<ul class="menu-subnav">
|
||||
<li class="menu-item menu-item-parent" aria-haspopup="true">
|
||||
<span class="menu-link"
|
||||
><span class="menu-text">Front Office</span></span
|
||||
>
|
||||
</li>
|
||||
<li
|
||||
class="menu-item menu-item-submenu"
|
||||
aria-haspopup="true"
|
||||
data-menu-toggle="hover"
|
||||
>
|
||||
<a href="javascript:;" class="menu-link menu-toggle"
|
||||
><i class="menu-bullet menu-bullet-line"><span></span></i
|
||||
><span class="menu-text">Registrasi</span
|
||||
><span class="menu-label"></span
|
||||
></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
<li
|
||||
class="menu-item menu-item-submenu"
|
||||
aria-haspopup="true"
|
||||
data-menu-toggle="hover"
|
||||
>
|
||||
<a href="javascript:;" class="menu-link menu-toggle"
|
||||
><span class="svg-icon menu-icon"
|
||||
><!--begin::Svg Icon | path:../assets/media/svg/icons/Code/Compiling.svg--><svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
width="24px"
|
||||
height="24px"
|
||||
viewBox="0 0 24 24"
|
||||
version="1.1"
|
||||
>
|
||||
<g
|
||||
stroke="none"
|
||||
stroke-width="1"
|
||||
fill="none"
|
||||
fill-rule="evenodd"
|
||||
>
|
||||
<rect x="0" y="0" width="24" height="24" />
|
||||
<path
|
||||
d="M2.56066017,10.6819805 L4.68198052,8.56066017 C5.26776695,7.97487373 6.21751442,7.97487373 6.80330086,8.56066017 L8.9246212,10.6819805 C9.51040764,11.267767 9.51040764,12.2175144 8.9246212,12.8033009 L6.80330086,14.9246212 C6.21751442,15.5104076 5.26776695,15.5104076 4.68198052,14.9246212 L2.56066017,12.8033009 C1.97487373,12.2175144 1.97487373,11.267767 2.56066017,10.6819805 Z M14.5606602,10.6819805 L16.6819805,8.56066017 C17.267767,7.97487373 18.2175144,7.97487373 18.8033009,8.56066017 L20.9246212,10.6819805 C21.5104076,11.267767 21.5104076,12.2175144 20.9246212,12.8033009 L18.8033009,14.9246212 C18.2175144,15.5104076 17.267767,15.5104076 16.6819805,14.9246212 L14.5606602,12.8033009 C13.9748737,12.2175144 13.9748737,11.267767 14.5606602,10.6819805 Z"
|
||||
fill="#000000"
|
||||
opacity="0.3"
|
||||
/>
|
||||
<path
|
||||
d="M8.56066017,16.6819805 L10.6819805,14.5606602 C11.267767,13.9748737 12.2175144,13.9748737 12.8033009,14.5606602 L14.9246212,16.6819805 C15.5104076,17.267767 15.5104076,18.2175144 14.9246212,18.8033009 L12.8033009,20.9246212 C12.2175144,21.5104076 11.267767,21.5104076 10.6819805,20.9246212 L8.56066017,18.8033009 C7.97487373,18.2175144 7.97487373,17.267767 8.56066017,16.6819805 Z M8.56066017,4.68198052 L10.6819805,2.56066017 C11.267767,1.97487373 12.2175144,1.97487373 12.8033009,2.56066017 L14.9246212,4.68198052 C15.5104076,5.26776695 15.5104076,6.21751442 14.9246212,6.80330086 L12.8033009,8.9246212 C12.2175144,9.51040764 11.267767,9.51040764 10.6819805,8.9246212 L8.56066017,6.80330086 C7.97487373,6.21751442 7.97487373,5.26776695 8.56066017,4.68198052 Z"
|
||||
fill="#000000"
|
||||
/>
|
||||
</g></svg
|
||||
><!--end::Svg Icon--></span
|
||||
><span class="menu-text">Station</span><i class="menu-arrow"></i
|
||||
></a>
|
||||
<div class="menu-submenu">
|
||||
<i class="menu-arrow"></i>
|
||||
<ul class="menu-subnav">
|
||||
<li class="menu-item menu-item-parent" aria-haspopup="true">
|
||||
<span class="menu-link"
|
||||
><span class="menu-text">Station</span></span
|
||||
>
|
||||
</li>
|
||||
<li class="menu-item" aria-haspopup="true">
|
||||
<a href="layout/subheader/toolbar.html" class="menu-link"
|
||||
><i class="menu-bullet menu-bullet-line"><span></span></i
|
||||
><span class="menu-text">Sample Station</span></a
|
||||
>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li
|
||||
class="menu-item menu-item-submenu"
|
||||
aria-haspopup="true"
|
||||
data-menu-toggle="hover"
|
||||
>
|
||||
<a href="javascript:;" class="menu-link menu-toggle"
|
||||
><span class="svg-icon menu-icon"
|
||||
><!--begin::Svg Icon | path:../assets/media/svg/icons/General/Attachment2.svg--><svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
width="24px"
|
||||
height="24px"
|
||||
viewBox="0 0 24 24"
|
||||
version="1.1"
|
||||
>
|
||||
<g
|
||||
stroke="none"
|
||||
stroke-width="1"
|
||||
fill="none"
|
||||
fill-rule="evenodd"
|
||||
>
|
||||
<rect x="0" y="0" width="24" height="24" />
|
||||
<path
|
||||
d="M11.7573593,15.2426407 L8.75735931,15.2426407 C8.20507456,15.2426407 7.75735931,15.6903559 7.75735931,16.2426407 C7.75735931,16.7949254 8.20507456,17.2426407 8.75735931,17.2426407 L11.7573593,17.2426407 L11.7573593,18.2426407 C11.7573593,19.3472102 10.8619288,20.2426407 9.75735931,20.2426407 L5.75735931,20.2426407 C4.65278981,20.2426407 3.75735931,19.3472102 3.75735931,18.2426407 L3.75735931,14.2426407 C3.75735931,13.1380712 4.65278981,12.2426407 5.75735931,12.2426407 L9.75735931,12.2426407 C10.8619288,12.2426407 11.7573593,13.1380712 11.7573593,14.2426407 L11.7573593,15.2426407 Z"
|
||||
fill="#000000"
|
||||
opacity="0.3"
|
||||
transform="translate(7.757359, 16.242641) rotate(-45.000000) translate(-7.757359, -16.242641) "
|
||||
/>
|
||||
<path
|
||||
d="M12.2426407,8.75735931 L15.2426407,8.75735931 C15.7949254,8.75735931 16.2426407,8.30964406 16.2426407,7.75735931 C16.2426407,7.20507456 15.7949254,6.75735931 15.2426407,6.75735931 L12.2426407,6.75735931 L12.2426407,5.75735931 C12.2426407,4.65278981 13.1380712,3.75735931 14.2426407,3.75735931 L18.2426407,3.75735931 C19.3472102,3.75735931 20.2426407,4.65278981 20.2426407,5.75735931 L20.2426407,9.75735931 C20.2426407,10.8619288 19.3472102,11.7573593 18.2426407,11.7573593 L14.2426407,11.7573593 C13.1380712,11.7573593 12.2426407,10.8619288 12.2426407,9.75735931 L12.2426407,8.75735931 Z"
|
||||
fill="#000000"
|
||||
transform="translate(16.242641, 7.757359) rotate(-45.000000) translate(-16.242641, -7.757359) "
|
||||
/>
|
||||
<path
|
||||
d="M5.89339828,3.42893219 C6.44568303,3.42893219 6.89339828,3.87664744 6.89339828,4.42893219 L6.89339828,6.42893219 C6.89339828,6.98121694 6.44568303,7.42893219 5.89339828,7.42893219 C5.34111353,7.42893219 4.89339828,6.98121694 4.89339828,6.42893219 L4.89339828,4.42893219 C4.89339828,3.87664744 5.34111353,3.42893219 5.89339828,3.42893219 Z M11.4289322,5.13603897 C11.8194565,5.52656326 11.8194565,6.15972824 11.4289322,6.55025253 L10.0147186,7.96446609 C9.62419433,8.35499039 8.99102936,8.35499039 8.60050506,7.96446609 C8.20998077,7.5739418 8.20998077,6.94077682 8.60050506,6.55025253 L10.0147186,5.13603897 C10.4052429,4.74551468 11.0384079,4.74551468 11.4289322,5.13603897 Z M0.600505063,5.13603897 C0.991029355,4.74551468 1.62419433,4.74551468 2.01471863,5.13603897 L3.42893219,6.55025253 C3.81945648,6.94077682 3.81945648,7.5739418 3.42893219,7.96446609 C3.0384079,8.35499039 2.40524292,8.35499039 2.01471863,7.96446609 L0.600505063,6.55025253 C0.209980772,6.15972824 0.209980772,5.52656326 0.600505063,5.13603897 Z"
|
||||
fill="#000000"
|
||||
opacity="0.3"
|
||||
transform="translate(6.014719, 5.843146) rotate(-45.000000) translate(-6.014719, -5.843146) "
|
||||
/>
|
||||
<path
|
||||
d="M17.9142136,15.4497475 C18.4664983,15.4497475 18.9142136,15.8974627 18.9142136,16.4497475 L18.9142136,18.4497475 C18.9142136,19.0020322 18.4664983,19.4497475 17.9142136,19.4497475 C17.3619288,19.4497475 16.9142136,19.0020322 16.9142136,18.4497475 L16.9142136,16.4497475 C16.9142136,15.8974627 17.3619288,15.4497475 17.9142136,15.4497475 Z M23.4497475,17.1568542 C23.8402718,17.5473785 23.8402718,18.1805435 23.4497475,18.5710678 L22.0355339,19.9852814 C21.6450096,20.3758057 21.0118446,20.3758057 20.6213203,19.9852814 C20.2307961,19.5947571 20.2307961,18.9615921 20.6213203,18.5710678 L22.0355339,17.1568542 C22.4260582,16.76633 23.0592232,16.76633 23.4497475,17.1568542 Z M12.6213203,17.1568542 C13.0118446,16.76633 13.6450096,16.76633 14.0355339,17.1568542 L15.4497475,18.5710678 C15.8402718,18.9615921 15.8402718,19.5947571 15.4497475,19.9852814 C15.0592232,20.3758057 14.4260582,20.3758057 14.0355339,19.9852814 L12.6213203,18.5710678 C12.2307961,18.1805435 12.2307961,17.5473785 12.6213203,17.1568542 Z"
|
||||
fill="#000000"
|
||||
opacity="0.3"
|
||||
transform="translate(18.035534, 17.863961) scale(1, -1) rotate(45.000000) translate(-18.035534, -17.863961) "
|
||||
/>
|
||||
</g></svg
|
||||
><!--end::Svg Icon--></span
|
||||
><span class="menu-text">Management MCU</span
|
||||
><i class="menu-arrow"></i
|
||||
></a>
|
||||
<div class="menu-submenu">
|
||||
<i class="menu-arrow"></i>
|
||||
<ul class="menu-subnav">
|
||||
<li class="menu-item" aria-haspopup="true">
|
||||
<a href="features/icons/svg.html" class="menu-link"
|
||||
><i class="menu-bullet menu-bullet-line"><span></span></i
|
||||
><span class="menu-text">Setup MCU</span></a
|
||||
>
|
||||
</li>
|
||||
<li class="menu-item" aria-haspopup="true">
|
||||
<a href="features/icons/custom-icons.html" class="menu-link"
|
||||
><i class="menu-bullet menu-bullet-line"><span></span></i
|
||||
><span class="menu-text">Pre-Registrasi</span></a
|
||||
>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li
|
||||
class="menu-item menu-item-submenu"
|
||||
aria-haspopup="true"
|
||||
data-menu-toggle="hover"
|
||||
>
|
||||
<a href="javascript:;" class="menu-link menu-toggle"
|
||||
><span class="svg-icon menu-icon"
|
||||
><!--begin::Svg Icon | path:../assets/media/svg/icons/Design/Select.svg--><svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
width="24px"
|
||||
height="24px"
|
||||
viewBox="0 0 24 24"
|
||||
version="1.1"
|
||||
>
|
||||
<g
|
||||
stroke="none"
|
||||
stroke-width="1"
|
||||
fill="none"
|
||||
fill-rule="evenodd"
|
||||
>
|
||||
<polygon points="0 0 24 0 24 24 0 24" />
|
||||
<path
|
||||
d="M18.5,8 C17.1192881,8 16,6.88071187 16,5.5 C16,4.11928813 17.1192881,3 18.5,3 C19.8807119,3 21,4.11928813 21,5.5 C21,6.88071187 19.8807119,8 18.5,8 Z M18.5,21 C17.1192881,21 16,19.8807119 16,18.5 C16,17.1192881 17.1192881,16 18.5,16 C19.8807119,16 21,17.1192881 21,18.5 C21,19.8807119 19.8807119,21 18.5,21 Z M5.5,21 C4.11928813,21 3,19.8807119 3,18.5 C3,17.1192881 4.11928813,16 5.5,16 C6.88071187,16 8,17.1192881 8,18.5 C8,19.8807119 6.88071187,21 5.5,21 Z"
|
||||
fill="#000000"
|
||||
opacity="0.3"
|
||||
/>
|
||||
<path
|
||||
d="M5.5,8 C4.11928813,8 3,6.88071187 3,5.5 C3,4.11928813 4.11928813,3 5.5,3 C6.88071187,3 8,4.11928813 8,5.5 C8,6.88071187 6.88071187,8 5.5,8 Z M11,4 L13,4 C13.5522847,4 14,4.44771525 14,5 C14,5.55228475 13.5522847,6 13,6 L11,6 C10.4477153,6 10,5.55228475 10,5 C10,4.44771525 10.4477153,4 11,4 Z M11,18 L13,18 C13.5522847,18 14,18.4477153 14,19 C14,19.5522847 13.5522847,20 13,20 L11,20 C10.4477153,20 10,19.5522847 10,19 C10,18.4477153 10.4477153,18 11,18 Z M5,10 C5.55228475,10 6,10.4477153 6,11 L6,13 C6,13.5522847 5.55228475,14 5,14 C4.44771525,14 4,13.5522847 4,13 L4,11 C4,10.4477153 4.44771525,10 5,10 Z M19,10 C19.5522847,10 20,10.4477153 20,11 L20,13 C20,13.5522847 19.5522847,14 19,14 C18.4477153,14 18,13.5522847 18,13 L18,11 C18,10.4477153 18.4477153,10 19,10 Z"
|
||||
fill="#000000"
|
||||
/>
|
||||
</g></svg
|
||||
><!--end::Svg Icon--></span
|
||||
><span class="menu-text">Master Data</span
|
||||
><i class="menu-arrow"></i
|
||||
></a>
|
||||
<div class="menu-submenu">
|
||||
<i class="menu-arrow"></i>
|
||||
<ul class="menu-subnav">
|
||||
<li class="menu-item menu-item-parent" aria-haspopup="true">
|
||||
<span class="menu-link"
|
||||
><span class="menu-text">Master Data</span></span
|
||||
>
|
||||
</li>
|
||||
<li class="menu-item" aria-haspopup="true">
|
||||
<a href="features/calendar/basic.html" class="menu-link"
|
||||
><i class="menu-bullet menu-bullet-line"><span></span></i
|
||||
><span class="menu-text">User</span></a
|
||||
>
|
||||
</li>
|
||||
<li class="menu-item" aria-haspopup="true">
|
||||
<a href="features/calendar/basic.html" class="menu-link"
|
||||
><i class="menu-bullet menu-bullet-line"><span></span></i
|
||||
><span class="menu-text">User Group</span></a
|
||||
>
|
||||
</li>
|
||||
<li class="menu-item" aria-haspopup="true">
|
||||
<a href="features/calendar/basic.html" class="menu-link"
|
||||
><i class="menu-bullet menu-bullet-line"><span></span></i
|
||||
><span class="menu-text">Corporate</span></a
|
||||
>
|
||||
</li>
|
||||
<li class="menu-item" aria-haspopup="true">
|
||||
<a href="features/calendar/basic.html" class="menu-link"
|
||||
><i class="menu-bullet menu-bullet-line"><span></span></i
|
||||
><span class="menu-text">Test</span></a
|
||||
>
|
||||
</li>
|
||||
<li class="menu-item" aria-haspopup="true">
|
||||
<a href="features/calendar/basic.html" class="menu-link"
|
||||
><i class="menu-bullet menu-bullet-line"><span></span></i
|
||||
><span class="menu-text">Bahan</span></a
|
||||
>
|
||||
</li>
|
||||
<li class="menu-item" aria-haspopup="true">
|
||||
<a href="features/calendar/basic.html" class="menu-link"
|
||||
><i class="menu-bullet menu-bullet-line"><span></span></i
|
||||
><span class="menu-text">Sample Type</span></a
|
||||
>
|
||||
</li>
|
||||
<li class="menu-item" aria-haspopup="true">
|
||||
<a href="features/calendar/basic.html" class="menu-link"
|
||||
><i class="menu-bullet menu-bullet-line"><span></span></i
|
||||
><span class="menu-text">Sample Station</span></a
|
||||
>
|
||||
</li>
|
||||
<li class="menu-item" aria-haspopup="true">
|
||||
<a href="features/calendar/basic.html" class="menu-link"
|
||||
><i class="menu-bullet menu-bullet-line"><span></span></i
|
||||
><span class="menu-text">Result Non Lab</span></a
|
||||
>
|
||||
</li>
|
||||
<li class="menu-item" aria-haspopup="true">
|
||||
<a href="features/calendar/basic.html" class="menu-link"
|
||||
><i class="menu-bullet menu-bullet-line"><span></span></i
|
||||
><span class="menu-text">Template Fisik</span></a
|
||||
>
|
||||
</li>
|
||||
<li class="menu-item" aria-haspopup="true">
|
||||
<a href="features/calendar/basic.html" class="menu-link"
|
||||
><i class="menu-bullet menu-bullet-line"><span></span></i
|
||||
><span class="menu-text">Pasien</span></a
|
||||
>
|
||||
</li>
|
||||
<li class="menu-item" aria-haspopup="true">
|
||||
<a href="features/calendar/basic.html" class="menu-link"
|
||||
><i class="menu-bullet menu-bullet-line"><span></span></i
|
||||
><span class="menu-text">Dokter</span></a
|
||||
>
|
||||
</li>
|
||||
<li class="menu-item" aria-haspopup="true">
|
||||
<a href="features/calendar/basic.html" class="menu-link"
|
||||
><i class="menu-bullet menu-bullet-line"><span></span></i
|
||||
><span class="menu-text">Paket</span></a
|
||||
>
|
||||
</li>
|
||||
<li class="menu-item" aria-haspopup="true">
|
||||
<a href="features/calendar/basic.html" class="menu-link"
|
||||
><i class="menu-bullet menu-bullet-line"><span></span></i
|
||||
><span class="menu-text">Harga Single</span></a
|
||||
>
|
||||
</li>
|
||||
<li class="menu-item" aria-haspopup="true">
|
||||
<a href="features/calendar/basic.html" class="menu-link"
|
||||
><i class="menu-bullet menu-bullet-line"><span></span></i
|
||||
><span class="menu-text">Harga Panel</span></a
|
||||
>
|
||||
</li>
|
||||
<li class="menu-item" aria-haspopup="true">
|
||||
<a href="features/calendar/basic.html" class="menu-link"
|
||||
><i class="menu-bullet menu-bullet-line"><span></span></i
|
||||
><span class="menu-text">Harga Profile</span></a
|
||||
>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<!--end::Menu Nav-->
|
||||
</div>
|
||||
<!--end::Menu Container-->
|
||||
</div>
|
||||
<!--end::Aside Menu-->
|
||||
</div>
|
||||
<!--end::Menu Navigator-->
|
||||
|
||||
<!--begin::Wrapper-->
|
||||
<div class="d-flex flex-column flex-row-fluid wrapper" id="kt_wrapper">
|
||||
<!--begin::Header-->
|
||||
<div id="kt_header" class="header header-fixed">
|
||||
<!--begin::Container-->
|
||||
<div
|
||||
class="container-fluid d-flex align-items-stretch justify-content-between"
|
||||
>
|
||||
<!--begin::Header Menu Wrapper-->
|
||||
<div
|
||||
class="header-menu-wrapper header-menu-wrapper-left"
|
||||
id="kt_header_menu_wrapper"
|
||||
>
|
||||
<!--begin::Header Menu-->
|
||||
<div
|
||||
id="kt_header_menu"
|
||||
class="container-fluid d-flex align-items-center justify-content-between flex-wrap flex-sm-nowrap p-3 justify-content-around"
|
||||
></div>
|
||||
<!--end::Header Menu-->
|
||||
</div>
|
||||
<!--end::Header Menu Wrapper-->
|
||||
|
||||
<!--begin::Topbar-->
|
||||
<div class="topbar">
|
||||
<!--begin::Search-->
|
||||
|
||||
<!--begin::User-->
|
||||
<div class="topbar-item">
|
||||
<div
|
||||
class="btn btn-icon btn-icon-mobile w-auto btn-clean d-flex align-items-center btn-lg px-2"
|
||||
id="kt_quick_user_toggle"
|
||||
>
|
||||
<span
|
||||
class="text-muted font-weight-bold font-size-base d-none d-md-inline mr-1"
|
||||
>Hi,</span
|
||||
>
|
||||
<span
|
||||
class="text-dark-50 font-weight-bolder font-size-base d-none d-md-inline mr-3"
|
||||
>Sean</span
|
||||
>
|
||||
<span
|
||||
class="symbol symbol-lg-35 symbol-25 symbol-light-success"
|
||||
>
|
||||
<span class="symbol-label font-size-h5 font-weight-bold"
|
||||
>S</span
|
||||
>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<!--end::User-->
|
||||
</div>
|
||||
<!--end::Topbar-->
|
||||
</div>
|
||||
<!--end::Container-->
|
||||
</div>
|
||||
<!--end::Header-->
|
||||
|
||||
<!--begin::Content-->
|
||||
<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
|
||||
<!--begin::Breadcrumb-->
|
||||
<div class="subheader py-2 py-lg-6 subheader-solid" id="kt_subheader">
|
||||
<div
|
||||
class="container-fluid d-flex align-items-center justify-content-between flex-wrap flex-sm-nowrap"
|
||||
>
|
||||
<!--begin::Info-->
|
||||
<div class="d-row align-items-center flex-wrap mr-1">
|
||||
<!--begin::Page Heading-->
|
||||
<div class="d-row align-items-baseline flex-wrap mr-5">
|
||||
<!--begin::Page Title-->
|
||||
<h2 class="text-dark font-weight-bold my-1 mr-5">
|
||||
Master Dokter
|
||||
</h2>
|
||||
<!--end::Page Title-->
|
||||
|
||||
<!--begin::Breadcrumb-->
|
||||
<nav aria-label="breadcrumb">
|
||||
<ul
|
||||
class="breadcrumb-item breadcrumb-transparent breadcrumb-dot font-weight-bold p-0 my-2 font-size-sm"
|
||||
>
|
||||
<li class="breadcrumb-item">
|
||||
<a href="" class="text-muted"> Dashboard </a>
|
||||
</li>
|
||||
<li class="breadcrumb-item">
|
||||
<a href="" class="text-muted"> Master </a>
|
||||
</li>
|
||||
<li class="breadcrumb-item">
|
||||
<a href="" class="text-muted"> Dokter </a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<!--end::Breadcrumb-->
|
||||
</div>
|
||||
<!--end::Page Heading-->
|
||||
</div>
|
||||
<!--end::Info-->
|
||||
<!--begin::Button Add New-->
|
||||
<div class="d-flex justify-content-end">
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-primary"
|
||||
data-toggle="modal"
|
||||
data-target="#dialogNew"
|
||||
>
|
||||
Add New
|
||||
</button>
|
||||
</div>
|
||||
<!--end::Button Add New-->
|
||||
</div>
|
||||
</div>
|
||||
<!--end::Breadcrumb-->
|
||||
|
||||
<div class="d-flex flex-column-fluid">
|
||||
<!--begin::Container-->
|
||||
<div class="container">
|
||||
<!--begin::Card-->
|
||||
<div class="card card-custom">
|
||||
<!--begin::Card Header-->
|
||||
<div class="card-header row justify-content-between">
|
||||
<h5 class="card-title">New Dokter</h5>
|
||||
<div class="card-toolbar">
|
||||
<button
|
||||
type="button"
|
||||
class="card-toolbar close"
|
||||
data-dismiss="toast"
|
||||
aria-label="Close"
|
||||
>
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<!--end::Card Header-->
|
||||
</div>
|
||||
<div class="card card-custom">
|
||||
<!--begin::CardBody-->
|
||||
<div class="card-body row">
|
||||
<!--begin::Update Foto-->
|
||||
<div
|
||||
class="image-input image-input-outline"
|
||||
id="kt_contact_add_avatar"
|
||||
width="100px 200px"
|
||||
>
|
||||
<div
|
||||
class="image-input-wrapper"
|
||||
style="
|
||||
background-image: url(../../assets/media/svg/avatars/001-boy.svg);
|
||||
"
|
||||
></div>
|
||||
<a href="#" class="btn btn-light-primary mr-2">
|
||||
Update Foto</a
|
||||
>
|
||||
|
||||
<!--end::Update Foto-->
|
||||
<!-- begin::Form -->
|
||||
<div class="card card-custom">
|
||||
<!--begin::Form-->
|
||||
<div class="flex">
|
||||
<form class="form flex-column-auto">
|
||||
<div class="card-body row justify-content-between">
|
||||
<div class="form-group">
|
||||
<label>Sapaan</label>
|
||||
<select class="form-control form-control-solid">
|
||||
<option>Sapaan</option>
|
||||
<option>Saudara</option>
|
||||
<option>Tuan</option>
|
||||
<option>Nyonya</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Imbuhan Awal 1</label>
|
||||
<input
|
||||
type="email"
|
||||
class="form-control form-control-solid"
|
||||
placeholder="Example input"
|
||||
/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Imbuhan Awal 2</label>
|
||||
<input
|
||||
type="email"
|
||||
class="form-control form-control-solid"
|
||||
placeholder="Example input"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="form-group">
|
||||
<label>Jenis Kelamin</label>
|
||||
<select class="form-control form-control-solid">
|
||||
<option>Jenis Kelamin</option>
|
||||
<option>Laki-laki</option>
|
||||
<option>Perempuan</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Golongan Darah</label>
|
||||
<select class="form-control form-control-solid">
|
||||
<option>Golongan Darah</option>
|
||||
<option>O</option>
|
||||
<option>A</option>
|
||||
<option>B</option>
|
||||
<option>AB</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group flex">
|
||||
<label class="col-3 col-form-label"
|
||||
>Kewarga Negaraan</label
|
||||
>
|
||||
<div class="col-9 col-form-label">
|
||||
<div class="radio-inline justify-content-between">
|
||||
<label class="radio">
|
||||
<input type="radio" name="radios5" />
|
||||
<span></span>
|
||||
WNI
|
||||
</label>
|
||||
<label class="radio">
|
||||
<input type="radio" name="radios5" />
|
||||
<span></span>
|
||||
WNA
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<form>
|
||||
<div class="form-group">
|
||||
<label>Nomor Identitas</label>
|
||||
<input
|
||||
type="email"
|
||||
class="form-control form-control-solid"
|
||||
placeholder="Example input"
|
||||
/>
|
||||
</div>
|
||||
</form>
|
||||
<div class="form-group">
|
||||
<label>Spesialis</label>
|
||||
<select class="form-control form-control-solid">
|
||||
<option>Pilih Spesialis</option>
|
||||
<option>Saraf</option>
|
||||
<option>Paru</option>
|
||||
<option>Anak</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--end::Form-->
|
||||
</div>
|
||||
<!-- end::Form -->
|
||||
</div>
|
||||
<div class="flex">
|
||||
<div class="form-group">
|
||||
<label>Nama</label>
|
||||
<input
|
||||
type="email"
|
||||
class="form-control form-control-solid"
|
||||
placeholder="Example input"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--end::CardBody-->
|
||||
</div>
|
||||
<!--end::Card-->
|
||||
<!--end::Container-->
|
||||
</div>
|
||||
<!--end::Table-->
|
||||
</div>
|
||||
<!--end::Content-->
|
||||
</div>
|
||||
</div>
|
||||
<!--end::Wrapper-->
|
||||
|
||||
<script>
|
||||
var HOST_URL =
|
||||
"https://preview.keenthemes.com/metronic/theme/html/tools/preview";
|
||||
</script>
|
||||
<!--begin::Global Config(global config for global JS scripts)-->
|
||||
<script>
|
||||
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",
|
||||
};
|
||||
</script>
|
||||
<!--end::Global Config-->
|
||||
|
||||
<!--begin::Global Theme Bundle(used by all pages)-->
|
||||
<script src="../../assets/plugins/global/plugins.bundle.js"></script>
|
||||
<script src="../../assets/plugins/custom/prismjs/prismjs.bundle.js"></script>
|
||||
<script src="../../assets/js/scripts.bundle.js"></script>
|
||||
<!--end::Global Theme Bundle-->
|
||||
|
||||
<!--begin::Page Vendors(used by this page)-->
|
||||
<script src="../../assets/plugins/custom/fullcalendar/fullcalendar.bundle.js"></script>
|
||||
<!--end::Page Vendors-->
|
||||
|
||||
<!--begin::Page Scripts(used by this page)-->
|
||||
<script src="../../assets/js/pages/widgets.js"></script>
|
||||
<!--end::Page Scripts-->
|
||||
<script src="assets/js/iconify/iconify.min.js"></script>
|
||||
</body>
|
||||
<!--end::Body-->
|
||||
</html>
|
||||
20
component/customdropdown/customdropdown.templ
Normal file
20
component/customdropdown/customdropdown.templ
Normal file
@@ -0,0 +1,20 @@
|
||||
package customdropdown;
|
||||
|
||||
templ MainCustomDropdown(name string, id string, hxTarget string, hxGet string, hxIndicator string, hxTrigger string, hxInclude string, listItem templ.Component) {
|
||||
<div class="form-control bg-field border-0 h-auto">
|
||||
<select
|
||||
name={ name }
|
||||
class="form-control bg-field selectpicker"
|
||||
data-live-search="true"
|
||||
data-size="5"
|
||||
id={ id }
|
||||
hx-get={ hxGet }
|
||||
hx-target={ hxTarget }
|
||||
hx-indicator={ hxIndicator }
|
||||
hx-trigger={ hxTrigger }
|
||||
hx-include={ hxInclude }
|
||||
>
|
||||
@listItem
|
||||
</select>
|
||||
</div>
|
||||
}
|
||||
134
component/customdropdown/customdropdown_templ.go
Normal file
134
component/customdropdown/customdropdown_templ.go
Normal file
@@ -0,0 +1,134 @@
|
||||
// Code generated by templ - DO NOT EDIT.
|
||||
|
||||
// templ: version: v0.2.663
|
||||
package customdropdown
|
||||
|
||||
//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 MainCustomDropdown(name string, id string, hxTarget string, hxGet string, hxIndicator string, hxTrigger string, hxInclude string, listItem 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("<div class=\"form-control bg-field border-0 h-auto\"><select name=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var2 string
|
||||
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(name)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\customdropdown\customdropdown.templ`, Line: 6, Col: 14}
|
||||
}
|
||||
_, 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("\" class=\"form-control bg-field selectpicker\" data-live-search=\"true\" data-size=\"5\" id=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var3 string
|
||||
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(id)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\customdropdown\customdropdown.templ`, Line: 10, Col: 10}
|
||||
}
|
||||
_, 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("\" hx-get=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var4 string
|
||||
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(hxGet)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\customdropdown\customdropdown.templ`, Line: 11, 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("\" hx-target=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var5 string
|
||||
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(hxTarget)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\customdropdown\customdropdown.templ`, Line: 12, Col: 23}
|
||||
}
|
||||
_, 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("\" hx-indicator=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var6 string
|
||||
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(hxIndicator)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\customdropdown\customdropdown.templ`, Line: 13, Col: 29}
|
||||
}
|
||||
_, 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("\" hx-trigger=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var7 string
|
||||
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(hxTrigger)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\customdropdown\customdropdown.templ`, Line: 14, Col: 25}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" hx-include=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var8 string
|
||||
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(hxInclude)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\customdropdown\customdropdown.templ`, Line: 15, Col: 25}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = listItem.Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</select></div>")
|
||||
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
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package customtextfieldautocomplete
|
||||
|
||||
templ MainCustomAutoCompleteV1(value string) {
|
||||
<div id="initial" class="form-group">
|
||||
<input
|
||||
class="form-control bg-field"
|
||||
type="text"
|
||||
autocomplete="off"
|
||||
placeholder="Search Data..."
|
||||
id="searchAutocomplete"
|
||||
name="searchAutocomplete"
|
||||
hx-get="/client/autocomplete"
|
||||
hx-trigger="input changed delay:500ms, search"
|
||||
hx-target="#hasilAutoComplete"
|
||||
hx-indicator="#indicator"
|
||||
value={ value }
|
||||
/>
|
||||
<div id="hasilAutoComplete">
|
||||
<div id="indicator" class="position-absolute d-flex justify-content-center spinner-border htmx-indicator" style="z-index: 99;" role="status">
|
||||
<span class="sr-only">Loading...</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
templ ListCustomAutoCompleteHideV1() {
|
||||
<div id="hasilAutoComplete"></div>
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
// Code generated by templ - DO NOT EDIT.
|
||||
|
||||
// templ: version: v0.2.663
|
||||
package customtextfieldautocomplete
|
||||
|
||||
//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 MainCustomAutoCompleteV1(value 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("<div id=\"initial\" class=\"form-group\"><input class=\"form-control bg-field\" type=\"text\" autocomplete=\"off\" placeholder=\"Search Data...\" id=\"searchAutocomplete\" name=\"searchAutocomplete\" hx-get=\"/client/autocomplete\" hx-trigger=\"input changed delay:500ms, search\" hx-target=\"#hasilAutoComplete\" hx-indicator=\"#indicator\" value=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var2 string
|
||||
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(value)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\customtextfieldautocomplete\customautocompletev1.templ`, Line: 16, Col: 16}
|
||||
}
|
||||
_, 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("\"><div id=\"hasilAutoComplete\"><div id=\"indicator\" class=\"position-absolute d-flex justify-content-center spinner-border htmx-indicator\" style=\"z-index: 99;\" role=\"status\"><span class=\"sr-only\">Loading...</span></div></div></div>")
|
||||
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 ListCustomAutoCompleteHideV1() 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("<div id=\"hasilAutoComplete\"></div>")
|
||||
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
|
||||
})
|
||||
}
|
||||
@@ -32,7 +32,8 @@ templ MainCustomTextFieldSearchV1(
|
||||
hxTarget,
|
||||
hxIndicator,
|
||||
value,
|
||||
hxExt string) {
|
||||
hxExt,
|
||||
hxInclude string) {
|
||||
<input
|
||||
class="form-control bg-field border-0 h-auto py-6 px-6 rounded-lg"
|
||||
type={ inpType }
|
||||
@@ -45,6 +46,7 @@ templ MainCustomTextFieldSearchV1(
|
||||
hx-indicator={ hxIndicator }
|
||||
value={ value }
|
||||
hx-ext={ hxExt }
|
||||
autocomplete="off"
|
||||
hx-include={ hxInclude }
|
||||
autocomplete="off"
|
||||
/>
|
||||
}
|
||||
|
||||
@@ -155,7 +155,8 @@ func MainCustomTextFieldSearchV1(
|
||||
hxTarget,
|
||||
hxIndicator,
|
||||
value,
|
||||
hxExt string) templ.Component {
|
||||
hxExt,
|
||||
hxInclude string) templ.Component {
|
||||
return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer)
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
@@ -175,7 +176,7 @@ func MainCustomTextFieldSearchV1(
|
||||
var templ_7745c5c3_Var11 string
|
||||
templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(inpType)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\customtextfieldsearch\customtextfieldsearch.templ`, Line: 38, Col: 16}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\customtextfieldsearch\customtextfieldsearch.templ`, Line: 39, Col: 16}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -188,7 +189,7 @@ func MainCustomTextFieldSearchV1(
|
||||
var templ_7745c5c3_Var12 string
|
||||
templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(inpName)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\customtextfieldsearch\customtextfieldsearch.templ`, Line: 39, Col: 16}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\customtextfieldsearch\customtextfieldsearch.templ`, Line: 40, Col: 16}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -201,7 +202,7 @@ func MainCustomTextFieldSearchV1(
|
||||
var templ_7745c5c3_Var13 string
|
||||
templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(inpId)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\customtextfieldsearch\customtextfieldsearch.templ`, Line: 40, Col: 12}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\customtextfieldsearch\customtextfieldsearch.templ`, Line: 41, Col: 12}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -214,7 +215,7 @@ func MainCustomTextFieldSearchV1(
|
||||
var templ_7745c5c3_Var14 string
|
||||
templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(inpPlaceHolder)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\customtextfieldsearch\customtextfieldsearch.templ`, Line: 41, Col: 30}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\customtextfieldsearch\customtextfieldsearch.templ`, Line: 42, Col: 30}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -227,7 +228,7 @@ func MainCustomTextFieldSearchV1(
|
||||
var templ_7745c5c3_Var15 string
|
||||
templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(hxGet)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\customtextfieldsearch\customtextfieldsearch.templ`, Line: 42, Col: 16}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\customtextfieldsearch\customtextfieldsearch.templ`, Line: 43, Col: 16}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -240,7 +241,7 @@ func MainCustomTextFieldSearchV1(
|
||||
var templ_7745c5c3_Var16 string
|
||||
templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs(hxTrigger)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\customtextfieldsearch\customtextfieldsearch.templ`, Line: 43, Col: 24}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\customtextfieldsearch\customtextfieldsearch.templ`, Line: 44, Col: 24}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -253,7 +254,7 @@ func MainCustomTextFieldSearchV1(
|
||||
var templ_7745c5c3_Var17 string
|
||||
templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(hxTarget)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\customtextfieldsearch\customtextfieldsearch.templ`, Line: 44, Col: 22}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\customtextfieldsearch\customtextfieldsearch.templ`, Line: 45, Col: 22}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -266,7 +267,7 @@ func MainCustomTextFieldSearchV1(
|
||||
var templ_7745c5c3_Var18 string
|
||||
templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.JoinStringErrs(hxIndicator)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\customtextfieldsearch\customtextfieldsearch.templ`, Line: 45, Col: 28}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\customtextfieldsearch\customtextfieldsearch.templ`, Line: 46, Col: 28}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var18))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -279,7 +280,7 @@ func MainCustomTextFieldSearchV1(
|
||||
var templ_7745c5c3_Var19 string
|
||||
templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.JoinStringErrs(value)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\customtextfieldsearch\customtextfieldsearch.templ`, Line: 46, Col: 15}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\customtextfieldsearch\customtextfieldsearch.templ`, Line: 47, Col: 15}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var19))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -292,12 +293,25 @@ func MainCustomTextFieldSearchV1(
|
||||
var templ_7745c5c3_Var20 string
|
||||
templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.JoinStringErrs(hxExt)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\customtextfieldsearch\customtextfieldsearch.templ`, Line: 47, Col: 16}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\customtextfieldsearch\customtextfieldsearch.templ`, Line: 48, Col: 16}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var20))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" hx-include=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var21 string
|
||||
templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.JoinStringErrs(hxInclude)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\customtextfieldsearch\customtextfieldsearch.templ`, Line: 49, Col: 24}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var21))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" autocomplete=\"off\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
|
||||
@@ -1,10 +1,17 @@
|
||||
package tablecomponent
|
||||
|
||||
templ TableV2(thName []string, thWidth []string, trComponent templ.Component, pagination templ.Component, idunique string, inputanSearch templ.Component) {
|
||||
templ TableV2(thName []string, thWidth []string, trComponent templ.Component, pagination templ.Component, idunique string, inputanSearch templ.Component, dropdown templ.Component) {
|
||||
if len(thName) != len(thWidth) {
|
||||
<div>length array thname berbeda dengan array thwidth</div>
|
||||
} else {
|
||||
@inputanSearch
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
@dropdown
|
||||
</div>
|
||||
<div class="col-6">
|
||||
@inputanSearch
|
||||
</div>
|
||||
</div>
|
||||
<div id={ idunique }>
|
||||
<div class="mt-7"></div>
|
||||
<table class="table table-hover table-borderless">
|
||||
|
||||
@@ -10,7 +10,7 @@ import "context"
|
||||
import "io"
|
||||
import "bytes"
|
||||
|
||||
func TableV2(thName []string, thWidth []string, trComponent templ.Component, pagination templ.Component, idunique string, inputanSearch templ.Component) templ.Component {
|
||||
func TableV2(thName []string, thWidth []string, trComponent templ.Component, pagination templ.Component, idunique string, inputanSearch templ.Component, dropdown 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 {
|
||||
@@ -29,18 +29,30 @@ func TableV2(thName []string, thWidth []string, trComponent templ.Component, pag
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
} else {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"row\"><div class=\"col-6\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = dropdown.Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div><div class=\"col-6\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = inputanSearch.Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" <div id=\"")
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div></div><div id=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var2 string
|
||||
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(idunique)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\table\tablev2.templ`, Line: 8, Col: 20}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\table\tablev2.templ`, Line: 15, Col: 20}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -58,7 +70,7 @@ func TableV2(thName []string, thWidth []string, trComponent templ.Component, pag
|
||||
var templ_7745c5c3_Var3 string
|
||||
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(thWidth[i])
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\table\tablev2.templ`, Line: 14, Col: 41}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\table\tablev2.templ`, Line: 21, Col: 41}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -71,7 +83,7 @@ func TableV2(thName []string, thWidth []string, trComponent templ.Component, pag
|
||||
var templ_7745c5c3_Var4 string
|
||||
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(item)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\table\tablev2.templ`, Line: 14, Col: 50}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\table\tablev2.templ`, Line: 21, Col: 50}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
||||
474
handlers/dev/mastermenuuser.handlers.go
Normal file
474
handlers/dev/mastermenuuser.handlers.go
Normal file
@@ -0,0 +1,474 @@
|
||||
package dev_handlers
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"math"
|
||||
|
||||
"strconv"
|
||||
|
||||
"cpone/component/customdropdown"
|
||||
"cpone/component/pagination"
|
||||
tablecomponent "cpone/component/table"
|
||||
"cpone/models"
|
||||
"cpone/utils"
|
||||
mastermenuuser "cpone/views/dev/mastermenuuser"
|
||||
mastermenuusergroup "cpone/views/dev/mastermenuusergroup"
|
||||
|
||||
services "cpone/services/dev"
|
||||
|
||||
"github.com/a-h/templ"
|
||||
"github.com/labstack/echo/v4"
|
||||
"go.uber.org/zap"
|
||||
|
||||
breadcrumbadmin "cpone/component/breadcrumbadmin"
|
||||
customtextfieldsearch "cpone/component/customtextfieldsearch"
|
||||
navbarmenu "cpone/component/navbar"
|
||||
sidebaruserprofile "cpone/component/sidebar_user_profile"
|
||||
)
|
||||
|
||||
type MasterMenuUserService interface {
|
||||
GetMasterMenus() ([]services.MasterMenu, error)
|
||||
GetUserGroup() ([]models.UserGroup, error)
|
||||
// try
|
||||
GetListMasterUser(searchDropdown string) ([]models.MasterUser, error)
|
||||
GetListBreadCrumb(title string) (models.BreadCrumbV1, error)
|
||||
|
||||
GetListMasterUserPagination(search string, searchDropdown string, currentPage int, rowPerPage int) ([]models.MasterUser, error)
|
||||
GetListMasterUserFilteredBySearch(search string, searchDropdown string) ([]models.MasterUser, error)
|
||||
GetListMasterUserGroupSearch() ([]models.UserGroupV1, error)
|
||||
}
|
||||
|
||||
func NewMasterMenuUserHandler(us MasterMenuUserService) *MasterMenuUserHandler {
|
||||
return &MasterMenuUserHandler{
|
||||
MasterMenuUserService: us,
|
||||
}
|
||||
}
|
||||
|
||||
type MasterMenuUserHandler struct {
|
||||
MasterMenuUserService MasterMenuUserService
|
||||
}
|
||||
|
||||
func (uh *MasterMenuUserHandler) View(c echo.Context, cmp templ.Component) error {
|
||||
c.Response().Header().Set(echo.HeaderContentType, echo.MIMETextHTML)
|
||||
|
||||
return cmp.Render(c.Request().Context(), c.Response().Writer)
|
||||
}
|
||||
|
||||
func (lh *MasterMenuUserHandler) HandlerShowBreadCrumbV1(c echo.Context) error {
|
||||
logger, _ := zap.NewProduction()
|
||||
paramTitleBreadcrumbConvert := "Master User"
|
||||
|
||||
dataBreadCrumb, err := lh.MasterMenuUserService.GetListBreadCrumb(paramTitleBreadcrumbConvert)
|
||||
fmt.Println(dataBreadCrumb)
|
||||
fmt.Println(err)
|
||||
if err != nil {
|
||||
defer logger.Sync()
|
||||
logger.Info("ERROR BREADCRUMB DEV",
|
||||
zap.Any("error", err),
|
||||
)
|
||||
fmt.Println(dataBreadCrumb)
|
||||
return err
|
||||
}
|
||||
|
||||
// si := mastermenuusergroup.ListMasterUserGroupInitial(dataBreadCrumb)
|
||||
|
||||
defer logger.Sync()
|
||||
logger.Info("LOAD BREADCRUMB DEV",
|
||||
zap.Any("data", dataBreadCrumb),
|
||||
)
|
||||
|
||||
// si := breadcrumbadmin.MainBreadcrumbAdminV1(dataBreadCrumb)
|
||||
|
||||
si := mastermenuusergroup.ShowMasterMenuUserGroupV1(
|
||||
"Master Menu",
|
||||
breadcrumbadmin.MainBreadcrumbAdminV1(dataBreadCrumb),
|
||||
mastermenuusergroup.CssMasterMenuUserGroupV1(),
|
||||
mastermenuusergroup.JsMasterMenuUserGroupV1(),
|
||||
)
|
||||
|
||||
return lh.View(c, si)
|
||||
}
|
||||
|
||||
// try
|
||||
func (lh *MasterMenuUserHandler) HandlerShowMasterMenuUserV1(c echo.Context) error {
|
||||
// var toastComponent templ.Component
|
||||
contentIDHtmxExtension := utils.GenerateRandomID("htmxExtmgu")
|
||||
|
||||
logger, _ := zap.NewProduction()
|
||||
dataMenu, err := lh.MasterMenuUserService.GetMasterMenus()
|
||||
fmt.Println(dataMenu)
|
||||
fmt.Println(err)
|
||||
if err != nil {
|
||||
fmt.Println(dataMenu)
|
||||
return err
|
||||
}
|
||||
|
||||
dataUser, err := services.GetUser()
|
||||
fmt.Println(dataUser)
|
||||
fmt.Println(err)
|
||||
if err != nil {
|
||||
fmt.Println(dataUser)
|
||||
return err
|
||||
}
|
||||
|
||||
rowPerPage := 2
|
||||
dataMasterUser, err := lh.MasterMenuUserService.GetListMasterUserPagination("", "1", 1, rowPerPage)
|
||||
fmt.Println(dataMasterUser)
|
||||
fmt.Println(err)
|
||||
if err != nil {
|
||||
defer logger.Sync()
|
||||
logger.Info("ERROR LIST USER MASTER DEV",
|
||||
zap.Any("error", err),
|
||||
)
|
||||
fmt.Println(dataMasterUser)
|
||||
return err
|
||||
}
|
||||
|
||||
dataUserMasterAll, err := lh.MasterMenuUserService.GetListMasterUser("1")
|
||||
fmt.Println(dataUserMasterAll)
|
||||
fmt.Println(err)
|
||||
if err != nil {
|
||||
defer logger.Sync()
|
||||
logger.Info("ERROR LIST USER MASTER ALL DEV",
|
||||
zap.Any("error", err),
|
||||
)
|
||||
fmt.Println(dataUserMasterAll)
|
||||
return err
|
||||
}
|
||||
|
||||
// si := mastermenuusergroup.ListMasterUserGroupInitial(dataMasterUser)
|
||||
|
||||
defer logger.Sync()
|
||||
logger.Info("LOAD USER GROUP DEV",
|
||||
zap.Any("data", dataMasterUser),
|
||||
)
|
||||
|
||||
// si := mastermenuusergroup.ListMasterUserGroupInitial(dataMasterUser)
|
||||
|
||||
// si := mastermenuusergroup.ShowMasterMenuUserGroupV1(
|
||||
// "Master Menu",
|
||||
// mastermenuusergroup.ListMasterUserGroupInitial(dataMasterUser),
|
||||
// mastermenuusergroup.CssMasterMenuUserGroupV1(),
|
||||
// mastermenuusergroup.JsMasterMenuUserGroupV1(),
|
||||
// )
|
||||
|
||||
contentID := utils.GenerateRandomID("tablebody")
|
||||
|
||||
paramTitleBreadcrumbConvert := "Master User"
|
||||
|
||||
dataBreadCrumb, err := lh.MasterMenuUserService.GetListBreadCrumb(paramTitleBreadcrumbConvert)
|
||||
fmt.Println(dataBreadCrumb)
|
||||
fmt.Println(err)
|
||||
if err != nil {
|
||||
defer logger.Sync()
|
||||
logger.Info("ERROR BREADCRUMB DEV",
|
||||
zap.Any("error", err),
|
||||
)
|
||||
fmt.Println(dataBreadCrumb)
|
||||
return err
|
||||
}
|
||||
|
||||
// si := mastermenuusergroup.ListMasterUserGroupInitial(dataBreadCrumb)
|
||||
|
||||
defer logger.Sync()
|
||||
logger.Info("LOAD BREADCRUMB DEV",
|
||||
zap.Any("data", dataBreadCrumb),
|
||||
)
|
||||
|
||||
dataUserGroupAll, err := lh.MasterMenuUserService.GetListMasterUserGroupSearch()
|
||||
fmt.Println(dataUserGroupAll)
|
||||
fmt.Println(err)
|
||||
if err != nil {
|
||||
defer logger.Sync()
|
||||
logger.Info("ERROR LIST USER GROUP ALL DEV",
|
||||
zap.Any("error", err),
|
||||
)
|
||||
fmt.Println(dataUserGroupAll)
|
||||
return err
|
||||
}
|
||||
|
||||
// navbar menu
|
||||
navbarmenuComponent := navbarmenu.NavbarMenu(dataMenu)
|
||||
|
||||
// navbar user
|
||||
navbaruserComponent := navbarmenu.Navbar(dataUser)
|
||||
|
||||
// sidebar
|
||||
sidebaruserprofileComponent := sidebaruserprofile.Navbaruserprofile(dataUser)
|
||||
|
||||
// inputan search
|
||||
// inputansearchComponent := customtextfieldsearch.MainCustomTextFieldSearchV1("q", "Cari Nama Staff / Email", "text", "/dev/searchuserv1", "input changed delay:500ms, search", "#idbaru", "#indicator")
|
||||
|
||||
contentIDSearch := utils.GenerateRandomID("qsearch")
|
||||
contentIDDropdown := utils.GenerateRandomID("qdropdown")
|
||||
totalPages := int(math.Ceil(float64(len(dataUserMasterAll)) / float64(rowPerPage)))
|
||||
link := "currentPage=1&page=" + strconv.Itoa(totalPages) + "&contentID=" + contentID
|
||||
|
||||
inputansearchComponent := customtextfieldsearch.MainCustomTextFieldSearchV1("#"+contentIDSearch, "q", "Cari Nama Staff / Email", "text", "/dev/searchuserv1?"+link, "input changed delay:500ms, search", "#"+contentID, "#indicator", "", contentIDHtmxExtension, "[name='usergroup']")
|
||||
|
||||
listItemComponent := mastermenuuser.ItemDropdown(dataUserGroupAll)
|
||||
dropdownComponent := customdropdown.MainCustomDropdown("usergroup", "#"+contentIDDropdown, "#"+contentID, "/dev/searchuserv1?"+link, "#indicator", "change from:select[name='usergroup']", "[name='q']", listItemComponent)
|
||||
|
||||
// toast
|
||||
// contentIDToast := utils.GenerateRandomID("toastmgu")
|
||||
// toastComponent = customtoast.CustomToastV1("", contentIDHtmxExtension)
|
||||
|
||||
// table user group
|
||||
|
||||
searchQueryParam := "&q="
|
||||
tabelusergroupComponent := tablecomponent.TableV2(
|
||||
[]string{"EMAIL", "NAMA STAFF", "USER GROUP", "AKSI"},
|
||||
[]string{"20%", "40%", "20%", "20%"},
|
||||
mastermenuuser.TableRowMasterUserV1(dataMasterUser),
|
||||
pagination.PaginationV1(totalPages, 1, "/dev/userv1pagination", contentID, searchQueryParam),
|
||||
contentID,
|
||||
inputansearchComponent,
|
||||
dropdownComponent,
|
||||
)
|
||||
|
||||
si := mastermenuusergroup.ShowMasterMenuUserGroupV1x(
|
||||
"Master Menu",
|
||||
mastermenuusergroup.ContentMasterMenuUserGroupV1(
|
||||
contentID,
|
||||
breadcrumbadmin.MainBreadcrumbAdminV1(dataBreadCrumb),
|
||||
tabelusergroupComponent,
|
||||
inputansearchComponent,
|
||||
// toastComponent,
|
||||
// contentIDToast,
|
||||
),
|
||||
|
||||
mastermenuusergroup.CssMasterMenuUserGroupV1x(),
|
||||
mastermenuusergroup.JSkuV1(),
|
||||
navbarmenuComponent,
|
||||
navbaruserComponent,
|
||||
sidebaruserprofileComponent,
|
||||
)
|
||||
|
||||
return utils.View(c, si)
|
||||
}
|
||||
|
||||
func (lh *MasterMenuUserHandler) HandlerShowMasterMenuUserSearchV1(c echo.Context) error {
|
||||
search := c.QueryParam("q")
|
||||
searchDropdownParam := c.QueryParam("usergroup")
|
||||
var searchDropdown string = ""
|
||||
if searchDropdownParam != "0" {
|
||||
searchDropdown = searchDropdownParam
|
||||
}
|
||||
|
||||
logger, _ := zap.NewProduction()
|
||||
|
||||
// dataUserMaster, err := lh.MasterMenuUserService.GetListMasterUserBySearch(search)
|
||||
rowPerPage := 2
|
||||
pageparam := c.QueryParam("page")
|
||||
page, err := strconv.Atoi(pageparam)
|
||||
if err != nil {
|
||||
defer logger.Sync()
|
||||
logger.Info("ERROR CONVERT PAGE PARAM",
|
||||
zap.Any("page", page),
|
||||
zap.Any("error ", err),
|
||||
)
|
||||
return err
|
||||
}
|
||||
|
||||
currentPageParam := c.QueryParam("currentPage")
|
||||
currentPage, err := strconv.Atoi(currentPageParam)
|
||||
if err != nil {
|
||||
defer logger.Sync()
|
||||
logger.Info("ERROR CONVERT CURRENT PAGE PARAM",
|
||||
zap.Any("page", page),
|
||||
zap.Any("error ", err),
|
||||
)
|
||||
return err
|
||||
}
|
||||
|
||||
dataUserMaster, err := lh.MasterMenuUserService.GetListMasterUserPagination(search, searchDropdown, currentPage, rowPerPage)
|
||||
fmt.Println(dataUserMaster)
|
||||
fmt.Println(err)
|
||||
if err != nil {
|
||||
defer logger.Sync()
|
||||
logger.Info("ERROR SEARCH USER MASTER DEV",
|
||||
zap.Any("error", err),
|
||||
zap.Any("search param", search),
|
||||
)
|
||||
fmt.Println(dataUserMaster)
|
||||
return err
|
||||
}
|
||||
|
||||
defer logger.Sync()
|
||||
logger.Info("LOAD USER MASTER DEV BY SEARCH",
|
||||
zap.Any("data", dataUserMaster),
|
||||
)
|
||||
|
||||
// data user filtered
|
||||
dataUserMasterFiltered, err := lh.MasterMenuUserService.GetListMasterUserFilteredBySearch(search, searchDropdown)
|
||||
fmt.Println(dataUserMasterFiltered)
|
||||
fmt.Println(err)
|
||||
if err != nil {
|
||||
defer logger.Sync()
|
||||
logger.Info("ERROR SEARCH USER MASTER FILTERED BY SEARCH DEV",
|
||||
zap.Any("error", err),
|
||||
zap.Any("search param", search),
|
||||
)
|
||||
fmt.Println(dataUserMasterFiltered)
|
||||
return err
|
||||
}
|
||||
|
||||
defer logger.Sync()
|
||||
logger.Info("LOAD SEARCH USER MASTER FILTERED BY SEARCH DEV",
|
||||
zap.Any("data", dataUserMasterFiltered),
|
||||
)
|
||||
// si := mastermenuusergroup.ListMasterUserGroupInitial(dataUserMaster)
|
||||
|
||||
contentID := utils.GenerateRandomID("tablebody")
|
||||
|
||||
// tabelusergroupComponent := mastermenuusergroup.TableRowV1(dataUserMaster)
|
||||
totalPages := int(math.Ceil(float64(len(dataUserMasterFiltered)) / float64(rowPerPage)))
|
||||
searchQueryParam := "&q=" + search + "&usergroup=" + searchDropdown
|
||||
|
||||
// contentIDSearch := utils.GenerateRandomID("qsearch")
|
||||
// link := "currentPage=1&page=" + strconv.Itoa(totalPages) + "&contentID=" + contentID
|
||||
|
||||
// contentIDHtmxExtension := utils.GenerateRandomID("htmxExtmgu")
|
||||
// inputansearchComponent := customtextfieldsearch.MainCustomTextFieldSearchV1("#"+contentIDSearch, "q", "Cari Nama Staff / Email", "text", "/dev/searchuserv1?"+link, "input changed delay:500ms, search", "#"+contentID, "#indicator", search, contentIDHtmxExtension)
|
||||
|
||||
inputansearchComponent := tablecomponent.DivEmpty()
|
||||
tabelusergroupComponent := tablecomponent.TableV2(
|
||||
[]string{"EMAIL", "NAMA STAFF", "USER GROUP", "AKSI"},
|
||||
[]string{"20%", "40%", "20%", "20%"},
|
||||
mastermenuuser.TableRowMasterUserV1(dataUserMaster),
|
||||
pagination.PaginationV1(totalPages, 1, "/dev/userv1pagination", contentID, searchQueryParam),
|
||||
contentID,
|
||||
inputansearchComponent,
|
||||
tablecomponent.DivEmpty(),
|
||||
)
|
||||
|
||||
si := tabelusergroupComponent
|
||||
|
||||
return utils.View(c, si)
|
||||
}
|
||||
|
||||
func (lh *MasterMenuUserHandler) HandlerShowMasterMenuUserPaginationV1(c echo.Context) error {
|
||||
logger, _ := zap.NewProduction()
|
||||
|
||||
search := c.QueryParam("q")
|
||||
searchDropdownParam := c.QueryParam("usergroup")
|
||||
var searchDropdown string = ""
|
||||
if searchDropdownParam != "0" {
|
||||
searchDropdown = searchDropdownParam
|
||||
}
|
||||
|
||||
pageparam := c.QueryParam("page")
|
||||
page, err := strconv.Atoi(pageparam)
|
||||
if err != nil {
|
||||
defer logger.Sync()
|
||||
logger.Info("ERROR CONVERT PAGE PARAM",
|
||||
zap.Any("page", page),
|
||||
zap.Any("error ", err),
|
||||
)
|
||||
return err
|
||||
}
|
||||
|
||||
dataUserMasterAll, err := lh.MasterMenuUserService.GetListMasterUser(searchDropdown)
|
||||
fmt.Println(dataUserMasterAll)
|
||||
fmt.Println(err)
|
||||
if err != nil {
|
||||
defer logger.Sync()
|
||||
logger.Info("ERROR LIST USER MASTER ALL DEV",
|
||||
zap.Any("error", err),
|
||||
)
|
||||
fmt.Println(dataUserMasterAll)
|
||||
return err
|
||||
}
|
||||
|
||||
currentPageParam := c.QueryParam("currentPage")
|
||||
currentPage, err := strconv.Atoi(currentPageParam)
|
||||
if err != nil {
|
||||
defer logger.Sync()
|
||||
logger.Info("ERROR CONVERT CURRENT PAGE PARAM",
|
||||
zap.Any("page", page),
|
||||
zap.Any("error ", err),
|
||||
)
|
||||
return err
|
||||
}
|
||||
|
||||
rowPerPage := 2
|
||||
dataUserMaster, err := lh.MasterMenuUserService.GetListMasterUserPagination(search, searchDropdown, currentPage, rowPerPage)
|
||||
fmt.Println(dataUserMaster)
|
||||
fmt.Println(err)
|
||||
if err != nil {
|
||||
defer logger.Sync()
|
||||
logger.Info("ERROR SEARCH USER MASTER DEV",
|
||||
zap.Any("error", err),
|
||||
zap.Any("search param", search),
|
||||
)
|
||||
fmt.Println(dataUserMaster)
|
||||
return err
|
||||
}
|
||||
|
||||
// si := mastermenuusergroup.ListMasterUserGroupInitial(dataUserMaster)
|
||||
|
||||
defer logger.Sync()
|
||||
logger.Info("LOAD USER MASTER DEV BY SEARCH",
|
||||
zap.Any("data", dataUserMaster),
|
||||
)
|
||||
|
||||
// data user filtered
|
||||
dataUserMasterFiltered, err := lh.MasterMenuUserService.GetListMasterUserFilteredBySearch(search, searchDropdown)
|
||||
fmt.Println(dataUserMasterFiltered)
|
||||
fmt.Println(err)
|
||||
if err != nil {
|
||||
defer logger.Sync()
|
||||
logger.Info("ERROR SEARCH USER MASTER FILTERED BY SEARCH DEV",
|
||||
zap.Any("error", err),
|
||||
zap.Any("search param", search),
|
||||
)
|
||||
fmt.Println(dataUserMasterFiltered)
|
||||
return err
|
||||
}
|
||||
|
||||
defer logger.Sync()
|
||||
logger.Info("LOAD SEARCH USER MASTER FILTERED BY SEARCH DEV",
|
||||
zap.Any("data", dataUserMasterFiltered),
|
||||
)
|
||||
|
||||
contentID := utils.GenerateRandomID("tablebody")
|
||||
|
||||
// table user group
|
||||
searchQueryParam := "&q=" + search + "&usergroup=" + searchDropdown
|
||||
totalPages := int(math.Ceil(float64(len(dataUserMasterFiltered)) / float64(rowPerPage)))
|
||||
// contentIDSearch := utils.GenerateRandomID("qsearch")
|
||||
// link := "currentPage=1&page=" + strconv.Itoa(totalPages) + "&contentID=" + contentID
|
||||
|
||||
// contentIDHtmxExtension := utils.GenerateRandomID("htmxExtmgu")
|
||||
// inputansearchComponent := customtextfieldsearch.MainCustomTextFieldSearchV1("#"+contentIDSearch, "q", "Cari Nama Staff / Email", "text", "/dev/searchuserv1?"+link, "input changed delay:500ms, search", "#"+contentID, "#indicator", search, contentIDHtmxExtension)
|
||||
|
||||
inputansearchComponent := tablecomponent.DivEmpty()
|
||||
tabelusergroupComponent := tablecomponent.TableV2(
|
||||
[]string{"EMAIL", "NAMA STAFF", "USER GROUP", "AKSI"},
|
||||
[]string{"20%", "40%", "20%", "20%"},
|
||||
mastermenuuser.TableRowMasterUserV1(dataUserMaster),
|
||||
pagination.PaginationV1(totalPages, currentPage, "/dev/userv1pagination", contentID, searchQueryParam),
|
||||
contentID,
|
||||
inputansearchComponent,
|
||||
tablecomponent.DivEmpty(),
|
||||
)
|
||||
|
||||
// tabelusergroupComponent := mastermenuusergroup.TableRowV1(dataUserMaster)
|
||||
|
||||
si := tabelusergroupComponent
|
||||
|
||||
return utils.View(c, si)
|
||||
}
|
||||
|
||||
// versi 2
|
||||
func (lh *MasterMenuUserHandler) HandlerShowMasterMenuUserSearch(c echo.Context) error {
|
||||
idUserGroupSelected := c.Param("idUserGroup")
|
||||
|
||||
if idUserGroupSelected != "0" {
|
||||
|
||||
}
|
||||
|
||||
si := tablecomponent.DivEmpty()
|
||||
|
||||
return utils.View(c, si)
|
||||
}
|
||||
@@ -255,8 +255,7 @@ func (lh *MasterMenuUserGroupHandler) HandlerShowMasterMenuUserGroupV1(c echo.Co
|
||||
totalPages := int(math.Ceil(float64(len(dataUserGroupAll)) / float64(rowPerPage)))
|
||||
link := "currentPage=1&page=" + strconv.Itoa(totalPages) + "&contentID=" + contentID
|
||||
|
||||
inputansearchComponent := customtextfieldsearch.MainCustomTextFieldSearchV1("#"+contentIDSearch, "q", "Cari User Group", "text", "/dev/searchusergroupv1?"+link, "input changed delay:500ms, search", "#"+contentID, "#indicator", "", contentIDHtmxExtension)
|
||||
|
||||
inputansearchComponent := customtextfieldsearch.MainCustomTextFieldSearchV1("#"+contentIDSearch, "q", "Cari User Group", "text", "/dev/searchusergroupv1?"+link, "input changed delay:500ms, search", "#"+contentID, "#indicator", "", contentIDHtmxExtension, "")
|
||||
// toast
|
||||
// contentIDToast := utils.GenerateRandomID("toastmgu")
|
||||
// toastComponent = customtoast.CustomToastV1("", contentIDHtmxExtension)
|
||||
@@ -271,6 +270,7 @@ func (lh *MasterMenuUserGroupHandler) HandlerShowMasterMenuUserGroupV1(c echo.Co
|
||||
pagination.PaginationV1(totalPages, 1, "/dev/usergroupv1pagination", contentID, searchQueryParam),
|
||||
contentID,
|
||||
inputansearchComponent,
|
||||
tablecomponent.DivEmpty(),
|
||||
)
|
||||
|
||||
si := mastermenuusergroup.ShowMasterMenuUserGroupV1x(
|
||||
@@ -526,6 +526,7 @@ func (lh *MasterMenuUserGroupHandler) HandlerShowMasterMenuUserGroupSearchV1(c e
|
||||
pagination.PaginationV1(totalPages, 1, "/dev/usergroupv1pagination", contentID, searchQueryParam),
|
||||
contentID,
|
||||
inputansearchComponent,
|
||||
tablecomponent.DivEmpty(),
|
||||
)
|
||||
|
||||
si := tabelusergroupComponent
|
||||
@@ -630,6 +631,7 @@ func (lh *MasterMenuUserGroupHandler) HandlerShowMasterMenuUserGroupPaginationV1
|
||||
pagination.PaginationV1(totalPages, currentPage, "/dev/usergroupv1pagination", contentID, searchQueryParam),
|
||||
contentID,
|
||||
inputansearchComponent,
|
||||
tablecomponent.DivEmpty(),
|
||||
)
|
||||
|
||||
// tabelusergroupComponent := mastermenuusergroup.TableRowV1(dataUserGroup)
|
||||
|
||||
@@ -204,4 +204,12 @@ func SetupRoutesDev(app *echo.Echo, appStore db.AppStore) {
|
||||
|
||||
// clientgroup.GET("/usergroup/edit", mastermenuusergroupHandler.ChangeFormEdit)
|
||||
// clientgroup.GET("/usergroup/pagination", mastermenuusergroupHandler.HandleChangePage)
|
||||
|
||||
// master user
|
||||
devUserServices := dev_services.NewServicesMasterMenuUser(appStore)
|
||||
devUserhandlers := dev_handlers.NewMasterMenuUserHandler(devUserServices)
|
||||
dev.GET("/userv1", devUserhandlers.HandlerShowMasterMenuUserV1)
|
||||
dev.GET("/searchuserv1", devUserhandlers.HandlerShowMasterMenuUserSearchV1)
|
||||
dev.GET("/userv1pagination", devUserhandlers.HandlerShowMasterMenuUserPaginationV1)
|
||||
// dev.GET("/dropdownusergroupselected", )
|
||||
}
|
||||
|
||||
23
models/masteruser.models.go
Normal file
23
models/masteruser.models.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package models
|
||||
|
||||
type MasterUser struct {
|
||||
Nomor string `db:"nomor"`
|
||||
M_UserID int `db:"M_UserID"`
|
||||
M_UserEmail string `db:"M_UserEmail"`
|
||||
M_UserFullName string `db:"M_UserFullName"`
|
||||
M_UserLastAccess string `db:"M_UserLastAccess"`
|
||||
M_UserIsLoggedIn string `db:"M_UserIsLoggedIn"`
|
||||
M_UserActiveToken string `db:"M_UserActiveToken"`
|
||||
M_UserExpiredToken string `db:"M_UserExpiredToken"`
|
||||
M_UserIsActive string `db:"M_UserIsActive"`
|
||||
M_UserCreated string `db:"M_UserCreated"`
|
||||
M_UserCreatedUserID int `db:"M_UserCreatedUserID"`
|
||||
M_UserLastUpdated string `db:"M_UserLastUpdated"`
|
||||
M_UserLastUpdatedUserID int `db:"M_UserLastUpdatedUserID"`
|
||||
M_UserDeletedUserID int `db:"M_UserDeletedUserID"`
|
||||
M_UserDeleted string `db:"M_UserDeleted"`
|
||||
M_UserM_UserGroupID int `db:"M_UserM_UserGroupID"`
|
||||
M_UserGroupID int `db:"M_UserGroupID"`
|
||||
M_UserGroupCode string `db:"M_UserGroupCode"`
|
||||
M_UserGroupName string `db:"M_UserGroupName"`
|
||||
}
|
||||
780
services/dev/mastermenuuser.services.go
Normal file
780
services/dev/mastermenuuser.services.go
Normal file
@@ -0,0 +1,780 @@
|
||||
package dev_services
|
||||
|
||||
import (
|
||||
"cpone/db"
|
||||
"cpone/models"
|
||||
"fmt"
|
||||
|
||||
dbx "cpone/package/database"
|
||||
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
func NewServicesMasterMenuUser(uStore db.AppStore) *ServicesMasterMenuUser {
|
||||
|
||||
return &ServicesMasterMenuUser{
|
||||
|
||||
MasterMenuUserStore: uStore,
|
||||
}
|
||||
}
|
||||
|
||||
type ServicesMasterMenuUser struct {
|
||||
MasterMenuUserStore db.AppStore
|
||||
}
|
||||
|
||||
func (su *ServicesMasterMenuUser) GetMasterMenus() ([]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
|
||||
}
|
||||
|
||||
func (ug *ServicesMasterMenuUser) 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 (su *ServicesMasterMenuUser) GetListBreadCrumb(title string) (models.BreadCrumbV1, error) {
|
||||
var ret models.BreadCrumbV1
|
||||
|
||||
dummyBreadcrumb := []models.BreadCrumbV1{
|
||||
{
|
||||
Title: "Master User Group",
|
||||
Item: []models.ItemBreadCrumbV1{
|
||||
{
|
||||
Item: "Dashboard",
|
||||
Url: "/dev/dashboard",
|
||||
},
|
||||
{
|
||||
Item: "Master",
|
||||
Url: "/dev/master",
|
||||
},
|
||||
{
|
||||
Item: "User Group",
|
||||
Url: "",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
Title: "Master User",
|
||||
Item: []models.ItemBreadCrumbV1{
|
||||
{
|
||||
Item: "Dashboard",
|
||||
Url: "/dev/dashboard",
|
||||
},
|
||||
{
|
||||
Item: "Master",
|
||||
Url: "/dev/master",
|
||||
},
|
||||
{
|
||||
Item: "User",
|
||||
Url: "",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
for _, breadcrumb := range dummyBreadcrumb {
|
||||
// if utils.Contains(breadcrumb.Title, title) {
|
||||
// ret = breadcrumb
|
||||
// return ret, nil
|
||||
// }
|
||||
if breadcrumb.Title == title {
|
||||
ret = breadcrumb
|
||||
return ret, nil
|
||||
}
|
||||
}
|
||||
|
||||
return ret, nil
|
||||
}
|
||||
|
||||
// try
|
||||
func (su *ServicesMasterMenuUser) GetListMasterUser(searchDropdown string) ([]models.MasterUser, error) {
|
||||
var userList []models.MasterUser
|
||||
|
||||
query := `
|
||||
SELECT
|
||||
ROW_NUMBER() OVER () AS nomor,
|
||||
IFNULL(M_UserEmail, '') AS M_UserEmail,
|
||||
IFNULL(M_UserFullName, '') AS M_UserFullName,
|
||||
IFNULL(M_UserLastAccess, '') AS M_UserLastAccess,
|
||||
IFNULL(M_UserIsLoggedIn, '') AS M_UserIsLoggedIn,
|
||||
IFNULL(M_UserActiveToken, '') AS M_UserActiveToken,
|
||||
IFNULL(M_UserExpiredToken, '') AS M_UserExpiredToken,
|
||||
IFNULL(M_UserIsActive, '') AS M_UserIsActive,
|
||||
IFNULL(M_UserCreated, '') AS M_UserCreated,
|
||||
IFNULL(M_UserCreatedUserID, '') AS M_UserCreatedUserID,
|
||||
IFNULL(M_UserLastUpdated, '') AS M_UserLastUpdated,
|
||||
IFNULL(M_UserLastUpdatedUserID, '') AS M_UserLastUpdatedUserID,
|
||||
IFNULL(M_UserDeletedUserID, '') AS M_UserDeletedUserID,
|
||||
IFNULL(M_UserDeleted, '') AS M_UserDeleted,
|
||||
IFNULL(M_UserGroupCode, '') AS M_UserGroupCode,
|
||||
IFNULL(M_UserGroupName, '') AS M_UserGroupName,
|
||||
IFNULL(M_UserM_UserGroupID, '') AS M_UserM_UserGroupID,
|
||||
IFNULL(M_UserGroupID, '') AS M_UserGroupID
|
||||
FROM
|
||||
m_user
|
||||
JOIN m_usergroup
|
||||
ON M_UserM_UserGroupID = M_UserGroupID
|
||||
AND M_UserIsActive = 'Y'
|
||||
AND M_UserGroupIsActive = 'Y'
|
||||
`
|
||||
|
||||
if searchDropdown != "0" && searchDropdown != "" {
|
||||
query += fmt.Sprintf("AND M_UserGroupID = '%s'", searchDropdown)
|
||||
}
|
||||
|
||||
query += " ORDER BY M_UserID ASC"
|
||||
|
||||
if err := dbx.Handlex.Select(&userList, query); err != nil {
|
||||
return nil, fmt.Errorf("error querying database: %v", err)
|
||||
}
|
||||
|
||||
return userList, nil
|
||||
}
|
||||
|
||||
func (su *ServicesMasterMenuUser) GetListMasterUserFilteredBySearch(search string, searchDropdown string) ([]models.MasterUser, error) {
|
||||
var userList []models.MasterUser
|
||||
|
||||
query := `
|
||||
SELECT
|
||||
ROW_NUMBER() OVER () AS nomor,
|
||||
M_UserID,
|
||||
IFNULL(M_UserEmail, '') AS M_UserEmail,
|
||||
IFNULL(M_UserFullName, '') AS M_UserFullName,
|
||||
IFNULL(M_UserLastAccess, '') AS M_UserLastAccess,
|
||||
IFNULL(M_UserIsLoggedIn, '') AS M_UserIsLoggedIn,
|
||||
IFNULL(M_UserActiveToken, '') AS M_UserActiveToken,
|
||||
IFNULL(M_UserExpiredToken, '') AS M_UserExpiredToken,
|
||||
IFNULL(M_UserIsActive, '') AS M_UserIsActive,
|
||||
IFNULL(M_UserCreated, '') AS M_UserCreated,
|
||||
IFNULL(M_UserCreatedUserID, '') AS M_UserCreatedUserID,
|
||||
IFNULL(M_UserLastUpdated, '') AS M_UserLastUpdated,
|
||||
IFNULL(M_UserLastUpdatedUserID, '') AS M_UserLastUpdatedUserID,
|
||||
IFNULL(M_UserDeletedUserID, '') AS M_UserDeletedUserID,
|
||||
IFNULL(M_UserDeleted, '') AS M_UserDeleted,
|
||||
IFNULL(M_UserGroupCode, '') AS M_UserGroupCode,
|
||||
IFNULL(M_UserGroupName, '') AS M_UserGroupName,
|
||||
IFNULL(M_UserM_UserGroupID, '') AS M_UserM_UserGroupID,
|
||||
IFNULL(M_UserGroupID, '') AS M_UserGroupID
|
||||
FROM
|
||||
m_user
|
||||
JOIN m_usergroup
|
||||
ON M_UserM_UserGroupID = M_UserGroupID
|
||||
AND M_UserIsActive = 'Y'
|
||||
AND M_UserGroupIsActive = 'Y'
|
||||
`
|
||||
|
||||
// check jika parameter search nya tidak kosong
|
||||
if search != "" || (searchDropdown != "0" && searchDropdown != "") {
|
||||
query += fmt.Sprintf(" AND (M_UserFullName LIKE '%%%s%%' OR M_UserEmail LIKE '%%%s%%')", search, search)
|
||||
}
|
||||
|
||||
if searchDropdown != "0" && searchDropdown != "" {
|
||||
query += fmt.Sprintf(" AND M_UserGroupID = '%s' ", searchDropdown)
|
||||
} else {
|
||||
search = "%%"
|
||||
}
|
||||
|
||||
query += " ORDER BY M_UserID ASC"
|
||||
|
||||
logger, _ := zap.NewProduction()
|
||||
defer logger.Sync()
|
||||
logger.Info("QUERY SEARCH ONlY FOR COUNT TOTAL PAGES PAGINATION",
|
||||
zap.String("query search", query),
|
||||
)
|
||||
|
||||
if err := dbx.Handlex.Select(&userList, query); err != nil {
|
||||
return nil, fmt.Errorf("error querying database: %v", err)
|
||||
}
|
||||
|
||||
return userList, nil
|
||||
}
|
||||
|
||||
func (su *ServicesMasterMenuUser) GetListMasterUserPagination(search string, searchDropdown string, currentPage int, rowPerPage int) ([]models.MasterUser, error) {
|
||||
var userList []models.MasterUser
|
||||
|
||||
query := `
|
||||
SELECT
|
||||
ROW_NUMBER() OVER () AS nomor,
|
||||
M_UserID,
|
||||
IFNULL(M_UserEmail, '') AS M_UserEmail,
|
||||
IFNULL(M_UserFullName, '') AS M_UserFullName,
|
||||
IFNULL(M_UserLastAccess, '') AS M_UserLastAccess,
|
||||
IFNULL(M_UserIsLoggedIn, '') AS M_UserIsLoggedIn,
|
||||
IFNULL(M_UserActiveToken, '') AS M_UserActiveToken,
|
||||
IFNULL(M_UserExpiredToken, '') AS M_UserExpiredToken,
|
||||
IFNULL(M_UserIsActive, '') AS M_UserIsActive,
|
||||
IFNULL(M_UserCreated, '') AS M_UserCreated,
|
||||
IFNULL(M_UserCreatedUserID, '') AS M_UserCreatedUserID,
|
||||
IFNULL(M_UserLastUpdated, '') AS M_UserLastUpdated,
|
||||
IFNULL(M_UserLastUpdatedUserID, '') AS M_UserLastUpdatedUserID,
|
||||
IFNULL(M_UserDeletedUserID, '') AS M_UserDeletedUserID,
|
||||
IFNULL(M_UserDeleted, '') AS M_UserDeleted,
|
||||
IFNULL(M_UserGroupCode, '') AS M_UserGroupCode,
|
||||
IFNULL(M_UserGroupName, '') AS M_UserGroupName,
|
||||
IFNULL(M_UserM_UserGroupID, '') AS M_UserM_UserGroupID,
|
||||
IFNULL(M_UserGroupID, '') AS M_UserGroupID
|
||||
FROM
|
||||
m_user
|
||||
JOIN m_usergroup
|
||||
ON M_UserM_UserGroupID = M_UserGroupID
|
||||
AND M_UserIsActive = 'Y'
|
||||
AND M_UserGroupIsActive = 'Y'
|
||||
`
|
||||
|
||||
// rmaxPerPage := 2
|
||||
// rpage := (currentPage - 1) * rmaxPerPage
|
||||
|
||||
offset := (currentPage - 1) * rowPerPage
|
||||
// offset := currentPage
|
||||
|
||||
if search != "" {
|
||||
query += fmt.Sprintf(" AND (M_UserEmail LIKE '%%%s%%' OR M_UserFullName LIKE '%%%s%%')", search, search)
|
||||
}
|
||||
if searchDropdown != "0" && searchDropdown != "" {
|
||||
query += fmt.Sprintf(" AND M_UserGroupID = '%s' ", searchDropdown)
|
||||
} else {
|
||||
search = "%%"
|
||||
}
|
||||
|
||||
query += fmt.Sprintf(" ORDER BY M_UserID ASC LIMIT %d OFFSET %d", rowPerPage, offset)
|
||||
|
||||
logger, _ := zap.NewProduction()
|
||||
defer logger.Sync()
|
||||
logger.Info("QUERY SEARCH WITH PAGINATION",
|
||||
zap.String("query search", query),
|
||||
)
|
||||
|
||||
if err := dbx.Handlex.Select(&userList, query); err != nil {
|
||||
return nil, fmt.Errorf("error querying database: %v", err)
|
||||
}
|
||||
|
||||
return userList, nil
|
||||
}
|
||||
|
||||
func (su *ServicesMasterMenuUser) GetListMasterUserGroupSearch() ([]models.UserGroupV1, error) {
|
||||
var userGroupList []models.UserGroupV1
|
||||
|
||||
query := `
|
||||
SELECT
|
||||
ROW_NUMBER() OVER () AS nomor,
|
||||
M_UserGroupID,
|
||||
M_UserGroupCode,
|
||||
M_UserGroupName,
|
||||
M_UserGroupCreated,
|
||||
M_UserGroupLastUpdated,
|
||||
M_UserGroupIsActive
|
||||
FROM m_usergroup
|
||||
WHERE M_UserGroupIsActive = 'Y'
|
||||
`
|
||||
query += " order by M_UserGroupID ASC"
|
||||
|
||||
if err := dbx.Handlex.Select(&userGroupList, query); err != nil {
|
||||
return nil, fmt.Errorf("error querying database: %v", err)
|
||||
}
|
||||
|
||||
return userGroupList, nil
|
||||
}
|
||||
|
||||
// versi 2
|
||||
229
views/dev/mastermenuuser/mastermenuuser.templ
Normal file
229
views/dev/mastermenuuser/mastermenuuser.templ
Normal file
@@ -0,0 +1,229 @@
|
||||
package mastermenuuser
|
||||
|
||||
import (
|
||||
"cpone/layout"
|
||||
"cpone/models"
|
||||
"cpone/component/modal"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
// "cpone/component/sidebar_user_profile"
|
||||
templ ContentMasterMenuUserV1(contentID string, breadcrumb templ.Component, tablecontent templ.Component, inputanSearch templ.Component) {
|
||||
<div class="container-fluid">
|
||||
<div class="row align-items-center mb-10">
|
||||
<div class="col-md-10 col-sm-12 p-0 ">
|
||||
@breadcrumb
|
||||
</div>
|
||||
<div class="col-md-2 d-none d-lg-block d-xl-block d-md-block d-sm-none">
|
||||
// <div class="d-block align-items-center">
|
||||
<div class="d-flex justify-content-end">
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-primary"
|
||||
data-toggle="modal"
|
||||
data-target="#dialogNew"
|
||||
>Add New</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2 d-block d-lg-none d-xl-none d-md-none d-sm-block justify-content-center px-5">
|
||||
<button type="button" class="btn btn-primary btn-block">Add New</button>
|
||||
</div>
|
||||
</div>
|
||||
// table content
|
||||
@tablecontent
|
||||
<div class="d-flex justify-content-center text-primary">
|
||||
<div class="htmx-indicator spinner-border" role="status" id="indicator">
|
||||
<span class="sr-only"></span>
|
||||
</div>
|
||||
</div>
|
||||
@modalcomponent.Modal("dialogNew", "New - User", DialogNewBody("", ""), DialogNewAction(), BtnCloseNew())
|
||||
@modalcomponent.Modal("dialogEdit", "Edit - User", DialogEditBody("", ""), DialogEditAction(), BtnCloseNew())
|
||||
@JSkuMasterUserV1()
|
||||
</div>
|
||||
}
|
||||
|
||||
templ TableRowMasterUserV1(data []models.MasterUser) {
|
||||
// /usergroup/edit
|
||||
// <a
|
||||
// id="btneditug"
|
||||
// type="button"
|
||||
// class="btneditusgp col-12 col-sm-12 col-md-12 col-lg-5 col-xl-5 col-xxl-5 btn btn-light-tosca mb-2"
|
||||
// onclick="htmx.trigger('#btneditug', 'htmx:abort')"
|
||||
// hx-target="#modalbdyEdit"
|
||||
// hx-swap="innerHTML"
|
||||
// hx-get={ "/client/usergroup/edit?id=" + strconv.Itoa(v.UserGroupID) }
|
||||
// hx-on::before-request="ShowLoading()"
|
||||
// hx-on::after-request="ShowForm()"
|
||||
// data-toggle="modal"
|
||||
// data-target="#dialogEdit"
|
||||
// >
|
||||
// Edit
|
||||
// </a>
|
||||
if len(data) == 0 {
|
||||
<tr>
|
||||
<td colspan="4" class="text-center">Data Tidak Ditemukan</td>
|
||||
</tr>
|
||||
}
|
||||
for _, v := range data {
|
||||
<tr>
|
||||
<td>{ v.M_UserEmail }</td>
|
||||
<td>{ v.M_UserFullName }</td>
|
||||
<td>{ v.M_UserGroupName }</td>
|
||||
<td>
|
||||
<div class="row px-5 d-flex justify-content-around">
|
||||
<a
|
||||
id="btneditug"
|
||||
type="button"
|
||||
class="btneditusgp col-12 col-sm-12 col-md-12 col-lg-5 col-xl-5 col-xxl-5 btn btn-light-tosca mb-2"
|
||||
data-toggle="modal"
|
||||
data-target={ "#dialogEdit" + strconv.Itoa(v.M_UserID) }
|
||||
>
|
||||
Edit
|
||||
</a>
|
||||
<a
|
||||
type="button"
|
||||
class="col-12 col-sm-12 col-md-12 col-lg-5 col-xl-5 col-xxl-5 btn btn-light-danger mb-2"
|
||||
data-toggle="modal"
|
||||
data-target={ "#dialogDelete" + strconv.Itoa(v.M_UserID) }
|
||||
>Hapus</a>
|
||||
@modalcomponent.Modal("dialogEdit"+strconv.Itoa(v.M_UserID),
|
||||
"Edit - User",
|
||||
DialogEditBody(v.M_UserGroupCode, v.M_UserGroupName),
|
||||
DialogEditAction(),
|
||||
BtnCloseNew())
|
||||
@modalcomponent.ModalConfirmation(
|
||||
"dialogDelete"+strconv.Itoa(v.M_UserID),
|
||||
"Konfirmasi",
|
||||
"Apakah anda yakin menghapus user berikut ?", BtnCloseDeleteMasterUserV1(),
|
||||
[]string{"Email", "Nama Staff", "User Group"}, []string{v.M_UserEmail, v.M_UserFullName, v.M_UserGroupName}, DialogDeleteMasterUserActionV1())
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
|
||||
templ DialogDeleteMasterUserActionV1() {
|
||||
<div>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-outline-secondary font-weight-bolder rounded-lg mr-4"
|
||||
data-dismiss="modal"
|
||||
>
|
||||
Batal
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-primary btn-shadow font-weight-bold rounded-lg"
|
||||
>
|
||||
Yakin
|
||||
</button>
|
||||
</div>
|
||||
}
|
||||
|
||||
templ BtnCloseDeleteMasterUserV1() {
|
||||
<button
|
||||
type="button"
|
||||
class="close"
|
||||
data-dismiss="modal"
|
||||
aria-label="Close"
|
||||
>
|
||||
<i aria-hidden="true" class="ki ki-close"></i>
|
||||
</button>
|
||||
}
|
||||
|
||||
templ JSkuMasterUserV1() {
|
||||
<script>
|
||||
function ShowLoading(evt) {
|
||||
document
|
||||
.getElementById("modalLoadEdit")
|
||||
.setAttribute("style", "display:block !important;");
|
||||
document
|
||||
.getElementById("modalbdyEdit")
|
||||
.setAttribute("style", "display:none !important;");
|
||||
console.log(evt);
|
||||
}
|
||||
function ShowForm() {
|
||||
document
|
||||
.getElementById("modalLoadEdit")
|
||||
.setAttribute("style", "display:none !important;");
|
||||
document
|
||||
.getElementById("modalbdyEdit")
|
||||
.setAttribute("style", "display:block !important;;");
|
||||
}
|
||||
</script>
|
||||
}
|
||||
|
||||
templ PaginationMasterUserV1() {
|
||||
<div class="d-flex justify-content-between align-items-center flex-wrap">
|
||||
<div class="d-flex flex-wrap py-2 mr-3">
|
||||
<a href="#" class="btn btn-icon btn-sm btn-light mr-2 my-1"><i class="ki ki-bold-double-arrow-back icon-xs"></i></a>
|
||||
<a href="#" class="btn btn-icon btn-sm btn-light mr-2 my-1"><i class="ki ki-bold-arrow-back icon-xs"></i></a>
|
||||
<a href="#" class="btn btn-icon btn-sm border-0 btn-light mr-2 my-1">...</a>
|
||||
<a href="#" class="btn btn-icon btn-sm border-0 btn-light mr-2 my-1">23</a>
|
||||
<a href="#" class="btn btn-icon btn-sm border-0 btn-light btn-hover-primary active mr-2 my-1">24</a>
|
||||
<a href="#" class="btn btn-icon btn-sm border-0 btn-light mr-2 my-1">25</a>
|
||||
<a href="#" class="btn btn-icon btn-sm border-0 btn-light mr-2 my-1">26</a>
|
||||
<a href="#" class="btn btn-icon btn-sm border-0 btn-light mr-2 my-1">27</a>
|
||||
<a href="#" class="btn btn-icon btn-sm border-0 btn-light mr-2 my-1">28</a>
|
||||
<a href="#" class="btn btn-icon btn-sm border-0 btn-light mr-2 my-1">...</a>
|
||||
<a href="#" class="btn btn-icon btn-sm btn-light mr-2 my-1"><i class="ki ki-bold-arrow-next icon-xs"></i></a>
|
||||
<a href="#" class="btn btn-icon btn-sm btn-light mr-2 my-1"><i class="ki ki-bold-double-arrow-next icon-xs"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
templ CssMasterMenuUserV1x() {
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="assets/css/googlefont/poppins.css"
|
||||
/>
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="assets/css/googlefont/publicsans.css"
|
||||
/>
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="assets/css/googlefont/roboto.css"
|
||||
/>
|
||||
<style>
|
||||
body {
|
||||
background-color: white;
|
||||
/* padding-right: 100px;
|
||||
padding-left: 100px; */
|
||||
}
|
||||
#div-chart {
|
||||
/* overflow-x: scroll; */
|
||||
margin: 40px 10vw 40px 10vw;
|
||||
}
|
||||
.title {
|
||||
font-size:20px;
|
||||
font-weight: bold;
|
||||
}
|
||||
#title {
|
||||
font-weight: 600;
|
||||
}
|
||||
</style>
|
||||
}
|
||||
|
||||
templ JsMasterMenuUserV1x() {
|
||||
}
|
||||
|
||||
// for item dropdown
|
||||
templ ItemDropdown(dataDropdown []models.UserGroupV1) {
|
||||
if len(dataDropdown) == 0 {
|
||||
<option value="0" disabled selected>Tidak Ada Data</option>
|
||||
} else {
|
||||
for _, v := range dataDropdown {
|
||||
<option value={ strconv.Itoa(v.M_UserGroupID) }>{ v.M_UserGroupName }</option>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
templ ShowMasterMenuUserV1x(title string, cmp templ.Component, css templ.Component, js templ.Component,
|
||||
navbarmenu templ.Component,
|
||||
navbaruser templ.Component,
|
||||
userprofile templ.Component) {
|
||||
@layout.CorporateLayout(title, css, js, navbarmenu, navbaruser, userprofile) {
|
||||
@cmp
|
||||
}
|
||||
}
|
||||
434
views/dev/mastermenuuser/mastermenuuser_templ.go
Normal file
434
views/dev/mastermenuuser/mastermenuuser_templ.go
Normal file
@@ -0,0 +1,434 @@
|
||||
// Code generated by templ - DO NOT EDIT.
|
||||
|
||||
// templ: version: v0.2.663
|
||||
package mastermenuuser
|
||||
|
||||
//lint:file-ignore SA4006 This context is only used if a nested component is present.
|
||||
|
||||
import "github.com/a-h/templ"
|
||||
import "context"
|
||||
import "io"
|
||||
import "bytes"
|
||||
|
||||
import (
|
||||
"cpone/component/modal"
|
||||
"cpone/layout"
|
||||
"cpone/models"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
// "cpone/component/sidebar_user_profile"
|
||||
func ContentMasterMenuUserV1(contentID string, breadcrumb templ.Component, tablecontent templ.Component, inputanSearch 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("<div class=\"container-fluid\"><div class=\"row align-items-center mb-10\"><div class=\"col-md-10 col-sm-12 p-0 \">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = breadcrumb.Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div><div class=\"col-md-2 d-none d-lg-block d-xl-block d-md-block d-sm-none\"><div class=\"d-flex justify-content-end\"><button type=\"button\" class=\"btn btn-primary\" data-toggle=\"modal\" data-target=\"#dialogNew\">Add New</button></div></div><div class=\"col-md-2 d-block d-lg-none d-xl-none d-md-none d-sm-block justify-content-center px-5\"><button type=\"button\" class=\"btn btn-primary btn-block\">Add New</button></div></div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = tablecontent.Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"d-flex justify-content-center text-primary\"><div class=\"htmx-indicator spinner-border\" role=\"status\" id=\"indicator\"><span class=\"sr-only\"></span></div></div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = modalcomponent.Modal("dialogNew", "New - User", 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", DialogEditBody("", ""), DialogEditAction(), BtnCloseNew()).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = JSkuMasterUserV1().Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div>")
|
||||
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 TableRowMasterUserV1(data []models.MasterUser) 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)
|
||||
if len(data) == 0 {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<tr><td colspan=\"4\" class=\"text-center\">Data Tidak Ditemukan</td></tr>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
}
|
||||
for _, v := range data {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<tr><td>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var3 string
|
||||
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(v.M_UserEmail)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mastermenuuser\mastermenuuser.templ`, Line: 69, Col: 22}
|
||||
}
|
||||
_, 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("</td><td>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var4 string
|
||||
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(v.M_UserFullName)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mastermenuuser\mastermenuuser.templ`, Line: 70, Col: 25}
|
||||
}
|
||||
_, 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("</td><td>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var5 string
|
||||
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(v.M_UserGroupName)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mastermenuuser\mastermenuuser.templ`, Line: 71, Col: 26}
|
||||
}
|
||||
_, 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("</td><td><div class=\"row px-5 d-flex justify-content-around\"><a id=\"btneditug\" type=\"button\" class=\"btneditusgp col-12 col-sm-12 col-md-12 col-lg-5 col-xl-5 col-xxl-5 btn btn-light-tosca mb-2\" data-toggle=\"modal\" data-target=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var6 string
|
||||
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs("#dialogEdit" + strconv.Itoa(v.M_UserID))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mastermenuuser\mastermenuuser.templ`, Line: 79, Col: 60}
|
||||
}
|
||||
_, 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("\">Edit\r</a> <a type=\"button\" class=\"col-12 col-sm-12 col-md-12 col-lg-5 col-xl-5 col-xxl-5 btn btn-light-danger mb-2\" data-toggle=\"modal\" data-target=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var7 string
|
||||
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs("#dialogDelete" + strconv.Itoa(v.M_UserID))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mastermenuuser\mastermenuuser.templ`, Line: 87, Col: 62}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\">Hapus</a>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = modalcomponent.Modal("dialogEdit"+strconv.Itoa(v.M_UserID),
|
||||
"Edit - User",
|
||||
DialogEditBody(v.M_UserGroupCode, v.M_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.M_UserID),
|
||||
"Konfirmasi",
|
||||
"Apakah anda yakin menghapus user berikut ?", BtnCloseDeleteMasterUserV1(),
|
||||
[]string{"Email", "Nama Staff", "User Group"}, []string{v.M_UserEmail, v.M_UserFullName, v.M_UserGroupName}, DialogDeleteMasterUserActionV1()).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div></td></tr>")
|
||||
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 DialogDeleteMasterUserActionV1() 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("<div><button type=\"button\" class=\"btn btn-outline-secondary font-weight-bolder rounded-lg mr-4\" data-dismiss=\"modal\">Batal\r</button> <button type=\"button\" class=\"btn btn-primary btn-shadow font-weight-bold rounded-lg\">Yakin\r</button></div>")
|
||||
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 BtnCloseDeleteMasterUserV1() 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("<button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><i aria-hidden=\"true\" class=\"ki ki-close\"></i></button>")
|
||||
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 JSkuMasterUserV1() 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_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("<script>\r\n\t\t function ShowLoading(evt) {\r\n document\r\n .getElementById(\"modalLoadEdit\")\r\n .setAttribute(\"style\", \"display:block !important;\");\r\n document\r\n .getElementById(\"modalbdyEdit\")\r\n .setAttribute(\"style\", \"display:none !important;\");\r\n\t\t console.log(evt);\r\n }\r\n function ShowForm() {\r\n document\r\n .getElementById(\"modalLoadEdit\")\r\n .setAttribute(\"style\", \"display:none !important;\");\r\n document\r\n .getElementById(\"modalbdyEdit\")\r\n .setAttribute(\"style\", \"display:block !important;;\");\r\n }\r\n\t</script>")
|
||||
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 PaginationMasterUserV1() templ.Component {
|
||||
return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer)
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
templ_7745c5c3_Buffer = templ.GetBuffer()
|
||||
defer templ.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
templ_7745c5c3_Var11 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var11 == nil {
|
||||
templ_7745c5c3_Var11 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"d-flex justify-content-between align-items-center flex-wrap\"><div class=\"d-flex flex-wrap py-2 mr-3\"><a href=\"#\" class=\"btn btn-icon btn-sm btn-light mr-2 my-1\"><i class=\"ki ki-bold-double-arrow-back icon-xs\"></i></a> <a href=\"#\" class=\"btn btn-icon btn-sm btn-light mr-2 my-1\"><i class=\"ki ki-bold-arrow-back icon-xs\"></i></a> <a href=\"#\" class=\"btn btn-icon btn-sm border-0 btn-light mr-2 my-1\">...</a> <a href=\"#\" class=\"btn btn-icon btn-sm border-0 btn-light mr-2 my-1\">23</a> <a href=\"#\" class=\"btn btn-icon btn-sm border-0 btn-light btn-hover-primary active mr-2 my-1\">24</a> <a href=\"#\" class=\"btn btn-icon btn-sm border-0 btn-light mr-2 my-1\">25</a> <a href=\"#\" class=\"btn btn-icon btn-sm border-0 btn-light mr-2 my-1\">26</a> <a href=\"#\" class=\"btn btn-icon btn-sm border-0 btn-light mr-2 my-1\">27</a> <a href=\"#\" class=\"btn btn-icon btn-sm border-0 btn-light mr-2 my-1\">28</a> <a href=\"#\" class=\"btn btn-icon btn-sm border-0 btn-light mr-2 my-1\">...</a> <a href=\"#\" class=\"btn btn-icon btn-sm btn-light mr-2 my-1\"><i class=\"ki ki-bold-arrow-next icon-xs\"></i></a> <a href=\"#\" class=\"btn btn-icon btn-sm btn-light mr-2 my-1\"><i class=\"ki ki-bold-double-arrow-next icon-xs\"></i></a></div></div>")
|
||||
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 CssMasterMenuUserV1x() 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_Var12 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var12 == nil {
|
||||
templ_7745c5c3_Var12 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<link rel=\"stylesheet\" href=\"assets/css/googlefont/poppins.css\"><link rel=\"stylesheet\" href=\"assets/css/googlefont/publicsans.css\"><link rel=\"stylesheet\" href=\"assets/css/googlefont/roboto.css\"><style>\r\n body {\r\n background-color: white;\r\n /* padding-right: 100px;\r\n padding-left: 100px; */\r\n }\r\n #div-chart {\r\n /* overflow-x: scroll; */\r\n margin: 40px 10vw 40px 10vw;\r\n }\r\n .title {\r\n font-size:20px;\r\n font-weight: bold;\r\n }\r\n #title {\r\n font-weight: 600;\r\n }\r\n</style>")
|
||||
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 JsMasterMenuUserV1x() 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_Var13 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var13 == nil {
|
||||
templ_7745c5c3_Var13 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_W)
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
// for item dropdown
|
||||
func ItemDropdown(dataDropdown []models.UserGroupV1) templ.Component {
|
||||
return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer)
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
templ_7745c5c3_Buffer = templ.GetBuffer()
|
||||
defer templ.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
templ_7745c5c3_Var14 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var14 == nil {
|
||||
templ_7745c5c3_Var14 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
if len(dataDropdown) == 0 {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<option value=\"0\" disabled selected>Tidak Ada Data</option>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
} else {
|
||||
for _, v := range dataDropdown {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<option value=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var15 string
|
||||
templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(v.M_UserGroupID))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mastermenuuser\mastermenuuser.templ`, Line: 217, Col: 48}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15))
|
||||
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_Var16 string
|
||||
templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs(v.M_UserGroupName)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mastermenuuser\mastermenuuser.templ`, Line: 217, Col: 70}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</option>")
|
||||
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 ShowMasterMenuUserV1x(title string, cmp templ.Component, css templ.Component, js templ.Component,
|
||||
navbarmenu templ.Component,
|
||||
navbaruser templ.Component,
|
||||
userprofile templ.Component) templ.Component {
|
||||
return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer)
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
templ_7745c5c3_Buffer = templ.GetBuffer()
|
||||
defer templ.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
templ_7745c5c3_Var17 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var17 == nil {
|
||||
templ_7745c5c3_Var17 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
templ_7745c5c3_Var18 := 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, navbarmenu, navbaruser, userprofile).Render(templ.WithChildren(ctx, templ_7745c5c3_Var18), 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
|
||||
})
|
||||
}
|
||||
56
views/dev/mastermenuuser/modaladduser.templ
Normal file
56
views/dev/mastermenuuser/modaladduser.templ
Normal file
@@ -0,0 +1,56 @@
|
||||
package mastermenuuser
|
||||
|
||||
import (
|
||||
"cpone/models"
|
||||
"cpone/component/customtextfield"
|
||||
)
|
||||
|
||||
templ DialogNewBody(code string, name string) {
|
||||
<div id="modalbdy">
|
||||
@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,
|
||||
})
|
||||
</div>
|
||||
}
|
||||
|
||||
templ DialogNewAction() {
|
||||
<div>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-outline-secondary font-weight-bolder rounded-lg mr-4"
|
||||
data-dismiss="modal"
|
||||
>
|
||||
Batal
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-primary btn-shadow font-weight-bold rounded-lg"
|
||||
>
|
||||
Save changes
|
||||
</button>
|
||||
</div>
|
||||
}
|
||||
|
||||
templ BtnCloseNew() {
|
||||
<button
|
||||
type="button"
|
||||
class="close"
|
||||
data-dismiss="modal"
|
||||
aria-label="Close"
|
||||
>
|
||||
<i aria-hidden="true" class="ki ki-close"></i>
|
||||
</button>
|
||||
}
|
||||
114
views/dev/mastermenuuser/modaladduser_templ.go
Normal file
114
views/dev/mastermenuuser/modaladduser_templ.go
Normal file
@@ -0,0 +1,114 @@
|
||||
// Code generated by templ - DO NOT EDIT.
|
||||
|
||||
// templ: version: v0.2.663
|
||||
package mastermenuuser
|
||||
|
||||
//lint:file-ignore SA4006 This context is only used if a nested component is present.
|
||||
|
||||
import "github.com/a-h/templ"
|
||||
import "context"
|
||||
import "io"
|
||||
import "bytes"
|
||||
|
||||
import (
|
||||
"cpone/component/customtextfield"
|
||||
"cpone/models"
|
||||
)
|
||||
|
||||
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("<div id=\"modalbdy\">")
|
||||
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("</div>")
|
||||
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("<div><button type=\"button\" class=\"btn btn-outline-secondary font-weight-bolder rounded-lg mr-4\" data-dismiss=\"modal\">Batal\r</button> <button type=\"button\" class=\"btn btn-primary btn-shadow font-weight-bold rounded-lg\">Save changes\r</button></div>")
|
||||
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("<button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><i aria-hidden=\"true\" class=\"ki ki-close\"></i></button>")
|
||||
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
|
||||
})
|
||||
}
|
||||
79
views/dev/mastermenuuser/modaledituser.templ
Normal file
79
views/dev/mastermenuuser/modaledituser.templ
Normal file
@@ -0,0 +1,79 @@
|
||||
package mastermenuuser
|
||||
|
||||
import (
|
||||
"cpone/models"
|
||||
"cpone/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) {
|
||||
<div id="modalbdyEdit">
|
||||
@DialogEditForm(code, name)
|
||||
</div>
|
||||
<div>
|
||||
// <div class="text-center text-primary" id="modalLoadEdit" style="">
|
||||
// <div class="spinner-border" role="status"></div>
|
||||
// </div>
|
||||
</div>
|
||||
}
|
||||
|
||||
templ LoadingSpinner() {
|
||||
<div id="modalbdyEdit">
|
||||
<div class="text-center text-primary">
|
||||
<div class="spinner-border" role="status"></div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
templ DialogEditAction() {
|
||||
<div>
|
||||
<button
|
||||
id="btledit"
|
||||
type="button"
|
||||
hx-swap="delete"
|
||||
hx-target="#modalbdyEdit"
|
||||
onclick="htmx.trigger('.btneditusgp', 'htmx:abort')"
|
||||
class="btn btn-outline-secondary font-weight-bolder rounded-lg mr-4"
|
||||
data-dismiss="modal"
|
||||
>
|
||||
Batal
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-primary btn-shadow font-weight-bold rounded-lg"
|
||||
>
|
||||
Save changes
|
||||
</button>
|
||||
</div>
|
||||
}
|
||||
|
||||
templ BtnCloseEdit() {
|
||||
<button
|
||||
type="button"
|
||||
class="close"
|
||||
data-dismiss="modal"
|
||||
aria-label="Close"
|
||||
hx-target="#modalbdyEdit"
|
||||
onclick="htmx.trigger('.btneditusgp', 'htmx:abort')"
|
||||
>
|
||||
<i aria-hidden="true" class="ki ki-close"></i>
|
||||
</button>
|
||||
}
|
||||
162
views/dev/mastermenuuser/modaledituser_templ.go
Normal file
162
views/dev/mastermenuuser/modaledituser_templ.go
Normal file
@@ -0,0 +1,162 @@
|
||||
// Code generated by templ - DO NOT EDIT.
|
||||
|
||||
// templ: version: v0.2.663
|
||||
package mastermenuuser
|
||||
|
||||
//lint:file-ignore SA4006 This context is only used if a nested component is present.
|
||||
|
||||
import "github.com/a-h/templ"
|
||||
import "context"
|
||||
import "io"
|
||||
import "bytes"
|
||||
|
||||
import (
|
||||
"cpone/component/customtextfield"
|
||||
"cpone/models"
|
||||
)
|
||||
|
||||
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("<div id=\"modalbdyEdit\">")
|
||||
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("</div><div></div>")
|
||||
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("<div id=\"modalbdyEdit\"><div class=\"text-center text-primary\"><div class=\"spinner-border\" role=\"status\"></div></div></div>")
|
||||
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("<div><button id=\"btledit\" type=\"button\" hx-swap=\"delete\" hx-target=\"#modalbdyEdit\" onclick=\"htmx.trigger('.btneditusgp', 'htmx:abort')\" class=\"btn btn-outline-secondary font-weight-bolder rounded-lg mr-4\" data-dismiss=\"modal\">Batal\r</button> <button type=\"button\" class=\"btn btn-primary btn-shadow font-weight-bold rounded-lg\">Save changes\r</button></div>")
|
||||
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("<button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\" hx-target=\"#modalbdyEdit\" onclick=\"htmx.trigger('.btneditusgp', 'htmx:abort')\"><i aria-hidden=\"true\" class=\"ki ki-close\"></i></button>")
|
||||
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
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user