Merge pull request 'Resolve data loading issue in DailyTask by defaulting to first project' (#64) from pramod_Bug#184 into Issue_May_2W
Reviewed-on: #64
This commit is contained in:
commit
7bb7b37b60
@ -32,9 +32,7 @@ const DailyTask = () => {
|
|||||||
// Sync projectId (either from URL or pick first accessible one)
|
// Sync projectId (either from URL or pick first accessible one)
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!project_lodaing && projects.length > 0 && !initialized) {
|
if (!project_lodaing && projects.length > 0 && !initialized) {
|
||||||
if (projectId) {
|
if (selectedProject === 1 || selectedProject === undefined) {
|
||||||
dispatch(setProjectId(projectId));
|
|
||||||
} else if (!selectedProject) {
|
|
||||||
dispatch(setProjectId(projects[0].id));
|
dispatch(setProjectId(projects[0].id));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -77,7 +75,6 @@ const DailyTask = () => {
|
|||||||
selectTask(task);
|
selectTask(task);
|
||||||
openModal();
|
openModal();
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div
|
<div
|
||||||
@ -160,21 +157,26 @@ const DailyTask = () => {
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody className="table-border-bottom-0">
|
<tbody className="table-border-bottom-0">
|
||||||
{TaskLists?.length === 0 && !task_loading && (
|
|
||||||
<tr>
|
|
||||||
<td colSpan={7} className="text-center">
|
|
||||||
No Task Found
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{task_loading && (
|
{task_loading && (
|
||||||
<tr>
|
<tr>
|
||||||
<td colSpan={7} className="text-center">
|
<td colSpan={7} className="text-center">
|
||||||
<p>Loading..</p>
|
<p>Loading..</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
)}
|
)}
|
||||||
|
{project_lodaing && <tr>
|
||||||
|
<td colSpan={7} className="text-center">
|
||||||
|
Loading...
|
||||||
|
</td>
|
||||||
|
</tr>}
|
||||||
|
{TaskLists?.length === 0 && !task_loading && !project_lodaing &&(
|
||||||
|
<tr>
|
||||||
|
<td colSpan={7} className="text-center">
|
||||||
|
No Task Found
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
)}
|
||||||
|
|
||||||
{TaskLists.map((task, index) => {
|
{TaskLists.map((task, index) => {
|
||||||
return (
|
return (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user