Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
21_22-J 31
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
3
Merge Requests
3
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
21_22-J 31
21_22-J 31
Commits
1b2a8ffc
Commit
1b2a8ffc
authored
Jan 06, 2022
by
Withana R.D.K
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'Employee_StatusUpdate' into 'master'
Employee status update See merge request
!4
parents
83466dd2
b2bbfb5e
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
89 additions
and
18 deletions
+89
-18
Data/EmployeeStatus.csv
Data/EmployeeStatus.csv
+1
-1
User/urls.py
User/urls.py
+1
-0
User/views.py
User/views.py
+21
-1
templates/Admin/EmployeeStatus_Update.html
templates/Admin/EmployeeStatus_Update.html
+64
-0
templates/Admin/Employee_Data.html
templates/Admin/Employee_Data.html
+0
-3
templates/Admin/Sidebar2.html
templates/Admin/Sidebar2.html
+2
-13
No files found.
Data/EmployeeStatus.csv
View file @
1b2a8ffc
StaffID,Availability
StaffID,Availability
1,Yes
1,Yes
2,
No
2,
Yes
3,Yes
3,Yes
4,Yes
4,Yes
5,Yes
5,Yes
User/urls.py
View file @
1b2a8ffc
...
@@ -11,6 +11,7 @@ urlpatterns = [
...
@@ -11,6 +11,7 @@ urlpatterns = [
path
(
'AdminLogin/'
,
responseapp_views
.
AdminLogin
),
path
(
'AdminLogin/'
,
responseapp_views
.
AdminLogin
),
path
(
'AdminHome/'
,
responseapp_views
.
AdminHome
),
path
(
'AdminHome/'
,
responseapp_views
.
AdminHome
),
path
(
'Employee_Data/'
,
responseapp_views
.
Employee_Data
),
path
(
'Employee_Data/'
,
responseapp_views
.
Employee_Data
),
path
(
'EmployeeStatus_Update/'
,
responseapp_views
.
EmployeeStatus_Update
),
path
(
'PurchaseHistory/'
,
responseapp_views
.
PurchaseHistory
),
path
(
'PurchaseHistory/'
,
responseapp_views
.
PurchaseHistory
),
path
(
'Forecasting/'
,
responseapp_views
.
Forecasting
),
path
(
'Forecasting/'
,
responseapp_views
.
Forecasting
),
path
(
'Result/'
,
responseapp_views
.
Forecasting
),
path
(
'Result/'
,
responseapp_views
.
Forecasting
),
...
...
User/views.py
View file @
1b2a8ffc
...
@@ -34,7 +34,7 @@ def Homepage(request):
...
@@ -34,7 +34,7 @@ def Homepage(request):
# Employee_Efficency
def
Employee_Data
(
request
):
def
Employee_Data
(
request
):
data1
=
pd
.
read_csv
(
'Data/WorkHistory.csv'
)
data1
=
pd
.
read_csv
(
'Data/WorkHistory.csv'
)
data2
=
pd
.
read_csv
(
'Data/EmployeeStatus.csv'
)
data2
=
pd
.
read_csv
(
'Data/EmployeeStatus.csv'
)
...
@@ -47,6 +47,26 @@ def Employee_Data(request):
...
@@ -47,6 +47,26 @@ def Employee_Data(request):
context
=
{
'd'
:
arr
}
context
=
{
'd'
:
arr
}
return
render
(
request
,
'Admin/Employee_Data.html'
,
context
);
return
render
(
request
,
'Admin/Employee_Data.html'
,
context
);
def
EmployeeStatus_Update
(
request
):
if
request
.
method
==
'POST'
:
myForm
=
MyForm3
(
request
.
POST
)
if
myForm
.
is_valid
():
StaffID
=
myForm
.
cleaned_data
[
'StaffID'
]
Availability
=
myForm
.
cleaned_data
[
'Availability'
]
DateSet
=
pd
.
read_csv
(
"Data/EmployeeStatus.csv"
)
StaffID
=
(
int
(
StaffID
)
-
1
)
DateSet
.
at
[
StaffID
,
'Availability'
]
=
Availability
DateSet
.
to_csv
(
"Data/EmployeeStatus.csv"
,
index
=
False
)
messages
.
success
(
request
,
'Employee status successfully! Updated.'
)
return
HttpResponseRedirect
(
request
.
path_info
)
else
:
form
=
MyForm3
()
return
render
(
request
,
'Admin/EmployeeStatus_Update.html'
,
{
'form'
:
form
});
else
:
form
=
MyForm3
()
return
render
(
request
,
'Admin/EmployeeStatus_Update.html'
,
{
'form'
:
form
});
# Demand Forecasting
# Demand Forecasting
def
PurchaseHistory
(
request
):
def
PurchaseHistory
(
request
):
data
=
pd
.
read_csv
(
'Data/Purchasefile.csv'
)
data
=
pd
.
read_csv
(
'Data/Purchasefile.csv'
)
...
...
templates/Admin/EmployeeStatus_Update.html
0 → 100644
View file @
1b2a8ffc
{% extends 'Admin/Sidebar2.html' %}
{% block content %}
{% load widget_tweaks %}
{%load static%}
<head>
<!-- Font special for pages-->
<link
href=
"https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i,800,800i"
rel=
"stylesheet"
>
<!-- Main CSS-->
<link
href=
"{% static "
css
/
main
.
css
"
%}"
rel=
"stylesheet"
media=
"all"
>
</head>
<div
class=
" >
<div class="
wrapper
wrapper
0
"
>
<div
style=
"margin-left: 0px;"
class=
"card card-5"
>
<br/><br/>
{% if messages %}
<div
class=
"alert alert-danger"
role=
"alert"
>
{% for message in messages %}
{% if message.tags %} {% endif %} {{ message }}
{% endfor %}
</div>
{% endif %}
<div
class=
"card-heading"
>
<h2
class=
"title"
>
ASSIGN EMPLOYEE
</h2>
</div>
<div
class=
"card-body"
>
<form
action=
"/Admin/EmployeeStatus_Update/"
method=
"post"
>
{% csrf_token %}
<table
class=
"table table-light"
>
{{form.as_table}}
</table>
<input
type=
"submit"
value=
"Assign"
class=
"btn btn--radius-2 btn-primary"
/>
<div
role=
"alert"
>
<center><h3>
{{ Price_prediction }}
</h3></center>
</div>
</form>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
</div>
</div>
</div><div
class=
"alert alert-primary"
role=
"alert"
>
© SMART SERVICE STATION 2022
</div>
</div>
{% endblock content %}
templates/Admin/Employee_Data.html
View file @
1b2a8ffc
...
@@ -71,8 +71,6 @@
...
@@ -71,8 +71,6 @@
</div></div>
</div></div>
<script
language=
"javascript"
>
<script
language=
"javascript"
>
function
printdiv
(
printpage
)
{
function
printdiv
(
printpage
)
{
var
headstr
=
"
<html><head><title></title></head><body>
"
;
var
headstr
=
"
<html><head><title></title></head><body>
"
;
...
@@ -88,7 +86,6 @@
...
@@ -88,7 +86,6 @@
</script>
</script>
<div
class=
"card-body"
>
<div
class=
"card-body"
>
<input
name=
"b_print"
type=
"button"
class=
"btn btn-primary btn-print"
onClick=
"printdiv('div_print');"
value=
" Print "
>
<input
name=
"b_print"
type=
"button"
class=
"btn btn-primary btn-print"
onClick=
"printdiv('div_print');"
value=
" Print "
>
...
...
templates/Admin/Sidebar2.html
View file @
1b2a8ffc
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<head>
<head>
<meta
charset=
"UTF-8"
>
<meta
charset=
"UTF-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<title>
S
MART SERVICE STATION
</title>
<title>
S
ERVPORT | Your Service Station Partner
</title>
<link
rel=
"stylesheet"
href=
"https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"
integrity=
"sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm"
crossorigin=
"anonymous"
>
<link
rel=
"stylesheet"
href=
"https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"
integrity=
"sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm"
crossorigin=
"anonymous"
>
...
@@ -12,10 +12,6 @@
...
@@ -12,10 +12,6 @@
<style>
<style>
.row
{
.row
{
padding
:
5px
;
padding
:
5px
;
}
}
...
@@ -181,23 +177,16 @@ body{
...
@@ -181,23 +177,16 @@ body{
<li><a
style=
"text-decoration:none;"
href=
"/Admin/AdminHome/"
><i
class=
"fas fa-desktop"
></i>
Home
</a></li>
<li><a
style=
"text-decoration:none;"
href=
"/Admin/AdminHome/"
><i
class=
"fas fa-desktop"
></i>
Home
</a></li>
<li><a
style=
"text-decoration:none;"
href=
"#"
><i
class=
"fas fa-barcode"
></i>
Employee Efficiency
</a>
<li><a
style=
"text-decoration:none;"
href=
"#"
><i
class=
"fas fa-barcode"
></i>
Employee Efficiency
</a>
<li><a
style=
"text-decoration:none;"
href=
"/Admin/Employee_Data/"
><i
class=
"fas fa-paper-plane "
></i>
Employee Data
</a>
<li><a
style=
"text-decoration:none;"
href=
"/Admin/Employee_Data/"
><i
class=
"fas fa-paper-plane "
></i>
Employee Data
</a>
<li><a
style=
"text-decoration:none;"
href=
"
#
"
><i
class=
"fas fa-upload"
></i>
Assign Employee
</a>
<li><a
style=
"text-decoration:none;"
href=
"
/Admin/EmployeeStatus_Update/
"
><i
class=
"fas fa-upload"
></i>
Assign Employee
</a>
</li>
</li>
<li><a
style=
"text-decoration:none;"
href=
"/Admin/Forecasting/"
><i
class=
"fas fa-bullseye "
></i>
Demand Forecasting
</a>
<li><a
style=
"text-decoration:none;"
href=
"/Admin/Forecasting/"
><i
class=
"fas fa-bullseye "
></i>
Demand Forecasting
</a>
<li><a
style=
"text-decoration:none;"
href=
"/Admin/PurchaseHistory/"
><i
class=
"fas fa-cubes"
></i>
Purchase History
</a>
<li><a
style=
"text-decoration:none;"
href=
"/Admin/PurchaseHistory/"
><i
class=
"fas fa-cubes"
></i>
Purchase History
</a>
</ul>
</ul>
</div>
</div>
...
...
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