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

Modification arbre décision IP #1321

Merged
merged 2 commits into from
Feb 28, 2024
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 _data/api/impot-particulier.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ access_page:
Lors de votre demande vous devrez **justifier** dans quelle mesure l'entité pour laquelle vous opérez rentre dans ce cadre juridique.

<NextSteps is_editeur/>
<QuestionTree tree='france-connected-api' question='dgfip' />
<QuestionTree tree='france-connected-api' question='dgfipediteurs' />
- who:
- Un établissement bancaire
is_eligible: 0
Expand Down
31 changes: 26 additions & 5 deletions components/questionTree/data/france-connected-api/index.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,39 @@
import { generateFormulaireUniqueQuestion } from '../formulaire-unique';

const isFranceConnectedQuestions = {
const isQuestionsTree = {
dgfip: {
question:
'Utilisez-vous ou comptez-vous utiliser FranceConnect sur votre service ?',
'Comment souhaitez-vous accéder aux données de la DGFiP ?',
choiceTree: [
{
choices: ['Oui'],
choices: ['via FranceConnect'],
next: generateFormulaireUniqueQuestion('impot-particulier-fc'),
},
{
choices: ['Non'],
choices: ['via le numéro fiscal (SPI)'],
next: generateFormulaireUniqueQuestion('impot-particulier'),
},
{
choices: ['via l‘état civil'],
next: generateFormulaireUniqueQuestion('sfip'),
},
],
},
dgfipediteurs: {
question: 'Comment souhaitez-vous accéder aux données de la DGFiP ?',
choiceTree: [
{
choices: ['via FranceConnect'],
answer: `<br/><Button href="https://datapass.api.gouv.fr/api-impot-particulier-fc-sandbox">Remplir une demande</Button>`,
},
{
choices: ['via le numéro fiscal (SPI)'],
answer: `<br/><Button href="https://datapass.api.gouv.fr/api-impot-particulier-sandbox">Remplir une demande</Button>`,
},
{
choices: ['via l‘état civil'],
answer: `<br/><Button href="https://datapass.api.gouv.fr/api-sfip-sandbox">Remplir une demande</Button>`,
},
],
},
agentConnect: {
Expand All @@ -35,4 +56,4 @@ const isFranceConnectedQuestions = {
},
} as { [key: string]: any };

export default isFranceConnectedQuestions;
export default isQuestionsTree;
4 changes: 2 additions & 2 deletions components/questionTree/data/index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import apiEntrepriseQuestions from './api-entreprise';
import isFranceConnectedQuestions from './france-connected-api';
import isQuestionsTree from './france-connected-api';
import isBouquetApiPartepriseQuestions from './is_bouquet_api_parteprise';
import apiParticulierQuestions from './api-particulier';
import formulaireUniqueQuestions from './formulaire-unique';

export const allQuestions = {
'api-entreprise': apiEntrepriseQuestions,
'france-connected-api': isFranceConnectedQuestions,
'france-connected-api': isQuestionsTree,
'is_bouquet_api_parteprise': isBouquetApiPartepriseQuestions,
'api-particulier': apiParticulierQuestions,
'formulaire-unique': formulaireUniqueQuestions,
Expand Down
Loading