Commit fcb3554c authored by đinh thị đầm's avatar đinh thị đầm

Merge branch 'dinhdam'

# Conflicts:
#	pom.xml
#	src/main/resources/public/pages/homepage/catagoriManagements.html
#	src/main/resources/public/pages/homepage/homeController.js
#	src/main/resources/public/pages/homepage/homepage.html
#	src/main/resources/public/pages/homepage/newsManagements.html
#	src/main/resources/public/pages/leaveform/leaveForm.html
#	src/main/resources/public/pages/leaveform/leaveFormController.js
#	src/main/resources/public/pages/leaveform/leaveFormDetail.html
#	src/main/resources/public/pages/leaveform/leaveFormDetailController.js
#	src/main/resources/public/pages/project/groupproject/groupProjectAddView.html
#	src/main/resources/public/pages/project/groupproject/groupProjectController.js
#	src/main/resources/public/pages/project/groupproject/groupProjectEditView.html
#	src/main/resources/public/pages/project/groupproject/groupProjectView.html
#	src/main/resources/public/pages/project/project/projectAddViews.html
#	src/main/resources/public/pages/project/project/projectController.js
#	src/main/resources/public/pages/project/project/projectEditViews.html
#	src/main/resources/public/pages/project/project/projectListViews.html
#	src/main/resources/public/pages/timesheet/timeSheetController.js
#	src/main/resources/public/pages/timesheet/timeSheetDetailController.js
#	src/main/resources/public/pages/timesheet/timesheet.html
parents 14cbe76c fcb6432d
...@@ -15,9 +15,9 @@ ...@@ -15,9 +15,9 @@
<description>Quản trị văn phòng sử dụng springboot API</description> <description>Quản trị văn phòng sử dụng springboot API</description>
<properties> <properties>
<java.version>1.8</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties> </properties>
<dependencies> <dependencies>
...@@ -25,48 +25,44 @@ ...@@ -25,48 +25,44 @@
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId> <artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency> </dependency>
<<<<<<< HEAD
=======
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId> <artifactId>spring-boot-starter-mail</artifactId>
</dependency> </dependency>
>>>>>>> ed09ed47f5d092a7753469913def1ab676073023
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId> <artifactId>spring-boot-starter-web</artifactId>
</dependency> </dependency>
<!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
<dependency> <dependency>
<groupId>mysql</groupId> <groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId> <artifactId>mysql-connector-java</artifactId>
<version>8.0.16</version> <scope>runtime</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.projectlombok</groupId> <groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId> <artifactId>lombok</artifactId>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
<dependency> <dependency>
<groupId>log4j</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>log4j</artifactId> <artifactId>spring-boot-starter-test</artifactId>
<version>1.2.17</version> <scope>test</scope>
</dependency> </dependency>
<<<<<<< HEAD
<dependency> <dependency>
<groupId>log4j</groupId> <groupId>log4j</groupId>
<artifactId>log4j</artifactId> <artifactId>log4j</artifactId>
<version>1.2.12</version> <version>1.2.17</version>
</dependency> </dependency>
<!-- <dependency>-->
<!-- <groupId>org.springframework.security</groupId>-->
<!-- <artifactId>spring-security-config</artifactId>-->
<!-- <version>${spring-security.version}</version>-->
<!-- <scope>runtime</scope>-->
<!-- </dependency>-->
=======
>>>>>>> ed09ed47f5d092a7753469913def1ab676073023
</dependencies> </dependencies>
<build> <build>
......
...@@ -69,7 +69,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony ...@@ -69,7 +69,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony
<li class="treeview"> <li class="treeview">
<a href="#"> <a href="#">
<i class="fa fa-laptop"></i> <i class="fa fa-laptop"></i>
<span>Components</span> <span>Project</span>
<i class="fa fa-angle-left pull-right"></i> <i class="fa fa-angle-left pull-right"></i>
</a> </a>
<ul class="treeview-menu"> <ul class="treeview-menu">
...@@ -91,7 +91,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony ...@@ -91,7 +91,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony
</ul> </ul>
</li> </li>
<li> <li>
<a href="widgets.html"> <a href="timesheet.html">
<i class="fa fa-th"></i> <span>Widgets</span> <i class="fa fa-th"></i> <span>Widgets</span>
<small class="label pull-right label-info">08</small> <small class="label pull-right label-info">08</small>
</a> </a>
......
...@@ -69,7 +69,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony ...@@ -69,7 +69,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony
<li class="treeview"> <li class="treeview">
<a href="#"> <a href="#">
<i class="fa fa-laptop"></i> <i class="fa fa-laptop"></i>
<span>Components</span> <span>Project</span>
<i class="fa fa-angle-left pull-right"></i> <i class="fa fa-angle-left pull-right"></i>
</a> </a>
<ul class="treeview-menu"> <ul class="treeview-menu">
...@@ -91,8 +91,8 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony ...@@ -91,8 +91,8 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony
</ul> </ul>
</li> </li>
<li> <li>
<a href="widgets.html"> <a href="timesheet.html">
<i class="fa fa-th"></i> <span>Widgets</span> <i class="fa fa-th"></i> <span>Timesheet</span>
<small class="label pull-right label-info">08</small> <small class="label pull-right label-info">08</small>
</a> </a>
</li> </li>
......
...@@ -43,7 +43,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony ...@@ -43,7 +43,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony
<!--//Metis Menu --> <!--//Metis Menu -->
</head> </head>
<body class="cbp-spmenu-push"> <body class="cbp-spmenu-push" ng-app="myApp">
<div class="main-content"> <div class="main-content">
<div class="cbp-spmenu cbp-spmenu-vertical cbp-spmenu-left" id="cbp-spmenu-s1"> <div class="cbp-spmenu cbp-spmenu-vertical cbp-spmenu-left" id="cbp-spmenu-s1">
<!--left-fixed -navigation--> <!--left-fixed -navigation-->
...@@ -69,7 +69,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony ...@@ -69,7 +69,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony
<li class="treeview"> <li class="treeview">
<a href="#"> <a href="#">
<i class="fa fa-laptop"></i> <i class="fa fa-laptop"></i>
<span>Components</span> <span>Project</span>
<i class="fa fa-angle-left pull-right"></i> <i class="fa fa-angle-left pull-right"></i>
</a> </a>
<ul class="treeview-menu"> <ul class="treeview-menu">
...@@ -91,7 +91,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony ...@@ -91,7 +91,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony
</ul> </ul>
</li> </li>
<li> <li>
<a href="widgets.html"> <a href="timesheet.html">
<i class="fa fa-th"></i> <span>Widgets</span> <i class="fa fa-th"></i> <span>Widgets</span>
<small class="label pull-right label-info">08</small> <small class="label pull-right label-info">08</small>
</a> </a>
...@@ -111,9 +111,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony ...@@ -111,9 +111,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony
<i class="fa fa-table"></i> <span>Tables</span> <i class="fa fa-table"></i> <span>Tables</span>
<i class="fa fa-angle-left pull-right"></i> <i class="fa fa-angle-left pull-right"></i>
</a> </a>
<ul class="treeview-menu">
<li><a href="tables.html"><i class="fa fa-angle-right"></i> Simple tables</a></li>
</ul>
</li> </li>
<li class="treeview"> <li class="treeview">
<a href="#"> <a href="#">
...@@ -132,8 +130,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony ...@@ -132,8 +130,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony
<ul class="treeview-menu"> <ul class="treeview-menu">
<li><a href="login.html"><i class="fa fa-angle-right"></i> Login</a></li> <li><a href="login.html"><i class="fa fa-angle-right"></i> Login</a></li>
<li><a href="signup.html"><i class="fa fa-angle-right"></i> Register</a></li> <li><a href="signup.html"><i class="fa fa-angle-right"></i> Register</a></li>
<li><a href="404.html"><i class="fa fa-angle-right"></i> 404 Error</a></li>
<li><a href="500.html"><i class="fa fa-angle-right"></i> 500 Error</a></li>
<li><a href="blank-page.html"><i class="fa fa-angle-right"></i> Blank Page</a></li> <li><a href="blank-page.html"><i class="fa fa-angle-right"></i> Blank Page</a></li>
</ul> </ul>
</li> </li>
...@@ -340,7 +337,9 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony ...@@ -340,7 +337,9 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony
<!-- main content start--> <!-- main content start-->
<div id="page-wrapper"> <div id="page-wrapper">
<div class="main-page compose"> <div class="main-page compose">
<h2 class="title1">Compose Mail Page</h2> <div ui-view="content">
<!-- Content222-->
</div>
<div class="col-md-4 compose-left"> <div class="col-md-4 compose-left">
<div class="folder widget-shadow"> <div class="folder widget-shadow">
<ul> <ul>
...@@ -435,20 +434,15 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony ...@@ -435,20 +434,15 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony
</div> </div>
</div> </div>
<!--footer--> <!--footer-->
<div class="footer">
<p>&copy; 2018 Glance Design Dashboard. All Rights Reserved | Design by <a href="https://w3layouts.com/" target="_blank">w3layouts</a></p>
</div>
<!--//footer--> <!--//footer-->
</div> </div>
<!-- side nav js -->
<script src='js/SidebarNav.min.js' type='text/javascript'></script> <script src='js/SidebarNav.min.js' type='text/javascript'></script>
<script> <script>
$('.sidebar-menu').SidebarNav() $('.sidebar-menu').SidebarNav()
</script> </script>
<!-- //side nav js -->
<!-- Classie --><!-- for toggle left push menu script -->
<script src="js/classie.js"></script> <script src="js/classie.js"></script>
<script> <script>
var menuLeft = document.getElementById( 'cbp-spmenu-s1' ), var menuLeft = document.getElementById( 'cbp-spmenu-s1' ),
...@@ -468,14 +462,9 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony ...@@ -468,14 +462,9 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony
} }
} }
</script> </script>
<!-- //Classie --><!-- //for toggle left push menu script -->
<!--scrolling js-->
<script src="js/jquery.nicescroll.js"></script>
<script src="js/scripts.js"></script> <script src="js/scripts.js"></script>
<!--//scrolling js-->
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.js"> </script> <script src="js/bootstrap.js"> </script>
</body> </body>
......
...@@ -70,6 +70,7 @@ span.dashboard_text { ...@@ -70,6 +70,7 @@ span.dashboard_text {
left:0px; left:0px;
width: 100%; width: 100%;
z-index: 100; z-index: 100;
height: 65px;
} }
.header-section { .header-section {
background:#FFF; background:#FFF;
...@@ -835,7 +836,7 @@ ul.dropdown-menu { ...@@ -835,7 +836,7 @@ ul.dropdown-menu {
.profile_details ul li{ .profile_details ul li{
list-style-type:none; list-style-type:none;
position:relative; position:relative;
margin-right: 30px;
} }
.profile_details li a i.fa.lnr { .profile_details li a i.fa.lnr {
position: absolute; position: absolute;
...@@ -8565,4 +8566,29 @@ tr:nth-child(n+3) td:nth-child(odd):not(:first-child){ ...@@ -8565,4 +8566,29 @@ tr:nth-child(n+3) td:nth-child(odd):not(:first-child){
font-family: sans-serif; font-family: sans-serif;
font-size: 16px; font-size: 16px;
text-align: center; text-align: center;
}
.topnav .search-container {
float: right;
}
.topnav input[type=text] {
padding: 6px;
margin-top: 8px;
font-size: 17px;
border: none;
}
.topnav .search-container button {
float: right;
padding: 6px 10px;
margin-top: 8px;
margin-right: 16px;
background: #ddd;
font-size: 17px;
border: none;
cursor: pointer;
}
.topnav .search-container button:hover {
background: #ccc;
} }
\ No newline at end of file
...@@ -69,7 +69,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony ...@@ -69,7 +69,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony
<li class="treeview"> <li class="treeview">
<a href="#"> <a href="#">
<i class="fa fa-laptop"></i> <i class="fa fa-laptop"></i>
<span>Components</span> <span>Project</span>
<i class="fa fa-angle-left pull-right"></i> <i class="fa fa-angle-left pull-right"></i>
</a> </a>
<ul class="treeview-menu"> <ul class="treeview-menu">
...@@ -91,8 +91,8 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony ...@@ -91,8 +91,8 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony
</ul> </ul>
</li> </li>
<li> <li>
<a href="widgets.html"> <a href="timesheet.html">
<i class="fa fa-th"></i> <span>Widgets</span> <i class="fa fa-th"></i> <span>Timesheet</span>
<small class="label pull-right label-info">08</small> <small class="label pull-right label-info">08</small>
</a> </a>
</li> </li>
...@@ -111,9 +111,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony ...@@ -111,9 +111,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony
<i class="fa fa-table"></i> <span>Tables</span> <i class="fa fa-table"></i> <span>Tables</span>
<i class="fa fa-angle-left pull-right"></i> <i class="fa fa-angle-left pull-right"></i>
</a> </a>
<ul class="treeview-menu">
<li><a href="tables.html"><i class="fa fa-angle-right"></i> Simple tables</a></li>
</ul>
</li> </li>
<li class="treeview"> <li class="treeview">
<a href="#"> <a href="#">
...@@ -132,8 +130,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony ...@@ -132,8 +130,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony
<ul class="treeview-menu"> <ul class="treeview-menu">
<li><a href="login.html"><i class="fa fa-angle-right"></i> Login</a></li> <li><a href="login.html"><i class="fa fa-angle-right"></i> Login</a></li>
<li><a href="signup.html"><i class="fa fa-angle-right"></i> Register</a></li> <li><a href="signup.html"><i class="fa fa-angle-right"></i> Register</a></li>
<li><a href="404.html"><i class="fa fa-angle-right"></i> 404 Error</a></li>
<li><a href="500.html"><i class="fa fa-angle-right"></i> 500 Error</a></li>
<li><a href="blank-page.html"><i class="fa fa-angle-right"></i> Blank Page</a></li> <li><a href="blank-page.html"><i class="fa fa-angle-right"></i> Blank Page</a></li>
</ul> </ul>
</li> </li>
...@@ -681,7 +678,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony ...@@ -681,7 +678,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony
<!-- //Classie --><!-- //for toggle left push menu script --> <!-- //Classie --><!-- //for toggle left push menu script -->
<!--scrolling js--> <!--scrolling js-->
<script src="js/jquery.nicescroll.js"></script>
<script src="js/scripts.js"></script> <script src="js/scripts.js"></script>
<!--//scrolling js--> <!--//scrolling js-->
......
...@@ -69,7 +69,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony ...@@ -69,7 +69,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony
<li class="treeview"> <li class="treeview">
<a href="#"> <a href="#">
<i class="fa fa-laptop"></i> <i class="fa fa-laptop"></i>
<span>Components</span> <span>Project</span>
<i class="fa fa-angle-left pull-right"></i> <i class="fa fa-angle-left pull-right"></i>
</a> </a>
<ul class="treeview-menu"> <ul class="treeview-menu">
...@@ -91,7 +91,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony ...@@ -91,7 +91,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony
</ul> </ul>
</li> </li>
<li> <li>
<a href="widgets.html"> <a href="timesheet.html">
<i class="fa fa-th"></i> <span>Widgets</span> <i class="fa fa-th"></i> <span>Widgets</span>
<small class="label pull-right label-info">08</small> <small class="label pull-right label-info">08</small>
</a> </a>
...@@ -111,9 +111,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony ...@@ -111,9 +111,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony
<i class="fa fa-table"></i> <span>Tables</span> <i class="fa fa-table"></i> <span>Tables</span>
<i class="fa fa-angle-left pull-right"></i> <i class="fa fa-angle-left pull-right"></i>
</a> </a>
<ul class="treeview-menu">
<li><a href="tables.html"><i class="fa fa-angle-right"></i> Simple tables</a></li>
</ul>
</li> </li>
<li class="treeview"> <li class="treeview">
<a href="#"> <a href="#">
...@@ -132,8 +130,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony ...@@ -132,8 +130,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony
<ul class="treeview-menu"> <ul class="treeview-menu">
<li><a href="login.html"><i class="fa fa-angle-right"></i> Login</a></li> <li><a href="login.html"><i class="fa fa-angle-right"></i> Login</a></li>
<li><a href="signup.html"><i class="fa fa-angle-right"></i> Register</a></li> <li><a href="signup.html"><i class="fa fa-angle-right"></i> Register</a></li>
<li><a href="404.html"><i class="fa fa-angle-right"></i> 404 Error</a></li>
<li><a href="500.html"><i class="fa fa-angle-right"></i> 500 Error</a></li>
<li><a href="blank-page.html"><i class="fa fa-angle-right"></i> Blank Page</a></li> <li><a href="blank-page.html"><i class="fa fa-angle-right"></i> Blank Page</a></li>
</ul> </ul>
</li> </li>
...@@ -452,7 +449,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony ...@@ -452,7 +449,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
</button> </button>
<a class="navbar-brand" href="index.html">Project Name</a> <a class="navbar-brand" href="index.html">Project Name</a>
</div> </div>
<div class="collapse navbar-collapse bs-example-js-navbar-scrollspy"> <div class="collapse navbar-collapse bs-example-js-navbar-scrollspy">
<ul class="nav navbar-nav"> <ul class="nav navbar-nav">
...@@ -633,7 +630,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony ...@@ -633,7 +630,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony
<!-- //Classie --><!-- //for toggle left push menu script --> <!-- //Classie --><!-- //for toggle left push menu script -->
<!--scrolling js--> <!--scrolling js-->
<script src="js/jquery.nicescroll.js"></script>
<script src="js/scripts.js"></script> <script src="js/scripts.js"></script>
<!--//scrolling js--> <!--//scrolling js-->
......
...@@ -91,8 +91,8 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony ...@@ -91,8 +91,8 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony
</ul> </ul>
</li> </li>
<li> <li>
<a href="widgets.html"> <a href="timesheet.html">
<i class="fa fa-th"></i> <span>Widgets</span> <i class="fa fa-th"></i> <span>Timesheet</span>
<small class="label pull-right label-info">08</small> <small class="label pull-right label-info">08</small>
</a> </a>
</li> </li>
......
...@@ -43,7 +43,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony ...@@ -43,7 +43,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony
<!--//Metis Menu --> <!--//Metis Menu -->
</head> </head>
<body class="cbp-spmenu-push"> <body class="cbp-spmenu-push" ng-app="myApp">
<div class="main-content"> <div class="main-content">
<div class="cbp-spmenu cbp-spmenu-vertical cbp-spmenu-left" id="cbp-spmenu-s1"> <div class="cbp-spmenu cbp-spmenu-vertical cbp-spmenu-left" id="cbp-spmenu-s1">
<!--left-fixed -navigation--> <!--left-fixed -navigation-->
...@@ -69,7 +69,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony ...@@ -69,7 +69,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony
<li class="treeview"> <li class="treeview">
<a href="#"> <a href="#">
<i class="fa fa-laptop"></i> <i class="fa fa-laptop"></i>
<span>Components</span> <span>Project</span>
<i class="fa fa-angle-left pull-right"></i> <i class="fa fa-angle-left pull-right"></i>
</a> </a>
<ul class="treeview-menu"> <ul class="treeview-menu">
...@@ -91,7 +91,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony ...@@ -91,7 +91,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony
</ul> </ul>
</li> </li>
<li> <li>
<a href="widgets.html"> <a href="timesheet.html">
<i class="fa fa-th"></i> <span>Widgets</span> <i class="fa fa-th"></i> <span>Widgets</span>
<small class="label pull-right label-info">08</small> <small class="label pull-right label-info">08</small>
</a> </a>
......
...@@ -111,9 +111,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony ...@@ -111,9 +111,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony
<i class="fa fa-table"></i> <span>Tables</span> <i class="fa fa-table"></i> <span>Tables</span>
<i class="fa fa-angle-left pull-right"></i> <i class="fa fa-angle-left pull-right"></i>
</a> </a>
<ul class="treeview-menu">
<li><a href="tables.html"><i class="fa fa-angle-right"></i> Simple tables</a></li>
</ul>
</li> </li>
<li class="treeview"> <li class="treeview">
<a href="#"> <a href="#">
...@@ -132,8 +130,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony ...@@ -132,8 +130,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony
<ul class="treeview-menu"> <ul class="treeview-menu">
<li><a href="login.html"><i class="fa fa-angle-right"></i> Login</a></li> <li><a href="login.html"><i class="fa fa-angle-right"></i> Login</a></li>
<li><a href="signup.html"><i class="fa fa-angle-right"></i> Register</a></li> <li><a href="signup.html"><i class="fa fa-angle-right"></i> Register</a></li>
<li><a href="404.html"><i class="fa fa-angle-right"></i> 404 Error</a></li>
<li><a href="500.html"><i class="fa fa-angle-right"></i> 500 Error</a></li>
<li><a href="blank-page.html"><i class="fa fa-angle-right"></i> Blank Page</a></li> <li><a href="blank-page.html"><i class="fa fa-angle-right"></i> Blank Page</a></li>
</ul> </ul>
</li> </li>
...@@ -1293,7 +1290,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony ...@@ -1293,7 +1290,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony
<!-- //Classie --><!-- //for toggle left push menu script --> <!-- //Classie --><!-- //for toggle left push menu script -->
<!--scrolling js--> <!--scrolling js-->
<script src="js/jquery.nicescroll.js"></script>
<script src="js/scripts.js"></script> <script src="js/scripts.js"></script>
<!--//scrolling js--> <!--//scrolling js-->
......
This diff is collapsed.
...@@ -6333,7 +6333,7 @@ defaults._set('bar', { ...@@ -6333,7 +6333,7 @@ defaults._set('bar', {
defaults._set('horizontalBar', { defaults._set('horizontalBar', {
hover: { hover: {
mode: 'index', mode: 'public.index',
axis: 'y' axis: 'y'
}, },
...@@ -6389,7 +6389,7 @@ defaults._set('horizontalBar', { ...@@ -6389,7 +6389,7 @@ defaults._set('horizontalBar', {
return datasetLabel + ': ' + item.xLabel; return datasetLabel + ': ' + item.xLabel;
} }
}, },
mode: 'index', mode: 'public.index',
axis: 'y' axis: 'y'
} }
}); });
......
/** /**
* *
*/ */
angular.module("myApp", ["ngAnimate","ui.router","ui.bootstrap"]).config(function ($stateProvider, $urlRouterProvider, $locationProvider) { angular.module("myApp", ["ngAnimate", "ui.router", "ui.bootstrap"]).config(function ($stateProvider, $urlRouterProvider, $locationProvider) {
$locationProvider.hashPrefix(''); $locationProvider.hashPrefix('');
$urlRouterProvider.otherwise("/employees"); $urlRouterProvider.otherwise("/employees");
$stateProvider $stateProvider
.state("layout1", {
abstract: true,
views: {
"layout": {
templateUrl: "layout/layout1.html"
}
}
})
.state("layout2", {
abstract: true,
views: {
"layout": {
templateUrl: "layout/layout2.html"
}
}
})
.state("employees", { .state("employees", {
parent: 'layout1',
url: "/employees", url: "/employees",
views: { views: {
"content": { "content": {
...@@ -19,6 +36,7 @@ angular.module("myApp", ["ngAnimate","ui.router","ui.bootstrap"]).config(functio ...@@ -19,6 +36,7 @@ angular.module("myApp", ["ngAnimate","ui.router","ui.bootstrap"]).config(functio
} }
}) })
.state("createEmployee", { .state("createEmployee", {
parent: 'layout1',
url: "/createEmployee", url: "/createEmployee",
params: { params: {
emp: null emp: null
...@@ -32,21 +50,101 @@ angular.module("myApp", ["ngAnimate","ui.router","ui.bootstrap"]).config(functio ...@@ -32,21 +50,101 @@ angular.module("myApp", ["ngAnimate","ui.router","ui.bootstrap"]).config(functio
}) })
// .state("timeSheet", {
// parent: 'layout1',
// url: "/timesheet",
// views: {
// "content": {
// templateUrl: "pages/timesheet/leaveFromeaveFromDetail.html",
// controller: "leaveFormController"
// }
// }
// })
// .state("timeSheetDetail", {
// parent: 'layout1',
// url: "/timesheetdetail/:id",
// views: {
// "content": {
// templateUrl: "pages/timesheet/l",
// controller: "timeSheetDetailController"
// }
// }
// })
.state("leaveform", {
parent: 'layout1',
url: "/leaveform",
views: {
"content": {
templateUrl: "pages/leaveform/leaveForm.html",
controller: "leaveFormController"
}
}
})
.state("leaveFormDetail", {
parent: 'layout1',
url: "/leaveformdetail/:id",
views: {
"content": {
templateUrl: "pages/leaveform/leaveFormDetail.html",
controller: "leaveFormDetailController"
}
}
})
.state("timesheet",{
parent:'layout1',
url:"/timesheet",
views:{
"content":{
templateUrl:"pages/timesheet/timesheet.html",
controller:"timeSheetController"
}
}
})
.state("timesheetDetail",{
parent:'layout1',
url:"/timesheetDetail/:id",
views:{
"content":{
templateUrl:"page/timesheet/timeSheetDetail.html",
controller:"timeSheetDetailController"
}
}
})
.state("project", {
parent: 'layout1',
url: "/project",
views: {
"content": {
templateUrl: "pages/project/project.html",
controller: "projectController"
}
}
})
.state("news",{
parent:'layout1',
url:"/news",
views:{
"content":{
templateUrl:"pages/homepage/catagoriManagements.html",
controller:"homeController"
}
}
})
}); });
angular angular
.module('myApp') .module('myApp')
.filter('lmto', lmto); .filter('lmto', lmto);
function lmto() { function lmto() {
return function(items,limit,offset){ return function (items, limit, offset) {
if(items.length > 0) { if (items.length > 0) {
return items.slice(offset, offset + limit); return items.slice(offset, offset + limit);
} else { } else {
return []; return [];
} }
}; };
} }
This diff is collapsed.
<div>
<div ui-view="content">
</div>
</div>
...@@ -92,8 +92,8 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony ...@@ -92,8 +92,8 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony
</ul> </ul>
</li> </li>
<li> <li>
<a href="widgets.html"> <a href="timesheet.html">
<i class="fa fa-th"></i> <span>Widgets</span> <i class="fa fa-th"></i> <span>TimeSheet</span>
<small class="label pull-right label-info">08</small> <small class="label pull-right label-info">08</small>
</a> </a>
</li> </li>
...@@ -112,9 +112,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony ...@@ -112,9 +112,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony
<i class="fa fa-table"></i> <span>Tables</span> <i class="fa fa-table"></i> <span>Tables</span>
<i class="fa fa-angle-left pull-right"></i> <i class="fa fa-angle-left pull-right"></i>
</a> </a>
<ul class="treeview-menu">
<li><a href="tables.html"><i class="fa fa-angle-right"></i> Simple tables</a></li>
</ul>
</li> </li>
<li class="treeview"> <li class="treeview">
<a href="#"> <a href="#">
...@@ -133,8 +131,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony ...@@ -133,8 +131,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony
<ul class="treeview-menu"> <ul class="treeview-menu">
<li><a href="login.html"><i class="fa fa-angle-right"></i> Login</a></li> <li><a href="login.html"><i class="fa fa-angle-right"></i> Login</a></li>
<li><a href="signup.html"><i class="fa fa-angle-right"></i> Register</a></li> <li><a href="signup.html"><i class="fa fa-angle-right"></i> Register</a></li>
<li><a href="404.html"><i class="fa fa-angle-right"></i> 404 Error</a></li>
<li><a href="500.html"><i class="fa fa-angle-right"></i> 500 Error</a></li>
<li><a href="blank-page.html"><i class="fa fa-angle-right"></i> Blank Page</a></li> <li><a href="blank-page.html"><i class="fa fa-angle-right"></i> Blank Page</a></li>
</ul> </ul>
</li> </li>
...@@ -402,7 +399,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony ...@@ -402,7 +399,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony
<!-- //Classie --><!-- //for toggle left push menu script --> <!-- //Classie --><!-- //for toggle left push menu script -->
<!--scrolling js--> <!--scrolling js-->
<script src="js/jquery.nicescroll.js"></script>
<script src="js/scripts.js"></script> <script src="js/scripts.js"></script>
<!--//scrolling js--> <!--//scrolling js-->
......
...@@ -91,8 +91,8 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony ...@@ -91,8 +91,8 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony
</ul> </ul>
</li> </li>
<li> <li>
<a href="widgets.html"> <a href="timesheet.html">
<i class="fa fa-th"></i> <span>Widgets</span> <i class="fa fa-th"></i> <span>TimeSheet</span>
<small class="label pull-right label-info">08</small> <small class="label pull-right label-info">08</small>
</a> </a>
</li> </li>
...@@ -111,9 +111,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony ...@@ -111,9 +111,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony
<i class="fa fa-table"></i> <span>Tables</span> <i class="fa fa-table"></i> <span>Tables</span>
<i class="fa fa-angle-left pull-right"></i> <i class="fa fa-angle-left pull-right"></i>
</a> </a>
<ul class="treeview-menu">
<li><a href="tables.html"><i class="fa fa-angle-right"></i> Simple tables</a></li>
</ul>
</li> </li>
<li class="treeview"> <li class="treeview">
<a href="#"> <a href="#">
...@@ -132,8 +130,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony ...@@ -132,8 +130,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony
<ul class="treeview-menu"> <ul class="treeview-menu">
<li><a href="login.html"><i class="fa fa-angle-right"></i> Login</a></li> <li><a href="login.html"><i class="fa fa-angle-right"></i> Login</a></li>
<li><a href="signup.html"><i class="fa fa-angle-right"></i> Register</a></li> <li><a href="signup.html"><i class="fa fa-angle-right"></i> Register</a></li>
<li><a href="404.html"><i class="fa fa-angle-right"></i> 404 Error</a></li>
<li><a href="500.html"><i class="fa fa-angle-right"></i> 500 Error</a></li>
<li><a href="blank-page.html"><i class="fa fa-angle-right"></i> Blank Page</a></li> <li><a href="blank-page.html"><i class="fa fa-angle-right"></i> Blank Page</a></li>
</ul> </ul>
</li> </li>
...@@ -624,7 +621,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony ...@@ -624,7 +621,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony
<!-- //Classie --><!-- //for toggle left push menu script --> <!-- //Classie --><!-- //for toggle left push menu script -->
<!--scrolling js--> <!--scrolling js-->
<script src="js/jquery.nicescroll.js"></script>
<script src="js/scripts.js"></script> <script src="js/scripts.js"></script>
<!--//scrolling js--> <!--//scrolling js-->
......
<!--<link rel="stylesheet" href="../../css/bootstrap-combined.min.css">-->
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col-md-8"> <div class="col-md-8">
...@@ -23,8 +23,8 @@ ...@@ -23,8 +23,8 @@
<td>{{$index + 1}}</td> <td>{{$index + 1}}</td>
<td>{{cata.name}}</td> <td>{{cata.name}}</td>
<td>{{cata.news.length}}</td> <td>{{cata.news.length}}</td>
<td><a href="http://localhost:8080/#/management/catagori/{{cata.id}}" ng-click="detailNews(emp);">Detail</a> </td> <td><a href="#/management/catagori/{{cata.id}}">Detail</a> </td>
<td><a href="#" ng-click="update(emp);">Edit</a> </td> <td><a href="#">Edit</a> </td>
</tr> </tr>
</tbody> </tbody>
......
angular.module("myApp").controller('homeController', function ($scope,$http, $state,News, $window,$stateParams,Catagories,LatestNews,NewsByCatagori) { angular.module("myApp").controller('homeController', function ($scope,$http, $state,News, $window,$stateParams,Catagories,LatestNews) {
$scope.catagories = Catagories.query(); $scope.catagories = Catagories.query();
...@@ -35,21 +35,44 @@ angular.module("myApp").controller('homeController', function ($scope,$http, $st ...@@ -35,21 +35,44 @@ angular.module("myApp").controller('homeController', function ($scope,$http, $st
$scope.catagoriById = Catagories.get({}, {myCatagoriesId: $stateParams.myCatagoriId}); $scope.catagoriById = Catagories.get({}, {myCatagoriesId: $stateParams.myCatagoriId});
//Delete News //Delete News
$scope.deleteNews = function(newsId,catagoriId) { $scope.deleteNews = function(newsId) {
if(confirm("Delete?")) { if (confirm("Delete?")) {
$http({ $http({
method: 'DELETE', method: 'DELETE',
url: 'http://localhost:8080/api/HR/catagori/' + catagoriId + '/news/' + newsId, url: 'http://localhost:8080/api/HR/news/' + newsId,
headers: { headers: {
'Content-Type': 'application/json' 'Content-Type': 'application/json'
} }
}).then(function (response) { }).then(function (response) {
console.log("delete OK");
$state.reload();
}, function (data, status) {
$state.reload();
});
}
};
//Edit news
$scope.newsEditById = News.get({}, {myNewsId: $stateParams.myNewsEditId});
$scope.editNews = function(newsEditById) {
if(confirm("Update?")) {
$http({
method: 'PUT',
url: 'http://localhost:8080/api/HR/news/' + newsEditById.id,
data: angular.toJson(newsEditById),
headers: {
'Content-Type': 'application/json'
}
}).then(function (response) {
console.log("update OK");
$state.go('newsManagement',{myCatagoriId:$stateParams.myCatagoriEditId});
}, function (data, status) { }, function (data, status) {
console.log(status);
}); });
} }
}; };
}); });
\ No newline at end of file
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
{{catagori.name}} {{catagori.name}}
</h3> </h3>
<a href="http://localhost:8080/index.html#/news/catagori/{{catagori.id}}" class="tab01-link f1-s-1 cl9 hov-cl10 trans-03"> <a href="http://localhost:8080/#/news/catagori/{{catagori.id}}" class="tab01-link f1-s-1 cl9 hov-cl10 trans-03">
View all View all
<i class="fs-12 m-l-5 fa fa-caret-right"></i> <i class="fs-12 m-l-5 fa fa-caret-right"></i>
</a> </a>
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<!-- Tab panes --> <!-- Tab panes -->
<div class="tab-content p-t-35"> <div class="tab-content p-t-35" style="overflow: hidden">
<!-- - --> <!-- - -->
<div class="tab-pane fade show active" id="tab1-1" role="tabpanel"> <div class="tab-pane fade show active" id="tab1-1" role="tabpanel">
<div class="row"> <div class="row">
......
<form name="myForm" novalidate ng-submit="editNews(newsEditById)" >
<table border= 1>
<tr>
<td>News Id</td>
<td>{{newsEditById.id}}</td>
</tr>
<tr>
<td>Thumbnail</td>
<td><input type="text" data-ng-model="newsEditById.thumbnail" /></td>
</tr>
<tr>
<td>Title</td>
<td><input type="text" ng-model="newsEditById.title" /></td>
</tr>
<tr>
<td>Content</td>
<td><input type="text" data-ng-model="newsEditById.content" /></td>
</tr>
<tr>
<td>Status</td>
<td><input type="text" data-ng-model="newsEditById.status" /></td>
</tr>
<tr>
<td colspan="2">
<input data-ng-disabled="myForm.$invalid" type="submit" value="Submit" class="blue-button" />
</td>
</tr>
</table>
</form>
<!--<link rel="stylesheet" href="../../css/bootstrap-combined.min.css">-->
<div class="container"> <div class="container">
<div class="row">
<div class="col-md-8">
<div >
<div> <div>
<table class="table"> <table class="table" >
<thead> <thead>
<tr> <tr>
<tr> <tr>
<a ui-sref="CatagoriManagement"><< Back</a>
<td colspan="12"><h1 style="font-size: 30px;text-align: center">{{catagoriById.name}}</h1></td> <td colspan="12"><h1 style="font-size: 30px;text-align: center">{{catagoriById.name}}</h1></td>
</tr> </tr>
<th>STT</th> <th>STT</th>
...@@ -21,17 +20,18 @@ ...@@ -21,17 +20,18 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr class="vide" ng-repeat="new in catagoriById.news"> <tr class="vide" ng-repeat="myNews in catagoriById.news">
<td>{{$index + 1}}</td> <td>{{$index + 1}}</td>
<td>{{new.title}}</td> <td>{{myNews.title}}</td>
<td>{{new.createdAt}}</td> <td>{{myNews.createdAt}}</td>
<td>{{new.content}}</td> <td>{{myNews.content}}</td>
<td><button ng-click="editNews(new,catagoryById.id)">Edit</button> </td> <td><a href="#/management/catagori/{{catagoriById.id}}/news/{{myNews.id}}" style="color:green;border: 1px solid black;padding: 10px;" >Edit</a> </td>
<td><button ng-click="deleteNews(new.id,catagoryById.id)">Delete</button> </td> <td><button type="button" style="color:red;border: 1px solid black;padding: 10px;" ng-click="deleteNews(myNews.id)">Delete</button> </td>
<td><button type="button" ng-click=""></button>Add</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div> </div>Add
</div>
</div> </div>
</div> </div>
<div class="card-header">
<i class="fas fa-table"></i> Thêm mới dự án
</div>
<div class="card-body">
<form ng-submit="insertIssues(Issues)">
<label>Tên Dự Án</label>
<select ng-model="Issues.projectId" autofocus="autofocus"
required="required">
<option value="">==> Trạng Thái</option>
<option ng-repeat="project in listProject" value="{{project.id}}">{{project.name}}</option>
</select><br/>
<label>Tiêu đề</label>
<input type="text" ng-model="Issues.title" id="title" placeholder="Tiêu Đề"
required="required"><br/>
<label>Nội Dung</label>
<input type="text" ng-model="Issues.actionCode" id="actionCode" placeholder="Nội dung issues"
required="required"><br/>
<div>
<h1>{{view.message}}</h1>
<input type="submit" value="Save">
<input type="reset" value="Reset">
<button type="button" ui-sref="issues">Back</button>
</div>
</form>
</div>
\ No newline at end of file
angular.module("myApp").controller('IssuesAddController', function ($scope,$state,$http) {
$scope.insertIssues = function (Issues) {
$http({
method: 'POST',
url: 'http://localhost:8081/them-issues',
data: angular.toJson($scope.Issues),
headers: {
'Content-Type': 'application/json'
}
}).then(successCallback, errorCallback);
function successCallback(response) {
$scope.view = response.data;
if ($scope.view.status == 200) {
$state.go('issues');
}
}
function errorCallback(error) {
//error code
console.log("can't insert data!!");
}
}
$http.get("http://localhost:8081/quan-tri/danh-sach-du-an/").then(successCallback, errorCallback);
function successCallback(response) {
console.log(response.data);
{
$scope.listProject = response.data;
}
}
function errorCallback(error) {
//error code
console.log("can't get data!!");
}
});
\ No newline at end of file
angular.module("myApp").controller('IssuesShowController', function ($scope,$stateParams,$http,$state) {
$scope.currentPage = 1
,$scope.numPerPage = 5
,$scope.maxSize = 5;
$http.get('http://localhost:8081/danh-sach-issues').then(successCallback, errorCallback);
function successCallback(response) {
console.log(response.data);
{
$scope.ListIssues = response.data;
$scope.numPages = function () {
return Math.ceil($scope.ListIssues.length / $scope.numPerPage);
};
$scope.$watch('currentPage + numPerPage', function () {
var begin = (($scope.currentPage - 1) * $scope.numPerPage)
, end = begin + $scope.numPerPage;
$scope.pageListIssues = $scope.ListIssues.slice(begin, end);
});
}
}
function errorCallback(error) {
//error code
console.log("can't get data!!");
}
$scope.updateIssues = function (issue) {
if (confirm("Bạn có muốn thay đổi trạng thái không ?")) {
$http({
method: 'PUT',
url: 'http://localhost:8081/sua-issues',
data: angular.toJson(issue),
headers: {
'Content-Type': 'application/json'
}
}).then(successCallback, errorCallback);
function successCallback(response) {
$scope.view = response.data;
if ($scope.view.status == 200) {
$state.reload();
}
}
function errorCallback(error) {
//error code
console.log("can't update data!!");
}
}
};
});
\ No newline at end of file
<div class="col-lg-8">
<hr>
<p style="text-align: center">Tên Dự Án : {{loadIssues.project.name | uppercase}}</p>
<hr>
<p class="lead">Tiêu Đề: {{loadIssues.title | uppercase}}</p>
<blockquote class="blockquote">
<p class="mb-0">NỘI DUNG ISSUES : {{loadIssues.actionCode}}</p>
</blockquote>
<hr>
<!-- Comments Form -->
<div class="card my-4">
<h5 class="card-header">Comment:</h5>
<div class="card-body">
<form ng-submit="saveComment(IssuesComment)">
<div class="form-group">
<textarea ng-model="IssuesComment.contentIssuse" class="form-control" rows="3"></textarea>
</div>
<button type="submit" class="btn btn-primary">Đăng Comments</button>
<input class="btn btn-primary" type="reset" value="Reset">
</form>
</div>
</div>
<!-- Single Comment -->
<div class="media mb-4">
<div class="media-body">
<h5 class="mt-0">UserName</h5><p>Thời gian đăng</p>
-<p>Nội dung comment</p>-
</div>
</div>
</div>
\ No newline at end of file
<div class="card mb-3">
<div class="card-header">
<i class="fas fa-table"></i> Danh Sách Issue
</div>
<div class="card-body">
<div class="table-responsive">
<input type="text" ng-model="search" placeholder="Search" style="margin-bottom: 10px;">
<table class="table table-bordered" id="dataTable" width="100%"
cellspacing="0">
<thead>
<tr>
<th>Tên Dự Án</th>
<th>Issue</th>
<th>Ngày Tạo</th>
<th>Trạng Thái</th>
<th>Thao Tác</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="issue in pageListIssues|filter:search">
<td>{{ issue.project.name }}</td>
<td>{{ issue.title }}</td>
<td>{{ issue.startDate | date:"dd/MM/yyyy" }}</td>
<td>
<span ng-if="issue.status == 0" style="color: #34ce57">Đang fix</span>
<span ng-if="issue.status == 1" style="color: #0e90d2">Đã fix xong</span>
</td>
<td><a ui-sref="IssuesComment({IssuesId : issue.id})" class="btn btn-info btn-circle btn-sm">
Chi Tiết </a>
<a ng-click="updateIssues(issue)" class="btn btn-warning btn-circle btn-sm">
Cập nhật Trạng Thái </a>
<a class="btn btn-danger btn-circle btn-sm" ng-controller="IssuesDeleteController"
data-ng-click="IssuesDelete(issue)">Xóa</a>
</tr>
</tbody>
</table>
<a ui-sref="addIssues" class="btn btn-primary btn-circle btn-sm" style="margin-bottom: 10px;"> Thêm Issue Mới</a>
</div>
</div>
<div data-pagination="" data-num-pages="numPages()"
data-current-page="currentPage" data-max-size="maxSize"
data-boundary-links="true">
</div>
</div>
angular.module("myApp").controller('IssuesDeleteController', function($scope, $window, $http,$state) {
$scope.IssuesDelete = function (issue) {
if (confirm("Bạn có chắc chắn muốn xóa ?")) {
$http({
method: 'DELETE',
url: 'http://localhost:8081/xoa-issues',
data: $scope.issue,
headers: {
'Content-Type': 'application/json'
}
}).then(successCallback, errorCallback);
function successCallback(response) {
$scope.view = response.data;
if ($scope.view.status == 200) {
$state.reload();
}
}
function errorCallback(error) {
console.log("can't delete data!!");
}
}
};
});
\ No newline at end of file
var app = angular.module("myApp").controller('loadIssuesDetail', function ($scope, $stateParams, $http, $state) {
$http.get('http://localhost:8081/chi-tiet-issues/' + $stateParams.IssuesId).then(successCallback, errorCallback);
function successCallback(response) {
console.log(response.data);
{
$scope.loadIssues = response.data
}
}
function errorCallback(error) {
console.log("can't get data!!");
}
$scope.saveComment = function (IssuesComment) {
IssuesComment.issueId = $scope.loadIssues.id;
$http({
method: 'POST',
url: 'http://localhost:8081/tao-comment',
data: angular.toJson(IssuesComment),
headers: {
'Content-Type': 'application/json'
}
}).then(successCallback, errorCallback);
function successCallback(response) {
$scope.view = response.data;
if ($scope.view.status == 200) {
$state.reload();
}
}
function errorCallback(error) {
//error code
console.log("can't insert data!!");
}
}
//hiện thị danh sách comment
});
app.controller('showComment',showComment)
function showComment($scope, $http) {
//trang đang đứng trên font-end
$scope.currentPage = 1
//số item hiển thị trong 1 page
, $scope.numPerPage = 4
//tổng số page hiển thị trên thanh chọn
, $scope.maxSize = 5;
$http.get('http://localhost:8081/Comment/' + $scope.loadIssues.id).then(successCallback, errorCallback);
function successCallback(response) {
console.log(response.data);
{
$scope.CommentIssues = response.data
$scope.numPages = function () {
return Math.ceil($scope.CommentIssues.length / $scope.numPerPage);
};
$scope.$watch('currentPage + numPerPage', function () {
var begin = (($scope.currentPage - 1) * $scope.numPerPage)
, end = begin + $scope.numPerPage;
$scope.pageListCommentIssues = $scope.CommentIssues.slice(begin, end);
});
}
}
function errorCallback(error) {
console.log("can't get data!!");
}
}
\ No newline at end of file
<!--<!DOCTYPE html>--> <script>
<!--<html lang="en" ng-app="myApp" ng-controller="timesheetController">--> function showAddLeaveFormFunction() {
<!--<head>--> var x = document.getElementById("addDivLF");
<!-- <meta charset="UTF-8">--> var n = document.getElementById("addLeaveForm");
<!-- <title>Time Sheet</title>--> if (x.style.display === "none") {
<!-- <meta name="viewport" content="width=device-width, initial-scale=1">--> x.style.display = "block";
<!-- <script src="//unpkg.com/@uirouter/angularjs/release/angular-ui-router.min.js"></script>--> n.value = " Back";
<!-- <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"--> } else {
<!-- integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"--> x.style.display = "none";
<!-- crossorigin="anonymous"></script>--> n.value = "Add Leave Form";
<!-- <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"--> }
<!-- integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">--> }
<!-- <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>--> </script>
<!-- <script src="timeSheetController.js"></script>-->
<!--</head>-->
<!--<body>-->
<!--</body>-->
<!--</html>-->
<div class="container"> <div class="container">
<div class="table-wrapper"> <div class="table-wrapper">
<div class="table-title"> <div class="table-title">
<div class="row"> <div class="row">
<div class="col-sm-6"> <div class="col-sm-6">
<h2><b>Leave Form</b></h2> <h2><b>Leave Form</b></h2>
<label>
Search: <input type="text" ng-model="search" placeholder="Search" style="color: black; margin: 10px"/>
</label>
</div> </div>
<div class="col-sm-6"> <div class="col-sm-6">
<input id="addLeaveForm" class="btn btn-success" type="submit" name="addTS" value="Add Leave Form" data-toggle="modal" onclick="showAddLeaveFormFunction()"/> <input id="addLeaveForm" class="btn btn-success" type="submit" name="addTS" value="Add Leave Form" data-toggle="modal" onclick="showAddLeaveFormFunction()"/>
...@@ -50,14 +46,18 @@ ...@@ -50,14 +46,18 @@
<tr> <tr>
<td><label>Employee Id</label></td> <td><label>Employee Id</label></td>
<td> <td>
<input type="text" maxlength="10" value="" ng-model="lfdto.employeeId" style="width: 100%;"/> <input type="text" maxlength="10" value="" ng-model="lfdto.employeeId"/>
</td> </td>
</tr> </tr>
<tr> <tr>
<td><label>Leave Type Id</label></td> <td><label>Leave Type Id</label></td>
<td> <td>
<input type="text" maxlength="10" value="" ng-model="lfdto.leaveTypeId" style="width: 100%;"/> <!-- <input type="text" maxlength="10" value="" ng-model="lfdto.leaveTypeId" style="width: 100%;"/>-->
<select ng-model="lfdto.leaveTypeId">
<option value="">Select Leave Type</option>
<option ng-repeat="lf in leaveTypeList" value="{{lf.id}}">{{lf.name}}</option>
</select>
</td> </td>
</tr> </tr>
<tr> <tr>
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr class="lff" ng-repeat="lf in leaveForms"> <tr class="lff" ng-repeat="lf in leaveForms | filter: search">
<td>{{$index + 1}}</td> <td>{{$index + 1}}</td>
<td>{{lf.title}}</td> <td>{{lf.title}}</td>
<td>{{lf.content}}</td> <td>{{lf.content}}</td>
...@@ -121,7 +121,7 @@ ...@@ -121,7 +121,7 @@
<td><a ui-sref="leaveFormDetail({id: lf.id})" data-toggle="modal"><i class="fa fa-eye" data-toggle="tooltip" title="View"></i></a></td> <td><a ui-sref="leaveFormDetail({id: lf.id})" data-toggle="modal"><i class="fa fa-eye" data-toggle="tooltip" title="View"></i></a></td>
<td><a ui-sref="leaveForm" ng-click="getLf(lf);" onclick="document.getElementById('updateDivLF').style.display = 'block'" class="edit" data-toggle="modal"><i class="material-icons" data-toggle="tooltip" title="Edit">&#xE254;</i></a></td> <td><a ui-sref="leaveForm" ng-click="getLf(lf);" onclick="document.getElementById('updateDivLF').style.display = 'block'" class="edit" data-toggle="modal"><i class="material-icons" data-toggle="tooltip" title="Edit">&#xE254;</i></a></td>
<td><a ui-sref="leaveForm" ng-click="delete(lf);" class="delete" data-toggle="modal"><i class="material-icons" data-toggle="tooltip" title="Delete">&#xE872;</i></a></td> <td><a ui-sref="leaveForm" ng-click="delete(lf);" class="delete" data-toggle="modal"><i class="material-icons" data-toggle="tooltip" title="Delete">&#xE872;</i></a></td>
<td><a id="approved" ui-sref="leaveForm" ng-click="updateStatus(lf)" data-toggle="modal"><i class="fa fa-check" data-toggle="tooltip" title="Approved"></i></a></td> <!-- <td><a ui-sref="leaveForm" ng-click="updateStatus(lf)" data-toggle="modal"><i id="approved" class="fa fa-check" data-toggle="tooltip" title="Approved"></i></a></td>-->
</tr> </tr>
</tbody> </tbody>
</table> </table>
......
/* /*
*/ */
angular.module("myApp").controller("leaveFormController", function($scope, $http, $state) {
angular.module("myApp").controller("leaveFormController", function($scope, $http, $route, $state) {
console.log("Leave Form controller"); console.log("Leave Form controller");
$scope.lf = { $scope.lf = {
...@@ -34,6 +33,16 @@ angular.module("myApp").controller("leaveFormController", function($scope, $http ...@@ -34,6 +33,16 @@ angular.module("myApp").controller("leaveFormController", function($scope, $http
console.log(response) console.log(response)
}); });
//get all leave type
$http({
method : 'GET',
url : "http://localhost:8080/employee/leaveType/getAll"
}).then(function successCallback(response) {
console.log(response);
$scope.leaveTypeList=response.data;
}, function errorCallback(response) {
console.log(response)
});
//delete leave form //delete leave form
$scope.delete = function (lf) { $scope.delete = function (lf) {
$http({ $http({
...@@ -53,7 +62,7 @@ angular.module("myApp").controller("leaveFormController", function($scope, $http ...@@ -53,7 +62,7 @@ angular.module("myApp").controller("leaveFormController", function($scope, $http
console.log($scope.lfdto); console.log($scope.lfdto);
$http({ $http({
method : 'POST', method : 'POST',
url : "http://localhost:8080/employee/leaveform/add", url : "http://localhost:8080/timesheet/leaveform/add",
data: $scope.lfdto data: $scope.lfdto
}).then(function successCallback(response) { }).then(function successCallback(response) {
console.log(response); console.log(response);
...@@ -77,7 +86,7 @@ angular.module("myApp").controller("leaveFormController", function($scope, $http ...@@ -77,7 +86,7 @@ angular.module("myApp").controller("leaveFormController", function($scope, $http
function update(){ function update(){
$http({ $http({
method : 'POST', method : 'POST',
url : "http://localhost:8080/employee/leaveform/update", url : "http://localhost:8080/timesheet/leaveform/update",
data: $scope.lfdto data: $scope.lfdto
}).then(function successCallback(response) { }).then(function successCallback(response) {
console.log(response); console.log(response);
...@@ -92,7 +101,7 @@ angular.module("myApp").controller("leaveFormController", function($scope, $http ...@@ -92,7 +101,7 @@ angular.module("myApp").controller("leaveFormController", function($scope, $http
function updateStatus(lf){ function updateStatus(lf){
$http({ $http({
method : 'POST', method : 'POST',
url : "http://localhost:8080/employee/leaveform/"+lf.id+"/status", url : "http://localhost:8080/timesheet/leaveform/"+lf.id+"/status",
// data: $scope.lfdto // data: $scope.lfdto
}).then(function successCallback(response) { }).then(function successCallback(response) {
console.log(response); console.log(response);
...@@ -102,4 +111,5 @@ angular.module("myApp").controller("leaveFormController", function($scope, $http ...@@ -102,4 +111,5 @@ angular.module("myApp").controller("leaveFormController", function($scope, $http
$state.reload(); $state.reload();
}); });
} }
});
\ No newline at end of file });
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<br><br> <br><br>
<div> <div>
<tr> <tr>
<input type="submit" name="submit" value="Duyệt" ui-sref="leaveForm" ng-click="updateStatus(leaveFormDetail.id)"/> <!-- <input type="submit" name="submit" value="Duyệt" ui-sref="leaveForm" ng-click="updateStatus(leaveFormDetail.id)"/>-->
<input type="submit" name="submit" value="Quay lại" ui-sref="leaveForm"/> <input type="submit" name="submit" value="Quay lại" ui-sref="leaveForm"/>
</tr> </tr>
</div> </div>
......
/* /*
*/ */
angular.module("myApp").controller("leaveFormDetailController", function($scope, $http, $stateParams, $state) { angular.module("myApp").controller("leaveFormDetailController", function($scope, $http, $stateParams, $state) {
console.log("Leave Form Detail Controller"); console.log("Leave Form Detail Controller");
$http({ $http({
method : 'GET', method : 'GET',
url : "http://localhost:8080/employee/leaveform/" + $stateParams.id url : "http://localhost:8080/timesheet/leaveform/" + $stateParams.id
}).then(function successCallback(response) { }).then(function successCallback(response) {
console.log(response); console.log(response);
$scope.leaveFormDetail=response.data; $scope.leaveFormDetail=response.data;
...@@ -18,7 +17,7 @@ angular.module("myApp").controller("leaveFormDetailController", function($scope, ...@@ -18,7 +17,7 @@ angular.module("myApp").controller("leaveFormDetailController", function($scope,
function updateStatus(id){ function updateStatus(id){
$http({ $http({
method : 'POST', method : 'POST',
url : "http://localhost:8080/employee/leaveform/"+id+"/status", url : "http://localhost:8080/timesheet/leaveform/"+id+"/status",
}).then(function successCallback(response) { }).then(function successCallback(response) {
console.log(response); console.log(response);
$state.reload(); $state.reload();
......
var app = angular.module('myApp');
app.factory('apiService', apiService);
apiService.$inject = ['$http', 'notificationService', 'authenticationService'];
function apiService($http, notificationService, authenticationService) {
return {
get: get,
post: post,
put: put,
del: del
}
function del(url, data, success, failure) {
authenticationService.setHeader();
$http.delete(url, data).then(function (result) {
success(result);
}, function (error) {
console.log(error.status)
if (error.status === 401) {
notificationService.displayError('Authenticate is required.');
} else if (failure != null) {
failure(error);
}
});
}
function post(url, data, success, failure) {
authenticationService.setHeader();
$http.post(url, data).then(function (result) {
success(result);
}, function (error) {
console.log(error.status)
if (error.status === 401) {
notificationService.displayError('Authenticate is required.');
} else if (failure != null) {
failure(error);
}
});
}
function put(url, data, success, failure) {
authenticationService.setHeader();
$http.put(url, data).then(function (result) {
success(result);
}, function (error) {
console.log(error.status)
if (error.status === 401) {
notificationService.displayError('Authenticate is required.');
} else if (failure != null) {
failure(error);
}
});
}
function get(url, params, success, failure) {
authenticationService.setHeader();
$http.get(url, params).then(function (result) {
success(result);
}, function (error) {
failure(error);
});
}
};
\ No newline at end of file
...@@ -3,53 +3,26 @@ ...@@ -3,53 +3,26 @@
</div> </div>
<div class="card-body"> <div class="card-body">
<form ng-controller="insertEmployeeProject" ng-submit="insert_employeeproject(employeeProject)" name="eproject"> <form ng-controller="insertEmployeeProject" ng-submit="insert_employeeproject(employeeProject)" name="eproject">
<div class="form-group"> <label>Tên Dự Án</label>
<div class="form-row"> <select ng-model="employeeProject.projectId" autofocus="autofocus" required="required">
<div class="col-md-6"> <option value=""> ==> Tên Dự Án</option>
<div class="form-label-group"> <option ng-repeat="project in pGroupProject" value="{{project.id}}">{{project.name}}</option>
<select ng-model="employeeProject.projectId" class="form-control" </select><br/>
autofocus="autofocus" required="required"> <label>Tài khoản nhân viên</label>
<option value=""> ==> Tên Dự Án</option> <input type="text" ng-model="employeeProject.userName" id="employee"
<option ng-repeat="project in pGroupProject" value="{{project.id}}">{{project.name}} placeholder="Tài khoản nhân viên" required="required"><br/>
</option> <label>Chức Vụ</label>
</select> <select ng-model="employeeProject.position" autofocus="autofocus"
</div> required="required">
</div> <option value="">==> Chức Vụ</option>
</div> <option value="TeamLead">TeamLead</option>
</div> <option value="Member">Member</option>
<div class="form-group"> </select><br/>
<div class="form-row">
<div class="col-md-6">
<div class="form-label-group">
<select ng-model="employeeProject.userId" class="form-control" autofocus="autofocus" required="required">
<option value=""> ==> Tên Tài Khoản</option>
<option ng-repeat="em in eProject" value="{{em.id}}">{{em.username}}</option>
</select>
</div>
</div>
</div>
</div>
<div class="form-group">
<div class="form-row">
<div class="col-md-6">
<div class="form-label-group">
<select ng-model="employeeProject.position" class="form-control" autofocus="autofocus" required="required">
<option value="">==> Chức Vụ</option>
<option value="TeamLead">TeamLead</option>
<option value="Member">Member</option>
<option value="HR">HR</option>
<option value="Manager">Manager</option>
</select>
</div>
</div>
</div>
</div>
<h3 ng-show="eproject.$valid" style="text-align: center; color: #1c7430">Bạn Có Thể Lưu</h3>
<h1>{{view.message}}</h1> <h1>{{view.message}}</h1>
<div> <div>
<input type="submit" value="Lưu"> <input type="submit" value="Lưu">
<input type="reset" value="Reset"> <input type="reset" value="Reset">
<button type="button" ui-sref="project">Black</button> <button type="button" ui-sref="project">Back</button>
</div> </div>
</form> </form>
</div> </div>
\ No newline at end of file
...@@ -2,6 +2,8 @@ var app = angular.module('myApp'); ...@@ -2,6 +2,8 @@ var app = angular.module('myApp');
app.controller('loadGroupProjectByProjectId', loadGroupProjectByProjectId); app.controller('loadGroupProjectByProjectId', loadGroupProjectByProjectId);
app.controller('insertEmployeeProject', insertEmployeeProject); app.controller('insertEmployeeProject', insertEmployeeProject);
app.controller('deleteEmployeeProject', deleteEmployeeProject); app.controller('deleteEmployeeProject', deleteEmployeeProject);
app.controller('updateGroutpProject', updateGroutpProject);
app.controller('loadEmployeeProjectDetail', loadEmployeeProjectDetail);
// controlers tạo Get API // controlers tạo Get API
function loadGroupProjectByProjectId($scope,$stateParams,$http) { function loadGroupProjectByProjectId($scope,$stateParams,$http) {
$http.get('http://localhost:8081/thong-tin-du-an/'+ $stateParams.ID).then(successCallback, errorCallback); $http.get('http://localhost:8081/thong-tin-du-an/'+ $stateParams.ID).then(successCallback, errorCallback);
...@@ -11,14 +13,12 @@ function loadGroupProjectByProjectId($scope,$stateParams,$http) { ...@@ -11,14 +13,12 @@ function loadGroupProjectByProjectId($scope,$stateParams,$http) {
$scope.listGruopProject = response.data $scope.listGruopProject = response.data
} }
} }
function errorCallback(error) { function errorCallback(error) {
//error code
console.log("can't get data!!"); console.log("can't get data!!");
} }
} }
// tạo controllers insert API // tạo controllers insert API
function insertEmployeeProject($scope, $http, $window) { function insertEmployeeProject($scope, $http, $state) {
$scope.insert_employeeproject = function () { $scope.insert_employeeproject = function () {
$http({ $http({
//khai báo type //khai báo type
...@@ -34,29 +34,16 @@ function insertEmployeeProject($scope, $http, $window) { ...@@ -34,29 +34,16 @@ function insertEmployeeProject($scope, $http, $window) {
} }
// kết quả trả về (THEN) // kết quả trả về (THEN)
}).then(successCallback, errorCallback); }).then(successCallback, errorCallback);
//tạo funtion nếu thành công!
function successCallback(response) { function successCallback(response) {
$scope.view = response.data; $scope.view = response.data;
if($scope.view.status == 200){
$state.go('groupProjectByProjectId', {ID: $scope.employeeProject.projectId});
}
} }
//tạo funtion kiểm tra nếu thất bại
function errorCallback(error) { function errorCallback(error) {
//error code
console.log("can't insert data!!"); console.log("can't insert data!!");
} }
} }
//get Employee
$http({
method : 'GET',
url : "http://localhost:8081/list_employee/"
}).then(function successCallback(response) {
console.log(response);
$scope.eProject=response.data;
}, function errorCallback(response) {
console.log(response)
});
// get Project // get Project
$http.get("http://localhost:8081/quan-tri/danh-sach-du-an").then(successCallback, errorCallback); $http.get("http://localhost:8081/quan-tri/danh-sach-du-an").then(successCallback, errorCallback);
...@@ -72,7 +59,7 @@ function insertEmployeeProject($scope, $http, $window) { ...@@ -72,7 +59,7 @@ function insertEmployeeProject($scope, $http, $window) {
console.log("can't get data!!"); console.log("can't get data!!");
} }
}; };
function deleteEmployeeProject($scope, $window, $http) { function deleteEmployeeProject($scope, $window, $http,$state) {
$scope.deleteEmployeeProject = function (gruopProject) { $scope.deleteEmployeeProject = function (gruopProject) {
if (confirm("Bạn có chắc chắn muốn xóa ?")) { if (confirm("Bạn có chắc chắn muốn xóa ?")) {
$http({ $http({
...@@ -83,17 +70,52 @@ function deleteEmployeeProject($scope, $window, $http) { ...@@ -83,17 +70,52 @@ function deleteEmployeeProject($scope, $window, $http) {
'Content-Type': 'application/json' 'Content-Type': 'application/json'
} }
}).then(successCallback, errorCallback); }).then(successCallback, errorCallback);
//tạo funtion nếu thành công!
function successCallback(response) { function successCallback(response) {
$window.location.reload(); $scope.view = response.data;
if($scope.view.status == 200){
// $window.location.reload();
$state.reload();
}
} }
//tạo funtion kiểm tra nếu thất bại
function errorCallback(error) { function errorCallback(error) {
//error code
console.log("can't delete data!!"); console.log("can't delete data!!");
} }
} }
}; };
}; };
\ No newline at end of file function updateGroutpProject($scope, $http,$state,$window) {
$scope.updatePositionProject = function (gruopProject) {
if (confirm("Bạn có chắc chắn muốn sửa ?")) {
$http({
method: 'PUT',
url: 'http://localhost:8081/cap-nhat-chuc-vu-thanh-vien',
data: $scope.gruopProject,
headers: {
'Content-Type': 'application/json'
}
}).then(successCallback, errorCallback);
function successCallback(response) {
$scope.view = response.data;
if($scope.view.status == 200){
$state.go('groupProjectByProjectId', {ID: $scope.gruopProject.projectDTO.id});
// $window.location.href = 'http://localhost:8081/#/groupProjectByProjectId/'+$scope.gruopProject.projectDTO.id;
}
}
function errorCallback(error) {
console.log("can't delete data!!");
}
}
};
};
function loadEmployeeProjectDetail($scope,$stateParams,$http) {
$http.get('http://localhost:8081/chi-tiet-thanh-vien-du-an/'+ $stateParams.ID).then(successCallback, errorCallback);
function successCallback(response) {
console.log(response.data);
{
$scope.gruopProject = response.data
}
}
function errorCallback(error) {
console.log("can't get data!!");
}
}
\ No newline at end of file
<!DOCTYPE html> <div class="card-header">
<html lang="en"> <i class="fas fa-table"></i> Cập nhật chức vụ của nhân viên trong nhóm
<head> </div>
<meta charset="UTF-8"> <div class="card-body">
<title>Title</title> <form ng-controller="updateGroutpProject" ng-submit="updatePositionProject(gruopProject)" name="formProject">
</head> <input type="hidden" ng-model="gruopProject.id" id="id"><br/>
<body> <input type="hidden" ng-model="gruopProject.projectDTO.id" id="idProject"><br/>
<label>Tài khoản nhân viên</label>
</body> <input type="text" ng-model="gruopProject.employeeDTO.username" id="descriptions"
</html> placeholder="Tài khoản nhân viên"
\ No newline at end of file ng-disabled="true"><br/>
<label>Chức Vụ</label><br/>
<select ng-model="gruopProject.position" autofocus="autofocus"
required="required">
<option value="">==> Chức Vụ</option>
<option value="TeamLead">TeamLead</option>
<option value="Member">Member</option>
</select><br/>
<div>
<h1>{{view.message}}</h1>
<input type="submit" value="Save">
<input type="reset" value="Reset">
<button type="button" ui-sref="groupProjectByProjectId({ID: gruopProject.projectDTO.id})">Back</button>
</div>
</form>
</div>
\ No newline at end of file
<div class="card mb-3"> <div class="card mb-3">
<div class="card-header"> <div class="card-header" ng-controller="loadGroupProjectByProjectId">
<i class="fas fa-table"></i> Danh Sách Dự Án
<i class="fas fa-table" ></i> Thành Viên Trong Nhóm Dự Án <div ng-model="ProjectName.name"></div>
</div> </div>
<div class="card-body"> <div class="card-body">
<div class="table-responsive" ng-controller="loadGroupProjectByProjectId"> <div class="table-responsive" >
<a ui-sref="addEmployeeProject" class="btn btn-primary btn-circle btn-sm" style="margin-bottom: 10px;"> Thêm thành viên</a>
<input type="text" ng-model="search" placeholder="Search" style="margin-bottom: 10px;"> <input type="text" ng-model="search" placeholder="Search" style="margin-bottom: 10px;">
<table class="table table-bordered" id="dataTable" width="100%" <table class="table table-bordered" id="dataTable" width="100%"
cellspacing="0"> cellspacing="0">
...@@ -21,7 +22,7 @@ ...@@ -21,7 +22,7 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr ng-repeat="gruopProject in listGruopProject"> <tr ng-repeat="gruopProject in pageGroupListProject">
<td>{{ gruopProject.employeeDTO.username }}</td> <td>{{ gruopProject.employeeDTO.username }}</td>
<td>{{ gruopProject.employeeDTO.lastName }}</td> <td>{{ gruopProject.employeeDTO.lastName }}</td>
<td>{{ gruopProject.employeeDTO.email}}</td> <td>{{ gruopProject.employeeDTO.email}}</td>
...@@ -29,14 +30,19 @@ ...@@ -29,14 +30,19 @@
<td>{{ gruopProject.joinDate | date:"dd/MM/yyyy" }}</td> <td>{{ gruopProject.joinDate | date:"dd/MM/yyyy" }}</td>
<td>{{ gruopProject.outDate | date:"dd/MM/yyyy" }}</td> <td>{{ gruopProject.outDate | date:"dd/MM/yyyy" }}</td>
<td> <td>
<a ui-sref="editproject({ID: project.id})" class="btn btn-warning btn-circle btn-sm"> <a ui-sref="editEmployeeProject({ID: gruopProject.id})" class="btn btn-warning btn-circle btn-sm">
Sửa </a> Cập Nhật </a>
<a class="btn btn-danger btn-circle btn-sm" ng-controller="deleteEmployeeProject" <a class="btn btn-danger btn-circle btn-sm" ng-controller="deleteEmployeeProject"
data-ng-click="deleteEmployeeProject(gruopProject)">xóa thành viên</a> data-ng-click="deleteEmployeeProject(gruopProject)">Xóa Thành Viên</a>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<a ui-sref="project" class="btn btn-primary btn-circle btn-sm" style="margin-bottom: 10px;"> Trở Về</a> <a ui-sref="addEmployeeProject" class="btn btn-primary btn-circle btn-sm" style="margin-bottom: 10px;"> Thêm thành viên</a>
<a ui-sref="project" class="btn btn-primary btn-circle btn-sm" style="margin-bottom: 10px;"> Back</a>
</div> </div>
</div> </div>
<div data-pagination="" data-num-pages="numPages()"
data-current-page="currentPage" data-max-size="maxSize"
data-boundary-links="true">
</div>
</div> </div>
\ No newline at end of file
angular.module("myApp").controller('groupProjectShowController', function ($scope,$stateParams,$http) {
$scope.currentPage = 1
,$scope.numPerPage = 2
,$scope.maxSize = 5;
$http.get('http://localhost:8081/thong-tin-du-an/'+ $stateParams.ID).then(successCallback, errorCallback);
function successCallback(response) {
console.log(response.data);
{
$scope.listGruopProject = response.data;
$scope.numPages = function () {
return Math.ceil($scope.listGruopProject.length / $scope.numPerPage);
};
$scope.$watch('currentPage + numPerPage', function () {
var begin = (($scope.currentPage - 1) * $scope.numPerPage)
, end = begin + $scope.numPerPage;
$scope.pageGroupListProject = $scope.listGruopProject.slice(begin, end);
});
}
}
function errorCallback(error) {
//error code
console.log("can't get data!!");
}
});
\ No newline at end of file
...@@ -3,50 +3,21 @@ ...@@ -3,50 +3,21 @@
</div> </div>
<div class="card-body"> <div class="card-body">
<form ng-controller="insertProject" ng-submit="insert_project()"> <form ng-controller="insertProject" ng-submit="insert_project()">
<div class="form-group"> <label>Tên Dự Án</label>
<div class="form-row"> <input type="text" ng-model="project.name" id="name" placeholder="Tên Dự Án"
<div class="col-md-6"> required="required" style="height: 20px;"><br/>
<div class="form-label-group"> <label>Mô tả ngắn</label>
<input type="text" ng-model="project.name" id="name" class="form-control" <input type="text" ng-model="project.descriptions" id="descriptions" placeholder="Mô tả ngắn"
placeholder="Tên Dự Án" required="required"><br/>
required="required" autofocus="autofocus"> <label>Ngày bắt đầu</label>
<label for="name">Tên Dự Án</label> <input type="date" ng-model="project.startDate" id="startDate" placeholder="Ngày Bắt Đầu" required="required"><br/>
</div> <label>Ngày kết thúc</label>
</div> <input type="date" ng-model="project.endDate" id="endDate" placeholder="nick skype" required="required"><br/>
<div class="col-md-6">
<div class="form-label-group">
<input type="text" ng-model="project.descriptions" id="descriptions"
class="form-control"
placeholder="Mô tả ngắn"
required="required">
<label for="descriptions">Mô tả ngắn</label>
</div>
</div>
</div>
</div>
<div class="form-group">
<div class="form-row">
<div class="col-md-6">
<div class="form-label-group">
<input type="date" ng-model="project.startDate" id="startDate" class="form-control"
placeholder="Ngày Bắt Đầu" required="required">
<label for="startDate">Ngày Bắt Đầu</label>
</div>
</div>
<div class="col-md-6">
<div class="form-label-group">
<input type="date" ng-model="project.endDate" id="endDate" class="form-control"
placeholder="nick skype" required="required">
<label for="endDate">Ngày Kết Thuc</label>
</div>
</div>
</div>
</div>
<h3 ng-show="formProject.$valid" style="text-align: center; color: #1c7430">Bạn Có Thể Lưu</h3>
<div> <div>
<h1>{{view.message}}</h1>
<input type="submit" value="Save"> <input type="submit" value="Save">
<input type="reset" value="Reset"> <input type="reset" value="Reset">
<button type="button" ui-sref="project">Black</button> <button type="button" ui-sref="project">Back</button>
</div> </div>
</form> </form>
</div> </div>
\ No newline at end of file
var app = angular.module('myApp'); var app = angular.module('myApp');
app.controller('showProject', showProject); // app.controller('showProject', showProject);
app.controller('insertProject', insertProject); app.controller('insertProject', insertProject);
app.controller('deleteProject', deleteProject); app.controller('deleteProject', deleteProject);
app.controller('updateProject', updateProject); app.controller('updateProject', updateProject);
app.controller('loadProjectDetail', loadProjectDetail); app.controller('loadProjectDetail', loadProjectDetail);
// controlers tạo Get API
function showProject($scope, $http) {
$http.get("http://localhost:8081/quan-tri/danh-sach-du-an").then(successCallback, errorCallback);
function successCallback(response) {
console.log(response.data);
{
$scope.listProject = response.data
}
}
function errorCallback(error) {
//error code
console.log("can't get data!!");
}
};
// controlers tạo Get API
// function showProject($scope, $http) {
// $scope.lstProject = [];
// $scope.page = 0;
// $scope.pagesCount = 0;
// $http.get("http://localhost:8081/quan-tri/danh-sach-du-an/" + $scope.page + "/2").then(successCallback, errorCallback);
//
// function successCallback(response) {
// console.log(response.data);
// {
// $scope.listProject = response.data.lstResult;
// $scope.page = response.data.page;
// $scope.pagesCount = response.data.totalPage;
// $scope.totalCount = response.data.totalItem;
// }
// }
//
// function errorCallback(error) {
// //error code
// console.log("can't get data!!");
// }
// };
// tạo controllers insert API // tạo controllers insert API
function insertProject($scope, $http, $window,$state) { function insertProject($scope, $http, $state) {
$scope.insert_project = function () { $scope.insert_project = function () {
$http({ $http({
//khai báo type
method: 'POST', method: 'POST',
//đường dẫn API
url: 'http://localhost:8081/quan-tri/them-du-an', url: 'http://localhost:8081/quan-tri/them-du-an',
//truyền dữ liệu nhập trên cline vào data
data: angular.toJson($scope.project), data: angular.toJson($scope.project),
//kiểu dữ liệu API
headers: { headers: {
'Content-Type': 'application/json' 'Content-Type': 'application/json'
} }
// kết quả trả về (THEN)
}).then(successCallback, errorCallback); }).then(successCallback, errorCallback);
//tạo funtion nếu thành công!
function successCallback(response) { function successCallback(response) {
// $window.location.href = "http://localhost:8081/#/project"; $scope.view = response.data;
$state.go('project'); if ($scope.view.status == 200) {
$state.go('project');
}
} }
//tạo funtion kiểm tra nếu thất bại
function errorCallback(error) { function errorCallback(error) {
//error code //error code
console.log("can't insert data!!"); console.log("can't insert data!!");
...@@ -66,15 +66,14 @@ function deleteProject($scope, $window, $http,$state) { ...@@ -66,15 +66,14 @@ function deleteProject($scope, $window, $http,$state) {
} }
}).then(successCallback, errorCallback); }).then(successCallback, errorCallback);
//tạo funtion nếu thành công!
function successCallback(response) { function successCallback(response) {
// $state.go('project'); $scope.view = response.data;
$window.location.reload(); if ($scope.view.status == 200) {
$state.reload();
}
} }
//tạo funtion kiểm tra nếu thất bại
function errorCallback(error) { function errorCallback(error) {
//error code
console.log("can't delete data!!"); console.log("can't delete data!!");
} }
} }
...@@ -82,7 +81,7 @@ function deleteProject($scope, $window, $http,$state) { ...@@ -82,7 +81,7 @@ function deleteProject($scope, $window, $http,$state) {
}; };
//tạo controller sửa theo id //tạo controller sửa theo id
function updateProject($scope, $window, $http,$state) { function updateProject($scope, $http, $state) {
$scope.updateProject = function (project) { $scope.updateProject = function (project) {
if (confirm("Bạn có muốn sửa không ?")) { if (confirm("Bạn có muốn sửa không ?")) {
$http({ $http({
...@@ -94,13 +93,13 @@ function updateProject($scope, $window, $http,$state) { ...@@ -94,13 +93,13 @@ function updateProject($scope, $window, $http,$state) {
} }
}).then(successCallback, errorCallback); }).then(successCallback, errorCallback);
//tạo funtion nếu thành công!
function successCallback(response) { function successCallback(response) {
$state.go('project'); $scope.view = response.data;
// $window.location.href = "http://localhost:8081/#/project"; if ($scope.view.status == 200) {
$state.go('project');
}
} }
//tạo funtion kiểm tra nếu thất bại
function errorCallback(error) { function errorCallback(error) {
//error code //error code
console.log("can't update data!!"); console.log("can't update data!!");
...@@ -108,17 +107,18 @@ function updateProject($scope, $window, $http,$state) { ...@@ -108,17 +107,18 @@ function updateProject($scope, $window, $http,$state) {
} }
}; };
}; };
function loadProjectDetail($scope,$stateParams,$http) {
$http.get('http://localhost:8081/quan-tri/chi-tiet-du-an/'+ $stateParams.ID).then(successCallback, errorCallback);
function successCallback(response) {
console.log(response.data);
{
$scope.project = response.data
}
}
function errorCallback(error) { function loadProjectDetail($scope, $stateParams, $http) {
//error code $http.get('http://localhost:8081/quan-tri/chi-tiet-du-an/' + $stateParams.ID).then(successCallback, errorCallback);
console.log("can't get data!!");
function successCallback(response) {
console.log(response.data);
{
$scope.project = response.data
} }
}
function errorCallback(error) {
console.log("can't get data!!");
}
} }
\ No newline at end of file
...@@ -3,69 +3,27 @@ ...@@ -3,69 +3,27 @@
</div> </div>
<div class="card-body"> <div class="card-body">
<form ng-controller="updateProject" ng-submit="updateProject(project)" name="formProject"> <form ng-controller="updateProject" ng-submit="updateProject(project)" name="formProject">
<div class="form-group"> <label>Tên Dự Án</label>
<div class="form-row"> <input type="text" ng-model="project.name" id="name"
<div class="col-md-6"> placeholder="Tên Dự Án"
<div class="form-label-group"> required="required" autofocus="autofocus" name="txtName"><br/>
<input type="text" ng-model="project.name" id="name" class="form-control" <label>Mô tả ngắn</label>
placeholder="Tên Dự Án" <input type="text" ng-model="project.descriptions" id="descriptions"
required="required" autofocus="autofocus" name="txtName"> placeholder="Mô tả ngắn"
<label for="name">Tên Dự Án</label> required="required" name="txtDescriptions"><br/>
</div> <select ng-model="project.status" autofocus="autofocus"
</div> required="required">
<div class="col-md-6"> <option value="">==> Trạng Thái</option>
<div class="form-label-group"> <option value="0">Dự Kiến</option>
<input type="text" ng-model="project.descriptions" id="descriptions" <option value="1">Đang Tiến Hành</option>
class="form-control" <option value="2">Đã Hoàn Thành</option>
placeholder="Mô tả ngắn" </select><br/>
required="required" name="txtDescriptions"> <input type="hidden" ng-model="project.id" id="id"><br/>
<label for="descriptions">Mô tả ngắn</label>
</div>
</div>
</div>
</div>
<div class="form-group">
<div class="form-row">
<div class="col-md-6">
<div class="form-label-group">
<input type="hidden" ng-model="project.id" id="id" class="form-control">
</div>
</div>
<div class="col-md-6">
<div class="form-label-group">
<select ng-model="project.status" class="form-control" autofocus="autofocus" required="required">
<option value="">==> Trạng Thái</option>
<option value="0">Dự Kiến</option>
<option value="1">Đang Tiến Hành</option>
<option value="2">Đã Hoàn Thành</option>
</select>
</div>
</div>
</div>
</div>
<div class="form-group">
<div class="form-row">
<div class="col-md-6">
<div class="form-label-group">
<input type="date" ng-model="project.startDate" id="startDate" class="form-control"
placeholder="Ngày Bắt Đầu" required="required">
<label for="startDate">Ngày Bắt Đầu</label>
</div>
</div>
<div class="col-md-6">
<div class="form-label-group">
<input type="date" ng-model="project.endDate" id="endDate" class="form-control"
placeholder="nick skype" required="required">
<label for="endDate">Ngày Kết Thúc</label>
</div>
</div>
</div>
</div>
<h3 ng-show="formProject.$valid" style="text-align: center; color: #1c7430">Bạn Có Thể Lưu</h3>
<div> <div>
<h1>{{view.message}}</h1>
<input type="submit" value="Save"> <input type="submit" value="Save">
<input type="reset" value="Reset"> <input type="reset" value="Reset">
<button type="button" ui-sref="project">Black</button> <button type="button" ui-sref="project">Back</button>
</div> </div>
</form> </form>
</div> </div>
\ No newline at end of file
...@@ -4,8 +4,7 @@ ...@@ -4,8 +4,7 @@
<i class="fas fa-table"></i> Danh Sách Dự Án <i class="fas fa-table"></i> Danh Sách Dự Án
</div> </div>
<div class="card-body"> <div class="card-body">
<div class="table-responsive" ng-controller="showProject"> <div class="table-responsive" >
<a ui-sref="addproject" class="btn btn-primary btn-circle btn-sm" style="margin-bottom: 10px;"> Thêm </a>
<input type="text" ng-model="search" placeholder="Search" style="margin-bottom: 10px;"> <input type="text" ng-model="search" placeholder="Search" style="margin-bottom: 10px;">
<table class="table table-bordered" id="dataTable" width="100%" <table class="table table-bordered" id="dataTable" width="100%"
cellspacing="0"> cellspacing="0">
...@@ -20,12 +19,16 @@ ...@@ -20,12 +19,16 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr ng-repeat="project in listProject|filter:search"> <tr ng-repeat="project in pageListProject|filter:search">
<td>{{ project.name }}</td> <td>{{ project.name }}</td>
<td>{{ project.descriptions }}</td> <td>{{ project.descriptions }}</td>
<td>{{ project.startDate | date:"dd/MM/yyyy" }}</td> <td>{{ project.startDate | date:"dd/MM/yyyy" }}</td>
<td>{{ project.endDate | date:"dd/MM/yyyy" }}</td> <td>{{ project.endDate | date:"dd/MM/yyyy" }}</td>
<td>{{ project.status}}</td> <td>
<span ng-if="project.status == 0" style="color: #34ce57">Dự Kiến</span>
<span ng-if="project.status == 1" style="color: #0e90d2">Đang Tiến Hành</span>
<span ng-if="project.status == 2" style="color: #b21f2d" >Hoàn Thành</span>
</td>
<td><a ui-sref="groupProjectByProjectId({ID: project.id})" class="btn btn-info btn-circle btn-sm"> <td><a ui-sref="groupProjectByProjectId({ID: project.id})" class="btn btn-info btn-circle btn-sm">
Xem </a> Xem </a>
<a ui-sref="editproject({ID: project.id})" class="btn btn-warning btn-circle btn-sm"> <a ui-sref="editproject({ID: project.id})" class="btn btn-warning btn-circle btn-sm">
...@@ -35,6 +38,12 @@ ...@@ -35,6 +38,12 @@
</tr> </tr>
</tbody> </tbody>
</table> </table>
<a ui-sref="addproject" class="btn btn-primary btn-circle btn-sm" style="margin-bottom: 10px;"> Thêm Dự Án Mới</a>
</div> </div>
</div> </div>
</div> <!-- <pager-directive page="{{page}}" custom-path="{{customPath}}" pages-count="{{pagesCount}}" total-count="{{totalCount}}" search-func="getProject(page)"></pager-directive>-->
\ No newline at end of file <div data-pagination="" data-num-pages="numPages()"
data-current-page="currentPage" data-max-size="maxSize"
data-boundary-links="true">
</div>
</div>
angular.module("myApp").controller('projectViewsController', function ($scope, $http) {
//trang đang đứng trên font-end
$scope.currentPage = 1
//số item hiển thị trong 1 page
, $scope.numPerPage = 4
//tổng số page hiển thị trên thanh chọn
, $scope.maxSize = 5;
$http.get("http://localhost:8081/quan-tri/danh-sach-du-an").then(successCallback, errorCallback);
function successCallback(response) {
console.log(response.data);
{
$scope.listProject = response.data;
$scope.numPages = function () {
return Math.ceil($scope.listProject.length / $scope.numPerPage);
};
$scope.$watch('currentPage + numPerPage', function () {
var begin = (($scope.currentPage - 1) * $scope.numPerPage)
, end = begin + $scope.numPerPage;
$scope.pageListProject = $scope.listProject.slice(begin, end);
});
}
}
function errorCallback(error) {
console.log("can't get data!!");
}
});
\ No newline at end of file
/* /*
*/ */
angular.module("myApp").controller("timeSheetController", function($scope, $http, $state) { angular.module("myApp").controller("timeSheetController", function($scope, $http,$window) {
console.log("Time Sheet controller"); console.log("Time Sheet controller");
$scope.ts = { $scope.ts = {
"id": "",
"title": "", "title": "",
"content": "", "content": "",
"note": "", "note": ""
"eproject": "",
"updatedAt": ""
}; };
$scope.tsdto = { $scope.tsdto = {
"id": "", "id": "",
"title": "", "title": "",
...@@ -23,21 +19,33 @@ angular.module("myApp").controller("timeSheetController", function($scope, $http ...@@ -23,21 +19,33 @@ angular.module("myApp").controller("timeSheetController", function($scope, $http
}; };
//get all time sheet //get all time sheet
//function getAllTimesheet(){
$http({
method: 'GET',
url: "http://localhost:8080/eproject/timesheet/show"
}).then(function successCallback(response) {
console.log(response);
$scope.myTimeSheets = response.data;
}, function errorCallback(response) {
console.log(response)
});
//}
//get all eproject
$http({ $http({
method : 'GET', method: 'GET',
url : "http://localhost:8080/eproject/timesheet/show" url: "http://localhost:8080/eproject/getAll"
}).then(function successCallback(response) { }).then(function successCallback(response) {
console.log(response); console.log(response);
$scope.myTimeSheets=response.data; $scope.eProjectList = response.data;
}, function errorCallback(response) { }, function errorCallback(response) {
console.log(response) console.log(response)
}); });
//delete time sheet //delete time sheet
$scope.delete = function (ts) { $scope.delete = function (ts) {
$http({ $http({
method : 'DELETE', method: 'DELETE',
url : "http://localhost:8080/eproject/timesheet/delete/" + ts.id url: "http://localhost:8080/eproject/timesheet/delete/" + ts.id
}).then(function successCallback(response) { }).then(function successCallback(response) {
console.log(response); console.log(response);
$state.reload(); $state.reload();
...@@ -49,11 +57,12 @@ angular.module("myApp").controller("timeSheetController", function($scope, $http ...@@ -49,11 +57,12 @@ angular.module("myApp").controller("timeSheetController", function($scope, $http
$scope.save = save; $scope.save = save;
function save(){
function save() {
console.log($scope.tsdto); console.log($scope.tsdto);
$http({ $http({
method : 'POST', method: 'POST',
url : "http://localhost:8080/eproject/timesheet/add", url: "http://localhost:8080/eproject/timesheet/add",
data: $scope.tsdto data: $scope.tsdto
}).then(function successCallback(response) { }).then(function successCallback(response) {
console.log(response); console.log(response);
...@@ -65,6 +74,7 @@ angular.module("myApp").controller("timeSheetController", function($scope, $http ...@@ -65,6 +74,7 @@ angular.module("myApp").controller("timeSheetController", function($scope, $http
} }
$scope.getTs = getTs; $scope.getTs = getTs;
function getTs(ts) { function getTs(ts) {
$scope.tsdto.id = ts.id; $scope.tsdto.id = ts.id;
$scope.tsdto.title = ts.title; $scope.tsdto.title = ts.title;
...@@ -74,11 +84,12 @@ angular.module("myApp").controller("timeSheetController", function($scope, $http ...@@ -74,11 +84,12 @@ angular.module("myApp").controller("timeSheetController", function($scope, $http
} }
$scope.update = update; $scope.update = update;
function update(){
function update() {
$http({ $http({
headers: "content-type: application/json", headers: "content-type: application/json",
method : 'POST', method: 'POST',
url : "http://localhost:8080/eproject/timesheet/update", url: "http://localhost:8080/eproject/timesheet/update",
data: $scope.tsdto data: $scope.tsdto
}).then(function successCallback(response) { }).then(function successCallback(response) {
console.log(response); console.log(response);
...@@ -88,56 +99,84 @@ angular.module("myApp").controller("timeSheetController", function($scope, $http ...@@ -88,56 +99,84 @@ angular.module("myApp").controller("timeSheetController", function($scope, $http
$state.reload(); $state.reload();
}); });
} }
}).directive('pgnTable', ['$compile', function ($compile) {
return { // $scope.myTimeSheets = [];
restrict: 'EA', // $scope.save = save;
templateUrl: 'pages/timesheet/timeSheet.html', // $scope.currentPage = 1;
replace: true, // $scope.timesheetPerPage = 3;
scope: { // $scope.maxSize = 5;
pages: "=pgnTable" // this.myTimeSheets = $scope.myTimeSheets;
}, // $scope.numOfPage = numOfPage;
controller: function ($scope) { // $scope.dataHasLoaded = false;
$scope.currentPage=1; // $scope.makeTimesheet = function () {
$scope.numLimit=5; // $scope.myTimeSheets = [];
$scope.start = 0; // for (let i = 1; i <=50 ; i++) {
$scope.$watch("pages",function(newVal){ // $scope.myTimeSheets.push( {text : 'ts'+ i , done:false});
if(newVal){ // }
$scope.pages=Math.ceil($scope.pages.length/$scope.numLimit); //
} // };
}); // $scope.makeTimesheet();
$scope.hideNext=function(){ // $scope.getAllTimesheet = getAllTimesheet;
if(($scope.start + $scope.numLimit) < $scope.pages.length){ // //$scope.getTotalTimesheet = getTotalTimesheet;
return false; // getAllTimesheet();
} // $scope.pageChangedIndex = pageChangedIndex;
else // function pageChangedIndex() {
return true; // console.log($scope.currentPage);
}; // }
$scope.hidePrev=function(){ // function numOfPage() {
if($scope.start===0){ // return Math.ceil($scope.myTimeSheets.length/ $scope.timesheetPerPage);
return true; //
} // }
else });
return false; // }).directive('pgnTable', ['$compile', function ($compile) {
}; // return {
$scope.nextPage=function(){ // restrict: 'EA',
console.log("next pages"); // templateUrl: 'pages/timesheet/timeSheet.html',
$scope.currentPage++; // replace: true,
$scope.start=$scope.start+ $scope.numLimit; // scope: {
console.log( $scope.start) // pages: "=pgnTable"
}; // },
$scope.PrevPage=function(){ // controller: function ($scope) {
if($scope.currentPage>1){ // $scope.currentPage=1;
$scope.currentPage--; // $scope.numLimit=5;
} // $scope.start = 0;
console.log("next pages"); // $scope.$watch("pages",function(newVal){
$scope.start=$scope.start - $scope.numLimit; // if(newVal){
console.log( $scope.start) // $scope.pages=Math.ceil($scope.pages.length/$scope.numLimit);
}; // }
}, // });
compile: function(elem) { // $scope.hideNext=function(){
return function(ielem, $scope) { // if(($scope.start + $scope.numLimit) < $scope.pages.length){
$compile(ielem)($scope); // return false;
}; // }
} // else
}; // return true;
}]); // };
\ No newline at end of file // $scope.hidePrev=function(){
// if($scope.start===0){
// return true;
// }
// else
// return false;
// };
// $scope.nextPage=function(){
// console.log("next pages");
// $scope.currentPage++;
// $scope.start=$scope.start+ $scope.numLimit;
// console.log( $scope.start)
// };
// $scope.PrevPage=function(){
// if($scope.currentPage>1){
// $scope.currentPage--;
// }
// console.log("next pages");
// $scope.start=$scope.start - $scope.numLimit;
// console.log( $scope.start)
// };
// },
// compile: function(elem) {
// return function(ielem, $scope) {
// $compile(ielem)($scope);
// };
// }
// };
/* /*
*/ */
angular.module("myApp").controller("timeSheetDetailController", function($scope, $http, $stateParams, $state) { angular.module("myApp").controller("timeSheetDetailController", function($scope, $http, $stateParams, $state) {
console.log("Time Sheet Detail Controller"); console.log("Time Sheet Detail Controller");
......
<!--<!DOCTYPE html>--> <script>
<!--<html lang="en" ng-app="myApp" ng-controller="timesheetController">--> function showAddTimeSheetFunction() {
<!--<head>--> var x = document.getElementById("addDivTS");
<!-- <meta charset="UTF-8">--> var n = document.getElementById("addTimeSheet");
<!-- <title>Time Sheet</title>--> if (x.style.display === "none") {
<!-- <meta name="viewport" content="width=device-width, initial-scale=1">--> x.style.display = "block";
<!-- <script src="//unpkg.com/@uirouter/angularjs/release/angular-ui-router.min.js"></script>--> n.value = "Close";
<!-- <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"--> } else {
<!-- integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"--> x.style.display = "none";
<!-- crossorigin="anonymous"></script>--> n.value = "Add TimeSheet";
<!-- <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"--> }
<!-- integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">--> }
<!-- <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>--> </script>
<!-- <script src="timeSheetController.js"></script>-->
<!--</head>-->
<!--<body>-->
<!--</body>-->
<!--</html>-->
<div class="container"> <div class="container">
<div class="table-wrapper"> <div class="table-wrapper">
<div class="table-title"> <div class="table-title">
...@@ -25,11 +18,11 @@ ...@@ -25,11 +18,11 @@
<div class="col-sm-6"> <div class="col-sm-6">
<h2><b>TimeSheet</b></h2> <h2><b>TimeSheet</b></h2>
<label> <label>
<input type="text" ng-model="search" placeholder="Search" style="color: black"/> Search: <input type="text" ng-model="search" placeholder="Search" style="color: black; margin: 10px"/>
</label> </label>
</div> </div>
<div class="col-sm-6"> <div class="col-sm-6">
<input id="addTimeSheet" class="btn btn-success" data-toggle="modal" type="submit" name="addTS" value="Add" onclick="showAddTimeSheetFunction()"/> <input id="addTimeSheet" class="btn btn-success" data-toggle="modal" type="submit" name="addTS" value="Add TimeSheet" onclick="showAddTimeSheetFunction()"/>
</div> </div>
</div> </div>
</div> </div>
...@@ -59,15 +52,21 @@ ...@@ -59,15 +52,21 @@
</tr> </tr>
<tr> <tr>
<td><label>Employee Project Id</label></td> <td><label>Employee Project Id</label></td>
<!-- <td>-->
<!-- <input type="text" maxlength="10" value="" ng-model="tsdto.eprojectId" style="width: 100%;"/>-->
<!-- </td>-->
<td> <td>
<input type="text" maxlength="10" value="" ng-model="tsdto.eprojectId" style="width: 100%;"/> <select ng-model="tsdto.eprojectId">
<option value="">Select Project</option>
<option ng-repeat="ep in eProjectList" value="{{ep.id}}">{{ep.project.name}}</option>
</select>
</td> </td>
</tr> </tr>
<tr> <tr>
<td><label>Employee Id</label></td> <td><label>Employee Id</label></td>
<td> <td>
<input type="text" maxlength="10" value="" ng-model="tsdto.employeeId" style="width: 100%;"/> <input type="text" maxlength="10" value="" ng-model="tsdto.employeeId"/>
</td> </td>
</tr> </tr>
<tr> <tr>
...@@ -126,7 +125,7 @@ ...@@ -126,7 +125,7 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr class="tss" ng-repeat="ts in myTimeSheets | limitTo:numLimit:start"> <tr class="tss" ng-repeat="ts in myTimeSheets | limitTo:numLimit:start | filter: search">
<td>{{$index + 1}}</td> <td>{{$index + 1}}</td>
<td>{{ts.title}}</td> <td>{{ts.title}}</td>
<td>{{ts.content}}</td> <td>{{ts.content}}</td>
...@@ -138,11 +137,10 @@ ...@@ -138,11 +137,10 @@
<td><a ui-sref="timeSheet" ng-click="getTs(ts);" onclick="document.getElementById('updateDivTS').style.display = 'block'"class="edit" data-toggle="modal"><i class="material-icons" data-toggle="tooltip" title="Edit">&#xE254;</i></a></td> <td><a ui-sref="timeSheet" ng-click="getTs(ts);" onclick="document.getElementById('updateDivTS').style.display = 'block'"class="edit" data-toggle="modal"><i class="material-icons" data-toggle="tooltip" title="Edit">&#xE254;</i></a></td>
<td><a ui-sref="timeSheet" ng-click="delete(ts);"class="delete" data-toggle="modal"><i class="material-icons" data-toggle="tooltip" title="Delete">&#xE872;</i></a></td> <td><a ui-sref="timeSheet" ng-click="delete(ts);"class="delete" data-toggle="modal"><i class="material-icons" data-toggle="tooltip" title="Delete">&#xE872;</i></a></td>
</tr> </tr>
<tr> <!-- <tr>-->
<td colspan="9" style='text-align: center'><span>Page# {{currentPage}} of {{pages}}</span> <!-- <h6><code>rotate</code> defaulted to <code>true</code> and <code>force-ellipses</code> set to <code>true</code>:</h6>-->
<span style="float:left;padding:5px"><a ng-hide="hidePrev()" href="" ng-click="PrevPage()">Prev</a></span> <!-- <ul uib-pagination total-items="getAllTimesheet()" ng-model="currentPage" max-size="maxSize" class="pagination-sm" boundary-link-number="true" ng-change ="pageChangedIndex()" items-per-page = "timesheetPerPage" ></ul>-->
<span style="float:right;padding:5px"><a ng-hide="hideNext()" href="" ng-click="nextPage()">Next</a></span></td> <!-- </tr>-->
</tr>
</tbody> </tbody>
</table> </table>
</div> </div>
......
angular.module("MyTimeSheet").controller("timesheetController", function($scope, $http,$window) {
console.log("Time Sheet controller");
$scope.ts = {
"title": "",
"content": "",
"note": ""
};
$http({
header : 'Access-Control-Allow-Origin: http://localhost:63342/MockProject_01/public/pages/timesheet/timesheet.html?_ijt=ee540pqfq7tplkmo9mjj447ne',
method : 'GET',
url : "http://localhost:8080/eproject/timesheet",
}).then(function successCallback(response) {
console.log(response)
$scope.timesheet=response.data;
}, function errorCallback(response) {
console.log(response)
});
});
\ No newline at end of file
...@@ -91,8 +91,8 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony ...@@ -91,8 +91,8 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony
</ul> </ul>
</li> </li>
<li> <li>
<a href="widgets.html"> <a href="timesheet.html">
<i class="fa fa-th"></i> <span>Widgets</span> <i class="fa fa-th"></i> <span>TimeSheet</span>
<small class="label pull-right label-info">08</small> <small class="label pull-right label-info">08</small>
</a> </a>
</li> </li>
......
This diff is collapsed.
...@@ -91,8 +91,8 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony ...@@ -91,8 +91,8 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony
</ul> </ul>
</li> </li>
<li> <li>
<a href="widgets.html"> <a href="timesheet.html">
<i class="fa fa-th"></i> <span>Widgets</span> <i class="fa fa-th"></i> <span>TimeSheet</span>
<small class="label pull-right label-info">08</small> <small class="label pull-right label-info">08</small>
</a> </a>
</li> </li>
......
...@@ -70,13 +70,13 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony ...@@ -70,13 +70,13 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony
<li class="treeview"> <li class="treeview">
<a href="#"> <a href="#">
<i class="fa fa-laptop"></i> <i class="fa fa-laptop"></i>
<span>Components</span> <span>Project</span>
<i class="fa fa-angle-left pull-right"></i> <i class="fa fa-angle-left pull-right"></i>
</a> </a>
<ul class="treeview-menu"> <!-- <ul class="treeview-menu">-->
<li><a href="grids.html"><i class="fa fa-angle-right"></i> Grids</a></li> <!-- <li><a href="grids.html"><i class="fa fa-angle-right"></i> Grids</a></li>-->
<li><a href="media.html"><i class="fa fa-angle-right"></i> Media Css</a></li> <!-- <li><a href="media.html"><i class="fa fa-angle-right"></i> Media Css</a></li>-->
</ul> <!-- </ul>-->
<li class="treeview"> <li class="treeview">
<a href="#"> <a href="#">
...@@ -92,8 +92,8 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony ...@@ -92,8 +92,8 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony
</ul> </ul>
</li> </li>
<li> <li>
<a href="widgets.html"> <a href="timesheet.html">
<i class="fa fa-th"></i> <span>Widgets</span> <i class="fa fa-th"></i> <span>Timesheet</span>
<small class="label pull-right label-info">08</small> <small class="label pull-right label-info">08</small>
</a> </a>
</li> </li>
...@@ -112,9 +112,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony ...@@ -112,9 +112,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony
<i class="fa fa-table"></i> <span>Tables</span> <i class="fa fa-table"></i> <span>Tables</span>
<i class="fa fa-angle-left pull-right"></i> <i class="fa fa-angle-left pull-right"></i>
</a> </a>
<ul class="treeview-menu">
<li><a href="tables.html"><i class="fa fa-angle-right"></i> Simple tables</a></li>
</ul>
</li> </li>
<li class="treeview"> <li class="treeview">
<a href="#"> <a href="#">
...@@ -133,8 +131,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony ...@@ -133,8 +131,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony
<ul class="treeview-menu"> <ul class="treeview-menu">
<li><a href="login.html"><i class="fa fa-angle-right"></i> Login</a></li> <li><a href="login.html"><i class="fa fa-angle-right"></i> Login</a></li>
<li><a href="signup.html"><i class="fa fa-angle-right"></i> Register</a></li> <li><a href="signup.html"><i class="fa fa-angle-right"></i> Register</a></li>
<li><a href="404.html"><i class="fa fa-angle-right"></i> 404 Error</a></li>
<li><a href="500.html"><i class="fa fa-angle-right"></i> 500 Error</a></li>
<li><a href="blank-page.html"><i class="fa fa-angle-right"></i> Blank Page</a></li> <li><a href="blank-page.html"><i class="fa fa-angle-right"></i> Blank Page</a></li>
</ul> </ul>
</li> </li>
...@@ -493,10 +490,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony ...@@ -493,10 +490,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony
} }
} }
</script> </script>
<!-- //Classie --><!-- //for toggle left push menu script -->
<!--scrolling js-->
<script src="js/jquery.nicescroll.js"></script>
<script src="js/scripts.js"></script> <script src="js/scripts.js"></script>
<!--//scrolling js--> <!--//scrolling js-->
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment