Skip to content

Commit

Permalink
#286 - (version/0.16.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
victorbalssa committed May 19, 2024
1 parent 59d0e99 commit a196aa6
Show file tree
Hide file tree
Showing 10 changed files with 1,560 additions and 1,779 deletions.
8 changes: 5 additions & 3 deletions app.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default {
'ios',
'android',
],
version: '0.15.0',
version: '0.16.0',
orientation: 'portrait',
updates: {
enabled: true,
Expand Down Expand Up @@ -38,7 +38,7 @@ export default {
usesNonExemptEncryption: false,
},
bundleIdentifier: IS_DEV ? 'abacus.fireflyiii.ios.app.dev' : 'abacus.ios.app',
buildNumber: '0.15.0',
buildNumber: '0.16.0',
},
android: {
icon: './src/images/icon-abacus.png',
Expand All @@ -56,7 +56,7 @@ export default {
},
playStoreUrl: 'https://play.google.com/store/apps/details?id=abacus.fireflyiii.android.app',
package: IS_DEV ? 'abacus.fireflyiii.android.app.dev' : 'abacus.fireflyiii.android.app',
versionCode: 23,
versionCode: 24,
},
scheme: 'abacusfiiiapp',
githubUrl: 'https://github.com/victorbalssa/abacus',
Expand All @@ -69,6 +69,8 @@ export default {
},
},
plugins: [
'expo-asset',
'expo-secure-store',
'expo-localization',
'./plugins/withAndroidStyles',
'./plugins/withAndroidManifest',
Expand Down
3,223 changes: 1,494 additions & 1,729 deletions package-lock.json

Large diffs are not rendered by default.

76 changes: 38 additions & 38 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "abacus",
"version": "0.15.0",
"version": "0.16.0",
"private": true,
"homepage": "https://github.com/victorbalssa/abacus",
"scripts": {
Expand All @@ -18,57 +18,57 @@
]
},
"dependencies": {
"@expo/config-plugins": "~7.8.0",
"@expo/metro-runtime": "~3.1.3",
"@expo/config-plugins": "~8.0.0",
"@expo/metro-runtime": "~3.2.1",
"@expo/vector-icons": "^14.0.0",
"@react-native-async-storage/async-storage": "1.21.0",
"@react-native-community/datetimepicker": "7.6.1",
"@react-native-async-storage/async-storage": "1.23.1",
"@react-native-community/datetimepicker": "8.0.1",
"@react-navigation/bottom-tabs": "6.5.14",
"@react-navigation/native": "6.1.12",
"@react-navigation/native-stack": "6.9.20",
"@rematch/core": "^2.2.0",
"@rematch/loading": "^2.1.2",
"@rematch/persist": "^2.1.2",
"@shopify/react-native-skia": "0.1.221",
"@shopify/react-native-skia": "1.2.3",
"axios": "1.6.7",
"babel-polyfill": "^6.26.0",
"base-64": "^1.0.0",
"bootstrap": "^4.4.1",
"expo": "~50.0.17",
"expo-application": "~5.8.4",
"expo-asset": "~9.0.2",
"expo-auth-session": "~5.4.0",
"expo-blur": "~12.9.2",
"expo-clipboard": "~5.0.1",
"expo-crypto": "~12.8.1",
"expo-dev-client": "~3.3.11",
"expo-device": "~5.9.4",
"expo-font": "~11.10.2",
"expo-haptics": "~12.8.1",
"expo-linear-gradient": "~12.7.2",
"expo-linking": "~6.2.2",
"expo-local-authentication": "~13.8.0",
"expo-localization": "~14.8.4",
"expo-random": "~13.6.0",
"expo-secure-store": "~12.8.1",
"expo-status-bar": "~1.11.1",
"expo-store-review": "~6.8.3",
"expo-system-ui": "~2.9.4",
"expo-updates": "~0.24.12",
"expo": "^51.0.8",
"expo-application": "~5.9.1",
"expo-asset": "~10.0.6",
"expo-auth-session": "~5.5.2",
"expo-blur": "~13.0.2",
"expo-clipboard": "~6.0.3",
"expo-crypto": "~13.0.2",
"expo-dev-client": "~4.0.14",
"expo-device": "~6.0.2",
"expo-font": "~12.0.5",
"expo-haptics": "~13.0.1",
"expo-linear-gradient": "~13.0.2",
"expo-linking": "~6.3.1",
"expo-local-authentication": "~14.0.1",
"expo-localization": "~15.0.3",
"expo-random": "~14.0.1",
"expo-secure-store": "~13.0.1",
"expo-status-bar": "~1.12.1",
"expo-store-review": "~7.0.2",
"expo-system-ui": "~3.0.4",
"expo-updates": "~0.25.14",
"globally": "^0.0.0",
"i18n-js": "^4.1.1",
"lodash": "^4.17.21",
"moment": "^2.29.4",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-helmet": "^5.2.1",
"react-native": "0.73.6",
"react-native-gesture-handler": "~2.14.0",
"react-native-pager-view": "6.2.3",
"react-native-reanimated": "~3.6.2",
"react-native-safe-area-context": "4.8.2",
"react-native-screens": "~3.29.0",
"react-native-svg": "14.1.0",
"react-native": "0.74.1",
"react-native-gesture-handler": "~2.16.1",
"react-native-pager-view": "6.3.0",
"react-native-reanimated": "~3.10.1",
"react-native-safe-area-context": "4.10.1",
"react-native-screens": "3.31.1",
"react-native-svg": "15.2.0",
"react-native-swipe-list-view": "^3.2.9",
"react-redux": "9.1.0",
"redux": "5.0.1",
Expand All @@ -79,14 +79,14 @@
"victory-native": "^36.9.1"
},
"devDependencies": {
"@babel/core": "^7.23.2",
"@babel/core": "^7.24.0",
"@types/jest": "^29.5.8",
"@types/lodash": "^4.14.197",
"@types/node": "^20.9.0",
"@types/react": "~18.2.45",
"@types/react": "~18.2.79",
"@typescript-eslint/eslint-plugin": "^5.30.0",
"@typescript-eslint/parser": "^5.62.0",
"babel-preset-expo": "^10.0.0",
"babel-preset-expo": "~11.0.0",
"detox": "20.18.1",
"dotenv": "^16.3.1",
"eslint": "^7.32.0",
Expand All @@ -95,7 +95,7 @@
"eslint-plugin-jest": "^27.2.3",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-react": "^7.33.1",
"jest-expo": "~50.0.4",
"jest-expo": "~51.0.2",
"node-sass": "9.0.0",
"ts-jest": "29.1.2",
"ts-node": "10.9.1",
Expand Down
4 changes: 4 additions & 0 deletions src/components/Forms/TransactionSplitForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ export default function TransactionSplitForm({
onSelectAutocomplete={(autocomplete) => setTransaction({
...formData,
sourceName: autocomplete.name,
sourceId: autocomplete.id,
currencyCode: autocomplete.currencyCode,
currencySymbol: autocomplete.currencySymbol,
})}
Expand All @@ -340,6 +341,7 @@ export default function TransactionSplitForm({
onSelectAutocomplete={(autocomplete) => setTransaction({
...formData,
destinationName: autocomplete.name,
destinationId: autocomplete.id,
})}
InputRightElement={deleteBtn(['destinationName'])}
routeApi="accounts"
Expand Down Expand Up @@ -439,7 +441,9 @@ export default function TransactionSplitForm({
setTransaction({
date: new Date(),
sourceName: '',
sourceId: null,
destinationName: '',
destinationId: null,
description: '',
amount: '',
type: 'withdrawal',
Expand Down
2 changes: 1 addition & 1 deletion src/components/Screens/ConfigurationScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export default function ConfigurationScreen({ navigation }: ScreenType) {
CommonActions.reset({
index: 0,
routes: [
{ name: 'credentials' },
{ name: 'credentials', params: { noRedirect: true } },
],
}),
);
Expand Down
9 changes: 7 additions & 2 deletions src/components/Screens/CredentialsScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { ScreenType } from '../../types/screen';
import { RootDispatch, RootState } from '../../store';
import AButton from '../UI/ALibrary/AButton';

export default function CredentialsScreen({ navigation }: ScreenType) {
export default function CredentialsScreen({ navigation, route }: ScreenType) {
const { colors } = useThemeColors();
const { name: routeName } = useRoute();
const useBiometricAuth = useSelector((state: RootState) => state.configuration.useBiometricAuth);
Expand Down Expand Up @@ -67,7 +67,12 @@ export default function CredentialsScreen({ navigation }: ScreenType) {
}

setAuthenticated(true);
if (c.length === 1 && routeName === 'credentials') {
const {
params: {
noRedirect = false,
} = {},
} = route;
if (c.length === 1 && routeName === 'credentials' && !noRedirect) {
await loginWithCredential(c[0]);
}
})();
Expand Down
4 changes: 2 additions & 2 deletions src/components/UI/ErrorWidget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default function ErrorWidget() {
CommonActions.reset({
index: 0,
routes: [
{ name: 'credentials' },
{ name: 'credentials', params: { noRedirect: true } },
],
}),
);
Expand All @@ -37,7 +37,7 @@ export default function ErrorWidget() {
showToast(translate('transaction_form_success_title'), translate('transaction_form_success_description'), 'success');
}

if (error && (error as AxiosError).response?.status && (error as AxiosError).response?.status === 404 && !isFirstRun.current) {
if (error && (error as AxiosError).response?.status && [401, 403].includes((error as AxiosError).response?.status) && !isFirstRun.current) {
goToCredentials();
}

Expand Down
8 changes: 4 additions & 4 deletions src/models/accounts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,19 +133,19 @@ export default createModel<RootModel>()({
if (currentCode) {
const [
{ data: accounts },
{ data: frontPageAccounts },
{ data: frontpageAccounts },
] = await Promise.all([
dispatch.configuration.apiFetch({ url: `/api/v1/currencies/${currentCode}/accounts?${displayAllAccounts ? '' : 'type=asset'}&date=${end}` }) as Promise<{ data: AccountType[] }>,
dispatch.configuration.apiFetch({ url: '/api/v2/preferences/frontPageAccounts' }) as Promise<{ data: PreferenceType }>,
dispatch.configuration.apiFetch({ url: '/api/v1/preferences/frontpageAccounts' }) as Promise<{ data: PreferenceType }>,
]);

const filteredAccounts = accounts
.filter((a: AccountType) => a.attributes.active)
.sort((a, b) => (b.attributes.order < a.attributes.order ? 1 : -1));

if (frontPageAccounts) {
if (frontpageAccounts) {
accounts.forEach((a: AccountType, index) => {
accounts[index].display = frontPageAccounts.attributes.data.includes(parseInt(a.id, 10));
accounts[index].display = frontpageAccounts.attributes.data.includes(parseInt(a.id, 10));
});
}

Expand Down
4 changes: 4 additions & 0 deletions src/models/transactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ export type TransactionSplitType = {
currencyDecimalPlaces?: number,
date: string | Date,
sourceName: string,
sourceId: number,
destinationName: string,
destinationId: number,
tags: string[],
notes: string,
foreignAmount: string,
Expand Down Expand Up @@ -327,7 +329,9 @@ export default createModel<RootModel>()({
description: transaction.description,
date: transaction.date,
source_name: transaction.sourceName,
source_id: transaction.sourceId,
destination_name: transaction.destinationName,
destination_id: transaction.destinationId,
category_id: transaction.categoryName === '' ? undefined : transaction.categoryId,
category_name: transaction.categoryName,
budget_id: transaction.budgetId,
Expand Down
1 change: 1 addition & 0 deletions src/types/screen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export interface ScreenType {
};
id?: string;
forceRefresh?: boolean | undefined;
noRedirect?: boolean;
filterType?: string;
selectFilter?: (filter: string) => void;
}
Expand Down

0 comments on commit a196aa6

Please sign in to comment.