Merge branch 'main' of http://10.10.1.120:3000/tenhal_admin/haikal
This commit is contained in:
commit
35454ec8a1
Binary file not shown.
@ -522,6 +522,18 @@ class Dealer(models.Model, LocalizedNameMixin):
|
|||||||
except SubscriptionPlan.DoesNotExist:
|
except SubscriptionPlan.DoesNotExist:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
@property
|
||||||
|
def get_plan_price(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
|
||||||
|
).first()
|
||||||
|
if subscription_plan:
|
||||||
|
return subscription_plan.price
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -144,7 +144,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<p class="fs-9 text-body-tertiary">{% trans 'Active until' %}: {{ dealer.get_active_plan.end_date|date}}</p>
|
<p class="fs-9 text-body-tertiary">{% trans 'Active until' %}: {{ dealer.get_active_plan.end_date|date}}</p>
|
||||||
<div class="d-flex align-items-end mb-md-5 mb-lg-0">
|
<div class="d-flex align-items-end mb-md-5 mb-lg-0">
|
||||||
<h4 class="fw-bolder me-1">{{ dealer.get_active_plan.users.description }}</h4>
|
<h4 class="fw-bolder me-1">{{ dealer.get_plan_price }} {% trans 'SAR' %}</h4>
|
||||||
<h5 class="fs-9 fw-normal text-body-tertiary ms-1">Per month</h5>
|
<h5 class="fs-9 fw-normal text-body-tertiary ms-1">Per month</h5>
|
||||||
</div>
|
</div>
|
||||||
</div><img class="d-dark-none" src="{% static 'images/spot-illustrations/star.png' %}" width="54" height="54" alt="" /><img class="d-light-none" src="{% static 'images/spot-illustrations/star-dark.png' %}" width="54" height="54" alt="" />
|
</div><img class="d-dark-none" src="{% static 'images/spot-illustrations/star.png' %}" width="54" height="54" alt="" /><img class="d-light-none" src="{% static 'images/spot-illustrations/star-dark.png' %}" width="54" height="54" alt="" />
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user