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
7ee28f85
Commit
7ee28f85
authored
Jun 15, 2019
by
đinh thị đầm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
t
parent
049511c3
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
317 additions
and
106 deletions
+317
-106
src/main/resources/public/general.html
src/main/resources/public/general.html
+1
-1
src/main/resources/public/index.html
src/main/resources/public/index.html
+2
-1
src/main/resources/public/js/Chart.bundle.js
src/main/resources/public/js/Chart.bundle.js
+2
-2
src/main/resources/public/js/app.js
src/main/resources/public/js/app.js
+6
-6
src/main/resources/public/layout/layout1.html
src/main/resources/public/layout/layout1.html
+3
-2
src/main/resources/public/layout/layout2.html
src/main/resources/public/layout/layout2.html
+3
-1
src/main/resources/public/pages/timesheet/leaveForm.html
src/main/resources/public/pages/timesheet/leaveForm.html
+132
-0
src/main/resources/public/pages/timesheet/leaveFormController.js
...n/resources/public/pages/timesheet/leaveFormController.js
+115
-0
src/main/resources/public/pages/timesheet/leaveFormDetail.html
...ain/resources/public/pages/timesheet/leaveFormDetail.html
+24
-0
src/main/resources/public/pages/timesheet/leaveFormDetailController.js
...urces/public/pages/timesheet/leaveFormDetailController.js
+29
-0
src/main/resources/public/pages/timesheet/timesheet.html
src/main/resources/public/pages/timesheet/timesheet.html
+0
-70
src/main/resources/public/pages/timesheet/timesheetController.js
...n/resources/public/pages/timesheet/timesheetController.js
+0
-23
No files found.
src/main/resources/public/general.html
View file @
7ee28f85
...
...
@@ -449,7 +449,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony
<span
class=
"icon-bar"
></span>
<span
class=
"icon-bar"
></span>
</button>
<a
class=
"navbar-brand"
href=
"index.html"
>
Project Name
</a>
<a
class=
"navbar-brand"
href=
"index.html"
>
Project Name
</a>
</div>
<div
class=
"collapse navbar-collapse bs-example-js-navbar-scrollspy"
>
<ul
class=
"nav navbar-nav"
>
...
...
src/main/resources/public/index.html
View file @
7ee28f85
...
...
@@ -44,7 +44,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony
`
<!-- end anguarjs app-->
<link
href=
"css/custom.css"
rel=
"stylesheet"
>
<!--//Metis Menu -->
<style>
#chartdiv
{
width
:
100%
;
...
...
@@ -414,6 +414,7 @@ SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony
</div>
<!-- //header-ends -->
<!-- main content start-->
<div
id=
"page-wrapper"
>
<div
class=
"main-page"
>
<div
ui-view=
"layout"
>
...
...
src/main/resources/public/js/Chart.bundle.js
View file @
7ee28f85
...
...
@@ -6333,7 +6333,7 @@ defaults._set('bar', {
defaults
.
_set
(
'
horizontalBar
'
,
{
hover
:
{
mode
:
'
index
'
,
mode
:
'
public.
index
'
,
axis
:
'
y
'
},
...
...
@@ -6389,7 +6389,7 @@ defaults._set('horizontalBar', {
return
datasetLabel
+
'
:
'
+
item
.
xLabel
;
}
},
mode
:
'
index
'
,
mode
:
'
public.
index
'
,
axis
:
'
y
'
}
});
...
...
src/main/resources/public/js/app.js
View file @
7ee28f85
...
...
@@ -51,21 +51,21 @@ angular.module("myApp", ["ngAnimate", "ui.router", "ui.bootstrap"]).config(funct
.
state
(
"
timeSheet
"
,
{
parent
:
'
layout
2
'
,
parent
:
'
layout
1
'
,
url
:
"
/timesheet
"
,
views
:
{
"
content
"
:
{
templateUrl
:
"
/
pages/timesheet/timeSheet.html
"
,
templateUrl
:
"
pages/timesheet/timeSheet.html
"
,
controller
:
"
timeSheetController
"
}
}
})
.
state
(
"
timeSheetDetail
"
,
{
parent
:
'
layout
2
'
,
parent
:
'
layout
1
'
,
url
:
"
/timesheetdetail/:id
"
,
views
:
{
"
content
"
:
{
templateUrl
:
"
/
pages/timesheet/timeSheetDetail.html
"
,
templateUrl
:
"
pages/timesheet/timeSheetDetail.html
"
,
controller
:
"
timeSheetDetailController
"
}
}
...
...
@@ -75,7 +75,7 @@ angular.module("myApp", ["ngAnimate", "ui.router", "ui.bootstrap"]).config(funct
url
:
"
/leaveform
"
,
views
:
{
"
content
"
:
{
templateUrl
:
"
/
pages/leaveform/leaveForm.html
"
,
templateUrl
:
"
pages/leaveform/leaveForm.html
"
,
controller
:
"
leaveFormController
"
}
}
...
...
@@ -86,7 +86,7 @@ angular.module("myApp", ["ngAnimate", "ui.router", "ui.bootstrap"]).config(funct
url
:
"
/leaveformdetail/:id
"
,
views
:
{
"
content
"
:
{
templateUrl
:
"
/
pages/leaveform/leaveFormDetail.html
"
,
templateUrl
:
"
pages/leaveform/leaveFormDetail.html
"
,
controller
:
"
leaveFormDetailController
"
}
}
...
...
src/main/resources/public/layout/layout1.html
View file @
7ee28f85
<div>
<a
ui-sref=
"employees"
></a>
<!-- <a ui-sref="report"></a>-->
<!-- <a ui-sref="project"></a>-->
<a
ui-sref=
"report"
></a>
<a
ui-sref=
"project"
></a>
<div
ui-view=
"content"
>
</div>
...
...
src/main/resources/public/layout/layout2.html
View file @
7ee28f85
<div>
<div
ui-view=
"content"
>
layout 2
</div>
</div>
src/main/resources/public/pages/timesheet/leaveForm.html
0 → 100644
View file @
7ee28f85
<script>
function
showAddLeaveFormFunction
()
{
const
x
=
document
.
getElementById
(
"
addDivLF
"
);
const
n
=
document
.
getElementById
(
"
addLeaveForm
"
);
if
(
x
.
style
.
display
===
"
none
"
)
{
x
.
style
.
display
=
"
block
"
;
n
.
value
=
"
Close
"
;
}
else
{
x
.
style
.
display
=
"
none
"
;
n
.
value
=
"
Add Leave Form
"
;
}
}
</script>
<div
class=
"container"
>
<div
class=
"table-wrapper"
>
<div
class=
"table-title"
>
<div
class=
"row"
>
<div
class=
"col-sm-6"
>
<h2><b>
Leave Form
</b></h2>
<label>
Search:
<input
type=
"text"
ng-model=
"search"
placeholder=
"Search"
style=
"color: black; margin: 10px"
/>
</label>
</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>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-12"
>
<div
id=
"addDivLF"
style=
"display: none"
>
<h2><b>
Add Leave Form
</b></h2>
<table
class=
"table table-striped table-hover"
>
<tr>
<td><label>
Title
</label></td>
<td>
<input
type=
"text"
maxlength=
"300"
ng-model=
"lfdto.title"
style=
"width: 100%;"
/>
</td>
</tr>
<tr>
<td><label>
Content
</label></td>
<td>
<input
type=
"text"
maxlength=
"10000"
ng-model=
"lfdto.content"
style=
"width: 100%;"
/>
</td>
</tr>
<tr>
<td><label>
Employee Id
</label></td>
<td>
<input
type=
"text"
maxlength=
"10"
value=
""
ng-model=
"lfdto.employeeId"
/>
</td>
</tr>
<tr>
<td><label>
Leave Type Id
</label></td>
<td>
<!-- <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>
</tr>
<tr>
<td></td>
<td
>
<input
type=
"submit"
name=
"submit"
class=
"btn-primary"
data-toggle=
"modal"
value=
"Confirm"
ng-click=
"save();"
/>
<input
type=
"submit"
name=
"clear"
class=
"btn-danger"
data-toggle=
"modal"
value=
"Clear"
ng-click=
"lfdto = null"
/>
</td>
</tr>
</table>
</div>
<div
id=
"updateDivLF"
style=
"display: none"
>
<h2><b>
Edit Leave Form
</b></h2>
<table
class=
"table table-striped table-hover"
>
<tr>
<td><label>
Title
</label></td>
<td>
<input
type=
"text"
maxlength=
"300"
ng-model=
"lfdto.title"
style=
"width: 100%;"
/>
</td>
</tr>
<tr>
<td><label>
Content
</label></td>
<td>
<input
type=
"text"
maxlength=
"10000"
ng-model=
"lfdto.content"
style=
"width: 100%;"
/>
</td>
</tr>
<tr>
<td></td>
<td
>
<input
type=
"submit"
class=
"btn-primary"
data-toggle=
"modal"
name=
"submit"
value=
"Confirm"
ng-click=
"update();"
/>
<!-- <input type="submit" class="btn-danger" data-toggle="modal" name="clear" value="Clear" ng-click="lfdto = null"/>-->
<input
type=
"submit"
class=
"btn-dark"
data-toggle=
"modal"
name=
"close"
value=
"Close"
onclick=
"document.getElementById('updateDivLF').style.display = 'none'"
/>
</td>
</tr>
</table>
</div>
<div>
<table
class=
"table table-striped table-hover"
>
<thead>
<tr>
<th>
ID
</th>
<th>
Title
</th>
<th>
Content
</th>
<th>
Employee
</th>
<th>
Leave Type
</th>
<th>
Create At
</th>
<th>
Status
</th>
<th
colspan=
"4"
></th>
</tr>
</thead>
<tbody>
<tr
class=
"lff"
ng-repeat=
"lf in leaveForms | filter: search"
>
<td>
{{$index + 1}}
</td>
<td>
{{lf.title}}
</td>
<td>
{{lf.content}}
</td>
<td>
{{lf.employee.lastName}}
</td>
<td>
{{lf.leaveType.name}}
</td>
<td>
{{lf.updatedAt}}
</td>
<td
id=
"checkStatus"
>
{{lf.status}}
</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"
>

</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"
>

</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>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
src/main/resources/public/pages/timesheet/leaveFormController.js
0 → 100644
View file @
7ee28f85
/*
*/
angular
.
module
(
"
myApp
"
).
controller
(
"
leaveFormController
"
,
function
(
$scope
,
$http
,
$state
)
{
console
.
log
(
"
Leave Form controller
"
);
$scope
.
lf
=
{
"
id
"
:
""
,
"
title
"
:
""
,
"
content
"
:
""
,
"
employee
"
:
""
,
"
leaveType
"
:
""
,
"
updatedAt
"
:
""
,
"
status
"
:
""
};
$scope
.
lfdto
=
{
"
id
"
:
""
,
"
title
"
:
""
,
"
content
"
:
""
,
"
employeeId
"
:
""
,
"
leaveTypeId
"
:
""
};
//get all leave form
$http
({
method
:
'
GET
'
,
url
:
"
http://localhost:8080/employee/leaveform/show
"
}).
then
(
function
successCallback
(
response
)
{
console
.
log
(
response
);
$scope
.
leaveForms
=
response
.
data
;
},
function
errorCallback
(
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
$scope
.
delete
=
function
(
lf
)
{
$http
({
method
:
'
DELETE
'
,
url
:
"
http://localhost:8080/employee/leaveform/delete/
"
+
lf
.
id
}).
then
(
function
successCallback
(
response
)
{
console
.
log
(
response
);
$state
.
reload
();
},
function
errorCallback
(
response
)
{
console
.
log
(
response
);
$state
.
reload
();
});
};
$scope
.
save
=
save
;
function
save
(){
console
.
log
(
$scope
.
lfdto
);
$http
({
method
:
'
POST
'
,
url
:
"
http://localhost:8080/employee/leaveform/add
"
,
data
:
$scope
.
lfdto
}).
then
(
function
successCallback
(
response
)
{
console
.
log
(
response
);
$state
.
reload
();
},
function
errorCallback
(
response
)
{
console
.
log
(
response
);
$state
.
reload
();
});
}
$scope
.
getLf
=
getLf
;
function
getLf
(
lf
)
{
$scope
.
lfdto
.
id
=
lf
.
id
;
$scope
.
lfdto
.
title
=
lf
.
title
;
$scope
.
lfdto
.
content
=
lf
.
content
;
$scope
.
lfdto
.
employeeId
=
lf
.
employee
.
id
;
$scope
.
lfdto
.
leaveTypeId
=
lf
.
leaveType
.
id
;
}
$scope
.
update
=
update
;
function
update
(){
$http
({
method
:
'
POST
'
,
url
:
"
http://localhost:8080/employee/leaveform/update
"
,
data
:
$scope
.
lfdto
}).
then
(
function
successCallback
(
response
)
{
console
.
log
(
response
);
$state
.
reload
();
},
function
errorCallback
(
response
)
{
console
.
log
(
response
);
$state
.
reload
();
});
}
$scope
.
updateStatus
=
updateStatus
;
function
updateStatus
(
lf
){
$http
({
method
:
'
POST
'
,
url
:
"
http://localhost:8080/employee/leaveform/
"
+
lf
.
id
+
"
/status
"
,
// data: $scope.lfdto
}).
then
(
function
successCallback
(
response
)
{
console
.
log
(
response
);
$state
.
reload
();
},
function
errorCallback
(
response
)
{
console
.
log
(
response
);
$state
.
reload
();
});
}
});
src/main/resources/public/pages/timesheet/leaveFormDetail.html
0 → 100644
View file @
7ee28f85
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"col-sm-12"
>
<div>
<br><br>
<div>
<tr>
<legend><p>
Tiêu đề
</p>
{{leaveFormDetail.title}}
</legend>
<h3>
Nội dung
</h3>
<td>
{{leaveFormDetail.content}}
</td>
</tr>
</div>
<br><br>
<div>
<tr>
<!-- <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"
/>
</tr>
</div>
<br><br>
</div>
</div>
</div>
</div>
\ No newline at end of file
src/main/resources/public/pages/timesheet/leaveFormDetailController.js
0 → 100644
View file @
7ee28f85
/*
*/
angular
.
module
(
"
myApp
"
).
controller
(
"
leaveFormDetailController
"
,
function
(
$scope
,
$http
,
$stateParams
,
$state
)
{
console
.
log
(
"
Leave Form Detail Controller
"
);
$http
({
method
:
'
GET
'
,
url
:
"
http://localhost:8080/employee/leaveform/
"
+
$stateParams
.
id
}).
then
(
function
successCallback
(
response
)
{
console
.
log
(
response
);
$scope
.
leaveFormDetail
=
response
.
data
;
},
function
errorCallback
(
response
)
{
console
.
log
(
response
)
});
$scope
.
updateStatus
=
updateStatus
;
function
updateStatus
(
id
){
$http
({
method
:
'
POST
'
,
url
:
"
http://localhost:8080/employee/leaveform/
"
+
id
+
"
/status
"
,
}).
then
(
function
successCallback
(
response
)
{
console
.
log
(
response
);
$state
.
reload
();
},
function
errorCallback
(
response
)
{
console
.
log
(
response
);
$state
.
reload
();
});
}
});
\ No newline at end of file
src/main/resources/public/pages/timesheet/timesheet.html
deleted
100644 → 0
View file @
049511c3
<!DOCTYPE html>
<html
lang=
"en"
ng-app=
"MyTimeSheet"
ng-controller=
"timesheetController"
>
<head>
<meta
charset=
"UTF-8"
>
<title>
Time Sheet
</title>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<script
src=
"//unpkg.com/@uirouter/angularjs/release/angular-ui-router.min.js"
></script>
<script
src=
"https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
integrity=
"sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"
crossorigin=
"anonymous"
></script>
<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="../../js/angular.js"></script>-->
<script
src=
"https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"
></script>
<script
src=
"timesheetController.js"
></script>
</head>
<body>
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"col-md-8"
>
<div>
<legend>
Create Time Sheet
</legend>
<table>
<tr>
<td><label>
Title
</label></td>
<td>
<input
type=
"text"
maxlength=
"29"
ng-model=
"ts.title"
/>
</td>
</tr>
<tr>
<td><label>
Content
</label></td>
<td>
<input
type=
"text"
maxlength=
"29"
ng-model=
"ts.content"
/>
</td>
</tr>
<tr>
<td><label>
Note
</label></td>
<td>
<input
type=
"text"
maxlength=
"29"
ng-model=
"ts.note"
/>
</td>
</tr>
</table>
</div>
<div>
<table
class=
"table"
>
<thead>
<tr>
<th>
ID
</th>
<th>
Title
</th>
<th>
Content
</th>
<th>
Note
</th>
</tr>
</thead>
<tbody>
<tr
class=
"vide"
ng-repeat=
"ts in timesheet"
>
<td>
{{$index + 1}}
</td>
<td>
{{ts.title}}
</td>
<td>
{{ts.content}}
</td>
<td>
{{ts.note}}
</td>
<!-- <td><a href="#" ng-click="update(emp);">Update</a>-->
<!-- <td><a href="#" confirmed-click="delete(employee);" ng-confirm-click=" Do you want to delete this user?">Delete</a></td>-->
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</body>
</html>
\ No newline at end of file
src/main/resources/public/pages/timesheet/timesheetController.js
deleted
100644 → 0
View file @
049511c3
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
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