diff --git a/FRONTEND/src/pages/Profile/Profile.module.css b/FRONTEND/src/pages/Profile/Profile.module.css index 2197c80..b73a3b3 100644 --- a/FRONTEND/src/pages/Profile/Profile.module.css +++ b/FRONTEND/src/pages/Profile/Profile.module.css @@ -144,7 +144,7 @@ padding-left: 5px; padding-top: 5px; padding-bottom: 5px; - margin-left: 20px; + /* margin-left: 20px; */ transition: background-color 0.3s; } @@ -153,7 +153,7 @@ } .criteriaTable { - padding-left: 55px; /* Further indentation for the criteria table */ + padding-left: 35px; /* Further indentation for the criteria table */ } .link { diff --git a/FRONTEND/src/pages/Profile/Profile.tsx b/FRONTEND/src/pages/Profile/Profile.tsx index 53e3dd0..aca27f1 100644 --- a/FRONTEND/src/pages/Profile/Profile.tsx +++ b/FRONTEND/src/pages/Profile/Profile.tsx @@ -44,18 +44,22 @@ const CriteriaTable = ({ data }: { data: TableRow[] }) => ( - Criteria - Note - Created by - Point + + Criteria + + Note + + Created by + + Point {data.map((row, index) => ( - {row.criteria} - {row.note} - {row.createdBy} + {row.criteria} + {row.note} + {row.createdBy} {row.point} ))} diff --git a/FRONTEND/src/pages/SprintReview/SprintReview.tsx b/FRONTEND/src/pages/SprintReview/SprintReview.tsx index dd82d79..de03413 100644 --- a/FRONTEND/src/pages/SprintReview/SprintReview.tsx +++ b/FRONTEND/src/pages/SprintReview/SprintReview.tsx @@ -206,8 +206,6 @@ const SprintReview = () => { setLoading(false) } }, [filter]) - // console.log(criteriaSprint, 'criteriaSprint') - // console.log(criteriaUsers, 'criteriaUsers') const getAll = () => { const fetchData = async () => { @@ -255,7 +253,6 @@ const SprintReview = () => { const rowStyle = { height: '30px', // Điều chỉnh chiều cao hàng } - // console.log(filter, 'filter') const handleInputChange = ( index: number, @@ -335,7 +332,7 @@ const SprintReview = () => { searchable clearable w="60%" - value={filter.project} + value={filter.project || null} size="xs" label="" data={dataProject.map((project) => ({ @@ -343,7 +340,18 @@ const SprintReview = () => { label: project.name, }))} onChange={(e) => { - setFilter({ ...filter, project: e! }) + if (e === null) { + // Clear project + setFilter({ project: '', sprint: '' }) // Clear cả project và sprint + setDataSprint([]) // Reset dataSprint để không hiển thị các giá trị sprint cũ + setInfoBoard('') + setIsDisabledSprint(true) // Vô hiệu hóa Select của sprint + } else { + // Chọn project mới + setFilter({ project: e, sprint: '' }) // Clear sprint khi chọn project mới + setDataSprint([]) // Xóa dữ liệu sprint khi đổi project + setIsDisabledSprint(true) // Vô hiệu hóa lại Select sprint cho đến khi load xong + } }} > { searchable clearable w="40%" - value={filter.sprint} + value={filter.sprint || null} // Đảm bảo rằng nếu filter.sprint trống, thì giá trị sẽ là null size="xs" ml={'sm'} label="" diff --git a/FRONTEND/src/pages/TestReport/TestReport.tsx b/FRONTEND/src/pages/TestReport/TestReport.tsx index 5f5ed28..5a1913a 100644 --- a/FRONTEND/src/pages/TestReport/TestReport.tsx +++ b/FRONTEND/src/pages/TestReport/TestReport.tsx @@ -323,7 +323,7 @@ const TestReport = () => { searchable clearable w="60%" - value={filter.project} + value={filter.project || null} size="xs" label="" data={dataProject.map((project) => ({ @@ -331,7 +331,18 @@ const TestReport = () => { label: project.name, }))} onChange={(e) => { - setFilter({ ...filter, project: e! }) + if (e === null) { + // Clear project + setFilter({ project: '', sprint: '' }) // Clear cả project và sprint + setDataSprint([]) // Reset dataSprint để không hiển thị các giá trị sprint cũ + setInfoBoard('') + setIsDisabledSprint(true) // Vô hiệu hóa Select của sprint + } else { + // Chọn project mới + setFilter({ project: e, sprint: '' }) // Clear sprint khi chọn project mới + setDataSprint([]) // Xóa dữ liệu sprint khi đổi project + setIsDisabledSprint(true) // Vô hiệu hóa lại Select sprint cho đến khi load xong + } }} > { searchable clearable w="40%" - value={filter.sprint} + value={filter.sprint || null} // Đảm bảo rằng nếu filter.sprint trống, thì giá trị sẽ là null size="xs" ml={'sm'} label=""