Options
All
  • Public
  • Public/Protected
  • All
Menu

Class InternshipProposalStatusTypeMachine

The state machine helper for the [[InternshipProposalStatusType]]

Hierarchy

  • InternshipProposalStatusTypeMachine

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

Private stateMachine

stateMachine: StateMachine

The state machine

Private transitions

transitions: (object | object)[] = [// Accepting flaw{ name: 'approvedByProfessor', from: InternshipProposalStatusType.Started.toString(), to: InternshipProposalStatusType.WaitingForProfessor.toString(), requiredRoles: [RoleType.Professor] },{ name: 'approvedByCompany', from: InternshipProposalStatusType.WaitingForProfessor.toString(), to: InternshipProposalStatusType.WaitingForCompany.toString(), requiredRoles: [RoleType.Professor] },{ name: 'confirmed', from: InternshipProposalStatusType.WaitingForCompany.toString(), to: InternshipProposalStatusType.Confirmed.toString(), requiredRoles: [RoleType.Company] },{ name: 'started', from: InternshipProposalStatusType.Confirmed.toString(), to: InternshipProposalStatusType.Started.toString() },{ name: 'ended', from: InternshipProposalStatusType.Started.toString(), to: InternshipProposalStatusType.Ended.toString() },// Professor reject{ name: 'rejectedByProfessor', from: InternshipProposalStatusType.WaitingForProfessor.toString(), to: InternshipProposalStatusType.RejectedByProfessor.toString(), requiredRoles: [RoleType.Professor] },// Company reject{ name: 'rejectedByCompany', from: InternshipProposalStatusType.WaitingForCompany.toString(), to: InternshipProposalStatusType.RejectedByCompany.toString(), requiredRoles: [RoleType.Company] },// Student cancel{ name: 'canceled', from: InternshipProposalStatusType.WaitingForProfessor.toString(), to: InternshipProposalStatusType.Canceled.toString(), requiredRoles: [RoleType.Student, RoleType.Professor] },{ name: 'canceled', from: InternshipProposalStatusType.WaitingForCompany.toString(), to: InternshipProposalStatusType.Canceled.toString(), requiredRoles: [RoleType.Student, RoleType.Professor] },]

The allowed transitions

Methods

can

  • can(newState: InternshipProposalStatusType): any

getAvailableStates

  • getAvailableStates(userRole?: RoleType): Array<object>

Generated using TypeDoc