Skip to content

Commit

Permalink
Add import template functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
frozenhelium authored and tnagorra committed Oct 8, 2024
1 parent 75cac46 commit 7757e54
Show file tree
Hide file tree
Showing 15 changed files with 1,919 additions and 1,136 deletions.
5 changes: 5 additions & 0 deletions .changeset/gold-rabbits-thank.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"go-web-app": patch
---

Add an option to download excel import template for DREF (Response) which user can fill up and import.
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"lint:fix": "yarn lint:js --fix && yarn lint:css --fix",
"test": "vitest",
"test:coverage": "vitest run --coverage",
"surge:deploy": "branch=$(git rev-parse --symbolic-full-name --abbrev-ref HEAD); branch=$(echo $branch | tr ./ -); cp build/index.html build/200.html; surge -p build/ -d https://ifrc-go-$branch.surge.sh",
"surge:deploy": "branch=$(git rev-parse --symbolic-full-name --abbrev-ref HEAD); branch=$(echo $branch | tr ./ -); cp ../build/index.html ../build/200.html; surge -p ../build/ -d https://ifrc-go-$branch.surge.sh",
"surge:teardown": "branch=$(git rev-parse --symbolic-full-name --abbrev-ref HEAD); branch=$(echo $branch | tr ./ -); surge teardown https://ifrc-go-$branch.surge.sh",
"postinstall": "patch-package"
},
Expand Down
2 changes: 1 addition & 1 deletion app/src/hooks/domain/useNationalSociety.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function useNationalSociety(

const nationalSocieties = useMemo(
() => (
countriesUnsafe?.results?.filter(isValidNationalSociety)
countriesUnsafe?.results?.filter(isValidNationalSociety) ?? []
),
[countriesUnsafe],
);
Expand Down
3 changes: 2 additions & 1 deletion app/src/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ export const PROJECT_STATUS_PLANNED = 0 satisfies StatusTypeEnum;
type DrefStatus = components<'read'>['schemas']['DrefDrefStatusEnumKey'];
export const DREF_STATUS_COMPLETED = 1 satisfies DrefStatus;
export const DREF_STATUS_IN_PROGRESS = 0 satisfies DrefStatus;
type TypeOfDrefEnum = components<'read'>['schemas']['DrefDrefDrefTypeEnumKey'];

export type TypeOfDrefEnum = components<'read'>['schemas']['DrefDrefDrefTypeEnumKey'];
export const DREF_TYPE_IMMINENT = 0 satisfies TypeOfDrefEnum;
export const DREF_TYPE_ASSESSMENT = 1 satisfies TypeOfDrefEnum;
export const DREF_TYPE_RESPONSE = 2 satisfies TypeOfDrefEnum;
Expand Down
Loading

0 comments on commit 7757e54

Please sign in to comment.