switch report date

This commit is contained in:
Николай Полтщук 2023-01-24 00:08:42 +03:00
parent 52e7df0e7b
commit 0cae63237f

View File

@ -67,7 +67,6 @@ export const ViewReport = () => {
function nextDay() { function nextDay() {
reportDay.setDate(reportDay.getDate() + 1); reportDay.setDate(reportDay.getDate() + 1);
getCreatedDate(reportDay)
getReportFromDate(getCreatedDate(reportDay)) getReportFromDate(getCreatedDate(reportDay))
} }
@ -102,7 +101,7 @@ export const ViewReport = () => {
<img src={arrowSwitchDate} alt='arrow'/> <img src={arrowSwitchDate} alt='arrow'/>
</div> </div>
<p>{getCreatedDate(reportDay)}</p> <p>{getCreatedDate(reportDay)}</p>
<div className={`viewReport__switchDate__next switchDate ${getCreatedDate(currentDay) === getCreatedDate(reportDay) || getCreatedDate(currentDay) < getCreatedDate(reportDay) ? 'disable' : ''}`} onClick={() => nextDay()}> <div className={`viewReport__switchDate__next switchDate ${getCreatedDate(currentDay) === getCreatedDate(reportDay) ? 'disable' : ''}`} onClick={() => nextDay()}>
<img src={arrowSwitchDate} alt='arrow'/> <img src={arrowSwitchDate} alt='arrow'/>
</div> </div>
</div> </div>