Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/promote.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,14 @@ jobs:
build_images: ${{ steps.vars.outputs.build_images }}
steps:
- uses: actions/checkout@v4
with :
with:
fetch-depth: 0

- id: filter
uses: dorny/paths-filter@v3
with:
base: ${{ github.event.before }}
ref: ${{ github.sha }}
filters: |
frontend:
- 'frontend/**'
Expand Down
2 changes: 1 addition & 1 deletion backend/.nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
24.12
24.14
6 changes: 3 additions & 3 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build - compile TypeScript
FROM node:24-slim AS build
FROM node:24.14-slim AS build
WORKDIR /app
ENV PRISMA_CLI_BINARY_TARGETS=debian-openssl-3.0.x
COPY package*.json ./
Expand All @@ -8,15 +8,15 @@ COPY . .
RUN npm run build

# Production Dependencies
FROM node:24-slim AS dependencies
FROM node:24.14-slim AS dependencies
WORKDIR /app
ENV PRISMA_CLI_BINARY_TARGETS=debian-openssl-3.0.x
COPY package*.json ./
RUN echo "Production Dependencies"
RUN npm ci --omit=dev

# Production Stage - Copy app and dependencies
FROM node:24-slim
FROM node:24.14-slim
ENV NODE_ENV=production
WORKDIR /app
COPY --from=dependencies /app/node_modules ./node_modules
Expand Down
6 changes: 3 additions & 3 deletions backend/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import prettier from 'eslint-plugin-prettier';
import prettierConfig from 'eslint-config-prettier';
import prettier from 'eslint-plugin-prettier';
import tseslint from 'typescript-eslint';

