6.1 App Screen 3(UI + Backend)

Radhika Sharma
Jul 26, 2017 · 1 min read

So here is my third and last screen .

After filling in the details and clicking on place order the order gets placed.

You can also logout from here or go-to the menu page.

For its backend i simply made a insert query by retrieving all the values from the form and inserting them in the database.

function placeorder()
{ var objects={};
var data = {};
var fname=document.getElementById(“fname”).value;
var lname=document.getElementById(“lname”).value;
var mobile=document.getElementById(“mobile”).value;
var email=document.getElementById(“email”).value;
var houseno=document.getElementById(“houseno”).value;
var streetno=document.getElementById(“streetno”).value;

data[“type”] = “insert”;
data[“args”] = {};
data[“args”][“table”] = “orderdetails”;
data[“args”].objects = [{“user_id”:parseInt(getCookie(“hasura_id”)),”fname”:fname,”lname”:lname,”mobile”:mobile,”email”:email,”houseno”:houseno,”streetno”:streetno,}]; }

You can check out my app at app.radhika.hasura.me.

Please feel free to give comments and feedback.

Link to my App idea

Next: Used Feedback and testing

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade