Commit 8ff30e7d authored by Withana R.D.K's avatar Withana R.D.K

Merge branch 'IT18208818_Employee_Efficiency' into 'master'

First Commit

See merge request !1
parents 24da4a41 155960bd
# Default ignored files
/shelf/
/workspace.xml
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.8" project-jdk-type="Python SDK" />
<component name="PyCharmProfessionalAdvertiser">
<option name="shown" value="true" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/21_22-j-31.iml" filepath="$PROJECT_DIR$/.idea/21_22-j-31.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
\ No newline at end of file
StaffID,Availability
1,Yes
2,No
3,Yes
4,Yes
5,Yes
Date,StaffID,EmployeeName,JobDone,WorkQuality,TakenTime
1/1/2019,1,Aroos,Engine Repairering,5,60
2/1/2020,1,Aroos,Engine Repairering,4,60
3/12/2021,1,Aroos,Engine Repairering,3,55
1/1/2019,,Aroos,Oil Changing,2,20
2/1/2020,,Aroos,Oil Changing,3,25
2/1/2020,,Aroos,Oil Changing,4,15
2/1/2020,,Aroos,Oil Changing,5,25
2/1/2020,,Aroos,Oil Changing,3,30
4/12/2021,1,Aroos,Painting,2,120
5/12/2021,1,Aroos,Painting,2,120
6/12/2021,1,Aroos,Painting,2,120
7/12/2021,1,Aroos,Painting,1,120
1/1/2019,1,Aroos,Interior Cleanning,5,50
2/1/2020,1,Aroos,Interior Cleanning,4,60
2/1/2020,1,Aroos,Interior Cleanning,3,55
2/1/2020,1,Aroos,Interior Cleanning,4,45
2/1/2020,1,Aroos,Body Wash,3,40
2/1/2020,1,Aroos,Body Wash,5,30
2/1/2020,1,Aroos,Body Wash,4,25
2/1/2020,1,Aroos,Body Wash,3,40
2/1/2020,1,Aroos,Body Wash,4,35
2/1/2020,1,Aroos,Body Wash,3,35
1/1/2019,2,husain,Engine Repairering,4,90
9/12/2021,2,husain,Engine Repairering,4,90
10/12/2021,2,husain,Engine Repairering,2,80
2/1/2020,2,husain,Engine Repairering,3,85
2/1/2020,2,husain,Engine Repairering,3,90
2/1/2020,2,husain,Oil Changing,5,10
2/1/2020,2,husain,Oil Changing,5,15
2/1/2020,2,husain,Oil Changing,4,20
2/1/2020,2,husain,Oil Changing,3,10
2/1/2020,2,husain,Under Wash,4,30
2/1/2020,2,husain,Under Wash,5,20
1/1/2019,2,husain,Under Wash,5,25
2/1/2020,2,husain,Under Wash,4,25
2/1/2020,2,husain,Body Wash,3,30
2/1/2020,2,husain,Body Wash,2,35
2/1/2020,2,husain,Body Wash,4,40
2/1/2020,2,husain,Body Wash,5,35
11/12/2021,2,husain,Painting,2,100
2/1/2020,2,husain,Painting,2,110
13/12/2021,2,husain,Painting,2,90
14/12/2021,2,husain,Painting,1,100
2/1/2020,3,Lakshan,Body Wash,5,30
2/1/2020,3,Lakshan,Body Wash,4,40
2/1/2020,3,Lakshan,Body Wash,3,30
2/1/2020,3,Lakshan,Body Wash,4,35
2/1/2020,3,Lakshan,Body Wash,5,30
2/1/2020,3,Lakshan,Interior Cleanning,3,32
2/1/2020,3,Lakshan,Interior Cleanning,2,40
2/1/2020,3,Lakshan,Interior Cleanning,3,43
2/1/2020,3,Lakshan,Interior Cleanning,1,45
2/1/2020,3,Lakshan,Under Wash,5,30
2/1/2020,3,Lakshan,Under Wash,4,35
2/1/2020,3,Lakshan,Under Wash,5,25
2/1/2020,3,Lakshan,Under Wash,3,30
2/1/2020,3,Lakshan,Under Wash,4,30
2/1/2020,3,Lakshan,Under Wash,5,35
2/1/2020,3,Lakshan,Oil Changing,4,15
2/1/2020,3,Lakshan,Oil Changing,3,25
2/1/2020,3,Lakshan,Oil Changing,4,20
2/1/2020,3,Lakshan,Oil Changing,2,25
2/1/2020,4,Sunil,Engine Repairering,5,70
2/1/2020,4,Sunil,Engine Repairering,4,40
2/1/2020,4,Sunil,Engine Repairering,5,85
2/1/2020,4,Sunil,Engine Repairering,4,65
2/1/2020,4,Sunil,Engine Repairering,3,70
2/1/2020,4,Sunil,Body Wash,3,20
2/1/2020,4,Sunil,Body Wash,4,35
2/1/2020,4,Sunil,Body Wash,3,45
2/1/2020,4,Sunil,Body Wash,4,34
2/1/2020,4,Sunil,Under Wash,5,40
2/1/2020,4,Sunil,Under Wash,4,30
2/1/2020,4,Sunil,Under Wash,5,40
2/1/2020,4,Sunil,Under Wash,4,25
2/1/2020,4,Sunil,Under Wash,3,30
2/1/2020,4,Sunil,Oil Changing,4,15
2/1/2020,4,Sunil,Oil Changing,3,20
2/1/2020,4,Sunil,Interior Cleanning,4,60
2/1/2020,4,Sunil,Interior Cleanning,3,70
2/1/2020,4,Sunil,Interior Cleanning,4,50
2/1/2020,5,Pradeepan,Interior Cleanning,5,50
2/1/2020,5,Pradeepan,Interior Cleanning,4,35
2/1/2020,5,Pradeepan,Interior Cleanning,5,40
2/1/2020,5,Pradeepan,Interior Cleanning,4,30
2/1/2020,5,Pradeepan,Under Wash,3,30
2/1/2020,5,Pradeepan,Under Wash,2,30
2/1/2020,5,Pradeepan,Under Wash,3,35
2/1/2020,5,Pradeepan,Under Wash,4,40
2/1/2020,5,Pradeepan,Under Wash,5,45
2/1/2020,5,Pradeepan,Under Wash,3,25
2/1/2020,5,Pradeepan,Under Wash,4,30
2/1/2020,5,Pradeepan,Body Wash,3,50
2/1/2020,5,Pradeepan,Body Wash,3,40
2/1/2020,5,Pradeepan,Body Wash,4,45
2/1/2020,5,Pradeepan,Body Wash,2,30
2/1/2020,5,Pradeepan,Oil Changing,3,15
2/1/2020,5,Pradeepan,Oil Changing,4,25
2/1/2020,5,Pradeepan,Oil Changing,2,20
2/1/2020,5,Pradeepan,Oil Changing,3,25
2/1/2020,5,Pradeepan,Oil Changing,4,30
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ServiceStation_2022.settings')
application = get_asgi_application()
import os
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
TEMPLATE_DIR = os.path.join(BASE_DIR,'templates')
STATIC_DIR=os.path.join(BASE_DIR,'static')
MEDIA_ROOT=os.path.join(BASE_DIR,'static')
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '+zy!9k=9pql5gz9bkqjore)k6r!%w0atk(@(!(!zvp5e(t2i8n'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = []
# Application definition
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'widget_tweaks',
'User',
]
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]
CSRF_COOKIE_SECURE=False
ROOT_URLCONF = 'ServiceStation_2022.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [TEMPLATE_DIR,],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]
WSGI_APPLICATION = 'ServiceStation_2022.wsgi.application'
# Database
# https://docs.djangoproject.com/en/3.0/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
# Password validation
# https://docs.djangoproject.com/en/3.0/ref/settings/#auth-password-validators
AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
},
]
# Internationalization
# https://docs.djangoproject.com/en/3.0/topics/i18n/
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC'
USE_I18N = True
USE_L10N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/3.0/howto/static-files/
STATIC_URL = '/static/'
STATICFILES_DIRS=[
STATIC_DIR,
]
LOGIN_REDIRECT_URL='response/'
#for contact us give your gmail id and password
EMAIL_BACKEND ='django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_USE_TLS = True
EMAIL_PORT = 587
EMAIL_HOST_USER = 'from@gmail.com' # this email will be used to send emails
EMAIL_HOST_PASSWORD = 'xyz' # host email password required
# now sign in with your host gmail account in your browser
# open following link and turn it ON
# https://myaccount.google.com/lesssecureapps
# otherwise you will get SMTPAuthenticationError at /contactus
# this process is required because google blocks apps authentication by default
EMAIL_RECEIVING_USER = ['to@gmail.com'] # email on which you will receive messages sent from website
from django.contrib import admin
from django.urls import path,include
from django.contrib.auth.views import LogoutView,LoginView
urlpatterns = [
path('admin/', admin.site.urls),
path('Admin/',include('User.urls')),
]
"""
WSGI config for project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ServiceStation_2022.settings')
application = get_wsgi_application()
from django.contrib import admin
from .models import loginDataAdmin
admin.site.register(loginDataAdmin)
from django.apps import AppConfig
class PatientConfig(AppConfig):
name = 'User'
from django import forms
from django.contrib.auth.models import User
from . import models
MODE_CHOICES = [
('0', 'Select Work'),
('1', 'Engine Repairering'),
('2', 'Painting')
]
class MyForm(forms.Form):
customerid = forms.IntegerField(label="Select Work To be Done", widget=forms.Select(choices=MODE_CHOICES))
class MyForm2(forms.Form):
UserName = forms.CharField(label='User Name' )
Password = forms.CharField(label='Password', widget=forms.PasswordInput)
MODE_CHOICES2 = [
('-', 'Select Availability'),
('Yes', 'Available'),
('No', 'Not Available')
]
class MyForm3(forms.Form):
StaffID = forms.CharField(label='Enter Staff ID' )
Availability = forms.CharField(label="Select Availability", widget=forms.Select(choices=MODE_CHOICES2))
\ No newline at end of file
# Generated by Django 3.0.5 on 2021-01-17 10:51
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='Patient',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('profile_pic', models.ImageField(blank=True, null=True, upload_to='profile_pic/Patient/')),
('age', models.PositiveIntegerField()),
('bloodgroup', models.CharField(max_length=10)),
('disease', models.CharField(max_length=100)),
('doctorname', models.CharField(max_length=50)),
('address', models.CharField(max_length=40)),
('mobile', models.CharField(max_length=20)),
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
),
]
# Generated by Django 3.2.7 on 2021-09-19 08:40
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('User', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='PastData',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('bedRoom', models.IntegerField(max_length=12)),
('Bathroom', models.IntegerField(blank=True, max_length=12)),
('parking', models.IntegerField(blank=True, max_length=12)),
('price', models.IntegerField(blank=True, max_length=12)),
('area', models.IntegerField(blank=True, max_length=12)),
],
),
migrations.DeleteModel(
name='Patient',
),
]
# Generated by Django 3.2.7 on 2021-10-07 12:19
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('User', '0002_auto_20210919_1410'),
]
operations = [
migrations.CreateModel(
name='loginData',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('UserName', models.IntegerField(max_length=12)),
('Password', models.IntegerField(blank=True, max_length=12)),
],
),
]
# Generated by Django 3.2.7 on 2021-10-07 17:07
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('User', '0003_logindata'),
]
operations = [
migrations.CreateModel(
name='MakeRequestModel',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('Name', models.CharField(max_length=100)),
('Companyname', models.CharField(max_length=100)),
('CompanyAddress', models.CharField(max_length=100)),
('Email', models.CharField(max_length=100)),
('TelNo', models.CharField(max_length=100)),
('Type', models.CharField(max_length=100)),
('Size', models.CharField(max_length=100)),
('Date', models.CharField(max_length=100)),
],
),
migrations.AlterField(
model_name='logindata',
name='Password',
field=models.CharField(max_length=12),
),
migrations.AlterField(
model_name='logindata',
name='UserName',
field=models.CharField(max_length=12),
),
]
# Generated by Django 3.2.7 on 2021-10-07 18:33
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('User', '0004_auto_20211007_2237'),
]
operations = [
migrations.CreateModel(
name='msgmodel',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=100)),
('title', models.CharField(max_length=100)),
('Msge', models.CharField(max_length=100)),
],
),
]
# Generated by Django 3.2.7 on 2021-10-08 05:02
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('User', '0005_msgmodel'),
]
operations = [
migrations.CreateModel(
name='loginDataAdmin',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('UserName', models.CharField(max_length=12)),
('Password', models.CharField(max_length=12)),
],
),
migrations.RemoveField(
model_name='pastdata',
name='Bathroom',
),
migrations.RemoveField(
model_name='pastdata',
name='area',
),
migrations.RemoveField(
model_name='pastdata',
name='bedRoom',
),
migrations.RemoveField(
model_name='pastdata',
name='parking',
),
migrations.RemoveField(
model_name='pastdata',
name='price',
),
migrations.AddField(
model_name='pastdata',
name='Rtype',
field=models.CharField(default=1, max_length=50),
),
migrations.AddField(
model_name='pastdata',
name='inputdate',
field=models.CharField(default=1, max_length=12),
),
]
# Generated by Django 3.2.7 on 2021-10-08 13:45
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('User', '0006_auto_20211008_1032'),
]
operations = [
migrations.CreateModel(
name='Warehousemodel',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('space', models.IntegerField(max_length=100)),
('Available', models.IntegerField(max_length=100)),
('type', models.IntegerField(max_length=100)),
],
),
]
# Generated by Django 3.2.7 on 2021-10-08 18:56
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('User', '0007_warehousemodel'),
]
operations = [
migrations.CreateModel(
name='Updatemodel',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('size', models.IntegerField(max_length=100)),
('Available', models.IntegerField(max_length=100)),
('Rtype', models.IntegerField(max_length=100)),
],
),
]
# Generated by Django 3.2.7 on 2021-10-08 19:20
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('User', '0008_updatemodel'),
]
operations = [
migrations.DeleteModel(
name='Updatemodel',
),
]
# Generated by Django 3.2.7 on 2021-10-10 21:07
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('User', '0009_delete_updatemodel'),
]
operations = [
migrations.DeleteModel(
name='loginData',
),
migrations.DeleteModel(
name='MakeRequestModel',
),
migrations.DeleteModel(
name='msgmodel',
),
migrations.DeleteModel(
name='Warehousemodel',
),
]
# Generated by Django 3.2.7 on 2021-10-11 05:11
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('User', '0010_auto_20211011_0237'),
]
operations = [
migrations.RemoveField(
model_name='pastdata',
name='Rtype',
),
]
from django.db import models
from django.contrib.auth.models import User
class loginDataAdmin(models.Model):
UserName = models.CharField(max_length=12)
Password = models.CharField(max_length=12)
class PastData(models.Model):
inputdate = models.CharField(max_length=12 ,default = 1)
from django.urls import path
from django.contrib.auth.views import LoginView
from . import views
from User import views as responseapp_views
from django.contrib import admin
urlpatterns = [
path('AdminLogin/', responseapp_views.AdminLogin),
path('AdminHome/', responseapp_views.AdminHome),
path('Employee_Data/', responseapp_views.Employee_Data),
path('', admin.site.urls),
]
\ No newline at end of file
from datetime import datetime
from django.shortcuts import render, redirect, reverse
from django.template import loader
from django.http import HttpResponse
from User.forms import MyForm,MyForm2,MyForm3
from django.contrib.auth import authenticate, login
from User import models as Umodels
from django.http import HttpResponseRedirect
from django.contrib import messages
import json
# ------------------- EF
import pandas as pd
import numpy as np
import math
import sklearn
import matplotlib.pyplot as plt
from datetime import datetime
from sklearn import metrics
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LinearRegression
# ------------------- EF
# Start CompanyHome
def Homepage(request):
return render(request, 'Admin/Homepage.html');
# End CompanyHome
def Employee_Data(request):
data1 = pd.read_csv('Data/WorkHistory.csv')
data2 = pd.read_csv('Data/EmployeeStatus.csv')
DateSet = pd.merge(data1, data2, on='StaffID', how='inner')
grouped_df = DateSet.groupby("StaffID" ) # group job staff
finalpt = grouped_df.head(10) # date from two datasets
json_records = finalpt.reset_index().to_json(orient='records')
arr = []
arr = json.loads(json_records)
context = {'d': arr}
return render(request, 'Admin/Employee_Data.html',context);
def AdminLogin(request):
if request.method == 'POST':
myForm = MyForm2(request.POST)
if myForm.is_valid():
UserName = myForm.cleaned_data['UserName']
Password = myForm.cleaned_data['Password']
gotdata = Umodels.loginDataAdmin.objects.all().filter(UserName=UserName , Password=Password).count()
if gotdata > 0:
return render(request, 'Admin/AdminHome.html');
else:
messages.success(request, 'Login Info Not Found , Please Check Your UserName and Password')
return HttpResponseRedirect(request.path_info)
else:
form = MyForm2()
return render(request, 'Admin/AdminLogin.html', {'form':form});
def AdminHome(request):
return render(request,'Admin/AdminHome.html')
File added
#!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ServiceStation_2022.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django. Are you sure it's installed and "
"available on your PYTHONPATH environment variable? Did you "
"forget to activate a virtual environment?"
) from exc
execute_from_command_line(sys.argv)
if __name__ == '__main__':
main()
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
{% 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">
<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"> SMART SERVICE STATION</h2>
</div>
<div class="card-body">
<center>
<h1> ------</h1></center>
<br>
</div>
</div>
</div><div class="alert alert-primary" role="alert" > © SMART SERVICE STATION 2022 </div>
</div>
{% endblock content %}
{%load static%}
{% load widget_tweaks %}
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<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://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.css">
<!-- 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>
<style>
body
{
background-image:url('{% static 'image/Sales-forecast.png'%}');
background-repeat:no-repeat;
background-size:100%;
}
</style>
<body>
<div >
<div class="wrapper wrapper--w790">
<br><br><br>
<div class="card card-12">
<div class="card-heading">
<h2 class="title"> SMART SERVICE STATION : LOGIN</h2>
</div>
<div class="card-body">
<form method="post">
{% csrf_token %}
<table class="table table ">
{{form.as_table}}
</table>
<input type="submit" value="LOGIN" class="btn btn--radius-2 btn-success"/>
<br/><br/>
{% if messages %}
<div class="alert alert-danger" role="alert">
{% for message in messages %}
{% if message.tags %} {% endif %} {{ message }}
{% endfor %}
</div>
{% endif %}
</form>
</div>
</div>
</div>
</div>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
</body>
</html>
{% 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"> EMPLOYEE DATA </h2>
</div>
<div id="myDiv">
<div id="div_print">
<div class="card card-body printableArea">
<div class="container" style="overflow-x:auto;">
EMPLOYEE DATA LIST
<table class="table table-striped">
<thead>
<tr>
<th> StaffID </th>
<th> EmployeeName </th>
<th> Work Done </th>
<th> Work Rate </th>
<th> Taken Time </th>
</tr>
</thead>
<tbody>
{% if d %}
{% for i in d %}
<tr>
<td>{{i.StaffID}}</td>
<td>{{i.EmployeeName}}</td>
<td>{{i.JobDone}}</td>
<td>{{i.WorkQuality}} / 5 </td>
<td>{{i.TakenTime}} Minutes</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 %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title> SMART SERVICE STATION </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://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.css">
<style>
.row{
padding: 5px;
}
.fa-tint{
color: red;
}
.blood{
float: right;
}
.fa-users{
color: blue;
font-size: 3ex;
}
.fa-spinner{
color: blue;
font-size: 3ex;
}
.fa-check-circle{
color: blue;
font-size: 3ex;
}
.xyz{
color: blue;
font-size: 3ex;
}
*{
margin: 0;
padding: 0;
box-sizing: border-box;
list-style: none;
text-decoration: none;
font-family: 'Josefin Sans', sans-serif;
}
body{
background-color: #f3f5f9;
}
.bg-danger {
background-color: #0062cc !important;
}
.wrapper{
display: flex;
position: relative;
}
.wrapper .sidebar{
width: 200px;
height: 100%;
background: #178530;
padding: 30px 0px;
position: fixed;
}
.wrapper .sidebar h2{
color: #fff;
text-transform: uppercase;
text-align: center;
margin-bottom: 30px;
}
.wrapper .sidebar ul li{
padding: 15px;
border-bottom: 1px solid #dedede;
border-bottom: 1px solid rgba(0,0,0,0.05);
border-top: 1px solid rgba(255,255,255,0.05);
}
.wrapper .sidebar ul li a{
color: #dedede;
display: block;
}
.wrapper .sidebar ul li a .fas{
width: 25px;
}
.wrapper .sidebar ul li:hover{
background-color: #7a7a7a;
}
.wrapper .sidebar ul li:hover a{
color: #fff;
}
.wrapper .sidebar .social_media{
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
display: flex;
}
.wrapper .sidebar .social_media a{
display: block;
width: 40px;
background: #594f8d;
height: 40px;
line-height: 45px;
text-align: center;
margin: 0 5px;
color: #dedede;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
}
.wrapper .main_content{
width: 100%;
margin-left: 200px;
}
.wrapper .main_content .header{
padding: 20px;
background: #fff;
color: #717171;
border-bottom: 1px solid #e0e4e8;
}
.wrapper .main_content .info{
margin: 20px;
color: #717171;
line-height: 25px;
}
.wrapper .main_content .info div{
margin-bottom: 20px;
}
@media (max-height: 500px){
.social_media{
display: none !important;
}
}
.fa-sign-out-alt{
color: white;
font-size: 2ex;
}
</style>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-light fixed-top bg-danger">
<a style="color:white;" class="navbar-brand" href="#"> &nbsp;<font face = "Comic sans MS" size ="5">SMART SERVICE STATION </font></a>
<div class="navbar-collapse collapse w-100 order-3 dual-collapse2">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link" style="color: white;" href="../../../Admin/AdminLogin/">User : Admin | Logout &nbsp; <i class="fa fa-power-off"></i></a>
</li>
</ul>
</div>
</nav>
<br><br>
<div class="wrapper">
<div class="sidebar">
<ul>
<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="/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>
</ul>
</div>
<div class="main_content">
{% block content %}
{% endblock content %}
</div>
</div>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
</body>
</html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment