Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CS699_project
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
YADNYESH SANTOSH PATIL
CS699_project
Commits
354623f7
Commit
354623f7
authored
Nov 28, 2019
by
ASHISH KUMAR GOYAL
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Overhead request form integrated
parent
6b254321
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
238 additions
and
9 deletions
+238
-9
source/web/hostel_mess/db.sqlite3
source/web/hostel_mess/db.sqlite3
+0
-0
source/web/hostel_mess/templates/overheads.html
source/web/hostel_mess/templates/overheads.html
+220
-0
source/web/hostel_mess/templates/viewreq.html
source/web/hostel_mess/templates/viewreq.html
+1
-1
source/web/hostel_mess/usermgmt/__pycache__/urls.cpython-36.pyc
.../web/hostel_mess/usermgmt/__pycache__/urls.cpython-36.pyc
+0
-0
source/web/hostel_mess/usermgmt/__pycache__/views.cpython-36.pyc
...web/hostel_mess/usermgmt/__pycache__/views.cpython-36.pyc
+0
-0
source/web/hostel_mess/usermgmt/views.py
source/web/hostel_mess/usermgmt/views.py
+17
-8
No files found.
source/web/hostel_mess/db.sqlite3
View file @
354623f7
No preview for this file type
source/web/hostel_mess/templates/overheads.html
0 → 100644
View file @
354623f7
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"utf-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1, shrink-to-fit=no"
>
<meta
name=
"description"
content=
""
>
<meta
name=
"author"
content=
""
>
<title>
View Requests
</title>
{% load static %}
<!-- Custom fonts for this template-->
<link
href=
"{% static 'vendor/fontawesome-free/css/all.min.css' %}"
rel=
"stylesheet"
type=
"text/css"
>
<link
href=
"https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i"
rel=
"stylesheet"
>
<!-- Custom styles for this template-->
<link
href=
"{% static 'css/sb-admin-2.min.css' %}"
rel=
"stylesheet"
>
</head>
<body
id=
"page-top"
>
<!-- Page Wrapper -->
<div
id=
"wrapper"
>
<!-- Sidebar -->
<ul
class=
"navbar-nav bg-gradient-primary sidebar sidebar-dark accordion toggled"
id=
"accordionSidebar"
>
<!-- Divider -->
<hr
class=
"sidebar-divider my-0"
>
<!-- Nav Item - Dashboard -->
<li
class=
"nav-item active"
>
<a
class=
"nav-link"
href=
"{% url 'homepage' %}"
>
<i
class=
"fas fa-fw fa-tachometer-alt"
></i>
<span>
HOME
</span></a>
</li>
<!-- Divider -->
<hr
class=
"sidebar-divider"
>
<!-- Heading -->
<div
class=
"sidebar-heading"
>
REQUESTS
</div>
<!-- Nav Item - Pages Collapse Menu -->
<li
class=
"nav-item"
>
<a
class=
"nav-link collapsed"
href=
"#"
data-toggle=
"collapse"
data-target=
"#collapseTwo"
aria-expanded=
"true"
aria-controls=
"collapseTwo"
>
<i
class=
"fas fa-fw fa-cog"
></i>
<span><b>
MAKE REQUESTS
</b></span>
</a>
<div
id=
"collapseTwo"
class=
"collapse"
aria-labelledby=
"headingTwo"
data-parent=
"#accordionSidebar"
>
<div
class=
"bg-white py-2 collapse-inner rounded"
>
<h6
class=
"collapse-header"
><b>
Raise Request for:
</b></h6>
<a
class=
"collapse-item"
href=
"{% url 'rebate' %}"
><b>
REBATES
</b></a>
<a
class=
"collapse-item"
href=
"{% url 'overhead' %}"
><b>
OVERHEAD
</b></a>
</div>
</div>
</li>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
href=
"{% url 'homepage' %}"
>
<i
class=
"fas fa-fw fa-table"
></i>
<span><b>
VIEW REQUESTS
</b></span></a>
</li>
<!-- Divider -->
<hr
class=
"sidebar-divider"
>
<!-- Heading -->
<div
class=
"sidebar-heading"
>
INFORMATION
</div>
<!-- Nav Item - Tables -->
<li
class=
"nav-item"
>
<a
class=
"nav-link"
href=
"history.html"
>
<i
class=
"fas fa-fw fa-table"
></i>
<span><b>
HISTORY
</b></span></a>
</li>
<!-- Divider -->
<hr
class=
"sidebar-divider d-none d-md-block"
>
<!-- Sidebar Toggler (Sidebar) -->
<div
class=
"text-center d-none d-md-inline"
>
<button
class=
"rounded-circle border-0"
id=
"sidebarToggle"
></button>
</div>
</ul>
<!-- End of Sidebar -->
<!-- Content Wrapper -->
<div
id=
"content-wrapper"
class=
"d-flex flex-column"
>
<!-- Main Content -->
<div
id=
"content"
>
<!-- Topbar -->
<nav
class=
"navbar navbar-expand navbar-light bg-white topbar mb-4 static-top shadow"
>
<!-- Sidebar Toggle (Topbar) -->
<button
id=
"sidebarToggleTop"
class=
"btn btn-link d-md-none rounded-circle mr-3"
>
<i
class=
"fa fa-bars"
></i>
</button>
<!-- Topbar Navbar -->
<ul
class=
"navbar-nav ml-auto"
>
<a
class=
"nav-item"
href=
"#"
data-toggle=
"modal"
data-target=
"#logoutModal"
>
<i
class=
"fas fa-sign-out-alt fa-sm fa-fw mr-2 text-gray-400"
></i>
Logout
</a>
<!-- </div> -->
</li>
</ul>
</nav>
<!-- End of Topbar -->
<!-- Begin Page Content -->
<div
class=
"container-fluid"
>
<form
method=
'POST'
action=
"{% url 'overhead' %}"
>
{% csrf_token %}
<!-- <div class="form-group">
<label for="date"><b>DATE</b></label>
<input type="Date" class="form-control" id="date" name="date">
</div> -->
<div
class=
"form-group"
>
<label
for=
"mealType"
><b>
Meal
</b></label>
<select
class=
"form-control"
id=
"mealType"
name=
"mealType"
>
<option
value=
"B"
>
Breakfast
</option>
<option
value=
"L"
>
Lunch
</option>
<option
value=
"S"
>
Snaks
</option>
<option
value=
"D"
>
Dinner
</option>
</select>
</div>
<div
class=
"form-group"
>
<label
for=
"count"
><b>
NO. OF PERSONS
</b></label>
<select
class=
"form-control"
id=
"count"
name=
"count"
>
<option
value=
"1"
>
1
</option>
<option
value=
"2"
>
2
</option>
<option
value=
"3"
>
3
</option>
<option
value=
"4"
>
4
</option>
<option
value=
"5"
>
5
</option>
</select>
</div>
<button
type=
"submit"
class=
"btn btn-primary"
><b>
Submit
</b></button>
</form>
</div>
<!-- /.container-fluid -->
</div>
<!-- End of Main Content -->
<!-- Footer -->
<footer
class=
"sticky-footer bg-white"
>
<div
class=
"container my-auto"
>
<div
class=
"copyright text-center my-auto"
>
<span>
Copyright
©
Technocrats 2019
</span>
</div>
</div>
</footer>
<!-- End of Footer -->
</div>
<!-- End of Content Wrapper -->
</div>
<!-- End of Page Wrapper -->
<!-- Scroll to Top Button-->
<a
class=
"scroll-to-top rounded"
href=
"#page-top"
>
<i
class=
"fas fa-angle-up"
></i>
</a>
<!-- Logout Modal-->
<div
class=
"modal fade"
id=
"logoutModal"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"exampleModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
role=
"document"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<h5
class=
"modal-title"
id=
"exampleModalLabel"
>
Ready to Leave?
</h5>
<button
class=
"close"
type=
"button"
data-dismiss=
"modal"
aria-label=
"Close"
>
<span
aria-hidden=
"true"
>
×
</span>
</button>
</div>
<div
class=
"modal-body"
>
Select "Logout" below if you are ready to end your current session.
</div>
<div
class=
"modal-footer"
>
<button
class=
"btn btn-secondary"
type=
"button"
data-dismiss=
"modal"
>
Cancel
</button>
<a
class=
"btn btn-primary"
href=
"{% url 'logout' %}"
>
Logout
</a>
</div>
</div>
</div>
</div>
<!-- Bootstrap core JavaScript-->
<script
src=
"{% static 'vendor/jquery/jquery.min.js' %}"
></script>
<script
src=
"{% static 'vendor/bootstrap/js/bootstrap.bundle.min.js' %}"
></script>
<!-- Core plugin JavaScript-->
<script
src=
"{% static 'vendor/jquery-easing/jquery.easing.min.js' %}"
></script>
<!-- Custom scripts for all pages-->
<script
src=
"{% static 'js/sb-admin-2.min.js' %}"
></script>
<!-- Page level plugins -->
<script
src=
"{% static 'vendor/chart.js/Chart.min.js' %}"
></script>
<!-- Page level custom scripts -->
<script
src=
"{% static 'js/demo/chart-area-demo.js' %}"
></script>
<script
src=
"{% static 'js/demo/chart-pie-demo.js' %}"
></script>
</body>
</html>
source/web/hostel_mess/templates/viewreq.html
View file @
354623f7
...
...
@@ -57,7 +57,7 @@
<div
class=
"bg-white py-2 collapse-inner rounded"
>
<h6
class=
"collapse-header"
><b>
Raise Request for:
</b></h6>
<a
class=
"collapse-item"
href=
"{% url 'rebate' %}"
method=
"GET"
><b>
REBATES
</b></a>
<a
class=
"collapse-item"
href=
"
overheads.html
"
><b>
OVERHEAD
</b></a>
<a
class=
"collapse-item"
href=
"
{% url 'overhead' %}
"
><b>
OVERHEAD
</b></a>
</div>
</div>
</li>
...
...
source/web/hostel_mess/usermgmt/__pycache__/urls.cpython-36.pyc
View file @
354623f7
No preview for this file type
source/web/hostel_mess/usermgmt/__pycache__/views.cpython-36.pyc
View file @
354623f7
No preview for this file type
source/web/hostel_mess/usermgmt/views.py
View file @
354623f7
...
...
@@ -93,8 +93,6 @@ def rebate(request):
elif
request
.
method
==
'POST'
:
fromDate
=
request
.
POST
[
'from'
]
toDate
=
request
.
POST
[
'to'
]
print
(
fromDate
)
print
(
toDate
)
reb
.
student
=
student
reb
.
fromDate
=
fromDate
reb
.
toDate
=
toDate
...
...
@@ -102,6 +100,23 @@ def rebate(request):
reb
.
save
()
return
redirect
(
'homepage'
)
##functions to show rebates page
#@param request
@
login_required
def
overhead
(
request
):
student
=
Student
.
objects
.
filter
(
user
=
request
.
user
)[
0
]
ovr
=
OverheadReq
()
if
request
.
method
==
'GET'
:
return
render
(
request
,
'overheads.html'
)
elif
request
.
method
==
'POST'
:
ovr
.
student
=
student
ovr
.
mealType
=
Meal
.
objects
.
get
(
mealType
=
request
.
POST
[
'mealType'
])
# ovr.date = request.POST['date']
ovr
.
count
=
request
.
POST
[
'count'
]
ovr
.
status
=
'W'
ovr
.
save
()
return
redirect
(
'homepage'
)
@
login_required
@
user_passes_test
(
is_manager
)
def
approve_rebate
(
request
,
id
):
...
...
@@ -137,12 +152,6 @@ def reject_overhead(request,id):
return
redirect
(
'worker-homepage'
)
##functions to show rebates page
#@param request
def
overhead
(
request
):
return
render
(
request
,
'overheads.html'
)
##functions to show view request page
#@param request
def
viewreq
(
request
):
...
...
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