metasfresh / metasfresh-webui-frontend-legacy

metasfresh Webui Frontend
GNU General Public License v2.0
57 stars 34 forks source link

modal view editing issues #1794

Closed teosarca closed 5 years ago

teosarca commented 6 years ago

Is this a bug or feature request?

Bug required for https://github.com/metasfresh/metasfresh/issues/3925

What is the current behavior?

Which are the steps to reproduce?

Issue 1. /dropdown endpoint has incorrect URL

On first row, the editable one, click on Type field to open it's dropdown => ERROR because the endpoint URL is not correct image

It shall be http://w101.metasfresh.com:8081/swagger-ui.html#!/view-rest-controller/getFilterParameterDropdownUsingGET_1

Issue 2. After PATCHing, the viewEditorRenderMode is not considered

Suppose Issue 1. is fixed. Now you will be able to patch the priceType field. Based on the priceType value some of the fields are editable. e.g. In case the price type is Pricing System then the basePricingSystem and basePriceAddAmt fields will be editable. Because of that, the API will send back viewEditorRenderMode: true for those 2 fields. But unfortunately that's ignored by frontend.

The fix shall be:

If more details/explanations are needed pls ping me.

What is the expected or desired behavior?

See above.

siemiatj commented 6 years ago

@teosarca are you sure this is the correct endpoint ? I seem to be missing a lot of data to be able to do this request. Also I don't think this is a filter ?

screen shot 2018-05-18 at 00 46 29

I remember you mentioning this endpoint in some earlier ticket : http://w101.metasfresh.com:8081/swagger-ui.html#!/view-row-edit-rest-controller/getFieldDropdownUsingGET . This one seems to be working fine.

teosarca commented 6 years ago

@siemiatj 😊 ... u're right. That's the right endpoint.

teosarca commented 6 years ago

note: not moving it to Rollout because there are still things to do here.

teosarca commented 6 years ago

@siemiatj thanks for the PR. I've integrated it (https://github.com/metasfresh/metasfresh-webui-frontend/pull/1809).

Below i will document what's still pending.

Base Pricing System field is still readonly

see https://github.com/metasfresh/metasfresh-webui-frontend/pull/1803#issuecomment-391247760

Double clicking on Price field makes the price disapear

image image

siemiatj commented 6 years ago

@teosarca in the response there's nothing that would tell me this field is now readonly. Not even mentioning that the way we set the readonly flag in the code is super vague right now :/

screen shot 2018-05-25 at 12 34 04

teosarca commented 6 years ago

@siemiatj readonly, i.e. viewEditorRenderMode: never. in your screenshot, the price does not have the viewEditorRenderMode property set, so we need to fallback on what we got when we called the /layout endpoint, i.e. image

siemiatj commented 6 years ago

@teosarca then I guess you need to change the viewEditorRenderMode for the PriceType field, as otherwise it will be readonly :

screen shot 2018-05-25 at 16 46 40

metas-ts commented 6 years ago

:cherries: picked to release.

siemiatj commented 6 years ago

Can we get this tested ?