Fixed initial filters
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
a0767a6ea2
commit
16d7186829
|
@ -78,7 +78,7 @@ export default class Searchbar extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
fetchStateFilter(autoLoad) {
|
fetchStateFilter(autoLoad) {
|
||||||
let filter = null;
|
let filter = this.filter ? this.filter : null;
|
||||||
|
|
||||||
if (this.$state.is(this.searchState)) {
|
if (this.$state.is(this.searchState)) {
|
||||||
if (this.$params.q) {
|
if (this.$params.q) {
|
||||||
|
|
|
@ -51,8 +51,11 @@
|
||||||
</vn-date-picker>
|
</vn-date-picker>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
<vn-horizontal>
|
<vn-horizontal>
|
||||||
<vn-one>
|
<vn-check vn-one
|
||||||
</vn-one>
|
triple-state="true"
|
||||||
|
label="For me"
|
||||||
|
ng-model="filter.mine">
|
||||||
|
</vn-check>
|
||||||
<vn-check
|
<vn-check
|
||||||
vn-one
|
vn-one
|
||||||
triple-state="true"
|
triple-state="true"
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
Ink: Tinta
|
Ink: Tinta
|
||||||
Origin: Origen
|
Origin: Origen
|
||||||
Producer: Productor
|
Producer: Productor
|
||||||
|
For me: Para mi
|
|
@ -1,6 +1,7 @@
|
||||||
<vn-crud-model
|
<vn-crud-model
|
||||||
vn-id="model"
|
vn-id="model"
|
||||||
url="TicketRequests/filter"
|
url="TicketRequests/filter"
|
||||||
|
user-params="::$ctrl.filterParams"
|
||||||
limit="20"
|
limit="20"
|
||||||
data="requests"
|
data="requests"
|
||||||
order="shipped DESC, isOk ASC"
|
order="shipped DESC, isOk ASC"
|
||||||
|
@ -9,16 +10,16 @@
|
||||||
<vn-portal slot="topbar">
|
<vn-portal slot="topbar">
|
||||||
<vn-searchbar
|
<vn-searchbar
|
||||||
panel="vn-request-search-panel"
|
panel="vn-request-search-panel"
|
||||||
suggested-filter="$ctrl.filter.where"
|
suggested-filter="$ctrl.filterParams"
|
||||||
info="Search request by id or alias"
|
info="Search request by id or alias"
|
||||||
filter="$ctrl.filter"
|
filter="$ctrl.filterParams"
|
||||||
model="model"
|
model="model"
|
||||||
auto-state="false">
|
auto-state="false">
|
||||||
</vn-searchbar>
|
</vn-searchbar>
|
||||||
</vn-portal>
|
</vn-portal>
|
||||||
<vn-data-viewer model="model">
|
<vn-data-viewer model="model">
|
||||||
<vn-card>
|
<vn-card>
|
||||||
<vn-table model="model">
|
<vn-table model="model" auto-load="false">
|
||||||
<vn-thead>
|
<vn-thead>
|
||||||
<vn-tr>
|
<vn-tr>
|
||||||
<vn-th field="ticketFk" number>Ticket ID</vn-th>
|
<vn-th field="ticketFk" number>Ticket ID</vn-th>
|
||||||
|
@ -82,7 +83,7 @@
|
||||||
{{request.itemDescription}}
|
{{request.itemDescription}}
|
||||||
</span>
|
</span>
|
||||||
</vn-td>
|
</vn-td>
|
||||||
<vn-td>{{$ctrl.getState(request.isOk)}} {{request.isOk}}</vn-td>
|
<vn-td>{{$ctrl.getState(request.isOk)}}</vn-td>
|
||||||
<vn-td>
|
<vn-td>
|
||||||
<vn-icon
|
<vn-icon
|
||||||
ng-if="request.response.length"
|
ng-if="request.response.length"
|
||||||
|
|
|
@ -14,13 +14,11 @@ export default class Controller extends Section {
|
||||||
lastWeek.setHours(0, 0, 0, 0);
|
lastWeek.setHours(0, 0, 0, 0);
|
||||||
lastWeek.setDate(lastWeek.getDate() - 7);
|
lastWeek.setDate(lastWeek.getDate() - 7);
|
||||||
|
|
||||||
this.filter = {
|
this.filterParams = {
|
||||||
where: {
|
isOk: null,
|
||||||
isOk: false,
|
|
||||||
mine: true,
|
mine: true,
|
||||||
from: lastWeek,
|
from: lastWeek,
|
||||||
to: today
|
to: today
|
||||||
}
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue