From c5c578cb67e1052f6c5bdc7c76528bb4398938c5 Mon Sep 17 00:00:00 2001 From: sshussain270 Date: Mon, 13 Mar 2023 16:49:18 +0000 Subject: [PATCH] [LIMS-360] Fix: Show sample groups with no samples (#497) * Merge 2023-R1.8 into master (#486) * LIMS-213: Update regex to enable creating Block-4 containers * LIMS-405: Update list of container types to include block-4 as a puck * LIMS-216: Fix message for industrial archived visits * Processing results aren't deleted from disk * Data from SW visits are archived, not deleted * Make clearer the status of raw data * LIMS-449: Left-align column headings in data processing tables * LIMS-453: Email container owners as well as dewar lab contacts when a dewar returns to the dewar store * LIMS-475: Assign SCHEDULINGRESTRICTIONS to --------- Co-authored-by: Mark Williams Co-authored-by: Richard Gildea Co-authored-by: NKatti2011 <108797920+NKatti2011@users.noreply.github.com> * LIMS-558: Set country as the lab contact country (#495) * Add Joins and adjust JS accordingly --------- Co-authored-by: Matthew Pritchard <46708056+MattPrit@users.noreply.github.com> Co-authored-by: Mark Williams Co-authored-by: Richard Gildea Co-authored-by: NKatti2011 <108797920+NKatti2011@users.noreply.github.com> Co-authored-by: John Holt <7570055+John-Holt-Tessella@users.noreply.github.com> Co-authored-by: Shah, Hussain (-,RAL,LSCI) --- api/src/Page/Sample.php | 4 ++-- client/src/js/modules/samples/components/sample-groups.vue | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/src/Page/Sample.php b/api/src/Page/Sample.php index 5fc6406b3..e64ad7679 100644 --- a/api/src/Page/Sample.php +++ b/api/src/Page/Sample.php @@ -2357,8 +2357,8 @@ function _sample_groups() { $from_table = 'FROM blsamplegroup bsg'; $joins = ' LEFT JOIN blsamplegroup_has_blsample bshg ON bshg.blsamplegroupid = bsg.blsamplegroupid - INNER JOIN blsample bs on bshg.blsampleid = bs.blsampleid - INNER JOIN container c on bs.containerid = c.containerid + LEFT JOIN blsample bs on bshg.blsampleid = bs.blsampleid + LEFT JOIN container c on bs.containerid = c.containerid '; $group_by .= 'GROUP BY bsg.blsamplegroupid'; diff --git a/client/src/js/modules/samples/components/sample-groups.vue b/client/src/js/modules/samples/components/sample-groups.vue index 5420a71fe..3c15940a5 100644 --- a/client/src/js/modules/samples/components/sample-groups.vue +++ b/client/src/js/modules/samples/components/sample-groups.vue @@ -167,7 +167,7 @@ export default { const uniqueContainer = {} this.groups = result.map(group => { - const containerList = group['CONTAINERIDS'].split(',') + const containerList = group['CONTAINERIDS']? group['CONTAINERIDS'].split(',') : [] containerList.forEach(container => { uniqueContainer[container] = container }) @@ -175,7 +175,7 @@ export default { return { ...group, CONTAINERIDS: containerList, - CONTAINERS: group['CONTAINERS'].replace(/,/g, ', ') + CONTAINERS: group['CONTAINERS']? group['CONTAINERS'].replace(/,/g, ', '): group['CONTAINERS'] } })