Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Revisions: Issue #46352 All Revisions ] Back to Issue ]
Summary 0046352: JIRA 1731 - BP Assignation - message 'Cannot read property 'properties' of undefined'
Revision 2021-04-26 16:30 by javietxe
Steps To Reproduce 1. Connect to POS
2. Search for a customer without changing the value in the YES/NO combo.
- Check that the result is correctly showed
3. Open the YES/NO combo and select the Default value
- Check that the error in the image (Cannot read property 'properties' of undefined) is showed.


In the Chrome Dev tools we can see that the failing row is the one marked in ***
  const searchBusinessPartners = async formState => {
    let filters = {};
    const filterValues = formState.fields;
    // filterValues keep in handler because it is necessary recover filterValues when back to search
    customerSelectorHandler.setFilterValues(filterValues);
    if (filterValues) {
 *** filters = Object.entries(filterValues).map(([key, value]) => {
        const foundComponent = formState.componentList.find(
          component => component.properties.name === key
        );
        return {
          column: key,
          hqlFilter: undefined,
          isId: undefined,
          operator: '=',
          value: value.value,
          label: foundComponent.properties.label
        };
      });
    }

The error in the console is:
VM943:1 Uncaught ReferenceError: filterValues is not defined
    at eval (eval at <anonymous> (CustomerSelector.jsx:82), <anonymous>:1:16)
    at CustomerSelector.jsx:82
    at Array.map (<anonymous>)
    at Ie.l.addFormAction.validateForm (CustomerSelector.jsx:72)
    at Ce.execute (FormHandler.js:133)
    at A (BaseForm.jsx:388)3

Revision 2021-04-26 16:17 by javietxe
Steps To Reproduce 1. Connect to POS
2. Search for a customer that doesn't exist (ex name = "hhhh hhhh") => you have a message 'no customer found'

3. Change "Restaurant filter" to 'Search in all restaurant' and click on 'Search' => message" Cannot read property 'properties' of undefined"


In the Chrome Dev tools we can see that the failing row is the one marked in ***
  const searchBusinessPartners = async formState => {
    let filters = {};
    const filterValues = formState.fields;
    // filterValues keep in handler because it is necessary recover filterValues when back to search
    customerSelectorHandler.setFilterValues(filterValues);
    if (filterValues) {
 *** filters = Object.entries(filterValues).map(([key, value]) => {
        const foundComponent = formState.componentList.find(
          component => component.properties.name === key
        );
        return {
          column: key,
          hqlFilter: undefined,
          isId: undefined,
          operator: '=',
          value: value.value,
          label: foundComponent.properties.label
        };
      });
    }

The error in the console is:
VM943:1 Uncaught ReferenceError: filterValues is not defined
    at eval (eval at <anonymous> (CustomerSelector.jsx:82), <anonymous>:1:16)
    at CustomerSelector.jsx:82
    at Array.map (<anonymous>)
    at Ie.l.addFormAction.validateForm (CustomerSelector.jsx:72)
    at Ce.execute (FormHandler.js:133)
    at A (BaseForm.jsx:388)3

Revision 2021-04-26 12:35 by javietxe
Steps To Reproduce 1. Connect to POS
2. Search for a customer that doesn't exist (ex name = "hhhh hhhh") => you have a message 'no customer found'

3. Change "Restaurant filter" to 'Search in all restaurant' and click on 'Search' => message" Cannot read property 'properties' of undefined"


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker