{% extends 'clean_base.axml' %} {% from 'actions.axml' import pagination %} {% set modal_name = 'Create New Action' %} {% macro commander() %} { isFilterable: false, actionSearch: '', applicationSearch: '', schemataSearch: '', whenFilter: '', filterResults(){ let base = `/v1/actions?pagination=${this.pagination}&page=1` if(this.actionSearch) base += `&action=${this.actionSearch}` if(this.applicationSearch) base += `&application=${this.applicationSearch}` if(this.schemataSearch) base += `&schemata=${this.schemataSearch}` if(this.whenFilter) base += `&timeline=${this.whenFilter}` fetch(base) .then(r => r.json()) .then(data => { isFiltering = true; actions = data; }).catch(err => ShowFeedback('error', 'Filter operation failed')) }, clearFilter(){ this.actionSearch = ''; this.applicationSearch = ''; this.schemataSearch = ''; this.whenFilter = ''; isFiltering = false; fetchAll(); }, checkDirty(){ this.isFilterable = ( this.actionSearch !== '' || this.applicationSearch !== '' || this.schemataSearch !== '' || this.whenFilter !== '' ); return this.isFilterable; } } {% endmacro %} {% block easel %}
{% endblock %} {% block wizard %} {% endblock %}