/**
* Shared ignore patterns (inlined from eslint-base.config.mjs)
Expand Down Expand Up @@ -43,12 +43,12 @@ const baseRules = {
};

export default tseslint.config(
{ignores: [...baseIgnores]},
eslint.configs.recommended,
...tseslint.configs.recommended,
prettierConfig,
{
files: ['**/*.ts'],
ignores: [...baseIgnores],
plugins: {
prettier,
},
Expand Down
794 changes: 401 additions & 393 deletions backend/package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"job:cra-file-transfer": "node dist/jobs/entrypoints/cra-file-transfer",
"job:cra-response-poll": "node dist/jobs/entrypoints/cra-response-poll",
"job:retry-failed": "node dist/jobs/entrypoints/retry-failed",
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\"",
"lint:fix": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"make-badges": "istanbul-badges-readme --logo=vitest --exitCode=1",
"make-badges:ci": "npm run make-badges -- --ci",
"test": "vitest --dir src",
Expand Down
2 changes: 1 addition & 1 deletion backend/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ model Contact {

model Batch {
id Int @id @default(autoincrement())
batchDate DateTime @map("batch_date") @db.Date
batchDate DateTime? @map("batch_date") @db.Date
status String
recordCount Int @map("record_count")
createdAt DateTime @map("created_at")
Expand Down
6 changes: 6 additions & 0 deletions backend/src/common/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ export function formatDateTime(date: Date): string {
return `${formatDate(date)} 00:00:00`
}

export function daysAgo(days: number, referenceDate: Date = new Date()): Date {
const d = new Date(referenceDate)
d.setDate(d.getDate() - days)
return d
}

export function firstDayOfPreviousMonth(referenceDate: Date = new Date()): Date {
const d = new Date(referenceDate)
d.setDate(1)
Expand Down
2 changes: 1 addition & 1 deletion backend/src/cra/outbound/outbound-file.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,6 @@ export class OutboundFileService {
createFileName(sequenceNumber: number): string {
const paddedSequence = String(sequenceNumber).padStart(4, '0')

return `${this.fileNamePrefix}.${this.environmentCode}.${this.craUserId}.${this.fileTypeCode}${paddedSequence}.txt`
return `${this.fileNamePrefix}.${this.environmentCode}.${this.craUserId}.${this.fileTypeCode}${paddedSequence}`
}
}
3 changes: 2 additions & 1 deletion backend/src/sync/icm/icm.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {
daysAgo,
firstDayOfPreviousMonth,
formatDate,
formatDateTime,
Expand Down Expand Up @@ -44,7 +45,7 @@ export const ICM_INGESTION_CONFIGS: IcmApiConfig[] = [
primaryKey: 'ROW_ID',
cursorLabel: 'Updated',
searchSpec: () =>
`([Status] = "Active" OR [Status] = "Interrupted" OR [Status] = "Ended") AND [End Date] >= "${formatDate(new Date())}"`,
`[Status] = "Active" OR [Status] = "Interrupted" OR ([Status] = "Ended" AND [End Date] >= "${formatDate(daysAgo(30))}")`,
fieldMap: STG_ICM_PLACEMENTS_MAP,
},
{
Expand Down
1 change: 1 addition & 0 deletions backend/src/sync/mis/mis-file.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export const MIS_FILE_CONFIGS: MisFileConfig[] = [
'payment_effective_end_date',
'contract_number',
'payment_updated',
'person_id_mis',
],
},
{
Expand Down
14 changes: 7 additions & 7 deletions backend/src/sync/mock-data/mis/mock/rap_payments.csv
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ID,LAST_UPDATED_DATE,PAYMENT_NUMBER,PAYMENT_TYPE,PAYMENT_STATUS,PAYMENT_AMOUNT,PAYMENT_EFFECTIVE_START_DATE,PAYMENT_EFFECTIVE_END_DATE,CONTRACT_NUMBER,PAYMENT_UPDATED
PM001,2026-01-15,PAY-1001,Variable,Paid,1850.00,2026-01-01,2026-01-31,CN-5001,2026-01-15
PM002,2026-01-15,PAY-1002,Monthly Family Care Rate,Paid,2200.00,2025-12-01,2025-12-31,CN-5001,2026-01-15
PM003,2026-01-12,PAY-2001,Variable,Pending,1650.00,2026-01-01,2026-01-31,CN-5003,2026-01-12
PM004,2026-01-12,PAY-2002,ADJ-Variable,Paid,350.00,2025-12-01,2025-12-31,CN-5003,2026-01-12
PM005,2026-01-10,PAY-3001,Monthly Family Care Rate,Paid,1900.00,2026-01-01,2026-01-31,CN-5005,2026-01-10
PM006,2026-01-08,PAY-4001,Variable,Pending,2100.00,2026-01-01,2026-01-31,CN-5006,2026-01-08
ID,LAST_UPDATED_DATE,PAYMENT_NUMBER,PAYMENT_TYPE,PAYMENT_STATUS,PAYMENT_AMOUNT,PAYMENT_EFFECTIVE_START_DATE,PAYMENT_EFFECTIVE_END_DATE,CONTRACT_NUMBER,PAYMENT_UPDATED,PERSON_ID_MIS
PM001,2026-01-15,PAY-1001,Variable,Paid,1850.00,2026-01-01,2026-01-31,CN-5001,2026-01-15,01078531
PM002,2026-01-15,PAY-1002,Monthly Family Care Rate,Paid,2200.00,2025-12-01,2025-12-31,CN-5001,2026-01-15,01078531
PM003,2026-01-12,PAY-2001,Variable,Pending,1650.00,2026-01-01,2026-01-31,CN-5003,2026-01-12,01080563
PM004,2026-01-12,PAY-2002,ADJ-Variable,Paid,350.00,2025-12-01,2025-12-31,CN-5003,2026-01-12,01080563
PM005,2026-01-10,PAY-3001,Monthly Family Care Rate,Paid,1900.00,2026-01-01,2026-01-31,CN-5005,2026-01-10,01080565
PM006,2026-01-08,PAY-4001,Variable,Pending,2100.00,2026-01-01,2026-01-31,CN-5006,2026-01-08,01080953
2 changes: 1 addition & 1 deletion frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ---------- Build static assets ----------
FROM node:24-slim AS build
FROM node:24.13-slim AS build
WORKDIR /app

# Install deps (requires package-lock.json to be in sync)
Expand Down
Loading