Commit f28fc69d authored by dexsap's avatar dexsap

poggers

parent 3977069a
# Generated by Django 4.2 on 2023-05-16 12:52 # Generated by Django 4.2 on 2023-05-16 16:45
from django.db import migrations, models from django.db import migrations, models
import django.db.models.deletion import django.db.models.deletion
...@@ -14,11 +14,8 @@ class Migration(migrations.Migration): ...@@ -14,11 +14,8 @@ class Migration(migrations.Migration):
migrations.CreateModel( migrations.CreateModel(
name="Employee", name="Employee",
fields=[ fields=[
("employee_id", models.CharField(max_length=10)), ("employee_id", models.AutoField(primary_key=True, serialize=False)),
( ("employee_name", models.CharField(max_length=255)),
"employee_name",
models.CharField(max_length=255, primary_key=True, serialize=False),
),
( (
"employee_sex", "employee_sex",
models.CharField(blank=True, default="", max_length=1, null=True), models.CharField(blank=True, default="", max_length=1, null=True),
...@@ -52,10 +49,7 @@ class Migration(migrations.Migration): ...@@ -52,10 +49,7 @@ class Migration(migrations.Migration):
), ),
("username", models.CharField(max_length=300, unique=True)), ("username", models.CharField(max_length=300, unique=True)),
("password", models.CharField(max_length=300)), ("password", models.CharField(max_length=300)),
("first_name", models.CharField(max_length=300)), ("name", models.CharField(max_length=300)),
("last_name", models.CharField(max_length=300)),
("birthday", models.DateField()),
("sex", models.CharField(max_length=50)),
], ],
), ),
migrations.CreateModel( migrations.CreateModel(
...@@ -77,7 +71,7 @@ class Migration(migrations.Migration): ...@@ -77,7 +71,7 @@ class Migration(migrations.Migration):
("prod_date", models.DateField(null=True)), ("prod_date", models.DateField(null=True)),
("totalduration", models.DurationField()), ("totalduration", models.DurationField()),
( (
"employee_name", "employee_id",
models.ForeignKey( models.ForeignKey(
default="", default="",
on_delete=django.db.models.deletion.CASCADE, on_delete=django.db.models.deletion.CASCADE,
...@@ -95,18 +89,15 @@ class Migration(migrations.Migration): ...@@ -95,18 +89,15 @@ class Migration(migrations.Migration):
("duration", models.CharField(max_length=5)), ("duration", models.CharField(max_length=5)),
("status", models.CharField(max_length=255)), ("status", models.CharField(max_length=255)),
( (
"employee_name", "employee_id",
models.ForeignKey( models.ForeignKey(
default="",
on_delete=django.db.models.deletion.CASCADE, on_delete=django.db.models.deletion.CASCADE,
to="IPSapp.employee", to="IPSapp.employee",
unique=True,
), ),
), ),
( (
"sr_no", "sr_no",
models.ForeignKey( models.ForeignKey(
default="",
on_delete=django.db.models.deletion.CASCADE, on_delete=django.db.models.deletion.CASCADE,
to="IPSapp.summaryreport", to="IPSapp.summaryreport",
), ),
......
# Generated by Django 4.2 on 2023-05-16 17:22
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
("IPSapp", "0001_initial"),
]
operations = [
migrations.AddField(
model_name="employee",
name="position_name",
field=models.ForeignKey(
default="",
on_delete=django.db.models.deletion.CASCADE,
to="IPSapp.position",
),
),
migrations.AlterField(
model_name="position",
name="position_id",
field=models.AutoField(primary_key=True, serialize=False),
),
]
# Generated by Django 4.2 on 2023-05-16 17:22
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("IPSapp", "0002_employee_position_name_alter_position_position_id"),
]
operations = [
migrations.RenameField(
model_name="employee", old_name="position_name", new_name="position_id",
),
]
...@@ -2,20 +2,22 @@ from django.db import models ...@@ -2,20 +2,22 @@ from django.db import models
#from .employee import Employee #from .employee import Employee
class Employee(models.Model): class Employee(models.Model):
employee_id = models.CharField(max_length=10) employee_id = models.AutoField(primary_key=True)
employee_name = models.CharField(max_length=255, primary_key=True) employee_name = models.CharField(max_length=255)
employee_sex = models.CharField(max_length=1, blank=True, null=True, default='') employee_sex = models.CharField(max_length=1, blank=True, null=True, default='')
employee_bday = models.DateField(blank=True, null=True, default='') employee_bday = models.DateField(blank=True, null=True, default='')
employee_email = models.CharField(max_length=255, blank=True, null=True, default='') employee_email = models.CharField(max_length=255, blank=True, null=True, default='')
employee_num = models.CharField(max_length=10, blank=True, null=True, default='') employee_num = models.CharField(max_length=10, blank=True, null=True, default='')
employee_emergnum = models.CharField(max_length=10, blank=True, null=True, default='') employee_emergnum = models.CharField(max_length=10, blank=True, null=True, default='')
position_id = models.ForeignKey('Position', on_delete=models.CASCADE, default='')
def __str__(self): def __str__(self):
return str(self.employee_name) return str(self.employee_name)
class Productivity(models.Model): class Productivity(models.Model):
report_no = models.AutoField(primary_key=True) report_no = models.AutoField(primary_key=True)
employee_name = models.ForeignKey('Employee', on_delete=models.CASCADE, default='', unique=True) employee_id = models.ForeignKey('Employee', on_delete=models.CASCADE)
sr_no = models.ForeignKey('SummaryReport', on_delete=models.CASCADE, default='') sr_no = models.ForeignKey('SummaryReport', on_delete=models.CASCADE)
remarks = models.TextField(max_length=2000, blank=True) remarks = models.TextField(max_length=2000, blank=True)
process = models.CharField(max_length=255) process = models.CharField(max_length=255)
duration = models.CharField(max_length=5) duration = models.CharField(max_length=5)
...@@ -36,13 +38,16 @@ class Productivity(models.Model): ...@@ -36,13 +38,16 @@ class Productivity(models.Model):
def getStatus(self): def getStatus(self):
return self.status return self.status
def __str__(self): def __str__(self):
return "PK No.: " + str(self.report_no) + ", " + str(self.status) + ", " + str(self.process) + ", " + str(self.duration) + ", " + str(self.remarks) return "PK No.: " + str(self.report_no) + ", " + str(self.status) + ", " + str(self.process) + ", " + str(self.duration) + ", " + str(self.remarks)
class Position(models.Model): class Position(models.Model):
position_id = models.CharField(max_length=10, primary_key=True) position_id = models.AutoField(primary_key=True)
position_name = models.CharField(max_length=255) position_name = models.CharField(max_length=255)
def __str__(self):
return str(self.position_name)
class History(models.Model): class History(models.Model):
history_no = models.CharField(max_length=10, primary_key=True) history_no = models.CharField(max_length=10, primary_key=True)
employee = models.ForeignKey('Employee', on_delete=models.CASCADE) employee = models.ForeignKey('Employee', on_delete=models.CASCADE)
...@@ -52,7 +57,7 @@ class History(models.Model): ...@@ -52,7 +57,7 @@ class History(models.Model):
class SummaryReport(models.Model): class SummaryReport(models.Model):
sr_no = models.AutoField(primary_key=True) sr_no = models.AutoField(primary_key=True)
employee_name = models.ForeignKey('Employee', on_delete=models.CASCADE, default='') employee_id = models.ForeignKey('Employee', on_delete=models.CASCADE, default='')
prod_score = models.FloatField() prod_score = models.FloatField()
totalworkhrs = models.DurationField() totalworkhrs = models.DurationField()
prod_date = models.DateField(null=True) prod_date = models.DateField(null=True)
...@@ -80,11 +85,7 @@ class SummaryReport(models.Model): ...@@ -80,11 +85,7 @@ class SummaryReport(models.Model):
class IPSUser(models.Model): class IPSUser(models.Model):
username = models.CharField(max_length=300, unique=True) username = models.CharField(max_length=300, unique=True)
password = models.CharField(max_length=300) password = models.CharField(max_length=300)
first_name = models.CharField(max_length=300) name = models.CharField(max_length=300)
last_name = models.CharField(max_length=300)
birthday = models.DateField()
sex = models.CharField(max_length=50)
objects = models.Manager()
def getUsername(self): def getUsername(self):
return self.username return self.username
...@@ -92,17 +93,8 @@ class IPSUser(models.Model): ...@@ -92,17 +93,8 @@ class IPSUser(models.Model):
def getPassword(self): def getPassword(self):
return self.password return self.password
def getFirstName(self): def getName(self):
return self.first_name return self.name
def getLastName(self):
return self.last_name
def getBirthday(self):
return self.birthday
def getSex(self):
return self.sex
def __str__(self): def __str__(self):
return "pk: " + str(self.pk) + ": " + self.username + ", " + self.first_name + " " + self.last_name + ", " + str(self.birthday) + ", " + self.sex return "pk: " + str(self.pk) + ": " + self.username + ", " + self.name
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
@import url('https://unpkg.com/css.gg@2.0.0/icons/css/user-add.css'); @import url('https://unpkg.com/css.gg@2.0.0/icons/css/user-add.css');
@import url('https://unpkg.com/css.gg@2.0.0/icons/css/import.css'); @import url('https://unpkg.com/css.gg@2.0.0/icons/css/import.css');
@import url('https://unpkg.com/css.gg@2.0.0/icons/css/log-out.css'); @import url('https://unpkg.com/css.gg@2.0.0/icons/css/log-out.css');
@import url('https://unpkg.com/css.gg@2.0.0/icons/css/user-list.css');
@import url('https://unpkg.com/css.gg@2.0.0/icons/css/user-list.css');
body { body {
font-family: Helvetica ; font-family: Helvetica ;
...@@ -13,11 +15,14 @@ body { ...@@ -13,11 +15,14 @@ body {
} }
.footer { .footer {
position: fixed; position: sticky;
left: 0; bottom: 0px;
bottom: 0;
width: 100%; width: 100%;
height: max-content;
text-align: center; text-align: center;
margin-top: 10px;
padding-bottom: 5px;
margin-bottom: 0px;
} }
.base-logo { .base-logo {
...@@ -46,6 +51,10 @@ body { ...@@ -46,6 +51,10 @@ body {
padding: 16px 16px 16px; padding: 16px 16px 16px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
position: fixed;
z-index: 2;
top: 0px;
width: 100%;
} }
...@@ -95,7 +104,7 @@ body { ...@@ -95,7 +104,7 @@ body {
height: 100%; height: 100%;
width: 85px; width: 85px;
position: fixed; position: fixed;
top: 102.4; top: 102.4px;
left: 0; left: 0;
background-color: #461E0A; background-color: #461E0A;
color: white; color: white;
...@@ -116,6 +125,7 @@ body { ...@@ -116,6 +125,7 @@ body {
/* .sidebar-button:hover { /* .sidebar-button:hover {
background-color: #2C1206; background-color: #2C1206;
color: white; color: white;
text-decoration: none;
} */ } */
.sidebar p { .sidebar p {
...@@ -135,9 +145,19 @@ body { ...@@ -135,9 +145,19 @@ body {
color: white; color: white;
} }
.sidebar-hover {
background-color: #461E0A;
color: white;
text-decoration: none;
}
.sidebar-hover a:hover {
color: white;
}
.sidebar-hover:hover { .sidebar-hover:hover {
background-color: #2C1206; background-color: #2C1206;
color: white;
} }
.icon-align { .icon-align {
...@@ -147,6 +167,8 @@ body { ...@@ -147,6 +167,8 @@ body {
.main { .main {
margin-left: 85px; margin-left: 85px;
margin-top: 130px;
width: 93%;
} }
.search-and-add-cont { .search-and-add-cont {
...@@ -186,3 +208,12 @@ body { ...@@ -186,3 +208,12 @@ body {
background-color: #00802B; background-color: #00802B;
color: white; color: white;
} }
.content-wrap {
padding-bottom: 2.5rem;
}
.page-container {
position: relative;
/* min-height: 100vh; */
}
...@@ -156,3 +156,7 @@ input[type="radio"] { ...@@ -156,3 +156,7 @@ input[type="radio"] {
margin-right: 15px; margin-right: 15px;
margin-top: 50px; margin-top: 50px;
} }
.long-textbox {
width: 660px;
}
\ No newline at end of file
.top-cont {
margin: 30px 50px 0px;
}
body {
font-family: Helvetica;
}
.centercont {
margin: auto;
display: flex;
justify-content: center;
}
h2.bold {
margin-top: 30px;
font-weight: bold;
}
input[type="text"],
input[type="tel"],
input[type="email"],
input[type="password"],
input[type="date"],
select,
textarea {
display: block;
width: 100%;
padding: 0.375rem 0.75rem;
font-size: 1rem;
font-weight: 400;
line-height: 1;
color: #212529;
background-color: #fff;
background-clip: padding-box;
border: 1px solid #ced4da;
border-radius: 0.25rem;
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
input[type="file"] {
width: 100%;
padding: 0.375rem 0.75rem;
font-size: 0.8rem;
font-weight: 400;
line-height: 1;
border-radius: 0.25rem;
margin-left: 25px;
}
input[type="radio"] {
padding: 0.375rem 0.75rem;
font-size: 0.8rem;
border-radius: 0.25rem;
margin-left: 25px;
margin-right: 5px;
transform: scale(1.5);
}
.top-cont {
margin: 30px 50px 0px;
}
.profile-info-cont {
margin-top: 30px;
}
.profile-info-form {
border: none;
}
/* button{
border-radius: 4px;
} */
.input-dimension input, select {
border: 1px solid black;
border-radius: 4px;
width: 60%;
}
.label-row {
width: 100%;
display: flex;
justify-content: space-between;
}
.label-row input, select {
display: flex;
width: 260px;
}
.input-row {
width: 100%;
display: flex;
width: 100%;
justify-content: space-evenly;
}
.text-input-grouping {
display: flex;
flex-direction: column;
}
.text-input-grouping span {
color: grey;
font-size: 13px;
font-style: italic;
}
.text-input-grouping p {
font-size: 18px;
}
.box {
width: 260px;
background-color: white;
height: 60px;
}
.sex-input {
width: 260px;
display: flex;
}
.sex-input input {
display: flex;
}
.sex-input label {
display: block;
margin: 0 auto;
width: 150px;
}
.sex-input input[type="radio"] {
line-height: 30px;
vertical-align: bottom;
width: 15px;
margin-left: 15px;
}
.button-cancel button {
border-radius: 4px;
border: 1px solid black;
padding: 5px 10px;
background-color: white;
width: max-content;
width: 200px;
/* margin-right: 15px; */
}
.button-save button {
border-radius: 4px;
border: 1px solid white;
padding: 5px 10px;
background-color: #00802B;
color: white;
width: max-content;
width: 200px;
margin-right: 15px;
}
.profile-options {
display: flex;
justify-content: end;
}
.bottom-cont {
margin-right: 15px;
margin-top: 50px;
display: flex;
align-items: flex-end;
}
.long-textbox {
width: 660px;
}
.vert-line {
border: 0.5px solid grey;
height: 80%;
width: 0.3px;
margin-top: 5px;
margin-bottom: 5px;
opacity: 50%;
}
.hori-line {
border: 0.5px solid grey;
width: 100%;
height: 0.3px;
margin-top: 15px;
}
.invisible-box {
border: 0.5px solid white;
background-color: white;
width: 260px;
height: 56px;
/* margin-top: 15px; */
}
.search-add-cont {
width: 560px;
display: flex;
align-items: left;
justify-content: space-between;
margin-bottom: 10px;
}
.search-and-add-cont button {
border-radius: 4px;
border: 1px solid black;
padding: 5px 10px;
}
.searchbar {
width: 75%;
/* padding-left: 30px; */
}
.searchbar input {
border-radius: 4px;
border: 1px solid black;
padding: 5px 10px;
/* margin-right: 20px; */
width: 350px;
height: 100%;
}
.position-buttons-cont {
display: flex;
justify-content: start;
}
.add-profile-button {
width: 200px;
height: 50px;
background-color: #00802B;
color: white;
border: none;
border-radius: 4px;
}
.add-button:hover {
background-color: #004316;
}
.participant-table-cont {
margin-top: 15px;
/* margin top not working */
overflow:hidden;
overflow-y: scroll;
width: 660px;
/* height: 340px; */
border-width: 5px;
}
.button-remove button {
border-radius: 4px;
border: 1px solid black;
padding: 5px 10px;
background-color: white ;
color: black;
width: max-content;
width: 100px;
margin-right: 15px;
}
.button-remove button:hover {
border: 1px solid white;
background-color: #8b0000 ;
color: white
}
#participant {
width: 100%;
margin-top: 15px;
height: 100%;
/* display: flex;
/* flex-direction: column; */
/* justify-content: space-between; */
}
#participant th {
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
background-color: #00802D;
color: white;
}
#participant td, #participant th {
border: 1px solid #ddd;
padding: 8px;
}
#participant td:nth-child(1) {
width:10%;
text-align: center;
}
#participant td:nth-child(3) {
border-left: unset;
width: 20%
}
#participant td:nth-child(2) {
border-right: unset;
width: 70%
}
#participant tr:nth-child(even){
background-color: #f2f2f2;
}
#participant tr:hover {
background-color: #ddd;
}
#td-align td{
display: flex;
/* flex-direction: column; */
justify-content: space-between;
}
.left-cont {
width: 660px;
height: auto;
margin-right: 10px;
}
#cell-remove button{
width: 200px;
border-left: 0px white;
align-items: end;
}
.table-cont {
height: 200px;
overflow:hidden;
overflow-y: scroll;
}
\ No newline at end of file
body {
font-family: Helvetica;
}
.centercont {
margin: auto;
display: flex;
justify-content: center;
}
h2.bold {
margin-top: 30px;
font-weight: bold;
}
input[type="text"],
input[type="tel"],
input[type="email"],
input[type="password"],
input[type="date"],
select,
textarea {
display: block;
width: 100%;
padding: 0.375rem 0.75rem;
font-size: 1rem;
font-weight: 400;
line-height: 1;
color: #212529;
background-color: #fff;
background-clip: padding-box;
border: 1px solid #ced4da;
border-radius: 0.25rem;
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
input[type="file"] {
width: 100%;
padding: 0.375rem 0.75rem;
font-size: 0.8rem;
font-weight: 400;
line-height: 1;
border-radius: 0.25rem;
margin-left: 25px;
}
input[type="radio"] {
padding: 0.375rem 0.75rem;
font-size: 0.8rem;
border-radius: 0.25rem;
margin-left: 25px;
margin-right: 5px;
transform: scale(1.5);
}
.top-cont {
margin: 30px 50px 0px;
}
.profile-info-cont {
margin-top: 30px;
}
.profile-info-form {
border: none;
}
/* button{
border-radius: 4px;
} */
.input-dimension input, select {
border: 1px solid black;
border-radius: 4px;
width: 60%;
}
.label-row {
width: 100%;
display: flex;
justify-content: space-between;
}
.label-row input, select {
display: flex;
width: 260px;
}
.input-row {
width: 100%;
display: flex;
width: 100%;
justify-content: space-evenly;
}
.text-input-grouping {
display: flex;
flex-direction: column;
}
.box {
width: 260px;
background-color: white;
height: 60px;
}
.sex-input {
width: 260px;
display: flex;
}
.sex-input input {
display: flex;
}
.sex-input label {
display: block;
margin: 0 auto;
width: 150px;
}
.sex-input input[type="radio"] {
line-height: 30px;
vertical-align: bottom;
width: 15px;
margin-left: 15px;
}
.button-cancel button {
border-radius: 4px;
border: 1px solid black;
padding: 5px 10px;
background-color: white;
width: max-content;
width: 200px;
margin-right: 15px;
}
.button-save button {
border-radius: 4px;
border: 1px solid white;
padding: 5px 10px;
background-color: #00802B;
color: white;
width: max-content;
width: 200px;
}
.button-delete button {
border-radius: 4px;
border: 1px solid white;
padding: 5px 10px;
background-color: #8b0000 ;
color: white;
width: max-content;
width: 200px;
margin-right: 15px;
}
.profile-options {
display: flex;
justify-content: end;
}
.bottom-cont {
margin-right: 15px;
margin-top: 50px;
}
.long-textbox {
width: 660px;
}
.top-cont {
margin: 30px 50px 0px;
}
body {
font-family: Helvetica;
}
.centercont {
margin: auto;
display: flex;
justify-content: center;
}
h2.bold {
margin-top: 30px;
font-weight: bold;
}
input[type="text"],
input[type="tel"],
input[type="email"],
input[type="password"],
input[type="date"],
select,
textarea {
display: block;
width: 100%;
padding: 0.375rem 0.75rem;
font-size: 1rem;
font-weight: 400;
line-height: 1;
color: #212529;
background-color: #fff;
background-clip: padding-box;
border: 1px solid #ced4da;
border-radius: 0.25rem;
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
input[type="file"] {
width: 100%;
padding: 0.375rem 0.75rem;
font-size: 0.8rem;
font-weight: 400;
line-height: 1;
border-radius: 0.25rem;
margin-left: 25px;
}
input[type="radio"] {
padding: 0.375rem 0.75rem;
font-size: 0.8rem;
border-radius: 0.25rem;
margin-left: 25px;
margin-right: 5px;
transform: scale(1.5);
}
.top-cont {
margin: 30px 50px 0px;
}
.profile-info-cont {
margin-top: 30px;
}
.profile-info-form {
border: none;
}
/* button{
border-radius: 4px;
} */
.input-dimension input,
select {
border: 1px solid black;
border-radius: 4px;
width: 60%;
}
.label-row {
width: 100%;
display: flex;
justify-content: space-between;
}
.label-row input,
select {
display: flex;
width: 260px;
}
.input-row {
width: 100%;
display: flex;
width: 100%;
justify-content: space-evenly;
}
.text-input-grouping {
display: flex;
flex-direction: column;
}
.text-input-grouping span {
color: grey;
font-size: 13px;
font-style: italic;
}
.text-input-grouping p {
font-size: 18px;
}
.box {
width: 260px;
background-color: white;
height: 60px;
}
.sex-input {
width: 260px;
display: flex;
}
.sex-input input {
display: flex;
}
.sex-input label {
display: block;
margin: 0 auto;
width: 150px;
}
.sex-input input[type="radio"] {
line-height: 30px;
vertical-align: bottom;
width: 15px;
margin-left: 15px;
}
.button-delete {
display: flex;
justify-content: end;
}
.button-delete button {
border: 1px solid white;
background-color: #8b0000;
color: white;
margin-top: 15px;
display: flex;
justify-content: center;
}
.button-dim button{
border-radius: 4px;
padding: 5px 10px;
width: 150px;
}
.button-cancel {
border: 1px solid black;
background-color: white;
/* margin-right: 15px; */
}
.button-save {
border: 1px solid white;
background-color: #00802b;
color: white;
margin-right: 15px;
}
.profile-options {
display: flex;
justify-content: end;
flex-direction: column;
}
.bottom-cont {
display: flex;
align-items: flex-end;
flex-grow: 1;
}
.long-textbox {
width: 660px;
}
.vert-line {
border: 0.5px solid grey;
height: 80%;
width: 0.3px;
margin-top: 5px;
margin-bottom: 5px;
opacity: 50%;
}
.hori-line {
border: 0.5px solid grey;
width: 100%;
height: 0.3px;
margin-top: 15px;
}
.invisible-box {
border: 0.5px solid white;
background-color: white;
width: 260px;
height: 56px;
/* margin-top: 15px; */
}
.search-add-cont {
width: 560px;
display: flex;
align-items: left;
justify-content: space-between;
margin-bottom: 10px;
}
.search-and-add-cont button {
border-radius: 4px;
border: 1px solid black;
padding: 5px 10px;
}
.searchbar {
width: 75%;
/* padding-left: 30px; */
}
.searchbar input {
border-radius: 4px;
border: 1px solid black;
padding: 5px 10px;
/* margin-right: 20px; */
width: 350px;
height: 100%;
}
.position-buttons-cont {
display: flex;
justify-content: start;
}
.add-profile-button {
width: 200px;
height: 50px;
background-color: #00802b;
color: white;
border: none;
border-radius: 4px;
}
.add-button:hover {
background-color: #004316;
}
.participant-table-cont {
margin-top: 15px;
/* margin top not working */
overflow: hidden;
overflow-y: scroll;
width: 660px;
/* height: 340px; */
border-width: 5px;
}
.button-remove button {
border-radius: 4px;
border: 1px solid black;
padding: 5px 10px;
background-color: white;
color: black;
width: max-content;
margin-right: 15px;
}
.button-remove button:hover {
border: 1px solid white;
background-color: #8b0000;
color: white;
}
#participant {
width: 100%;
margin-top: 15px;
height: 100%;
/* display: flex;
/* flex-direction: column; */
/* justify-content: space-between; */
}
#participant th {
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
background-color: #00802d;
color: white;
}
#participant td,
#participant th {
border: 1px solid #ddd;
padding: 8px;
}
#participant td:nth-child(1) {
width: 10%;
text-align: center;
}
#participant td:nth-child(3) {
border-left: unset;
width: 20%;
}
#participant td:nth-child(2) {
border-right: unset;
width: 70%;
}
#participant tr:nth-child(even) {
background-color: #f2f2f2;
}
#participant tr:hover {
background-color: #ddd;
}
#td-align td {
display: flex;
/* flex-direction: column; */
justify-content: space-between;
}
.left-cont {
width: 660px;
height: auto;
margin-right: 10px;
}
#cell-remove button {
width: 200px;
border-left: 0px white;
align-items: end;
}
.table-cont {
height: 200px;
overflow: hidden;
overflow-y: scroll;
}
@import url('https://unpkg.com/css.gg@2.0.0/icons/css/search.css'); @import url('https://unpkg.com/css.gg@2.0.0/icons/css/search.css');
body { body {
font-family: Helvetica ; font-family: Helvetica ;
} }
...@@ -19,7 +20,7 @@ body { ...@@ -19,7 +20,7 @@ body {
.searchbar { .searchbar {
width: 78%; width: 78%;
background: url(images/comment-author.gif) no-repeat scroll 7px 7px; background: url("%images/search-icon.png%") top left no-repeat scroll 7px 7px;
padding-left: 30px; padding-left: 30px;
} }
...@@ -49,14 +50,17 @@ body { ...@@ -49,14 +50,17 @@ body {
} }
.employee-table-cont { .employee-table-cont {
margin-top: 15px;
/* margin top not working */
overflow:hidden; overflow:hidden;
overflow-y: scroll; overflow-y: scroll;
height: 350px; height: 340px;
border-width: 5px;
} }
#employee { #employee {
width: 91.5%; width: 91.5%;
margin-top: 30px; margin-top: 15px;
margin-left: 50px; margin-left: 50px;
height: 100%; height: 100%;
/* display: flex; /* display: flex;
......
@import url('https://unpkg.com/css.gg@2.0.0/icons/css/search.css');
body {
font-family: Helvetica ;
}
.search-and-add-cont {
margin: 30px 50px 0px;
display: flex;
/* flex-direction: column; */
justify-content: space-between;
}
.search-and-add-cont button {
border-radius: 4px;
border: 1px solid black;
padding: 5px 10px;
}
.searchbar {
width: 78%;
background: url("%images/search-icon.png%") top left no-repeat scroll 7px 7px;
padding-left: 30px;
}
.searchbar input {
border-radius: 4px;
border: 1px solid black;
padding: 5px 10px;
margin-right: 20px;
width: 100%;
height: 100%;
}
.add-button {
border: none;
}
.add-profile-button {
width: 200px;
height: 50px;
background-color: #00802B;
color: white;
border: none;
border-radius: 4px;
}
.add-button:hover {
background-color: #004316;
}
.employee-table-cont {
margin-top: 15px;
overflow:hidden;
overflow-y: scroll;
height: 340px;
}
#employee {
width: 91.5%;
margin-top: 15px;
margin-left: 50px;
height: 100%;
/* display: flex;
/* flex-direction: column; */
/* justify-content: space-between; */
}
#employee th {
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
background-color: #00802D;
color: white;
}
#employee td, #employee th {
border: 1px solid #ddd;
padding: 8px;
}
#employee tr:nth-child(even){
background-color: #f2f2f2;
}
#employee tr:hover {
background-color: #ddd;
}
#employee td:nth-child(1) {
width: 5%;
text-align: center;
}
#employee td:nth-child(2) {
width: 65%;
}
#employee td:nth-child(3) {
border-right: unset;
width:15%;
}
#employee td:nth-child(5) {
/* display: flex; */
/* align-items: center; */
width: 15%;
}
.button-cont {
width: 100%;
display: flex;
justify-content: space-evenly;
align-items: center;
}
.button-save button {
border-radius: 4px;
border: 1px solid white;
padding: 5px 10px;
background-color: #00802B;
color: white;
width: max-content;
width: 100px;
margin-right: 10px;
}
.button-delete button {
border-radius: 4px;
border: 1px solid white;
padding: 5px 10px;
background-color: #8b0000 ;
color: white;
width: max-content;
width: 100px;
/* margin-right: 15px; */
}
\ No newline at end of file
body {
font-family: Helvetica ;
}
.centercont {
margin: auto;
display: flex;
justify-content: center;
}
.loginheader {
background-color: #00802B;
color: white;
text-transform: uppercase;
font-family: Helvetica, Arial, sans-serif;
}
.loginheader span {
font-size: 14px;
}
.headertextcontainer {
margin-top: 16px;
}
.login-logo {
margin: 20px;
}
.login-logo img {
width: 150px;
height: auto;
}
.column-direction {
flex-direction: column;
align-items: center;
}
.column-direction b {
font-size: 24px;
}
.login-input-align {
margin: 5px;
}
.login-input-align input {
border-radius: 8px;
border: 1px solid black;
padding: 5px 10px;
margin: 5px;
}
.login-box {
width: 200px;
}
.login-button {
width: 200px;
border: 1px solid white;
padding: 5px 10px;
margin-top: 10px;
font-weight: bold;
}
.login-borders {
border-radius: 4px;
}
.button-login {
background-color: #00802B;
color: white;
}
.button-cancel {
background-color: white;
border: 1px solid black;
}
.horizontal-align {
display: flex;
justify-content: space-between;
}
.sex-input {
width: 150px;
display: flex;
}
.sex-input input {
display: flex;
}
.sex-input label {
display: block;
}
.sex-inner {
display: flex;
flex-direction: row;
}
\ No newline at end of file
...@@ -21,14 +21,6 @@ body { ...@@ -21,14 +21,6 @@ body {
/* align-items: center; */ /* align-items: center; */
} }
input[type="file"] {
display: none;
}
#file-upload{
display: none;
}
.cf-button { .cf-button {
width: 20%; width: 20%;
border-radius: 4px; border-radius: 4px;
...@@ -43,8 +35,7 @@ input[type="file"] { ...@@ -43,8 +35,7 @@ input[type="file"] {
} }
.upload-table-cont { .upload-table-cont {
overflow:hidden; color: white;
overflow-y: scroll;
height: 200px; height: 200px;
} }
......
body {
font-family: Helvetica;
}
.employee-info-cont {
margin: 30px 50px 0px;
background-color: #00802d;
color: white;
width: 91.5%;
height: 100px;
margin-right: 50px;
border-radius: 4px;
padding: 5px 10px;
display: flex;
justify-content: space-between;
}
.employee-info-contact {
display: flex;
margin-right: 50px;
}
.employee-nameID {
display: flex;
height: 100%;
margin-left: 30px;
flex-direction: column;
width: 30%;
justify-content: center;
}
#ID {
background-color: white;
color: #00802d;
border-radius: 4px;
padding: 3px;
font-weight: bold;
}
/* .employee-info-contact {
display: flex;
flex-direction: column;
} */
.SBP {
display: flex;
height: 100%;
margin-left: 30px;
flex-direction: column;
justify-content: center;
}
.SBP h6 {
font-size: 16px;
margin: 0px;
}
.bold {
font-weight: bold;
}
.dashboard-options {
margin: 15px 50px 0px;
display: flex;
justify-content: space-between;
}
.print-out button {
border-radius: 4px;
border: 1px solid black;
padding: 5px 10px;
background-color: white;
width: max-content;
}
.print-out button:hover {
background-color: #ddd;
}
.select-range {
display: flex;
justify-content: space-between;
align-items: center;
}
.range-selected {
border-radius: 4px;
border: 1px solid black;
margin: 0px 5px;
padding: 5px 10px;
font-weight: bold;
background-color: white;
}
.range-selected:hover,
.range-selected:focus {
background-color: #00802b;
color: white;
}
.vert-line {
border: 0.5px solid grey;
height: 80%;
width: 0.3px;
margin-top: 5px;
margin-bottom: 5px;
opacity: 50%;
}
.seperator {
display: flex;
justify-content: center;
}
.hori-line {
border: 0.5px solid grey;
width: 91.5%;
height: 0.3px;
margin-top: 15px;
}
.main {
margin-left: 85px;
}
.search-and-add-cont {
margin: 15px 50px 0px;
display: flex;
/* flex-direction: column; */
justify-content: space-between;
}
.search-and-add-cont button {
border-radius: 4px;
border: 1px solid black;
padding: 5px 10px;
}
.searchbar {
width: 80%;
background: url("%images/search-icon.png%") top left no-repeat scroll 7px 7px;
}
.searchbar input {
border-radius: 4px;
border: 1px solid black;
padding: 5px 10px;
margin-right: 20px;
width: 100%;
height: 100%;
}
.productivity-table-cont {
margin-left: 85px;
margin-top: 15px;
}
.productivity-table {
width: 95%;
text-align: center;
}
.productivity-table th {
background-color: #a9deba;
margin-top: 15px;
padding-top: 12px;
padding-bottom: 12px;
}
.productivity-table td {
border-bottom: 1px solid #ddd;
border-right: 1px solid #ddd;
border-left: 1px solid #ddd;
padding: 8px;
}
.productivity-table tr:nth-child(even) {
background-color: #f2f2f2;
}
.productivity-table tr:hover {
background-color: #ddd;
}
/* kebab styling */
.kebab {
cursor: pointer;
position: relative;
display: inline-block;
box-sizing: border-box;
padding: 0 16px;
}
.kebab figure {
width: 6px;
height: 6px;
border-radius: 5px;
background: white;
margin: 3px 0;
}
.middle {
transition: all 0.25s cubic-bezier(0.72, 1.2, 0.71, 0.72);
transform: scale(1);
position: relative;
box-shadow: 0 0.1px 0.1px 0 rgba(0, 0, 0, 0.16),
0 0.1px 0.3px 0 rgba(0, 0, 0, 0.12);
-webkit-filter: blur(0.1px);
filter: blur(0.1px);
}
.middle.active {
transform: scale(4.5);
transition: all 0.25s cubic-bezier(0.32, 2.04, 0.85, 0.54);
box-shadow: 0 0.1px 0.1px 0 rgba(0, 0, 0, 0.16),
0 0.1px 0.3px 0 rgba(0, 0, 0, 0.12);
}
.cross {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%) scale(0);
margin-top: -1px;
color: white;
transition: all 0.2s cubic-bezier(0.72, 1.2, 0.71, 0.72);
font-size: 22px;
user-select: none;
}
.cross.active {
transform: translate(-50%, -50%) scale(1);
transition: all 0.15s cubic-bezier(0.32, 2.04, 0.85, 0.54);
color: black;
}
h1 {
font-size: 26px;
background: white;
color: white;
padding: 40px 0 40px 20%;
margin-bottom: 50px;
}
a,
li {
color: darken(grey, 20%);
text-decoration: none;
}
.dropdown {
position: absolute;
right: 0;
top: 3em;
transition: all 0.25s ease-out;
transform: scale(0);
transform-origin: 100% 0;
/* box-shadow: $shadow; */
}
.dropdown ul:hover {
transform: scale(1);
}
.dropdown li {
display: block;
width: 100%;
}
.dropdown li:hover {
background-color: #ddd;
}
.dropdown a {
width: 100%;
padding: 1em 18px;
display: inline-block;
white-space: pre;
box-sizing: border-box;
color: black;
}
.dropdown a:hover {
background: darken(grey, 30%);
text-decoration: none;
}
.dropdown.active {
transform: scale(1);
transition: all 0.25s cubic-bezier(0.5, 1.8, 0.9, 0.8);
box-shadow: 2px 4px 0 rgba(0, 0, 0, 0.16), 0 2px 8px 0 rgba(0, 0, 0, 0.12);
background-color: white;
padding: 0px;
}
...@@ -3,20 +3,23 @@ ...@@ -3,20 +3,23 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<link rel="stylesheet" href="{% static 'css/style.css' %}" /> <!-- <link
<link
rel="stylesheet" rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css"
integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65"
crossorigin="anonymous" crossorigin="anonymous"
/> /> -->
<link rel="stylesheet" href="{% static 'css/base.css' %}" /> <link rel="stylesheet" href="{% static 'css/base.css' %}">
<link rel="stylesheet" href="{% static 'css/style.css' %}" />
<!-- <link rel="stylesheet" href="{% static 'css/loginpage.css' %}"> -->
<link rel = "icon" href = "{% static 'images/logo-circle.png' %}" type = "image/x-icon" >
<title>{% block title %}{% endblock %}</title> <title>{% block title %}{% endblock %}</title>
</head> </head>
<body> <div class="page-container">
<!-- <div class="content-wrap"> -->
<div class="base-header"> <div class="base-header">
<div class="base-header-align"> <div class="base-header-align">
<div class="base-logo"> <div class="base-logo">
...@@ -36,10 +39,7 @@ ...@@ -36,10 +39,7 @@
<div class="user-identifier"> <div class="user-identifier">
<p> <p>
Signed in as: Signed in as:
<b <b>{{ request.session.username }}</b>
>Bo Caj
<!-- PUT INFO HERE --></b
>
</p> </p>
</div> </div>
</div> </div>
...@@ -47,17 +47,27 @@ ...@@ -47,17 +47,27 @@
<div class="sidebar"> <div class="sidebar">
<div class="sidebar-icon-placing sidebar-button"> <div class="sidebar-icon-placing sidebar-button">
<div> <div>
<div class="sidebar-hover"> <div class="sidebar-hover">
<a href="{% url 'home' %}"> <a href="{% url 'home' %}">
<div class="icon-align sidebar-button"> <div class="icon-align sidebar-button">
<i class="gg-list"></i> <i class="gg-list"></i>
</div> </div>
<p>Record List</p> <p>Employee List</p>
</a>
</div>
<div class="sidebar-hover">
<a href="{% url 'positionlist' %}">
<div class="icon-align sidebar-button">
<i><img src="{% static 'images/position_list.png' %}" style="width: 30px;"></i>
</div>
<p>Position List</p>
</a> </a>
</div> </div>
<div class="sidebar-hover"> <div class="sidebar-hover">
<a href=""> <a href="{% url 'create_emp_profile' %}">
<div class="icon-align sidebar-button"> <div class="icon-align sidebar-button">
<i class="gg-user-add"></i> <i class="gg-user-add"></i>
</div> </div>
...@@ -87,6 +97,7 @@ ...@@ -87,6 +97,7 @@
</div> </div>
<div class="main">{% block content %}{% endblock %}</div> <div class="main">{% block content %}{% endblock %}</div>
<!-- </div> -->
<script <script
src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.min.js" src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.min.js"
integrity="sha384-cuYeSxntonz0PPNlHhBs68uyIAVpIIOZZ5JqeqvYYIcEL727kskC66kF92t6Xl2V" integrity="sha384-cuYeSxntonz0PPNlHhBs68uyIAVpIIOZZ5JqeqvYYIcEL727kskC66kF92t6Xl2V"
...@@ -101,5 +112,6 @@ ...@@ -101,5 +112,6 @@
</script> </script>
</p> </p>
</footer> </footer>
</div>
</body> </body>
</html> </html>
...@@ -25,15 +25,14 @@ ...@@ -25,15 +25,14 @@
<div class=""> <div class="">
<div class="label-row"> <div class="label-row">
<div class="text-input-grouping"> <div class="text-input-grouping">
<label for="first-name" class="">First Name:</label> <label for="full-name" class="">Full Name:</label>
<div class=""> <div class="long-textbox">
<input type="text" class="" name="first-name" required /> <input
</div> type="text"
</div> style="width: 660px"
<div class="text-input-grouping"> name="full-name"
<label for="address" class="">Address:</label> required
<div class="input-row"> />
<input type="text" name="address" required />
</div> </div>
</div> </div>
<div class="text-input-grouping"> <div class="text-input-grouping">
...@@ -45,13 +44,6 @@ ...@@ -45,13 +44,6 @@
</div> </div>
<div class="label-row"> <div class="label-row">
<div class="text-input-grouping">
<label for="mid-name" class="">Middle Name:</label>
<div class="">
<input type="text" name="middle-name" required />
</div>
</div>
<div class="text-input-grouping"> <div class="text-input-grouping">
<label for="bday">Birthday:</label> <label for="bday">Birthday:</label>
<div class=""> <div class="">
...@@ -59,22 +51,6 @@ ...@@ -59,22 +51,6 @@
</div> </div>
</div> </div>
<div class="text-input-grouping">
<label for="emerg_num">Emergency Contact:</label>
<div class="tex">
<input type="tel" name="emerg-number" required />
</div>
</div>
</div>
<div class="label-row">
<div class="text-input-grouping">
<label for="last-name">Last Name:</label>
<div class="">
<input type="text" name="last-name" required />
</div>
</div>
<div class="text-input-grouping"> <div class="text-input-grouping">
<label for="email" class="">Email:</label> <label for="email" class="">Email:</label>
<div class=""> <div class="">
...@@ -83,21 +59,15 @@ ...@@ -83,21 +59,15 @@
</div> </div>
<div class="text-input-grouping"> <div class="text-input-grouping">
<label for="position" class="">Position:</label> <label for="emerg_num">Emergency Contact:</label>
<div class=""> <div class="tex">
<select name="position"> <input type="tel" name="emerg-number" required />
<option value="" disabled selected>
Select a position
</option>
<option value="packager">Packager</option>
<option value="handler">Handler</option>
<option value="cutter">Cutter</option>
</select>
</div> </div>
</div> </div>
</div> </div>
<div class="label-row"> <div class="label-row">
<!-- sex & id -->
<div class="text-input-grouping" id="sex"> <div class="text-input-grouping" id="sex">
<label for="sex" class="">Sex:</label> <label for="sex" class="">Sex:</label>
<div class="sex-input"> <div class="sex-input">
...@@ -127,6 +97,21 @@ ...@@ -127,6 +97,21 @@
</div> </div>
</div> </div>
<div class="text-input-grouping">
<label for="position" class="">Position:</label>
<div class="">
<select name="position_name">
<option value="" disabled selected>Select a position</option>
{% for position in positions %}
<option value="{{ position.position_name }}">{{ position.position_name }}</option>
{% endfor %}
</select>
</div>
</div>
</div>
</div>
<div class="label-row">
<div class="text-input-grouping"> <div class="text-input-grouping">
<div class="box"></div> <div class="box"></div>
</div> </div>
...@@ -138,20 +123,10 @@ ...@@ -138,20 +123,10 @@
<div class="col-md-8"></div> <div class="col-md-8"></div>
<div class="profile-options"> <div class="profile-options">
<div class="button-cancel"> <div class="button-cancel">
<button <button name="Save" type="submit">Cancel</button>
name="Save"
type="submit"
>
Cancel
</button>
</div> </div>
<div class="button-save"> <div class="button-save">
<button <button name="Save" type="submit">Save Changes</button>
name="Save"
type="submit"
>
Save Changes
</button>
</div> </div>
</div> </div>
</div> </div>
......
{% extends 'EmployeeProdDB/base.html' %} {% load static %} {% block content %}
<html lang="en">
<head>
<link rel="stylesheet" href="{% static 'css/style.css' %}" />
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css"
integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65"
crossorigin="anonymous"
/>
<link rel="stylesheet" href="{% static 'css/create_position.css' %}" />
</head>
<body>
<div class="top-cont">
<div class="header">
<h2 class="bold">Create Position</h2>
</div>
<main class="profile-info-cont">
<form method="POST" action="" class="profile-info-form input-dimension">
{% csrf_token %}
<div>
<div class="">
<div class="label-row">
<div class="text-input-grouping" id="name">
<label for="position-name" class="">Position Name:</label>
<div class="long-textbox">
<input type="text" name="position-name" required />
</div>
</div>
<div class="text-input-grouping" id="buttons">
<br />
<div class="profile-options">
<div class="button-save">
<button name="Save" type="submit">
<a href="{% url 'positionlist'%}" style="color: white"
>Save Changes</a
>
</button>
</div>
<div class="button-cancel">
<button name="Save" type="submit">
<a href="{% url 'positionlist'%}" style="color: black"
>Cancel</a
>
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
<div class="large-filler"></div>
</main>
</div>
<div class="">
<div class="invisible-box"></div>
</div>
<script
src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.min.js"
integrity="sha384-cuYeSxntonz0PPNlHhBs68uyIAVpIIOZZ5JqeqvYYIcEL727kskC66kF92t6Xl2V"
crossorigin="anonymous"
></script>
</body>
{% endblock %}
</html>
{% extends 'EmployeeProdDB/base.html' %} {% load static %} {% block content %}
<html lang="en">
<head>
<link rel="stylesheet" href="{% static 'css/style.css' %}" />
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css"
integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65"
crossorigin="anonymous"
/>
<link rel="stylesheet" href="{% static 'css/edit_emp_profile.css' %}" />
<!-- <link rel="stylesheet" href="{% static 'css/create_emp_profile.css' %}" /> -->
</head>
<body>
<div class="top-cont">
<div class="header">
<h2 class="bold">Edit Profile</h2>
</div>
<main class="profile-info-cont">
<form method="POST" action="" class="profile-info-form input-dimension">
{% csrf_token %}
<div>
<div class="row g-0">
<div class="">
<div class="label-row">
<div class="text-input-grouping">
<label for="full-name" class="">Full Name:</label>
<div class="long-textbox">
<input
type="text"
style="width: 660px"
name="full-name"
required
/>
</div>
</div>
<div class="text-input-grouping">
<label for="phonenum" class="">Phone Number:</label>
<div class="input-row">
<input type="tel" name="phone-number" required />
</div>
</div>
</div>
<div class="label-row">
<div class="text-input-grouping">
<label for="bday">Birthday:</label>
<div class="">
<input type="date" name="birthday" />
</div>
</div>
<div class="text-input-grouping">
<label for="email" class="">Email:</label>
<div class="">
<input type="email" name="email" required />
</div>
</div>
<div class="text-input-grouping">
<label for="emerg_num">Emergency Contact:</label>
<div class="tex">
<input type="tel" name="emerg-number" required />
</div>
</div>
</div>
<div class="label-row">
<!-- sex & id -->
<div class="text-input-grouping" id="sex">
<label for="sex" class="">Sex:</label>
<div class="sex-input">
<input
type="radio"
id="male"
name="gender"
value="male"
required
/>
<label for="male">Male</label>
<input
type="radio"
id="female"
name="gender"
value="female"
required
/>
<label for="female">Female</label>
</div>
</div>
<div class="text-input-grouping">
<label for="id-num" class="">ID Number:</label>
<div class="">
<input type="text" name="id-num" required />
</div>
</div>
<div class="text-input-grouping">
<label for="position" class="">Position:</label>
<div class="">
<select name="position">
<option value="" disabled selected>
Select a position
</option>
<option value="packager">Packager</option>
<option value="handler">Handler</option>
<option value="cutter">Cutter</option>
</select>
</div>
</div>
</div>
<div class="label-row">
<div class="text-input-grouping">
<div class="box"></div>
</div>
</div>
</div>
</div>
<div class="bottom-cont">
<div class="col-md-8"></div>
<div class="profile-options">
<div class="button-cancel">
<button name="Save" type="submit">Cancel</button>
</div>
<div class="button-delete">
<button name="Delete" type="submit">
Delete Profile
</button>
</div>
<div class="button-save">
<button name="Save" type="submit">Save Changes</button>
</div>
</div>
</div>
<div class="row g-0" style="margin-top: 5px">
<div class="col-md-10"></div>
<div class="col-md-2"></div>
</div>
</div>
</form>
</main>
</div>
<script
src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.min.js"
integrity="sha384-cuYeSxntonz0PPNlHhBs68uyIAVpIIOZZ5JqeqvYYIcEL727kskC66kF92t6Xl2V"
crossorigin="anonymous"
></script>
</body>
{% endblock %}
</html>
{% extends 'EmployeeProdDB/base.html' %} {% load static %} {% block content %}
<html lang="en">
<head>
<link rel="stylesheet" href="{% static 'css/style.css' %}" />
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css"
integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65"
crossorigin="anonymous"
/>
<link rel="stylesheet" href="{% static 'css/create_position.css' %}" />
</head>
<body>
<div class="top-cont">
<div class="header">
<h2 class="bold">Edit Position</h2>
</div>
<main class="profile-info-cont">
<form
id="buttonform"
method="POST"
action=""
class="profile-info-form input-dimension"
>
{% csrf_token %}
<div>
<div class="">
<div class="label-row">
<div class="text-input-grouping" id="name">
<label for="position-name" class="">New Position Name:</label>
<div class="long-textbox">
<input type="text" name="position_name" required />
</div>
</div>
<div class="text-input-grouping" id="buttons">
<br />
<div class="profile-options">
<div class="button-save">
<button name="Save" type="submit">Save Changes</button>
</div>
<div class="button-cancel">
<button name="Cancel" type="submit">
<a href="{% url 'positionlist'%}" style="color: black"
>Cancel</a
>
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
<div class="large-filler"></div>
</main>
</div>
<div class="">
<div class="invisible-box"></div>
</div>
<script
src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.min.js"
integrity="sha384-cuYeSxntonz0PPNlHhBs68uyIAVpIIOZZ5JqeqvYYIcEL727kskC66kF92t6Xl2V"
crossorigin="anonymous"
></script>
</body>
{% endblock %}
</html>
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
/> />
<link rel="stylesheet" href="{% static 'css/emp_record.css' %}" /> <link rel="stylesheet" href="{% static 'css/emp_record.css' %}" />
<title>Employee Record</title> <title>Employee Record</title>
</head> </head>
<body> <body>
<div class="employee-info-cont"> <div class="employee-info-cont">
...@@ -90,11 +91,6 @@ ...@@ -90,11 +91,6 @@
</button> </button>
</div> </div>
</div> </div>
<div class="print-out">
<button type="submit" class="">
Print Out
</button>
</div>
</div> </div>
<div class="seperator"> <div class="seperator">
......
...@@ -9,53 +9,54 @@ ...@@ -9,53 +9,54 @@
integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65"
crossorigin="anonymous" crossorigin="anonymous"
/> />
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.2/css/all.min.css" rel="stylesheet"/> <link
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.2/css/all.min.css"
rel="stylesheet"
/>
<link rel="stylesheet" href="{% static 'css/home.css' %}" /> <link rel="stylesheet" href="{% static 'css/home.css' %}" />
<title>Home Page</title> <title>Home Page</title>
</head> </head>
<body> <body>
<div class="search-and-add-cont"> <div class="search-and-add-cont">
<div class="searchbar"> <div class="searchbar">
<input placeholder='&#xf002 Search Name' /> <form method="GET" action="{% url 'search_employees' %}">
<input type="text" name="search_query" placeholder="Search Name" />
</form>
</div> </div>
<button type="submit"><i class="fa fa-search"></i></button>
<div class="add-button"> <div class="add-button">
<button type="submit" class="add-profile-button"> <button type="submit" class="add-profile-button">
Add Profile <a href="{% url 'create_emp_profile' %}" style="color: white">
Add Employee
</a>
</button> </button>
</div> </div>
</div> </div>
<!-- TABLE --> <!-- TABLE -->
<div class="employee-table-cont"> <div class="employee-table-cont">
<table id="employee"> <table id="employee">
<tr> <tr>
<th>Summary Report No.</th> <th>ID</th>
<th>Employee Name</th> <th>Employee Name</th>
<th>Date</th> <th>Last Record Update</th>
<th>Productivity Score</th> <th>Position</th>
<th>Total Work Hours</th>
</tr> </tr>
{% for row in csv_data %} {% for employee in employees %}
<tr> <tr>
<td>{{ row.sr_no}}</td> <td>{{ employee.employee_id }}</td>
<td>{{ row.employee_name}}</td> <td>{{ employee.employee_name }}</td>
<td>{{ row.prod_date}}</td> <td></td>
<td>{{ row.prod_score }}</td> <td>{{ employee.position_id}}</td>
<td>{{ row.totalworkhrs }}</td>
<!-- add more cells for additional fields -->
</tr> </tr>
{% endfor %} {% endfor %}
</table> </table>
</div> </div>
<script <script
src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.min.js" src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.min.js"
integrity="sha384-cuYeSxntonz0PPNlHhBs68uyIAVpIIOZZ5JqeqvYYIcEL727kskC66kF92t6Xl2V" integrity="sha384-cuYeSxntonz0PPNlHhBs68uyIAVpIIOZZ5JqeqvYYIcEL727kskC66kF92t6Xl2V"
crossorigin="anonymous" crossorigin="anonymous"
></script> ></script>
</body> </body>
{% endblock %} {% endblock %}
<!DOCTYPE html> <!DOCTYPE html>
{% load static %} {% load static %}
<html lang="en"> <html lang="en">
<head> <head>
<title>Login</title> <title>Login</title>
<link rel="stylesheet" href="{% static 'css/style.css' %}"/> <link rel="stylesheet" href="{% static 'css/style.css' %}" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous"> <link
<link rel="stylesheet" href="{% static 'css/loginpage.css' %}"> rel="stylesheet"
</head> href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css"
<body> integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65"
crossorigin="anonymous"
/>
<link rel="stylesheet" href="{% static 'css/loginpage.css' %}" />
<link
rel="icon"
href="{% static 'images/logo-circle.png' %}"
type="image/x-icon"
/>
</head>
<body>
<div class="loginheader centercont"> <div class="loginheader centercont">
<div class="headertextcontainer"> <div class="headertextcontainer">
<span>Thousand Oaks Packaging Corporation</span> <span>Thousand Oaks Packaging Corporation</span>
...@@ -20,33 +29,60 @@ ...@@ -20,33 +29,60 @@
<div class="centercont column-direction"> <div class="centercont column-direction">
<div class="login-logo"> <div class="login-logo">
<a href="#"><img src="{% static 'images/topc_logo.jpg' %}" class="img logo rounded-circle"></a> <a href="#"
><img
src="{% static 'images/topc_logo.jpg' %}"
class="img logo rounded-circle"
/></a>
</div> </div>
<b>Log In</b> <b>Log In</b>
<div class="login-box centercont"> <div class="login-box centercont">
<form method="POST" action="{% url 'loginpage' %}">
<form method="POST" action="{% url 'loginpage' %}">{% csrf_token %} {% csrf_token %}
<div class="login-input-align"> <div class="login-input-align">
<div class="form-group has-feedback"> <div class="form-group has-feedback">
<input type="text" name="username" id="username" placeholder="Enter Username"> <input
type="text"
name="username"
id="username"
placeholder="Enter Username"
/>
</div> </div>
<div class="form-group has-feedback"> <div class="form-group has-feedback">
<input type="password" name="password" id="password" placeholder="Enter Password"> <input
type="password"
name="password"
id="password"
placeholder="Enter Password"
/>
</div> </div>
</div> </div>
<!-- <input type="submit"> --> <!-- <input type="submit"> -->
<div class="centercont column-direction"> <div class="centercont column-direction">
<button type="submit" class="login-button login-borders button-login">Continue</button> <button
<button type="submit" class="login-button login-borders button-cancel">Cancel</button> type="submit"
class="login-button login-borders button-login"
>
<a href="{% url 'home' %}" style="color: black">Continue</a>
</button>
<button
type="submit"
class="login-button login-borders button-cancel"
>
<a href="{% url 'signin' %}" style="color: black">Cancel</a>
</button>
</div> </div>
</form> </form>
</div> </div>
</div> </div>
{% endblock content %} {% endblock content %}
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.min.js" integrity="sha384-cuYeSxntonz0PPNlHhBs68uyIAVpIIOZZ5JqeqvYYIcEL727kskC66kF92t6Xl2V" crossorigin="anonymous"></script> <script
</body> src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.min.js"
integrity="sha384-cuYeSxntonz0PPNlHhBs68uyIAVpIIOZZ5JqeqvYYIcEL727kskC66kF92t6Xl2V"
crossorigin="anonymous"
></script>
</body>
</html> </html>
{% extends 'EmployeeProdDB/base.html' %} {% load static %} {% block content %}
<head>
<title>Login</title>
<link rel="stylesheet" href="{% static 'css/style.css' %}" />
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css"
integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65"
crossorigin="anonymous"
/>
<link
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.2/css/all.min.css"
rel="stylesheet"
/>
<link rel="stylesheet" href="{% static 'css/positionlist.css' %}" />
<title>Home Page</title>
</head>
<body>
<div class="search-and-add-cont">
<div class="searchbar">
<form method="GET">
<input
type="text"
name="q"
placeholder="Search Position"
value="{{ request.GET.q }}"
/>
</form>
</div>
<button type="submit"><i class="fa fa-search"></i></button>
<div class="add-button">
<button type="submit" class="add-profile-button">
<a href="{% url 'create_position' %}" style="color: white">
Add Position
</a>
</button>
</div>
</div>
<!-- TABLE -->
<div class="employee-table-cont">
<table id="employee">
<tr>
<th>ID</th>
<th>Position</th>
<th></th>
</tr>
{% for position in positions %}
<tr>
<td>{{ position.position_id }}</td>
<td>{{ position.position_name }}</td>
<td>
<div class="button-cont">
<div class="button-save">
<button>
<a
href="{% url 'edit_position' position_id=position.position_id %}"
style="color: white"
>Edit</a
>
</button>
</div>
<div class="button-delete">
<form method="post" class="delete-form">
{% csrf_token %}
<input
type="hidden"
name="position_id"
value="{{ position.position_id }}"
/>
<button type="button" onclick="confirmDelete(this)">
Delete
</button>
</form>
</div>
</div>
</td>
</tr>
{% endfor %}
</table>
</div>
<script>
function confirmDelete(button) {
if (confirm("Are you sure you want to delete this position?")) {
button.form.submit();
}
}
</script>
<script
src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.min.js"
integrity="sha384-cuYeSxntonz0PPNlHhBs68uyIAVpIIOZZ5JqeqvYYIcEL727kskC66kF92t6Xl2V"
crossorigin="anonymous"
></script>
</body>
{% endblock %}
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
<link rel="stylesheet" href="{% static 'css/style.css' %}"/> <link rel="stylesheet" href="{% static 'css/style.css' %}"/>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
<link rel="stylesheet" href="{% static 'css/signin.css' %}"> <link rel="stylesheet" href="{% static 'css/signin.css' %}">
<link rel = "icon" href = "{% static 'images/logo-circle.png' %}" type = "image/x-icon" >
</head> </head>
<body> <body>
......
<!DOCTYPE html>
{% load static %} {% load static %}
<html lang="en">
<!doctype html>
<head> <head>
<title> Sign up </title> <title>Login</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700,800,900"> <link rel="stylesheet" href="{% static 'css/style.css' %}"/>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
<link rel="stylesheet" href="{% static 'css/style_signup.css' %}"> <link rel="stylesheet" href="{% static 'css/signup.css' %}">
<link rel="stylesheet" href="{% static 'css/bootstrap-4.1.3-dist/css/bootstrap.css' %}"> <link rel = "icon" href = "{% static 'images/logo-circle.png' %}" type = "image/x-icon" >
<link rel="icon" href="{% static 'images/halalan_2022_logo.png' %}" sizes="9x16">
</head> </head>
<body> <body>
<section class="h-100 gradient-form" style="background-color: #eee;">
<div class="container py-5 h-100">
<div class="row d-flex justify-content-center align-items-center h-100">
<div class="col-xl-10">
<div class="card rounded-3 text-black">
<div class="row g-0">
<div class="col-lg-6">
<div class="card-body p-md-5 mx-md-4">
<div class="text-center"> <div class="loginheader centercont">
<img src="{% static 'images/halalan_2022_logo.png' %}" style="width: 150px;" alt="logo"> <div class="headertextcontainer">
<span>Thousand Oaks Packaging Corporation</span>
<h2>Employee Performance</h2>
</div> </div>
{% include 'EmployeeProdDB/messages.html' %}
<div class="row">
{% block content %}
{% endblock %}
</div> </div>
<form method="POST" action="{% url 'signup' %}">{% csrf_token %} <!-- {% block content %} -->
<h5 class="mb-4" style="font-family:'Poppins';">Sign up</h5>
<label class="form-label" for="username" style="font-family:'Poppins';">Username: </label> <div class="centercont column-direction">
<input class ="form-control" type="text" name="username" id="username" placeholder="Enter username@email.com" Required> <div class="login-logo">
<br> <a href="#"><img src="{% static 'images/topc_logo.jpg' %}" class="img logo rounded-circle"></a>
<label class="form-label" for="password" style="font-family:'Poppins';">Password: </label>
<input class ="form-control" type="password" name="password" id="password" minlength="8" placeholder="Enter Password (min. 8 characters)" Required>
<br>
<label class="form-label" for="confirm_password" style="font-family:'Poppins';">Confirm Password: </label>
<input class ="form-control" type="password" name="confirm_password" id="confirm_password" minlength="8" placeholder="Confirm Password" Required>
<br>
<label class="form-label" for="first_name" style="font-family:'Poppins';">First name: </label>
<input class ="form-control" type="text" name="first_name" id="first_name" placeholder="Enter Firstname" Required>
<br>
<label class="form-label" for="last_name" style="font-family:'Poppins';">Last name: </label>
<input class ="form-control" type="text" name="last_name" id="last_name" placeholder="Enter Lastname" Required>
<br>
<label class="form-label" for="birthday" style="font-family:'Poppins';">Birthday: </label>
<input class ="form-control" type="text" name="birthday" id="birthday" placeholder= "format (yyyy-mm-dd)" Required>
<br>
<label class="form-label" for="sex" style="font-family:'Poppins';">Sex: </label>
<input class ="form-control" type="text" name="sex" id="sex" placeholder="Enter sex" Required>
<br>
<div class="text-center">
<button id=signupbtn class="btn btn-success btn-block fa-lg gradient-custom-2 mb-3" type="submit" style="font-family:'Poppins';">Submit</button>
</div> </div>
</form> <b>Sign Up</b>
<div class="text-center"> <div class="login-box centercont">
<a href="{% url 'loginpage' %}"><button class="btn btn-primary btn-block fa-lg gradient-custom-2 mb-3" style="font-family:'Poppins';">Go back to Login</button></a>
</div>
<form method="POST" action="{% url 'signup' %}">{% csrf_token %}
<div class="login-input-align">
<div class="form-group has-feedback horizontal-align">
<input type="text" name="name" id="name" placeholder="Enter Full Name">
<input type="text" name="username" id="username" placeholder="Enter Username">
</div> </div>
<div class="form-group has-feedback horizontal-align">
<input type="password" name="password" id="password" placeholder="Enter Password">
<input type="password" name="confirm_password" id="confirm_password" placeholder="Re-enter Password">
</div> </div>
<div class="col-lg-6 d-flex align-items-center gradient-custom-2">
<div class="text-white px-3 py-4 p-md-5 mx-md-4"><img src="{% static 'images/topc_logo.png' %}" style="width: 300px;"> <!-- <input type="submit"> -->
</div> <div class="centercont column-direction">
</div> <button type="submit" class="login-button login-borders button-login">Continue</button>
</div> <button type="submit" class="login-button login-borders button-cancel"><a href="{% url 'signin' %}" style="color: black">Cancel</a></button>
</div>
</div> </div>
</form>
</div> </div>
</div> </div>
</section> {% endblock content %}
<script src="{% static 'css/bootstrap-4.1.3-dist/js/bootstrap.min.js' %}"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.min.js" integrity="sha384-cuYeSxntonz0PPNlHhBs68uyIAVpIIOZZ5JqeqvYYIcEL727kskC66kF92t6Xl2V" crossorigin="anonymous"></script>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -14,75 +14,36 @@ ...@@ -14,75 +14,36 @@
<link rel="stylesheet" href="{% static 'css/upload_csv.css' %}" /> <link rel="stylesheet" href="{% static 'css/upload_csv.css' %}" />
<title>Home Page</title> <title>Home Page</title>
</head> </head>
<body>
<div class="top-cont">
<h1 clas="choose-file">Choose file</h1>
<div class="secondline">
<!-- <button type="file" name="csv_file" accept=".csv">Choose File</button> -->
<form method="post" enctype="multipart/form-data" action="{% url 'upload_csv' %}"> <form method="post" enctype="multipart/form-data" action="{% url 'upload_csv' %}">
{% csrf_token %} {% csrf_token %}
<label for="file">Choose a file to upload:</label> <!-- <label for="file">Upload File</label> -->
<input type="file" name="file" id="file"> <div class="top-cont">
<input type="submit" value="Upload"> <h1 class="choose-file">Choose file</h1>
</form> <div class="secondline">
<!-- <label for="csv_file">Upload a CSV file:</label> --> <textarea readonly></textarea>
<!-- <input type="file" class="cf-button" name="csv_file" accept=".csv"> --> <input type="file" name="file" id="file" class=""/>
<!-- <input type="submit" value="Upload"> --> <!-- <label for="file"></label> -->
<!-- <label for="file" class="custom-file-upload">
Custom Upload
</label>
<input id="file" type="file"/> -->
</div> </div>
</div> </div>
<div class="upload-table-cont top-cont"> <div class="upload-table-cont top-cont">
<table id="input-file">
<!-- CHANGE TO FOR LOOP -->
<tr>
<td class="file-name">askjdfhasdf.csv</td>
<td><button type="submit" class="remove-button">Remove</button></td>
</tr>
<tr>
<td class="file-name">askjdfhasdf.csv</td>
<td><button type="submit" class="remove-button">Remove</button></td>
</tr>
<tr>
<td class="file-name" >askjdfhasdf.csv</td>
<td><button type="submit" class="remove-button">Remove</button></td>
</tr> <tr>
<td class="file-name" >askjdfhasdf.csv</td>
<td><button type="submit" class="remove-button">Remove</button></td>
</tr> <tr>
<td class="file-name" >askjdfhasdf.csv</td>
<td><button type="submit" class="remove-button">Remove</button></td>
</tr> <tr>
<td class="file-name" >askjdfhasdf.csv</td>
<td><button type="submit" class="remove-button">Remove</button></td>
</tr> <tr>
<td class="file-name" >askjdfhasdf.csv</td>
<td><button type="submit" class="remove-button">Remove</button></td>
</tr> <tr>
<td class="file-name" >askjdfhasdf.csv</td>
<td><button type="submit" class="remove-button">Remove</button></td>
</tr> <tr>
<td class="file-name" >askjdfhasdf.csv</td>
<td><button type="submit" class="remove-button">Remove</button></td>
</tr> <tr>
<td class="file-name" >askjdfhasdf.csv</td>
<td><button type="submit" class="remove-button">Remove</button></td>
</tr> <tr>
<td class="file-name" >askjdfhasdf.csv</td>
<td><button type="submit" class="remove-button">Remove</button></td>
</tr> <tr>
<td class="file-name" >askjdfhasdf.csv</td>
<td><button type="submit" class="remove-button">Remove</button></td>
</tr> <tr>
<td class="file-name" >askjdfhasdf.csv</td>
<td><button type="submit" class="remove-button">Remove</button></td>
</tr>
</table>
</div> </div>
<div class="button-cont top-cont"> <div class="button-cont top-cont">
<button type="submit" class="cancel-button">Cancel</button> <button type="submit" class="cancel-button">Cancel</button>
<button type="submit" class="confirm-button" value="Upload">Confirm</button> <input type="submit" value="Confirm" class="confirm-button">
</form>
</div> </div>
</form>
</body> </body>
{% endblock %} {% endblock %}
\ No newline at end of file
{% extends 'EmployeeProdDB/base.html' %} {% load static %} {% block content %}
<head>
<link rel="stylesheet" href="{% static 'css/style.css' %}" />
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css"
integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65"
crossorigin="anonymous"
/>
<link
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.2/css/all.min.css"
rel="stylesheet"
/>
<link rel="stylesheet" href="{% static 'css/view_all_productivity.css' %}" />
<title>Employee Record</title>
</head>
<body>
<div class="employee-info-cont">
<div class="employee-nameID">
<h4 class="bold">March Leighton Chua</h4>
<div>
<span id="ID">ID# 1</span>
<span>Dataset: 44 Reports</span>
</div>
</div>
<div class="employee-info-contact">
<div class="SBP">
<h6>
Sex:
<span class="bold"> Male<!-- IMPORT INFO HERE --> </span>
</h6>
<h6>
Birthday:
<span class="bold"> 4/3/2023<!-- IMPORT INFO HERE --> </span>
</h6>
<h6>
Position: <span class="bold"> Leader<!-- IMPORT INFO HERE --> </span>
</h6>
</div>
<div class="SBP">
<h6>
Phone Number:
<span class="bold"> 098765143223<!-- IMPORT INFO HERE --> </span>
</h6>
<h6>
Email:
<span class="bold">
march.chua@obf.ateneo.edu<!-- IMPORT INFO HERE -->
</span>
</h6>
<h6>
Emergency Contact:
<span class="bold"> 0912344567<!-- IMPORT INFO HERE --> </span>
</h6>
</div>
<div class="SBP">
<div class="kebab">
<figure></figure>
<figure class="middle"></figure>
<p class="cross">x</p>
<figure></figure>
<ul class="dropdown">
<li><a href="#">View all Productivity Reports</a></li>
<li><a href="#">Edit User Profile</a></li>
</ul>
</div>
</div>
</div>
</div>
<div class="search-and-add-cont">
<div class="searchbar">
<input placeholder="Search Name" />
</div>
<div class="add-button">
<button type="submit" class="add-profile-button">Import File</button>
</div>
</div>
<div class="seperator">
<div class="hori-line"></div>
</div>
<div class="productivity-table-cont">
<h2>variable.name</h2>
<table class="productivity-table">
<tr>
<th>Report Number</th>
<th>Date</th>
<th>Duration</th>
<th>Process</th>
<th>Status</th>
<th>Productivity Score</th>
</tr>
<tr>
<td>1</td>
<td>Juan Dela Cruz</td>
<td>Jan 12, 2022</td>
<td>Packager</td>
<td>Juan Dela Paz</td>
<td>69.9%</td>
</tr>
<tr>
<td>1</td>
<td>Juan Dela Cruz</td>
<td>Jan 12, 2022</td>
<td>Packager</td>
<td>Juan Dela Paz</td>
<td>69.9%</td>
</tr>
<tr>
<td>1</td>
<td>Juan Dela Cruz</td>
<td>Jan 12, 2022</td>
<td>Packager</td>
<td>Juan Dela Paz</td>
<td>69.9%</td>
</tr>
<tr>
<td>1</td>
<td>Juan Dela Cruz</td>
<td>Jan 12, 2022</td>
<td>Packager</td>
<td>Juan Dela Paz</td>
<td>69.9%</td>
</tr>
</table>
</div>
<!-- EXTEND CHART JS AND REMARKS PAGE HEREHERE HERE HERE HERE -->
<!-- DUNNO HOW TO EXTEND ANOTHER HTML HERE -->
<script>
const kebab = document.querySelector('.kebab');
const middle = document.querySelector('.middle');
const cross = document.querySelector('.cross');
const dropdown = document.querySelector('.dropdown');
kebab.addEventListener('click', () => {
middle.classList.toggle('active');
cross.classList.toggle('active');
dropdown.classList.toggle('active');
})
</script>
</body>
{% endblock %}
...@@ -4,16 +4,20 @@ from . import views ...@@ -4,16 +4,20 @@ from . import views
urlpatterns = [ urlpatterns = [
path('admin/', admin.site.urls), path('admin/', admin.site.urls),
path('', views.signin, name='signin'),
path('login/', views.loginpage, name='loginpage'), path('login/', views.loginpage, name='loginpage'),
path('home/', views.home, name='home'), path('home/', views.home, name='home'),
path('upload_csv/', views.upload_csv, name = 'upload_csv'), path('upload_csv/', views.upload_csv, name = 'upload_csv'),
path('show_csv_data/', views.show_csv_data, name ='show_csv_data'), path('show_csv_data/', views.show_csv_data, name ='show_csv_data'),
path('signup/', views.signup, name='signup'), path('signup/', views.signup, name='signup'),
path('show_csv_data2/', views.show_csv_data2, name='show_csv_data2'),
path('chart_template/', views.chart_template, name='chart_template'),
# path('', views.login_page, name='loginpage'),
path('', views.signin, name='signin'),
path('emp_record/', views.emp_record, name='emp_record'), path('emp_record/', views.emp_record, name='emp_record'),
path('create_profile/' ,views.create_emp_profile, name='create_emp_profile') path('create_profile/' ,views.create_emp_profile, name='create_emp_profile'),
path('edit_profile/', views.edit_emp_profile, name='edit_emp_profile'),
path('positionlist/', views.positionlist, name='positionlist'),
path('create_position/', views.create_position, name='create_position'),
path('edit_position/<int:position_id>/', views.edit_position, name='edit_position'),
path('view_all_productivity/', views.view_all_productivity, name='view_all_productivity'),
path('search/', views.search_employees, name='search_employees'),
] ]
\ No newline at end of file
...@@ -2,7 +2,7 @@ from django.shortcuts import render, redirect ...@@ -2,7 +2,7 @@ from django.shortcuts import render, redirect
import io import io
import csv import csv
from datetime import datetime, timedelta from datetime import datetime, timedelta
from .models import Productivity, IPSUser, SummaryReport, Employee from .models import Productivity, IPSUser, SummaryReport, Employee, Position
from django.contrib import messages from django.contrib import messages
from django.utils.dateparse import parse_date, parse_duration from django.utils.dateparse import parse_date, parse_duration
# from dateutil.parser import parse as parse_date # from dateutil.parser import parse as parse_date
...@@ -15,35 +15,44 @@ from django.http import JsonResponse ...@@ -15,35 +15,44 @@ from django.http import JsonResponse
from django.utils import timezone from django.utils import timezone
def home(request): def home(request):
csv_data = SummaryReport.objects.all() employees = Employee.objects.all()
return render(request, 'EmployeeProdDB/home.html', {'csv_data': csv_data}) return render(request, 'EmployeeProdDB/home.html', {'employees': employees})
def search_employees(request):
employees = Employee.objects.all()
search_query = request.GET.get('search_query')
employees = Employee.objects.filter(employee_name__icontains=search_query)
return render(request, 'EmployeeProdDB/home.html', {'employees': employees})
def position_list(request):
positions = Position.objects.all()
query = request.GET.get('q')
if query:
positions = positions.filter(position_name__icontains=query)
context = {'positions': positions}
return render(request, 'position_list.html', context)
def my_view(request):
user = IPSUser.objects.getUsername()
return render(request, 'EmployeeProdDB/base.html', {'user': user})
# def show_csv_data2(request): def my_view(request):
# csv_data = SummaryReport.objects.all() context = {'request': request}
# return render(request, 'EmployeeProdDB/show_csv_data2.html', {'csv_data': csv_data}) return render(request, 'base.html', context)
def signin(request):
return render(request, 'EmployeeProdDB/signin.html')
def signup(request): def signup(request):
if request.method == 'POST': if request.method == 'POST':
name = request.POST.get('name')
uname = request.POST.get('username') uname = request.POST.get('username')
pword = request.POST.get('password') pword = request.POST.get('password')
confirm_pword = request.POST.get('confirm_password') confirm_pword = request.POST.get('confirm_password')
fname = request.POST.get('first_name')
lname = request.POST.get('last_name')
bday = request.POST.get('birthday')
sex = request.POST.get('sex')
if pword==confirm_pword: if pword==confirm_pword:
if IPSUser.objects.filter(username=uname).exists(): if IPSUser.objects.filter(username=uname).exists():
messages.error(request, 'Username already taken.') messages.error(request, 'Username already taken.')
return redirect('signup') return redirect('signup')
else: else:
user = IPSUser.objects.create(username = uname, password = pword, first_name = fname, last_name = lname, birthday = bday, sex = sex) user = IPSUser.objects.create(username = uname, password = pword, name=name)
user.save() user.save()
messages.success(request, 'User account created.') messages.success(request, 'User account created.')
return redirect('loginpage') return redirect('loginpage')
...@@ -59,6 +68,7 @@ def loginpage(request): ...@@ -59,6 +68,7 @@ def loginpage(request):
if(request.method == "POST"): if(request.method == "POST"):
uname = request.POST.get('username') uname = request.POST.get('username')
pword = request.POST.get('password') pword = request.POST.get('password')
request.session['username'] = uname
accountList = IPSUser.objects.filter(username = uname) accountList = IPSUser.objects.filter(username = uname)
...@@ -124,7 +134,6 @@ def upload_csv(request): ...@@ -124,7 +134,6 @@ def upload_csv(request):
remarks = row[14] remarks = row[14]
# process # process
prodrecords.append([status,process,duration,remarks]) prodrecords.append([status,process,duration,remarks])
messages.error(request, prodrecords)
jobno = None jobno = None
status = None status = None
process = None process = None
...@@ -146,39 +155,53 @@ def upload_csv(request): ...@@ -146,39 +155,53 @@ def upload_csv(request):
getEmp = Employee.objects.get(employee_name=employee_name) getEmp = Employee.objects.get(employee_name=employee_name)
summary_pr = SummaryReport.objects.create(employee_name=getEmp, prod_score=prod_score, totalworkhrs=totalworkhrstd, prod_date=date_obj,totalduration=totaldurationtd) summary_pr = SummaryReport.objects.create(employee_id= getEmp, prod_score=prod_score, totalworkhrs=totalworkhrstd, prod_date=date_obj,totalduration=totaldurationtd)
summary_pr.save() summary_pr.save()
getSr =SummaryReport.objects.get(sr_no=summary_pr.sr_no) getSr =SummaryReport.objects.get(sr_no=summary_pr.sr_no)
productivities = []
for j in prodrecords: for j in prodrecords:
saveprod = Productivity( saveprod = Productivity.objects.create(sr_no=getSr, employee_id = getEmp, status=j[0], process=j[1], duration=j[2], remarks=j[3])
sr_no=getSr, saveprod.save()
employee_id=getEmp,
status=j[0],
process=j[1],
totalduration=j[2],
remarks=j[3]
)
productivities.append(saveprod)
saveprodbulk = Productivity.objects.bulk_create(productivities)
# messages.error(request, employee_name + ' ' + date + ' ' + totalworkhrs + ' ' + prod_score) # messages.error(request, employee_name + ' ' + date + ' ' + totalworkhrs + ' ' + prod_score)
# # Check if this row contains a date and "Total Duration:" and "Productivity %"
# if len(row) > 2 and "/" in row[0] and "Total Duration:" in row and "Productivity %" in row:
# date = datetime.strptime(row[0], '%m/%d/%Y').date()
# totalworkhrs = timedelta(hours=float(row[row.index("Total Duration:") + 2]))
# prod_score = int(row[row.index("Productivity %") + 2])
# summary_pr = SummaryReport.objects.create(sr_no=sr_no, employee_name=employee_name, prod_score=prod_score, date=date, totalworkhrs=totalworkhrs)
# summary_pr.save()
# messages.error(request, row)
return redirect('home') return redirect('home')
return render(request, 'EmployeeProdDB/upload_csv.html') return render(request, 'EmployeeProdDB/upload_csv.html')
def create_emp_profile(request):
positions = Position.objects.all()
if request.method == 'POST':
employee_name = request.POST.get('full-name')
employee_sex = request.POST.get('gender')
employee_bday = request.POST.get('birthday')
employee_email = request.POST.get('email')
employee_num = request.POST.get('phone-number')
employee_emergnum = request.POST.get('emerg-number')
position_name = request.POST.get('position_name')
position = Position.objects.get(position_name=position_name)
employee = Employee(
employee_name=employee_name,
employee_sex=employee_sex,
employee_bday=employee_bday,
employee_email=employee_email,
employee_num=employee_num,
employee_emergnum=employee_emergnum,
position_id=position
)
employee.save()
# Redirect to a success page or do something else
return redirect('create_emp_profile')
return render(request, 'EmployeeProdDB/create_emp_profile.html',{'positions': positions})
def edit_emp_profile(request):
return render(request, 'EmployeeProdDB/edit_emp_profile.html')
def chart_template(request): def chart_template(request):
data = SummaryReport.objects.all() data = SummaryReport.objects.all()
# Get the start and end dates from the request GET parameters # Get the start and end dates from the request GET parameters
...@@ -217,147 +240,38 @@ def chart_template(request): ...@@ -217,147 +240,38 @@ def chart_template(request):
} }
return render(request, 'EmployeeProdDB/chart_template.html', context) return render(request, 'EmployeeProdDB/chart_template.html', context)
# def chart_template(request):
# data = SummaryReport.objects.values('employee_name').annotate(total_prod_score=Sum('prod_score')).order_by('-total_prod_score')[:10]
# labels = list(map(lambda x: x['employee_name'], data))
# data = list(map(lambda x: x['total_prod_score'], data))
# return render(request, 'EmployeeProdDB/chart_template.html', {
# 'labels': labels,
# 'data': data,
# })
# def upload_csv(request):
# if request.method == 'POST':
# csv_file = request.FILES['csv_file']
# if not csv_file.name.endswith('.csv'):
# messages.error(request, 'This is not a CSV file')
# else:
# # read the data from the uploaded file
# csv_data = csv.reader(
# (line.decode('utf-8') for line in csv_file),
# delimiter=',',
# quotechar='"'
# )
# encountered_empty_row = False
# # Loop through data rows
# for i, row in enumerate(csv_data):
# # Check if this row is the start of a new report
# if row[0] == 'PRODUCTIVITY REPORT':
# # Reset variables for the new report
# report_no = row[1]
# employee = None
# prod_date = None
# workinghours = None
# remarks = None
# prod_score = None
# joborder_no = None
# process = None
# status = None
# # Skip 8 rows
# count = 0
# while count < 8:
# next(csv_data)
# count += 1
# # Reset the flag for encountered empty row
# encountered_empty_row = False
# # Read headers from 9th row
# headers = next(csv_data)
# jo_no_index = headers.index('JO NO')
# status_index = headers.index('Status')
# process_index = headers.index('Process')
# duration_index = headers.index('Duration')
# remarks_index = headers.index('Remarks')
# elif all(cell == '' for cell in row):
# # Check if an empty row has been encountered before
# if encountered_empty_row:
# # Stop processing data as we have encountered two consecutive empty rows
# break
# else:
# # Set the flag to indicate that an empty row has been encountered
# encountered_empty_row = True
# else:
# # Read data from the row
# joborder_no = row[jo_no_index]
# status = row[status_index]
# process = row[process_index]
# workinghours = row[duration_index]
# remarks = row[remarks_index]
# # Convert working hours to a Duration object
# if workinghours:
# hours, minutes = map(int, workinghours.split(':'))
# workinghours = timedelta(hours=hours, minutes=minutes)
# # Create a new productivity object
# Productivity.objects.create(
# #report_no=report_no,
# #employee=employee,
# #prod_date=prod_date,
# workinghours=workinghours,
# remarks=remarks,
# #prod_score=prod_score,
# joborder_no=joborder_no,
# process=process,
# status=status
# )
# return render(request, 'EmployeeProdDB/upload_csv.html', {'message': 'Data imported successfully!'})
# return render(request, 'EmployeeProdDB/upload_csv.html')
# def chart_view(request):
# Define the data pool
# data_pool = DataPool(
# series=[{
# 'options': {
# 'source': SummaryPR.objects.all()
# },
# 'terms': [
# 'my_field_1',
# 'my_field_2',
# ]
# }]
# )
# # Define the chart
# chart = Chart(
# datasource=data_pool,
# series_options=[{
# 'options': {
# 'type': 'pie',
# 'stacking': False
# },
# 'terms': {
# 'my_field_1': 'my_field_2'
# }
# }]
# )
# # Render the chart template
# return render(request, 'chart_template.html', {
# 'chart': chart,
# })
def show_csv_data(request): def show_csv_data(request):
csv_data = Productivity.objects.all() return render(request, 'EmployeeProdDB/show_csv_data.html')
return render(request, 'EmployeeProdDB/show_csv_data.html', {'csv_data': csv_data})
def show_csv_data2(request):
csv_data = SummaryReport.objects.all()
return render(request, 'EmployeeProdDB/show_csv_data2.html', {'csv_data': csv_data})
def signin(request):
return render(request, 'EmployeeProdDB/signin.html')
def emp_record(request): def emp_record(request):
return render(request, 'EmployeeProdDB/emp_record.html') return render(request, 'EmployeeProdDB/emp_record.html')
def create_emp_profile(request):
return render(request, 'EmployeeProdDB/create_emp_profile.html') def positionlist(request):
\ No newline at end of file positions = Position.objects.all()
return render(request, 'EmployeeProdDB/positionlist.html', {'positions': positions})
def create_position(request):
if request.method == 'POST':
position_name = request.POST.get('position-name')
position = Position(
position_name=position_name,
)
position.save()
# Redirect to a success page or do something else
return redirect('create_position')
return render(request, 'EmployeeProdDB/create_position.html')
def edit_position(request, position_id):
position = Position.objects.get(position_id=position_id)
if request.method == 'POST':
position.position_name = request.POST.get('position_name')
position.full_clean() # validate the model fields
position.save() # persist the changes to the database
return redirect('positionlist')
return render(request, 'EmployeeProdDB/edit_position.html', {'position': position})
def view_all_productivity(request):
return render(request, 'EmployeeProdDB/view_all_productivity.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