Skip to content

Instantly share code, notes, and snippets.

@decaylala
Last active September 22, 2020 03:56
Show Gist options
  • Save decaylala/b0328f2bc2eaad1492cdc6d3b55736a5 to your computer and use it in GitHub Desktop.
Save decaylala/b0328f2bc2eaad1492cdc6d3b55736a5 to your computer and use it in GitHub Desktop.

Revisions

  1. decaylala revised this gist Sep 22, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion machine.js
    Original file line number Diff line number Diff line change
    @@ -27,7 +27,7 @@ const machine = Machine({
    },
    left: {
    on: {
    back: 'operating',
    BACK: 'operating',
    },
    },
    annulled: {
  2. decaylala revised this gist Sep 22, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion machine.js
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    const machine = Machine({
    id: 'status',
    id: 'companyOperatingStatus',
    initial: 'establishing',
    states: {
    establishing: {
  3. decaylala revised this gist Sep 22, 2020. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion machine.js
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,6 @@ const machine = Machine({
    states: {
    establishing: {
    on: {

    CANCEL: 'not_simpany_customer',
    ESTABLISHED: 'operating',
    },
  4. decaylala created this gist Sep 22, 2020.
    38 changes: 38 additions & 0 deletions machine.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,38 @@
    const machine = Machine({
    id: 'status',
    initial: 'establishing',
    states: {
    establishing: {
    on: {

    CANCEL: 'not_simpany_customer',
    ESTABLISHED: 'operating',
    },
    },
    not_simpany_customer: {
    on: {
    PAY_DEPOSIT: 'establishing',
    },
    },
    operating: {
    on: {
    STOP: 'stopped',
    LEAVE: 'left',
    ANNUL: 'annulled',
    },
    },
    stopped: {
    on: {
    REOPERATE: 'operating',
    },
    },
    left: {
    on: {
    back: 'operating',
    },
    },
    annulled: {
    type: 'final',
    },
    }
    });