This commit is contained in:
Marwan Alwali 2025-01-12 09:33:42 +03:00
parent c013f1683b
commit 9549213a09
119 changed files with 1855 additions and 587 deletions

View File

@ -28,7 +28,7 @@ from .models import (
SaleQuotationCar,
AdditionalServices,
Staff,
Opportunity, Priority, Sources,
Opportunity, Priority, Sources, Lead, Activity, Notes, CarModel
)
from django_ledger.models import ItemModel, InvoiceModel
from django.forms import ModelMultipleChoiceField, ValidationError, DateInput
@ -567,10 +567,50 @@ class EmailForm(forms.Form):
from_email = forms.EmailField()
to_email = forms.EmailField(label="To")
class LeadForm(forms.ModelForm):
class Meta:
model = Lead
fields = ['title',
'first_name',
'last_name',
'email',
'phone_number',
'city',
'salary',
'obligations',
'id_car_make',
'id_car_model',
'year',
'source',
'channel',
'assigned',
'priority',
]
def __init__(self, *args, **kwargs):
dealer = kwargs.pop("dealer", None)
super().__init__(*args, **kwargs)
if "id_car_make" in self.fields:
queryset = self.fields["id_car_make"].queryset.filter(is_sa_import=True)
self.fields["id_car_make"].choices = [
(obj.id_car_make, obj.get_local_name()) for obj in queryset
]
class NoteForm(forms.ModelForm):
class Meta:
model = Notes
fields = ['note']
class ActivityForm(forms.ModelForm):
class Meta:
model = Activity
fields = ['activity_type', 'notes']
class OpportunityForm(forms.ModelForm):
class Meta:
model = Opportunity
fields = [
'car', 'customer', 'stage',
]
fields = ['customer', 'car', 'stage', 'probability', 'closing_date']

View File

@ -0,0 +1,20 @@
# Generated by Django 5.1.4 on 2025-01-11 10:32
import inventory.models
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('inventory', '0011_remove_customer_country_customer_city'),
]
operations = [
migrations.AddField(
model_name='opportunity',
name='probability',
field=models.PositiveIntegerField(default=70, validators=[inventory.models.validate_probability]),
preserve_default=False,
),
]

View File

@ -0,0 +1,20 @@
# Generated by Django 5.1.4 on 2025-01-11 11:09
import phonenumber_field.modelfields
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('inventory', '0012_opportunity_probability'),
]
operations = [
migrations.AddField(
model_name='lead',
name='phone_number',
field=phonenumber_field.modelfields.PhoneNumberField(default='0535521547', max_length=128, region='SA', verbose_name='Phone Number'),
preserve_default=False,
),
]

View File

@ -0,0 +1,26 @@
# Generated by Django 5.1.4 on 2025-01-11 12:12
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('inventory', '0013_lead_phone_number'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.AlterField(
model_name='activity',
name='created_by',
field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='activities_created', to=settings.AUTH_USER_MODEL),
),
migrations.AlterField(
model_name='notes',
name='created_by',
field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='notes_created', to=settings.AUTH_USER_MODEL),
),
]

View File

@ -0,0 +1,19 @@
# Generated by Django 5.1.4 on 2025-01-11 12:28
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('inventory', '0014_alter_activity_created_by_alter_notes_created_by'),
]
operations = [
migrations.AddField(
model_name='lead',
name='city',
field=models.CharField(default='Riyadh', max_length=50, verbose_name='City'),
preserve_default=False,
),
]

View File

@ -0,0 +1,18 @@
# Generated by Django 5.1.4 on 2025-01-11 12:31
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('inventory', '0015_lead_city'),
]
operations = [
migrations.AddField(
model_name='lead',
name='address',
field=models.CharField(blank=True, max_length=200, null=True, verbose_name='Address'),
),
]

View File

@ -0,0 +1,19 @@
# Generated by Django 5.1.4 on 2025-01-11 19:20
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('inventory', '0016_lead_address'),
]
operations = [
migrations.AlterField(
model_name='lead',
name='assigned',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='assigned', to='inventory.staff', verbose_name='Assigned'),
),
]

View File

@ -0,0 +1,18 @@
# Generated by Django 5.1.4 on 2025-01-11 23:36
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('inventory', '0017_alter_lead_assigned'),
]
operations = [
migrations.AlterField(
model_name='lead',
name='priority',
field=models.CharField(choices=[('low', 'Low'), ('medium', 'Medium'), ('high', 'High')], default='medium', max_length=10, verbose_name='Priority'),
),
]

View File

@ -0,0 +1,45 @@
# Generated by Django 5.1.4 on 2025-01-12 01:43
import django.utils.timezone
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('inventory', '0018_alter_lead_priority'),
]
operations = [
migrations.AddField(
model_name='opportunity',
name='closed',
field=models.BooleanField(default=False, verbose_name='Closed'),
),
migrations.AddField(
model_name='opportunity',
name='closing_date',
field=models.DateField(default=django.utils.timezone.now, verbose_name='Closing Date'),
preserve_default=False,
),
migrations.AddField(
model_name='opportunity',
name='status',
field=models.CharField(choices=[('new', 'New'), ('pending', 'Pending'), ('in_progress', 'In Progress'), ('qualified', 'Qualified'), ('canceled', 'Canceled')], default='new', max_length=20, verbose_name='Status'),
),
migrations.AlterField(
model_name='lead',
name='status',
field=models.CharField(choices=[('new', 'New'), ('pending', 'Pending'), ('in_progress', 'In Progress'), ('qualified', 'Qualified'), ('canceled', 'Canceled')], db_index=True, default='new', max_length=50, verbose_name='Status'),
),
migrations.AlterField(
model_name='leadstatushistory',
name='new_status',
field=models.CharField(choices=[('new', 'New'), ('pending', 'Pending'), ('in_progress', 'In Progress'), ('qualified', 'Qualified'), ('canceled', 'Canceled')], max_length=50, verbose_name='New Status'),
),
migrations.AlterField(
model_name='leadstatushistory',
name='old_status',
field=models.CharField(choices=[('new', 'New'), ('pending', 'Pending'), ('in_progress', 'In Progress'), ('qualified', 'Qualified'), ('canceled', 'Canceled')], max_length=50, verbose_name='Old Status'),
),
]

View File

@ -376,7 +376,10 @@ class CarFinance(models.Model):
if vat:
return (self.total_discount * Decimal(vat.rate)).quantize(Decimal('0.01'))
return Decimal('0.00')
@property
def revenue(self):
return self.selling_price-self.cost_price
def __str__(self):
@ -731,9 +734,7 @@ class Channel(models.TextChoices):
class Status(models.TextChoices):
NEW = "new", _("New")
PENDING = "pending", _("Pending")
ASSIGNED = "assigned", _("Assigned")
IN_PROGRESS = "in_progress", _("In Progress")
CONTACTED = "contacted", _("Contacted")
QUALIFIED = "qualified", _("Qualified")
CANCELED = "canceled", _("Canceled")
@ -783,6 +784,7 @@ class Lead(models.Model):
first_name = models.CharField(max_length=50, verbose_name=_("First Name"))
last_name = models.CharField(max_length=50, verbose_name=_("Last Name"))
email = models.EmailField(unique=True, verbose_name=_("Email"), db_index=True)
phone_number = PhoneNumberField(region="SA", verbose_name=_("Phone Number"))
salary = models.PositiveIntegerField(blank=True, null=True, verbose_name=_("Salary"))
obligations = models.PositiveIntegerField(blank=True, null=True, verbose_name=_("Obligations"))
id_car_make = models.ForeignKey(CarMake, on_delete=models.DO_NOTHING, blank=True, null=True, verbose_name=_("Make"))
@ -790,10 +792,12 @@ class Lead(models.Model):
year = models.PositiveSmallIntegerField(verbose_name=_("Year"), blank=True, null=True)
source = models.CharField(max_length=50, choices=Sources.choices, verbose_name=_("Source"))
channel = models.CharField(max_length=50, choices=Channel.choices, verbose_name=_("Channel"))
assigned = models.ForeignKey(Staff, on_delete=models.SET_NULL, null=True, related_name="assigned", verbose_name=_("Assigned"))
priority = models.CharField(max_length=10, choices=Priority.choices, default=Priority.LOW,
address = models.CharField(max_length=200, blank=True, null=True, verbose_name=_("Address"))
city = models.CharField(max_length=50, verbose_name=_("City"))
assigned = models.ForeignKey(Staff, on_delete=models.SET_NULL, blank=True, null=True, related_name="assigned", verbose_name=_("Assigned"))
priority = models.CharField(max_length=10, choices=Priority.choices, default=Priority.MEDIUM,
verbose_name=_("Priority"))
status = models.CharField(max_length=50, choices=Status.choices, verbose_name=_("Status"), db_index=True)
status = models.CharField(max_length=50, choices=Status.choices, verbose_name=_("Status"), db_index=True, default=Status.NEW)
created = models.DateTimeField(auto_now_add=True, verbose_name=_("Created"), db_index=True)
updated = models.DateTimeField(auto_now=True, verbose_name=_("Updated"))
@ -852,15 +856,23 @@ class Customer(models.Model):
def get_full_name(self):
return f"{self.first_name} {self.middle_name} {self.last_name}"
def validate_probability(value):
if value < 0 or value > 100:
raise ValidationError(_("Probability must be between 0 and 100."))
class Opportunity(models.Model):
dealer = models.ForeignKey(Dealer, on_delete=models.CASCADE, related_name="opportunities")
customer = models.ForeignKey(Customer, on_delete=models.CASCADE, related_name="opportunities")
car = models.ForeignKey(Car, on_delete=models.SET_NULL, null=True, blank=True, verbose_name=_("Car"))
stage = models.CharField(max_length=20, choices=Stage.choices, verbose_name=_("Stage"))
status = models.CharField(max_length=20, choices=Status.choices, verbose_name=_("Status"), default=Status.NEW)
staff = models.ForeignKey(Staff, on_delete=models.SET_NULL, null=True, related_name="owner", verbose_name=_("Owner"))
probability = models.PositiveIntegerField(validators=[validate_probability])
closing_date = models.DateField(verbose_name=_("Closing Date"))
created = models.DateTimeField(auto_now_add=True, verbose_name=_("Created"))
updated = models.DateTimeField(auto_now=True, verbose_name=_("Updated"))
closed = models.BooleanField(default=False, verbose_name=_("Closed"))
class Meta:
verbose_name = _("Opportunity")
@ -875,7 +887,7 @@ class Notes(models.Model):
object_id = models.PositiveIntegerField()
content_object = GenericForeignKey('content_type', 'object_id')
note = models.TextField(verbose_name=_("Note"))
created_by = models.ForeignKey(Staff, on_delete=models.DO_NOTHING, related_name="notes_created")
created_by = models.ForeignKey(User, on_delete=models.DO_NOTHING, related_name="notes_created")
created = models.DateTimeField(auto_now_add=True, verbose_name=_("Created"))
updated = models.DateTimeField(auto_now=True, verbose_name=_("Updated"))
@ -884,7 +896,7 @@ class Notes(models.Model):
verbose_name_plural = _("Notes")
def __str__(self):
return f"Note by {self.created_by.name} on {self.content_object}"
return f"Note by {self.created_by.first_name} on {self.content_object}"
class Activity(models.Model):
@ -893,7 +905,7 @@ class Activity(models.Model):
content_object = GenericForeignKey('content_type', 'object_id')
activity_type = models.CharField(max_length=50, choices=ActionChoices.choices, verbose_name=_("Activity Type"))
notes = models.TextField(blank=True, null=True, verbose_name=_("Notes"))
created_by = models.ForeignKey(Staff, on_delete=models.DO_NOTHING, related_name="activities_created")
created_by = models.ForeignKey(User, on_delete=models.DO_NOTHING, related_name="activities_created")
created = models.DateTimeField(auto_now_add=True, verbose_name=_("Created"))
updated = models.DateTimeField(auto_now=True, verbose_name=_("Updated"))

View File

@ -432,8 +432,8 @@ def update_item_model_cost(sender, instance, created, **kwargs):
def notify_staff_on_deal_stage_change(sender, instance, **kwargs):
if instance.pk:
previous = models.Opportunity.objects.get(pk=instance.pk)
if previous.stage != instance.deal_status:
message = f"Deal '{instance.deal_name}' status changed from {previous.stage} to {instance.stage}."
if previous.stage != instance.stage:
message = f"Opportunity '{instance.pk}' status changed from {previous.stage} to {instance.stage}."
models.Notification.objects.create(
staff=instance.created_by, message=message
)
@ -493,3 +493,28 @@ def create_item_service(sender, instance, created, **kwargs):
)
instance.item = service_model
instance.save()
@receiver(post_save, sender=models.Lead)
def track_lead_status_change(sender, instance, **kwargs):
if instance.pk: # Ensure the instance is being updated, not created
try:
old_lead = models.Lead.objects.get(pk=instance.pk)
if old_lead.status != instance.status: # Check if status has changed
models.LeadStatusHistory.objects.create(
lead=instance,
old_status=old_lead.status,
new_status=instance.status,
changed_by=instance.assigned # Assuming the assigned staff made the change
)
except models.Lead.DoesNotExist:
pass # Ignore if the lead doesn't exist (e.g., during initial creation)
@receiver(post_save, sender=models.Lead)
def notify_assigned_staff(sender, instance, created, **kwargs):
if instance.assigned: # Check if the lead is assigned
models.Notification.objects.create(
user=instance.assigned.user,
message=f"You have been assigned a new lead: {instance.first_name} {instance.last_name}."
)

View File

@ -40,11 +40,17 @@ urlpatterns = [
path('customers/create/', views.CustomerCreateView.as_view(), name='customer_create'),
path('customers/<int:pk>/update/', views.CustomerUpdateView.as_view(), name='customer_update'),
path('customers/<int:pk>/delete/', views.delete_customer, name='customer_delete'),
path('customers/<int:pk>/create_lead/', views.create_lead, name='create_lead'),
path('customers/<int:customer_id>/opportunities/create/', views.OpportunityCreateView.as_view(), name='create_opportunity'),
path('customers/<int:pk>/add-note/', views.add_note_to_customer, name='add_note_to_customer'),
path('crm/leads/', views.LeadListView.as_view(), name='lead_list'),
path('crm/leads/<int:pk>/view/', views.LeadDetailView.as_view(), name='lead_detail'),
path('crm/leads/create/', views.LeadCreateView.as_view(), name='lead_create'),
path('crm/leads/<int:pk>/update/', views.LeadUpdateView.as_view(), name='lead_update'),
path('crm/leads/<int:pk>/delete/', views.LeadDeleteView.as_view(), name='lead_delete'),
path('crm/leads/<int:pk>/add-note/', views.add_note_to_lead, name='add_note'),
path('crm/leads/<int:pk>/add-activity/', views.add_activity_to_lead, name='add_activity'),
path('crm/opportunities/create/', views.OpportunityCreateView.as_view(), name='opportunity_create'),
path('crm/opportunities/<int:pk>/', views.OpportunityDetailView.as_view(), name='opportunity_detail'),
path('crm/opportunities/<int:pk>/edit/', views.OpportunityUpdateView.as_view(), name='update_opportunity'),
path('crm/opportunities/', views.OpportunityListView.as_view(), name='opportunity_list'),

View File

@ -207,8 +207,8 @@ class AccountingDashboard(LoginRequiredMixin, TemplateView):
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
total_cars = models.Car.objects.filter(dealer=self.request.user.dealer).count()
dealer = get_user_type(self.request)
total_cars = models.Car.objects.filter(dealer=dealer).count()
total_reservations = models.CarReservation.objects.filter(
reserved_until__gte=timezone.now()
).count()
@ -220,7 +220,7 @@ class AccountingDashboard(LoginRequiredMixin, TemplateView):
total_selling_price = stats["total_selling_price"] or 0
total_profit = total_selling_price - total_cost_price
context["dealer"] = self.request.user.dealer
context["dealer"] = dealer
context["total_cars"] = total_cars
context["total_reservations"] = total_reservations
context["total_cost_price"] = total_cost_price
@ -558,7 +558,7 @@ class CarFinanceCreateView(LoginRequiredMixin, CreateView):
def get_form(self, form_class=None):
form = super().get_form(form_class)
dealer = get_user_type(self.request.user.dealer)
dealer = get_user_type(self.request)
form.fields[
"additional_finances"
].queryset = models.AdditionalServices.objects.filter(dealer=dealer)
@ -590,14 +590,14 @@ class CarFinanceUpdateView(LoginRequiredMixin, SuccessMessageMixin, UpdateView):
def get_initial(self):
initial = super().get_initial()
instance = self.get_object()
dealer = get_user_type(self.request.user.dealer)
dealer = get_user_type(self.request)
selected_items = instance.additional_services.filter(dealer=dealer)
initial["additional_finances"] = selected_items
return initial
def get_form(self, form_class=None):
form = super().get_form(form_class)
dealer = get_user_type(self.request.user.dealer)
dealer = get_user_type(self.request)
form.fields[
"additional_finances"
].queryset = models.AdditionalServices.objects.filter(dealer=dealer)
@ -634,7 +634,8 @@ class CarLocationCreateView(CreateView):
def form_valid(self, form):
form.instance.car = get_object_or_404(models.Car, pk=self.kwargs["car_pk"])
form.instance.owner = self.request.user.dealer
dealer = get_user_type(self.request)
form.instance.owner = dealer
form.save()
messages.success(self.request, "Car saved successfully.")
return super().form_valid(form)
@ -784,14 +785,48 @@ class CustomerDetailView(LoginRequiredMixin, DetailView):
context_object_name = "customer"
def get_context_data(self, **kwargs):
dealer = get_user_type(self.request)
entity = dealer.entity
context = super().get_context_data(**kwargs)
name = f"{context['customer'].first_name} {context['customer'].middle_name} {context['customer'].last_name}"
context["estimates"] = self.request.entity.get_estimates().filter(
context["estimates"] = entity.get_estimates().filter(
customer__customer_name=name
)
context['notes'] = models.Notes.objects.filter(content_type__model='customer', object_id=self.object.id)
context['activities'] = models.Activity.objects.filter(content_type__model='customer', object_id=self.object.id)
return context
def add_note_to_customer(request, pk):
customer = get_object_or_404(models.Customer, pk=pk)
if request.method == 'POST':
form = forms.NoteForm(request.POST)
if form.is_valid():
note = form.save(commit=False)
note.content_object = customer
note.created_by = request.user
note.save()
return redirect('customer_detail', pk=pk)
else:
form = forms.NoteForm()
return render(request, 'crm/add_note.html', {'form': form, 'customer': customer})
def add_activity_to_customer(request, pk):
customer = get_object_or_404(models.Customer, pk=pk)
if request.method == 'POST':
form = forms.ActivityForm(request.POST)
if form.is_valid():
activity = form.save(commit=False)
activity.content_object = customer
activity.created_by = request.user
activity.save()
return redirect('customer_detail', pk=pk)
else:
form = forms.ActivityForm()
return render(request, 'crm/add_activity.html', {'form': form, 'customer': customer})
class CustomerCreateView(
LoginRequiredMixin,
SuccessMessageMixin,
@ -852,7 +887,7 @@ class VendorCreateView(
success_message = _("Vendor created successfully.")
def form_valid(self, form):
form.instance.dealer = self.request.user.dealer
form.instance.dealer = get_user_type(self.request)
return super().form_valid(form)
@ -882,8 +917,7 @@ class QuotationCreateView(LoginRequiredMixin, CreateView):
template_name = "sales/quotation_form.html"
def form_valid(self, form):
dealer = self.request.user.dealer
form.instance.dealer = dealer
form.instance.dealer = get_user_type(self.request)
quotation = form.save()
selected_cars = form.cleaned_data.get("cars")
for car in selected_cars:
@ -906,7 +940,8 @@ class QuotationListView(LoginRequiredMixin, ListView):
def get_queryset(self):
status = self.request.GET.get("status")
queryset = self.request.user.dealer.sales.all()
dealer = get_user_type(self.request)
queryset = dealer.sales.all()
if status:
queryset = queryset.filter(status=status)
return queryset
@ -1092,7 +1127,7 @@ def generate_invoice(request, pk):
@login_required
def post_quotation(request, pk):
qoutation = get_object_or_404(models.SaleQuotation, pk=pk)
dealer = request.user.dealer
dealer = get_user_type(request)
entity = dealer.entity
if qoutation.posted:
messages.error(request, "Quotation is already posted")
@ -1260,6 +1295,11 @@ class UserListView(LoginRequiredMixin, ListView):
paginate_by = 10
template_name = "users/user_list.html"
def get_queryset(self):
dealer = get_user_type(self.request)
staff = models.Staff.objects.filter(dealer=dealer).all()
return staff
class UserDetailView(LoginRequiredMixin, DetailView):
model = models.Staff
@ -1339,6 +1379,11 @@ class OrganizationListView(LoginRequiredMixin, ListView):
context_object_name = "organizations"
paginate_by = 10
def get_queryset(self):
dealer = get_user_type(self.request)
data = models.Organization.objects.filter(dealer=dealer).all()
return data
class OrganizationDetailView(DetailView):
model = models.Organization
@ -1382,6 +1427,10 @@ class RepresentativeListView(LoginRequiredMixin, ListView):
template_name = "representatives/representative_list.html"
context_object_name = "representatives"
def get_queryset(self):
dealer = get_user_type(self.request)
data = models.Representative.objects.filter(dealer=dealer).all()
return data
class RepresentativeDetailView(DetailView):
model = models.Representative
@ -1604,8 +1653,9 @@ class BankAccountListView(LoginRequiredMixin, ListView):
context_object_name = "bank_accounts"
def get_queryset(self):
dealer = get_user_type(self.request)
return BankAccountModel.objects.filter(
entity_model=self.request.user.dealer.entity
entity_model=dealer.entity
)
@ -2308,58 +2358,99 @@ class UserActivityLogListView(ListView):
# CRM RELATED VIEWS
def create_lead(request, pk):
customer = get_object_or_404(models.Customer, pk=pk)
if customer.is_lead:
messages.warning(request, _("Customer is already a lead."))
else:
customer.is_lead = True
customer.save()
messages.success(request, _("Customer successfully marked as a lead."))
return redirect(reverse("customer_detail", kwargs={"pk": customer.pk}))
class LeadListView(ListView):
model = models.Customer
template_name = "crm/lead_list.html"
context_object_name = "customers"
model = models.Lead
template_name = 'crm/leads/lead_list.html'
context_object_name = 'leads'
paginate_by = 10
def get_queryset(self):
query = self.request.GET.get("q")
dealer = get_user_type(self.request)
leads = models.Lead.objects.filter(dealer=dealer).all()
return leads
customers = models.Customer.objects.filter(dealer=dealer, is_lead=True)
if query:
customers = customers.filter(
Q(national_id__icontains=query)
| Q(first_name__icontains=query)
| Q(last_name__icontains=query)
)
return customers
class LeadDetailView(DetailView):
model = models.Lead
template_name = 'crm/leads/lead_detail.html'
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context["query"] = self.request.GET.get("q", "")
context['notes'] = models.Notes.objects.filter(content_type__model='lead', object_id=self.object.id)
context['activities'] = models.Activity.objects.filter(content_type__model='lead', object_id=self.object.id)
context['status_history'] = models.LeadStatusHistory.objects.filter(lead=self.object)
return context
class LeadCreateView(CreateView):
model = models.Lead
form_class = forms.LeadForm
template_name = 'crm/leads/lead_form.html'
success_message = "Lead created successfully!"
success_url = reverse_lazy('lead_list')
def form_valid(self, form):
dealer = get_user_type(self.request)
form.instance.dealer = dealer
return super().form_valid(form)
class LeadUpdateView(UpdateView):
model = models.Lead
form_class = forms.LeadForm
template_name = 'crm/leads/lead_form.html'
success_url = reverse_lazy('lead_list')
class LeadDeleteView(DeleteView):
model = models.Lead
template_name = 'crm/leads/lead_confirm_delete.html'
success_url = reverse_lazy('lead_list')
def add_note_to_lead(request, pk):
lead = get_object_or_404(models.Lead, pk=pk)
if request.method == 'POST':
form = forms.NoteForm(request.POST)
if form.is_valid():
note = form.save(commit=False)
note.content_object = lead
note.created_by = request.user
note.save()
return redirect('lead_detail', pk=pk)
else:
form = forms.NoteForm()
return render(request, 'crm/add_note.html', {'form': form, 'lead': lead})
def add_activity_to_lead(request, pk):
lead = get_object_or_404(models.Lead, pk=pk)
if request.method == 'POST':
form = forms.ActivityForm(request.POST)
if form.is_valid():
activity = form.save(commit=False)
activity.content_object = lead
activity.created_by = request.user
activity.save()
return redirect('lead_detail', pk=pk)
else:
form = forms.ActivityForm()
return render(request, 'crm/add_activity.html', {'form': form, 'lead': lead})
class OpportunityCreateView(CreateView):
model = models.Opportunity
form_class = forms.OpportunityForm
template_name = "crm/opportunity_form.html"
template_name = "crm/opportunities/opportunity_form.html"
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context["customer"] = models.Customer.objects.get(pk=self.kwargs["customer_id"])
context["cars"] = models.Car.objects.all()
dealer = get_user_type(self.request)
context["customer"] = models.Customer.objects.filter(dealer=dealer)
context["cars"] = models.Car.objects.filter(dealer=dealer)
return context
def form_valid(self, form):
form.instance.customer = models.Customer.objects.get(
pk=self.kwargs["customer_id"]
)
form.instance.created_by = self.request.user.staff
dealer = get_user_type(self.request)
form.instance.dealer = dealer
form.instance.staff = dealer.staff
return super().form_valid(form)
def get_success_url(self):
@ -2369,7 +2460,7 @@ class OpportunityCreateView(CreateView):
class OpportunityUpdateView(UpdateView):
model = models.Opportunity
form_class = forms.OpportunityForm
template_name = "crm/opportunity_form.html"
template_name = "crm/opportunities/opportunity_form.html"
def get_success_url(self):
return reverse_lazy("opportunity_detail", kwargs={"pk": self.object.pk})
@ -2377,15 +2468,20 @@ class OpportunityUpdateView(UpdateView):
class OpportunityDetailView(DetailView):
model = models.Opportunity
template_name = "crm/opportunity_detail.html"
template_name = "crm/opportunities/opportunity_detail.html"
context_object_name = "opportunity"
class OpportunityListView(ListView):
model = models.Opportunity
template_name = "crm/opportunity_list.html"
template_name = "crm/opportunities/opportunity_list.html"
context_object_name = "opportunities"
def get_queryset(self):
dealer = get_user_type(self.request)
data = models.Opportunity.objects.filter(dealer=dealer).all()
return data
@login_required
def delete_opportunity(request, pk):

View File

@ -2,7 +2,7 @@
{% load i18n static %}
{% block content %}
<div class="container">
<div class="row">
<div class="row flex-center min-vh-100 py-5">
<div class="col-sm-10 col-md-8 col-lg-5 col-xxl-4"><a class="d-flex flex-center text-decoration-none mb-4" href="../../../index.html">
<div class="d-flex align-items-center fw-bolder fs-3 d-inline-block"><img src="../../../assets/img/icons/logo.png" alt="phoenix" width="58" />

View File

@ -3,7 +3,7 @@
{% block title %}Confirm Email Verification Code{% endblock %}
{% block content %}
<div class="container">
<div class="row">
<h2>Confirm Your Email</h2>
<p>Please enter the verification code sent to your email.</p>
<form method="post" action="{% url 'account_confirm_email' %}">

View File

@ -3,7 +3,7 @@
{% block title %}Confirm Login Code{% endblock %}
{% block content %}
<div class="container">
<div class="row">
<h2>Confirm Login Code</h2>
<p>Please enter the login code sent to your email or phone.</p>
<form method="post" action="{% url 'account_confirm_login_code' %}">

View File

@ -3,7 +3,7 @@
{% block title %}Email Confirmation{% endblock %}
{% block content %}
<div class="container">
<div class="row">
<h2>Email Confirmation</h2>
<p>Your email has been successfully confirmed.</p>
<a href="{% url 'account_login' %}" class="btn btn-primary">Go to Login</a>

View File

@ -63,7 +63,7 @@
<!-- Main Content-->
<!-- ===============================================-->
<main class="main" id="top">
<div class="container">
<div class="row">
<div class="row flex-center min-vh-100 py-5">
<div class="col-sm-10 col-md-8 col-lg-5 col-xl-5 col-xxl-3">
<div class="text-center mb-5">
@ -91,8 +91,8 @@
navbarVertical.setAttribute('data-navbar-appearance', 'darker');
}
</script>
<div class="support-chat-container">
<div class="container-fluid support-chat">
<div class="support-chat-row">
<div class="row-fluid support-chat">
<div class="card bg-body-emphasis">
<div class="card-header d-flex flex-between-center px-4 py-3 border-bottom border-translucent">
<h5 class="mb-0 d-flex align-items-center gap-2">Demo widget<span class="fa-solid fa-circle text-success fs-11"></span></h5>

View File

@ -6,7 +6,7 @@
{% block title %}{{ _("Sign In") }}{% endblock title %}
{% block content %}
<div class="container">
<div class="row">
<div class="row flex-center min-vh-50">
<div class="col-sm-10 col-md-8 col-lg-5 col-xl-5 col-xxl-3">
<a class="d-flex flex-center text-decoration-none mb-4" href="{% url 'landing_page' %}">

View File

@ -3,7 +3,7 @@
{% block title %}{{ _("Sign Out") }}{% endblock title %}
{% block content %}
<div class="container">
<div class="row">
<div class="row flex-center min-vh-100 py-5">
<div class="col-sm-10 col-md-8 col-lg-5 col-xl-4 col-xxl-3">
<div class="text-center mb-6 mx-auto">

View File

@ -3,7 +3,7 @@
{% block title %}{{ _("Change Password") }}{% endblock title %}
{% block content %}
<div class="container">
<div class="row">
<div class="row min-vh-100">
<div class="col-sm-10 col-md-8 col-lg-5 col-xl-5 col-xxl-3">
<a class="d-flex flex-center text-decoration-none mb-4" href="{% url 'landing_page' %}">

View File

@ -4,7 +4,7 @@
{% block title %}{{ _("Password Reset") }}{% endblock title %}
{% block content %}
<div class="container">
<div class="row">
<div class="row min-vh-100">
<div class="col-sm-10 col-md-8 col-lg-5 col-xl-5 col-xxl-3"><a class="d-flex flex-center text-decoration-none mb-4" href="{% url 'landing_page' %}">
<div class="d-flex align-items-center fw-bolder fs-3 d-inline-block">

View File

@ -3,7 +3,7 @@
{% block title %}Request Login Code{% endblock %}
{% block content %}
<div class="container">
<div class="row">
<h2>Request a Login Code</h2>
<p>Enter your email address to receive a login code.</p>
<form method="post" action="{% url 'account_login' %}">

View File

@ -4,7 +4,7 @@
{% block content %}
<div class="container">
<div class="row">
<div class="row d-flex-center min-vh-50">
<div class="col-12 "><a class="d-flex flex-center text-decoration-none mb-4" href="{% url 'landing_page' %}">
<div class="d-flex align-items-center fw-bolder fs-3 d-inline-block">

View File

@ -5,7 +5,7 @@
{% block title %}{{ _("Sign Up") }}{% endblock title %}
{% block content %}
<div class="container">
<div class="row">
<div class="row min-vh-100 text-center">
<div class="col-sm-10 col-md-8 col-lg-5 col-xl-5 col-xxl-3"><a class="d-flex flex-center text-decoration-none mb-4" href="{% url 'landing_page' %}">
<div class="d-flex align-items-center fw-bolder fs-3 d-inline-block">

View File

@ -85,31 +85,31 @@
<script>
// Function to calculate Total Cost and Total Revenue
function calculateTotals(container) {
const quantity = parseFloat(container.querySelector('.quantity').value) || 0;
const unitCost = parseFloat(container.querySelector('.unitCost').value) || 0;
const unitSalesPrice = parseFloat(container.querySelector('.unitSalesPrice').value) || 0;
function calculateTotals(row) {
const quantity = parseFloat(row.querySelector('.quantity').value) || 0;
const unitCost = parseFloat(row.querySelector('.unitCost').value) || 0;
const unitSalesPrice = parseFloat(row.querySelector('.unitSalesPrice').value) || 0;
const totalCost = quantity * unitCost;
const totalRevenue = quantity * unitSalesPrice;
container.querySelector('.totalCost').value = totalCost.toFixed(2);
container.querySelector('.totalRevenue').value = totalRevenue.toFixed(2);
row.querySelector('.totalCost').value = totalCost.toFixed(2);
row.querySelector('.totalRevenue').value = totalRevenue.toFixed(2);
}
// Add event listeners to inputs for dynamic calculation
function addInputListeners(container) {
container.querySelectorAll('.quantity, .unitCost, .unitSalesPrice').forEach(input => {
input.addEventListener('input', () => calculateTotals(container));
function addInputListeners(row) {
row.querySelectorAll('.quantity, .unitCost, .unitSalesPrice').forEach(input => {
input.addEventListener('input', () => calculateTotals(row));
});
}
// Add new form fields
document.getElementById('addMoreBtn').addEventListener('click', function(e) {
e.preventDefault();
const formContainer = document.getElementById('formContainer');
const formrow = document.getElementById('formrow');
const newForm = document.createElement('div');
newForm.className = 'form-container row g-3 mb-3 mt-5';
newForm.className = 'form-row row g-3 mb-3 mt-5';
newForm.innerHTML = `
<div class="mb-2 col-sm-2">
<select class="form-control item" name="item[]" required>
@ -137,7 +137,7 @@
<button class="btn btn-danger removeBtn">Remove</button>
</div>
`;
formContainer.appendChild(newForm);
formrow.appendChild(newForm);
addInputListeners(newForm); // Add listeners to the new form
// Add remove button functionality
@ -147,12 +147,12 @@
});
// Add listeners to the initial form
document.querySelectorAll('.form-container').forEach(container => {
addInputListeners(container);
document.querySelectorAll('.form-row').forEach(row => {
addInputListeners(row);
// Add remove button functionality to the initial form
container.querySelector('.removeBtn').addEventListener('click', function() {
container.remove();
row.querySelector('.removeBtn').addEventListener('click', function() {
row.remove();
});
});

View File

@ -46,7 +46,6 @@
<body>
<main class="main" id="top">
{% include 'header.html' %}
<div class="content">
@ -54,8 +53,9 @@
<!-- Main content goes here -->
{% endblock %}
{% include 'footer.html' %}
</div>
{% include 'footer.html' %}
</div>
</main>
{% block extra_js %}{% endblock extra_js %}

View File

@ -1,5 +1,5 @@
<div class="support-chat-container">
<div class="container-fluid support-chat">
<div class="support-chat-row">
<div class="row-fluid support-chat">
<div class="card bg-body-emphasis">
<div class="card-header d-flex flex-between-center px-4 py-3 border-bottom border-translucent">
<h5 class="mb-0 d-flex align-items-center gap-2">Demo widget<span class="fa-solid fa-circle text-success fs-11"></span></h5>

View File

@ -0,0 +1,11 @@
{% extends 'base.html' %}
{% load i18n static crispy_forms_filters %}
{% block content %}
<h1>Add Activity to {{ lead.first_name }} {{ lead.last_name }}</h1>
<form method="post">
{% csrf_token %}
{{ form|crispy }}
<button class="btn btn-phoenix-primary" type="submit">Add Activity</button>
</form>
{% endblock %}

View File

@ -0,0 +1,10 @@
{% extends 'base.html' %}
{% load i18n static crispy_forms_filters %}
{% block content %}
<h1>Add Note to {{ lead.first_name }} {{ lead.last_name }}</h1>
<form method="post">
{% csrf_token %}
{{ form|crispy }}
<button class="btn btn-phoenix-primary" type="submit">Add Note</button>
</form>
{% endblock %}

View File

@ -1,185 +0,0 @@
{% extends 'base.html' %}
{% load i18n %}
{% load static %}
{% block title %}{{ _('Leads')|capfirst }}{% endblock title %}
{% block vendors %}<a class="nav-link active">{{ _("Leads")|capfirst }}</a>{% endblock %}
{% block content %}
<div class="container">
<h2 class="mb-4">{{ _("Leads")|capfirst }}</h2>
<div class="row g-3 justify-content-between mb-4">
<div class="col-auto">
<div class="d-md-flex justify-content-between">
<div>
<a href="{% url 'customer_create' %}" class="btn btn-primary me-4"><span class="fas fa-plus me-2"></span>{{ _("Add Customer") }}</a>
</div>
</div>
</div>
<div class="col-auto">
<div class="d-flex">
<div class="search-box me-2">
<form method="get" class="d-inline-block position-relative">
<div class="input-group">
<button type="submit" class="btn btn-phoenix-primary"><span class="fas fa-search search-box-icon"></span></button>
<input name="q" class="form-control search-input search" type="search" placeholder="{{ _('Enter customer name') }}" value="{{ request.GET.q }}"/>
{% if request.GET.q %}
<a href="{% url request.resolver_match.view_name %}" class="btn btn-close"></a>
</div>
{% endif %}
</form>
</div>
</div>
</div>
</div>
{% if page_obj.object_list %}
<div class="table-responsive scrollbar mx-n1 px-1">
<table class="table fs-9 mb-0 border-top border-translucent">
<thead>
<tr>
<th></th>
<th class="sort white-space-nowrap align-middle text-uppercase ps-0" scope="col" data-sort="name" style="width:25%;">{{ _("Name")|capfirst }}</th>
<th class="sort align-middle ps-4 pe-5 text-uppercase border-end border-translucent" scope="col" data-sort="email" style="width:15%;">
<div class="d-inline-flex flex-center">
<div class="d-flex align-items-center px-1 py-1 bg-success-subtle rounded me-2"><span class="text-success-dark" data-feather="mail"></span></div><span>{{ _("email")|capfirst }}</span>
</div>
</th>
<th class="sort align-middle ps-4 pe-5 text-uppercase border-end border-translucent" scope="col" data-sort="phone" style="width:15%; min-width: 180px;">
<div class="d-inline-flex flex-center">
<div class="d-flex align-items-center px-1 py-1 bg-primary-subtle rounded me-2"><span class="text-primary-dark" data-feather="phone"></span></div><span>{{ _("Phone Number") }}</span>
</div>
</th>
<th class="sort align-middle ps-4 pe-5 text-uppercase border-end border-translucent" scope="col" data-sort="contact" style="width:15%;">
<div class="d-inline-flex flex-center">
<div class="d-flex align-items-center px-1 py-1 bg-info-subtle rounded me-2"><span class="text-info-dark" data-feather="user"></span></div><span>{{ _("National ID")|capfirst }}</span>
</div>
</th>
<th class="sort align-middle ps-4 pe-5 text-uppercase border-end border-translucent" scope="col" data-sort="company" style="width:15%;">
<div class="d-inline-flex flex-center">
<div class="d-flex align-items-center px-1 py-1 bg-warning-subtle rounded me-2"><span class="text-warning-dark" data-feather="grid"></span></div><span>{{ _("Address")|capfirst }}</span>
</div>
</th>
<th class="sort align-middle ps-4 pe-5 text-uppercase" scope="col" data-sort="date" style="width:15%;">
{{ _("Create date") }}</th>
<th class="sort text-end align-middle pe-0 ps-4" scope="col"></th>
</tr>
</thead>
<tbody class="list" id="lead-tables-body">
{% for customer in customers %}
<!-- Delete Modal -->
<div class="modal fade" id="deleteModal"
data-bs-backdrop="static"
data-bs-keyboard="false"
tabindex="-1"
aria-labelledby="deleteModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="deleteModalLabel">
{% trans "Delete Customer" %}
<span data-feather="alert-circle"></span>
</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body text-center">
<p class="mb-0 text-danger fw-bold">
{% trans "Are you sure you want to delete this customer?" %}
</p>
<button type="button" class="btn btn-secondary btn-sm" data-bs-dismiss="modal">
{% trans "No" %}
</button>
<a type="button" class="btn btn-danger btn-sm" href="{% url 'customer_delete' customer.id %}">
{% trans "Yes" %}
</a>
</div>
</div>
</div>
</div>
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
<td>
<span class="badge badge-phoenix fs-10 badge-phoenix-success">
<span class="badge-label">{{ _("Lead") }}</span>
<span class="ms-1" data-feather="check" style="height:13px;width:13px;"></span>
</span>
</td>
<td class="name align-middle white-space-nowrap ps-0">
<div class="d-flex align-items-center">
<div><a class="fs-8 fw-bold" href="{% url 'customer_detail' customer.id %}">{{ customer.first_name }} {{ customer.middle_name }} {{ customer.last_name }}</a>
<div class="d-flex align-items-center">
</div>
</div>
</div>
</td>
<td class="email align-middle white-space-nowrap fw-semibold ps-4 border-end border-translucent"><a class="text-body-highlight" href="">{{ customer.email }}</a></td>
<td class="phone align-middle white-space-nowrap fw-semibold ps-4 border-end border-translucent"><a class="text-body-highlight" href="tel:{{ customer.phone_number }}">{{ customer.phone_number }}</a></td>
<td class="contact align-middle white-space-nowrap ps-4 border-end border-translucent fw-semibold text-body-highlight">{{ customer.national_id }}</td>
<td class="company align-middle white-space-nowrap text-body-tertiary text-opacity-85 ps-4 border-end border-translucent fw-semibold text-body-highlight">
{{ customer.address }}</td>
<td class="date align-middle white-space-nowrap text-body-tertiary text-opacity-85 ps-4 text-body-tertiary">{{ customer.created|date }}</td>
<td class="align-middle white-space-nowrap text-end pe-0 ps-4">
<div class="btn-reveal-trigger position-static">
<button class="btn btn-sm dropdown-toggle dropdown-caret-none transition-none btn-reveal fs-10" type="button" data-bs-toggle="dropdown" data-boundary="window" aria-haspopup="true" aria-expanded="false" data-bs-reference="parent"><span class="fas fa-ellipsis-h fs-10"></span></button>
<div class="dropdown-menu dropdown-menu-end py-2">
<a href="{% url 'customer_update' customer.id %}" class="dropdown-item text-success-dark">{% trans "Edit" %}</a>
<a href="{% url 'create_opportunity' customer.pk %}" class="dropdown-item text-warning-dark">{{_("Opportunity")}}</a>
<div class="dropdown-divider"></div><button class="dropdown-item text-danger" data-bs-toggle="modal" data-bs-target="#deleteModal">{% trans "Delete" %}</button>
</div>
</div>
</td>
</tr>
{% endfor %}
</tbody>
{% endif %}
</table>
</div>
<div class="row align-items-center justify-content-end py-4 pe-0 fs-9">
<!-- Optional: Pagination -->
{% if is_paginated %}
<nav aria-label="Page navigation">
<ul class="pagination pagination-sm justify-content-center">
{% if page_obj.has_previous %}
<li class="page-item py-0">
<a class="page-link" href="?page={{ page_obj.previous_page_number }}" aria-label="Previous">
<span aria-hidden="true">&laquo;</span>
</a>
</li>
{% else %}
<li class="page-item disabled">
<a class="page-link" href="#" aria-label="Previous">
<span aria-hidden="true">&laquo;</span>
</a>
</li>
{% endif %}
{% for num in page_obj.paginator.page_range %}
{% if page_obj.number == num %}
<li class="page-item active"><a class="page-link" href="?page={{ num }}">{{ num }}</a></li>
{% else %}
<li class="page-item"><a class="page-link" href="?page={{ num }}">{{ num }}</a></li>
{% endif %}
{% endfor %} {% if page_obj.has_next %}
<li class="page-item">
<a class="page-link" href="?page={{ page_obj.next_page_number }}" aria-label="Next">
<span aria-hidden="true">&raquo;</span>
</a>
</li>
{% else %}
<li class="page-item disabled">
<a class="page-link" href="#" aria-label="Next">
<span aria-hidden="true">&raquo;</span>
</a>
</li>
{% endif %}
</ul>
</nav>
{% endif %}
</div>
</div>
{% endblock %}

View File

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
</body>
</html>

View File

@ -0,0 +1,549 @@
{% extends 'base.html' %}
{% load i18n static %}
{% block content %}
<div class="pb-9">
<div class="row">
<div class="col-12">
<div class="row align-items-center justify-content-between g-3 mb-3">
<div class="col-12 col-md-auto">
<h2 class="mb-0">{{ _("Lead Details")}}</h2>
</div>
<div class="col-12 col-md-auto">
<div class="d-flex">
<div class="flex-1 d-md-none">
<button class="btn px-3 btn-phoenix-secondary text-body-tertiary me-2" data-phoenix-toggle="offcanvas" data-phoenix-target="#productFilterColumn"><span class="fa-solid fa-bars"></span></button>
</div>
<button class="btn btn-primary me-2"><span class="fa-solid fa-envelope me-2"></span><span>Send an email</span></button>
<button class="btn btn-phoenix-secondary px-3 px-sm-5 me-2"><span class="fa-solid fa-thumbtack me-sm-2"></span><span class="d-none d-sm-inline">Shortlist</span></button>
<button class="btn px-3 btn-phoenix-secondary" type="button" data-bs-toggle="dropdown" data-boundary="window" aria-haspopup="true" aria-expanded="false" data-bs-reference="parent"><span class="fa-solid fa-ellipsis"></span></button>
<ul class="dropdown-menu dropdown-menu-end p-0" style="z-index: 9999;">
<li><a class="dropdown-item" href="#!">View profile</a></li>
<li><a class="dropdown-item" href="#!">Report</a></li>
<li><a class="dropdown-item" href="#!">Manage notifications</a></li>
<li><a class="dropdown-item text-danger" href="#!">Delete Lead</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="row g-0 g-md-4 g-xl-6">
<div class="col-md-5 col-lg-5 col-xl-4">
<div class="sticky-leads-sidebar">
<div class="lead-details-offcanvas bg-body scrollbar phoenix-offcanvas phoenix-offcanvas-fixed" data-breakpoint="md">
<div class="d-flex justify-content-between align-items-center mb-2 d-md-none">
<h3 class="mb-0">{{ _("Lead Details")}}</h3>
<button class="btn p-0" data-phoenix-dismiss="offcanvas"><span class="uil uil-times fs-7"></span></button>
</div>
<div class="card mb-3">
<div class="card-body">
<div class="row align-items-center g-3 text-center text-xxl-start">
<div class="col-6 col-sm-auto flex-1">
<h3 class="fw-bolder mb-2">{{ lead.first_name }} {{ lead.last_name }}</h3>
{% if lead.assigned %}
<p class="fs-8 mb-0 white-space-nowrap fw-bold">{{ _("Assigned to")}}: <span class="fw-light">{{ lead.assigned.name }}</span></p>
{% else %}
<p class="mb-0 fw-bold">{{ _("Not Assigned")}}</p>
{% endif %}
</div>
<div class="col-6 col-sm-auto flex-1">
<h5 class="text-body-highlight mb-0 text-end">{{ _("Status")}}
{% if lead.status == "new" %}
<span class="badge badge-phoenix badge-phoenix-primary"><span class="badge-label">{{_("New")}}</span><span class="fa fa-bell ms-1"></span></span>
{% elif lead.status == "pending" %}
<span class="badge badge-phoenix badge-phoenix-warning"><span class="badge-label">{{_("Pending")}}</span><span class="fa fa-clock-o ms-1"></span></span>
{% elif lead.status == "in_progress" %}
<span class="badge badge-phoenix badge-phoenix-info"><span class="badge-label">{{_("In Progress")}}</span><span class="fa fa-wrench ms-1"></span></span>
{% elif lead.status == "qualified" %}
<span class="badge badge-phoenix badge-phoenix-success"><span class="badge-label">{{_("Qualified")}}</span><span class="fa fa-check ms-1"></span></span>
{% elif lead.status == "canceled" %}
<span class="badge badge-phoenix badge-phoenix-danger"><span class="badge-label">{{_("Canceled")}}</span><span class="fa fa-times ms-1"></span></span>
{% endif %}
</h5>
</div>
</div>
</div>
</div>
<div class="card mb-3">
<div class="card-body">
<div class="row align-items-center g-3 text-center text-xxl-start">
<div class="col-6 col-sm-auto flex-1">
<h5 class="fw-bolder mb-2">{{ _("Car Requested") }}</h5>
{{ lead.id_car_make.get_local_name }} - {{ lead.id_car_model.get_local_name }} {{ lead.year }}
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-body">
<div class="mb-4">
<div class="d-flex align-items-center mb-1"><span class="me-2 uil uil-envelope-alt"> </span>
<h5 class="text-body-highlight mb-0">{{ _("Email") }}</h5>
</div><a href="{{ lead.email}}">{{ lead.email }}</a>
</div>
<div class="mb-4">
<div class="d-flex align-items-center mb-1"><span class="me-2 uil uil-phone"> </span>
<h5 class="text-body-highlight mb-0">{{ _("Phone") }}</h5>
</div><a href="{{ lead.phone_number}}">{{ lead.phone_number}} </a>
</div>
<div class="mb-4">
<div class="d-flex align-items-center mb-1"><span class="me-2 uil uil-dollar-alt"></span>
<h5 class="text-body-highlight mb-0">{{ _("Salary")}}</h5>
</div>
<p class="mb-0 text-body-secondary">{{lead.salary}} </p>
</div>
<div class="mb-4">
<div class="d-flex align-items-center mb-1"><span class="me-2 uil uil-clock"></span>
<h5 class="text-body-highlight mb-0">{{ _("Created")}}</h5>
</div>
<p class="mb-0 text-body-secondary">{{ lead.created|date }}</p>
</div>
<div class="mb-4">
<div class="d-flex align-items-center mb-1"><span class="me-2 uil uil-file-check-alt"></span>
<h5 class="text-body-highlight mb-0">{{ _("Lead Source")}}</h5>
</div>
<p class="mb-0 text-body-secondary">{{ lead.source|upper }}</p>
</div>
<div class="mb-4">
<div class="d-flex align-items-center mb-1"><span class="me-2 uil uil-file-check-alt"></span>
<h5 class="text-body-highlight mb-0">{{ _("Lead Channel")}}</h5>
</div>
<p class="mb-0 text-body-secondary">{{ lead.channel|upper }}</p>
</div>
<div class="mb-4">
<div class="d-flex align-items-center mb-1"><span class="me-2 uil uil-estate"></span>
<h5 class="mb-0">{{ _("Address") }}</h5>
</div>
<p class="mb-0 text-body-secondary">{{ lead.address}}</p>
</div>
<div class="mb-4">
<div class="d-flex align-items-center mb-1"><span class="me-2 uil uil-map"></span>
<h5 class="mb-0 text-body-highlight">{{ _("City") }}</h5>
</div>
<p class="mb-0 text-body-secondary">{{ lead.city }}</p>
</div>
</div>
</div>
</div>
<div class="phoenix-offcanvas-backdrop d-lg-none top-0" data-phoenix-backdrop="data-phoenix-backdrop"></div>
</div>
</div>
<div class="col-md-7 col-lg-7 col-xl-8">
<ul class="nav nav-underline fs-9 deal-details scrollbar flex-nowrap w-100 pb-1 mb-6" id="myTab" role="tablist" style="overflow-y: hidden;">
<li class="nav-item text-nowrap me-2" role="presentation"><a class="nav-link active" id="activity-tab" data-bs-toggle="tab" href="#tab-activity" role="tab" aria-controls="tab-activity" aria-selected="false" tabindex="-1"> <span class="fa-solid fa-chart-line me-2 tab-icon-color"></span>Activity</a></li>
<li class="nav-item text-nowrap me-2" role="presentation"><a class="nav-link" id="notes-tab" data-bs-toggle="tab" href="#tab-notes" role="tab" aria-controls="tab-notes" aria-selected="false" tabindex="-1"> <span class="fa-solid fa-clipboard me-2 tab-icon-color"></span>Notes</a></li>
<li class="nav-item text-nowrap me-2" role="presentation"><a class="nav-link" id="emails-tab" data-bs-toggle="tab" href="#tab-emails" role="tab" aria-controls="tab-emails" aria-selected="true"> <span class="fa-solid fa-envelope me-2 tab-icon-color"></span>Emails </a></li>
</ul>
<div class="tab-content" id="myTabContent">
<div class="tab-pane fade active show" id="tab-activity" role="tabpanel" aria-labelledby="activity-tab">
<div class="mb-1">
<h3 class="mb-4" id="scrollspyTask">{{ _("Activities") }} <span class="fw-light fs-7">({{ activities.count}})</span></h3>
</div>
{% for activity in activities %}
<div class="row justify-content-between align-items-md-center hover-actions-trigger btn-reveal-trigger border-translucent py-3 gx-0 border-top">
<div class="col-12 col-lg-auto">
<div class="d-flex ms-4 lh-1 align-items-center">
<p class="text-body-tertiary fs-9 ps-lg-3 fw-bold mb-md-0 mb-0">{{ activity.activity_type }} </p>
<p class="text-body-tertiary fs-10 ps-lg-3 mb-md-0 mb-0"> {{ _("by") }}: {{ activity.created_by.dealer.staff }} </p>
<p class="text-body-tertiary fs-10 ps-lg-3 mb-md-0 mb-0"> {{ _("on") }}: {{ activity.created }} </p>
</div>
</div>
</div>
{% endfor %}
</div>
<div class="tab-pane fade" id="tab-notes" role="tabpanel" aria-labelledby="notes-tab">
<div class="mb-1">
<h3 class="mb-0">{{ _("Notes") }}</h3>
</div>
<div class="d-flex align-items-center justify-content-end">
<a class="fw-bold fs-9 mb-4 text-end" href="{% url 'add_note' lead.pk %}"><span class="fas fa-plus me-1"></span>{{ _("Add Note")}}</a>
</div>
<div class="border-top border-bottom border-translucent" id="leadDetailsTable">
<div class="table-responsive scrollbar mx-n1 px-1">
<table class="table fs-9 mb-0">
<thead>
<tr>
<th class="align-middle pe-6 text-uppercase text-start" scope="col" style="width:40%;">Note</th>
<th class="align-middle text-start text-uppercase" scope="col" style="width:20%;">Created By</th>
<th class="align-middle text-start text-uppercase white-space-nowrap" scope="col" style="width:20%;">Created On</th>
<th class="align-middle pe-0 text-end" scope="col" style="width:10%;"> </th>
</tr>
</thead>
<tbody class="list" id="lead-details-table-body">
{% for note in notes %}
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
<td class="align-middle white-space-nowrap text-start fw-bold text-body-tertiary ps-1">{{note.note}}</td>
{% if note.created_by.staff %}
<td class="align-middle white-space-nowrap text-start white-space-nowrap">{{ note.created_by.staff.name }}</td>
{% else %}
<td class="align-middle white-space-nowrap text-start white-space-nowrap">{{ note.created_by.dealer.get_local_name }}</td>
{% endif %}
<td class="align-middle text-body-tertiary text-start white-space-nowrap">{{ note.created }}</td>
<td class="align-middle text-end white-space-nowrap pe-0 action py-2">
<div class="btn-reveal-trigger position-static">
<button class="btn btn-sm dropdown-toggle dropdown-caret-none transition-none btn-reveal" type="button" data-bs-toggle="dropdown" data-boundary="window" aria-haspopup="true" aria-expanded="false" data-bs-reference="parent"><span class="fas fa-ellipsis-h fs-10"></span></button>
<div class="dropdown-menu dropdown-menu-end py-2">
<a class="dropdown-item" href="">View</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item text-danger" href="">Remove</a>
</div>
</div>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
<div class="tab-pane fade" id="tab-emails" role="tabpanel" aria-labelledby="emails-tab">
<div class="mb-8">
<h3 class="mb-2" id="scrollspyEmails">Emails</h3>
<div>
<div class="scrollbar">
<ul class="nav nav-underline fs-9 flex-nowrap mb-1" id="emailTab" role="tablist">
<li class="nav-item me-3"><a class="nav-link text-nowrap border-0 active" id="mail-tab" data-bs-toggle="tab" href="#tab-mail" aria-controls="mail-tab" role="tab" aria-selected="true">Mails (68)<span class="text-body-tertiary fw-normal"></span></a></li>
<li class="nav-item me-3"><a class="nav-link text-nowrap border-0" id="drafts-tab" data-bs-toggle="tab" href="#tab-drafts" aria-controls="drafts-tab" role="tab" aria-selected="true">Drafts (6)<span class="text-body-tertiary fw-normal"></span></a></li>
<li class="nav-item me-3"><a class="nav-link text-nowrap border-0" id="schedule-tab" data-bs-toggle="tab" href="#tab-schedule" aria-controls="schedule-tab" role="tab" aria-selected="true">Scheduled (17)</a></li>
</ul>
</div>
<div class="tab-content" id="profileTabContent">
<div class="tab-pane fade show active" id="tab-mail" role="tabpanel" aria-labelledby="mail-tab">
<div class="border-top border-bottom border-translucent" id="allEmailsTable" data-list='{"valueNames":["subject","sent","date","source","status"],"page":7,"pagination":true}'>
<div class="table-responsive scrollbar mx-n1 px-1">
<table class="table fs-9 mb-0">
<thead>
<tr>
<th class="white-space-nowrap fs-9 align-middle ps-0" style="width:26px;">
<div class="form-check mb-0 fs-8">
<input class="form-check-input" type="checkbox" data-bulk-select='{"body":"all-email-table-body"}' />
</div>
</th>
<th class="sort white-space-nowrap align-middle pe-3 ps-0 text-uppercase" scope="col" data-sort="subject" style="width:31%; min-width:350px">Subject</th>
<th class="sort align-middle pe-3 text-uppercase" scope="col" data-sort="sent" style="width:15%; min-width:130px">Sent by</th>
<th class="sort align-middle text-start text-uppercase" scope="col" data-sort="date" style="min-width:165px">Date</th>
<th class="sort align-middle pe-0 text-uppercase" scope="col" style="width:15%; min-width:100px">Action</th>
<th class="sort align-middle text-end text-uppercase" scope="col" data-sort="status" style="width:15%; min-width:100px">Status</th>
</tr>
</thead>
<tbody class="list" id="all-email-table-body">
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
<td class="fs-9 align-middle px-0 py-3">
<div class="form-check mb-0 fs-8">
<input class="form-check-input" type="checkbox" data-bulk-select-row='{"mail":{"subject":"Quary about purchased soccer socks","email":"jackson@mail.com"},"active":true,"sent":"Jackson Pollock","date":"Dec 29, 2021 10:23 am","source":"Call","type_status":{"label":"sent","type":"badge-phoenix-success"}}' />
</div>
</td>
<td class="subject order align-middle white-space-nowrap py-2 ps-0"><a class="fw-semibold text-primary" href="#!">Quary about purchased soccer socks</a>
<div class="fs-10 d-block">jackson@mail.com</div>
</td>
<td class="sent align-middle white-space-nowrap text-start fw-bold text-body-tertiary py-2">Jackson Pollock</td>
<td class="date align-middle white-space-nowrap text-body py-2">Dec 29, 2021 10:23 am</td>
<td class="align-middle white-space-nowrap ps-3"><a class="text-body" href="#!"><span class="fa-solid fa-phone text-primary me-2"></span>Call</a></td>
<td class="status align-middle fw-semibold text-end py-2"><span class="badge badge-phoenix fs-10 badge-phoenix-success">sent</span></td>
</tr>
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
<td class="fs-9 align-middle px-0 py-3">
<div class="form-check mb-0 fs-8">
<input class="form-check-input" type="checkbox" data-bulk-select-row='{"mail":{"subject":"How to take the headache out of Order","email":"ansolo45@mail.com"},"active":true,"sent":"Ansolo Lazinatov","date":"Dec 27, 2021 3:27 pm","source":"Call","type_status":{"label":"delivered","type":"badge-phoenix-info"}}' />
</div>
</td>
<td class="subject order align-middle white-space-nowrap py-2 ps-0"><a class="fw-semibold text-primary" href="#!">How to take the headache out of Order</a>
<div class="fs-10 d-block">ansolo45@mail.com</div>
</td>
<td class="sent align-middle white-space-nowrap text-start fw-bold text-body-tertiary py-2">Ansolo Lazinatov</td>
<td class="date align-middle white-space-nowrap text-body py-2">Dec 27, 2021 3:27 pm</td>
<td class="align-middle white-space-nowrap ps-3"><a class="text-body" href="#!"><span class="fa-solid fa-phone text-primary me-2"></span>Call</a></td>
<td class="status align-middle fw-semibold text-end py-2"><span class="badge badge-phoenix fs-10 badge-phoenix-info">delivered</span></td>
</tr>
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
<td class="fs-9 align-middle px-0 py-3">
<div class="form-check mb-0 fs-8">
<input class="form-check-input" type="checkbox" data-bulk-select-row='{"mail":{"subject":"The Arnold Schwarzenegger of Order","email":"ansolo45@mail.com"},"active":true,"sent":"Ansolo Lazinatov","date":"Dec 24, 2021 10:44 am","source":"Call","type_status":{"label":"Bounce","type":"badge-phoenix-warning"}}' />
</div>
</td>
<td class="subject order align-middle white-space-nowrap py-2 ps-0"><a class="fw-semibold text-primary" href="#!">The Arnold Schwarzenegger of Order</a>
<div class="fs-10 d-block">ansolo45@mail.com</div>
</td>
<td class="sent align-middle white-space-nowrap text-start fw-bold text-body-tertiary py-2">Ansolo Lazinatov</td>
<td class="date align-middle white-space-nowrap text-body py-2">Dec 24, 2021 10:44 am</td>
<td class="align-middle white-space-nowrap ps-3"><a class="text-body" href="#!"><span class="fa-solid fa-phone text-primary me-2"></span>Call</a></td>
<td class="status align-middle fw-semibold text-end py-2"><span class="badge badge-phoenix fs-10 badge-phoenix-warning">Bounce</span></td>
</tr>
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
<td class="fs-9 align-middle px-0 py-3">
<div class="form-check mb-0 fs-8">
<input class="form-check-input" type="checkbox" data-bulk-select-row='{"mail":{"subject":"My order is not being taken","email":"jackson@mail.com"},"active":true,"sent":"Jackson Pollock","date":"Dec 19, 2021 4:55 pm","source":"Call","type_status":{"label":"Spam","type":"badge-phoenix-danger"}}' />
</div>
</td>
<td class="subject order align-middle white-space-nowrap py-2 ps-0"><a class="fw-semibold text-primary" href="#!">My order is not being taken</a>
<div class="fs-10 d-block">jackson@mail.com</div>
</td>
<td class="sent align-middle white-space-nowrap text-start fw-bold text-body-tertiary py-2">Jackson Pollock</td>
<td class="date align-middle white-space-nowrap text-body py-2">Dec 19, 2021 4:55 pm</td>
<td class="align-middle white-space-nowrap ps-3"><a class="text-body" href="#!"><span class="fa-solid fa-phone text-primary me-2"></span>Call</a></td>
<td class="status align-middle fw-semibold text-end py-2"><span class="badge badge-phoenix fs-10 badge-phoenix-danger">Spam</span></td>
</tr>
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
<td class="fs-9 align-middle px-0 py-3">
<div class="form-check mb-0 fs-8">
<input class="form-check-input" type="checkbox" data-bulk-select-row='{"mail":{"subject":"Shipment is missing","email":"jackson@mail.com"},"active":true,"sent":"Jackson Pollock","date":"Dec 19, 2021 2:43 pm","source":"Call","type_status":{"label":"sent","type":"badge-phoenix-success"}}' />
</div>
</td>
<td class="subject order align-middle white-space-nowrap py-2 ps-0"><a class="fw-semibold text-primary" href="#!">Shipment is missing</a>
<div class="fs-10 d-block">jackson@mail.com</div>
</td>
<td class="sent align-middle white-space-nowrap text-start fw-bold text-body-tertiary py-2">Jackson Pollock</td>
<td class="date align-middle white-space-nowrap text-body py-2">Dec 19, 2021 2:43 pm</td>
<td class="align-middle white-space-nowrap ps-3"><a class="text-body" href="#!"><span class="fa-solid fa-phone text-primary me-2"></span>Call</a></td>
<td class="status align-middle fw-semibold text-end py-2"><span class="badge badge-phoenix fs-10 badge-phoenix-success">sent</span></td>
</tr>
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
<td class="fs-9 align-middle px-0 py-3">
<div class="form-check mb-0 fs-8">
<input class="form-check-input" type="checkbox" data-bulk-select-row='{"mail":{"subject":"How can I order something urgently?","email":"ansolo45@mail.com"},"active":true,"sent":"Jackson Pollock","date":"Dec 19, 2021 2:43 pm","source":"Call","type_status":{"label":"Delivered","type":"badge-phoenix-info"}}' />
</div>
</td>
<td class="subject order align-middle white-space-nowrap py-2 ps-0"><a class="fw-semibold text-primary" href="#!">How can I order something urgently?</a>
<div class="fs-10 d-block">ansolo45@mail.com</div>
</td>
<td class="sent align-middle white-space-nowrap text-start fw-bold text-body-tertiary py-2">Jackson Pollock</td>
<td class="date align-middle white-space-nowrap text-body py-2">Dec 19, 2021 2:43 pm</td>
<td class="align-middle white-space-nowrap ps-3"><a class="text-body" href="#!"><span class="fa-solid fa-phone text-primary me-2"></span>Call</a></td>
<td class="status align-middle fw-semibold text-end py-2"><span class="badge badge-phoenix fs-10 badge-phoenix-info">Delivered</span></td>
</tr>
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
<td class="fs-9 align-middle px-0 py-3">
<div class="form-check mb-0 fs-8">
<input class="form-check-input" type="checkbox" data-bulk-select-row='{"mail":{"subject":"How the delicacy of the products will be handled?","email":"ansolo45@mail.com"},"active":true,"sent":"Ansolo Lazinatov","date":"Dec 16, 2021 5:18 pm","source":"Call","type_status":{"label":"bounced","type":"badge-phoenix-warning"}}' />
</div>
</td>
<td class="subject order align-middle white-space-nowrap py-2 ps-0"><a class="fw-semibold text-primary" href="#!">How the delicacy of the products will be handled?</a>
<div class="fs-10 d-block">ansolo45@mail.com</div>
</td>
<td class="sent align-middle white-space-nowrap text-start fw-bold text-body-tertiary py-2">Ansolo Lazinatov</td>
<td class="date align-middle white-space-nowrap text-body py-2">Dec 16, 2021 5:18 pm</td>
<td class="align-middle white-space-nowrap ps-3"><a class="text-body" href="#!"><span class="fa-solid fa-phone text-primary me-2"></span>Call</a></td>
<td class="status align-middle fw-semibold text-end py-2"><span class="badge badge-phoenix fs-10 badge-phoenix-warning">bounced</span></td>
</tr>
</tbody>
</table>
</div>
<div class="row align-items-center justify-content-between py-2 pe-0 fs-9">
<div class="col-auto d-flex">
<p class="mb-0 d-none d-sm-block me-3 fw-semibold text-body" data-list-info="data-list-info"></p><a class="fw-semibold" href="#!" data-list-view="*">View all<span class="fas fa-angle-right ms-1" data-fa-transform="down-1"></span></a><a class="fw-semibold d-none" href="#!" data-list-view="less">View Less<span class="fas fa-angle-right ms-1" data-fa-transform="down-1"></span></a>
</div>
<div class="col-auto d-flex">
<button class="page-link" data-list-pagination="prev"><span class="fas fa-chevron-left"></span></button>
<ul class="mb-0 pagination"></ul>
<button class="page-link pe-0" data-list-pagination="next"><span class="fas fa-chevron-right"></span></button>
</div>
</div>
</div>
</div>
<div class="tab-pane fade" id="tab-drafts" role="tabpanel" aria-labelledby="drafts-tab">
<div class="border-top border-bottom border-translucent" id="draftsEmailsTable" data-list='{"valueNames":["subject","sent","date","source","status"],"page":7,"pagination":true}'>
<div class="table-responsive scrollbar mx-n1 px-1">
<table class="table fs-9 mb-0">
<thead>
<tr>
<th class="white-space-nowrap fs-9 align-middle ps-0" style="width:26px;">
<div class="form-check mb-0 fs-8">
<input class="form-check-input" type="checkbox" data-bulk-select='{"body":"drafts-email-table-body"}' />
</div>
</th>
<th class="sort white-space-nowrap align-middle pe-3 ps-0 text-uppercase" scope="col" data-sort="subject" style="width:31%; min-width:350px">Subject</th>
<th class="sort align-middle pe-3 text-uppercase" scope="col" data-sort="sent" style="width:15%; min-width:130px">Sent by</th>
<th class="sort align-middle text-start text-uppercase" scope="col" data-sort="date" style="min-width:165px">Date</th>
<th class="sort align-middle pe-0 text-uppercase" scope="col" style="width:15%; min-width:100px">Action</th>
<th class="sort align-middle text-end text-uppercase" scope="col" data-sort="status" style="width:15%; min-width:100px">Status</th>
</tr>
</thead>
<tbody class="list" id="drafts-email-table-body">
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
<td class="fs-9 align-middle px-0 py-3">
<div class="form-check mb-0 fs-8">
<input class="form-check-input" type="checkbox" data-bulk-select-row='{"mail":{"subject":"Quary about purchased soccer socks","email":"jackson@mail.com"},"active":true,"sent":"Jackson Pollock","date":"Dec 29, 2021 10:23 am","source":"Call","type_status":{"label":"sent","type":"badge-phoenix-success"}}' />
</div>
</td>
<td class="subject order align-middle white-space-nowrap py-2 ps-0"><a class="fw-semibold text-primary" href="#!">Quary about purchased soccer socks</a>
<div class="fs-10 d-block">jackson@mail.com</div>
</td>
<td class="sent align-middle white-space-nowrap text-start fw-bold text-body-tertiary py-2">Jackson Pollock</td>
<td class="date align-middle white-space-nowrap text-body py-2">Dec 29, 2021 10:23 am</td>
<td class="align-middle white-space-nowrap ps-3"><a class="text-body" href="#!"><span class="fa-solid fa-phone text-primary me-2"></span>Call</a></td>
<td class="status align-middle fw-semibold text-end py-2"><span class="badge badge-phoenix fs-10 badge-phoenix-success">sent</span></td>
</tr>
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
<td class="fs-9 align-middle px-0 py-3">
<div class="form-check mb-0 fs-8">
<input class="form-check-input" type="checkbox" data-bulk-select-row='{"mail":{"subject":"How to take the headache out of Order","email":"ansolo45@mail.com"},"active":true,"sent":"Ansolo Lazinatov","date":"Dec 27, 2021 3:27 pm","source":"Call","type_status":{"label":"delivered","type":"badge-phoenix-info"}}' />
</div>
</td>
<td class="subject order align-middle white-space-nowrap py-2 ps-0"><a class="fw-semibold text-primary" href="#!">How to take the headache out of Order</a>
<div class="fs-10 d-block">ansolo45@mail.com</div>
</td>
<td class="sent align-middle white-space-nowrap text-start fw-bold text-body-tertiary py-2">Ansolo Lazinatov</td>
<td class="date align-middle white-space-nowrap text-body py-2">Dec 27, 2021 3:27 pm</td>
<td class="align-middle white-space-nowrap ps-3"><a class="text-body" href="#!"><span class="fa-solid fa-phone text-primary me-2"></span>Call</a></td>
<td class="status align-middle fw-semibold text-end py-2"><span class="badge badge-phoenix fs-10 badge-phoenix-info">delivered</span></td>
</tr>
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
<td class="fs-9 align-middle px-0 py-3">
<div class="form-check mb-0 fs-8">
<input class="form-check-input" type="checkbox" data-bulk-select-row='{"mail":{"subject":"The Arnold Schwarzenegger of Order","email":"ansolo45@mail.com"},"active":true,"sent":"Ansolo Lazinatov","date":"Dec 24, 2021 10:44 am","source":"Call","type_status":{"label":"Bounce","type":"badge-phoenix-warning"}}' />
</div>
</td>
<td class="subject order align-middle white-space-nowrap py-2 ps-0"><a class="fw-semibold text-primary" href="#!">The Arnold Schwarzenegger of Order</a>
<div class="fs-10 d-block">ansolo45@mail.com</div>
</td>
<td class="sent align-middle white-space-nowrap text-start fw-bold text-body-tertiary py-2">Ansolo Lazinatov</td>
<td class="date align-middle white-space-nowrap text-body py-2">Dec 24, 2021 10:44 am</td>
<td class="align-middle white-space-nowrap ps-3"><a class="text-body" href="#!"><span class="fa-solid fa-phone text-primary me-2"></span>Call</a></td>
<td class="status align-middle fw-semibold text-end py-2"><span class="badge badge-phoenix fs-10 badge-phoenix-warning">Bounce</span></td>
</tr>
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
<td class="fs-9 align-middle px-0 py-3">
<div class="form-check mb-0 fs-8">
<input class="form-check-input" type="checkbox" data-bulk-select-row='{"mail":{"subject":"My order is not being taken","email":"jackson@mail.com"},"active":true,"sent":"Jackson Pollock","date":"Dec 19, 2021 4:55 pm","source":"Call","type_status":{"label":"Spam","type":"badge-phoenix-danger"}}' />
</div>
</td>
<td class="subject order align-middle white-space-nowrap py-2 ps-0"><a class="fw-semibold text-primary" href="#!">My order is not being taken</a>
<div class="fs-10 d-block">jackson@mail.com</div>
</td>
<td class="sent align-middle white-space-nowrap text-start fw-bold text-body-tertiary py-2">Jackson Pollock</td>
<td class="date align-middle white-space-nowrap text-body py-2">Dec 19, 2021 4:55 pm</td>
<td class="align-middle white-space-nowrap ps-3"><a class="text-body" href="#!"><span class="fa-solid fa-phone text-primary me-2"></span>Call</a></td>
<td class="status align-middle fw-semibold text-end py-2"><span class="badge badge-phoenix fs-10 badge-phoenix-danger">Spam</span></td>
</tr>
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
<td class="fs-9 align-middle px-0 py-3">
<div class="form-check mb-0 fs-8">
<input class="form-check-input" type="checkbox" data-bulk-select-row='{"mail":{"subject":"Shipment is missing","email":"jackson@mail.com"},"active":true,"sent":"Jackson Pollock","date":"Dec 19, 2021 2:43 pm","source":"Call","type_status":{"label":"sent","type":"badge-phoenix-success"}}' />
</div>
</td>
<td class="subject order align-middle white-space-nowrap py-2 ps-0"><a class="fw-semibold text-primary" href="#!">Shipment is missing</a>
<div class="fs-10 d-block">jackson@mail.com</div>
</td>
<td class="sent align-middle white-space-nowrap text-start fw-bold text-body-tertiary py-2">Jackson Pollock</td>
<td class="date align-middle white-space-nowrap text-body py-2">Dec 19, 2021 2:43 pm</td>
<td class="align-middle white-space-nowrap ps-3"><a class="text-body" href="#!"><span class="fa-solid fa-phone text-primary me-2"></span>Call</a></td>
<td class="status align-middle fw-semibold text-end py-2"><span class="badge badge-phoenix fs-10 badge-phoenix-success">sent</span></td>
</tr>
</tbody>
</table>
</div>
<div class="row align-items-center justify-content-between py-2 pe-0 fs-9">
<div class="col-auto d-flex">
<p class="mb-0 d-none d-sm-block me-3 fw-semibold text-body" data-list-info="data-list-info"></p><a class="fw-semibold" href="#!" data-list-view="*">View all<span class="fas fa-angle-right ms-1" data-fa-transform="down-1"></span></a><a class="fw-semibold d-none" href="#!" data-list-view="less">View Less<span class="fas fa-angle-right ms-1" data-fa-transform="down-1"></span></a>
</div>
<div class="col-auto d-flex">
<button class="page-link" data-list-pagination="prev"><span class="fas fa-chevron-left"></span></button>
<ul class="mb-0 pagination"></ul>
<button class="page-link pe-0" data-list-pagination="next"><span class="fas fa-chevron-right"></span></button>
</div>
</div>
</div>
</div>
<div class="tab-pane fade" id="tab-schedule" role="tabpanel" aria-labelledby="schedule-tab">
<div class="border-top border-bottom border-translucent" id="scheduledEmailsTable" data-list='{"valueNames":["subject","sent","date","source","status"],"page":7,"pagination":true}'>
<div class="table-responsive scrollbar mx-n1 px-1">
<table class="table fs-9 mb-0">
<thead>
<tr>
<th class="white-space-nowrap fs-9 align-middle ps-0" style="width:26px;">
<div class="form-check mb-0 fs-8">
<input class="form-check-input" type="checkbox" data-bulk-select='{"body":"scheduled-email-table-body"}' />
</div>
</th>
<th class="sort white-space-nowrap align-middle pe-3 ps-0 text-uppercase" scope="col" data-sort="subject" style="width:31%; min-width:350px">Subject</th>
<th class="sort align-middle pe-3 text-uppercase" scope="col" data-sort="sent" style="width:15%; min-width:130px">Sent by</th>
<th class="sort align-middle text-start text-uppercase" scope="col" data-sort="date" style="min-width:165px">Date</th>
<th class="sort align-middle pe-0 text-uppercase" scope="col" style="width:15%; min-width:100px">Action</th>
<th class="sort align-middle text-end text-uppercase" scope="col" data-sort="status" style="width:15%; min-width:100px">Status</th>
</tr>
</thead>
<tbody class="list" id="scheduled-email-table-body">
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
<td class="fs-9 align-middle px-0 py-3">
<div class="form-check mb-0 fs-8">
<input class="form-check-input" type="checkbox" data-bulk-select-row='{"mail":{"subject":"Quary about purchased soccer socks","email":"jackson@mail.com"},"active":true,"sent":"Jackson Pollock","date":"Dec 29, 2021 10:23 am","source":"Call","type_status":{"label":"sent","type":"badge-phoenix-success"}}' />
</div>
</td>
<td class="subject order align-middle white-space-nowrap py-2 ps-0"><a class="fw-semibold text-primary" href="#!">Quary about purchased soccer socks</a>
<div class="fs-10 d-block">jackson@mail.com</div>
</td>
<td class="sent align-middle white-space-nowrap text-start fw-bold text-body-tertiary py-2">Jackson Pollock</td>
<td class="date align-middle white-space-nowrap text-body py-2">Dec 29, 2021 10:23 am</td>
<td class="align-middle white-space-nowrap ps-3"><a class="text-body" href="#!"><span class="fa-solid fa-phone text-primary me-2"></span>Call</a></td>
<td class="status align-middle fw-semibold text-end py-2"><span class="badge badge-phoenix fs-10 badge-phoenix-success">sent</span></td>
</tr>
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
<td class="fs-9 align-middle px-0 py-3">
<div class="form-check mb-0 fs-8">
<input class="form-check-input" type="checkbox" data-bulk-select-row='{"mail":{"subject":"How to take the headache out of Order","email":"ansolo45@mail.com"},"active":true,"sent":"Ansolo Lazinatov","date":"Dec 27, 2021 3:27 pm","source":"Call","type_status":{"label":"delivered","type":"badge-phoenix-info"}}' />
</div>
</td>
<td class="subject order align-middle white-space-nowrap py-2 ps-0"><a class="fw-semibold text-primary" href="#!">How to take the headache out of Order</a>
<div class="fs-10 d-block">ansolo45@mail.com</div>
</td>
<td class="sent align-middle white-space-nowrap text-start fw-bold text-body-tertiary py-2">Ansolo Lazinatov</td>
<td class="date align-middle white-space-nowrap text-body py-2">Dec 27, 2021 3:27 pm</td>
<td class="align-middle white-space-nowrap ps-3"><a class="text-body" href="#!"><span class="fa-solid fa-phone text-primary me-2"></span>Call</a></td>
<td class="status align-middle fw-semibold text-end py-2"><span class="badge badge-phoenix fs-10 badge-phoenix-info">delivered</span></td>
</tr>
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
<td class="fs-9 align-middle px-0 py-3">
<div class="form-check mb-0 fs-8">
<input class="form-check-input" type="checkbox" data-bulk-select-row='{"mail":{"subject":"The Arnold Schwarzenegger of Order","email":"ansolo45@mail.com"},"active":true,"sent":"Ansolo Lazinatov","date":"Dec 24, 2021 10:44 am","source":"Call","type_status":{"label":"Bounce","type":"badge-phoenix-warning"}}' />
</div>
</td>
<td class="subject order align-middle white-space-nowrap py-2 ps-0"><a class="fw-semibold text-primary" href="#!">The Arnold Schwarzenegger of Order</a>
<div class="fs-10 d-block">ansolo45@mail.com</div>
</td>
<td class="sent align-middle white-space-nowrap text-start fw-bold text-body-tertiary py-2">Ansolo Lazinatov</td>
<td class="date align-middle white-space-nowrap text-body py-2">Dec 24, 2021 10:44 am</td>
<td class="align-middle white-space-nowrap ps-3"><a class="text-body" href="#!"><span class="fa-solid fa-phone text-primary me-2"></span>Call</a></td>
<td class="status align-middle fw-semibold text-end py-2"><span class="badge badge-phoenix fs-10 badge-phoenix-warning">Bounce</span></td>
</tr>
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
<td class="fs-9 align-middle px-0 py-3">
<div class="form-check mb-0 fs-8">
<input class="form-check-input" type="checkbox" data-bulk-select-row='{"mail":{"subject":"My order is not being taken","email":"jackson@mail.com"},"active":true,"sent":"Jackson Pollock","date":"Dec 19, 2021 4:55 pm","source":"Call","type_status":{"label":"Spam","type":"badge-phoenix-danger"}}' />
</div>
</td>
<td class="subject order align-middle white-space-nowrap py-2 ps-0"><a class="fw-semibold text-primary" href="#!">My order is not being taken</a>
<div class="fs-10 d-block">jackson@mail.com</div>
</td>
<td class="sent align-middle white-space-nowrap text-start fw-bold text-body-tertiary py-2">Jackson Pollock</td>
<td class="date align-middle white-space-nowrap text-body py-2">Dec 19, 2021 4:55 pm</td>
<td class="align-middle white-space-nowrap ps-3"><a class="text-body" href="#!"><span class="fa-solid fa-phone text-primary me-2"></span>Call</a></td>
<td class="status align-middle fw-semibold text-end py-2"><span class="badge badge-phoenix fs-10 badge-phoenix-danger">Spam</span></td>
</tr>
</tbody>
</table>
</div>
<div class="row align-items-center justify-content-between py-2 pe-0 fs-9">
<div class="col-auto d-flex">
<p class="mb-0 d-none d-sm-block me-3 fw-semibold text-body" data-list-info="data-list-info"></p><a class="fw-semibold" href="#!" data-list-view="*">View all<span class="fas fa-angle-right ms-1" data-fa-transform="down-1"></span></a><a class="fw-semibold d-none" href="#!" data-list-view="less">View Less<span class="fas fa-angle-right ms-1" data-fa-transform="down-1"></span></a>
</div>
<div class="col-auto d-flex">
<button class="page-link" data-list-pagination="prev"><span class="fas fa-chevron-left"></span></button>
<ul class="mb-0 pagination"></ul>
<button class="page-link pe-0" data-list-pagination="next"><span class="fas fa-chevron-right"></span></button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
{% endblock %}

View File

@ -0,0 +1,222 @@
{% extends "base.html" %}
{% load i18n static%}
{% block content %}
<div class="row g-3">
<div class="col-sm-6 col-md-8">
<h2>{% if form.instance.pk %}{{ _("Edit Lead") }}{% else %}{{ _("Add New Lead") }}{% endif %}</h2>
</div>
<div class="col-sm-6 col-md-8">
<form class="row g-3" method="post" class="form" novalidate>
{% csrf_token %}
<!-- Title -->
<div class="col-sm-6 col-md-4">
<div class="form-floating">
<select class="form-control" id="{{ form.title.id_for_label }}" name="{{ form.title.name }}">
{% for value, label in form.title.field.choices %}
<option value="{{ value }}" {% if form.title.value == value %}selected{% endif %}>{{ label }}</option>
{% endfor %}
</select>
<label for="{{ form.title.id_for_label }}">{{ _("Title") }}</label>
</div>
{{ form.title.errors }}
</div>
<!-- First Name -->
<div class="col-sm-6 col-md-4">
<div class="form-floating">
<input type="text" class="form-control" id="{{ form.first_name.id_for_label }}" name="{{ form.first_name.name }}" value="{{ form.first_name.value|default:'' }}" placeholder="{{ _('Enter first name') }}">
<label for="{{ form.first_name.id_for_label }}">{{ _("First Name") }}</label>
</div>
{{ form.first_name.errors }}
</div>
<!-- Last Name -->
<div class="col-sm-6 col-md-4">
<div class="form-floating">
<input type="text" class="form-control" id="{{ form.last_name.id_for_label }}" name="{{ form.last_name.name }}" value="{{ form.last_name.value|default:'' }}" placeholder="{{ _('Enter last name') }}">
<label for="{{ form.last_name.id_for_label }}">{{ _("Last Name") }}</label>
</div>
{{ form.last_name.errors }}
</div>
<!-- Email -->
<div class="col-sm-6 col-md-4">
<div class="form-floating">
<input type="email" class="form-control" id="{{ form.email.id_for_label }}" name="{{ form.email.name }}" value="{{ form.email.value|default:'' }}" placeholder="{{ _('Enter email') }}">
<label for="{{ form.email.id_for_label }}">{{ _("Email") }}</label>
</div>
{{ form.email.errors }}
</div>
<!-- Phone Number -->
<div class="col-sm-6 col-md-4">
<div class="form-floating">
<input type="text" class="form-control" id="{{ form.phone_number.id_for_label }}" name="{{ form.phone_number.name }}" value="{{ form.phone_number.value|default:'' }}" placeholder="{{ _('Enter phone number') }}">
<label for="{{ form.phone_number.id_for_label }}">{{ _("Phone Number") }}</label>
</div>
{{ form.phone_number.errors }}
</div>
<!-- Salary -->
<div class="col-sm-6 col-md-4">
<div class="form-floating">
<input type="number" class="form-control" id="{{ form.salary.id_for_label }}" name="{{ form.salary.name }}" value="{{ form.salary.value|default:'' }}" placeholder="{{ _('Enter salary') }}">
<label for="{{ form.salary.id_for_label }}">{{ _("Salary") }}</label>
</div>
{{ form.salary.errors }}
</div>
<!-- Obligations -->
<div class="col-sm-6 col-md-4">
<div class="form-floating">
<input type="number" class="form-control" id="{{ form.obligations.id_for_label }}" name="{{ form.obligations.name }}" value="{{ form.obligations.value|default:'' }}" placeholder="{{ _('Enter obligations') }}">
<label for="{{ form.obligations.id_for_label }}">{{ _("Obligations") }}</label>
</div>
{{ form.obligations.errors }}
</div>
<!-- Car Make -->
<div class="col-sm-6 col-md-4">
<div class="form-floating">
<select class="form-control" id="{{ form.id_car_make.id_for_label }}" name="{{ form.id_car_make.name }}">
{% for value, label in form.id_car_make.field.choices %}
<option value="{{ value }}" {% if form.id_car_make.value == value %}selected{% endif %}>{{ label }}</option>
{% endfor %}
</select>
<label for="{{ form.id_car_make.id_for_label }}">{{ _("Car Make") }}</label>
</div>
{{ form.id_car_make.errors }}
</div>
<!-- Car Model -->
<div class="col-sm-6 col-md-4">
<div class="form-floating">
<select class="form-control" id="{{ form.id_car_model.id_for_label }}" name="{{ form.id_car_model.name }}">
{% for value, label in form.id_car_model.field.choices %}
<option value="{{ value }}" {% if form.id_car_model.value == value %}selected{% endif %}>{{ label }}</option>
{% endfor %}
</select>
<label for="{{ form.id_car_model.id_for_label }}">{{ _("Car Model") }}</label>
</div>
{{ form.id_car_model.errors }}
</div>
<!-- Year -->
<div class="col-sm-6 col-md-4">
<div class="form-floating">
<input type="number" class="form-control" id="{{ form.year.id_for_label }}" name="{{ form.year.name }}" value="{{ form.year.value|default:'' }}" placeholder="{{ _('Enter year') }}">
<label for="{{ form.year.id_for_label }}">{{ _("Year") }}</label>
</div>
{{ form.year.errors }}
</div>
<!-- Source -->
<div class="col-sm-6 col-md-4">
<div class="form-floating">
<select class="form-control" id="{{ form.source.id_for_label }}" name="{{ form.source.name }}">
{% for value, label in form.source.field.choices %}
<option value="{{ value }}" {% if form.source.value == value %}selected{% endif %}>{{ label }}</option>
{% endfor %}
</select>
<label for="{{ form.source.id_for_label }}">{{ _("Source") }}</label>
</div>
{{ form.source.errors }}
</div>
<!-- Channel -->
<div class="col-sm-6 col-md-4">
<div class="form-floating">
<select class="form-control" id="{{ form.channel.id_for_label }}" name="{{ form.channel.name }}">
{% for value, label in form.channel.field.choices %}
<option value="{{ value }}" {% if form.channel.value == value %}selected{% endif %}>{{ label }}</option>
{% endfor %}
</select>
<label for="{{ form.channel.id_for_label }}">{{ _("Channel") }}</label>
</div>
{{ form.channel.errors }}
</div>
<!-- Assigned -->
<div class="col-sm-6 col-md-4">
<div class="form-floating">
<select class="form-control" id="{{ form.assigned.id_for_label }}" name="{{ form.assigned.name }}">
{% for value, label in form.assigned.field.choices %}
<option value="{{ value }}" {% if form.assigned.value == value %}selected{% endif %}>{{ label }}</option>
{% endfor %}
</select>
<label for="{{ form.assigned.id_for_label }}">{{ _("Assigned To") }}</label>
</div>
{{ form.assigned.errors }}
</div>
<!-- Priority -->
<div class="col-sm-6 col-md-4">
<div class="form-floating">
<select class="form-control" id="{{ form.priority.id_for_label }}" name="{{ form.priority.name }}">
{% for value, label in form.priority.field.choices %}
<option value="{{ value }}" {% if form.priority.value == value %}selected{% endif %}>{{ label }}</option>
{% endfor %}
</select>
<label for="{{ form.priority.id_for_label }}">{{ _("Priority") }}</label>
</div>
{{ form.priority.errors }}
</div>
<!-- Buttons -->
<div class="col-sm-12">
<button type="submit" class="btn btn-phoenix-primary">{{ _("Save") }}</button>
<a href="{% url 'lead_list' %}" class="btn btn-phoenix-secondary">{{ _("Cancel") }}</a>
</div>
</form>
</div>
</div>
<script>
function getCookie(name) {
let cookieValue = null;
if (document.cookie && document.cookie !== "") {
const cookies = document.cookie.split(";");
for (let cookie of cookies) {
cookie = cookie.trim();
if (cookie.substring(0, name.length + 1) === name + "=") {
cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
break;
}
}
}
return cookieValue;
}
document.addEventListener("DOMContentLoaded", function () {
const ajaxUrl = "{% url 'ajax_handler' %}";
const makeSelect = document.getElementById("{{ form.id_car_make.id_for_label }}");
const modelSelect = document.getElementById("{{ form.id_car_model.id_for_label }}");
const csrfToken = getCookie("csrfToken");
function resetDropdown(dropdown, placeholder) {
dropdown.innerHTML = `<option value="">${placeholder}</option>`;
}
async function loadModels(makeId) {
resetDropdown(modelSelect, '{% trans "Select" %}');
const response = await fetch(`${ajaxUrl}?action=get_models&make_id=${makeId}`, {
headers: {
"X-Requested-With": "XMLHttpRequest",
"X-CSRFToken": csrfToken,
},
});
const data = await response.json();
data.forEach((model) => {
const option = document.createElement("option");
option.value = model.id_car_model;
option.textContent = document.documentElement.lang === "en" ? model.name : model.arabic_name;
modelSelect.appendChild(option);
});
}
makeSelect.addEventListener("change", () => {
const make_id = makeSelect.value;
if (make_id) loadModels(make_id);
});
})
</script>
{% endblock %}

View File

@ -0,0 +1,200 @@
{% extends 'base.html' %}
{% load i18n static %}
{% block title %}{{ _('Leads')|capfirst }}{% endblock title %}
{% block content %}
<div class="row">
<h2 class="mb-4">{{ _("Leads")|capfirst }}</h2>
<div class="row g-3 justify-content-between mb-4">
<div class="col-auto">
<div class="d-md-flex justify-content-between">
<div>
<a href="{% url 'lead_create' %}" class="btn btn-phoenix-primary"><span class="fas fa-plus me-2"></span>{{ _("Add Lead") }}</a>
</div>
</div>
</div>
<div class="col-auto">
<div class="d-flex">
<div class="search-box me-2">
<form method="get" class="d-inline-block position-relative">
<div class="input-group">
<button type="submit" class="btn btn-phoenix-primary"><span class="fas fa-search search-box-icon"></span></button>
<input name="q" class="form-control search-input search" type="search" placeholder="{{ _('Enter lead name') }}" value="{{ request.GET.q }}" />
{% if request.GET.q %}
<a href="{% url request.resolver_match.view_name %}" class="btn btn-close"></a>
</div>
{% endif %}
</form>
</div>
</div>
</div>
</div>
<div class="row g-3">
<div class="col-12">
{% if page_obj.object_list %}
<div class="table-responsive scrollbar mx-n1 px-1">
<table class="table fs-9 mb-0 border-top border-translucent">
<thead>
<tr>
<th class="align-middle white-space-nowrap text-uppercase" scope="col" style="width: 10%;">{{ _("Status")|capfirst }}</th>
<th class="align-middle white-space-nowrap text-uppercase" scope="col" style="width: 25%;">
<div class="d-inline-flex flex-center">
<div class="d-flex align-items-center px-1 py-1 bg-warning-subtle rounded me-2"><span class="text-warning-dark" data-feather="user"></span></div>
<span>{{ _("Name")|capfirst }}</span>
</div>
</th>
<th class="align-middle white-space-nowrap text-uppercase" scope="col" style="width: 15%;">
<div class="d-inline-flex flex-center">
<div class="d-flex align-items-center px-1 py-1 bg-success-subtle rounded me-2"><span class="text-success-dark" data-feather="mail"></span></div>
<span>{{ _("email")|capfirst }}</span>
</div>
</th>
<th class="align-middle white-space-nowrap text-uppercase" scope="col" style="width: 15%;">
<div class="d-inline-flex flex-center">
<div class="d-flex align-items-center px-1 py-1 bg-primary-subtle rounded me-2"><span class="text-primary-dark" data-feather="phone"></span></div>
<span>{{ _("Phone Number") }}</span>
</div>
</th>
<th class="align-middle white-space-nowrap text-uppercase" scope="col" style="width: 10%;">
<div class="d-inline-flex flex-center">
<div class="d-flex align-items-center bg-info-subtle rounded me-2"><span class="text-info-dark" data-feather="database"></span></div>
<span>{{ _("Source")|capfirst }}</span>
</div>
</th>
<th class="align-middle white-space-nowrap text-uppercase" scope="col" style="width: 10%;">
<div class="d-inline-flex flex-center">
<div class="d-flex align-items-center bg-warning-subtle rounded me-2"><span class="text-warning-dark" data-feather="grid"></span></div>
<span>{{ _("Channel")|capfirst }}</span>
</div>
</th>
<th class="align-middle white-space-nowrap text-uppercase" scope="col" style="width: 15%;">
{{ _("Create date") }}
</th>
<th class="text-end white-space-nowrap align-middle" scope="col"></th>
</tr>
</thead>
<tbody class="list" id="lead-tables-body">
{% for lead in leads %}
<!-- Delete Modal -->
<div class="modal fade" id="deleteModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="deleteModalLabel" aria-hidden="true">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="deleteModalLabel">
{% trans "Delete Lead" %}
<span data-feather="alert-circle"></span>
</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body text-center">
<p class="mb-0 text-danger fw-bold">
{% trans "Are you sure you want to delete this lead?" %}
</p>
<button type="button" class="btn btn-secondary btn-sm" data-bs-dismiss="modal">
{% trans "No" %}
</button>
<a type="button" class="btn btn-danger btn-sm" href="{% url 'lead_delete' lead.pk %}">
{% trans "Yes" %}
</a>
</div>
</div>
</div>
</div>
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
<td class="align-middle white-space-nowrap fw-semibold">
<div class="d-flex align-items-center">
{% if lead.status == "new" %}
<span class="badge badge-phoenix badge-phoenix-primary"><span class="badge-label">{{_("New")}}</span><span class="fa fa-bell ms-1"></span></span>
{% elif lead.status == "pending" %}
<span class="badge badge-phoenix badge-phoenix-warning"><span class="badge-label">{{_("Pending")}}</span><span class="fa fa-clock-o ms-1"></span></span>
{% elif lead.status == "in_progress" %}
<span class="badge badge-phoenix badge-phoenix-info"><span class="badge-label">{{_("In Progress")}}</span><span class="fa fa-wrench ms-1"></span></span>
{% elif lead.status == "qualified" %}
<span class="badge badge-phoenix badge-phoenix-success"><span class="badge-label">{{_("Qualified")}}</span><span class="fa fa-check ms-1"></span></span>
{% elif lead.status == "canceled" %}
<span class="badge badge-phoenix badge-phoenix-danger"><span class="badge-label">{{_("Canceled")}}</span><span class="fa fa-times ms-1"></span></span>
{% endif %}
</div>
</td>
<td class="align-middle white-space-nowrap fw-semibold">
<div class="d-flex align-items-center">
<a class="fs-8 fw-bold" href="{% url 'lead_detail' lead.pk %}">{{ lead.first_name }} {{ lead.last_name }}</a>
</div>
</td>
<td class="align-middle white-space-nowrap fw-semibold"><a class="text-body-highlight" href="">{{ lead.email }}</a></td>
<td class="align-middle white-space-nowrap fw-semibold"><a class="text-body-highlight" href="tel:{{ lead.phone_number }}">{{ lead.phone_number }}</a></td>
<td class="align-middle white-space-nowrap fw-semibold text-body-highlight">{{ lead.source|upper }}</td>
<td class="align-middle white-space-nowrap text-body-tertiary text-opacity-85 fw-semibold text-body-highlight">{{ lead.channel|upper }}</td>
<td class="align-middle white-space-nowrap text-body-tertiary text-opacity-85 text-body-tertiary">{{ lead.created|date }}</td>
<td class="align-middle white-space-nowrap text-end">
<div class="btn-reveal-trigger position-static">
<button
class="btn btn-sm dropdown-toggle dropdown-caret-none transition-none btn-reveal fs-10"
type="button"
data-bs-toggle="dropdown"
data-boundary="window"
aria-haspopup="true"
aria-expanded="false"
data-bs-reference="parent">
<span class="fas fa-ellipsis-h fs-10"></span>
</button>
<div class="dropdown-menu dropdown-menu-end py-2">
<a href="{% url 'lead_update' lead.id %}" class="dropdown-item text-success-dark">{% trans "Edit" %}</a>
<div class="dropdown-divider"></div>
<button class="dropdown-item text-danger" data-bs-toggle="modal" data-bs-target="#deleteModal">{% trans "Delete" %}</button>
</div>
</div>
</td>
</tr>
{% endfor %}
</tbody>
{% endif %}
</table>
</div>
</div>
</div>
<div class="row align-items-center justify-content-end py-4 pe-0 fs-9">
<div class="col-auto">
<!-- Optional: Pagination -->
{% if is_paginated %}
<nav aria-label="Page navigation">
<ul class="pagination pagination-sm justify-content-center">
{% if page_obj.has_previous %}
<li class="page-item py-0">
<a class="page-link" href="?page={{ page_obj.previous_page_number }}" aria-label="Previous">
<span aria-hidden="true">&laquo;</span>
</a>
</li>
{% else %}
<li class="page-item disabled">
<a class="page-link" href="#" aria-label="Previous">
<span aria-hidden="true">&laquo;</span>
</a>
</li>
{% endif %} {% for num in page_obj.paginator.page_range %} {% if page_obj.number == num %}
<li class="page-item active"><a class="page-link" href="?page={{ num }}">{{ num }}</a></li>
{% else %}
<li class="page-item"><a class="page-link" href="?page={{ num }}">{{ num }}</a></li>
{% endif %} {% endfor %} {% if page_obj.has_next %}
<li class="page-item">
<a class="page-link" href="?page={{ page_obj.next_page_number }}" aria-label="Next">
<span aria-hidden="true">&raquo;</span>
</a>
</li>
{% else %}
<li class="page-item disabled">
<a class="page-link" href="#" aria-label="Next">
<span aria-hidden="true">&raquo;</span>
</a>
</li>
{% endif %}
</ul>
</nav>
{% endif %}
</div>
</div>
</div>
{% endblock %}

View File

@ -4,22 +4,21 @@
{% block content %}
<div class="content">
<div class="pb-9">
<div class="row align-items-center justify-content-between g-3 mb-4">
<div class="col-12 col-md-auto">
<h2 class="mb-0">Deal details</h2>
<h2 class="mb-0">O{{ _("pportunity details")}}</h2>
</div>
<div class="col-12 col-md-auto d-flex">
<button class="btn btn-phoenix-secondary px-3 px-sm-5 me-2"><span class="fa-solid fa-edit me-sm-2"></span><span class="d-none d-sm-inline">Edit </span></button>
<button class="btn btn-phoenix-danger me-2"><span class="fa-solid fa-trash me-2"></span><span>Delete Deal</span></button>
<button class="btn btn-phoenix-secondary px-3 px-sm-5 me-2"><span class="fa-solid fa-edit me-sm-2"></span><span class="d-none d-sm-inline">Edit</span></button>
<button class="btn btn-phoenix-danger me-2"><span class="fa-solid fa-trash me-2"></span><span>Delete</span></button>
<div>
<button class="btn px-3 btn-phoenix-secondary" type="button" data-bs-toggle="dropdown" data-boundary="window" aria-haspopup="true" aria-expanded="false" data-bs-reference="parent"><span class="fa-solid fa-ellipsis"></span></button>
<ul class="dropdown-menu dropdown-menu-end p-0" style="z-index: 9999;">
<li><a class="dropdown-item" href="#!">View profile</a></li>
<li><a class="dropdown-item" href="#!">Report</a></li>
<li><a class="dropdown-item" href="#!">Manage notifications</a></li>
<li><a class="dropdown-item text-danger" href="#!">Delete Lead</a></li>
<li><a class="dropdown-item" href="">View profile</a></li>
<li><a class="dropdown-item" href="">Report</a></li>
<li><a class="dropdown-item" href="">Manage notifications</a></li>
<li><a class="dropdown-item text-danger" href="">Delete Lead</a></li>
</ul>
</div>
</div>
@ -31,30 +30,21 @@
<div class="card-body">
<div class="row align-items-center g-3">
<div class="col-12 col-sm-auto flex-1">
<h3 class="fw-bolder mb-2 line-clamp-1">Start-Up Growth Suite</h3>
<h3 class="fw-bolder mb-2 line-clamp-1">{{ opportunity.car.id_car_make.get_local_name }} - {{ opportunity.car.id_car_model.get_local_name }} - {{ opportunity.car.year }}</h3>
<div class="d-flex align-items-center mb-4">
<h5 class="mb-0 me-4">USD $12,000.00</h5>
<h5 class="fw-semibold"><span class="d-inline-block lh-sm me-1" data-feather="grid" style="height:16px;width:16px;"></span><span class="d-inline-block lh-sm">Financial</span></h5>
<h5 class="mb-0 me-4">{{ opportunity.car.finances.total }} <span class="fw-light">{{ _("SAR") }}</span></h5>
</div>
<div class="d-md-flex d-xl-block align-items-center justify-content-between mb-5">
<div class="d-flex align-items-center mb-3 mb-md-0 mb-xl-3">
<div class="avatar avatar-xl me-3"><img class="rounded-circle" src="../../assets/img/team/72x72/58.webp" alt="" /></div>
<div class="avatar avatar-xl me-3"><img class="rounded" src="{{ opportunity.car.id_car_make.logo.url }}" alt="" /></div>
<div>
<h5>Ansolo Lazinatov</h5>
<h5>{{ opportunity.staff.get_local_name}}</h5>
<div class="dropdown"><a class="text-body-secondary dropdown-toggle text-decoration-none dropdown-caret-none" href="#!" data-bs-toggle="dropdown" aria-expanded="false">
Owner<span class="fa-solid fa-caret-down text-body-secondary fs-9 ms-2"></span></a>
<div class="dropdown-menu shadow-sm" style="min-width:20rem">
<div class="card position-relative border-0">
<div class="card-body p-0">
<div class="mx-3">
<h4 class="mb-3 fw-bold">Switch ownership</h4>
<h5 class="mb-3">Deal Owner</h5>
<select class="form-select mb-3" aria-label="Default select">
<option selected="selected">Select</option>
<option value="1">Jerry Seinfield</option>
<option value="2">Anthoney Michael</option>
<option value="3">Ansolo Lazinatov</option>
</select>
<div class="text-end">
<button class="btn btn-link text-danger" type="button">Cancel</button>
<button class="btn btn-sm btn-primary px-5" type="button">Save</button>
@ -66,14 +56,14 @@
</div>
</div>
</div>
<div><span class="badge badge-phoenix badge-phoenix-success me-2">Success</span><span class="badge badge-phoenix badge-phoenix-danger me-2">Lost</span><span class="badge badge-phoenix badge-phoenix-secondary">Close</span></div>
<div><span class="badge badge-phoenix badge-phoenix-success me-2">{{ opportunity.get_stage_display }}</span><span class="badge badge-phoenix badge-phoenix-danger me-2">{{ opportunity.get_status_display }}</span></div>
</div>
<div class="progress mb-2" style="height:5px">
<div class="progress-bar bg-primary-lighter" data-bs-theme="light" role="progressbar" style="width: 40%" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<div class="d-flex align-items-center justify-content-between">
<p class="mb-0"> New</p>
<div><span class="d-inline-block lh-sm me-1" data-feather="clock" style="height:16px;width:16px;"></span><span class="d-inline-block lh-sm"> Dec 15, 05:00AM</span></div>
<p class="mb-0"> {{ opportunity.get_status_display }}</p>
<div><span class="d-inline-block lh-sm me-1" data-feather="clock" style="height:16px;width:16px;"></span><span class="d-inline-block lh-sm"> {{ opportunity.created}}</span></div>
</div>
</div>
</div>
@ -152,8 +142,8 @@
<div class="d-sm-block d-inline-flex d-md-flex flex-xl-column flex-xxl-row align-items-center align-items-xl-start align-items-xxl-center">
<div class="d-flex bg-success-subtle rounded flex-center me-3 mb-sm-3 mb-md-0 mb-xl-3 mb-xxl-0" style="width:32px; height:32px"><span class="text-success-dark" data-feather="dollar-sign" style="width:24px; height:24px"></span></div>
<div>
<p class="fw-bold mb-1">Deal Amount</p>
<h4 class="fw-bolder text-nowrap">$12,000.00</h4>
<p class="fw-bold mb-1">{{ _("Amount") }}</p>
<h4 class="fw-bolder text-nowrap">{{ opportunity.car.finances.total }}</h4>
</div>
</div>
</div>
@ -161,7 +151,7 @@
<div class="d-sm-block d-inline-flex d-md-flex flex-xl-column flex-xxl-row align-items-center align-items-xl-start align-items-xxl-center border-start-sm ps-sm-5 border-translucent">
<div class="d-flex bg-info-subtle rounded flex-center me-3 mb-sm-3 mb-md-0 mb-xl-3 mb-xxl-0" style="width:32px; height:32px"><span class="text-info-dark" data-feather="code" style="width:24px; height:24px"></span></div>
<div>
<p class="fw-bold mb-1">Deal Code</p>
<p class="fw-bold mb-1">Code</p>
<h4 class="fw-bolder text-nowrap">PHO1234</h4>
</div>
</div>
@ -170,7 +160,7 @@
<div class="d-sm-block d-inline-flex d-md-flex flex-xl-column flex-xxl-row align-items-center align-items-xl-start align-items-xxl-center border-start-sm ps-sm-5 border-translucent">
<div class="d-flex bg-primary-subtle rounded flex-center me-3 mb-sm-3 mb-md-0 mb-xl-3 mb-xxl-0" style="width:32px; height:32px"><span class="text-primary-dark" data-feather="layout" style="width:24px; height:24px"></span></div>
<div>
<p class="fw-bold mb-1">Deal Type</p>
<p class="fw-bold mb-1">Type</p>
<h4 class="fw-bolder text-nowrap">New Business</h4>
</div>
</div>
@ -196,19 +186,19 @@
</td>
<td class="py-2 d-none d-sm-block pe-sm-2">:</td>
<td class="py-2">
<p class="ps-6 ps-sm-0 fw-semibold mb-0 mb-0 pb-3 pb-sm-0">12.5</p>
<p class="ps-6 ps-sm-0 fw-semibold mb-0 mb-0 pb-3 pb-sm-0">{{ opportunity.probability }}</p>
</td>
</tr>
<tr>
<td class="py-2">
<div class="d-flex align-items-center">
<div class="d-flex bg-info-subtle rounded-circle flex-center me-3" style="width:24px; height:24px"><span class="text-info-dark" data-feather="trending-up" style="width:16px; height:16px"></span></div>
<p class="fw-bold mb-0">Revenue</p>
<p class="fw-bold mb-0">{{ _("Revenue") }}</p>
</div>
</td>
<td class="py-2 d-none d-sm-block pe-sm-2">:</td>
<td class="py-2">
<p class="ps-6 ps-sm-0 fw-semibold mb-0">$1,500.00</p>
<p class="ps-6 ps-sm-0 fw-semibold mb-0">{{ opportunity.car.finances.revenue }}</p>
</td>
</tr>
</table>
@ -224,21 +214,21 @@
<td class="py-2">
<div class="d-inline-flex align-items-center">
<div class="d-flex bg-primary-subtle rounded-circle flex-center me-3" style="width:24px; height:24px"><span class="text-primary-dark" data-feather="phone" style="width:16px; height:16px"></span></div>
<p class="fw-bold mb-0">Phone</p>
<p class="fw-bold mb-0">{{ _("Phone Number") }}</p>
</div>
</td>
<td class="py-2 d-none d-sm-block pe-sm-2">:</td>
<td class="py-2"><a class="ps-6 ps-sm-0 fw-semibold mb-0 pb-3 pb-sm-0 text-body" href="tel:+11123456789">+11 123 456 789</a></td>
<td class="py-2"><a class="ps-6 ps-sm-0 fw-semibold mb-0 pb-3 pb-sm-0 text-body" href="tel:{{ opportunity.customer.phone_number }}">{{ opportunity.customer.phone_number }}</a></td>
</tr>
<tr>
<td class="py-2">
<div class="d-flex align-items-center">
<div class="d-flex bg-warning-subtle rounded-circle flex-center me-3" style="width:24px; height:24px"><span class="text-warning-dark" data-feather="mail" style="width:16px; height:16px"></span></div>
<p class="fw-bold mb-0">Email</p>
<p class="fw-bold mb-0">{{ _("Email") }}</p>
</div>
</td>
<td class="py-2 d-none d-sm-block pe-sm-2">:</td>
<td class="py-2"><a class="ps-6 ps-sm-0 fw-semibold mb-0 text-body" href="mailto:jacksonpol@email.com">jacksonpol@email.com</a></td>
<td class="py-2"><a class="ps-6 ps-sm-0 fw-semibold mb-0 text-body" href="mailto:{{ opportunity.customer.email}}">{{ opportunity.customer.email}}</a></td>
</tr>
</table>
</div>
@ -253,24 +243,24 @@
<td class="py-2">
<div class="d-inline-flex align-items-center">
<div class="d-flex bg-success-subtle rounded-circle flex-center me-3" style="width:24px; height:24px"><span class="text-success-dark" data-feather="users" style="width:16px; height:16px"></span></div>
<p class="fw-bold mb-0">Contact Name</p>
<p class="fw-bold mb-0">{{ _("Contact Name")}}</p>
</div>
</td>
<td class="py-2 d-none d-sm-block pe-sm-2">:</td>
<td class="py-2">
<div class="ps-6 ps-sm-0 fw-semibold mb-0 pb-3 pb-sm-0">Jackson Pollock</div>
<div class="ps-6 ps-sm-0 fw-semibold mb-0 pb-3 pb-sm-0">{{ opportunity.customer.get_full_name}}</div>
</td>
</tr>
<tr>
<td class="py-2">
<div class="d-flex align-items-center">
<div class="d-flex bg-info-subtle rounded-circle flex-center me-3" style="width:24px; height:24px"><span class="text-info-dark" data-feather="edit" style="width:16px; height:16px"></span></div>
<p class="fw-bold mb-0">Modified By</p>
<p class="fw-bold mb-0">{{ _("Staff") }}</p>
</div>
</td>
<td class="py-2 d-none d-sm-block pe-sm-2">:</td>
<td class="py-2">
<div class="ps-6 ps-sm-0 fw-semibold mb-0">Ansolo Lazinatov</div>
<div class="ps-6 ps-sm-0 fw-semibold mb-0">{{ opportunity.staff.get_local_name}}</div>
</td>
</tr>
</table>
@ -286,24 +276,24 @@
<td class="py-2">
<div class="d-inline-flex align-items-center">
<div class="d-flex bg-info-subtle rounded-circle flex-center me-3" style="width:24px; height:24px"><span class="text-info-dark" data-feather="clock" style="width:16px; height:16px"></span></div>
<p class="fw-bold mb-0">Create Date</p>
<p class="fw-bold mb-0">{{ _("Create Date")}}</p>
</div>
</td>
<td class="py-2 d-none d-sm-block pe-sm-2">:</td>
<td class="py-2">
<div class="ps-6 ps-sm-0 fw-semibold mb-0 pb-3 pb-sm-0">Nov 30, 2022</div>
<div class="ps-6 ps-sm-0 fw-semibold mb-0 pb-3 pb-sm-0">{{ opportunity.created|date}}</div>
</td>
</tr>
<tr>
<td class="py-2">
<div class="d-flex align-items-center">
<div class="d-flex bg-warning-subtle rounded-circle flex-center me-3" style="width:24px; height:24px"><span class="text-warning-dark" data-feather="clock" style="width:16px; height:16px"></span></div>
<p class="fw-bold mb-0">Closing Date</p>
<p class="fw-bold mb-0">{{ _("Closing Date")}}</p>
</div>
</td>
<td class="py-2 d-none d-sm-block pe-sm-2">:</td>
<td class="py-2">
<div class="ps-6 ps-sm-0 fw-semibold mb-0">Dec 15, 2022</div>
<div class="ps-6 ps-sm-0 fw-semibold mb-0">{{ opportunity.closing_date|date}}</div>
</td>
</tr>
</table>
@ -1424,17 +1414,4 @@
</div>
</div>
</div>
</div>
<h1>{{ opportunity.deal_name }}</h1>
<p>Customer: {{ opportunity.customer.get_full_name }}</p>
<p>Car: {{ opportunity.car }}</p>
<p>Deal Value: {{ opportunity.deal_value }}</p>
<p>Deal Status: {{ opportunity.get_deal_status_display }}</p>
<p>Priority: {{ opportunity.get_priority_display }}</p>
<p>Source: {{ opportunity.get_source_display }}</p>
<p>Created By: {{ opportunity.created_by.name }}</p>
<p>Created At: {{ opportunity.created_at }}</p>
<p>Updated At: {{ opportunity.updated_at }}</p>
<a href="{% url 'update_opportunity' opportunity.pk %}">Edit</a>
</div>
{% endblock %}

View File

@ -0,0 +1,82 @@
{% extends "base.html" %} <!-- Assuming you have a base template -->
{% load i18n %} <!-- Load the internationalization template tags -->
{% block content %}
<div class="row g-3">
<div class="col-sm-6 col-md-8">
<h2>{% if form.instance.pk %}{{ _("Edit Opportunity") }}{% else %}{{ _("Add New Opportunity") }}{% endif %}</h2>
</div>
<div class="col-sm-6 col-md-8">
<form class="row g-3" method="post" class="form" novalidate>
{% csrf_token %}
<!-- Customer -->
<div class="col-sm-6 col-md-4">
<div class="form-floating">
<select class="form-control" id="{{ form.customer.id_for_label }}" name="{{ form.customer.name }}">
{% for value, label in form.customer.field.choices %}
<option value="{{ value }}" {% if form.customer.value == value %}selected{% endif %}>{{ label }}</option>
{% endfor %}
</select>
<label for="{{ form.customer.id_for_label }}">{{ _("Customer") }}</label>
</div>
{{ form.customer.errors }}
</div>
<!-- Car -->
<div class="col-sm-6 col-md-4">
<div class="form-floating">
<select class="form-control" id="{{ form.car.id_for_label }}" name="{{ form.car.name }}">
{% for value, label in form.car.field.choices %}
<option value="{{ value }}" {% if form.car.value == value %}selected{% endif %}>{{ label }}</option>
{% endfor %}
</select>
<label for="{{ form.car.id_for_label }}">{{ _("Car") }}</label>
</div>
{{ form.car.errors }}
</div>
<!-- Stage -->
<div class="col-sm-6 col-md-4">
<div class="form-floating">
<select class="form-control" id="{{ form.stage.id_for_label }}" name="{{ form.stage.name }}">
{% for value, label in form.stage.field.choices %}
<option value="{{ value }}" {% if form.stage.value == value %}selected{% endif %}>{{ label }}</option>
{% endfor %}
</select>
<label for="{{ form.stage.id_for_label }}">{{ _("Stage") }}</label>
</div>
{{ form.stage.errors }}
</div>
<!-- Probability -->
<div class="col-sm-6 col-md-4">
<div class="form-floating">
<input type="number" class="form-control" id="{{ form.probability.id_for_label }}" name="{{ form.probability.name }}" value="{{ form.probability.value|default:'' }}" placeholder="{{ _('Enter probability') }}">
<label for="{{ form.probability.id_for_label }}">{{ _("Probability") }}</label>
</div>
{{ form.probability.errors }}
</div>
<!-- Staff -->
<div class="col-sm-6 col-md-4">
<div class="form-floating">
<input type="date" class="form-control" id="{{ form.closing_date.id_for_label }}" name="{{ form.closing_date.name }}" value="{{ form.closing_date.value|date:'Y-m-d' }}">
<label for="{{ form.closing_date.id_for_label }}">{{ _("Closing Date")}}</label>
{{ form.closing_date.errors }}
</div>
{{ form.closing_date.errors }}
</div>
<!-- Buttons -->
<div class="row mt-4">
<div class="col-sm-12">
<button type="submit" class="btn btn-primary">{{ _("Save") }}</button>
<a href="{% url 'opportunity_list' %}" class="btn btn-secondary">{{ _("Cancel") }}</a>
</div>
</div>
</form>
</div>
</div>
{% endblock %}

View File

@ -2,30 +2,26 @@
{% load i18n static %}
{% block content %}
<div class="container-fluid">
<div class="content">
<div>
<div class="px-4 px-lg-6">
<h2 class="mb-5">{{ _("Opportunities") }}</h2>
<div class="d-xl-flex justify-content-between">
<div class="mb-3">
<button class="btn btn-primary me-4" type="button" data-bs-toggle="modal" data-bs-target="#addDealModal" aria-haspopup="true" aria-expanded="false" data-bs-reference="parent"><span class="fas fa-plus me-2"></span>{{ _("Add Opportunity") }}</button>
<a class="btn btn-primary me-4" href="{% url 'opportunity_create' %}"><span class="fas fa-plus me-2"></span>{{ _("Add Opportunity") }}</a>
</div>
</div>
</div>
<div class="px-4 px-lg-6 scrollbar">
<div class="deals">
{% for opportunity in opportunities %}
<div class="deals-col col-sm-6 me-4">
<div class="deals-col col-sm-6 me-4 mt-4">
<div class="d-flex align-items-center justify-content-between position-sticky top-0 z-1 bg-body">
<div>
<h5 class="mb-2"></h5>
<p class="fs-9 text-body-tertiary mb-1">{{ _("Revenue") }}:</p>
<h4 class="mb-3">{{ opportunity.car.finances.total }}</h4>
<h5 class="mb-2 ms-4">{{ opportunity.car.id_car_make.get_local_name }} - {{ opportunity.car.id_car_model.get_local_name }} - {{ opportunity.car.year }}</h5>
</div>
<div class="d-flex gap-3">
<button class="btn p-0" type="button" data-bs-toggle="modal" data-bs-target="#addDealModal" aria-haspopup="true" aria-expanded="false" data-bs-reference="parent"><span class="fa-solid fa-plus"></span></button>
<button class="btn p-0" type="button" data-bs-toggle="dropdown" data-boundary="window" aria-haspopup="true" aria-expanded="false" data-bs-reference="parent"><span class="fas fa-ellipsis-h fs-10"></span></button>
<ul class="dropdown-menu dropdown-menu-end">
<li><a class="dropdown-item" href="{% url 'update_opportunity' pk=opportunity.pk %}">{{ _("Edit") }}</a></li>
@ -33,18 +29,31 @@
</ul>
</div>
</div>
<div class="scrollbar deals-items-container">
<div class=" deals-items-row">
<div class="w-100 min-vh-50" data-sortable="data-sortable">
<div>
<div class="card mb-3">
<div class="card-body"><a class="dropdown-indicator-icon position-absolute text-body-tertiary" href="#collapseWidthDeals-1" role="button" data-bs-toggle="collapse" aria-expanded="false" aria-controls="collapseWidthDeals-1"><span class="fa-solid fa-angle-down"></span></a>
<div class="card-body">
<a class="dropdown-indicator-icon position-absolute text-body-tertiary text-end"
href="#collapseWidthDeals-1"
role="button"
data-bs-toggle="collapse"
aria-expanded="false"
aria-controls="collapseWidthDeals-1">
<span class="fa-solid fa-angle-down text-end"></span>
</a>
<div class="d-flex align-items-center justify-content-between mb-3">
<div class="d-flex"><span class="me-2" data-feather="clock" style="stroke-width:2;"></span>
<p class="mb-0 fs-9 fw-semibold text-body-tertiary date">{{ opportunity.created_at|date }}<span class="text-body-quaternary"> . {{ opportunity.created_at|time }}</span></p>
<div class="d-flex gap-3">
</div>
<div class="d-flex">
<span class="me-2" data-feather="clock" style="stroke-width:2;"></span>
<p class="mb-0 fs-9 fw-semibold text-body-tertiary date">{{ opportunity.created|date }}<span class="text-body-quaternary"> . {{ opportunity.created|time}}</span></p>
</div>
</div>
<div class="deals-items-head d-flex align-items-center mb-2"><a class="text-primary fw-bold line-clamp-1 me-3 mb-0 fs-9" href="{% url 'opportunity_detail' opportunity.pk %}">{{ opportunity.deal_name }}</a>
<p class="deals-category fs-10 mb-0 mt-1 d-none"><span class="me-1 text-body-quaternary" data-feather="grid" style="stroke-width:2; height: 12px; width: 12px"></span>{{ opportunity.get_source_display }}</p>
<div class="deals-items-head d-flex align-items-center mb-2">
<a class="text-primary fw-bold line-clamp-1 me-3 mb-0 fs-9" href="{% url 'opportunity_detail' opportunity.pk %}">{{ _("View") }}</a>
<p class="fs-10 mb-0 mt-1 d-none"><span class="me-1 text-body-quaternary" data-feather="grid" style="stroke-width:2; height: 12px; width: 12px"></span>{{ opportunity.get_stage_display }}</p>
<p class="ms-auto fs-9 text-body-emphasis fw-semibold mb-0 deals-revenue">{{ opportunity.car.finances.total }}</p>
</div>
<div class="deals-company-agent d-flex flex-between-center">
@ -52,76 +61,69 @@
<p class="text-body-secondary fw-bold fs-10 mb-0">{{ opportunity.customer.get_full_name }}</p>
</div>
<div class="d-flex align-items-center"><span class="uil uil-headphones me-2"></span>
<p class="text-body-secondary fw-bold fs-10 mb-0">{{ opportunity.created_by.name }}</p>
<p class="text-body-secondary fw-bold fs-10 mb-0">{{ opportunity.staff.name }}</p>
</div>
</div>
<div class="collapse" id="collapseWidthDeals-1">
<div class="d-flex gap-2 mb-5"><span class="badge badge-phoenix badge-phoenix-info">{{ opportunity.get_deal_status_display }}</span><span class="badge badge-phoenix badge-phoenix-danger">{{ opportunity.get_priority_display }}</span></div>
<div class="d-flex gap-2 mb-5"><span class="badge badge-phoenix fs-10 badge-phoenix-info">{{ opportunity.get_stage_display }}</span><span class="badge badge-phoenix fs-10 badge-phoenix-danger">{{ opportunity.get_status_display }}</span></div>
<table class="mb-4 w-100 table-stats table-stats">
<tr>
<th></th>
<th></th>
<th>{{ _("Details") }}</th>
<th>:</th>
<th></th>
</tr>
<tr>
<td class="">
<td class="py-1">
<div class="d-flex align-items-center"><span class="me-2 text-body-tertiary" data-feather="dollar-sign"></span>
<p class="fw-semibold fs-9 mb-0 text-body-tertiary">{{ _("Expected Revenue")}}</p>
</div>
</td>
<td class="d-none d-sm-block pe-sm-2">:</td>
<td class="">
<td class="py-1">
<p class="ps-6 ps-sm-0 fw-semibold fs-9 mb-0 mb-0 pb-3 pb-sm-0 text-body-emphasis">{{ opportunity.car.finances.total }}</p>
</td>
</tr>
<tr>
<td class="">
<td class="py-1">
<div class="d-flex align-items-center"><span class="me-2 text-body-tertiary" data-feather="user" style="width:16px; height:16px"></span>
<p class="fw-semibold fs-9 mb-0 text-body-tertiary">{{ _("Name") }}</p>
<p class="fw-semibold fs-9 mb-0 text-body-tertiary">{{ _("Contact") }}</p>
</div>
</td>
<td class=" d-none d-sm-block pe-sm-2">:</td>
<td class="">
<p class="fw-semibold fs-9 mb-0 mb-0 pb-3 pb-sm-0 text-body-emphasis d-flex align-items-center gap-2">{{ opportunity.customer.first_name }}<a href="#!"> <span class="fa-solid fa-square-phone text-body-tertiary"></span></a><a href="#!"> <span class="fa-solid fa-square-envelope text-body-tertiary"></span></a><a href="#!"> <span class="fab fa-whatsapp-square text-body-tertiary"></span></a></p>
<td class="py-1">
<p class="fw-semibold fs-9 mb-0 mb-0 pb-3 pb-sm-0 text-body-emphasis d-flex align-items-center gap-2"><a href=""> <span class="fa-solid fa-square-phone text-body-tertiary"></span></a><a href=""> <span class="fa-solid fa-square-envelope text-body-tertiary"></span></a><a href=""> <span class="fab fa-whatsapp-square text-body-tertiary"></span></a></p>
</td>
</tr>
<tr>
<td class="">
<td class="py-1">
<div class="d-flex align-items-center"><span class="me-2 text-body-tertiary" data-feather="calendar" style="width:16px; height:16px"></span>
<p class="fw-semibold fs-9 mb-0 text-body-tertiary">{{ _("Closing Date and Time")}}</p>
<p class="fw-semibold fs-9 mb-0 text-body-tertiary">{{ _("Closing Date")}}</p>
</div>
</td>
<td class=" d-none d-sm-block pe-sm-2">:</td>
<td class="">
<p class="fw-semibold fs-9 mb-0 mb-0 pb-3 pb-sm-0 text-body-emphasis">{{ opportunity.created_at }}</p>
</td>
</tr>
<tr>
<td class="">
<div class="d-flex align-items-center"><span class="me-2 text-body-tertiary" data-feather="headphones" style="width:16px; height:16px"></span>
<p class="fw-semibold fs-9 mb-0 text-body-tertiary">Assigned Agent </p>
</div>
</td>
<td class="d-none d-sm-block pe-sm-2">:</td>
<td class="">
<select class="form-select form-select-sm ms-n3 border-0 shadow-none">
<option selected="selected">Ally Aagaard</option>
<option>Lonnie Kub</option>
<option>Aida Moen</option>
<option>Niko Koss</option>
<option>Alec Haag</option>
<option>Ola Smith</option>
<option>Leif Walsh</option>
<option>Brain Cole</option>
<option>Reese Mann</option>
</select>
<td class="py-1">
<p class="fw-semibold fs-9 mb-0 mb-0 pb-3 pb-sm-0 text-body-emphasis">{{ opportunity.closing_date }}</p>
</td>
</tr>
</table>
<p class="fs-9 mb-1"> {{ _("Probability") }}:</p>
<div class="progress" style="height:8px">
<div class="progress-bar rounded-pill bg-info" role="progressbar" style="width: 25%" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div>
<p class="fs-9 mb-1 fw-bold"> {{ _("Probability") }}: %</p>
<div class="progress" style="height:16px">
{% if opportunity.probability >= 25 and opportunity.probability < 49 %}
<div class="progress-bar rounded-pill bg-danger" role="progressbar" style="width: {{ opportunity.probability }}%" aria-valuenow="{{ opportunity.probability }}" aria-valuemin="0" aria-valuemax="100">
<span class="fw-bold fs-10 text-sm-end text-secondary me-1">{{ opportunity.probability }}</span>
</div>
{% elif opportunity.probability >= 50 and opportunity.probability <= 74 %}
<div class="progress-bar rounded-pill bg-warning" role="progressbar" style="width: {{ opportunity.probability }}%" aria-valuenow="{{ opportunity.probability }}" aria-valuemin="0" aria-valuemax="100">
<span class="fw-bold fs-10 text-sm-end text-secondary me-1">{{ opportunity.probability }}</span>
</div>
{% elif opportunity.probability >= 75 and opportunity.probability <= 100 %}
<div class="progress-bar rounded-pill bg-success" role="progressbar" style="width: {{ opportunity.probability }}%" aria-valuenow="{{ opportunity.probability }}" aria-valuemin="0" aria-valuemax="100">
<span class="fw-bold fs-10 text-sm-end text-secondary me-1">{{ opportunity.probability }}</span>
</div>
{% endif %}
</div>
</div>
</div>
</div>
@ -135,13 +137,13 @@
tabindex="-1"
aria-labelledby="deleteModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-sm">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="deleteModalLabel">
{% trans "Delete Opportunity" %}
<span data-feather="alert-circle"></span>
</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
@ -160,11 +162,11 @@
</div>
</div>
</div>
<div class="modal fade" id="addDealModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="addDealModal" aria-hidden="true">
<div class="modal fade" id="addOpportunityModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="addOpportunityModalLabel" aria-hidden="true">
<div class="modal-dialog modal-xl modal-dialog-centered">
<div class="modal-content bg-body-highlight p-6">
<div class="modal-header justify-content-between border-0 p-0 mb-2">
<h3 class="mb-0">Deal Informations</h3>
<h3 class="mb-0">Opportunity Information</h3>
<button class="btn btn-sm btn-phoenix-secondary" data-bs-dismiss="modal" aria-label="Close"><span class="fas fa-times text-danger"></span></button>
</div>
<div class="modal-body px-0">
@ -172,7 +174,7 @@
<div class="row g-4">
<div class="col-lg-6">
<div class="mb-4">
<label class="text-body-highlight fw-bold mb-2">Deal Owner</label>
<label class="text-body-highlight fw-bold mb-2">Owner</label>
<select class="form-select">
<option>Select</option>
<option>Ally Aagaard</option>
@ -184,13 +186,13 @@
</select>
</div>
<div class="mb-4">
<label class="text-body-highlight fw-bold mb-2">Deal Name</label>
<label class="text-body-highlight fw-bold mb-2">Opportunity Name</label>
<input class="form-control" type="text" placeholder="Enter deal name" />
</div>
<div class="mb-4">
<div class="row g-3">
<div class="col-sm-6 col-lg-12 col-xl-6">
<label class="text-body-highlight fw-bold mb-2">Deal Amount</label>
<label class="text-body-highlight fw-bold mb-2">Opportunity Amount</label>
<div class="row g-2">
<div class="col">
<input class="form-control" type="number" placeholder="$ Enter amount" />
@ -224,11 +226,11 @@
</div>
</div>
<div class="mb-4">
<label class="text-body-highlight fw-bold mb-2">Deal Code</label>
<label class="text-body-highlight fw-bold mb-2">Opportunity Code</label>
<input class="form-control" type="text" placeholder="Enter deals code" />
</div>
<div class="mb-4">
<label class="text-body-highlight fw-bold mb-2">Deal Type
<label class="text-body-highlight fw-bold mb-2">Opportunity Type
<button class="btn btn-link p-0 ms-3"><span class="fa-solid fa-plus me-1"></span><span>Add new</span></button>
</label>
<select class="form-select">
@ -495,9 +497,7 @@
{% endfor %}
</div>
</div>
</div>
</div>
</div>
{% endblock %}

View File

@ -1,6 +0,0 @@
<h1>{% if form.instance.pk %}Edit{% else %}Create{% endif %} Opportunity</h1>
<form method="post">
{% csrf_token %}
{{ form.as_p }}
<button type="submit">Save</button>
</form>

View File

@ -6,7 +6,7 @@
{% block content %}
<link rel="stylesheet" href="{% static 'flags/sprite.css' %}">
<div class="container">
<div class="row">
<div class="row mb-3">
<div class="col-sm-6 col-md-8">
<div class="d-sm-flex justify-content-between">
@ -90,12 +90,8 @@
</div>
<div class="col-sm-6 col-md-4">
<div class="form-floating">
<select class="form-control" id="{{ form.country.id_for_label }}" name="{{ form.country.name }}">
{% for value, label in form.country.field.choices %}
<option value="{{ value }}" {% if form.country.value == value %}selected{% endif %}>{{ label }}</option>
{% endfor %}
</select>
<label for="{{ form.country.id_for_label }}">{{ _("Country") }}</label>
<input type="text" class="form-control" id="{{ form.city.id_for_label }}" name="{{ form.city.name }}" value="{{ form.city.value|default:'' }}" placeholder="{{ _("City")}}">
<label for="{{ form.city.id_for_label }}">{{ _("City") }}</label>
{{ form.country.errors }}
</div>
</div>

View File

@ -5,7 +5,7 @@
{% block vendors %}<a class="nav-link active">{{ _("Customers")|capfirst }}</a>{% endblock %}
{% block content %}
<div class="container">
<div class="row">
<h2 class="mb-4">{{ _("Customers")|capfirst }}</h2>
<div class="row g-3 justify-content-between mb-4">
<div class="col-auto">
@ -123,7 +123,6 @@
<button class="btn btn-sm dropdown-toggle dropdown-caret-none transition-none btn-reveal fs-10" type="button" data-bs-toggle="dropdown" data-boundary="window" aria-haspopup="true" aria-expanded="false" data-bs-reference="parent"><span class="fas fa-ellipsis-h fs-10"></span></button>
<div class="dropdown-menu dropdown-menu-end py-2">
<a href="{% url 'customer_update' customer.id %}" class="dropdown-item text-success-dark">{% trans "Edit" %}</a>
<a href="{% url 'create_lead' customer.pk %}" class="dropdown-item text-success-dark">{{ _("Mark as Lead")}}</a>
<div class="dropdown-divider"></div><button class="dropdown-item text-danger" data-bs-toggle="modal" data-bs-target="#deleteModal">{% trans "Delete" %}</button>
</div>
</div>

View File

@ -1,5 +1,5 @@
{% extends "base.html" %}
{% load i18n static %}
{% load i18n static crispy_forms_filters%}
{% block title %}{{ _("View Customer") }}{% endblock title %}
@ -36,7 +36,7 @@
</div>
<!-- Delete Modal -->
<div class="container">
<div class="row">
<div class="mb-9">
<div class="row align-items-center justify-content-between g-3 mb-4">
@ -109,9 +109,24 @@
<div class="col-12">
<div class="card">
<div class="card-body">
<label for="notes">{{_("Notes on Customer")}}</label>
<textarea id="notes" class="form-control mb-3" rows="2"></textarea>
<button class="btn btn-phoenix-primary w-100 mb-4">{{_("Add Note")}}</button>
<div class="d-flex align-items-center justify-content-end">
<a class="fw-bold fs-9 mb-0 text-end" href="{% url 'add_note_to_customer' customer.pk %}"><span class="fas fa-plus me-1"></span>{{ _("Add Note")}}</a>
</div>
<table class="table fs-9 mb-0 table-responsive">
<thead>
<tr>
<th class="align-middle pe-6 text-start" scope="col">
{{ _("Notes")|upper }}</th>
</tr>
</thead>
<tbody class="list">
{% for note in notes %}
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
<td class="align-middle text-start fw-bold text-body-tertiary ps-1">{{note.note}}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>

View File

@ -121,7 +121,7 @@
</div>
</div>
<div class="col-sm-5 col-md-4 col-xxl-4 my-3 my-sm-0">
<div class="position-relative d-flex flex-center mb-sm-4 mb-xl-0 echart-contact-by-source-container mt-sm-7 mt-lg-4 mt-xl-0">
<div class="position-relative d-flex flex-center mb-sm-4 mb-xl-0 echart-contact-by-source-row mt-sm-7 mt-lg-4 mt-xl-0">
<div class="echart-contact-by-source" style="min-height:245px;width:100%"></div>
<div class="position-absolute rounded-circle bg-primary-subtle top-50 start-50 translate-middle d-flex flex-center" style="height:100px; width:100px;">
<h3 class="mb-0 text-primary-dark fw-bolder" data-label="data-label"></h3>

View File

@ -1,9 +1,9 @@
{% extends 'base.html' %}
{% load i18n static %}
{% block content %}
<div class="container">
<div class="row">
<div class="ol-auto pt-5 pb-9">
<div class="container-sm">
<div class="row-sm">
<div class="row d-flex-center">
<div class="col-8">
<div class="tab-content" id="myTabContent">

View File

@ -3,12 +3,12 @@
{% block content %}
<div class="container">
<div class="row">
<section class="pt-5 pb-9">
<div class="container-small">
<div class="row-small">
<div class="row align-items-center justify-content-between g-3 mb-4">
<div class="col-auto">
@ -150,7 +150,7 @@
</div>
</div>
<!-- end of .container-->
<!-- end of .row-->
</section>

View File

@ -5,7 +5,7 @@
{% block title %}{{ _("Update Dealer Information") }}{% endblock title %}
{% block content %}
<div class="container my-5">
<div class="row my-5">
<div class="row justify-content-center">
<div class="col-md-8">
<!-- Form Header -->

View File

@ -89,8 +89,8 @@
navbarVertical.setAttribute('data-navbar-appearance', 'darker');
}
</script>
<div class="support-chat-container">
<div class="container-fluid support-chat">
<div class="support-chat-row">
<div class="row-fluid support-chat">
<div class="card bg-body-emphasis">
<div class="card-header d-flex flex-between-center px-4 py-3 border-bottom border-translucent">
<h5 class="mb-0 d-flex align-items-center gap-2">Demo widget<span class="fa-solid fa-circle text-success fs-11"></span></h5>

View File

@ -89,8 +89,8 @@
navbarVertical.setAttribute('data-navbar-appearance', 'darker');
}
</script>
<div class="support-chat-container">
<div class="container-fluid support-chat">
<div class="support-chat-row">
<div class="row-fluid support-chat">
<div class="card bg-body-emphasis">
<div class="card-header d-flex flex-between-center px-4 py-3 border-bottom border-translucent">
<h5 class="mb-0 d-flex align-items-center gap-2">Demo widget<span class="fa-solid fa-circle text-success fs-11"></span></h5>

View File

@ -89,8 +89,8 @@
navbarVertical.setAttribute('data-navbar-appearance', 'darker');
}
</script>
<div class="support-chat-container">
<div class="container-fluid support-chat">
<div class="support-chat-row">
<div class="row-fluid support-chat">
<div class="card bg-body-emphasis">
<div class="card-header d-flex flex-between-center px-4 py-3 border-bottom border-translucent">
<h5 class="mb-0 d-flex align-items-center gap-2">Demo widget<span class="fa-solid fa-circle text-success fs-11"></span></h5>

View File

@ -1,5 +1,4 @@
{% load i18n %}
<footer class="footer position-absolute">
<div class="row g-0 justify-content-between align-items-center h-100">
<div class="col-12 col-sm-auto text-center">
@ -9,4 +8,4 @@
<p class="mb-0 text-body-tertiary text-opacity-85">v1.1.9</p>
</div>
</div>
</footer>
</footer>

View File

@ -16,7 +16,7 @@
</style>
<div class="container p-2">
<div class="row p-2">
<div class="card shadow-sm rounded shadow">
<div class="card-header bg-primary text-white">
<h4 class="mb-0">{% trans 'HaikalBot' %}</h4>

View File

@ -1,5 +1,4 @@
{% load i18n static %}
<nav class="navbar navbar-vertical navbar-expand-lg">
<div class="collapse navbar-collapse" id="navbarVerticalCollapse">
<!-- scrollbar removed-->
@ -35,7 +34,7 @@
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<div class="d-flex align-items-center"><span class="nav-link-text">Leads</span></div>
<div class="d-flex align-items-center"><span class="nav-link-text">CRM</span></div>
</a>
</li>
</ul>
@ -95,29 +94,7 @@
</div>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{% url 'customer_list' %}">
<div class="d-flex align-items-center">
<span class="nav-link-icon"><span data-feather="users"></span></span><span class="nav-link-text">{% trans 'customers'|capfirst %}</span>
</div>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{% url 'organization_list' %}">
<div class="d-flex align-items-center">
<span class="nav-link-icon"><span data-feather="activity"></span></span><span class="nav-link-text">{% trans "Organizations"|capfirst %}</span>
</div>
</a>
<!-- more inner pages-->
</li>
<li class="nav-item">
<a class="nav-link" href="{% url 'representative_list' %}">
<div class="d-flex align-items-center">
<span class="nav-link-icon"><span class="fas fa-users-cog"></span></span><span class="nav-link-text">{% trans "Representatives"|capfirst %}</span>
</div>
</a>
<!-- more inner pages-->
</li>
<li class="nav-item">
<a class="nav-link" href="{% url 'estimate_create' %}">
<div class="d-flex align-items-center">
@ -160,6 +137,57 @@
</li>
</ul>
</div>
</div>
<div class="nav-item-wrapper">
<a class="nav-link dropdown-indicator label-1" href="#nv-crm" role="button" data-bs-toggle="collapse" aria-expanded="false" aria-controls="nv-sales">
<div class="d-flex align-items-center">
<div class="dropdown-indicator-icon-wrapper"><span class="fas fa-caret-right dropdown-indicator-icon"></span></div>
<span class="nav-link-icon"><span data-feather="phone"></span></span><span class="nav-link-text">{% trans 'crm'|upper %}</span>
</div>
</a>
<div class="parent-wrapper label-1">
<ul class="nav collapse parent" data-bs-parent="#navbarVerticalCollapse" id="nv-crm">
<li class="collapsed-nav-item-title d-none">{% trans 'crm'|upper %}</li>
<li class="nav-item">
<a class="nav-link" href="{% url 'lead_list' %}">
<div class="d-flex align-items-center">
<span class="nav-link-icon"><span data-feather="users"></span></span><span class="nav-link-text">{% trans 'leads'|capfirst %}</span>
</div>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{% url 'customer_list' %}">
<div class="d-flex align-items-center">
<span class="nav-link-icon"><span data-feather="users"></span></span><span class="nav-link-text">{% trans 'customers'|capfirst %}</span>
</div>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{% url 'organization_list' %}">
<div class="d-flex align-items-center">
<span class="nav-link-icon"><span data-feather="activity"></span></span><span class="nav-link-text">{% trans "Organizations"|capfirst %}</span>
</div>
</a>
<!-- more inner pages-->
</li>
<li class="nav-item">
<a class="nav-link" href="{% url 'representative_list' %}">
<div class="d-flex align-items-center">
<span class="nav-link-icon"><span class="fas fa-users-cog"></span></span><span class="nav-link-text">{% trans "Representatives"|capfirst %}</span>
</div>
</a>
<!-- more inner pages-->
</li>
<li class="nav-item">
<a class="nav-link" href="{% url 'opportunity_list' %}">
<div class="d-flex align-items-center">
<span class="nav-link-icon"><span class="fas fa-money-check"></span></span><span class="nav-link-text">{% trans "Opportunities"|capfirst %}</span>
</div>
</a>
<!-- more inner pages-->
</li>
</ul>
</div>
</div>
<!--Add Above -->
</li>

View File

@ -3,7 +3,7 @@
{% block content %}
<div class="container">
<div class="row">
</div>

View File

@ -1,7 +1,7 @@
{% extends "base.html" %}
{% load i18n %}
{% block content %}
<div class="container mt-4">
<div class="row mt-4">
<h5 class="text-center">{% trans "Add Colors" %}</h5>
<p class="text-center">{% trans "Select exterior and interior colors for" %} {{ car.id_car_make.get_local_name }} {{ car.id_car_model.get_local_name }}</p>

View File

@ -6,8 +6,8 @@
<!-- Main Container -->
<div class="container-fluid">
<!-- Main row -->
<div class="row-fluid">
<div class="row g-3 justify-content-between">
<div class="col-lg-12 col-xl-6">
<div class="card rounded shadow d-flex align-content-center">

View File

@ -1,5 +1,5 @@
{% extends 'base.html' %} {% load crispy_forms_filters %} {% load i18n %} {% load custom_filters %} {% block title %} {% trans 'Edit Car' %} {% endblock %} {% block content %}
<div class="container">
<div class="row">
<div class="card rounded shadow mt-3">
<p class="card-header bg-primary text-white rounded-top fw-bold">{% trans 'Edit Car' %}</p>
<div class="card-body">

View File

@ -6,7 +6,7 @@
{% block title %}{% trans "Car Finance Details" %}{% endblock %}
{% block content %}
<div class="container p-4">
<div class="row p-4">
<p class="mb-4">{% trans "Finance Details for" %}
{{ car.id_car_make.get_local_name }} - {{ car.id_car_model.get_local_name }}
</p>

View File

@ -16,7 +16,7 @@
<script src="https://unpkg.com/@zxing/library@latest"></script>
<script src="https://cdn.jsdelivr.net/npm/tesseract.js@5/dist/tesseract.min.js"></script>
<div class="container-lg">
<div class="row-lg">
<form method="post" id="carForm" class="form needs-validation" novalidate>
{% csrf_token %}
<div class="d-flex flex-column min-vh-100">
@ -56,7 +56,7 @@
<!-- Year Card -->
<div class="col-lg-4 col-xl-3">
<div class="card h-100">
<div class="card-body" id="year-container">
<div class="card-body" id="year-row">
<label class="form-label" for="{{ form.year.id_for_label }}">
{% trans 'Year' %}:
</label>
@ -76,7 +76,7 @@
<!-- Makes Card -->
<div class="col-lg-4 col-xl-3">
<div class="card h-100">
<div id="make-container" class="card-body">
<div id="make-row" class="card-body">
<div class="status"></div>
<label class="form-label" for="{{ form.id_car_make.id_for_label }}">
{% trans 'make'|capfirst %}:
@ -94,7 +94,7 @@
<!-- Models Card -->
<div class="col-lg-4 col-xl-3">
<div class="card h-100">
<div id="model-container" class="card-body">
<div id="model-row" class="card-body">
<label class="form-label" for="{{ form.id_car_model.id_for_label }}">
{% trans 'model'|capfirst %}:
</label>
@ -116,7 +116,7 @@
<!-- Series Card -->
<div class="col-lg-4 col-xl-3">
<div class="card h-100">
<div class="card-body" id="serie-container">
<div class="card-body" id="serie-row">
<label class="form-label" for="{{ form.id_car_serie.id_for_label }}">
{% trans 'Series' %}:
</label>
@ -137,7 +137,7 @@
<!-- Trims Card -->
<div class="col-lg-4 col-xl-3">
<div class="card h-100">
<div class="card-body" id="trim-container">
<div class="card-body" id="trim-row">
<label class="form-label" for="{{ form.id_car_trim.id_for_label }}">
{% trans 'trim'|capfirst %}:
</label>

View File

@ -5,12 +5,9 @@
{% trans 'inventory'|capfirst %}
{% endblock %}
{% block inventory %}
<a class="nav-link active fw-bold">{% trans "inventory" %}<span class="visually-hidden">(current)</span></a>
{% endblock %}
{% block content %}
<div class="container">
<div class="row">
<div class="row g-3 justify-content-between">
<div class="col-sm-12">
<div class="card border h-100 w-100 overflow-hidden">

View File

@ -3,7 +3,7 @@
{% load custom_filters %}
{% block content %}
<div class="container-fluid p-2">
<div class="row-fluid p-2">
<!-- Display Validation Errors -->
{% if errors %}
<div class="alert alert-danger">
@ -75,7 +75,7 @@
<!-- Makes Card -->
<div class="col-lg-4 col-xl-3">
<div class="card h-100">
<div class="card-body bg-danger-subtle" id="make-container">
<div class="card-body bg-danger-subtle" id="make-row">
<label class="label" for="make">{% trans 'make'|capfirst %}:</label>
<select class="form-select form-select-sm" id="make" name="make">
<option value="">{% trans 'select'|capfirst %}</option>
@ -93,7 +93,7 @@
<!-- Models Card -->
<div class="col-lg-4 col-xl-3">
<div class="card h-100">
<div class="card-body bg-danger-subtle" id="model-container">
<div class="card-body bg-danger-subtle" id="model-row">
<label class="label" for="model">{% trans 'model'|capfirst %}:</label>
<select class="form-select form-select-sm" id="model" name="model">
<option value="">{% trans 'select'|capfirst %}</option>
@ -104,7 +104,7 @@
<!-- Generation Card -->
<div class="col-lg-4 col-xl-3">
<div class="card h-100">
<div class="card-body bg-danger-subtle" id="generation-container">
<div class="card-body bg-danger-subtle" id="generation-row">
<label class="label" for="generation">{% trans 'generation'|capfirst %}:</label>
<select class="form-select form-select-sm" id="generation" name="generation">
<option value="">{% trans 'select'|capfirst %}</option>
@ -115,7 +115,7 @@
<!-- Year Card -->
<div class="col-lg-4 col-xl-3">
<div class="card h-100">
<div class="card-body bg-danger-subtle" id="year-container">
<div class="card-body bg-danger-subtle" id="year-row">
<label class="label" for="year">{% trans 'year'|capfirst %}:</label>
<select class="form-select form-select-sm" id="year" name="year">
<option value="">{% trans 'select'|capfirst %}</option>
@ -126,7 +126,7 @@
<!-- Series Card -->
<div class="col-lg-4 col-xl-3">
<div class="card h-100">
<div class="card-body bg-danger-subtle" id="serie-container">
<div class="card-body bg-danger-subtle" id="serie-row">
<label class="label" for="serie">{% trans 'series'|capfirst %}:</label>
<select class="form-select form-select-sm" id="serie" name="serie">
<option value="">{% trans 'select'|capfirst %}</option>
@ -137,7 +137,7 @@
<!-- Trims Card -->
<div class="col-lg-4 col-xl-3">
<div class="card h-100">
<div class="card-body bg-danger-subtle" id="trim-container">
<div class="card-body bg-danger-subtle" id="trim-row">
<label class="label" for="trim">{% trans 'trim'|capfirst %}:</label>
<select class="form-select form-select-sm" id="trim" name="trim">
<option value="">{% trans 'select'|capfirst %}</option>
@ -148,7 +148,7 @@
<!-- Equipments Card -->
<div class="col-lg-4 col-xl-3">
<div class="card h-100">
<div class="card-body bg-danger-subtle" id="equipment-container">
<div class="card-body bg-danger-subtle" id="equipment-row">
<label class="label" for="equipment">{% trans 'equipment'|capfirst %}:</label>
<select class="form-select form-select-sm" id="equipment" name="equipment">
<option value="">{% trans 'select'|capfirst %}</option>
@ -205,7 +205,7 @@
<!-- Options and Specifications Buttons -->
<div class="col-lg-4 col-xl-3">
<div class="card h-100">
<div class="card-body" id="option-container">
<div class="card-body" id="option-row">
<button type="button"
class="btn btn-sm btn-danger mt-1"
id="option-btn"
@ -256,13 +256,13 @@ document.addEventListener("DOMContentLoaded", function() {
const optionsContent = document.getElementById('optionsContent');
const showSpecificationButton = document.getElementById('specification-btn');
const specificationsContent = document.getElementById('specificationsContent');
const makeBg = document.getElementById('make-container');
const modelBg = document.getElementById('model-container');
const generationBg = document.getElementById('generation-container');
const yearBg = document.getElementById('year-container');
const serieBg = document.getElementById('serie-container');
const trimBg = document.getElementById('trim-container');
const equipmentBg = document.getElementById('equipment-container');
const makeBg = document.getElementById('make-row');
const modelBg = document.getElementById('model-row');
const generationBg = document.getElementById('generation-row');
const yearBg = document.getElementById('year-row');
const serieBg = document.getElementById('serie-row');
const trimBg = document.getElementById('trim-row');
const equipmentBg = document.getElementById('equipment-row');
const saveCarBtn = document.getElementById('saveCarBtn');
function resetDropdown(dropdown, placeholder) {
@ -570,18 +570,18 @@ checkFormCompletion();
.then(data => {
if (data.length > 0) {
data.forEach(function(parent) {
const parentContainer = document.createElement('div');
parentContainer.classList.add('mb-3');
parentContainer.innerHTML = `<strong>${parent.parent_name}</strong>`;
const parentrow = document.createElement('div');
parentrow.classList.add('mb-3');
parentrow.innerHTML = `<strong>${parent.parent_name}</strong>`;
parent.options.forEach(function(option) {
const optionDiv = document.createElement('div');
optionDiv.classList.add('ms-3'); // Add margin for indentation
optionDiv.innerHTML = `&#10003; ${option.option_name}`;
parentContainer.appendChild(optionDiv);
parentrow.appendChild(optionDiv);
});
optionsContent.appendChild(parentContainer);
optionsContent.appendChild(parentrow);
});
} else {
optionsContent.innerHTML = '<p>{% trans "No options available." %}</p>';

View File

@ -3,7 +3,7 @@
{% load crispy_forms_filters %}
{% block title %}{% trans "Manage Car Location" %}{% endblock %}
{% block content %}
<div class="container mt-3">
<div class="row mt-3">
{% if carlocation.exists %}
<p class="fw-bold">{% trans 'Transfer' %}</p>
{% else %}

View File

@ -64,7 +64,7 @@
}
</style>
<div class="container mt-3">
<div class="row mt-3">
<form method="post">
{% csrf_token %}
<div class="d-flex flex-column min-vh-100">

View File

@ -1,6 +1,6 @@
<div class="content">
<div class="margin10 center" style="min-height:120px;">
<div data-aaad="true" data-aa-adunit="/22815767462/CLHX_728v_1" data-status="rendered" id="9868dff0-5025-4bf8-ba3a-df1a6220e51b" data-aa-device="[&quot;bigDesktop&quot;,&quot;desktop&quot;,&quot;smallDesktop&quot;,&quot;tablet&quot;]" data-aa-sizes="[[970,90],[728,90]]" data-aa-lazy-loaded="false" data-aa-refresh-viewable="30" data-google-query-id="CL7JkYCp64kDFZp1pAQdPh4w0w"><div id="google_ads_iframe_/22815767462,22668611618/CLHX_728v_1_0__container__" style="border: 0pt none;"><iframe id="google_ads_iframe_/22815767462,22668611618/CLHX_728v_1_0" name="google_ads_iframe_/22815767462,22668611618/CLHX_728v_1_0" title="3rd party ad content" width="1" height="1" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" aria-label="Advertisement" tabindex="0" allow="private-state-token-redemption;attribution-reporting" data-load-complete="true" style="border: 0px; vertical-align: bottom; width: 728px; height: 90px;" data-google-container-id="1"></iframe></div></div>
<div data-aaad="true" data-aa-adunit="/22815767462/CLHX_728v_1" data-status="rendered" id="9868dff0-5025-4bf8-ba3a-df1a6220e51b" data-aa-device="[&quot;bigDesktop&quot;,&quot;desktop&quot;,&quot;smallDesktop&quot;,&quot;tablet&quot;]" data-aa-sizes="[[970,90],[728,90]]" data-aa-lazy-loaded="false" data-aa-refresh-viewable="30" data-google-query-id="CL7JkYCp64kDFZp1pAQdPh4w0w"><div id="google_ads_iframe_/22815767462,22668611618/CLHX_728v_1_0__row__" style="border: 0pt none;"><iframe id="google_ads_iframe_/22815767462,22668611618/CLHX_728v_1_0" name="google_ads_iframe_/22815767462,22668611618/CLHX_728v_1_0" title="3rd party ad content" width="1" height="1" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" aria-label="Advertisement" tabindex="0" allow="private-state-token-redemption;attribution-reporting" data-load-complete="true" style="border: 0px; vertical-align: bottom; width: 728px; height: 90px;" data-google-row-id="1"></iframe></div></div>
<div data-aaad="true" data-aa-adunit="/22815767462/CLHX_Mob_300v_1" data-status="skipped" id="0b22b9ef-8269-48aa-8684-e1c990efc466" data-aa-device="[&quot;mobile&quot;]" data-aa-sizes="[[320,100],[320,50]]" data-aa-lazy-loaded="true" data-aa-refresh-viewable="30"></div>
</div>
<h1>Popular Colors</h1>

View File

@ -6,7 +6,7 @@
{% endblock %}
{% block content %}
<div class="container mt-4">
<div class="row mt-4">
<!-- Total Cars -->
<div class="alert alert-phoenix-primary">

View File

@ -5,7 +5,7 @@
{% block content %}
<div class="container-fluid p-2">
<div class="row-fluid p-2">
<form id="car-form">
<!-- Other form fields -->
<div>

View File

@ -4,7 +4,7 @@
{% load i18n %}
{% block title %}{{ _("Expenses") }}{% endblock title %}
{% block content %}
<div class="container">
<div class="row">
<div class="row justify-content-center">
<div class="col-md-8">
<div class="card">

View File

@ -4,7 +4,7 @@
{% load i18n %}
{% block title %}{{ _("Expenses") }}{% endblock title %}
{% block content %}
<div class="container">
<div class="row">
<div class="row justify-content-center">
<div class="col-md-8">
<div class="card">

View File

@ -4,7 +4,7 @@
{% block title %}{{ _("Expenses") }}{% endblock title %}
{% block content %}
<div class="container mt-4">
<div class="row mt-4">
<h3 class="text-center">{% trans "Expenses" %}</h3>
<div class="mx-n4 px-4 mx-lg-n6 px-lg-6 bg-body-emphasis pt-7 border-y">

View File

@ -4,7 +4,7 @@
{% load i18n %}
{% block title %}{{ _("Service") }}{% endblock title %}
{% block content %}
<div class="container">
<div class="row">
<div class="row justify-content-center">
<div class="col-md-8">
<div class="card">

View File

@ -11,7 +11,7 @@
<main class="d-grid gap-4 p-1">
<div class="row g-4">
<div class="col-lg-6 col-xl-12">
<div class="container-fluid p-2">
<div class="row-fluid p-2">
<form method="get">
<div class="input-group input-group-sm">
<button id="inputGroup-sizing-sm"

View File

@ -35,7 +35,7 @@
</div>
</div>
<div class="container my-5">
<div class="row my-5">
<div class="card rounded ">
<div class="card-header bg-primary text-white ">
<p class="mb-0">{{ _("Bank Account Details") }}</p>

View File

@ -4,7 +4,7 @@
{% block title %}{% trans "bank account" %}{% endblock title %}
{% block content %}
<div class="container my-5">
<div class="row my-5">
<!-- Display Form Errors -->
<div class="card shadow rounded">
<div class="card-header bg-primary text-white">

View File

@ -14,7 +14,7 @@
<!-- Search Bar -->
<div class="row g-4">
<div class="col-12">
<div class="container-fluid p-2">
<div class="row-fluid p-2">
<form method="get">
<div class="input-group input-group-sm">
<button class="btn btn-sm btn-secondary rounded-start" type="submit">

View File

@ -38,7 +38,7 @@
</div>
</div>
<div class="container my-5">
<div class="row my-5">
<div class="card rounded ">
<div class="card-header bg-primary text-white ">
<p class="mb-0">{{ _("Bank Account Details") }}</p>

View File

@ -4,7 +4,7 @@
{% block title %}{% trans "account" %}{% endblock title %}
{% block content %}
<div class="container my-5">
<div class="row my-5">
<!-- Display Form Errors -->
<div class="card shadow rounded">
<div class="card-header bg-primary text-white">

View File

@ -14,7 +14,7 @@
<!-- Search Bar -->
<div class="row g-4">
<div class="col-12">
<div class="container-fluid p-2">
<div class="row-fluid p-2">
<form method="get">
<div class="input-group input-group-sm">
<button class="btn btn-sm btn-secondary rounded-start" type="submit">

View File

@ -2,7 +2,7 @@
{% load i18n %}
{% block title %}{% trans "Organization Details" %}{% endblock title %}
{% block content %}
<div class="container my-4">
<div class="row my-4">
<h2>{{ organization.get_local_name }}</h2>
<ul class="list-group mb-4">
<li class="list-group-item"><strong>{% trans "CRN" %}:</strong> {{ organization.crn }}</li>

View File

@ -3,7 +3,7 @@
{% load crispy_forms_filters %}
{% block title %}{% trans "Add Organization" %}{% endblock title %}
{% block content %}
<div class="container my-4">
<div class="row my-4">
<h3>{% trans "Add Organization" %}</h3>
<form class="row g-3 mb-9" method="post" enctype="multipart/form-data">
{% csrf_token %}

View File

@ -7,7 +7,7 @@
{% block content %}
<section class="pt-5 pb-9">
<div class="container">
<div class="row">
<h2 class="mb-4">{% trans "Organizations" %}</h2>

View File

@ -2,7 +2,7 @@
{% load i18n %}
{% block title %}{% trans "Representative Details" %}{% endblock title %}
{% block content %}
<div class="container my-4">
<div class="row my-4">
<h2>{{ representative.get_local_name }}</h2>
<ul class="list-group mb-4">
<li class="list-group-item"><strong>{% trans "ID Number" %}:</strong> {{ representative.id_number }}</li>

View File

@ -3,7 +3,7 @@
{% load crispy_forms_filters %}
{% block title %}{% trans "Add Representative" %}{% endblock title %}
{% block content %}
<div class="container my-4">
<div class="row my-4">
<h2>{% trans "Add Representative" %}</h2>
<form method="post">
{% csrf_token %}

View File

@ -2,7 +2,7 @@
{% load i18n %}
{% block title %}{% trans "Representatives" %}{% endblock title %}
{% block content %}
<div class="container my-4">
<div class="row my-4">
<h2>{% trans "Representatives" %}</h2>
<div class="d-flex justify-content-between align-items-center mb-3">
<form method="get" class="d-flex">

View File

@ -35,7 +35,7 @@
<!-- ============================================-->
<!-- <section> begin ============================-->
<section class="pt-5 pb-9 bg-body-emphasis dark__bg-gray-1200 border-top">
<div class="container-small mt-3">
<div class="row-small mt-3">
<div class="d-flex justify-content-between align-items-end mb-4">
<h2 class="mb-0">{% trans 'Estimate' %}</h2>
<div class="d-flex align-items-center gap-2">
@ -167,7 +167,7 @@
</div>
</div>
<!-- end of .container-->
<!-- end of .row-->
</section>
<!-- <section> close ============================-->

View File

@ -5,16 +5,16 @@
{% block title %}{{ _("Create Estimate") }}{% endblock title %}
{% block content %}
<div class="container mt-4">
<div class="row mt-4">
<h3 class="text-center">{% trans "Create Estimate" %}</h3>
<form id="mainForm" method="post" class="needs-validation">
{% csrf_token %}
<div class="row g-3">
{{ form|crispy }}
<div class="container mt-5">
<div id="formContainer">
<div class="row mt-5">
<div id="formrow">
<h3 class="text-start">Unit Items</h3>
<div class="form-container row g-3 mb-3 mt-5">
<div class="form-row row g-3 mb-3 mt-5">
<div class="mb-2 col-sm-2">
<select class="form-control item" name="item[]" required>
{% for item in items %}
@ -61,9 +61,9 @@
// Add new form fields
document.getElementById('addMoreBtn').addEventListener('click', function(e) {
e.preventDefault();
const formContainer = document.getElementById('formContainer');
const formrow = document.getElementById('formrow');
const newForm = document.createElement('div');
newForm.className = 'form-container row g-3 mb-3 mt-5';
newForm.className = 'form-row row g-3 mb-3 mt-5';
newForm.innerHTML = `
<div class="mb-2 col-sm-2">
<select class="form-control item" name="item[]" required>
@ -79,7 +79,7 @@
<button class="btn btn-danger removeBtn">Remove</button>
</div>
`;
formContainer.appendChild(newForm);
formrow.appendChild(newForm);
// Add remove button functionality
newForm.querySelector('.removeBtn').addEventListener('click', function() {
@ -88,9 +88,9 @@
});
// Add remove button functionality to the initial form
document.querySelectorAll('.form-container').forEach(container => {
container.querySelector('.removeBtn').addEventListener('click', function() {
container.remove();
document.querySelectorAll('.form-row').forEach(row => {
row.querySelector('.removeBtn').addEventListener('click', function() {
row.remove();
});
});

View File

@ -4,7 +4,7 @@
{% block title %}{{ _("Quotations") }}{% endblock title %}
{% block content %}
<div class="container mt-4">
<div class="row mt-4">
<h3 class="text-center">{% trans "Quotations" %}</h3>
<div class="mx-n4 px-4 mx-lg-n6 px-lg-6 bg-body-emphasis pt-7 border-y">

View File

@ -17,7 +17,7 @@
margin: 0;
padding: 0;
}
.estimate-container {
.estimate-row {
background: #fff;
border-radius: 12px;
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
@ -106,7 +106,7 @@
background-color: #0056b3;
border-color: #0056b3;
}
.button-container {
.button-row {
display: flex;
justify-content: center;
gap: 10px;
@ -151,8 +151,8 @@
navbarVertical.setAttribute('data-navbar-appearance', 'darker');
}
</script>
<div class="support-chat-container">
<div class="container-fluid support-chat">
<div class="support-chat-row">
<div class="row-fluid support-chat">
<div class="card bg-body-emphasis">
<div class="card-header d-flex flex-between-center px-4 py-3 border-bottom border-translucent">
<h5 class="mb-0 d-flex align-items-center gap-2">Demo widget<span class="fa-solid fa-circle text-success fs-11"></span></h5>
@ -196,7 +196,7 @@
</div>
</main>
{% else%}
<div class="button-container">
<div class="button-row">
<button id="download-pdf" class="btn btn-primary">
<i class="fas fa-download"></i> {% trans 'Download Estimate' %}
</button>
@ -246,7 +246,7 @@
</div>
</div>
<div class="estimate-container" id="estimate-content">
<div class="estimate-row" id="estimate-content">
<!-- Header -->
<div class="estimate-header">
<svg width="101" height="24" viewBox="0 0 101 24" fill="none" xmlns="http://www.w3.org/2000/svg">

View File

@ -13,7 +13,7 @@
margin: 0;
padding: 20px;
}
.container {
.row {
max-width: 800px;
margin: 0 auto;
background-color: #fff;
@ -117,7 +117,7 @@
</head>
<body>
<div class="container">
<div class="row">
<div class="header">
<h1>عرض سعر السيارة - Tenhal</h1>
</div>

View File

@ -4,7 +4,7 @@
{% block content %}
<div class="container">
<div class="row">
<div class="row justify-content-center">
<div class="col-md-8">
<div class="card">

View File

@ -4,7 +4,7 @@
{% block content %}
<div class="container">
<div class="row">
<div class="row justify-content-center">
<div class="col-md-8">
<div class="card">

View File

@ -4,7 +4,7 @@
{% load i18n %}
{% block title %}{{ _("Invoice") }}{% endblock title %}
{% block content %}
<div class="container paid">
<div class="row paid">
<div class="row justify-content-center">
<div class="col-md-8">
<div class="card">

View File

@ -31,7 +31,7 @@
<!-- ============================================-->
<!-- <section> begin ============================-->
<section class="pt-5 pb-9 bg-body-emphasis dark__bg-gray-1200 border-top">
<div class="container-small mt-3">
<div class="row-small mt-3">
<div class="d-flex justify-content-between align-items-end mb-4">
<h2 class="mb-0">{% trans 'Invoice' %}</h2>
<div class="d-flex align-items-center gap-2">

View File

@ -4,7 +4,7 @@
{% block title %}{{ _("Invoices") }}{% endblock title %}
{% block content %}
<div class="container mt-4">
<div class="row mt-4">
<h3 class="text-center">{% trans "Invoices" %}</h3>
<div class="mx-n4 px-4 mx-lg-n6 px-lg-6 bg-body-emphasis pt-7 border-y">

View File

@ -16,7 +16,7 @@
margin: 0; /* Reset body margin */
padding: 0; /* Reset body padding */
}
.invoice-container {
.invoice-row {
background: #fff;
border-radius: 12px;
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
@ -105,7 +105,7 @@
background-color: #0056b3;
border-color: #0056b3;
}
.button-container {
.button-row {
text-align: right;
margin-top: 2rem;
margin-right:10rem;
@ -113,10 +113,10 @@
</style>
</head>
<body>
<div class="button-container">
<div class="button-row">
<button id="download-pdf" class="btn btn-primary">Download Invoice</button>
</div>
<div class="invoice-container" id="invoice-content">
<div class="invoice-row" id="invoice-content">
<!-- Header -->
<div class="invoice-header">
<svg width="101" height="24" viewBox="0 0 101 24" fill="none" xmlns="http://www.w3.org/2000/svg">
@ -229,7 +229,7 @@
<p>If you have any questions, feel free to contact us at <a href="mailto:support@example.com">support@example.com</a>.</p>
<p>Thank you for your business!</p>
</div>
<!-- Button Container -->
<!-- Button row -->
</div>

Some files were not shown because too many files have changed in this diff Show More