| 特定の関係タイプおよび年齢に対して国別識別子が必要。 |
/* eslint-disable dot-notation */
define([], () => {
'use strict';
function isOlderThanSixMonths(dob) {
const currentDate = new Date();
const birthDate = new Date(dob);
// Calculate the difference in months
const monthDiff = currentDate.getMonth() - birthDate.getMonth() +
(12 * (currentDate.getFullYear() - birthDate.getFullYear()));
// Check if the age is greater than or equal to 6 months
const isOlderThanSixMonths = monthDiff > 6 || (monthDiff === 6 && currentDate.getDate() >= birthDate.getDate());
return isOlderThanSixMonths;
}
/**
*
* @param {object} context
* @return {boolean}
*/
function runCondition(context) {
const { $objectContext, $fields, $modules, $user, $value } = context;
let dob = $fields['contactRelationships']['dateOfBirth'].$value();
let nidCountry = $fields['personNationalIdentifiers']['LegislationCode'].$value();
if ( dob && isOlderThanSixMonths(dob) && (nidCountry == null || nidCountry == "")) {
return true;
}
return false;
}
return { runCondition };
});
|
| 特定の関係タイプに対して国別識別子が必要。 |
/* eslint-disable dot-notation */
define([], () => {
'use strict';
/**
*
* @param {object} context
* @return {boolean}
*/
function runCondition(context) {
const { $objectContext, $fields, $modules, $user, $value } = context;
if (($fields['contactRelationships']['ContactType'].$value() == 'S' || $fields['contactRelationships']['ContactType'].$value() == 'DP' || $fields['contactRelationships']['ContactType'].$value() == 'P') && ($fields['personNationalIdentifiers']['LegislationCode'].$value() == '' || $fields['personNationalIdentifiers']['LegislationCode'].$value() == null)) {
return true;
}
return false;
}
return { runCondition };
});
|
| 特定の関係タイプに対して生年月日が必要。 |
/* eslint-disable dot-notation */
define([], () => {
'use strict';
/**
*
* @param {object} context
* @return {boolean}
*/
function runCondition(context) {
const { $objectContext, $fields, $modules, $user, $value } = context;
if (($fields['contactRelationships']['ContactType'].$value() == 'S' || $fields['contactRelationships']['ContactType'].$value() == 'DP' || $fields['contactRelationships']['ContactType'].$value() == 'C') && ($fields['contactRelationships']['dateOfBirth'].$value() == '' || $fields['contactRelationships']['dateOfBirth'].$value() == null)) {
return true;
}
return false;
}
return { runCondition };
});
|
| 特定の関係タイプに対して自宅住所が必要。 |
/* eslint-disable dot-notation */
define([], () => {
'use strict';
/**
*
* @param {object} context
* @return {boolean}
*/
function runCondition(context) {
const { $objectContext, $fields, $modules, $user, $value } = context;
if (($fields['contactRelationships']['ContactType'].$value() == 'S' || $fields['contactRelationships']['ContactType'].$value() == 'DP' || $fields['contactRelationships']['ContactType'].$value() == 'C') && ($fields['personAddress']['AddressLine1'].$value() == '' || $fields['personAddress']['AddressLine1'].$value() == null)) {
return true;
}
return false;
}
return { runCondition };
});
|
| 緊急連絡先としてマークされた連絡先に対して電話番号が必要。 |
/* eslint-disable dot-notation */
define([], () => {
'use strict';
/**
*
* @param {object} context
* @return {boolean}
*/
function runCondition(context) {
const { $objectContext, $fields, $modules, $user, $value } = context;
if (($fields['contactRelationships']['EmergencyContactFlag'].$value() == true) && ($fields['personPhones']['LegislationCode'].$value() == '' || $fields['personPhones']['LegislationCode'].$value() == null)) {
return true;
}
return false;
}
return { runCondition };
});
|
| 特定の国別仕様および福利厚生適格連絡先に対してのみ、性別および生年月日が必要。 |
/* eslint-disable dot-notation */
define([], () => {
'use strict';
/**
*
* @param {object} context
* @return {boolean}
*/
function runCondition(context) {
const { $objectContext, $fields, $modules, $user, $value } = context;
if(($objectContext.LegislationCode.includes('US'))){
if (($fields['contactRelationships']['dateOfBirth'].$value() === null || $fields['contactRelationships']['gender'].$value() === null) && $fields['contactRelationships']['ContactTypeMeaning'].$value() === 'Spouse') {
return true;
}
}
return false;
}
return { runCondition };
});
|