Skip to content

Commit

Permalink
[CHORE] Updating Oregon temporary endpoints (#205) Dev -> Stage (#209)
Browse files Browse the repository at this point in the history
  • Loading branch information
apganapa-adobe authored Nov 11, 2024
2 parents 12a8f18 + 0bcb000 commit 827660c
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 15 deletions.
21 changes: 13 additions & 8 deletions events/blocks/events-form/events-form.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { LIBS, getMetadata, getSusiOptions } from '../../scripts/utils.js';
import HtmlSanitizer from '../../scripts/deps/html-sanitizer.js';
import { deleteAttendeeFromEvent, getAndCreateAndAddAttendee, getEvent } from '../../scripts/esp-controller.js';
import { deleteAttendeeFromEvent, getAndCreateAndAddAttendee, getAttendee, getEvent } from '../../scripts/esp-controller.js';
import BlockMediator from '../../scripts/deps/block-mediator.min.js';
import { miloReplaceKey, signIn } from '../../scripts/content-update.js';
import decorateArea from '../../scripts/scripts.js';
Expand Down Expand Up @@ -548,11 +548,13 @@ function personalizeForm(form, data) {
if (!data || !form) return;

Object.entries(data).forEach(([key, value]) => {
const matchedInput = form.querySelector(`#${snakeToCamel(key)}`);
if (matchedInput && value && !matchedInput.value) {
matchedInput.value = value;
matchedInput.disabled = true;
}
Object.entries(value).forEach(([k, v]) => {
const matchedInput = form.querySelector(`#${snakeToCamel(k)}`);
if (matchedInput && v && !matchedInput.v) {
matchedInput.value = v;
if (key === 'profile') matchedInput.disabled = true;
}
});
});
}

Expand All @@ -576,7 +578,7 @@ async function buildEventform(bp, formData) {
}
}

function initFormBasedOnRSVPData(bp) {
async function initFormBasedOnRSVPData(bp) {
const validRegistrationStatus = ['registered', 'waitlisted'];
const { block } = bp;
const profile = BlockMediator.get('imsProfile');
Expand All @@ -586,7 +588,10 @@ function initFormBasedOnRSVPData(bp) {
showSuccessMsgFirstScreen(bp);
eventFormSendAnalytics(bp, 'Confirmation Modal View');
} else {
personalizeForm(block, profile);
let existingAttendeeData = {};
const attendeeResp = await getAttendee();
if (attendeeResp.ok) existingAttendeeData = attendeeResp.data;
personalizeForm(block, { profile, existingAttendeeData });
}

BlockMediator.subscribe('rsvpData', ({ newValue }) => {
Expand Down
Binary file added events/img/favicons/android-chrome-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added events/img/favicons/android-chrome-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified events/img/favicons/favicon-180.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed events/img/favicons/favicon-192.png
Binary file not shown.
Binary file removed events/img/favicons/favicon-512.png
Binary file not shown.
Binary file modified events/img/favicons/favicon.ico
Binary file not shown.
1 change: 0 additions & 1 deletion events/img/favicons/favicon.svg

This file was deleted.

21 changes: 16 additions & 5 deletions events/img/favicons/favicon.webmanifest
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
{
"name": "Milo College",
"display": "standalone",
"name": "",
"short_name": "",
"icons": [
{ "src": "/img/favicons/favicon-192.png", "sizes": "192x192", "type": "image/png" },
{ "src": "/img/favicons/favicon-512.png", "sizes": "512x512", "type": "image/png" }
]
{
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone"
}
2 changes: 1 addition & 1 deletion events/scripts/esp-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const API_CONFIG = {
esp: {
dev: { host: 'https://wcms-events-service-platform-deploy-ethos102-stage-caff5f.stage.cloud.adobe.io' },
dev02: { host: 'https://wcms-events-service-platform-deploy-ethos102-stage-c81eb6.stage.cloud.adobe.io' },
stage: { host: 'https://events-service-platform-stage.adobe.io' },
stage: { host: 'https://events-service-platform-stage-or2.adobe.io' },
stage02: { host: 'https://events-service-platform-stage02.adobe.io' },
prod: { host: 'https://events-service-platform.adobe.io' },
},
Expand Down

0 comments on commit 827660c

Please sign in to comment.