Commit 5e66ff07 authored by dexsap's avatar dexsap

asd

parent f28fc69d
......@@ -14,46 +14,43 @@
/>
<link rel="stylesheet" href="{% static 'css/emp_record.css' %}" />
<title>Employee Record</title>
</head>
<body>
<div class="employee-info-cont">
<div class="employee-nameID">
<h4 class="bold">March Leighton Chua</h4>
<h4 class="bold">{{ employee.employee_name }}</h4>
<div>
<span id="ID">ID# 1</span>
<span>Dataset: 44 Reports</span>
<span id="ID">ID# {{ employee.employee_id }}</span>
<span>Dataset: Reports</span>
</div>
</div>
<div class="employee-info-contact">
<div class="SBP">
<h6>
Sex:
<span class="bold"> Male<!-- IMPORT INFO HERE --> </span>
<span class="bold"> {{ employee.employee_sex }} </span>
</h6>
<h6>
Birthday:
<span class="bold"> 4/3/2023<!-- IMPORT INFO HERE --> </span>
<span class="bold"> {{ employee.employee_bday }} </span>
</h6>
<h6>
Position: <span class="bold"> Leader<!-- IMPORT INFO HERE --> </span>
Position: <span class="bold"> {{ employee.position_id }} </span>
</h6>
</div>
<div class="SBP">
<h6>
Phone Number:
<span class="bold"> 098765143223<!-- IMPORT INFO HERE --> </span>
<span class="bold"> {{ employee.employee_num }} </span>
</h6>
<h6>
Email:
<span class="bold">
march.chua@obf.ateneo.edu<!-- IMPORT INFO HERE -->
</span>
<span class="bold"> {{ employee.employee_email }} </span>
</h6>
<h6>
Emergency Contact:
<span class="bold"> 0912344567<!-- IMPORT INFO HERE --> </span>
<span class="bold"> {{ employee.employee_emergnum }} </span>
</h6>
</div>
</div>
......@@ -62,33 +59,25 @@
<div class="dashboard-options">
<div class="select-range">
<div class="">
<button type="submit" class="range-selected">
Weekly
</button>
<button type="submit" class="range-selected">Weekly</button>
</div>
<div class="vert-line"></div>
<div>
<button type="submit" class="range-selected">
Monthly
</button>
<button type="submit" class="range-selected">Monthly</button>
</div>
<div class="vert-line"></div>
<div>
<button type="submit" class="range-selected">
Quarterly
</button>
<button type="submit" class="range-selected">Quarterly</button>
</div>
<div class="vert-line"></div>
<div>
<button type="submit" class="range-selected">
Annually
</button>
<button type="submit" class="range-selected">Annually</button>
</div>
</div>
</div>
......
......@@ -45,7 +45,11 @@
{% for employee in employees %}
<tr>
<td>{{ employee.employee_id }}</td>
<td>{{ employee.employee_name }}</td>
<td>
<a href="{% url 'emp_record' employee.employee_id %}"
>{{ employee.employee_name }}</a
>
</td>
<td></td>
<td>{{ employee.position_id}}</td>
</tr>
......
......@@ -10,7 +10,7 @@ urlpatterns = [
path('upload_csv/', views.upload_csv, name = 'upload_csv'),
path('show_csv_data/', views.show_csv_data, name ='show_csv_data'),
path('signup/', views.signup, name='signup'),
path('emp_record/', views.emp_record, name='emp_record'),
path('emp_record/<int:employee_id>/', views.emp_record, name='emp_record'),
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'),
......
from django.shortcuts import render, redirect
from django.shortcuts import render, redirect, get_object_or_404
import io
import csv
from datetime import datetime, timedelta
......@@ -243,8 +243,11 @@ def chart_template(request):
def show_csv_data(request):
return render(request, 'EmployeeProdDB/show_csv_data.html')
def emp_record(request):
return render(request, 'EmployeeProdDB/emp_record.html')
def emp_record(request, employee_id):
employee = get_object_or_404(Employee, pk=employee_id)
context = {'employee': employee}
return render(request, 'EmployeeProdDB/emp_record.html', context)
def positionlist(request):
......
from django.contrib import admin
# Register your models here.
from django.apps import AppConfig
class GraphappConfig(AppConfig):
default_auto_field = "django.db.models.BigAutoField"
name = "graphapp"
from django.db import models
# Create your models here.
from django.test import TestCase
# Create your tests here.
from django.shortcuts import render
# Create your views here.
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