Added row background color and also changed message on report submit
This commit is contained in:
parent
25127659c8
commit
a60cd6b1a9
@ -175,3 +175,7 @@
|
||||
.text-darkgreen {
|
||||
color: #16a085;
|
||||
}
|
||||
|
||||
.table-row-header {
|
||||
background-color: #efefef;
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ export const ReportTask = ({ report, closeModal, refetch }) => {
|
||||
};
|
||||
|
||||
let response = await TasksRepository.reportTask(reportData);
|
||||
showToast("succesfully", "success");
|
||||
showToast("Task reported successfully.", "success");
|
||||
refetch();
|
||||
closeModal();
|
||||
} catch (error) {
|
||||
|
@ -32,13 +32,12 @@ const DailyTask = () => {
|
||||
// Sync projectId (either from URL or pick first accessible one)
|
||||
useEffect(() => {
|
||||
if (!project_lodaing && projects.length > 0 && !initialized) {
|
||||
if (selectedProject === 1 || selectedProject === undefined) {
|
||||
if (selectedProject === 1 || selectedProject === undefined) {
|
||||
dispatch(setProjectId(projects[0].id));
|
||||
}
|
||||
|
||||
setInitialized(true);
|
||||
}
|
||||
|
||||
}, [project_lodaing, projects, projectId, selectedProject, initialized]);
|
||||
|
||||
const dispatch = useDispatch(selectedProject);
|
||||
@ -68,8 +67,6 @@ const DailyTask = () => {
|
||||
...new Set(TaskLists.map((task) => task.assignmentDate.split("T")[0])),
|
||||
].sort((a, b) => new Date(b) - new Date(a));
|
||||
setDates(AssignmentDates);
|
||||
|
||||
|
||||
}, [TaskLists]);
|
||||
|
||||
const [selectedTask, selectTask] = useState(null);
|
||||
@ -90,7 +87,7 @@ const DailyTask = () => {
|
||||
|
||||
useEffect(() => {
|
||||
popoverRefs.current.forEach((el) => {
|
||||
console.log(el)
|
||||
console.log(el);
|
||||
if (el) {
|
||||
new bootstrap.Popover(el, {
|
||||
trigger: "focus",
|
||||
@ -144,7 +141,7 @@ const DailyTask = () => {
|
||||
<div className="col-6 text-start">
|
||||
<DateRangePicker
|
||||
onRangeChange={setDateRange}
|
||||
DateDifference="1"
|
||||
DateDifference="6"
|
||||
/>
|
||||
</div>
|
||||
<div className="col-sm-3 col-6 text-end mb-1">
|
||||
@ -184,8 +181,7 @@ const DailyTask = () => {
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody className="table-border-bottom-0">
|
||||
|
||||
{task_loading && (
|
||||
{task_loading && (
|
||||
<tr>
|
||||
<td colSpan={7} className="text-center">
|
||||
<p>Loading..</p>
|
||||
@ -195,7 +191,7 @@ const DailyTask = () => {
|
||||
{dates.map((date, i) => {
|
||||
return (
|
||||
<React.Fragment key={i}>
|
||||
<tr>
|
||||
<tr className="table-row-header">
|
||||
<td colSpan={7} className="text-start">
|
||||
<strong>{date}</strong>
|
||||
</td>
|
||||
@ -204,7 +200,7 @@ const DailyTask = () => {
|
||||
task.assignmentDate.includes(date)
|
||||
).map((task, index) => {
|
||||
const refIndex = index * 10 + i;
|
||||
console.log(refIndex)
|
||||
console.log(refIndex);
|
||||
return (
|
||||
<React.Fragment key={index}>
|
||||
<tr>
|
||||
@ -266,14 +262,22 @@ const DailyTask = () => {
|
||||
<div class="d-flex align-items-center gap-2 mb-2">
|
||||
<div class="avatar avatar-xs">
|
||||
<span class="avatar-initial rounded-circle bg-label-primary">
|
||||
${member?.firstName?.charAt(0) || ""}${member?.lastName?.charAt(0) || ""}
|
||||
${
|
||||
member?.firstName?.charAt(
|
||||
0
|
||||
) || ""
|
||||
}${
|
||||
member?.lastName?.charAt(0) || ""
|
||||
}
|
||||
</span>
|
||||
</div>
|
||||
<span>${member.firstName} ${member.lastName}</span>
|
||||
<span>${member.firstName} ${
|
||||
member.lastName
|
||||
}</span>
|
||||
</div>
|
||||
`
|
||||
)
|
||||
.join('')}
|
||||
.join("")}
|
||||
</div>
|
||||
`}
|
||||
>
|
||||
|
Loading…
x
Reference in New Issue
Block a user