Skip to content

Commit

Permalink
fix(ministry): report submission flow
Browse files Browse the repository at this point in the history
  • Loading branch information
rhahao committed Dec 8, 2024
1 parent adb25e4 commit 4d2a285
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 2 deletions.
22 changes: 22 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"firebase": "^11.0.2",
"i18next": "^24.0.5",
"interweave": "^13.1.0",
"jotai": "^2.10.3",
"jszip": "^3.10.1",
"jw-epub-parser": "^3.29.1",
"mui-one-time-password-input": "^3.0.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ const useWithdrawReport = ({ onClose }: WithdrawReportProps) => {
);

const report = structuredClone(findReport);

report.report_data.status = 'pending';

await dbUserFieldServiceReportsSave(report);
Expand Down
2 changes: 2 additions & 0 deletions src/pages/ministry/ministry_report/useMinistryReport.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ const useMinistryReport = () => {

if (status === 'confirmed') return true;

if (status === 'received') return true;

return !shared_ministry;
}, [settings, shared_ministry, status]);

Expand Down
8 changes: 7 additions & 1 deletion src/services/app/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,13 @@ export const handleDeleteDatabase = async () => {
await dbAppDelete();
await userSignOut();

const freezeKeys = ['userConsent', 'organized_whatsnew'];
const freezeKeys = [
'userConsent',
'organized_whatsnew',
'theme',
'ui_lang',
'app_font',
];

const storageKeys = Object.keys(localStorage).filter(
(key) => !freezeKeys.includes(key)
Expand Down

0 comments on commit 4d2a285

Please sign in to comment.