From 8afee29e02f59f335daf36cec8a464d6b14e0431 Mon Sep 17 00:00:00 2001 From: Sabir Hassan Date: Wed, 24 Jan 2024 14:28:56 +0500 Subject: [PATCH] chore: limit submitting rows based on liscence --- client/src/app/xlmap/xlmap.component.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/src/app/xlmap/xlmap.component.ts b/client/src/app/xlmap/xlmap.component.ts index 65971ca..6bd1281 100644 --- a/client/src/app/xlmap/xlmap.component.ts +++ b/client/src/app/xlmap/xlmap.component.ts @@ -324,7 +324,10 @@ export class XLMapComponent implements AfterContentInit, AfterViewInit, OnInit { const csvContent = Object.keys(this.xlData[0]).join(',') + '\n' + - this.xlData.map((row: any) => Object.values(row).join(',')).join('\n') + this.xlData + .slice(0, this.licenceState.value.submit_rows_limit) + .map((row: any) => Object.values(row).join(',')) + .join('\n') const blob = new Blob([csvContent], { type: 'application/csv' }) const file: File = this.blobToFile(blob, this.filename + '.csv')