-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from SocialGouv/develop
release v0.0.1
- Loading branch information
Showing
59 changed files
with
15,143 additions
and
354 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
API_URL=https://backoffice-preprod-les1000jours.dev.fabrique.social.gouv.fr | ||
EMAIL_CONTACT=[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
API_URL= | ||
EMAIL_CONTACT= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
import { ApolloClient, InMemoryCache, gql } from "@apollo/client"; | ||
|
||
export const client = new ApolloClient({ | ||
uri: `${process.env.API_URL}/graphql?nocache`, | ||
cache: new InMemoryCache(), | ||
headers: { "content-type": "application/json" }, | ||
}); | ||
|
||
export const QUESTIONNAIRE_EPDS = gql` | ||
query QuestionnaireEpds { | ||
questionnaireEpds { | ||
libelle, | ||
ordre, | ||
locale, | ||
reponse_1_libelle, | ||
reponse_1_points, | ||
reponse_2_libelle, | ||
reponse_2_points, | ||
reponse_3_libelle, | ||
reponse_3_points, | ||
reponse_4_libelle, | ||
reponse_4_points, | ||
} | ||
}`; | ||
|
||
export const EPDS_ADD_RESPONSE = gql` | ||
mutation ( | ||
$genre: ENUM_REPONSESEPDS_GENRE! | ||
$compteur: Int! | ||
$score: Int! | ||
$reponseNum1: Int! | ||
$reponseNum2: Int! | ||
$reponseNum3: Int! | ||
$reponseNum4: Int! | ||
$reponseNum5: Int! | ||
$reponseNum6: Int! | ||
$reponseNum7: Int! | ||
$reponseNum8: Int! | ||
$reponseNum9: Int! | ||
$reponseNum10: Int! | ||
) { | ||
createReponsesEpd( | ||
input: { | ||
data: { | ||
genre: $genre | ||
compteur: $compteur | ||
score: $score | ||
reponse_1: $reponseNum1 | ||
reponse_2: $reponseNum2 | ||
reponse_3: $reponseNum3 | ||
reponse_4: $reponseNum4 | ||
reponse_5: $reponseNum5 | ||
reponse_6: $reponseNum6 | ||
reponse_7: $reponseNum7 | ||
reponse_8: $reponseNum8 | ||
reponse_9: $reponseNum9 | ||
reponse_10: $reponseNum10 | ||
} | ||
} | ||
) { | ||
reponsesEpd { | ||
id | ||
created_at | ||
} | ||
} | ||
}`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
i18n: { | ||
defaultLocale: 'fr-FR', | ||
locales: ['fr-FR'], | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
const { i18n } = require('./next-i18next.config') | ||
|
||
module.exports = { | ||
i18n, | ||
async redirects() { | ||
return [ | ||
{ | ||
source: '/', | ||
destination: '/comprendre-test', | ||
permanent: true, | ||
}, | ||
] | ||
}, | ||
env: { | ||
API_URL: process.env.API_URL | ||
} | ||
} |
Oops, something went wrong.