i need to update purchase details only from UI form and how to get the values of purchase, returns and shipping object using angular 6 and firestore




Asked on September 10, 2018
{
    "amount": "",
    "assignee": "",
    "client": "",
    "collector": "",
    "createdBy": "rakesh@gmail.com",
    "date": "",
    "id": 10,
    "material": "",
    "place": "",
    "purchase":
                { 
                    "id":
                        { 
                            "material": "Bags",
                            "purchaseId": "1",
                            "quantity": "10",
                            "return":
                                    { 
                                        "material": "",
                                        "quantity": "",
                                        "returnId": "" 
                                    },

                            "shipping": 
                                    { 
                                        "shippingId": ""
                                    } 
                        } 
                },
    "quantity": "",
    "supplier": "",
     "type": "" 
}

help me please
thank you. 



Replied on September 10, 2018
Your question is not clear. Do you want to know how to fetch values from your JSON such as purchasereturns and shipping in Angular 6?




Replied on September 10, 2018
Yeah, and i am not able to add values to purchase. how can i pass into those objects? using angular 6 and firstore.


Replied on September 10, 2018
What is your code to add values to purchase and what error are you getting?


Replied on September 11, 2018
ok let me explain my issue sir. 
i send order details with purchase details as null.Order is a collection . order :{ "orderId":1, "material": "bags", "quantity": 10, "purchase": {....} }
 because have another form for purchase so later i can update to paricular order. so purchase details can have multiple. purchase { 1: {"id":11, "material" : "bags "},
                              2: {"id":12, "material" : "bags " }
                            }
for this before to read data first i have to send my purchase details so i need to call update with order collection rite. how to do that? sir



Replied on September 11, 2018
sir did you got any solution for my question?


Replied on September 11, 2018
Are you using same JSON format to update the purchase?
You can use Angular HttpClient.put() for update operation.




Replied on September 12, 2018
httpClient is for real time database, but am using firestore.

Write Answer











©2024 concretepage.com | Privacy Policy | Contact Us