From 353f504bfe99bd4f27ad400bc4af59a2bf7c38b5 Mon Sep 17 00:00:00 2001 From: Mathieu Lessard Date: Wed, 13 Mar 2024 15:14:02 -0700 Subject: [PATCH] Renamed LisenceDate Property --- contenthub/hydration/hydration-utils.js | 8 ++++---- contenthub/hydration/hydration.js | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/contenthub/hydration/hydration-utils.js b/contenthub/hydration/hydration-utils.js index 97adfba2..bdcf6216 100644 --- a/contenthub/hydration/hydration-utils.js +++ b/contenthub/hydration/hydration-utils.js @@ -36,13 +36,13 @@ export function formIsComplete(metadataSchema, formValues) { if(formValues['gmo:licensedContent'] !== 'no'){ if(!formValues['gmo:usageTerms']) return false; - if(formValues['gmo:licensedContent'] === 'yes-expire' && !formValues['gmo:licenseDateXXX']) return false; + if(formValues['gmo:licensedContent'] === 'yes-expire' && !formValues['gmo:licenseExpiryDate']) return false; } return true; }; export const licenseDateFieldShow = { - mapToProperty: 'gmo:licenseDateXXX', + mapToProperty: 'gmo:licenseExpiryDate', label: 'Expiration Date', placeholder: 'Select date', required: true, @@ -55,7 +55,7 @@ licenseExpirePerpitytity.setFullYear(licenseExpirePerpitytity.getFullYear() + 20 licenseExpirePerpitytity.setHours(23,59,59,999); export const licenseDateFieldHidden = { - mapToProperty: 'gmo:licenseDateXXX', + mapToProperty: 'gmo:licenseExpiryDate', element: 'hidden', value: licenseExpirePerpitytity.toISOString() }; @@ -401,5 +401,5 @@ export function getMetadataSchema(facetOptions){ value: 'approved', element: 'hidden', }, - ] + ]; } \ No newline at end of file diff --git a/contenthub/hydration/hydration.js b/contenthub/hydration/hydration.js index 717e9932..2074fcd6 100644 --- a/contenthub/hydration/hydration.js +++ b/contenthub/hydration/hydration.js @@ -126,7 +126,7 @@ export async function openUploadDialog() { }, onMetadataFormChange: (e) => { if (e.property === 'gmo:licensedContent') { - const licenseExpirationIndex = metadataSchema.findIndex((field) => field.mapToProperty === 'gmo:licenseDateXXX'); + const licenseExpirationIndex = metadataSchema.findIndex((field) => field.mapToProperty === 'gmo:licenseExpiryDate'); if (e.value === 'yes-perpetuity') { metadataSchema[licenseExpirationIndex] = licenseDateFieldHidden; }else{