diff --git a/src/components/WeeklySummariesReport/BioFunction.jsx b/src/components/WeeklySummariesReport/BioFunction.jsx index 9f1cb870bd..e3d8d06f8a 100644 --- a/src/components/WeeklySummariesReport/BioFunction.jsx +++ b/src/components/WeeklySummariesReport/BioFunction.jsx @@ -1,13 +1,14 @@ /* eslint-disable no-nested-ternary */ import { useState } from 'react'; -import styles from './WeeklySummariesReport.module.scss'; import ToggleSwitch from '../UserProfile/UserProfileEdit/ToggleSwitch'; +import PropTypes from 'prop-types'; +import styles from './WeeklySummariesReport.module.scss'; function BioFunction(props) { const { bioPosted, totalTangibleHrs, - daysInTeam, + totalValidWeeklySummaries, textColors, summary, bioCanEdit, @@ -17,7 +18,8 @@ function BioFunction(props) { const [bioStatus, setBioStatus] = useState(bioPosted); - const isMeetCriteria = totalTangibleHrs > 80 && daysInTeam > 60 && bioPosted !== 'posted'; + const isMeetCriteria = + totalTangibleHrs > 80 && totalValidWeeklySummaries >= 8 && bioPosted !== 'posted'; const style = { color: textColors[summary?.weeklySummaryOption] || textColors.Default, }; @@ -26,7 +28,7 @@ function BioFunction(props) {
@@ -447,7 +462,7 @@ function WeeklySummaryMessage({ summary, weekIndex }) { const summaryContent = (() => { if (summaryText) { const style = { - color: textColors[summary?.weeklySummaryOption] || textColors.Default, + color: textColors[summary?.weeklySummaryOption] || (darkMode ? '#ffffff' : '#000000'), }; if (currentSummary?.uploadDate) { @@ -614,7 +629,7 @@ function MediaUrlLink({ summary }) { function TotalValidWeeklySummaries({ summary, canEditSummaryCount, darkMode }) { const style = { - color: textColors[summary?.weeklySummaryOption] || textColors.Default, + color: textColors[summary?.weeklySummaryOption] || (darkMode ? '#ffffff' : '#000000'), }; const [weeklySummariesCount, setWeeklySummariesCount] = useState( @@ -735,7 +750,7 @@ function BioSwitch({ userId, bioPosted, summary, getWeeklySummariesReport }) { ); } -function BioLabel({ bioPosted, summary }) { +function BioLabel({ bioPosted, summary, isMeetCriteria }) { const style = { color: textColors[summary?.weeklySummaryOption] || textColors.Default, }; @@ -749,7 +764,7 @@ function BioLabel({ bioPosted, summary }) { text = 'Requested'; } return ( -