From 4b14f73e5b972e3d9a7aab9cad5ab5449d75ea9a Mon Sep 17 00:00:00 2001 From: Jahziel Villasana-Espinoza Date: Tue, 29 Oct 2024 12:01:09 -0400 Subject: [PATCH] feat: show "Fleet" as actor on setup experience activities (#23334) > Related issue: #23310 # Checklist for submitter If some of the following don't apply, delete the relevant line. - [x] Manual QA for all new/changed functionality --- .../cards/Activity/PastActivityFeed/PastActivityFeed.tsx | 9 +++++++++ .../UpcomingActivityFeed/UpcomingActivityFeed.tsx | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/frontend/pages/hosts/details/cards/Activity/PastActivityFeed/PastActivityFeed.tsx b/frontend/pages/hosts/details/cards/Activity/PastActivityFeed/PastActivityFeed.tsx index 2321f9674d..4236790d05 100644 --- a/frontend/pages/hosts/details/cards/Activity/PastActivityFeed/PastActivityFeed.tsx +++ b/frontend/pages/hosts/details/cards/Activity/PastActivityFeed/PastActivityFeed.tsx @@ -54,6 +54,15 @@ const PastActivityFeed = ({
{activitiesList.map((activity: IHostPastActivity) => { + // TODO: remove this once we have a proper way of handling "Fleet-initiated" activities in + // the backend. For now, if all these fields are empty, then we assume it was Fleet-initiated. + if ( + !activity.actor_email && + !activity.actor_full_name && + !activity.actor_id + ) { + activity.actor_full_name = "Fleet"; + } const ActivityItemComponent = pastActivityComponentMap[activity.type]; return (
{activitiesList.map((activity: IHostUpcomingActivity) => { + // TODO: remove this once we have a proper way of handling "Fleet-initiated" activities in + // the backend. For now, if all these fields are empty, then we assume it was Fleet-initiated. + if ( + !activity.actor_email && + !activity.actor_full_name && + !activity.actor_id + ) { + activity.actor_full_name = "Fleet"; + } const ActivityItemComponent = upcomingActivityComponentMap[activity.type]; return (