Skip to content

Instantly share code, notes, and snippets.

@pyoner
Last active December 8, 2019 04:27
Show Gist options
  • Save pyoner/d2d087201261dd50d15ac86aa26f606b to your computer and use it in GitHub Desktop.
Save pyoner/d2d087201261dd50d15ac86aa26f606b to your computer and use it in GitHub Desktop.
Job State Sketch
Job State Sketch
Init
client draft -> Draft
client publish -> AcceptingOffers
Draft
client close -> Closed
client publish -> AcceptingOffers
AcceptingOffers
client closeOffer -> Closed
client makeOffer -> Offer
provider makeOffer -> AcceptingOffers
Offer
AwaitingOffer*
provider acceptOffer -> OfferAccepted
provider counterOffer -> ProviderCounterOffer
client counterOffer -> ClientCounterOffer
ProviderCounterOffer
client acceptCounterOffer -> OfferAccepted
client cancelCounterOffer -> Closed
provider cancelOffer -> Closed
ClientCounterOffer
provider acceptCounterOffer -> OfferAccepted
provider cancelCounterOffer -> Closed
client cancelOffer -> Closed
OfferAccepted
AwaitingEscrow*
client sendEscrow -> Escrow
client cancelOffer -> Closed
Escrow
InEscrow*
markAsComplete -> WorkPendingCompletion
dispute -> InDispute
# The provider has marked the job as complete and is awaiting the client's acceptance
WorkPendingCompletion
releaseEscrow -> Complete
dispute -> InDispute
# The provider or the client has raised a dispute. This is being resolved by the CanYa DAO
InDispute
releaseEscrow -> Complete
refundEscrow -> Fail
# This job has been marked as complete by the client.
Complete
review -> Review
Fail
review -> Review
Review
Closed
function render(model){
let current_state_name = model.active_states[0].name;
return $("h1",
{style: {color: "darkBlue"}},
`The current state is: ${current_state_name}`);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment