diff --git a/postman/Prevention.postman_collection.json b/postman/Prevention.postman_collection.json index 4ac95b6af..4e5a1f0a8 100644 --- a/postman/Prevention.postman_collection.json +++ b/postman/Prevention.postman_collection.json @@ -152,6 +152,133 @@ }, "response": [] }, + { + "name": "Create Project Fiscal", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "// Parse the response JSON", + "const response = pm.response.json();", + "", + "// Check if the access token exists in the response", + "if (response.projectPlanFiscalGuid) {", + " // Save the token to an environment variable", + " pm.environment.set(\"projectPlanFiscalGuid\", response.projectPlanFiscalGuid);", + " console.log(\"Project Fiscl Guid saved successfully!\");", + "} else {", + " console.error(\"Failed to set project Fiscal guid:\", response);", + "}" + ], + "type": "text/javascript", + "packages": {} + } + }, + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{accessToken}}", + "type": "string" + } + ] + }, + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"projectGuid\": \"{{projectGuid}}\",\n \"activityCategoryCode\": \"TACT_PLAN\",\n \"fiscalYear\": 2023,\n \"projectPlanStatusCode\": \"ACTIVE\",\n \"planFiscalStatusCode\": \"PLANNED\",\n \"projectFiscalName\": \"Fiscal Project 1\",\n \"projectFiscalDescription\": \"This is a test project fiscal description.\",\n \"businessAreaComment\": \"Test comment\",\n \"estimatedClwrrAllocAmount\": 1000.00,\n \"totalCostEstimateAmount\": 2000.00,\n \"fiscalFundingRequestAmount\": 1500.00,\n \"fiscalAllocatedAmount\": 1200.00,\n \"fiscalAncillaryFundAmount\": 300.00,\n \"fiscalPlannedProjectSizeHa\": 10.5,\n \"fiscalPlannedCostPerHaAmt\": 500.00,\n \"fiscalReportedSpendAmount\": 0.00,\n \"fiscalActualAmount\": 0.00,\n \"fiscalCompletedSizeHa\": 0.0,\n \"fiscalActualCostPerHaAmt\": 0.0,\n \"firstNationsDelivPartInd\": true,\n \"firstNationsEngagementInd\": false,\n \"firstNationsPartner\": \"Test Partner\",\n \"resultsNumber\": \"RN123456\",\n \"resultsOpeningId\": \"RO12345\",\n \"resultsContactEmail\": \"contact@example.com\",\n \"submittedByName\": \"Test User\",\n \"submittedByUserGuid\": \"123e4567-e89\",\n \"submittedByUserUserid\": \"testuser\",\n \"submissionTimestamp\": \"2024-01-01T12:00:00Z\",\n \"isApprovedInd\": true,\n \"isDelayedInd\": false\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{LOCAL_API_URL}}/projectFiscals", + "host": [ + "{{LOCAL_API_URL}}" + ], + "path": [ + "projectFiscals" + ] + } + }, + "response": [] + }, + { + "name": "Update Project Fiscal", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {} + } + }, + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{accessToken}}", + "type": "string" + } + ] + }, + "method": "PUT", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"projectPlanFiscalGuid\": \"{{projectPlanFiscalGuid}}\",\n \"projectGuid\": \"{{projectGuid}}\",\n \"activityCategoryCode\": \"RX_DEV\",\n \"fiscalYear\": 2024,\n \"projectPlanStatusCode\": \"ACTIVE\",\n \"planFiscalStatusCode\": \"PLANNED\",\n \"projectFiscalName\": \"Fiscal Project 1\",\n \"projectFiscalDescription\": \"This is a test project fiscal description.\",\n \"businessAreaComment\": \"Test comment\",\n \"estimatedClwrrAllocAmount\": 1000.00,\n \"totalCostEstimateAmount\": 2000.00,\n \"fiscalFundingRequestAmount\": 1500.00,\n \"fiscalAllocatedAmount\": 1200.00,\n \"fiscalAncillaryFundAmount\": 300.00,\n \"fiscalPlannedProjectSizeHa\": 10.5,\n \"fiscalPlannedCostPerHaAmt\": 500.00,\n \"fiscalReportedSpendAmount\": 0.00,\n \"fiscalActualAmount\": 0.00,\n \"fiscalCompletedSizeHa\": 0.0,\n \"fiscalActualCostPerHaAmt\": 0.0,\n \"firstNationsDelivPartInd\": true,\n \"firstNationsEngagementInd\": false,\n \"firstNationsPartner\": \"Test Partner\",\n \"resultsNumber\": \"RN123456\",\n \"resultsOpeningId\": \"RO12345\",\n \"resultsContactEmail\": \"contact@example.com\",\n \"submittedByName\": \"Test User\",\n \"submittedByUserGuid\": \"123e4567-e89\",\n \"submittedByUserUserid\": \"testuser\",\n \"submissionTimestamp\": \"2024-01-01T12:00:00Z\",\n \"isApprovedInd\": true,\n \"isDelayedInd\": false\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{LOCAL_API_URL}}/projectFiscals/{{projectPlanFiscalGuid}}", + "host": [ + "{{LOCAL_API_URL}}" + ], + "path": [ + "projectFiscals", + "{{projectPlanFiscalGuid}}" + ] + } + }, + "response": [] + }, { "name": "GET Projects", "request": { @@ -518,6 +645,89 @@ }, "response": [] }, + { + "name": "Get ProjectFiscal", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{accessToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [], + "url": { + "raw": "{{LOCAL_API_URL}}/projectFiscals/{{projectPlanFiscalGuid}}", + "host": [ + "{{LOCAL_API_URL}}" + ], + "path": [ + "projectFiscals", + "{{projectPlanFiscalGuid}}" + ] + } + }, + "response": [] + }, + { + "name": "Get ProjectFiscals", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{accessToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [], + "url": { + "raw": "{{LOCAL_API_URL}}/projectFiscals", + "host": [ + "{{LOCAL_API_URL}}" + ], + "path": [ + "projectFiscals" + ] + } + }, + "response": [] + }, + { + "name": "Delete Project Fiscal", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{accessToken}}", + "type": "string" + } + ] + }, + "method": "DELETE", + "header": [], + "url": { + "raw": "{{LOCAL_API_URL}}/projectFiscals/{{projectPlanFiscalGuid}}", + "host": [ + "{{LOCAL_API_URL}}" + ], + "path": [ + "projectFiscals", + "{{projectPlanFiscalGuid}}" + ] + } + }, + "response": [] + }, { "name": "Delete Project", "request": {