From 8b0af8bbaacb39373b8354dac6235d5ade64bbad 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 Sponsored-by: PTFS Europe Signed-off-by: Martin Renvoize Signed-off-by: Katrin Fischer --- 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 789d8b6bdf..762bea6b16 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 ead9798d60..1c19f2bfcc 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 4d70de720c..e3fca0fc20 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt @@ -648,7 +648,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.39.5