diff --git a/packages/aml-checklist/src/tests/badges/badge-branches.svg b/packages/aml-checklist/src/tests/badges/badge-branches.svg
index ecabc52eb0..0f17e3e5c7 100644
--- a/packages/aml-checklist/src/tests/badges/badge-branches.svg
+++ b/packages/aml-checklist/src/tests/badges/badge-branches.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/packages/aml-checklist/src/tests/badges/badge-lines.svg b/packages/aml-checklist/src/tests/badges/badge-lines.svg
index 2c0b792bcc..58310f75ad 100644
--- a/packages/aml-checklist/src/tests/badges/badge-lines.svg
+++ b/packages/aml-checklist/src/tests/badges/badge-lines.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/packages/aml-checklist/src/tests/badges/badge-statements.svg b/packages/aml-checklist/src/tests/badges/badge-statements.svg
index 995063a0d4..094e538930 100644
--- a/packages/aml-checklist/src/tests/badges/badge-statements.svg
+++ b/packages/aml-checklist/src/tests/badges/badge-statements.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/packages/aml-checklist/src/utils/__tests__/datetime.ts b/packages/aml-checklist/src/utils/__tests__/datetime.ts
index f9967b2b0b..4159ecc2b8 100644
--- a/packages/aml-checklist/src/utils/__tests__/datetime.ts
+++ b/packages/aml-checklist/src/utils/__tests__/datetime.ts
@@ -13,7 +13,7 @@ describe('daytime', () => {
const { identityDocument1, identityDocument2 } = idCheck
expect(result).toEqual({
...idCheck,
- checkDate: '1-01-01',
+ checkDate: '1-01-01T00:00:00+00:00',
identityDocument1: {
...identityDocument1,
expiry: toLocalTime(identityDocument1?.expiry as dayjs.ConfigType, DATE_TIME_FORMAT.RFC3339),
diff --git a/packages/aml-checklist/src/utils/datetime.ts b/packages/aml-checklist/src/utils/datetime.ts
index d0971ce318..2efaa5c373 100644
--- a/packages/aml-checklist/src/utils/datetime.ts
+++ b/packages/aml-checklist/src/utils/datetime.ts
@@ -8,18 +8,23 @@ import { IdentityCheckModel } from '@reapit/foundations-ts-definitions'
*/
export const changeTimeZoneLocalForIdentityCheck = (identityChecks: IdentityCheckModel): IdentityCheckModel => {
const { identityDocument1, identityDocument2 } = identityChecks
- return {
+ const newIdentity = {
...identityChecks,
- identityDocument1: {
+ checkDate: toLocalTime(identityChecks.checkDate as dayjs.ConfigType, DATE_TIME_FORMAT.RFC3339),
+ }
+ if (identityDocument1) {
+ newIdentity.identityDocument1 = {
...identityDocument1,
expiry: toLocalTime(identityDocument1?.expiry as dayjs.ConfigType, DATE_TIME_FORMAT.RFC3339),
- },
- identityDocument2: {
+ }
+ }
+ if (identityDocument2) {
+ newIdentity.identityDocument2 = {
...identityDocument2,
expiry: toLocalTime(identityDocument2?.expiry as dayjs.ConfigType, DATE_TIME_FORMAT.RFC3339),
- },
- checkDate: toLocalTime(identityChecks.checkDate as dayjs.ConfigType, DATE_TIME_FORMAT.YYYY_MM_DD),
+ }
}
+ return newIdentity
}
/**
@@ -28,16 +33,21 @@ export const changeTimeZoneLocalForIdentityCheck = (identityChecks: IdentityChec
*/
export const changeTimeZoneUTCForIdentityCheck = (identityChecks: IdentityCheckModel): IdentityCheckModel => {
const { identityDocument1, identityDocument2 } = identityChecks
- return {
+ const newIdentity = {
...identityChecks,
- identityDocument1: {
+ checkDate: toUTCTime(identityChecks.checkDate as dayjs.ConfigType, DATE_TIME_FORMAT.YYYY_MM_DD),
+ }
+ if (identityDocument1) {
+ newIdentity.identityDocument1 = {
...identityDocument1,
expiry: toUTCTime(identityDocument1?.expiry as dayjs.ConfigType, DATE_TIME_FORMAT.YYYY_MM_DD),
- },
- identityDocument2: {
+ }
+ }
+ if (identityDocument2) {
+ newIdentity.identityDocument2 = {
...identityDocument2,
expiry: toUTCTime(identityDocument2?.expiry as dayjs.ConfigType, DATE_TIME_FORMAT.YYYY_MM_DD),
- },
- checkDate: toUTCTime(identityChecks.checkDate as dayjs.ConfigType, DATE_TIME_FORMAT.YYYY_MM_DD),
+ }
}
+ return newIdentity
}
diff --git a/packages/elements/src/tests/badges/badge-branches.svg b/packages/elements/src/tests/badges/badge-branches.svg
index 4bd1387371..c27b021b8d 100644
--- a/packages/elements/src/tests/badges/badge-branches.svg
+++ b/packages/elements/src/tests/badges/badge-branches.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/packages/elements/src/tests/badges/badge-lines.svg b/packages/elements/src/tests/badges/badge-lines.svg
index 9d7b4e8a26..073ff3edce 100644
--- a/packages/elements/src/tests/badges/badge-lines.svg
+++ b/packages/elements/src/tests/badges/badge-lines.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/packages/elements/src/tests/badges/badge-statements.svg b/packages/elements/src/tests/badges/badge-statements.svg
index 5c490b762e..57a0b538dd 100644
--- a/packages/elements/src/tests/badges/badge-statements.svg
+++ b/packages/elements/src/tests/badges/badge-statements.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/packages/elements/src/utils/datetime/datetime.ts b/packages/elements/src/utils/datetime/datetime.ts
index 1d534feffb..4100e066ae 100644
--- a/packages/elements/src/utils/datetime/datetime.ts
+++ b/packages/elements/src/utils/datetime/datetime.ts
@@ -52,6 +52,9 @@ export function closestTo(dateCompare: dayjs.ConfigType, datesArray: Array Coverage:branchesCoverage:branches61.72%61.72%
\ No newline at end of file
+
\ No newline at end of file
diff --git a/packages/lifetime-legal/src/tests/badges/badge-lines.svg b/packages/lifetime-legal/src/tests/badges/badge-lines.svg
index 7dec00006b..80ba67bf3c 100644
--- a/packages/lifetime-legal/src/tests/badges/badge-lines.svg
+++ b/packages/lifetime-legal/src/tests/badges/badge-lines.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/packages/lifetime-legal/src/tests/badges/badge-statements.svg b/packages/lifetime-legal/src/tests/badges/badge-statements.svg
index ae5a4c80cd..808da2dd6a 100644
--- a/packages/lifetime-legal/src/tests/badges/badge-statements.svg
+++ b/packages/lifetime-legal/src/tests/badges/badge-statements.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/packages/lifetime-legal/src/utils/__tests__/datetime.ts b/packages/lifetime-legal/src/utils/__tests__/datetime.ts
index a39e8088fd..7e17973ebe 100644
--- a/packages/lifetime-legal/src/utils/__tests__/datetime.ts
+++ b/packages/lifetime-legal/src/utils/__tests__/datetime.ts
@@ -13,7 +13,7 @@ describe('daytime', () => {
const { identityDocument1, identityDocument2 } = identityCheck
expect(result).toEqual({
...identityCheck,
- checkDate: '2020-01-13',
+ checkDate: '2020-01-13T03:00:00+00:00',
identityDocument1: {
...identityDocument1,
expiry: toLocalTime(identityDocument1?.expiry as dayjs.ConfigType, DATE_TIME_FORMAT.RFC3339),
diff --git a/packages/lifetime-legal/src/utils/datetime.ts b/packages/lifetime-legal/src/utils/datetime.ts
index d0971ce318..2efaa5c373 100644
--- a/packages/lifetime-legal/src/utils/datetime.ts
+++ b/packages/lifetime-legal/src/utils/datetime.ts
@@ -8,18 +8,23 @@ import { IdentityCheckModel } from '@reapit/foundations-ts-definitions'
*/
export const changeTimeZoneLocalForIdentityCheck = (identityChecks: IdentityCheckModel): IdentityCheckModel => {
const { identityDocument1, identityDocument2 } = identityChecks
- return {
+ const newIdentity = {
...identityChecks,
- identityDocument1: {
+ checkDate: toLocalTime(identityChecks.checkDate as dayjs.ConfigType, DATE_TIME_FORMAT.RFC3339),
+ }
+ if (identityDocument1) {
+ newIdentity.identityDocument1 = {
...identityDocument1,
expiry: toLocalTime(identityDocument1?.expiry as dayjs.ConfigType, DATE_TIME_FORMAT.RFC3339),
- },
- identityDocument2: {
+ }
+ }
+ if (identityDocument2) {
+ newIdentity.identityDocument2 = {
...identityDocument2,
expiry: toLocalTime(identityDocument2?.expiry as dayjs.ConfigType, DATE_TIME_FORMAT.RFC3339),
- },
- checkDate: toLocalTime(identityChecks.checkDate as dayjs.ConfigType, DATE_TIME_FORMAT.YYYY_MM_DD),
+ }
}
+ return newIdentity
}
/**
@@ -28,16 +33,21 @@ export const changeTimeZoneLocalForIdentityCheck = (identityChecks: IdentityChec
*/
export const changeTimeZoneUTCForIdentityCheck = (identityChecks: IdentityCheckModel): IdentityCheckModel => {
const { identityDocument1, identityDocument2 } = identityChecks
- return {
+ const newIdentity = {
...identityChecks,
- identityDocument1: {
+ checkDate: toUTCTime(identityChecks.checkDate as dayjs.ConfigType, DATE_TIME_FORMAT.YYYY_MM_DD),
+ }
+ if (identityDocument1) {
+ newIdentity.identityDocument1 = {
...identityDocument1,
expiry: toUTCTime(identityDocument1?.expiry as dayjs.ConfigType, DATE_TIME_FORMAT.YYYY_MM_DD),
- },
- identityDocument2: {
+ }
+ }
+ if (identityDocument2) {
+ newIdentity.identityDocument2 = {
...identityDocument2,
expiry: toUTCTime(identityDocument2?.expiry as dayjs.ConfigType, DATE_TIME_FORMAT.YYYY_MM_DD),
- },
- checkDate: toUTCTime(identityChecks.checkDate as dayjs.ConfigType, DATE_TIME_FORMAT.YYYY_MM_DD),
+ }
}
+ return newIdentity
}
diff --git a/yarn.lock b/yarn.lock
index ffd138be40..329ced1b5f 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -3054,10 +3054,10 @@
progress "2.0.0"
proxy-from-env "^1.0.0"
-"@sentry/core@5.11.1":
- version "5.11.1"
- resolved "https://registry.yarnpkg.com/@sentry/core/-/core-5.11.1.tgz#9e2da485e196ae32971545c1c49ee6fe719930e2"
- integrity sha512-BpvPosVNT20Xso4gAV54Lu3KqDmD20vO63HYwbNdST5LUi8oYV4JhvOkoBraPEM2cbBwQvwVcFdeEYKk4tin9A==
+"@sentry/core@5.12.0":
+ version "5.12.0"
+ resolved "https://registry.yarnpkg.com/@sentry/core/-/core-5.12.0.tgz#d6380c4ef7beee5f418ac1d0e5be86a2de2af449"
+ integrity sha512-wY4rsoX71QsGpcs9tF+OxKgDPKzIFMRvFiSRcJoPMfhFsTilQ/CBMn/c3bDtWQd9Bnr/ReQIL6NbnIjUsPHA4Q==
dependencies:
"@sentry/hub" "5.12.0"
"@sentry/minimal" "5.12.0"
@@ -4089,6 +4089,11 @@
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.4.tgz#38fd73ddfd9b55abb1e1b2ed578cb55bd7b7d339"
integrity sha512-8+KAKzEvSUdeo+kmqnKrqgeE+LcA0tjYWFY7RPProVYwnqDjukzO+3b6dLD56rYX5TdWejnEOLJYOIeh4CXKuA==
+"@types/json5@^0.0.29":
+ version "0.0.29"
+ resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee"
+ integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4=
+
"@types/jsonwebtoken@^8.3.5":
version "8.3.7"
resolved "https://registry.yarnpkg.com/@types/jsonwebtoken/-/jsonwebtoken-8.3.7.tgz#ab79ad55b9435834d24cca3112f42c08eedb1a54"
@@ -21918,6 +21923,25 @@ ts-pnp@^1.1.2:
resolved "https://registry.yarnpkg.com/ts-pnp/-/ts-pnp-1.1.5.tgz#840e0739c89fce5f3abd9037bb091dbff16d9dec"
integrity sha512-ti7OGMOUOzo66wLF3liskw6YQIaSsBgc4GOAlWRnIEj8htCxJUxskanMUoJOD6MDCRAXo36goXJZch+nOS0VMA==
+tsconfig-paths-webpack-plugin@^3.2.0:
+ version "3.2.0"
+ resolved "https://registry.yarnpkg.com/tsconfig-paths-webpack-plugin/-/tsconfig-paths-webpack-plugin-3.2.0.tgz#6e70bd42915ad0efb64d3385163f0c1270f3e04d"
+ integrity sha512-S/gOOPOkV8rIL4LurZ1vUdYCVgo15iX9ZMJ6wx6w2OgcpT/G4wMyHB6WM+xheSqGMrWKuxFul+aXpCju3wmj/g==
+ dependencies:
+ chalk "^2.3.0"
+ enhanced-resolve "^4.0.0"
+ tsconfig-paths "^3.4.0"
+
+tsconfig-paths@^3.4.0:
+ version "3.9.0"
+ resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.9.0.tgz#098547a6c4448807e8fcb8eae081064ee9a3c90b"
+ integrity sha512-dRcuzokWhajtZWkQsDVKbWyY+jgcLC5sqJhg2PSgf4ZkH2aHPvaOY8YWGhmjb68b5qqTfasSsDO9k7RUiEmZAw==
+ dependencies:
+ "@types/json5" "^0.0.29"
+ json5 "^1.0.1"
+ minimist "^1.2.0"
+ strip-bom "^3.0.0"
+
tsdx@^0.11.0:
version "0.11.0"
resolved "https://registry.yarnpkg.com/tsdx/-/tsdx-0.11.0.tgz#ae86a3af8f91100f11141d5bebfec32593ea2ae0"