Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Submission form fields for the submision table #1072

Merged
merged 3 commits into from
Jan 3, 2024

Conversation

Sujanadh
Copy link
Collaborator

@Sujanadh Sujanadh commented Dec 29, 2023

Updates

This endpoint provides submission form fields for task-specific submissions in accordance with the new UI design for the submission table.

Response

[
  {
    "path": "/username",
    "name": "username",
    "type": "string",
    "binary": null,
    "selectMultiple": null
  },
  {
    "path": "/email",
    "name": "email",
    "type": "string",
    "binary": null,
    "selectMultiple": null
  },
  {
    "path": "/instructions",
    "name": "instructions",
    "type": "string",
    "binary": null,
    "selectMultiple": null
  },
  {
    "path": "/warmup",
    "name": "warmup",
    "type": "geopoint",
    "binary": null,
    "selectMultiple": null
  }
]

This PR depends on the PR on osm-fieldwork. New function form_fields is added in the OdkCentral.py which is used here.

@Sujanadh
Copy link
Collaborator Author

Sujanadh commented Jan 2, 2024

This new modification now allows to get submissions by task_id or xmlFormId.

Response

{
  "value": [
    {
      "start": "2023-12-28T14:14:15.400+05:45",
      "end": "2023-12-28T14:15:04.773+05:45",
      "today": "2023-12-28",
      "phonenumber": null,
      "deviceid": "collect:qKQrgKKs1LrYoFoC",
      "username": null,
      "email": null,
      "instructions": null,
      "warmup": {
        "type": "Point",
        "coordinates": [
          85.3284743,
          27.7303606,
          1278.9000244140625
        ],
        "properties": {
          "accuracy": 11.546
        }
      },
      "all": {
        "model": "basic",
        "existing": "44549",
        "xid": "44549",
        "xlocation": "27.704872 85.321303 0 0; 27.704846 85.321349 0 0; 27.704844 85.321613 0 0; 27.705095 85.321633 0 0; 27.705088 85.321326 0 0; 27.704872 85.321303 0 0",
        "buildings": {
          "category": "medical",
          "name": "Ghost",
          "building_material": "cement_block",
          "building_levels": "4",
          "religion": null,
          "denomination": null,
          "muslim": null,
          "hindu": null,
          "religious": null,
          "service": null,
          "Shop": null,
          "tourism": null,
          "education_details": null,
          "link": null,
          "government": null,
          "medical": "clinic",
          "food": null,
          "cuisine": null,
          "heritage": null,
          "emergency": null,
          "operator": null,
          "inscription": null,
          "housing": null,
          "provider": null,
          "rooms": null,
          "ref": null,
          "building_neighbor": null
        },
        "gps": {
          "point": null,
          "comment": "Idk",
          "image": "1703752199921.jpg"
        }
      },
      "details": {
        "power": null,
        "generator_source": null,
        "generator": null,
        "water": null,
        "water_source": null,
        "pump_unit": null,
        "capacity": null,
        "age": null,
        "building_prefab": null,
        "building_floor": null,
        "building_roof": null,
        "condition": null,
        "access_roof": null,
        "levels_underground": null,
        "geological_site": null,
        "lateral_material": null,
        "lateral_system": null
      },
      "meta": {
        "instanceID": "uuid:d7f72058-a509-4eb6-9702-4d4c685f237b"
      },
      "__id": "uuid:d7f72058-a509-4eb6-9702-4d4c685f237b",
      "__system": {
        "submissionDate": "2023-12-28T08:30:04.262Z",
        "updatedAt": null,
        "submitterId": "47887",
        "submitterName": "testing sujan _buildings_1160",
        "attachmentsPresent": 1,
        "attachmentsExpected": 1,
        "status": null,
        "reviewState": null,
        "deviceId": "collect:qKQrgKKs1LrYoFoC",
        "edits": 0,
        "formVersion": "2023-12-28T08:25:29Z"
      }
    },
    {
      "start": "2023-12-28T14:13:51.428+05:45",
      "end": "2023-12-28T14:14:09.916+05:45",
      "today": "2023-12-28",
      "phonenumber": null,
      "deviceid": "collect:qKQrgKKs1LrYoFoC",
      "username": null,
      "email": null,
      "instructions": null,
      "warmup": {
        "type": "Point",
        "coordinates": [
          85.3284765,
          27.7303609,
          1278.9000244140625
        ],
        "properties": {
          "accuracy": 11.873
        }
      },
      "all": {
        "model": "basic",
        "existing": "44292",
        "xid": "44292",
        "xlocation": "27.705677 85.321467 0 0; 27.705663 85.321702 0 0; 27.70575 85.321709 0 0; 27.705755 85.321628 0 0; 27.705775 85.32163 0 0; 27.705777 85.321592 0 0; 27.705761 85.32159 0 0; 27.705768 85.321473 0 0; 27.705677 85.321467 0 0",
        "buildings": {
          "category": "housing",
          "name": null,
          "building_material": "cement_block",
          "building_levels": null,
          "religion": null,
          "denomination": null,
          "muslim": null,
          "hindu": null,
          "religious": null,
          "service": null,
          "Shop": null,
          "tourism": null,
          "education_details": null,
          "link": null,
          "government": null,
          "medical": null,
          "food": null,
          "cuisine": null,
          "heritage": null,
          "emergency": null,
          "operator": null,
          "inscription": null,
          "housing": null,
          "provider": null,
          "rooms": null,
          "ref": null,
          "building_neighbor": null
        },
        "gps": {
          "point": null,
          "comment": null,
          "image": null
        }
      },
      "details": {
        "power": null,
        "generator_source": null,
        "generator": null,
        "water": null,
        "water_source": null,
        "pump_unit": null,
        "capacity": null,
        "age": null,
        "building_prefab": null,
        "building_floor": null,
        "building_roof": null,
        "condition": null,
        "access_roof": null,
        "levels_underground": null,
        "geological_site": null,
        "lateral_material": null,
        "lateral_system": null
      },
      "meta": {
        "instanceID": "uuid:2fe4e928-2949-4457-bc84-53723332e9bf"
      },
      "__id": "uuid:2fe4e928-2949-4457-bc84-53723332e9bf",
      "__system": {
        "submissionDate": "2023-12-28T08:29:09.404Z",
        "updatedAt": null,
        "submitterId": "47887",
        "submitterName": "testing sujan _buildings_1160",
        "attachmentsPresent": 0,
        "attachmentsExpected": 0,
        "status": null,
        "reviewState": null,
        "deviceId": "collect:qKQrgKKs1LrYoFoC",
        "edits": 0,
        "formVersion": "2023-12-28T08:25:29Z"
      }
    }
  ]
}

@spwoodcock spwoodcock merged commit 04bc3ed into development Jan 3, 2024
4 of 5 checks passed
@spwoodcock spwoodcock deleted the feat-submission-table branch January 3, 2024 05:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Related to backend code
Projects
Development

Successfully merging this pull request may close these issues.

2 participants