employeeReport
This commit is contained in:
@ -15,7 +15,10 @@ export const PartnerPersonCard = ({ name, img, userId }) => {
|
||||
</div>
|
||||
<div className="partnerPersonCard__info">
|
||||
<h2 className="partnerPersonCard__name">{name}</h2>
|
||||
<Link className="partnerPersonCard__report" to={`/profile/employees/report/${userId}`}>
|
||||
<Link
|
||||
className="partnerPersonCard__report"
|
||||
to={`/profile/employees/report/${userId}`}
|
||||
>
|
||||
Подробный отчет
|
||||
<div className="partnerPersonCard__more">
|
||||
<img src={rightArrow} alt="arrow" />
|
||||
|
@ -96,14 +96,14 @@ export const ProfileCalendarComponent = React.memo(
|
||||
)}-${correctDay(new Date(day).getDate())}` === date.created_at
|
||||
) {
|
||||
if (userId) {
|
||||
return `../view/${date.created_at}/${userId}`
|
||||
return `../view/${date.created_at}/${userId}`;
|
||||
}
|
||||
return `../view/${date.created_at}/${localStorage.getItem("id")}`;
|
||||
}
|
||||
}
|
||||
|
||||
if (userId) {
|
||||
return "#"
|
||||
return "#";
|
||||
}
|
||||
|
||||
return "../../report";
|
||||
@ -123,7 +123,9 @@ export const ProfileCalendarComponent = React.memo(
|
||||
startDate._d
|
||||
)}`;
|
||||
apiRequest(
|
||||
`/reports/index?${requestDates}&user_id=${userId ? userId : localStorage.getItem("id")}`
|
||||
`/reports/index?${requestDates}&user_id=${
|
||||
userId ? userId : localStorage.getItem("id")
|
||||
}`
|
||||
).then((reports) => {
|
||||
let spendTime = 0;
|
||||
reports.map((report) => {
|
||||
@ -172,9 +174,7 @@ export const ProfileCalendarComponent = React.memo(
|
||||
<div className="calendar-component">
|
||||
<div className="calendar-component__header">
|
||||
<div className="calendar-component__header-info">
|
||||
{!userId &&
|
||||
<h3>Мои отчеты за </h3>
|
||||
}
|
||||
{!userId && <h3>Мои отчеты за </h3>}
|
||||
<p className="calendar__hours">
|
||||
{month}
|
||||
<span>
|
||||
|
Reference in New Issue
Block a user