|
Lines 218-226
Link Here
|
| 218 |
}); |
218 |
}); |
| 219 |
const item_types_notforloan = new Map(all_item_types.map( it => [it.itemtype, it.notforloan] )); |
219 |
const item_types_notforloan = new Map(all_item_types.map( it => [it.itemtype, it.notforloan] )); |
| 220 |
|
220 |
|
| 221 |
const statuses = {checked_out: _("Checked out"), local_use: _("On-site checkout"), in_transit: _("In transit"), lost: _("Lost"), withdrawn: _("Withdrawn"), damaged:_("Damaged"), not_for_loan: _("Not for loan"), on_hold: _("On hold"), recalled: _("Recalled"), available: _("Available"), restricted: _("Restricted"), in_bundle: _("In bundle")}; |
|
|
| 222 |
const all_statuses = Object.keys(statuses).map(k => {return {_id: k, _str: statuses[k]}}); |
| 223 |
|
| 224 |
const can_edit_items_from = [% To.json(can_edit_items_from || []) | $raw %]; |
221 |
const can_edit_items_from = [% To.json(can_edit_items_from || []) | $raw %]; |
| 225 |
const item_type_image_locations = [% To.json(item_type_image_locations) | $raw %]; |
222 |
const item_type_image_locations = [% To.json(item_type_image_locations) | $raw %]; |
| 226 |
const av_loc = new Map([% To.json(AuthorisedValues.Get('LOC')) | $raw %].map( av => [av.authorised_value, av.lib])); |
223 |
const av_loc = new Map([% To.json(AuthorisedValues.Get('LOC')) | $raw %].map( av => [av.authorised_value, av.lib])); |
|
Lines 240-245
Link Here
|
| 240 |
location: new Map([% To.json(AuthorisedValues.GetDescriptionsByKohaField({ kohafield => 'items.location' })) | $raw %].map( av => [av.lib, av.authorised_value])), |
237 |
location: new Map([% To.json(AuthorisedValues.GetDescriptionsByKohaField({ kohafield => 'items.location' })) | $raw %].map( av => [av.lib, av.authorised_value])), |
| 241 |
}; |
238 |
}; |
| 242 |
|
239 |
|
|
|
240 |
const statuses = { |
| 241 |
checked_out: _("Checked out"), |
| 242 |
local_use: _("On-site checkout"), |
| 243 |
in_transit: _("In transit"), |
| 244 |
lost: _("Lost"), |
| 245 |
...Object.fromEntries( |
| 246 |
[...av_lost].map(([k, v]) => [`lost-${k}`, `* ${v}`]) |
| 247 |
), |
| 248 |
withdrawn: _("Withdrawn"), |
| 249 |
...Object.fromEntries( |
| 250 |
[...av_withdrawn].map(([k, v]) => [`withdrawn-${k}`, `* ${v}`]) |
| 251 |
), |
| 252 |
damaged:_("Damaged"), |
| 253 |
...Object.fromEntries( |
| 254 |
[...av_damaged].map(([k, v]) => [`damaged-${k}`, `* ${v}`]) |
| 255 |
), |
| 256 |
not_for_loan: _("Not for loan"), |
| 257 |
...Object.fromEntries( |
| 258 |
[...av_not_for_loan].map(([k, v]) => [`not_for_loan-${k}`, `* ${v}`]) |
| 259 |
), |
| 260 |
on_hold: _("On hold"), |
| 261 |
recalled: _("Recalled"), |
| 262 |
available: _("Available"), |
| 263 |
restricted: _("Restricted"), |
| 264 |
in_bundle: _("In bundle"), |
| 265 |
}; |
| 266 |
const all_statuses = Object.keys(statuses).map(k => {return {_id: k, _str: statuses[k]}}); |
| 267 |
|
| 243 |
let filters_options = { |
268 |
let filters_options = { |
| 244 |
item_types: all_item_types, |
269 |
item_types: all_item_types, |
| 245 |
libraries: all_libraries, |
270 |
libraries: all_libraries, |