Created
February 17, 2022 15:50
-
-
Save jaabiri/e493d317392299432d7cb7c634e8b10f to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
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
const fetchMachine = Machine({ | |
id: 'hopauto', | |
initial: 'Information', | |
states: { | |
Information: { | |
on: { | |
SUIVANT: 'Livraison', | |
}, | |
}, | |
Livraison: { | |
on: { | |
PREV: 'Information', | |
SUIVANT: 'Reprise', | |
}, | |
}, | |
Reprise: { | |
on: { | |
PREV: 'Livraison', | |
SUIVANT: 'Mode de Paiement', | |
}, | |
}, | |
'Mode de Paiement': { | |
on: { | |
PREV: 'Reprise', | |
SUIVANT: 'SUMMARY', | |
}, | |
}, | |
SUMMARY: { | |
on: { | |
PREV: 'Mode de Paiement', | |
SUIVANT_CASH: 'Réservation', | |
SUIVANT_funding: 'Confirmation', | |
}, | |
}, | |
Réservation: { | |
on: { | |
PREV: 'SUMMARY', | |
SUIVANT: 'Confirmation', | |
}, | |
}, | |
Confirmation: { | |
on: { | |
PREV: 'SUMMARY', | |
SUIVANT_AVEC_REPRISE: 'Reprise à compléter', | |
SUIVANT_SANS_REPRISE_CASH: 'Offre commerciale à valider', | |
SUIVANT_SANS_REPRISE_FINDING: 'Obtenir ma réponse de principe immédiate', | |
}, | |
}, | |
'Reprise à compléter': { | |
on: { | |
SUIVANT: 'Reprise en étude chez hOp', | |
}, | |
}, | |
'Reprise en étude chez hOp': { | |
on: { | |
accepted: 'Offre de reprise à valider', | |
refused: 'Reprise refusée', | |
}, | |
}, | |
'Reprise refusée': { | |
// VOIR AVEC FRANCOIS | |
}, | |
'Offre de reprise à valider': { | |
on: { | |
accepted: 'Offre de reprise validée', | |
refused: 'Offre de reprise refusée', | |
}, | |
}, | |
'Offre de reprise validée': { | |
on: { | |
SUIVANT_CASH: 'Offre commerciale à valider', | |
SUIVANT_funding: 'Obtenir ma réponse de principe immédiate', | |
}, | |
}, | |
'Offre de reprise refusée': { | |
on: { | |
SUIVANT_CASH: 'Offre commerciale à valider', | |
SUIVANT_funding: 'Obtenir ma réponse de principe immédiate', | |
}, | |
}, | |
'Offre commerciale à valider': { | |
on: { | |
accepted: 'Offre commerciale validée', | |
refused: 'Offre commerciale refusée', | |
}, | |
}, | |
'Offre commerciale validée': { | |
on: { | |
SUIVANT: 'Bon de commande à signer numériquement', | |
}, | |
}, | |
'Offre commerciale refusée': {}, | |
'Bon de commande à signer numériquement': { | |
on: { | |
SUIVANT: 'Bon de commande signé', | |
}, | |
}, | |
'Bon de commande signé': { | |
on: { | |
SUIVANT_CASH: 'Acompte à payer', | |
SUIVANT_funding: 'Finaliser le financement', | |
}, | |
}, | |
'Acompte à payer': {}, | |
'Acompte payé': {}, | |
'Finaliser le financement': {}, | |
'Obtenir ma réponse de principe immédiate': {}, | |
'Réponse de principe immédiate avis favorable': {}, | |
'Réponse de principe immédiate en étude': {}, | |
'Financement validé': {}, | |
'Financement en attente': {}, | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment