Add Cards in Profile
This commit is contained in:
@@ -46,6 +46,7 @@ export const ProfileCalendarComponent = React.memo(
|
||||
}) => {
|
||||
const dispatch = useDispatch();
|
||||
|
||||
// const [l, setL] = useState(1);
|
||||
const [calendar, setCalendar] = useState([]);
|
||||
const [month, setMonth] = useState("");
|
||||
const [endDate, setEndDate] = useState(null);
|
||||
@@ -174,9 +175,27 @@ export const ProfileCalendarComponent = React.memo(
|
||||
});
|
||||
}
|
||||
|
||||
// function errorr(TotalRangeHours) {
|
||||
// console.error(TotalRangeHours);
|
||||
// function dddd(day) {
|
||||
// let index = day.format("D") - l;
|
||||
// console.log(`d ${day.format("d")}`);
|
||||
// if (day.format("d") != 0 && day.format("d") != 6) {
|
||||
// let elementAtIndex1 = reports[index];
|
||||
// if (elementAtIndex1 && elementAtIndex1.task) {
|
||||
// let totalHoursSpent = elementAtIndex1.task.reduce(
|
||||
// (total, task) => total + task.hours_spent,
|
||||
// 0
|
||||
// );
|
||||
// console.log(`index ${index}`);
|
||||
// console.log(elementAtIndex1);
|
||||
// console.log(`h ${totalHoursSpent}`);
|
||||
// return totalHoursSpent;
|
||||
// }
|
||||
// } else {
|
||||
// setL(l + 1);
|
||||
// console.log(`l ${l}`);
|
||||
// }
|
||||
// }
|
||||
|
||||
return (
|
||||
<div className="calendar-component">
|
||||
<div className="calendar-component__header">
|
||||
@@ -265,7 +284,7 @@ export const ProfileCalendarComponent = React.memo(
|
||||
<div className="form-date">{day.format("D")}</div>
|
||||
<div className="form-box">
|
||||
<div className="form-hours">
|
||||
<span>7/Час</span>
|
||||
<span>7/</span>
|
||||
</div>
|
||||
</div>
|
||||
{/* {currentMonthAndDay(day)} */}
|
||||
|
||||
Reference in New Issue
Block a user