From a880ace0337a17d593243583c454976d3c052ad3 Mon Sep 17 00:00:00 2001 From: Arnaud AMBROSELLI Date: Fri, 8 Sep 2023 10:46:07 +0200 Subject: [PATCH] fix: out of active list empty --- README.md | 2 +- api/package.json | 2 +- app/android/app/build.gradle | 4 +-- app/app.json | 4 +-- app/index.js | 38 ++++++++++++++--------------- app/package.json | 2 +- app/src/config.js | 2 ++ app/src/scenes/Menu/Menu.js | 15 +++++++++++- app/src/scenes/Persons/PersonRow.js | 4 +-- website/package.json | 2 +- 10 files changed, 45 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index 6b32e4aa0..42e905a28 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Mano -![Mobile version](https://img.shields.io/badge/mobile%20app%20version-2.36.1-blue) +![Mobile version](https://img.shields.io/badge/mobile%20app%20version-2.36.2-blue) [![Maintainability](https://api.codeclimate.com/v1/badges/223e4185a3e13f1ef5d0/maintainability)](https://codeclimate.com/github/SocialGouv/mano/maintainability) Code source de [Mano](https://mano-app.fabrique.social.gouv.fr/), organisé en plusieurs services : diff --git a/api/package.json b/api/package.json index 6ecd3868c..e647b599f 100644 --- a/api/package.json +++ b/api/package.json @@ -1,7 +1,7 @@ { "name": "api_mano", "version": "1.283.3", - "mobileAppVersion": "2.36.1", + "mobileAppVersion": "2.36.2", "description": "", "main": "index.js", "scripts": { diff --git a/app/android/app/build.gradle b/app/android/app/build.gradle index 1e71e0ed9..bf4eb3c5b 100644 --- a/app/android/app/build.gradle +++ b/app/android/app/build.gradle @@ -120,8 +120,8 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion multiDexEnabled true - versionCode 15 - versionName "2.36.1" + versionCode 16 + versionName "2.36.2" testBuildType System.getProperty('testBuildType', 'debug') // This will later be used to control the test apk build type testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' } diff --git a/app/app.json b/app/app.json index 46c3ace30..dd9d604fb 100644 --- a/app/app.json +++ b/app/app.json @@ -2,8 +2,8 @@ "name": "mano", "displayName": "Mano", "version": { - "buildNumber": 15, - "buildName": "2.36.1" + "buildNumber": 16, + "buildName": "2.36.2" }, "bundle": { "android": "com.mano", diff --git a/app/index.js b/app/index.js index 152360291..c63be03c6 100644 --- a/app/index.js +++ b/app/index.js @@ -18,25 +18,25 @@ dayjs.extend(isBetween); import * as Sentry from '@sentry/react-native'; import { SENTRY_XXX } from './src/config'; -if (!__DEV__) { - Sentry.init({ - dsn: SENTRY_XXX, - environment: 'app', - release: version, - ignoreErrors: [ - 'Network request failed', - 'Failed to fetch', - 'NetworkError', - // ??? - 'withrealtime/messaging', - // This error seems to happen only in firefox and to be ignorable. - // The "fetch" failed because user has navigated. - // Since other browsers don't have this problem, we don't care about it, - // it may be a false positive. - 'AbortError: The operation was aborted', - ], - }); -} +// if (!__DEV__) { +Sentry.init({ + dsn: SENTRY_XXX, + environment: 'app', + release: version, + ignoreErrors: [ + 'Network request failed', + 'Failed to fetch', + 'NetworkError', + // ??? + 'withrealtime/messaging', + // This error seems to happen only in firefox and to be ignorable. + // The "fetch" failed because user has navigated. + // Since other browsers don't have this problem, we don't care about it, + // it may be a false positive. + 'AbortError: The operation was aborted', + ], +}); +// } LogBox.ignoreAllLogs(); AppRegistry.registerComponent(appName, () => { diff --git a/app/package.json b/app/package.json index 9d127e163..c04e68d53 100644 --- a/app/package.json +++ b/app/package.json @@ -1,6 +1,6 @@ { "name": "mano", - "version": "2.36.1", + "version": "2.36.2", "private": true, "scripts": { "get-ip": "./get-ip.sh", diff --git a/app/src/config.js b/app/src/config.js index b0d95c8bf..49da5867d 100644 --- a/app/src/config.js +++ b/app/src/config.js @@ -5,6 +5,7 @@ const SCHEME = envConfig.SCHEME; const HOST = envConfig.HOST; const APP_ENV = envConfig.APP_ENV; const MANO_DOWNLOAD_URL = 'https://mano-app.fabrique.social.gouv.fr/download'; +const MANO_TEST_ORGANISATION_ID = envConfig.MANO_TEST_ORGANISATION_ID; const MATOMO_SITE_ID = envConfig.MATOMO_SITE_ID; const MATOMO_URL = envConfig.MATOMO_URL; const SENTRY_XXX = envConfig.SENTRY_XXX; @@ -18,6 +19,7 @@ export { HOST, APP_ENV, MANO_DOWNLOAD_URL, + MANO_TEST_ORGANISATION_ID, MATOMO_SITE_ID, MATOMO_URL, SENTRY_XXX, diff --git a/app/src/scenes/Menu/Menu.js b/app/src/scenes/Menu/Menu.js index fb8ce8348..d2cda987a 100644 --- a/app/src/scenes/Menu/Menu.js +++ b/app/src/scenes/Menu/Menu.js @@ -6,9 +6,10 @@ import Row from '../../components/Row'; import Spacer from '../../components/Spacer'; import API from '../../services/api'; import ScrollContainer from '../../components/ScrollContainer'; -import { FRAMAFORM_MANO, MANO_DOWNLOAD_URL } from '../../config'; +import { FRAMAFORM_MANO, MANO_DOWNLOAD_URL, MANO_TEST_ORGANISATION_ID } from '../../config'; import { useRecoilValue } from 'recoil'; import { currentTeamState, organisationState } from '../../recoil/auth'; +import { capture } from '../../services/sentry'; const Menu = ({ navigation }) => { const [isLoggingOut, setIsLoggingOut] = useState(false); @@ -52,6 +53,18 @@ const Menu = ({ navigation }) => { navigation.navigate('Legal')} /> navigation.navigate('Privacy')} /> + {organisation._id === MANO_TEST_ORGANISATION_ID && ( + <> + { + capture('Test Sentry Capture', { extra: { test: 'test' } }); + throw new Error('Test Sentry Error Crash'); + }} + /> + + + )} onLogoutRequest()} /> {name} - Sortie de file active : {outOfActiveListReasons.join(', ')} + Sortie de file active : {outOfActiveListReasons?.join(', ')} ); } @@ -26,7 +26,7 @@ export const PersonName = ({ person: { name, outOfActiveList, outOfActiveListRea }; const PersonRow = ({ onPress, person, isPersonsSearchRow = false, showActionSheetWithOptions, children }) => { - const { outOfActiveList, birthdate, formattedBirthDate, alertness } = person; + const { outOfActiveList, formattedBirthDate, alertness } = person; const navigation = useNavigation(); const organisation = useRecoilValue(organisationState); const user = useRecoilValue(userState); diff --git a/website/package.json b/website/package.json index d926ef63d..ebc983109 100644 --- a/website/package.json +++ b/website/package.json @@ -1,7 +1,7 @@ { "name": "website", "version": "1.283.3", - "mobileAppVersion": "2.36.1", + "mobileAppVersion": "2.36.2", "private": true, "engines": { "npm": "please-use-yarn",