Lines 58-63
export default {
Link Here
|
58 |
erm_package.provider = "ebsco" |
58 |
erm_package.provider = "ebsco" |
59 |
erm_package.package_id = erm_package.koha_internal_id |
59 |
erm_package.package_id = erm_package.koha_internal_id |
60 |
delete erm_package.koha_internal_id |
60 |
delete erm_package.koha_internal_id |
|
|
61 |
delete erm_package.resources |
62 |
delete erm_package.vendor |
63 |
delete erm_package.resources_count |
64 |
delete erm_package.is_selected |
61 |
return erm_package |
65 |
return erm_package |
62 |
}, |
66 |
}, |
63 |
addAgreement(agreement_id) { |
67 |
addAgreement(agreement_id) { |
Lines 72-78
export default {
Link Here
|
72 |
) { |
76 |
) { |
73 |
erm_package.package_agreements.push({ agreement_id }) |
77 |
erm_package.package_agreements.push({ agreement_id }) |
74 |
const client = APIClient.erm |
78 |
const client = APIClient.erm |
|
|
79 |
|
75 |
if (this.erm_package.koha_internal_id) { |
80 |
if (this.erm_package.koha_internal_id) { |
|
|
81 |
let package_id = erm_package.package_id |
82 |
delete erm_package.package_id |
76 |
client.localPackages.update(erm_package, package_id).then( |
83 |
client.localPackages.update(erm_package, package_id).then( |
77 |
success => { |
84 |
success => { |
78 |
this.$emit("refresh-agreements") |
85 |
this.$emit("refresh-agreements") |
Lines 97-104
export default {
Link Here
|
97 |
}, |
104 |
}, |
98 |
deleteAgreement(counter) { |
105 |
deleteAgreement(counter) { |
99 |
let erm_package = this.serializeAgreement() |
106 |
let erm_package = this.serializeAgreement() |
100 |
const client = APIClient.erm |
|
|
101 |
erm_package.package_agreements.splice(counter, 1) |
107 |
erm_package.package_agreements.splice(counter, 1) |
|
|
108 |
let package_id = erm_package.package_id |
109 |
delete erm_package.package_id |
110 |
const client = APIClient.erm |
102 |
client.localPackages.update(erm_package, package_id).then( |
111 |
client.localPackages.update(erm_package, package_id).then( |
103 |
success => { |
112 |
success => { |
104 |
this.$emit("refresh-agreements") |
113 |
this.$emit("refresh-agreements") |