Skip to content

Commit

Permalink
make sure template has correct name and make it clear custom columns …
Browse files Browse the repository at this point in the history
…may be added bump 0.5.5
  • Loading branch information
rcmenno committed Oct 14, 2024
1 parent 08035e9 commit a3f7da6
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion PWA/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"'
}
});
}
Expand Down
2 changes: 1 addition & 1 deletion PWA/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<!-- <a class="navbar-item">-->
<img src="images/ReliefBox-horizontal-nobackground.png" width="220" height="30">
<!-- </a>-->
<div class="navbar-item">Alpha 0.5.4</div>
<div class="navbar-item">Alpha 0.5.5</div>
<a role="button" class="navbar-burger" aria-label="menu" aria-expanded="false" data-target="navbarBasicExample">
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ export class DownloadSpreadsheetTemplateHandler implements FetchEventHandler {
async handleEvent(event: FetchEvent): Promise<Response> {
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"'
}
});
} catch(error) {
Expand Down

0 comments on commit a3f7da6

Please sign in to comment.