Lines 17-22
Link Here
|
17 |
:config="fp_config" |
17 |
:config="fp_config" |
18 |
/> |
18 |
/> |
19 |
|
19 |
|
|
|
20 |
<label for="by_mine_filter">{{ $__("Show mine only") }}:</label> |
21 |
<input |
22 |
type="checkbox" |
23 |
id="by_mine_filter" |
24 |
v-model="filters.by_mine" |
25 |
@keyup.enter="filter_table" |
26 |
/> |
27 |
|
20 |
<input |
28 |
<input |
21 |
@click="filter_table" |
29 |
@click="filter_table" |
22 |
id="filter_table" |
30 |
id="filter_table" |
Lines 57-62
export default {
Link Here
|
57 |
get_lib_from_av, |
65 |
get_lib_from_av, |
58 |
map_av_dt_filter, |
66 |
map_av_dt_filter, |
59 |
table_id, |
67 |
table_id, |
|
|
68 |
logged_in_user, |
60 |
} |
69 |
} |
61 |
}, |
70 |
}, |
62 |
data: function () { |
71 |
data: function () { |
Lines 68-73
export default {
Link Here
|
68 |
by_expired: this.$route.query.by_expired || false, |
77 |
by_expired: this.$route.query.by_expired || false, |
69 |
max_expiration_date: |
78 |
max_expiration_date: |
70 |
this.$route.query.max_expiration_date || "", |
79 |
this.$route.query.max_expiration_date || "", |
|
|
80 |
by_mine: this.$route.query.by_mine || false, |
71 |
}, |
81 |
}, |
72 |
before_route_entered: false, |
82 |
before_route_entered: false, |
73 |
building_table: false, |
83 |
building_table: false, |
Lines 144-150
export default {
Link Here
|
144 |
let datatable_url = this.datatable_url |
154 |
let datatable_url = this.datatable_url |
145 |
let default_search = this.$route.query.q |
155 |
let default_search = this.$route.query.q |
146 |
let actions = this.before_route_entered ? "edit_delete" : "select" |
156 |
let actions = this.before_route_entered ? "edit_delete" : "select" |
|
|
157 |
let filters = this.filters |
147 |
let table_id = this.table_id |
158 |
let table_id = this.table_id |
|
|
159 |
let logged_in_user = this.logged_in_user |
148 |
|
160 |
|
149 |
window["vendors"] = this.vendors.map(e => { |
161 |
window["vendors"] = this.vendors.map(e => { |
150 |
e["_id"] = e["id"] |
162 |
e["_id"] = e["id"] |
Lines 169-179
export default {
Link Here
|
169 |
{ _id: 1, _str: _("Yes") }, |
181 |
{ _id: 1, _str: _("Yes") }, |
170 |
] |
182 |
] |
171 |
|
183 |
|
|
|
184 |
let additional_filters = { |
185 |
"user_roles.user_id": function () { |
186 |
return filters.by_mine ? logged_in_user.borrowernumber : "" |
187 |
}, |
188 |
} |
172 |
const table = $("#" + table_id).kohaTable( |
189 |
const table = $("#" + table_id).kohaTable( |
173 |
{ |
190 |
{ |
174 |
ajax: { |
191 |
ajax: { |
175 |
url: datatable_url, |
192 |
url: datatable_url, |
176 |
}, |
193 |
}, |
|
|
194 |
embed: ["user_roles"], |
177 |
order: [[0, "asc"]], |
195 |
order: [[0, "asc"]], |
178 |
autoWidth: false, |
196 |
autoWidth: false, |
179 |
search: { search: default_search }, |
197 |
search: { search: default_search }, |
Lines 417-423
export default {
Link Here
|
417 |
}, |
435 |
}, |
418 |
}, |
436 |
}, |
419 |
agreement_table_settings, |
437 |
agreement_table_settings, |
420 |
1 |
438 |
1, |
|
|
439 |
additional_filters |
421 |
) |
440 |
) |
422 |
}, |
441 |
}, |
423 |
}, |
442 |
}, |
424 |
- |
|
|