Class DeputyCCIStatusDropdown

Hierarchy

Constructors

  • Create a new DeputyCCIStatusDropdown object.

    Parameters

    • row: {
          casePage: DeputyCase;
          title: Title;
          type: "detailed" | "pageonly";
      }

      The origin row of this dropdown. For the root session, this is simply the row field of the DeputyContributionSurveyRow that is handling the row. For dependent sessions, this is a much simpler version which includes only the case page info and the row title.

      • casePage: DeputyCase

        The DeputyCase for this dropdown

      • title: Title

        The title of the row (page) that this dropdown accesses

      • type: "detailed" | "pageonly"
    • options: DeputyCCIStatusDropdownProps = {}

      Additional construction options, usually used by the root session.

    Returns DeputyCCIStatusDropdown

Properties

dropdown: DropdownWidget

The OOUI DropdownWidget element. This does not use DropdownInputWidget due to its lack of support for icons in dropdown menu options and the ability to hide said icons using CSS and other fun trickery.

dropdownChangeListener: ((items) => void)

Type declaration

    • A listener that listens to changes in the status dropdown and performs respective updates and changes.

      Parameters

      • items: OptionWidget[]

      Returns void

dropdownUpdateListener: ((message) => void)

Type declaration

options: Map<ContributionSurveyRowStatus, MenuOptionWidget>

A set of OOUI MenuOptionWidgets that make up the status dropdown.

row: {
    casePage: DeputyCase;
    title: Title;
    type: "detailed" | "pageonly";
}

The origin row of this dropdown. Contains info on the active case page and the title that this dropdown is for.

Type declaration

  • casePage: DeputyCase
  • title: Title
  • type: "detailed" | "pageonly"
menuOptionIcons: Record<ContributionSurveyRowStatus, Icon> = ...

Accessors

Methods

  • When an option is about to be closed and the current status matches that option, this function will find the next best option and select it. The next best value is as follows:

    For

    • Unfinished: WithoutViolations, unless it's pageonly, on which it'll be kept as is.
    • Unknown: Unfinished
    • WithViolations: usually not disabled, kept as is
    • WithoutViolations: usually not disabled, kept as is
    • Missing: usually not disabled, kept as is
    • PresumptiveRemoval: usually not disabled, kept as is

    Parameters

    Returns void

  • Sets the 'disable state' of specific menu options. For the Unknown option, a specific case is made which removes the option from the menu entirely.

    Parameters

    Returns void

Generated using TypeDoc