Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: out of active list empty #1647

Merged
merged 1 commit into from
Sep 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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 :
Expand Down
2 changes: 1 addition & 1 deletion api/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "api_mano",
"version": "1.283.3",
"mobileAppVersion": "2.36.1",
"mobileAppVersion": "2.36.2",
"description": "",
"main": "index.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions app/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
Expand Down
4 changes: 2 additions & 2 deletions app/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
38 changes: 19 additions & 19 deletions app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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, () => {
Expand Down
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mano",
"version": "2.36.1",
"version": "2.36.2",
"private": true,
"scripts": {
"get-ip": "./get-ip.sh",
Expand Down
2 changes: 2 additions & 0 deletions app/src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -18,6 +19,7 @@ export {
HOST,
APP_ENV,
MANO_DOWNLOAD_URL,
MANO_TEST_ORGANISATION_ID,
MATOMO_SITE_ID,
MATOMO_URL,
SENTRY_XXX,
Expand Down
15 changes: 14 additions & 1 deletion app/src/scenes/Menu/Menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -52,6 +53,18 @@ const Menu = ({ navigation }) => {
<Row withNextButton caption="Mentions Légales" onPress={() => navigation.navigate('Legal')} />
<Row withNextButton caption="Politique de Confidentialité" onPress={() => navigation.navigate('Privacy')} />
<Spacer height={30} />
{organisation._id === MANO_TEST_ORGANISATION_ID && (
<>
<Row
caption="Test Sentry"
onPress={() => {
capture('Test Sentry Capture', { extra: { test: 'test' } });
throw new Error('Test Sentry Error Crash');
}}
/>
<Spacer height={30} />
</>
)}
<Row caption="Se déconnecter" color="#F00" loading={isLoggingOut} Component={TouchableWithoutFeedback} onPress={() => onLogoutRequest()} />
<Row
caption="Se déconnecter et vider le cache"
Expand Down
4 changes: 2 additions & 2 deletions app/src/scenes/Persons/PersonRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ export const PersonName = ({ person: { name, outOfActiveList, outOfActiveListRea
return (
<OutOfActiveListContainer>
<NameMuted>{name}</NameMuted>
<ActiveListReasonText>Sortie de file active : {outOfActiveListReasons.join(', ')}</ActiveListReasonText>
<ActiveListReasonText>Sortie de file active : {outOfActiveListReasons?.join(', ')}</ActiveListReasonText>
</OutOfActiveListContainer>
);
}
return <Name>{name}</Name>;
};

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);
Expand Down
2 changes: 1 addition & 1 deletion website/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
Loading