Update for new format of data returned from api

- API will now send through `created_by_name` instead of `created_by`.
- API will always send through `current_month_billable_sms` but this can
now be `0` instead of `None`.
This commit is contained in:
Katie Smith
2019-05-02 09:25:57 +01:00
parent a74da6d14e
commit 259a82e066
3 changed files with 17 additions and 30 deletions

View File

@@ -1,5 +1,5 @@
{% extends "views/platform-admin/_base_template.html" %}
{% from "components/table.html" import list_table, field, text_field, link_field, right_aligned_field_heading, hidden_field_heading %}
{% from "components/table.html" import list_table, field, text_field, link_field, right_aligned_field_heading, hidden_field_heading, optional_text_field %}
{% from "components/show-more.html" import show_more %}
{% block per_page_title %}
@@ -35,11 +35,7 @@ Providers
{{ text_field('None') }}
{% endif %}
{% if item.created_by %}
{{ text_field(item.created_by.name) }}
{% else %}
{{ text_field('None') }}
{% endif %}
{{ optional_text_field(item.created_by_name, default='None') }}
{{ link_field('change', url_for('main.edit_provider', provider_id=item.id)) }}
@@ -68,11 +64,7 @@ Providers
{{ text_field('None') }}
{% endif %}
{% if item.created_by %}
{{ text_field(item.created_by.name) }}
{% else %}
{{ text_field('None') }}
{% endif %}
{{ optional_text_field(item.created_by_name, default='None') }}
{{ link_field('change', url_for('main.edit_provider', provider_id=item.id)) }}
@@ -101,11 +93,7 @@ Providers
{{ text_field('None') }}
{% endif %}
{% if item.created_by %}
{{ text_field(item.created_by.name) }}
{% else %}
{{ text_field('None') }}
{% endif %}
{{ optional_text_field(item.created_by_name, default='None') }}
{{ link_field('change', url_for('main.edit_provider', provider_id=item.id)) }}