From a9fca398284979ed22b339d383345b5f58b9df19 Mon Sep 17 00:00:00 2001 From: Jareth Whitney Date: Fri, 15 Nov 2024 18:48:31 -0800 Subject: [PATCH] feature/deseng743: Changed definition of project to accomodate for shape file colours. --- CHANGELOG.md | 3 +++ api/controllers/project.js | 2 ++ api/helpers/models/project.js | 1 + api/swagger/swagger.yaml | 11 +++++++++++ package.json | 2 +- seed/jsongenerator/projectschema | 1 + seed/projectlist.json | 20 ++++++++++++++++++++ 7 files changed, 39 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 405233d..42968da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +### 1.10.0 Nov 15, 2024 +* Modified project definition to accomodate shape file colours. [DESENG-743](https://apps.itsm.gov.bc.ca/jira/browse/DESENG-743) + ### 1.9.0 Mar 11, 2024 * Add option for contact form on projects [DESENG-373](https://apps.itsm.gov.bc.ca/jira/browse/DESENG-373) diff --git a/api/controllers/project.js b/api/controllers/project.js index ec86b9b..b15bf20 100644 --- a/api/controllers/project.js +++ b/api/controllers/project.js @@ -20,6 +20,7 @@ const tagList = [ 'name', 'partner', 'region', + 'shapeFileColour', 'projectDirector', 'agreements', 'addedBy', @@ -845,6 +846,7 @@ exports.protectedPut = async (args, res) => { obj.details = projectObj.details; obj.overlappingRegionalDistricts = projectObj.overlappingRegionalDistricts; obj.region = projectObj.region; + obj.shapeFileColour = projectObj.shapeFileColour; obj.projectPhase = projectObj.projectPhase; obj.name = projectObj.name; obj.centroid = projectObj.centroid; diff --git a/api/helpers/models/project.js b/api/helpers/models/project.js index 7a5cc0f..ff3036e 100644 --- a/api/helpers/models/project.js +++ b/api/helpers/models/project.js @@ -17,6 +17,7 @@ const definition = { name: { type: String, trim: true }, partner: { type: String, trim: true }, region: { type: String, default: '' }, + shapeFileColour: { type: String, default: '' }, agreements: { type: Array, default: [] }, addedBy: { type: String, default: '' }, code: { type: String, default: '' }, diff --git a/api/swagger/swagger.yaml b/api/swagger/swagger.yaml index 5e4afb1..3b583eb 100644 --- a/api/swagger/swagger.yaml +++ b/api/swagger/swagger.yaml @@ -130,6 +130,7 @@ definitions: - partner - agreements - region + - shapeFileColour - projectDirector - type - read @@ -2048,6 +2049,11 @@ paths: required: false description: "Region of the project" type: string + - in: query + name: shapeFileColour + required: false + description: "Colour used for the map shape file" + type: string - in: query name: projectDirector required: false @@ -2200,6 +2206,11 @@ paths: required: false description: "Region of the project" type: string + - in: query + name: shapeFileColour + required: false + description: "Colour of the map shape file" + type: string - in: query name: projectDirector required: false diff --git a/package.json b/package.json index 2a4aace..ed812a4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "landuseplanning-api", - "version": "1.9.0", + "version": "1.10.0", "author": "Mark Lisé", "contributors": [ "Mark Lisé ", diff --git a/seed/jsongenerator/projectschema b/seed/jsongenerator/projectschema index 2ee6085..8a91e0c 100644 --- a/seed/jsongenerator/projectschema +++ b/seed/jsongenerator/projectschema @@ -10,6 +10,7 @@ projectLead : '{{firstName()}} {{surname()}}', proponent : '{{objectId()}}', region : '{{lorem(2, "words")}}', + shapeFileColour : '{{lorem(1, "words")}}', projectDirector : '{{firstName()}} {{surname()}}', agreements : '{{lorem(1, "words")}}', addedBy : '{{lorem(1, "words")}}', diff --git a/seed/projectlist.json b/seed/projectlist.json index 3fa6b82..9f74a28 100644 --- a/seed/projectlist.json +++ b/seed/projectlist.json @@ -17,6 +17,7 @@ "responsibleEPD": "Levy Jenkins", "responsibleEPDEmail": "no-reply@gov.bc.ca", "responsibleEPDPhone": "+1 (997) 401-2033", + "shapeFileColour": "#111111", "type": "voluptate", "addedBy": "do", "build": "commodo", @@ -69,6 +70,7 @@ "responsibleEPD": "Hinton Stafford", "responsibleEPDEmail": "no-reply@gov.bc.ca", "responsibleEPDPhone": "+1 (996) 490-3198", + "shapeFileColour": "#111111", "type": "laboris", "addedBy": "voluptate", "build": "in", @@ -121,6 +123,7 @@ "responsibleEPD": "Lourdes Roach", "responsibleEPDEmail": "no-reply@gov.bc.ca", "responsibleEPDPhone": "+1 (861) 560-3588", + "shapeFileColour": "#111111", "type": "non", "addedBy": "consequat", "build": "Lorem", @@ -173,6 +176,7 @@ "responsibleEPD": "Garrison Adams", "responsibleEPDEmail": "no-reply@gov.bc.ca", "responsibleEPDPhone": "+1 (859) 568-3593", + "shapeFileColour": "#111111", "type": "dolore", "addedBy": "ut", "build": "velit", @@ -225,6 +229,7 @@ "responsibleEPD": "Tabitha Hampton", "responsibleEPDEmail": "no-reply@gov.bc.ca", "responsibleEPDPhone": "+1 (864) 444-2178", + "shapeFileColour": "#111111", "type": "laboris", "addedBy": "reprehenderit", "build": "ea", @@ -277,6 +282,7 @@ "responsibleEPD": "Lloyd Horton", "responsibleEPDEmail": "no-reply@gov.bc.ca", "responsibleEPDPhone": "+1 (928) 471-2843", + "shapeFileColour": "#111111", "type": "proident", "addedBy": "commodo", "build": "dolor", @@ -329,6 +335,7 @@ "responsibleEPD": "Lee Michael", "responsibleEPDEmail": "no-reply@gov.bc.ca", "responsibleEPDPhone": "+1 (888) 433-3859", + "shapeFileColour": "#111111", "type": "amet", "addedBy": "proident", "build": "nisi", @@ -381,6 +388,7 @@ "responsibleEPD": "Isabel Oneill", "responsibleEPDEmail": "no-reply@gov.bc.ca", "responsibleEPDPhone": "+1 (984) 548-3436", + "shapeFileColour": "#111111", "type": "mollit", "addedBy": "aliquip", "build": "exercitation", @@ -433,6 +441,7 @@ "responsibleEPD": "Julianne Odom", "responsibleEPDEmail": "no-reply@gov.bc.ca", "responsibleEPDPhone": "+1 (992) 485-2742", + "shapeFileColour": "#111111", "type": "officia", "addedBy": "voluptate", "build": "elit", @@ -485,6 +494,7 @@ "responsibleEPD": "Pacheco Hoover", "responsibleEPDEmail": "no-reply@gov.bc.ca", "responsibleEPDPhone": "+1 (938) 499-2080", + "shapeFileColour": "#111111", "type": "aliquip", "addedBy": "proident", "build": "ex", @@ -537,6 +547,7 @@ "responsibleEPD": "Christine Cox", "responsibleEPDEmail": "no-reply@gov.bc.ca", "responsibleEPDPhone": "+1 (986) 552-2650", + "shapeFileColour": "#111111", "type": "enim", "addedBy": "do", "build": "ea", @@ -589,6 +600,7 @@ "responsibleEPD": "Florine Huff", "responsibleEPDEmail": "no-reply@gov.bc.ca", "responsibleEPDPhone": "+1 (970) 553-2069", + "shapeFileColour": "#111111", "type": "ex", "addedBy": "in", "build": "ad", @@ -641,6 +653,7 @@ "responsibleEPD": "Montoya Carroll", "responsibleEPDEmail": "no-reply@gov.bc.ca", "responsibleEPDPhone": "+1 (825) 501-2766", + "shapeFileColour": "#111111", "type": "sint", "addedBy": "commodo", "build": "aute", @@ -693,6 +706,7 @@ "responsibleEPD": "Alba Berg", "responsibleEPDEmail": "no-reply@gov.bc.ca", "responsibleEPDPhone": "+1 (990) 473-3905", + "shapeFileColour": "#111111", "type": "nisi", "addedBy": "ipsum", "build": "officia", @@ -745,6 +759,7 @@ "responsibleEPD": "Meredith Rocha", "responsibleEPDEmail": "no-reply@gov.bc.ca", "responsibleEPDPhone": "+1 (954) 543-2314", + "shapeFileColour": "#111111", "type": "id", "addedBy": "tempor", "build": "id", @@ -797,6 +812,7 @@ "responsibleEPD": "Carey Benson", "responsibleEPDEmail": "no-reply@gov.bc.ca", "responsibleEPDPhone": "+1 (950) 527-2280", + "shapeFileColour": "#111111", "type": "irure", "addedBy": "enim", "build": "quis", @@ -849,6 +865,7 @@ "responsibleEPD": "Barnett Gilliam", "responsibleEPDEmail": "no-reply@gov.bc.ca", "responsibleEPDPhone": "+1 (845) 456-2141", + "shapeFileColour": "#111111", "type": "nostrud", "addedBy": "anim", "build": "esse", @@ -901,6 +918,7 @@ "responsibleEPD": "Loraine Armstrong", "responsibleEPDEmail": "no-reply@gov.bc.ca", "responsibleEPDPhone": "+1 (991) 439-3226", + "shapeFileColour": "#111111", "type": "aliquip", "addedBy": "anim", "build": "ex", @@ -953,6 +971,7 @@ "responsibleEPD": "Clare Mcdowell", "responsibleEPDEmail": "no-reply@gov.bc.ca", "responsibleEPDPhone": "+1 (990) 576-2596", + "shapeFileColour": "#111111", "type": "sit", "addedBy": "proident", "build": "est", @@ -1005,6 +1024,7 @@ "responsibleEPD": "Oconnor Mason", "responsibleEPDEmail": "no-reply@gov.bc.ca", "responsibleEPDPhone": "+1 (808) 427-2181", + "shapeFileColour": "#111111", "type": "non", "addedBy": "consequat", "build": "aliqua",