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
a7279821
Commit
a7279821
authored
Apr 30, 2022
by
chalaka78
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
next service date BE
parent
ef3abe04
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
412 additions
and
82 deletions
+412
-82
User/forms.py
User/forms.py
+15
-0
User/urls.py
User/urls.py
+2
-0
User/views.py
User/views.py
+235
-19
db.sqlite3
db.sqlite3
+0
-0
templates/Admin/MaintainData.html
templates/Admin/MaintainData.html
+129
-0
templates/Admin/NextMaintain.html
templates/Admin/NextMaintain.html
+29
-18
templates/Admin/Predicted_Date.html
templates/Admin/Predicted_Date.html
+0
-43
templates/Admin/Sidebar2.html
templates/Admin/Sidebar2.html
+2
-2
No files found.
User/forms.py
View file @
a7279821
...
@@ -60,3 +60,18 @@ class MyForm3(forms.Form):
...
@@ -60,3 +60,18 @@ class MyForm3(forms.Form):
#Customer Frequency
#Customer Frequency
class
MyForm
(
forms
.
Form
):
class
MyForm
(
forms
.
Form
):
customerid
=
forms
.
IntegerField
(
label
=
'Customer ID'
,
widget
=
forms
.
TextInput
(
attrs
=
{
'class'
:
'input_field'
,
'required'
:
True
}))
customerid
=
forms
.
IntegerField
(
label
=
'Customer ID'
,
widget
=
forms
.
TextInput
(
attrs
=
{
'class'
:
'input_field'
,
'required'
:
True
}))
#Maitenance Date
MODE_SERVICES
=
[
(
'0'
,
'Select Service Type'
),
(
'1'
,
'Full Service'
)
]
class
MyFormServices
(
forms
.
Form
):
customerid
=
forms
.
IntegerField
(
label
=
'Enter Customer ID '
)
Vnumber
=
forms
.
CharField
(
label
=
'Enter Vehicle Number '
)
ServiceType
=
forms
.
IntegerField
(
label
=
"Select Service"
,
widget
=
forms
.
Select
(
choices
=
MODE_SERVICES
))
User/urls.py
View file @
a7279821
...
@@ -18,5 +18,7 @@ urlpatterns = [
...
@@ -18,5 +18,7 @@ urlpatterns = [
path
(
'Result/'
,
responseapp_views
.
Forecasting
),
path
(
'Result/'
,
responseapp_views
.
Forecasting
),
path
(
'Customer_Data/'
,
responseapp_views
.
Customer_Data
),
path
(
'Customer_Data/'
,
responseapp_views
.
Customer_Data
),
path
(
'Customer_Frequency/'
,
responseapp_views
.
Customer_Frequency
),
path
(
'Customer_Frequency/'
,
responseapp_views
.
Customer_Frequency
),
path
(
'MaintainData/'
,
responseapp_views
.
MaintainData
),
path
(
'NextMaintain/'
,
responseapp_views
.
NextMaintain
),
path
(
''
,
admin
.
site
.
urls
),
path
(
''
,
admin
.
site
.
urls
),
]
]
\ No newline at end of file
User/views.py
View file @
a7279821
This diff is collapsed.
Click to expand it.
db.sqlite3
View file @
a7279821
No preview for this file type
templates/Admin/MaintainData.html
0 → 100644
View file @
a7279821
{% 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"
>
{% if messages %}
<ul
class=
"messages"
>
{% for message in messages %}
<li
{%
if
message
.
tags
%}
class=
" {{ message.tags }} "
{%
endif
%}
>
{{ message }}
</li>
{% endfor %}
</ul>
{% endif %}
<div
class=
"card-heading"
>
<h2
class=
"title"
>
MAINTAINS DATA
</h2>
</div>
<div
id=
"myDiv"
>
<div
id=
"div_print"
>
<div
class=
"card card-body printableArea"
>
<div
class=
"container"
style=
"overflow-x:auto;"
>
Customer Maintains Data
<table
class=
"table table-striped"
>
<thead>
<tr>
<th>
Service Date
</th>
<th>
Service
</th>
<th>
Taken Time
</th>
<th>
Price
</th>
<th>
Customer
</th>
<th>
Vehicle Type
</th>
<th>
Vehicle Make
</th>
<th>
Vehicle Model
</th>
<th>
Vehicle Number
</th>
<th>
Meter Reading
</th>
<th>
Vehicle Manufactured Year
</th>
<th>
Average Usage
</th>
</tr>
</thead>
<tbody>
{% if d %}
{% for i in d %}
<tr>
<td>
{{i.Date}}
</td>
<td>
{{i.ServiceName}}
</td>
<td>
{{i.TakenTime}}
</td>
<td>
{{i.Price}}
</td>
<td>
{{i.Customer}}
</td>
<td>
{{i.VehicleType}}
</td>
<td>
{{i.VehicleMake}}
</td>
<td>
{{i.VehicleModel}}
</td>
<td>
{{i.VehicleNumber}}
</td>
<td>
{{i.MeterReading}}
</td>
<td>
{{i.VehicleManufacturedYear}}
</td>
<td>
{{i.AverageUsage}}
</td>
</tr>
{% endfor %}
{% endif %}
</tbody>
</table>
</div>
</div>
</div></div>
<script
language=
"javascript"
>
function
printdiv
(
printpage
)
{
var
headstr
=
"
<html><head><title></title></head><body>
"
;
var
footstr
=
"
</body>
"
;
var
newstr
=
document
.
all
.
item
(
printpage
).
innerHTML
;
var
oldstr
=
document
.
body
.
innerHTML
;
document
.
body
.
innerHTML
=
headstr
+
newstr
+
footstr
;
window
.
print
();
document
.
body
.
innerHTML
=
oldstr
;
location
.
reload
();
return
false
;
}
</script>
<div
class=
"card-body"
>
<input
name=
"b_print"
type=
"button"
class=
"btn btn-primary btn-print"
onClick=
"printdiv('div_print');"
value=
" Print "
>
</div>
<div
class=
"alert alert-primary"
role=
"alert"
>
© SMART SERVICE STATION 2022
</div>
</div>
</div>
</div>
</div>
{% endblock content %}
templates/Admin/Next
_
Maintain.html
→
templates/Admin/NextMaintain.html
View file @
a7279821
...
@@ -15,53 +15,64 @@
...
@@ -15,53 +15,64 @@
<div
style=
"margin-left: 0px;"
class=
"card card-5"
>
<div
style=
"margin-left: 0px;"
class=
"card card-5"
>
<br/><br/>
{% if messages %}
{% if messages %}
<div
class=
"alert alert-danger"
role=
"alert"
>
<ul
class=
"messages"
>
{% for message in messages %}
{% for message in messages %}
{% if message.tags %} {% endif %} {{ message }}
<li
{%
if
message
.
tags
%}
class=
" {{ message.tags }} "
{%
endif
%}
>
{{ message }}
</li>
{% endfor %}
{% endfor %}
</div
>
</ul
>
{% endif %}
{% endif %}
<div
class=
"card-heading"
>
<div
class=
"card-heading"
>
<h2
class=
"title"
>
NEXT MAINTAIN DATE PREDICTION
</h2>
<h2
class=
"title"
>
NEXT MAINTAIN DATE
PREDICTION
</h2>
</div>
</div>
<div
class=
"card-body"
>
<div
class=
"card-body"
>
<form
action=
"/Admin/
Predicted_Date
/"
method=
"post"
>
<form
action=
"/Admin/
NextMaintain
/"
method=
"post"
>
{% csrf_token %}
{% csrf_token %}
<table
class=
"table table-light"
>
<table
class=
"table table-light"
>
{{form3.as_table}}
{{form.as_table}}
{{form.as_table}}
</table>
</table>
<input
type=
"submit"
value=
"NEXT MAINTAIN DATE"
class=
"btn btn--radius-2 btn"
style=
"background:#02111f"
/>
<input
type=
"submit"
value=
"NEXT MAINTAIN DATE"
class=
"btn btn--radius-2 btn-primary"
/>
<div
role=
"alert"
>
<center><h3>
{{ d }}
</h3></center>
</div>
</form>
</form>
<br>
<br>
<center>
<div
class=
"alert alert-success"
>
{{ d }}
{{ forecastedPrice }}
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
</div>
</center>
</div>
</div>
</div>
</div><div
class=
"alert alert-primary fixed-bottom mb-0 text-center"
style=
"background: #747578; border: none; color: white;"
role=
"alert"
>
© SERVPORT 2022
</div>
</div>
</div>
<div
class=
"alert alert-primary"
role=
"alert"
>
© SMART SERVICE STATION 2022
</div>
</div>
</div>
{% endblock content %}
{% endblock content %}
templates/Admin/Predicted_Date.html
deleted
100644 → 0
View file @
ef3abe04
{% 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>
<center>
<div
class=
">
<div class="
wrapper
wrapper--w790
"
>
<div
style=
"margin-left: 0px;"
class=
"card card-5"
>
<div
class=
"card-heading"
>
<h2
class=
"title"
>
Next Service Date
</h2>
</div>
{% autoescape off %}
<div>
{{ g }}
</div>
{% endautoescape %}
<div
class=
"alert alert-danger"
role=
"alert"
>
Next Service Date is : {{ d }}
<br>
</div>
</div>
</div>
</div>
{% endblock content %}
templates/Admin/Sidebar2.html
View file @
a7279821
...
@@ -188,8 +188,8 @@ body{
...
@@ -188,8 +188,8 @@ body{
<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>
<li><a
style=
"text-decoration:none;"
href=
"/Admin/Customer_Data/"
><i
class=
"fas fa-user"
></i>
Customer Data
</a>
<li><a
style=
"text-decoration:none;"
href=
"/Admin/Customer_Data/"
><i
class=
"fas fa-user"
></i>
Customer Data
</a>
<li><a
style=
"text-decoration:none;"
href=
"/Admin/Customer_Frequency/"
><i
class=
"fas fa-chart-bar"
></i>
Customer Frequency
</a>
<li><a
style=
"text-decoration:none;"
href=
"/Admin/Customer_Frequency/"
><i
class=
"fas fa-chart-bar"
></i>
Customer Frequency
</a>
<li><a
style=
"text-decoration:none;"
href=
"/Admin/Next
_
Maintain/"
><i
class=
"fas fa-user"
></i>
Next Service Date
</a>
<li><a
style=
"text-decoration:none;"
href=
"/Admin/NextMaintain/"
><i
class=
"fas fa-user"
></i>
Next Service Date
</a>
<li><a
style=
"text-decoration:none;"
href=
"/Admin
"
><i
class=
"fas fa-chart-bar"
></i>
Vehicle
Maintenance Data
</a>
<li><a
style=
"text-decoration:none;"
href=
"/Admin
/MaintainData/"
><i
class=
"fas fa-chart-bar"
></i>
Maintenance Data
</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