Uses string replace with regex instead os split for extracting taxonomyId in activites modal.

This commit is contained in:
Mateus Machado Luna 2019-10-01 16:32:11 -03:00
parent 4e5371ce60
commit d0b6267383
1 changed files with 1 additions and 1 deletions

View File

@ -651,7 +651,7 @@
<span class="icon has-text-gray3">&nbsp;<i class="tainacan-icon tainacan-icon-20px tainacan-icon-filters"/></span>`; <span class="icon has-text-gray3">&nbsp;<i class="tainacan-icon tainacan-icon-20px tainacan-icon-filters"/></span>`;
case 'Tainacan\\Entities\\Term': case 'Tainacan\\Entities\\Term':
return `${ this.$i18n.get('term') } return `${ this.$i18n.get('term') }
<a href="${ this.adminFullURL + this.$routerHelper.getTermEditPath(this.activity.object.taxonomy.split('tnc_tax_')[1], this.activity.object_id) }">${ this.activity.object.name }</a> <a href="${ this.adminFullURL + this.$routerHelper.getTermEditPath(this.activity.object.taxonomy.replace( /^\D+/g, ''), this.activity.object_id) }">${ this.activity.object.name }</a>
<span class="icon has-text-gray3">&nbsp;<i class="tainacan-icon tainacan-icon-20px tainacan-icon-terms"/></span>`; <span class="icon has-text-gray3">&nbsp;<i class="tainacan-icon tainacan-icon-20px tainacan-icon-terms"/></span>`;
case 'Tainacan\\Entities\\Item': case 'Tainacan\\Entities\\Item':
return `${ this.$i18n.get('item') } return `${ this.$i18n.get('item') }