diff --git a/.env b/.env
index e69de29..8dbdbea 100644
--- a/.env
+++ b/.env
@@ -0,0 +1,6 @@
+GOOGLE_API_KEY=AIzaSyAh5HbTtCHsO_ZWAtCtn_q5h2_Jw7tEfe8
+HUGGING_FACE_API_KEY=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
+
+SMS_ACCOUNT_SSID_API_KEY=AC954136eee66cc8ba187c7722f5840d13
+SMS_ACCOUNT_AUTH_API_KEY=d1501d7b07f1625cce8b4c46c1d5a8f1
+SMS_FROM_NUMBER=+12085516281
\ No newline at end of file
diff --git a/core/__pycache__/admin.cpython-312.pyc b/core/__pycache__/admin.cpython-312.pyc
index 1e396db..996044c 100644
Binary files a/core/__pycache__/admin.cpython-312.pyc and b/core/__pycache__/admin.cpython-312.pyc differ
diff --git a/core/__pycache__/forms.cpython-312.pyc b/core/__pycache__/forms.cpython-312.pyc
index 0f03eef..16f83b1 100644
Binary files a/core/__pycache__/forms.cpython-312.pyc and b/core/__pycache__/forms.cpython-312.pyc differ
diff --git a/core/__pycache__/models.cpython-312.pyc b/core/__pycache__/models.cpython-312.pyc
index e747907..a176e1b 100644
Binary files a/core/__pycache__/models.cpython-312.pyc and b/core/__pycache__/models.cpython-312.pyc differ
diff --git a/core/__pycache__/urls.cpython-312.pyc b/core/__pycache__/urls.cpython-312.pyc
index 2ff7a39..99c1537 100644
Binary files a/core/__pycache__/urls.cpython-312.pyc and b/core/__pycache__/urls.cpython-312.pyc differ
diff --git a/core/__pycache__/views.cpython-312.pyc b/core/__pycache__/views.cpython-312.pyc
index 4db1db4..ce94179 100644
Binary files a/core/__pycache__/views.cpython-312.pyc and b/core/__pycache__/views.cpython-312.pyc differ
diff --git a/core/admin.py b/core/admin.py
index d8118d2..304d70a 100644
--- a/core/admin.py
+++ b/core/admin.py
@@ -1,5 +1,5 @@
from django.contrib import admin
-from .models import Problem,BedsInventory,O2Inventory,Ambulance,StaffMember
+from .models import Problem,BedsInventory,O2Inventory,Ambulance,StaffMember,Labor,Attendance,Task,TaskAssignment
from import_export.admin import ImportExportModelAdmin
@@ -21,4 +21,24 @@ class AmbuAdmin(ImportExportModelAdmin):
class StaffAdmin(ImportExportModelAdmin):
list_display=['name','role','department']
-admin.site.register(StaffMember,StaffAdmin)
\ No newline at end of file
+admin.site.register(StaffMember,StaffAdmin)
+
+
+# workforce admin
+class labourAdmin(ImportExportModelAdmin):
+ list_display=['name']
+admin.site.register(Labor,labourAdmin)
+
+class AttendenceAdmin(ImportExportModelAdmin):
+ list_display=['labor','date','status']
+admin.site.register(Attendance,AttendenceAdmin)
+
+
+# task assignment admin
+class TaskAdmin(ImportExportModelAdmin):
+ list_display=['title','description']
+admin.site.register(Task,TaskAdmin)
+
+class TaskAssignAdmin(ImportExportModelAdmin):
+ list_display=['labor','status']
+admin.site.register(TaskAssignment,TaskAssignAdmin)
\ No newline at end of file
diff --git a/core/forms.py b/core/forms.py
index ee2b356..a161c46 100644
--- a/core/forms.py
+++ b/core/forms.py
@@ -1,6 +1,6 @@
from .models import Problem
from django import forms
-from .models import BedsInventory, Ambulance, StaffMember, O2Inventory
+from .models import BedsInventory, Ambulance, StaffMember, O2Inventory,TaskAssignment
class ProblemForm(forms.ModelForm):
class Meta:
@@ -31,3 +31,21 @@ class O2InventoryForm(forms.ModelForm):
class Meta:
model = O2Inventory
fields = '__all__'
+
+
+# attendence form
+from .models import Attendance
+
+class AttendanceForm(forms.ModelForm):
+ class Meta:
+ model = Attendance
+ fields = ['labor', 'status']
+
+# assignment list
+class TaskAssignmentForm(forms.ModelForm):
+ class Meta:
+ model = TaskAssignment
+ fields = ['labor', 'task', 'date_assigned', 'status']
+ widgets = {
+ 'date_assigned': forms.DateInput(attrs={'type': 'date'}),
+ }
\ No newline at end of file
diff --git a/core/migrations/0004_labor_attendance.py b/core/migrations/0004_labor_attendance.py
new file mode 100644
index 0000000..2da5478
--- /dev/null
+++ b/core/migrations/0004_labor_attendance.py
@@ -0,0 +1,30 @@
+# Generated by Django 5.0.7 on 2024-07-28 02:21
+
+import django.db.models.deletion
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('core', '0003_ambulance_bedsinventory_o2inventory_staffmember'),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='Labor',
+ fields=[
+ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('name', models.CharField(max_length=255)),
+ ],
+ ),
+ migrations.CreateModel(
+ name='Attendance',
+ fields=[
+ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('date', models.DateField()),
+ ('status', models.CharField(choices=[('Present', 'Present'), ('Absent', 'Absent')], max_length=10)),
+ ('labor', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.labor')),
+ ],
+ ),
+ ]
diff --git a/core/migrations/0005_task_taskassignment.py b/core/migrations/0005_task_taskassignment.py
new file mode 100644
index 0000000..01c6cc7
--- /dev/null
+++ b/core/migrations/0005_task_taskassignment.py
@@ -0,0 +1,32 @@
+# Generated by Django 5.0.7 on 2024-07-28 03:21
+
+import django.db.models.deletion
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('core', '0004_labor_attendance'),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='Task',
+ fields=[
+ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('title', models.CharField(max_length=100)),
+ ('description', models.TextField()),
+ ],
+ ),
+ migrations.CreateModel(
+ name='TaskAssignment',
+ fields=[
+ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('date_assigned', models.DateField()),
+ ('status', models.CharField(max_length=10)),
+ ('labor', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.labor')),
+ ('task', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.task')),
+ ],
+ ),
+ ]
diff --git a/core/migrations/0006_alter_task_description.py b/core/migrations/0006_alter_task_description.py
new file mode 100644
index 0000000..74fbf4e
--- /dev/null
+++ b/core/migrations/0006_alter_task_description.py
@@ -0,0 +1,18 @@
+# Generated by Django 5.0.7 on 2024-07-28 03:54
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('core', '0005_task_taskassignment'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='task',
+ name='description',
+ field=models.CharField(choices=[('Sewage & Drainage', 'Sewage & Drainage'), ('Waste Management', 'Waste Management'), ('Public Transport', 'Public Transport'), ('Public Health Services', 'Public Health Services'), ('Education and Cultural', 'Education and Cultral'), ('Services', 'Services'), ('Water Treatment and Supplies', 'Water Treatment and Supplies')], max_length=60),
+ ),
+ ]
diff --git a/core/migrations/__pycache__/0004_labor_attendance.cpython-312.pyc b/core/migrations/__pycache__/0004_labor_attendance.cpython-312.pyc
new file mode 100644
index 0000000..1bf7299
Binary files /dev/null and b/core/migrations/__pycache__/0004_labor_attendance.cpython-312.pyc differ
diff --git a/core/migrations/__pycache__/0005_task_taskassignment.cpython-312.pyc b/core/migrations/__pycache__/0005_task_taskassignment.cpython-312.pyc
new file mode 100644
index 0000000..e29acaf
Binary files /dev/null and b/core/migrations/__pycache__/0005_task_taskassignment.cpython-312.pyc differ
diff --git a/core/migrations/__pycache__/0006_alter_task_description.cpython-312.pyc b/core/migrations/__pycache__/0006_alter_task_description.cpython-312.pyc
new file mode 100644
index 0000000..d347611
Binary files /dev/null and b/core/migrations/__pycache__/0006_alter_task_description.cpython-312.pyc differ
diff --git a/core/models.py b/core/models.py
index 569fdb0..d6e169f 100644
--- a/core/models.py
+++ b/core/models.py
@@ -78,4 +78,39 @@ class StaffMember(models.Model):
last_updated = models.DateField()
def __str__(self):
- return f"ID: {self.id} - Name: {self.name} - Role: {self.role}"
\ No newline at end of file
+ return f"ID: {self.id} - Name: {self.name} - Role: {self.role}"
+
+
+# attendence systems
+
+class Labor(models.Model):
+ name = models.CharField(max_length=255)
+
+ def __str__(self):
+ return self.name
+
+class Attendance(models.Model):
+ labor = models.ForeignKey(Labor, on_delete=models.CASCADE)
+ date = models.DateField()
+ status = models.CharField(max_length=10, choices=[('Present', 'Present'), ('Absent', 'Absent')])
+
+ def __str__(self):
+ return f'{self.labor} - {self.date} - {self.status}'
+
+
+# task assign
+class Task(models.Model):
+ title = models.CharField(max_length=100)
+ description = models.CharField(max_length=60, choices=Problem.PROBLEM_TYPE_CHOICES)
+
+ def __str__(self):
+ return self.title
+
+class TaskAssignment(models.Model):
+ labor = models.ForeignKey(Labor, on_delete=models.CASCADE)
+ task = models.ForeignKey(Task, on_delete=models.CASCADE)
+ date_assigned = models.DateField()
+ status = models.CharField(max_length=10) # e.g., 'Completed', 'Pending'
+
+ def __str__(self):
+ return f'{self.labor.name} - {self.task.title} - {self.date_assigned} - {self.status}'
\ No newline at end of file
diff --git a/core/static/core/image/workforce.svg b/core/static/core/image/workforce.svg
new file mode 100644
index 0000000..8fd89c3
--- /dev/null
+++ b/core/static/core/image/workforce.svg
@@ -0,0 +1,54 @@
+
+
+
+
\ No newline at end of file
diff --git a/core/templates/core/app/add_workforce.html b/core/templates/core/app/add_workforce.html
new file mode 100644
index 0000000..c314478
--- /dev/null
+++ b/core/templates/core/app/add_workforce.html
@@ -0,0 +1,19 @@
+{% extends 'maintain/partial/base.html' %}
+{% load static %}
+{% block index %}
+
+
+
+
+
+
+
+
+
+{% endblock index %}
\ No newline at end of file
diff --git a/core/templates/core/app/assign_task.html b/core/templates/core/app/assign_task.html
new file mode 100644
index 0000000..1627ca0
--- /dev/null
+++ b/core/templates/core/app/assign_task.html
@@ -0,0 +1,30 @@
+{% extends 'core/partial/base.html' %}
+{% load static %}
+
+{% block index %}
+
+
+
+
Assign Task
+
+
+
+
+{% endblock index %}
\ No newline at end of file
diff --git a/core/templates/core/app/mark_attendance.html b/core/templates/core/app/mark_attendance.html
new file mode 100644
index 0000000..e533658
--- /dev/null
+++ b/core/templates/core/app/mark_attendance.html
@@ -0,0 +1,27 @@
+{% extends 'maintain/partial/base.html' %}
+{% load static %}
+{% block index %}
+
+
+
+
Mark Attendance
+
+
+
+
+{% endblock index %}
\ No newline at end of file
diff --git a/core/templates/core/app/task_assignments.html b/core/templates/core/app/task_assignments.html
new file mode 100644
index 0000000..a7b69a4
--- /dev/null
+++ b/core/templates/core/app/task_assignments.html
@@ -0,0 +1,79 @@
+{% extends 'maintain/partial/base.html' %}
+{% load static %}
+{% block index %}
+
+
+
+
Public Queries
+
+
+
+
+
Name
+
Description
+
Seriousness
+
Image
+
Problem Type
+
Status
+
+
+
+ {% for query in public_problem %}
+
+
{{ query.name }}
+
{{ query.description }}
+
{{ query.seriousness }}
+
+
+
+
{{ query.problem_type }}
+
{{ query.status }}
+
+ {% endfor %}
+
+
+
+
+
Tasks
+
+
+
+
Title
+
Description
+
+
+
+ {% for task in tasks %}
+
+
{{ task.title }}
+
{{ task.description }}
+
+ {% endfor %}
+
+
+
+
Task Assignments
+
+
+
+
Labor Name
+
Task Title
+
Date Assigned
+
Status
+
+
+
+ {% for assignment in assignments %}
+
+
{{ assignment.labor.name }}
+
{{ assignment.task.title }}
+
{{ assignment.date_assigned }}
+
{{ assignment.status }}
+
+ {% endfor %}
+
+
+
+
+
+{% endblock index %}
\ No newline at end of file
diff --git a/core/templates/core/app/welcome.html b/core/templates/core/app/welcome.html
index 4d08f46..98979c2 100644
--- a/core/templates/core/app/welcome.html
+++ b/core/templates/core/app/welcome.html
@@ -66,12 +66,14 @@