Bug 29575: (QA follow-up) Add JSDoc documentation

This patch adds some basic documentation for the $patron_to_html
function the patchset introduces.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Martin Renvoize 2021-11-25 11:42:17 +00:00 committed by Fridolin Somers
parent 633d6d3e67
commit 0d35f38466

View file

@ -1,6 +1,13 @@
<!-- js-patron-title.inc -->
<script>
(function() {
/**
* Format the patron response from a Koha RESTful API request.
* @param {Object} patron The patron json object as returned from the Koha RESTful API
* @param {Object} config A configuration object
* Valid keys are: `invert_name`, `display_cardnumber` and `url`
* @return {string} The formatted HTML string
*/
window.$patron_to_html = function( patron, config ) {
if ( patron === undefined ) {