Lines 139-144
Link Here
|
139 |
map[l.branchcode] = l; |
139 |
map[l.branchcode] = l; |
140 |
return map; |
140 |
return map; |
141 |
}, {}); |
141 |
}, {}); |
|
|
142 |
|
143 |
[% IF Koha.Preference('ExtendedPatronAttributes') %] |
144 |
let extended_attribute_types = [% To.json(attribute_type_codes) | $raw %]; |
145 |
[% END %] |
142 |
</script> |
146 |
</script> |
143 |
[% INCLUDE 'datatables.inc' %] |
147 |
[% INCLUDE 'datatables.inc' %] |
144 |
[% INCLUDE 'js-date-format.inc' %] |
148 |
[% INCLUDE 'js-date-format.inc' %] |
Lines 160-166
Link Here
|
160 |
let start_with = $("#firstletter_filter").val() |
164 |
let start_with = $("#firstletter_filter").val() |
161 |
if (!start_with) return ""; |
165 |
if (!start_with) return ""; |
162 |
return { "like": start_with + "%" } |
166 |
return { "like": start_with + "%" } |
163 |
} |
167 |
}, |
|
|
168 |
[% IF Koha.Preference('ExtendedPatronAttributes') %] |
169 |
"-or": function(){ |
170 |
let filter = $("#searchmember_filter").val(); |
171 |
if (!filter) return ""; |
172 |
return [ |
173 |
{ |
174 |
"extended_attributes.value": { "like": "%" + filter + "%" } |
175 |
}, |
176 |
{ |
177 |
"extended_attributes.code": extended_attribute_types |
178 |
} |
179 |
]; |
180 |
}, |
181 |
[% END %] |
164 |
}; |
182 |
}; |
165 |
patrons_table = $("#memberresultst").kohaTable({ |
183 |
patrons_table = $("#memberresultst").kohaTable({ |
166 |
"ajax": { |
184 |
"ajax": { |
Lines 177-182
Link Here
|
177 |
"url": '/api/v1/patrons' |
195 |
"url": '/api/v1/patrons' |
178 |
[% END %] |
196 |
[% END %] |
179 |
}, |
197 |
}, |
|
|
198 |
embed: ['extended_attributes'], |
180 |
"order": [[ 1, "asc" ]], |
199 |
"order": [[ 1, "asc" ]], |
181 |
"iDeferLoading": 0, |
200 |
"iDeferLoading": 0, |
182 |
"columns": [ |
201 |
"columns": [ |