From a3f7da632446afb67c56597edb63a648531f2e4a Mon Sep 17 00:00:00 2001 From: rcmenno <129762469+rcmenno@users.noreply.github.com> Date: Mon, 14 Oct 2024 14:23:27 +0200 Subject: [PATCH] make sure template has correct name and make it clear custom columns may be added bump 0.5.5 --- PWA/package.json | 2 +- .../DownloadSpreadsheetTemplateHandler.js | 8 ++++---- PWA/public/index.html | 2 +- .../DownloadSpreadsheetTemplateHandler.ts | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/PWA/package.json b/PWA/package.json index 5b801ff..eaa67b8 100644 --- a/PWA/package.json +++ b/PWA/package.json @@ -1,6 +1,6 @@ { "name": "ReliefBox", - "version": "0.5.4", + "version": "0.5.5", "description": "A tool for managing the distribution of relief items during humanitarian emergencies.", "main": "index.js", "scripts": { diff --git a/PWA/public/Services/FetchEventHandlers/DownloadSpreadsheetTemplateHandler.js b/PWA/public/Services/FetchEventHandlers/DownloadSpreadsheetTemplateHandler.js index 21a1727..5fe3fa0 100644 --- a/PWA/public/Services/FetchEventHandlers/DownloadSpreadsheetTemplateHandler.js +++ b/PWA/public/Services/FetchEventHandlers/DownloadSpreadsheetTemplateHandler.js @@ -7,14 +7,14 @@ export class DownloadSpreadsheetTemplateHandler { async handleEvent(event) { try { const templateJson = [ - { "code": 4680490, "first name": "Aric", "last name": "Norwood" }, - { "code": 4535835, "first name": "Lira", "last name": "Calloway" }, - { "code": 9155570, "first name": "Daven", "last name": "Morrell" }, + { "code": 4680490, "first name": "Aric", "last name": "Norwood", "your column": "your value" }, + { "code": 4535835, "first name": "Lira", "last name": "Calloway", "your column": "your value" }, + { "code": 9155570, "first name": "Daven", "last name": "Morrell", "your column": "your value" }, ]; return new Response(await SpreadSheetService.fileFromJson(templateJson), { headers: { 'Content-Type': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', - 'Content-Disposition': 'attachment; filename="data_processed.xlsx"' + 'Content-Disposition': 'attachment; filename="data_template.xlsx"' } }); } diff --git a/PWA/public/index.html b/PWA/public/index.html index 697d87f..d17b873 100644 --- a/PWA/public/index.html +++ b/PWA/public/index.html @@ -39,7 +39,7 @@ - +