Context: Ive created a task that creates agreements. A few fields are mandatory and some are not.
Mandatory: Supplier, Description, Year, Startdate, Enddate, type and managers.
There's functionality written in order to automaticly determine the startdate and enddate. For instance. when inserting 2023, startdate becomes 1-1-2023 and endate becomes 31-12-2023.
There's also functionality written to determine the managers based on the first selected supplier.
Problems:
- Can't close my task popup if execute is clicked but the mandatory fields are not supplied.
- Year functionality stopped working on start and enddate, now I need to select dates manually.
Gif of the behavior below.
Steps to reproduce:
- Create bonus agreement
- Fill in Supplier 1, no multiple suppliers (category and assistant category manager will be filled in)
- Fill in Description
- Click Execute (all error messages for fields that are not filled in will appear here)
- Fill in Year
- Click Cancel - this does not work
- Fill in start and end date (this is problem 2)
- Choose bonus agreement type - the Create bonus agreement window disappears
What would solve my problem?:
Being able to cancel my pop after bugging it. I want this to work as expected (meaning you can click cancel even when it bugged)
How can I achieve this?
Gif: