coopcycle-web icon indicating copy to clipboard operation
coopcycle-web copied to clipboard

Default selection of packages does not work anymore

Open AdrienSICKLO opened this issue 1 year ago • 1 comments

Some time ago, it had been done a super useful small thing which was that when only one package was created in a package set, it was selected by default in the form when creating a delivery.

This doesn't work anymore (it's been not working for a while now). I stopped saving multiple times 2 clicks a day!

image

AdrienSICKLO avatar Apr 30 '24 07:04 AdrienSICKLO

PHP code https://github.com/coopcycle/coopcycle-web/blob/076c6e7288d8b6d2e25ddab412daeaa547804e14/src/Form/TaskType.php#L254-L271

should be doable to automatically select package around here https://github.com/coopcycle/coopcycle-web/blob/076c6e7288d8b6d2e25ddab412daeaa547804e14/js/app/forms/delivery.js#L254

in createPackagesWidget or createPackageForm but code is knd of hairy so it has to be well thought

Atala avatar May 02 '24 11:05 Atala