Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
JARVIS
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacob Dylan D. Vitug
JARVIS
Commits
29281064
Commit
29281064
authored
Apr 04, 2023
by
Dexter Sapugay
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
final
parent
2a6949c7
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
98 additions
and
125 deletions
+98
-125
admin.cpython-38.pyc
IPS/IPSapp/__pycache__/admin.cpython-38.pyc
+0
-0
models.cpython-38.pyc
IPS/IPSapp/__pycache__/models.cpython-38.pyc
+0
-0
urls.cpython-38.pyc
IPS/IPSapp/__pycache__/urls.cpython-38.pyc
+0
-0
views.cpython-38.pyc
IPS/IPSapp/__pycache__/views.cpython-38.pyc
+0
-0
admin.py
IPS/IPSapp/admin.py
+2
-2
0001_initial.py
IPS/IPSapp/migrations/0001_initial.py
+87
-49
0002_summaryreport_employee_name_and_more.py
...p/migrations/0002_summaryreport_employee_name_and_more.py
+0
-23
0003_alter_summaryreport_prod_score.py
IPS/IPSapp/migrations/0003_alter_summaryreport_prod_score.py
+0
-18
0001_initial.cpython-38.pyc
...IPSapp/migrations/__pycache__/0001_initial.cpython-38.pyc
+0
-0
models.py
IPS/IPSapp/models.py
+1
-1
base.html
IPS/IPSapp/templates/EmployeeProdDB/base.html
+2
-2
show_csv_data2.html
IPS/IPSapp/templates/EmployeeProdDB/show_csv_data2.html
+0
-24
views.py
IPS/IPSapp/views.py
+6
-6
No files found.
IPS/IPSapp/__pycache__/admin.cpython-38.pyc
View file @
29281064
No preview for this file type
IPS/IPSapp/__pycache__/models.cpython-38.pyc
View file @
29281064
No preview for this file type
IPS/IPSapp/__pycache__/urls.cpython-38.pyc
View file @
29281064
No preview for this file type
IPS/IPSapp/__pycache__/views.cpython-38.pyc
View file @
29281064
No preview for this file type
IPS/IPSapp/admin.py
View file @
29281064
from
django.contrib
import
admin
from
django.contrib
import
admin
from
.models
import
Employee
,
Productivity
,
Position
,
History
,
User
,
SummaryReport
from
.models
import
Employee
,
Productivity
,
Position
,
History
,
IPS
User
,
SummaryReport
admin
.
site
.
register
(
User
)
admin
.
site
.
register
(
IPS
User
)
admin
.
site
.
register
(
Employee
)
admin
.
site
.
register
(
Employee
)
admin
.
site
.
register
(
Productivity
)
admin
.
site
.
register
(
Productivity
)
admin
.
site
.
register
(
Position
)
admin
.
site
.
register
(
Position
)
...
...
IPS/IPSapp/migrations/0001_initial.py
View file @
29281064
# Generated by Django 4.2 on 2023-04-04 1
0:24
# Generated by Django 4.2 on 2023-04-04 1
8:18
from
django.db
import
migrations
,
models
from
django.db
import
migrations
,
models
import
django.db.models.deletion
import
django.db.models.deletion
...
@@ -8,78 +8,116 @@ class Migration(migrations.Migration):
...
@@ -8,78 +8,116 @@ class Migration(migrations.Migration):
initial
=
True
initial
=
True
dependencies
=
[
dependencies
=
[]
]
operations
=
[
operations
=
[
migrations
.
CreateModel
(
migrations
.
CreateModel
(
name
=
'Employee'
,
name
=
"Employee"
,
fields
=
[
fields
=
[
(
'employee_id'
,
models
.
CharField
(
max_length
=
10
,
primary_key
=
True
,
serialize
=
False
)),
(
(
'employee_fname'
,
models
.
CharField
(
max_length
=
255
)),
"employee_id"
,
(
'employee_mname'
,
models
.
CharField
(
blank
=
True
,
max_length
=
255
,
null
=
True
)),
models
.
CharField
(
max_length
=
10
,
primary_key
=
True
,
serialize
=
False
),
(
'employee_lname'
,
models
.
CharField
(
max_length
=
255
)),
),
(
'employee_sex'
,
models
.
CharField
(
max_length
=
1
)),
(
"employee_fname"
,
models
.
CharField
(
max_length
=
255
)),
(
'employee_bday'
,
models
.
DateField
()),
(
(
'employee_email'
,
models
.
CharField
(
max_length
=
255
)),
"employee_mname"
,
(
'employee_num'
,
models
.
CharField
(
blank
=
True
,
max_length
=
10
,
null
=
True
)),
models
.
CharField
(
blank
=
True
,
max_length
=
255
,
null
=
True
),
(
'employee_emergnum'
,
models
.
CharField
(
blank
=
True
,
max_length
=
10
,
null
=
True
)),
),
(
"employee_lname"
,
models
.
CharField
(
max_length
=
255
)),
(
"employee_sex"
,
models
.
CharField
(
max_length
=
1
)),
(
"employee_bday"
,
models
.
DateField
()),
(
"employee_email"
,
models
.
CharField
(
max_length
=
255
)),
(
"employee_num"
,
models
.
CharField
(
blank
=
True
,
max_length
=
10
,
null
=
True
),
),
(
"employee_emergnum"
,
models
.
CharField
(
blank
=
True
,
max_length
=
10
,
null
=
True
),
),
],
],
),
),
migrations
.
CreateModel
(
migrations
.
CreateModel
(
name
=
'Position'
,
name
=
"IPSUser"
,
fields
=
[
fields
=
[
(
'position_id'
,
models
.
CharField
(
max_length
=
10
,
primary_key
=
True
,
serialize
=
False
)),
(
(
'history_no'
,
models
.
CharField
(
max_length
=
10
)),
"id"
,
(
'position_name'
,
models
.
CharField
(
max_length
=
255
)),
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
(
migrations
.
CreateModel
(
name
=
'Productivity'
,
name
=
"Position"
,
fields
=
[
fields
=
[
(
'report_no'
,
models
.
AutoField
(
max_length
=
10
,
primary_key
=
True
,
serialize
=
False
)),
(
(
'prod_date'
,
models
.
DateField
(
null
=
True
)),
"position_id"
,
(
'workinghours'
,
models
.
DurationField
()),
models
.
CharField
(
max_length
=
10
,
primary_key
=
True
,
serialize
=
False
),
(
'remarks'
,
models
.
TextField
(
blank
=
True
,
max_length
=
2000
)),
),
(
'prod_score'
,
models
.
FloatField
(
null
=
True
)),
(
"history_no"
,
models
.
CharField
(
max_length
=
10
)),
(
'joborder_no'
,
models
.
CharField
(
max_length
=
10
)),
(
"position_name"
,
models
.
CharField
(
max_length
=
255
)),
(
'process'
,
models
.
CharField
(
max_length
=
255
)),
(
'status'
,
models
.
CharField
(
max_length
=
255
)),
],
],
),
),
migrations
.
CreateModel
(
migrations
.
CreateModel
(
name
=
'SummaryReport'
,
name
=
"Productivity"
,
fields
=
[
fields
=
[
(
'sr_no'
,
models
.
AutoField
(
primary_key
=
True
,
serialize
=
False
)),
(
"report_no"
,
models
.
AutoField
(
primary_key
=
True
,
serialize
=
False
)),
(
'prod_score'
,
models
.
IntegerField
()),
(
"prod_date"
,
models
.
DateField
(
null
=
True
)),
(
'date'
,
models
.
DateField
()),
(
"workinghours"
,
models
.
DurationField
()),
(
'totalworkhrs'
,
models
.
DurationField
()),
(
"remarks"
,
models
.
TextField
(
blank
=
True
,
max_length
=
2000
)),
(
"prod_score"
,
models
.
FloatField
(
null
=
True
)),
(
"joborder_no"
,
models
.
CharField
(
max_length
=
10
)),
(
"process"
,
models
.
CharField
(
max_length
=
255
)),
(
"status"
,
models
.
CharField
(
max_length
=
255
)),
],
],
),
),
migrations
.
CreateModel
(
migrations
.
CreateModel
(
name
=
'User'
,
name
=
"SummaryReport"
,
fields
=
[
fields
=
[
(
'id'
,
models
.
BigAutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
"sr_no"
,
models
.
AutoField
(
primary_key
=
True
,
serialize
=
False
)),
(
'username'
,
models
.
CharField
(
max_length
=
300
,
unique
=
True
)),
(
"employee_name"
,
models
.
CharField
(
default
=
"No Name"
,
max_length
=
255
)),
(
'password'
,
models
.
CharField
(
max_length
=
300
)),
(
"prod_score"
,
models
.
FloatField
()),
(
'first_name'
,
models
.
CharField
(
max_length
=
300
)),
(
"date"
,
models
.
DateField
()),
(
'last_name'
,
models
.
CharField
(
max_length
=
300
)),
(
"totalworkhrs"
,
models
.
DurationField
()),
(
'birthday'
,
models
.
DateField
()),
(
'sex'
,
models
.
CharField
(
max_length
=
50
)),
],
],
),
),
migrations
.
CreateModel
(
migrations
.
CreateModel
(
name
=
'History'
,
name
=
"History"
,
fields
=
[
fields
=
[
(
'history_no'
,
models
.
CharField
(
max_length
=
10
,
primary_key
=
True
,
serialize
=
False
)),
(
(
'employee_fname'
,
models
.
CharField
(
max_length
=
255
)),
"history_no"
,
(
'employee_mname'
,
models
.
CharField
(
blank
=
True
,
max_length
=
255
)),
models
.
CharField
(
max_length
=
10
,
primary_key
=
True
,
serialize
=
False
),
(
'employee_lname'
,
models
.
CharField
(
max_length
=
255
)),
),
(
'position_name'
,
models
.
CharField
(
max_length
=
255
)),
(
"employee_fname"
,
models
.
CharField
(
max_length
=
255
)),
(
'position_startdate'
,
models
.
DateField
()),
(
"employee_mname"
,
models
.
CharField
(
blank
=
True
,
max_length
=
255
)),
(
'position_enddate'
,
models
.
DateField
(
null
=
True
)),
(
"employee_lname"
,
models
.
CharField
(
max_length
=
255
)),
(
'employee'
,
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'IPSapp.employee'
)),
(
"position_name"
,
models
.
CharField
(
max_length
=
255
)),
(
'position'
,
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'IPSapp.position'
)),
(
"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"
,
),
),
],
],
),
),
]
]
IPS/IPSapp/migrations/0002_summaryreport_employee_name_and_more.py
deleted
100644 → 0
View file @
2a6949c7
# Generated by Django 4.2 on 2023-04-04 12:23
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'IPSapp'
,
'0001_initial'
),
]
operations
=
[
migrations
.
AddField
(
model_name
=
'summaryreport'
,
name
=
'employee_name'
,
field
=
models
.
CharField
(
default
=
'No Name'
,
max_length
=
255
),
),
migrations
.
AlterField
(
model_name
=
'productivity'
,
name
=
'report_no'
,
field
=
models
.
AutoField
(
primary_key
=
True
,
serialize
=
False
),
),
]
IPS/IPSapp/migrations/0003_alter_summaryreport_prod_score.py
deleted
100644 → 0
View file @
2a6949c7
# Generated by Django 4.2 on 2023-04-04 13:02
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'IPSapp'
,
'0002_summaryreport_employee_name_and_more'
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
'summaryreport'
,
name
=
'prod_score'
,
field
=
models
.
FloatField
(),
),
]
IPS/IPSapp/migrations/__pycache__/0001_initial.cpython-38.pyc
View file @
29281064
No preview for this file type
IPS/IPSapp/models.py
View file @
29281064
...
@@ -128,7 +128,7 @@ class SummaryReport(models.Model):
...
@@ -128,7 +128,7 @@ class SummaryReport(models.Model):
# )
# )
# ]
# ]
class
User
(
models
.
Model
):
class
IPS
User
(
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
)
first_name
=
models
.
CharField
(
max_length
=
300
)
...
...
IPS/IPSapp/templates/EmployeeProdDB/base.html
View file @
29281064
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
<p>
<p>
Signed in as:
Signed in as:
<b
<b
>
marc leighton chua
>
Bo Caj
<!-- PUT INFO HERE -->
</b
<!-- PUT INFO HERE -->
</b
>
>
</p>
</p>
...
@@ -76,7 +76,7 @@
...
@@ -76,7 +76,7 @@
</div>
</div>
<div
class=
"sidebar-hover"
>
<div
class=
"sidebar-hover"
>
<a
href=
""
>
<a
href=
"
{% url 'signin' %}
"
>
<div
class=
"icon-align sidebar-button"
>
<div
class=
"icon-align sidebar-button"
>
<i
class=
"gg-log-out"
></i>
<i
class=
"gg-log-out"
></i>
</div>
</div>
...
...
IPS/IPSapp/templates/EmployeeProdDB/show_csv_data2.html
deleted
100644 → 0
View file @
2a6949c7
<table>
<thead>
<tr>
<th>
SR No
</th>
<th>
Employee Name
</th>
<th>
Date
</th>
<th>
Prod Score
</th>
<th>
Total Work Hrs
</th>
<!-- add more headers for additional fields -->
</tr>
</thead>
<tbody>
{% for row in csv_data %}
<tr>
<td>
{{ row.sr_no}}
</td>
<td>
{{ row.employee_name}}
</td>
<td>
{{ row.date}}
</td>
<td>
{{ row.prod_score }}
</td>
<td>
{{ row.totalworkhrs }}
</td>
<!-- add more cells for additional fields -->
</tr>
{% endfor %}
</tbody>
</table>
IPS/IPSapp/views.py
View file @
29281064
...
@@ -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
,
User
,
SummaryReport
from
.models
import
Productivity
,
IPS
User
,
SummaryReport
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
...
@@ -20,7 +20,7 @@ def home(request):
...
@@ -20,7 +20,7 @@ def home(request):
def
my_view
(
request
):
def
my_view
(
request
):
user
=
User
.
objects
.
getUsername
()
user
=
IPS
User
.
objects
.
getUsername
()
return
render
(
request
,
'EmployeeProdDB/base.html'
,
{
'user'
:
user
})
return
render
(
request
,
'EmployeeProdDB/base.html'
,
{
'user'
:
user
})
# def show_csv_data2(request):
# def show_csv_data2(request):
...
@@ -39,11 +39,11 @@ def signup(request):
...
@@ -39,11 +39,11 @@ def signup(request):
sex
=
request
.
POST
.
get
(
'sex'
)
sex
=
request
.
POST
.
get
(
'sex'
)
if
pword
==
confirm_pword
:
if
pword
==
confirm_pword
:
if
User
.
objects
.
filter
(
username
=
uname
)
.
exists
():
if
IPS
User
.
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
=
User
.
objects
.
create
(
username
=
uname
,
password
=
pword
,
first_name
=
fname
,
last_name
=
lname
,
birthday
=
bday
,
sex
=
sex
)
user
=
IPS
User
.
objects
.
create
(
username
=
uname
,
password
=
pword
,
first_name
=
fname
,
last_name
=
lname
,
birthday
=
bday
,
sex
=
sex
)
user
.
save
()
user
.
save
()
messages
.
success
(
request
,
'User account created.'
)
messages
.
success
(
request
,
'User account created.'
)
return
redirect
(
'loginpage'
)
return
redirect
(
'loginpage'
)
...
@@ -60,10 +60,10 @@ def loginpage(request):
...
@@ -60,10 +60,10 @@ def loginpage(request):
uname
=
request
.
POST
.
get
(
'username'
)
uname
=
request
.
POST
.
get
(
'username'
)
pword
=
request
.
POST
.
get
(
'password'
)
pword
=
request
.
POST
.
get
(
'password'
)
accountList
=
User
.
objects
.
filter
(
username
=
uname
)
accountList
=
IPS
User
.
objects
.
filter
(
username
=
uname
)
if
(
len
(
accountList
)
>
0
):
if
(
len
(
accountList
)
>
0
):
findUser
=
User
.
objects
.
get
(
username
=
uname
)
findUser
=
IPS
User
.
objects
.
get
(
username
=
uname
)
if
(
findUser
.
getPassword
()
==
pword
):
if
(
findUser
.
getPassword
()
==
pword
):
global
loggedInUser
global
loggedInUser
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment