Skip to content

Commit a002caf

Browse files
Changes the Casing of the project status to accept any input, added a classname to the main div and css style properties
1 parent 3fdfe59 commit a002caf

File tree

4 files changed

+45
-9
lines changed

4 files changed

+45
-9
lines changed

web/src/App.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ function App() {
5050
{
5151
id: `T${prevTaskInfo.length + 1}`,
5252
ProjectTask: taskName,
53-
ProjectStatus: ProjectStatus,
53+
ProjectStatus: ProjectStatus.toLowerCase(),
5454
date: deadline,
5555
participants: participants.split(','),
5656
project: projectName,

web/src/components/domains/New-Task/new-task.jsx

+17-5
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ const NewTaskForm = ({ handleButton }) => {
1616
return (
1717
<div className={styles.taskBox}>
1818
<div className={styles.Box}>
19-
<label htmlFor="taskName">Task Name: </label>
19+
<label className={styles.label} htmlFor="taskName">
20+
Task Name:{' '}
21+
</label>
2022
<input
2123
type="text"
2224
value={textTask}
@@ -26,7 +28,9 @@ const NewTaskForm = ({ handleButton }) => {
2628
/>
2729
</div>
2830
<div className={styles.Box}>
29-
<label htmlFor="projectName">Project Name: </label>
31+
<label className={styles.label} htmlFor="projectName">
32+
Project Name:{' '}
33+
</label>
3034
<input
3135
type="text"
3236
value={textProject}
@@ -36,7 +40,9 @@ const NewTaskForm = ({ handleButton }) => {
3640
/>
3741
</div>
3842
<div className={styles.Box}>
39-
<label htmlFor="state">Project Status: </label>
43+
<label className={styles.label} htmlFor="state">
44+
Project Status:{' '}
45+
</label>
4046
<input
4147
type="text"
4248
value={ProjectStatus}
@@ -45,8 +51,11 @@ const NewTaskForm = ({ handleButton }) => {
4551
onChange={(e) => setProjectStatus(e.target.value)}
4652
/>
4753
</div>
54+
4855
<div className={styles.Box}>
49-
<label htmlFor="participants">Assign Participants: </label>
56+
<label className={styles.label} htmlFor="participants">
57+
Assign Participants:{' '}
58+
</label>
5059
<input
5160
type="text"
5261
value={participants}
@@ -55,8 +64,11 @@ const NewTaskForm = ({ handleButton }) => {
5564
onChange={(e) => setParticipants(e.target.value)}
5665
/>
5766
</div>
67+
5868
<div className={styles.Box}>
59-
<label htmlFor="date">Pick Deadline:</label>
69+
<label className={styles.label} htmlFor="date">
70+
Pick Deadline:
71+
</label>
6072
<input
6173
value={deadline}
6274
type="date"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
.taskName,
2+
.projectNameInput,
3+
.status,
4+
.date,
5+
.participants {
6+
width: 300px;
7+
height: 3vh;
8+
border: 2px solid grey;
9+
}
10+
11+
.clickButton {
12+
background-color: red;
13+
width: 100px;
14+
height: 30px;
15+
}
16+
17+
.Box {
18+
margin-bottom: 20px;
19+
}
20+
21+
.label {
22+
font-size: 25px;
23+
font-weight: 500;
24+
}

web/src/components/domains/task/TaskItem/TaskItem.jsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ import ParticipantIcon from '../../../Icons/participantIcon';
55

66
function TaskItem(props) {
77
const colorState = () => {
8-
if (props.ProjectStatus === 'Low') {
8+
if (props.ProjectStatus.toLowerCase() === 'low') {
99
return styles.buttonGreen;
1010
}
11-
if (props.ProjectStatus === 'Medium') {
11+
if (props.ProjectStatus.toLowerCase() === 'medium') {
1212
return styles.buttonOrange;
1313
}
14-
if (props.ProjectStatus === 'High') {
14+
if (props.ProjectStatus.toLowerCase() === 'high') {
1515
return styles.buttonRed;
1616
}
1717
};

0 commit comments

Comments
 (0)