Compare commits

..

No commits in common. "62dd1188c941dd52133ca49d63887bfb50a499f5" and "f2cd3f6969c59a9eac9bf6e281afa6096a61859b" have entirely different histories.

7 changed files with 52 additions and 52 deletions

View File

@ -26,7 +26,7 @@ urlpatterns += i18n_patterns(
path("ledger/", include("django_ledger.urls", namespace="django_ledger")), path("ledger/", include("django_ledger.urls", namespace="django_ledger")),
path("", include("inventory.urls")), path("", include("inventory.urls")),
path("haikalbot/", include("haikalbot.urls")), path("haikalbot/", include("haikalbot.urls")),
# path("appointment/", include("appointment.urls")), path("appointment/", include("appointment.urls")),
path("plans/", include("plans.urls")), path("plans/", include("plans.urls")),
path("schema/", Schema.as_view()), path("schema/", Schema.as_view()),
path("tours/", include("tours.urls")), path("tours/", include("tours.urls")),

View File

@ -28,7 +28,7 @@ from django.db import transaction
from django_q.tasks import async_task from django_q.tasks import async_task
from plans.models import UserPlan from plans.models import UserPlan
from plans.signals import order_completed, activate_user_plan from plans.signals import order_completed, activate_user_plan
# from inventory.tasks import send_email from inventory.tasks import send_email
from django.conf import settings from django.conf import settings
# logging # logging

View File

@ -12,7 +12,7 @@ from django.db import transaction
from django_ledger.io import roles from django_ledger.io import roles
from django_q.tasks import async_task from django_q.tasks import async_task
from django.core.mail import send_mail from django.core.mail import send_mail
# from appointment.models import StaffMember from appointment.models import StaffMember
from django.utils.translation import activate from django.utils.translation import activate
from django.core.files.base import ContentFile from django.core.files.base import ContentFile
from django.contrib.auth import get_user_model from django.contrib.auth import get_user_model

View File

@ -26,6 +26,7 @@ distro==1.9.0
Django==5.2.4 Django==5.2.4
django-allauth==65.10.0 django-allauth==65.10.0
django-appconf==1.1.0 django-appconf==1.1.0
django-appointment==3.8.0
django-background-tasks==1.2.8 django-background-tasks==1.2.8
django-bootstrap5==25.1 django-bootstrap5==25.1
django-ckeditor==6.7.3 django-ckeditor==6.7.3

View File

@ -259,7 +259,7 @@
<div class="card-body"> <div class="card-body">
<div class="table-responsive scrollbar mb-3"> <div class="table-responsive scrollbar mb-3">
<table class="table table-sm fs-9 mb-0 overflow-hidden"> <table class="table table-sm fs-9 mb-0 overflow-hidden">
{% if car.marked_price %} {% if car.marked_price and request.is_accountant or request.is_dealer or request.is_manager %}
<tr> <tr>
<th>{% trans "Cost Price"|capfirst %}</th> <th>{% trans "Cost Price"|capfirst %}</th>
{% if request.is_dealer or request.is_accountant or request.manager%} {% if request.is_dealer or request.is_accountant or request.manager%}

View File

@ -21,6 +21,9 @@
--card-selected-shadow: rgba(13, 110, 253, 0.4); --card-selected-shadow: rgba(13, 110, 253, 0.4);
} }
body {
background-color: #f8f9fa;
}
.pricing-card-label { .pricing-card-label {
transition: all 0.2s ease-in-out; transition: all 0.2s ease-in-out;
@ -230,9 +233,9 @@
for="plan_{{ forloop.counter }}"> for="plan_{{ forloop.counter }}">
<div class="card h-100 rounded-4"> <div class="card h-100 rounded-4">
<div class="card-body p-4 position-relative"> <div class="card-body p-4 position-relative">
{% comment %} {% if forloop.counter == 2 %} {% if forloop.first %}
<div class="pricing-card-badge">{{ _("Most Popular") }}</div> <div class="pricing-card-badge">{{ _("Most Popular") }}</div>
{% endif %} {% endcomment %} {% endif %}
<h4 class="mb-2 fw-bold text-primary">{{ pp.plan.name|capfirst }}</h4> <h4 class="mb-2 fw-bold text-primary">{{ pp.plan.name|capfirst }}</h4>
<h2 class="mb-4"> <h2 class="mb-4">
{{ pp.price_with_tax }}<span class="fs-5 fw-normal"> <span class="icon-saudi_riyal"></span> / {{ pp.pricing.period }} {{ _("days") }}</span> {{ pp.price_with_tax }}<span class="fs-5 fw-normal"> <span class="icon-saudi_riyal"></span> / {{ pp.pricing.period }} {{ _("days") }}</span>
@ -567,59 +570,55 @@
} }
} }
function initWizardSteps() { function initWizardSteps() {
let currentStep = 0; let currentStep = 0;
const steps = document.querySelectorAll(".step"); const steps = document.querySelectorAll(".step");
const progressSteps = document.querySelectorAll(".progress-indicator .step-item"); const nextBtn = document.getElementById("nextBtn");
const nextBtn = document.getElementById("nextBtn"); const prevBtn = document.getElementById("prevBtn");
const prevBtn = document.getElementById("prevBtn"); const submitBtn = document.getElementById("submitBtn");
const submitBtn = document.getElementById("submitBtn");
if (!steps.length || !nextBtn || !prevBtn || !submitBtn || !progressSteps.length) return; if (!steps.length || !nextBtn || !prevBtn || !submitBtn) return;
nextBtn.removeEventListener("click", handleNext); // Remove old listeners
prevBtn.removeEventListener("click", handlePrev); nextBtn.removeEventListener("click", handleNext);
prevBtn.removeEventListener("click", handlePrev);
nextBtn.addEventListener("click", handleNext); // Add new listeners
prevBtn.addEventListener("click", handlePrev); nextBtn.addEventListener("click", handleNext);
prevBtn.addEventListener("click", handlePrev);
function showStep(index) { function showStep(index) {
steps.forEach((step, i) => { steps.forEach((step, i) => {
step.classList.toggle("d-none", i !== index); step.classList.toggle("d-none", i !== index);
}); });
// Add this section to update the progress indicator prevBtn.disabled = index === 0;
progressSteps.forEach((step, i) => { nextBtn.classList.toggle("d-none", index === steps.length - 1);
step.classList.toggle("active", i === index); submitBtn.classList.toggle("d-none", index !== steps.length - 1);
step.classList.toggle("completed", i < index);
});
prevBtn.disabled = index === 0; if (index === steps.length - 1) {
nextBtn.classList.toggle("d-none", index === steps.length - 1); populateSummary();
submitBtn.classList.toggle("d-none", index !== steps.length - 1); }
}
if (index === steps.length - 1) { function handleNext() {
populateSummary(); // Validate current step before proceeding
} if (!validateCurrentStep(currentStep)) {
} return;
}
function handleNext() { if (currentStep < steps.length - 1) {
if (!validateCurrentStep(currentStep)) { currentStep++;
return; showStep(currentStep);
} }
}
if (currentStep < steps.length - 1) { function handlePrev() {
currentStep++; if (currentStep > 0) {
showStep(currentStep); currentStep--;
} showStep(currentStep);
} }
}
function handlePrev() {
if (currentStep > 0) {
currentStep--;
showStep(currentStep);
}
}
function populateSummary() { function populateSummary() {
const selectedPlan = document.querySelector('input[name="selected_plan"]:checked'); const selectedPlan = document.querySelector('input[name="selected_plan"]:checked');