Bugzilla – Attachment 175796 Details for
Bug 38689
EDIFACT errors should log to a staff accessible location
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38689: Add basic rendering for errors in edifact messages display
Bug-38689-Add-basic-rendering-for-errors-in-edifac.patch (text/plain), 2.60 KB, created by
Martin Renvoize (ashimema)
on 2024-12-19 17:39:13 UTC
(
hide
)
Description:
Bug 38689: Add basic rendering for errors in edifact messages display
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-12-19 17:39:13 UTC
Size:
2.60 KB
patch
obsolete
>From 4422c44d2cca3940aa49dd46ed7184b028e24c63 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 19 Dec 2024 17:37:31 +0000 >Subject: [PATCH] Bug 38689: Add basic rendering for errors in edifact messages > display > >--- > api/v1/swagger/definitions/edifact_file.yaml | 2 ++ > .../prog/en/modules/acqui/edifactmsgs.tt | 21 +++++++++++++++++-- > 2 files changed, 21 insertions(+), 2 deletions(-) > >diff --git a/api/v1/swagger/definitions/edifact_file.yaml b/api/v1/swagger/definitions/edifact_file.yaml >index 4602ba28b68..de74f020934 100644 >--- a/api/v1/swagger/definitions/edifact_file.yaml >+++ b/api/v1/swagger/definitions/edifact_file.yaml >@@ -55,4 +55,6 @@ properties: > - string > - "null" > description: EDIFACT file name >+ errors: >+ type: array > additionalProperties: false >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/edifactmsgs.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/edifactmsgs.tt >index 69cb4c43c53..c7612cc6ec0 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/edifactmsgs.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/edifactmsgs.tt >@@ -82,7 +82,8 @@ > }, > "embed": [ > "vendor", >- "basket" >+ "basket", >+ "errors" > ], > "columns": [ > { >@@ -104,7 +105,23 @@ > "data": "status", > "title": _("Status"), > "searchable": true, >- "orderable": true >+ "orderable": true, >+ "render": function(daya, type, row, meta) { >+ let rendered = ''; >+ if ( row.errors.length > 0 ) { >+ let errorsList = '<ul>'; >+ row.errors.forEach(error => { >+ if (error.details) { >+ errorsList += '<li>' + error.details + '</li>'; >+ } >+ }); >+ errorsList += '</ul>'; >+ rendered = row.status + ' (<a href="#" title="'+ errorsList + '">' + _("with errors") + '</a>)'; >+ } else { >+ rendered = row.status; >+ } >+ return rendered; >+ } > }, > { > "data": "vendor.name", >-- >2.47.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 38689
:
175788
|
175789
|
175790
|
175793
|
175794
|
175795
|
175796
|
175797
|
175809
|
175810
|
175811
|
175812
|
175813
|
175814
|
175815
|
175816
|
175817
|
176127
|
176128
|
176129
|
176130
|
176131
|
176132
|
176133
|
176134
|
176173
|
176174
|
176175
|
176176
|
176177
|
176178
|
176179
|
176180
|
176181
|
176182
|
176183
|
176373
|
176374
|
176375
|
176376
|
176377
|
176378
|
176379
|
176380
|
176381
|
176382
|
176524
|
176525
|
176526
|
176527
|
176528
|
176529
|
176530
|
176531
|
176532
|
176533
|
176605
|
176606
|
176607
|
176608
|
176609
|
176610
|
176611
|
176612
|
176613
|
176614