Skip to content

Commit a915941

Browse files
Merge pull request #4380 from OneCommunityGlobal/venkataramanan_fix_generate_summary_intro
Venkataramanan 🔥 summary intro always empty in dev
2 parents 6d5cf70 + c192f8c commit a915941

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

src/components/UserProfile/UserProfile.jsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -493,16 +493,14 @@ function UserProfile(props) {
493493
setUserProfile(profileWithFormattedDates);
494494
setOriginalUserProfile(profileWithFormattedDates);
495495
setIsRehireable(newUserProfile.isRehireable);
496-
setUserStartDate(startDate);
496+
setUserStartDate(profileWithFormattedDates.startDate || '');
497497

498498
// Fetch calculated start date from first time entry
499499
await fetchCalculatedStartDate(userId, newUserProfile);
500500

501501
// run after main profile is loaded
502-
const teamId = newUserProfile?.teams[0]?._id;
503-
if (teamId) {
504-
await loadSummaryIntroDetails(teamId, response.data);
505-
}
502+
const teamId = newUserProfile?.teams?.[0]?._id || null;
503+
await loadSummaryIntroDetails(teamId, response.data);
506504

507505
// Note: Removed automatic getTimeStartDateEntriesByPeriod call to prevent overwriting manual startDate changes
508506
// Users can now toggle between manual and calculated startDate via button
@@ -1517,6 +1515,7 @@ const onAssignProject = assignedProject => {
15171515
['Owner', 'Administrator', 'Manager'].includes(requestorRole) ? (
15181516
<Button
15191517
onClick={() => {
1518+
console.log(summaryIntro)
15201519
navigator.clipboard.writeText(summaryIntro);
15211520
toast.success('Summary Intro Copied!');
15221521
}}

0 commit comments

Comments
 (0)