Skip to content

Commit

Permalink
Merge pull request #77 from bcgov/fix/siebel-unique-gen
Browse files Browse the repository at this point in the history
Add created date for upstream
  • Loading branch information
hannah-macdonald1 authored Feb 5, 2025
2 parents 9e76258 + 91efcbd commit 2cb3f9c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/common/constants/upstream-constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const postInPersonVisitsEndpointEnvVarName = 'IN_PERSON_VISITS_POST_ENDPOINT';
const attachmentsEndpointEnvVarName = 'ATTACHMENTS_ENDPOINT';
const idirUsernameHeaderField = 'x-idir-username';
const upstreamDateFormat = 'MM/dd/yyyy HH:mm:ss';
const dummyCreatedDate = '01/01/1970 00:00:00';
const caseChildServices = 'Child Services';
const childVisitType = 'In Person Child Youth';
const childVisitIdirFieldName = 'Login Name';
Expand Down Expand Up @@ -35,6 +36,7 @@ export {
attachmentsEndpointEnvVarName,
idirUsernameHeaderField,
upstreamDateFormat,
dummyCreatedDate,
caseChildServices,
childVisitType,
childVisitIdirFieldName,
Expand Down
2 changes: 2 additions & 0 deletions src/controllers/cases/cases.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import {
import {
childVisitEntityIdFieldName,
childVisitIdirFieldName,
dummyCreatedDate,
} from '../../common/constants/upstream-constants';
import { Response } from 'express';
import { ContactsService } from '../../helpers/contacts/contacts.service';
Expand Down Expand Up @@ -119,6 +120,7 @@ export class CasesService {
...inPersonVisitsDto,
[childVisitIdirFieldName]: idir,
[childVisitEntityIdFieldName]: id[idName],
Created: dummyCreatedDate,
});
return await this.inPersonVisitsService.postSingleInPersonVisitRecord(
RecordType.Case,
Expand Down
2 changes: 2 additions & 0 deletions src/dto/post-in-person-visit.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ export class PostInPersonVisitDtoUpstream {

'Visit Details Value': string;

'Created': string;

constructor(object) {
Object.assign(this, object);
}
Expand Down

0 comments on commit 2cb3f9c

Please sign in to comment.