Tangerine-Community / Tangerine

Digitize your offline data collection. Create your Forms online with Tangerine Editor, conduct them offline with the Tangerine Android App. All results you collect can be exported as a CSV file, easy for processing in a spreadsheet. Tangerine has been used in over 1 million assessments and surveys in over 60 countries and in 100 languages.
http://www.tangerinecentral.org/
GNU General Public License v3.0
47 stars 30 forks source link

Editor defines Case structure #1517

Open rjcorwin opened 5 years ago

rjcorwin commented 5 years ago
Screen Shot 2019-07-17 at 10 10 53 AM

Editors need the ability to define the structure of many different types of Cases in Tangerine.

When using Cases in Tangerine Client, a Case is an object in the database consisting of a hierarchy of data structured as...

Case -*> CaseEvent -*> EventForm -> FormResponse ID

(-*> indicates one-to-many, -> indicates one-to-one)

A FormResponse is a separate doc in the database.

The shape a Case and its children relationships is defined in a Case Definition file.

The Form ID refers to a Form listed in forms.json.

You can view the TypeScript definitions of these Classes here.

rjcorwin commented 5 years ago
  1. Filter out forms of type Case in available forms for Event Form Definitions. Note, we also need to make sure that when creating new forms in the editor, when we add them to forms.json that they are listed as "type": "form" as opposed to "type":"case".
  2. Would be nice if after creating definitions that the "Forms" tab did not pop up and slide away.
  3. After adding a Case Event Definition/Event Form Definition, it appears to the user that the Definition has disappeared. The tree component should be updated and the user should be navigated to the Event Definition page.
  4. A bread crumb will help make clear which Event/Form definition you are adding to.