Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unmask some UI elements #827

Merged
merged 1 commit into from
Feb 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/caretogether-pwa/src/Activities/ActivityTimeline.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export function ActivityTimeline({ family }: ActivityTimelineProps) {
}}
>
<Box sx={{ color: 'text.disabled', margin: 0, padding: 0 }}>
<span style={{ marginRight: 16 }}>
<span className="ph-unmask" style={{ marginRight: 16 }}>
{format(activity.activityTimestampUtc!, 'M/d/yy h:mm a')}
</span>
<PersonName person={userLookup(activity.userId)} />
Expand Down
64 changes: 51 additions & 13 deletions src/caretogether-pwa/src/Families/FamilyScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ export function FamilyScreen() {
<Toolbar variant="dense" disableGutters={true}>
{permissions(Permission.UploadFamilyDocuments) && (
<Button
className="ph-unmask"
onClick={() => setUploadDocumentDialogOpen(true)}
variant="contained"
size="small"
Expand All @@ -311,6 +312,7 @@ export function FamilyScreen() {
)}
{permissions(Permission.EditFamilyInfo) && (
<Button
className="ph-unmask"
onClick={() => setAddAdultDialogOpen(true)}
variant="contained"
size="small"
Expand All @@ -322,6 +324,7 @@ export function FamilyScreen() {
)}
{permissions(Permission.EditFamilyInfo) && (
<Button
className="ph-unmask"
onClick={() => setAddChildDialogOpen(true)}
variant="contained"
size="small"
Expand All @@ -333,6 +336,7 @@ export function FamilyScreen() {
)}
{permissions(Permission.AddEditDraftNotes) && (
<Button
className="ph-unmask"
onClick={() => setAddNoteDialogOpen(true)}
variant="contained"
size="small"
Expand Down Expand Up @@ -497,6 +501,7 @@ export function FamilyScreen() {

<Grid item xs={12}>
<Typography
className="ph-unmask"
variant="h3"
style={{ marginTop: 0, marginBottom: 0 }}
>
Expand Down Expand Up @@ -549,7 +554,9 @@ export function FamilyScreen() {
}}
>
{' '}
<Typography variant="h3">Referrals</Typography>
<Typography className="ph-unmask" variant="h3">
Referrals
</Typography>
</FormLabel>
<RadioGroup
aria-labelledby="demo-radio-buttons-group-label"
Expand All @@ -561,12 +568,19 @@ export function FamilyScreen() {
key={referral!.id}
value={referral!.id}
label={
referral!.closedAtUtc
? `Referral Closed ${format(
referral!.closedAtUtc!,
'M/d/yy'
)}`
: 'Open Referral'
referral!.closedAtUtc ? (
<>
<span className="ph-unmask">
Referral Closed{' '}
</span>

<span>
{format(referral!.closedAtUtc!, 'M/d/yy')}
</span>
</>
) : (
<span className="ph-unmask">Open Referral</span>
)
}
control={<Radio />}
onChange={() => setSelectedReferralId(referral!.id)}
Expand Down Expand Up @@ -620,6 +634,7 @@ export function FamilyScreen() {
selectedReferral?.id?.toString() ==
family.partneringFamilyInfo?.openReferral?.id?.toString() && (
<Button
className="ph-unmask"
onClick={() => setCloseReferralDialogOpen(true)}
variant="contained"
size="small"
Expand All @@ -631,6 +646,7 @@ export function FamilyScreen() {
{!family.partneringFamilyInfo?.openReferral &&
permissions(Permission.CreateReferral) && (
<Button
className="ph-unmask"
onClick={() => setOpenNewReferralDialogOpen(true)}
variant="contained"
size="small"
Expand Down Expand Up @@ -674,7 +690,11 @@ export function FamilyScreen() {
selectedReferral && (
<>
<Grid item xs={12} sm={6} md={4} style={{ paddingRight: 20 }}>
<Typography variant="h3" style={{ marginBottom: 0 }}>
<Typography
className="ph-unmask"
variant="h3"
style={{ marginBottom: 0 }}
>
Incomplete
</Typography>
{selectedReferral?.missingRequirements?.map(
Expand All @@ -689,7 +709,11 @@ export function FamilyScreen() {
)}
</Grid>
<Grid item xs={12} sm={6} md={4} style={{ paddingRight: 20 }}>
<Typography variant="h3" style={{ marginBottom: 0 }}>
<Typography
className="ph-unmask"
variant="h3"
style={{ marginBottom: 0 }}
>
Completed
</Typography>
{selectedReferral?.completedRequirements?.map(
Expand Down Expand Up @@ -759,7 +783,9 @@ export function FamilyScreen() {
</Box>
</Grid>
<Grid item xs={12} sm={6} md={4} style={{ paddingRight: 20 }}>
<Typography variant="h3">Incomplete</Typography>
<Typography className="ph-unmask" variant="h3">
Incomplete
</Typography>
{family.volunteerFamilyInfo?.missingRequirements?.map(
(missing, i) => (
<MissingRequirementRow
Expand All @@ -782,7 +808,9 @@ export function FamilyScreen() {
)}
</Grid>
<Grid item xs={12} sm={6} md={4} style={{ paddingRight: 20 }}>
<Typography variant="h3">Completed</Typography>
<Typography className="ph-unmask" variant="h3">
Completed
</Typography>
{family.volunteerFamilyInfo?.completedRequirements?.map(
(completed, i) => (
<CompletedRequirementRow
Expand All @@ -806,7 +834,11 @@ export function FamilyScreen() {
)}
{permissions(Permission.ViewFamilyDocumentMetadata) && (
<Grid item xs={12} sm={6} md={4}>
<Typography variant="h3" style={{ marginBottom: 0 }}>
<Typography
className="ph-unmask"
variant="h3"
style={{ marginBottom: 0 }}
>
Documents
</Typography>
<FamilyDocuments family={family} />
Expand All @@ -833,6 +865,7 @@ export function FamilyScreen() {
}}
>
<Typography
className="ph-unmask"
variant="h3"
style={{
margin: 0,
Expand Down Expand Up @@ -864,6 +897,7 @@ export function FamilyScreen() {
(arrangementPolicy) => (
<Box key={arrangementPolicy.arrangementType}>
<Button
className="ph-unmask"
onClick={() =>
setCreateArrangementDialogParameter(
arrangementPolicy
Expand Down Expand Up @@ -901,7 +935,11 @@ export function FamilyScreen() {
</Grid>
)}
<Grid item xs={12}>
<Typography variant="h3" style={{ marginBottom: 0 }}>
<Typography
className="ph-unmask"
variant="h3"
style={{ marginBottom: 0 }}
>
Family Members
</Typography>
<Masonry
Expand Down
10 changes: 8 additions & 2 deletions src/caretogether-pwa/src/Families/PrimaryContactEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,17 @@ export function PrimaryContactEditor({ family }: PrimaryContactEditorProps) {
<Box>
{primaryContactPersonDeleted && (
<>
<Chip size="medium" label={'No primary contact!'} color="error" />
<Chip
className="ph-unmask"
size="medium"
label={'No primary contact!'}
color="error"
/>
<br />
</>
)}
Primary Contact: <PersonName person={primaryContactPerson} />
<span className="ph-unmask">Primary Contact:</span>{' '}
<PersonName person={primaryContactPerson} />
{permissions(Permission.EditFamilyInfo) && editor.editButton}
</Box>
);
Expand Down
2 changes: 1 addition & 1 deletion src/caretogether-pwa/src/Generic/CustomFieldEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export function CustomFieldEditor({
return (
<Box style={{ margin: 0 }}>
<span>
{customFieldPolicy.name}:&nbsp;
<span className="ph-unmask">{customFieldPolicy.name}:</span>&nbsp;
{editor.editing ? (
type === CustomFieldType.Boolean ? (
<>
Expand Down
3 changes: 3 additions & 0 deletions src/caretogether-pwa/src/Notes/NoteCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export function NoteCard({ familyId, note }: NoteCardProps) {
<CardActions sx={{ paddingTop: 0 }}>
{permissions(Permission.DiscardDraftNotes) && (
<Button
className="ph-unmask"
onClick={() => setShowDiscardNoteDialog(true)}
variant="contained"
size="small"
Expand All @@ -72,6 +73,7 @@ export function NoteCard({ familyId, note }: NoteCardProps) {
)}
{permissions(Permission.AddEditDraftNotes) && (
<Button
className="ph-unmask"
onClick={() => setShowEditNoteDialog(true)}
variant="contained"
size="small"
Expand All @@ -83,6 +85,7 @@ export function NoteCard({ familyId, note }: NoteCardProps) {
)}
{permissions(Permission.ApproveNotes) && (
<Button
className="ph-unmask"
onClick={() => setShowApproveNoteDialog(true)}
variant="contained"
size="small"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ function ArrangementPlannedDuration({
}, arrangement.plannedEndUtc || null);

return (
<Stack direction="column" sx={{ clear: 'both' }}>
<Stack className="ph-unmask" direction="column" sx={{ clear: 'both' }}>
<Box>
<span>Planned start:&nbsp;</span>
{!summaryOnly && permissions(Permission.EditArrangement) ? (
Expand Down Expand Up @@ -665,7 +665,11 @@ export function ArrangementCard({
</TableContainer>
{arrangement.phase !== ArrangementPhase.Cancelled && (
<>
<Typography variant="body2" component="div">
<Typography
className="ph-unmask"
variant="body2"
component="div"
>
{completedRequirementsWithContext.map((x, i) => (
<CompletedRequirementRow
key={`${x.completed.completedRequirementId}:${i}`}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export function ArrangementCardTitle({

return (
<>
<span>{arrangement.arrangementType}</span>
<span className="ph-unmask">{arrangement.arrangementType}</span>
{summaryOnly && (
<span style={{ marginLeft: 40, float: 'right' }}>
{arrangement.phase === ArrangementPhase.Cancelled
Expand All @@ -71,7 +71,7 @@ export function ArrangementCardTitle({
</span>
)}
{!summaryOnly && (
<span style={{ marginLeft: 0, float: 'right' }}>
<span className="ph-unmask" style={{ marginLeft: 0, float: 'right' }}>
{arrangement.phase === ArrangementPhase.Cancelled ? (
`Cancelled ${formatRelative(arrangement.cancelledAtUtc!, now)}`
) : arrangement.phase === ArrangementPhase.SettingUp ? (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ export function ArrangementFunctionRow({
<>
<TableRow key={functionPolicy.functionName}>
<TableCell
className="ph-unmask"
sx={{ padding: 0 }}
colSpan={assignments.length === 0 ? 2 : 1}
valign="top"
Expand Down
6 changes: 5 additions & 1 deletion src/caretogether-pwa/src/Referrals/ReferralComments.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ export function ReferralComments({

return permissions(Permission.ViewReferralComments) ? (
<Box sx={{ display: 'flex', flexDirection: 'row', alignItems: 'center' }}>
<Typography variant="h3" style={{ marginBottom: 0 }}>
<Typography
className="ph-unmask"
variant="h3"
style={{ marginBottom: 0 }}
>
Comments
{permissions(Permission.EditReferral) && (
<>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export function CompletedRequirementRow({
}
>
<>
<span>
<span className="ph-unmask">
{requirement.requirementName}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{requirement.completedAtUtc && (
<span style={{ float: 'right' }}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export function MissingRequirementRow({
icon={isAvailableApplication ? '💤' : '❌'}
onClick={canComplete || canExempt ? dialogHandle.openDialog : undefined}
>
{requirement}
<span className="ph-unmask">{requirement}</span>
{policyVersion && (
<Chip
label={policyVersion}
Expand Down