{% extends 'abase.axml' %} {% from 'actions.axml' import pagination %} {% set modal_name = 'Actions' %} {% macro commander() %} { isFilterable: false, oldPagination: pagination, actionSearch: '', producerSearch: '', schemataSearch: '', whenFilter: '', filterResults(){ let base = `/v1/actions?pagination=${100}&page=${page}` if(this.actionSearch) base = `${base}&action=${this.actionSearch}` if(this.producerSearch) base = `${base}&producer=${this.producerSearch}` if(this.schemataSearch) base = `${base}&schemata=${this.schemataSearch}` if(this.whenFilter) base = `${base}&timeline=${this.whenFilter}` fetch(`${base}`) .then(response => response.json()) .then(data => { isFiltering = true; actions = data; }).catch(err => { ShowFeedback('error', 'Filter operation failed...') }) }, clearFilter(){ this.actionSearch = ''; this.producerSearch = ''; this.schemataSearch = ''; this.whenFilter = ''; isFiltering = false; fetchAll(); }, checkDirty(){ if(this.actionSearch !== '' || this.producerSearch !== '' || this.schemataSearch !== '' || this.whenFilter !== '' ) { this.isFilterable = true; return true; } this.isFilterable = false; return false; } } {% endmacro %} {% block easel %} {% endblock %} {% block wizard %} Action Name: Producer: Select A Producer Passphrase: Schema (JSON): { supertoast('info', 'Click the save button below to save this action') }"> Save Action {% endblock %}