From 925fe44ecc179ae976623a80b71533b8e6f5a262 Mon Sep 17 00:00:00 2001 From: Anahis Valenzuela Date: Wed, 24 Jan 2024 19:11:28 -0800 Subject: [PATCH 1/3] display_object function excludes Hack4LA and test events --- assets/js/utility/api-events.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/js/utility/api-events.js b/assets/js/utility/api-events.js index fcff75a316..70f594ccd7 100644 --- a/assets/js/utility/api-events.js +++ b/assets/js/utility/api-events.js @@ -147,7 +147,7 @@ function convertTime12to24(time12h) { * Function that represent the individual object extracted from the api */ function display_object(item) { - if (item && item.project) { + if (item && item.project.name && (item.project.name !== "Hack4LA" && item.project.name !== "test")) { const rv_object = { meetingName: item.name, name: item.project.name, @@ -155,7 +155,7 @@ function display_object(item) { start: localeTimeIn12Format(item.startTime), end: localeTimeIn12Format(item.endTime), hflaWebsiteUrl: item.project.hflaWebsiteUrl, - githubUrl: item.project.githubUrl, + githubUrl: item.project.githubUrl, }; return rv_object; } From 8a26d5f25e2aa1af4ec4503ea712cd60477fef5b Mon Sep 17 00:00:00 2001 From: Anahis Valenzuela <74325966+Anahisv23@users.noreply.github.com> Date: Mon, 29 Jan 2024 16:29:08 -0800 Subject: [PATCH 2/3] Update api-events.js Updated the if condition to include the chaining suggestion line 150. --- assets/js/utility/api-events.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/js/utility/api-events.js b/assets/js/utility/api-events.js index 70f594ccd7..4ceae639aa 100644 --- a/assets/js/utility/api-events.js +++ b/assets/js/utility/api-events.js @@ -147,7 +147,7 @@ function convertTime12to24(time12h) { * Function that represent the individual object extracted from the api */ function display_object(item) { - if (item && item.project.name && (item.project.name !== "Hack4LA" && item.project.name !== "test")) { + if (item?.project?.name !== "Hack4LA" && item?.project?.name !== "test") { const rv_object = { meetingName: item.name, name: item.project.name, From 879ee001d6faaf0d05f572773d4d4f3636515c61 Mon Sep 17 00:00:00 2001 From: Anahis Valenzuela <74325966+Anahisv23@users.noreply.github.com> Date: Tue, 30 Jan 2024 13:23:19 -0800 Subject: [PATCH 3/3] Updated if statement on api-events.js to handle Test - Update Name Prod --- assets/js/utility/api-events.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/js/utility/api-events.js b/assets/js/utility/api-events.js index 4ceae639aa..09398dabff 100644 --- a/assets/js/utility/api-events.js +++ b/assets/js/utility/api-events.js @@ -147,7 +147,7 @@ function convertTime12to24(time12h) { * Function that represent the individual object extracted from the api */ function display_object(item) { - if (item?.project?.name !== "Hack4LA" && item?.project?.name !== "test") { + if (item?.project?.name !== "Hack4LA" && !/^Test\b/i.test(item?.project?.name)) { const rv_object = { meetingName: item.name, name: item.project.name,