New major improvements

main
emile 2 years ago
parent 2dda2c5c2e
commit 7ccfeaf80a

Binary file not shown.

@ -16,4 +16,4 @@ class SignUpForm(forms.ModelForm):
class StaffSignUpForm(forms.ModelForm):
class Meta:
model = StaffProfile
fields = ['first_name', 'last_name', 'image', 'email', 'mobile_number', 'password', 'position', 'intern', 'active']
fields = ['first_name', 'last_name', 'image', 'email', 'mobile_number', 'password', 'staff_position', 'intern', 'active']

@ -0,0 +1,18 @@
# Generated by Django 4.2.5 on 2023-09-23 10:19
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('osinacore', '0034_alter_point_date_completed_and_more'),
]
operations = [
migrations.AddField(
model_name='business',
name='business_id',
field=models.CharField(blank=True, max_length=20, null=True),
),
]

@ -0,0 +1,25 @@
# Generated by Django 4.2.5 on 2023-09-23 10:47
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('osinacore', '0035_business_business_id'),
]
operations = [
migrations.CreateModel(
name='StaffPosition',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=100)),
],
),
migrations.AlterField(
model_name='staffprofile',
name='position',
field=models.CharField(max_length=100, null=True),
),
]

@ -0,0 +1,17 @@
# Generated by Django 4.2.5 on 2023-09-23 10:49
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('osinacore', '0036_staffposition_alter_staffprofile_position'),
]
operations = [
migrations.RemoveField(
model_name='staffprofile',
name='position',
),
]

@ -0,0 +1,19 @@
# Generated by Django 4.2.5 on 2023-09-23 10:49
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('osinacore', '0037_remove_staffprofile_position'),
]
operations = [
migrations.AddField(
model_name='staffprofile',
name='staff_position',
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='osinacore.staffposition'),
),
]

@ -0,0 +1,19 @@
# Generated by Django 4.2.5 on 2023-09-23 10:50
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('osinacore', '0038_staffprofile_staff_position'),
]
operations = [
migrations.AlterField(
model_name='staffprofile',
name='staff_position',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='osinacore.staffposition'),
),
]

@ -0,0 +1,18 @@
# Generated by Django 4.2.5 on 2023-09-23 11:20
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('osinacore', '0039_alter_staffprofile_staff_position'),
]
operations = [
migrations.AddField(
model_name='staffprofile',
name='staff_id',
field=models.CharField(blank=True, max_length=20, null=True),
),
]

@ -43,10 +43,20 @@ class Business(models.Model):
)
business_type = models.CharField(max_length=200, choices=BUSINESS_TYPE)
logo = models.ImageField()
business_id = models.CharField(max_length=20, null=True, blank=True) # Allow null and blank for initial creation
class Meta:
verbose_name_plural = u'Businesses'
def __str__(self):
return self.name
def save(self, *args, **kwargs):
if not self.business_id:
# Get the last two digits of the current year
current_year = str(datetime.now().year)[-2:]
# Find the maximum project ID in the database and increment it
max_id = Business.objects.aggregate(models.Max('business_id'))['business_id__max']
new_id = str(int(max_id[-4:]) + 1).zfill(4) if max_id else '0001' # If no existing records, start with '0001'
self.business_id = 'B' + current_year + new_id # Add 'p' prefix
super(Business, self).save(*args, **kwargs)
@ -82,6 +92,13 @@ class CustomerProfile(models.Model):
class StaffPosition(models.Model):
name = models.CharField(max_length=100)
def __str__(self):
return self.name
class StaffProfile(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE)
@ -90,13 +107,23 @@ class StaffProfile(models.Model):
image = models.ImageField(null=True, blank=True)
email = models.EmailField(unique=True)
mobile_number = models.CharField(max_length=50)
staff_position = models.ForeignKey(StaffPosition, on_delete=models.CASCADE, null=True, blank=True)
password = models.CharField(max_length=128)
position = models.CharField(max_length=100)
intern = models.BooleanField(default=False)
active = models.BooleanField(default=True)
staff_id = models.CharField(max_length=20, null=True, blank=True) # Allow null and blank for initial creation
def __str__(self):
return self.user.username
def save(self, *args, **kwargs):
if not self.staff_id:
# Get the last two digits of the current year
current_year = str(datetime.now().year)[-2:]
# Find the maximum project ID in the database and increment it
max_id = StaffProfile.objects.aggregate(models.Max('staff_id'))['staff_id__max']
new_id = str(int(max_id[-4:]) + 1).zfill(4) if max_id else '0001' # If no existing records, start with '0001'
self.staff_id = 'O' + current_year + new_id # Add 'p' prefix
super(StaffProfile, self).save(*args, **kwargs)

@ -226,8 +226,10 @@ def addbusiness(request):
@login_required
def businessdetails(request):
def businessdetails(request, business_id):
business = get_object_or_404(Business, business_id=business_id)
context = {
'business' : business,
}
return render(request, 'business-details.html', context)
@ -235,7 +237,9 @@ def businessdetails(request):
@login_required
def businesses(request):
context = {
businesses = Business.objects.all().order_by('-id')
context = {
'businesses' : businesses,
}
return render(request, 'businesses.html', context)
@ -244,8 +248,12 @@ def businesses(request):
@login_required
def addstaff(request):
staffpositions = StaffPosition.objects.all().order_by('-id')
context = {
'staffpositions' : staffpositions,
}
return render(request, 'add-staff.html', context)
@ -253,11 +261,11 @@ def addstaff(request):
@login_required
def staffdetails(request):
def staffdetails( request, staff_id):
staff = get_object_or_404(StaffProfile, staff_id=staff_id)
context = {
'staff' : staff,
}
return render(request, 'staff-details.html', context)
@ -265,8 +273,12 @@ def staffdetails(request):
@login_required
def staff_positions(request):
staffpositions = StaffPosition.objects.all().order_by('-id')
context = {
'staffpositions' : staffpositions,
}
return render(request, 'staff-positions.html', context)
@ -907,6 +919,27 @@ def save_tag(request):
return redirect('tags')
@login_required
def save_staffposition(request):
if request.method == 'POST':
name = request.POST.get('name')
staffposition = StaffPosition(
name = name,
)
staffposition.save()
# Reload the parent page
return HttpResponse('<script>window.top.location.reload();</script>')
return redirect('staffpositions')
@login_required
def save_point(request):

@ -32,10 +32,10 @@ urlpatterns = [
path('addcustomer/', views.add_customer, name='addcustomer'),
path('customerdetails/<str:customer_id>/', views.customerdetails, name='customerdetails'),
path('addbusiness/', views.addbusiness, name='addbusiness'),
path('businessdetails/', views.businessdetails, name='businessdetails'),
path('businessdetails/<str:business_id>/', views.businessdetails, name='businessdetails'),
path('businesses/', views.businesses, name='businesses'),
path('addstaff/', views.addstaff, name='adduser'),
path('staffdetails/', views.staffdetails, name='userdetails'),
path('staffdetails/<str:staff_id>/', views.staffdetails, name='userdetails'),
path('staffs/', views.staffs, name='users'),
path('staffpositions/', views.staff_positions, name='staffpositions'),
path('projectdetails/<str:project_id>/', views.detailed_project, name='detailed-project'),
@ -89,6 +89,7 @@ urlpatterns = [
path('save_reference/', views.save_reference, name='save_reference'),
path('save_tag/', views.save_tag, name='save_tag'),
path('save_point/', views.save_point, name='save_point'),
path('save_staffposition/', views.save_staffposition, name='save_staffposition'),

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

@ -87,11 +87,12 @@
<!-- <input name="position" type="text" placeholder="Position"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md" required> -->
<select name="" id=""
<select name="staff_position" id=""
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500">
<option value="" selected disabled>Position</option>
<option value="developer">Developer</option>
<option value="graphic">Graphic Designer</option>
{% for position in staffpositions %}
<option value="{{position.id}}">{{position.name}}</option>
{% endfor %}
</select>
<div class="w-full flex justify-start items-center gap-2">

@ -13,7 +13,7 @@
</head>
<body>
<form id="hiddenContent" method="POST">
<form id="hiddenContent" method="POST" action="{% url 'save_staffposition' %}">
{% csrf_token %}
<h1 class="text-slate-800 text-2xl font-semibold text-center">Add Staff Position</h1>

@ -57,11 +57,11 @@
<div class="w-full flex justify-between gap-[2.5%] px-10 pb-5">
<!-- LEFT SIDE / BUSINESS DETAIL SECTION -->
<div class="w-[74.5%] bg-white h-fit rounded-md shadow-md p-5">
<div class="w-full bg-gray-300 rounded-t-md flex flex-col justify-center items-center py-2 gap-3 mt-[50px]">
<div class="w-full bg-slate-700 rounded-t-md flex flex-col justify-center items-center py-2 gap-3 mt-[50px]">
<div class="w-[100px] h-[100px] rounded-full mt-[-63px] border border-gray-300">
<img src="{% static 'images/logo-social.png' %}" alt="" class="w-full h-full object-cover rounded-full">
<img src="{{business.logo.url}}" alt="" class="w-full h-full object-cover rounded-full">
</div>
<h1 class="text-3xl text-white font-semibold">Emile Ellye - Ositcom</h1>
<h1 class="text-3xl text-white font-semibold">{{business.name}}</h1>
</div>
<div class="w-full h-[70px] flex justify-end items-center bg-gray-100 shadow-md rounded-md px-3 py-1 mt-4">
<div class="flex justify-end items-center gap-3">
@ -77,45 +77,48 @@
</div>
<div class="w-full flex flex-col gap-4 mt-5">
<div>
<p class="text-gray-500 text-xl">Name: <span class="text-slate-800 text-xl font-semibold">Ositcom</span>
<p class="text-gray-500 text-xl">Name: <span class="text-slate-800 text-xl font-semibold">{{business.name}}</span>
</p>
</div>
<div>
<p class="text-gray-500 text-xl">Email: <span
class="text-slate-800 text-xl font-semibold">info@ositcom.com</span></p>
class="text-slate-800 text-xl font-semibold">{{business.email}}</span></p>
</div>
<div>
<p class="text-gray-500 text-xl">VAT: <span class="text-slate-800 text-xl font-semibold">Checked</span>
<p class="text-gray-500 text-xl">VAT: <span class="text-slate-800 text-xl font-semibold">{{business.vat}}</span>
</p>
</div>
<div>
<p class="text-gray-500 text-xl">Commercial Registration: <span
class="text-slate-800 text-xl font-semibold">2022</span></p>
class="text-slate-800 text-xl font-semibold">{{business.commercial_registration}}</span></p>
</div>
<div>
<p class="text-gray-500 text-xl">Phone Number: <span
class="text-green-700 text-xl font-semibold">78987678</span></p>
class="text-slate-800 text-xl font-semibold">{{business.phone_number}}</span></p>
</div>
<div>
<p class="text-gray-500 text-xl">Website: <span
class="text-green-700 text-xl font-semibold">ositcom.com</span></p>
class="text-slate-800 text-xl font-semibold">{{business.website}}</span></p>
</div>
<div>
<p class="text-gray-500 text-xl">Business Type: <span
class="text-green-700 text-xl font-semibold">Association</span></p>
class="text-slate-800 text-xl font-semibold">{{business.business_type}}</span></p>
</div>
<div>
<p class="text-gray-500 text-xl">Related Customer:
<a class="cursor-pointer" href="">
<span class="text-slate-800 text-xl font-semibold hover:text-gray-500">Emile Elliye</span>
</a>
{% for customer_profile in business.customerprofile_set.all %}
<a class="cursor-pointer" href="{% url 'customerdetails' customer_profile.customer_id %}"> <span class="text-slate-800 text-xl font-semibold hover:text-gray-500">{{ customer_profile.user.first_name }} {{customer_profile.user.last_name}} <i class="fa fa-angle-double-right"></i>
{% if not forloop.last %}, {% endif %}
</span> </a>
{%endfor%}
</p>
</div>
@ -128,88 +131,20 @@
<div class="w-full h-fit mt-2">
{% for latest in latest_statuses %}
<!-- 1ST ROW -->
<div class="w-full flex flex-col py-3">
<div class="w-full flex flex-col justify-center items-start gap-2">
<div class="w-full flex justify-between items-center gap-2">
<div class="flex justify-start gap-2">
<div class="w-[45px] h-[45px] rounded-full">
<img src='{% static "images/avatar.svg" %}' alt="user profile"
class="w-full h-full object-cover">
</div>
<div class="flex flex-col">
<h1 class="text-sm text-slate-700 font-semibold">Nataly</h1>
<p class="text-sm text-gray-500">11:30 AM</p>
</div>
</div>
<div class="cursor-pointer">
<i class="fa fa-thumbs-up" style="color: rgb(184, 184, 184); font-size: 15px;"></i>
</div>
</div>
<!-- Status -->
<div class="w-full">
<p class="text-sm text-gray-500">Closed - Create the Osina home page</p>
</div>
<!-- Add comment section -->
<div class="w-full h-fit flex justify-between items-center border border-gray-200 mt-2 rounded-md">
<input type="text" placeholder="Add Comment..."
class="outline-none text-gray-500 p-2 w-[100%] text-sm h-[40px] rounded-tl-md rounded-bl-md">
<button class="w-fit px-3 py-2 bg-slate-800 rounded-tr-md rounded-br-md">
<i class="fa fa-send" style="color: white; font-size: 15px;"></i>
</button>
</div>
</div>
</div>
<!-- 2NT ROW -->
<div class="w-full flex flex-col py-3">
<div class="w-full flex flex-col justify-center items-start gap-2">
<div class="w-full flex justify-between items-center gap-2">
<div class="flex justify-start gap-2">
<div class="w-[45px] h-[45px] rounded-full">
<img src='{% static "images/avatar2.png" %}' alt="user profile"
class="w-full h-full object-cover">
</div>
<div class="flex flex-col">
<h1 class="text-sm text-slate-700 font-semibold">Salim</h1>
<p class="text-sm text-gray-500">11:30 AM</p>
</div>
</div>
<div class="cursor-pointer">
<i class="fa fa-thumbs-up" style="color: rgb(184, 184, 184); font-size: 15px;"></i>
</div>
</div>
<!-- Status -->
<div class="w-full">
<p class="text-sm text-gray-500">Closed - Create the Osina home page</p>
</div>
<!-- Add comment section -->
<div class="w-full h-fit flex justify-between items-center border border-gray-200 mt-2 rounded-md">
<input type="text" placeholder="Add Comment..."
class="outline-none text-gray-500 p-2 w-[100%] text-sm h-[40px] rounded-tl-md rounded-bl-md">
<button class="w-fit px-3 py-2 bg-slate-800 rounded-tr-md rounded-br-md">
<i class="fa fa-send" style="color: white; font-size: 15px;"></i>
</button>
</div>
</div>
</div>
<!-- 3RD ROW -->
<div class="w-full flex flex-col py-3">
<div class="w-full flex flex-col justify-center items-start gap-2">
<div class="w-full flex justify-between items-center gap-2">
<div class="flex justify-start gap-2">
<div class="w-[45px] h-[45px] rounded-full">
<img src='{% static "images/avatar3.png" %}' alt="user profile"
class="w-full h-full object-cover">
<img src='{{latest.staff.image.url}}' alt="user profile"
class="w-full h-full object-cover rounded-full">
</div>
<div class="flex flex-col">
<h1 class="text-sm text-slate-700 font-semibold">Emile</h1>
<p class="text-sm text-gray-500">11:30 AM</p>
<h1 class="text-sm text-slate-700 font-semibold">{{latest.staff.first_name}}
{{latest.staff.last_name}}</h1>
<p class="text-sm text-gray-500">{{latest.time}}</p>
</div>
</div>
<div class="cursor-pointer">
@ -219,7 +154,7 @@
<!-- Status -->
<div class="w-full">
<p class="text-sm text-gray-500">Closed - Create the Osina home page</p>
<p class="text-sm text-gray-500">{{latest.text}}</p>
</div>
<!-- Add comment section -->
@ -232,6 +167,7 @@
</div>
</div>
</div>
{% endfor %}
</div>
</div>
</div>

@ -102,18 +102,19 @@
<!-- BODY -->
<div class="w-full border-t border-gray-300">
<!-- ROW -->
{% for business in businesses %}
<div class="w-full h-[50px] flex justify-between items-center border-b border-gray-300">
<div class="w-[35%] h-full border-r border-gray-300 flex justify-center items-center">
<p class="text-sm">HII</p>
<p class="text-sm">{{business.name}}</p>
</div>
<div class="w-[30%] h-full border-r border-gray-300 flex justify-center items-center">
<p class="text-sm">Non-profit</p>
<p class="text-sm">{{business.business_type}}</p>
</div>
<div class="w-[20%] h-full border-r border-gray-300 flex justify-center items-center">
<p class="text-sm">2022</p>
<p class="text-sm">{{business.financial_number}}</p>
</div>
<div class="w-[15%] h-full flex justify-center items-center gap-3">
<a href="{% url 'businessdetails' %}">
<a href="{% url 'businessdetails' business.business_id %}">
<div class="text-[18px] text-blue-500 cursor-pointer">
<i class="fa fa-eye"></i>
</div>
@ -128,6 +129,7 @@
</div>
</div>
</div>
{% endfor %}
</div>
</div>

@ -176,7 +176,7 @@
<p class="text-sm">{{customer.business.financial_number}}</p>
</div>
<div class="w-[15%] h-full flex justify-center items-center gap-3">
<a href="{% url 'businessdetails' %}">
<a href="{% url 'businessdetails' customer.business.business_id %}">
<div class="text-[18px] text-blue-500 cursor-pointer">
<i class="fa fa-eye"></i>
</div>
@ -209,18 +209,20 @@
<div class="w-full h-fit mt-2">
{% for latest in latest_statuses %}
<!-- 1ST ROW -->
<div class="w-full flex flex-col py-3">
<div class="w-full flex flex-col justify-center items-start gap-2">
<div class="w-full flex justify-between items-center gap-2">
<div class="flex justify-start gap-2">
<div class="w-[45px] h-[45px] rounded-full">
<img src='{% static "images/avatar.svg" %}' alt="user profile"
class="w-full h-full object-cover">
<img src='{{latest.staff.image.url}}' alt="user profile"
class="w-full h-full object-cover rounded-full">
</div>
<div class="flex flex-col">
<h1 class="text-sm text-slate-700 font-semibold">Nataly</h1>
<p class="text-sm text-gray-500">11:30 AM</p>
<h1 class="text-sm text-slate-700 font-semibold">{{latest.staff.first_name}}
{{latest.staff.last_name}}</h1>
<p class="text-sm text-gray-500">{{latest.time}}</p>
</div>
</div>
<div class="cursor-pointer">
@ -230,7 +232,7 @@
<!-- Status -->
<div class="w-full">
<p class="text-sm text-gray-500">Closed - Create the Osina home page</p>
<p class="text-sm text-gray-500">{{latest.text}}</p>
</div>
<!-- Add comment section -->
@ -243,77 +245,7 @@
</div>
</div>
</div>
<!-- 2NT ROW -->
<div class="w-full flex flex-col py-3">
<div class="w-full flex flex-col justify-center items-start gap-2">
<div class="w-full flex justify-between items-center gap-2">
<div class="flex justify-start gap-2">
<div class="w-[45px] h-[45px] rounded-full">
<img src='{% static "images/avatar2.png" %}' alt="user profile"
class="w-full h-full object-cover">
</div>
<div class="flex flex-col">
<h1 class="text-sm text-slate-700 font-semibold">Salim</h1>
<p class="text-sm text-gray-500">11:30 AM</p>
</div>
</div>
<div class="cursor-pointer">
<i class="fa fa-thumbs-up" style="color: rgb(184, 184, 184); font-size: 15px;"></i>
</div>
</div>
<!-- Status -->
<div class="w-full">
<p class="text-sm text-gray-500">Closed - Create the Osina home page</p>
</div>
<!-- Add comment section -->
<div class="w-full h-fit flex justify-between items-center border border-gray-200 mt-2 rounded-md">
<input type="text" placeholder="Add Comment..."
class="outline-none text-gray-500 p-2 w-[100%] text-sm h-[40px] rounded-tl-md rounded-bl-md">
<button class="w-fit px-3 py-2 bg-slate-800 rounded-tr-md rounded-br-md">
<i class="fa fa-send" style="color: white; font-size: 15px;"></i>
</button>
</div>
</div>
</div>
<!-- 3RD ROW -->
<div class="w-full flex flex-col py-3">
<div class="w-full flex flex-col justify-center items-start gap-2">
<div class="w-full flex justify-between items-center gap-2">
<div class="flex justify-start gap-2">
<div class="w-[45px] h-[45px] rounded-full">
<img src='{% static "images/avatar3.png" %}' alt="user profile"
class="w-full h-full object-cover">
</div>
<div class="flex flex-col">
<h1 class="text-sm text-slate-700 font-semibold">Emile</h1>
<p class="text-sm text-gray-500">11:30 AM</p>
</div>
</div>
<div class="cursor-pointer">
<i class="fa fa-thumbs-up" style="color: rgb(184, 184, 184); font-size: 15px;"></i>
</div>
</div>
<!-- Status -->
<div class="w-full">
<p class="text-sm text-gray-500">Closed - Create the Osina home page</p>
</div>
<!-- Add comment section -->
<div class="w-full h-fit flex justify-between items-center border border-gray-200 mt-2 rounded-md">
<input type="text" placeholder="Add Comment..."
class="outline-none text-gray-500 p-2 w-[100%] text-sm h-[40px] rounded-tl-md rounded-bl-md">
<button class="w-fit px-3 py-2 bg-slate-800 rounded-tr-md rounded-br-md">
<i class="fa fa-send" style="color: white; font-size: 15px;"></i>
</button>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
</div>

@ -60,9 +60,9 @@
<div class="w-[74.5%] bg-white h-fit rounded-md shadow-md p-5">
<div class="w-full bg-gray-300 rounded-t-md flex flex-col justify-center items-center py-2 gap-3 mt-[50px]">
<div class="w-[100px] h-[100px] rounded-full mt-[-63px] border border-gray-300">
<img src="{% static 'images/avatar.svg' %}" alt="" class="w-full h-full object-cover rounded-full">
<img src="{{staff.image.url}}" alt="" class="w-full h-full object-cover rounded-full">
</div>
<h1 class="text-3xl text-white font-semibold">Nataly Ab</h1>
<h1 class="text-3xl text-white font-semibold">{{staff.first_name}} {{staff.last_name}}</h1>
</div>
<div class="w-full h-[70px] flex justify-end items-center bg-gray-100 shadow-md rounded-md px-3 py-1 mt-4">
<div class="flex justify-end items-center gap-3">
@ -77,25 +77,11 @@
</div>
</div>
<div class="w-full flex flex-col gap-4 mt-5">
<div>
<p class="text-gray-500 text-xl">Username: <span
class="text-slate-800 text-xl font-semibold">Nataly</span></p>
</div>
<div>
<p class="text-gray-500 text-xl">Password: <span class="text-slate-800 text-xl font-semibold">--</span>
</p>
</div>
<div>
<p class="text-gray-500 text-xl">Group: <span class="text-slate-800 text-xl font-semibold">Group
1</span></p>
</div>
<div>
<p class="text-gray-500 text-xl">Position: <span class="text-slate-800 text-xl font-semibold">Developer</span></p>
<p class="text-gray-500 text-xl">Username: <span
class="text-slate-800 text-xl font-semibold">{{staff.user.username}}</span></p>
</div>
<div>
<p class="text-gray-500 text-xl">First Name: <span
class="text-slate-800 text-xl font-semibold">Nataly</span></p>
@ -108,19 +94,25 @@
<div>
<p class="text-gray-500 text-xl">Email: <span
class="text-slate-800 text-xl font-semibold">nataly.aw@ositcom.net</span></p>
class="text-slate-800 text-xl font-semibold">{{staff.email}}</span></p>
</div>
<div>
<p class="text-gray-500 text-xl">Mobile Number: <span
class="text-slate-800 text-xl font-semibold">71196733</span></p>
class="text-slate-800 text-xl font-semibold">{{staff.mobile_number}}</span></p>
</div>
<div>
<p class="text-gray-500 text-xl">Position: <span class="text-slate-800 text-xl font-semibold">{{staff.staff_position}}</span></p>
</div>
<div>
<p class="text-gray-500 text-xl">Active: <span
class="text-slate-800 text-xl font-semibold">True</span></p>
class="text-slate-800 text-xl font-semibold">{{staff.active}}</span></p>
</div>
<div>
<p class="text-gray-500 text-xl">Intern: <span
class="text-slate-800 text-xl font-semibold">False</span></p>
class="text-slate-800 text-xl font-semibold">{{staff.intern}}</span></p>
</div>
</div>
</div>

@ -96,17 +96,12 @@
<!-- TABLE BODY -->
<div class="w-full">
<!-- 1st row -->
{% for position in staffpositions %}
<div class="w-full h-[60px] flex justify-between items-center border-b border-gray-300">
<div class="w-[60%] h-full border-r border-gray-300 flex justify-center items-center">
<p class="text-gray-500">Developer</p>
<p class="text-gray-500">{{position.name}}</p>
</div>
<div class="w-[40%] h-full flex justify-center items-center gap-3">
<a>
<div class="text-[15px] text-blue-500 cursor-pointer">
<i class="fa fa-eye"></i>
</div>
</a>
<a href="{% url 'editstaffposition' %}">
<div class="text-[15px] text-blue-500 cursor-pointer">
<i class="fa fa-edit"></i>
@ -117,6 +112,7 @@
</div>
</div>
</div>
{% endfor %}
</div>
</div>
</div>

@ -117,7 +117,7 @@
<p class="text-gray-500">{{staff.email}}</p>
</div>
<div class="w-[20%] h-full flex justify-center items-center gap-3">
<a href="{% url 'userdetails' %}">
<a href="{% url 'userdetails' staff.staff_id %}">
<div class="text-[15px] text-blue-500 cursor-pointer">
<i class="fa fa-eye"></i>
</div>

@ -121,54 +121,20 @@
<h1 class="text-2xl text-slate-700 text-center font-semibold">USERS ACTIVITY</h1>
<div class="w-full h-fit mt-2">
{% for latest in latest_statuses %}
<!-- 1ST ROW -->
<div class="w-full flex flex-col py-3">
<div class="w-full flex flex-col justify-center items-start gap-2">
<div class="w-full flex justify-between items-center gap-2">
<div class="flex justify-start gap-2">
<div class="w-[45px] h-[45px] rounded-full">
<img src='{% static "images/avatar.svg" %}' alt="user profile"
class="w-full h-full object-cover">
</div>
<div class="flex flex-col">
<h1 class="text-sm text-slate-700 font-semibold">Nataly</h1>
<p class="text-sm text-gray-500">11:30 AM</p>
</div>
</div>
<div class="cursor-pointer">
<i class="fa fa-thumbs-up" style="color: rgb(184, 184, 184); font-size: 15px;"></i>
</div>
</div>
<!-- Status -->
<div class="w-full">
<p class="text-sm text-gray-500">Closed - Create the Osina home page</p>
</div>
<!-- Add comment section -->
<div class="w-full h-fit flex justify-between items-center border border-gray-200 mt-2 rounded-md">
<input type="text" placeholder="Add Comment..."
class="outline-none text-gray-500 p-2 w-[100%] text-sm h-[40px] rounded-tl-md rounded-bl-md">
<button class="w-fit px-3 py-2 bg-slate-800 rounded-tr-md rounded-br-md">
<i class="fa fa-send" style="color: white; font-size: 15px;"></i>
</button>
</div>
</div>
</div>
<!-- 2NT ROW -->
<div class="w-full flex flex-col py-3">
<div class="w-full flex flex-col justify-center items-start gap-2">
<div class="w-full flex justify-between items-center gap-2">
<div class="flex justify-start gap-2">
<div class="w-[45px] h-[45px] rounded-full">
<img src='{% static "images/avatar2.png" %}' alt="user profile"
class="w-full h-full object-cover">
<img src='{{latest.staff.image.url}}' alt="user profile"
class="w-full h-full object-cover rounded-full">
</div>
<div class="flex flex-col">
<h1 class="text-sm text-slate-700 font-semibold">Salim</h1>
<p class="text-sm text-gray-500">11:30 AM</p>
<h1 class="text-sm text-slate-700 font-semibold">{{latest.staff.first_name}}
{{latest.staff.last_name}}</h1>
<p class="text-sm text-gray-500">{{latest.time}}</p>
</div>
</div>
<div class="cursor-pointer">
@ -178,7 +144,7 @@
<!-- Status -->
<div class="w-full">
<p class="text-sm text-gray-500">Closed - Create the Osina home page</p>
<p class="text-sm text-gray-500">{{latest.text}}</p>
</div>
<!-- Add comment section -->
@ -191,42 +157,7 @@
</div>
</div>
</div>
<!-- 3RD ROW -->
<div class="w-full flex flex-col py-3">
<div class="w-full flex flex-col justify-center items-start gap-2">
<div class="w-full flex justify-between items-center gap-2">
<div class="flex justify-start gap-2">
<div class="w-[45px] h-[45px] rounded-full">
<img src='{% static "images/avatar3.png" %}' alt="user profile"
class="w-full h-full object-cover">
</div>
<div class="flex flex-col">
<h1 class="text-sm text-slate-700 font-semibold">Emile</h1>
<p class="text-sm text-gray-500">11:30 AM</p>
</div>
</div>
<div class="cursor-pointer">
<i class="fa fa-thumbs-up" style="color: rgb(184, 184, 184); font-size: 15px;"></i>
</div>
</div>
<!-- Status -->
<div class="w-full">
<p class="text-sm text-gray-500">Closed - Create the Osina home page</p>
</div>
<!-- Add comment section -->
<div class="w-full h-fit flex justify-between items-center border border-gray-200 mt-2 rounded-md">
<input type="text" placeholder="Add Comment..."
class="outline-none text-gray-500 p-2 w-[100%] text-sm h-[40px] rounded-tl-md rounded-bl-md">
<button class="w-fit px-3 py-2 bg-slate-800 rounded-tr-md rounded-br-md">
<i class="fa fa-send" style="color: white; font-size: 15px;"></i>
</button>
</div>
</div>
</div>
{% endfor %}
</div>
</div>

@ -352,135 +352,43 @@
<h1 class="text-2xl text-slate-700 text-center font-semibold">USERS ACTIVITY</h1>
<div class="w-full h-fit mt-2">
{% for latest in latest_statuses %}
<!-- 1ST ROW -->
<div class="w-full flex flex-col py-3">
<div class="w-full flex justify-start gap-2 items-center">
<div class="w-[45px] h-[45px] rounded-full">
<img src="../images/avatar.svg" alt="user profile"
class="w-full h-full object-cover">
</div>
<div class="flex flex-col">
<h1 class="text-sm text-slate-700 font-semibold">Nataly</h1>
<p class="text-sm text-gray-500">11:30 AM</p>
<p class="text-sm text-gray-500">Closed - Create the Osina home page</p>
</div>
<div class="cursor-pointer">
<i class="fa fa-thumbs-up" style="color: rgb(184, 184, 184); font-size: 15px;"></i>
</div>
</div>
<!-- Add comment section -->
<div
class="w-full h-fit flex justify-between items-center border border-gray-200 mt-2 rounded-md">
<input type="text" placeholder="Add Comment..."
class="outline-none text-gray-500 p-2 w-[100%] text-sm h-[40px] rounded-tl-md rounded-bl-md">
<button class="w-fit px-3 py-2 bg-slate-800 rounded-tr-md rounded-br-md">
<i class="fa fa-send" style="color: white; font-size: 15px;"></i>
</button>
</div>
</div>
<div class="w-full flex flex-col py-3">
<div class="w-full flex justify-start gap-2 items-center">
<div class="w-[45px] h-[45px] rounded-full">
<img src="../images/avatar2.png" alt="user profile"
class="w-full h-full object-cover">
</div>
<div class="flex flex-col">
<h1 class="text-sm text-slate-700 font-semibold">Salim</h1>
<p class="text-sm text-gray-500">11:30 AM</p>
<p class="text-sm text-gray-500">Closed - Create the Osina home page</p>
</div>
<div class="cursor-pointer">
<i class="fa fa-thumbs-up" style="color: rgb(184, 184, 184); font-size: 15px;"></i>
</div>
</div>
<!-- Add comment section -->
<div
class="w-full h-fit flex justify-between items-center border border-gray-200 mt-2 rounded-md">
<input type="text" placeholder="Add Comment..."
class="outline-none text-gray-500 p-2 w-[100%] text-sm h-[40px] rounded-tl-md rounded-bl-md">
<button class="w-fit px-3 py-2 bg-slate-800 rounded-tr-md rounded-br-md">
<i class="fa fa-send" style="color: white; font-size: 15px;"></i>
</button>
</div>
</div>
<div class="w-full flex flex-col py-3">
<div class="w-full flex justify-start gap-2 items-center">
<div class="w-[45px] h-[45px] rounded-full">
<img src="../images/avatar3.png" alt="user profile"
class="w-full h-full object-cover">
</div>
<div class="flex flex-col">
<h1 class="text-sm text-slate-700 font-semibold">Emile</h1>
<p class="text-sm text-gray-500">12:30 PM</p>
<p class="text-sm text-gray-500">Working - Create the Osina home page</p>
</div>
<div class="cursor-pointer">
<i class="fa fa-thumbs-up" style="color: rgb(184, 184, 184); font-size: 15px;"></i>
</div>
</div>
<!-- Add comment section -->
<div
class="w-full h-fit flex justify-between items-center border border-gray-200 mt-2 rounded-md">
<input type="text" placeholder="Add Comment..."
class="outline-none text-gray-500 p-2 w-[100%] text-sm h-[40px] rounded-tl-md rounded-bl-md">
<button class="w-fit px-3 py-2 bg-slate-800 rounded-tr-md rounded-br-md">
<i class="fa fa-send" style="color: white; font-size: 15px;"></i>
</button>
</div>
</div>
<div class="w-full flex flex-col py-3">
<div class="w-full flex justify-start gap-2 items-center">
<div class="w-[45px] h-[45px] rounded-full">
<img src="../images/avatar.svg" alt="user profile"
class="w-full h-full object-cover">
</div>
<div class="flex flex-col">
<h1 class="text-sm text-slate-700 font-semibold">Nataly</h1>
<p class="text-sm text-gray-500">11:30 AM</p>
<p class="text-sm text-gray-500">Closed - Create Enooma home page</p>
</div>
<div class="cursor-pointer">
<i class="fa fa-thumbs-up" style="color: rgb(184, 184, 184); font-size: 15px;"></i>
</div>
</div>
<!-- Add comment section -->
<div
class="w-full h-fit flex justify-between items-center border border-gray-200 mt-2 rounded-md">
<input type="text" placeholder="Add Comment..."
class="outline-none text-gray-500 p-2 w-[100%] text-sm h-[40px] rounded-tl-md rounded-bl-md">
<button class="w-fit px-3 py-2 bg-slate-800 rounded-tr-md rounded-br-md">
<i class="fa fa-send" style="color: white; font-size: 15px;"></i>
</button>
</div>
</div>
<div class="w-full flex flex-col py-3">
<div class="w-full flex justify-start gap-2 items-center">
<div class="w-[45px] h-[45px] rounded-full">
<img src="../images/avatar2.png" alt="user profile"
class="w-full h-full object-cover">
<div class="w-full flex flex-col justify-center items-start gap-2">
<div class="w-full flex justify-between items-center gap-2">
<div class="flex justify-start gap-2">
<div class="w-[45px] h-[45px] rounded-full">
<img src='{{latest.staff.image.url}}' alt="user profile"
class="w-full h-full object-cover rounded-full">
</div>
<div class="flex flex-col">
<h1 class="text-sm text-slate-700 font-semibold">{{latest.staff.first_name}}
{{latest.staff.last_name}}</h1>
<p class="text-sm text-gray-500">{{latest.time}}</p>
</div>
</div>
<div class="cursor-pointer">
<i class="fa fa-thumbs-up" style="color: rgb(184, 184, 184); font-size: 15px;"></i>
</div>
</div>
<div class="flex flex-col">
<h1 class="text-sm text-slate-700 font-semibold">Salim</h1>
<p class="text-sm text-gray-500">11:30 AM</p>
<p class="text-sm text-gray-500">Closed - Create the Osina home page</p>
<!-- Status -->
<div class="w-full">
<p class="text-sm text-gray-500">{{latest.text}}</p>
</div>
<div class="cursor-pointer">
<i class="fa fa-thumbs-up" style="color: rgb(184, 184, 184); font-size: 15px;"></i>
<!-- Add comment section -->
<div class="w-full h-fit flex justify-between items-center border border-gray-200 mt-2 rounded-md">
<input type="text" placeholder="Add Comment..."
class="outline-none text-gray-500 p-2 w-[100%] text-sm h-[40px] rounded-tl-md rounded-bl-md">
<button class="w-fit px-3 py-2 bg-slate-800 rounded-tr-md rounded-br-md">
<i class="fa fa-send" style="color: white; font-size: 15px;"></i>
</button>
</div>
</div>
<!-- Add comment section -->
<div
class="w-full h-fit flex justify-between items-center border border-gray-200 mt-2 rounded-md">
<input type="text" placeholder="Add Comment..."
class="outline-none text-gray-500 p-2 w-[100%] text-sm h-[40px] rounded-tl-md rounded-bl-md">
<button class="w-fit px-3 py-2 bg-slate-800 rounded-tr-md rounded-br-md">
<i class="fa fa-send" style="color: white; font-size: 15px;"></i>
</button>
</div>
</div>
{% endfor %}
</div>
</div>
</div>

Loading…
Cancel
Save