Skip to content
This repository was archived by the owner on Oct 12, 2020. It is now read-only.
This repository was archived by the owner on Oct 12, 2020. It is now read-only.

frontend-backend integration #12

@katunilya

Description

@katunilya

Requested Changes

We need to make frontend interact with backend. In this issue @SixDevelop you will find issues that should be solved for frontend.

Implementation Details

  • add question type picking

Currently we have the following input types stored as enum in

ShortText = 0
LongText = 1
Email = ...
PhoneNumber
Label // forbidden
Integer
Decimal
Financial
MultipleChoiceOptionList // forbidden
SingleOptionSelect // forbidden 
Boolean

I suggest hard coding this value to drop down select menu

  • report template question entity lacks order

when sending information about report template do not forget to include order field to question. Currently you send only this information:

{
  "id": "",
  "title": "report title",
  "questionnaires": [
    {
      "title": "Модуль 1",
      "order": 0,
      "sections": [
        {
          "title": "1 секция",
          "order": 1,
          "questions": [
            { "questionText": "1 вопрос", "inputType": 1 },
            { "questionText": "Новый вопрос", "inputType": 1 }
          ]
        }
      ]
    }
  ],
  "tables": []
}

which lack order field in each entity in array of questions. It may seem that this can be omitted but it does make a difference in future.

Possibly core changes should be made there:

questions:[
{
questionText: "1 вопрос",
inputType: this.types[0],
}
]

and code responsible for creating new questions.

Also it might be easy to ignore this data at first and only generate when you push this to the server just before POST request.

Additional Info

Better ask questions in comments under this issue

Metadata

Metadata

Assignees

Labels

challengesteep climb, not a long walkgroundworkrequired technical workimportantmajor issue/pr that requires extra attentionurgentshould be done as quickly as possible

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions