Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Q
QLNS_N01
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nguyễn Văn Hiếu
QLNS_N01
Commits
22d92b95
Commit
22d92b95
authored
Jun 17, 2019
by
=
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hieu final01
parent
e3332b54
Changes
14
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
812 additions
and
724 deletions
+812
-724
src/main/java/com/itsol/quantrivanphong/access/register/bussiness/EmailBussiness.java
...trivanphong/access/register/bussiness/EmailBussiness.java
+8
-32
src/main/java/com/itsol/quantrivanphong/access/register/bussiness/GeneratePasswordBussiness.java
.../access/register/bussiness/GeneratePasswordBussiness.java
+1
-7
src/main/java/com/itsol/quantrivanphong/access/register/controller/VerifyAccountController.java
...g/access/register/controller/VerifyAccountController.java
+4
-2
src/main/resources/public/js/app.js
src/main/resources/public/js/app.js
+20
-1
src/main/resources/public/layout/layout3.html
src/main/resources/public/layout/layout3.html
+388
-0
src/main/resources/public/pages/report/employeeListViews.html
...main/resources/public/pages/report/employeeListViews.html
+13
-13
src/main/resources/public/pages/report/employeeListViews1.html
...ain/resources/public/pages/report/employeeListViews1.html
+2
-1
src/main/resources/public/pages/report/reportController.js
src/main/resources/public/pages/report/reportController.js
+87
-84
src/main/resources/public/pages/report/reportDetailPage.html
src/main/resources/public/pages/report/reportDetailPage.html
+43
-20
src/main/resources/public/pages/report/reportListPage.html
src/main/resources/public/pages/report/reportListPage.html
+63
-15
src/main/resources/public/pages/report/reportPage.html
src/main/resources/public/pages/report/reportPage.html
+41
-39
src/main/resources/public/pages/report/timeSheetListViews.html
...ain/resources/public/pages/report/timeSheetListViews.html
+45
-45
src/main/resources/public/pages/report/timeSheetReport.html
src/main/resources/public/pages/report/timeSheetReport.html
+30
-28
src/main/resources/public/signup.html
src/main/resources/public/signup.html
+67
-437
No files found.
src/main/java/com/itsol/quantrivanphong/access/register/bussiness/EmailBussiness.java
View file @
22d92b95
...
@@ -21,43 +21,21 @@ public class EmailBussiness {
...
@@ -21,43 +21,21 @@ public class EmailBussiness {
public
boolean
sendEmail
(
EmailDTO
emailDTO
)
{
public
boolean
sendEmail
(
EmailDTO
emailDTO
)
{
boolean
check
;
// MimeMessage message = sender.createMimeMessage();
//Cấu hình email người gửi
// MimeMessageHelper helper = new MimeMessageHelper(message);
//
//
// try {
// helper.setTo(emailDTO.getRecipientEmail());
// helper.setText(emailDTO.getMessage(),"text/html");
// helper.setSubject(emailDTO.getSubject());
// sender.send(message);
// check = true;
// } catch (Exception e) {
// e.printStackTrace();
// check = false;
// }
// Recipient's email ID needs to be mentioned.
String
to
=
emailDTO
.
getRecipientEmail
();
// Sender's email ID needs to be mentioned
String
from
=
"hieunv2496@gmail.com"
;
String
from
=
"hieunv2496@gmail.com"
;
final
String
username
=
"hieunv2496@gmail.com"
;
//change accordingly
final
String
username
=
"hieunv2496@gmail.com"
;
//change accordingly
final
String
password
=
"anhieu1996"
;
//change accordingly
final
String
password
=
"anhieu1996"
;
//change accordingly
Properties
props
=
new
Properties
();
Properties
props
=
new
Properties
();
props
.
put
(
"mail.smtp.auth"
,
"true"
);
props
.
put
(
"mail.smtp.auth"
,
"true"
);
props
.
put
(
"mail.smtp.starttls.enable"
,
"true"
);
props
.
put
(
"mail.smtp.starttls.enable"
,
"true"
);
props
.
put
(
"mail.smtp.host"
,
"smtp.gmail.com"
);
props
.
put
(
"mail.smtp.host"
,
"smtp.gmail.com"
);
props
.
put
(
"mail.smtp.port"
,
"587"
);
props
.
put
(
"mail.smtp.port"
,
"587"
);
// Get the Session object.
Session
session
=
Session
.
getInstance
(
props
,
Session
session
=
Session
.
getInstance
(
props
,
new
javax
.
mail
.
Authenticator
()
{
new
javax
.
mail
.
Authenticator
()
{
protected
PasswordAuthentication
getPasswordAuthentication
()
{
protected
PasswordAuthentication
getPasswordAuthentication
()
{
return
new
PasswordAuthentication
(
username
,
password
);
return
new
PasswordAuthentication
(
username
,
password
);
}
}
...
@@ -72,24 +50,22 @@ public class EmailBussiness {
...
@@ -72,24 +50,22 @@ public class EmailBussiness {
// Set To: header field of the header.
// Set To: header field of the header.
message
.
setRecipients
(
Message
.
RecipientType
.
TO
,
message
.
setRecipients
(
Message
.
RecipientType
.
TO
,
InternetAddress
.
parse
(
to
));
InternetAddress
.
parse
(
emailDTO
.
getRecipientEmail
()
));
// Set Subject: header field
// Set Subject: header field
message
.
setSubject
(
emailDTO
.
getSubject
());
message
.
setSubject
(
emailDTO
.
getSubject
());
// Send the actual HTML message, as big as you like
// Send the actual HTML message, as big as you like
message
.
setContent
(
message
.
setContent
(
emailDTO
.
getMessage
(),
"text/html"
);
emailDTO
.
getMessage
(),
"text/html"
);
// Send message
// Send message
Transport
.
send
(
message
);
Transport
.
send
(
message
);
System
.
out
.
println
(
"Sent message successfully...."
);
System
.
out
.
println
(
"Sent message successfully...."
);
}
catch
(
MessagingException
e
)
{
}
catch
(
MessagingException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
throw
new
RuntimeException
(
e
);
throw
new
RuntimeException
(
e
);
}
}
...
...
src/main/java/com/itsol/quantrivanphong/access/register/bussiness/GeneratePasswordBussiness.java
View file @
22d92b95
...
@@ -25,17 +25,11 @@ public class GeneratePasswordBussiness {
...
@@ -25,17 +25,11 @@ public class GeneratePasswordBussiness {
public
String
getAlphaNumericString
(){
public
String
getAlphaNumericString
(){
// length is bounded by 256 Character
byte
[]
array
=
new
byte
[
256
];
byte
[]
array
=
new
byte
[
256
];
new
Random
().
nextBytes
(
array
);
new
Random
().
nextBytes
(
array
);
int
n
=
8
;
int
n
=
8
;
String
randomString
=
new
String
(
array
,
Charset
.
forName
(
"UTF-8"
));
String
randomString
=
new
String
(
array
,
Charset
.
forName
(
"UTF-8"
));
// Create license StringBuffer to store the result
StringBuffer
pass
=
new
StringBuffer
();
StringBuffer
pass
=
new
StringBuffer
();
// Append first 20 alphanumeric characters
// from the generated random String into the result
for
(
int
k
=
0
;
k
<
randomString
.
length
();
k
++)
{
for
(
int
k
=
0
;
k
<
randomString
.
length
();
k
++)
{
char
ch
=
randomString
.
charAt
(
k
);
char
ch
=
randomString
.
charAt
(
k
);
...
...
src/main/java/com/itsol/quantrivanphong/access/register/controller/VerifyAccountController.java
View file @
22d92b95
...
@@ -2,7 +2,9 @@ package com.itsol.quantrivanphong.access.register.controller;
...
@@ -2,7 +2,9 @@ package com.itsol.quantrivanphong.access.register.controller;
import
com.itsol.quantrivanphong.access.register.bussiness.GeneratePasswordBussiness
;
import
com.itsol.quantrivanphong.access.register.bussiness.GeneratePasswordBussiness
;
import
com.itsol.quantrivanphong.model.notification
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
@@ -16,11 +18,11 @@ public class VerifyAccountController {
...
@@ -16,11 +18,11 @@ public class VerifyAccountController {
private
GeneratePasswordBussiness
generatePasswordBussiness
;
private
GeneratePasswordBussiness
generatePasswordBussiness
;
@GetMapping
(
path
=
"/{username}"
)
@GetMapping
(
path
=
"/{username}"
)
public
String
verifyPassword
(
@PathVariable
(
"username"
)
String
username
){
public
ResponseEntity
verifyPassword
(
@PathVariable
(
"username"
)
String
username
){
String
mess
=
generatePasswordBussiness
.
insertPassword
(
username
);
String
mess
=
generatePasswordBussiness
.
insertPassword
(
username
);
return
mess
;
return
ResponseEntity
.
ok
(
new
notification
(
200
,
mess
))
;
}
}
}
}
src/main/resources/public/js/app.js
View file @
22d92b95
...
@@ -23,7 +23,14 @@ angular.module("myApp", ["ngAnimate", "ui.router", "ui.bootstrap"]).config(funct
...
@@ -23,7 +23,14 @@ angular.module("myApp", ["ngAnimate", "ui.router", "ui.bootstrap"]).config(funct
}
}
}
}
})
})
.
state
(
"
layout3
"
,
{
abstract
:
true
,
views
:
{
"
layout
"
:
{
templateUrl
:
"
layout/layout3.html
"
}
}
})
.
state
(
"
employees
"
,
{
.
state
(
"
employees
"
,
{
parent
:
'
layout1
'
,
parent
:
'
layout1
'
,
...
@@ -209,6 +216,18 @@ angular.module("myApp", ["ngAnimate", "ui.router", "ui.bootstrap"]).config(funct
...
@@ -209,6 +216,18 @@ angular.module("myApp", ["ngAnimate", "ui.router", "ui.bootstrap"]).config(funct
}
}
}
}
})
})
.
state
(
"
register
"
,
{
parent
:
'
layout3
'
,
url
:
"
/register
"
,
views
:
{
"
content
"
:
{
templateUrl
:
"
signup.html
"
,
controller
:
"
employeeController
"
}
}
})
//end report=======================================================================================================
//end report=======================================================================================================
...
...
src/main/resources/public/layout/layout3.html
0 → 100644
View file @
22d92b95
This diff is collapsed.
Click to expand it.
src/main/resources/public/pages/report/employeeListViews.html
View file @
22d92b95
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<div
class=
"container"
>
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-md-8"
>
<div
class=
"col-md-8"
>
<div>
<div
ng-controller=
"listLackOfReportController"
>
<input
class=
"search"
ng-model=
"search"
type=
"text"
placeholder=
"Search"
ng-change=
"currentPage =1"
>
<input
class=
"search"
ng-model=
"search"
type=
"text"
placeholder=
"Search"
ng-change=
"currentPage =1"
>
<h3>
Danh Sách Thành viên thiếu TimeSheet
</h3>
<h3>
Danh Sách Thành viên thiếu TimeSheet
</h3>
...
...
src/main/resources/public/pages/report/employeeListViews1.html
View file @
22d92b95
...
@@ -60,12 +60,13 @@
...
@@ -60,12 +60,13 @@
</tr>
</tr>
</tbody>
</tbody>
</table>
</table>
<div><a
ng-click=
"history.go(-1);"
class=
"btn btn-primary btn-circle btn-sm"
style=
"margin-bottom: 10px;"
>
Trở Về
</a></div>
<uib-pagination
total-items=
"getTotalItems()"
boundary-link-numbers=
"true"
ng-model=
"currentPage"
<uib-pagination
total-items=
"getTotalItems()"
boundary-link-numbers=
"true"
ng-model=
"currentPage"
ng-change=
"pageChangedIndex()"
rotate=
"true"
ng-change=
"pageChangedIndex()"
rotate=
"true"
items-per-page=
"employeePerPage"
></uib-pagination>
items-per-page=
"employeePerPage"
></uib-pagination>
</div>
</div>
<div><a
ng-click=
"history.go(-1);"
class=
"btn btn-primary btn-circle btn-sm"
style=
"margin-bottom: 10px;"
>
Trở Về
</a></div>
</div>
</div>
</div>
</div>
...
...
src/main/resources/public/pages/report/reportController.js
View file @
22d92b95
var
app
=
angular
.
module
(
'
myApp
'
);
var
app
=
angular
.
module
(
'
myApp
'
);
app
.
controller
(
'
reportController
'
,
projectList
);
app
.
controller
(
'
reportController
'
,
projectList
);
app
.
controller
(
'
timeSheetListController
'
,
timeSheetList
);
app
.
controller
(
'
timeSheetListController
'
,
timeSheetList
);
app
.
controller
(
'
updateTimeSheetStatusController
'
,
updateTimeSheetStatus
);
app
.
controller
(
'
updateTimeSheetCheckedController
'
,
updateTimeSheetChecked
);
app
.
controller
(
'
listLackOfReportController
'
,
employeeList
);
app
.
controller
(
'
listLackOfReportController
'
,
employeeList
);
app
.
controller
(
'
insertProjectReportController
'
,
insertProjectReport
);
app
.
controller
(
'
allProjectReportController
'
,
allProjectReport
);
app
.
controller
(
'
allProjectReportController
'
,
allProjectReport
);
app
.
controller
(
'
projectReportDetailController
'
,
projectReportDetail
);
app
.
controller
(
'
projectReportDetailController
'
,
projectReportDetail
);
app
.
controller
(
'
deleteReportController
'
,
deleteReport
);
app
.
controller
(
'
listEmployeeLackController
'
,
listEmployeeLack
);
app
.
controller
(
'
listEmployeeLackController
'
,
listEmployeeLack
);
//Báo cáo ngày
// Danh sách các dự án đang triển khai
// Danh sách các dự án đang triển khai
function
projectList
(
$scope
,
$http
)
{
function
projectList
(
$scope
,
$http
)
{
...
@@ -30,33 +26,42 @@ function projectList($scope, $http) {
...
@@ -30,33 +26,42 @@ function projectList($scope, $http) {
console
.
log
(
response
)
console
.
log
(
response
)
});
});
}
// Thêm mới báo cáo theo khoảng thời gian
$scope
.
insertReport
=
function
(
id
,
firstDate
,
finalDate
)
{
//======================================================================================================================
// Danh Sách Báo cáo ngày của dự án đó
function
timeSheetList
(
$scope
,
$http
,
$stateParams
){
$scope
.
request
=
{
$scope
.
request
=
{
"
currentDate
"
:
""
"
projectId
"
:
id
,
};
"
firstPoint
"
:
""
,
var
date
=
new
Date
();
"
finalPoint
"
:
""
$scope
.
request
.
currentDate
=
date
.
getFullYear
()
+
'
-
'
+
(
'
0
'
+
(
date
.
getMonth
()
+
1
)).
slice
(
-
2
)
+
'
-
'
+
(
'
0
'
+
date
.
getDate
()).
slice
(
-
2
);
}
$scope
.
request
.
firstPoint
=
firstDate
.
getFullYear
()
+
'
-
'
+
(
'
0
'
+
(
firstDate
.
getMonth
()
+
1
)).
slice
(
-
2
)
+
'
-
'
+
(
'
0
'
+
firstDate
.
getDate
()).
slice
(
-
2
);
$scope
.
request
.
finalPoint
=
finalDate
.
getFullYear
()
+
'
-
'
+
(
'
0
'
+
(
finalDate
.
getMonth
()
+
1
)).
slice
(
-
2
)
+
'
-
'
+
(
'
0
'
+
finalDate
.
getDate
()).
slice
(
-
2
);
if
(
confirm
(
"
Bạn có muốn thực hiện ?
"
))
{
$http
({
$http
({
method
:
'
GET
'
,
method
:
'
POST
'
,
url
:
"
http://localhost:8081/admin/report/project/
"
+
$stateParams
.
ID
+
"
/timeSheet/
"
+
$scope
.
request
.
currentDate
,
url
:
"
http://localhost:8081/admin/report/project/newReport
"
,
data
:
$scope
.
request
,
headers
:
{
headers
:
{
'
Content-Type
'
:
'
application/json
'
'
Content-Type
'
:
'
application/json
'
}
}
}).
then
(
successCallback
,
errorCallback
);
//tạo funtion nếu thành công!
function
successCallback
(
response
)
{
$scope
.
messages
=
response
.
data
;
alert
(
$scope
.
messages
.
view
);
}
//tạo funtion kiểm tra nếu thất bại
function
errorCallback
(
error
)
{
//error code
console
.
log
(
"
Create FALSE !!!
"
);
}
}
};
}).
then
(
function
successCallback
(
response
)
{
//Khởi tạo thành viên thiếu báo cáo ngày hôm đó
console
.
log
(
response
);
$scope
.
timeSheets
=
response
.
data
;
console
.
log
(
$scope
.
timeSheets
);
},
function
errorCallback
(
error
)
{
console
.
log
(
error
)
});
}
function
updateTimeSheetStatus
(
$scope
,
$window
,
$http
)
{
$scope
.
request
=
{
$scope
.
request
=
{
"
currentDate
"
:
""
"
currentDate
"
:
""
};
};
...
@@ -85,9 +90,36 @@ function updateTimeSheetStatus($scope, $window, $http) {
...
@@ -85,9 +90,36 @@ function updateTimeSheetStatus($scope, $window, $http) {
}
}
}
}
};
};
};
function
updateTimeSheetChecked
(
$scope
,
$window
,
$http
)
{
}
//======================================================================================================================
//Báo cáo ngày
// Danh Sách Báo cáo ngày của dự án đó
function
timeSheetList
(
$scope
,
$http
,
$stateParams
,
$state
){
$scope
.
request
=
{
"
currentDate
"
:
""
};
var
date
=
new
Date
();
$scope
.
request
.
currentDate
=
date
.
getFullYear
()
+
'
-
'
+
(
'
0
'
+
(
date
.
getMonth
()
+
1
)).
slice
(
-
2
)
+
'
-
'
+
(
'
0
'
+
date
.
getDate
()).
slice
(
-
2
);
$http
({
method
:
'
GET
'
,
url
:
"
http://localhost:8081/admin/report/project/
"
+
$stateParams
.
ID
+
"
/timeSheet/
"
+
$scope
.
request
.
currentDate
,
headers
:
{
'
Content-Type
'
:
'
application/json
'
}
}).
then
(
function
successCallback
(
response
)
{
console
.
log
(
response
);
$scope
.
timeSheets
=
response
.
data
;
console
.
log
(
$scope
.
timeSheets
);
},
function
errorCallback
(
error
)
{
console
.
log
(
error
)
});
//Báo cáo ngày
//Duyệt báo cáo ngày đó (chấp nhận, từ chối)
$scope
.
updateTimeSheetChecked
=
function
(
id
,
check
)
{
$scope
.
updateTimeSheetChecked
=
function
(
id
,
check
)
{
if
(
confirm
(
"
Bạn có muốn thực hiện ?
"
))
{
if
(
confirm
(
"
Bạn có muốn thực hiện ?
"
))
{
$http
({
$http
({
...
@@ -101,6 +133,7 @@ function updateTimeSheetChecked($scope, $window, $http) {
...
@@ -101,6 +133,7 @@ function updateTimeSheetChecked($scope, $window, $http) {
//tạo funtion nếu thành công!
//tạo funtion nếu thành công!
function
successCallback
(
response
)
{
function
successCallback
(
response
)
{
$scope
.
timeSheetsMessages
=
response
.
data
;
$scope
.
timeSheetsMessages
=
response
.
data
;
$state
.
reload
();
alert
(
$scope
.
timeSheetsMessages
.
view
);
alert
(
$scope
.
timeSheetsMessages
.
view
);
}
}
//tạo funtion kiểm tra nếu thất bại
//tạo funtion kiểm tra nếu thất bại
...
@@ -112,6 +145,7 @@ function updateTimeSheetChecked($scope, $window, $http) {
...
@@ -112,6 +145,7 @@ function updateTimeSheetChecked($scope, $window, $http) {
};
};
};
};
// Danh Sách Các Thành viên Thiếu Báo Cáo Ngày Của Dự Án
// Danh Sách Các Thành viên Thiếu Báo Cáo Ngày Của Dự Án
function
employeeList
(
$scope
,
$http
,
$stateParams
){
function
employeeList
(
$scope
,
$http
,
$stateParams
){
$scope
.
request
=
{
$scope
.
request
=
{
...
@@ -137,23 +171,30 @@ function employeeList($scope, $http, $stateParams){
...
@@ -137,23 +171,30 @@ function employeeList($scope, $http, $stateParams){
}
}
//======================================================================================================================
//======================================================================================================================
function
insertProjectReport
(
$scope
,
$window
,
$http
)
{
function
allProjectReport
(
$scope
,
$http
,
$stateParams
,
$state
){
$scope
.
insertReport
=
function
(
id
,
firstDate
,
finalDate
)
{
$scope
.
request
=
{
//Lấy tất cả báo cáo
"
projectId
"
:
id
,
$http
({
"
firstPoint
"
:
""
,
method
:
'
GET
'
,
"
finalPoint
"
:
""
url
:
"
http://localhost:8081/admin/report/project/
"
+
$stateParams
.
ID
+
"
/allReport
"
,
headers
:
{
'
Content-Type
'
:
'
application/json
'
}
}
$scope
.
request
.
firstPoint
=
firstDate
.
getFullYear
()
+
'
-
'
+
(
'
0
'
+
(
firstDate
.
getMonth
()
+
1
)).
slice
(
-
2
)
+
'
-
'
+
(
'
0
'
+
firstDate
.
getDate
()).
slice
(
-
2
);
}).
then
(
function
successCallback
(
response
)
{
$scope
.
request
.
finalPoint
=
finalDate
.
getFullYear
()
+
'
-
'
+
(
'
0
'
+
(
finalDate
.
getMonth
()
+
1
)).
slice
(
-
2
)
+
'
-
'
+
(
'
0
'
+
finalDate
.
getDate
()).
slice
(
-
2
);
console
.
log
(
response
);
$scope
.
ProjectReports
=
response
.
data
;
console
.
log
(
$scope
.
ProjectReports
);
},
function
errorCallback
(
response
)
{
console
.
log
(
response
)
});
if
(
confirm
(
"
Bạn có muốn thực hiện ?
"
))
{
//Xóa một báo cáo
$scope
.
deleteReport
=
function
(
id
)
{
if
(
confirm
(
"
Bạn có muốn xóa ?
"
))
{
$http
({
$http
({
method
:
'
POST
'
,
method
:
'
POST
'
,
url
:
"
http://localhost:8081/admin/report/project/newReport
"
,
url
:
"
http://localhost:8081/admin/report/project/report/delete/
"
+
id
,
data
:
$scope
.
request
,
headers
:
{
headers
:
{
'
Content-Type
'
:
'
application/json
'
'
Content-Type
'
:
'
application/json
'
}
}
...
@@ -161,34 +202,22 @@ function insertProjectReport($scope, $window, $http) {
...
@@ -161,34 +202,22 @@ function insertProjectReport($scope, $window, $http) {
//tạo funtion nếu thành công!
//tạo funtion nếu thành công!
function
successCallback
(
response
)
{
function
successCallback
(
response
)
{
$scope
.
messages
=
response
.
data
;
$scope
.
messages
=
response
.
data
;
$state
.
reload
();
alert
(
$scope
.
messages
.
view
);
alert
(
$scope
.
messages
.
view
);
}
}
//tạo funtion kiểm tra nếu thất bại
//tạo funtion kiểm tra nếu thất bại
function
errorCallback
(
error
)
{
function
errorCallback
(
error
)
{
//error code
//error code
console
.
log
(
"
Crea
te FALSE !!!
"
);
console
.
log
(
"
Dele
te FALSE !!!
"
);
}
}
}
}
};
};
};
function
allProjectReport
(
$scope
,
$http
,
$stateParams
){
$http
({
method
:
'
GET
'
,
url
:
"
http://localhost:8081/admin/report/project/
"
+
$stateParams
.
ID
+
"
/allReport
"
,
headers
:
{
'
Content-Type
'
:
'
application/json
'
}
}).
then
(
function
successCallback
(
response
)
{
console
.
log
(
response
);
$scope
.
ProjectReports
=
response
.
data
;
console
.
log
(
$scope
.
ProjectReports
);
},
function
errorCallback
(
response
)
{
console
.
log
(
response
)
});
}
}
// Xem chi tiết 1 báo cáo
function
projectReportDetail
(
$scope
,
$http
,
$stateParams
){
function
projectReportDetail
(
$scope
,
$http
,
$stateParams
){
$http
({
$http
({
...
@@ -206,32 +235,6 @@ function projectReportDetail($scope, $http, $stateParams){
...
@@ -206,32 +235,6 @@ function projectReportDetail($scope, $http, $stateParams){
console
.
log
(
response
)
console
.
log
(
response
)
});
});
}
}
function
deleteReport
(
$scope
,
$window
,
$http
,
$state
)
{
$scope
.
deleteReport
=
function
(
id
)
{
if
(
confirm
(
"
Bạn có muốn xóa ?
"
))
{
$http
({
method
:
'
POST
'
,
url
:
"
http://localhost:8081/admin/report/project/report/delete/
"
+
id
,
headers
:
{
'
Content-Type
'
:
'
application/json
'
}
}).
then
(
successCallback
,
errorCallback
);
//tạo funtion nếu thành công!
function
successCallback
(
response
)
{
$scope
.
messages
=
response
.
data
;
$state
.
reload
();
alert
(
$scope
.
messages
.
view
);
}
//tạo funtion kiểm tra nếu thất bại
function
errorCallback
(
error
)
{
//error code
console
.
log
(
"
Delete FALSE !!!
"
);
}
}
};
};
//======================================================================================================================
//======================================================================================================================
...
...
src/main/resources/public/pages/report/reportDetailPage.html
View file @
22d92b95
<div
class=
"card mb-3"
>
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"col-md-8"
>
<div
ng-controller=
"projectReportDetailController"
>
<input
class=
"search"
ng-model=
"search"
type=
"text"
placeholder=
"Search"
ng-change=
"currentPage =1"
>
<h3>
Báo cáo chi tiết
</h3>
<div
class=
"card-header"
>
<table
class=
"table"
>
<i
class=
"fas fa-table"
></i>
Báo cáo chi tiết
<thead>
<tr>
<th>
Tiêu đề
</th>
<th>
Nội dung
</th>
</tr>
</thead>
<tbody>
<tr
class=
"vide"
>
<td>
Tên Dự Án
</td>
<td>
{{projectReportDetails.projectName}}
</td>
</tr>
<tr>
<td>
Team Leader
</td>
<td>
{{projectReportDetails.teamLeader}}
</td>
</tr>
<tr>
<td>
Số Thành Viên
</td>
<td>
{{projectReportDetails.numberOfMember}}
</td>
</tr>
<tr>
<td>
Điểm
</td>
<td>
{{projectReportDetails.calendarEffort}}
</td>
</tr>
<tr>
<td>
Số Thành Viên Thiếu Báo Cáo
</td>
<td>
{{projectReportDetails.lackOfReport}}
</td>
</tr>
<tr>
<td>
Khoảng Thời Gian
</td>
<td>
{{projectReportDetails.firstDate | date:"dd-MM-yyyy"}} --> {{projectReportDetails.finalDate | date:"dd-MM-yyyy"}}
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div
class=
"card-body"
ng-controller=
"projectReportDetailController"
>
<div>
<h4>
Tên Dự Án:
</h4><br>
<p>
{{projectReportDetails.projectName}}
</p>
<h4>
Team Leader
</h4>
<p>
{{projectReportDetails.teamLeader}}
</p>
<h4>
Số Thành Viên
</h4>
<p>
{{projectReportDetails.numberOfMember}}
</p>
<h4>
Điểm
</h4>
<p>
{{projectReportDetails.calendarEffort}}
</p>
<h4>
Số Thành Viên Thiếu Báo Cáo
</h4>
<p>
{{projectReportDetails.lackOfReport}}
</p>
<h4>
Khoảng Thời Gian
</h4>
<p>
{{projectReportDetails.firstDate}} --> {{projectReportDetails.firstDate}}
</p>
</div>
</div>
</div>
</div>
</div>
</div>
src/main/resources/public/pages/report/reportListPage.html
View file @
22d92b95
<div
class=
"card mb-3"
>
<!--<div class="card mb-3">-->
<!-- <div class="card-header">-->
<!-- <i class="fas fa-table"></i> Danh sách báo cáo theo thời gian của dự án-->
<!-- </div>-->
<!-- <div class="card-body">-->
<!-- <div class="table-responsive" ng-controller="allProjectReportController">-->
<!-- <div>-->
<!--<!– <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;">-->
<!-- {{messages.view}}-->
<!-- <table class="table table-bordered" id="dataTable" width="100%"-->
<!-- cellspacing="0">-->
<!-- <thead>-->
<!-- <tr>-->
<!-- <th>STT</th>-->
<!-- <th>Tên Dự Án</th>-->
<!-- <th>Team Leader</th>-->
<!-- <th>Số Thành Viên</th>-->
<!-- <th>Điểm Nỗ Lực</th>-->
<!-- <th>Số TV Thiếu Báo Cáo</th>-->
<!-- <th>Thời gian</th>-->
<!-- <th>Menu</th>-->
<!-- </tr>-->
<!-- </thead>-->
<!-- <tbody>-->
<!-- <tr data-ng-repeat="pr in ProjectReports|filter:search">-->
<!-- <td>{{$index+1}}</td>-->
<!-- <td>{{pr.projectName}}</td>-->
<!-- <td>{{pr.teamLeader}}</td>-->
<!-- <td>{{pr.numberOfMember}}</td>-->
<!-- <td>{{pr.calendarEffort}}</td>-->
<!-- <td>{{pr.lackOfReport}}</td>-->
<!-- <td>{{pr.firstDate | date:"dd/MM/yyyy"}} <br>–> {{pr.finalDate | date:"dd/MM/yyyy"}}</td>-->
<!-- <td><a ui-sref="reportDetail({ID: pr.id})" class="btn btn-info btn-circle btn-sm">Xem </a>-->
<!-- <a ng-click="deleteReport(pr.id)" class="btn btn-warning btn-circle btn-sm">Xóa </a>-->
<!-- </td>-->
<!-- </tr>-->
<!-- </tbody>-->
<!-- </table>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!--</div>-->
<div
class=
"card-header"
>
<i
class=
"fas fa-table"
></i>
Danh sách báo cáo theo thời gian của dự án
</div>
<div
class=
"card-body"
>
<div
class=
"table-responsive"
ng-controller=
"allProjectReportController"
>
<div
ng-controller=
"deleteReportController"
>
<!-- <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;"
>
{{messages.view}}
<table
class=
"table table-bordered"
id=
"dataTable"
width=
"100%"
<div
class=
"container"
>
cellspacing=
"0"
>
<div
class=
"row"
>
<div
class=
"col-md-8"
>
<div
ng-controller=
"allProjectReportController"
>
<input
class=
"search"
ng-model=
"search"
type=
"text"
placeholder=
"Search"
ng-change=
"currentPage =1"
>
<h3>
Danh sách báo cáo theo thời gian của dự án
</h3>
{{messages.view}}
<table
class=
"table"
>
<thead>
<thead>
<tr>
<tr>
<th>
STT
</th>
<th>
STT
</th>
...
@@ -22,11 +65,10 @@
...
@@ -22,11 +65,10 @@
<th>
Số TV Thiếu Báo Cáo
</th>
<th>
Số TV Thiếu Báo Cáo
</th>
<th>
Thời gian
</th>
<th>
Thời gian
</th>
<th>
Menu
</th>
<th>
Menu
</th>
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
<tr
data-ng-repeat=
"pr in ProjectReports|filter:search"
>
<tr
class=
"vide"
data-ng-repeat=
"pr in ProjectReports|filter:search"
>
<td>
{{$index+1}}
</td>
<td>
{{$index+1}}
</td>
<td>
{{pr.projectName}}
</td>
<td>
{{pr.projectName}}
</td>
<td>
{{pr.teamLeader}}
</td>
<td>
{{pr.teamLeader}}
</td>
...
@@ -40,7 +82,13 @@
...
@@ -40,7 +82,13 @@
</tr>
</tr>
</tbody>
</tbody>
</table>
</table>
<uib-pagination
total-items=
"getTotalItems()"
boundary-link-numbers=
"true"
ng-model=
"currentPage"
ng-change=
"pageChangedIndex()"
rotate=
"true"
items-per-page=
"employeePerPage"
></uib-pagination>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
src/main/resources/public/pages/report/reportPage.html
View file @
22d92b95
<div
class=
"card mb-3"
>
<div
class=
"card-header"
>
<div
class=
"container"
>
<i
class=
"fas fa-table"
></i>
Danh Sách Dự án (Đang được triển khai)
<div
class=
"row"
>
</div>
<div
class=
"col-md-8"
>
<div
class=
"card-body"
>
<div
ng-controller=
"reportController"
>
<div
class=
"table-responsive"
ng-controller=
"reportController"
>
<input
class=
"search"
ng-model=
"search"
type=
"text"
placeholder=
"Search"
ng-change=
"currentPage =1"
>
<div
ng-controller=
"insertProjectReportController"
>
<h3>
Danh Sách Dự án (Đang được triển khai)
</h3>
<!-- <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;"
>
{{messages.view}}
{{messages.view}}
<table
class=
"table"
>
<table
class=
"table table-bordered"
id=
"dataTable"
width=
"100%"
cellspacing=
"0"
>
<thead>
<thead>
<tr>
<tr>
<th>
STT
</th>
<th>
STT
</th>
...
@@ -22,7 +16,6 @@
...
@@ -22,7 +16,6 @@
<th>
Trạng thái
</th>
<th>
Trạng thái
</th>
<th>
Chọn khoảng thời gian
</th>
<th>
Chọn khoảng thời gian
</th>
<th>
Menu
</th>
<th>
Menu
</th>
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
...
@@ -32,15 +25,19 @@
...
@@ -32,15 +25,19 @@
<td>
{{pro.name}}
</td>
<td>
{{pro.name}}
</td>
<td>
{{pro.descriptions}}
</td>
<td>
{{pro.descriptions}}
</td>
<td>
{{pro.startDate | date:"dd/MM/yyyy"}}
<br>
--> {{pro.endDate | date:"dd/MM/yyyy"}}
</td>
<td>
{{pro.startDate | date:"dd/MM/yyyy"}}
<br>
--> {{pro.endDate | date:"dd/MM/yyyy"}}
</td>
<td>
{{pro.status}}
</td>
<td>
<span
ng-if=
"pro.status == 0"
>
Chưa triển khai
</span>
<span
ng-if=
"pro.status == 1"
>
Đang triển khai
</span>
<span
ng-if=
"pro.status == 2"
>
Đã hoàn thành
</span>
</td>
<td
class=
"form-label-group"
>
<td
class=
"form-label-group"
>
<!-- <label for="startDate">Ngày Bắt Đầu</label>-->
<!-- <label for="startDate">Ngày Bắt Đầu</label>-->
<input
type=
"date"
ng-model=
"request.firstDate"
id=
"startDate"
class=
"form-control"
<input
type=
"date"
ng-model=
"request.firstDate"
id=
"startDate"
class=
"form-control"
placeholder=
"điểm đầu"
required=
"required"
>
placeholder=
"điểm đầu"
required=
"required"
style=
"width: auto"
>
<!-- <label for="endDate">Ngày Kết Thúc</label>-->
<!-- <label for="endDate">Ngày Kết Thúc</label>-->
<input
type=
"date"
ng-model=
"request.finalDate"
id=
"endDate"
class=
"form-control"
<input
type=
"date"
ng-model=
"request.finalDate"
id=
"endDate"
class=
"form-control"
placeholder=
"điểm cuối"
required=
"required"
>
placeholder=
"điểm cuối"
required=
"required"
style=
"width: auto"
>
</td>
</td>
<td>
<td>
<a
ng-click=
"insertReport(pro.id, request.firstDate, request.finalDate)"
class=
"btn btn-info btn-circle btn-sm"
>
Thêm mới báo cáo>
</a><br>
<a
ng-click=
"insertReport(pro.id, request.firstDate, request.finalDate)"
class=
"btn btn-info btn-circle btn-sm"
>
Thêm mới báo cáo>
</a><br>
...
@@ -51,6 +48,11 @@
...
@@ -51,6 +48,11 @@
</form>
</form>
</tbody>
</tbody>
</table>
</table>
<uib-pagination
total-items=
"getTotalItems()"
boundary-link-numbers=
"true"
ng-model=
"currentPage"
ng-change=
"pageChangedIndex()"
rotate=
"true"
items-per-page=
"employeePerPage"
></uib-pagination>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
src/main/resources/public/pages/report/timeSheetListViews.html
View file @
22d92b95
<div
class=
"card mb-3"
>
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"card-header"
>
<div
class=
"col-md-8"
>
<i
class=
"fas fa-table"
></i>
Danh Sách Timesheet Dự án
<div>
</div>
<input
class=
"search"
ng-model=
"search"
type=
"text"
placeholder=
"Search"
ng-change=
"currentPage =1"
>
<div
class=
"card-body"
>
<h3>
Danh Sách Timesheet Dự án
</h3>
<div
class=
"table-responsive"
>
<div
ng-controller=
"updateTimeSheetCheckedController"
>
<!-- <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;"
>
{{timeSheetsMessages.view}}
{{timeSheetsMessages.view}}
<table
class=
"table table-bordered"
id=
"dataTable"
width=
"100%"
<table
class=
"table"
>
cellspacing=
"0"
>
<thead>
<thead>
<tr>
<tr>
<th>
STT
</th>
<th>
STT
</th>
...
@@ -20,7 +15,6 @@
...
@@ -20,7 +15,6 @@
<th>
Ngày tạo
</th>
<th>
Ngày tạo
</th>
<th>
trạng thái duyệt
</th>
<th>
trạng thái duyệt
</th>
<th>
Menu
</th>
<th>
Menu
</th>
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
...
@@ -32,7 +26,7 @@
...
@@ -32,7 +26,7 @@
<td>
{{item.createdAt | date:"dd/MM/yyyy" }}
</td>
<td>
{{item.createdAt | date:"dd/MM/yyyy" }}
</td>
<td>
<td>
<select
ng-model=
"item.checked"
class=
"form-control"
autofocus=
"autofocus"
required=
"required"
>
<select
ng-model=
"item.checked"
class=
"form-control"
autofocus=
"autofocus"
required=
"required"
>
<!-- <option value="">==> Trạng Thái</option>-->
<!-- <option value="">==> Trạng Thái</option>-->
<option
value=
"unapproved"
>
Chưa duyệt
</option>
<option
value=
"unapproved"
>
Chưa duyệt
</option>
<option
value=
"approved"
>
Đã duyệt
</option>
<option
value=
"approved"
>
Đã duyệt
</option>
<option
value=
"deny"
>
Từ chối
</option>
<option
value=
"deny"
>
Từ chối
</option>
...
@@ -44,7 +38,13 @@
...
@@ -44,7 +38,13 @@
</tr>
</tr>
</tbody>
</tbody>
</table>
</table>
<uib-pagination
total-items=
"getTotalItems()"
boundary-link-numbers=
"true"
ng-model=
"currentPage"
ng-change=
"pageChangedIndex()"
rotate=
"true"
items-per-page=
"employeePerPage"
></uib-pagination>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
src/main/resources/public/pages/report/timeSheetReport.html
View file @
22d92b95
<div
class=
"card mb-3"
>
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"card-header"
>
<div
class=
"col-md-8"
>
<i
class=
"fas fa-table"
></i>
Danh Sách Dự án (Đang được triển khai)
<div
ng-controller=
"reportController"
>
</div>
<input
class=
"search"
ng-model=
"search"
type=
"text"
placeholder=
"Search"
ng-change=
"currentPage =1"
>
<div
class=
"card-body"
>
<h3>
Danh Sách Dự án (Đang được triển khai)
</h3>
<div
class=
"table-responsive"
ng-controller=
"reportController"
>
<div
ng-controller=
"updateTimeSheetStatusController"
>
<!-- <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;"
>
{{timeSheetsMessages.view}}
{{timeSheetsMessages.view}}
<table
class=
"table"
>
<table
class=
"table table-bordered"
id=
"dataTable"
width=
"100%"
cellspacing=
"0"
>
<thead>
<thead>
<tr>
<tr>
<th>
STT
</th>
<th>
STT
</th>
...
@@ -22,7 +15,6 @@
...
@@ -22,7 +15,6 @@
<th>
Thời gian kết thúc
</th>
<th>
Thời gian kết thúc
</th>
<th>
Trạng thái
</th>
<th>
Trạng thái
</th>
<th>
Menu
</th>
<th>
Menu
</th>
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
...
@@ -32,7 +24,11 @@
...
@@ -32,7 +24,11 @@
<td>
{{pro.descriptions}}
</td>
<td>
{{pro.descriptions}}
</td>
<td>
{{pro.startDate | date:"dd/MM/yyyy"}}
</td>
<td>
{{pro.startDate | date:"dd/MM/yyyy"}}
</td>
<td>
{{pro.endDate | date:"dd/MM/yyyy"}}
</td>
<td>
{{pro.endDate | date:"dd/MM/yyyy"}}
</td>
<td>
{{pro.status}}
</td>
<td>
<span
ng-if=
"pro.status == 0"
>
Chưa triển khai
</span>
<span
ng-if=
"pro.status == 1"
>
Đang triển khai
</span>
<span
ng-if=
"pro.status == 2"
>
Đã hoàn thành
</span>
</td>
<td><a
ui-sref=
"reportTimeSheet({ID: pro.id})"
class=
"btn btn-info btn-circle btn-sm"
>
Ds báo cáo ngày
</a><br>
<td><a
ui-sref=
"reportTimeSheet({ID: pro.id})"
class=
"btn btn-info btn-circle btn-sm"
>
Ds báo cáo ngày
</a><br>
<a
ng-click=
"updateTimeSheetStatus(pro.id)"
class=
"btn btn-warning btn-circle btn-sm"
>
khởi tạo tv thiếu báo cáo
</a>
<br>
<a
ng-click=
"updateTimeSheetStatus(pro.id)"
class=
"btn btn-warning btn-circle btn-sm"
>
khởi tạo tv thiếu báo cáo
</a>
<br>
<a
ui-sref=
"reportEmployee({ID: pro.id})"
class=
"btn btn-danger btn-circle btn-sm"
data-ng-click=
""
>
Ds thành viên thiếu báo cáo
</a>
<a
ui-sref=
"reportEmployee({ID: pro.id})"
class=
"btn btn-danger btn-circle btn-sm"
data-ng-click=
""
>
Ds thành viên thiếu báo cáo
</a>
...
@@ -40,7 +36,13 @@
...
@@ -40,7 +36,13 @@
</tr>
</tr>
</tbody>
</tbody>
</table>
</table>
<uib-pagination
total-items=
"getTotalItems()"
boundary-link-numbers=
"true"
ng-model=
"currentPage"
ng-change=
"pageChangedIndex()"
rotate=
"true"
items-per-page=
"employeePerPage"
></uib-pagination>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
src/main/resources/public/signup.html
View file @
22d92b95
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment