emile 1 year ago
parent f4bbc9c9cc
commit 0593f7c9e1

Binary file not shown.

@ -1,19 +1,11 @@
from django.contrib.auth.forms import UserCreationForm
from django import forms
from django.contrib.auth.models import User
from .models import *
class CustomLoginForm(forms.Form):
username = forms.CharField(label='Username', max_length=150)
password = forms.CharField(label='Password', widget=forms.PasswordInput)
class SignUpForm(forms.ModelForm):
class Meta:
model = CustomerProfile
fields = ['first_name', 'last_name', 'email', 'password', 'mobile_number', 'status', 'reference', 'personal_website', 'business']
class StaffSignUpForm(forms.ModelForm):
class Meta:
model = StaffProfile
fields = ['first_name', 'last_name', 'image', 'email', 'mobile_number', 'password', 'staff_position', 'intern', 'active']

@ -0,0 +1,45 @@
# Generated by Django 4.2.5 on 2024-01-03 13:02
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('osinacore', '0041_dailyreport'),
]
operations = [
migrations.RemoveField(
model_name='customerprofile',
name='email',
),
migrations.RemoveField(
model_name='customerprofile',
name='first_name',
),
migrations.RemoveField(
model_name='customerprofile',
name='last_name',
),
migrations.RemoveField(
model_name='customerprofile',
name='password',
),
migrations.RemoveField(
model_name='staffprofile',
name='email',
),
migrations.RemoveField(
model_name='staffprofile',
name='first_name',
),
migrations.RemoveField(
model_name='staffprofile',
name='last_name',
),
migrations.RemoveField(
model_name='staffprofile',
name='password',
),
]

@ -62,11 +62,7 @@ class Business(models.Model):
class CustomerProfile(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE, blank=True)
first_name = models.CharField(max_length=50, blank=True)
last_name = models.CharField(max_length=50, blank=True)
email = models.EmailField(unique=True,blank=True)
mobile_number = models.CharField(max_length=50, blank=True)
password = models.CharField(max_length=128, blank=True)
personal_website = models.URLField(null=True, blank=True)
STATUS_CHOICES = (
('Active', 'Active'),
@ -102,13 +98,9 @@ class StaffPosition(models.Model):
class StaffProfile(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE)
first_name = models.CharField(max_length=50)
last_name = models.CharField(max_length=50)
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)
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

@ -60,23 +60,19 @@ def home(request, *args, **kwargs):
# Non-superadmin user can only see their assigned tasks
tasks = Task.objects.filter(Q(assigned_to=request.user.staffprofile) & (Q(status='Open') | Q(status='Working On'))).order_by('-id')
# Initialize last_note_color with a default color
last_note_color = 'black'
# Fetch the color of the last recent note
if recent_note:
last_note_color = recent_note.color
context = {
'notes': notes,
'recent_note': recent_note,
'tasks': tasks,
'last_note_color': last_note_color,
}
return render(request, 'index.html', context)
#Listing Pages
@login_required
def my_projects(request, *args, **kwargs):
@ -204,6 +200,12 @@ def staff_positions(request):
return render(request, 'listing_pages/staff-positions.html', context)
#Details pages
@login_required
def detailed_project(request, project_id):
@ -270,6 +272,10 @@ def detailed_task(request, task_id):
return render(request, 'details_pages/task-details.html', context)
#Add Pages
@login_required
def createtask_project(request, project_id):
@ -288,9 +294,9 @@ def createtask_project(request, project_id):
@login_required
def create_project(request):
staffs = StaffProfile.objects.all().order_by('-first_name')
staffs = StaffProfile.objects.all().order_by('-id')
project_types = ProjectType.objects.all()
customers = CustomerProfile.objects.all().order_by('-first_name')
customers = CustomerProfile.objects.all().order_by('-id')
context = {
'staffs' : staffs,
'project_types' : project_types,
@ -382,7 +388,6 @@ def add_daily_report(request):
# Modals views
def add_note_modal(request, *args, **kwargs):
context = {
@ -504,7 +509,6 @@ def staff_position_modal(request):
#Fetch Views
def fetch_related_tasks(request):
# Get the selected epic ID from the request
epic_id = request.GET.get("epic_id")
@ -530,9 +534,9 @@ def fetch_related_tasks(request):
#Save Functions
#Save Functions
@login_required
def save_note(request):
if request.method == 'POST':
@ -615,8 +619,6 @@ def save_epic(request):
try:
project = Project.objects.get(id=project_id)
except Project.DoesNotExist:
# Handle the case where the project with the provided ID doesn't exist
# You might want to display an error message or redirect to an appropriate page.
pass
start_date = request.POST.get('start_date')
@ -708,7 +710,6 @@ def save_business(request):
email= request.POST.get('email')
financial_number = request.POST.get('financial_number')
phone_number = request.POST.get('phone_number')
# vat = request.POST.get('vat')
vat = request.POST.get('vat')
if vat == 'true':
vat = True
@ -765,12 +766,12 @@ def save_business_modal(request):
)
business.save()
# Fetch the updated options for the <select> element
businesses = Business.objects.all()
updated_options = [{'id': business.id, 'name': business.name} for business in businesses]
# Return the updated options as JSON response
return JsonResponse(updated_options, safe=False)
@ -779,77 +780,74 @@ def save_business_modal(request):
def save_customer(request):
if request.method == 'POST':
form = SignUpForm(request.POST)
if form.is_valid():
email = form.cleaned_data['email']
first_name = form.cleaned_data['first_name'].replace(" ", "")
last_name = form.cleaned_data['last_name'].replace(" ", "")
email = request.POST.get('email').lower()
first_name = request.POST.get('first_name')
last_name = request.POST.get('last_name')
username = f"{first_name.lower()}{last_name.lower()}"
original_username = username
counter = 1 # Initialize a counter to add numbers
counter = 1
while User.objects.filter(username=username).exists():
# If the username already exists, append the counter to it
username = f"{original_username.lower()}{counter}"
counter += 1
user = User.objects.create_user(
username=username,
email=email,
password=form.cleaned_data['password']
password=request.POST.get('password2')
)
user.first_name = form.cleaned_data['first_name']
user.last_name = form.cleaned_data['last_name']
user.first_name = last_name.lower().capitalize()
user.last_name = last_name.lower().capitalize()
user.save()
customer_profile = form.save(commit=False)
customer_profile.user = user
customer_profile.save()
referenceid = request.POST.get('referenceid')
reference = get_object_or_404(Reference, id=referenceid)
CustomerProfile.objects.create(
user=user,
mobile_number = request.POST.get('mobile_number'),
personal_website = request.POST.get('personal_website'),
status = request.POST.get('status'),
reference = reference,
)
return redirect('customers')
def save_staff(request):
if request.method == 'POST':
form = StaffSignUpForm(request.POST, request.FILES)
if form.is_valid():
# Extract cleaned data from the form
email = form.cleaned_data['email']
first_name = form.cleaned_data['first_name'].replace(" ", "")
last_name = form.cleaned_data['last_name'].replace(" ", "")
email = request.POST.get('email').lower()
first_name = request.POST.get('first_name')
last_name = request.POST.get('last_name')
username = f"{first_name.lower()}{last_name.lower()}"
original_username = username
counter = 1 # Initialize a counter to add numbers
counter = 1
while User.objects.filter(username=username).exists():
# If the username already exists, append the counter to it
username = f"{original_username.lower()}{counter}"
counter += 1
# Create a User instance
user = User.objects.create_user(
username=username,
email=email,
password=form.cleaned_data['password']
password= request.POST.get('password2')
)
user.first_name = form.cleaned_data['first_name']
user.last_name = form.cleaned_data['last_name']
user.first_name = first_name.lower().capitalize()
user.last_name = last_name.lower().capitalize()
user.save()
# Create a StaffProfile instance with the associated user
staff_profile = form.save(commit=False)
staff_profile.user = user
# Attach the uploaded image to the StaffProfile instance
staff_profile.image = form.cleaned_data['image']
staff_profile.save()
else:
# Print form errors to see why it's not valid
print('Form is not valid. Errors:')
print(form.errors)
staff_positionid = request.POST.get('staff_position')
staff_position = get_object_or_404(StaffPosition, id=staff_positionid)
StaffProfile.objects.create(
user=user,
image = request.FILES.get('image'),
mobile_number = request.POST.get('mobile_number'),
active = request.POST.get('active'),
intern = request.POST.get('intern'),
staff_position = staff_position,
)
return redirect('users')
@ -1112,8 +1110,11 @@ def save_dailyreport(request):
# EDIT TEMPLATES
# EDIT TEMPLATES
@login_required
def edit_project(request, *args, **kwargs):
@ -1222,6 +1223,10 @@ def edit_tag(request, tag_id):
# TO UPDATE THE STATUS CONTAINER
def get_updated_last_status(request):
if request.user.is_authenticated:

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 868 KiB

@ -34,7 +34,7 @@
<option value="Terminated">Terminated</option>
</select>
<select name="reference"
<select name="referenceid"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500"
required>
<option value="" selected disabled>Reference</option>
@ -92,7 +92,9 @@
</script>
<input name="password" type="password" placeholder="Password"
<input name="password1" type="password" placeholder="Password"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md" required>
<input name="password2" type="password" placeholder="Password"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md" required>
<div class="w-full flex justify-center items-center mt-3">

@ -120,7 +120,10 @@
</script>
<input name="password" type="password" placeholder="Password"
<input name="password1" type="password" placeholder="Password"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md" required>
<input name="password2" type="password" placeholder="Password"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md" required>
<div class="w-full flex justify-center items-center mt-3">

@ -26,7 +26,7 @@
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500">
<option value="" selected disabled>Project Manager</option>
{% for staff in staffs %}
<option value="{{staff.user.username}}">{{staff.first_name}} {{staff.last_name}}</option>
<option value="{{staff.user.username}}">{{staff.user.first_name}} {{staff.user.last_name}}</option>
{% endfor %}
</select>
@ -35,7 +35,7 @@
multiple>
<option value="" selected disabled>Member(s)</option>
{% for staff in staffs %}
<option value="{{staff.user.username}}">{{staff.first_name}} {{staff.last_name}}</option>
<option value="{{staff.user.username}}">{{staff.user.first_name}} {{staff.user.last_name}}</option>
{% endfor %}
</select>

@ -128,46 +128,10 @@
<!-- RIGHT SIDE / USERS ACTIVITY -->
<div class="w-[23%] bg-white h-fit rounded-md shadow-md p-5">
<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='{{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>
<!-- Status -->
<div class="w-full">
<p class="text-sm text-gray-500">{{latest.text}}</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 class="w-full h-fit mt-2" id="activitiesContainer">
{% include 'recent-activities.html' %}
</div>
</div>
</div>

@ -206,46 +206,10 @@
<!-- RIGHT SIDE / USERS ACTIVITY -->
<div class="w-[23%] bg-white h-fit rounded-md shadow-md p-5">
<h1 class="text-2xl text-slate-700 text-center font-semibold">USERS ACTIVITY</h1>
<div class="w-full h-fit mt-2">
<div class="w-full h-fit mt-2" id="activitiesContainer">
{% include 'recent-activities.html' %}
{% 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='{{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>
<!-- Status -->
<div class="w-full">
<p class="text-sm text-gray-500">{{latest.text}}</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>

@ -527,45 +527,10 @@
<!-- RIGHT SIDE / USERS ACTIVITY -->
<div class="w-[23%] bg-white h-fit rounded-md shadow-md p-5">
<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='{{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="w-full h-fit mt-2" id="activitiesContainer">
<!-- Status -->
<div class="w-full">
<p class="text-sm text-gray-500">{{latest.text}}</p>
</div>
{% include 'recent-activities.html' %}
<!-- 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>

@ -120,112 +120,9 @@
<!-- RIGHT SIDE / USERS ACTIVITY -->
<div class="w-[23%] bg-white h-fit rounded-md shadow-md p-5">
<h1 class="text-2xl text-slate-700 text-center font-semibold">USERS ACTIVITY</h1>
<div class="w-full h-fit mt-2">
<div class="w-full h-fit mt-2" id="activitiesContainer">
<!-- 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">
</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>
{% include 'recent-activities.html' %}
</div>
</div>

@ -354,45 +354,10 @@
<!-- RIGHT SIDE / USERS ACTIVITY -->
<div class="w-[23%] bg-white h-fit rounded-md shadow-md p-5">
<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='{{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="w-full h-fit mt-2" id="activitiesContainer">
<!-- Status -->
<div class="w-full">
<p class="text-sm text-gray-500">{{latest.text}}</p>
</div>
{% include 'recent-activities.html' %}
<!-- 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>

@ -140,45 +140,9 @@
<!-- RIGHT SIDE / USERS ACTIVITY -->
<div class="w-[23%] bg-white h-fit rounded-md shadow-md p-5">
<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='{{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="w-full h-fit mt-2" id="activitiesContainer">
<!-- Status -->
<div class="w-full">
<p class="text-sm text-gray-500">{{latest.text}}</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 %}
{% include 'recent-activities.html' %}
</div>
</div>

@ -111,10 +111,10 @@
<!-- 1st row -->
<div class="w-full h-[60px] flex justify-between items-center border-b border-gray-300">
<div class="w-[20%] h-full border-r border-gray-300 flex justify-center items-center">
<p class="text-gray-500">{{customer.first_name}}</p>
<p class="text-gray-500">{{customer.user.first_name}}</p>
</div>
<div class="w-[20%] h-full border-r border-gray-300 flex justify-center items-center">
<p class="text-gray-500">{{customer.last_name}}</p>
<p class="text-gray-500">{{customer.user.last_name}}</p>
</div>
<div class="w-[15%] h-full border-r border-gray-300 flex justify-center items-center">
<p class="text-gray-500">{{customer.user.username}}</p>
@ -163,49 +163,12 @@
</div>
</div>
</div>
<!-- RIGHT SIDE / USERS ACTIVITY -->
<div class="w-[23%] bg-white h-fit rounded-md shadow-md p-5">
<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='{{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>
<!-- Status -->
<div class="w-full">
<p class="text-sm text-gray-500">{{latest.text}}</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 class="w-full h-fit mt-2" id="activitiesContainer">
{% include 'recent-activities.html' %}
</div>
</div>

@ -118,47 +118,9 @@
<!-- RIGHT SIDE / USERS ACTIVITY -->
<div class="w-[23%] bg-white h-fit rounded-md shadow-md p-5">
<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='{{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>
<!-- Status -->
<div class="w-full">
<p class="text-sm text-gray-500">{{latest.text}}</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 class="w-full h-fit mt-2" id="activitiesContainer">
{% include 'recent-activities.html' %}
</div>
</div>

@ -119,46 +119,9 @@
<!-- RIGHT SIDE / USERS ACTIVITY -->
<div class="w-[23%] bg-white h-fit rounded-md shadow-md p-5">
<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='{{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>
<!-- Status -->
<div class="w-full">
<p class="text-sm text-gray-500">{{latest.text}}</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 class="w-full h-fit mt-2" id="activitiesContainer">
{% include 'recent-activities.html' %}
</div>
</div>

@ -176,46 +176,10 @@
<!-- RIGHT SIDE / USERS ACTIVITY -->
<div class="w-[23%] bg-white h-fit rounded-md shadow-md p-5">
<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='{{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="w-full h-fit mt-2" id="activitiesContainer">
<!-- Status -->
<div class="w-full">
<p class="text-sm text-gray-500">{{latest.text}}</p>
</div>
{% include 'recent-activities.html' %}
<!-- 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>

@ -125,46 +125,9 @@
<!-- RIGHT SIDE / USERS ACTIVITY -->
<div class="w-[23%] bg-white h-fit rounded-md shadow-md p-5">
<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='{{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>
<!-- Status -->
<div class="w-full">
<p class="text-sm text-gray-500">{{latest.text}}</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 class="w-full h-fit mt-2" id="activitiesContainer">
{% include 'recent-activities.html' %}
</div>
</div>

@ -122,47 +122,9 @@
<!-- RIGHT SIDE / USERS ACTIVITY -->
<div class="w-[23%] bg-white h-fit rounded-md shadow-md p-5">
<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='{{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>
<!-- Status -->
<div class="w-full">
<p class="text-sm text-gray-500">{{latest.text}}</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 class="w-full h-fit mt-2" id="activitiesContainer">
{% include 'recent-activities.html' %}
</div>
</div>

@ -110,11 +110,11 @@
</div>
</div>
<div class="w-[50%] flex justify-start items-center">
<p class="text-gray-500">{{staff.first_name}} {{staff.last_name}}</p>
<p class="text-gray-500">{{staff.user.first_name}} {{staff.user.last_name}}</p>
</div>
</div>
<div class="w-[40%] h-full border-r border-gray-300 flex justify-center items-center">
<p class="text-gray-500">{{staff.email}}</p>
<p class="text-gray-500">{{staff.user.email}}</p>
</div>
<div class="w-[20%] h-full flex justify-center items-center gap-3">
<a href="{% url 'userdetails' staff.staff_id %}">
@ -142,46 +142,9 @@
<!-- RIGHT SIDE / USERS ACTIVITY -->
<div class="w-[23%] bg-white h-fit rounded-md shadow-md p-5">
<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='{{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>
<!-- Status -->
<div class="w-full">
<p class="text-sm text-gray-500">{{latest.text}}</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 class="w-full h-fit mt-2" id="activitiesContainer">
{% include 'recent-activities.html' %}
</div>
</div>

@ -119,45 +119,9 @@
<!-- RIGHT SIDE / USERS ACTIVITY -->
<div class="w-[23%] bg-white h-fit rounded-md shadow-md p-5">
<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='{{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>
<!-- Status -->
<div class="w-full">
<p class="text-sm text-gray-500">{{latest.text}}</p>
</div>
<div class="w-full h-fit mt-2" id="activitiesContainer">
<!-- 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 %}
{% include 'recent-activities.html' %}
</div>
</div>

