Skip to content

Add container model attribute #5

@fozy81

Description

@fozy81

A form may or may not have an associated container such as a sample bottle or packaging box. A form can have a default container associated with it which is added by default when the form is added to task. This default container is selected when editing the form.

When form(s) share a container - we will need to display that container to click on. Once clicked on the container will open and display the forms inside. This could be recursive (Russian doll style). With a box containing smaller boxes, containing bottles etc.

Forms without containers will be display as currently - directly in the Task template. These are rendered first (i.e. container == NULL)

If container == true, then only display the container details. When the user clicks on the container, filter the forms for matching containerRecordID and display those forms.

To allow recursive containers, parentContainerId == containerId (displayed at top level), then when clicking on the top level /parent container filter for other containers where parentContainerId == containerId (of top level container) and so on...

  • Add containerId to form model
  • Create container model (containerId, title, description)
  • Add container relation form & formTemplate model
  • Add unique id of container instance onto form using shortId - needs to also work with multi-entry forms
  • Add option to add default container when editing form
  • edit addTemplateForm() function to deal with adding container to formTemplates and form model
  • Create menu to create containers
  • Allowing selecting and adding of existing containers to form
  • Allow editing of container attributes
  • Allow default containers to be added when associated methods are added
  • Only render container == NULL forms at top level of Task template
  • Create component to render containers lower on Task template based on shortId of container instance
  • Add ContainerMainId and containerLevelId to form model
  • Render containers where containerLevelId == containerId (recursively)
  • Create menu to add form into container (once container is clicked on) maybe existing add form component?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions