-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start shipping documentation bump 0.15.1
- Loading branch information
Showing
13 changed files
with
127 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
PWA/public/Services/FetchEventHandlers/DocumentationPagehandler.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { RouteEvents } from "../../RouteEvents.js"; | ||
import { ResponseTools } from "../ResponseTools.js"; | ||
export class DocumentationPageHandler { | ||
canHandleEvent(event) { | ||
return event.request.url.endsWith(RouteEvents.documentation); | ||
} | ||
async handleEvent(event) { | ||
return await ResponseTools.wrapInHtmlTemplate(RouteEvents.documentation); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
PWA/public/Services/FetchEventHandlers/HomepageHandler copy.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { RouteEvents } from "../../RouteEvents.js"; | ||
import { ResponseTools } from "../ResponseTools.js"; | ||
import { ActiveSessionContainer } from "../ActiveSession.js"; | ||
import { DistributionResponseProvider } from "../DistributionResponseProvider.js"; | ||
export class HomepageHandler extends ActiveSessionContainer { | ||
canHandleEvent(event) { | ||
return event.request.url.includes(RouteEvents.home); | ||
} | ||
async handleEvent(event) { | ||
if (this.activeSession.nameOfLastViewedDistribution) { | ||
return await new DistributionResponseProvider(this.activeSession).responseForDistribution(this.activeSession.nameOfLastViewedDistribution); | ||
} | ||
else { | ||
return await ResponseTools.fetchFromCacheWithRemoteAsFallBack(RouteEvents.home); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<div class="container has-text-left"> | ||
<h2 class="is-size-4">Installation for offline use</h2> | ||
<h3 class="is-size-6">iOS</h2> | ||
<ol> | ||
<li>Press the share button (square with arrow pointing outward) at bottom of browser window.</li> | ||
<li>Scroll down and press the "Add to Home Screen" button.</li> | ||
<li>Tap the Add button on the top right.</li> | ||
<li>Open the app once, to make sure it's offline contents are downloaded.</li> | ||
</ol> | ||
<br> | ||
<h3 class="is-size-6">Android</h2> | ||
<ol> | ||
<li>TODO: write these steps</li> | ||
</ol> | ||
<br> | ||
|
||
<h2 class="is-size-4">Before the distribution</h2> | ||
<ol> | ||
<li> | ||
Prepare the beneficiary list in | ||
<a href="https://www.microsoft.com/en-us/microsoft-365/excel" target="_blank">Microsoft Excel</a> (.xlsx). | ||
Exports from <a href="https://www.kobotoolbox.org/" target="_blank">KoboToolbox</a>, a mobile data collection software, are natively supported. | ||
<ul> | ||
<li>The beneficiary list must contain a field/column named “code”, which contains unique values for each beneficiary. In other words, each beneficiary must have a unique code.</li> | ||
<li>The beneficiary list can contain any number and type of fields/columns. However, for visualization purposes, it is recommended to keep only the fields/columns needed to identify beneficiaries.</li> | ||
</ul> | ||
</li> | ||
<li>Click “Create a new distribution” and fill in the required details.</li> | ||
<li>Click “Add beneficiary data” and upload your beneficiary list.</li> | ||
<li>Click “View beneficiary data” and verify that everything looks as expected.</li> | ||
</ol> | ||
|
||
<br> | ||
<h2 class="is-size-4">During the distribution</h2> | ||
<ol> | ||
<li>Click “Start distribution”.</li> | ||
<li>Select how you will insert the beneficiary codes: with a camera, a barcode scanner or manually.</li> | ||
<li>Insert beneficiary code.</li> | ||
<li> | ||
Verify beneficiary identity. | ||
<ul> | ||
<li>If identity is verified and the beneficiary receives aid, click “Mark as recipient”.</li> | ||
<li>If identity does not correspond, click “Continue distribution”. The beneficiary will not be marked as recipient.</li> | ||
</ul> | ||
</li> | ||
<li>Repeat steps 3-4 until all potential beneficiaries are served.</li> | ||
<li>If there are relief items left at the end of the distribution, you can check who did not show up by clicking “Go back to main menu” → “Check who is missing”.</li> | ||
</ol> | ||
|
||
<br> | ||
<h2 class="is-size-4">After the distribution</h2> | ||
<ol> | ||
<li> | ||
If you need data on the distribution for monitoring and reporting purposes: | ||
<ul> | ||
<li>Click “Download beneficiary data” to get the beneficiary list in | ||
<a href="https://www.microsoft.com/en-us/microsoft-365/excel" target="_blank">Microsoft Excel</a> (.xlsx). The spreadsheet will contain two additional fields/columns that show, for each beneficiary, if they received aid and when. | ||
</li> | ||
<li>Store the information safely.</li> | ||
</ul> | ||
</li> | ||
<li>If you need to start a new distribution, click “Change distribution” and repeat all steps above.</li> | ||
</ol> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
PWA/src/Services/FetchEventHandlers/DocumentationPagehandler.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { RouteEvents } from "../../RouteEvents.js"; | ||
import { FetchEvent } from "../../Interfaces/FetchEvent.js"; | ||
import { FetchEventHandler } from "../../Interfaces/FetchEventHandler.js"; | ||
import { ResponseTools } from "../ResponseTools.js"; | ||
|
||
export class DocumentationPageHandler implements FetchEventHandler { | ||
canHandleEvent(event: FetchEvent): boolean { | ||
return event.request.url.endsWith(RouteEvents.documentation); | ||
} | ||
|
||
async handleEvent(event: FetchEvent): Promise<Response> { | ||
return await ResponseTools.wrapInHtmlTemplate(RouteEvents.documentation) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters