Open metas-mk opened 7 years ago
EDIT 2: See my answer below
~EDIT 1: I tried clicking Start first, then changing fields. This issue is about changing fields first and clicking Start immediately after.~
~@metas-mk I can not reproduce this issue on current master c8079a6ce932b84f796f1bab100d4719f18f93d2 or on https://w101.metasfresh.com:8443/.~
~Trying with throttled network speed yields the same result.~
~The code shows it is working as expected:~
handleStart()
fires.~
~It sets state.pending
to true
:~
~https://github.com/metasfresh/metasfresh-webui-frontend/blob/c8079a6ce932b84f796f1bab100d4719f18f93d2/src/components/app/Modal.js#L260-L270~<Process>
is rendered with a disabled
prop:~
~https://github.com/metasfresh/metasfresh-webui-frontend/blob/c8079a6ce932b84f796f1bab100d4719f18f93d2/src/components/app/Modal.js#L316-L324~<Process>
disables all widget input~
~https://github.com/metasfresh/metasfresh-webui-frontend/blob/c8079a6ce932b84f796f1bab100d4719f18f93d2/src/components/Process.js#L12-L31~~This is the behaviour I can reproduce~
This issue uncovered ~three~ two separate issues:
NOTE: All issues can be reproduced from list view, i.e. https://w101.metasfresh.com:8443/window/540359, provided you select an item
@ottosichert thanks for the update.
Please also consider this:
If tough to fix then please add the request with all parms to API as soon the User presses the start button, so that the parms are sent to API before the process starts.
(loud thinking) i believe it would make sense to send all params before calling /start anyways, to prevent any weird out of sync params. wdyt?
@teosarca First I will resolve issue (1), it should be possible. If issue (2) persists and can be reproduced, I will first look for a fix. If there is no other fix than refactoring <Process>
, <MasterWidget>
and <RawWidget>
altogether, maybe we can look into this workaround.
But I suggest we shouldn't add another workaround there, the code of these components already contains a lot of them
note: about sending all process parameters, we have a similar case here, but that one is about editable views: https://github.com/metasfresh/metasfresh-webui-frontend/issues/1358
Is this a bug or feature request?
Bug
What is the current behavior?
When starting an Action and clicking into a field before the first/ initial green save bar has been "finished" (not even half) and changing the field content, then the action is starting with the wrong parm when started. Seems as if the frontend has not transferred the change to API.
Which are the steps to reproduce?
See above. https://w101.metasfresh.com:8443/window/540359/1000000
What is the expected or desired behavior?
Shall work, please fix. If tough to fix then please add the request with all parms to API as soon the User presses the start button, so that the parms are sent to API before the process starts.
Image: When doing fast as described above, then no request is sent to API after field change: