Refactor: update placeholder text for filter name and replace label colors with project colors in ProjectModal

This commit is contained in:
Mo Tarbin
2026-02-02 19:32:25 -05:00
parent 27210317fd
commit c3431b0921
3 changed files with 9 additions and 19 deletions

View File

@@ -489,7 +489,7 @@ const AdvancedFilterBuilder = ({
Filter Name
</Typography>
<Input
placeholder='e.g., High Priority Tasks for Team'
placeholder='e.g. Important Tasks due soon, Tasks for John, etc.'
value={filterName}
onChange={e => {
setFilterName(e.target.value)

View File

@@ -13,7 +13,7 @@ import {
} from '@mui/joy'
import { useEffect, useState } from 'react'
import { useResponsiveModal } from '../../../hooks/useResponsiveModal'
import LABEL_COLORS, {
import PROJECT_COLORS, {
getTextColorFromBackgroundColor,
} from '../../../utils/Colors'
import PROJECT_ICONS, { getIconComponent } from '../../../utils/ProjectIcons'
@@ -27,7 +27,7 @@ const ProjectModal = ({ isOpen, onClose, onSave, project }) => {
const { ResponsiveModal } = useResponsiveModal()
const [projectName, setProjectName] = useState('')
const [projectDescription, setProjectDescription] = useState('')
const [projectColor, setProjectColor] = useState(LABEL_COLORS[0].value)
const [projectColor, setProjectColor] = useState(PROJECT_COLORS[0].value)
const [projectIcon, setProjectIcon] = useState(PROJECT_ICONS[0].value)
const [error, setError] = useState('')
const [isIconPickerOpen, setIsIconPickerOpen] = useState(false)
@@ -42,13 +42,13 @@ const ProjectModal = ({ isOpen, onClose, onSave, project }) => {
// Editing existing project
setProjectName(project.name || '')
setProjectDescription(project.description || '')
setProjectColor(project.color || LABEL_COLORS[0].value)
setProjectColor(project.color || PROJECT_COLORS[0].value)
setProjectIcon(project.icon || PROJECT_ICONS[0].value)
} else {
// Creating new project
setProjectName('')
setProjectDescription('')
setProjectColor(LABEL_COLORS[0].value)
setProjectColor(PROJECT_COLORS[0].value)
setProjectIcon(PROJECT_ICONS[0].value)
}
setError('')
@@ -240,7 +240,7 @@ const ProjectModal = ({ isOpen, onClose, onSave, project }) => {
</Typography>
)}
>
{LABEL_COLORS.map(color => (
{PROJECT_COLORS.map(color => (
<Option key={color.value} value={color.value}>
<Box className='flex items-center justify-between'>
<Box

View File

@@ -1,13 +1,5 @@
import { Add, EditNotifications } from '@mui/icons-material'
import {
Avatar,
Box,
Button,
Input,
Option,
Select,
Typography,
} from '@mui/joy'
import { Box, Button, Input, Option, Select, Typography } from '@mui/joy'
import { FormControl } from '@mui/material'
import * as chrono from 'chrono-node'
import moment from 'moment'
@@ -15,9 +7,7 @@ import { useCallback, useEffect, useRef, useState } from 'react'
import { useResponsiveModal } from '../../hooks/useResponsiveModal'
import { useCreateChore } from '../../queries/ChoreQueries'
import { useCircleMembers, useUserProfile } from '../../queries/UserQueries'
import { getTextColorFromBackgroundColor } from '../../utils/Colors.jsx'
import { isPlusAccount } from '../../utils/Helpers'
import { getIconComponent } from '../../utils/ProjectIcons'
import { useLabels } from '../Labels/LabelQueries'
import { useProjects } from '../Projects/ProjectQueries'
import {
@@ -870,7 +860,7 @@ const TaskInput = ({ autoFocus, onChoreUpdate, isModalOpen, onClose }) => {
</FormControl>
)}
</Box>
{projects.length >= 1 && (
{/* {projects.length >= 1 && (
<FormControl>
<Typography level='body-sm'>Project</Typography>
<Select
@@ -938,7 +928,7 @@ const TaskInput = ({ autoFocus, onChoreUpdate, isModalOpen, onClose }) => {
))}
</Select>
</FormControl>
)}
)} */}
<Box
sx={{
marginTop: 2,