Code Monkey home page Code Monkey logo

smpa-backend's People

Contributors

drcongo avatar

Stargazers

Miguel Saitz avatar

Watchers

James Cloos avatar  avatar

smpa-backend's Issues

proposalFlow has json encoded as string

Hello there!

I just found that the proposalFlow attribute of an application is a json document encoded as string. Was that intentional?

Also, it doesn't match the snake_case used everywhere else.

Excerpt:

{
  ...
  "agent": null,
  "applicant": null,
  "proposalFlow": "[{\"proposalName\":\"Extension or alteration\",\"proposalId\":\"proposal_extension\",\"goTo\":[\"AboutProposal\"]},{\"proposalName\":\"To gates, fences, garden walls, etc\",\"proposalId\":\"boundaries\",\"goTo\":[\"GatesFencesWalls\",\"WorksXLocation\"]},{\"proposalName\":\"To the original house\",\"proposalId\":\"original_house\",\"goTo\":[\"AboutChangesToOriginalHouse\"]},{\"proposalName\":\"Single storey extension\",\"proposalId\":\"single_storey_extension\",\"goTo\":[\"WorksXLocation\"]},{\"proposalName\":\"Balcony or terrace\",\"proposalId\":\"balcony_terrace\",\"goTo\":[\"WorksXLocation\"]}]",
  "declaration_detail": null,
  "declaration_id": null,
  ...
}

Uploaded document files have no url, only path

Currently, there is no clear way on how to fetch an uploaded document file from the API, as it only provides a path, not a full URI.

Example:

...
"document_files": [
    {
	"application_id": "1aa439a3-a7f1-4f25-9c0d-6fd06ccbdd07",
	"created_at": "2019-09-16T16:31:53.546000",
	"document_size": {
	    "created_at": "2019-08-19T11:07:51.713000",
	    "id": "6c5b4c9b-1938-4962-923f-ee722f550f26",
	    "name": "A3",
	    "updated_at": null
	},
	"document_size_id": "6c5b4c9b-1938-4962-923f-ee722f550f26",
	"document_types_existing": [
	    {
		"created_at": "2019-08-19T11:07:51.758000",
		"id": "7090f4a9-2386-45a9-8fd6-0729e98de96b",
		"name": "Elevations",
		"updated_at": null
	    }
	],
	"document_types_existing_ids": [
	    "7090f4a9-2386-45a9-8fd6-0729e98de96b"
	],
	"document_types_proposed": [],
	"document_types_proposed_ids": [],
	"id": "c87fac20-6888-445b-93e4-bb7115ebdd5a",
	"original_name": "The Health Effects of Air Pollution.pdf",
	"storage_path": "1aa439a3-a7f1-4f25-9c0d-6fd06ccbdd07/c87fac20-6888-445b-93e4-bb7115ebdd5a.pdf",
	"updated_at": "2019-09-16T16:31:53.546000"
    }
]
...

Cryptic site constraint attribute names

Hello there!

I'm implementing a client to the smpa-backend and struggling with some attribute names, like nb_conarea.

I managed to find on the smpa-frontend source code that if 0 < nb_conarea, then we're talking about a conservation area. But it's still not clear to me what each value mean.

There are other attributes suffering from the same problem, such as nb_a4d and nb_top.

Sample bit of json:

  "site_constraints": {
    "id": "949b695e-80cc-46be-9f0d-11b7c2f4ccee",
    "created_at": "2019-11-18T14:12:36.359000",
    "updated_at": null,
    "has_boundary": "yes",
    "nb_a4d": 2,
    "a4d_name": "Storage and Distribution to Residential, Light Industrial to Residential",
    "nb_conarea": 1,
    "conarea_name": "Graham Road and Mapledene",
    "nb_tpo": 0,
    "tpo_name": "",
    "is_listed_building": "0",
    "is_floodzone_2": "0",
    "is_floodzone_3a": "0",
    "is_floodzone_3b": "0",
    "geom": null,
    "uprn": 100021058917,
    "application_id": "aecfba6d-9558-4d61-bec7-4c8b5f78d747"
  },

Empty object on `document_types_existing` and "undefined" type

I'm getting this on /applications, which has a list with an empty object and an "undefined" id:

        ...
        "document_files": [
            {
                "application_id": "3ef21a26-4fc1-4462-b88c-8f39e65bc7f8",
                "created_at": "2019-08-19T12:21:06.144000",
                "document_size": null,
                "document_size_id": "",
                "document_types_existing": [
                    {}
                ],
                "document_types_existing_ids": [
                    "undefined"
                ],
                "document_types_proposed": [
                    {
                        "created_at": "2019-08-19T11:07:51.734000",
                        "id": "a8dd4e62-5e6f-438c-82c1-9a15b3483ba5",
                        "name": "Location plan",
                        "updated_at": null
                    }
                ],
                "document_types_proposed_ids": [
                    "a8dd4e62-5e6f-438c-82c1-9a15b3483ba5"
                ],
        ...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.