From 34c9548d5dc69d0237a9300db82bd630c2091dd1 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 26 May 2022 08:27:26 +0200 Subject: [PATCH] Bug 32030: Rename Package|Resource|Title At this point we renamed eHoldings to Titles and eHoldings-package to Resource. Packages, resources and titles are now under the eholdings namespace. Signed-off-by: Jonathan Field Signed-off-by: Martin Renvoize Signed-off-by: Kyle M Hall Signed-off-by: Tomas Cohen Arazi --- Koha/ERM/{ => EHoldings}/Package.pm | 14 +- Koha/ERM/{ => EHoldings}/Package/Agreement.pm | 6 +- .../Package/Agreements.pm} | 11 +- Koha/ERM/{EHolding => EHoldings}/Packages.pm | 8 +- .../Package.pm => EHoldings/Resource.pm} | 25 +- .../Agreements.pm => EHoldings/Resources.pm} | 11 +- Koha/ERM/{EHolding.pm => EHoldings/Title.pm} | 28 +- Koha/ERM/{Packages.pm => EHoldings/Titles.pm} | 10 +- Koha/REST/V1/ERM/{ => EHoldings}/Packages.pm | 24 +- .../ERM/{EHoldings.pm => EHoldings/Titles.pm} | 66 ++--- ...ackage.yaml => erm_eholdings_package.yaml} | 2 +- ...l => erm_eholdings_package_agreement.yaml} | 0 ...ckage.yaml => erm_eholdings_resource.yaml} | 9 +- ...eholding.yaml => erm_eholdings_title.yaml} | 61 ++--- ...kages.yaml => erm_eholdings_packages.yaml} | 54 ++-- ...oldings.yaml => erm_eholdings_titles.yaml} | 143 +++++----- api/v1/swagger/swagger.yaml | 42 +-- cypress/integration/Packages_spec.ts | 44 +-- installer/data/mysql/atomicupdate/erm.pl | 35 +-- installer/data/mysql/kohastructure.sql | 45 ++-- .../intranet-tmpl/prog/en/modules/erm/erm.tt | 24 +- ...nts.vue => EHoldingsPackageAgreements.vue} | 2 +- ...rmAdd.vue => EHoldingsPackagesFormAdd.vue} | 18 +- ...=> EHoldingsPackagesFormConfirmDelete.vue} | 8 +- ...agesList.vue => EHoldingsPackagesList.vue} | 14 +- ...agesShow.vue => EHoldingsPackagesShow.vue} | 8 +- ...olbar.vue => EHoldingsPackagesToolbar.vue} | 4 +- ...ingPackages.vue => EHoldingsResources.vue} | 35 +-- ...FormAdd.vue => EHoldingsTitlesFormAdd.vue} | 252 +++++++++--------- ...e => EHoldingsTitlesFormConfirmDelete.vue} | 22 +- ...ldingsList.vue => EHoldingsTitlesList.vue} | 61 +++-- ...ldingsShow.vue => EHoldingsTitlesShow.vue} | 111 ++++---- .../components/ERM/EHoldingsTitlesToolbar.vue | 12 + .../vue/components/ERM/EHoldingsToolbar.vue | 12 - .../prog/js/vue/components/ERM/ERMMain.vue | 6 +- .../js/vue/components/ERM/LicensesShow.vue | 1 - koha-tmpl/intranet-tmpl/prog/js/vue/fetch.js | 28 +- koha-tmpl/intranet-tmpl/prog/js/vue/routes.js | 85 +++--- 38 files changed, 676 insertions(+), 665 deletions(-) rename Koha/ERM/{ => EHoldings}/Package.pm (74%) rename Koha/ERM/{ => EHoldings}/Package/Agreement.pm (86%) rename Koha/ERM/{EHoldings.pm => EHoldings/Package/Agreements.pm} (74%) rename Koha/ERM/{EHolding => EHoldings}/Packages.pm (82%) rename Koha/ERM/{EHolding/Package.pm => EHoldings/Resource.pm} (64%) rename Koha/ERM/{Package/Agreements.pm => EHoldings/Resources.pm} (79%) rename Koha/ERM/{EHolding.pm => EHoldings/Title.pm} (59%) rename Koha/ERM/{Packages.pm => EHoldings/Titles.pm} (79%) rename Koha/REST/V1/ERM/{ => EHoldings}/Packages.pm (86%) rename Koha/REST/V1/ERM/{EHoldings.pm => EHoldings/Titles.pm} (72%) rename api/v1/swagger/definitions/{erm_package.yaml => erm_eholdings_package.yaml} (94%) rename api/v1/swagger/definitions/{erm_package_agreement.yaml => erm_eholdings_package_agreement.yaml} (100%) rename api/v1/swagger/definitions/{erm_eholding_package.yaml => erm_eholdings_resource.yaml} (68%) rename api/v1/swagger/definitions/{erm_eholding.yaml => erm_eholdings_title.yaml} (55%) rename api/v1/swagger/paths/{erm_packages.yaml => erm_eholdings_packages.yaml} (84%) rename api/v1/swagger/paths/{erm_eholdings.yaml => erm_eholdings_titles.yaml} (68%) rename koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/{PackageAgreements.vue => EHoldingsPackageAgreements.vue} (98%) rename koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/{PackagesFormAdd.vue => EHoldingsPackagesFormAdd.vue} (93%) rename koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/{PackagesFormConfirmDelete.vue => EHoldingsPackagesFormConfirmDelete.vue} (91%) rename koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/{PackagesList.vue => EHoldingsPackagesList.vue} (94%) rename koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/{PackagesShow.vue => EHoldingsPackagesShow.vue} (93%) rename koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/{PackagesToolbar.vue => EHoldingsPackagesToolbar.vue} (55%) rename koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/{EHoldingPackages.vue => EHoldingsResources.vue} (78%) rename koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/{EHoldingsFormAdd.vue => EHoldingsTitlesFormAdd.vue} (67%) rename koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/{EHoldingsFormConfirmDelete.vue => EHoldingsTitlesFormConfirmDelete.vue} (78%) rename koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/{EHoldingsList.vue => EHoldingsTitlesList.vue} (76%) rename koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/{EHoldingsShow.vue => EHoldingsTitlesShow.vue} (77%) create mode 100644 koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsTitlesToolbar.vue delete mode 100644 koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsToolbar.vue diff --git a/Koha/ERM/Package.pm b/Koha/ERM/EHoldings/Package.pm similarity index 74% rename from Koha/ERM/Package.pm rename to Koha/ERM/EHoldings/Package.pm index 52680c5367..23f4a78ad1 100644 --- a/Koha/ERM/Package.pm +++ b/Koha/ERM/EHoldings/Package.pm @@ -1,4 +1,4 @@ -package Koha::ERM::Package; +package Koha::ERM::EHoldings::Package; # This file is part of Koha. # @@ -21,11 +21,11 @@ use Koha::Database; use base qw(Koha::Object); -use Koha::ERM::Package::Agreements; +use Koha::ERM::EHoldings::Package::Agreements; =head1 NAME -Koha::ERM::Package - Koha ERM Package Object class +Koha::ERM::EHoldings::Package - Koha ERM Package Object class =head1 API @@ -47,14 +47,14 @@ sub package_agreements { $self->package_agreements->delete; for my $package_agreement (@$package_agreements) { - $self->_result->add_to_erm_packages_agreements($package_agreement); + $self->_result->add_to_erm_eholdings_packages_agreements($package_agreement); } } ); } - my $agreements_rs = $self->_result->erm_packages_agreements; - return Koha::ERM::Package::Agreements->_new_from_dbic($agreements_rs); + my $agreements_rs = $self->_result->erm_eholdings_packages_agreements; + return Koha::ERM::EHoldings::Package::Agreements->_new_from_dbic($agreements_rs); } =head2 Internal methods @@ -64,7 +64,7 @@ sub package_agreements { =cut sub _type { - return 'ErmPackage'; + return 'ErmEholdingsPackage'; } 1; diff --git a/Koha/ERM/Package/Agreement.pm b/Koha/ERM/EHoldings/Package/Agreement.pm similarity index 86% rename from Koha/ERM/Package/Agreement.pm rename to Koha/ERM/EHoldings/Package/Agreement.pm index 8b421ed398..f4ddf1a582 100644 --- a/Koha/ERM/Package/Agreement.pm +++ b/Koha/ERM/EHoldings/Package/Agreement.pm @@ -1,4 +1,4 @@ -package Koha::ERM::Package::Agreement; +package Koha::ERM::EHoldings::Package::Agreement; # This file is part of Koha. # @@ -25,7 +25,7 @@ use base qw(Koha::Object); =head1 NAME -Koha::ERM::Package::Agreement - Koha Package Agreement Object class +Koha::ERM::EHoldings::Package::Agreement - Koha Package-Agreement Object class =head1 API @@ -52,7 +52,7 @@ sub agreement { =cut sub _type { - return 'ErmPackagesAgreement'; + return 'ErmEholdingsPackagesAgreement'; } 1; diff --git a/Koha/ERM/EHoldings.pm b/Koha/ERM/EHoldings/Package/Agreements.pm similarity index 74% rename from Koha/ERM/EHoldings.pm rename to Koha/ERM/EHoldings/Package/Agreements.pm index dd6295914b..9a3214b492 100644 --- a/Koha/ERM/EHoldings.pm +++ b/Koha/ERM/EHoldings/Package/Agreements.pm @@ -1,4 +1,4 @@ -package Koha::ERM::EHoldings; +package Koha::ERM::EHoldings::Package::Agreements; # This file is part of Koha. # @@ -17,16 +17,15 @@ package Koha::ERM::EHoldings; use Modern::Perl; - use Koha::Database; -use Koha::ERM::EHolding; +use Koha::ERM::EHoldings::Package::Agreement; use base qw(Koha::Objects); =head1 NAME -Koha::ERM::EHoldings - Koha ERM EHolding Object set class +Koha::ERM::EHoldings::Package::Agreements - Koha Package-Agreement Object set class =head1 API @@ -39,11 +38,11 @@ Koha::ERM::EHoldings - Koha ERM EHolding Object set class =cut sub _type { - return 'ErmEholding'; + return 'ErmEholdingsPackagesAgreement'; } sub object_class { - return 'Koha::ERM::EHolding'; + return 'Koha::ERM::EHoldings::Package::Agreement'; } 1; diff --git a/Koha/ERM/EHolding/Packages.pm b/Koha/ERM/EHoldings/Packages.pm similarity index 82% rename from Koha/ERM/EHolding/Packages.pm rename to Koha/ERM/EHoldings/Packages.pm index 46d1ba60b2..fe063770c6 100644 --- a/Koha/ERM/EHolding/Packages.pm +++ b/Koha/ERM/EHoldings/Packages.pm @@ -1,4 +1,4 @@ -package Koha::ERM::EHolding::Packages; +package Koha::ERM::EHoldings::Packages; # This file is part of Koha. # @@ -20,13 +20,13 @@ use Modern::Perl; use Koha::Database; -use Koha::ERM::EHolding::Package; +use Koha::ERM::EHoldings::Package; use base qw(Koha::Objects); =head1 NAME -Koha::ERM::EHolding::Packages- Koha EHolding EHolding Object set class +Koha::ERM::EHoldings::Packages - Koha ERM Package Object set class =head1 API @@ -43,7 +43,7 @@ sub _type { } sub object_class { - return 'Koha::ERM::EHolding::Package'; + return 'Koha::ERM::EHoldings::Package'; } 1; diff --git a/Koha/ERM/EHolding/Package.pm b/Koha/ERM/EHoldings/Resource.pm similarity index 64% rename from Koha/ERM/EHolding/Package.pm rename to Koha/ERM/EHoldings/Resource.pm index 0f9e04a357..da2ddbaf7d 100644 --- a/Koha/ERM/EHolding/Package.pm +++ b/Koha/ERM/EHoldings/Resource.pm @@ -1,4 +1,4 @@ -package Koha::ERM::EHolding::Package; +package Koha::ERM::EHoldings::Resource; # This file is part of Koha. # @@ -19,13 +19,14 @@ use Modern::Perl; use Koha::Database; -use Koha::ERM::Package; +use Koha::ERM::EHoldings::Title; +use Koha::ERM::EHoldings::Package; use base qw(Koha::Object); =head1 NAME -Koha::ERM::EHolding::Package - Koha EHolding Package Object class +Koha::ERM::EHoldings::Resource - Koha EHolding resource Object class =head1 API @@ -35,14 +36,26 @@ Koha::ERM::EHolding::Package - Koha EHolding Package Object class =head3 package -Return the package for this link +Return the package for this resource =cut sub package { my ( $self ) = @_; my $package_rs = $self->_result->package; - return Koha::ERM::Package->_new_from_dbic($package_rs); + return Koha::ERM::EHoldings::Package->_new_from_dbic($package_rs); +} + +=head3 title + +Return the title for this resource + +=cut + +sub title { + my ( $self ) = @_; + my $title_rs = $self->_result->title; + return Koha::ERM::EHoldings::Title->_new_from_dbic($title_rs); } =head2 Internal methods @@ -52,7 +65,7 @@ sub package { =cut sub _type { - return 'ErmEholdingsPackage'; + return 'ErmEholdingsResource'; } 1; diff --git a/Koha/ERM/Package/Agreements.pm b/Koha/ERM/EHoldings/Resources.pm similarity index 79% rename from Koha/ERM/Package/Agreements.pm rename to Koha/ERM/EHoldings/Resources.pm index 62dbacc7b5..cf3959d300 100644 --- a/Koha/ERM/Package/Agreements.pm +++ b/Koha/ERM/EHoldings/Resources.pm @@ -1,4 +1,4 @@ -package Koha::ERM::Package::Agreements; +package Koha::ERM::EHoldings::Resources; # This file is part of Koha. # @@ -17,16 +17,15 @@ package Koha::ERM::Package::Agreements; use Modern::Perl; - use Koha::Database; -use Koha::ERM::Package::Agreement; +use Koha::ERM::EHoldings::Resource; use base qw(Koha::Objects); =head1 NAME -Koha::ERM::Package::Agreements - Koha Package Agreement Object set class +Koha::ERM::EHoldings::Resources- Koha EHolding Resource Object set class =head1 API @@ -39,11 +38,11 @@ Koha::ERM::Package::Agreements - Koha Package Agreement Object set class =cut sub _type { - return 'ErmPackageAgreement'; + return 'ErmEholdingsResource'; } sub object_class { - return 'Koha::ERM::Package::Agreement'; + return 'Koha::ERM::EHoldings::Resource'; } 1; diff --git a/Koha/ERM/EHolding.pm b/Koha/ERM/EHoldings/Title.pm similarity index 59% rename from Koha/ERM/EHolding.pm rename to Koha/ERM/EHoldings/Title.pm index 058bda1abb..b2ada02e27 100644 --- a/Koha/ERM/EHolding.pm +++ b/Koha/ERM/EHoldings/Title.pm @@ -1,4 +1,4 @@ -package Koha::ERM::EHolding; +package Koha::ERM::EHoldings::Title; # This file is part of Koha. # @@ -21,39 +21,39 @@ use Koha::Database; use base qw(Koha::Object); -use Koha::ERM::EHolding::Packages; +use Koha::ERM::EHoldings::Resources; =head1 NAME -Koha::ERM::EHolding - Koha ERM EHolding Object class +Koha::ERM::EHoldings::Title - Koha ERM Title Object class =head1 API =head2 Class Methods -=head3 eholding_packages +=head3 resources -Returns the eholding_packages link for this eHolding +Returns the resources linked to this title =cut -sub eholding_packages { - my ( $self, $eholding_packages ) = @_; +sub resources { + my ( $self, $resources ) = @_; - if ( $eholding_packages ) { + if ( $resources ) { my $schema = $self->_result->result_source->schema; $schema->txn_do( sub { - $self->eholding_packages->delete; + $self->resources->delete; - for my $eholding_package (@$eholding_packages) { - $self->_result->add_to_erm_eholdings_packages($eholding_package); + for my $resources (@$resources) { + $self->_result->add_to_erm_eholdings_resources($resources); } } ); } - my $eholding_packages_rs = $self->_result->erm_eholdings_packages; - return Koha::ERM::EHolding::Packages->_new_from_dbic($eholding_packages_rs); + my $resources_rs = $self->_result->erm_eholdings_resources; + return Koha::ERM::EHoldings::Resources->_new_from_dbic($resources_rs); } =head2 Internal methods @@ -63,7 +63,7 @@ sub eholding_packages { =cut sub _type { - return 'ErmEholding'; + return 'ErmEholdingsTitle'; } 1; diff --git a/Koha/ERM/Packages.pm b/Koha/ERM/EHoldings/Titles.pm similarity index 79% rename from Koha/ERM/Packages.pm rename to Koha/ERM/EHoldings/Titles.pm index 07dd4c303f..756067568a 100644 --- a/Koha/ERM/Packages.pm +++ b/Koha/ERM/EHoldings/Titles.pm @@ -1,4 +1,4 @@ -package Koha::ERM::Packages; +package Koha::ERM::EHoldings::Titles; # This file is part of Koha. # @@ -20,13 +20,13 @@ use Modern::Perl; use Koha::Database; -use Koha::ERM::Package; +use Koha::ERM::EHoldings::Title; use base qw(Koha::Objects); =head1 NAME -Koha::ERM::Packages - Koha ERM Package Object set class +Koha::ERM::EHoldings::Title - Koha ERM Title Object set class =head1 API @@ -39,11 +39,11 @@ Koha::ERM::Packages - Koha ERM Package Object set class =cut sub _type { - return 'ErmPackage'; + return 'ErmEholdingsTitle'; } sub object_class { - return 'Koha::ERM::Package'; + return 'Koha::ERM::EHoldings::Title'; } 1; diff --git a/Koha/REST/V1/ERM/Packages.pm b/Koha/REST/V1/ERM/EHoldings/Packages.pm similarity index 86% rename from Koha/REST/V1/ERM/Packages.pm rename to Koha/REST/V1/ERM/EHoldings/Packages.pm index 721994bf2d..e354a19d80 100644 --- a/Koha/REST/V1/ERM/Packages.pm +++ b/Koha/REST/V1/ERM/EHoldings/Packages.pm @@ -1,4 +1,4 @@ -package Koha::REST::V1::ERM::Packages; +package Koha::REST::V1::ERM::EHoldings::Packages; # This file is part of Koha. # @@ -19,7 +19,7 @@ use Modern::Perl; use Mojo::Base 'Mojolicious::Controller'; -use Koha::ERM::Packages; +use Koha::ERM::EHoldings::Packages; use Scalar::Util qw( blessed ); use Try::Tiny qw( catch try ); @@ -36,7 +36,7 @@ sub list { my $c = shift->openapi->valid_input or return; return try { - my $packages_set = Koha::ERM::Packages->new; + my $packages_set = Koha::ERM::EHoldings::Packages->new; my $packages = $c->objects->search( $packages_set ); return $c->render( status => 200, openapi => $packages ); } @@ -48,7 +48,7 @@ sub list { =head3 get -Controller function that handles retrieving a single Koha::ERM::Package object +Controller function that handles retrieving a single Koha::ERM::EHoldings::Package object =cut @@ -57,7 +57,7 @@ sub get { return try { my $package_id = $c->validation->param('package_id'); - my $package = $c->objects->find( Koha::ERM::Packages->search, $package_id ); + my $package = $c->objects->find( Koha::ERM::EHoldings::Packages->search, $package_id ); unless ($package) { return $c->render( @@ -78,7 +78,7 @@ sub get { =head3 add -Controller function that handles adding a new Koha::ERM::Package object +Controller function that handles adding a new Koha::ERM::EHoldings::Package object =cut @@ -93,7 +93,7 @@ sub add { my $package_agreements = delete $body->{package_agreements} // []; - my $package = Koha::ERM::Package->new_from_api($body)->store; + my $package = Koha::ERM::EHoldings::Package->new_from_api($body)->store; $package->package_agreements($package_agreements); $c->res->headers->location($c->req->url->to_string . '/' . $package->package_id); @@ -106,7 +106,7 @@ sub add { } catch { - my $to_api_mapping = Koha::ERM::Package->new->to_api_mapping; + my $to_api_mapping = Koha::ERM::EHoldings::Package->new->to_api_mapping; if ( blessed $_ ) { if ( $_->isa('Koha::Exceptions::Object::DuplicateID') ) { @@ -143,7 +143,7 @@ sub add { =head3 update -Controller function that handles updating a Koha::ERM::Package object +Controller function that handles updating a Koha::ERM::EHoldings::Package object =cut @@ -151,7 +151,7 @@ sub update { my $c = shift->openapi->valid_input or return; my $package_id = $c->validation->param('package_id'); - my $package = Koha::ERM::Packages->find( $package_id ); + my $package = Koha::ERM::EHoldings::Packages->find( $package_id ); unless ($package) { return $c->render( @@ -180,7 +180,7 @@ sub update { ); } catch { - my $to_api_mapping = Koha::ERM::Package->new->to_api_mapping; + my $to_api_mapping = Koha::ERM::EHoldings::Package->new->to_api_mapping; if ( blessed $_ ) { if ( $_->isa('Koha::Exceptions::Object::FKConstraint') ) { @@ -216,7 +216,7 @@ sub update { sub delete { my $c = shift->openapi->valid_input or return; - my $package = Koha::ERM::Packages->find( $c->validation->param('package_id') ); + my $package = Koha::ERM::EHoldings::Packages->find( $c->validation->param('package_id') ); unless ($package) { return $c->render( status => 404, diff --git a/Koha/REST/V1/ERM/EHoldings.pm b/Koha/REST/V1/ERM/EHoldings/Titles.pm similarity index 72% rename from Koha/REST/V1/ERM/EHoldings.pm rename to Koha/REST/V1/ERM/EHoldings/Titles.pm index 8860940652..82cbe9bb06 100644 --- a/Koha/REST/V1/ERM/EHoldings.pm +++ b/Koha/REST/V1/ERM/EHoldings/Titles.pm @@ -1,4 +1,4 @@ -package Koha::REST::V1::ERM::EHoldings; +package Koha::REST::V1::ERM::EHoldings::Titles; # This file is part of Koha. # @@ -19,7 +19,7 @@ use Modern::Perl; use Mojo::Base 'Mojolicious::Controller'; -use Koha::ERM::EHoldings; +use Koha::ERM::EHoldings::Titles; use Scalar::Util qw( blessed ); use Try::Tiny qw( catch try ); @@ -36,9 +36,9 @@ sub list { my $c = shift->openapi->valid_input or return; return try { - my $eholdings_set = Koha::ERM::EHoldings->new; - my $eholdings = $c->objects->search( $eholdings_set ); - return $c->render( status => 200, openapi => $eholdings ); + my $titles_set = Koha::ERM::EHoldings::Titles->new; + my $titles = $c->objects->search( $titles_set ); + return $c->render( status => 200, openapi => $titles ); } catch { $c->unhandled_exception($_); @@ -48,7 +48,7 @@ sub list { =head3 get -Controller function that handles retrieving a single Koha::ERM::EHolding object +Controller function that handles retrieving a single Koha::ERM::EHoldings::Title object =cut @@ -56,19 +56,19 @@ sub get { my $c = shift->openapi->valid_input or return; return try { - my $eholding_id = $c->validation->param('eholding_id'); - my $eholding = $c->objects->find( Koha::ERM::EHoldings->search, $eholding_id ); + my $title_id = $c->validation->param('title_id'); + my $title = $c->objects->find( Koha::ERM::EHoldings::Titles->search, $title_id ); - unless ($eholding) { + unless ($title ) { return $c->render( status => 404, - openapi => { error => "eHolding not found" } + openapi => { error => "eHolding title not found" } ); } return $c->render( status => 200, - openapi => $eholding + openapi => $title, ); } catch { @@ -78,7 +78,7 @@ sub get { =head3 add -Controller function that handles adding a new Koha::ERM::EHolding object +Controller function that handles adding a new Koha::ERM::EHoldings::Title object =cut @@ -91,23 +91,23 @@ sub add { my $body = $c->validation->param('body'); - my $eholding_packages = delete $body->{eholding_packages} // []; + my $resources = delete $body->{resources} // []; - my $eholding = Koha::ERM::EHolding->new_from_api($body)->store; + my $title = Koha::ERM::EHoldings::Title->new_from_api($body)->store; - $eholding->eholding_packages($eholding_packages); + $title->resources($resources); - $c->res->headers->location($c->req->url->to_string . '/' . $eholding->eholding_id); + $c->res->headers->location($c->req->url->to_string . '/' . $title->title_id); return $c->render( status => 201, - openapi => $eholding->to_api + openapi => $title->to_api ); } ); } catch { - my $to_api_mapping = Koha::ERM::EHolding->new->to_api_mapping; + my $to_api_mapping = Koha::ERM::EHoldings::Title->new->to_api_mapping; if ( blessed $_ ) { if ( $_->isa('Koha::Exceptions::Object::DuplicateID') ) { @@ -144,20 +144,20 @@ sub add { =head3 update -Controller function that handles updating a Koha::ERM::EHolding object +Controller function that handles updating a Koha::ERM::EHoldings::Title object =cut sub update { my $c = shift->openapi->valid_input or return; - my $eholding_id = $c->validation->param('eholding_id'); - my $eholding = Koha::ERM::EHoldings->find( $eholding_id ); + my $title_id = $c->validation->param('title_id'); + my $title = Koha::ERM::EHoldings::Titles->find( $title_id ); - unless ($eholding) { + unless ($title) { return $c->render( status => 404, - openapi => { error => "eHolding not found" } + openapi => { error => "eHolding title not found" } ); } @@ -167,22 +167,22 @@ sub update { my $body = $c->validation->param('body'); - my $eholding_packages = delete $body->{eholding_packages} // []; + my $resources = delete $body->{resources} // []; - $eholding->set_from_api($body)->store; + $title->set_from_api($body)->store; - $eholding->eholding_packages($eholding_packages); + $title->resources($resources); - $c->res->headers->location($c->req->url->to_string . '/' . $eholding->eholding_id); + $c->res->headers->location($c->req->url->to_string . '/' . $title->title_id); return $c->render( status => 200, - openapi => $eholding->to_api + openapi => $title->to_api ); } ); } catch { - my $to_api_mapping = Koha::ERM::EHolding->new->to_api_mapping; + my $to_api_mapping = Koha::ERM::EHoldings::Title->new->to_api_mapping; if ( blessed $_ ) { if ( $_->isa('Koha::Exceptions::Object::FKConstraint') ) { @@ -218,16 +218,16 @@ sub update { sub delete { my $c = shift->openapi->valid_input or return; - my $eholding = Koha::ERM::EHoldings->find( $c->validation->param('eholding_id') ); - unless ($eholding) { + my $title = Koha::ERM::EHoldings::Titles->find( $c->validation->param('title_id') ); + unless ($title) { return $c->render( status => 404, - openapi => { error => "eHolding not found" } + openapi => { error => "eHolding title not found" } ); } return try { - $eholding->delete; + $title->delete; return $c->render( status => 204, openapi => q{} diff --git a/api/v1/swagger/definitions/erm_package.yaml b/api/v1/swagger/definitions/erm_eholdings_package.yaml similarity index 94% rename from api/v1/swagger/definitions/erm_package.yaml rename to api/v1/swagger/definitions/erm_eholdings_package.yaml index 2ce6417e64..d564b3384c 100644 --- a/api/v1/swagger/definitions/erm_package.yaml +++ b/api/v1/swagger/definitions/erm_eholdings_package.yaml @@ -37,7 +37,7 @@ properties: type: array description: agreements items: - $ref: erm_package_agreement.yaml + $ref: erm_eholdings_package_agreement.yaml additionalProperties: false required: diff --git a/api/v1/swagger/definitions/erm_package_agreement.yaml b/api/v1/swagger/definitions/erm_eholdings_package_agreement.yaml similarity index 100% rename from api/v1/swagger/definitions/erm_package_agreement.yaml rename to api/v1/swagger/definitions/erm_eholdings_package_agreement.yaml diff --git a/api/v1/swagger/definitions/erm_eholding_package.yaml b/api/v1/swagger/definitions/erm_eholdings_resource.yaml similarity index 68% rename from api/v1/swagger/definitions/erm_eholding_package.yaml rename to api/v1/swagger/definitions/erm_eholdings_resource.yaml index 46fdc8a755..b68d6d7710 100644 --- a/api/v1/swagger/definitions/erm_eholding_package.yaml +++ b/api/v1/swagger/definitions/erm_eholdings_resource.yaml @@ -1,9 +1,12 @@ --- type: object properties: - eholding_id: + resource_id: type: integer - description: Internal related eHolding identifier + description: Internal resource identifier + title_id: + type: integer + description: Internal title identifier package_id: type: integer description: Internal package identifier @@ -18,7 +21,7 @@ properties: - string - "null" proxy: - description: Proxy + description: Proxy to access this resource type: - string - "null" diff --git a/api/v1/swagger/definitions/erm_eholding.yaml b/api/v1/swagger/definitions/erm_eholdings_title.yaml similarity index 55% rename from api/v1/swagger/definitions/erm_eholding.yaml rename to api/v1/swagger/definitions/erm_eholdings_title.yaml index 61847b3a5a..d941fc3258 100644 --- a/api/v1/swagger/definitions/erm_eholding.yaml +++ b/api/v1/swagger/definitions/erm_eholdings_title.yaml @@ -1,7 +1,7 @@ --- type: object properties: - eholding_id: + title_id: type: integer description: internally assigned identifier readOnly: true @@ -11,133 +11,128 @@ properties: - integer - "null" publication_title: - description: publication_title of the eHolding + description: publication_title of the title type: string print_identifier: - description: print_identifier of the eHolding + description: print_identifier of the title type: - string - "null" online_identifier: - description: online_identifier of the eHolding + description: online_identifier of the title type: - string - "null" date_first_issue_online: - description: date_first_issue_online of the eHolding + description: date_first_issue_online of the title type: - string - "null" num_first_vol_online: - description: num_first_vol_online of the eHolding + description: num_first_vol_online of the title type: - string - "null" num_first_issue_online: - description: num_first_issue_online of the eHolding + description: num_first_issue_online of the title type: - string - "null" date_last_issue_online: - description: date_last_issue_online of the eHolding + description: date_last_issue_online of the title type: - string - "null" num_last_vol_online: - description: num_last_vol_online of the eHolding + description: num_last_vol_online of the title type: - string - "null" num_last_issue_online: - description: num_last_issue_online of the eHolding + description: num_last_issue_online of the title type: - string - "null" title_url: - description: title_url of the eHolding + description: title_url of the title type: - string - "null" first_author: - description: first_author of the eHolding - type: - - string - - "null" - title_id: - description: title_id of the eHolding + description: first_author of the title type: - string - "null" embargo_info: - description: embargo_info of the eHolding + description: embargo_info of the title type: - string - "null" coverage_depth: - description: coverage_depth of the eHolding + description: coverage_depth of the title type: - string - "null" notes: - description: notes of the eHolding + description: notes of the title type: - string - "null" publisher_name: - description: publisher_name of the eHolding + description: publisher_name of the title type: - string - "null" publication_type: - description: publication_type of the eHolding + description: publication_type of the title type: - string - "null" date_monograph_published_print: - description: date_monograph_published_print of the eHolding + description: date_monograph_published_print of the title type: - string - "null" date_monograph_published_online: - description: date_monograph_published_online of the eHolding + description: date_monograph_published_online of the title type: - string - "null" monograph_volume: - description: monograph_volume of the eHolding + description: monograph_volume of the title type: - string - "null" monograph_edition: - description: monograph_edition of the eHolding + description: monograph_edition of the title type: - string - "null" first_editor: - description: first_editor of the eHolding + description: first_editor of the title type: - string - "null" parent_publication_title_id: - description: parent_publication_title_id of the eHolding + description: parent_publication_title_id of the title type: - string - "null" preceeding_publication_title_id: - description: preceeding_publication_title_id of the eHolding + description: preceeding_publication_title_id of the title type: - string - "null" access_type: - description: access_type of the eHolding + description: access_type of the title type: - string - "null" - eholding_packages: + resources: type: array - description: packages containing this title + description: Resource containing this title items: - $ref: erm_eholding_package.yaml + $ref: erm_eholdings_resource.yaml additionalProperties: false required: diff --git a/api/v1/swagger/paths/erm_packages.yaml b/api/v1/swagger/paths/erm_eholdings_packages.yaml similarity index 84% rename from api/v1/swagger/paths/erm_packages.yaml rename to api/v1/swagger/paths/erm_eholdings_packages.yaml index cbea401097..5280960a43 100644 --- a/api/v1/swagger/paths/erm_packages.yaml +++ b/api/v1/swagger/paths/erm_eholdings_packages.yaml @@ -1,10 +1,10 @@ --- -/erm/packages: +/erm/eholdings/packages: get: - x-mojo-to: ERM::Packages#list - operationId: listErmPackages + x-mojo-to: ERM::EHoldings::Packages#list + operationId: listErmEHoldingsPackages tags: - - package + - eHoldings package summary: List packages produces: - application/json @@ -56,7 +56,7 @@ description: A list of package schema: items: - $ref: "../swagger.yaml#/definitions/erm_package" + $ref: "../swagger.yaml#/definitions/erm_eholdings_package" type: array 403: description: Access forbidden @@ -76,10 +76,10 @@ permissions: erm: 1 post: - x-mojo-to: ERM::Packages#add - operationId: addErmPackages + x-mojo-to: ERM::EHoldings::Packages#add + operationId: addErmEHoldingsPackages tags: - - package + - eHoldings package summary: Add package consumes: - application/json @@ -91,13 +91,13 @@ name: body required: true schema: - $ref: "../swagger.yaml#/definitions/erm_package" + $ref: "../swagger.yaml#/definitions/erm_eholdings_package" responses: 201: description: A successfully created package schema: items: - $ref: "../swagger.yaml#/definitions/erm_package" + $ref: "../swagger.yaml#/definitions/erm_eholdings_package" 400: description: Bad parameter schema: @@ -131,23 +131,23 @@ x-koha-authorization: permissions: erm: 1 -"/erm/packages/{package_id}": +"/erm/eholdings/packages/{package_id}": get: - x-mojo-to: ERM::Packages#get - operationId: getErmPackages + x-mojo-to: ERM::EHoldings::Packages#get + operationId: getErmEHoldingsPackages tags: - package - summary: Get package + summary: Get eHoldings package produces: - application/json parameters: - - $ref: "../swagger.yaml#/parameters/package_id_pp" + - $ref: "../swagger.yaml#/parameters/eholdings_package_id_pp" responses: 200: - description: Anpackage + description: A package schema: items: - $ref: "../swagger.yaml#/definitions/erm_package" + $ref: "../swagger.yaml#/definitions/erm_eholdings_package" 401: description: Authentication required schema: @@ -176,29 +176,29 @@ x-koha-embed: - agreements put: - x-mojo-to: ERM::Packages#update - operationId: updateErmPackages + x-mojo-to: ERM::EHoldings::Packages#update + operationId: updateErmEHoldingsPackages tags: - package - summary: Update package + summary: Update eHoldings package consumes: - application/json produces: - application/json parameters: - - $ref: "../swagger.yaml#/parameters/package_id_pp" + - $ref: "../swagger.yaml#/parameters/eholdings_package_id_pp" - name: body in: body description: A JSON object containing new information about existing package required: true schema: - $ref: "../swagger.yaml#/definitions/erm_package" + $ref: "../swagger.yaml#/definitions/erm_eholdings_package" responses: 200: description: A successfully updated package schema: items: - $ref: "../swagger.yaml#/definitions/erm_package" + $ref: "../swagger.yaml#/definitions/erm_eholdings_package" 400: description: Bad parameter schema: @@ -231,15 +231,15 @@ x-koha-embed: - agreements delete: - x-mojo-to: ERM::Packages#delete - operationId: deleteErmPackages + x-mojo-to: ERM::EHoldings::Packages#delete + operationId: deleteErmEHoldingsPackages tags: - package - summary: Delete package + summary: Delete eHoldings package produces: - application/json parameters: - - $ref: "../swagger.yaml#/parameters/package_id_pp" + - $ref: "../swagger.yaml#/parameters/eholdings_package_id_pp" responses: 204: description: package deleted diff --git a/api/v1/swagger/paths/erm_eholdings.yaml b/api/v1/swagger/paths/erm_eholdings_titles.yaml similarity index 68% rename from api/v1/swagger/paths/erm_eholdings.yaml rename to api/v1/swagger/paths/erm_eholdings_titles.yaml index 280a7bfe95..bd31232a71 100644 --- a/api/v1/swagger/paths/erm_eholdings.yaml +++ b/api/v1/swagger/paths/erm_eholdings_titles.yaml @@ -1,145 +1,140 @@ --- -/erm/eholdings: +/erm/eholdings/titles: get: - x-mojo-to: ERM::EHoldings#list - operationId: listErmEHoldings + x-mojo-to: ERM::EHoldings::Titles#list + operationId: listErmEHoldingsTitles tags: - - eholding - summary: List eholdings + - eholdings + summary: List eholdings titles produces: - application/json parameters: - - description: Case insensitive search on eholding eholding_id + - description: Case insensitive search on title title_id in: query - name: eholding_id + name: title_id required: false type: integer - - description: Case insensitive search on eholding vendor_id + - description: Case insensitive search on title vendor_id in: query name: vendor_id required: false type: integer - - description: Case insensitive search on eholding publication_title + - description: Case insensitive search on title publication_title in: query name: publication_title required: false type: string - - description: Case insensitive search on eholding print_identifier + - description: Case insensitive search on title print_identifier in: query name: print_identifier required: false type: string - - description: Case insensitive search on eholding online_identifier + - description: Case insensitive search on title online_identifier in: query name: online_identifier required: false type: string - - description: Case insensitive search on eholding date_first_issue_online + - description: Case insensitive search on title date_first_issue_online in: query name: date_first_issue_online required: false type: string - - description: Case insensitive search on eholding num_first_vol_online + - description: Case insensitive search on title num_first_vol_online in: query name: num_first_vol_online required: false type: string - - description: Case insensitive search on eholding num_first_issue_online + - description: Case insensitive search on title num_first_issue_online in: query name: num_first_issue_online required: false type: string - - description: Case insensitive search on eholding date_last_issue_online + - description: Case insensitive search on title date_last_issue_online in: query name: date_last_issue_online required: false type: string - - description: Case insensitive search on eholding num_last_vol_online + - description: Case insensitive search on title num_last_vol_online in: query name: num_last_vol_online required: false type: string - - description: Case insensitive search on eholding num_last_issue_online + - description: Case insensitive search on title num_last_issue_online in: query name: num_last_issue_online required: false type: string - - description: Case insensitive search on eholding title_url + - description: Case insensitive search on title title_url in: query name: title_url required: false type: string - - description: Case insensitive search on eholding first_author + - description: Case insensitive search on title first_author in: query name: first_author required: false type: string - - description: Case insensitive search on eholding title_id - in: query - name: title_id - required: false - type: string - - description: Case insensitive search on eholding embargo_info + - description: Case insensitive search on title embargo_info in: query name: embargo_info required: false type: string - - description: Case insensitive search on eholding coverage_depth + - description: Case insensitive search on title coverage_depth in: query name: coverage_depth required: false type: string - - description: Case insensitive search on eholding notes + - description: Case insensitive search on title notes in: query name: notes required: false type: string - - description: Case insensitive search on eholding publisher_name + - description: Case insensitive search on title publisher_name in: query name: publisher_name required: false type: string - - description: Case insensitive search on eholding publication_type + - description: Case insensitive search on title publication_type in: query name: publication_type required: false type: string - - description: Case insensitive search on eholding date_monograph_published_print + - description: Case insensitive search on title date_monograph_published_print in: query name: date_monograph_published_print required: false type: string - - description: Case insensitive search on eholding date_monograph_published_online + - description: Case insensitive search on title date_monograph_published_online in: query name: date_monograph_published_online required: false type: string - - description: Case insensitive search on eholding monograph_volume + - description: Case insensitive search on title monograph_volume in: query name: monograph_volume required: false type: string - - description: Case insensitive search on eholding monograph_edition + - description: Case insensitive search on title monograph_edition in: query name: monograph_edition required: false type: string - - description: Case insensitive search on eholding first_editor + - description: Case insensitive search on title first_editor in: query name: first_editor required: false type: string - - description: Case insensitive search on eholding parent_publication_title_id + - description: Case insensitive search on title parent_publication_title_id in: query name: parent_publication_title_id required: false type: string - - description: Case insensitive search on eholding preceeding_publication_title_id + - description: Case insensitive search on title preceeding_publication_title_id in: query name: preceeding_publication_title_id required: false type: string - - description: Case insensitive search on eholding access_type + - description: Case insensitive search on title access_type in: query name: access_type required: false @@ -153,10 +148,10 @@ - $ref: "../swagger.yaml#/parameters/q_header" responses: 200: - description: A list of eholding + description: A list of eHoldings titles schema: items: - $ref: "../swagger.yaml#/definitions/erm_eholding" + $ref: "../swagger.yaml#/definitions/erm_eholdings_title" type: array 403: description: Access forbidden @@ -176,28 +171,28 @@ permissions: erm: 1 post: - x-mojo-to: ERM::EHoldings#add - operationId: addErmEHoldings + x-mojo-to: ERM::EHoldings::Titles#add + operationId: addErmEHoldingsTitles tags: - - eholding + - eholdings summary: Add eholding consumes: - application/json produces: - application/json parameters: - - description: A JSON object containing information about the new eholding + - description: A JSON object containing information about the new title in: body name: body required: true schema: - $ref: "../swagger.yaml#/definitions/erm_eholding" + $ref: "../swagger.yaml#/definitions/erm_eholdings_title" responses: 201: - description: A successfully created eholding + description: A successfully created title schema: items: - $ref: "../swagger.yaml#/definitions/erm_eholding" + $ref: "../swagger.yaml#/definitions/erm_eholdings_title" 400: description: Bad parameter schema: @@ -231,23 +226,23 @@ x-koha-authorization: permissions: erm: 1 -"/erm/eholdings/{eholding_id}": +"/erm/eholdings/titles/{title_id}": get: - x-mojo-to: ERM::EHoldings#get - operationId: getErmEHoldings + x-mojo-to: ERM::EHoldings::Titles#get + operationId: getErmEHoldingsTitles tags: - - eholding - summary: Get eholding + - eholdings + summary: Get titles produces: - application/json parameters: - - $ref: "../swagger.yaml#/parameters/eholding_id_pp" + - $ref: "../swagger.yaml#/parameters/eholdings_title_id_pp" responses: 200: - description: Aneholding + description: An eHolding title schema: items: - $ref: "../swagger.yaml#/definitions/erm_eholding" + $ref: "../swagger.yaml#/definitions/erm_eholdings_title" 401: description: Authentication required schema: @@ -274,32 +269,32 @@ permissions: erm: 1 x-koha-embed: - - eholding_packages - - eholding_packages.package + - resources + - resources.package put: - x-mojo-to: ERM::EHoldings#update - operationId: updateErmEHoldings + x-mojo-to: ERM::EHoldings::Titles#update + operationId: updateErmEHoldingsTitles tags: - - eholding - summary: Update eholding + - eholdings + summary: Update titles consumes: - application/json produces: - application/json parameters: - - $ref: "../swagger.yaml#/parameters/eholding_id_pp" + - $ref: "../swagger.yaml#/parameters/eholdings_title_id_pp" - name: body in: body - description: A JSON object containing new information about existing eholding + description: A JSON object containing new information about existing title required: true schema: - $ref: "../swagger.yaml#/definitions/erm_eholding" + $ref: "../swagger.yaml#/definitions/erm_eholdings_title" responses: 200: - description: A successfully updated eholding + description: A successfully updated title schema: items: - $ref: "../swagger.yaml#/definitions/erm_eholding" + $ref: "../swagger.yaml#/definitions/erm_eholdings_title" 400: description: Bad parameter schema: @@ -330,23 +325,23 @@ permissions: erm: 1 x-koha-embed: - - eholding_packages - - eholding_packages.package + - resources + - resources.package delete: - x-mojo-to: ERM::EHoldings#delete - operationId: deleteErmEHoldings + x-mojo-to: ERM::EHoldings::Titles#delete + operationId: deleteErmEHoldingsTitles tags: - - eholding - summary: Delete eholding + - eholdings + summary: Delete eHolding title produces: - application/json parameters: - - $ref: "../swagger.yaml#/parameters/eholding_id_pp" + - $ref: "../swagger.yaml#/parameters/eholdings_title_id_pp" responses: 204: - description: eholding deleted + description: title deleted 400: - description: eholding deletion failed + description: title deletion failed schema: $ref: "../swagger.yaml#/definitions/error" 401: diff --git a/api/v1/swagger/swagger.yaml b/api/v1/swagger/swagger.yaml index 0c97fffb65..fb92ee68ae 100644 --- a/api/v1/swagger/swagger.yaml +++ b/api/v1/swagger/swagger.yaml @@ -24,12 +24,12 @@ definitions: $ref: ./definitions/city.yaml erm_agreement: $ref: ./definitions/erm_agreement.yaml - erm_eholding: - $ref: ./definitions/erm_eholding.yaml + erm_eholdings_title: + $ref: ./definitions/erm_eholdings_title.yaml erm_license: $ref: ./definitions/erm_license.yaml - erm_package: - $ref: ./definitions/erm_package.yaml + erm_eholdings_package: + $ref: ./definitions/erm_eholdings_package.yaml error: $ref: ./definitions/error.yaml fund: @@ -169,18 +169,18 @@ paths: $ref: ./paths/erm_agreements.yaml#/~1erm~1agreements "/erm/agreements/{agreement_id}": $ref: "./paths/erm_agreements.yaml#/~1erm~1agreements~1{agreement_id}" - /erm/eholdings: - $ref: ./paths/erm_eholdings.yaml#/~1erm~1eholdings - "/erm/eholdings/{eholding_id}": - $ref: "./paths/erm_eholdings.yaml#/~1erm~1eholdings~1{eholding_id}" + /erm/eholdings/titles: + $ref: ./paths/erm_eholdings_titles.yaml#/~1erm~1eholdings~1titles + "/erm/eholdings/titles/{title_id}": + $ref: "./paths/erm_eholdings_titles.yaml#/~1erm~1eholdings~1titles~1{title_id}" + /erm/eholdings/packages: + $ref: ./paths/erm_eholdings_packages.yaml#/~1erm~1eholdings~1packages + "/erm/eholdings/packages/{package_id}": + $ref: "./paths/erm_eholdings_packages.yaml#/~1erm~1eholdings~1packages~1{package_id}" /erm/licenses: $ref: ./paths/erm_licenses.yaml#/~1erm~1licenses "/erm/licenses/{license_id}": $ref: "./paths/erm_licenses.yaml#/~1erm~1licenses~1{license_id}" - /erm/packages: - $ref: ./paths/erm_packages.yaml#/~1erm~1packages - "/erm/packages/{package_id}": - $ref: "./paths/erm_packages.yaml#/~1erm~1packages~1{package_id}" /erm/users: $ref: ./paths/erm_users.yaml#/~1erm~1users /holds: @@ -350,10 +350,16 @@ parameters: name: club_id required: true type: integer - eholding_id_pp: - description: eHoldings internal identifier + eholdings_title_id_pp: + description: title internal identifier in: path - name: eholding_id + name: title_id + required: true + type: integer + eholdings_package_id_pp: + description: Package internal identifier + in: path + name: package_id required: true type: integer fund_id_pp: @@ -430,12 +436,6 @@ parameters: name: order_id required: true type: integer - package_id_pp: - description: Package internal identifier - in: path - name: package_id - required: true - type: integer page: description: "Page number, for paginated object listing" in: query diff --git a/cypress/integration/Packages_spec.ts b/cypress/integration/Packages_spec.ts index 5a21a5052b..29ef68e3e6 100644 --- a/cypress/integration/Packages_spec.ts +++ b/cypress/integration/Packages_spec.ts @@ -20,7 +20,7 @@ describe("Package CRUD operations", () => { it("List package", () => { // GET package returns 500 - cy.intercept("GET", "/api/v1/erm/packages", { + cy.intercept("GET", "/api/v1/erm/eholdings/packages", { statusCode: 500, error: "Something went wrong", }); @@ -31,15 +31,15 @@ describe("Package CRUD operations", () => { ); // GET packages returns empty list - cy.intercept("GET", "/api/v1/erm/packages*", []); - cy.visit("/cgi-bin/koha/erm/packages"); + cy.intercept("GET", "/api/v1/erm/eholdings/packages*", []); + cy.visit("/cgi-bin/koha/erm/eholdings/packages"); cy.get("#packages_list").contains("There are no packages defined."); // GET packages returns something let erm_package = get_package(); let packages = [erm_package]; - cy.intercept("GET", "/api/v1/erm/packages*", { + cy.intercept("GET", "/api/v1/erm/eholdings/packages*", { statusCode: 200, body: packages, headers: { @@ -47,14 +47,14 @@ describe("Package CRUD operations", () => { "X-Total-Count": "1", }, }); - cy.intercept("GET", "/api/v1/erm/packages/*", erm_package); - cy.visit("/cgi-bin/koha/erm/packages"); + cy.intercept("GET", "/api/v1/erm/eholdings/packages/*", erm_package); + cy.visit("/cgi-bin/koha/erm/eholdings/packages"); cy.get("#packages_list").contains("Showing 1 to 1 of 1 entries"); }); it("Add package", () => { // Click the button in the toolbar - cy.visit("/cgi-bin/koha/erm/packages"); + cy.visit("/cgi-bin/koha/erm/eholdings/packages"); cy.contains("New package").click(); cy.get("#packages_add h2").contains("New package"); @@ -71,7 +71,7 @@ describe("Package CRUD operations", () => { cy.get("#package_content_type").select(erm_package.content_type); // Submit the form, get 500 - cy.intercept("POST", "/api/v1/erm/packages", { + cy.intercept("POST", "/api/v1/erm/eholdings/packages", { statusCode: 500, error: "Something went wrong", }); @@ -81,7 +81,7 @@ describe("Package CRUD operations", () => { ); // Submit the form, success! - cy.intercept("POST", "/api/v1/erm/packages", { + cy.intercept("POST", "/api/v1/erm/eholdings/packages", { statusCode: 201, body: erm_package, }); @@ -95,7 +95,7 @@ describe("Package CRUD operations", () => { let erm_package = get_package(); let packages = [erm_package]; // Click the 'Edit' button from the list - cy.intercept("GET", "/api/v1/erm/packages*", { + cy.intercept("GET", "/api/v1/erm/eholdings/packages*", { statusCode: 200, body: packages, headers: { @@ -103,10 +103,10 @@ describe("Package CRUD operations", () => { "X-Total-Count": "1", }, }); - cy.intercept("GET", "/api/v1/erm/packages/*", erm_package).as( + cy.intercept("GET", "/api/v1/erm/eholdings/packages/*", erm_package).as( "get-package" ); - cy.visit("/cgi-bin/koha/erm/packages"); + cy.visit("/cgi-bin/koha/erm/eholdings/packages"); cy.get("#packages_list table tbody tr:first") .contains("Edit") .click(); @@ -120,7 +120,7 @@ describe("Package CRUD operations", () => { cy.get("#package_content_type").should("have.value", erm_package.content_type); // Submit the form, get 500 - cy.intercept("PUT", "/api/v1/erm/packages/*", { + cy.intercept("PUT", "/api/v1/erm/eholdings/packages/*", { statusCode: 500, error: "Something went wrong", }); @@ -130,7 +130,7 @@ describe("Package CRUD operations", () => { ); // Submit the form, success! - cy.intercept("PUT", "/api/v1/erm/packages/*", { + cy.intercept("PUT", "/api/v1/erm/eholdings/packages/*", { statusCode: 200, body: erm_package, }); @@ -144,7 +144,7 @@ describe("Package CRUD operations", () => { let erm_package = get_package(); let packages = [erm_package]; // Click the "name" link from the list - cy.intercept("GET", "/api/v1/erm/packages*", { + cy.intercept("GET", "/api/v1/erm/eholdings/packages*", { statusCode: 200, body: packages, headers: { @@ -152,10 +152,10 @@ describe("Package CRUD operations", () => { "X-Total-Count": "1", }, }); - cy.intercept("GET", "/api/v1/erm/packages/*", erm_package).as( + cy.intercept("GET", "/api/v1/erm/eholdings/packages/*", erm_package).as( "get-package" ); - cy.visit("/cgi-bin/koha/erm/packages"); + cy.visit("/cgi-bin/koha/erm/eholdings/packages"); let name_link = cy.get( "#packages_list table tbody tr:first td:first a" ); @@ -176,7 +176,7 @@ describe("Package CRUD operations", () => { let packages = [erm_package]; // Click the 'Delete' button from the list - cy.intercept("GET", "/api/v1/erm/packages*", { + cy.intercept("GET", "/api/v1/erm/eholdings/packages*", { statusCode: 200, body: packages, headers: { @@ -184,8 +184,8 @@ describe("Package CRUD operations", () => { "X-Total-Count": "1", }, }); - cy.intercept("GET", "/api/v1/erm/packages/*", erm_package); - cy.visit("/cgi-bin/koha/erm/packages"); + cy.intercept("GET", "/api/v1/erm/eholdings/packages/*", erm_package); + cy.visit("/cgi-bin/koha/erm/eholdings/packages"); cy.get("#packages_list table tbody tr:first") .contains("Delete") @@ -194,7 +194,7 @@ describe("Package CRUD operations", () => { cy.contains("Package name: " + erm_package.name); // Submit the form, get 500 - cy.intercept("DELETE", "/api/v1/erm/packages/*", { + cy.intercept("DELETE", "/api/v1/erm/eholdings/packages/*", { statusCode: 500, error: "Something went wrong", }); @@ -204,7 +204,7 @@ describe("Package CRUD operations", () => { ); // Submit the form, success! - cy.intercept("DELETE", "/api/v1/erm/packages/*", { + cy.intercept("DELETE", "/api/v1/erm/eholdings/packages/*", { statusCode: 204, body: null, }); diff --git a/installer/data/mysql/atomicupdate/erm.pl b/installer/data/mysql/atomicupdate/erm.pl index c8921749c9..c2cb106308 100755 --- a/installer/data/mysql/atomicupdate/erm.pl +++ b/installer/data/mysql/atomicupdate/erm.pl @@ -184,9 +184,9 @@ return { }); } - unless ( TableExists('erm_packages') ) { + unless ( TableExists('erm_eholdings_packages') ) { $dbh->do(q{ - CREATE TABLE `erm_packages` ( + CREATE TABLE `erm_eholdings_packages` ( `package_id` INT(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key', `vendor_id` INT(11) DEFAULT NULL COMMENT 'foreign key to aqbooksellers', `name` VARCHAR(255) NOT NULL COMMENT 'name of the package', @@ -200,21 +200,21 @@ return { }); } - unless ( TableExists('erm_packages_agreements') ) { + unless ( TableExists('erm_eholdings_packages_agreements') ) { $dbh->do(q{ - CREATE TABLE `erm_packages_agreements` ( + CREATE TABLE `erm_eholdings_packages_agreements` ( `package_id` INT(11) NOT NULL COMMENT 'link to the package', `agreement_id` INT(11) NOT NULL COMMENT 'link to the agreement', - CONSTRAINT `erm_packages_agreements_ibfk_1` FOREIGN KEY (`package_id`) REFERENCES `erm_packages` (`package_id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `erm_packages_agreements_ibfk_2` FOREIGN KEY (`agreement_id`) REFERENCES `erm_agreements` (`agreement_id`) ON DELETE CASCADE ON UPDATE CASCADE + CONSTRAINT `erm_eholdings_packages_agreements_ibfk_1` FOREIGN KEY (`package_id`) REFERENCES `erm_eholdings_packages` (`package_id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `erm_eholdings_packages_agreements_ibfk_2` FOREIGN KEY (`agreement_id`) REFERENCES `erm_agreements` (`agreement_id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; }); } - unless ( TableExists('erm_eholdings') ) { + unless ( TableExists('erm_eholdings_titles') ) { $dbh->do(q{ - CREATE TABLE `erm_eholdings` ( - `eholding_id` INT(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key', + CREATE TABLE `erm_eholdings_titles` ( + `title_id` INT(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key', `vendor_id` INT(11) DEFAULT NULL, `publication_title` VARCHAR(255) DEFAULT NULL, `print_identifier` VARCHAR(255) DEFAULT NULL, @@ -227,7 +227,6 @@ return { `num_last_issue_online` VARCHAR(255) DEFAULT NULL, `title_url` VARCHAR(255) DEFAULT NULL, `first_author` VARCHAR(255) DEFAULT NULL, - `title_id` VARCHAR(255) DEFAULT NULL, `embargo_info` VARCHAR(255) DEFAULT NULL, `coverage_depth` VARCHAR(255) DEFAULT NULL, `notes` VARCHAR(255) DEFAULT NULL, @@ -241,21 +240,23 @@ return { `parent_publication_title_id` VARCHAR(255) DEFAULT NULL, `preceeding_publication_title_id` VARCHAR(255) DEFAULT NULL, `access_type` VARCHAR(255) DEFAULT NULL, - CONSTRAINT `erm_eholdings_ibfk_1` FOREIGN KEY (`vendor_id`) REFERENCES `aqbooksellers` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, - PRIMARY KEY(`eholding_id`) + CONSTRAINT `erm_eholdings_titles_ibfk_1` FOREIGN KEY (`vendor_id`) REFERENCES `aqbooksellers` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, + PRIMARY KEY(`title_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; }); } - unless ( TableExists('erm_eholdings_packages') ) { + unless ( TableExists('erm_eholdings_resources') ) { $dbh->do(q{ - CREATE TABLE `erm_eholdings_packages` ( - `eholding_id` INT(11) NOT NULL, + CREATE TABLE `erm_eholdings_resources` ( + `resource_id` INT(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key', + `title_id` INT(11) NOT NULL, `package_id` INT(11) NOT NULL, `started_on` DATE, `ended_on` DATE, `proxy` VARCHAR(80) DEFAULT NULL, - CONSTRAINT `erm_eholdings_packages_ibfk_1` FOREIGN KEY (`eholding_id`) REFERENCES `erm_eholdings` (`eholding_id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `erm_eholdings_packages_ibfk_2` FOREIGN KEY (`package_id`) REFERENCES `erm_packages` (`package_id`) ON DELETE CASCADE ON UPDATE CASCADE + CONSTRAINT `erm_eholdings_resources_ibfk_1` FOREIGN KEY (`title_id`) REFERENCES `erm_eholdings_titles` (`title_id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `erm_eholdings_resources_ibfk_2` FOREIGN KEY (`package_id`) REFERENCES `erm_eholdings_packages` (`package_id`) ON DELETE CASCADE ON UPDATE CASCADE, + PRIMARY KEY(`resource_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; }); } diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index f5a6253684..66faff4a8a 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -2893,11 +2893,11 @@ CREATE TABLE `erm_agreement_documents` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- --- Table structure for table `erm_packages` +-- Table structure for table `erm_eholdings_packages` -- -DROP TABLE IF EXISTS `erm_packages`; -CREATE TABLE `erm_packages` ( +DROP TABLE IF EXISTS `erm_eholdings_packages`; +CREATE TABLE `erm_eholdings_packages` ( `package_id` INT(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key', `vendor_id` INT(11) DEFAULT NULL COMMENT 'foreign key to aqbooksellers', `name` VARCHAR(255) NOT NULL COMMENT 'name of the package', @@ -2905,29 +2905,29 @@ CREATE TABLE `erm_packages` ( `package_type` VARCHAR(80) DEFAULT NULL COMMENT 'type of the package', `content_type` VARCHAR(80) DEFAULT NULL COMMENT 'type of the package', `created_on` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'date of creation of the package', - CONSTRAINT `erm_packages_ibfk_1` FOREIGN KEY (`vendor_id`) REFERENCES `aqbooksellers` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, + CONSTRAINT `erm_eholdings_packages_ibfk_1` FOREIGN KEY (`vendor_id`) REFERENCES `aqbooksellers` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, PRIMARY KEY(`package_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- --- Table structure for table `erm_packages_agreements` +-- Table structure for table `erm_eholdings_packages_agreements` -- -DROP TABLE IF EXISTS `erm_packages_agreements`; -CREATE TABLE `erm_packages_agreements` ( +DROP TABLE IF EXISTS `erm_eholdings_packages_agreements`; +CREATE TABLE `erm_eholdings_packages_agreements` ( `package_id` INT(11) NOT NULL COMMENT 'link to the package', `agreement_id` INT(11) NOT NULL COMMENT 'link to the agreement', - CONSTRAINT `erm_packages_agreements_ibfk_1` FOREIGN KEY (`package_id`) REFERENCES `erm_packages` (`package_id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `erm_packages_agreements_ibfk_2` FOREIGN KEY (`agreement_id`) REFERENCES `erm_agreements` (`agreement_id`) ON DELETE CASCADE ON UPDATE CASCADE + CONSTRAINT `erm_eholdings_packages_agreements_ibfk_1` FOREIGN KEY (`package_id`) REFERENCES `erm_eholdings_packages` (`package_id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `erm_eholdings_packages_agreements_ibfk_2` FOREIGN KEY (`agreement_id`) REFERENCES `erm_agreements` (`agreement_id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- --- Table structure for table `erm_eholdings` +-- Table structure for table `erm_eholdings_titles` -- -DROP TABLE IF EXISTS `erm_eholdings`; -CREATE TABLE `erm_eholdings` ( - `eholding_id` INT(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key', +DROP TABLE IF EXISTS `erm_eholdings_titles`; +CREATE TABLE `erm_eholdings_titles` ( + `title_id` INT(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key', `vendor_id` INT(11) DEFAULT NULL, `publication_title` VARCHAR(255) DEFAULT NULL, `print_identifier` VARCHAR(255) DEFAULT NULL, @@ -2940,7 +2940,6 @@ CREATE TABLE `erm_eholdings` ( `num_last_issue_online` VARCHAR(255) DEFAULT NULL, `title_url` VARCHAR(255) DEFAULT NULL, `first_author` VARCHAR(255) DEFAULT NULL, - `title_id` VARCHAR(255) DEFAULT NULL, `embargo_info` VARCHAR(255) DEFAULT NULL, `coverage_depth` VARCHAR(255) DEFAULT NULL, `notes` VARCHAR(255) DEFAULT NULL, @@ -2954,23 +2953,25 @@ CREATE TABLE `erm_eholdings` ( `parent_publication_title_id` VARCHAR(255) DEFAULT NULL, `preceeding_publication_title_id` VARCHAR(255) DEFAULT NULL, `access_type` VARCHAR(255) DEFAULT NULL, - CONSTRAINT `erm_eholdings_ibfk_1` FOREIGN KEY (`vendor_id`) REFERENCES `aqbooksellers` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, - PRIMARY KEY(`eholding_id`) + CONSTRAINT `erm_eholdings_titles_ibfk_1` FOREIGN KEY (`vendor_id`) REFERENCES `aqbooksellers` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, + PRIMARY KEY(`title_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- --- Table structure for table `erm_eholdings_packages` +-- Table structure for table `erm_eholdings_resources` -- -DROP TABLE IF EXISTS `erm_eholdings_packages`; -CREATE TABLE `erm_eholdings_packages` ( - `eholding_id` INT(11) NOT NULL, +DROP TABLE IF EXISTS `erm_eholdings_resources`; +CREATE TABLE `erm_eholdings_resources` ( + `resource_id` INT(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key', + `title_id` INT(11) NOT NULL, `package_id` INT(11) NOT NULL, `started_on` DATE, `ended_on` DATE, `proxy` VARCHAR(80) DEFAULT NULL, - CONSTRAINT `erm_eholdings_packages_ibfk_1` FOREIGN KEY (`eholding_id`) REFERENCES `erm_eholdings` (`eholding_id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `erm_eholdings_packages_ibfk_2` FOREIGN KEY (`package_id`) REFERENCES `erm_packages` (`package_id`) ON DELETE CASCADE ON UPDATE CASCADE + CONSTRAINT `erm_eholdings_resources_ibfk_1` FOREIGN KEY (`title_id`) REFERENCES `erm_eholdings_titles` (`title_id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `erm_eholdings_resources_ibfk_2` FOREIGN KEY (`package_id`) REFERENCES `erm_eholdings_packages` (`package_id`) ON DELETE CASCADE ON UPDATE CASCADE, + PRIMARY KEY(`resource_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/erm/erm.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/erm/erm.tt index 1c27013397..4ea0633133 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/erm/erm.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/erm/erm.tt @@ -66,28 +66,28 @@ const package_types = [% To.json(AuthorisedValues.Get('ERM_PACKAGE_TYPE')) | $raw %]; const package_content_types = [% To.json(AuthorisedValues.Get('ERM_PACKAGE_CONTENT_TYPE')) | $raw %]; - var package_table_settings = [% TablesSettings.GetTableSettings( 'erm', 'packages', 'packages', 'json' ) | $raw %]; + var eholdings_packages_table_settings = [% TablesSettings.GetTableSettings( 'erm', 'eholdings', 'packages', 'json' ) | $raw %]; - var packages_table_url = '/api/v1/erm/packages?'; - [% IF package_name_filter %] - var package_name_filter = { + var eholdings_packages_table_url = '/api/v1/erm/eholdings/packages?'; + [% IF eholdings_package_name_filter %] + var eholdings_package_name_filter = { 'name': { - "like": '%[%- package_name_filter | html -%]%' + "like": '%[%- eholdings_package_name_filter | html -%]%' } }; - packages_table_url += 'q='+ encodeURIComponent(JSON.stringify(package_name_filter)); + eholdings_packages_table_url += 'q='+ encodeURIComponent(JSON.stringify(eholdings_package_name_filter)); [% END %] - var eholding_table_settings = [% TablesSettings.GetTableSettings( 'erm', 'eholdings', 'eholdings', 'json' ) | $raw %]; + var eholdings_titles_table_settings = [% TablesSettings.GetTableSettings( 'erm', 'eholdings', 'titles', 'json' ) | $raw %]; - var eholdings_table_url = '/api/v1/erm/eholdings?'; - [% IF eholding_name_filter %] - var eholding_name_filter = { + var eholdings_titles_table_url = '/api/v1/erm/eholdings/titles?'; + [% IF eholdings_title_name_filter %] + var eholdings_title_name_filter = { 'name': { - "like": '%[%- eholding_name_filter | html -%]%' + "like": '%[%- eholdings_title_name_filter | html -%]%' } }; - eholdings_table_url += 'q='+ encodeURIComponent(JSON.stringify(eholding_name_filter)); + eholdings_titles_table_url += 'q='+ encodeURIComponent(JSON.stringify(eholding_title_name_filter)); [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/PackageAgreements.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsPackageAgreements.vue similarity index 98% rename from koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/PackageAgreements.vue rename to koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsPackageAgreements.vue index 6f20591a53..9a464fd919 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/PackageAgreements.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsPackageAgreements.vue @@ -79,6 +79,6 @@ export default { props: { package_agreements: Array, }, - name: 'PackageAgreements', + name: 'EHoldingsPackageAgreements', } \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/PackagesFormAdd.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsPackagesFormAdd.vue similarity index 93% rename from koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/PackagesFormAdd.vue rename to koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsPackagesFormAdd.vue index 0cda220138..4389975760 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/PackagesFormAdd.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsPackagesFormAdd.vue @@ -91,7 +91,7 @@ - @@ -99,7 +99,7 @@
{{ $t("Cancel") }} \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/PackagesFormConfirmDelete.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsPackagesFormConfirmDelete.vue similarity index 91% rename from koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/PackagesFormConfirmDelete.vue rename to koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsPackagesFormConfirmDelete.vue index 12a6b82e0c..532eef0abe 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/PackagesFormConfirmDelete.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsPackagesFormConfirmDelete.vue @@ -19,7 +19,7 @@ :value="$t('Yes, delete')" /> {{ $t("No, do not delete") }} { if (response.status == 204) { setMessage(this.$t("Package deleted")) - this.$router.push("/cgi-bin/koha/erm/packages") + this.$router.push("/cgi-bin/koha/erm/eholdings/packages") } else { setError(response.message || response.statusText) } @@ -81,6 +81,6 @@ export default { ) } }, - name: "PackagesFormConfirmDelete", + name: "EHoldingsPackagesFormConfirmDelete", } diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/PackagesList.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsPackagesList.vue similarity index 94% rename from koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/PackagesList.vue rename to koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsPackagesList.vue index 7ac13257c1..a5b4c0048f 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/PackagesList.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsPackagesList.vue @@ -10,7 +10,7 @@ diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/PackagesShow.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsPackagesShow.vue similarity index 93% rename from koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/PackagesShow.vue rename to koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsPackagesShow.vue index 7ab438782b..18776edb89 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/PackagesShow.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsPackagesShow.vue @@ -5,13 +5,13 @@ {{ $t("Package.id", { id: erm_package.package_id }) }} @@ -68,7 +68,7 @@
{{ $t("Close") }} \ No newline at end of file + diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsFormConfirmDelete.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsTitlesFormConfirmDelete.vue similarity index 78% rename from koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsFormConfirmDelete.vue rename to koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsTitlesFormConfirmDelete.vue index 4067da8f29..1c2366d97c 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsFormConfirmDelete.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsTitlesFormConfirmDelete.vue @@ -1,13 +1,13 @@