From 8c32f186d5a62e742621c35cfacff5b22bb42b71 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 15 Mar 2022 07:46:39 +0100 Subject: [PATCH] Bug 32030: ERM - Remove BootstrapVue3 We are lacking behind, Koha is using Bootstrap 3.5 and BootstrapVue3 is using Bootstrap 5. It's a shame, it would be much easier to use BootstrapVue! Signed-off-by: Jonathan Field Signed-off-by: Martin Renvoize Signed-off-by: Kyle M Hall Signed-off-by: Tomas Cohen Arazi --- .../intranet-tmpl/prog/js/vue/Agreements.vue | 4 +- .../vue/components/ERM/AgreementPeriods.vue | 6 +- .../vue/components/ERM/AgreementUserRoles.vue | 17 +- .../vue/components/ERM/AgreementsFormAdd.vue | 338 +++++++++--------- .../ERM/AgreementsFormConfirmDelete.vue | 53 ++- .../vue/components/ERM/AgreementsToolbar.vue | 7 +- .../intranet-tmpl/prog/js/vue/main-erm.ts | 5 - 7 files changed, 206 insertions(+), 224 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/Agreements.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/Agreements.vue index 813b769bd3..fdca901b24 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/Agreements.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/Agreements.vue @@ -1,7 +1,7 @@ diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementUserRoles.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementUserRoles.vue index 6571f5201e..4c8759ac5c 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementUserRoles.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementUserRoles.vue @@ -27,9 +27,9 @@
  • - - - + + - + {{ r.lib }} + + Required
  • @@ -50,9 +51,9 @@ name="selected_patron_id" id="selected_patron_id" /> - + Add new user diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsFormAdd.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsFormAdd.vue index 0f81913d40..af0133be49 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsFormAdd.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsFormAdd.vue @@ -2,173 +2,172 @@

    Edit agreement

    New agreement

    - - - - Required - - - - - {{ vendor.name }} - - - - - Required - - - - - {{ status.lib }} - - Required - - - - - {{ r.lib }} - - - - - - - - - - {{ p.lib }} - - - - - +
    +
    +
      +
    1. + + + Required +
    2. +
    3. + + +
    4. +
    5. + + + Required +
    6. +
    7. + + + Required +
    8. +
    9. + + +
    10. +
    11. + + + +
    12. +
    13. + + +
    14. +
    15. + + +
    16. - - - - Submit - Cancel - + + +
    +
    +
    + + Cancel +
    +
    @@ -179,7 +178,6 @@ import AgreementUserRoles from './AgreementUserRoles.vue' export default { data() { return { - is_perpetual_options: [{ text: "Yes", value: true }, { text: "No", value: false }], agreement: { agreement_id: null, name: '', @@ -212,7 +210,8 @@ export default { ) }, methods: { - onSubmit() { + onSubmit(e) { + e.preventDefault() //let agreement= Object.assign( {} ,this.agreement); // copy let agreement = JSON.parse(JSON.stringify(this.agreement)) // copy @@ -227,6 +226,7 @@ export default { apiUrl += '/' + agreement.agreement_id } delete agreement.agreement_id + agreement.is_perpetual = agreement.is_perpetual ? true : false agreement.periods.forEach(p => { p.started_on = $date_to_rfc3339(p.started_on) @@ -261,7 +261,7 @@ export default { }, onStatusChange(status) { if (status == 'closed') { - this.agreement.closure_reason = '' + this.agreement.closure_reason = '' } } }, diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsFormConfirmDelete.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsFormConfirmDelete.vue index 36737cd705..a8873dc770 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsFormConfirmDelete.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsFormConfirmDelete.vue @@ -1,37 +1,25 @@ @@ -59,7 +47,8 @@ export default { ) }, methods: { - onSubmit() { + onSubmit(e) { + e.preventDefault() let apiUrl = '/api/v1/erm/agreements/' + this.agreement_id diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsToolbar.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsToolbar.vue index 61198d9733..7add34b7c0 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsToolbar.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsToolbar.vue @@ -1,9 +1,6 @@ diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/main-erm.ts b/koha-tmpl/intranet-tmpl/prog/js/vue/main-erm.ts index ecb0e1cefc..691a47f31d 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/main-erm.ts +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/main-erm.ts @@ -1,8 +1,4 @@ import {createApp} from 'vue' -import BootstrapVue3 from 'bootstrap-vue-3' - -//import 'bootstrap/dist/css/bootstrap.css' -import 'bootstrap-vue-3/dist/bootstrap-vue-3.css' import {library} from "@fortawesome/fontawesome-svg-core" import {faPlus, faPencil, faTrash} from "@fortawesome/free-solid-svg-icons" @@ -14,5 +10,4 @@ import App from './Agreements.vue' createApp(App) .component("font-awesome-icon", FontAwesomeIcon) - .use(BootstrapVue3) .mount('#agreements') -- 2.39.5