From 3bafef2f9ae22bd88acd14c0156a25a9ea3bf12b Mon Sep 17 00:00:00 2001 From: Mark Williams Date: Mon, 16 Feb 2026 15:51:15 +0000 Subject: [PATCH 1/2] LIMS-2037: Remove manual check for duplicate acronyms --- .../xpdf/samples/views/vue-simplesample.vue | 55 +++---------------- 1 file changed, 7 insertions(+), 48 deletions(-) diff --git a/client/src/js/modules/types/xpdf/samples/views/vue-simplesample.vue b/client/src/js/modules/types/xpdf/samples/views/vue-simplesample.vue index a1eeead75..e2ebcc01d 100644 --- a/client/src/js/modules/types/xpdf/samples/views/vue-simplesample.vue +++ b/client/src/js/modules/types/xpdf/samples/views/vue-simplesample.vue @@ -287,6 +287,10 @@ inputName: 'acronym', required: true, requiredError, + unique: true, + uniqueError: function(headerName, rowNumber){ + return `${headerName} is not unique in row ${rowNumber}` + }, headerError }, { @@ -385,8 +389,6 @@ csvData: [], csvErrors: [], commaInComments: false, - duplicateAcronym: false, - duplicateAcronymRows: [], proteinid: null, externalid: null, sampleGroupCollection: null, @@ -700,8 +702,6 @@ setCSVFile: function(event){ this.csvData = [] this.csvErrors = [] - this.duplicateAcronym = false - this.duplicateAcronymRows = [] if(event.target.files.length === 0){ this.fileValid = false @@ -729,9 +729,6 @@ self.csvErrors.push("Only headers have been submitted, please add some sample information") } - if(self.duplicateAcronym) - self.csvErrors = self.csvErrors.concat(self.duplicateAcronymRows) - if(self.csvErrors.length === 0) self.fileValid = true else { @@ -758,58 +755,20 @@ self.commaInComments = false; var newLineSplit = e.target.result.split("\n") newLineSplit.forEach(function(row){ - var cells = row.split(',') - if(cells.length > 5){ - self.commaInComments = true - ready = true - } + if(row.split(',').length > 5) self.commaInComments = true }) - // Display duplicate acronyms and the row they are on (only in file duplicates, not against database) - // Hopefully this issue gets implemented then we can remove all this. https://github.com/shystruk/csv-file-validator/issues/20 - var acronyms = [] - var acronymIndex = 5 - - for(var i=0; i Date: Mon, 16 Feb 2026 15:55:49 +0000 Subject: [PATCH 2/2] LIMS-2037: Ensure updated csv-file-validator --- client/package-lock.json | 2 +- client/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/package-lock.json b/client/package-lock.json index 3c41082c6..9a227bd89 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -18,7 +18,7 @@ "backgrid-paginator": "0.3.9", "backgrid-select-all": "0.3.5", "ci": "^2.2.0", - "csv-file-validator": "^1.7.4", + "csv-file-validator": "^1.10.2", "d3-scale": "^3.2.3", "d3-scale-chromatic": "^2.0.0", "d3-selection": "^2.0.0", diff --git a/client/package.json b/client/package.json index 4808d17de..d738ed8a2 100644 --- a/client/package.json +++ b/client/package.json @@ -66,7 +66,7 @@ "backgrid-paginator": "0.3.9", "backgrid-select-all": "0.3.5", "ci": "^2.2.0", - "csv-file-validator": "^1.7.4", + "csv-file-validator": "^1.10.2", "d3-scale": "^3.2.3", "d3-scale-chromatic": "^2.0.0", "d3-selection": "^2.0.0",