display when a custom domain is created and number of aliases

This commit is contained in:
Son NK 2019-12-02 00:33:49 +00:00
parent 24cb2688ca
commit 3402d64249
2 changed files with 7 additions and 0 deletions

View File

@ -21,6 +21,10 @@
<i class="fe fe-check" style="color: green"></i>
{% endif %}
</h5>
<h6 class="card-subtitle mb-2 text-muted">
Created {{ custom_domain.created_at | dt }} <br>
<span class="font-weight-bold">{{ custom_domain.nb_alias() }}</span> aliases.
</h6>
{% if not custom_domain.verified %}
<hr>

View File

@ -631,3 +631,6 @@ class CustomDomain(db.Model, ModelMixin):
domain = db.Column(db.String(128), unique=True, nullable=False)
verified = db.Column(db.Boolean, nullable=False, default=False)
def nb_alias(self):
return GenEmail.filter_by(custom_domain_id=self.id).count()