View | Details | Raw Unified | Return to bug 32939
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementRelationships.vue (-6 / +11 lines)
Lines 85-91 Link Here
85
</template>
85
</template>
86
86
87
<script>
87
<script>
88
import { fetchAgreements } from "../../fetch/erm.js"
88
import { APIClient } from "../../fetch/api-client.js"
89
89
90
export default {
90
export default {
91
    data() {
91
    data() {
Lines 94-104 export default { Link Here
94
        }
94
        }
95
    },
95
    },
96
    beforeCreate() {
96
    beforeCreate() {
97
        fetchAgreements().then(agreements => {
97
        const client = APIClient.erm
98
            this.agreements = agreements.filter(
98
        client.agreements.getAll().then(
99
                agreement => agreement.agreement_id !== this.agreement_id
99
            agreements => {
100
            )
100
                this.agreements = agreements.filter(
101
        })
101
                    agreement => agreement.agreement_id !== this.agreement_id
102
                )
103
                this.initialized = true
104
            },
105
            error => {}
106
        )
102
    },
107
    },
103
    methods: {
108
    methods: {
104
        addRelationship() {
109
        addRelationship() {
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue (-2 / +2 lines)
Lines 95-102 export default { Link Here
95
        async getAgreements() {
95
        async getAgreements() {
96
            const client = APIClient.erm
96
            const client = APIClient.erm
97
            await client.agreements.getAll().then(
97
            await client.agreements.getAll().then(
98
                data => {
98
                agreements => {
99
                    this.agreements = data
99
                    this.agreements = agreements
100
                    this.initialized = true
100
                    this.initialized = true
101
                },
101
                },
102
                error => {}
102
                error => {}
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsShow.vue (-2 / +2 lines)
Lines 348-355 export default { Link Here
348
        async getAgreement(agreement_id) {
348
        async getAgreement(agreement_id) {
349
            const client = APIClient.erm
349
            const client = APIClient.erm
350
            client.agreements.get(agreement_id).then(
350
            client.agreements.get(agreement_id).then(
351
                data => {
351
                agreement => {
352
                    this.agreement = data
352
                    this.agreement = agreement
353
                    this.initialized = true
353
                    this.initialized = true
354
                },
354
                },
355
                error => {}
355
                error => {}
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsLocalPackageAgreements.vue (-6 / +9 lines)
Lines 55-61 Link Here
55
</template>
55
</template>
56
56
57
<script>
57
<script>
58
import { fetchAgreements } from "../../fetch/erm.js"
58
import { APIClient } from "../../fetch/api-client.js"
59
59
60
export default {
60
export default {
61
    data() {
61
    data() {
Lines 65-74 export default { Link Here
65
        }
65
        }
66
    },
66
    },
67
    beforeCreate() {
67
    beforeCreate() {
68
        fetchAgreements().then(agreements => {
68
        const client = APIClient.erm
69
            this.agreements = agreements
69
        client.agreements.getAll().then(
70
            this.initialized = true
70
            agreements => {
71
        })
71
                this.agreements = agreements
72
                this.initialized = true
73
            },
74
            error => {}
75
        )
72
    },
76
    },
73
    methods: {
77
    methods: {
74
        addAgreement() {
78
        addAgreement() {
75
- 

Return to bug 32939