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.

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [x] Manual QA for all new/changed functionality
This commit is contained in:
Jahziel Villasana-Espinoza 2024-10-29 12:01:09 -04:00 committed by GitHub
parent eaac61534e
commit 4b14f73e5b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 18 additions and 0 deletions

View file

@ -54,6 +54,15 @@ const PastActivityFeed = ({
<div className={baseClass}>
<div>
{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 (
<ActivityItemComponent

View file

@ -53,6 +53,15 @@ const UpcomingActivityFeed = ({
<div className={baseClass}>
<div>
{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 (