Created
August 12, 2021 09:56
-
-
Save Baael/fd4db4f57a8f9c3f9fadbfc35256d420 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({ | |
initial: "creation", | |
states: { | |
creation: { | |
initial: 'idle', | |
states: { | |
idle: { | |
on: { | |
INIT_UPLOAD: { target: 'pending' } | |
} | |
}, | |
pending: { | |
on: { | |
UPLOAD_COMPLETE: { target: 'success' } | |
} | |
}, | |
success: { type: 'final'} | |
}, | |
onDone: "draft" | |
}, | |
draft: {}, | |
published: {}, | |
pdfDownload: {}, | |
printed: {}, | |
signThePrintedTEC: {}, | |
signedAndScanned: {}, | |
sendByPost: {}, | |
sendByEmail: {}, | |
receivedAndScanned: {}, | |
approved: {}, | |
upload: { type: "final" }, | |
}, | |
on: { | |
DRAFT: "draft", | |
PUBLISHED: "published", | |
PDF_DOWNLOAD: "pdfDownload", | |
PRINTED: "printed", | |
SIGN_THE_PRINTED_T_E_C: "signThePrintedTEC", | |
SIGNED_AND_SCANNED: "signedAndScanned", | |
SEND_BY_POST: "sendByPost", | |
SEND_BY_EMAIL: "sendByEmail", | |
RECEIVED_AND_SCANNED: "receivedAndScanned", | |
APPROVED: "approved", | |
UPLOAD: "upload", | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment