From ab40e9eaa67e134d8ed062c5a11ec001804fb5af Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 9 Feb 2024 15:38:34 +0000 Subject: [PATCH] Bug 6796: Fix api specifications and embed hours in librarly management --- api/v1/swagger/definitions/library.yaml | 2 +- api/v1/swagger/paths/libraries.yaml | 7 ++----- koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/api/v1/swagger/definitions/library.yaml b/api/v1/swagger/definitions/library.yaml index 789d8b6bdfa..762bea6b163 100644 --- a/api/v1/swagger/definitions/library.yaml +++ b/api/v1/swagger/definitions/library.yaml @@ -117,7 +117,7 @@ properties: description: If the library needs an override to act as pickup location for a hold library_hours: type: - - object + - array - "null" description: The open and close times for a library on any given day additionalProperties: false diff --git a/api/v1/swagger/paths/libraries.yaml b/api/v1/swagger/paths/libraries.yaml index ead9798d60b..1c19f2bfccd 100644 --- a/api/v1/swagger/paths/libraries.yaml +++ b/api/v1/swagger/paths/libraries.yaml @@ -87,11 +87,6 @@ description: Case insensitive 'starts_with' search on notes required: false type: string - - name: library_hours - in: query - description: Case insensitive 'starts_with' search on notes - required: false - type: string - $ref: "../swagger.yaml#/parameters/match" - $ref: "../swagger.yaml#/parameters/order_by" - $ref: "../swagger.yaml#/parameters/page" @@ -108,6 +103,7 @@ type: string enum: - smtp_server + - library_hours collectionFormat: csv produces: - application/json @@ -200,6 +196,7 @@ type: string enum: - smtp_server + - library_hours collectionFormat: csv produces: - application/json diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt index 64ed6f3200b..1dc5be25ea6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt @@ -646,7 +646,7 @@ "ajax": { "url": libraries_url }, - 'embed': [ 'smtp_server' ], + 'embed': [ 'smtp_server', 'library_hours' ], 'emptyTable': '
'+_("There are no libraries defined.")+' '+_("Start defining libraries")+'.
', "stateSave": true, "columnDefs": [ { -- 2.43.0