Created
December 20, 2019 21:00
-
-
Save johnkazer/81e534dc2a6b9017756182028fc36d0d 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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions | |
// - XState (all XState exports) | |
const ptMachine = Machine({ | |
"id": "root", | |
"states": { | |
"Project Tracker": { | |
"id": "Project Tracker", | |
"states": { | |
"Logged out": { | |
"id": "Logged out", | |
"states": { | |
"Landing page": { | |
"id": "Landing page", | |
"states": {}, | |
"on": { | |
"Login": "#Check credentials" | |
} | |
}, | |
"Check credentials": { | |
"id": "Check credentials", | |
"states": {}, | |
"on": { | |
"fail": "#Logged out", | |
"success": "#Logged In" | |
} | |
} | |
}, | |
"initial": "Landing page", | |
"on": {} | |
}, | |
"Logged In": { | |
"id": "Logged In", | |
"states": { | |
"Welcome": { | |
"id": "Welcome", | |
"states": {}, | |
"on": { | |
"Holidays": "#Holidays", | |
"Individual capacity": "#Individual capacity", | |
"Project info": "#Project info", | |
"Team": "#Team", | |
"Team utilisation": "#Team utilisation" | |
} | |
}, | |
"Holidays": { | |
"id": "Holidays", | |
"states": { | |
"Holiday actions": { | |
"id": "Holiday actions", | |
"states": {}, | |
"on": { | |
"Add new entry": "#New holiday form", | |
"Edit entry": "#Edit holiday", | |
"Filter columns": "#Filtered holidays", | |
"Move holiday week": "#Holidays" | |
} | |
}, | |
"New holiday form": { | |
"id": "New holiday form", | |
"states": {}, | |
"on": { | |
"Add Sales": "#Holidays", | |
"Add Secondment": "#Holidays", | |
"Add holiday": "#Holidays", | |
"Cancel": "#Holiday actions" | |
} | |
}, | |
"Edit holiday": { | |
"id": "Edit holiday", | |
"states": {}, | |
"on": { | |
"Cancel": "#Holiday actions", | |
"Save": "#Holidays" | |
} | |
}, | |
"Filtered holidays": { | |
"id": "Filtered holidays", | |
"states": {}, | |
"on": { | |
"Unfilter columns": "#Holidays" | |
} | |
} | |
}, | |
"initial": "Holiday actions", | |
"on": { | |
"Cancel": "#Welcome" | |
} | |
}, | |
"Team": { | |
"id": "Team", | |
"states": { | |
"Team actions": { | |
"id": "Team actions", | |
"states": {}, | |
"on": { | |
"Add new entry": "#New team form", | |
"Filter columns": "#Filtered holidays", | |
"Update team": "#Team" | |
} | |
}, | |
"New team form": { | |
"id": "New team form", | |
"states": {}, | |
"on": { | |
"Cancel": "#Team", | |
"Save": "#Team" | |
} | |
}, | |
"Filtered team": { | |
"id": "Filtered team", | |
"states": {}, | |
"on": { | |
"Unfilter columns": "#Team" | |
} | |
} | |
}, | |
"initial": "Team actions", | |
"on": { | |
"Cancel": "#Welcome" | |
} | |
}, | |
"Team utilisation": { | |
"id": "Team utilisation", | |
"states": {}, | |
"on": { | |
"Cancel": "#Welcome", | |
"Move team week": "#Team utilisation" | |
} | |
}, | |
"Individual capacity": { | |
"id": "Individual capacity", | |
"states": {}, | |
"on": { | |
"Cancel": "#Welcome", | |
"Filter project status": "#Individual capacity", | |
"Move individual week": "#Individual capacity", | |
"Select individual": "#Individual capacity" | |
} | |
}, | |
"Project info": { | |
"id": "Project info", | |
"states": { | |
"Capacity report": { | |
"id": "Capacity report", | |
"states": {}, | |
"on": { | |
"Change project": "#Select project capacity report", | |
"Create project": "#New project", | |
"Edit project": "#New project" | |
} | |
}, | |
"Select project capacity report": { | |
"id": "Select project capacity report", | |
"states": { | |
"Client list": { | |
"id": "Client list", | |
"states": {}, | |
"on": { | |
"Cancel": "#Select project capacity report", | |
"Select client": "#Project list" | |
} | |
}, | |
"Project list": { | |
"id": "Project list", | |
"states": {}, | |
"on": { | |
"Cancel": "#Client list", | |
"Select project": "#Project info" | |
} | |
} | |
}, | |
"initial": "Client list", | |
"on": { | |
"Cancel capacity report": "#Project info" | |
} | |
}, | |
"New project": { | |
"id": "New project", | |
"states": { | |
"Choose client": { | |
"id": "Choose client", | |
"states": {}, | |
"on": { | |
"Cancel": "#Project info", | |
"Select client": "#Project list 2" | |
} | |
}, | |
"Project list 2": { | |
"id": "Project list 2", | |
"states": {}, | |
"on": { | |
"Cancel": "#New project", | |
"Select project": "#Choose staff" | |
} | |
}, | |
"Choose staff": { | |
"id": "Choose staff", | |
"states": {}, | |
"on": { | |
"Cancel": "#New project", | |
"Select staff": "#Add data" | |
} | |
}, | |
"Add data": { | |
"id": "Add data", | |
"states": {}, | |
"on": { | |
"Cancel": "#New project", | |
"Submit": "#Validate data" | |
} | |
}, | |
"Validate data": { | |
"id": "Validate data", | |
"states": {}, | |
"on": { | |
"fail": "#Add data", | |
"success": "#Project info" | |
} | |
} | |
}, | |
"initial": "Choose client", | |
"on": {} | |
} | |
}, | |
"initial": "Capacity report", | |
"on": { | |
"Cancel": "#Welcome", | |
"Move project capacity week": "#Project info" | |
} | |
}, | |
"Forward capacity": { | |
"id": "Forward capacity", | |
"states": {}, | |
"on": { | |
"Cancel": "#Welcome", | |
"Filter project status": "#Individual capacity", | |
"Move individual week": "#Individual capacity", | |
"Select individual": "#Individual capacity" | |
} | |
} | |
}, | |
"initial": "Welcome", | |
"on": { | |
"Logout": "#Landing page" | |
} | |
} | |
}, | |
"initial": "Logged out", | |
"on": {} | |
} | |
}, | |
"initial": "Project Tracker", | |
"on": {} | |
}) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment