From a644a27583ae3a48c8c146d72489d5cdfd1d1158 Mon Sep 17 00:00:00 2001 From: Brianna Cerkiewicz Date: Fri, 20 Dec 2024 13:24:39 -0800 Subject: [PATCH 01/12] chore: update operator mock data --- .../registration/fixtures/mock/operator.json | 145 ++++-------------- 1 file changed, 30 insertions(+), 115 deletions(-) diff --git a/bc_obps/registration/fixtures/mock/operator.json b/bc_obps/registration/fixtures/mock/operator.json index 3e40d9ac34..a2a756898c 100644 --- a/bc_obps/registration/fixtures/mock/operator.json +++ b/bc_obps/registration/fixtures/mock/operator.json @@ -7,7 +7,6 @@ "cra_business_number": 123456789, "bc_corporate_registry_number": "abc1234567", "business_structure": "Sole Proprietorship", - "physical_address": 3, "status": "Approved", "is_new": false } @@ -16,280 +15,196 @@ "model": "registration.operator", "pk": "4242ea9d-b917-4129-93c2-db00b7451051", "fields": { - "legal_name": "Existing Operator 2 Legal Name", - "trade_name": "Existing Operator 2 Trade Name", + "legal_name": "Bravo Technologies", "cra_business_number": 987654321, "bc_corporate_registry_number": "def1234567", "business_structure": "General Partnership", - "physical_address": 4, "mailing_address": 3, - "website": "http://www.example2.com", - "documents": [], "contacts": [10, 11, 12, 13, 14, 15], "status": "Approved", - "is_new": false, - "verified_at": "2024-01-03 08:09:51.133556-08", - "verified_by": "00000000-0000-0000-0000-000000000002" + "is_new": false } }, { "model": "registration.operator", "pk": "438eff6c-d2e7-40ab-8220-29d3a86ef314", "fields": { - "legal_name": "New Operator 3 Legal Name", - "trade_name": "New Operator 3 Trade Name", + "legal_name": "Charlie Solutions", "cra_business_number": 987654322, "bc_corporate_registry_number": "ghi1234567", "business_structure": "BC Corporation", - "physical_address": 3, "mailing_address": 4, - "website": "http://www.example2.com", - "documents": [], "contacts": [1], "status": "Approved", - "is_new": false, - "verified_at": null, - "verified_by": null + "is_new": false } }, { "model": "registration.operator", "pk": "7e8b72dc-4196-427f-a553-7879748139e1", "fields": { - "legal_name": "Existing Operator 4 Legal Name", - "trade_name": "Existing Operator 4 Trade Name", + "legal_name": "Delta Innovations", "cra_business_number": 987654323, "bc_corporate_registry_number": "jkl1234567", "business_structure": "BC Corporation", - "physical_address": 3, "mailing_address": 4, - "website": "http://www.example2.com", - "documents": [], "contacts": [1, 2], "status": "Approved", - "is_new": false, - "verified_at": "2024-01-03 08:09:51.133556-08", - "verified_by": "00000000-0000-0000-0000-000000000002" + "is_new": false } }, { "model": "registration.operator", "pk": "4c1010c1-55ca-485d-84bd-6d975fd0af90", "fields": { - "legal_name": "New Operator 5 Legal Name", - "trade_name": "New Operator 5 Trade Name", + "legal_name": "Echo Systems", "cra_business_number": 987654324, "bc_corporate_registry_number": "mno1234567", "business_structure": "BC Corporation", - "physical_address": 3, "mailing_address": 4, - "website": "http://www.example2.com", - "documents": [], "contacts": [1], "status": "Approved", - "is_new": false, - "verified_at": null, - "verified_by": null + "is_new": false } }, { "model": "registration.operator", "pk": "5712ee05-5f3b-4822-825d-6fffddafda4c", "fields": { - "legal_name": "Existing Operator 6 Legal Name", - "trade_name": "Existing Operator 6 Trade Name", + "legal_name": "Foxtrot Enterprises", "cra_business_number": 987654325, "bc_corporate_registry_number": "pqr1234567", "business_structure": "BC Corporation", - "physical_address": 3, "mailing_address": 4, - "website": "http://www.example2.com", - "documents": [], "contacts": [1], "status": "Approved", - "is_new": false, - "verified_at": null, - "verified_by": null + "is_new": false } }, { "model": "registration.operator", "pk": "edb1aff1-f888-4199-ab88-068364496347", "fields": { - "legal_name": "New Operator 6 Legal Name", - "trade_name": "New Operator 6 Trade Name", + "legal_name": "Golf Solutions", "cra_business_number": 987654326, "bc_corporate_registry_number": "stu1234567", "business_structure": "BC Corporation", - "physical_address": 3, "mailing_address": 4, - "website": "http://www.example2.com", - "documents": [], "contacts": [1], "status": "Approved", - "is_new": false, - "verified_at": null, - "verified_by": null + "is_new": false } }, { "model": "registration.operator", "pk": "ea4314ea-1974-465a-a851-278c8f9c8daa", "fields": { - "legal_name": "New Operator 7 Legal Name", - "trade_name": "New Operator 7 Trade Name", + "legal_name": "Hotel Ventures", "cra_business_number": 987654327, "bc_corporate_registry_number": "vwx1234567", "business_structure": "BC Corporation", - "physical_address": 3, "mailing_address": 4, - "website": "http://www.example2.com", - "documents": [], "contacts": [1], "status": "Approved", - "is_new": false, - "verified_at": null, - "verified_by": null + "is_new": false } }, { "model": "registration.operator", "pk": "04384911-264a-4510-b582-11ee704b8e41", "fields": { - "legal_name": "New Operator 8 Legal Name", - "trade_name": "New Operator 8 Trade Name", + "legal_name": "India Innovations", "cra_business_number": 987654328, "bc_corporate_registry_number": "yza1234567", "business_structure": "BC Corporation", - "physical_address": 3, "mailing_address": 4, - "website": "http://www.example2.com", - "documents": [], "contacts": [1], "status": "Approved", - "is_new": false, - "verified_at": null, - "verified_by": null + "is_new": false } }, { "model": "registration.operator", "pk": "f209ef09-dfe6-42a1-ac4c-7689897f1b51", "fields": { - "legal_name": "New Operator 9 Legal Name", - "trade_name": "New Operator 9 Trade Name", + "legal_name": "Juliet Enterprises", "cra_business_number": 987654329, "bc_corporate_registry_number": "bcd1234567", "business_structure": "BC Corporation", - "physical_address": 3, "mailing_address": 4, - "website": "http://www.example2.com", - "documents": [], "contacts": [1], "status": "Approved", - "is_new": false, - "verified_at": null, - "verified_by": null + "is_new": false } }, { "model": "registration.operator", "pk": "bb979661-0782-49b2-9c64-acd8424b692b", "fields": { - "legal_name": "New Operator 10 Legal Name", - "trade_name": "New Operator 10 Trade Name", + "legal_name": "Kilo Logistics", "cra_business_number": 987654330, "bc_corporate_registry_number": "efg1234567", "business_structure": "BC Corporation", - "physical_address": 3, "mailing_address": 4, - "website": "http://www.example2.com", - "documents": [], "contacts": [1], "status": "Approved", - "is_new": false, - "verified_at": null, - "verified_by": null + "is_new": false } }, { "model": "registration.operator", "pk": "bb702949-e303-4788-9ba9-806232a5f711", "fields": { - "legal_name": "New Operator 11 Legal Name", - "trade_name": "New Operator 11 Trade Name", + "legal_name": "Lima Enterprises", "cra_business_number": 987654331, "bc_corporate_registry_number": "hij1234567", "business_structure": "BC Corporation", - "physical_address": 3, "mailing_address": 4, - "website": "http://www.example2.com", - "documents": [], "contacts": [1], "status": "Approved", - "is_new": false, - "verified_at": null, - "verified_by": null + "is_new": false } }, { "model": "registration.operator", "pk": "a35fb5ad-edd9-4465-982e-81b824644d07", "fields": { - "legal_name": "New Operator 12 Legal Name", - "trade_name": "New Operator 12 Trade Name", + "legal_name": "Mike Ventures", "cra_business_number": 987654332, "bc_corporate_registry_number": "klm1234567", "business_structure": "BC Corporation", - "physical_address": 3, "mailing_address": 4, - "website": "http://www.example2.com", - "documents": [], "contacts": [1], "status": "Approved", - "is_new": false, - "verified_at": null, - "verified_by": null + "is_new": false } }, { "model": "registration.operator", "pk": "5c847c75-3b17-414c-97f8-88ba81cb3821", "fields": { - "legal_name": "New Operator 13 Legal Name", - "trade_name": "New Operator 13 Trade Name", + "legal_name": "November Solutions", "cra_business_number": 987654333, "bc_corporate_registry_number": "nop1234567", "business_structure": "BC Corporation", - "physical_address": 3, "mailing_address": 4, - "website": "http://www.example2.com", - "documents": [], "contacts": [1], "status": "Approved", - "is_new": false, - "verified_at": null, - "verified_by": null + "is_new": false } }, { "model": "registration.operator", "pk": "4a792f0f-cf9d-48c8-9a95-f504c5f84b12", "fields": { - "legal_name": "Existing Operator 14 Legal Name", - "trade_name": "Existing Operator 14 Trade Name", + "legal_name": "Oscar Enterprises", "cra_business_number": 987654334, - "bc_corporate_registry_number": "pqz1234567", + "bc_corporate_registry_number": "qrs1234567", "business_structure": "BC Corporation", - "physical_address": 3, "mailing_address": 4, - "website": "http://www.example2.com", - "documents": [], - "contacts": [], + "contacts": [1], "status": "Approved", - "is_new": false, - "verified_at": "2024-01-03 08:09:51.133556-08", - "verified_by": "00000000-0000-0000-0000-000000000002" + "is_new": false } } ] From b5ce43e866d0b68a690b11cf442ea21ac1928bc4 Mon Sep 17 00:00:00 2001 From: Brianna Cerkiewicz Date: Fri, 20 Dec 2024 14:40:40 -0800 Subject: [PATCH 02/12] chore: make operation and operation timeline match --- .../registration/fixtures/mock/operation.json | 42 +-- ...peration_designated_operator_timeline.json | 270 ++++++++++++------ 2 files changed, 208 insertions(+), 104 deletions(-) diff --git a/bc_obps/registration/fixtures/mock/operation.json b/bc_obps/registration/fixtures/mock/operation.json index 7fd55ef193..713050b5f4 100644 --- a/bc_obps/registration/fixtures/mock/operation.json +++ b/bc_obps/registration/fixtures/mock/operation.json @@ -8,7 +8,7 @@ "verified_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "documents": [], "point_of_contact": 1, - "name": "Operation 1", + "name": "Apple Operation", "type": "Linear Facility Operation", "naics_code": 19, "swrs_facility_id": 1001, @@ -26,7 +26,7 @@ "operator": "4242ea9d-b917-4129-93c2-db00b7451051", "point_of_contact": 1, "documents": [], - "name": "Operation 2", + "name": "Banana Operation", "type": "Linear Facility Operation", "naics_code": 20, "opt_in": false, @@ -46,7 +46,7 @@ "operator": "4242ea9d-b917-4129-93c2-db00b7451051", "documents": [], "point_of_contact": 1, - "name": "Operation 3", + "name": "Bugle Operation", "submission_date": "2023-12-16T15:27:00.000Z", "type": "Single Facility Operation", "naics_code": 21, @@ -71,7 +71,7 @@ "bc_obps_regulated_operation": "21-0002", "status": "Registered", "point_of_contact": 1, - "name": "Operation 4", + "name": "Alien Operation", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, @@ -91,7 +91,7 @@ "documents": [], "submission_date": null, "point_of_contact": 1, - "name": "Operation 5", + "name": "Bangles Operation", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, @@ -113,7 +113,7 @@ "documents": [], "submission_date": "2024-01-14T15:27:00.000Z", "point_of_contact": 1, - "name": "Operation 6", + "name": "Alligator Operation", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, @@ -133,7 +133,7 @@ "documents": [], "submission_date": "2024-01-15T15:27:00.000Z", "point_of_contact": 1, - "name": "Operation 7", + "name": "Anteater Operation", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, @@ -153,7 +153,7 @@ "documents": [], "submission_date": "2024-01-16T15:27:00.000Z", "point_of_contact": 1, - "name": "Operation 8", + "name": "Arctic Operation", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, @@ -173,7 +173,7 @@ "documents": [], "submission_date": "2024-01-17T15:27:00.000Z", "point_of_contact": 1, - "name": "Operation 9", + "name": "Arguement Operation", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, @@ -193,7 +193,7 @@ "documents": [], "submission_date": "2024-01-18T15:27:00.000Z", "point_of_contact": 1, - "name": "Operation 10", + "name": "Art Operation", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, @@ -273,7 +273,7 @@ "documents": [], "submission_date": "2024-01-22T15:27:00.000Z", "point_of_contact": 2, - "name": "Operation 14", + "name": "Bojangles Operation", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, @@ -292,7 +292,7 @@ "documents": [], "submission_date": "2024-01-23T15:27:00.000Z", "point_of_contact": 3, - "name": "Operation 15", + "name": "Brine Operation", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, @@ -312,7 +312,7 @@ "documents": [], "submission_date": "2024-01-24T15:27:00.000Z", "point_of_contact": 1, - "name": "Operation 16", + "name": "Bling Operation", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, @@ -332,7 +332,7 @@ "documents": [], "submission_date": "2024-01-25T15:27:00.000Z", "point_of_contact": 4, - "name": "Operation 17", + "name": "Bees Operation", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, @@ -352,7 +352,7 @@ "documents": [], "submission_date": "2024-01-26T15:27:00.000Z", "point_of_contact": 5, - "name": "Operation 18", + "name": "Blue Operation", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, @@ -371,7 +371,7 @@ "documents": [], "submission_date": "2024-01-27T15:27:00.000Z", "point_of_contact": 6, - "name": "Operation 19", + "name": "Bullet Operation", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, @@ -390,7 +390,7 @@ "operator": "4242ea9d-b917-4129-93c2-db00b7451051", "documents": [], "submission_date": "2024-01-28T15:27:00.000Z", - "name": "Operation 20", + "name": "Bat Operation", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, @@ -407,7 +407,7 @@ "fields": { "operator": "4242ea9d-b917-4129-93c2-db00b7451051", "documents": [], - "name": "Operation 21", + "name": "Bin Operation", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, @@ -424,7 +424,7 @@ "fields": { "operator": "4242ea9d-b917-4129-93c2-db00b7451051", "documents": [], - "name": "Operation 22", + "name": "Bark Operation", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, @@ -441,7 +441,7 @@ "fields": { "operator": "4242ea9d-b917-4129-93c2-db00b7451051", "documents": [], - "name": "Operation 23", + "name": "Blight Operation", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, @@ -458,7 +458,7 @@ "fields": { "operator": "4242ea9d-b917-4129-93c2-db00b7451051", "documents": [], - "name": "Operation 24", + "name": "Brown Operation", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, diff --git a/bc_obps/registration/fixtures/mock/operation_designated_operator_timeline.json b/bc_obps/registration/fixtures/mock/operation_designated_operator_timeline.json index 94b6f2d019..0df65679bb 100644 --- a/bc_obps/registration/fixtures/mock/operation_designated_operator_timeline.json +++ b/bc_obps/registration/fixtures/mock/operation_designated_operator_timeline.json @@ -4,11 +4,10 @@ "fields": { "operation": "e1300fd7-2dee-47d1-b655-2ad3fd10f052", "operator": "685d581b-5698-411f-ae00-de1d97334a71", - "created_by": "00000000-0000-0000-0000-000000000004", - "created_at": "2024-06-05T23:21:02.353Z", - "start_date": "2024-06-05T23:20:57Z", - "end_date": "2024-06-28T23:21:01Z", - "status": "Closed" + "created_at": "2024-2-01T15:27:00.000Z", + "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", + "start_date": "2024-12-06T21:09:07Z", + "status": "Active" } }, { @@ -16,9 +15,9 @@ "fields": { "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", "operator": "4242ea9d-b917-4129-93c2-db00b7451051", - "created_by": "00000000-0000-0000-0000-000000000004", - "created_at": "2024-06-05T23:21:02.353Z", - "start_date": "2024-06-05T23:20:57Z", + "created_at": "2024-2-02T15:27:00.000Z", + "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", + "start_date": "2024-12-06T21:09:07Z", "status": "Active" } }, @@ -27,21 +26,20 @@ "fields": { "operation": "3b5b95ea-2a1a-450d-8e2e-2e15feed96c9", "operator": "4242ea9d-b917-4129-93c2-db00b7451051", - "created_by": "00000000-0000-0000-0000-000000000004", - "created_at": "2024-06-05T23:21:02.353Z", - "start_date": "2024-06-05T23:20:57Z", + "created_at": "2024-1-31T15:27:00.000Z", + "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", + "start_date": "2024-12-06T21:09:07Z", "status": "Active" } }, - { "model": "registration.operationdesignatedoperatortimeline", "fields": { "operation": "c0743c09-82fa-4186-91aa-4b5412e3415c", "operator": "685d581b-5698-411f-ae00-de1d97334a71", - "created_by": "00000000-0000-0000-0000-000000000004", - "created_at": "2024-06-05T23:21:02.353Z", - "start_date": "2024-06-05T23:20:57Z", + "created_at": "2024-1-30T15:27:00.000Z", + "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", + "start_date": "2024-12-06T21:09:07Z", "status": "Active" } }, @@ -50,9 +48,9 @@ "fields": { "operation": "b65a3fbc-c81a-49c0-a43a-67bd3a0b488e", "operator": "4242ea9d-b917-4129-93c2-db00b7451051", - "created_by": "00000000-0000-0000-0000-000000000004", - "created_at": "2024-06-05T23:21:02.353Z", - "start_date": "2024-06-05T23:20:57Z", + "created_at": "2024-1-29T15:27:00.000Z", + "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", + "start_date": "2024-12-06T21:09:07Z", "status": "Active" } }, @@ -62,9 +60,9 @@ "fields": { "operation": "d99725a7-1c3a-47cb-a59b-e2388ce0fa18", "operator": "685d581b-5698-411f-ae00-de1d97334a71", - "created_by": "00000000-0000-0000-0000-000000000004", - "created_at": "2024-06-05T23:21:02.353Z", - "start_date": "2024-06-05T23:20:57Z", + "created_at": "2024-1-28T15:27:00.000Z", + "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", + "start_date": "2024-12-06T21:09:07Z", "status": "Active" } }, @@ -73,9 +71,9 @@ "fields": { "operation": "436dd99a-cb41-4494-91c9-98ab149b557d", "operator": "685d581b-5698-411f-ae00-de1d97334a71", - "created_by": "00000000-0000-0000-0000-000000000004", - "created_at": "2024-06-05T23:21:02.353Z", - "start_date": "2024-06-05T23:20:57Z", + "created_at": "2024-1-27T15:27:00.000Z", + "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", + "start_date": "2024-12-06T21:09:07Z", "status": "Active" } }, @@ -84,20 +82,21 @@ "fields": { "operation": "a47b5fb6-1e10-401a-b70e-574bd925db99", "operator": "685d581b-5698-411f-ae00-de1d97334a71", - "created_by": "00000000-0000-0000-0000-000000000004", - "created_at": "2024-06-05T23:21:02.353Z", - "start_date": "2024-06-05T23:20:57Z", + "created_at": "2024-1-26T15:27:00.000Z", + "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", + "start_date": "2024-12-06T21:09:07Z", "status": "Active" } }, { "model": "registration.operationdesignatedoperatortimeline", + "fields": { "operation": "21e70498-c4b0-4525-8443-86faa96206e3", "operator": "685d581b-5698-411f-ae00-de1d97334a71", - "created_by": "00000000-0000-0000-0000-000000000004", - "created_at": "2024-06-05T23:21:02.353Z", - "start_date": "2024-06-05T23:20:57Z", + "created_at": "2024-1-25T15:27:00.000Z", + "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", + "start_date": "2024-12-06T21:09:07Z", "status": "Active" } }, @@ -106,9 +105,9 @@ "fields": { "operation": "17550cd8-3e73-4e52-aa91-ab90cb3b62b0", "operator": "685d581b-5698-411f-ae00-de1d97334a71", - "created_by": "00000000-0000-0000-0000-000000000004", - "created_at": "2024-06-05T23:21:02.353Z", - "start_date": "2024-06-05T23:20:57Z", + "created_at": "2024-1-24T15:27:00.000Z", + "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", + "start_date": "2024-12-06T21:09:07Z", "status": "Active" } }, @@ -117,9 +116,9 @@ "fields": { "operation": "7d3fc7d1-0504-4ee4-a9c5-447f4b324b57", "operator": "685d581b-5698-411f-ae00-de1d97334a71", - "created_by": "00000000-0000-0000-0000-000000000004", - "created_at": "2024-06-05T23:21:02.353Z", - "start_date": "2024-06-05T23:20:57Z", + "created_at": "2024-1-23T15:27:00.000Z", + "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", + "start_date": "2024-12-06T21:09:07Z", "status": "Active" } }, @@ -128,9 +127,9 @@ "fields": { "operation": "acf5811e-d521-43f7-a5c7-a6d6dd47bb31", "operator": "685d581b-5698-411f-ae00-de1d97334a71", - "created_by": "00000000-0000-0000-0000-000000000004", - "created_at": "2024-06-05T23:21:02.353Z", - "start_date": "2024-06-05T23:20:57Z", + "created_at": "2024-1-22T15:27:00.000Z", + "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", + "start_date": "2024-12-06T21:09:07Z", "status": "Active" } }, @@ -139,9 +138,9 @@ "fields": { "operation": "8563da83-0762-4d29-9b22-da5b52ef0f24", "operator": "685d581b-5698-411f-ae00-de1d97334a71", - "created_by": "00000000-0000-0000-0000-000000000004", - "created_at": "2024-06-05T23:21:02.353Z", - "start_date": "2024-06-05T23:20:57Z", + "created_at": "2024-1-21T15:27:00.000Z", + "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", + "start_date": "2024-12-06T21:09:07Z", "status": "Active" } }, @@ -150,9 +149,9 @@ "fields": { "operation": "df62d793-8cfe-4272-a93e-ea9c9139ff82", "operator": "4242ea9d-b917-4129-93c2-db00b7451051", - "created_by": "00000000-0000-0000-0000-000000000004", - "created_at": "2024-06-05T23:21:02.353Z", - "start_date": "2024-06-05T23:20:57Z", + "created_at": "2024-1-20T15:27:00.000Z", + "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", + "start_date": "2024-12-06T21:09:07Z", "status": "Active" } }, @@ -161,9 +160,9 @@ "fields": { "operation": "c5b3643b-c143-42f3-8a2b-03ccc7319cd9", "operator": "4242ea9d-b917-4129-93c2-db00b7451051", - "created_by": "00000000-0000-0000-0000-000000000004", - "created_at": "2024-06-05T23:21:02.353Z", - "start_date": "2024-06-05T23:20:57Z", + "created_at": "2024-1-19T15:27:00.000Z", + "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", + "start_date": "2024-12-06T21:09:07Z", "status": "Active" } }, @@ -172,9 +171,9 @@ "fields": { "operation": "954c0382-ff61-4e87-a8a0-873586534b54", "operator": "4242ea9d-b917-4129-93c2-db00b7451051", - "created_by": "00000000-0000-0000-0000-000000000004", - "created_at": "2024-06-05T23:21:02.353Z", - "start_date": "2024-06-05T23:20:57Z", + "created_at": "2024-1-18T15:27:00.000Z", + "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", + "start_date": "2024-12-06T21:09:07Z", "status": "Active" } }, @@ -183,9 +182,9 @@ "fields": { "operation": "6d07d02a-1ad2-46ed-ad56-2f84313e98bf", "operator": "4242ea9d-b917-4129-93c2-db00b7451051", - "created_by": "00000000-0000-0000-0000-000000000004", - "created_at": "2024-06-05T23:21:02.353Z", - "start_date": "2024-06-05T23:20:57Z", + "created_at": "2024-1-17T15:27:00.000Z", + "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", + "start_date": "2024-12-06T21:09:07Z", "status": "Active" } }, @@ -194,9 +193,9 @@ "fields": { "operation": "59d95661-c752-489b-9fd1-0c3fa3454dda", "operator": "4242ea9d-b917-4129-93c2-db00b7451051", - "created_by": "00000000-0000-0000-0000-000000000004", - "created_at": "2024-06-05T23:21:02.353Z", - "start_date": "2024-06-05T23:20:57Z", + "created_at": "2024-1-16T15:27:00.000Z", + "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", + "start_date": "2024-12-06T21:09:07Z", "status": "Active" } }, @@ -205,9 +204,9 @@ "fields": { "operation": "1bd04128-d070-4d3a-940a-0874c4956181", "operator": "4242ea9d-b917-4129-93c2-db00b7451051", - "created_by": "00000000-0000-0000-0000-000000000004", - "created_at": "2024-06-05T23:21:02.353Z", - "start_date": "2024-06-05T23:20:57Z", + "created_at": "2024-1-15T15:27:00.000Z", + "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", + "start_date": "2024-12-06T21:09:07Z", "status": "Active" } }, @@ -216,9 +215,9 @@ "fields": { "operation": "17f13f4d-29b4-45f4-b025-b21f2e126771", "operator": "4242ea9d-b917-4129-93c2-db00b7451051", - "created_by": "00000000-0000-0000-0000-000000000004", - "created_at": "2024-06-05T23:21:02.353Z", - "start_date": "2024-06-05T23:20:57Z", + "created_at": "2024-1-14T15:27:00.000Z", + "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", + "start_date": "2024-12-06T21:09:07Z", "status": "Active" } }, @@ -227,9 +226,9 @@ "fields": { "operation": "ef9044dd-2a27-4d26-86fe-02e51e0755f7", "operator": "4242ea9d-b917-4129-93c2-db00b7451051", - "created_by": "00000000-0000-0000-0000-000000000004", - "created_at": "2024-06-05T23:21:02.353Z", - "start_date": "2024-06-05T23:20:57Z", + "created_at": "2024-1-13T15:27:00.000Z", + "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", + "start_date": "2024-12-06T21:09:07Z", "status": "Active" } }, @@ -238,9 +237,9 @@ "fields": { "operation": "aeeb781e-a97b-4ab2-9a6e-02e4522add1a", "operator": "4242ea9d-b917-4129-93c2-db00b7451051", - "created_by": "00000000-0000-0000-0000-000000000004", - "created_at": "2024-06-05T23:21:02.353Z", - "start_date": "2024-06-05T23:20:57Z", + "created_at": "2024-1-12T15:27:00.000Z", + "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", + "start_date": "2024-12-06T21:09:07Z", "status": "Active" } }, @@ -249,9 +248,9 @@ "fields": { "operation": "02a3ab84-26c6-4a79-bf89-72f877ceef8e", "operator": "4242ea9d-b917-4129-93c2-db00b7451051", - "created_by": "00000000-0000-0000-0000-000000000004", - "created_at": "2024-06-05T23:21:02.353Z", - "start_date": "2024-06-05T23:20:57Z", + "created_at": "2024-1-11T15:27:00.000Z", + "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", + "start_date": "2024-12-06T21:09:07Z", "status": "Active" } }, @@ -260,22 +259,127 @@ "fields": { "operation": "0ac72fa9-2636-4f54-b378-af6b1a070787", "operator": "4242ea9d-b917-4129-93c2-db00b7451051", - "created_by": "00000000-0000-0000-0000-000000000004", - "created_at": "2024-06-05T23:21:02.353Z", - "start_date": "2024-06-05T23:20:57Z", + "created_at": "2024-1-10T15:27:00.000Z", + "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", + "start_date": "2024-12-06T21:09:07Z", "status": "Active" } }, { "model": "registration.operationdesignatedoperatortimeline", "fields": { - "operation": "0ac72fa9-2636-4f54-b378-af6b1a070787", - "operator": "685d581b-5698-411f-ae00-de1d97334a71", - "created_by": "00000000-0000-0000-0000-000000000004", - "created_at": "2024-06-05T23:21:02.353Z", - "start_date": "2024-06-05T23:20:57Z", - "end_date": "2024-06-05T23:20:57Z", - "status": "Transferred" + "operation": "b35a 2095-80e6-4b75-990e-ccf19a57edfa", + "operator": "438eff6c-d2e7-40ab-8220-29d3a86ef314", + "status": "Active", + "start_date": "2024-12-06T21:09:07Z" + } + }, + { + "model": "registration.operationdesignatedoperatortimeline", + "fields": { + "operation": "1d59cb82-2776-4785-a8f7-4b13bc9b4579", + "operator": "7e8b72dc-4196-427f-a553-7879748139e1", + "status": "Active", + "start_date": "2024-12-06T21:09:07Z" + } + }, + { + "model": "registration.operationdesignatedoperatortimeline", + "fields": { + "operation": "82e6ac8f-42f2-42a7-b179-132a3488b2e1", + "operator": "4c1010c1-55ca-485d-84bd-6d975fd0af90", + "status": "Active", + "start_date": "2024-12-06T21:09:07Z" + } + }, + { + "model": "registration.operationdesignatedoperatortimeline", + "fields": { + "operation": "95f6ec29-4b5b-42a2-9759-d4e9c99738d7", + "operator": "5712ee05-5f3b-4822-825d-6fffddafda4c", + "status": "Active", + "start_date": "2024-12-06T21:09:07Z" + } + }, + { + "model": "registration.operationdesignatedoperatortimeline", + "fields": { + "operation": "1b21579c-87f9-452f-b9c1-c784cb96f62e", + "operator": "edb1aff1-f888-4199-ab88-068364496347", + "status": "Active", + "start_date": "2024-12-06T21:09:07Z" + } + }, + { + "model": "registration.operationdesignatedoperatortimeline", + "fields": { + "operation": "4623c545-ef99-464a-bd8b-bb96ffb57e8e", + "operator": "ea4314ea-1974-465a-a851-278c8f9c8daa", + "status": "Active", + "start_date": "2024-12-06T21:09:07Z" + } + }, + { + "model": "registration.operationdesignatedoperatortimeline", + "fields": { + "operation": "f82c2a59-0f3a-4a89-b7d7-9fcd7a7ecb77", + "operator": "04384911-264a-4510-b582-11ee704b8e41", + "status": "Active", + "start_date": "2024-12-06T21:09:07Z" + } + }, + { + "model": "registration.operationdesignatedoperatortimeline", + "fields": { + "operation": "3182c8a4-22ff-4ca9-9f91-093c8888fd7c", + "operator": "f209ef09-dfe6-42a1-ac4c-7689897f1b51", + "status": "Active", + "start_date": "2024-12-06T21:09:07Z" + } + }, + { + "model": "registration.operationdesignatedoperatortimeline", + "fields": { + "operation": "68f0b68a-c6b5-4c4e-82a6-d7fbd690f55e", + "operator": "bb979661-0782-49b2-9c64-acd8424b692b", + "status": "Active", + "start_date": "2024-12-06T21:09:07Z" + } + }, + { + "model": "registration.operationdesignatedoperatortimeline", + "fields": { + "operation": "a5f7f5b3-fb56-4377-ae6c-b11c8b6d0041", + "operator": "bb702949-e303-4788-9ba9-806232a5f711", + "status": "Active", + "start_date": "2024-12-06T21:09:07Z" + } + }, + { + "model": "registration.operationdesignatedoperatortimeline", + "fields": { + "operation": "8494e89c-489b-441b-a05d-e935b1d82487", + "operator": "a35fb5ad-edd9-4465-982e-81b824644d07", + "status": "Active", + "start_date": "2024-12-06T21:09:07Z" + } + }, + { + "model": "registration.operationdesignatedoperatortimeline", + "fields": { + "operation": "84d4c8b7-55b5-4700-90ad-fb1c169d4e1f", + "operator": "5c847c75-3b17-414c-97f8-88ba81cb3821", + "status": "Active", + "start_date": "2024-12-06T21:09:07Z" + } + }, + { + "model": "registration.operationdesignatedoperatortimeline", + "fields": { + "operation": "62d5d8ea-b163-4a83-95a4-bfadbb6b21f7", + "operator": "4a792f0f-cf9d-48c8-9a95-f504c5f84b12", + "status": "Active", + "start_date": "2024-12-06T21:09:07Z" } } -] +] \ No newline at end of file From c706de0fd81e7f4b2657ab108f0a993129ec80e9 Mon Sep 17 00:00:00 2001 From: Brianna Cerkiewicz Date: Fri, 20 Dec 2024 14:54:14 -0800 Subject: [PATCH 03/12] chore: operation status, regulated products, and purpose are all accurate --- .../registration/fixtures/mock/operation.json | 118 ++++++++---------- 1 file changed, 54 insertions(+), 64 deletions(-) diff --git a/bc_obps/registration/fixtures/mock/operation.json b/bc_obps/registration/fixtures/mock/operation.json index 713050b5f4..7a848fd815 100644 --- a/bc_obps/registration/fixtures/mock/operation.json +++ b/bc_obps/registration/fixtures/mock/operation.json @@ -3,17 +3,14 @@ "model": "registration.operation", "pk": "e1300fd7-2dee-47d1-b655-2ad3fd10f052", "fields": { + "point_of_contact": 1, "operator": "685d581b-5698-411f-ae00-de1d97334a71", - "verified_at": "2023-10-13T15:27:00.000Z", - "verified_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "documents": [], - "point_of_contact": 1, "name": "Apple Operation", "type": "Linear Facility Operation", "naics_code": 19, "swrs_facility_id": 1001, - "regulated_products": [], - "status": "Not Started", + "status": "Registered", "created_at": "2024-2-01T15:27:00.000Z", "activities": [1, 5], "registration_purpose": "Reporting Operation" @@ -23,16 +20,16 @@ "model": "registration.operation", "pk": "002d5a9e-32a6-4191-938c-2c02bfec592d", "fields": { - "operator": "4242ea9d-b917-4129-93c2-db00b7451051", "point_of_contact": 1, + "operator": "4242ea9d-b917-4129-93c2-db00b7451051", "documents": [], "name": "Banana Operation", "type": "Linear Facility Operation", "naics_code": 20, "opt_in": false, "bcghg_id": "23219990004", - "regulated_products": [], - "status": "Not Started", + "regulated_products": [1], + "status": "Registered", "created_at": "2024-2-02T15:27:00.000Z", "activities": [1, 5], "contacts": [10], @@ -43,9 +40,9 @@ "model": "registration.operation", "pk": "3b5b95ea-2a1a-450d-8e2e-2e15feed96c9", "fields": { + "point_of_contact": 1, "operator": "4242ea9d-b917-4129-93c2-db00b7451051", "documents": [], - "point_of_contact": 1, "name": "Bugle Operation", "submission_date": "2023-12-16T15:27:00.000Z", "type": "Single Facility Operation", @@ -65,18 +62,18 @@ "model": "registration.operation", "pk": "c0743c09-82fa-4186-91aa-4b5412e3415c", "fields": { + "point_of_contact": 1, "operator": "685d581b-5698-411f-ae00-de1d97334a71", "documents": [], "submission_date": "2024-01-12T15:27:00.000Z", "bc_obps_regulated_operation": "21-0002", - "status": "Registered", - "point_of_contact": 1, "name": "Alien Operation", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, "bcghg_id": "23219990002", - "regulated_products": [], + "regulated_products": [1], + "status": "Registered", "created_at": "2024-1-30T15:27:00.000Z", "activities": [1, 5], "contacts": [10, 11, 12], @@ -87,18 +84,18 @@ "model": "registration.operation", "pk": "b65a3fbc-c81a-49c0-a43a-67bd3a0b488e", "fields": { + "point_of_contact": 1, "operator": "4242ea9d-b917-4129-93c2-db00b7451051", "documents": [], "submission_date": null, - "point_of_contact": 1, - "name": "Bangles Operation", + "name": "Bangles Operation - has Multiple Operators", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, "bcghg_id": "23219990001", "regulated_products": [1, 2], "registration_purpose": "OBPS Regulated Operation", - "status": "Draft", + "status": "Registered", "created_at": "2024-1-29T15:27:00.000Z", "activities": [1, 5], "operation_has_multiple_operators": true @@ -109,17 +106,17 @@ "pk": "d99725a7-1c3a-47cb-a59b-e2388ce0fa18", "fields": { + "point_of_contact": 1, "operator": "685d581b-5698-411f-ae00-de1d97334a71", "documents": [], "submission_date": "2024-01-14T15:27:00.000Z", - "point_of_contact": 1, "name": "Alligator Operation", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, "bcghg_id": "23219999999", - "regulated_products": [], - "status": "Draft", + "regulated_products": [1], + "status": "Registered", "created_at": "2024-1-28T15:27:00.000Z", "activities": [1, 5], "registration_purpose": "Opted-in Operation" @@ -129,17 +126,16 @@ "model": "registration.operation", "pk": "436dd99a-cb41-4494-91c9-98ab149b557d", "fields": { + "point_of_contact": 1, "operator": "685d581b-5698-411f-ae00-de1d97334a71", "documents": [], "submission_date": "2024-01-15T15:27:00.000Z", - "point_of_contact": 1, "name": "Anteater Operation", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, "bcghg_id": "23219990006", - "regulated_products": [], - "status": "Draft", + "status": "Registered", "created_at": "2024-1-27T15:27:00.000Z", "activities": [1, 5], "registration_purpose": "Potential Reporting Operation" @@ -149,17 +145,16 @@ "model": "registration.operation", "pk": "a47b5fb6-1e10-401a-b70e-574bd925db99", "fields": { + "point_of_contact": 1, "operator": "685d581b-5698-411f-ae00-de1d97334a71", "documents": [], "submission_date": "2024-01-16T15:27:00.000Z", - "point_of_contact": 1, "name": "Arctic Operation", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, "bcghg_id": "23219990007", - "regulated_products": [], - "status": "Draft", + "status": "Registered", "created_at": "2024-1-26T15:27:00.000Z", "activities": [1, 5], "registration_purpose": "Electricity Import Operation" @@ -169,17 +164,17 @@ "model": "registration.operation", "pk": "21e70498-c4b0-4525-8443-86faa96206e3", "fields": { + "point_of_contact": 1, "operator": "685d581b-5698-411f-ae00-de1d97334a71", "documents": [], "submission_date": "2024-01-17T15:27:00.000Z", - "point_of_contact": 1, "name": "Arguement Operation", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, "bcghg_id": "23219990008", - "regulated_products": [], - "status": "Draft", + "regulated_products": [2], + "status": "Registered", "created_at": "2024-1-25T15:27:00.000Z", "activities": [1, 5], "registration_purpose": "New Entrant Operation" @@ -189,17 +184,16 @@ "model": "registration.operation", "pk": "17550cd8-3e73-4e52-aa91-ab90cb3b62b0", "fields": { + "point_of_contact": 1, "operator": "685d581b-5698-411f-ae00-de1d97334a71", "documents": [], "submission_date": "2024-01-18T15:27:00.000Z", - "point_of_contact": 1, "name": "Art Operation", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, "bcghg_id": "23219990009", - "regulated_products": [], - "status": "Draft", + "status": "Registered", "created_at": "2024-1-24T15:27:00.000Z", "activities": [1, 5], "registration_purpose": "Reporting Operation" @@ -209,17 +203,17 @@ "model": "registration.operation", "pk": "7d3fc7d1-0504-4ee4-a9c5-447f4b324b57", "fields": { + "point_of_contact": 1, "operator": "685d581b-5698-411f-ae00-de1d97334a71", "documents": [], "submission_date": "2024-01-19T15:27:00.000Z", - "point_of_contact": 1, "name": "Operation 11", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, "bcghg_id": "23219990010", - "regulated_products": [], - "status": "Draft", + "regulated_products": [3], + "status": "Registered", "created_at": "2024-1-23T15:27:00.000Z", "activities": [1, 5], "registration_purpose": "OBPS Regulated Operation" @@ -229,17 +223,16 @@ "model": "registration.operation", "pk": "acf5811e-d521-43f7-a5c7-a6d6dd47bb31", "fields": { + "point_of_contact": 1, "operator": "685d581b-5698-411f-ae00-de1d97334a71", "documents": [], "submission_date": "2024-01-20T15:27:00.000Z", - "point_of_contact": 1, "name": "Operation 12", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, "bcghg_id": "23219990011", - "regulated_products": [], - "status": "Draft", + "status": "Registered", "created_at": "2024-1-22T15:27:00.000Z", "activities": [1, 5], "registration_purpose": "Reporting Operation" @@ -249,17 +242,17 @@ "model": "registration.operation", "pk": "8563da83-0762-4d29-9b22-da5b52ef0f24", "fields": { + "point_of_contact": 1, "operator": "685d581b-5698-411f-ae00-de1d97334a71", "documents": [], "submission_date": "2024-01-21T15:27:00.000Z", - "point_of_contact": 1, "name": "Operation 13", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, "bcghg_id": "23219990012", - "regulated_products": [], - "status": "Draft", + "regulated_products": [3, 4], + "status": "Registered", "created_at": "2024-1-21T15:27:00.000Z", "activities": [1, 5], "registration_purpose": "OBPS Regulated Operation" @@ -269,18 +262,17 @@ "model": "registration.operation", "pk": "df62d793-8cfe-4272-a93e-ea9c9139ff82", "fields": { + "point_of_contact": 1, "operator": "4242ea9d-b917-4129-93c2-db00b7451051", "documents": [], "submission_date": "2024-01-22T15:27:00.000Z", - "point_of_contact": 2, "name": "Bojangles Operation", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, "bcghg_id": "23219990013", "created_at": "2024-1-20T15:27:00.000Z", - "regulated_products": [1, 2, 3, 4], - "status": "Not Started", + "status": "Transferred", "registration_purpose": "Electricity Import Operation" } }, @@ -288,17 +280,17 @@ "model": "registration.operation", "pk": "c5b3643b-c143-42f3-8a2b-03ccc7319cd9", "fields": { + "point_of_contact": 1, "operator": "4242ea9d-b917-4129-93c2-db00b7451051", "documents": [], "submission_date": "2024-01-23T15:27:00.000Z", - "point_of_contact": 3, "name": "Brine Operation", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, "bcghg_id": "23219990014", - "regulated_products": [], - "status": "Not Started", + "regulated_products": [3], + "status": "Closed", "created_at": "2024-1-19T15:27:00.000Z", "activities": [1, 5], "registration_purpose": "OBPS Regulated Operation" @@ -308,17 +300,16 @@ "model": "registration.operation", "pk": "954c0382-ff61-4e87-a8a0-873586534b54", "fields": { + "point_of_contact": 1, "operator": "4242ea9d-b917-4129-93c2-db00b7451051", "documents": [], "submission_date": "2024-01-24T15:27:00.000Z", - "point_of_contact": 1, "name": "Bling Operation", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, "bcghg_id": "23219990015", - "regulated_products": [], - "status": "Draft", + "status": "Temporarily Shutdown", "created_at": "2024-1-18T15:27:00.000Z", "activities": [1, 5], "registration_purpose": "Potential Reporting Operation" @@ -328,17 +319,17 @@ "model": "registration.operation", "pk": "6d07d02a-1ad2-46ed-ad56-2f84313e98bf", "fields": { + "point_of_contact": 1, "operator": "4242ea9d-b917-4129-93c2-db00b7451051", "documents": [], "submission_date": "2024-01-25T15:27:00.000Z", - "point_of_contact": 4, "name": "Bees Operation", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, "bcghg_id": "23219990016", - "regulated_products": [], - "status": "Draft", + "regulated_products": [5], + "status": "Registered", "created_at": "2024-1-17T15:27:00.000Z", "activities": [1, 5], "registration_purpose": "OBPS Regulated Operation" @@ -348,17 +339,16 @@ "model": "registration.operation", "pk": "59d95661-c752-489b-9fd1-0c3fa3454dda", "fields": { + "point_of_contact": 1, "operator": "4242ea9d-b917-4129-93c2-db00b7451051", "documents": [], "submission_date": "2024-01-26T15:27:00.000Z", - "point_of_contact": 5, "name": "Blue Operation", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, "bcghg_id": "23219990017", - "regulated_products": [], - "status": "Registered", + "status": "Draft", "created_at": "2024-1-16T15:27:00.000Z", "activities": [1, 5] } @@ -367,16 +357,16 @@ "model": "registration.operation", "pk": "1bd04128-d070-4d3a-940a-0874c4956181", "fields": { + "point_of_contact": 1, "operator": "4242ea9d-b917-4129-93c2-db00b7451051", "documents": [], "submission_date": "2024-01-27T15:27:00.000Z", - "point_of_contact": 6, "name": "Bullet Operation", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, "bcghg_id": "23219990018", - "regulated_products": [], + "regulated_products": [3], "status": "Registered", "registration_purpose": "New Entrant Operation", "created_at": "2024-1-15T15:27:00.000Z", @@ -387,6 +377,7 @@ "model": "registration.operation", "pk": "17f13f4d-29b4-45f4-b025-b21f2e126771", "fields": { + "point_of_contact": 1, "operator": "4242ea9d-b917-4129-93c2-db00b7451051", "documents": [], "submission_date": "2024-01-28T15:27:00.000Z", @@ -395,8 +386,7 @@ "naics_code": 21, "opt_in": false, "bcghg_id": "23219990019", - "regulated_products": [], - "status": "Draft", + "status": "Registered", "created_at": "2024-1-14T15:27:00.000Z", "activities": [1, 5] } @@ -405,6 +395,7 @@ "model": "registration.operation", "pk": "ef9044dd-2a27-4d26-86fe-02e51e0755f7", "fields": { + "point_of_contact": 1, "operator": "4242ea9d-b917-4129-93c2-db00b7451051", "documents": [], "name": "Bin Operation", @@ -412,8 +403,7 @@ "naics_code": 21, "opt_in": false, "bcghg_id": "23219990020", - "regulated_products": [], - "status": "Draft", + "status": "Registered", "created_at": "2024-1-13T15:27:00.000Z", "activities": [1, 5] } @@ -422,6 +412,7 @@ "model": "registration.operation", "pk": "aeeb781e-a97b-4ab2-9a6e-02e4522add1a", "fields": { + "point_of_contact": 1, "operator": "4242ea9d-b917-4129-93c2-db00b7451051", "documents": [], "name": "Bark Operation", @@ -429,8 +420,7 @@ "naics_code": 21, "opt_in": false, "bcghg_id": "23219990021", - "regulated_products": [], - "status": "Draft", + "status": "Registered", "created_at": "2024-1-12T15:27:00.000Z", "activities": [1, 5] } @@ -439,6 +429,7 @@ "model": "registration.operation", "pk": "02a3ab84-26c6-4a79-bf89-72f877ceef8e", "fields": { + "point_of_contact": 1, "operator": "4242ea9d-b917-4129-93c2-db00b7451051", "documents": [], "name": "Blight Operation", @@ -446,7 +437,6 @@ "naics_code": 21, "opt_in": false, "bcghg_id": "23219990022", - "regulated_products": [], "status": "Draft", "created_at": "2024-1-11T15:27:00.000Z", "activities": [1, 5] @@ -456,6 +446,7 @@ "model": "registration.operation", "pk": "0ac72fa9-2636-4f54-b378-af6b1a070787", "fields": { + "point_of_contact": 1, "operator": "4242ea9d-b917-4129-93c2-db00b7451051", "documents": [], "name": "Brown Operation", @@ -463,7 +454,6 @@ "naics_code": 21, "opt_in": false, "bcghg_id": "23219990023", - "regulated_products": [], "status": "Draft", "created_at": "2024-1-10T15:27:00.000Z", "activities": [1, 3] From 1e011ec23e731b62e59f1f15234711cee9aa4bfc Mon Sep 17 00:00:00 2001 From: Brianna Cerkiewicz Date: Fri, 20 Dec 2024 14:55:46 -0800 Subject: [PATCH 04/12] chore: make parent/partner operators more obvious --- bc_obps/registration/fixtures/mock/operator.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bc_obps/registration/fixtures/mock/operator.json b/bc_obps/registration/fixtures/mock/operator.json index a2a756898c..2047db279a 100644 --- a/bc_obps/registration/fixtures/mock/operator.json +++ b/bc_obps/registration/fixtures/mock/operator.json @@ -15,7 +15,7 @@ "model": "registration.operator", "pk": "4242ea9d-b917-4129-93c2-db00b7451051", "fields": { - "legal_name": "Bravo Technologies", + "legal_name": "Bravo Technologies - has parTNER operator", "cra_business_number": 987654321, "bc_corporate_registry_number": "def1234567", "business_structure": "General Partnership", @@ -71,7 +71,7 @@ "model": "registration.operator", "pk": "5712ee05-5f3b-4822-825d-6fffddafda4c", "fields": { - "legal_name": "Foxtrot Enterprises", + "legal_name": "Foxtrot Enterprises - has parENT operator", "cra_business_number": 987654325, "bc_corporate_registry_number": "pqr1234567", "business_structure": "BC Corporation", From 04bb56b6bfa9a335ad2c2de88f914446493f4e25 Mon Sep 17 00:00:00 2001 From: Brianna Cerkiewicz Date: Fri, 20 Dec 2024 15:49:42 -0800 Subject: [PATCH 05/12] chore: all operators have an operation --- .../registration/fixtures/mock/operation.json | 169 ++++++++++++++++++ ...peration_designated_operator_timeline.json | 4 +- .../registration/fixtures/mock/operator.json | 14 ++ 3 files changed, 185 insertions(+), 2 deletions(-) diff --git a/bc_obps/registration/fixtures/mock/operation.json b/bc_obps/registration/fixtures/mock/operation.json index 7a848fd815..c968acc172 100644 --- a/bc_obps/registration/fixtures/mock/operation.json +++ b/bc_obps/registration/fixtures/mock/operation.json @@ -458,5 +458,174 @@ "created_at": "2024-1-10T15:27:00.000Z", "activities": [1, 3] } + }, + { + "pk": "b35a2095-80e6-4b75-990e-ccf19a57edfa", + "model": "registration.operation", + "fields": { + "operator": "438eff6c-d2e7-40ab-8220-29d3a86ef314", + "point_of_contact": 1, + "name": "Cat", + "type": "Single Facility Operation", + "naics_code": 20, + "status": "Draft", + "activities": [1, 5] + } + }, + { + "pk": "1d59cb82-2776-4785-a8f7-4b13bc9b4579", + "model": "registration.operation", + "fields": { + "operator": "7e8b72dc-4196-427f-a553-7879748139e1", + "point_of_contact": 1, + "name": "Dog", + "type": "Single Facility Operation", + "naics_code": 20, + "status": "Draft", + "activities": [1, 5] + } + }, + { + "pk": "82e6ac8f-42f2-42a7-b179-132a3488b2e1", + "model": "registration.operation", + "fields": { + "operator": "4c1010c1-55ca-485d-84bd-6d975fd0af90", + "point_of_contact": 1, + "name": "Elephant", + "type": "Single Facility Operation", + "naics_code": 20, + "status": "Draft", + "activities": [1, 5] + } + }, + { + "pk": "95f6ec29-4b5b-42a2-9759-d4e9c99738d7", + "model": "registration.operation", + "fields": { + "operator": "5712ee05-5f3b-4822-825d-6fffddafda4c", + "point_of_contact": 1, + "name": "Fox", + "type": "Single Facility Operation", + "naics_code": 20, + "status": "Draft", + "activities": [1, 5] + } + }, + { + "pk": "1b21579c-87f9-452f-b9c1-c784cb96f62e", + "model": "registration.operation", + "fields": { + "operator": "edb1aff1-f888-4199-ab88-068364496347", + "point_of_contact": 1, + "name": "Giraffe", + "type": "Single Facility Operation", + "naics_code": 20, + "status": "Draft", + "activities": [1, 5] + } + }, + { + "pk": "4623c545-ef99-464a-bd8b-bb96ffb57e8e", + "model": "registration.operation", + "fields": { + "operator": "ea4314ea-1974-465a-a851-278c8f9c8daa", + "point_of_contact": 1, + "name": "Horse", + "type": "Single Facility Operation", + "naics_code": 20, + "status": "Draft", + "activities": [1, 5] + } + }, + { + "pk": "f82c2a59-0f3a-4a89-b7d7-9fcd7a7ecb77", + "model": "registration.operation", + "fields": { + "operator": "04384911-264a-4510-b582-11ee704b8e41", + "point_of_contact": 1, + "name": "Iguana", + "type": "Single Facility Operation", + "naics_code": 20, + "status": "Draft", + "activities": [1, 5] + } + }, + { + "pk": "3182c8a4-22ff-4ca9-9f91-093c8888fd7c", + "model": "registration.operation", + "fields": { + "operator": "f209ef09-dfe6-42a1-ac4c-7689897f1b51", + "point_of_contact": 1, + "name": "Jaguar", + "type": "Single Facility Operation", + "naics_code": 20, + "status": "Draft", + "activities": [1, 5] + } + }, + { + "pk": "68f0b68a-c6b5-4c4e-82a6-d7fbd690f55e", + "model": "registration.operation", + "fields": { + "operator": "bb979661-0782-49b2-9c64-acd8424b692b", + "point_of_contact": 1, + "name": "Kangaroo", + "type": "Single Facility Operation", + "naics_code": 20, + "status": "Draft", + "activities": [1, 5] + } + }, + { + "pk": "a5f7f5b3-fb56-4377-ae6c-b11c8b6d0041", + "model": "registration.operation", + "fields": { + "operator": "bb702949-e303-4788-9ba9-806232a5f711", + "point_of_contact": 1, + "name": "Lion", + "type": "Single Facility Operation", + "naics_code": 20, + "status": "Draft", + "activities": [1, 5] + } + }, + { + "pk": "8494e89c-489b-441b-a05d-e935b1d82487", + "model": "registration.operation", + "fields": { + "operator": "a35fb5ad-edd9-4465-982e-81b824644d07", + "point_of_contact": 1, + "name": "Monkey", + "type": "Single Facility Operation", + "naics_code": 20, + "status": "Draft", + "activities": [1, 5] + } + }, + { + "pk": "84d4c8b7-55b5-4700-90ad-fb1c169d4e1f", + "model": "registration.operation", + "fields": { + "operator": "5c847c75-3b17-414c-97f8-88ba81cb3821", + "point_of_contact": 1, + "name": "Narwhal", + "type": "Single Facility Operation", + "naics_code": 20, + "status": "Draft", + "activities": [1, 5] + } + }, + { + "pk": "62d5d8ea-b163-4a83-95a4-bfadbb6b21f7", + "model": "registration.operation", + "fields": { + "operator": "4a792f0f-cf9d-48c8-9a95-f504c5f84b12", + "point_of_contact": 1, + "name": "Ostrich", + "type": "Single Facility Operation", + "naics_code": 20, + "status": "Draft", + "activities": [1, 5] + } } ] diff --git a/bc_obps/registration/fixtures/mock/operation_designated_operator_timeline.json b/bc_obps/registration/fixtures/mock/operation_designated_operator_timeline.json index 0df65679bb..30aadb552c 100644 --- a/bc_obps/registration/fixtures/mock/operation_designated_operator_timeline.json +++ b/bc_obps/registration/fixtures/mock/operation_designated_operator_timeline.json @@ -268,7 +268,7 @@ { "model": "registration.operationdesignatedoperatortimeline", "fields": { - "operation": "b35a 2095-80e6-4b75-990e-ccf19a57edfa", + "operation": "b35a2095-80e6-4b75-990e-ccf19a57edfa", "operator": "438eff6c-d2e7-40ab-8220-29d3a86ef314", "status": "Active", "start_date": "2024-12-06T21:09:07Z" @@ -382,4 +382,4 @@ "start_date": "2024-12-06T21:09:07Z" } } -] \ No newline at end of file +] diff --git a/bc_obps/registration/fixtures/mock/operator.json b/bc_obps/registration/fixtures/mock/operator.json index 2047db279a..eb90f3358b 100644 --- a/bc_obps/registration/fixtures/mock/operator.json +++ b/bc_obps/registration/fixtures/mock/operator.json @@ -206,5 +206,19 @@ "status": "Approved", "is_new": false } + }, + { + "model": "registration.operator", + "pk": "4a792f0f-cf9d-48c8-9a95-f504c5f84b12", + "fields": { + "legal_name": "Papa Enterprises - no associated operations", + "cra_business_number": 987654334, + "bc_corporate_registry_number": "qrs1234567", + "business_structure": "BC Corporation", + "mailing_address": 4, + "contacts": [1], + "status": "Approved", + "is_new": false + } } ] From 077548886596611e1536d7f1dcd893a408d61aa0 Mon Sep 17 00:00:00 2001 From: fviduya Date: Fri, 27 Dec 2024 11:53:58 -0700 Subject: [PATCH 06/12] chore: add facilities for operations --- .../fixtures/mock/bc_greenhouse_gas_id.json | 133 +++++++++ .../registration/fixtures/mock/facility.json | 266 ++++++++++++++++++ ...acility_designated_operation_timeline.json | 180 ++++++++++++ .../registration/fixtures/mock/operation.json | 2 +- 4 files changed, 580 insertions(+), 1 deletion(-) diff --git a/bc_obps/registration/fixtures/mock/bc_greenhouse_gas_id.json b/bc_obps/registration/fixtures/mock/bc_greenhouse_gas_id.json index 0313f27bc9..fa9a01def3 100644 --- a/bc_obps/registration/fixtures/mock/bc_greenhouse_gas_id.json +++ b/bc_obps/registration/fixtures/mock/bc_greenhouse_gas_id.json @@ -351,5 +351,138 @@ "id": "13219990999", "issued_at": "2024-10-31T15:27:00.000Z" } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "13219990028", + "issued_at": "2024-10-31T15:27:00.000Z" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "13219990029", + "issued_at": "2024-10-31T15:27:00.000Z" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "13219990030", + "issued_at": "2024-10-31T15:27:00.000Z" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "13219990031", + "issued_at": "2024-10-31T15:27:00.000Z" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "13219990032", + "issued_at": "2024-10-31T15:27:00.000Z" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "13219990033", + "issued_at": "2024-10-31T15:27:00.000Z" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "13219990034", + "issued_at": "2024-10-31T15:27:00.000Z" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "13219990035", + "issued_at": "2024-10-31T15:27:00.000Z" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "13219990036", + "issued_at": "2024-10-31T15:27:00.000Z" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "13219990037", + "issued_at": "2024-10-31T15:27:00.000Z" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "13219990038", + "issued_at": "2024-10-31T15:27:00.000Z" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "13219990039", + "issued_at": "2024-10-31T15:27:00.000Z" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "13219990040", + "issued_at": "2024-10-31T15:27:00.000Z" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "13219990041", + "issued_at": "2024-10-31T15:27:00.000Z" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "13219990042", + "issued_at": "2024-10-31T15:27:00.000Z" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "13219990043", + "issued_at": "2024-10-31T15:27:00.000Z" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "13219990044", + "issued_at": "2024-10-31T15:27:00.000Z" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "13219990045", + "issued_at": "2024-10-31T15:27:00.000Z" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "13219990046", + "issued_at": "2024-10-31T15:27:00.000Z" + } } ] diff --git a/bc_obps/registration/fixtures/mock/facility.json b/bc_obps/registration/fixtures/mock/facility.json index 742416edd1..5705b9760a 100644 --- a/bc_obps/registration/fixtures/mock/facility.json +++ b/bc_obps/registration/fixtures/mock/facility.json @@ -332,5 +332,271 @@ "latitude_of_largest_emissions": 43.5, "longitude_of_largest_emissions": -123.5 } + }, + { + "model": "registration.facility", + "pk": "67fd8288-422b-43d3-a9b1-e4ddc54e2139", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:18:07.664Z", + "name": "Facility 25", + "type": "Single Facility", + "swrs_facility_id": 1025, + "bcghg_id": "13219990028", + "latitude_of_largest_emissions": 43.5, + "longitude_of_largest_emissions": -123.5 + } + }, + { + "model": "registration.facility", + "pk": "9f7b0848-021e-4d08-9852-10524c4e5456", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:18:07.664Z", + "name": "Facility 26", + "type": "Single Facility", + "swrs_facility_id": 1026, + "bcghg_id": "13219990029", + "latitude_of_largest_emissions": 43.5, + "longitude_of_largest_emissions": -123.5 + } + }, + { + "model": "registration.facility", + "pk": "f4eb89dd-e081-4576-8663-b789c4a20478", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:18:07.664Z", + "name": "Facility 27", + "type": "Single Facility", + "swrs_facility_id": 1027, + "bcghg_id": "13219990030", + "latitude_of_largest_emissions": 43.5, + "longitude_of_largest_emissions": -123.5 + } + }, + { + "model": "registration.facility", + "pk": "6d564423-abfe-4579-ba92-2c6c71c37bb9", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:18:07.664Z", + "name": "Facility 28", + "type": "Single Facility", + "swrs_facility_id": 1028, + "bcghg_id": "13219990031", + "latitude_of_largest_emissions": 43.5, + "longitude_of_largest_emissions": -123.5 + } + }, + { + "model": "registration.facility", + "pk": "f466e6fc-f338-4cf7-89b0-0211bd2be8b7", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:18:07.664Z", + "name": "Facility 29", + "type": "Single Facility", + "swrs_facility_id": 1029, + "bcghg_id": "13219990032", + "latitude_of_largest_emissions": 43.5, + "longitude_of_largest_emissions": -123.5 + } + }, + { + "model": "registration.facility", + "pk": "f2461804-f38a-4fcc-8586-7ee6eaefa830", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:18:07.664Z", + "name": "Facility 30", + "type": "Single Facility", + "swrs_facility_id": 1030, + "bcghg_id": "13219990033", + "latitude_of_largest_emissions": 43.5, + "longitude_of_largest_emissions": -123.5 + } + }, + { + "model": "registration.facility", + "pk": "fab6a6a7-3c9b-426f-88fb-a9c06474fe51", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:18:07.664Z", + "name": "Facility 31", + "type": "Single Facility", + "swrs_facility_id": 1031, + "bcghg_id": "13219990034", + "latitude_of_largest_emissions": 43.5, + "longitude_of_largest_emissions": -123.5 + } + }, + { + "model": "registration.facility", + "pk": "80db5b3a-b06b-4c06-b257-edaa4e873160", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:18:07.664Z", + "type": "Single Facility", + "name": "Facility 32", + "swrs_facility_id": 1032, + "bcghg_id": "13219990035", + "latitude_of_largest_emissions": 43.5, + "longitude_of_largest_emissions": -123.5 + } + }, + { + "model": "registration.facility", + "pk": "8d0777dd-b691-4079-9253-fca63df79300", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:18:07.664Z", + "name": "Facility 33", + "type": "Single Facility", + "swrs_facility_id": 1033, + "bcghg_id": "13219990036", + "latitude_of_largest_emissions": 43.5, + "longitude_of_largest_emissions": -123.5 + } + }, + { + "model": "registration.facility", + "pk": "e5ade67f-f9ce-496c-b0ad-b8edcd7ecd08", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:18:07.664Z", + "name": "Facility 34", + "type": "Single Facility", + "swrs_facility_id": 1034, + "bcghg_id": "13219990037", + "latitude_of_largest_emissions": 43.5, + "longitude_of_largest_emissions": -123.5 + } + }, + { + "model": "registration.facility", + "pk": "5ee7a6b1-e82a-4a6d-90d1-9a8bbf2017a8", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:18:07.664Z", + "name": "Facility 35", + "type": "Single Facility", + "swrs_facility_id": 1035, + "bcghg_id": "13219990038", + "latitude_of_largest_emissions": 43.5, + "longitude_of_largest_emissions": -123.5 + } + }, + { + "model": "registration.facility", + "pk": "d844683d-e894-4dfe-9d2d-49944ec86005", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:18:07.664Z", + "name": "Facility 36", + "type": "Single Facility", + "swrs_facility_id": 1036, + "bcghg_id": "13219990039", + "latitude_of_largest_emissions": 43.5, + "longitude_of_largest_emissions": -123.5 + } + }, + { + "model": "registration.facility", + "pk": "c27356fe-c1b1-42df-8845-246ad057f43d", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:18:07.664Z", + "name": "Facility 37", + "type": "Single Facility", + "swrs_facility_id": 1037, + "bcghg_id": "13219990040", + "latitude_of_largest_emissions": 43.5, + "longitude_of_largest_emissions": -123.5 + } + }, + { + "model": "registration.facility", + "pk": "d477f3d9-2917-4f36-b5ae-166d47dc8172", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:18:07.664Z", + "name": "Facility 38", + "type": "Single Facility", + "swrs_facility_id": 1038, + "bcghg_id": "13219990041", + "latitude_of_largest_emissions": 43.5, + "longitude_of_largest_emissions": -123.5 + } + }, + { + "model": "registration.facility", + "pk": "80ccea58-1920-46ea-8260-23bfe9b4fef0", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:18:07.664Z", + "name": "Facility 39", + "type": "Single Facility", + "swrs_facility_id": 1039, + "bcghg_id": "13219990042", + "latitude_of_largest_emissions": 43.5, + "longitude_of_largest_emissions": -123.5 + } + }, + { + "model": "registration.facility", + "pk": "b66d0364-ad1d-42f4-93d9-82bf185c4304", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:18:07.664Z", + "name": "Facility 40", + "type": "Single Facility", + "swrs_facility_id": 1040, + "bcghg_id": "13219990043", + "latitude_of_largest_emissions": 43.5, + "longitude_of_largest_emissions": -123.5 + } + }, + { + "model": "registration.facility", + "pk": "fdd723fe-88f5-46fb-af50-c19f1407e46d", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:18:07.664Z", + "name": "Facility 41", + "type": "Single Facility", + "swrs_facility_id": 1041, + "bcghg_id": "13219990044", + "latitude_of_largest_emissions": 43.5, + "longitude_of_largest_emissions": -123.5 + } + }, + { + "model": "registration.facility", + "pk": "a4ffa43d-3f47-4f0f-a423-fde5d91e9d87", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:18:07.664Z", + "name": "Facility 42", + "type": "Single Facility", + "swrs_facility_id": 1042, + "bcghg_id": "13219990045", + "latitude_of_largest_emissions": 43.5, + "longitude_of_largest_emissions": -123.5 + } + }, + { + "model": "registration.facility", + "pk": "f6f58bf4-2dd1-4669-b432-50281c6fdff6", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:18:07.664Z", + "name": "Facility 43", + "type": "Single Facility", + "swrs_facility_id": 1043, + "bcghg_id": "13219990046", + "latitude_of_largest_emissions": 43.5, + "longitude_of_largest_emissions": -123.5 + } } ] diff --git a/bc_obps/registration/fixtures/mock/facility_designated_operation_timeline.json b/bc_obps/registration/fixtures/mock/facility_designated_operation_timeline.json index 7af437d129..178ec85e60 100644 --- a/bc_obps/registration/fixtures/mock/facility_designated_operation_timeline.json +++ b/bc_obps/registration/fixtures/mock/facility_designated_operation_timeline.json @@ -232,5 +232,185 @@ "operation": "1bd04128-d070-4d3a-940a-0874c4956181", "start_date": "2024-06-28T23:20:02Z" } + }, + { + "model": "registration.facilitydesignatedoperationtimeline", + "fields": { + "created_by": "00000000-0000-0000-0000-000000000001", + "created_at": "2024-06-20T23:20:02Z", + "facility": "67fd8288-422b-43d3-a9b1-e4ddc54e2139", + "operation": "c0743c09-82fa-4186-91aa-4b5412e3415c", + "start_date": "2024-06-28T23:20:02Z" + } + }, + { + "model": "registration.facilitydesignatedoperationtimeline", + "fields": { + "created_by": "00000000-0000-0000-0000-000000000001", + "created_at": "2024-06-20T23:20:02Z", + "facility": "9f7b0848-021e-4d08-9852-10524c4e5456", + "operation": "b65a3fbc-c81a-49c0-a43a-67bd3a0b488e", + "start_date": "2024-06-28T23:20:02Z" + } + }, + { + "model": "registration.facilitydesignatedoperationtimeline", + "fields": { + "created_by": "00000000-0000-0000-0000-000000000001", + "created_at": "2024-06-20T23:20:02Z", + "facility": "f4eb89dd-e081-4576-8663-b789c4a20478", + "operation": "d99725a7-1c3a-47cb-a59b-e2388ce0fa18", + "start_date": "2024-06-28T23:20:02Z" + } + }, + { + "model": "registration.facilitydesignatedoperationtimeline", + "fields": { + "created_by": "00000000-0000-0000-0000-000000000001", + "created_at": "2024-06-20T23:20:02Z", + "facility": "6d564423-abfe-4579-ba92-2c6c71c37bb9", + "operation": "436dd99a-cb41-4494-91c9-98ab149b557d", + "start_date": "2024-06-28T23:20:02Z" + } + }, + { + "model": "registration.facilitydesignatedoperationtimeline", + "fields": { + "created_by": "00000000-0000-0000-0000-000000000001", + "created_at": "2024-06-20T23:20:02Z", + "facility": "f466e6fc-f338-4cf7-89b0-0211bd2be8b7", + "operation": "a47b5fb6-1e10-401a-b70e-574bd925db99", + "start_date": "2024-06-28T23:20:02Z" + } + }, + { + "model": "registration.facilitydesignatedoperationtimeline", + "fields": { + "created_by": "00000000-0000-0000-0000-000000000001", + "created_at": "2024-06-20T23:20:02Z", + "facility": "f2461804-f38a-4fcc-8586-7ee6eaefa830", + "operation": "21e70498-c4b0-4525-8443-86faa96206e3", + "start_date": "2024-06-28T23:20:02Z" + } + }, + { + "model": "registration.facilitydesignatedoperationtimeline", + "fields": { + "created_by": "00000000-0000-0000-0000-000000000001", + "created_at": "2024-06-20T23:20:02Z", + "facility": "fab6a6a7-3c9b-426f-88fb-a9c06474fe51", + "operation": "17550cd8-3e73-4e52-aa91-ab90cb3b62b0", + "start_date": "2024-06-28T23:20:02Z" + } + }, + { + "model": "registration.facilitydesignatedoperationtimeline", + "fields": { + "created_by": "00000000-0000-0000-0000-000000000001", + "created_at": "2024-06-20T23:20:02Z", + "facility": "80db5b3a-b06b-4c06-b257-edaa4e873160", + "operation": "7d3fc7d1-0504-4ee4-a9c5-447f4b324b57", + "start_date": "2024-06-28T23:20:02Z" + } + }, + { + "model": "registration.facilitydesignatedoperationtimeline", + "fields": { + "created_by": "00000000-0000-0000-0000-000000000001", + "created_at": "2024-06-20T23:20:02Z", + "facility": "8d0777dd-b691-4079-9253-fca63df79300", + "operation": "acf5811e-d521-43f7-a5c7-a6d6dd47bb31", + "start_date": "2024-06-28T23:20:02Z" + } + }, + { + "model": "registration.facilitydesignatedoperationtimeline", + "fields": { + "created_by": "00000000-0000-0000-0000-000000000001", + "created_at": "2024-06-20T23:20:02Z", + "facility": "e5ade67f-f9ce-496c-b0ad-b8edcd7ecd08", + "operation": "8563da83-0762-4d29-9b22-da5b52ef0f24", + "start_date": "2024-06-28T23:20:02Z" + } + }, + { + "model": "registration.facilitydesignatedoperationtimeline", + "fields": { + "created_by": "00000000-0000-0000-0000-000000000001", + "created_at": "2024-06-20T23:20:02Z", + "facility": "d844683d-e894-4dfe-9d2d-49944ec86005", + "operation": "c5b3643b-c143-42f3-8a2b-03ccc7319cd9", + "start_date": "2024-06-28T23:20:02Z" + } + }, + { + "model": "registration.facilitydesignatedoperationtimeline", + "fields": { + "created_by": "00000000-0000-0000-0000-000000000001", + "created_at": "2024-06-20T23:20:02Z", + "facility": "c27356fe-c1b1-42df-8845-246ad057f43d", + "operation": "954c0382-ff61-4e87-a8a0-873586534b54", + "start_date": "2024-06-28T23:20:02Z" + } + }, + { + "model": "registration.facilitydesignatedoperationtimeline", + "fields": { + "created_by": "00000000-0000-0000-0000-000000000001", + "created_at": "2024-06-20T23:20:02Z", + "facility": "d477f3d9-2917-4f36-b5ae-166d47dc8172", + "operation": "6d07d02a-1ad2-46ed-ad56-2f84313e98bf", + "start_date": "2024-06-28T23:20:02Z" + } + }, + { + "model": "registration.facilitydesignatedoperationtimeline", + "fields": { + "created_by": "00000000-0000-0000-0000-000000000001", + "created_at": "2024-06-20T23:20:02Z", + "facility": "80ccea58-1920-46ea-8260-23bfe9b4fef0", + "operation": "59d95661-c752-489b-9fd1-0c3fa3454dda", + "start_date": "2024-06-28T23:20:02Z" + } + }, + { + "model": "registration.facilitydesignatedoperationtimeline", + "fields": { + "created_by": "00000000-0000-0000-0000-000000000001", + "created_at": "2024-06-20T23:20:02Z", + "facility": "b66d0364-ad1d-42f4-93d9-82bf185c4304", + "operation": "17f13f4d-29b4-45f4-b025-b21f2e126771", + "start_date": "2024-06-28T23:20:02Z" + } + }, + { + "model": "registration.facilitydesignatedoperationtimeline", + "fields": { + "created_by": "00000000-0000-0000-0000-000000000001", + "created_at": "2024-06-20T23:20:02Z", + "facility": "fdd723fe-88f5-46fb-af50-c19f1407e46d", + "operation": "ef9044dd-2a27-4d26-86fe-02e51e0755f7", + "start_date": "2024-06-28T23:20:02Z" + } + }, + { + "model": "registration.facilitydesignatedoperationtimeline", + "fields": { + "created_by": "00000000-0000-0000-0000-000000000001", + "created_at": "2024-06-20T23:20:02Z", + "facility": "a4ffa43d-3f47-4f0f-a423-fde5d91e9d87", + "operation": "aeeb781e-a97b-4ab2-9a6e-02e4522add1a", + "start_date": "2024-06-28T23:20:02Z" + } + }, + { + "model": "registration.facilitydesignatedoperationtimeline", + "fields": { + "created_by": "00000000-0000-0000-0000-000000000001", + "created_at": "2024-06-20T23:20:02Z", + "facility": "f6f58bf4-2dd1-4669-b432-50281c6fdff6", + "operation": "02a3ab84-26c6-4a79-bf89-72f877ceef8e", + "start_date": "2024-06-28T23:20:02Z" + } } ] diff --git a/bc_obps/registration/fixtures/mock/operation.json b/bc_obps/registration/fixtures/mock/operation.json index c968acc172..2a28289368 100644 --- a/bc_obps/registration/fixtures/mock/operation.json +++ b/bc_obps/registration/fixtures/mock/operation.json @@ -449,7 +449,7 @@ "point_of_contact": 1, "operator": "4242ea9d-b917-4129-93c2-db00b7451051", "documents": [], - "name": "Brown Operation", + "name": "Brown Operation -- no facility", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, From ee75cdbfc619ce9a09695afdfa89e6a3a50d5033 Mon Sep 17 00:00:00 2001 From: fviduya Date: Fri, 27 Dec 2024 15:31:03 -0700 Subject: [PATCH 07/12] chore: add boro ID --- .../mock/bc_obps_regulated_operation.json | 128 ++++++++++++++++++ .../registration/fixtures/mock/operation.json | 18 ++- 2 files changed, 145 insertions(+), 1 deletion(-) diff --git a/bc_obps/registration/fixtures/mock/bc_obps_regulated_operation.json b/bc_obps/registration/fixtures/mock/bc_obps_regulated_operation.json index ebbda47cea..565757a1ba 100644 --- a/bc_obps/registration/fixtures/mock/bc_obps_regulated_operation.json +++ b/bc_obps/registration/fixtures/mock/bc_obps_regulated_operation.json @@ -14,5 +14,133 @@ "issued_at": "2023-10-13T15:27:00.000Z", "comments": "Test comment" } + }, + { + "model": "registration.bcobpsregulatedoperation", + "fields": { + "id": "21-0003", + "issued_at": "2023-10-13T15:27:00.000Z", + "comments": "Test comment" + } + }, + { + "model": "registration.bcobpsregulatedoperation", + "fields": { + "id": "21-0004", + "issued_at": "2023-10-13T15:27:00.000Z", + "comments": "Test comment" + } + }, + { + "model": "registration.bcobpsregulatedoperation", + "fields": { + "id": "21-0005", + "issued_at": "2023-10-13T15:27:00.000Z", + "comments": "Test comment" + } + }, + { + "model": "registration.bcobpsregulatedoperation", + "fields": { + "id": "21-0006", + "issued_at": "2023-10-13T15:27:00.000Z", + "comments": "Test comment" + } + }, + { + "model": "registration.bcobpsregulatedoperation", + "fields": { + "id": "21-0007", + "issued_at": "2023-10-13T15:27:00.000Z", + "comments": "Test comment" + } + }, + { + "model": "registration.bcobpsregulatedoperation", + "fields": { + "id": "21-0008", + "issued_at": "2023-10-13T15:27:00.000Z", + "comments": "Test comment" + } + }, + { + "model": "registration.bcobpsregulatedoperation", + "fields": { + "id": "21-0009", + "issued_at": "2023-10-13T15:27:00.000Z", + "comments": "Test comment" + } + }, + { + "model": "registration.bcobpsregulatedoperation", + "fields": { + "id": "21-0010", + "issued_at": "2023-10-13T15:27:00.000Z", + "comments": "Test comment" + } + }, + { + "model": "registration.bcobpsregulatedoperation", + "fields": { + "id": "21-0011", + "issued_at": "2023-10-13T15:27:00.000Z", + "comments": "Test comment" + } + }, + { + "model": "registration.bcobpsregulatedoperation", + "fields": { + "id": "21-0012", + "issued_at": "2023-10-13T15:27:00.000Z", + "comments": "Test comment" + } + }, + { + "model": "registration.bcobpsregulatedoperation", + "fields": { + "id": "21-0013", + "issued_at": "2023-10-13T15:27:00.000Z", + "comments": "Test comment" + } + }, + { + "model": "registration.bcobpsregulatedoperation", + "fields": { + "id": "21-0014", + "issued_at": "2023-10-13T15:27:00.000Z", + "comments": "Test comment" + } + }, + { + "model": "registration.bcobpsregulatedoperation", + "fields": { + "id": "21-0015", + "issued_at": "2023-10-13T15:27:00.000Z", + "comments": "Test comment" + } + }, + { + "model": "registration.bcobpsregulatedoperation", + "fields": { + "id": "21-0016", + "issued_at": "2023-10-13T15:27:00.000Z", + "comments": "Test comment" + } + }, + { + "model": "registration.bcobpsregulatedoperation", + "fields": { + "id": "21-0017", + "issued_at": "2023-10-13T15:27:00.000Z", + "comments": "Test comment" + } + }, + { + "model": "registration.bcobpsregulatedoperation", + "fields": { + "id": "21-0018", + "issued_at": "2023-10-13T15:27:00.000Z", + "comments": "Test comment" + } } ] diff --git a/bc_obps/registration/fixtures/mock/operation.json b/bc_obps/registration/fixtures/mock/operation.json index 2a28289368..d6cf30939f 100644 --- a/bc_obps/registration/fixtures/mock/operation.json +++ b/bc_obps/registration/fixtures/mock/operation.json @@ -11,6 +11,7 @@ "naics_code": 19, "swrs_facility_id": 1001, "status": "Registered", + "bc_obps_regulated_operation":"21-0014", "created_at": "2024-2-01T15:27:00.000Z", "activities": [1, 5], "registration_purpose": "Reporting Operation" @@ -30,6 +31,7 @@ "bcghg_id": "23219990004", "regulated_products": [1], "status": "Registered", + "bc_obps_regulated_operation":"21-0015", "created_at": "2024-2-02T15:27:00.000Z", "activities": [1, 5], "contacts": [10], @@ -66,7 +68,6 @@ "operator": "685d581b-5698-411f-ae00-de1d97334a71", "documents": [], "submission_date": "2024-01-12T15:27:00.000Z", - "bc_obps_regulated_operation": "21-0002", "name": "Alien Operation", "type": "Single Facility Operation", "naics_code": 21, @@ -74,6 +75,7 @@ "bcghg_id": "23219990002", "regulated_products": [1], "status": "Registered", + "bc_obps_regulated_operation": "21-0002", "created_at": "2024-1-30T15:27:00.000Z", "activities": [1, 5], "contacts": [10, 11, 12], @@ -96,6 +98,7 @@ "regulated_products": [1, 2], "registration_purpose": "OBPS Regulated Operation", "status": "Registered", + "bc_obps_regulated_operation":"21-0003", "created_at": "2024-1-29T15:27:00.000Z", "activities": [1, 5], "operation_has_multiple_operators": true @@ -117,6 +120,7 @@ "bcghg_id": "23219999999", "regulated_products": [1], "status": "Registered", + "bc_obps_regulated_operation":"21-0004", "created_at": "2024-1-28T15:27:00.000Z", "activities": [1, 5], "registration_purpose": "Opted-in Operation" @@ -136,6 +140,7 @@ "opt_in": false, "bcghg_id": "23219990006", "status": "Registered", + "bc_obps_regulated_operation":"21-0005", "created_at": "2024-1-27T15:27:00.000Z", "activities": [1, 5], "registration_purpose": "Potential Reporting Operation" @@ -155,6 +160,7 @@ "opt_in": false, "bcghg_id": "23219990007", "status": "Registered", + "bc_obps_regulated_operation":"21-0006", "created_at": "2024-1-26T15:27:00.000Z", "activities": [1, 5], "registration_purpose": "Electricity Import Operation" @@ -175,6 +181,7 @@ "bcghg_id": "23219990008", "regulated_products": [2], "status": "Registered", + "bc_obps_regulated_operation":"21-0007", "created_at": "2024-1-25T15:27:00.000Z", "activities": [1, 5], "registration_purpose": "New Entrant Operation" @@ -194,6 +201,7 @@ "opt_in": false, "bcghg_id": "23219990009", "status": "Registered", + "bc_obps_regulated_operation":"21-0008", "created_at": "2024-1-24T15:27:00.000Z", "activities": [1, 5], "registration_purpose": "Reporting Operation" @@ -214,6 +222,7 @@ "bcghg_id": "23219990010", "regulated_products": [3], "status": "Registered", + "bc_obps_regulated_operation":"21-0009", "created_at": "2024-1-23T15:27:00.000Z", "activities": [1, 5], "registration_purpose": "OBPS Regulated Operation" @@ -233,6 +242,7 @@ "opt_in": false, "bcghg_id": "23219990011", "status": "Registered", + "bc_obps_regulated_operation":"21-0010", "created_at": "2024-1-22T15:27:00.000Z", "activities": [1, 5], "registration_purpose": "Reporting Operation" @@ -253,6 +263,7 @@ "bcghg_id": "23219990012", "regulated_products": [3, 4], "status": "Registered", + "bc_obps_regulated_operation":"21-0011", "created_at": "2024-1-21T15:27:00.000Z", "activities": [1, 5], "registration_purpose": "OBPS Regulated Operation" @@ -330,6 +341,7 @@ "bcghg_id": "23219990016", "regulated_products": [5], "status": "Registered", + "bc_obps_regulated_operation":"21-0012", "created_at": "2024-1-17T15:27:00.000Z", "activities": [1, 5], "registration_purpose": "OBPS Regulated Operation" @@ -368,6 +380,7 @@ "bcghg_id": "23219990018", "regulated_products": [3], "status": "Registered", + "bc_obps_regulated_operation":"21-0013", "registration_purpose": "New Entrant Operation", "created_at": "2024-1-15T15:27:00.000Z", "activities": [1, 3] @@ -387,6 +400,7 @@ "opt_in": false, "bcghg_id": "23219990019", "status": "Registered", + "bc_obps_regulated_operation":"21-0016", "created_at": "2024-1-14T15:27:00.000Z", "activities": [1, 5] } @@ -404,6 +418,7 @@ "opt_in": false, "bcghg_id": "23219990020", "status": "Registered", + "bc_obps_regulated_operation":"21-0017", "created_at": "2024-1-13T15:27:00.000Z", "activities": [1, 5] } @@ -421,6 +436,7 @@ "opt_in": false, "bcghg_id": "23219990021", "status": "Registered", + "bc_obps_regulated_operation":"21-0018", "created_at": "2024-1-12T15:27:00.000Z", "activities": [1, 5] } From 359812da1c494ca66a05f5509f42479fb75598ff Mon Sep 17 00:00:00 2001 From: fviduya Date: Tue, 31 Dec 2024 12:06:28 -0700 Subject: [PATCH 08/12] chore: update BORO ID fields --- .../registration/fixtures/mock/operation.json | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/bc_obps/registration/fixtures/mock/operation.json b/bc_obps/registration/fixtures/mock/operation.json index d6cf30939f..a312ebe3e9 100644 --- a/bc_obps/registration/fixtures/mock/operation.json +++ b/bc_obps/registration/fixtures/mock/operation.json @@ -11,7 +11,7 @@ "naics_code": 19, "swrs_facility_id": 1001, "status": "Registered", - "bc_obps_regulated_operation":"21-0014", + "bc_obps_regulated_operation": "21-0014", "created_at": "2024-2-01T15:27:00.000Z", "activities": [1, 5], "registration_purpose": "Reporting Operation" @@ -31,7 +31,7 @@ "bcghg_id": "23219990004", "regulated_products": [1], "status": "Registered", - "bc_obps_regulated_operation":"21-0015", + "bc_obps_regulated_operation": "21-0015", "created_at": "2024-2-02T15:27:00.000Z", "activities": [1, 5], "contacts": [10], @@ -98,7 +98,7 @@ "regulated_products": [1, 2], "registration_purpose": "OBPS Regulated Operation", "status": "Registered", - "bc_obps_regulated_operation":"21-0003", + "bc_obps_regulated_operation": "21-0003", "created_at": "2024-1-29T15:27:00.000Z", "activities": [1, 5], "operation_has_multiple_operators": true @@ -120,7 +120,7 @@ "bcghg_id": "23219999999", "regulated_products": [1], "status": "Registered", - "bc_obps_regulated_operation":"21-0004", + "bc_obps_regulated_operation": "21-0004", "created_at": "2024-1-28T15:27:00.000Z", "activities": [1, 5], "registration_purpose": "Opted-in Operation" @@ -140,7 +140,7 @@ "opt_in": false, "bcghg_id": "23219990006", "status": "Registered", - "bc_obps_regulated_operation":"21-0005", + "bc_obps_regulated_operation": "21-0005", "created_at": "2024-1-27T15:27:00.000Z", "activities": [1, 5], "registration_purpose": "Potential Reporting Operation" @@ -160,7 +160,7 @@ "opt_in": false, "bcghg_id": "23219990007", "status": "Registered", - "bc_obps_regulated_operation":"21-0006", + "bc_obps_regulated_operation": "21-0006", "created_at": "2024-1-26T15:27:00.000Z", "activities": [1, 5], "registration_purpose": "Electricity Import Operation" @@ -181,7 +181,7 @@ "bcghg_id": "23219990008", "regulated_products": [2], "status": "Registered", - "bc_obps_regulated_operation":"21-0007", + "bc_obps_regulated_operation": "21-0007", "created_at": "2024-1-25T15:27:00.000Z", "activities": [1, 5], "registration_purpose": "New Entrant Operation" @@ -201,7 +201,7 @@ "opt_in": false, "bcghg_id": "23219990009", "status": "Registered", - "bc_obps_regulated_operation":"21-0008", + "bc_obps_regulated_operation": "21-0008", "created_at": "2024-1-24T15:27:00.000Z", "activities": [1, 5], "registration_purpose": "Reporting Operation" @@ -222,7 +222,7 @@ "bcghg_id": "23219990010", "regulated_products": [3], "status": "Registered", - "bc_obps_regulated_operation":"21-0009", + "bc_obps_regulated_operation": "21-0009", "created_at": "2024-1-23T15:27:00.000Z", "activities": [1, 5], "registration_purpose": "OBPS Regulated Operation" @@ -242,7 +242,7 @@ "opt_in": false, "bcghg_id": "23219990011", "status": "Registered", - "bc_obps_regulated_operation":"21-0010", + "bc_obps_regulated_operation": "21-0010", "created_at": "2024-1-22T15:27:00.000Z", "activities": [1, 5], "registration_purpose": "Reporting Operation" @@ -263,7 +263,7 @@ "bcghg_id": "23219990012", "regulated_products": [3, 4], "status": "Registered", - "bc_obps_regulated_operation":"21-0011", + "bc_obps_regulated_operation": "21-0011", "created_at": "2024-1-21T15:27:00.000Z", "activities": [1, 5], "registration_purpose": "OBPS Regulated Operation" @@ -341,7 +341,7 @@ "bcghg_id": "23219990016", "regulated_products": [5], "status": "Registered", - "bc_obps_regulated_operation":"21-0012", + "bc_obps_regulated_operation": "21-0012", "created_at": "2024-1-17T15:27:00.000Z", "activities": [1, 5], "registration_purpose": "OBPS Regulated Operation" @@ -380,7 +380,7 @@ "bcghg_id": "23219990018", "regulated_products": [3], "status": "Registered", - "bc_obps_regulated_operation":"21-0013", + "bc_obps_regulated_operation": "21-0013", "registration_purpose": "New Entrant Operation", "created_at": "2024-1-15T15:27:00.000Z", "activities": [1, 3] @@ -400,7 +400,7 @@ "opt_in": false, "bcghg_id": "23219990019", "status": "Registered", - "bc_obps_regulated_operation":"21-0016", + "bc_obps_regulated_operation": "21-0016", "created_at": "2024-1-14T15:27:00.000Z", "activities": [1, 5] } @@ -418,7 +418,7 @@ "opt_in": false, "bcghg_id": "23219990020", "status": "Registered", - "bc_obps_regulated_operation":"21-0017", + "bc_obps_regulated_operation": "21-0017", "created_at": "2024-1-13T15:27:00.000Z", "activities": [1, 5] } @@ -436,7 +436,7 @@ "opt_in": false, "bcghg_id": "23219990021", "status": "Registered", - "bc_obps_regulated_operation":"21-0018", + "bc_obps_regulated_operation": "21-0018", "created_at": "2024-1-12T15:27:00.000Z", "activities": [1, 5] } From 23e2e8353d9d586bd0e11fb3adfc3bf211baac0b Mon Sep 17 00:00:00 2001 From: fviduya Date: Mon, 6 Jan 2025 22:12:27 -0700 Subject: [PATCH 09/12] chore: add purpose for registered operations, change name to reflect type and status --- .../registration/fixtures/mock/operation.json | 78 ++++++++++--------- 1 file changed, 40 insertions(+), 38 deletions(-) diff --git a/bc_obps/registration/fixtures/mock/operation.json b/bc_obps/registration/fixtures/mock/operation.json index a312ebe3e9..a52769e976 100644 --- a/bc_obps/registration/fixtures/mock/operation.json +++ b/bc_obps/registration/fixtures/mock/operation.json @@ -6,7 +6,7 @@ "point_of_contact": 1, "operator": "685d581b-5698-411f-ae00-de1d97334a71", "documents": [], - "name": "Apple Operation", + "name": "Apple LFO - Registered", "type": "Linear Facility Operation", "naics_code": 19, "swrs_facility_id": 1001, @@ -24,7 +24,7 @@ "point_of_contact": 1, "operator": "4242ea9d-b917-4129-93c2-db00b7451051", "documents": [], - "name": "Banana Operation", + "name": "Banana LFO - Registered", "type": "Linear Facility Operation", "naics_code": 20, "opt_in": false, @@ -45,7 +45,7 @@ "point_of_contact": 1, "operator": "4242ea9d-b917-4129-93c2-db00b7451051", "documents": [], - "name": "Bugle Operation", + "name": "Bugle SFO - Registered", "submission_date": "2023-12-16T15:27:00.000Z", "type": "Single Facility Operation", "naics_code": 21, @@ -68,7 +68,7 @@ "operator": "685d581b-5698-411f-ae00-de1d97334a71", "documents": [], "submission_date": "2024-01-12T15:27:00.000Z", - "name": "Alien Operation", + "name": "Alien SFO - Registered", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, @@ -90,7 +90,7 @@ "operator": "4242ea9d-b917-4129-93c2-db00b7451051", "documents": [], "submission_date": null, - "name": "Bangles Operation - has Multiple Operators", + "name": "Bangles SFO - Registered - has Multiple Operators", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, @@ -106,14 +106,13 @@ }, { "model": "registration.operation", - "pk": "d99725a7-1c3a-47cb-a59b-e2388ce0fa18", "fields": { "point_of_contact": 1, "operator": "685d581b-5698-411f-ae00-de1d97334a71", "documents": [], "submission_date": "2024-01-14T15:27:00.000Z", - "name": "Alligator Operation", + "name": "Alligator SFO - Registered", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, @@ -134,7 +133,7 @@ "operator": "685d581b-5698-411f-ae00-de1d97334a71", "documents": [], "submission_date": "2024-01-15T15:27:00.000Z", - "name": "Anteater Operation", + "name": "Anteater SFO - Registered", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, @@ -154,7 +153,7 @@ "operator": "685d581b-5698-411f-ae00-de1d97334a71", "documents": [], "submission_date": "2024-01-16T15:27:00.000Z", - "name": "Arctic Operation", + "name": "Arctic SFO - Registered", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, @@ -174,7 +173,7 @@ "operator": "685d581b-5698-411f-ae00-de1d97334a71", "documents": [], "submission_date": "2024-01-17T15:27:00.000Z", - "name": "Arguement Operation", + "name": "Arguement SFO - Registered", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, @@ -195,7 +194,7 @@ "operator": "685d581b-5698-411f-ae00-de1d97334a71", "documents": [], "submission_date": "2024-01-18T15:27:00.000Z", - "name": "Art Operation", + "name": "Art SFO - Registered", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, @@ -215,7 +214,7 @@ "operator": "685d581b-5698-411f-ae00-de1d97334a71", "documents": [], "submission_date": "2024-01-19T15:27:00.000Z", - "name": "Operation 11", + "name": "SFO 11 - Registered", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, @@ -236,7 +235,7 @@ "operator": "685d581b-5698-411f-ae00-de1d97334a71", "documents": [], "submission_date": "2024-01-20T15:27:00.000Z", - "name": "Operation 12", + "name": "SFO 12 - Registered", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, @@ -256,7 +255,7 @@ "operator": "685d581b-5698-411f-ae00-de1d97334a71", "documents": [], "submission_date": "2024-01-21T15:27:00.000Z", - "name": "Operation 13", + "name": "SFO 13 - Registered", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, @@ -277,7 +276,7 @@ "operator": "4242ea9d-b917-4129-93c2-db00b7451051", "documents": [], "submission_date": "2024-01-22T15:27:00.000Z", - "name": "Bojangles Operation", + "name": "Bojangles SFO - Transferred", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, @@ -295,7 +294,7 @@ "operator": "4242ea9d-b917-4129-93c2-db00b7451051", "documents": [], "submission_date": "2024-01-23T15:27:00.000Z", - "name": "Brine Operation", + "name": "Brine SFO - Closed", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, @@ -315,7 +314,7 @@ "operator": "4242ea9d-b917-4129-93c2-db00b7451051", "documents": [], "submission_date": "2024-01-24T15:27:00.000Z", - "name": "Bling Operation", + "name": "Bling SFO - Temp Shutdown", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, @@ -334,7 +333,7 @@ "operator": "4242ea9d-b917-4129-93c2-db00b7451051", "documents": [], "submission_date": "2024-01-25T15:27:00.000Z", - "name": "Bees Operation", + "name": "Bees SFO - Registered", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, @@ -355,7 +354,7 @@ "operator": "4242ea9d-b917-4129-93c2-db00b7451051", "documents": [], "submission_date": "2024-01-26T15:27:00.000Z", - "name": "Blue Operation", + "name": "Blue SFO - Draft", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, @@ -373,7 +372,7 @@ "operator": "4242ea9d-b917-4129-93c2-db00b7451051", "documents": [], "submission_date": "2024-01-27T15:27:00.000Z", - "name": "Bullet Operation", + "name": "Bullet SFO - Registered", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, @@ -394,7 +393,7 @@ "operator": "4242ea9d-b917-4129-93c2-db00b7451051", "documents": [], "submission_date": "2024-01-28T15:27:00.000Z", - "name": "Bat Operation", + "name": "Bat SFO - Registered", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, @@ -402,6 +401,7 @@ "status": "Registered", "bc_obps_regulated_operation": "21-0016", "created_at": "2024-1-14T15:27:00.000Z", + "registration_purpose": "Reporting Operation", "activities": [1, 5] } }, @@ -412,7 +412,7 @@ "point_of_contact": 1, "operator": "4242ea9d-b917-4129-93c2-db00b7451051", "documents": [], - "name": "Bin Operation", + "name": "Bin SFO - Registered", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, @@ -420,6 +420,7 @@ "status": "Registered", "bc_obps_regulated_operation": "21-0017", "created_at": "2024-1-13T15:27:00.000Z", + "registration_purpose": "Reporting Operation", "activities": [1, 5] } }, @@ -430,7 +431,7 @@ "point_of_contact": 1, "operator": "4242ea9d-b917-4129-93c2-db00b7451051", "documents": [], - "name": "Bark Operation", + "name": "Bark SFO - Registered", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, @@ -438,6 +439,7 @@ "status": "Registered", "bc_obps_regulated_operation": "21-0018", "created_at": "2024-1-12T15:27:00.000Z", + "registration_purpose": "Reporting Operation", "activities": [1, 5] } }, @@ -448,7 +450,7 @@ "point_of_contact": 1, "operator": "4242ea9d-b917-4129-93c2-db00b7451051", "documents": [], - "name": "Blight Operation", + "name": "Blight SFO - Draft", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, @@ -465,7 +467,7 @@ "point_of_contact": 1, "operator": "4242ea9d-b917-4129-93c2-db00b7451051", "documents": [], - "name": "Brown Operation -- no facility", + "name": "Brown SFO - Draft -- no facility", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, @@ -481,7 +483,7 @@ "fields": { "operator": "438eff6c-d2e7-40ab-8220-29d3a86ef314", "point_of_contact": 1, - "name": "Cat", + "name": "Cat SFO - Draft", "type": "Single Facility Operation", "naics_code": 20, "status": "Draft", @@ -494,7 +496,7 @@ "fields": { "operator": "7e8b72dc-4196-427f-a553-7879748139e1", "point_of_contact": 1, - "name": "Dog", + "name": "Dog SFO - Draft", "type": "Single Facility Operation", "naics_code": 20, "status": "Draft", @@ -507,7 +509,7 @@ "fields": { "operator": "4c1010c1-55ca-485d-84bd-6d975fd0af90", "point_of_contact": 1, - "name": "Elephant", + "name": "Elephant SFO - Draft", "type": "Single Facility Operation", "naics_code": 20, "status": "Draft", @@ -520,7 +522,7 @@ "fields": { "operator": "5712ee05-5f3b-4822-825d-6fffddafda4c", "point_of_contact": 1, - "name": "Fox", + "name": "Fox SFO - Draft", "type": "Single Facility Operation", "naics_code": 20, "status": "Draft", @@ -533,7 +535,7 @@ "fields": { "operator": "edb1aff1-f888-4199-ab88-068364496347", "point_of_contact": 1, - "name": "Giraffe", + "name": "Giraffe SFO - Draft", "type": "Single Facility Operation", "naics_code": 20, "status": "Draft", @@ -546,7 +548,7 @@ "fields": { "operator": "ea4314ea-1974-465a-a851-278c8f9c8daa", "point_of_contact": 1, - "name": "Horse", + "name": "Horse SFO - Draft", "type": "Single Facility Operation", "naics_code": 20, "status": "Draft", @@ -559,7 +561,7 @@ "fields": { "operator": "04384911-264a-4510-b582-11ee704b8e41", "point_of_contact": 1, - "name": "Iguana", + "name": "Iguana SFO - Draft", "type": "Single Facility Operation", "naics_code": 20, "status": "Draft", @@ -572,7 +574,7 @@ "fields": { "operator": "f209ef09-dfe6-42a1-ac4c-7689897f1b51", "point_of_contact": 1, - "name": "Jaguar", + "name": "Jaguar SFO - Draft", "type": "Single Facility Operation", "naics_code": 20, "status": "Draft", @@ -585,7 +587,7 @@ "fields": { "operator": "bb979661-0782-49b2-9c64-acd8424b692b", "point_of_contact": 1, - "name": "Kangaroo", + "name": "Kangaroo SFO - Draft", "type": "Single Facility Operation", "naics_code": 20, "status": "Draft", @@ -598,7 +600,7 @@ "fields": { "operator": "bb702949-e303-4788-9ba9-806232a5f711", "point_of_contact": 1, - "name": "Lion", + "name": "Lion SFO - Draft", "type": "Single Facility Operation", "naics_code": 20, "status": "Draft", @@ -611,7 +613,7 @@ "fields": { "operator": "a35fb5ad-edd9-4465-982e-81b824644d07", "point_of_contact": 1, - "name": "Monkey", + "name": "Monkey SFO - Draft", "type": "Single Facility Operation", "naics_code": 20, "status": "Draft", @@ -624,7 +626,7 @@ "fields": { "operator": "5c847c75-3b17-414c-97f8-88ba81cb3821", "point_of_contact": 1, - "name": "Narwhal", + "name": "Narwhal SFO - Draft", "type": "Single Facility Operation", "naics_code": 20, "status": "Draft", @@ -637,7 +639,7 @@ "fields": { "operator": "4a792f0f-cf9d-48c8-9a95-f504c5f84b12", "point_of_contact": 1, - "name": "Ostrich", + "name": "Ostrich SFO - Draft", "type": "Single Facility Operation", "naics_code": 20, "status": "Draft", From ea4bc9ff9997156d2c8dc9661219312106f32b21 Mon Sep 17 00:00:00 2001 From: fviduya Date: Mon, 13 Jan 2025 17:51:47 -0700 Subject: [PATCH 10/12] chore: implement code review changes --- .../mock/bc_obps_regulated_operation.json | 32 +-- .../registration/fixtures/mock/facility.json | 19 -- ...acility_designated_operation_timeline.json | 6 +- .../registration/fixtures/mock/operation.json | 67 +++-- ...peration_designated_operator_timeline.json | 244 +++++++++++------- bc_obps/registration/fixtures/mock/user.json | 86 +++--- .../fixtures/mock/user_operator.json | 28 +- 7 files changed, 288 insertions(+), 194 deletions(-) diff --git a/bc_obps/registration/fixtures/mock/bc_obps_regulated_operation.json b/bc_obps/registration/fixtures/mock/bc_obps_regulated_operation.json index 565757a1ba..9547bdcdcb 100644 --- a/bc_obps/registration/fixtures/mock/bc_obps_regulated_operation.json +++ b/bc_obps/registration/fixtures/mock/bc_obps_regulated_operation.json @@ -18,7 +18,7 @@ { "model": "registration.bcobpsregulatedoperation", "fields": { - "id": "21-0003", + "id": "24-0003", "issued_at": "2023-10-13T15:27:00.000Z", "comments": "Test comment" } @@ -26,7 +26,7 @@ { "model": "registration.bcobpsregulatedoperation", "fields": { - "id": "21-0004", + "id": "24-0004", "issued_at": "2023-10-13T15:27:00.000Z", "comments": "Test comment" } @@ -34,7 +34,7 @@ { "model": "registration.bcobpsregulatedoperation", "fields": { - "id": "21-0005", + "id": "24-0005", "issued_at": "2023-10-13T15:27:00.000Z", "comments": "Test comment" } @@ -42,7 +42,7 @@ { "model": "registration.bcobpsregulatedoperation", "fields": { - "id": "21-0006", + "id": "24-0006", "issued_at": "2023-10-13T15:27:00.000Z", "comments": "Test comment" } @@ -50,7 +50,7 @@ { "model": "registration.bcobpsregulatedoperation", "fields": { - "id": "21-0007", + "id": "24-0007", "issued_at": "2023-10-13T15:27:00.000Z", "comments": "Test comment" } @@ -58,7 +58,7 @@ { "model": "registration.bcobpsregulatedoperation", "fields": { - "id": "21-0008", + "id": "24-0008", "issued_at": "2023-10-13T15:27:00.000Z", "comments": "Test comment" } @@ -66,7 +66,7 @@ { "model": "registration.bcobpsregulatedoperation", "fields": { - "id": "21-0009", + "id": "24-0009", "issued_at": "2023-10-13T15:27:00.000Z", "comments": "Test comment" } @@ -74,7 +74,7 @@ { "model": "registration.bcobpsregulatedoperation", "fields": { - "id": "21-0010", + "id": "24-0010", "issued_at": "2023-10-13T15:27:00.000Z", "comments": "Test comment" } @@ -82,7 +82,7 @@ { "model": "registration.bcobpsregulatedoperation", "fields": { - "id": "21-0011", + "id": "24-0011", "issued_at": "2023-10-13T15:27:00.000Z", "comments": "Test comment" } @@ -90,7 +90,7 @@ { "model": "registration.bcobpsregulatedoperation", "fields": { - "id": "21-0012", + "id": "24-0012", "issued_at": "2023-10-13T15:27:00.000Z", "comments": "Test comment" } @@ -98,7 +98,7 @@ { "model": "registration.bcobpsregulatedoperation", "fields": { - "id": "21-0013", + "id": "24-0013", "issued_at": "2023-10-13T15:27:00.000Z", "comments": "Test comment" } @@ -106,7 +106,7 @@ { "model": "registration.bcobpsregulatedoperation", "fields": { - "id": "21-0014", + "id": "24-0014", "issued_at": "2023-10-13T15:27:00.000Z", "comments": "Test comment" } @@ -114,7 +114,7 @@ { "model": "registration.bcobpsregulatedoperation", "fields": { - "id": "21-0015", + "id": "24-0015", "issued_at": "2023-10-13T15:27:00.000Z", "comments": "Test comment" } @@ -122,7 +122,7 @@ { "model": "registration.bcobpsregulatedoperation", "fields": { - "id": "21-0016", + "id": "24-0016", "issued_at": "2023-10-13T15:27:00.000Z", "comments": "Test comment" } @@ -130,7 +130,7 @@ { "model": "registration.bcobpsregulatedoperation", "fields": { - "id": "21-0017", + "id": "24-0017", "issued_at": "2023-10-13T15:27:00.000Z", "comments": "Test comment" } @@ -138,7 +138,7 @@ { "model": "registration.bcobpsregulatedoperation", "fields": { - "id": "21-0018", + "id": "24-0018", "issued_at": "2023-10-13T15:27:00.000Z", "comments": "Test comment" } diff --git a/bc_obps/registration/fixtures/mock/facility.json b/bc_obps/registration/fixtures/mock/facility.json index 5705b9760a..25ee172f9d 100644 --- a/bc_obps/registration/fixtures/mock/facility.json +++ b/bc_obps/registration/fixtures/mock/facility.json @@ -342,7 +342,6 @@ "name": "Facility 25", "type": "Single Facility", "swrs_facility_id": 1025, - "bcghg_id": "13219990028", "latitude_of_largest_emissions": 43.5, "longitude_of_largest_emissions": -123.5 } @@ -356,7 +355,6 @@ "name": "Facility 26", "type": "Single Facility", "swrs_facility_id": 1026, - "bcghg_id": "13219990029", "latitude_of_largest_emissions": 43.5, "longitude_of_largest_emissions": -123.5 } @@ -370,7 +368,6 @@ "name": "Facility 27", "type": "Single Facility", "swrs_facility_id": 1027, - "bcghg_id": "13219990030", "latitude_of_largest_emissions": 43.5, "longitude_of_largest_emissions": -123.5 } @@ -384,7 +381,6 @@ "name": "Facility 28", "type": "Single Facility", "swrs_facility_id": 1028, - "bcghg_id": "13219990031", "latitude_of_largest_emissions": 43.5, "longitude_of_largest_emissions": -123.5 } @@ -398,7 +394,6 @@ "name": "Facility 29", "type": "Single Facility", "swrs_facility_id": 1029, - "bcghg_id": "13219990032", "latitude_of_largest_emissions": 43.5, "longitude_of_largest_emissions": -123.5 } @@ -412,7 +407,6 @@ "name": "Facility 30", "type": "Single Facility", "swrs_facility_id": 1030, - "bcghg_id": "13219990033", "latitude_of_largest_emissions": 43.5, "longitude_of_largest_emissions": -123.5 } @@ -426,7 +420,6 @@ "name": "Facility 31", "type": "Single Facility", "swrs_facility_id": 1031, - "bcghg_id": "13219990034", "latitude_of_largest_emissions": 43.5, "longitude_of_largest_emissions": -123.5 } @@ -440,7 +433,6 @@ "type": "Single Facility", "name": "Facility 32", "swrs_facility_id": 1032, - "bcghg_id": "13219990035", "latitude_of_largest_emissions": 43.5, "longitude_of_largest_emissions": -123.5 } @@ -454,7 +446,6 @@ "name": "Facility 33", "type": "Single Facility", "swrs_facility_id": 1033, - "bcghg_id": "13219990036", "latitude_of_largest_emissions": 43.5, "longitude_of_largest_emissions": -123.5 } @@ -468,7 +459,6 @@ "name": "Facility 34", "type": "Single Facility", "swrs_facility_id": 1034, - "bcghg_id": "13219990037", "latitude_of_largest_emissions": 43.5, "longitude_of_largest_emissions": -123.5 } @@ -482,7 +472,6 @@ "name": "Facility 35", "type": "Single Facility", "swrs_facility_id": 1035, - "bcghg_id": "13219990038", "latitude_of_largest_emissions": 43.5, "longitude_of_largest_emissions": -123.5 } @@ -496,7 +485,6 @@ "name": "Facility 36", "type": "Single Facility", "swrs_facility_id": 1036, - "bcghg_id": "13219990039", "latitude_of_largest_emissions": 43.5, "longitude_of_largest_emissions": -123.5 } @@ -510,7 +498,6 @@ "name": "Facility 37", "type": "Single Facility", "swrs_facility_id": 1037, - "bcghg_id": "13219990040", "latitude_of_largest_emissions": 43.5, "longitude_of_largest_emissions": -123.5 } @@ -524,7 +511,6 @@ "name": "Facility 38", "type": "Single Facility", "swrs_facility_id": 1038, - "bcghg_id": "13219990041", "latitude_of_largest_emissions": 43.5, "longitude_of_largest_emissions": -123.5 } @@ -538,7 +524,6 @@ "name": "Facility 39", "type": "Single Facility", "swrs_facility_id": 1039, - "bcghg_id": "13219990042", "latitude_of_largest_emissions": 43.5, "longitude_of_largest_emissions": -123.5 } @@ -552,7 +537,6 @@ "name": "Facility 40", "type": "Single Facility", "swrs_facility_id": 1040, - "bcghg_id": "13219990043", "latitude_of_largest_emissions": 43.5, "longitude_of_largest_emissions": -123.5 } @@ -566,7 +550,6 @@ "name": "Facility 41", "type": "Single Facility", "swrs_facility_id": 1041, - "bcghg_id": "13219990044", "latitude_of_largest_emissions": 43.5, "longitude_of_largest_emissions": -123.5 } @@ -580,7 +563,6 @@ "name": "Facility 42", "type": "Single Facility", "swrs_facility_id": 1042, - "bcghg_id": "13219990045", "latitude_of_largest_emissions": 43.5, "longitude_of_largest_emissions": -123.5 } @@ -594,7 +576,6 @@ "name": "Facility 43", "type": "Single Facility", "swrs_facility_id": 1043, - "bcghg_id": "13219990046", "latitude_of_largest_emissions": 43.5, "longitude_of_largest_emissions": -123.5 } diff --git a/bc_obps/registration/fixtures/mock/facility_designated_operation_timeline.json b/bc_obps/registration/fixtures/mock/facility_designated_operation_timeline.json index 178ec85e60..1abc40fba6 100644 --- a/bc_obps/registration/fixtures/mock/facility_designated_operation_timeline.json +++ b/bc_obps/registration/fixtures/mock/facility_designated_operation_timeline.json @@ -239,7 +239,7 @@ "created_by": "00000000-0000-0000-0000-000000000001", "created_at": "2024-06-20T23:20:02Z", "facility": "67fd8288-422b-43d3-a9b1-e4ddc54e2139", - "operation": "c0743c09-82fa-4186-91aa-4b5412e3415c", + "operation": "df62d793-8cfe-4272-a93e-ea9c9139ff82", "start_date": "2024-06-28T23:20:02Z" } }, @@ -256,7 +256,7 @@ { "model": "registration.facilitydesignatedoperationtimeline", "fields": { - "created_by": "00000000-0000-0000-0000-000000000001", + "created_by": "00000000-0000-0000-0000-000000000004", "created_at": "2024-06-20T23:20:02Z", "facility": "f4eb89dd-e081-4576-8663-b789c4a20478", "operation": "d99725a7-1c3a-47cb-a59b-e2388ce0fa18", @@ -266,7 +266,7 @@ { "model": "registration.facilitydesignatedoperationtimeline", "fields": { - "created_by": "00000000-0000-0000-0000-000000000001", + "created_by": "00000000-0000-0000-0000-000000000004", "created_at": "2024-06-20T23:20:02Z", "facility": "6d564423-abfe-4579-ba92-2c6c71c37bb9", "operation": "436dd99a-cb41-4494-91c9-98ab149b557d", diff --git a/bc_obps/registration/fixtures/mock/operation.json b/bc_obps/registration/fixtures/mock/operation.json index a52769e976..f8140d2c1e 100644 --- a/bc_obps/registration/fixtures/mock/operation.json +++ b/bc_obps/registration/fixtures/mock/operation.json @@ -11,7 +11,7 @@ "naics_code": 19, "swrs_facility_id": 1001, "status": "Registered", - "bc_obps_regulated_operation": "21-0014", + "bc_obps_regulated_operation": "24-0014", "created_at": "2024-2-01T15:27:00.000Z", "activities": [1, 5], "registration_purpose": "Reporting Operation" @@ -31,7 +31,26 @@ "bcghg_id": "23219990004", "regulated_products": [1], "status": "Registered", - "bc_obps_regulated_operation": "21-0015", + "bc_obps_regulated_operation": "24-0015", + "created_at": "2024-2-02T15:27:00.000Z", + "activities": [1, 5], + "contacts": [10], + "registration_purpose": "OBPS Regulated Operation" + } + }, + { + "model": "registration.operation", + "pk": "556ceeb0-7e24-4d89-b639-61f625f82084", + "fields": { + "point_of_contact": 1, + "operator": "4242ea9d-b917-4129-93c2-db00b7451051", + "documents": [], + "name": "Charlie LFO - Draft -- no facility", + "type": "Linear Facility Operation", + "naics_code": 20, + "opt_in": false, + "regulated_products": [1], + "status": "Draft", "created_at": "2024-2-02T15:27:00.000Z", "activities": [1, 5], "contacts": [10], @@ -98,7 +117,7 @@ "regulated_products": [1, 2], "registration_purpose": "OBPS Regulated Operation", "status": "Registered", - "bc_obps_regulated_operation": "21-0003", + "bc_obps_regulated_operation": "24-0003", "created_at": "2024-1-29T15:27:00.000Z", "activities": [1, 5], "operation_has_multiple_operators": true @@ -119,7 +138,7 @@ "bcghg_id": "23219999999", "regulated_products": [1], "status": "Registered", - "bc_obps_regulated_operation": "21-0004", + "bc_obps_regulated_operation": "24-0004", "created_at": "2024-1-28T15:27:00.000Z", "activities": [1, 5], "registration_purpose": "Opted-in Operation" @@ -139,7 +158,7 @@ "opt_in": false, "bcghg_id": "23219990006", "status": "Registered", - "bc_obps_regulated_operation": "21-0005", + "bc_obps_regulated_operation": "24-0005", "created_at": "2024-1-27T15:27:00.000Z", "activities": [1, 5], "registration_purpose": "Potential Reporting Operation" @@ -159,7 +178,7 @@ "opt_in": false, "bcghg_id": "23219990007", "status": "Registered", - "bc_obps_regulated_operation": "21-0006", + "bc_obps_regulated_operation": "24-0006", "created_at": "2024-1-26T15:27:00.000Z", "activities": [1, 5], "registration_purpose": "Electricity Import Operation" @@ -180,7 +199,7 @@ "bcghg_id": "23219990008", "regulated_products": [2], "status": "Registered", - "bc_obps_regulated_operation": "21-0007", + "bc_obps_regulated_operation": "24-0007", "created_at": "2024-1-25T15:27:00.000Z", "activities": [1, 5], "registration_purpose": "New Entrant Operation" @@ -198,9 +217,8 @@ "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, - "bcghg_id": "23219990009", "status": "Registered", - "bc_obps_regulated_operation": "21-0008", + "bc_obps_regulated_operation": "24-0008", "created_at": "2024-1-24T15:27:00.000Z", "activities": [1, 5], "registration_purpose": "Reporting Operation" @@ -221,7 +239,7 @@ "bcghg_id": "23219990010", "regulated_products": [3], "status": "Registered", - "bc_obps_regulated_operation": "21-0009", + "bc_obps_regulated_operation": "24-0009", "created_at": "2024-1-23T15:27:00.000Z", "activities": [1, 5], "registration_purpose": "OBPS Regulated Operation" @@ -241,7 +259,7 @@ "opt_in": false, "bcghg_id": "23219990011", "status": "Registered", - "bc_obps_regulated_operation": "21-0010", + "bc_obps_regulated_operation": "24-0010", "created_at": "2024-1-22T15:27:00.000Z", "activities": [1, 5], "registration_purpose": "Reporting Operation" @@ -259,10 +277,9 @@ "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, - "bcghg_id": "23219990012", "regulated_products": [3, 4], "status": "Registered", - "bc_obps_regulated_operation": "21-0011", + "bc_obps_regulated_operation": "24-0011", "created_at": "2024-1-21T15:27:00.000Z", "activities": [1, 5], "registration_purpose": "OBPS Regulated Operation" @@ -276,13 +293,13 @@ "operator": "4242ea9d-b917-4129-93c2-db00b7451051", "documents": [], "submission_date": "2024-01-22T15:27:00.000Z", - "name": "Bojangles SFO - Transferred", + "name": "Bojangles SFO - Not Started", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, "bcghg_id": "23219990013", "created_at": "2024-1-20T15:27:00.000Z", - "status": "Transferred", + "status": "Not Started", "registration_purpose": "Electricity Import Operation" } }, @@ -294,13 +311,13 @@ "operator": "4242ea9d-b917-4129-93c2-db00b7451051", "documents": [], "submission_date": "2024-01-23T15:27:00.000Z", - "name": "Brine SFO - Closed", + "name": "Brine SFO - Not Started", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, "bcghg_id": "23219990014", "regulated_products": [3], - "status": "Closed", + "status": "Not Started", "created_at": "2024-1-19T15:27:00.000Z", "activities": [1, 5], "registration_purpose": "OBPS Regulated Operation" @@ -314,12 +331,12 @@ "operator": "4242ea9d-b917-4129-93c2-db00b7451051", "documents": [], "submission_date": "2024-01-24T15:27:00.000Z", - "name": "Bling SFO - Temp Shutdown", + "name": "Bling SFO - Draft", "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, "bcghg_id": "23219990015", - "status": "Temporarily Shutdown", + "status": "Draft", "created_at": "2024-1-18T15:27:00.000Z", "activities": [1, 5], "registration_purpose": "Potential Reporting Operation" @@ -340,7 +357,7 @@ "bcghg_id": "23219990016", "regulated_products": [5], "status": "Registered", - "bc_obps_regulated_operation": "21-0012", + "bc_obps_regulated_operation": "24-0012", "created_at": "2024-1-17T15:27:00.000Z", "activities": [1, 5], "registration_purpose": "OBPS Regulated Operation" @@ -379,7 +396,7 @@ "bcghg_id": "23219990018", "regulated_products": [3], "status": "Registered", - "bc_obps_regulated_operation": "21-0013", + "bc_obps_regulated_operation": "24-0013", "registration_purpose": "New Entrant Operation", "created_at": "2024-1-15T15:27:00.000Z", "activities": [1, 3] @@ -399,7 +416,7 @@ "opt_in": false, "bcghg_id": "23219990019", "status": "Registered", - "bc_obps_regulated_operation": "21-0016", + "bc_obps_regulated_operation": "24-0016", "created_at": "2024-1-14T15:27:00.000Z", "registration_purpose": "Reporting Operation", "activities": [1, 5] @@ -418,7 +435,7 @@ "opt_in": false, "bcghg_id": "23219990020", "status": "Registered", - "bc_obps_regulated_operation": "21-0017", + "bc_obps_regulated_operation": "24-0017", "created_at": "2024-1-13T15:27:00.000Z", "registration_purpose": "Reporting Operation", "activities": [1, 5] @@ -437,7 +454,7 @@ "opt_in": false, "bcghg_id": "23219990021", "status": "Registered", - "bc_obps_regulated_operation": "21-0018", + "bc_obps_regulated_operation": "24-0018", "created_at": "2024-1-12T15:27:00.000Z", "registration_purpose": "Reporting Operation", "activities": [1, 5] @@ -454,7 +471,6 @@ "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, - "bcghg_id": "23219990022", "status": "Draft", "created_at": "2024-1-11T15:27:00.000Z", "activities": [1, 5] @@ -471,7 +487,6 @@ "type": "Single Facility Operation", "naics_code": 21, "opt_in": false, - "bcghg_id": "23219990023", "status": "Draft", "created_at": "2024-1-10T15:27:00.000Z", "activities": [1, 3] diff --git a/bc_obps/registration/fixtures/mock/operation_designated_operator_timeline.json b/bc_obps/registration/fixtures/mock/operation_designated_operator_timeline.json index 30aadb552c..d02902790d 100644 --- a/bc_obps/registration/fixtures/mock/operation_designated_operator_timeline.json +++ b/bc_obps/registration/fixtures/mock/operation_designated_operator_timeline.json @@ -4,10 +4,11 @@ "fields": { "operation": "e1300fd7-2dee-47d1-b655-2ad3fd10f052", "operator": "685d581b-5698-411f-ae00-de1d97334a71", - "created_at": "2024-2-01T15:27:00.000Z", - "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", - "start_date": "2024-12-06T21:09:07Z", - "status": "Active" + "created_by": "00000000-0000-0000-0000-000000000004", + "created_at": "2024-06-05T23:21:02.353Z", + "start_date": "2024-06-05T23:20:57Z", + "end_date": "2024-06-28T23:21:01Z", + "status": "Closed" } }, { @@ -15,9 +16,9 @@ "fields": { "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", "operator": "4242ea9d-b917-4129-93c2-db00b7451051", - "created_at": "2024-2-02T15:27:00.000Z", - "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", - "start_date": "2024-12-06T21:09:07Z", + "created_by": "00000000-0000-0000-0000-000000000004", + "created_at": "2024-06-05T23:21:02.353Z", + "start_date": "2024-06-05T23:20:57Z", "status": "Active" } }, @@ -26,9 +27,9 @@ "fields": { "operation": "3b5b95ea-2a1a-450d-8e2e-2e15feed96c9", "operator": "4242ea9d-b917-4129-93c2-db00b7451051", - "created_at": "2024-1-31T15:27:00.000Z", - "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", - "start_date": "2024-12-06T21:09:07Z", + "created_by": "00000000-0000-0000-0000-000000000004", + "created_at": "2024-06-05T23:21:02.353Z", + "start_date": "2024-06-05T23:20:57Z", "status": "Active" } }, @@ -37,9 +38,9 @@ "fields": { "operation": "c0743c09-82fa-4186-91aa-4b5412e3415c", "operator": "685d581b-5698-411f-ae00-de1d97334a71", - "created_at": "2024-1-30T15:27:00.000Z", - "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", - "start_date": "2024-12-06T21:09:07Z", + "created_by": "00000000-0000-0000-0000-000000000004", + "created_at": "2024-06-05T23:21:02.353Z", + "start_date": "2024-06-05T23:20:57Z", "status": "Active" } }, @@ -48,21 +49,20 @@ "fields": { "operation": "b65a3fbc-c81a-49c0-a43a-67bd3a0b488e", "operator": "4242ea9d-b917-4129-93c2-db00b7451051", - "created_at": "2024-1-29T15:27:00.000Z", - "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", - "start_date": "2024-12-06T21:09:07Z", + "created_by": "00000000-0000-0000-0000-000000000004", + "created_at": "2024-06-05T23:21:02.353Z", + "start_date": "2024-06-05T23:20:57Z", "status": "Active" } }, { "model": "registration.operationdesignatedoperatortimeline", - "fields": { "operation": "d99725a7-1c3a-47cb-a59b-e2388ce0fa18", "operator": "685d581b-5698-411f-ae00-de1d97334a71", - "created_at": "2024-1-28T15:27:00.000Z", - "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", - "start_date": "2024-12-06T21:09:07Z", + "created_by": "00000000-0000-0000-0000-000000000004", + "created_at": "2024-06-05T23:21:02.353Z", + "start_date": "2024-06-05T23:20:57Z", "status": "Active" } }, @@ -71,9 +71,9 @@ "fields": { "operation": "436dd99a-cb41-4494-91c9-98ab149b557d", "operator": "685d581b-5698-411f-ae00-de1d97334a71", - "created_at": "2024-1-27T15:27:00.000Z", - "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", - "start_date": "2024-12-06T21:09:07Z", + "created_by": "00000000-0000-0000-0000-000000000004", + "created_at": "2024-06-05T23:21:02.353Z", + "start_date": "2024-06-05T23:20:57Z", "status": "Active" } }, @@ -82,21 +82,20 @@ "fields": { "operation": "a47b5fb6-1e10-401a-b70e-574bd925db99", "operator": "685d581b-5698-411f-ae00-de1d97334a71", - "created_at": "2024-1-26T15:27:00.000Z", - "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", - "start_date": "2024-12-06T21:09:07Z", + "created_by": "00000000-0000-0000-0000-000000000004", + "created_at": "2024-06-05T23:21:02.353Z", + "start_date": "2024-06-05T23:20:57Z", "status": "Active" } }, { "model": "registration.operationdesignatedoperatortimeline", - "fields": { "operation": "21e70498-c4b0-4525-8443-86faa96206e3", "operator": "685d581b-5698-411f-ae00-de1d97334a71", - "created_at": "2024-1-25T15:27:00.000Z", - "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", - "start_date": "2024-12-06T21:09:07Z", + "created_by": "00000000-0000-0000-0000-000000000004", + "created_at": "2024-06-05T23:21:02.353Z", + "start_date": "2024-06-05T23:20:57Z", "status": "Active" } }, @@ -105,9 +104,9 @@ "fields": { "operation": "17550cd8-3e73-4e52-aa91-ab90cb3b62b0", "operator": "685d581b-5698-411f-ae00-de1d97334a71", - "created_at": "2024-1-24T15:27:00.000Z", - "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", - "start_date": "2024-12-06T21:09:07Z", + "created_by": "00000000-0000-0000-0000-000000000004", + "created_at": "2024-06-05T23:21:02.353Z", + "start_date": "2024-06-05T23:20:57Z", "status": "Active" } }, @@ -116,9 +115,9 @@ "fields": { "operation": "7d3fc7d1-0504-4ee4-a9c5-447f4b324b57", "operator": "685d581b-5698-411f-ae00-de1d97334a71", - "created_at": "2024-1-23T15:27:00.000Z", - "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", - "start_date": "2024-12-06T21:09:07Z", + "created_by": "00000000-0000-0000-0000-000000000004", + "created_at": "2024-06-05T23:21:02.353Z", + "start_date": "2024-06-05T23:20:57Z", "status": "Active" } }, @@ -127,9 +126,9 @@ "fields": { "operation": "acf5811e-d521-43f7-a5c7-a6d6dd47bb31", "operator": "685d581b-5698-411f-ae00-de1d97334a71", - "created_at": "2024-1-22T15:27:00.000Z", - "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", - "start_date": "2024-12-06T21:09:07Z", + "created_by": "00000000-0000-0000-0000-000000000004", + "created_at": "2024-06-05T23:21:02.353Z", + "start_date": "2024-06-05T23:20:57Z", "status": "Active" } }, @@ -138,9 +137,9 @@ "fields": { "operation": "8563da83-0762-4d29-9b22-da5b52ef0f24", "operator": "685d581b-5698-411f-ae00-de1d97334a71", - "created_at": "2024-1-21T15:27:00.000Z", - "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", - "start_date": "2024-12-06T21:09:07Z", + "created_by": "00000000-0000-0000-0000-000000000004", + "created_at": "2024-06-05T23:21:02.353Z", + "start_date": "2024-06-05T23:20:57Z", "status": "Active" } }, @@ -149,9 +148,9 @@ "fields": { "operation": "df62d793-8cfe-4272-a93e-ea9c9139ff82", "operator": "4242ea9d-b917-4129-93c2-db00b7451051", - "created_at": "2024-1-20T15:27:00.000Z", - "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", - "start_date": "2024-12-06T21:09:07Z", + "created_by": "00000000-0000-0000-0000-000000000001", + "created_at": "2024-06-05T23:21:02.353Z", + "start_date": "2024-06-05T23:20:57Z", "status": "Active" } }, @@ -160,9 +159,9 @@ "fields": { "operation": "c5b3643b-c143-42f3-8a2b-03ccc7319cd9", "operator": "4242ea9d-b917-4129-93c2-db00b7451051", - "created_at": "2024-1-19T15:27:00.000Z", - "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", - "start_date": "2024-12-06T21:09:07Z", + "created_by": "00000000-0000-0000-0000-000000000004", + "created_at": "2024-06-05T23:21:02.353Z", + "start_date": "2024-06-05T23:20:57Z", "status": "Active" } }, @@ -171,9 +170,9 @@ "fields": { "operation": "954c0382-ff61-4e87-a8a0-873586534b54", "operator": "4242ea9d-b917-4129-93c2-db00b7451051", - "created_at": "2024-1-18T15:27:00.000Z", - "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", - "start_date": "2024-12-06T21:09:07Z", + "created_by": "00000000-0000-0000-0000-000000000004", + "created_at": "2024-06-05T23:21:02.353Z", + "start_date": "2024-06-05T23:20:57Z", "status": "Active" } }, @@ -182,9 +181,9 @@ "fields": { "operation": "6d07d02a-1ad2-46ed-ad56-2f84313e98bf", "operator": "4242ea9d-b917-4129-93c2-db00b7451051", - "created_at": "2024-1-17T15:27:00.000Z", - "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", - "start_date": "2024-12-06T21:09:07Z", + "created_by": "00000000-0000-0000-0000-000000000004", + "created_at": "2024-06-05T23:21:02.353Z", + "start_date": "2024-06-05T23:20:57Z", "status": "Active" } }, @@ -193,9 +192,9 @@ "fields": { "operation": "59d95661-c752-489b-9fd1-0c3fa3454dda", "operator": "4242ea9d-b917-4129-93c2-db00b7451051", - "created_at": "2024-1-16T15:27:00.000Z", - "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", - "start_date": "2024-12-06T21:09:07Z", + "created_by": "00000000-0000-0000-0000-000000000004", + "created_at": "2024-06-05T23:21:02.353Z", + "start_date": "2024-06-05T23:20:57Z", "status": "Active" } }, @@ -204,9 +203,9 @@ "fields": { "operation": "1bd04128-d070-4d3a-940a-0874c4956181", "operator": "4242ea9d-b917-4129-93c2-db00b7451051", - "created_at": "2024-1-15T15:27:00.000Z", - "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", - "start_date": "2024-12-06T21:09:07Z", + "created_by": "00000000-0000-0000-0000-000000000004", + "created_at": "2024-06-05T23:21:02.353Z", + "start_date": "2024-06-05T23:20:57Z", "status": "Active" } }, @@ -215,9 +214,9 @@ "fields": { "operation": "17f13f4d-29b4-45f4-b025-b21f2e126771", "operator": "4242ea9d-b917-4129-93c2-db00b7451051", - "created_at": "2024-1-14T15:27:00.000Z", - "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", - "start_date": "2024-12-06T21:09:07Z", + "created_by": "00000000-0000-0000-0000-000000000004", + "created_at": "2024-06-05T23:21:02.353Z", + "start_date": "2024-06-05T23:20:57Z", "status": "Active" } }, @@ -226,9 +225,9 @@ "fields": { "operation": "ef9044dd-2a27-4d26-86fe-02e51e0755f7", "operator": "4242ea9d-b917-4129-93c2-db00b7451051", - "created_at": "2024-1-13T15:27:00.000Z", - "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", - "start_date": "2024-12-06T21:09:07Z", + "created_by": "00000000-0000-0000-0000-000000000004", + "created_at": "2024-06-05T23:21:02.353Z", + "start_date": "2024-06-05T23:20:57Z", "status": "Active" } }, @@ -237,9 +236,9 @@ "fields": { "operation": "aeeb781e-a97b-4ab2-9a6e-02e4522add1a", "operator": "4242ea9d-b917-4129-93c2-db00b7451051", - "created_at": "2024-1-12T15:27:00.000Z", - "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", - "start_date": "2024-12-06T21:09:07Z", + "created_by": "00000000-0000-0000-0000-000000000004", + "created_at": "2024-06-05T23:21:02.353Z", + "start_date": "2024-06-05T23:20:57Z", "status": "Active" } }, @@ -248,9 +247,9 @@ "fields": { "operation": "02a3ab84-26c6-4a79-bf89-72f877ceef8e", "operator": "4242ea9d-b917-4129-93c2-db00b7451051", - "created_at": "2024-1-11T15:27:00.000Z", - "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", - "start_date": "2024-12-06T21:09:07Z", + "created_by": "00000000-0000-0000-0000-000000000004", + "created_at": "2024-06-05T23:21:02.353Z", + "start_date": "2024-06-05T23:20:57Z", "status": "Active" } }, @@ -259,9 +258,32 @@ "fields": { "operation": "0ac72fa9-2636-4f54-b378-af6b1a070787", "operator": "4242ea9d-b917-4129-93c2-db00b7451051", - "created_at": "2024-1-10T15:27:00.000Z", - "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", - "start_date": "2024-12-06T21:09:07Z", + "created_by": "00000000-0000-0000-0000-000000000004", + "created_at": "2024-06-05T23:21:02.353Z", + "start_date": "2024-06-05T23:20:57Z", + "status": "Active" + } + }, + { + "model": "registration.operationdesignatedoperatortimeline", + "fields": { + "operation": "0ac72fa9-2636-4f54-b378-af6b1a070787", + "operator": "685d581b-5698-411f-ae00-de1d97334a71", + "created_by": "00000000-0000-0000-0000-000000000004", + "created_at": "2024-06-05T23:21:02.353Z", + "start_date": "2024-06-05T23:20:57Z", + "end_date": "2024-06-05T23:20:57Z", + "status": "Transferred" + } + }, + { + "model": "registration.operationdesignatedoperatortimeline", + "fields": { + "operation": "556ceeb0-7e24-4d89-b639-61f625f82084", + "operator": "4242ea9d-b917-4129-93c2-db00b7451051", + "created_by": "00000000-0000-0000-0000-000000000004", + "created_at": "2024-06-05T23:21:02.353Z", + "start_date": "2024-06-05T23:20:57Z", "status": "Active" } }, @@ -270,8 +292,10 @@ "fields": { "operation": "b35a2095-80e6-4b75-990e-ccf19a57edfa", "operator": "438eff6c-d2e7-40ab-8220-29d3a86ef314", - "status": "Active", - "start_date": "2024-12-06T21:09:07Z" + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:21:02.353Z", + "start_date": "2024-06-05T23:21:02.353Z", + "status": "Active" } }, { @@ -279,8 +303,10 @@ "fields": { "operation": "1d59cb82-2776-4785-a8f7-4b13bc9b4579", "operator": "7e8b72dc-4196-427f-a553-7879748139e1", - "status": "Active", - "start_date": "2024-12-06T21:09:07Z" + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:21:02.353Z", + "start_date": "2024-06-05T23:21:02.353Z", + "status": "Active" } }, { @@ -288,8 +314,10 @@ "fields": { "operation": "82e6ac8f-42f2-42a7-b179-132a3488b2e1", "operator": "4c1010c1-55ca-485d-84bd-6d975fd0af90", - "status": "Active", - "start_date": "2024-12-06T21:09:07Z" + "created_by": "00000000-0000-0000-0000-000000000002", + "created_at": "2024-12-06T21:09:07Z", + "start_date": "2024-12-06T21:09:07Z", + "status": "Active" } }, { @@ -297,8 +325,10 @@ "fields": { "operation": "95f6ec29-4b5b-42a2-9759-d4e9c99738d7", "operator": "5712ee05-5f3b-4822-825d-6fffddafda4c", - "status": "Active", - "start_date": "2024-12-06T21:09:07Z" + "created_by": "00000000-0000-0000-0000-000000000007", + "created_at": "2024-12-06T21:09:07Z", + "start_date": "2024-12-06T21:09:07Z", + "status": "Active" } }, { @@ -306,8 +336,10 @@ "fields": { "operation": "1b21579c-87f9-452f-b9c1-c784cb96f62e", "operator": "edb1aff1-f888-4199-ab88-068364496347", - "status": "Active", - "start_date": "2024-12-06T21:09:07Z" + "created_by": "00000000-0000-0000-0000-000000000025", + "created_at": "2024-12-06T21:09:07Z", + "start_date": "2024-12-06T21:09:07Z", + "status": "Active" } }, { @@ -315,8 +347,10 @@ "fields": { "operation": "4623c545-ef99-464a-bd8b-bb96ffb57e8e", "operator": "ea4314ea-1974-465a-a851-278c8f9c8daa", - "status": "Active", - "start_date": "2024-12-06T21:09:07Z" + "created_by": "00000000-0000-0000-0000-000000000008", + "created_at": "2024-12-06T21:09:07Z", + "start_date": "2024-12-06T21:09:07Z", + "status": "Active" } }, { @@ -324,8 +358,10 @@ "fields": { "operation": "f82c2a59-0f3a-4a89-b7d7-9fcd7a7ecb77", "operator": "04384911-264a-4510-b582-11ee704b8e41", - "status": "Active", - "start_date": "2024-12-06T21:09:07Z" + "created_by": "00000000-0000-0000-0000-000000000006", + "created_at": "2024-12-06T21:09:07Z", + "start_date": "2024-12-06T21:09:07Z", + "status": "Active" } }, { @@ -333,8 +369,10 @@ "fields": { "operation": "3182c8a4-22ff-4ca9-9f91-093c8888fd7c", "operator": "f209ef09-dfe6-42a1-ac4c-7689897f1b51", - "status": "Active", - "start_date": "2024-12-06T21:09:07Z" + "created_by": "00000000-0000-0000-0000-000000000011", + "created_at": "2024-12-06T21:09:07Z", + "start_date": "2024-12-06T21:09:07Z", + "status": "Active" } }, { @@ -342,8 +380,10 @@ "fields": { "operation": "68f0b68a-c6b5-4c4e-82a6-d7fbd690f55e", "operator": "bb979661-0782-49b2-9c64-acd8424b692b", - "status": "Active", - "start_date": "2024-12-06T21:09:07Z" + "created_by": "00000000-0000-0000-0000-000000000012", + "created_at": "2024-12-06T21:09:07Z", + "start_date": "2024-12-06T21:09:07Z", + "status": "Active" } }, { @@ -351,8 +391,10 @@ "fields": { "operation": "a5f7f5b3-fb56-4377-ae6c-b11c8b6d0041", "operator": "bb702949-e303-4788-9ba9-806232a5f711", - "status": "Active", - "start_date": "2024-12-06T21:09:07Z" + "created_by": "00000000-0000-0000-0000-000000000013", + "created_at": "2024-12-06T21:09:07Z", + "start_date": "2024-12-06T21:09:07Z", + "status": "Active" } }, { @@ -360,8 +402,10 @@ "fields": { "operation": "8494e89c-489b-441b-a05d-e935b1d82487", "operator": "a35fb5ad-edd9-4465-982e-81b824644d07", - "status": "Active", - "start_date": "2024-12-06T21:09:07Z" + "created_by": "00000000-0000-0000-0000-000000000018", + "created_at": "2024-12-06T21:09:07Z", + "start_date": "2024-12-06T21:09:07Z", + "status": "Active" } }, { @@ -378,8 +422,10 @@ "fields": { "operation": "62d5d8ea-b163-4a83-95a4-bfadbb6b21f7", "operator": "4a792f0f-cf9d-48c8-9a95-f504c5f84b12", - "status": "Active", - "start_date": "2024-12-06T21:09:07Z" + "created_by": "00000000-0000-0000-0000-000000000026", + "created_at": "2024-12-06T21:09:07Z", + "start_date": "2024-12-06T21:09:07Z", + "status": "Active" } } ] diff --git a/bc_obps/registration/fixtures/mock/user.json b/bc_obps/registration/fixtures/mock/user.json index 1381433eb4..dd32437529 100644 --- a/bc_obps/registration/fixtures/mock/user.json +++ b/bc_obps/registration/fixtures/mock/user.json @@ -4,7 +4,7 @@ "fields": { "user_guid": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", - "bceid_business_name": "New Operator 3 Legal Name", + "bceid_business_name": "Charlie Solutions", "first_name": "Michael", "last_name": "Johnson", "position_title": "Manager", @@ -18,7 +18,7 @@ "fields": { "user_guid": "00000000-0000-0000-0000-000000000001", "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", - "bceid_business_name": "Existing Operator 2 Legal Name", + "bceid_business_name": "Bravo Technologies - has parTNER operator", "first_name": "Samantha", "last_name": "Garcia", "position_title": "CEO", @@ -46,7 +46,7 @@ "fields": { "user_guid": "ba2ba62a121842e0942aab9e92ce8822", "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", - "bceid_business_name": "Existing Operator 2 Legal Name", + "bceid_business_name": "Bravo Technologies - has parTNER operator", "first_name": "bc-cas-dev", "last_name": "Industry User", "position_title": "Code Monkey", @@ -60,7 +60,7 @@ "fields": { "user_guid": "279c80cf57814c28872740a133d17c0d", "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", - "bceid_business_name": "Example Business", + "bceid_business_name": "Bravo Technologies - has parTNER operator", "first_name": "bc-cas-dev-secondary", "last_name": "Industry User", "position_title": "Code Monkey", @@ -74,7 +74,7 @@ "fields": { "user_guid": "00000000-0000-0000-0000-000000000002", "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", - "bceid_business_name": "New Operator 5 Legal Name", + "bceid_business_name": "Echo Systems", "first_name": "Jack", "last_name": "Sparrow", "position_title": "Captain", @@ -88,7 +88,7 @@ "fields": { "user_guid": "00000000-0000-0000-0000-000000000003", "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", - "bceid_business_name": "Example Business", + "bceid_business_name": "Golf Solutions", "first_name": "User", "last_name": "3", "position_title": "Code Monkey", @@ -102,7 +102,7 @@ "fields": { "user_guid": "00000000-0000-0000-0000-000000000004", "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", - "bceid_business_name": "Example Business", + "bceid_business_name": "Alpha Enterprises", "first_name": "User", "last_name": "4", "position_title": "Code Monkey", @@ -116,7 +116,7 @@ "fields": { "user_guid": "00000000-0000-0000-0000-000000000005", "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", - "bceid_business_name": "Example Business", + "bceid_business_name": "Bravo Technologies - has parTNER operator", "first_name": "User", "last_name": "5", "position_title": "Code Monkey", @@ -130,7 +130,7 @@ "fields": { "user_guid": "00000000-0000-0000-0000-000000000006", "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", - "bceid_business_name": "Example Business", + "bceid_business_name": "India Innovations", "first_name": "User", "last_name": "6", "position_title": "Code Monkey", @@ -144,7 +144,7 @@ "fields": { "user_guid": "00000000-0000-0000-0000-000000000007", "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", - "bceid_business_name": "Example Business", + "bceid_business_name": "Foxtrot Enterprises - has parENT operator", "first_name": "User", "last_name": "7", "position_title": "Code Monkey", @@ -158,7 +158,7 @@ "fields": { "user_guid": "00000000-0000-0000-0000-000000000008", "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", - "bceid_business_name": "Example Business", + "bceid_business_name": "Hotel Ventures", "first_name": "User", "last_name": "8", "position_title": "Code Monkey", @@ -172,7 +172,7 @@ "fields": { "user_guid": "00000000-0000-0000-0000-000000000009", "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", - "bceid_business_name": "Example Business", + "bceid_business_name": "Alpha Enterprises", "first_name": "User", "last_name": "9", "position_title": "Code Monkey", @@ -186,7 +186,7 @@ "fields": { "user_guid": "00000000-0000-0000-0000-000000000010", "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", - "bceid_business_name": "Example Business", + "bceid_business_name": "Bravo Technologies - has parTNER operator", "first_name": "User", "last_name": "10", "position_title": "Code Monkey", @@ -200,7 +200,7 @@ "fields": { "user_guid": "00000000-0000-0000-0000-000000000011", "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", - "bceid_business_name": "Example Business", + "bceid_business_name": "Juliet Enterprises", "first_name": "User", "last_name": "11", "position_title": "Code Monkey", @@ -214,7 +214,7 @@ "fields": { "user_guid": "00000000-0000-0000-0000-000000000012", "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", - "bceid_business_name": "Example Business", + "bceid_business_name": "Kilo Logistics", "first_name": "User", "last_name": "12", "position_title": "Code Monkey", @@ -228,7 +228,7 @@ "fields": { "user_guid": "00000000-0000-0000-0000-000000000013", "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", - "bceid_business_name": "Example Business", + "bceid_business_name": "Lima Enterprises", "first_name": "User", "last_name": "10", "position_title": "Code Monkey", @@ -242,7 +242,7 @@ "fields": { "user_guid": "00000000-0000-0000-0000-000000000014", "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", - "bceid_business_name": "Example Business", + "bceid_business_name": "Foxtrot Enterprises - has parENT operator", "first_name": "User", "last_name": "14", "position_title": "Code Monkey", @@ -256,7 +256,7 @@ "fields": { "user_guid": "00000000-0000-0000-0000-000000000015", "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", - "bceid_business_name": "Example Business", + "bceid_business_name": "Foxtrot Enterprises - has parENT operator", "first_name": "User", "last_name": "15", "position_title": "Code Monkey", @@ -270,7 +270,7 @@ "fields": { "user_guid": "00000000-0000-0000-0000-000000000016", "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", - "bceid_business_name": "Example Business", + "bceid_business_name": "Alpha Enterprises", "first_name": "User", "last_name": "16", "position_title": "Code Monkey", @@ -284,7 +284,7 @@ "fields": { "user_guid": "00000000-0000-0000-0000-000000000017", "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", - "bceid_business_name": "Example Business", + "bceid_business_name": "Bravo Technologies - has parTNER operator", "first_name": "User", "last_name": "17", "position_title": "Code Monkey", @@ -298,7 +298,7 @@ "fields": { "user_guid": "00000000-0000-0000-0000-000000000018", "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", - "bceid_business_name": "Example Business", + "bceid_business_name": "Mike Ventures", "first_name": "User", "last_name": "18", "position_title": "Code Monkey", @@ -312,7 +312,7 @@ "fields": { "user_guid": "00000000-0000-0000-0000-000000000019", "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", - "bceid_business_name": "Example Business", + "bceid_business_name": "Bravo Technologies - has parTNER operator", "first_name": "User", "last_name": "19", "position_title": "Code Monkey", @@ -326,7 +326,7 @@ "fields": { "user_guid": "00000000-0000-0000-0000-000000000020", "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", - "bceid_business_name": "Example Business", + "bceid_business_name": "Hotel Ventures", "first_name": "User", "last_name": "20", "position_title": "Code Monkey", @@ -340,7 +340,7 @@ "fields": { "user_guid": "00000000-0000-0000-0000-000000000021", "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", - "bceid_business_name": "Example Business", + "bceid_business_name": "Foxtrot Enterprises - has parENT operator", "first_name": "User", "last_name": "21", "position_title": "Code Monkey", @@ -354,7 +354,7 @@ "fields": { "user_guid": "00000000-0000-0000-0000-000000000022", "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", - "bceid_business_name": "Example Business", + "bceid_business_name": "Alpha Enterprises", "first_name": "User", "last_name": "22", "position_title": "Code Monkey", @@ -368,7 +368,7 @@ "fields": { "user_guid": "00000000-0000-0000-0000-000000000023", "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", - "bceid_business_name": "Example Business", + "bceid_business_name": "Bravo Technologies - has parTNER operator", "first_name": "User", "last_name": "23", "position_title": "Code Monkey", @@ -382,7 +382,7 @@ "fields": { "user_guid": "00000000-0000-0000-0000-000000000024", "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", - "bceid_business_name": "Example Business", + "bceid_business_name": "Foxtrot Enterprises - has parENT operator", "first_name": "User", "last_name": "24", "position_title": "Code Monkey", @@ -396,7 +396,7 @@ "fields": { "user_guid": "00000000-0000-0000-0000-000000000025", "business_guid": "b3e3e3e3-88b7-4eb6-9f26-ec12b49c14c1", - "bceid_business_name": "Example Business", + "bceid_business_name": "Golf Solutions", "first_name": "User 25", "last_name": "25", "position_title": "Code Monkey", @@ -410,7 +410,7 @@ "fields": { "user_guid": "00000000-0000-0000-0000-000000000026", "business_guid": "b6e6e6e6-88b7-4eb6-9f26-ec12b49c14c1", - "bceid_business_name": "Example Business", + "bceid_business_name": "Oscar Enterprises", "first_name": "User 26", "last_name": "26", "position_title": "Code Monkey", @@ -460,5 +460,33 @@ "phone_number": "+16044015432", "app_role": "cas_analyst" } + }, + { + "model": "registration.user", + "fields": { + "user_guid": "00000000-0000-0000-0000-000000000029", + "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", + "bceid_business_name": "Dog SFO - Draft", + "first_name": "User 29", + "last_name": "Industry User", + "position_title": "Code Monkey", + "email": "email@email.com", + "phone_number": "+16044015432", + "app_role": "industry_user" + } + }, + { + "model": "registration.user", + "fields": { + "user_guid": "00000000-0000-0000-0000-000000000030", + "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", + "bceid_business_name": "Narwhal SFO - Draft", + "first_name": "User 30", + "last_name": "Industry User", + "position_title": "Code Monkey", + "email": "email@email.com", + "phone_number": "+16044015432", + "app_role": "industry_user" + } } ] diff --git a/bc_obps/registration/fixtures/mock/user_operator.json b/bc_obps/registration/fixtures/mock/user_operator.json index 6ddf11a83e..081906d99e 100644 --- a/bc_obps/registration/fixtures/mock/user_operator.json +++ b/bc_obps/registration/fixtures/mock/user_operator.json @@ -40,8 +40,8 @@ "fields": { "user": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "operator": "438eff6c-d2e7-40ab-8220-29d3a86ef314", - "role": "pending", - "status": "Pending", + "role": "admin", + "status": "Approved", "verified_at": null, "verified_by": null, "user_friendly_id": 4 @@ -346,5 +346,29 @@ "verified_by": null, "user_friendly_id": 29 } + }, + { + "model": "registration.useroperator", + "fields": { + "user": "00000000-0000-0000-0000-000000000029", + "operator": "7e8b72dc-4196-427f-a553-7879748139e1", + "role": "admin", + "status": "Approved", + "verified_at": "2024-02-26 06:24:57.293242-08", + "verified_by": "58f255ed-8d46-44ee-b2fe-9f8d3d92c684", + "user_friendly_id": 30 + } + }, + { + "model": "registration.useroperator", + "fields": { + "user": "00000000-0000-0000-0000-000000000030", + "operator": "5c847c75-3b17-414c-97f8-88ba81cb3821", + "role": "admin", + "status": "Approved", + "verified_at": "2024-02-26 06:24:57.293242-08", + "verified_by": "58f255ed-8d46-44ee-b2fe-9f8d3d92c684", + "user_friendly_id": 31 + } } ] From 608965d1e85cadd1bc49da4ece04669be8d048c5 Mon Sep 17 00:00:00 2001 From: fviduya Date: Tue, 14 Jan 2025 17:55:20 -0700 Subject: [PATCH 11/12] chore: implement code review, fix user roles, fix operator_designated_operation_timeline to reflect realistic user, fix facility bcghg_id distribution --- .../mock/bc_obps_regulated_operation.json | 36 ++++++++-------- .../registration/fixtures/mock/facility.json | 14 +++---- .../registration/fixtures/mock/operation.json | 4 +- ...peration_designated_operator_timeline.json | 36 ++++++++-------- .../fixtures/mock/user_operator.json | 42 +++++++++---------- 5 files changed, 66 insertions(+), 66 deletions(-) diff --git a/bc_obps/registration/fixtures/mock/bc_obps_regulated_operation.json b/bc_obps/registration/fixtures/mock/bc_obps_regulated_operation.json index 9547bdcdcb..d89bc48c04 100644 --- a/bc_obps/registration/fixtures/mock/bc_obps_regulated_operation.json +++ b/bc_obps/registration/fixtures/mock/bc_obps_regulated_operation.json @@ -2,7 +2,7 @@ { "model": "registration.bcobpsregulatedoperation", "fields": { - "id": "21-0001", + "id": "23-0001", "issued_at": "2023-10-13T15:27:00.000Z", "comments": "Test comment" } @@ -10,7 +10,7 @@ { "model": "registration.bcobpsregulatedoperation", "fields": { - "id": "21-0002", + "id": "23-0002", "issued_at": "2023-10-13T15:27:00.000Z", "comments": "Test comment" } @@ -19,7 +19,7 @@ "model": "registration.bcobpsregulatedoperation", "fields": { "id": "24-0003", - "issued_at": "2023-10-13T15:27:00.000Z", + "issued_at": "2024-10-13T15:27:00.000Z", "comments": "Test comment" } }, @@ -27,7 +27,7 @@ "model": "registration.bcobpsregulatedoperation", "fields": { "id": "24-0004", - "issued_at": "2023-10-13T15:27:00.000Z", + "issued_at": "2024-10-13T15:27:00.000Z", "comments": "Test comment" } }, @@ -35,7 +35,7 @@ "model": "registration.bcobpsregulatedoperation", "fields": { "id": "24-0005", - "issued_at": "2023-10-13T15:27:00.000Z", + "issued_at": "2024-10-13T15:27:00.000Z", "comments": "Test comment" } }, @@ -43,7 +43,7 @@ "model": "registration.bcobpsregulatedoperation", "fields": { "id": "24-0006", - "issued_at": "2023-10-13T15:27:00.000Z", + "issued_at": "2024-10-13T15:27:00.000Z", "comments": "Test comment" } }, @@ -51,7 +51,7 @@ "model": "registration.bcobpsregulatedoperation", "fields": { "id": "24-0007", - "issued_at": "2023-10-13T15:27:00.000Z", + "issued_at": "2024-10-13T15:27:00.000Z", "comments": "Test comment" } }, @@ -59,7 +59,7 @@ "model": "registration.bcobpsregulatedoperation", "fields": { "id": "24-0008", - "issued_at": "2023-10-13T15:27:00.000Z", + "issued_at": "2024-10-13T15:27:00.000Z", "comments": "Test comment" } }, @@ -67,7 +67,7 @@ "model": "registration.bcobpsregulatedoperation", "fields": { "id": "24-0009", - "issued_at": "2023-10-13T15:27:00.000Z", + "issued_at": "2024-10-13T15:27:00.000Z", "comments": "Test comment" } }, @@ -75,7 +75,7 @@ "model": "registration.bcobpsregulatedoperation", "fields": { "id": "24-0010", - "issued_at": "2023-10-13T15:27:00.000Z", + "issued_at": "2024-10-13T15:27:00.000Z", "comments": "Test comment" } }, @@ -83,7 +83,7 @@ "model": "registration.bcobpsregulatedoperation", "fields": { "id": "24-0011", - "issued_at": "2023-10-13T15:27:00.000Z", + "issued_at": "2024-10-13T15:27:00.000Z", "comments": "Test comment" } }, @@ -91,7 +91,7 @@ "model": "registration.bcobpsregulatedoperation", "fields": { "id": "24-0012", - "issued_at": "2023-10-13T15:27:00.000Z", + "issued_at": "2024-10-13T15:27:00.000Z", "comments": "Test comment" } }, @@ -99,7 +99,7 @@ "model": "registration.bcobpsregulatedoperation", "fields": { "id": "24-0013", - "issued_at": "2023-10-13T15:27:00.000Z", + "issued_at": "2024-10-13T15:27:00.000Z", "comments": "Test comment" } }, @@ -107,7 +107,7 @@ "model": "registration.bcobpsregulatedoperation", "fields": { "id": "24-0014", - "issued_at": "2023-10-13T15:27:00.000Z", + "issued_at": "2024-10-13T15:27:00.000Z", "comments": "Test comment" } }, @@ -115,7 +115,7 @@ "model": "registration.bcobpsregulatedoperation", "fields": { "id": "24-0015", - "issued_at": "2023-10-13T15:27:00.000Z", + "issued_at": "2024-10-13T15:27:00.000Z", "comments": "Test comment" } }, @@ -123,7 +123,7 @@ "model": "registration.bcobpsregulatedoperation", "fields": { "id": "24-0016", - "issued_at": "2023-10-13T15:27:00.000Z", + "issued_at": "2024-10-13T15:27:00.000Z", "comments": "Test comment" } }, @@ -131,7 +131,7 @@ "model": "registration.bcobpsregulatedoperation", "fields": { "id": "24-0017", - "issued_at": "2023-10-13T15:27:00.000Z", + "issued_at": "2024-10-13T15:27:00.000Z", "comments": "Test comment" } }, @@ -139,7 +139,7 @@ "model": "registration.bcobpsregulatedoperation", "fields": { "id": "24-0018", - "issued_at": "2023-10-13T15:27:00.000Z", + "issued_at": "2024-10-13T15:27:00.000Z", "comments": "Test comment" } } diff --git a/bc_obps/registration/fixtures/mock/facility.json b/bc_obps/registration/fixtures/mock/facility.json index 25ee172f9d..7b0f54d89f 100644 --- a/bc_obps/registration/fixtures/mock/facility.json +++ b/bc_obps/registration/fixtures/mock/facility.json @@ -48,8 +48,7 @@ "created_at": "2024-06-05T23:18:07.664Z", "name": "Facility 4", "type": "Small Aggregate", - "swrs_facility_id": 1004, - "bcghg_id": "13219990008" + "swrs_facility_id": 1004 } }, { @@ -61,7 +60,6 @@ "name": "Facility 5", "type": "Large Facility", "swrs_facility_id": 1005, - "bcghg_id": "13219990009", "latitude_of_largest_emissions": 43.5, "longitude_of_largest_emissions": -123.5 } @@ -75,7 +73,6 @@ "name": "Facility 6", "type": "Large Facility", "swrs_facility_id": 1006, - "bcghg_id": "13219990010", "latitude_of_largest_emissions": 43.5, "longitude_of_largest_emissions": -123.5 } @@ -89,7 +86,6 @@ "name": "Facility 7", "type": "Large Facility", "swrs_facility_id": 1007, - "bcghg_id": "13219990011", "latitude_of_largest_emissions": 43.5, "longitude_of_largest_emissions": -123.5 } @@ -243,7 +239,6 @@ "name": "Facility 18", "type": "Large Facility", "swrs_facility_id": 1018, - "bcghg_id": "13219990022", "latitude_of_largest_emissions": 43.5, "longitude_of_largest_emissions": -123.5 } @@ -271,7 +266,6 @@ "name": "Facility 20", "type": "Large Facility", "swrs_facility_id": 1020, - "bcghg_id": "13219990024", "latitude_of_largest_emissions": 43.5, "longitude_of_largest_emissions": -123.5 } @@ -285,7 +279,6 @@ "name": "Facility 21", "type": "Large Facility", "swrs_facility_id": 1021, - "bcghg_id": "13219990025", "latitude_of_largest_emissions": 43.5, "longitude_of_largest_emissions": -123.5 } @@ -420,6 +413,7 @@ "name": "Facility 31", "type": "Single Facility", "swrs_facility_id": 1031, + "bcghg_id": "13219990025", "latitude_of_largest_emissions": 43.5, "longitude_of_largest_emissions": -123.5 } @@ -433,6 +427,7 @@ "type": "Single Facility", "name": "Facility 32", "swrs_facility_id": 1032, + "bcghg_id": "13219990022", "latitude_of_largest_emissions": 43.5, "longitude_of_largest_emissions": -123.5 } @@ -446,6 +441,7 @@ "name": "Facility 33", "type": "Single Facility", "swrs_facility_id": 1033, + "bcghg_id": "13219990009", "latitude_of_largest_emissions": 43.5, "longitude_of_largest_emissions": -123.5 } @@ -459,6 +455,7 @@ "name": "Facility 34", "type": "Single Facility", "swrs_facility_id": 1034, + "bcghg_id": "13219990008", "latitude_of_largest_emissions": 43.5, "longitude_of_largest_emissions": -123.5 } @@ -472,6 +469,7 @@ "name": "Facility 35", "type": "Single Facility", "swrs_facility_id": 1035, + "bcghg_id": "13219990024", "latitude_of_largest_emissions": 43.5, "longitude_of_largest_emissions": -123.5 } diff --git a/bc_obps/registration/fixtures/mock/operation.json b/bc_obps/registration/fixtures/mock/operation.json index f8140d2c1e..bf010d645a 100644 --- a/bc_obps/registration/fixtures/mock/operation.json +++ b/bc_obps/registration/fixtures/mock/operation.json @@ -72,7 +72,7 @@ "bcghg_id": "23219990003", "regulated_products": [2, 6, 7, 8], "status": "Registered", - "bc_obps_regulated_operation": "21-0001", + "bc_obps_regulated_operation": "23-0001", "created_at": "2024-1-31T15:27:00.000Z", "activities": [1, 3], "contacts": [14, 15], @@ -94,7 +94,7 @@ "bcghg_id": "23219990002", "regulated_products": [1], "status": "Registered", - "bc_obps_regulated_operation": "21-0002", + "bc_obps_regulated_operation": "23-0002", "created_at": "2024-1-30T15:27:00.000Z", "activities": [1, 5], "contacts": [10, 11, 12], diff --git a/bc_obps/registration/fixtures/mock/operation_designated_operator_timeline.json b/bc_obps/registration/fixtures/mock/operation_designated_operator_timeline.json index d02902790d..95a24fefc6 100644 --- a/bc_obps/registration/fixtures/mock/operation_designated_operator_timeline.json +++ b/bc_obps/registration/fixtures/mock/operation_designated_operator_timeline.json @@ -16,7 +16,7 @@ "fields": { "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", "operator": "4242ea9d-b917-4129-93c2-db00b7451051", - "created_by": "00000000-0000-0000-0000-000000000004", + "created_by": "00000000-0000-0000-0000-000000000001", "created_at": "2024-06-05T23:21:02.353Z", "start_date": "2024-06-05T23:20:57Z", "status": "Active" @@ -27,7 +27,7 @@ "fields": { "operation": "3b5b95ea-2a1a-450d-8e2e-2e15feed96c9", "operator": "4242ea9d-b917-4129-93c2-db00b7451051", - "created_by": "00000000-0000-0000-0000-000000000004", + "created_by": "00000000-0000-0000-0000-000000000001", "created_at": "2024-06-05T23:21:02.353Z", "start_date": "2024-06-05T23:20:57Z", "status": "Active" @@ -49,7 +49,7 @@ "fields": { "operation": "b65a3fbc-c81a-49c0-a43a-67bd3a0b488e", "operator": "4242ea9d-b917-4129-93c2-db00b7451051", - "created_by": "00000000-0000-0000-0000-000000000004", + "created_by": "00000000-0000-0000-0000-000000000023", "created_at": "2024-06-05T23:21:02.353Z", "start_date": "2024-06-05T23:20:57Z", "status": "Active" @@ -159,7 +159,7 @@ "fields": { "operation": "c5b3643b-c143-42f3-8a2b-03ccc7319cd9", "operator": "4242ea9d-b917-4129-93c2-db00b7451051", - "created_by": "00000000-0000-0000-0000-000000000004", + "created_by": "00000000-0000-0000-0000-000000000023", "created_at": "2024-06-05T23:21:02.353Z", "start_date": "2024-06-05T23:20:57Z", "status": "Active" @@ -170,7 +170,7 @@ "fields": { "operation": "954c0382-ff61-4e87-a8a0-873586534b54", "operator": "4242ea9d-b917-4129-93c2-db00b7451051", - "created_by": "00000000-0000-0000-0000-000000000004", + "created_by": "00000000-0000-0000-0000-000000000023", "created_at": "2024-06-05T23:21:02.353Z", "start_date": "2024-06-05T23:20:57Z", "status": "Active" @@ -181,7 +181,7 @@ "fields": { "operation": "6d07d02a-1ad2-46ed-ad56-2f84313e98bf", "operator": "4242ea9d-b917-4129-93c2-db00b7451051", - "created_by": "00000000-0000-0000-0000-000000000004", + "created_by": "00000000-0000-0000-0000-000000000001", "created_at": "2024-06-05T23:21:02.353Z", "start_date": "2024-06-05T23:20:57Z", "status": "Active" @@ -192,7 +192,7 @@ "fields": { "operation": "59d95661-c752-489b-9fd1-0c3fa3454dda", "operator": "4242ea9d-b917-4129-93c2-db00b7451051", - "created_by": "00000000-0000-0000-0000-000000000004", + "created_by": "00000000-0000-0000-0000-000000000001", "created_at": "2024-06-05T23:21:02.353Z", "start_date": "2024-06-05T23:20:57Z", "status": "Active" @@ -203,7 +203,7 @@ "fields": { "operation": "1bd04128-d070-4d3a-940a-0874c4956181", "operator": "4242ea9d-b917-4129-93c2-db00b7451051", - "created_by": "00000000-0000-0000-0000-000000000004", + "created_by": "00000000-0000-0000-0000-000000000001", "created_at": "2024-06-05T23:21:02.353Z", "start_date": "2024-06-05T23:20:57Z", "status": "Active" @@ -214,7 +214,7 @@ "fields": { "operation": "17f13f4d-29b4-45f4-b025-b21f2e126771", "operator": "4242ea9d-b917-4129-93c2-db00b7451051", - "created_by": "00000000-0000-0000-0000-000000000004", + "created_by": "00000000-0000-0000-0000-000000000023", "created_at": "2024-06-05T23:21:02.353Z", "start_date": "2024-06-05T23:20:57Z", "status": "Active" @@ -225,7 +225,7 @@ "fields": { "operation": "ef9044dd-2a27-4d26-86fe-02e51e0755f7", "operator": "4242ea9d-b917-4129-93c2-db00b7451051", - "created_by": "00000000-0000-0000-0000-000000000004", + "created_by": "00000000-0000-0000-0000-000000000001", "created_at": "2024-06-05T23:21:02.353Z", "start_date": "2024-06-05T23:20:57Z", "status": "Active" @@ -236,7 +236,7 @@ "fields": { "operation": "aeeb781e-a97b-4ab2-9a6e-02e4522add1a", "operator": "4242ea9d-b917-4129-93c2-db00b7451051", - "created_by": "00000000-0000-0000-0000-000000000004", + "created_by": "00000000-0000-0000-0000-000000000001", "created_at": "2024-06-05T23:21:02.353Z", "start_date": "2024-06-05T23:20:57Z", "status": "Active" @@ -247,7 +247,7 @@ "fields": { "operation": "02a3ab84-26c6-4a79-bf89-72f877ceef8e", "operator": "4242ea9d-b917-4129-93c2-db00b7451051", - "created_by": "00000000-0000-0000-0000-000000000004", + "created_by": "00000000-0000-0000-0000-000000000001", "created_at": "2024-06-05T23:21:02.353Z", "start_date": "2024-06-05T23:20:57Z", "status": "Active" @@ -258,7 +258,7 @@ "fields": { "operation": "0ac72fa9-2636-4f54-b378-af6b1a070787", "operator": "4242ea9d-b917-4129-93c2-db00b7451051", - "created_by": "00000000-0000-0000-0000-000000000004", + "created_by": "00000000-0000-0000-0000-000000000023", "created_at": "2024-06-05T23:21:02.353Z", "start_date": "2024-06-05T23:20:57Z", "status": "Active" @@ -281,7 +281,7 @@ "fields": { "operation": "556ceeb0-7e24-4d89-b639-61f625f82084", "operator": "4242ea9d-b917-4129-93c2-db00b7451051", - "created_by": "00000000-0000-0000-0000-000000000004", + "created_by": "ba2ba62a121842e0942aab9e92ce8822", "created_at": "2024-06-05T23:21:02.353Z", "start_date": "2024-06-05T23:20:57Z", "status": "Active" @@ -303,7 +303,7 @@ "fields": { "operation": "1d59cb82-2776-4785-a8f7-4b13bc9b4579", "operator": "7e8b72dc-4196-427f-a553-7879748139e1", - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000029", "created_at": "2024-06-05T23:21:02.353Z", "start_date": "2024-06-05T23:21:02.353Z", "status": "Active" @@ -413,8 +413,10 @@ "fields": { "operation": "84d4c8b7-55b5-4700-90ad-fb1c169d4e1f", "operator": "5c847c75-3b17-414c-97f8-88ba81cb3821", - "status": "Active", - "start_date": "2024-12-06T21:09:07Z" + "created_by": "00000000-0000-0000-0000-000000000030", + "created_at": "2024-12-06T21:09:07Z", + "start_date": "2024-12-06T21:09:07Z", + "status": "Active" } }, { diff --git a/bc_obps/registration/fixtures/mock/user_operator.json b/bc_obps/registration/fixtures/mock/user_operator.json index 081906d99e..e79119180a 100644 --- a/bc_obps/registration/fixtures/mock/user_operator.json +++ b/bc_obps/registration/fixtures/mock/user_operator.json @@ -52,8 +52,8 @@ "fields": { "user": "00000000-0000-0000-0000-000000000002", "operator": "4c1010c1-55ca-485d-84bd-6d975fd0af90", - "role": "pending", - "status": "Pending", + "role": "admin", + "status": "Approved", "verified_at": null, "verified_by": null, "user_friendly_id": 5 @@ -76,8 +76,8 @@ "fields": { "user": "00000000-0000-0000-0000-000000000004", "operator": "685d581b-5698-411f-ae00-de1d97334a71", - "role": "pending", - "status": "Pending", + "role": "admin", + "status": "Approved", "verified_at": null, "verified_by": null, "user_friendly_id": 7 @@ -100,8 +100,8 @@ "fields": { "user": "00000000-0000-0000-0000-000000000006", "operator": "04384911-264a-4510-b582-11ee704b8e41", - "role": "pending", - "status": "Pending", + "role": "admin", + "status": "Approved", "verified_at": null, "verified_by": null, "user_friendly_id": 9 @@ -113,7 +113,7 @@ "user": "00000000-0000-0000-0000-000000000007", "operator": "5712ee05-5f3b-4822-825d-6fffddafda4c", "role": "admin", - "status": "Pending", + "status": "Approved", "verified_at": null, "verified_by": null, "user_friendly_id": 10 @@ -124,8 +124,8 @@ "fields": { "user": "00000000-0000-0000-0000-000000000008", "operator": "ea4314ea-1974-465a-a851-278c8f9c8daa", - "role": "pending", - "status": "Pending", + "role": "admin", + "status": "Approved", "verified_at": null, "verified_by": null, "user_friendly_id": 11 @@ -160,8 +160,8 @@ "fields": { "user": "00000000-0000-0000-0000-000000000011", "operator": "f209ef09-dfe6-42a1-ac4c-7689897f1b51", - "role": "pending", - "status": "Pending", + "role": "admin", + "status": "Approved", "verified_at": null, "verified_by": null, "user_friendly_id": 14 @@ -172,8 +172,8 @@ "fields": { "user": "00000000-0000-0000-0000-000000000012", "operator": "bb979661-0782-49b2-9c64-acd8424b692b", - "role": "pending", - "status": "Pending", + "role": "admin", + "status": "Approved", "verified_at": null, "verified_by": null, "user_friendly_id": 15 @@ -184,8 +184,8 @@ "fields": { "user": "00000000-0000-0000-0000-000000000013", "operator": "bb702949-e303-4788-9ba9-806232a5f711", - "role": "pending", - "status": "Pending", + "role": "admin", + "status": "Approved", "verified_at": null, "verified_by": null, "user_friendly_id": 16 @@ -244,8 +244,8 @@ "fields": { "user": "00000000-0000-0000-0000-000000000018", "operator": "a35fb5ad-edd9-4465-982e-81b824644d07", - "role": "pending", - "status": "Pending", + "role": "admin", + "status": "Approved", "verified_at": null, "verified_by": null, "user_friendly_id": 21 @@ -328,8 +328,8 @@ "fields": { "user": "00000000-0000-0000-0000-000000000025", "operator": "edb1aff1-f888-4199-ab88-068364496347", - "role": "pending", - "status": "Pending", + "role": "admin", + "status": "Approved", "verified_at": null, "verified_by": null, "user_friendly_id": 28 @@ -340,8 +340,8 @@ "fields": { "user": "00000000-0000-0000-0000-000000000026", "operator": "4a792f0f-cf9d-48c8-9a95-f504c5f84b12", - "role": "pending", - "status": "Pending", + "role": "admin", + "status": "Approved", "verified_at": null, "verified_by": null, "user_friendly_id": 29 From 1415ccf05c70e72978b99b3ff5d4fe3463dd02c6 Mon Sep 17 00:00:00 2001 From: fviduya Date: Thu, 16 Jan 2025 17:01:15 -0700 Subject: [PATCH 12/12] chore: implement code review changes --- .../registration/fixtures/mock/facility.json | 82 +++++++++---------- ...acility_designated_operation_timeline.json | 80 ++++++++++++------ ...peration_designated_operator_timeline.json | 2 +- .../tests/models/test_operation.py | 4 +- 4 files changed, 99 insertions(+), 69 deletions(-) diff --git a/bc_obps/registration/fixtures/mock/facility.json b/bc_obps/registration/fixtures/mock/facility.json index 7b0f54d89f..d04185491b 100644 --- a/bc_obps/registration/fixtures/mock/facility.json +++ b/bc_obps/registration/fixtures/mock/facility.json @@ -3,7 +3,7 @@ "model": "registration.facility", "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3aeb", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000001", "created_at": "2024-06-05T23:18:07.664Z", "name": "Facility 1", "type": "Large Facility", @@ -15,7 +15,7 @@ "model": "registration.facility", "pk": "459b80f9-b5f3-48aa-9727-90c30eaf3a58", "fields": { - "created_by": "00000000-0000-0000-0000-000000000001", + "created_by": "00000000-0000-0000-0000-000000000004", "created_at": "2024-06-05T23:18:59.623Z", "name": "Facility 2", "type": "Large Facility", @@ -30,7 +30,7 @@ "model": "registration.facility", "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3aec", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000001", "created_at": "2024-06-05T23:18:07.664Z", "name": "Facility 3", "type": "Medium Facility", @@ -44,7 +44,7 @@ "model": "registration.facility", "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3aed", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000001", "created_at": "2024-06-05T23:18:07.664Z", "name": "Facility 4", "type": "Small Aggregate", @@ -55,7 +55,7 @@ "model": "registration.facility", "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3aee", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000001", "created_at": "2024-06-05T23:18:07.664Z", "name": "Facility 5", "type": "Large Facility", @@ -68,7 +68,7 @@ "model": "registration.facility", "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3aef", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000001", "created_at": "2024-06-05T23:18:07.664Z", "name": "Facility 6", "type": "Large Facility", @@ -81,7 +81,7 @@ "model": "registration.facility", "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3af0", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000001", "created_at": "2024-06-05T23:18:07.664Z", "name": "Facility 7", "type": "Large Facility", @@ -94,7 +94,7 @@ "model": "registration.facility", "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3af1", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000001", "created_at": "2024-06-05T23:18:07.664Z", "name": "Facility 8", "type": "Large Facility", @@ -108,7 +108,7 @@ "model": "registration.facility", "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3af2", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000001", "created_at": "2024-06-05T23:18:07.664Z", "name": "Facility 9", "type": "Large Facility", @@ -122,7 +122,7 @@ "model": "registration.facility", "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3af3", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000001", "created_at": "2024-06-05T23:18:07.664Z", "name": "Facility 10", "type": "Large Facility", @@ -136,7 +136,7 @@ "model": "registration.facility", "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3af4", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000001", "created_at": "2024-06-05T23:18:07.664Z", "name": "Facility 11", "type": "Large Facility", @@ -150,7 +150,7 @@ "model": "registration.facility", "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3af5", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000001", "created_at": "2024-06-05T23:18:07.664Z", "name": "Facility 12", "type": "Large Facility", @@ -164,7 +164,7 @@ "model": "registration.facility", "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3af6", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000001", "created_at": "2024-06-05T23:18:07.664Z", "name": "Facility 13", "type": "Large Facility", @@ -178,7 +178,7 @@ "model": "registration.facility", "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3af7", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000001", "created_at": "2024-06-05T23:18:07.664Z", "name": "Facility 14", "type": "Large Facility", @@ -192,7 +192,7 @@ "model": "registration.facility", "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3af8", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000001", "created_at": "2024-06-05T23:18:07.664Z", "name": "Facility 15", "type": "Large Facility", @@ -206,7 +206,7 @@ "model": "registration.facility", "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3af9", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000001", "created_at": "2024-06-05T23:18:07.664Z", "name": "Facility 16", "type": "Large Facility", @@ -220,7 +220,7 @@ "model": "registration.facility", "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3afa", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000001", "created_at": "2024-06-05T23:18:07.664Z", "name": "Facility 17", "type": "Large Facility", @@ -234,7 +234,7 @@ "model": "registration.facility", "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3afb", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000001", "created_at": "2024-06-05T23:18:07.664Z", "name": "Facility 18", "type": "Large Facility", @@ -247,7 +247,7 @@ "model": "registration.facility", "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3afc", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000001", "created_at": "2024-06-05T23:18:07.664Z", "name": "Facility 19", "type": "Large Facility", @@ -261,7 +261,7 @@ "model": "registration.facility", "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3afd", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000001", "created_at": "2024-06-05T23:18:07.664Z", "name": "Facility 20", "type": "Large Facility", @@ -274,7 +274,7 @@ "model": "registration.facility", "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3afe", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000001", "created_at": "2024-06-05T23:18:07.664Z", "name": "Facility 21", "type": "Large Facility", @@ -287,7 +287,7 @@ "model": "registration.facility", "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3aff", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000001", "created_at": "2024-06-05T23:18:07.664Z", "name": "Facility 22", "type": "Single Facility", @@ -316,7 +316,7 @@ "model": "registration.facility", "pk": "4486f2fb-62ed-438d-bb3e-0819b51e3aff", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000001", "created_at": "2024-06-05T23:18:07.664Z", "name": "Facility 24", "type": "Single Facility", @@ -330,7 +330,7 @@ "model": "registration.facility", "pk": "67fd8288-422b-43d3-a9b1-e4ddc54e2139", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000001", "created_at": "2024-06-05T23:18:07.664Z", "name": "Facility 25", "type": "Single Facility", @@ -343,7 +343,7 @@ "model": "registration.facility", "pk": "9f7b0848-021e-4d08-9852-10524c4e5456", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000001", "created_at": "2024-06-05T23:18:07.664Z", "name": "Facility 26", "type": "Single Facility", @@ -356,7 +356,7 @@ "model": "registration.facility", "pk": "f4eb89dd-e081-4576-8663-b789c4a20478", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000004", "created_at": "2024-06-05T23:18:07.664Z", "name": "Facility 27", "type": "Single Facility", @@ -369,7 +369,7 @@ "model": "registration.facility", "pk": "6d564423-abfe-4579-ba92-2c6c71c37bb9", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000004", "created_at": "2024-06-05T23:18:07.664Z", "name": "Facility 28", "type": "Single Facility", @@ -382,7 +382,7 @@ "model": "registration.facility", "pk": "f466e6fc-f338-4cf7-89b0-0211bd2be8b7", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000004", "created_at": "2024-06-05T23:18:07.664Z", "name": "Facility 29", "type": "Single Facility", @@ -395,7 +395,7 @@ "model": "registration.facility", "pk": "f2461804-f38a-4fcc-8586-7ee6eaefa830", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000004", "created_at": "2024-06-05T23:18:07.664Z", "name": "Facility 30", "type": "Single Facility", @@ -408,7 +408,7 @@ "model": "registration.facility", "pk": "fab6a6a7-3c9b-426f-88fb-a9c06474fe51", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000004", "created_at": "2024-06-05T23:18:07.664Z", "name": "Facility 31", "type": "Single Facility", @@ -422,7 +422,7 @@ "model": "registration.facility", "pk": "80db5b3a-b06b-4c06-b257-edaa4e873160", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000004", "created_at": "2024-06-05T23:18:07.664Z", "type": "Single Facility", "name": "Facility 32", @@ -436,7 +436,7 @@ "model": "registration.facility", "pk": "8d0777dd-b691-4079-9253-fca63df79300", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000004", "created_at": "2024-06-05T23:18:07.664Z", "name": "Facility 33", "type": "Single Facility", @@ -450,7 +450,7 @@ "model": "registration.facility", "pk": "e5ade67f-f9ce-496c-b0ad-b8edcd7ecd08", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000004", "created_at": "2024-06-05T23:18:07.664Z", "name": "Facility 34", "type": "Single Facility", @@ -464,7 +464,7 @@ "model": "registration.facility", "pk": "5ee7a6b1-e82a-4a6d-90d1-9a8bbf2017a8", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000004", "created_at": "2024-06-05T23:18:07.664Z", "name": "Facility 35", "type": "Single Facility", @@ -478,7 +478,7 @@ "model": "registration.facility", "pk": "d844683d-e894-4dfe-9d2d-49944ec86005", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000023", "created_at": "2024-06-05T23:18:07.664Z", "name": "Facility 36", "type": "Single Facility", @@ -504,7 +504,7 @@ "model": "registration.facility", "pk": "d477f3d9-2917-4f36-b5ae-166d47dc8172", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000001", "created_at": "2024-06-05T23:18:07.664Z", "name": "Facility 38", "type": "Single Facility", @@ -517,7 +517,7 @@ "model": "registration.facility", "pk": "80ccea58-1920-46ea-8260-23bfe9b4fef0", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000001", "created_at": "2024-06-05T23:18:07.664Z", "name": "Facility 39", "type": "Single Facility", @@ -530,7 +530,7 @@ "model": "registration.facility", "pk": "b66d0364-ad1d-42f4-93d9-82bf185c4304", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000023", "created_at": "2024-06-05T23:18:07.664Z", "name": "Facility 40", "type": "Single Facility", @@ -543,7 +543,7 @@ "model": "registration.facility", "pk": "fdd723fe-88f5-46fb-af50-c19f1407e46d", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000001", "created_at": "2024-06-05T23:18:07.664Z", "name": "Facility 41", "type": "Single Facility", @@ -556,7 +556,7 @@ "model": "registration.facility", "pk": "a4ffa43d-3f47-4f0f-a423-fde5d91e9d87", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000001", "created_at": "2024-06-05T23:18:07.664Z", "name": "Facility 42", "type": "Single Facility", @@ -569,7 +569,7 @@ "model": "registration.facility", "pk": "f6f58bf4-2dd1-4669-b432-50281c6fdff6", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000001", "created_at": "2024-06-05T23:18:07.664Z", "name": "Facility 43", "type": "Single Facility", diff --git a/bc_obps/registration/fixtures/mock/facility_designated_operation_timeline.json b/bc_obps/registration/fixtures/mock/facility_designated_operation_timeline.json index 1abc40fba6..952d210cad 100644 --- a/bc_obps/registration/fixtures/mock/facility_designated_operation_timeline.json +++ b/bc_obps/registration/fixtures/mock/facility_designated_operation_timeline.json @@ -2,7 +2,7 @@ { "model": "registration.facilitydesignatedoperationtimeline", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000001", "created_at": "2024-06-05T23:19:34.959Z", "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3aeb", "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", @@ -25,7 +25,7 @@ { "model": "registration.facilitydesignatedoperationtimeline", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000001", "created_at": "2024-06-05T23:19:58.000Z", "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3aec", "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", @@ -36,7 +36,7 @@ { "model": "registration.facilitydesignatedoperationtimeline", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000001", "created_at": "2024-06-05T23:19:58.500Z", "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3aed", "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", @@ -46,7 +46,7 @@ { "model": "registration.facilitydesignatedoperationtimeline", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000001", "created_at": "2024-06-05T23:19:59.000Z", "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3aee", "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", @@ -56,7 +56,7 @@ { "model": "registration.facilitydesignatedoperationtimeline", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000001", "created_at": "2024-06-05T23:19:59.500Z", "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3aef", "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", @@ -66,7 +66,7 @@ { "model": "registration.facilitydesignatedoperationtimeline", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000001", "created_at": "2024-06-05T23:20:00.000Z", "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3af0", "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", @@ -76,7 +76,7 @@ { "model": "registration.facilitydesignatedoperationtimeline", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000001", "created_at": "2024-06-05T23:20:00.500Z", "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3af1", "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", @@ -86,7 +86,7 @@ { "model": "registration.facilitydesignatedoperationtimeline", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000001", "created_at": "2024-06-05T23:20:01.000Z", "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3af2", "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", @@ -96,7 +96,7 @@ { "model": "registration.facilitydesignatedoperationtimeline", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000001", "created_at": "2024-06-05T23:20:01.500Z", "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3af3", "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", @@ -106,7 +106,7 @@ { "model": "registration.facilitydesignatedoperationtimeline", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000001", "created_at": "2024-06-05T23:20:02.000Z", "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3af4", "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", @@ -116,7 +116,7 @@ { "model": "registration.facilitydesignatedoperationtimeline", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000001", "created_at": "2024-06-05T23:20:02.500Z", "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3af5", "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", @@ -126,7 +126,7 @@ { "model": "registration.facilitydesignatedoperationtimeline", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000001", "created_at": "2024-06-05T23:20:03.000Z", "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3af6", "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", @@ -136,7 +136,7 @@ { "model": "registration.facilitydesignatedoperationtimeline", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000001", "created_at": "2024-06-05T23:20:03.500Z", "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3af7", "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", @@ -146,7 +146,7 @@ { "model": "registration.facilitydesignatedoperationtimeline", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000001", "created_at": "2024-06-05T23:20:04.000Z", "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3af8", "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", @@ -156,7 +156,7 @@ { "model": "registration.facilitydesignatedoperationtimeline", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000001", "created_at": "2024-06-05T23:20:04.500Z", "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3af9", "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", @@ -166,7 +166,7 @@ { "model": "registration.facilitydesignatedoperationtimeline", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000001", "created_at": "2024-06-05T23:20:05.000Z", "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3afa", "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", @@ -176,13 +176,23 @@ { "model": "registration.facilitydesignatedoperationtimeline", "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_by": "00000000-0000-0000-0000-000000000001", "created_at": "2024-06-05T23:20:05.500Z", "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3afb", "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", "start_date": "2024-06-05T23:20:05Z" } }, + { + "model": "registration.facilitydesignatedoperationtimeline", + "fields": { + "created_by": "00000000-0000-0000-0000-000000000001", + "created_at": "2024-06-05T23:20:05.500Z", + "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3afc", + "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", + "start_date": "2024-06-05T23:20:05Z" + } + }, { "model": "registration.facilitydesignatedoperationtimeline", "fields": { @@ -217,6 +227,16 @@ "model": "registration.facilitydesignatedoperationtimeline", "fields": { "created_by": "00000000-0000-0000-0000-000000000001", + "created_at": "2024-06-05T23:20:07.000Z", + "facility": "459b80f9-b5f3-48aa-9727-90c30eaf3a59", + "operation": "3b5b95ea-2a1a-450d-8e2e-2e15feed96c9", + "start_date": "2024-06-05T23:20:07Z" + } + }, + { + "model": "registration.facilitydesignatedoperationtimeline", + "fields": { + "created_by": "00000000-0000-0000-0000-000000000004", "created_at": "2024-06-20T23:20:02Z", "facility": "459b80f9-b5f3-48aa-9727-90c30eaf3a58", "operation": "e1300fd7-2dee-47d1-b655-2ad3fd10f052", @@ -276,7 +296,7 @@ { "model": "registration.facilitydesignatedoperationtimeline", "fields": { - "created_by": "00000000-0000-0000-0000-000000000001", + "created_by": "00000000-0000-0000-0000-000000000004", "created_at": "2024-06-20T23:20:02Z", "facility": "f466e6fc-f338-4cf7-89b0-0211bd2be8b7", "operation": "a47b5fb6-1e10-401a-b70e-574bd925db99", @@ -286,7 +306,7 @@ { "model": "registration.facilitydesignatedoperationtimeline", "fields": { - "created_by": "00000000-0000-0000-0000-000000000001", + "created_by": "00000000-0000-0000-0000-000000000004", "created_at": "2024-06-20T23:20:02Z", "facility": "f2461804-f38a-4fcc-8586-7ee6eaefa830", "operation": "21e70498-c4b0-4525-8443-86faa96206e3", @@ -296,7 +316,7 @@ { "model": "registration.facilitydesignatedoperationtimeline", "fields": { - "created_by": "00000000-0000-0000-0000-000000000001", + "created_by": "00000000-0000-0000-0000-000000000004", "created_at": "2024-06-20T23:20:02Z", "facility": "fab6a6a7-3c9b-426f-88fb-a9c06474fe51", "operation": "17550cd8-3e73-4e52-aa91-ab90cb3b62b0", @@ -306,7 +326,7 @@ { "model": "registration.facilitydesignatedoperationtimeline", "fields": { - "created_by": "00000000-0000-0000-0000-000000000001", + "created_by": "00000000-0000-0000-0000-000000000004", "created_at": "2024-06-20T23:20:02Z", "facility": "80db5b3a-b06b-4c06-b257-edaa4e873160", "operation": "7d3fc7d1-0504-4ee4-a9c5-447f4b324b57", @@ -316,7 +336,7 @@ { "model": "registration.facilitydesignatedoperationtimeline", "fields": { - "created_by": "00000000-0000-0000-0000-000000000001", + "created_by": "00000000-0000-0000-0000-000000000004", "created_at": "2024-06-20T23:20:02Z", "facility": "8d0777dd-b691-4079-9253-fca63df79300", "operation": "acf5811e-d521-43f7-a5c7-a6d6dd47bb31", @@ -326,7 +346,7 @@ { "model": "registration.facilitydesignatedoperationtimeline", "fields": { - "created_by": "00000000-0000-0000-0000-000000000001", + "created_by": "00000000-0000-0000-0000-000000000004", "created_at": "2024-06-20T23:20:02Z", "facility": "e5ade67f-f9ce-496c-b0ad-b8edcd7ecd08", "operation": "8563da83-0762-4d29-9b22-da5b52ef0f24", @@ -336,7 +356,17 @@ { "model": "registration.facilitydesignatedoperationtimeline", "fields": { - "created_by": "00000000-0000-0000-0000-000000000001", + "created_by": "00000000-0000-0000-0000-000000000004", + "created_at": "2024-06-20T23:20:02Z", + "facility": "5ee7a6b1-e82a-4a6d-90d1-9a8bbf2017a8", + "operation": "8563da83-0762-4d29-9b22-da5b52ef0f24", + "start_date": "2024-06-28T23:20:02Z" + } + }, + { + "model": "registration.facilitydesignatedoperationtimeline", + "fields": { + "created_by": "00000000-0000-0000-0000-000000000023", "created_at": "2024-06-20T23:20:02Z", "facility": "d844683d-e894-4dfe-9d2d-49944ec86005", "operation": "c5b3643b-c143-42f3-8a2b-03ccc7319cd9", @@ -376,7 +406,7 @@ { "model": "registration.facilitydesignatedoperationtimeline", "fields": { - "created_by": "00000000-0000-0000-0000-000000000001", + "created_by": "00000000-0000-0000-0000-000000000023", "created_at": "2024-06-20T23:20:02Z", "facility": "b66d0364-ad1d-42f4-93d9-82bf185c4304", "operation": "17f13f4d-29b4-45f4-b025-b21f2e126771", diff --git a/bc_obps/registration/fixtures/mock/operation_designated_operator_timeline.json b/bc_obps/registration/fixtures/mock/operation_designated_operator_timeline.json index 95a24fefc6..f0203c37af 100644 --- a/bc_obps/registration/fixtures/mock/operation_designated_operator_timeline.json +++ b/bc_obps/registration/fixtures/mock/operation_designated_operator_timeline.json @@ -4,7 +4,7 @@ "fields": { "operation": "e1300fd7-2dee-47d1-b655-2ad3fd10f052", "operator": "685d581b-5698-411f-ae00-de1d97334a71", - "created_by": "00000000-0000-0000-0000-000000000004", + "created_by": "00000000-0000-0000-0000-000000000001", "created_at": "2024-06-05T23:21:02.353Z", "start_date": "2024-06-05T23:20:57Z", "end_date": "2024-06-28T23:21:01Z", diff --git a/bc_obps/registration/tests/models/test_operation.py b/bc_obps/registration/tests/models/test_operation.py index 5f842fa1b6..86c2c15913 100644 --- a/bc_obps/registration/tests/models/test_operation.py +++ b/bc_obps/registration/tests/models/test_operation.py @@ -106,7 +106,7 @@ def setUpTestData(cls): ] def test_unique_boro_id_per_operation(self): - boro_id_instance = baker.make(BcObpsRegulatedOperation, id='23-0001') + boro_id_instance = baker.make(BcObpsRegulatedOperation, id='22-0001') operation_instance: Operation = operation_baker() operation_instance.bc_obps_regulated_operation = boro_id_instance operation_instance.save(update_fields=['bc_obps_regulated_operation']) @@ -122,7 +122,7 @@ def test_unique_boro_id_per_operation(self): ) def test_generate_unique_boro_id_existing_id(self): - existing_id = baker.make(BcObpsRegulatedOperation, id='23-0001') # Example existing ID for the current year + existing_id = baker.make(BcObpsRegulatedOperation, id='22-0001') # Example existing ID for the current year self.test_object.bc_obps_regulated_operation = existing_id self.test_object.generate_unique_boro_id() self.assertEqual(