{% extends (app.request.isXmlHttpRequest) ? "::adminBaseAjax.html.twig" : app.request.get('project_setting').instance_theme_path~":AdminTheme:base.html.twig" %} {% block breadcrumb %}
  • {{ 'Categories' | trans }}
  • {% endblock breadcrumb %} {% block main_page_title %}

    {% block form_title %} {{ 'Category Schedular' | trans}} {% endblock form_title %}

    {% endblock main_page_title %} {% block main_content %}
    {% block ajax_body %} {% if data|length > 0 %} {% set stepTime = 0 %} {% for index,info in data %} {% endfor %} {% else %} {% endif %} {% endblock ajax_body %}
    {{ 'Id' }} {{ 'Action' }} {{ 'Category Name' }} {{ 'Product Count' }} {{ 'Status' }} {{ 'Datetime' }}
    {{ info.id }} {{ info.categoryStatus }} {{ info.name }} {{ (info.productCount is defined) ? info.productCount : 0 }} {% if info.status=="Progress" %} {{ 'In Progress' }} {% set stepTime = 3 %} {% else %} {% if info.status=="Done" %} {{ 'Done' }} {% else %} {{ 'Pending' }} {% if stepTime >0 %} {% set now = "now"|date("U") %} {% set estimated = data[0].estimateTime|date('U') + (stepTime*60) %} {% set diffSeconds = estimated - now %} {% set finalMinutes = diffSeconds > 0 ? diffSeconds : 0 %} {% if finalMinutes >0 %}
    NEXT ( ETA : {{ '%02d:%02d'|format((finalMinutes / 60)|round(0, 'floor'), finalMinutes % 60) }} mins ) {% set stepTime = stepTime+3 %} {% endif %} {% endif %} {% endif %} {% endif %}
    {{ info.createdAt | date('Y-m-d H:i:s') }}
    {{ 'No records found'|trans }}
    {{ "admin.request_info.total_record" | trans }}:({{ data.getTotalItemCount }})
    {% endblock main_content %} {% block footer_js %} {{ parent() }} {% javascripts '@OfficeBrainOrderBundle/Resources/public/js/admin-common.js' %} {% endjavascripts %} {% endblock footer_js %}