small screen ui change fixed

This commit is contained in:
Faheed 2025-11-30 18:15:14 +03:00
parent 227a48b285
commit 2153de3446
11 changed files with 106 additions and 20 deletions

View File

@ -206,7 +206,9 @@ ACCOUNT_LOGIN_ON_EMAIL_CONFIRMATION = True
ACCOUNT_FORMS = {"signup": "recruitment.forms.StaffSignupForm"}
EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"
EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend"
EMAIL_HOST = "10.10.1.110"
EMAIL_PORT = 2225
# Crispy Forms Configuration
CRISPY_ALLOWED_TEMPLATE_PACKS = "bootstrap5"

View File

@ -2112,6 +2112,7 @@ class MessageForm(forms.ModelForm):
"rows": 6,
"placeholder": "Enter your message here...",
"required": True,
'spellcheck': 'true',
}
),
"message_type": forms.Select(attrs={"class": "form-select"}),
@ -2156,12 +2157,21 @@ class MessageForm(forms.ModelForm):
"""Filter job options based on user type"""
if self.user.user_type == "agency":
# Agency users can only see jobs assigned to their agency
# # Agency users can only see jobs assigned to their agency
# self.fields["job"].queryset = JobPosting.objects.filter(
# hiring_agency__user=self.user,
# status="ACTIVE"
# ).order_by("-created_at")
#
job_assignments =AgencyJobAssignment.objects.filter(
agency__user=self.user,
job__status="ACTIVE"
)
job_ids = job_assignments.values_list('job__id', flat=True)
self.fields["job"].queryset = JobPosting.objects.filter(
hiring_agency__user=self.user,
status="ACTIVE"
id__in=job_ids
).order_by("-created_at")
print(self.user)
print("Agency user job queryset:", self.fields["job"].queryset)
elif self.user.user_type == "candidate":
# Candidates can only see jobs they applied for

View File

@ -22,6 +22,18 @@ from django.db.models import F, Value, IntegerField, CharField
from django.db.models.functions import Coalesce, Cast
from django.db.models.fields.json import KeyTransform, KeyTextTransform
class EmailContent(models.Model):
subject = models.CharField(max_length=255, verbose_name=_("Subject"))
message = CKEditor5Field(verbose_name=_("Message Body"))
class Meta:
verbose_name = _("Email Content")
verbose_name_plural = _("Email Contents")
def __str__(self):
return self.subject
class CustomUser(AbstractUser):
"""Custom user model extending AbstractUser"""

View File

@ -732,3 +732,6 @@ html[dir="rtl"] .me-auto { margin-right: 0 !important; margin-left: auto !import
content: ">";
color: var(--kaauh-teal);
}

View File

