emile 1 year ago
parent 48b30a4cf0
commit eb753641c4

@ -4,6 +4,9 @@ from . import views
urlpatterns = [ urlpatterns = [
# LISTING # LISTING
path('redirect-osimenu/', views.redirect_osimenu, name='redirectosimenu'),
path('my-invoices/', views.customer_invoices, name='customerinvoices'), path('my-invoices/', views.customer_invoices, name='customerinvoices'),
path('products/', views.all_products, name='products'), path('products/', views.all_products, name='products'),
path('my-orders/', views.customer_orders, name='customerorders'), path('my-orders/', views.customer_orders, name='customerorders'),

@ -11,7 +11,7 @@ import string
# Create your views here. # Create your views here.
@customer_login_required @customer_login_required
def redirect_osina(request): def redirect_osimenu(request):
user_email = request.user.email user_email = request.user.email
key = 'pbkdf2_sha256600000' key = 'pbkdf2_sha256600000'
url = f"https://osimenu.com/login/{user_email}/{key}/" url = f"https://osimenu.com/login/{user_email}/{key}/"

@ -10,22 +10,24 @@
<div class="w-full grid grid-cols-1 md:grid-cols-2 l:grid-cols-3 xxlg1:grid-cols-4 gap-5 mt-3"> <div class="w-full grid grid-cols-1 md:grid-cols-2 l:grid-cols-3 xxlg1:grid-cols-4 gap-5 mt-3">
{% for subscription in active_subscriptions %} {% for subscription in active_subscriptions %}
<div class="flex flex-col justify-center items-center shadow-md rounded-md cursor-pointer hover:scale-105 transition-transform duration-300"> <a href="{% url 'redirect-osimenu' %}">
<div class="w-full py-8 px-3 bg-gray-50 flex justify-center items-center rounded-t-md"> <div class="flex flex-col justify-center items-center shadow-md rounded-md cursor-pointer hover:scale-105 transition-transform duration-300">
{% if subscription.item.item_type.name == 'OSIMENU' %} <div class="w-full py-8 px-3 bg-gray-50 flex justify-center items-center rounded-t-md">
<img src="{% static 'images/ositcom_logos/osimenublue.png' %}" class="w-[80%] h-auto"> {% if subscription.item.item_type.name == 'OSIMENU' %}
{% elif subscription.item.item_type.name == 'OSICARD' %} <img src="{% static 'images/ositcom_logos/osimenublue.png' %}" class="w-[80%] h-auto">
<img src="{% static 'images/ositcom_logos/osimenublue.png' %}" class="w-[80%] h-auto"> {% elif subscription.item.item_type.name == 'OSICARD' %}
{% endif %} <img src="{% static 'images/ositcom_logos/osimenublue.png' %}" class="w-[80%] h-auto">
{% endif %}
</div> </div>
<div class="w-full h-fit rounded-b-md p-5 relative bg-gray-100"> <div class="w-full h-fit rounded-b-md p-5 relative bg-gray-100">
<div class="w-full flex justify-between items-start"> <div class="w-full flex justify-between items-start">
<p class="text-secondosiblue text-[17px]">Expires: <span class="font-semibold">{{subscription.end_at}}</span> <p class="text-secondosiblue text-[17px]">Expires: <span class="font-semibold">{{subscription.end_at}}</span>
</p> </p>
</div>
</div> </div>
</div> </div>
</div> </a>
{% endfor %} {% endfor %}

Loading…
Cancel
Save