{% extends 'base.html.twig' %} {% set titleName = "Converty Configuration" %} {% block title %} POWER DATA | {{titleName}} {% endblock %} {% block page %}{{titleName}}{% endblock %} {% block breadcrumb %} {% if titleName != "Home" %} {{titleName}} {% endif %} {% endblock %} {% block content %}
{% for message in app.flashes('success') %} {% endfor %} {% for message in app.flashes('error') %} {% endfor %}
{{ form_start(form) }}
Configuration for API
{{ form_widget(form.clientId) }}
{{ form_widget(form.clientSecret) }}
{{ form_widget(form.authorizationCode) }}
{{ form_widget(form.refreshToken) }}
{{ form_widget(form.token) }}
{{ form_widget(form.maxOrdersPerPage) }}
{{ form_widget(form.filterStatus) }}
{{ form_widget(form.statusOut) }}
{{ form_end(form) }}
{% if converty.expiresAt is not null %} {% set issuedAt = "now"|date('U') %} {# current timestamp in seconds #} {% set expiresIn = converty.expiresAt %} {% set expiresAt = issuedAt + expiresIn %} {% set remainingDays = ((expiresAt - issuedAt) / 86400) | round(0, 'floor') %}

Token expires on: {{ expiresAt|date('Y-m-d') }}
You have {{ remainingDays }} day{{ remainingDays > 1 ? 's' : '' }} left.

{% else %}

No expiration date available.

{% endif %}
Update Access Tokens {% if app.request.scheme ~ '://' ~ app.request.host == 'http://walid.jumia' %} Update Local Data {% endif %}
{% endblock %} {% block script %} {% endblock %}