Created
November 28, 2019 02:24
-
-
Save EnixCoda/530820cc48c84e94fae0246be16b2adf to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
This file contains hidden or 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 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