Skip to content

Commit

Permalink
Merge branch 'main' into CU-86c0wk6k2_FEAT-Include-shortcut-for-creat…
Browse files Browse the repository at this point in the history
…ing-new-User-for-specific-person_Max-Makaluk
  • Loading branch information
FussuChalice authored Dec 8, 2024
2 parents 6d4d464 + efe9091 commit e665a4f
Show file tree
Hide file tree
Showing 56 changed files with 767 additions and 471 deletions.
7 changes: 0 additions & 7 deletions .firebaserc

This file was deleted.

27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
# [3.3.0](https://github.com/sws2apps/organized-app/compare/v3.2.0...v3.3.0) (2024-12-08)


### Bug Fixes

* **app:** persist some app data when logging out ([e4cd3d1](https://github.com/sws2apps/organized-app/commit/e4cd3d1875d3c1d1ccc5cd50907e89e6370c16c3))
* **components:** update margin for typography in assignments checklist ([082ca1e](https://github.com/sws2apps/organized-app/commit/082ca1e172bcb529a260e27cd887a05cf5b2d9e4))
* **congregation:** unwanted error message for changing codes ([2bc7361](https://github.com/sws2apps/organized-app/commit/2bc73615c533f17651264ae3a9df5607a95cf3f4))
* **dashboard:** manual backup not running ([3c9a449](https://github.com/sws2apps/organized-app/commit/3c9a449b92dc56066e8fae8e073a6fd4c36589b8))
* **locales:** issue with tagalog language translation ([04823d9](https://github.com/sws2apps/organized-app/commit/04823d9d71a9c25bcfc91bc12896e32d1c05568c))
* **locales:** update language path for hungarian ([8335cf6](https://github.com/sws2apps/organized-app/commit/8335cf6dd5a23c5f64a292f1efc2208c7530442b))
* **ministry:** month selector in dark them for pioneer applications ([4d367c9](https://github.com/sws2apps/organized-app/commit/4d367c9637c305106ba510a0968f3657276f45c8))
* **ministry:** report submission flow ([4d2a285](https://github.com/sws2apps/organized-app/commit/4d2a285302f8535427cd7a30da91093f15e6519c))
* **persons:** update date of baptism change flow ([4a60e74](https://github.com/sws2apps/organized-app/commit/4a60e74d802eae732cab0e675d362b06cce5445a))
* **reminders:** check if publisher in current report month ([adb25e4](https://github.com/sws2apps/organized-app/commit/adb25e4b91e32c7f3774b1ab3f7c5a57dd6737ce))
* **reports:** add indeterminate state for S-21 export checkboxes ([569ad6e](https://github.com/sws2apps/organized-app/commit/569ad6e50eb880815d91d11c5e33ea892d8a1c00))
* **reports:** remove duplicate reports ([bc90ace](https://github.com/sws2apps/organized-app/commit/bc90ace295c124223c8deb1239d1aa5c6dd339ba))
* **reports:** update submission flow ([4f52dfb](https://github.com/sws2apps/organized-app/commit/4f52dfb3602f2f2e84c1a4dc9e18cd39488c737b))
* **reports:** update year range when exporting congregation cards ([246e8c8](https://github.com/sws2apps/organized-app/commit/246e8c86123736d4dc045d01484f7e43ef2798f6))
* **startup:** screens mixed up in some conditions ([662f04e](https://github.com/sws2apps/organized-app/commit/662f04e10f0bfd143bc9560db197e3b36964967b))
* **templates:** use 24 hour format settings in exported pdf ([ccb02fa](https://github.com/sws2apps/organized-app/commit/ccb02fa7c87385c7b12e5dd5ca1fd3c908fbf6c3))


### Features

* **meetings:** add 'No assignments yet' in the assignment history ([41b2955](https://github.com/sws2apps/organized-app/commit/41b2955a4c69ef7eaf88a8c41d2c0c673c4fce0e))

# [3.2.0](https://github.com/sws2apps/organized-app/compare/v3.1.0...v3.2.0) (2024-12-03)


Expand Down
52 changes: 29 additions & 23 deletions package-lock.json

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

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "organized",
"private": true,
"version": "3.2.0",
"version": "3.3.0",
"license": "MIT",
"type": "module",
"repository": {
Expand Down Expand Up @@ -37,7 +37,7 @@
"@react-pdf/renderer": "^4.1.5",
"@smakss/random-string": "^2.0.2",
"@sws2apps/react-sw-helper": "^1.25.0",
"@tanstack/react-query": "^5.62.2",
"@tanstack/react-query": "^5.62.3",
"comlink": "^4.4.2",
"crypto-es": "^2.1.0",
"date-fns": "^4.0.0",
Expand Down Expand Up @@ -72,7 +72,7 @@
},
"devDependencies": {
"@babel/plugin-transform-private-property-in-object": "^7.25.9",
"@eslint/compat": "^1.2.3",
"@eslint/compat": "^1.2.4",
"@eslint/eslintrc": "^3.2.0",
"@eslint/js": "^9.16.0",
"@semantic-release/changelog": "^6.0.3",
Expand All @@ -99,8 +99,8 @@
"globals": "^15.13.0",
"husky": "^9.1.7",
"lint-staged": "^15.2.10",
"prettier": "^3.4.1",
"react-refresh": "^0.14.2",
"prettier": "^3.4.2",
"react-refresh": "^0.16.0",
"rollup": "^4.28.0",
"semantic-release": "^24.2.0",
"serve": "^14.2.4",
Expand Down
15 changes: 1 addition & 14 deletions src/RootWrap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,7 @@ import WaitingLoader from '@components/waiting_loader';

const Migration = lazy(() => import('./migration'));

const getFont = () => {
const cookiesConsent = Boolean(localStorage.getItem('userConsent'));

if (cookiesConsent) {
return localStorage.getItem('app_font') || 'Inter';
}

const hash = new URL(window.location.href).hash;
const params = new URLSearchParams(hash.substring(2));

return params.get('font') || 'Inter';
};

const font = getFont();
const font = localStorage.getItem('app_font') || 'Inter';

const cache = createCache({
key: 'css',
Expand Down
4 changes: 2 additions & 2 deletions src/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const LANGUAGE_LIST = [
{ code: 't', locale: 'pt-BR', name: 'Português (Brasil)' },
{ code: 'u', locale: 'ru-RU', name: 'русский' },
{ code: 'm', locale: 'ro-RO', name: 'Română' },
{ code: 'tg', locale: 'tl-PH', name: 'Tagalog' },
{ code: 'tg', locale: 'tl-PH', name: 'Tagalog', identifier: 'tgl' },
{
code: 'tnd',
locale: 'mg-TND',
Expand Down Expand Up @@ -65,7 +65,7 @@ export const LANGUAGE_LIST = [
{ code: 'cv', locale: 'ceb-PH', name: 'Cebuano' },
{ code: 'kha', locale: 'mn-MN', name: 'монгол' },
{ code: 'rea', locale: 'hy-AM', name: 'Հայերեն' },
{ code: 'h', locale: 'hy-HU', name: 'magyar' },
{ code: 'h', locale: 'hu-HU', name: 'magyar' },
{ code: 'tpo', locale: 'pt-PT', name: 'Português (Portugal)' },
{ code: 'fi', locale: 'fi-FI', name: 'suomi' },
{ code: 'st', locale: 'et-EE', name: 'eesti' },
Expand Down
1 change: 0 additions & 1 deletion src/definition/ministry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export type APRecordType = {
};

export type IncomingReport = {
report_id: string;
person_uid: string;
bible_studies: number;
comments: string;
Expand Down
39 changes: 19 additions & 20 deletions src/features/app_notification/container/useContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,7 @@ import {
dbVisitingSpeakersUpdateRemote,
decryptVisitingSpeakers,
} from '@services/dexie/visiting_speakers';
import {
accountTypeState,
congAccessCodeState,
congMasterKeyState,
} from '@states/settings';
import { accountTypeState } from '@states/settings';
import { decryptData, decryptObject } from '@services/encryption';
import { displaySnackNotification } from '@services/recoil/app';
import { getMessageByCode } from '@services/i18n/translation';
Expand All @@ -37,6 +33,7 @@ import usePendingRequests from './usePendingRequests';
import useRemoteNotifications from './useRemoteNotifications';
import useUnverifiedReports from './useUnverifiedReports';
import { apiFetchNotifications } from '@services/api/notification';
import appDb from '@db/appDb';

const useContainer = () => {
const { t } = useAppTranslation();
Expand All @@ -61,12 +58,11 @@ const useContainer = () => {
const congregationsNotDisapproved = useRecoilValue(
congregationsNotDisapprovedState
);
const congMasterKey = useRecoilValue(congMasterKeyState);
const congAccessCode = useRecoilValue(congAccessCodeState);

const accountType = useRecoilValue(accountTypeState);
const userID = useRecoilValue(userIDState);

const { data, isPending } = useQuery({
const { data, isFetching } = useQuery({
enabled:
userID.length > 0 &&
accountType === 'vip' &&
Expand Down Expand Up @@ -160,6 +156,9 @@ const useContainer = () => {
);

if (foundCong) {
const settings = await appDb.app_settings.get(1);
const congMasterKey = settings.cong_settings.cong_master_key;

const masterKey = decryptData(
data.result.cong_master_key,
congMasterKey
Expand All @@ -184,14 +183,7 @@ const useContainer = () => {
severity: 'error',
});
}
}, [
data,
pendingRequests,
setNotifications,
t,
congregationRemotes,
congMasterKey,
]);
}, [data, pendingRequests, setNotifications, t, congregationRemotes]);

const handleRejectedRequests = useCallback(async () => {
try {
Expand Down Expand Up @@ -276,6 +268,9 @@ const useContainer = () => {

if (!incoming) return;

const settings = await appDb.app_settings.get(1);
const congAccessCode = settings.cong_settings.cong_access_code;

const remoteAccessCode = data.result.cong_access_code;
const accessCode = decryptData(remoteAccessCode, congAccessCode);

Expand All @@ -295,7 +290,7 @@ const useContainer = () => {
severity: 'error',
});
}
}, [data, congAccessCode, setApplications]);
}, [data, setApplications]);

const handleUnauthorized = useCallback(async () => {
const status = data?.status;
Expand All @@ -311,6 +306,9 @@ const useContainer = () => {

if (!incoming) return;

const settings = await appDb.app_settings.get(1);
const congAccessCode = settings.cong_settings.cong_access_code;

const remoteAccessCode = data.result.cong_access_code;
const accessCode = decryptData(remoteAccessCode, congAccessCode);

Expand All @@ -330,10 +328,10 @@ const useContainer = () => {
severity: 'error',
});
}
}, [data, congAccessCode]);
}, [data]);

useEffect(() => {
if (!isPending) {
if (!isFetching) {
handleUnauthorized();

handlePendingSpeakersRequests();
Expand All @@ -349,7 +347,8 @@ const useContainer = () => {
checkUnverifiedReports();
}
}, [
isPending,
data,
isFetching,
handleUnauthorized,
handlePendingSpeakersRequests,
handleRemoteCongregations,
Expand Down
4 changes: 3 additions & 1 deletion src/features/app_start/shared/hooks/useFeedback.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ const useFeedback = () => {
document.querySelector<HTMLElement>('#onboarding-error');

const hideMessage = () => {
onboardingError.style.animation = 'fade-out 0.15s forwards';
if (onboardingError) {
onboardingError.style.animation = 'fade-out 0.15s forwards';
}
};

const showMessage = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ const useCongregationAccessCode = () => {

await dbAppSettingsUpdate({
'cong_settings.cong_access_code': tmpAccessCode,
'cong_settings.cong_new': true,
});

setIsSetup(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ const useCongregationDetails = () => {
'cong_settings.cong_circuit': result.cong_settings.cong_circuit,
'cong_settings.midweek_meeting': midweekMeeting,
'cong_settings.weekend_meeting': weekendMeeting,
'cong_settings.cong_new': true,
});

await setIsNewCongregation(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ const useCongregationMasterKey = () => {

await dbAppSettingsUpdate({
'cong_settings.cong_master_key': tmpMasterKey,
'cong_settings.cong_new': true,
});

setCurrentStep(2);
Expand Down
Loading

0 comments on commit e665a4f

Please sign in to comment.