personal area partner with fixes report

This commit is contained in:
2023-02-21 19:05:04 +03:00
parent 740659e1f1
commit e26b8cc22e
22 changed files with 873 additions and 122 deletions

View File

@ -60,13 +60,11 @@ const ReportForm = () => {
const totalHours = inputs.reduce((a, b) => a + b.hours_spent, 0);
const deleteInput = (indexRemove) => {
if (indexRemove !== 0) {
setInputs((prev) => prev.filter((el, index) => index !== indexRemove))
}
setInputs((prev) => prev.filter((el, index) => index !== indexRemove))
};
const handler = () => {
if(!inputs[0].task) {
if(!inputs[0].task || !inputs[0].hours_spent) {
setReportSuccess('Заполните задачи');
setTimeout(() => setReportSuccess(''), 1000)
return