Closed teosarca closed 5 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 ?
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.
@siemiatj 😊 ... u're right. That's the right endpoint.
note: not moving it to Rollout because there are still things to do here.
@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.
see https://github.com/metasfresh/metasfresh-webui-frontend/pull/1803#issuecomment-391247760
@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 :/
@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.
@teosarca then I guess you need to change the viewEditorRenderMode
for the PriceType
field, as otherwise it will be readonly :
:cherries: picked to release
.
Can we get this tested ?
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?
Pricing Conditions
actionIssue 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 correctIt shall be http://w101.metasfresh.com:8081/swagger-ui.html#!/view-rest-controller/getFilterParameterDropdownUsingGET_1
Issue 2. After PATCHing, the
viewEditorRenderMode
is not consideredSuppose Issue 1. is fixed. Now you will be able to patch the
priceType
field. Based on thepriceType
value some of the fields are editable. e.g. In case the price type isPricing System
then thebasePricingSystem
andbasePriceAddAmt
fields will be editable. Because of that, the API will send backviewEditorRenderMode: true
for those 2 fields. But unfortunately that's ignored by frontend.The fix shall be:
viewEditorRenderMode
value for each field which was returned in the result.viewEditorRenderMode
is missing for a field from result, the value provided in layout shall be usedviewEditorRenderMode
effective value frontend shall decide if it will render an editor, or it will be an editor on demand or it won't be an editor at all.If more details/explanations are needed pls ping me.
What is the expected or desired behavior?
See above.