Skip to content
Permalink
master
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
{% extends "saas/base_dashboard.html" %}
{% block saas_title %}
{% trans coupon=coupon.code %}{{coupon}} Performance{% endtrans %}
{% endblock %}
{% block saas_lead_help %}
{% endblock %}
{% block saas_content %}
<coupon-user-list inline-template id="coupon-performance">
<div id="coupon-users-container">
<!-- Download as .CSV -->
<div class="col-offset-md-9 col-md-3 mb-3">
<div class="btn-actions text-right">
<a id="download" class="btn btn-secondary btn-md w-100" role="button" :href="'{{urls.coupon_uses_download}}' + getQueryString(['page'])">
<i class="fa fa-cloud-download mr-2"></i> {% trans %}Download .CSV{% endtrans %}
</a>
</div>
</div>
<hr />
<div class="row my-3">
{% include "saas/_filter.html" %}
</div>
<p v-show="itemsLoaded" v-cloak>
{% trans coupon=coupon.code %}{{coupon}} was used{% endtrans %} [[totalItems]] [[totalItems > 0 ? "{% trans %}times{% endtrans %}" : "{% trans %}time{% endtrans %}"]].
</p>
<table class="table table-sm table-striped" infinite-wrapper>
<thead>
<tr>
<th>{% trans %}User{% endtrans %}
<a href="#" class="btn-link btn-sort"
data-trip data-trip-index="5"
data-trip-content="<p>{% trans %}Sort coupon use by ascending and descending order.{% endtrans %}</p>"
data-trip-position="s"
@click.prevent="sortBy('slug')">
<i :class="sortIcon('slug')"></i>
</a>
</th>
<th>{% trans %}Plan{% endtrans %}
<a href="#" class="btn-link btn-sort"
data-trip data-trip-index="5"
data-trip-content="<p>{% trans %}Sort coupon use by ascending and descending order.{% endtrans %}</p>"
data-trip-position="s"
@click.prevent="sortBy('plan')">
<i :class="sortIcon('plan')"></i>
</a>
</th>
<th>{% trans %}Used at{% endtrans %}
<a href="#" class="btn-link btn-sort"
data-trip data-trip-index="5"
data-trip-content="<p>{% trans %}Sort coupon use by ascending and descending order.{% endtrans %}</p>"
data-trip-position="s"
@click.prevent="sortBy('created_at')">
<i :class="sortIcon('created_at')"></i>
</a>
</th>
</tr>
</thead>
<tbody>
<tr v-show="!itemsLoaded">
<td colspan="3">
<h3 class="text-center"><i class="fa fa-refresh fa-spin fa-2x"></i></h3>
</td>
</tr>
<tr v-show="itemsLoaded && items.results.length == 0" v-cloak>
<td colspan="3">
<p class="text-center my-2"><em>{% trans coupon=coupon.code %}No use of {{coupon}} coupon{% endtrans %}<span v-show="params.q"> [[params.q]]</span></em></p>
</td>
</tr>
<tr :id="item.user.slug" v-for="item in items.results" v-show="itemsLoaded && items.results.length" v-cloak>
<td><a :href="'{{urls.profile_redirect}}' + item.user.slug + '/'">[[item.user.full_name]]</a></td>
<td>[[item.plan]]</td>
<td>[[humanizeDate(item.created_at)]]</td>
</tr>
</tbody>
</table>
{% include "_pagination.html" %}
</div>
</coupon-user-list>
{% endblock %}