getMenuItemsFor method

  1. @override
List<MenuItemModel>? getMenuItemsFor(
  1. String uniqueId,
  2. AppModel app,
  3. NewAppWizardParameters parameters,
  4. MenuType type,
)
override

Implementation

@override
List<MenuItemModel>? getMenuItemsFor(String uniqueId, AppModel app,
    NewAppWizardParameters parameters, MenuType type) {
  if (parameters is MembershipParameters) {
    if (parameters.joinSpecifications.should(type)) {
      return [
        MenuItemModel(
            documentID: "join",
            text: "JOIN",
            description: "Request membership",
            icon: null,
            action: WorkflowActionModel(app,
                conditions: DisplayConditionsModel(
                  privilegeLevelRequired:
                      PrivilegeLevelRequired.noPrivilegeRequired,
                  packageCondition:
                      MembershipPackage.memberHasNoMembershipYet,
                ),
                workflow: MembershipWorkflowBuilder.dummyWorkflowModel(
                    app.documentID, uniqueId)))
      ];
    }
  }
  return null;
}