No sorting for non-ccpo users

This commit is contained in:
richard-dds 2018-10-31 15:52:52 -04:00
parent 63d5f3d25c
commit bb903ece9f
2 changed files with 6 additions and 2 deletions

View File

@ -133,9 +133,13 @@ export default {
}, },
dollars: (value) => formatDollars(value, false), dollars: (value) => formatDollars(value, false),
updateSortValue: function(columnName) { updateSortValue: function(columnName) {
if (!this.isExtended) { return }
// toggle ascending / descending if column is clicked twice
if (columnName === this.sort.columnName) { if (columnName === this.sort.columnName) {
this.sort.isAscending = !this.sort.isAscending this.sort.isAscending = !this.sort.isAscending
} }
this.sort.columnName = columnName; this.sort.columnName = columnName;
}, },
}, },

View File

@ -102,8 +102,8 @@
<table> <table>
<thead> <thead>
<tr> <tr>
<th v-for="column in getColumns()"scope="col"> <th @click.prevent="updateSortValue(column.attr)" v-for="column in getColumns()"scope="col">
<a @click.prevent="updateSortValue(column.attr)" href="">!{ column.displayName }</a> !{ column.displayName }
<span v-if="column.attr === sort.columnName && sort.isAscending" class="icon icon--caret_up" aria-idden="true"> <span v-if="column.attr === sort.columnName && sort.isAscending" class="icon icon--caret_up" aria-idden="true">
{{ Icon("caret_down") }} {{ Icon("caret_down") }}
</span> </span>