Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 56 additions & 43 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"@adobe/spacecat-shared-athena-client": "1.9.12",
"@adobe/spacecat-shared-brand-client": "1.1.42",
"@adobe/spacecat-shared-content-client": "1.8.24",
"@adobe/spacecat-shared-data-access": "3.65.0",
"@adobe/spacecat-shared-data-access": "3.68.0",
"@adobe/spacecat-shared-data-access-v2": "npm:@adobe/spacecat-shared-data-access@2.109.0",
"@adobe/spacecat-shared-drs-client": "1.7.2",
"@adobe/spacecat-shared-gpt-client": "1.6.23",
Expand Down
13 changes: 11 additions & 2 deletions src/controllers/plg/plg-onboarding.js
Original file line number Diff line number Diff line change
Expand Up @@ -1699,6 +1699,8 @@ function PlgOnboardingController(ctx) {
* - UPHELD: transition to REJECTED (terminal)
* - CLOSED: retire the current domain to OUTDATED and onboard an alternate domain
* (requires siteConfig.alternateDomain for DOMAIN_ALREADY_ASSIGNED reason)
* - PENDING: record that an ESE is actively working on this (e.g. emailed customer)
* without changing the status; reviewedBy identifies who is handling it
* REOPENED and OFFBOARDED are handled by transitionStatus
* (PATCH /plg/onboard/:onboardingId/status).
*/
Expand All @@ -1725,6 +1727,7 @@ function PlgOnboardingController(ctx) {

const allowedDecisions = [
REVIEW_DECISIONS.BYPASSED, REVIEW_DECISIONS.UPHELD, REVIEW_DECISIONS.CLOSED,
REVIEW_DECISIONS.PENDING,
];
if (!hasText(decision) || !allowedDecisions.includes(decision)) {
return badRequest(`decision must be one of: ${allowedDecisions.join(', ')}`);
Expand Down Expand Up @@ -1765,13 +1768,19 @@ function PlgOnboardingController(ctx) {
const updatedReviews = [...existingReviews, reviewEntry];
onboarding.setReviews(updatedReviews);

onboarding.setUpdatedBy(reviewedBy);

// PENDING: record ESE action without changing status (e.g. emailed customer)
if (decision === REVIEW_DECISIONS.PENDING) {
Comment thread
anshulk-public marked this conversation as resolved.
await onboarding.save();
return ok(PlgOnboardingDto.toAdminJSON(onboarding));
}

const checkKey = deriveCheckKey(onboarding);
if (!checkKey) {
return badRequest('Unable to determine the review reason from the onboarding record');
}

onboarding.setUpdatedBy(reviewedBy);

// UPHOLD: reject the domain — transition to REJECTED (terminal)
if (decision === REVIEW_DECISIONS.UPHELD) {
onboarding.setStatus(STATUSES.REJECTED);
Expand Down
Loading
Loading