Skip to content

Commit

Permalink
Merge pull request #53 from bcgov/dev
Browse files Browse the repository at this point in the history
Dev -> Test
  • Loading branch information
hannah-macdonald1 authored Dec 16, 2024
2 parents 63adb32 + 03d64c1 commit c7120df
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 66 deletions.
4 changes: 2 additions & 2 deletions src/configuration/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ export default () => ({
},
sinceFieldName: {
supportNetwork: updatedDateFieldName,
inPersonVisits: updatedDateFieldName,
attachments: updatedDateFieldName,
inPersonVisits: 'Updated',
attachments: 'Last Updated Date',
contacts: updatedDateFieldName,
},
skipAuthGuard: process.env.SKIP_AUTH_GUARD === 'true',
Expand Down
48 changes: 10 additions & 38 deletions src/entities/attachments.entity.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
import { ApiProperty, ApiSchema } from '@nestjs/swagger';
import { Exclude, Expose, Type } from 'class-transformer';
import {
createdByFieldName,
createdByIdFieldName,
createdDateFieldName,
updatedByFieldName,
updatedByIdFieldName,
updatedDateFieldName,
} from '../common/constants/upstream-constants';
import { createdDateFieldName } from '../common/constants/upstream-constants';

/*
* Examples
Expand All @@ -23,7 +16,6 @@ const AttachmentsSingleResponseCaseExample = {
'Incident Id': '',
'Incident No': '',
Internal: 'N',
'Last Updated Date': '01/01/1970 00:00:00',
'No Intervention': 'Numeric-Case-Id-Here',
'Portal Visible': 'No',
'Show on Contact': 'N',
Expand All @@ -47,12 +39,10 @@ const AttachmentsSingleResponseCaseExample = {
MemoNumber: '',
'SR Id': '',
Id: 'Attachment-Id-Here',
[createdByFieldName]: 'Creator-Idir-Here',
[createdByIdFieldName]: 'Creator-Id-Here',
CreatedByName: 'Creator-Idir-Here',
[createdDateFieldName]: '01/01/1970 00:00:00',
[updatedByFieldName]: 'Updater-Idir-Here',
[updatedByIdFieldName]: 'Updater-Id-Here',
[updatedDateFieldName]: '01/01/1970 00:00:00',
UpdatedByName: 'Updater-Idir-Here',
'Last Updated Date': '01/01/1970 00:00:00',
};

export const AttachmentDetailsCaseExample = {
Expand Down Expand Up @@ -217,12 +207,6 @@ class AttachmentsEntity {
@Expose()
Internal: string;

@ApiProperty({
example: AttachmentsSingleResponseCaseExample['Last Updated Date'],
})
@Expose()
'Last Updated Date': string;

@ApiProperty({
example: AttachmentsSingleResponseCaseExample['No Intervention'],
})
Expand Down Expand Up @@ -366,16 +350,10 @@ class AttachmentsEntity {
Id: string;

@ApiProperty({
example: AttachmentsSingleResponseCaseExample[createdByFieldName],
})
@Expose()
[createdByFieldName]: string;

@ApiProperty({
example: AttachmentsSingleResponseCaseExample[createdByIdFieldName],
example: AttachmentsSingleResponseCaseExample['CreatedByName'],
})
@Expose()
[createdByIdFieldName]: string;
'CreatedByName': string;

@ApiProperty({
example: AttachmentsSingleResponseCaseExample[createdDateFieldName],
Expand All @@ -384,22 +362,16 @@ class AttachmentsEntity {
[createdDateFieldName]: string;

@ApiProperty({
example: AttachmentsSingleResponseCaseExample[updatedByFieldName],
example: AttachmentsSingleResponseCaseExample['UpdatedByName'],
})
@Expose()
[updatedByFieldName]: string;
'UpdatedByName': string;

@ApiProperty({
example: AttachmentsSingleResponseCaseExample[updatedByIdFieldName],
})
@Expose()
[updatedByIdFieldName]: string;

@ApiProperty({
example: AttachmentsSingleResponseCaseExample[updatedDateFieldName],
example: AttachmentsSingleResponseCaseExample['Last Updated Date'],
})
@Expose()
[updatedDateFieldName]: string;
'Last Updated Date': string;

constructor(partial: Partial<AttachmentsEntity>) {
Object.assign(this, partial);
Expand Down
34 changes: 8 additions & 26 deletions src/entities/in-person-visits.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@ import { ApiProperty, ApiSchema } from '@nestjs/swagger';
import { Exclude, Expose, Type } from 'class-transformer';
import {
createdByFieldName,
createdByIdFieldName,
createdDateFieldName,
updatedByFieldName,
updatedByIdFieldName,
updatedDateFieldName,
} from '../common/constants/upstream-constants';

/*
Expand All @@ -21,12 +17,10 @@ const InPersonVisitsSingleResponseCaseExample = {
'Visit Details Value': 'comment',
'Parent Id': 'Entity-Id-here',
'Login Name': 'Idir-here',
[createdByFieldName]: 'Creator-Idir-Here',
[createdByIdFieldName]: 'Creator-Id-Here',
[createdDateFieldName]: '01/01/1970 00:00:00',
[updatedByFieldName]: 'Updater-Idir-Here',
[updatedByIdFieldName]: 'Updater-Id-Here',
[updatedDateFieldName]: '01/01/1970 00:00:00',
[createdByFieldName]: 'Creator-Id-Here',
Created: '01/01/1970 00:00:00',
[updatedByFieldName]: 'Updater-Id-Here',
Updated: '01/01/1970 00:00:00',
};

export const InPersonVisitsListResponseCaseExample = {
Expand Down Expand Up @@ -108,16 +102,10 @@ class InPersonVisitsEntity {
[createdByFieldName]: string;

@ApiProperty({
example: InPersonVisitsSingleResponseCaseExample[createdByIdFieldName],
example: InPersonVisitsSingleResponseCaseExample['Created'],
})
@Expose()
[createdByIdFieldName]: string;

@ApiProperty({
example: InPersonVisitsSingleResponseCaseExample[createdDateFieldName],
})
@Expose()
[createdDateFieldName]: string;
'Created': string;

@ApiProperty({
example: InPersonVisitsSingleResponseCaseExample[updatedByFieldName],
Expand All @@ -126,16 +114,10 @@ class InPersonVisitsEntity {
[updatedByFieldName]: string;

@ApiProperty({
example: InPersonVisitsSingleResponseCaseExample[updatedByIdFieldName],
})
@Expose()
[updatedByIdFieldName]: string;

@ApiProperty({
example: InPersonVisitsSingleResponseCaseExample[updatedDateFieldName],
example: InPersonVisitsSingleResponseCaseExample['Updated'],
})
@Expose()
[updatedDateFieldName]: string;
'Updated': string;
}

@Exclude()
Expand Down

0 comments on commit c7120df

Please sign in to comment.