From da4e2547ceb226adb3729d118cd24d49a3c3bca0 Mon Sep 17 00:00:00 2001 From: Mayank Mishra Date: Wed, 7 Jan 2026 12:11:09 +0530 Subject: [PATCH 1/4] sending frequency also in get activity and venue details --- src/modules/host/services/host.service.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/modules/host/services/host.service.ts b/src/modules/host/services/host.service.ts index 8e2afed..a29cc63 100644 --- a/src/modules/host/services/host.service.ts +++ b/src/modules/host/services/host.service.ts @@ -2007,6 +2007,15 @@ export class HostService { }, }, }, + frequency: { + where: { + isActive: true + }, + select: { + id: true, + frequencyName: true + } + }, ActivityAmenities: { where: { isActive: true, From e65ed8babc3697e4b49b4c1b0c2aadef9814455e Mon Sep 17 00:00:00 2001 From: Mayank Mishra Date: Wed, 7 Jan 2026 16:03:27 +0530 Subject: [PATCH 2/4] sending the host id in the get pqq details for am and corrected the error message in the submit pqq answer --- .../Activity_Hub/OnBoarding/submitPQQ_Answer.ts | 6 +++--- .../minglaradmin/services/minglar.service.ts | 16 ++++++++++++++++ 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/src/modules/host/handlers/Activity_Hub/OnBoarding/submitPQQ_Answer.ts b/src/modules/host/handlers/Activity_Hub/OnBoarding/submitPQQ_Answer.ts index 509635e..21591da 100644 --- a/src/modules/host/handlers/Activity_Hub/OnBoarding/submitPQQ_Answer.ts +++ b/src/modules/host/handlers/Activity_Hub/OnBoarding/submitPQQ_Answer.ts @@ -147,9 +147,9 @@ export const handler = safeHandler(async (event: APIGatewayProxyEvent): Promise< const pqqAnswerXid = Number(fields.pqqAnswerXid); const comments = fields.comments || null; - if (!activityXid || isNaN(activityXid)) throw new ApiError(400, "Valid activityXid is required"); - if (!pqqQuestionXid || isNaN(pqqQuestionXid)) throw new ApiError(400, "Valid pqqQuestionXid is required"); - if (!pqqAnswerXid || isNaN(pqqAnswerXid)) throw new ApiError(400, "Valid pqqAnswerXid is required"); + if (!activityXid || isNaN(activityXid)) throw new ApiError(400, "Please provide a valid activity"); + if (!pqqQuestionXid || isNaN(pqqQuestionXid)) throw new ApiError(400, "Please select a valid question"); + if (!pqqAnswerXid || isNaN(pqqAnswerXid)) throw new ApiError(400, "Please select a valid answer"); // 6) UPSERT header const existingHeader = await pqqService.findHeaderByCompositeKey( diff --git a/src/modules/minglaradmin/services/minglar.service.ts b/src/modules/minglaradmin/services/minglar.service.ts index 07f1c6f..e1e2917 100644 --- a/src/modules/minglaradmin/services/minglar.service.ts +++ b/src/modules/minglaradmin/services/minglar.service.ts @@ -2051,6 +2051,19 @@ export class MinglarService { id: true, comments: true, pqqAnswerXid: true, + activity: { + select: { + id: true, + activityTitle: true, + host: { + select: { + id: true, + companyName: true, + logoPath: true + } + } + } + }, pqqQuestions: { select: { id: true, @@ -2120,6 +2133,9 @@ export class MinglarService { id: cat.id, categoryName: cat.categoryName, displayOrder: cat.displayOrder, + hostId: item.activity.host.id, + hostCompanyName: item.activity.host.companyName, + hostLogoPath: item.activity.host.logoPath, pqqsubCategories: [], }; } else if (!grouped[cat.id].activityPqqHeaderId) { From 16c901b64b758f4b55094aae0db31ccb3d8b295f Mon Sep 17 00:00:00 2001 From: Mayank Mishra Date: Wed, 7 Jan 2026 19:13:36 +0530 Subject: [PATCH 3/4] added approved filter and fixed the error messages --- .../host/handlers/Activity_Hub/OnBoarding/submitPQAnswer.ts | 6 +++--- src/modules/minglaradmin/services/minglar.service.ts | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/modules/host/handlers/Activity_Hub/OnBoarding/submitPQAnswer.ts b/src/modules/host/handlers/Activity_Hub/OnBoarding/submitPQAnswer.ts index ca76754..33350e1 100644 --- a/src/modules/host/handlers/Activity_Hub/OnBoarding/submitPQAnswer.ts +++ b/src/modules/host/handlers/Activity_Hub/OnBoarding/submitPQAnswer.ts @@ -156,9 +156,9 @@ export const handler = safeHandler(async (event: APIGatewayProxyEvent): Promise< const pqqAnswerXid = Number(fields.pqqAnswerXid); const comments = fields.comments || null; - if (!activityXid || isNaN(activityXid)) throw new ApiError(400, "Valid activityXid is required"); - if (!pqqQuestionXid || isNaN(pqqQuestionXid)) throw new ApiError(400, "Valid pqqQuestionXid is required"); - if (!pqqAnswerXid || isNaN(pqqAnswerXid)) throw new ApiError(400, "Valid pqqAnswerXid is required"); + if (!activityXid || isNaN(activityXid)) throw new ApiError(400, "Please provide a valid activity"); + if (!pqqQuestionXid || isNaN(pqqQuestionXid)) throw new ApiError(400, "Please select a valid question"); + if (!pqqAnswerXid || isNaN(pqqAnswerXid)) throw new ApiError(400, "Please select a valid answer"); // 6) UPSERT header const existingHeader = await hostService.findHeaderByCompositeKey( diff --git a/src/modules/minglaradmin/services/minglar.service.ts b/src/modules/minglaradmin/services/minglar.service.ts index e1e2917..1bb7d72 100644 --- a/src/modules/minglaradmin/services/minglar.service.ts +++ b/src/modules/minglaradmin/services/minglar.service.ts @@ -839,6 +839,10 @@ export class MinglarService { internal: MINGLAR_STATUS_INTERNAL.AM_REJECTED, display: MINGLAR_STATUS_DISPLAY.ENHANCING, }, + Approved: { + internal: MINGLAR_STATUS_INTERNAL.AM_APPROVED, + display: MINGLAR_STATUS_DISPLAY.APPROVED, + } }; if (applicationStatus?.trim()) { From f7cc925e6f88a6d4b6b8053559371038d2c9b81e Mon Sep 17 00:00:00 2001 From: Mayank Mishra Date: Wed, 7 Jan 2026 19:34:41 +0530 Subject: [PATCH 4/4] Fixed the status in the create activity api submission --- src/common/utils/constants/host.constant.ts | 6 ++++-- src/modules/host/services/host.service.ts | 8 ++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/common/utils/constants/host.constant.ts b/src/common/utils/constants/host.constant.ts index de82a0e..51c008a 100644 --- a/src/common/utils/constants/host.constant.ts +++ b/src/common/utils/constants/host.constant.ts @@ -78,6 +78,7 @@ export const ACTIVITY_AM_INTERNAL_STATUS = { ACTIVITY_REJECTED: 'Activity Rejected', ACTIVITY_APPROVED: 'Activity Approved', ACTIVITY_LISTED: 'Activity Listed', + ACTIVITY_SUBMITED: 'Activity Submitted', }; export const ACTIVITY_AM_DISPLAY_STATUS = { @@ -93,9 +94,10 @@ export const ACTIVITY_AM_DISPLAY_STATUS = { REVISED: 'Revised', ACTIVITY_DRAFT: 'Draft - Activity', - ACTIVITY_NEW: 'To Review', + ACTIVITY_NEW: 'New', + ACTIVITY_TO_REVIEW: 'Activity To Review', ACTIVITY_ENHANCING: 'Enhancing', NOT_LISTED: 'Not Listed', ACTIVITY_LISTED: 'Listed', - ACITIVITY_REVISED:'Activity Revised' + ACTIVITY_REVISED:'Activity Revised' }; diff --git a/src/modules/host/services/host.service.ts b/src/modules/host/services/host.service.ts index a29cc63..678d93e 100644 --- a/src/modules/host/services/host.service.ts +++ b/src/modules/host/services/host.service.ts @@ -2607,18 +2607,18 @@ export class HostService { activityInternalStatus = ACTIVITY_INTERNAL_STATUS.ACTIVITY_SUBMITTED; activityDisplayStatus = ACTIVITY_DISPLAY_STATUS.ACTIVITY_IN_REVIEW; amInternalStatus = ACTIVITY_AM_INTERNAL_STATUS.ACTIVITY_TO_REVIEW; - amDisplayStatus = ACTIVITY_AM_DISPLAY_STATUS.ACITIVITY_REVISED; + amDisplayStatus = ACTIVITY_AM_DISPLAY_STATUS.ACTIVITY_REVISED; } } else { if (isDraft) { activityInternalStatus = ACTIVITY_INTERNAL_STATUS.ACTIVITY_DRAFT; activityDisplayStatus = ACTIVITY_DISPLAY_STATUS.ACTIVITY_DRAFT; - amInternalStatus = ACTIVITY_AM_INTERNAL_STATUS.ACTIVITY_DRAFT; - amDisplayStatus = ACTIVITY_AM_DISPLAY_STATUS.ACTIVITY_DRAFT; + amInternalStatus = existingActivity.amInternalStatus; + amDisplayStatus = existingActivity.amDisplayStatus; } else { activityInternalStatus = ACTIVITY_INTERNAL_STATUS.ACTIVITY_SUBMITTED; activityDisplayStatus = ACTIVITY_DISPLAY_STATUS.ACTIVITY_IN_REVIEW; - amInternalStatus = ACTIVITY_AM_INTERNAL_STATUS.ACTIVITY_TO_REVIEW; + amInternalStatus = ACTIVITY_AM_INTERNAL_STATUS.ACTIVITY_SUBMITED; amDisplayStatus = ACTIVITY_AM_DISPLAY_STATUS.ACTIVITY_NEW; } }