Skip to content

Instantly share code, notes, and snippets.

@EnixCoda
Created November 28, 2019 02:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EnixCoda/530820cc48c84e94fae0246be16b2adf to your computer and use it in GitHub Desktop.
Save EnixCoda/530820cc48c84e94fae0246be16b2adf to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
// - XState (all XState exports)
const fetchMachine = Machine({
id: 'visitor',
initial: '*',
states: {
'*': {
on: {
'员工创建': '允许访问',
'访客发起再次访问': '待审核',
}
},
'待审核': {
on: {
'审核通过': '允许访问',
'审核不通过': '已取消',
'访客主动取消': '已取消',
'员工主动取消': '已取消',
'超时(访问日23:59)': '逾期未审核',
}
},
'允许访问': {
on: {
'签到': '已签到',
'访客主动取消': '已取消',
'员工主动取消': '已取消',
'超时(访问日23:59)': '逾期未签到',
}
},
'逾期未审核': {
type: 'final'
},
'逾期未签到': {
type: 'final'
},
'已取消': {
type: 'final'
},
'已签到': {
type: 'final'
},
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment