This commit is contained in:
gitea 2024-12-30 11:09:56 +00:00
commit 2940819f84
74 changed files with 2756 additions and 4180 deletions

BIN
.DS_Store vendored

Binary file not shown.

BIN
db.sqlite

Binary file not shown.

View File

@ -3,6 +3,7 @@ from . import models
admin.site.register(models.Dealer)
admin.site.register(models.Staff)
admin.site.register(models.Vendor)
admin.site.register(models.Customer)
admin.site.register(models.SaleQuotation)
@ -89,3 +90,8 @@ class CarSpecificationAdmin(admin.ModelAdmin):
class Meta:
verbose_name = "Car Specification"
# @admin.register(models.UserActivityLog)
# class UserActivityLogAdmin(admin.ModelAdmin):
# list_display = ('user', 'action', 'timestamp')
# search_fields = ('user__username', 'action')
# list_filter = ('timestamp',)

View File

@ -1,6 +1,7 @@
from phonenumber_field.formfields import PhoneNumberField
from django.core.validators import RegexValidator
from django import forms
from django.contrib.auth import get_user_model
from .mixins import AddClassMixin
from django.forms.models import inlineformset_factory
from .models import (
@ -21,7 +22,8 @@ from .models import (
Representative,
Payment,
SaleQuotationCar,
AdditionalServices
AdditionalServices,
Staff
)
from django_ledger.models import ItemModel
@ -31,6 +33,8 @@ import django_tables2 as tables
from django.forms import formset_factory
User = get_user_model()
class AdditionalServiceForm(forms.ModelForm):
class Meta:
model = AdditionalServices
@ -41,10 +45,12 @@ class PaymentForm(forms.ModelForm):
model = Payment
fields = ['amount','payment_method', 'reference_number']
class UserForm(forms.ModelForm):
class StaffForm(forms.ModelForm):
email = forms.EmailField(required=True, label="Email")
class Meta:
model = Dealer
fields = ['name', 'arabic_name', 'phone_number', 'address','dealer_type']
model = Staff
fields = ['name', 'arabic_name', 'phone_number','staff_type']
# Dealer Form
class DealerForm(forms.ModelForm):
@ -395,8 +401,10 @@ class WizardForm3(forms.Form):
password = cleaned_data.get("password")
confirm_password = cleaned_data.get("confirm_password")
if password and confirm_password and password != confirm_password:
if password != confirm_password:
raise forms.ValidationError("Passwords do not match.")
else:
return cleaned_data
class ItemForm(forms.Form):

View File

@ -0,0 +1,29 @@
import logging
from inventory import models
from django.utils import timezone
logger = logging.getLogger('user_activity')
class LogUserActivityMiddleware:
def __init__(self, get_response):
self.get_response = get_response
def __call__(self, request):
response = self.get_response(request)
if request.user.is_authenticated:
action = f"{request.method} {request.path}"
models.UserActivityLog.objects.create(
user=request.user,
action=action,
timestamp=timezone.now()
)
return response
def get_client_ip(self, request):
x_forwarded_for = request.META.get('HTTP_X_FORWARDED_FOR')
if x_forwarded_for:
return x_forwarded_for.split(',')[0]
return request.META.get('REMOTE_ADDR')

View File

@ -0,0 +1,55 @@
# Generated by Django 5.1.4 on 2024-12-29 15:46
import django.db.models.deletion
import inventory.mixins
import phonenumber_field.modelfields
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('inventory', '0007_vendor_created_at'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.AlterModelOptions(
name='dealer',
options={'verbose_name': 'Dealer', 'verbose_name_plural': 'Dealers'},
),
migrations.RemoveField(
model_name='dealer',
name='dealer_type',
),
migrations.RemoveField(
model_name='dealer',
name='parent_dealer',
),
migrations.AddField(
model_name='dealer',
name='updated_at',
field=models.DateTimeField(auto_now=True, verbose_name='Updated At'),
),
migrations.CreateModel(
name='Staff',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=255, verbose_name='Name')),
('arabic_name', models.CharField(max_length=255, verbose_name='Arabic Name')),
('phone_number', phonenumber_field.modelfields.PhoneNumberField(max_length=128, region='SA', verbose_name='Phone Number')),
('staff_type', models.CharField(choices=[('manager', 'Manager'), ('inventory', 'Inventory'), ('accountant', 'Accountant'), ('sales', 'Sales'), ('receptionist', 'Receptionist'), ('technician', 'Technician'), ('driver', 'Driver')], max_length=255, verbose_name='Staff Type')),
('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Created At')),
('updated_at', models.DateTimeField(auto_now=True, verbose_name='Updated At')),
('dealer', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='inventory.dealer')),
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='staff', to=settings.AUTH_USER_MODEL)),
],
options={
'verbose_name': 'Staff',
'verbose_name_plural': 'Staff',
'permissions': [],
},
bases=(models.Model, inventory.mixins.LocalizedNameMixin),
),
]

View File

@ -0,0 +1,25 @@
# Generated by Django 5.1.4 on 2024-12-30 01:50
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('inventory', '0008_alter_dealer_options_remove_dealer_dealer_type_and_more'),
]
operations = [
migrations.AlterField(
model_name='additionalservices',
name='uom',
field=models.CharField(choices=[('Unit', 'Unit'), ('Kg', 'Kg'), ('L', 'L'), ('m', 'm'), ('cm', 'cm'), ('m2', 'm2'), ('m3', 'm3'), ('m3', 'm3')], max_length=10, verbose_name='Unit of Measurement'),
),
migrations.AlterField(
model_name='staff',
name='dealer',
field=models.ForeignKey(default=8, on_delete=django.db.models.deletion.CASCADE, related_name='staff', to='inventory.dealer'),
preserve_default=False,
),
]

View File

@ -0,0 +1,30 @@
# Generated by Django 5.1.4 on 2024-12-30 02:50
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('inventory', '0009_alter_additionalservices_uom_alter_staff_dealer'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='UserActivityLog',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('action', models.TextField()),
('timestamp', models.DateTimeField(auto_now_add=True)),
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
options={
'verbose_name': 'User Activity Log',
'verbose_name_plural': 'User Activity Logs',
'ordering': ['-timestamp'],
},
),
]

View File

@ -0,0 +1,16 @@
# Generated by Django 5.1.4 on 2024-12-30 03:11
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('inventory', '0010_useractivitylog'),
]
operations = [
migrations.DeleteModel(
name='UserActivityLog',
),
]

View File

@ -0,0 +1,19 @@
# Generated by Django 5.1.4 on 2024-12-30 03:42
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('inventory', '0011_delete_useractivitylog'),
]
operations = [
migrations.AddField(
model_name='representative',
name='email',
field=models.EmailField(default='mail@mail.com', max_length=255, verbose_name='Email Address'),
preserve_default=False,
),
]

View File

@ -0,0 +1,20 @@
# Generated by Django 5.1.4 on 2024-12-30 03:59
import django.utils.timezone
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('inventory', '0012_representative_email'),
]
operations = [
migrations.AddField(
model_name='organization',
name='created_at',
field=models.DateTimeField(auto_now_add=True, default=django.utils.timezone.now, verbose_name='Created At'),
preserve_default=False,
),
]

View File

@ -0,0 +1,30 @@
# Generated by Django 5.1.4 on 2024-12-30 10:49
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('inventory', '0013_organization_created_at'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='UserActivityLog',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('action', models.TextField()),
('timestamp', models.DateTimeField(auto_now_add=True)),
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
options={
'verbose_name': 'User Activity Log',
'verbose_name_plural': 'User Activity Logs',
'ordering': ['-timestamp'],
},
),
]

View File

@ -33,12 +33,13 @@ from django_ledger.models import EntityModel
class DealerUserManager(UserManager):
def create_user_with_dealer(self, email, password, dealer_name, arabic_name, crn, vrn, address, **extra_fields):
user = self.create_user(email=email, password=password, **extra_fields)
Dealer.objects.create(user=user, name=dealer_name, )
Dealer.objects.create(user=user, name=dealer_name,arabic_name=arabic_name, crn=crn, vrn=vrn, address=address, **extra_fields)
return user
UNIT_CHOICES = (
("Unit", _("Unit")),
("Kg", _("Kg")),
("L", _("L")),
("m", _("m")),
@ -544,16 +545,17 @@ class Dealer(models.Model, LocalizedNameMixin):
verbose_name=_("Logo"))
entity = models.ForeignKey(EntityModel, on_delete=models.SET_NULL, null=True, blank=True)
joined_at = models.DateTimeField(auto_now_add=True, verbose_name=_("Joined At"))
parent_dealer = models.ForeignKey( "self",
on_delete=models.SET_NULL,
blank=True,
null=True,
verbose_name=_("Parent Dealer"),
related_name="sub_dealers",)
dealer_type = models.CharField(max_length=255,
choices=DEALER_TYPES.choices,
verbose_name=_("Dealer Type"),
default=DEALER_TYPES.OWNER,)
updated_at = models.DateTimeField(auto_now=True, verbose_name=_("Updated At"))
# parent_dealer = models.ForeignKey( "self",
# on_delete=models.SET_NULL,
# blank=True,
# null=True,
# verbose_name=_("Parent Dealer"),
# related_name="sub_dealers",)
# dealer_type = models.CharField(max_length=255,
# choices=DEALER_TYPES.choices,
# verbose_name=_("Dealer Type"),
# default=DEALER_TYPES.OWNER,)
objects = DealerUserManager()
@property
@ -565,11 +567,10 @@ class Dealer(models.Model, LocalizedNameMixin):
@property
def get_plan(self):
"""Get the price of the active subscription plan for the dealer."""
active_plan = self.get_active_plan
if active_plan:
subscription_plan = SubscriptionPlan.objects.filter(
name=active_plan.plan
pk=active_plan.pk
).first()
if subscription_plan:
return subscription_plan
@ -578,56 +579,57 @@ class Dealer(models.Model, LocalizedNameMixin):
class Meta:
verbose_name = _("Dealer")
verbose_name_plural = _("Dealers")
permissions = [
('change_dealer_type', 'Can change dealer type'),
]
# permissions = [
# ('change_dealer_type', 'Can change dealer type'),
# ]
def __str__(self):
return self.name
@property
def get_sub_dealers(self):
if self.dealer_type == "OWNER":
return self.sub_dealers.all()
return None
@property
def is_parent(self):
return self.dealer_type == "OWNER"
@property
def get_root_dealer(self):
return self.parent_dealer if self.parent_dealer else self
# @receiver(post_save, sender=User)
# def create_dealer(instance, created, *args, **kwargs):
# if created:
# Dealer.objects.create(user=instance)
# @property
# def get_sub_dealers(self):
# if self.dealer_type == "OWNER":
# return self.sub_dealers.all()
# return None
#
# @property
# def is_parent(self):
# return self.dealer_type == "OWNER"
# @property
# def get_root_dealer(self):
# return self.parent_dealer if self.parent_dealer else self
class STAFF_TYPES(models.TextChoices):
MANAGER = "manager", _("Manager")
INVENTORY = "inventory", _("Inventory")
ACCOUNTANT = "accountant", _("Accountant")
SALES = "sales", _("Sales")
RECEPTIONIST = "receptionist", _("Receptionist")
TECHNICIAN = "technician", _("Technician")
DRIVER = "driver", _("Driver")
class Staff(models.Model, LocalizedNameMixin):
user = models.OneToOneField(User, on_delete=models.CASCADE, related_name="staff")
dealer = models.ForeignKey(Dealer, on_delete=models.CASCADE, related_name="staff")
name = models.CharField(max_length=255, verbose_name=_("Name"))
arabic_name = models.CharField(max_length=255, verbose_name=_("Arabic Name"))
phone_number = PhoneNumberField(region="SA", verbose_name=_("Phone Number"))
staff_type = models.CharField(choices=STAFF_TYPES.choices, max_length=255, verbose_name=_("Staff Type"))
created_at = models.DateTimeField(auto_now_add=True, verbose_name=_("Created At"))
updated_at = models.DateTimeField(auto_now=True, verbose_name=_("Updated At"))
class Meta:
verbose_name = _("Staff")
verbose_name_plural = _("Staff")
permissions = []
def __str__(self):
return f"{self.name} - {self.dealer}"
# class STAFF_TYPES(models.TextChoices):
# # Owner = "Owner", _("Owner")
# MANAGER = "manager", _("Manager")
# INVENTORY = "inventory", _("Inventory")
# ACCOUNTANT = "accountant", _("Accountant")
# SALES = "sales", _("Sales")
# RECEPTIONIST = "receptionist", _("Receptionist")
# TECHNICIAN = "technician", _("Technician")
# DRIVER = "driver", _("Driver")
#
#
# class Staff(models.Model, LocalizedNameMixin):
# user = models.OneToOneField(User, on_delete=models.CASCADE, related_name="staff")
# dealer = models.ForeignKey(Dealer, on_delete=models.SET_NULL, null=True, blank=True)
# name = models.CharField(max_length=255, verbose_name=_("Name"))
# arabic_name = models.CharField(max_length=255, verbose_name=_("Arabic Name"))
# staff_type = models.CharField(choices=STAFF_TYPES.choices, max_length=255, verbose_name=_("Staff Type"))
# created_at = models.DateTimeField(auto_now_add=True, verbose_name=_("Created At"))
# updated_at = models.DateTimeField(auto_now=True, verbose_name=_("Updated At"))
#
# class Meta:
# verbose_name = _("Staff")
# verbose_name_plural = _("Staff")
# permissions = []
# Vendor Model
@ -704,6 +706,7 @@ class Organization(models.Model, LocalizedNameMixin):
phone_number = PhoneNumberField(region='SA', verbose_name=_("Phone Number"))
address = models.CharField(max_length=200, blank=True, null=True, verbose_name=_("Address"))
logo = models.ImageField(upload_to="logos", blank=True, null=True, verbose_name=_("Logo"))
created_at = models.DateTimeField(auto_now_add=True, verbose_name=_("Created At"))
class Meta:
verbose_name = _("Organization")
@ -718,6 +721,7 @@ class Representative(models.Model, LocalizedNameMixin):
arabic_name = models.CharField(max_length=255, verbose_name=_("Arabic Name"))
id_number = models.CharField(max_length=10, verbose_name=_("ID Number"))
phone_number = PhoneNumberField(region='SA', verbose_name=_("Phone Number"))
email = models.EmailField(max_length=255, verbose_name=_("Email Address"))
address = models.CharField(max_length=200, blank=True, null=True, verbose_name=_("Address"))
organization = models.ManyToManyField(Organization, related_name='representatives')
@ -939,4 +943,18 @@ class Refund(models.Model):
verbose_name_plural = _("refunds")
def __str__(self):
return f"Refund of {self.amount} on {self.refund_date}"
return f"Refund of {self.amount} on {self.refund_date}"
class UserActivityLog(models.Model):
user = models.ForeignKey(User, on_delete=models.CASCADE)
action = models.TextField()
timestamp = models.DateTimeField(auto_now_add=True)
class Meta:
verbose_name = "User Activity Log"
verbose_name_plural = "User Activity Logs"
ordering = ['-timestamp']
def __str__(self):
return f"{self.user.email} - {self.action} - {self.timestamp}"

View File

@ -3,7 +3,7 @@ from django.dispatch import receiver
from django.utils.translation import gettext_lazy as _
from django.contrib.auth import get_user_model
from django_ledger.io import roles
from django_ledger.models import EntityModel,AccountModel,ItemModel,ItemModelAbstract,UnitOfMeasureModel
from django_ledger.models import EntityModel,AccountModel,ItemModel,ItemModelAbstract,UnitOfMeasureModel, VendorModel
from . import models
User = get_user_model()
@ -49,13 +49,13 @@ def create_car_location(sender, instance, created, **kwargs):
"""
try:
if created:
if instance.dealer is None:
if instance.user.dealer is None:
raise ValueError(f"Cannot create CarLocation for car {instance.vin}: dealer is missing.")
models.CarLocation.objects.create(
car=instance,
owner=instance.dealer,
showroom=instance.dealer,
owner=instance.user.dealer,
showroom=instance.user.dealer,
description=f"Initial location set for car {instance.vin}."
)
print("Car Location created")
@ -83,105 +83,112 @@ def update_car_status_on_reservation_delete(sender, instance, **kwargs):
@receiver(post_save, sender=models.Dealer)
def create_ledger_entity(sender, instance, created, **kwargs):
if created:
root_dealer = instance.get_root_dealer
if not root_dealer.entity:
entity_name = f"{root_dealer.name}-{root_dealer.joined_at.date()}"
entity = EntityModel.create_entity(
name=entity_name,
admin=root_dealer.user,
use_accrual_method=False,
fy_start_month=1,
entity_name = instance.user.dealer.name
entity = EntityModel.create_entity(
name=entity_name,
admin=instance.user,
use_accrual_method=False,
fy_start_month=1,
)
if entity:
instance.entity = entity
instance.save()
coa = entity.create_chart_of_accounts(
assign_as_default=True, commit=True, coa_name=_(f"{entity_name}-COA")
)
if coa:
# entity.populate_default_coa(activate_accounts=True, coa_model=coa)
print(f"Ledger entity created for Dealer: {instance.name}")
# Create Cash Account
entity.create_account(
coa_model=coa,
code="101",
role=roles.ASSET_CA_CASH,
name=_("Cash"),
balance_type="debit",
active=True,
)
if entity:
instance.entity = entity
instance.save()
coa = entity.create_chart_of_accounts(
assign_as_default=True, commit=True, coa_name=_(f"{entity_name}-COA")
)
if coa:
# entity.populate_default_coa(activate_accounts=True, coa_model=coa)
print(f"Ledger entity created for Dealer: {instance.name}")
# Create Accounts Receivable Account
entity.create_account(
coa_model=coa,
code="102",
role=roles.ASSET_CA_RECEIVABLES,
name=_("Accounts Receivable"),
balance_type="debit",
active=True,
)
# Create Cash Account
entity.create_account(
coa_model=coa,
code="1010",
role=roles.ASSET_CA_CASH,
name=_("Cash"),
balance_type="debit",
active=True,
)
# Create Inventory Account
entity.create_account(
coa_model=coa,
code="103",
role=roles.ASSET_CA_INVENTORY,
name=_("Inventory"),
balance_type="debit",
active=True,
)
# Create Accounts Receivable Account
entity.create_account(
coa_model=coa,
code="1020",
role=roles.ASSET_CA_RECEIVABLES,
name=_("Accounts Receivable"),
balance_type="debit",
active=True,
)
# Create Inventory Account
entity.create_account(
coa_model=coa,
code="1030",
role=roles.ASSET_CA_INVENTORY,
name=_("Inventory"),
balance_type="debit",
active=True,
)
# Create Accounts Payable Account
entity.create_account(
coa_model=coa,
code="101",
role=roles.LIABILITY_CL_ACC_PAYABLE,
name=_("Accounts Payable"),
balance_type="credit",
active=True,
)
# Create Equity Account
entity.create_account(
coa_model=coa,
code="101",
role=roles.EQUITY_CAPITAL,
name=_("Partners Current"),
balance_type="credit",
active=True,
)
# Create Accounts Payable Account
entity.create_account(
coa_model=coa,
code="2010",
role=roles.LIABILITY_CL_ACC_PAYABLE,
name=_("Accounts Payable"),
balance_type="credit",
active=True,
)
# Create Sales Revenue Account
entity.create_account(
coa_model=coa,
code="101",
role=roles.INCOME_OPERATIONAL,
name=_("Sales Revenue"),
balance_type="credit",
active=True,
)
# Create Sales Revenue Account
entity.create_account(
coa_model=coa,
code="4010",
role=roles.INCOME_OPERATIONAL,
name=_("Sales Revenue"),
balance_type="credit",
active=True,
)
# Create Cost of Goods Sold Account
entity.create_account(
coa_model=coa,
code="101",
role=roles.COGS,
name=_("Cost of Goods Sold"),
balance_type="debit",
active=True,
)
# Create Cost of Goods Sold Account
entity.create_account(
coa_model=coa,
code="5010",
role=roles.COGS,
name=_("Cost of Goods Sold"),
balance_type="debit",
active=True,
)
# Create Rent Expense Account
entity.create_account(
coa_model=coa,
code="101",
role=roles.EXPENSE_OPERATIONAL,
name=_("Rent Expense"),
balance_type="debit",
active=True,
)
# Create Rent Expense Account
entity.create_account(
coa_model=coa,
code="6010",
role=roles.EXPENSE_OPERATIONAL,
name=_("Rent Expense"),
balance_type="debit",
active=True,
)
# Create Utilities Expense Account
entity.create_account(
coa_model=coa,
code="6020",
role=roles.EXPENSE_OPERATIONAL,
name=_("Utilities Expense"),
balance_type="debit",
active=True,
)
# Create Utilities Expense Account
entity.create_account(
coa_model=coa,
code="6020",
role=roles.EXPENSE_OPERATIONAL,
name=_("Utilities Expense"),
balance_type="debit",
active=True,
)
# Create Vendor
@ -192,18 +199,20 @@ def create_ledger_vendor(sender, instance, created, **kwargs):
entity = EntityModel.objects.filter(name=instance.dealer.name).first()
entity.create_vendor(
name=instance.name,
vendor_number=instance.crn,
address_1=instance.address,
phone=instance.phone_number,
tax_id_number=instance.vrn,
active=True,
hidden=False,
additional_info={
"arabic_name": instance.arabic_name,
"contact_person": instance.contact_person,
})
vendor_model_kwargs={
"vendor_name": instance.name,
"vendor_number": instance.crn,
"address_1": instance.address,
"phone": instance.phone_number,
"tax_id_number": instance.vrn,
"active": True,
"hidden": False,
"additional_info": {
"arabic_name": instance.arabic_name,
"contact_person": instance.contact_person,
}
}
)
print(f"VendorModel created for Vendor: {instance.name}")
@ -211,7 +220,7 @@ def create_ledger_vendor(sender, instance, created, **kwargs):
@receiver(post_save, sender=models.Customer)
def create_customer(sender, instance, created, **kwargs):
if created:
dealer = instance.dealer.get_root_dealer
dealer = instance.dealer
entity = dealer.entity
name = f"{instance.first_name} {instance.middle_name} {instance.last_name}"
if entity:
@ -232,31 +241,65 @@ def create_customer(sender, instance, created, **kwargs):
# Create Item
@receiver(post_save, sender=models.Car)
def create_item_model(sender, instance, created, **kwargs):
item_name = f"{instance.year} - {instance.id_car_make} - {instance.id_car_model} - {instance.id_car_trim}"
dealer = instance.dealer
entity = dealer.entity
if not entity:
return
uom_name = _("Car")
unit_abbr = _("C")
uom = entity.get_uom_all().filter(name=uom_name, unit_abbr=unit_abbr).first()
if not uom:
uom = entity.create_uom(
name=uom_name,
unit_abbr=unit_abbr
)
entity.create_item_product(
name=item_name,
uom_model=uom,
item_type=ItemModel.ITEM_TYPE_MATERIAL)
print(f"ItemModel for Car:")
# @receiver(post_save, sender=models.Car)
# def create_item_model(sender, instance, created, **kwargs):
# item_name = f"{instance.year} - {instance.id_car_make} - {instance.id_car_model} - {instance.id_car_trim}"
# uom_name = _("Car")
# unit_abbr = _("C")
#
# uom, uom_created = UnitOfMeasureModel.objects.get_or_create(
# name=uom_name,
# unit_abbr=unit_abbr
# )
#
# if uom_created:
# print(f"UOM created: {uom_name}")
# else:
# print(f"Using existing UOM: {uom_name}")
#
# entity = EntityModel.objects.filter(name=instance.dealer.name).first()
#
# inventory_account = AccountModel.objects.first()
# cogs_account = AccountModel.objects.first()
# earnings_account = AccountModel.objects.first()
#
# entity.create_item_product(
# item_name=item_name,
# item_role=ItemModelAbstract.ITEM_ROLE_PRODUCT,
# item_type=ItemModelAbstract.ITEM_TYPE_MATERIAL,
# item_id=instance.vin,
# sold_as_unit=True,
# inventory_received=1.00,
# inventory_received_value=0.00,
# inventory_account=inventory_account,
# for_inventory=True,)
#
# item = ItemModel.objects.create(
# entity=entity,
# uom=uom,
# name=item_name,
# item_role=ItemModelAbstract.ITEM_ROLE_INVENTORY,
# item_type=ItemModelAbstract.ITEM_TYPE_MATERIAL,
# item_id=instance.vin,
# sold_as_unit=True,
# inventory_received=1.00,
# inventory_received_value=0.00,
# inventory_account=inventory_account,
# for_inventory=True,
# is_product_or_service=True,
# cogs_account=cogs_account,
# earnings_account=earnings_account,
# is_active=True,
# additional_info={
# "remarks": instance.remarks,
# "status": instance.status,
# "stock_type": instance.stock_type,
# "mileage": instance.mileage,
# },
# )
#
# print(f"ItemModel {'created' if created else 'updated'} for Car: {item.name}")
#
#
# # update price - CarFinance
# @receiver(post_save, sender=CarFinance)
@ -269,6 +312,7 @@ def create_item_model(sender, instance, created, **kwargs):
# print(f"Inventory item updated with CarFinance data for Car: {instance.car}")
# @receiver(pre_save, sender=models.SaleQuotation)
# def update_quotation_status(sender, instance, **kwargs):
# if instance.valid_until and timezone.now() > instance.valid_until:

View File

@ -31,6 +31,7 @@ urlpatterns = [
# Dealer URLs
path('dealers/<int:pk>/', views.DealerDetailView.as_view(), name='dealer_detail'),
path('dealers/<int:pk>/update/', views.DealerUpdateView.as_view(), name='dealer_update'),
path('dealers/activity/', views.UserActivityLogListView.as_view(), name='dealer_activity'),
# path('dealers/<int:pk>/delete/', views.DealerDeleteView.as_view(), name='dealer_delete'),
# Customer URLs
@ -91,7 +92,7 @@ urlpatterns = [
path('user/<int:pk>/update/', views.UserUpdateView.as_view(), name='user_update'),
path('user/<int:pk>/', views.UserDetailView.as_view(), name='user_detail'),
path('user/', views.UserListView.as_view(), name='user_list'),
path('user/<int:pk>/confirm/', views.UserDeleteview, name='user_delete'),
path('user/<int:pk>/confirm/', views.UserDeleteview, name='user_delete'),
# Organization URLs
path('organizations/', views.OrganizationListView.as_view(), name='organization_list'),
path('organizations/<int:pk>/', views.OrganizationDetailView.as_view(), name='organization_detail'),

View File

@ -24,7 +24,7 @@ def get_financial_value(name,vat=False):
def get_total_financials(instance,vat=False):
total = 0
if instance.additional_services.count() != 0:
total = sum(x.price for x in instance.additional_services) + instance.selling_price
total = sum(x.price for x in instance.additional_services.all()) + instance.selling_price
if vat:
total = (total * settings.VAT_RATE).quantize(Decimal('0.01')) + total
return total

View File

@ -1,12 +1,16 @@
from django.core.paginator import Paginator
from django.views.decorators.csrf import csrf_exempt
from django_ledger.models import EntityModel, InvoiceModel,BankAccountModel,AccountModel,JournalEntryModel,TransactionModel,EstimateModel,CustomerModel
from django.core.mail import send_mail
from django_ledger.forms.bank_account import BankAccountCreateForm,BankAccountUpdateForm
from django_ledger.forms.account import AccountModelCreateForm,AccountModelUpdateForm
from django_ledger.forms.estimate import EstimateModelCreateForm
from django.contrib.admin.models import LogEntry
import logging
import json
import datetime
from decimal import Decimal
from django.db.models.functions import Coalesce
from django.shortcuts import HttpResponse
from django.contrib.auth.mixins import LoginRequiredMixin
from django.contrib.auth.decorators import login_required
@ -46,6 +50,7 @@ from django.contrib.auth.models import Group
from .utils import get_calculations
from django.contrib.auth.models import User
from allauth.account import views
from django.db.models import Count, F, Value
logger = logging.getLogger(__name__)
logging.basicConfig(level=logging.INFO)
@ -93,15 +98,16 @@ def dealer_signup(request, *args, **kwargs):
wf1 = data.get("wizardValidationForm1")
wf2 = data.get("wizardValidationForm2")
wf3 = data.get("wizardValidationForm3")
name = wf1.get("name")
arabic_name = wf1.get("arabic_name")
email = wf1.get("email")
password = wf1.get("password")
password_confirm = wf1.get("confirm_password")
name = wf2.get("name")
arabic_name = wf2.get("arabic_name")
phone = wf2.get("phone_number")
crn = wf2.get("crn")
vrn = wf2.get("vrn")
address = wf2.get("address")
password = wf3.get("password")
password_confirm = wf3.get("confirm_password")
crn = wf3.get("crn")
vrn = wf3.get("vrn")
address = wf3.get("address")
if password != password_confirm:
return JsonResponse({"error": "Passwords do not match."}, status=400)
@ -109,16 +115,14 @@ def dealer_signup(request, *args, **kwargs):
try:
with transaction.atomic():
user = User.objects.create(email=email, password=password)
user.set_password(password)
user.save()
models.Dealer.objects.create(user=user,
name=name,
arabic_name=arabic_name,
crn=crn,
vrn=vrn,
phone_number=phone,
address=address,
dealer_type="OWNER",)
address=address,)
return JsonResponse({"message": "User created successfully."}, status=200)
except Exception as e:
return JsonResponse({"error": str(e)}, status=400)
@ -143,8 +147,8 @@ class AccountingDashboard(LoginRequiredMixin, TemplateView):
def dispatch(self, request, *args, **kwargs):
if (
not any(hasattr(request.user, attr) for attr in ["dealer", "subdealer"])
or not request.user.is_authenticated
# not any(hasattr(request.user, attr) for attr in ["dealer", "subdealer"])
not request.user.is_authenticated
):
# messages.error(request, _("You are not associated with any dealer."))
return redirect("welcome")
@ -192,7 +196,7 @@ class CarCreateView(LoginRequiredMixin, CreateView):
return reverse("inventory_stats")
def form_valid(self, form):
form.instance.dealer = self.request.user.dealer.get_root_dealer
form.instance.dealer = self.request.user.dealer
form.save()
messages.success(self.request, "Car saved successfully.")
return super().form_valid(form)
@ -347,7 +351,7 @@ class CarInventory(LoginRequiredMixin, ListView):
trim_id = self.kwargs['trim_id']
cars = models.Car.objects.filter(
dealer=self.request.user.dealer.get_root_dealer,
dealer=self.request.user.dealer,
id_car_make=make_id,
id_car_model=model_id,
id_car_trim=trim_id,
@ -391,7 +395,7 @@ def inventory_stats_view(request):
# Annotate total cars by make, model, and trim
cars = (
models.Car.objects.filter(dealer=dealer.get_root_dealer)
models.Car.objects.filter(dealer=dealer)
.select_related("id_car_make", "id_car_model", "id_car_trim")
.annotate(
make_total=Count("id_car_make"),
@ -533,7 +537,7 @@ 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
form.instance.owner = self.request.user.dealer
form.save()
messages.success(self.request, "Car saved successfully.")
return super().form_valid(form)
@ -625,6 +629,13 @@ class DealerDetailView(LoginRequiredMixin, DetailView):
template_name = "dealers/dealer_detail.html"
context_object_name = "dealer"
def get_queryset(self):
total_count = models.Dealer.objects.annotate(
staff_count=Coalesce(Count('staff'), Value(0)),
total_count=F('staff_count') + Value(1))
return total_count
class DealerUpdateView(LoginRequiredMixin, SuccessMessageMixin, UpdateView):
model = models.Dealer
@ -636,17 +647,17 @@ class DealerUpdateView(LoginRequiredMixin, SuccessMessageMixin, UpdateView):
def get_success_url(self):
return reverse("dealer_detail", kwargs={"pk": self.object.pk})
def get_form(self, form_class=None):
form = super().get_form(form_class)
if hasattr(form.fields, "dealer_type"):
form.fields.pop("dealer_type")
return form
def get_form_class(self):
if self.request.user.dealer.dealer_type == "OWNER":
return forms.DealerForm
else:
return forms.UserForm
# def get_form(self, form_class=None):
# form = super().get_form(form_class)
# if hasattr(form.fields, "dealer_type"):
# form.fields.pop("dealer_type")
# return form
#
# def get_form_class(self):
# if self.request.user.dealer.dealer_type == "OWNER":
# return forms.DealerForm
# else:
# return forms.UserForm
class CustomerListView(LoginRequiredMixin, PermissionRequiredMixin, ListView):
@ -660,7 +671,7 @@ class CustomerListView(LoginRequiredMixin, PermissionRequiredMixin, ListView):
def get_queryset(self):
query = self.request.GET.get("q")
customers = models.Customer.objects.filter(
dealer=self.request.user.dealer.get_root_dealer
dealer=self.request.user.dealer
)
if query:
@ -697,6 +708,10 @@ class CustomerCreateView(
permission_required = ("inventory.add_customer",)
success_message = _("Customer created successfully.")
def form_valid(self, form):
form.instance.dealer = self.request.user.dealer
return super().form_valid(form)
class CustomerUpdateView(
@ -784,7 +799,7 @@ class QuotationCreateView(LoginRequiredMixin, PermissionRequiredMixin, CreateVie
permission_required = ("inventory.add_salequotation",)
def form_valid(self, form):
dealer = self.request.user.dealer.get_root_dealer
dealer = self.request.user.dealer
form.instance.dealer = dealer
quotation = form.save()
selected_cars = form.cleaned_data.get("cars")
@ -809,7 +824,7 @@ class QuotationListView(LoginRequiredMixin, PermissionRequiredMixin, ListView):
def get_queryset(self):
status = self.request.GET.get("status")
queryset = self.request.user.dealer.get_root_dealer.sales.all()
queryset = self.request.user.dealer.sales.all()
if status:
queryset = queryset.filter(status=status)
return queryset
@ -834,7 +849,7 @@ class QuotationDetailView(LoginRequiredMixin, PermissionRequiredMixin, DetailVie
@login_required
def generate_invoice(request, pk):
quotation = get_object_or_404(models.SaleQuotation, pk=pk)
dealer = request.user.dealer.get_root_dealer
dealer = request.user.dealer
entity = dealer.entity
if not quotation.is_approved:
messages.error(
@ -981,7 +996,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.get_root_dealer
dealer = request.user.dealer
entity = dealer.entity
if qoutation.posted:
messages.error(request, "Quotation is already posted")
@ -1037,7 +1052,7 @@ def post_quotation(request, pk):
def mark_quotation(request, pk):
qoutation = get_object_or_404(models.SaleQuotation, pk=pk)
status = request.GET.get("status")
dealer = request.user.dealer.get_root_dealer
dealer = request.user.dealer
entity = dealer.entity
date = datetime.datetime.now()
customer = entity.get_customers().filter(customer_name=qoutation.customer.get_full_name).first()
@ -1052,7 +1067,7 @@ def mark_quotation(request, pk):
messages.error(request, "Quotation is not ready for approval")
return redirect("quotation_detail", pk=pk)
invoice_model.mark_as_approved(entity_slug=entity.slug, user_model=request.user.dealer.get_root_dealer.user)
invoice_model.mark_as_approved(entity_slug=entity.slug, user_model=request.user.dealer)
invoice_model.date_approved = date
qoutation.date_approved = date
invoice_model.save()
@ -1072,7 +1087,7 @@ def mark_quotation(request, pk):
messages.error(request, "Quotation is not ready for payment")
return redirect("quotation_detail", pk=pk)
invoice_model.mark_as_paid(entity_slug=entity.slug, user_model=request.user.dealer.get_root_dealer.user)
invoice_model.mark_as_paid(entity_slug=entity.slug, user_model=request.user.dealer)
invoice_model.date_paid = date
qoutation.date_paid = date
invoice_model.save()
@ -1118,28 +1133,16 @@ class SalesOrderDetailView(LoginRequiredMixin, PermissionRequiredMixin, DetailVi
# Users
class UserListView(LoginRequiredMixin, PermissionRequiredMixin, ListView):
model = models.Dealer
model = models.Staff
context_object_name = "users"
paginate_by = 10
template_name = "users/user_list.html"
permission_required = ("inventory.view_dealer",)
def get_queryset(self):
query = self.request.GET.get("q")
users = self.request.user.dealer.sub_dealers
if query:
users = users.filter(
Q(name__icontains=query)
| Q(arabic_name__icontains=query)
| Q(phone_number__icontains=query)
| Q(address__icontains=query)
)
return users.all()
class UserDetailView(LoginRequiredMixin, PermissionRequiredMixin, DetailView):
model = models.Dealer
model = models.Staff
template_name = "users/user_detail.html"
context_object_name = "user_"
permission_required = ("inventory.view_dealer",)
@ -1151,39 +1154,24 @@ class UserCreateView(
SuccessMessageMixin,
CreateView,
):
model = models.Dealer
form_class = forms.UserForm
model = models.Staff
form_class = forms.StaffForm
template_name = "users/user_form.html"
success_url = reverse_lazy("user_list")
permission_required = ("inventory.add_dealer",)
success_message = _("User created successfully.")
def get_form(self, form_class=None):
form = super().get_form(form_class)
form.fields["dealer_type"].choices = [
t for t in form.fields["dealer_type"].choices if t[0] != "OWNER"
]
return form
def form_valid(self, form):
dealer = self.request.user.dealer.get_root_dealer
if dealer.sub_dealers.count() >= dealer.get_active_plan.max_users:
messages.error(
self.request, _("You have reached the maximum number of users.")
)
return redirect("user_list")
form.instance.dealer = self.request.user.dealer
email = form.cleaned_data['email']
password = "Tenhal@123"
user = User.objects.create_user(username=email, email=email, password=password)
staff = form.save(commit=False)
staff.user = user
staff.save()
user = User.objects.create_user(username=form.cleaned_data["name"])
user.set_password("Tenhal@123")
user.save()
form.instance.user = user
form.instance.parent_dealer = dealer
for group in user.groups.all():
group.user_set.remove(user)
Group.objects.get(name=form.cleaned_data["dealer_type"].lower()).user_set.add(
user
)
form.save()
return super().form_valid(form)
@ -1193,28 +1181,19 @@ class UserUpdateView(
SuccessMessageMixin,
UpdateView,
):
model = models.Dealer
form_class = forms.UserForm
model = models.Staff
form_class = forms.StaffForm
template_name = "users/user_form.html"
success_url = reverse_lazy("user_list")
permission_required = ("inventory.change_dealer",)
success_message = _("User updated successfully.")
def get_form(self, form_class=None):
form = super().get_form(form_class)
if not self.request.user.has_perms(["inventory.change_dealer_type"]):
field = form.fields["dealer_type"]
field.widget = field.hidden_widget()
form.fields["dealer_type"].choices = [
t for t in form.fields["dealer_type"].choices if t[0] != "Owner"
]
return form
def form_valid(self, form):
user = form.instance.user
for group in user.groups.all():
group.user_set.remove(user)
Group.objects.get(name=form.cleaned_data["dealer_type"].lower()).user_set.add(
Group.objects.get(name=form.cleaned_data["staff_type"].lower()).user_set.add(
user
)
form.save()
@ -1222,7 +1201,7 @@ class UserUpdateView(
def UserDeleteview(request, pk):
user = get_object_or_404(models.Dealer, pk=pk)
user = get_object_or_404(models.Staff, pk=pk)
user.delete()
messages.success(request, _("User deleted successfully."))
return redirect("user_list")
@ -1249,6 +1228,8 @@ class OrganizationListView(LoginRequiredMixin, ListView):
model = models.Organization
template_name = "organizations/organization_list.html"
context_object_name = "organizations"
paginate_by = 10
class OrganizationDetailView(DetailView):
@ -1266,7 +1247,7 @@ class OrganizationCreateView(LoginRequiredMixin, SuccessMessageMixin, CreateView
def form_valid(self, form):
if form.is_valid():
form.instance.dealer = self.request.user.dealer.get_root_dealer
form.instance.dealer = self.request.user.dealer
form.save()
return super().form_valid(form)
else:
@ -1309,7 +1290,7 @@ class RepresentativeCreateView(LoginRequiredMixin, SuccessMessageMixin, CreateVi
def form_valid(self, form):
if form.is_valid():
form.instance.dealer = self.request.user.dealer.get_root_dealer
form.instance.dealer = self.request.user.dealer
form.save()
return super().form_valid(form)
else:
@ -1382,7 +1363,7 @@ def download_quotation_pdf(request, quotation_id):
@login_required
def invoice_detail(request,pk):
quotation = get_object_or_404(models.SaleQuotation, pk=pk)
dealer = request.user.dealer.get_root_dealer
dealer = request.user.dealer
entity = dealer.entity
customer = entity.get_customers().filter(customer_name=quotation.customer.get_full_name).first()
invoice_model = entity.get_invoices()
@ -1395,7 +1376,7 @@ def invoice_detail(request,pk):
@login_required
def payment_invoice(request,pk):
quotation = get_object_or_404(models.SaleQuotation, pk=pk)
dealer = request.user.dealer.get_root_dealer
dealer = request.user.dealer
entity = dealer.entity
customer = entity.get_customers().filter(customer_name=quotation.customer.get_full_name).first()
invoice_model = entity.get_invoices()
@ -1425,14 +1406,14 @@ def payment_invoice(request,pk):
def payment_create(request, pk):
quotation = get_object_or_404(models.SaleQuotation, pk=pk)
dealer = request.user.dealer.get_root_dealer
dealer = request.user.dealer
if request.method == "POST":
form = forms.PaymentForm(request.POST)
if form.is_valid():
form.instance.quotation = quotation
insatnce = form.save()
dealer = request.user.dealer.get_root_dealer
dealer = request.user.dealer
entity = dealer.entity
customer = entity.get_customers().filter(customer_name=quotation.customer.get_full_name).first()
coa_qs, coa_map = entity.get_all_coa_accounts()
@ -1461,7 +1442,7 @@ def payment_create(request, pk):
invoice_model = entity.get_invoices().filter(date_approved=quotation.date_approved).first()
invoice_model.mark_as_paid(entity_slug=entity.slug, user_model=request.user.dealer.get_root_dealer.user)
invoice_model.mark_as_paid(entity_slug=entity.slug, user_model=request.user.dealer)
date = timezone.now()
invoice_model.date_paid = date
quotation.date_paid = date
@ -1550,11 +1531,15 @@ class AccountListView(LoginRequiredMixin, ListView):
model = AccountModel
template_name = "ledger/coa_accounts/account_list.html"
context_object_name = "accounts"
paginate_by = 10
def get_queryset(self):
entity = self.request.user.dealer.entity
qs = entity.get_all_accounts()
return qs
paginator = Paginator(qs,10)
page_number = self.request.GET.get('page', 1) # Default to page 1
page_obj = paginator.get_page(page_number)
return page_obj
class AccountCreateView(LoginRequiredMixin, SuccessMessageMixin, CreateView):
@ -1785,4 +1770,17 @@ class EstimatePreviewView(LoginRequiredMixin, DetailView):
kwargs["vate_amount"] = (total * vat.vat_rate)
kwargs["total"] = (total * vat.vat_rate) + total
kwargs["vat"] = vat.rate
return super().get_context_data(**kwargs)
return super().get_context_data(**kwargs)
class UserActivityLogListView(ListView):
model = models.UserActivityLog
template_name = 'dealers/activity_log.html'
context_object_name = 'logs'
paginate_by = 10
def get_queryset(self):
queryset = super().get_queryset()
if 'user' in self.request.GET:
queryset = queryset.filter(user__email=self.request.GET['user'])
return queryset

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -754,7 +754,7 @@
color:
getItemFromStore('phoenixTheme') === 'dark'
? getColor('primary')
: getColor('primary')
: getColor('primary-light')
},
data: profitData[0]
},
@ -772,7 +772,7 @@
color:
getItemFromStore('phoenixTheme') === 'dark'
? getColor('success')
: getColor('success')
: getColor('success-light')
},
data: revenueData[0]
},
@ -788,7 +788,7 @@
color:
getItemFromStore('phoenixTheme') === 'dark'
? getColor('info')
: getColor('info')
: getColor('info-light')
},
data: expansesData[0]
}

BIN
templates/.DS_Store vendored

Binary file not shown.

View File

@ -1,4 +1,4 @@
{% extends "base.html" %}
{% extends "auth_base.html" %}
{% load crispy_forms_filters %}
{% load i18n static %}
@ -70,7 +70,7 @@
<div class="d-flex pager wizard list-inline mb-0">
<button class="d-none btn btn-link ps-0" type="button" data-wizard-prev-btn="data-wizard-prev-btn">{% trans 'Previous' %}</button>
<div class="flex-1 text-end">
<button class="btn btn-primary px-6 px-sm-6" type="submit" data-wizard-next-btn="data-wizard-next-btn">{% trans 'Next' %}</button>
<button class="btn btn-phoenix-primary px-6 px-sm-6" type="submit" data-wizard-next-btn="data-wizard-next-btn">{% trans 'Next' %}</button>
</div>
</div>
</div>

229
templates/auth_base.html Normal file
View File

@ -0,0 +1,229 @@
{% load static %} {% load i18n %}
<!DOCTYPE html>
{% get_current_language as LANGUAGE_CODE %}
<html lang="{{ LANGUAGE_CODE }}"
dir="{% if LANGUAGE_CODE == 'ar' %}rtl{% else %}ltr{% endif %}"
data-bs-theme=""
data-navigation-type="default"
data-navbar-horizontal-shape="default">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Haikal - The Backbone of Car Qar: An innovative car inventory management system designed to streamline dealership operations. Manage inventory, sales, transfers, and accounting seamlessly with advanced analytics and intuitive tools. Inspired by Arabic origins, Haikal empowers businesses with precision and efficiency.">
<title>{% block title %}{% trans 'HAIKAL' %}{% endblock %}</title>
<link rel="apple-touch-icon" sizes="180x180" href="{% static 'images/favicons/apple-touch-icon.png' %}">
<link rel="icon" type="image/png" sizes="32x32" href="{% static 'images/favicons/favicon-32x32.png' %}">
<link rel="icon" type="image/png" sizes="16x16" href="{% static 'images/favicons/favicon-16x16.png' %}">
<link rel="shortcut icon" type="image/x-icon" href="{% static 'images/favicons/favicon.ico' %}">
<link rel="manifest" href="{% static 'images/favicons/manifest.json' %}">
<meta name="msapplication-TileImage" content="{% static 'images/logos/logo-d.png' %}">
<meta name="theme-color" content="#ffffff">
<script src="{% static 'vendors/simplebar/simplebar.min.js' %}"></script>
<script src="{% static 'js/config.js' %}"></script>
<script src="{% static 'js/sweetalert2.all.min.js' %}"></script>
<!-- ===============================================-->
<!-- Stylesheets-->
<!-- ===============================================-->
<link href="{% static 'vendors/mapbox-gl/mapbox-gl.css' %}" rel="stylesheet">
<link href="{% static 'vendors/swiper/swiper-bundle.min.css' %}" rel="stylesheet">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="">
<link href="https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@300;400;600;700;800;900&amp;display=swap" rel="stylesheet">
<link href="{% static 'vendors/simplebar/simplebar.min.css' %}" rel="stylesheet">
<link href="{% static 'css/sweetalert2.min.css' %}" rel="stylesheet">
<link rel="stylesheet" href="https://unicons.iconscout.com/release/v4.0.8/css/line.css">
{% if LANGUAGE_CODE == 'en' %}
<link href="{% static 'css/theme.min.css' %}" type="text/css" rel="stylesheet" id="style-default">
<link href="{% static 'css/user.min.css' %}" type="text/css" rel="stylesheet" id="user-style-default">
{% else %}
<link href="{% static 'css/theme-rtl.min.css' %}" type="text/css" rel="stylesheet" id="style-rtl">
<link href="{% static 'css/user-rtl.min.css' %}" type="text/css" rel="stylesheet" id="user-style-rtl">
{% endif %}
</head>
<body>
{% include 'messages.html' %}
<main class="main" id="top">
<div class="content">
{% block content %}
<!-- Main content goes here -->
{% endblock %}
</div>
</main>
<!-- ===============================================-->
<!-- End of Main Content-->
<!-- ===============================================-->
<script>
</script>
{% block extra_js %}{% endblock extra_js %}
<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;
const totalCost = quantity * unitCost;
const totalRevenue = quantity * unitSalesPrice;
container.querySelector('.totalCost').value = totalCost.toFixed(2);
container.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));
});
}
// Add new form fields
document.getElementById('addMoreBtn').addEventListener('click', function(e) {
e.preventDefault();
const formContainer = document.getElementById('formContainer');
const newForm = document.createElement('div');
newForm.className = 'form-container row g-3 mb-3 mt-5';
newForm.innerHTML = `
<div class="mb-2 col-sm-2">
<select class="form-control item" name="item[]" required>
{% for item in items %}
<option value="{{ item.pk }}">{{ item.name }}</option>
{% endfor %}
</select>
</div>
<div class="mb-2 col-sm-2">
<input class="form-control quantity" type="number" placeholder="Quantity" name="quantity[]" required>
</div>
<div class="mb-2 col-sm-2">
<input class="form-control unitCost" type="number" placeholder="Unit Cost" name="unitCost[]" step="0.01" required>
</div>
<div class="mb-2 col-sm-2">
<input class="form-control unitSalesPrice" type="number" placeholder="Unit Sales Price" name="unitSalesPrice[]" step="0.01" required>
</div>
<div class="mb-2 col-sm-2">
<input class="form-control totalCost" type="number" placeholder="Total Cost" name="totalCost[]" readonly>
</div>
<div class="mb-2 col-sm-1">
<input class="form-control totalRevenue" type="number" placeholder="Total Revenue" name="totalRevenue[]" readonly>
</div>
<div class="mb-2 col-sm-1">
<button class="btn btn-danger removeBtn">Remove</button>
</div>
`;
formContainer.appendChild(newForm);
addInputListeners(newForm); // Add listeners to the new form
// Add remove button functionality
newForm.querySelector('.removeBtn').addEventListener('click', function() {
newForm.remove();
});
});
// Add listeners to the initial form
document.querySelectorAll('.form-container').forEach(container => {
addInputListeners(container);
// Add remove button functionality to the initial form
container.querySelector('.removeBtn').addEventListener('click', function() {
container.remove();
});
});
document.getElementById('mainForm').addEventListener('submit', function(e) {
e.preventDefault();
// Collect all form data
const formData = new FormData(this);
const csrfToken = getCookie('csrftoken');
const data = {};
formData.forEach((value, key) => {
// Handle multi-value fields (e.g., item[], quantity[])
if (data[key]) {
if (!Array.isArray(data[key])) {
data[key] = [data[key]]; // Convert to array
}
data[key].push(value);
} else {
data[key] = value;
}
});
// Send data to the server using fetch
fetch('http://10.10.1.120:8888/en/sales/estimates/create/', {
method: 'POST',
body: formData,
headers: {
'X-CSRFToken': csrfToken,
'Content-Type': 'application/json',
},
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => {
console.log('Success:', data);
if(data.status == "error"){
notify("error",data.message);
}
else{
notify("success","Estimate created successfully");
setTimeout(() => {
window.location.href = data.url;
}, 1000);
}
})
.catch(error => {
console.error('Error:', error);
notify("error",error);
alert('An error occurred while submitting the form.');
});
});
</script>
<!-- ===============================================-->
<!-- JavaScripts-->
<!-- ===============================================-->
<script src="{% static 'vendors/popper/popper.min.js' %}"></script>
<script src="{% static 'vendors/bootstrap/bootstrap.min.js' %}"></script>
<script src="{% static 'vendors/anchorjs/anchor.min.js' %}"></script>
<script src="{% static 'vendors/is/is.min.js' %}"></script>
<script src="{% static 'vendors/fontawesome/all.min.js' %}"></script>
<script src="{% static 'vendors/lodash/lodash.min.js' %}"></script>
<script src="{% static 'vendors/list.js/list.min.js' %}"></script>
<script src="{% static 'vendors/feather-icons/feather.min.js' %}"></script>
<script src="{% static 'vendors/dayjs/dayjs.min.js' %}"></script>
<script src="{% static 'js/phoenix.js' %}"></script>
<script src="{% static 'vendors/echarts/echarts.min.js' %}"></script>
<script src="{% static 'js/travel-agency-dashboard.js' %}"></script>
<script src="{% static 'vendors/mapbox-gl/mapbox-gl.js' %}"></script>
<script src="https://unpkg.com/@turf/turf@6/turf.min.js"></script>
<script src="{% static 'vendors/swiper/swiper-bundle.min.js' %}"></script>
</body>
</html>

View File

@ -107,7 +107,7 @@
<!-- parent pages-->
<div class="nav-item-wrapper"><a class="nav-link dropdown-indicator label-1" href="#nv-inventory" role="button" data-bs-toggle="collapse" aria-expanded="false" aria-controls="nv-inventory">
<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="truck"></span></span><span class="nav-link-text">{% trans "Inventory"|capfirst %}</span>
<div class="dropdown-indicator-icon-wrapper"><span class="fas fa-caret-right dropdown-indicator-icon"></span></div><span class="nav-link-icon"><span class="fas fa-warehouse"></span></span><span class="nav-link-text">{% trans "Inventory"|capfirst %}</span>
</div>
</a>
<div class="parent-wrapper label-1">
@ -115,13 +115,13 @@
<li class="collapsed-nav-item-title d-none">{% trans "Inventory"|capfirst %}
</li>
<li class="nav-item"><a class="nav-link" href="{% url 'car_add' %}">
<div class="d-flex align-items-center"><span class="nav-link-text">{% trans "add car"|capfirst %}</span>
<div class="d-flex align-items-center"><span class="nav-link-icon"><span class="fas fa-plus-circle"></span></span><span class="nav-link-text">{% trans "add car"|capfirst %}</span>
</div>
</a>
<!-- more inner pages-->
</li>
<li class="nav-item"><a class="nav-link" href="{% url 'inventory_stats' %}">
<div class="d-flex align-items-center"><span class="nav-link-text">{% trans 'Cars'|capfirst %}</span>
<div class="d-flex align-items-center"><span class="nav-link-icon"><span class="fas fa-car-side"></span></span><span class="nav-link-text">{% trans 'Cars'|capfirst %}</span>
</div>
</a>
<!-- more inner pages-->
@ -130,91 +130,9 @@
</div>
</div>
<!-- parent pages-->
<div class="nav-item-wrapper"><a class="nav-link dropdown-indicator label-1" href="#nv-vendors" role="button" data-bs-toggle="collapse" aria-expanded="false" aria-controls="nv-vendors">
<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="package"></span></span><span class="nav-link-text">{% trans 'vendors'|capfirst %}</span>
</div>
</a>
<div class="parent-wrapper label-1">
<ul class="nav collapse parent" data-bs-parent="#navbarVerticalCollapse" id="nv-vendors">
<li class="collapsed-nav-item-title d-none">{% trans 'vendors'|capfirst %}
</li>
<li class="nav-item"><a class="nav-link" href="{% url 'vendor_create' %}">
<div class="d-flex align-items-center"><span class="nav-link-text">{% trans "add vendor"|capfirst %}</span>
</div>
</a>
<!-- more inner pages-->
</li>
<li class="nav-item"><a class="nav-link" href="{% url 'vendor_list' %}">
<div class="d-flex align-items-center"><span class="nav-link-text">{% trans 'vendors'|capfirst %}</span>
</div>
</a>
<!-- more inner pages-->
</li>
</ul>
</div>
</div> <!-- parent pages-->
<div class="nav-item-wrapper"><a class="nav-link dropdown-indicator label-1" href="#nv-customers" role="button" data-bs-toggle="collapse" aria-expanded="false" aria-controls="nv-customers">
<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="users"></span></span><span class="nav-link-text">{% trans 'customers'|capfirst %}</span>
</div>
</a>
<div class="parent-wrapper label-1">
<ul class="nav collapse parent" data-bs-parent="#navbarVerticalCollapse" id="nv-customers">
<li class="collapsed-nav-item-title d-none">{% trans 'customers'|capfirst %}
</li>
<li class="nav-item"><a class="nav-link" href="{% url 'customer_create' %}">
<div class="d-flex align-items-center"><span class="nav-link-text">{% trans "add customer"|capfirst %}</span>
</div>
</a>
<!-- more inner pages-->
</li>
<li class="nav-item"><a class="nav-link" href="{% url 'customer_list' %}">
<div class="d-flex align-items-center"><span class="nav-link-text">{% trans 'customers'|capfirst %}</span>
</div>
</a>
<!-- more inner pages-->
</li>
</ul>
</div>
</div>
<!-- parent pages-->
<div class="nav-item-wrapper"><a class="nav-link dropdown-indicator label-1" href="#nv-organizations" role="button" data-bs-toggle="collapse" aria-expanded="false" aria-controls="nv-organizations">
<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="activity"></span></span><span class="nav-link-text">{% trans 'organizations'|capfirst %}</span>
</div>
</a>
<div class="parent-wrapper label-1">
<ul class="nav collapse parent" data-bs-parent="#navbarVerticalCollapse" id="nv-organizations">
<li class="collapsed-nav-item-title d-none">{% trans 'organizations'|capfirst %}
</li>
<li class="nav-item"><a class="nav-link" href="{% url 'organization_create' %}">
<div class="d-flex align-items-center"><span class="nav-link-text">{% trans "add organization"|capfirst %}</span>
</div>
</a>
<!-- more inner pages-->
</li>
<li class="nav-item"><a class="nav-link" href="{% url 'organization_list' %}">
<div class="d-flex align-items-center"><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_create' %}">
<div class="d-flex align-items-center"><span class="nav-link-text">{% trans "Add Representative"|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-text">{% trans "Representatives"|capfirst %}</span>
</div>
</a>
<!-- more inner pages-->
</li>
</ul>
</div>
</div>
<!-- parent pages-->
<div class="nav-item-wrapper"><a class="nav-link dropdown-indicator label-1" href="#nv-sales" role="button" data-bs-toggle="collapse" aria-expanded="false" aria-controls="nv-sales">
<div class="d-flex align-items-center">
@ -225,32 +143,54 @@
<ul class="nav collapse parent" data-bs-parent="#navbarVerticalCollapse" id="nv-sales">
<li class="collapsed-nav-item-title d-none">{% trans 'sales'|capfirst %}
</li>
<li class="nav-item"><a class="nav-link" href="{% url 'quotation_create' %}">
<div class="d-flex align-items-center"><span class="nav-link-text">{% trans "create quotation"|capfirst %}</span>
<li class="nav-item"><a class="nav-link" href="{% url 'vendor_list' %}">
<div class="d-flex align-items-center"><span class="nav-link-icon"><span data-feather="package"></span></span><span class="nav-link-text">{% trans 'vendors'|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 'quotation_list' %}">
<div class="d-flex align-items-center"><span class="nav-link-text">{% trans "quotations"|capfirst %}</span>
<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"><span class="nav-link-icon"><span class="fas fa-list-ul"></span></span><span class="nav-link-text">{% trans "create quotation"|capfirst %}</span>
</div>
</a>
<!-- more inner pages-->
</li>
<li class="nav-item"><a class="nav-link" href="{% url 'estimate_list' %}">
<div class="d-flex align-items-center"><span class="nav-link-icon"><span class="fas fa-clipboard-list"></span></span><span class="nav-link-text">{% trans "quotations"|capfirst %}</span>
</div>
</a>
<!-- more inner pages-->
</li>
<li class="nav-item"><a class="nav-link" href="#">
<div class="d-flex align-items-center"><span class="nav-link-text">{% trans "orders"|capfirst %}</span>
<div class="d-flex align-items-center"><span class="nav-link-icon"><span class="fas fa-cart-plus"></span></span><span class="nav-link-text">{% trans "orders"|capfirst %}</span>
</div>
</a>
<!-- more inner pages-->
</li>
<li class="nav-item"><a class="nav-link" href="#">
<div class="d-flex align-items-center"><span class="nav-link-text">{% trans "invoices"|capfirst %}</span>
<div class="d-flex align-items-center"><span class="nav-link-icon"><span class="fas fa-file-invoice"></span></span><span class="nav-link-text">{% trans "invoices"|capfirst %}</span>
</div>
</a>
<!-- more inner pages-->
</li>
<li class="nav-item"><a class="nav-link" href="#">
<div class="d-flex align-items-center"><span class="nav-link-text">{% trans "payments"|capfirst %}</span>
<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 "payments"|capfirst %}</span>
</div>
</a>
<!-- more inner pages-->
@ -419,9 +359,9 @@
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="languageDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false" data-bs-auto-close="outside" aria-haspopup="true">
{% if request.LANGUAGE_CODE == 'ar' %}
<i class="bi bi-globe"></i><span class="ms-1">اللغة</span>
<span class="me-1 text-body" data-feather="globe"></span><span class="ms-1">اللغة</span>
{% else %}
<i class="bi bi-globe"></i><span class="ms-1">Language</span>
<span class="me-1 text-body" data-feather="globe"></span><span class="ms-1">Language</span>
{% endif %}
</a>
<div class="dropdown-menu dropdown-menu-end navbar-dropdown-caret py-0 dropdown-profile shadow border" aria-labelledby="languageDropdown">
@ -441,7 +381,7 @@
</div>
</div>
</li>
{% if user.is_authenticated and user.dealer or user.subdealer%}
{% if user.is_authenticated and user.dealer or user.staff%}
<li class="nav-item dropdown"><a class="nav-link lh-1 pe-0" id="navbarDropdownUser" role="button" data-bs-toggle="dropdown" data-bs-auto-close="outside" aria-haspopup="true" aria-expanded="false">
<div class="avatar avatar-l ">
{% if user.dealer.logo %}
@ -465,11 +405,11 @@
<div class="overflow-auto scrollbar" style="height: 10rem;">
<ul class="nav d-flex flex-column mb-2 pb-1">
<li class="nav-item"><a class="nav-link px-3 d-block" href="{% url 'dealer_detail' user.dealer.pk %}"> <span class="me-2 text-body align-bottom" data-feather="user"></span><span>{% translate 'profile'|capfirst %}</span></a></li>
<li class="nav-item"><a class="nav-link px-3 d-block" href="#!"><span class="me-2 text-body align-bottom" data-feather="pie-chart"></span>Dashboard</a></li>
<li class="nav-item"><a class="nav-link px-3 d-block" href="#!"> <span class="me-2 text-body align-bottom" data-feather="lock"></span>Posts &amp; Activity</a></li>
<li class="nav-item"><a class="nav-link px-3 d-block" href="{% url 'user_list' %}"><span class="me-2 text-body align-bottom" data-feather="users"></span>{{ _("Staff") }}</a></li>
<li class="nav-item"><a class="nav-link px-3 d-block" href="{% url 'dealer_activity' %}"> <span class="me-2 text-body align-bottom" data-feather="lock"></span>{{ _("Activity") }}</a></li>
<li class="nav-item"><a class="nav-link px-3 d-block" href="#!"> <span class="me-2 text-body align-bottom" data-feather="settings"></span>Settings &amp; Privacy </a></li>
<li class="nav-item"><a class="nav-link px-3 d-block" href="#!"> <span class="me-2 text-body align-bottom" data-feather="help-circle"></span>Help Center</a></li>
<li class="nav-item"><a class="nav-link px-3 d-block" href="#!"> <span class="me-2 text-body align-bottom" data-feather="globe"></span>Language</a></li>
<li class="nav-item"><a class="nav-link px-3 d-block" href="#!"> Language</a></li>
</ul>
</div>
<div class="card-footer p-0 border-top border-translucent">

View File

@ -1,39 +1,46 @@
{% extends "base.html" %}
{% load i18n %}
{% load crispy_forms_filters %}
{% block title %}{% trans "customers" %}{% endblock title %}
{% block title %}{% trans "Customers" %}{% endblock title %}
{% block content %}
<div class="container my-5">
<!-- Display Form Errors -->
<div class="card shadow rounded">
<div class="card-header bg-primary text-white">
<p class="mb-0">
<div class="container">
<div class="row">
<div class="col-sm-9">
<div class="d-sm-flex justify-content-between">
<h3 class="mb-3">
{% if customer.created %}
<!--<i class="bi bi-pencil-square"></i>-->
{{ _("Edit Customer") }}
{% else %}
<!--<i class="bi bi-person-plus"></i> -->
{{ _("Add Customer") }}
{% endif %}
</p>
</div>
<div class="card-body">
<form method="post" class="form" novalidate>
</h3>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-9">
<form class="row g-3 mb-9" method="post" class="form" novalidate>
{% csrf_token %}
{{ redirect_field }}
{{ form|crispy }}
{% for error in form.errors %}
<div class="text-danger">{{ error }}</div>
{% endfor %}
<div class="d-flex justify-content-end">
<button class="btn btn-sm btn-success me-1" type="submit">
<div class="d-flex mb-3">
<a href="{{request.META.HTTP_REFERER}}" class="btn btn-phoenix-primary me-2 px-6">{% trans "cancel"|capfirst %}</a>
<button class="btn btn-primary" type="submit">
<!--<i class="bi bi-save"></i> -->
{{ _("Save") }}
</button>
<a href="{{request.META.HTTP_REFERER}}" class="btn btn-sm btn-danger">{% trans "Cancel" %}</a>
</div>
</form>
</div>
</div>
</div>
</div>
{% endblock %}

View File

@ -1,130 +1,183 @@
{% extends "base.html" %}
{% extends 'base.html' %}
{% load i18n %}
{% block title %}{% trans "Customers" %}{% endblock title %}
{% block customers %}
<a class="nav-link active fw-bold">
{% trans "Customers"|capfirst %}
<span class="visually-hidden">(current)</span>
</a>
{% endblock %}
{% load static %}
{% block title %}{{ _('Customers')|capfirst }}{% endblock title %}
{% block vendors %}<a class="nav-link active">{{ _("Customers")|capfirst }}</a>{% endblock %}
{% block content %}
<div class="d-flex flex-column min-vh-100">
<div class="d-flex flex-column flex-sm-grow-1 ms-sm-14 p-4">
<main class="d-grid gap-4 p-1">
<!-- Search Bar -->
<div class="row g-4">
<div class="col-12">
<div class="container-fluid p-2">
<form method="get">
<div class="input-group input-group-sm">
<button class="btn btn-sm btn-secondary rounded-start" type="submit">
{% trans "search" %}
</button>
<input type="text"
name="q"
class="form-control form-control-sm rounded-end"
value="{{ request.GET.q }}"
placeholder="{% trans 'Search customers...' %}" />
{% if request.GET.q %}
<a href="{% url request.resolver_match.view_name %}"
class="btn btn-sm btn-outline-danger ms-1 rounded">
<i class="bi bi-x-lg"></i>
</a>
{% endif %}
</div>
</form>
</div>
<section class="pt-5 pb-9">
<div class="container">
<h2 class="mb-4">{{ _("Customers")|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">
<input name="q" class="form-control search-input search" type="search" placeholder="{{ _('Enter customer name') }}" aria-label="Search" value="{{ request.GET.q }}"/>
<span class="fas fa-search search-box-icon"></span>
{% if request.GET.q %}
<a href="{% url request.resolver_match.view_name %}" class="btn btn-outline-danger ms-1">
<i class="bi bi-x-lg"></i>
</a>
{% 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 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="leal-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>
<!-- Customer Table -->
<div class="row g-4">
<div class="col-12">
<div class="card">
<div class="card-header bg-primary text-white">
<h5 class="mb-0">{% trans "Customers List" %}</h5>
</div>
<div class="card-body p-0">
<table class="table table-hover table-sm mb-0">
<thead class="table-light">
<tr>
<th>{% trans "First Name" %}</th>
<th>{% trans "Middle Name" %}</th>
<th>{% trans "Last Name" %}</th>
<th>{% trans "National ID" %}</th>
<th class="text-center">{% trans "Actions" %}</th>
</tr>
</thead>
<tbody>
{% for customer in customers %}
<tr>
<td>{{ customer.first_name }}</td>
<td>{{ customer.middle_name }}</td>
<td>{{ customer.last_name }}</td>
<td>{{ customer.national_id }}</td>
<td class="text-center">
<a href="{% url 'customer_detail' customer.id %}"
class="btn btn-sm btn-success">
{% trans "view" %}
</a>
</td>
</tr>
{% empty %}
<tr>
<td colspan="5" class="text-center text-muted">
{% trans "No customers found." %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<!-- Pagination -->
{% if is_paginated %}
<div class="card-footer bg-light">
<nav aria-label="Page navigation">
<ul class="pagination pagination-sm justify-content-center mb-0">
{% if page_obj.has_previous %}
<li class="page-item">
<a class="page-link" href="?page={{ page_obj.previous_page_number }}" aria-label="{% trans 'Previous' %}">
<span aria-hidden="true">&laquo;</span>
</a>
</li>
{% else %}
<li class="page-item disabled">
<span class="page-link" aria-hidden="true">&laquo;</span>
</li>
{% endif %}
{% for num in page_obj.paginator.page_range %}
{% if page_obj.number == num %}
<li class="page-item active">
<span class="page-link">{{ num }}</span>
</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="{% trans 'Next' %}">
<span aria-hidden="true">&raquo;</span>
</a>
</li>
{% else %}
<li class="page-item disabled">
<span class="page-link" aria-hidden="true">&raquo;</span>
</li>
{% endif %}
</ul>
</nav>
</div>
{% endif %}
</div>
</div>
</div>
</main>
</div>
</div>
</div>
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
<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>
<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>
</section>
{% endblock %}

View File

@ -1,10 +1,10 @@
{% extends "base.html" %}
{% load i18n %}
{% load i18n static %}
{% block title %}{{ _("View Customer") }}{% endblock title %}
{% block content %}
<!-- Delete Modal -->
<!-- Delete Modal -->
<div class="modal fade" id="deleteModal"
data-bs-backdrop="static"
data-bs-keyboard="false"
@ -19,7 +19,7 @@
{% trans "Are you sure you want to delete this customer?" %}
</span>
</div>
<div class="btn-group">
<div class="btn-group btn-group-sm">
<button type="button"
class="btn btn-sm btn-secondary"
data-bs-dismiss="modal">
@ -34,44 +34,189 @@
</div>
</div>
</div>
<!-- Delete Modal -->
<div class="container my-5">
<div class="card rounded ">
<div class="card-header bg-primary text-white ">
<p class="mb-0">{{ _("Customer Details") }}</p>
</div>
<div class="card-body">
<div class="row">
<div class="col-md-6">
<p><strong>{{ _("First Name") }}:</strong> {{ customer.first_name }}</p>
<p><strong>{{ _("Middle Name") }}:</strong> {{ customer.middle_name }}</p>
<p><strong>{{ _("Last Name") }}:</strong> {{ customer.last_name }}</p>
</div>
<div class="col-md-6">
<p><strong>{{ _("Email") }}:</strong> {{ customer.email }}</p>
<p><strong>{{ _("National ID") }}:</strong> {{ customer.national_id }}</p>
<p><strong>{{ _("Phone Number") }}:</strong> {{ customer.phone_number }}</p>
<p><strong>{{ _("Address") }}:</strong> {{ customer.address }}</p>
</div>
<div class="container">
<div class="mb-9">
<div class="row align-items-center justify-content-between g-3 mb-4">
<div class="col-auto">
<h3 class="mb-0">{% trans 'Customer details' %}</h3>
</div>
<div class="col-auto">
<div class="row g-3">
<div class="col-auto">
<a class="btn btn-phoenix-danger"
data-bs-toggle="modal"
data-bs-target="#deleteModal"><span class="fa-solid fa-trash-can me-2"></span>{{ _("Delete") }}</a>
</div>
<div class="col-auto">
<a href="{% url 'customer_update' customer.id %}" class="btn btn-phoenix-secondary"><span class="fa-solid fa-pen-to-square me-2"></span>{{_("Update")}}</a>
</div>
</div>
</div>
</div>
<div class="row g-5">
<div class="col-12 col-xxl-4">
<div class="row g-3 h-100">
<div class="col-12 col-md-7 col-xxl-12">
<div class="card h-100 h-xxl-auto">
<div class="card-body d-flex flex-column justify-content-between pb-3">
<div class="row align-items-center g-5 mb-3 text-center text-sm-start">
<div class="col-12 col-sm-auto mb-sm-2">
<div class="avatar avatar-5xl"><img class="rounded-circle" src=".{% static 'images/team/15.webp' %}" alt="" /></div>
</div>
<div class="col-12 col-sm-auto flex-1">
<h3>{{ customer.first_name }} {{ customer.middle_name }} {{ customer.last_name }}</h3>
<p class="text-body-secondary">{{ customer.created|timesince}}</p>
<div><a class="me-2" href="#!"><span class="fab fa-linkedin-in text-body-quaternary text-opacity-75 text-primary-hover"></span></a><a class="me-2" href="#!"><span class="fab fa-facebook text-body-quaternary text-opacity-75 text-primary-hover"></span></a><a href="#!"><span class="fab fa-twitter text-body-quaternary text-opacity-75 text-primary-hover"></span></a></div>
</div>
</div>
<div class="d-flex flex-between-center border-top border-dashed pt-4">
<div>
<h6>{% trans 'Visits' %}</h6>
<p class="fs-7 text-body-secondary mb-0">23</p>
</div>
<div>
<h6>{% trans 'Calls' %}</h6>
<p class="fs-7 text-body-secondary mb-0">9</p>
</div>
<div>
<h6>{% trans 'Quotations' %}</h6>
<p class="fs-7 text-body-secondary mb-0">5</p>
</div>
</div>
</div>
</div>
</div>
<div class="col-12 col-md-5 col-xxl-12">
<div class="card">
<div class="card-body">
<div class="d-flex align-items-center mb-3">
<h3 class="me-1">{% trans 'Default Address' %}</h3>
<button class="btn btn-link p-0"><span class="fas fa-pen fs-8 ms-3 text-body-quaternary"></span></button>
</div>
<h5 class="text-body-secondary">{{ _("Address") }}</h5>
<p class="text-body-secondary">{{ customer.address}}<br />Riyadh,<br />Saudi Arabia</p>
<div class="mb-3">
<h5 class="text-body-secondary">{% trans 'Email' %}</h5><a href="{{ customer.email}}">{{ customer.email }}</a>
</div>
<h5 class="text-body-secondary">{% trans 'Phone Number' %}</h5><a class="text-body-secondary" href="{{ customer.phone_number }}">{{ customer.phone_number }}</a>
</div>
</div>
</div>
<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>
</div>
</div>
</div>
</div>
<div class="col-12 col-xxl-8">
<div class="mb-6">
<h3 class="mb-4">{{ _("Cars") }} <span class="text-body-tertiary fw-normal">(4)</span></h3>
<div class="border-top border-bottom border-translucent" id="customerOrdersTable" data-list='{"valueNames":["order","total","payment_status","fulfilment_status","delivery_type","date"],"page":6,"pagination":true}'>
<div class="table-responsive scrollbar">
<table class="table table-sm fs-9 mb-0">
<thead>
<tr>
<th class="sort white-space-nowrap align-middle ps-0 pe-3" scope="col" data-sort="order" style="width:10%;">ORDER</th>
<th class="sort align-middle text-end pe-7" scope="col" data-sort="total" style="width:10%;">TOTAL</th>
<th class="sort align-middle white-space-nowrap pe-3" scope="col" data-sort="payment_status" style="width:15%;">PAYMENT STATUS</th>
<th class="sort align-middle white-space-nowrap text-start pe-3" scope="col" data-sort="fulfilment_status" style="width:20%;">FULFILMENT STATUS</th>
<th class="sort align-middle white-space-nowrap text-start" scope="col" data-sort="delivery_type" style="width:30%;">DELIVERY TYPE</th>
<th class="sort align-middle text-end pe-0" scope="col" data-sort="date">DATE</th>
<th class="sort text-end align-middle pe-0 ps-5" scope="col"></th>
</tr>
</thead>
<tbody class="list" id="customer-order-table-body">
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
<td class="order align-middle white-space-nowrap ps-0"><a class="fw-semibold" href="#!">#2453</a></td>
<td class="total align-middle text-end fw-semibold pe-7 text-body-highlight">$87</td>
<td class="payment_status align-middle white-space-nowrap text-start fw-bold text-body-tertiary"><span class="badge badge-phoenix fs-10 badge-phoenix-success"><span class="badge-label">Paid</span><span class="ms-1" data-feather="check" style="height:12.8px;width:12.8px;"></span></span></td>
<td class="fulfilment_status align-middle white-space-nowrap text-start fw-bold text-body-tertiary"><span class="badge badge-phoenix fs-10 badge-phoenix-success"><span class="badge-label">Order Fulfilled</span><span class="ms-1" data-feather="check" style="height:12.8px;width:12.8px;"></span></span></td>
<td class="delivery_type align-middle white-space-nowrap text-body fs-9 text-start">Cash on delivery</td>
<td class="date align-middle white-space-nowrap text-body-tertiary fs-9 ps-4 text-end">Dec 12, 12:56 PM</td>
<td class="align-middle white-space-nowrap text-end pe-0 ps-5">
<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 class="dropdown-item" href="#!">View</a><a class="dropdown-item" href="#!">Export</a>
<div class="dropdown-divider"></div><a class="dropdown-item text-danger" href="#!">Remove</a>
</div>
</div>
</td>
</tr>
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
<td class="order align-middle white-space-nowrap ps-0"><a class="fw-semibold" href="#!">#2452</a></td>
<td class="total align-middle text-end fw-semibold pe-7 text-body-highlight">$7264</td>
<td class="payment_status align-middle white-space-nowrap text-start fw-bold text-body-tertiary"><span class="badge badge-phoenix fs-10 badge-phoenix-secondary"><span class="badge-label">Cancelled</span><span class="ms-1" data-feather="x" style="height:12.8px;width:12.8px;"></span></span></td>
<td class="fulfilment_status align-middle white-space-nowrap text-start fw-bold text-body-tertiary"><span class="badge badge-phoenix fs-10 badge-phoenix-info"><span class="badge-label">Ready to pickup</span><span class="ms-1" data-feather="info" style="height:12.8px;width:12.8px;"></span></span></td>
<td class="delivery_type align-middle white-space-nowrap text-body fs-9 text-start">Free shipping</td>
<td class="date align-middle white-space-nowrap text-body-tertiary fs-9 ps-4 text-end">Dec 9, 2:28PM</td>
<td class="align-middle white-space-nowrap text-end pe-0 ps-5">
<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 class="dropdown-item" href="#!">View</a><a class="dropdown-item" href="#!">Export</a>
<div class="dropdown-divider"></div><a class="dropdown-item text-danger" href="#!">Remove</a>
</div>
</div>
</td>
</tr>
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
<td class="order align-middle white-space-nowrap ps-0"><a class="fw-semibold" href="#!">#2451</a></td>
<td class="total align-middle text-end fw-semibold pe-7 text-body-highlight">$375</td>
<td class="payment_status align-middle white-space-nowrap text-start fw-bold text-body-tertiary"><span class="badge badge-phoenix fs-10 badge-phoenix-warning"><span class="badge-label">Pending</span><span class="ms-1" data-feather="alert-octagon" style="height:12.8px;width:12.8px;"></span></span></td>
<td class="fulfilment_status align-middle white-space-nowrap text-start fw-bold text-body-tertiary"><span class="badge badge-phoenix fs-10 badge-phoenix-warning"><span class="badge-label">Partial FulfiLled</span><span class="ms-1" data-feather="alert-octagon" style="height:12.8px;width:12.8px;"></span></span></td>
<td class="delivery_type align-middle white-space-nowrap text-body fs-9 text-start">Local pickup</td>
<td class="date align-middle white-space-nowrap text-body-tertiary fs-9 ps-4 text-end">Dec 4, 12:56 PM</td>
<td class="align-middle white-space-nowrap text-end pe-0 ps-5">
<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 class="dropdown-item" href="#!">View</a><a class="dropdown-item" href="#!">Export</a>
<div class="dropdown-divider"></div><a class="dropdown-item text-danger" href="#!">Remove</a>
</div>
</div>
</td>
</tr>
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
<td class="order align-middle white-space-nowrap ps-0"><a class="fw-semibold" href="#!">#2450</a></td>
<td class="total align-middle text-end fw-semibold pe-7 text-body-highlight">$657</td>
<td class="payment_status align-middle white-space-nowrap text-start fw-bold text-body-tertiary"><span class="badge badge-phoenix fs-10 badge-phoenix-secondary"><span class="badge-label">Cancelled</span><span class="ms-1" data-feather="x" style="height:12.8px;width:12.8px;"></span></span></td>
<td class="fulfilment_status align-middle white-space-nowrap text-start fw-bold text-body-tertiary"><span class="badge badge-phoenix fs-10 badge-phoenix-secondary"><span class="badge-label">Order CancelLed</span><span class="ms-1" data-feather="x" style="height:12.8px;width:12.8px;"></span></span></td>
<td class="delivery_type align-middle white-space-nowrap text-body fs-9 text-start">Standard shipping</td>
<td class="date align-middle white-space-nowrap text-body-tertiary fs-9 ps-4 text-end">Dec 1, 4:07 AM</td>
<td class="align-middle white-space-nowrap text-end pe-0 ps-5">
<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 class="dropdown-item" href="#!">View</a><a class="dropdown-item" href="#!">Export</a>
<div class="dropdown-divider"></div><a class="dropdown-item text-danger" href="#!">Remove</a>
</div>
</div>
</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 class="card-footer d-flex ">
<a class="btn btn-sm btn-primary me-1" href="{% url 'customer_update' customer.id %}">
<!--<i class="bi bi-pencil-square"></i> -->
{{ _("Edit") }}
</a>
<a class="btn btn-sm btn-danger me-1"
data-bs-toggle="modal"
data-bs-target="#deleteModal">
<!--<i class="bi bi-trash-fill"></i>-->
{{ _("Delete") }}
</a>
<a class="btn btn-sm btn-secondary"
href="{% url 'customer_list' %}">
<!--<i class="bi bi-arrow-left-square-fill"></i>-->
{% trans "Back to List" %}
</a>
</div>
</div>
</div>
{% endblock %}
</div>
{% endblock %}

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -0,0 +1,81 @@
{% extends 'base.html' %}
{% load i18n static %}
{% block content %}
<div class="container">
<div class="ol-auto pt-5 pb-9">
<div class="container-sm">
<div class="row d-flex-center">
<div class="col-8">
<div class="tab-content" id="myTabContent">
<div class="tab-pane fade active show" id="tab-activity" role="tabpanel" aria-labelledby="activity-tab">
<h3 class="mb-4">{{ _("Activity") }}</h3>
<div class="border-bottom py-4">
{% for log in logs %}
<div class="d-flex">
<div class="d-flex bg-primary-subtle rounded-circle flex-center me-3 bg-primary-subtle" style="width: 25px; height: 25px;">
<span class="fa-solid text-primary-dark fs-9 fa-clipboard text-primary-dark"></span>
</div>
<div class="flex-1">
<div class="d-flex justify-content-between flex-column flex-xl-row mb-2 mb-sm-0">
<div class="flex-1 me-2">
<h5 class="text-body-highlight lh-sm">{{ log.user }}</h5>
</div>
<div class="fs-9"><span class="fa-regular fa-calendar-days text-primary me-2"></span><span class="fw-semibold">{{ log.timestamp }}</span></div>
</div>
<p class="fs-9 mb-0">{{ log.action }}</p>
</div>
</div>
</div>
<div class="border-bottom border-translucent py-4">
{% endfor %}
</div>
</div>
</div>
</div>
{% if is_paginated %}
<nav aria-label="Page navigation">
<ul class="pagination mb-0">
{% 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"><span class="fas fa-chevron-left"></span></span>
</a>
</li>
{% else %}
<li class="page-item disabled">
<a class="page-link" href="#" aria-label="Previous">
<span aria-hidden="true"><span class="fas fa-chevron-left"></span></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"><span class="fas fa-chevron-right"></span></span>
</a>
</li>
{% else %}
<li class="page-item disabled">
<a class="page-link" href="#" aria-label="Next">
<span aria-hidden="true"><span class="fas fa-chevron-right"></span></span>
</a>
</li>
{% endif %}
</ul>
</nav>
{% endif %}
</div>
</div>
</div>
</div>
{% endblock %}

View File

@ -1,956 +0,0 @@
{% extends 'base.html' %}
{% load i18n static %}
{% block content %}
<div class="content">
<nav class="mb-3" aria-label="breadcrumb">
<ol class="breadcrumb mb-0">
<li class="breadcrumb-item"><a href="#!">Page 1</a></li>
<li class="breadcrumb-item"><a href="#!">Page 2</a></li>
<li class="breadcrumb-item active">Default</li>
</ol>
</nav>
<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" id="productFilterColumn" 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-12 col-xxl-auto">
<div class="avatar avatar-5xl"><img class="rounded-circle" src="../../assets/img/team/33.webp" alt="" /></div>
</div>
<div class="col-12 col-sm-auto flex-1">
<h3 class="fw-bolder mb-2">Ansolo Lazinatov</h3>
<p class="mb-0">Chief tech officer,</p><a class="fw-bold" href="#!">Blue Beetles</a>
</div>
</div>
</div>
</div>
<div class="card mb-3">
<div class="card-body">
<div class="d-flex align-items-center mb-5">
<h3>About lead</h3>
<button class="btn btn-link px-3" type="button">Edit</button>
</div>
<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="mailto:shatinon@jeemail.com:">ansolo5@jeemail.com</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="tel:+1234567890">+1234567890 </a>
</div>
<div class="mb-4">
<div class="d-flex align-items-center mb-1"><span class="me-2 uil uil-globe"></span>
<h5 class="text-body-highlight mb-0">Website</h5>
</div><a href="#!">www.bb.ru.com </a>
</div>
<div class="mb-4">
<div class="d-flex align-items-center mb-1"><span class="me-2 uil uil-building"></span>
<h5 class="text-body-highlight mb-0">Industry</h5>
</div>
<p class="mb-0 text-body-secondary">Large Enterprise</p>
</div>
<div class="mb-4">
<div class="d-flex align-items-center mb-1"><span class="me-2 uil uil-postcard"></span>
<h5 class="text-body-highlight mb-0">Number of employees</h5>
</div>
<p class="mb-0 text-body-secondary">126</p>
</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">Annual Revenue</h5>
</div>
<p class="mb-0 text-body-secondary">$12000 </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">Last contacted</h5>
</div>
<p class="mb-0 text-body-secondary">12 November 2021, 10:54 AM</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">Advertisement</p>
</div>
<div>
<div class="d-flex align-items-center mb-1"><span class="me-2 uil uil-check-circle"></span>
<h5 class="text-body-highlight mb-0">Lead status</h5>
</div><span class="badge badge-phoenix badge-phoenix-primary">New Lead</span>
</div>
</div>
</div>
<div class="card mb-3">
<div class="card-body">
<div class="d-flex align-items-center mb-5">
<h3>Address</h3>
<button class="btn btn-link" type="button">Edit</button>
</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">Street</h5>
</div>
<p class="mb-0 text-body-secondary">38/2 Penelope street</p>
</div>
<div class="mb-4">
<div class="d-flex align-items-center mb-1"><span class="me-2 uil uil-map-pin-alt"></span>
<h5 class="mb-0 text-body-highlight">Zip code</h5>
</div>
<p class="mb-0 text-body-secondary">1425</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">Qualimando</p>
</div>
<div>
<div class="d-flex align-items-center mb-1"><span class="me-2 uil uil-windsock"></span>
<h5 class="mb-0 text-body-highlight">Country</h5>
</div>
<p class="mb-0 text-body-secondary">United Empire of Brekania</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">
<div class="lead-details-container">
<nav class="navbar pb-4 px-0 sticky-top bg-body nav-underline-scrollspy" id="navbar-deals-detail">
<ul class="nav nav-underline fs-9">
<li class="nav-item"><a class="nav-link me-2" href="#scrollspyTask">Tasks</a></li>
<li class="nav-item"><a class="nav-link me-2" href="#scrollspyDeals">Deals</a></li>
<li class="nav-item"><a class="nav-link me-2" href="#scrollspyEmails">Emails</a></li>
<li class="nav-item"><a class="nav-link" href="#scrollspyAttachments">Attachments </a></li>
</ul>
</nav>
<div class="scrollspy-example rounded-2" data-bs-spy="scroll" data-bs-offset="0" data-bs-target="#navbar-deals-detail" data-bs-root-margin="0px 0px -40%" data-bs-smooth-scroll="true" tabindex="0">
<div class="mb-8">
<h2 class="mb-4" id="scrollspyTask">Tasks</h2>
<div class="row align-items-center g-0 justify-content-start mb-3">
<div class="col-12 col-sm-auto">
<div class="search-box w-100 mb-2 mb-sm-0" style="max-width:30rem;">
<form class="position-relative">
<input class="form-control search-input search" type="search" placeholder="Search tasks" aria-label="Search" />
<span class="fas fa-search search-box-icon"></span>
</form>
</div>
</div>
<div class="col-auto d-flex">
<p class="mb-0 ms-sm-3 fs-9 text-body-tertiary fw-bold"><span class="fas fa-filter me-1 fw-extra-bold fs-10"></span>23 tasks</p>
<button class="btn btn-link p-0 ms-3 fs-9 text-primary fw-bold"><span class="fas fa-sort me-1 fw-extra-bold fs-10"></span>Sorting</button>
</div>
</div>
<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 flex-1">
<div data-todo-offcanvas-toogle="data-todo-offcanvas-toogle" data-todo-offcanvas-target="todoOffcanvas-1">
<div class="form-check mb-1 mb-md-0 d-flex align-items-center lh-1">
<input class="form-check-input flex-shrink-0 form-check-line-through mt-0 me-2 form-check-input-undefined" type="checkbox" id="checkbox-todo-0" />
<label class="form-check-label mb-0 fs-8 me-2 line-clamp-1" for="checkbox-todo-0">Platforms for data administration</label>
</div>
</div>
</div>
<div class="col-12 col-lg-auto">
<div class="d-flex ms-4 lh-1 align-items-center">
<p class="text-body-tertiary fs-10 mb-md-0 me-2 me-lg-3 mb-0">19 Nov, 2022</p>
<div class="d-none d-lg-block end-0 position-absolute" style="top: 23%;">
<div class="hover-actions end-0">
<button class="btn btn-phoenix-secondary btn-icon me-1 fs-10 text-body px-0 me-1"><span class="fas fa-edit"></span></button>
<button class="btn btn-phoenix-secondary btn-icon fs-10 text-danger px-0"><span class="fas fa-trash"></span></button>
</div>
</div>
<div class="hover-lg-hide">
<p class="text-body-tertiary fs-10 ps-lg-3 border-start-lg fw-bold mb-md-0 mb-0">11:56 PM</p>
</div>
</div>
</div>
</div>
<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 flex-1">
<div data-todo-offcanvas-toogle="data-todo-offcanvas-toogle" data-todo-offcanvas-target="todoOffcanvas-2">
<div class="form-check mb-1 mb-md-0 d-flex align-items-center lh-1">
<input class="form-check-input flex-shrink-0 form-check-line-through mt-0 me-2 form-check-input-undefined" type="checkbox" id="checkbox-todo-1" />
<label class="form-check-label mb-0 fs-8 me-2 line-clamp-1" for="checkbox-todo-1">Make wiser business choices.</label>
</div>
</div>
</div>
<div class="col-12 col-lg-auto">
<div class="d-flex ms-4 lh-1 align-items-center">
<p class="text-body-tertiary fs-10 mb-md-0 me-2 me-lg-3 mb-0">05 Nov, 2022</p>
<div class="d-none d-lg-block end-0 position-absolute" style="top: 23%;">
<div class="hover-actions end-0">
<button class="btn btn-phoenix-secondary btn-icon me-1 fs-10 text-body px-0 me-1"><span class="fas fa-edit"></span></button>
<button class="btn btn-phoenix-secondary btn-icon fs-10 text-danger px-0"><span class="fas fa-trash"></span></button>
</div>
</div>
<div class="hover-lg-hide">
<p class="text-body-tertiary fs-10 ps-lg-3 border-start-lg fw-bold mb-md-0 mb-0">09:30 PM</p>
</div>
</div>
</div>
</div>
<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 flex-1">
<div data-todo-offcanvas-toogle="data-todo-offcanvas-toogle" data-todo-offcanvas-target="todoOffcanvas-3">
<div class="form-check mb-1 mb-md-0 d-flex align-items-center lh-1">
<input class="form-check-input flex-shrink-0 form-check-line-through mt-0 me-2 form-check-input-undefined" type="checkbox" id="checkbox-todo-2" />
<label class="form-check-label mb-0 fs-8 me-2 line-clamp-1" for="checkbox-todo-2">Market and consumer insights</label>
</div>
</div>
</div>
<div class="col-12 col-lg-auto">
<div class="d-flex ms-4 lh-1 align-items-center">
<p class="text-body-tertiary fs-10 mb-md-0 me-2 me-lg-3 mb-0">02 Nov, 2022</p>
<div class="d-none d-lg-block end-0 position-absolute" style="top: 23%;">
<div class="hover-actions end-0">
<button class="btn btn-phoenix-secondary btn-icon me-1 fs-10 text-body px-0 me-1"><span class="fas fa-edit"></span></button>
<button class="btn btn-phoenix-secondary btn-icon fs-10 text-danger px-0"><span class="fas fa-trash"></span></button>
</div>
</div>
<div class="hover-lg-hide">
<p class="text-body-tertiary fs-10 ps-lg-3 border-start-lg fw-bold mb-md-0 mb-0">05:25 AM</p>
</div>
</div>
</div>
</div>
<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 flex-1">
<div data-todo-offcanvas-toogle="data-todo-offcanvas-toogle" data-todo-offcanvas-target="todoOffcanvas-4">
<div class="form-check mb-1 mb-md-0 d-flex align-items-center lh-1">
<input class="form-check-input flex-shrink-0 form-check-line-through mt-0 me-2 form-check-input-undefined" type="checkbox" id="checkbox-todo-3" />
<label class="form-check-label mb-0 fs-8 me-2 line-clamp-1" for="checkbox-todo-3">Dashboards for business insights</label>
</div>
</div>
</div>
<div class="col-12 col-lg-auto">
<div class="d-flex ms-4 lh-1 align-items-center">
<p class="text-body-tertiary fs-10 mb-md-0 me-2 me-lg-3 mb-0">29 Oct, 2022</p>
<div class="d-none d-lg-block end-0 position-absolute" style="top: 23%;">
<div class="hover-actions end-0">
<button class="btn btn-phoenix-secondary btn-icon me-1 fs-10 text-body px-0 me-1"><span class="fas fa-edit"></span></button>
<button class="btn btn-phoenix-secondary btn-icon fs-10 text-danger px-0"><span class="fas fa-trash"></span></button>
</div>
</div>
<div class="hover-lg-hide">
<p class="text-body-tertiary fs-10 ps-lg-3 border-start-lg fw-bold mb-md-0 mb-0">08:21 PM</p>
</div>
</div>
</div>
</div>
<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 flex-1">
<div data-todo-offcanvas-toogle="data-todo-offcanvas-toogle" data-todo-offcanvas-target="todoOffcanvas-5">
<div class="form-check mb-1 mb-md-0 d-flex align-items-center lh-1">
<input class="form-check-input flex-shrink-0 form-check-line-through mt-0 me-2 form-check-input-undefined" type="checkbox" id="checkbox-todo-4" checked="checked" />
<label class="form-check-label mb-0 fs-8 me-2 line-clamp-1" for="checkbox-todo-4">Analytics and consultancy for data</label>
</div>
</div>
</div>
<div class="col-12 col-lg-auto">
<div class="d-flex ms-4 lh-1 align-items-center">
<p class="text-body-tertiary fs-10 mb-md-0 me-2 me-lg-3 mb-0">21 Oct, 2022</p>
<div class="d-none d-lg-block end-0 position-absolute" style="top: 23%;">
<div class="hover-actions end-0">
<button class="btn btn-phoenix-secondary btn-icon me-1 fs-10 text-body px-0 me-1"><span class="fas fa-edit"></span></button>
<button class="btn btn-phoenix-secondary btn-icon fs-10 text-danger px-0"><span class="fas fa-trash"></span></button>
</div>
</div>
<div class="hover-lg-hide">
<p class="text-body-tertiary fs-10 ps-lg-3 border-start-lg fw-bold mb-md-0 mb-0">03:45 PM</p>
</div>
</div>
</div>
</div>
<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 flex-1">
<div data-todo-offcanvas-toogle="data-todo-offcanvas-toogle" data-todo-offcanvas-target="todoOffcanvas-6">
<div class="form-check mb-1 mb-md-0 d-flex align-items-center lh-1">
<input class="form-check-input flex-shrink-0 form-check-line-through mt-0 me-2 form-check-input-undefined" type="checkbox" id="checkbox-todo-5" checked="checked" />
<label class="form-check-label mb-0 fs-8 me-2 line-clamp-1" for="checkbox-todo-5">Planning your locations Customer data platform</label>
</div>
</div>
</div>
<div class="col-12 col-lg-auto">
<div class="d-flex ms-4 lh-1 align-items-center">
<p class="text-body-tertiary fs-10 mb-md-0 me-2 me-lg-3 mb-0">14 Oct, 2022</p>
<div class="d-none d-lg-block end-0 position-absolute" style="top: 23%;">
<div class="hover-actions end-0">
<button class="btn btn-phoenix-secondary btn-icon me-1 fs-10 text-body px-0 me-1"><span class="fas fa-edit"></span></button>
<button class="btn btn-phoenix-secondary btn-icon fs-10 text-danger px-0"><span class="fas fa-trash"></span></button>
</div>
</div>
<div class="hover-lg-hide">
<p class="text-body-tertiary fs-10 ps-lg-3 border-start-lg fw-bold mb-md-0 mb-0">10:00 PM</p>
</div>
</div>
</div>
</div>
<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 flex-1">
<div data-todo-offcanvas-toogle="data-todo-offcanvas-toogle" data-todo-offcanvas-target="todoOffcanvas-7">
<div class="form-check mb-1 mb-md-0 d-flex align-items-center lh-1">
<input class="form-check-input flex-shrink-0 form-check-line-through mt-0 me-2 form-check-input-undefined" type="checkbox" id="checkbox-todo-6" checked="checked" />
<label class="form-check-label mb-0 fs-8 me-2 line-clamp-1" for="checkbox-todo-6">Promotion of technology</label>
</div>
</div>
</div>
<div class="col-12 col-lg-auto">
<div class="d-flex ms-4 lh-1 align-items-center">
<p class="text-body-tertiary fs-10 mb-md-0 me-2 me-lg-3 mb-0">12 Oct, 2022</p>
<div class="d-none d-lg-block end-0 position-absolute" style="top: 23%;">
<div class="hover-actions end-0">
<button class="btn btn-phoenix-secondary btn-icon me-1 fs-10 text-body px-0 me-1"><span class="fas fa-edit"></span></button>
<button class="btn btn-phoenix-secondary btn-icon fs-10 text-danger px-0"><span class="fas fa-trash"></span></button>
</div>
</div>
<div class="hover-lg-hide">
<p class="text-body-tertiary fs-10 ps-lg-3 border-start-lg fw-bold mb-md-0 mb-0">02:00 AM</p>
</div>
</div>
</div>
</div><a class="fw-bold fs-9 mt-4" href="#!"><span class="fas fa-plus me-1"></span>Add new task</a>
</div>
<div class="mb-8">
<div class="d-flex justify-content-between align-items-center mb-4" id="scrollspyDeals">
<h2 class="mb-0">Deals</h2>
<button class="btn btn-primary btn-sm"><span class="fa-solid fa-plus me-2"></span>Add Deals</button>
</div>
<div class="border-top border-bottom border-translucent" id="leadDetailsTable" data-list='{"valueNames":["dealName","amount","stage","probability","date","type"],"page":5,"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":"lead-details-table-body"}' />
</div>
</th>
<th class="sort white-space-nowrap align-middle pe-3 ps-0 text-uppercase" scope="col" data-sort="dealName" style="width:15%; min-width:200px">Deal name</th>
<th class="sort align-middle pe-6 text-uppercase text-end" scope="col" data-sort="amount" style="width:15%; min-width:100px">Amount</th>
<th class="sort align-middle text-start text-uppercase" scope="col" data-sort="stage" style="width:20%; min-width:200px">Stage</th>
<th class="sort align-middle text-start text-uppercase" scope="col" data-sort="probability" style="width:20%; min-width:100px">Probability</th>
<th class="sort align-middle ps-0 text-end text-uppercase" scope="col" data-sort="date" style="width:15%; min-width:120px">Closing Date</th>
<th class="sort align-middle text-end text-uppercase" scope="col" data-sort="type" style="width:15%; min-width:140px">Type</th>
<th class="align-middle pe-0 text-end" scope="col" style="width:15%;"> </th>
</tr>
</thead>
<tbody class="list" id="lead-details-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='{"dealName":"Mocking Bird","active":true,"amount":"$6,800,000","stage_status":{"label":"won deal","type":"badge-phoenix-success"},"progress":{"min":"67","max":"145","color":"bg-info"},"date":"Dec 29, 2021","type_status":{"label":"warm","type":"badge-phoenix-info"}}' />
</div>
</td>
<td class="dealName align-middle white-space-nowrap py-2 ps-0"><a class="fw-semibold text-primary" href="#!">Mocking Bird</a></td>
<td class="amount align-middle white-space-nowrap text-start fw-bold text-body-tertiary py-2 text-end pe-6">$6,800,000</td>
<td class="stage align-middle white-space-nowrap text-body py-2"><span class="badge badge-phoenix fs-10 badge-phoenix-success">won deal</span></td>
<td class="probability align-middle white-space-nowrap">
<p class="text-body-secondary fs-10 mb-0">67%</p>
<div class="progress bg-primary-subtle" style="height:3px;" role="progressbar">
<div class="progress-bar bg-info" style="width: 46.206896551724135%" role="progressbar" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</td>
<td class="date align-middle text-body-tertiary text-center py-2">Dec 29, 2021</td>
<td class="type align-middle fw-semibold py-2 text-end"><span class="badge badge-phoenix fs-10 badge-phoenix-info">warm</span></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><a class="dropdown-item" href="#!">Export</a>
<div class="dropdown-divider"></div><a class="dropdown-item text-danger" href="#!">Remove</a>
</div>
</div>
</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='{"dealName":"Airbender","active":true,"amount":"$89,090,000","stage_status":{"label":"new Deal","type":"badge-phoenix-primary"},"progress":{"min":"34","max":"145","color":"bg-warning"},"date":"Mar 27, 2021","type_status":{"label":"hot","type":"badge-phoenix-danger"}}' />
</div>
</td>
<td class="dealName align-middle white-space-nowrap py-2 ps-0"><a class="fw-semibold text-primary" href="#!">Airbender</a></td>
<td class="amount align-middle white-space-nowrap text-start fw-bold text-body-tertiary py-2 text-end pe-6">$89,090,000</td>
<td class="stage align-middle white-space-nowrap text-body py-2"><span class="badge badge-phoenix fs-10 badge-phoenix-primary">new Deal</span></td>
<td class="probability align-middle white-space-nowrap">
<p class="text-body-secondary fs-10 mb-0">34%</p>
<div class="progress bg-primary-subtle" style="height:3px;" role="progressbar">
<div class="progress-bar bg-warning" style="width: 23.448275862068964%" role="progressbar" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</td>
<td class="date align-middle text-body-tertiary text-center py-2">Mar 27, 2021</td>
<td class="type align-middle fw-semibold py-2 text-end"><span class="badge badge-phoenix fs-10 badge-phoenix-danger">hot</span></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><a class="dropdown-item" href="#!">Export</a>
<div class="dropdown-divider"></div><a class="dropdown-item text-danger" href="#!">Remove</a>
</div>
</div>
</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='{"dealName":"Showmen","active":true,"amount":"$78,650,000","stage_status":{"label":"Canceled","type":"badge-phoenix-secondary"},"progress":{"min":"89","max":"145","color":"bg-success"},"date":"Jun 24, 2021","type_status":{"label":"cold","type":"badge-phoenix-warning"}}' />
</div>
</td>
<td class="dealName align-middle white-space-nowrap py-2 ps-0"><a class="fw-semibold text-primary" href="#!">Showmen</a></td>
<td class="amount align-middle white-space-nowrap text-start fw-bold text-body-tertiary py-2 text-end pe-6">$78,650,000</td>
<td class="stage align-middle white-space-nowrap text-body py-2"><span class="badge badge-phoenix fs-10 badge-phoenix-secondary">Canceled</span></td>
<td class="probability align-middle white-space-nowrap">
<p class="text-body-secondary fs-10 mb-0">89%</p>
<div class="progress bg-primary-subtle" style="height:3px;" role="progressbar">
<div class="progress-bar bg-success" style="width: 61.37931034482759%" role="progressbar" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</td>
<td class="date align-middle text-body-tertiary text-center py-2">Jun 24, 2021</td>
<td class="type align-middle fw-semibold py-2 text-end"><span class="badge badge-phoenix fs-10 badge-phoenix-warning">cold</span></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><a class="dropdown-item" href="#!">Export</a>
<div class="dropdown-divider"></div><a class="dropdown-item text-danger" href="#!">Remove</a>
</div>
</div>
</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='{"dealName":"Tarakihi","active":true,"amount":"$1,200,000","stage_status":{"label":"In Progress","type":"badge-phoenix-info"},"progress":{"min":"90","max":"145","color":"bg-success"},"date":"May 19, 2024","type_status":{"label":"hot","type":"badge-phoenix-danger"}}' />
</div>
</td>
<td class="dealName align-middle white-space-nowrap py-2 ps-0"><a class="fw-semibold text-primary" href="#!">Tarakihi</a></td>
<td class="amount align-middle white-space-nowrap text-start fw-bold text-body-tertiary py-2 text-end pe-6">$1,200,000</td>
<td class="stage align-middle white-space-nowrap text-body py-2"><span class="badge badge-phoenix fs-10 badge-phoenix-info">In Progress</span></td>
<td class="probability align-middle white-space-nowrap">
<p class="text-body-secondary fs-10 mb-0">90%</p>
<div class="progress bg-primary-subtle" style="height:3px;" role="progressbar">
<div class="progress-bar bg-success" style="width: 62.06896551724138%" role="progressbar" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</td>
<td class="date align-middle text-body-tertiary text-center py-2">May 19, 2024</td>
<td class="type align-middle fw-semibold py-2 text-end"><span class="badge badge-phoenix fs-10 badge-phoenix-danger">hot</span></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><a class="dropdown-item" href="#!">Export</a>
<div class="dropdown-divider"></div><a class="dropdown-item text-danger" href="#!">Remove</a>
</div>
</div>
</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='{"dealName":"Ponce dleon","active":true,"amount":"$46,000","stage_status":{"label":"won Deal","type":"badge-phoenix-success"},"progress":{"min":"97","max":"145","color":"bg-success"},"date":"Aug 19, 2024","type_status":{"label":"cold","type":"badge-phoenix-warning"}}' />
</div>
</td>
<td class="dealName align-middle white-space-nowrap py-2 ps-0"><a class="fw-semibold text-primary" href="#!">Ponce dleon</a></td>
<td class="amount align-middle white-space-nowrap text-start fw-bold text-body-tertiary py-2 text-end pe-6">$46,000</td>
<td class="stage align-middle white-space-nowrap text-body py-2"><span class="badge badge-phoenix fs-10 badge-phoenix-success">won Deal</span></td>
<td class="probability align-middle white-space-nowrap">
<p class="text-body-secondary fs-10 mb-0">97%</p>
<div class="progress bg-primary-subtle" style="height:3px;" role="progressbar">
<div class="progress-bar bg-success" style="width: 66.89655172413794%" role="progressbar" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</td>
<td class="date align-middle text-body-tertiary text-center py-2">Aug 19, 2024</td>
<td class="type align-middle fw-semibold py-2 text-end"><span class="badge badge-phoenix fs-10 badge-phoenix-warning">cold</span></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><a class="dropdown-item" href="#!">Export</a>
<div class="dropdown-divider"></div><a class="dropdown-item text-danger" href="#!">Remove</a>
</div>
</div>
</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='{"dealName":"leon","active":true,"amount":"$66,000","stage_status":{"label":"IN PROGRESS","type":"badge-phoenix-info"},"progress":{"min":"88","max":"145","color":"bg-success"},"date":"Aug 19, 2024","type_status":{"label":"cold","type":"badge-phoenix-warning"}}' />
</div>
</td>
<td class="dealName align-middle white-space-nowrap py-2 ps-0"><a class="fw-semibold text-primary" href="#!">leon</a></td>
<td class="amount align-middle white-space-nowrap text-start fw-bold text-body-tertiary py-2 text-end pe-6">$66,000</td>
<td class="stage align-middle white-space-nowrap text-body py-2"><span class="badge badge-phoenix fs-10 badge-phoenix-info">IN PROGRESS</span></td>
<td class="probability align-middle white-space-nowrap">
<p class="text-body-secondary fs-10 mb-0">88%</p>
<div class="progress bg-primary-subtle" style="height:3px;" role="progressbar">
<div class="progress-bar bg-success" style="width: 60.689655172413794%" role="progressbar" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</td>
<td class="date align-middle text-body-tertiary text-center py-2">Aug 19, 2024</td>
<td class="type align-middle fw-semibold py-2 text-end"><span class="badge badge-phoenix fs-10 badge-phoenix-warning">cold</span></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><a class="dropdown-item" href="#!">Export</a>
<div class="dropdown-divider"></div><a class="dropdown-item text-danger" href="#!">Remove</a>
</div>
</div>
</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="mb-8">
<h2 class="mb-2" id="scrollspyEmails">Emails</h2>
<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="search-box w-100 mb-3">
<form class="position-relative">
<input class="form-control search-input search" type="search" placeholder="Search..." aria-label="Search" />
<span class="fas fa-search search-box-icon"></span>
</form>
</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>
<h2 class="mb-4" id="scrollspyAttachments">Attachments</h2>
<div class="border-top border-dashed pt-3 pb-4">
<div class="d-flex flex-between-center">
<div class="d-flex mb-1"><span class="fa-solid fa-image me-2 text-body-tertiary fs-9"></span>
<p class="text-body-highlight mb-0 lh-1">Silly_sight_1.png</p>
</div>
<div class="btn-reveal-trigger">
<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"></span></button>
<div class="dropdown-menu dropdown-menu-end py-2"><a class="dropdown-item" href="#!">Edit</a><a class="dropdown-item text-danger" href="#!">Delete</a><a class="dropdown-item" href="#!">Download</a><a class="dropdown-item" href="#!">Report abuse</a></div>
</div>
</div>
<p class="fs-9 text-body-tertiary mb-3"><span>768kB</span><span class="text-body-quaternary mx-1">| </span><a href="#!">Shantinan Mekalan </a><span class="text-body-quaternary mx-1">| </span><span class="text-nowrap">21st Dec, 12:56 PM</span></p><img class="rounded-2" src="../../assets/img/generic/40.png" alt="" />
</div>
<div class="border-top border-dashed py-4">
<div class="d-flex flex-between-center">
<div>
<div class="d-flex align-items-center mb-1"><span class="fa-solid fa-image me-2 fs-9 text-body-tertiary"></span>
<p class="text-body-highlight mb-0 lh-1">All_images.zip</p>
</div>
<p class="fs-9 text-body-tertiary mb-0"><span>12.8 mB</span><span class="text-body-quaternary mx-1">|</span><a href="#!">Yves Tanguy </a><span class="text-body-quaternary mx-1">| </span><span class="text-nowrap">19th Dec, 08:56 PM</span></p>
</div>
<div class="btn-reveal-trigger">
<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"></span></button>
<div class="dropdown-menu dropdown-menu-end py-2"><a class="dropdown-item" href="#!">Edit</a><a class="dropdown-item text-danger" href="#!">Delete</a><a class="dropdown-item" href="#!">Download</a><a class="dropdown-item" href="#!">Report abuse</a></div>
</div>
</div>
</div>
<div class="border-top border-dashed py-4">
<div class="d-flex flex-between-center">
<div>
<div class="d-flex align-items-center mb-1"><span class="fa-solid fa-file-lines me-2 fs-9 text-body-tertiary"></span>
<p class="text-body-highlight mb-0 lh-1">Project.txt</p>
</div>
<p class="fs-9 text-body-tertiary mb-0"><span>123 kB</span><span class="text-body-quaternary mx-1">| </span><a href="#!">Shantinan Mekalan </a><span class="text-body-quaternary mx-1">| </span><span class="text-nowrap">12th Dec, 12:56 PM</span></p>
</div>
<div class="btn-reveal-trigger">
<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"></span></button>
<div class="dropdown-menu dropdown-menu-end py-2"><a class="dropdown-item" href="#!">Edit</a><a class="dropdown-item text-danger" href="#!">Delete</a><a class="dropdown-item" href="#!">Download</a><a class="dropdown-item" href="#!">Report abuse </a></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<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">
<p class="mb-0 mt-2 mt-sm-0 text-body">Thank you for creating with Phoenix<span class="d-none d-sm-inline-block"></span><span class="d-none d-sm-inline-block mx-1">|</span><br class="d-sm-none" />2024 &copy;<a class="mx-1" href="https://themewagon.com">Themewagon</a></p>
</div>
<div class="col-12 col-sm-auto text-center">
<p class="mb-0 text-body-tertiary text-opacity-85">v1.20.1</p>
</div>
</div>
</footer>
</div>
{% endblock %}

View File

@ -18,10 +18,10 @@
<div class="row g-2 g-sm-3">
<div class="col-auto">
<a href="{% url 'account_change_password' %}" class="btn btn-phoenix-secondary"><span class="fas fa-key me-2"></span>{{ _("Change Password") }}</a>
<a href="{% url 'account_change_password' %}" class="btn btn-phoenix-danger"><span class="fas fa-key me-2"></span>{{ _("Change Password") }}</a>
</div>
<div class="col-auto">
<a class="btn btn-phoenix-secondary " href="#!"><span class="fa-solid fa-user-gear me-2 mb-2 mb-xxl-0"></span>Settings </a>
<a class="btn btn-phoenix-secondary " href="{% url 'dealer_update' dealer.pk %}"><span class="fas fa-edit me-2 text-body-quaternary"></span>{{ _("Edit") }} </a>
</div>
</div>
</div>
@ -56,7 +56,7 @@
</div>
<div class="text-end">
<h6 class="mb-2 text-body-secondary">{% trans 'Total users'|capfirst %}</h6>
<h4 class="fs-7 text-body-highlight mb-0">{{ dealer.get_active_plan.users.count }} / {{ dealer.get_active_plan.max_users }}</h4>
<h4 class="fs-7 text-body-highlight mb-0">{{ dealer.total_count }} / {{ dealer.get_active_plan.max_users }}</h4>
</div>
<div class="text-end">
<h6 class="mb-2 text-body-secondary">{% trans 'Subscription' %}</h6>
@ -75,9 +75,7 @@
<div class="card h-100">
<div class="card-body">
<div class="border-bottom border-dashed">
<h4 class="mb-3">{% trans 'Default Address' %}
<button class="btn btn-link p-0" type="button"> <span class="fas fa-edit fs-9 ms-3 text-body-quaternary"></span></button>
</h4>
<h4 class="mb-3">{% trans 'Default Address' %}</h4>
</div>
<div class="pt-4 mb-7 mb-lg-4 mb-xl-7">
<div class="row justify-content-between">
@ -94,7 +92,7 @@
<div class="col-auto">
<h5 class="text-body-highlight mb-0">{% trans 'Email' %}</h5>
</div>
<div class="col-auto">{{dealer.email}}</div>
<div class="col-auto">{{dealer.user.email}}</div>
</div>
<div class="row flex-between-center">
<div class="col-auto">

View File

@ -1,80 +0,0 @@
{% extends "base.html" %}
{% load static %}
{% load i18n %}
{% block title %}{{ _("Dealer Details") }}{% endblock title %}
{% block content %}
<div class="container my-5">
<div class="row justify-content-center">
<div class="col-md-8">
<!-- Dealer Details Card -->
<div class="card shadow-sm">
<div class="card-header bg-primary text-white">
<h4 class="mb-0">{{ _("Dealer Details") }}</h4>
</div>
<div class="card-body">
<div class="mb-3 text-center">
{% if dealer.logo %}
<img src="{{ dealer.logo.url }}" alt="{{ dealer.name }}" class="img-thumbnail" style="max-width: 150px;">
{% else %}
<img src="{% static 'images/logo.png' %}" alt="{{ dealer.name }}" class="img-thumbnail" style="max-width: 150px;">
{% endif %}
</div>
<table class="table table-bordered">
<tr>
<th>{{ _("Name") }}</th>
<td>{{ dealer.get_local_name }}</td>
</tr>
{% if request.user.dealer.is_parent %}
<tr>
<th>{{ _("Commercial Registration Number") }}</th>
<td>{{ dealer.crn }}</td>
</tr>
<tr>
<th>{{ _("VAT Registration Number") }}</th>
<td>{{ dealer.vrn }}</td>
</tr>
{% endif %}
<tr>
<th>{{ _("Phone Number") }}</th>
<td>{{ dealer.phone_number }}</td>
</tr>
<tr>
<th>{{ _("Address") }}</th>
<td>{{ dealer.address|default:_("N/A") }}</td>
</tr>
</table>
<div class="">
<a href="{% url 'dealer_update' dealer.pk %}" class="btn btn-warning">{% trans 'Update' %}</a>
</div>
</div>
</div>
<!-- Authentication Links -->
<div class="mt-4">
<h5>{{ _("Account Management") }}</h5>
<ul class="list-group">
<li class="list-group-item">
<a href="{% url 'change_password' %}" class="text-decoration-none">
<i class="bi bi-shield-lock"></i> {{ _("Change Password") }}
</a>
</li>
<li class="list-group-item">
<a href="{% url 'logout' %}" class="text-decoration-none">
<i class="bi bi-box-arrow-right"></i> {{ _("Sign Out") }}
</a>
</li>
{% if user.is_superuser %}
<li class="list-group-item">
<a href="{% url 'admin:index' %}" class="text-decoration-none">
<i class="bi bi-gear"></i> {{ _("Admin Panel") }}
</a>
</li>
{% endif %}
</ul>
</div>
</div>
</div>
</div>
{% endblock %}

View File

@ -13,8 +13,8 @@
border-color: #000;
}
</style>
<div class="container mt-2 p-1">
<div class="content">
<div class="pb-5">
<!-- Custom Card Modal -->
<div class="modal fade" id="customCardModal" tabindex="-1" aria-labelledby="customCardModalLabel" aria-hidden="true">
<div class="modal-dialog modal-sm">
@ -60,7 +60,7 @@
<!-- Specification Modal -->
<div class="modal fade" id="specificationsModal" tabindex="-1" aria-labelledby="specificationsModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-dialog modal-lg modal-dialog-scrollable">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="specificationsModalLabel">{% trans 'specifications'|upper %}</h5>
@ -78,16 +78,24 @@
<!-- Specification Modal -->
<!-- Main Container -->
<div class="d-flex flex-column min-vh-100">
<div class="d-flex flex-column flex-sm-grow-1 ms-sm-14 p-4">
<main class="d-grid gap-4">
<div class="row g-4">
<div class="col-lg-6 col-xl-6">
<div class="card rounded shadow">
<p class="card-header bg-primary text-white rounded-top fw-bold">{% trans 'Car Details' %}</p>
<div class="row gx-6">
<div class="col-lg-12 col-xl-6">
<div class="container-small-fluid">
<div class="card rounded shadow d-flex align-content-center">
<div class="card overflow-hidden m-3 " style="max-width:35rem;">
<img class="card-img-top shadow-info" src="{% static 'images/generic/4.jpg' %}" alt="...">
<div class="card-img-overlay d-flex align-items-end">
<div>
<h4 class="card-title">{{ car.year }} - {{ car.id_car_make.get_local_name }}</h4>
<p class="card-text">{{ car.id_car_model.get_local_name }} - {{ car.id_car_serie.name }} - {{ car.id_car_trim.name }}</p>
</div>
</div>
</div>
<div class="card-body">
<table class="table table-sm table-responsive align-middle">
<table class="table fs-9 mb-0">
<tr>
<th>{% trans "VIN" %}</th>
<td>{{ car.vin }}</td>
@ -188,7 +196,7 @@
{% endif %}
<a href="{% url 'transfer' car.location.pk %}"
class="btn btn-danger btn-sm">
{% trans "transfer" %}
{% trans "transfer"|capfirst %}
</a>
{% else %} {% trans "No location available." %}
<a href="{% url 'add_car_location' car.pk %}"
@ -204,16 +212,17 @@
</div>
</div>
</div>
</div>
</div>
<div class="col-lg-6 col-xl-6">
<div class="card rounded shadow">
<p class="card-header bg-primary text-white rounded-top fw-bold">{% trans 'Financial Details' %}</p>
<p class="card-header rounded-top fw-bold">{% trans 'Financial Details' %}</p>
<div class="card-body">
{% if car.finances %}
<table class="table table-sm table-responsive align-middle">
<table class="table fs-9 mb-0">
{% if perms.inventory.view_carfinance %}
<tr>
<th>{% trans "Cost Price" %}</th>
@ -235,8 +244,8 @@
{% if car.finances.additional_services.first.pk %}
{% for service in car.finances.additional_services.all %}
<tr>
<td><small class="ms-5">{{service.name}}</small></td>
<td><small>{{ service.price }}</small></td>
<td>{{service.get_local_name}}</td>
<td>{{ service.price }}</td>
</tr>
{% endfor %}
{% endif %}
@ -270,9 +279,9 @@
</div>
</div>
<div class="card rounded shadow mt-3">
<p class="card-header bg-primary text-white rounded-top fw-bold">{% trans 'Colors Details' %}</p>
<p class="card-header rounded-top fw-bold">{% trans 'Colors Details' %}</p>
<div class="card-body">
<table class="table table-sm table-responsive align-middle">
<table class="table fs-9 mb-0">
<tbody class="align-middle">
{% if car.colors.exists %}
{% for color in car.colors.all %}
@ -319,10 +328,10 @@
</div>
<div class="card rounded shadow mt-3">
<p class="card-header bg-primary text-white rounded-top fw-bold">{% trans 'Reservations Details' %}</p>
<p class="card-header rounded-top fw-bold">{% trans 'Reservations Details' %}</p>
<div class="card-body">
{% if car.is_reserved %}
<table class="table table-sm table-responsive align-middle">
<table class="table fs-9 mb-0">
<thead>
<tr>
<th>{% trans "Reserved By" %}</th>
@ -333,7 +342,7 @@
<tbody>
{% for reservation in car.reservations.all %}
<tr>
<td>{{ reservation.reserved_by.username }}</td>
<td>{{ reservation.reserved_by.dealer.staff }}</td>
<td>{{ reservation.reserved_until }}</td>
<td>
{% if reservation.is_active %}
@ -343,13 +352,13 @@
name="action"
value="renew"
class="btn btn-sm btn-success">
<small>{% trans "Renew" %}</small>
{% trans "Renew" %}
</button>
<button type="submit"
name="action"
value="cancel"
class="btn btn-sm btn-secondary">
<small>{% trans "Cancel" %}</small>
{% trans "Cancel" %}
</button>
</form>
{% else %}
@ -379,20 +388,9 @@
</div>
</div>
</div>
<div class="row g-4">
<div class="">
<!-- Actions -->
<a href="#" class="btn btn-danger btn-sm">{% trans "transfer" %}</a>
<a href="{% url 'car_update' car.pk %}" class="btn btn-warning btn-sm">{% trans "Edit" %}</a>
<a href="{% url 'inventory_stats' %}" class="btn btn-secondary btn-sm">{% trans "Back to List" %}</a>
</div>
</div>
</main>
</div>
</div>
</div>
</div>
<script>
document.addEventListener("DOMContentLoaded", function () {

View File

@ -23,16 +23,16 @@
<script src='https://cdn.jsdelivr.net/npm/tesseract.js@5/dist/tesseract.min.js'></script>
<div class="container">
<div class="container-lg">
<!-- Specification Modal -->
<div class="modal fade" id="specificationsModal"
tabindex="-1"
aria-labelledby="specificationsModalLabel">
<div class="modal-dialog modal-xl modal-dialog-scrollable ">
<div class="modal-dialog modal-lg modal-dialog-scrollable">
<div class="modal-content rounded-top-2">
<div class="modal-header bg-success">
<h5 class="modal-title text-light"
<div class="modal-header">
<h5 class="modal-title"
id="specificationsModalLabel">
{% trans 'specifications'|capfirst %}
</h5>
@ -45,6 +45,9 @@
<div class="modal-body">
<div id="specificationsContent"></div>
</div>
<div class="modal-footer">
<button class="btn btn-outline-primary" type="button" data-bs-dismiss="modal">{% trans 'Close' %}</button>
</div>
</div>
</div>
</div>
@ -53,7 +56,7 @@
<div class="modal fade" id="scannerModal" tabindex="-1" aria-labelledby="scannerModalLabel">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content rounded-top-3">
<div class="modal-header bg-primary text-white rounded-top-3 shadow">
<div class="modal-header rounded-top-3 shadow">
<h5 class="modal-title" id="scannerModalLabel">{{ _("scanner") }}</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="{{ _('Close') }}"></button>
</div>
@ -88,7 +91,7 @@
id="scan-vin-btn"
data-bs-toggle="modal"
data-bs-target="#scannerModal">
<i class="bi bi-camera-fill"></i>
<span class="fa-solid fa-camera"></span>
</button>
<input type="text"
class="form-control form-control-sm"

View File

@ -18,18 +18,12 @@
line-height: 22px;
}
</style>
<div class="container mt-3">
<div class="d-flex flex-column min-vh-100 flex-sm-grow-1 ms-sm-14 p-1">
<main class="d-grid gap-4 p-1">
<div class="row g-4">
<div class="col-lg-6 col-xl-12">
<div class="card rounded shadow">
<p class="card-header bg-primary text-white rounded-top fw-bold">
{{ cars.id_car_make.get_local_name }} -
{{ cars.id_car_model.get_local_name }}
</p>
<div class="card-body">
<table class="table table-responsive table-hover table-sm align-middle">
<div class="container">
<div class="row g-3 justify-content-between mb-4">
<div class="col-sm-12">
<div class="table-responsive scrollbar mx-n1 px-1">
<table class="table fs-9 mb-0 leads-table border-top border-translucent">
<thead>
<tr>
<th>{% trans "VIN" %}</th>
@ -72,8 +66,8 @@
<td>{{ car.location.showroom.get_local_name }}</td>
{% endif %}
<td>
<a href="{% url 'car_detail' car.pk %}" class="btn btn-sm btn-success">
<small>{% trans "view" %}</small>
<a href="{% url 'car_detail' car.pk %}" class="btn btn-success">
{% trans "view" %}
</a>
</td>
</tr>
@ -145,7 +139,4 @@
</div>
</div>
</div>
</main>
</div>
</div>
{% endblock %}

View File

@ -9,7 +9,7 @@
<div class="container mt-4">
<!-- Total Cars -->
<div class="alert alert-primary">
<div class="alert alert-phoenix-primary">
<div class="d-flex justify-content-between">
<strong class="fs-6">{% trans "Total Cars in Inventory" %}</strong>
<strong class="fs-6">{{ inventory.total_cars }}</strong>
@ -22,7 +22,7 @@
<p class="accordion-header" id="heading{{ make.make_id }}">
<button
class="accordion-button"
class="accordion-button collapsed"
type="button"
data-bs-toggle="collapse"
data-bs-target="#collapse{{ make.make_id }}"

View File

@ -27,10 +27,9 @@
{% endfor %}
<div class="d-flex justify-content-end">
<button class="btn btn-sm btn-success me-1" type="submit">
<!--<i class="bi bi-save"></i> -->
{{ _("Save") }}
</button>
<a href="{{request.META.HTTP_REFERER}}" class="btn btn-sm btn-danger">{% trans "Cancel" %}</a>
<a href="{{request.META.HTTP_REFERER}}" class="btn btn-sm btn-danger">{% trans "Cancel"|capfirst %}</a>
</div>
</form>
</div>

View File

@ -1,7 +1,7 @@
{% extends "base.html" %}
{% load i18n %}
{% block title %}{% trans "Accounts" %}{% endblock title %}
{% block customers %}
{% block accounts %}
<a class="nav-link active fw-bold">
{% trans "Accounts"|capfirst %}
<span class="visually-hidden">(current)</span>
@ -20,10 +20,10 @@
<button class="btn btn-sm btn-secondary rounded-start" type="submit">
{% trans "search" %}
</button>
<input type="text"
name="q"
class="form-control form-control-sm rounded-end"
value="{{ request.GET.q }}"
<input type="text"
name="q"
class="form-control form-control-sm rounded-end"
value="{{ request.GET.q }}"
placeholder="{% trans 'Search accounts...' %}" />
{% if request.GET.q %}
<a href="{% url request.resolver_match.view_name %}"
@ -38,92 +38,142 @@
</div>
<!-- Customer Table -->
<div class="row g-4">
<div class="col-12">
<div class="card">
<div class="card-header bg-primary text-white">
<h5 class="mb-0">{% trans "Account List" %}</h5>
{% if page_obj.object_list %}
<div id="accountsTable">
<div class="table-responsive">
<table class="table table-sm fs-9 mb-0">
<thead>
<tr class="bg-body-highlight">
<th class="sort border-top border-translucent ps-3" data-sort="name">{% trans "Account Name" %}</th>
<th class="sort border-top border-translucent" data-sort="code">{% trans "Code" %}</th>
<th class="sort border-top border-translucent text-end pe-3" data-sort="balance_type">{% trans "Balance Type" %}</th>
<th class="sort border-top border-translucent text-end pe-3" data-sort="active">{% trans "Active" %}</th>
<th class="border-top border-translucent text-end align-middle pe-0 ps-4" scope="col"></th>
</tr>
</thead>
<tbody class="list">
{% for account in accounts %}
<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 Account" %}
<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 Account?" %}
</p>
<div class="d-grid gap-2">
<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 'account_delete' account.uuid %}">
{% trans "Yes" %}
</a>
</div>
</div>
</div>
</div>
</div>
<tr>
<td class="align-middle ps-3 name">{{ account.name }}</td>
<td class="align-middle code">{{ account.code }}</td>
<td class="align-middle balance_type text-end py-3 pe-3">
{% if account.balance_type == 'debit' %}
<div class="badge badge-phoenix fs-10 badge-phoenix-success"><span class="fw-bold">{{ _("Debit") }}</span><span class="ms-1 fas fa-arrow-circle-down"></span></div>
{% else %}
<div class="badge badge-phoenix fs-10 badge-phoenix-danger"><span class="fw-bold">{{ _("Credit") }}</span><span class="ms-1 fas fa-arrow-circle-up"></span></div>
{% endif %}
</td>
{% if account.is_active %}
<td class="align-middle active text-end py-3 pe-3"><span class="fw-bold text-success-dark fas fa-check"></span></td>
{% else %}
<td class="align-middle active text-end py-3 pe-3"><span class="fw-bold text-danger-dark fas fa-times"></span></td>
{% endif %}
<td>
<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 'account_update' account.uuid %}" 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 class="card-body p-0">
<table class="table table-hover table-sm mb-0">
<thead class="table-light">
<tr>
<th>{% trans "Name" %}</th>
<th>{% trans "Code" %}</th>
<th>{% trans "Balance Type" %}</th>
<th>{% trans "Active" %}</th>
<th class="text-center">{% trans "Actions" %}</th>
</tr>
</thead>
<tbody>
{% for account in accounts %}
<tr>
<td>{{ account.name }}</td>
<td>{{ account.code }}</td>
<td>{{ account.balance_type }}</td>
<td>{{ account.active }}</td>
<td class="text-center">
<a href="{% url 'account_detail' account.pk %}"
class="btn btn-sm btn-success">
{% trans "view" %}
</a>
</td>
</tr>
{% empty %}
</div>
</td>
</tr>
{% empty %}
<tr>
<td colspan="5" class="text-center text-muted">
{% trans "No account found." %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endfor %}
</tbody>
</table>
</div>
<!-- Pagination -->
{% if is_paginated %}
<div class="card-footer bg-light">
<nav aria-label="Page navigation">
<ul class="pagination pagination-sm justify-content-center mb-0">
{% if page_obj.has_previous %}
<li class="page-item">
<a class="page-link" href="?page={{ page_obj.previous_page_number }}" aria-label="{% trans 'Previous' %}">
<span aria-hidden="true">&laquo;</span>
</a>
</li>
{% else %}
<li class="page-item disabled">
<span class="page-link" aria-hidden="true">&laquo;</span>
</li>
{% endif %}
{% for num in page_obj.paginator.page_range %}
{% if page_obj.number == num %}
<li class="page-item active">
<span class="page-link">{{ num }}</span>
</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="{% trans 'Next' %}">
<span aria-hidden="true">&raquo;</span>
</a>
</li>
{% else %}
<li class="page-item disabled">
<span class="page-link" aria-hidden="true">&raquo;</span>
</li>
{% endif %}
</ul>
</nav>
<div class="d-flex justify-content-between mt-3"><span class="d-none d-sm-inline-block" data-list-info="data-list-info">{{ page_obj.start_index }} {{ _("to") }} {{ page_obj.end_index }}<span class="text-body-tertiary"> {{ _("Items of")}} </span>{{ page_obj.paginator.count }}</span>
<div class="d-flex">
<nav aria-label="Page navigation">
<ul class="pagination mb-0">
{% 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"><span class="fas fa-chevron-left"></span></span>
</a>
</li>
{% else %}
<li class="page-item disabled">
<a class="page-link" href="#" aria-label="Previous">
<span aria-hidden="true"><span class="fas fa-chevron-left"></span></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"><span class="fas fa-chevron-right"></span></span>
</a>
</li>
{% else %}
<li class="page-item disabled">
<a class="page-link" href="#" aria-label="Next">
<span aria-hidden="true"><span class="fas fa-chevron-right"></span></span>
</a>
</li>
{% endif %}
</ul>
</nav>
</div>
</div>
{% endif %}
</div>
</div>
</div>
</div>
{% endif %}
</main>
</div>
</div>

View File

@ -4,13 +4,19 @@
{% block title %}{% trans "Add Organization" %}{% endblock title %}
{% block content %}
<div class="container my-4">
<h2>{% trans "Add Organization" %}</h2>
<form method="post" enctype="multipart/form-data">
<h3>{% trans "Add Organization" %}</h3>
<form class="row g-3 mb-9" method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ redirect_field }}
{{ form|crispy }}
<button type="submit" class="btn btn-sm btn-primary">{% trans "Save" %}</button>
<a href="{% url 'organization_list' %}" class="btn btn-sm btn-secondary">{% trans "Cancel" %}</a>
<div class="d-flex mb-3">
<a href="{{request.META.HTTP_REFERER}}" class="btn btn-phoenix-primary me-2 px-6">{% trans "cancel"|capfirst %}</a>
<button class="btn btn-primary" type="submit">
<!--<i class="bi bi-save"></i> -->
{{ _("Save") }}
</button>
</div>
</form>
</div>
{% endblock %}

View File

@ -1,43 +1,185 @@
{% extends 'base.html' %}
{% load i18n %}
{% load static %}
{% block title %}{% trans "Organizations" %}{% endblock title %}
{% block organizations %}<a class="nav-link active">{% trans "Organizations" %}</a>{% endblock %}
{% block content %}
<div class="container my-4">
<h2>{% trans "Organizations" %}</h2>
<div class="d-flex justify-content-between align-items-center mb-3">
<form method="get" class="d-flex">
<input type="text" name="q" class="form-control form-control-sm" placeholder="{% trans 'Search' %}" value="{{ request.GET.q }}">
<button type="submit" class="btn btn-sm btn-secondary ms-2">{% trans "Search" %}</button>
</form>
<a href="{% url 'organization_create' %}" class="btn btn-sm btn-primary">{% trans "Add Organization" %}</a>
<section class="pt-5 pb-9">
<div class="container">
<h2 class="mb-4">{% trans "Organizations" %}</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 'organization_create' %}" class="btn btn-primary me-4"><span class="fas fa-plus me-2"></span>{% trans "add organization"|capfirst %}</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">
<input name="q" class="form-control search-input search" type="search" placeholder="{{ _('Enter Organization name') }}" aria-label="Search" value="{{ request.GET.q }}"/>
<span class="fas fa-search search-box-icon"></span>
{% if request.GET.q %}
<a href="{% url request.resolver_match.view_name %}" class="btn btn-outline-danger ms-1">
<i class="bi bi-x-lg"></i>
</a>
{% endif %}
</form>
</div>
</div>
</div>
</div>
<div class="table-responsive scrollbar mx-n1 px-1">
<table class="table table-hover fs-9 mb-0">
<thead>
<tr>
<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="name" 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="fs-7 text-success-dark far fa-file-alt"></span></div><span>{% trans "CRN" %}</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="fs-7 text-primary-dark fas fa-money-check-alt"></span></div><span>{% trans "VRN" %}</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="phone"></span></div><span>{% trans "Phone" %}</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>{% trans 'Address' %}</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="leal-tables-body">
{% for org in organizations %}
<!-- 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 Vendor" %}
<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 Organization?" %}
</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 'organization_delete' org.id %}">
{% trans "Yes" %}
</a>
</div>
</div>
</div>
<table class="table table-hover">
<thead>
<tr>
<th>{% trans "Name" %}</th>
<th>{% trans "CRN" %}</th>
<th>{% trans "VRN" %}</th>
<th>{% trans "Phone" %}</th>
<th>{% trans "Actions" %}</th>
</tr>
</thead>
<tbody>
{% for org in organizations %}
<tr>
<td>{{ org.get_local_name }}</td>
<td>{{ org.crn }}</td>
<td>{{ org.vrn }}</td>
<td>{{ org.phone_number }}</td>
<td>
<a href="{% url 'organization_detail' org.id %}" class="btn btn-sm btn-success">{% trans "view" %}</a>
</td>
</tr>
{% empty %}
<tr>
<td colspan="5" class="text-center">{% trans "No organizations found." %}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
<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 'organization_detail' org.id %}">{{ org.name }}</a>
<div class="d-flex align-items-center">
<p class="mb-0 text-body-highlight fw-semibold fs-9 me-2">{{ org.arabic_name }}</p><span class="badge badge-phoenix badge-phoenix-primary">{{ org.id}}</span>
</div>
</div>
</div>
</td>
<td class="email align-middle white-space-nowrap fw-semibold ps-4 border-end border-translucent">{{ org.crn }}</td>
<td class="phone align-middle white-space-nowrap fw-semibold ps-4 border-end border-translucent">{{ org.vrn }}</td>
<td class="phone align-middle white-space-nowrap ps-4 border-end border-translucent fw-semibold text-body-highlight"><a class="text-body-highlight" href="tel:{{ org.phone_number }}">{{ org.phone_number }}</a></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">
{{ org.address }}</td>
<td class="date align-middle white-space-nowrap text-body-tertiary text-opacity-85 ps-4 text-body-tertiary">{{ org.created_at|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 'organization_update' org.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>
</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 mb-0">
{% 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"><span class="fas fa-chevron-left"></span></span>
</a>
</li>
{% else %}
<li class="page-item disabled">
<a class="page-link" href="#" aria-label="Previous">
<span aria-hidden="true"><span class="fas fa-chevron-left"></span></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"><span class="fas fa-chevron-right"></span></span>
</a>
</li>
{% else %}
<li class="page-item disabled">
<a class="page-link" href="#" aria-label="Next">
<span aria-hidden="true"><span class="fas fa-chevron-right"></span></span>
</a>
</li>
{% endif %}
</ul>
</nav>
{% endif %}
</div>
</div>
</section>
{% endblock %}

View File

@ -37,5 +37,44 @@
{% endfor %}
</tbody>
</table>
{% if is_paginated %}
<nav aria-label="Page navigation">
<ul class="pagination mb-0">
{% 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"><span class="fas fa-chevron-left"></span></span>
</a>
</li>
{% else %}
<li class="page-item disabled">
<a class="page-link" href="#" aria-label="Previous">
<span aria-hidden="true"><span class="fas fa-chevron-left"></span></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"><span class="fas fa-chevron-right"></span></span>
</a>
</li>
{% else %}
<li class="page-item disabled">
<a class="page-link" href="#" aria-label="Next">
<span aria-hidden="true"><span class="fas fa-chevron-right"></span></span>
</a>
</li>
{% endif %}
</ul>
</nav>
{% endif %}
</div>
{% endblock %}

View File

@ -54,8 +54,41 @@
</tbody>
</table>
</div>
<div class="d-flex justify-content-center">
</div>
{% if is_paginated %}
<nav aria-label="Page navigation">
<ul class="pagination mb-0">
{% 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"><span class="fas fa-chevron-left"></span></span>
</a>
</li>
{% else %}
<li class="page-item disabled">
<a class="page-link" href="#" aria-label="Previous">
<span aria-hidden="true"><span class="fas fa-chevron-left"></span></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"><span class="fas fa-chevron-right"></span></span>
</a>
</li>
{% else %}
<li class="page-item disabled">
<a class="page-link" href="#" aria-label="Next">
<span aria-hidden="true"><span class="fas fa-chevron-right"></span></span>
</a>
</li>
{% endif %}
</div>
{% endblock %}

View File

@ -49,8 +49,7 @@
</div>
<div class="col-md-6">
<p><strong>{{ _("Phone Number") }}:</strong> {{ user_.phone_number }}</p>
<p><strong>{{ _("Address") }}:</strong> {{ user_.address }}</p>
<p><strong>{{ _("Role") }}:</strong> {{ user_.dealer_type }}</p>
<p><strong>{{ _("Role") }}:</strong> {{ user_.staff_type }}</p>
</div>
</div>
</div>

View File

@ -9,7 +9,7 @@
<div class="card shadow rounded">
<div class="card-header bg-primary text-white">
<p class="mb-0">
{% if user.created %}
{% if staff.created %}
<!--<i class="bi bi-pencil-square"></i>-->
{{ _("Edit User") }}
{% else %}

View File

@ -41,7 +41,6 @@
<th>{% trans 'name'|capfirst %}</th>
<th>{% trans 'arabic name'|capfirst %}</th>
<th>{% trans 'phone number'|capfirst %}</th>
<th>{% trans 'address'|capfirst %}</th>
<th>{% trans 'role'|capfirst %}</th>
<th>{% trans 'actions'|capfirst %}</th>
</tr>
@ -52,10 +51,9 @@
<td>{{ user.name }}</td>
<td>{{ user.arabic_name }}</td>
<td>{{ user.phone_number }}</td>
<td>{{ user.address }}</td>
<td>{% trans user.dealer_type %}</td>
<td>{% trans user.staff_type %}</td>
<td>
<a class="btn btn-sm btn-success"
<a class="btn btn-phoenix-success"
href="{% url 'user_detail' user.id %}">
{% trans 'view'|capfirst %}
</a>
@ -66,44 +64,45 @@
</tbody>
</table>
<!-- 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 %}
{% if is_paginated %}
<nav aria-label="Page navigation">
<ul class="pagination mb-0">
{% 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"><span class="fas fa-chevron-left"></span></span>
</a>
</li>
{% else %}
<li class="page-item disabled">
<a class="page-link" href="#" aria-label="Previous">
<span aria-hidden="true"><span class="fas fa-chevron-left"></span></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"><span class="fas fa-chevron-right"></span></span>
</a>
</li>
{% else %}
<li class="page-item disabled">
<a class="page-link" href="#" aria-label="Next">
<span aria-hidden="true"><span class="fas fa-chevron-right"></span></span>
</a>
</li>
{% endif %}
</ul>
</nav>
{% endif %}
</div>
</div>

View File

@ -7,7 +7,6 @@
<div class="container">
<div class="content">
<div class="row">
<div class="col-xl-9">
<div class="d-sm-flex justify-content-between">
@ -46,5 +45,4 @@
</div>
</div>
</div>
</div>
{% endblock %}

View File

@ -40,7 +40,7 @@
{% if page_obj.object_list %}
<div class="table-responsive scrollbar mx-n1 px-1">
<table class="table fs-9 mb-0 leads-table border-top border-translucent">
<table class="table table-hover fs-9 mb-0">
<thead>
<tr>
<th class="sort white-space-nowrap align-middle text-uppercase ps-0" scope="col" data-sort="name" style="width:25%;">{{ _("Name")|capfirst }}</th>
@ -147,43 +147,44 @@
<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 %}
<nav aria-label="Page navigation">
<ul class="pagination mb-0">
{% 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"><span class="fas fa-chevron-left"></span></span>
</a>
</li>
{% else %}
<li class="page-item disabled">
<a class="page-link" href="#" aria-label="Previous">
<span aria-hidden="true"><span class="fas fa-chevron-left"></span></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"><span class="fas fa-chevron-right"></span></span>
</a>
</li>
{% else %}
<li class="page-item disabled">
<a class="page-link" href="#" aria-label="Next">
<span aria-hidden="true"><span class="fas fa-chevron-right"></span></span>
</a>
</li>
{% endif %}
</ul>
</nav>
{% endif %}
</div>
</div>
</section>