Commit 8787a9c6 authored by Bern Enrique's avatar Bern Enrique

sub backend

parent 3977069a
# Generated by Django 4.2 on 2023-05-16 12:52
# Generated by Django 4.2.1 on 2023-05-16 14:22
from django.db import migrations, models
import django.db.models.deletion
......@@ -8,134 +8,72 @@ class Migration(migrations.Migration):
initial = True
dependencies = []
dependencies = [
]
operations = [
migrations.CreateModel(
name="Employee",
name='Employee',
fields=[
("employee_id", models.CharField(max_length=10)),
(
"employee_name",
models.CharField(max_length=255, primary_key=True, serialize=False),
),
(
"employee_sex",
models.CharField(blank=True, default="", max_length=1, null=True),
),
("employee_bday", models.DateField(blank=True, default="", null=True)),
(
"employee_email",
models.CharField(blank=True, default="", max_length=255, null=True),
),
(
"employee_num",
models.CharField(blank=True, default="", max_length=10, null=True),
),
(
"employee_emergnum",
models.CharField(blank=True, default="", max_length=10, null=True),
),
('employee_id', models.AutoField(primary_key=True, serialize=False)),
('employee_name', models.CharField(max_length=255)),
('employee_sex', models.CharField(blank=True, default='', max_length=1, null=True)),
('employee_bday', models.DateField(blank=True, default='', null=True)),
('employee_email', models.CharField(blank=True, default='', max_length=255, null=True)),
('employee_num', models.CharField(blank=True, default='', max_length=10, null=True)),
('employee_emergnum', models.CharField(blank=True, default='', max_length=10, null=True)),
],
),
migrations.CreateModel(
name="IPSUser",
name='IPSUser',
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("username", models.CharField(max_length=300, unique=True)),
("password", models.CharField(max_length=300)),
("first_name", models.CharField(max_length=300)),
("last_name", models.CharField(max_length=300)),
("birthday", models.DateField()),
("sex", models.CharField(max_length=50)),
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('username', models.CharField(max_length=300, unique=True)),
('password', models.CharField(max_length=300)),
('first_name', models.CharField(max_length=300)),
('last_name', models.CharField(max_length=300)),
('birthday', models.DateField()),
('sex', models.CharField(max_length=50)),
],
),
migrations.CreateModel(
name="Position",
name='Position',
fields=[
(
"position_id",
models.CharField(max_length=10, primary_key=True, serialize=False),
),
("position_name", models.CharField(max_length=255)),
('position_id', models.CharField(max_length=10, primary_key=True, serialize=False)),
('position_name', models.CharField(max_length=255)),
],
),
migrations.CreateModel(
name="SummaryReport",
name='SummaryReport',
fields=[
("sr_no", models.AutoField(primary_key=True, serialize=False)),
("prod_score", models.FloatField()),
("totalworkhrs", models.DurationField()),
("prod_date", models.DateField(null=True)),
("totalduration", models.DurationField()),
(
"employee_name",
models.ForeignKey(
default="",
on_delete=django.db.models.deletion.CASCADE,
to="IPSapp.employee",
),
),
('sr_no', models.AutoField(primary_key=True, serialize=False)),
('prod_score', models.FloatField()),
('totalworkhrs', models.DurationField()),
('prod_date', models.DateField(null=True)),
('totalduration', models.DurationField()),
('employee_name', models.ForeignKey(default='', on_delete=django.db.models.deletion.CASCADE, to='IPSapp.employee')),
],
),
migrations.CreateModel(
name="Productivity",
name='Productivity',
fields=[
("report_no", models.AutoField(primary_key=True, serialize=False)),
("remarks", models.TextField(blank=True, max_length=2000)),
("process", models.CharField(max_length=255)),
("duration", models.CharField(max_length=5)),
("status", models.CharField(max_length=255)),
(
"employee_name",
models.ForeignKey(
default="",
on_delete=django.db.models.deletion.CASCADE,
to="IPSapp.employee",
unique=True,
),
),
(
"sr_no",
models.ForeignKey(
default="",
on_delete=django.db.models.deletion.CASCADE,
to="IPSapp.summaryreport",
),
),
('report_no', models.AutoField(primary_key=True, serialize=False)),
('remarks', models.TextField(blank=True, max_length=2000)),
('process', models.CharField(max_length=255)),
('duration', models.CharField(max_length=5)),
('status', models.CharField(max_length=255)),
('employee_name', models.ForeignKey(default='', on_delete=django.db.models.deletion.CASCADE, to='IPSapp.employee', unique=True)),
('sr_no', models.ForeignKey(default='', on_delete=django.db.models.deletion.CASCADE, to='IPSapp.summaryreport')),
],
),
migrations.CreateModel(
name="History",
name='History',
fields=[
(
"history_no",
models.CharField(max_length=10, primary_key=True, serialize=False),
),
("position_startdate", models.DateField()),
("position_enddate", models.DateField(null=True)),
(
"employee",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
to="IPSapp.employee",
),
),
(
"position",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
to="IPSapp.position",
),
),
('history_no', models.CharField(max_length=10, primary_key=True, serialize=False)),
('position_startdate', models.DateField()),
('position_enddate', models.DateField(null=True)),
('employee', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='IPSapp.employee')),
('position', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='IPSapp.position')),
],
),
]
......@@ -2,16 +2,40 @@ from django.db import models
#from .employee import Employee
class Employee(models.Model):
employee_id = models.CharField(max_length=10)
employee_name = models.CharField(max_length=255, primary_key=True)
employee_id = models.AutoField(primary_key=True)
employee_name = models.CharField(max_length=255)
employee_sex = models.CharField(max_length=1, 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_num = models.CharField(max_length=10, blank=True, null=True, default='')
employee_emergnum = models.CharField(max_length=10, blank=True, null=True, default='')
def getEmployeeID(self):
return self.employee_id
def getEmployeeName(self):
return self.employee_name
def getEmployeeSex(self):
return self.employee_sex
def getEmployeeBday(self):
return self.employee_bday
def getEmployeeEmail(self):
return self.employee_email
def getEmployeeNum(self):
return self.employee_num
def getEmployeeEmergNum(self):
return self.employee_emergnum
def __str__(self):
return str(self.employee_name)
return "pk: " + str(self.employee_id) + ", " + str(self.employee_name) + " " + str(self.employee_sex) + ", " + str(self.employee_bday) + ", " + str(self.employee_email) + ", " + str(self.employee_num) + ", " + str(self.employee_emergnum)
class Productivity(models.Model):
report_no = models.AutoField(primary_key=True)
employee_name = models.ForeignKey('Employee', on_delete=models.CASCADE, default='', unique=True)
......@@ -39,6 +63,7 @@ class Productivity(models.Model):
def __str__(self):
return "PK No.: " + str(self.report_no) + ", " + str(self.status) + ", " + str(self.process) + ", " + str(self.duration) + ", " + str(self.remarks)
class Position(models.Model):
position_id = models.CharField(max_length=10, primary_key=True)
position_name = models.CharField(max_length=255)
......
......@@ -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/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/user-list.css');
@import url('https://unpkg.com/css.gg@2.0.0/icons/css/user-list.css');
body {
font-family: Helvetica ;
......@@ -13,11 +15,14 @@ body {
}
.footer {
position: fixed;
left: 0;
bottom: 0;
/* position: static; */
bottom: 0px;
width: 100%;
height: max-content;
text-align: center;
margin-top: 10px;
padding-bottom: 5px;
margin-bottom: 0px;
}
.base-logo {
......@@ -46,6 +51,10 @@ body {
padding: 16px 16px 16px;
display: flex;
justify-content: space-between;
position: fixed;
z-index: 2;
top: 0px;
width: 100%;
}
......@@ -95,7 +104,7 @@ body {
height: 100%;
width: 85px;
position: fixed;
top: 102.4;
top: 102.4px;
left: 0;
background-color: #461E0A;
color: white;
......@@ -116,6 +125,7 @@ body {
/* .sidebar-button:hover {
background-color: #2C1206;
color: white;
text-decoration: none;
} */
.sidebar p {
......@@ -135,9 +145,19 @@ body {
color: white;
}
.sidebar-hover {
background-color: #461E0A;
color: white;
text-decoration: none;
}
.sidebar-hover a:hover {
color: white;
}
.sidebar-hover:hover {
background-color: #2C1206;
color: white;
}
.icon-align {
......@@ -147,6 +167,8 @@ body {
.main {
margin-left: 85px;
margin-top: 130px;
width: 93%;
}
.search-and-add-cont {
......@@ -186,3 +208,12 @@ body {
background-color: #00802B;
color: white;
}
.content-wrap {
padding-bottom: 2.5rem;
}
.page-container {
position: relative;
/* min-height: 100vh; */
}
......@@ -156,3 +156,7 @@ input[type="radio"] {
margin-right: 15px;
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;
}
.save-cancel-cont {
/* display: flex; */
/* flex-direction: column; */
}
\ No newline at end of file
......@@ -123,3 +123,113 @@ body {
.main {
margin-left: 85px;
}
/* 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;
}
\ No newline at end of file
@import url('https://unpkg.com/css.gg@2.0.0/icons/css/search.css');
body {
font-family: Helvetica ;
}
......@@ -19,7 +20,7 @@ body {
.searchbar {
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;
}
......@@ -49,14 +50,17 @@ body {
}
.employee-table-cont {
margin-top: 15px;
/* margin top not working */
overflow:hidden;
overflow-y: scroll;
height: 350px;
height: 340px;
border-width: 5px;
}
#employee {
width: 91.5%;
margin-top: 30px;
margin-top: 15px;
margin-left: 50px;
height: 100%;
/* 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;
}
.button-cont {
width: 250px;
display: flex;
/* justify-content: space-between; */
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 {
/* align-items: center; */
}
input[type="file"] {
display: none;
}
#file-upload{
display: none;
}
.cf-button {
width: 20%;
border-radius: 4px;
......@@ -43,8 +35,7 @@ input[type="file"] {
}
.upload-table-cont {
overflow:hidden;
overflow-y: scroll;
color: white;
height: 200px;
}
......
......@@ -25,15 +25,9 @@
<div class="">
<div class="label-row">
<div class="text-input-grouping">
<label for="first-name" class="">First Name:</label>
<div class="">
<input type="text" class="" name="first-name" required />
</div>
</div>
<div class="text-input-grouping">
<label for="address" class="">Address:</label>
<div class="input-row">
<input type="text" name="address" required />
<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">
......@@ -44,20 +38,6 @@
</div>
</div>
<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">
<label for="bday">Birthday:</label>
<div class="">
<input type="date" name="birthday" />
</div>
</div>
<div class="text-input-grouping">
<label for="emerg_num">Emergency Contact:</label>
......@@ -69,9 +49,9 @@
<div class="label-row">
<div class="text-input-grouping">
<label for="last-name">Last Name:</label>
<label for="bday">Birthday:</label>
<div class="">
<input type="text" name="last-name" required />
<input type="date" name="birthday" />
</div>
</div>
......@@ -120,13 +100,6 @@
</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">
<div class="box"></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="row g-0">
<div class="">
<div class="label-row">
<div class="text-input-grouping">
<label for="name" class="">Name:</label>
<div class="long-textbox">
<input type="text" style="width: 660px;" name="name" required />
</div>
</div>
<div class="text-input-grouping ">
<div class="invisible-box">
</div>
</div>
</div>
<div class="label-row">
<div class="text-input-grouping">
<label for="divhead" class="">Division Head Name:</label>
<div class="input-row">
<input type="text" style="width: 660px;" name="divhead" required />
</div>
</div>
<d<div class="text-input-grouping ">
<div class="invisible-box">
</div>
</div>
<div class="hori-line"></div>
<div class="text-input-grouping">
<p>Assign Participant/s <span>Only Employee Profiles with no position assigned will appear</span></p>
</div>
</div>
</div>
</div>
<div class="position-buttons-cont">
<!-- left side for the table -->
<div class="left-cont">
<!-- search bar cont -->
<div class="search-add-cont">
<div class="searchbar">
<input placeholder= 'Search Name' />
</div>
<div class="add-button">
<button type="submit" class="add-profile-button">
Add Profile
</button>
</div>
</div>
<div class="table-cont">
<!-- table -->
<table class="participant-table-cont" id="participant">
<tr>
<td>1</td>
<td>
Jacob
</td>
<td>
<div class="button-remove cell-remove"><button >Remove</button></div>
</td>
</tr><tr>
<td>1</td>
<td id="td-align">
Name
</td>
<td>
<div class="button-remove"><button >Remove</button></div>
</td>
</tr>
<tr>
<td>1</td>
<td>
Jacob
</td>
<td>
<div class="button-remove cell-remove"><button >Remove</button></div>
</td>
</tr>
<tr>
<td>1</td>
<td>
Jacob
</td>
<td>
<div class="button-remove cell-remove"><button >Remove</button></div>
</td>
</tr>
<tr>
<td>1</td>
<td>
Jacob
</td>
<td>
<div class="button-remove cell-remove"><button >Remove</button></div>
</td>
</tr>
</table>
</div>
</div>
<div class="bottom-cont">
<!-- right side for the bottoms then just align it down or left -->
<!-- <div class="col-md-8"></div> -->
<div class="profile-options">
<div class="button-save">
<button
name="Save"
type="submit"
>
Save Changes
</button>
</div>
<div class="button-cancel">
<button
name="Save"
type="submit"
>
Cancel
</button>
</div>
</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>
......@@ -13,7 +13,8 @@
rel="stylesheet"
/>
<link rel="stylesheet" href="{% static 'css/emp_record.css' %}" />
<title>Employee Record</title>
<title>
<a href="{{ url }}">Employee Record</a></title>
</head>
<body>
<div class="employee-info-cont">
......@@ -25,6 +26,7 @@
</div>
</div>
<div class="employee-info-contact">
<div class="SBP">
<h6>
Sex:
......@@ -55,6 +57,18 @@
<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>
......@@ -103,5 +117,19 @@
<!-- 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 %}
......@@ -18,13 +18,13 @@
<div class="search-and-add-cont">
<div class="searchbar">
<input placeholder='&#xf002 Search Name' />
<input placeholder= 'Search Name' />
</div>
<div class="add-button">
<button type="submit" class="add-profile-button">
Add Profile
</button>
<button type="submit" class="add-profile-button"><a href="{% url 'create_emp_profile' %}" style="color: white">
Add Employee
</a></button>
</div>
</div>
......@@ -33,29 +33,27 @@
<div class="employee-table-cont">
<table id="employee">
<tr>
<th>Summary Report No.</th>
<th>ID</th>
<th>Employee Name</th>
<th>Date</th>
<th>Productivity Score</th>
<th>Total Work Hours</th>
<th>Last Record Update</th>
<th>Position</th>
</tr>
{% for row in csv_data %}
{% for employee in employees %}
<tr>
<td>{{ row.sr_no}}</td>
<td>{{ row.employee_name}}</td>
<td>{{ row.prod_date}}</td>
<td>{{ row.prod_score }}</td>
<td>{{ row.totalworkhrs }}</td>
<!-- add more cells for additional fields -->
<td>{{ employee.employee_id }}</a></td>
<td>{{ employee.employee_name }} <a href="{% url 'emp_record' employee_id=employee.employee_id %}">view IPD</a> </a></td>
<td></td>
<td>{{ employee.position_id}}</td>
</tr>
{% endfor %}
</table>
</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 %}
\ No newline at end of file
{% 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">
<input placeholder= 'Search Name' />
</div>
<div class="add-button">
<button type="submit" class="add-profile-button">
Add Profile
</button>
</div>
</div>
<!-- TABLE -->
<div class="employee-table-cont">
<table id="employee">
<tr>
<th>ID</th>
<th>Position</th>
<th>Division Head</th>
<th>Number of Participants</th>
<th></th>
</tr>
{% for position in positions %}
<tr>
<td>{{ position.position_id }}</td>
<td>{{ position.position_name }}</td>
<td><!-- Division Head --></td>
<td><!-- Number of Participants --></td>
<td>
<div class="button-cont">
<div class="button-save">
<button>Edit</button>
</div>
<div class="button-delete">
<button>Delete</button>
</div>
</div>
</td>
</tr>
{% endfor %}
</table>
</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 %}
{% 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><a href="{{ url }}">Employee Record</a></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="{% url 'view_all_productivity' employee_id=employee.employee_id %}">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">
<!-- Productivity table -->
<h2>{{ employee.employee_name }}'s Productivity</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>
{% for record in productivity %}
<tr>
<td>{{ record.report_no }}</td>
<td>{{ record.sr_no }}</td>
<td>{{ record.duration }}</td>
<td>{{ record.process }}</td>
<td>{{ record.status }}</td>
<!-- Add additional columns for productivity score or other fields -->
</tr>
{% endfor %}
</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 %}
......@@ -13,7 +13,10 @@ urlpatterns = [
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('create_profile/' ,views.create_emp_profile, name='create_emp_profile')
path('emp_record/<int:employee_id>', views.emp_record, name='emp_record'),
path('create_profile/' ,views.create_emp_profile, name='create_emp_profile'),
path('create_position/' ,views.create_position, name='create_position'),
path('positionlist/' ,views.positionlist, name='positionlist'),
path('view_all_productivity/<int:employee_id>/', views.view_all_productivity, name='view_all_productivity'),
]
\ No newline at end of file
from django.shortcuts import render, redirect
from django.shortcuts import render, reverse
from django.urls import reverse
import io
import csv
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.utils.dateparse import parse_date, parse_duration
# from dateutil.parser import parse as parse_date
......@@ -15,8 +17,8 @@ from django.http import JsonResponse
from django.utils import timezone
def home(request):
csv_data = SummaryReport.objects.all()
return render(request, 'EmployeeProdDB/home.html', {'csv_data': csv_data})
employees = Employee.objects.all()
return render(request, 'EmployeeProdDB/home.html', {'employees': employees})
def my_view(request):
......@@ -356,8 +358,75 @@ def show_csv_data2(request):
def signin(request):
return render(request, 'EmployeeProdDB/signin.html')
def emp_record(request):
return render(request, 'EmployeeProdDB/emp_record.html')
def emp_record(request, employee_id):
url = reverse('emp_record', kwargs={'employee_id': employee_id})
return render(request, 'EmployeeProdDB/emp_record.html', {'url': url})
# def create_emp_profile(request):
# if request.method == 'POST':
# # Get the form data from the POST request
# 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')
# # Create a new Employee instance
# employee = Employee.objects.create(
# employee_name=employee_name,
# employee_sex=employee_sex,
# employee_bday=employee_bday,
# employee_email=employee_email,
# employee_num=employee_num,
# employee_emergnum=employee_emergnum
# )
# employee.save()
# # Redirect to a success page or perform any other desired actions
# return redirect('create_emp_profile') # Replace 'success_page' with the appropriate URL or view name
# return render(request, 'EmployeeProdDB/create_emp_profile.html')
def create_emp_profile(request):
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')
# Create a new Employee instance
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
)
# Save the Employee instance to the database
employee.save()
# Redirect to a success page or do something else
return redirect('create_emp_profile')
return render(request, 'EmployeeProdDB/create_emp_profile.html')
def create_position(request):
return render(request, 'EmployeeProdDB/create_position.html')
def positionlist(request):
positions = Position.objects.all()
return render(request, 'EmployeeProdDB/positionlist.html', {'positions': positions})
def view_all_productivity(request, employee_id):
url = reverse('view_all_productivity', kwargs={'employee_id': employee_id})
employee = Employee.objects.get(employee_id=employee_id)
productivity = Productivity.objects.filter(employee_name=employee)
return render(request, 'EmployeeProdDB/view_all_productivity.html', {'employee': employee, 'productivity': productivity})
\ No newline at end of file
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