{% extends 'frontend/layouts/index.html.twig' %} {% set active = 'app_admin_dashboard' %} {% set breadcrumbs = [ { 'link': path('app_front_account'), 'title': 'Home' }, { 'title': 'Dashboard', } ]%} {% block content %}
| Order | Start Date | End Date | Product | Trial Time | Status | {#Daily Running | #}Period of Time | Auto Renewal | {#Config | #}||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
#{{ subscription.paymentid.orderid.id }} |
{{ subscription.startdate ? subscription.startdate|date('Y-m-d') : 'N/A' }} | {{ subscription.enddate ? subscription.enddate|date('Y-m-d') : 'N/A' }} | {% if subscription.paymentid.orderid.productid %} {% set hasProduct = true %} {{ subscription.paymentid.orderid.productid.name }} {% else %} N/A {% endif %} | {% set trialDaysLeft = subscription.trialDaysLeft %} {% set hasTrials = subscription.hasTrials %} {% set status = subscription.status %} {% if hasTrials %} {% if trialDaysLeft > 0 and subscription.status|lower == 'trialing' %} {{ trialDaysLeft }} days left {% elseif trialDaysLeft == 0 and status|lower == 'trialing' %} Today is the last day of your trial {% else %} Trial period ended {% endif %} {% else %} No trial period {% endif %} | {% if subscription.paymentid.orderid.productid.role == "saas" and subscription.userid.connectwithappaigrowth == 1 %} Completed {% elseif subscription.paymentid.orderid.productid.role == "mother_child" %} Completed {% elseif subscription.paymentid.orderid.productid.role == "basic_pro_expert" %} Completed {% else %} Waiting for your actions {% endif %} | {#{% set startDate = subscription.startdate %} {% set duration = subscription.duration %} {% if duration > 0 %} {% set currentDate = "now"|date("Y-m-d") %} {% set subscriptionEndDate = startDate|date_modify('+' ~ duration ~ ' months') %} {% set timeElapsed = currentDate|date_modify('midnight')|date_modify('midnight')|date('U') - startDate|date_modify('midnight')|date_modify('midnight')|date('U') %} {% set totalTime = subscriptionEndDate|date_modify('midnight')|date_modify('midnight')|date('U') - startDate|date_modify('midnight')|date_modify('midnight')|date('U') %} {% if timeElapsed > 0 %} {% set completionPercentage = (timeElapsed / totalTime) * 100 %} {{ (completionPercentage < 100 ) ? completionPercentage|round : 100 }}% {% else %} 0% {% endif %} {% endif %} | #}
{% set startDate = subscription.startDate|date("Y-m-d") %}
{% set endDate = startDate|date_modify('+' ~ subscription.duration ~ ' months') %}
{% set currentDate = "now"|date("Y-m-d") %}
{% set totalDays = (endDate|date("U") - startDate|date("U")) / (24 * 60 * 60) %}
{% set currentDays = (currentDate|date("U") - startDate|date("U")) / (24 * 60 * 60) %}
{% set totalWeeks = (totalDays / 7)|round(0, 'floor') %}
{% set currentWeek = (currentDays / 7)|round(0, 'floor') %}
Week
{{ currentWeek < totalWeeks ? currentWeek ~ ' / ' ~ totalWeeks : totalWeeks ~ ' / ' ~ totalWeeks }}
|
{% set currentDate = "now"|date("Y-m-d") %}
{% set isExpired = subscription.enddate and subscription.enddate|date("Y-m-d") < currentDate %}
{% if subscription.autorenewal == 1 %}
{% if subscription.getWordpressSubscriptionId is empty %}
{% else %}
ON
{% endif %}
{% else %}
{% if subscription.getWordpressSubscriptionId is empty %}
{% else %}
OFF
{% endif %}
{% endif %}
|
{#{% if app.request.server.get('WHITE_LABLE_CLIENT') == "ai_growth" %}
{% if subscription.paymentid.orderid.productid.role == "saas" %}
Login with SaaS | {% elseif subscription.paymentid.orderid.productid.role == "mother_child" %}AI Channel Mother Child | {% elseif subscription.paymentid.orderid.productid.role == "basic_pro_expert" %}AI Channel Growth | {% else %}
|
{% endif %}
{% else %}
{% endif %}#} |