|
Lines 88-93
export default {
Link Here
|
| 88 |
url: () => this.table_url(), |
88 |
url: () => this.table_url(), |
| 89 |
table_settings: this.agreement_table_settings, |
89 |
table_settings: this.agreement_table_settings, |
| 90 |
add_filters: true, |
90 |
add_filters: true, |
|
|
91 |
filters_options: { |
| 92 |
1: () => |
| 93 |
this.vendors.map(e => { |
| 94 |
e["_id"] = e["id"] |
| 95 |
e["_str"] = e["name"] |
| 96 |
return e |
| 97 |
}), |
| 98 |
3: () => this.map_av_dt_filter("av_agreement_statuses"), |
| 99 |
4: () => |
| 100 |
this.map_av_dt_filter("av_agreement_closure_reasons"), |
| 101 |
5: [ |
| 102 |
{ _id: 0, _str: _("No") }, |
| 103 |
{ _id: 1, _str: _("Yes") }, |
| 104 |
], |
| 105 |
6: () => |
| 106 |
this.map_av_dt_filter( |
| 107 |
"av_agreement_renewal_priorities" |
| 108 |
), |
| 109 |
}, |
| 91 |
actions: { |
110 |
actions: { |
| 92 |
0: ["show"], |
111 |
0: ["show"], |
| 93 |
"-1": ["edit", "delete"], |
112 |
"-1": ["edit", "delete"], |
|
Lines 100-106
export default {
Link Here
|
| 100 |
vm.before_route_entered = true // FIXME This is ugly, but we need to distinguish when it's used as main component or child component (from EHoldingsEBSCOPAckagesShow for instance) |
119 |
vm.before_route_entered = true // FIXME This is ugly, but we need to distinguish when it's used as main component or child component (from EHoldingsEBSCOPAckagesShow for instance) |
| 101 |
if (!vm.building_table) { |
120 |
if (!vm.building_table) { |
| 102 |
vm.building_table = true |
121 |
vm.building_table = true |
| 103 |
vm.getAgreements().then(() => vm.initialized = true) |
122 |
vm.getAgreements().then(() => (vm.initialized = true)) |
| 104 |
} |
123 |
} |
| 105 |
}) |
124 |
}) |
| 106 |
}, |
125 |
}, |
|
Lines 473-501
export default {
Link Here
|
| 473 |
getTableColumns: function () { |
492 |
getTableColumns: function () { |
| 474 |
let get_lib_from_av = this.get_lib_from_av |
493 |
let get_lib_from_av = this.get_lib_from_av |
| 475 |
let escape_str = this.escape_str |
494 |
let escape_str = this.escape_str |
| 476 |
window["vendors"] = this.vendors.map(e => { |
|
|
| 477 |
e["_id"] = e["id"] |
| 478 |
e["_str"] = e["name"] |
| 479 |
return e |
| 480 |
}) |
| 481 |
let vendors_map = this.vendors.reduce((map, e) => { |
495 |
let vendors_map = this.vendors.reduce((map, e) => { |
| 482 |
map[e.id] = e |
496 |
map[e.id] = e |
| 483 |
return map |
497 |
return map |
| 484 |
}, {}) |
498 |
}, {}) |
| 485 |
let avs = [ |
|
|
| 486 |
"av_agreement_statuses", |
| 487 |
"av_agreement_closure_reasons", |
| 488 |
"av_agreement_renewal_priorities", |
| 489 |
] |
| 490 |
let c = this |
| 491 |
avs.forEach(function (av_cat) { |
| 492 |
window[av_cat] = c.map_av_dt_filter(av_cat) |
| 493 |
}) |
| 494 |
|
499 |
|
| 495 |
window["av_agreement_is_perpetual"] = [ |
|
|
| 496 |
{ _id: 0, _str: _("No") }, |
| 497 |
{ _id: 1, _str: _("Yes") }, |
| 498 |
] |
| 499 |
return [ |
500 |
return [ |
| 500 |
{ |
501 |
{ |
| 501 |
title: __("Name"), |
502 |
title: __("Name"), |
|
Lines 518-524
export default {
Link Here
|
| 518 |
orderable: true, |
519 |
orderable: true, |
| 519 |
render: function (data, type, row, meta) { |
520 |
render: function (data, type, row, meta) { |
| 520 |
return row.vendor_id != undefined |
521 |
return row.vendor_id != undefined |
| 521 |
? escape_str(vendors_map[row.vendor_id].name) |
522 |
? row.vendor_id //escape_str(vendors_map[row.vendor_id].name) |
| 522 |
: "" |
523 |
: "" |
| 523 |
}, |
524 |
}, |
| 524 |
}, |
525 |
}, |