@ -50,10 +50,7 @@
<nav class="navbar navbar-expand-lg navbar-dark sticky-top">
<div class="container-fluid max-width-1600">
{# --- MOBILE BRAND LOGIC: Show small logo on mobile, large on desktop (lg) --- #}
<a class="navbar-brand text-white d-block d-lg-none" href="{% url 'dashboard' %}" aria-label="Home">
<img src="{% static 'image/kaauh_green1.png' %}" alt="{% trans 'kaauh logo green bg' %}" class="navbar-brand-mobile">
</a>
<a class="navbar-brand text-white d-none d-lg-block me-4 pe-4" href="{% url 'dashboard' %}" aria-label="Home">
<img src="{% static 'image/kaauh_green1.png' %}" alt="{% trans 'kaauh logo green bg' %}" style="width: 60px; height: 60px;">
@ -118,7 +115,7 @@
<i class="fas fa-envelope"></i>
</a>
</li> {% endcomment %}
<li class="nav-item me-2">
<li class="nav-item me-2 d-none d-lg-block">
{% if LANGUAGE_CODE == 'en' %}
<form action="{% url 'set_language' %}" method="post" class="d-inline">
{% csrf_token %}
@ -137,11 +134,11 @@
</form>
{% endif %}
</li>
<li class="nav-item me-2">
<li class="nav-item me-2 d-none d-lg-block">
<a class="nav-link text-white" href="{% url 'message_list' %}">
<i class="fas fa-envelope"></i> <span>{% trans "Messages" %}</span>
</a>
</li>
</li>
<li class="nav-item dropdown">
<button
@ -189,6 +186,28 @@
</div>
</li>
<li><hr class="dropdown-divider my-1"></li>
<div>
<li class="nav-item me-3 dropdown-item py-2 px-4 d-flex align-items-center text-decoration-none text-teal d-lg-none">
{% if LANGUAGE_CODE == 'en' %}
<form action="{% url 'set_language' %}" method="post" class="d-inline">
{% csrf_token %}
<input name="next" type="hidden" value="{{ request.get_full_path }}">
<button name="language" value="ar" class="btn bg-primary-theme text-white" type="submit">
<span class="me-2">🇸🇦</span> العربية
</button>
</form>
{% elif LANGUAGE_CODE == 'ar' %}
<form action="{% url 'set_language' %}" method="post" class="d-inline">
{% csrf_token %}
<input name="next" type="hidden" value="{{ request.get_full_path }}">
<button name="language" value="en" class="btn bg-primary-theme text-white" type="submit">
<span class="me-2">🇺🇸</span> English
</button>
</form>
{% endif %}
</li>
<li class="d-lg-none"><a class="dropdown-item py-2 px-4 d-flex align-items-center text-decoration-none text-teal" href="{% url 'message_list' %}"> <i class="fas fa-envelope fs-5 me-3"></i> <span>{% trans "Messages" %}</span></a></li>
{% if request.user.is_authenticated %}
<li><a class="dropdown-item py-2 px-4 d-flex align-items-center text-decoration-none text-teal" href="{% url 'user_detail' request.user.pk %}"><i class="fas fa-user-circle me-3 fs-5"></i> <span>{% trans "My Profile" %}</span></a></li>

View File

@ -0,0 +1,35 @@
<div style="max-width: 600px; margin: 0 auto; padding: 20px; box-sizing: border-box; background-color: #ffffff;">
<p style="font-family: Arial, sans-serif; font-size: 16px; line-height: 1.5; color: #333333; margin-bottom: 20px;">
Dear {{ applicant_name }},
</p>
<p style="font-family: Arial, sans-serif; font-size: 16px; line-height: 1.6; color: #333333; margin-bottom: 15px;">
Thank you very much for your interest in the **{{ job_title }}** position at **{{ company_name }}** and for taking the time to complete the initial screening process.
</p>
<p style="font-family: Arial, sans-serif; font-size: 16px; line-height: 1.6; color: #333333; margin-bottom: 20px;">
We carefully reviewed your qualifications and application materials. While your background is certainly impressive, we have decided to move forward with other candidates whose experience was a closer match for the specific requirements of this role at this time.
</p>
<table width="100%" cellpadding="0" cellspacing="0" style="border: 1px solid #e0f2f1; background-color: #f0fdfa; border-radius: 8px; margin-bottom: 20px;">
<tr>
<td style="padding: 15px; font-family: Arial, sans-serif;">
<p style="font-size: 16px; line-height: 1.5; color: #008080; margin: 0;">
We truly appreciate you sharing your professional journey with us and encourage you to keep an eye on our <a href="{{ careers_page_link }}" style="color: #008080; text-decoration: underline;">careers page</a> for future opportunities that may be a better fit.
</p>
</td>
</tr>
</table>
<p style="font-family: Arial, sans-serif; font-size: 16px; line-height: 1.6; color: #333333; margin-top: 20px; margin-bottom: 5px;">
We wish you the very best of luck in your job search and professional endeavors.
</p>
<p style="font-family: Arial, sans-serif; font-size: 16px; line-height: 1.6; color: #333333; margin: 0;">
Sincerely,<br>
**{{ sender_name }}**<br>
**{{ sender_title }}** | **{{ company_name }}**
</p>
</div>

View File

@ -1,6 +1,6 @@
{% load i18n %}
{{ form.media }}
<div class="row">
<div class="row">
<div class="container-fluid">
@ -126,6 +126,7 @@
</div>
<style>
{{ form.media.css }}
.card {
border: none;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
@ -173,9 +174,12 @@
width: 3rem;
height: 3rem;
}
</style>
<script>
document.addEventListener('DOMContentLoaded', function() {
const form = document.getElementById('email-compose-form1');
const sendBtn = document.getElementById('send-email-btn1');
@ -491,3 +495,4 @@ document.addEventListener('DOMContentLoaded', function() {
console.log('Email compose form initialized');
});
</script>

View File

@ -267,7 +267,7 @@
<div class="table-view d-none d-lg-block active">
<div class="card shadow-sm">
<div class="table-responsive">
<table class="table table-hover align-middle mb-0">
<table class="table table-hover align-middle mb-0 d-none d-lg-block">
{# --- Corrected Multi-Row Header Structure --- #}
<thead>

View File

@ -222,8 +222,8 @@
<!-- Table View (Default) -->
<div class="table-view">
<div class="table-responsive">
<table class="table table-hover align-middle mb-0">
<div class="table-responsive d-none d-lg-block">
<table class="table table-hover align-middle mb-0 ">
<thead>
<tr>
<th scope="col">{% trans "Photo" %}</th>

View File

@ -172,8 +172,8 @@
<!-- Table View -->
<div class="table-view">
<div class="table-responsive">
<table class="table table-hover align-middle mb-0">
<div class="table-responsive d-none d-lg-block">
<table class="table table-hover align-middle mb-0 ">
<thead>
<tr>
<th scope="col">{% trans "Agency Name" %}</th>

View File

@ -269,8 +269,8 @@
{# Table View (Default for Desktop) #}
<div class="table-view active d-none d-lg-block">
<div class="table-responsive">
<table class="table table-hover align-middle mb-0">
<div class="table-responsive d-none d-lg-block">
<table class="table table-hover align-middle mb-0 ">
<thead>
<tr>
<th scope="col" >{% trans "Name" %}</th>