diff --git a/src/scripts/createIndex.js b/src/scripts/createIndex.js index 3e16194..7eb7620 100644 --- a/src/scripts/createIndex.js +++ b/src/scripts/createIndex.js @@ -52,6 +52,7 @@ async function createIndex () { jobId: { type: 'keyword' }, userId: { type: 'keyword' }, status: { type: 'keyword' }, + viewedByCustomer: { type: 'boolean' }, externalId: { type: 'keyword' }, resume: { type: 'text' }, remark: { type: 'keyword' }, diff --git a/src/services/JobCandidateProcessorService.js b/src/services/JobCandidateProcessorService.js index 58137ed..3f25882 100644 --- a/src/services/JobCandidateProcessorService.js +++ b/src/services/JobCandidateProcessorService.js @@ -21,10 +21,10 @@ const localLogger = { * @returns {undefined} */ async function updateCandidateStatus ({ type, payload, previousData }) { - if (previousData.status === payload.status) { - localLogger.debug({ context: 'updateCandidateStatus', message: `jobCandidate is already in status: ${payload.status}` }) - return - } + // if (previousData.status === payload.status) { + // localLogger.debug({ context: 'updateCandidateStatus', message: `jobCandidate is already in status: ${payload.status}` }) + // return + // } // if (!['rejected', 'shortlist',].includes(payload.status)) { if (!['client rejected - screening', 'client rejected - interview', 'interview', 'selected', 'withdrawn', 'withdrawn-prescreen'].includes(payload.status)) { localLogger.debug({ context: 'updateCandidateStatus', message: `not interested status: ${payload.status}` }) @@ -101,6 +101,7 @@ processCreate.schema = { createdAt: Joi.date().required(), createdBy: Joi.string().uuid().required(), updatedAt: Joi.date().allow(null), + viewedByCustomer: Joi.boolean().required(), updatedBy: Joi.string().uuid().allow(null), status: Joi.jobCandidateStatus().required(), externalId: Joi.string().allow(null),