alexa

AutoComplete: get the id for the user that i was choosen from users list, post request with status 400 in react.js ?

AutoComplete: get the id for the user that i was choosen from users list, post request with status 400 in react.js ?

Based on your code I observed this.

  • You are already passing invoice?.id in statusGropButton(invoice.status, invoice?.id) method.
  • You are again expecting id from the input as id?.id in assignToUser(id?.id, users.id, message). Why?

Just assuming, because of that the invoiceId is going as undefined. Try by passing just id instead of id?.id while calling the api functions.

You are opening a Dialogue by using assignToUserDialog flag. While submitting the form, you are doing dispatch(assignToUser(id?.id, users.id, message)); in which users is an array. That is the reason you are getting undefined. I would suggest you maintain the specific user information for which the dialogue is opened and send that specifc user.id to the API call.


174 0
7

Write a Comments


* Be the first to Make Comment

GoodFirms Badge
GoodFirms Badge

Fix Your Meeting With Our SEO Consultants in India To Grow Your Business Online

Facebook
Twitter
LinkedIn
Instagram
Whatsapp
Call Now
Quick Inquiry