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

update new

parent 5a3250a9
......@@ -8591,4 +8591,19 @@ tr:nth-child(n+3) td:nth-child(odd):not(:first-child){
.topnav .search-container button:hover {
background: #ccc;
}
@media screen and (max-width:992px){
.row {
width: 25%;
}
}
@media screen and (max-width:768px){
.row {
width: 50%;
}
}
@media screen and (max-width:576px){
.row {
width:100%;
}
}
\ No newline at end of file
......@@ -3,7 +3,7 @@
<table class="table">
<form>
<div class="form-row">
<div class="col">
<div class="row">
<tr>
<td><label>User Name</label></td>
<td>
......@@ -69,5 +69,7 @@
</td>
</tr>
</table>
</div>
</div>
\ 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);
});
angular.module("myApp").controller('IssuesShowController', function ($scope,$stateParams,$http,$state,$filter) {
//lấy danh sách +phân trang+tìm kiếm
$scope.ListIssues = [];
$scope.currentPage = 1;
$scope.numPerPage = 3;
$scope.maxSize = 5;
$scope.numberOfPage = numberOfPage;
$scope.dataHasLoaded = false;
//mới thêm
$scope.makeEmployee = function () {
$scope.ListIssues = [];
for (i = 1; i <= 100; i++) {
$scope.ListIssues.push({text: 'issue ' + i, done: false});
}
};
$scope.keyword = "";
$scope.getAll = getAll;
$scope.getTotalItems = getTotalItems;
getAll();
function getTotalItems() {
return $filter('filter')($scope.ListIssues, {'title': $scope.keyword}).length;
}
$scope.pageChangedIndex = function(){
console.log($scope.currentPage);
}
function numberOfPage() {
return Math.ceil($scope.ListIssues.length / $scope.numPerPage);
};
function getAll() {
$http.get('http://localhost:8081/danh-sach-issues').then(successCallback, errorCallback);
function successCallback(response) {
console.log(response.data);
{
$scope.ListIssues = response.data;
}
}
}
function errorCallback(error) {
//error code
console.log("can't get data!!");
}
//end
//update
$scope.updateIssues = function (issue) {
if (confirm("Bạn có muốn thay đổi trạng thái không ?")) {
$http({
......
......@@ -25,7 +25,7 @@
</div>
<!-- Single Comment -->
<div class="media mb-4">
<div class="media mb-4" ng-controller="showComment()" ng-repeat="comment in CommentIssues">
<div class="media-body">
<h5 class="mt-0">UserName</h5><p>Thời gian đăng</p>
-<p>Nội dung comment</p>-
......
......@@ -3,12 +3,12 @@
<div class="col-md-8">
<tr>
<td><a ui-sref="addIssues" class="btn btn-success" data-toggle="modal">
<i class="fa fa-file-pdf-o" aria-hidden="true"></i> <span>Thêm Dự Án Mới</span></a></a></td>
<td><a ui-sref="addIssues" class="btn btn-success" data-toggle="modal"><i
class="fa fa-user-plus"></i> <span>Thêm Dự Án Mới</span></a></a></td>
</tr>
<h4></h4>
<tr></tr>
<input type="text" ng-model="search" placeholder="Search" style="margin-bottom: 10px;">
<input class="search" ng-model="keyword" type="text" placeholder="Search" ng-change="currentPage =1">
<tr></tr>
<h2>Danh Sách Issue</h2>
......@@ -25,7 +25,7 @@
</tr>
</thead>
<tbody>
<tr ng-repeat="issue in pageListIssues|filter:search">
<tr ng-repeat="issue in ListIssues| filter:{title:keyword} |lmto:3:3*(currentPage-1) track by $index">
<td>{{ issue.project.name }}</td>
<td>{{ issue.title }}</td>
<td>{{ issue.startDate | date:"dd/MM/yyyy" }}</td>
......@@ -56,12 +56,10 @@
</tbody>
</table>
<div data-pagination="" data-num-pages="numPages()"
data-current-page="currentPage" data-max-size="maxSize"
data-boundary-links="true">
</div>
<uib-pagination total-items="getTotalItems()" boundary-link-numbers="true" ng-model="currentPage"
ng-change="pageChangedIndex()" rotate="true"
items-per-page="numPerPage"></uib-pagination>
</div>
</div>
</div>
......@@ -44,12 +44,7 @@ var app = angular.module("myApp").controller('loadIssuesDetail', function ($scop
});
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) {
......
......@@ -23,6 +23,15 @@
</div>
<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()"/>
<div class="col-sm-4 pull-right">
<label>PageSize:</label>
<select ng-value="leaveFormPerPage" ng-model="leaveFormPerPage" class="form-control">
<option>3</option>
<option>5</option>
<option>50</option>
<option>100</option>
</select>
</div>
</div>
</div>
</div>
......@@ -109,7 +118,7 @@
</tr>
</thead>
<tbody>
<tr class="lff" ng-repeat="lf in leaveForms | filter: search">
<tr class="lff" ng-repeat="lf in searched = (leaveFormList | filter:search | orderBy : base :reverse) | beginningLeaveForm:(currentPage-1)*leaveFormPerPage | limitTo:leaveFormPerPage">
<td>{{$index + 1}}</td>
<td>{{lf.title}}</td>
<td>{{lf.content}}</td>
......@@ -126,6 +135,19 @@
</tbody>
</table>
</div>
<div class="col-md-12" ng-show="filterLeaveForm == 0">
<div class="col-md-12">
<h4>No records found..</h4>
</div>
</div>
<div class="col-md-12">
<div class="col-md-6 pull-left">
<h5>Showing {{ searched.length }} of {{ entireLeaveForm}} entries</h5>
</div>
<uib-pagination total-items="filterLeaveForm" boundary-link-numbers="true" ng-model="currentPage"
ng-change="pagePosition(currentPage)" rotate="true"
items-per-page="leaveFormPerPage"></uib-pagination>
</div>
</div>
</div>
</div>
......
/*
*/
angular.module("myApp").controller("leaveFormController", function($scope, $http, $state) {
angular.module("myApp")
.filter('beginningLeaveForm', function() {
return function(input, begin) {
if (input) {
begin = +begin;
return input.slice(begin);
}
return [];
}
})
.controller("leaveFormController", function($scope, $http, $state) {
console.log("Leave Form controller");
$scope.lf = {
......@@ -28,11 +38,30 @@ angular.module("myApp").controller("leaveFormController", function($scope, $http
url : "http://localhost:8081/employee/leaveform/show"
}).then(function successCallback(response) {
console.log(response);
$scope.leaveForms=response.data;
$scope.leaveFormList = response.data;
$scope.currentPage = 1;
$scope.leaveFormPerPage = 3;
$scope.filterLeaveForm = $scope.leaveFormList.length;
$scope.entireLeaveForm = $scope.leaveFormList.length;
}, function errorCallback(response) {
console.log(response)
});
$scope.pagePosition = function(pageNumber) {
$scope.currentPage = pageNumber;
};
$scope.filter = function() {
$timeout(function() {
$scope.filterLeaveForm = $scope.searched.length;
}, 20);
};
$scope.sortWith = function(base) {
$scope.base = base;
$scope.reverse = !$scope.reverse;
};
//get all leave type
$http({
method : 'GET',
......
<div class="container">
<div class="row">
<div class="row">
<form ng-controller="insertEmployeeProject" ng-submit="insert_employeeproject(employeeProject)" name="eproject">
<h1 style="text-align: center">Thành thành viên mới của dự án</h1>
<div class="form-row">
......@@ -30,5 +32,6 @@
<button type="button" ui-sref="project">Back</button>
</div>
</form>
</div>
</div>
</div>
\ No newline at end of file
<div class="container">
<div class="row">
<form ng-controller="updateGroutpProject" ng-submit="updatePositionProject(gruopProject)" name="formProject">
<input type="hidden" ng-model="gruopProject.id" id="id"><br/>
<input type="hidden" ng-model="gruopProject.projectDTO.id" id="idProject"><br/>
......@@ -20,5 +21,5 @@
<button type="button" ui-sref="groupProjectByProjectId({ID: gruopProject.projectDTO.id})">Back</button>
</div>
</form>
</div>
</div>
\ No newline at end of file
......@@ -7,6 +7,10 @@
<td><a ui-sref="addEmployeeProject" class="btn btn-success" data-toggle="modal"><i
class="fa fa-user-plus"></i> <span>Thêm Dự Án Mới</span></a></a></td>
</tr>
<h4></h4>
<tr></tr>
<input type="text" ng-model="search" placeholder="Search" style="margin-bottom: 10px;">
<tr></tr>
<h2 style="text-align: center">Thành Viên Trong Nhóm Dự Án</h2>
<table class="table">
......@@ -24,7 +28,7 @@
</tr>
</thead>
<tbody>
<tr ng-repeat="gruopProject in pageGroupListProject">
<tr ng-repeat="gruopProject in listGruopProject |filter:search| lmto:3:3*(currentPage-1) track by $index">
<td>{{ gruopProject.employeeDTO.username }}</td>
<td>{{ gruopProject.employeeDTO.lastName }}</td>
<td>{{ gruopProject.employeeDTO.email}}</td>
......@@ -50,11 +54,12 @@
</tbody>
</table>
<div data-pagination="" data-num-pages="numPages()"
data-current-page="currentPage" data-max-size="maxSize"
data-boundary-links="true">
</div>
<uib-pagination total-items="getTotalItems()" boundary-link-numbers="true" ng-model="currentPage"
ng-change="pageChangedIndex()" rotate="true"
items-per-page="numPerPage"></uib-pagination>
</div>
<button type="button" ui-sref="project">Back</button>
</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);
angular.module("myApp").controller('groupProjectShowController', function ($scope,$stateParams,$http,$filter) {
$scope.listGruopProject = [];
$scope.currentPage = 1;
$scope.numPerPage = 3;
$scope.maxSize = 5;
$scope.numberOfPage = numberOfPage;
$scope.dataHasLoaded = false;
$scope.getAll = getAll;
$scope.getTotalItems = getTotalItems;
});
}
getAll();
function getTotalItems() {
return $filter('filter')($scope.listGruopProject).length;
}
function errorCallback(error) {
//error code
console.log("can't get data!!");
$scope.pageChangedIndex = function(){
console.log($scope.currentPage);
}
function numberOfPage() {
return Math.ceil($scope.listGruopProject.length / $scope.numPerPage);
};
function getAll() {
$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;
}
}
function errorCallback(error) {
//error code
console.log("can't get data!!");
}
}
});
\ No newline at end of file
<div class="container">
<div class="row">
<form ng-controller="updateProject" ng-submit="updateProject(project)" name="formProject">
<H1 style="text-align: center">Cập nhật dự án dự án<h1>
<h1 style="text-align: center">Cập nhật dự án dự án</h1>
<div class="form-row">
<div class="col">
<label>Tên Dự Án</label>
......@@ -28,5 +29,6 @@
<button type="button" ui-sref="project">Back</button>
</div>
</form>
</div>
</div>
......@@ -4,14 +4,15 @@
<div class="col-md-8">
<tr>
<td><a ui-sref="addproject" class="btn btn-success" data-toggle="modal">
<i class="fa fa-file-pdf-o" aria-hidden="true"></i><span>Thêm Dự Án Mới</span></a></a></td>
<td><a ui-sref="addproject" class="btn btn-success" data-toggle="modal"><i
class="fa fa-user-plus"></i> <span>Thêm Dự Án Mới</span></a></a></td>
</tr>
<h4></h4>
<tr></tr>
<input type="text" ng-model="search" placeholder="Search">
<!-- <input type="text" ng-model="search" placeholder="Search">-->
<input class="search" ng-model="keyword" type="text" placeholder="Search" ng-change="currentPage =1">
<tr></tr>
<h2>Thông tin dự án</h2>
<h2 style="text-align: center">Thông tin dự án</h2>
<table class="table">
......@@ -23,12 +24,12 @@
<th>Ngày bắt đầu</th>
<th>Hạn giao</th>
<th>Trạng Thái</th>
<th style="width: 200px">Thao Tác</th>
<th style="width: 250px">Thao Tác</th>
</tr>
</thead>
<tbody>
<tr class="vide"
ng-repeat="project in pageListProject|filter:search">
ng-repeat="project in listProject| filter:{name:keyword} | lmto:3:3*(currentPage-1) track by $index">
<td>{{ project.name }}</td>
<td>{{ project.descriptions }}</td>
<td>{{ project.startDate | date:"dd/MM/yyyy" }}</td>
......@@ -39,18 +40,18 @@
<span ng-if="project.status == 2" style="color: #b21f2d">Hoàn Thành</span>
</td>
<!-- thao tác-->
<td style="width: 200px">
<td style="width: 250px">
<a ui-sref="groupProjectByProjectId({ID: project.id})" class="btn btn-info btn-circle btn-sm">
Xem </a>
Chi Tiết Nhóm</a>
<a ui-sref="editproject({ID: project.id})">
<button class="btn btn-primary btn-xs" data-title="Edit" data-toggle="modal"
data-target="#edit"><span class="glyphicon glyphicon-pencil"></span></button>
<button class="btn btn-primary btn-xs" data-title="Edit" data-toggle="modal"
data-target="#edit"><span class="glyphicon glyphicon-pencil"></span></button>
</a>
<a ng-controller="deleteProject" data-ng-click="deleteProject(project.id)">
<button class="btn btn-danger btn-xs" data-title="Delete" data-toggle="modal"
data-target="#delete">
<span class="glyphicon glyphicon-trash"></span></button>
<button class="btn btn-danger btn-xs" data-title="Delete" data-toggle="modal"
data-target="#delete">
<span class="glyphicon glyphicon-trash"></span></button>
</a>
</td>
......@@ -59,13 +60,10 @@
</tbody>
</table>
<div data-pagination="" data-num-pages="numPages()"
data-current-page="currentPage" data-max-size="maxSize"
data-boundary-links="true">
</div>
<uib-pagination total-items="getTotalItems()" boundary-link-numbers="true" ng-model="currentPage"
ng-change="pageChangedIndex()" rotate="true"
items-per-page="numPerPage"></uib-pagination>
</div>
</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);
angular.module("myApp").controller('projectViewsController', function ($scope, $http,$filter) {
$scope.listProject = [];
$scope.currentPage = 1;
$scope.numPerPage = 3;
$scope.maxSize = 5;
$scope.numberOfPage = numberOfPage;
$scope.dataHasLoaded = false;
//mới thêm
$scope.makeEmployee = function () {
$scope.listProject = [];
for (i = 1; i <= 100; i++) {
$scope.listProject.push({text: 'project ' + i, done: false});
}
};
$scope.keyword = "";
//mới thêm
$scope.getAll = getAll;
$scope.getTotalItems = getTotalItems;
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);
getAll();
});
}
function getTotalItems() {
return $filter('filter')($scope.listProject, {'name': $scope.keyword}).length;
}
function errorCallback(error) {
console.log("can't get data!!");
$scope.pageChangedIndex = function(){
console.log($scope.currentPage);
}
function numberOfPage() {
return Math.ceil($scope.listProject.length / $scope.numPerPage);
};
function getAll() {
$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) {
console.log("can't get data!!");
}
}
});
\ No newline at end of file
/*
*/
angular.module("myApp").controller("timeSheetController", function($scope, $http, $state) {
angular.module("myApp")
.filter('beginningTimeSheet', function() {
return function(input, begin) {
if (input) {
begin = +begin;
return input.slice(begin);
}
return [];
}
})
.controller("timeSheetController", function($scope, $http, $state) {
console.log("Time Sheet controller");
$scope.ts = {
......@@ -19,17 +29,34 @@ angular.module("myApp").controller("timeSheetController", function($scope, $http
};
//get all time sheet
//function getAllTimesheet(){
$http({
method: 'GET',
url: "http://localhost:8081/eproject/timesheet/show"
}).then(function successCallback(response) {
console.log(response);
$scope.myTimeSheets = response.data;
$scope.timeSheetList = response.data;
$scope.currentPage = 1;
$scope.timeSheetPerPage = 3;
$scope.filterTimeSheet = $scope.timeSheetList.length;
$scope.entireTimeSheet = $scope.timeSheetList.length;
}, function errorCallback(response) {
console.log(response)
});
//}
$scope.pagePosition = function(pageNumber) {
$scope.currentPage = pageNumber;
};
$scope.filter = function() {
$timeout(function() {
$scope.filterTimeSheet = $scope.searched.length;
}, 20);
};
$scope.sortWith = function(base) {
$scope.base = base;
$scope.reverse = !$scope.reverse;
};
//get all eproject
$http({
......
......@@ -23,6 +23,15 @@
</div>
<div class="col-sm-6">
<input id="addTimeSheet" class="btn btn-success" data-toggle="modal" type="submit" name="addTS" value="Add TimeSheet" onclick="showAddTimeSheetFunction()"/>
<div class="col-sm-4 pull-right">
<label>PageSize:</label>
<select ng-value="timeSheetPerPage" ng-model="timeSheetPerPage" class="form-control">
<option>3</option>
<option>5</option>
<option>50</option>
<option>100</option>
</select>
</div>
</div>
</div>
</div>
......@@ -125,7 +134,7 @@
</tr>
</thead>
<tbody>
<tr class="tss" ng-repeat="ts in myTimeSheets | limitTo:numLimit:start | filter: search">
<tr class="tss" ng-repeat="ts in searched = (timeSheetList | filter:search | orderBy : base :reverse) | beginningTimeSheet:(currentPage-1)*timeSheetPerPage | limitTo:timeSheetPerPage">
<td>{{$index + 1}}</td>
<td>{{ts.title}}</td>
<td>{{ts.content}}</td>
......@@ -144,6 +153,19 @@
</tbody>
</table>
</div>
<div class="col-md-12" ng-show="filterTimeSheet == 0">
<div class="col-md-12">
<h4>No records found..</h4>
</div>
</div>
<div class="col-md-12">
<div class="col-md-6 pull-left" ng-show="filterTimeSheet > 0">
<h5>Showing {{ searched.length }} of {{ entireTimeSheet}} entries</h5>
</div>
<uib-pagination total-items="filterTimeSheet" boundary-link-numbers="true" ng-model="currentPage"
ng-change="pagePosition(currentPage)" rotate="true"
items-per-page="timeSheetPerPage"></uib-pagination>
</div>
</div>
</div>
</div>
......
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