diff --git a/Makefile b/Makefile index 614a2e2..b7fa1dd 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ SHELL := /bin/bash USER := govflow NAME := govflow -VERSION := 0.0.34-alpha +VERSION := 0.0.35-alpha COMPOSE := docker-compose -f docker-compose/docker-compose.yml --compatibility REPOSITORY := $(USER)/$(NAME) DOCKER_HOST := ghcr.io diff --git a/package-lock.json b/package-lock.json index a8fa1cb..4aba461 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@govflow/govflow", - "version": "0.0.34-alpha", + "version": "0.0.35-alpha", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@govflow/govflow", - "version": "0.0.34-alpha", + "version": "0.0.35-alpha", "license": "MIT", "dependencies": { "@sendgrid/mail": "^7.6.0", @@ -13383,4 +13383,4 @@ "dev": true } } -} +} \ No newline at end of file diff --git a/package.json b/package.json index e1a3d0c..4804bac 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@govflow/govflow", - "version": "0.0.34-alpha", + "version": "0.0.35-alpha", "description": "An open, modular work order and workflow management system for local governments and resident satisfaction.", "homepage": "https://github.com/govflow/govflow", "main": "./index.js", diff --git a/src/core/index.ts b/src/core/index.ts index 77a9965..669cf46 100644 --- a/src/core/index.ts +++ b/src/core/index.ts @@ -16,7 +16,7 @@ import { storageRouter } from './storage'; const coreRoutes = Router(); coreRoutes.get('/', wrapHandler(async (req: Request, res: Response) => { - res.status(200).send({ data: { name: 'govflow', version: '0.0.34-alpha' } }); + res.status(200).send({ data: { name: 'govflow', version: '0.0.35-alpha' } }); })) coreRoutes.use('/services', serviceRouter); coreRoutes.use('/service-requests', serviceRequestRouter); diff --git a/src/core/service-requests/helpers.ts b/src/core/service-requests/helpers.ts index 3b43cdb..56f1cde 100644 --- a/src/core/service-requests/helpers.ts +++ b/src/core/service-requests/helpers.ts @@ -3,10 +3,17 @@ import { ServiceRequestInstance, ServiceRequestModel, StaffUserAttributes } from export function makeAuditMessage(user: StaffUserAttributes | undefined, fieldName: string, oldValue:string, newValue:string): string { let displayName = 'System'; + let message: string; if (user) { displayName = user.displayName; } - return `${displayName} changed this request ${fieldName} from ${oldValue} to ${newValue}`; + if (fieldName == 'status') { + message = `${displayName} changed this request's ${fieldName} from ${oldValue} to ${newValue}.` + } else { + // TODO: we need to introduce queries to have display data that makes sense. + message = `${displayName} changed this request's ${fieldName}.` + } + return message; } export function makePublicIdString(year: number, month: number, counter: number): string { diff --git a/src/registry/service-identifiers.ts b/src/registry/service-identifiers.ts index e00f4e5..27f3843 100644 --- a/src/registry/service-identifiers.ts +++ b/src/registry/service-identifiers.ts @@ -17,5 +17,5 @@ export const serviceIds = { export const appIds = { AppSettings: Symbol('AppSettings'), Models: Symbol('Models'), - Repositories: Symbol('Repositorieas'), + Repositories: Symbol('Repositories'), }; diff --git a/test/test-endpoints.ts b/test/test-endpoints.ts index 37c400d..9a7d26f 100644 --- a/test/test-endpoints.ts +++ b/test/test-endpoints.ts @@ -29,7 +29,7 @@ describe('Hit all API endpoints', function () { it('should GET Root API information', async function () { const res = await chai.request(app).get('/'); chai.assert.equal(res.status, 200); - chai.assert.equal(res.text, JSON.stringify({ data: { name: 'govflow', version: '0.0.34-alpha' } })); + chai.assert.equal(res.text, JSON.stringify({ data: { name: 'govflow', version: '0.0.35-alpha' } })); }); it('should GET staff users for jurisdiction', async function () {