@ -222,45 +222,10 @@
<!-- RIGHT SIDE / USERS ACTIVITY -->
<div class="w-[23%] bg-white h-fit rounded-md shadow-md p-5">
<h1 class="text-2xl text-slate-700 text-center font-semibold">USERS ACTIVITY</h1>
<div class="w-full h-fit mt-2">
<div class="w-full h-fit mt-2" id="activitiesContainer">
{% include 'recent-activities.html' %}
{% 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='{{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>
<!-- Status -->
<div class="w-full">
<p class="text-sm text-gray-500">{{latest.text}}</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>

@ -238,19 +238,13 @@
<div>
<div class="w-fit flex justify-between items-center gap-3">
{% if user.is_superuser %}
<div class="flex justify-center items-center gap-2">
<p class="text-gray-400">{{request.user.staffprofile.first_name}}
{{request.user.staffprofile.last_name}}</p>
<i class="fa fa-angle-down" style="color: grey;"></i>
</div>
{%else%}
<div class="flex justify-center items-center gap-2">
<p class="text-gray-400">{{request.user.staffprofile.first_name}}
{{request.user.staffprofile.last_name}}</p>
<p class="text-gray-400">{{request.user.first_name}}
{{request.user.last_name}}</p>
<i class="fa fa-angle-down" style="color: grey;"></i>
</div>
{% endif %}
<div class="w-[50px] h-[50px] bg-slate-600 rounded-full">
<img src='{{request.user.staffprofile.image.url}}' alt="user-image"

@ -8,8 +8,8 @@
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.status.staff.first_name}}
{{latest.status.staff.last_name}}</h1>
<h1 class="text-sm text-slate-700 font-semibold">{{latest.status.staff.user.first_name}}
{{latest.status.staff.user.last_name}}</h1>
{% if latest.time_ago == '0min ago' %}
<p class="text-sm text-gray-500">Just Now</p>
{%else %}

Loading…
Cancel
Save