diff --git a/components/LastWeekIssueCard.tsx b/components/LastWeekIssueCard.tsx index 73df7f1..750eb96 100644 --- a/components/LastWeekIssueCard.tsx +++ b/components/LastWeekIssueCard.tsx @@ -88,13 +88,7 @@ export default function LastWeekIssueCard({ <> {/* Issue title */}
-

- {title.length > 100 - ? title.substring(0, 100 - 3) + '...' - : title.trim() === '' - ? 'click to enter title' - : title} -

+

{title}

{/* TODO: 05-07-24 maybe show that there are missing deliverables */}
diff --git a/components/LastWeekIssuePane.tsx b/components/LastWeekIssuePane.tsx index d9c476c..b205def 100644 --- a/components/LastWeekIssuePane.tsx +++ b/components/LastWeekIssuePane.tsx @@ -17,9 +17,7 @@ export default function LastWeekIssuePane({ setPracticeGapData }): JSX.Element { // state variable for showing practice gaps - const [showPracticeGaps, setShowPracticeGaps] = useState( - 'Show Gaps with Details' - ); + const [showPracticeGaps, setShowPracticeGaps] = useState('Show Gaps'); // get the issue from soapData with the given issueId const issueIndex = pastIssuesData.findIndex((issue) => issue.id === issueId); @@ -148,8 +146,6 @@ export default function LastWeekIssuePane({ newPracticeOutcome.currentSprint = currentSprint; } - console.log('newPracticeOutcome', newPracticeOutcome); - setPracticeOutcome(newPracticeOutcome); }; @@ -160,7 +156,7 @@ export default function LastWeekIssuePane({ return { practice: practice.replace('[reflect]', ''), introText: 'Reflect on your own:', - type: 'reflect' + type: 'Reflect After Sprint:' }; } else if (practice.includes('[plan]')) { return { @@ -172,20 +168,20 @@ export default function LastWeekIssuePane({ return { practice: practice.replace('[self-work]', ''), introText: 'On your own, try to:', - type: 'self-work' + type: 'Self-Work' }; } else if (practice.includes('[help]')) { if (practice.includes('mysore')) { return { practice: practice.replace('[help]', ''), introText: 'At Mysore:', - type: 'help' + type: 'At Mysore' }; } else if (practice.includes('pair research')) { return { practice: practice.replace('[help]', ''), introText: 'At Pair Research:', - type: 'help' + type: 'At Pair Research' }; } @@ -256,7 +252,10 @@ export default function LastWeekIssuePane({
{/* Split Pane in half with assesments on 1/3 */}
-
+
+
+ Below are your notes from the last SIG meeting. +

Context for Issue

{/* Context notes on Last Week's Issues */}
@@ -330,7 +329,7 @@ export default function LastWeekIssuePane({
{/* Show practice gaps linked to issue */} -
+

Self-Regulation Gaps for Issue @@ -440,7 +439,7 @@ export default function LastWeekIssuePane({
- Plan Updating Practices + Plan Updates You Suggested
-
Prior Sprint Stories
-
Prior Sprint Deliverables
+
Updated Sprint Stories
+
Updated Sprint Deliverables
{practiceOutcome.currentSprint !== null && ( <> diff --git a/components/PracticeGapCard.tsx b/components/PracticeGapCard.tsx index cded6d7..a28f02e 100644 --- a/components/PracticeGapCard.tsx +++ b/components/PracticeGapCard.tsx @@ -5,7 +5,7 @@ import CheckBadgeIcon from '@heroicons/react/24/outline/CheckBadgeIcon'; import React, { useState, useRef } from 'react'; import { useDrag } from 'react-dnd'; -import { htmlToText, longDate, shortDate } from '../lib/helperFns'; +import { htmlToText, longDate, shortDate, shortenText } from '../lib/helperFns'; import { DragTypes } from '../controllers/draggable/dragTypes'; import ContentEditable from 'react-contenteditable'; import { createNewPracticeGapObject } from '../controllers/practiceGapObjects/createPracticeGapObject'; @@ -259,22 +259,19 @@ export default function PracticeGapCard({ priorInstances && (

- Past items of concern with this practice gap: + Past items of concern with practice gap

{priorInstances.map((instance, idx) => (

- {instance.title} |{' '} + {shortenText(instance.title, 50)} |{' '} {shortDate(new Date(instance.date))}

-

- Context from issue -

{instance.context.map((context, idx) => (
{context.value.trim() !== '' && ( diff --git a/pages/soap-notes/[id].tsx b/pages/soap-notes/[id].tsx index cc1aa8e..8297f3b 100644 --- a/pages/soap-notes/[id].tsx +++ b/pages/soap-notes/[id].tsx @@ -12,7 +12,12 @@ import { DndProvider } from 'react-dnd'; import { HTML5Backend } from 'react-dnd-html5-backend'; // utilities -import { longDate, serializeDates, shortDate } from '../../lib/helperFns'; +import { + longDate, + serializeDates, + shortDate, + shortenText +} from '../../lib/helperFns'; // data models and controllers import { fetchCAPNote } from '../../controllers/capNotes/fetchCAPNotes'; @@ -304,11 +309,10 @@ export default function CAPNote({ {/* Set title of the page to be project name */} - {`${ - noteInfo.project.length > 15 - ? noteInfo.project.substring(0, 15 - 3) + '...' - : noteInfo.project - } | ${new Date(noteInfo.sigDate).toLocaleString().split(',')[0]}`} + {`${shortenText( + noteInfo.project, + 15 + )} | ${new Date(noteInfo.sigDate).toLocaleString().split(',')[0]}`} @@ -528,7 +532,7 @@ export default function CAPNote({
)} - {/* if a last week issue is selected */} + {/* if a current week issue is selected */} {selectedIssue !== null && currentIssuesData.findIndex( (issue) => issue.id === selectedIssue @@ -577,7 +581,7 @@ export default function CAPNote({ )} - {/* if a current week issue is selected */} + {/* if a last week issue is selected */} {selectedIssue !== null && pastIssuesData.findIndex( (issue) => issue.id === selectedIssue