From 44b1df668429aa10159b1167f4093126cdb73be2 Mon Sep 17 00:00:00 2001 From: AmmarAlkhooly98 Date: Mon, 27 May 2019 13:36:30 +0300 Subject: [PATCH 01/17] before refactoring --- Back-End/Server/server.js | 270 +++++++++++----------- Server/server.js | 377 +++++++++++++++--------------- package-lock.json | 6 +- package.json | 2 +- src/App.css | 327 +++++++++++++------------- src/App.jsx | 38 ++- src/components/Nav.jsx | 29 ++- src/components/ThankYouPage.jsx | 38 ++- src/components/WelcomePage.jsx | 123 ++++++---- src/components/food.jsx | 398 ++++++++++++++++---------------- src/components/login.jsx | 73 +++--- src/components/registered.jsx | 274 ++++++++++++---------- 12 files changed, 988 insertions(+), 967 deletions(-) diff --git a/Back-End/Server/server.js b/Back-End/Server/server.js index 5723907..084bb5e 100644 --- a/Back-End/Server/server.js +++ b/Back-End/Server/server.js @@ -1,139 +1,139 @@ - const express = require('express'); const app = express(); const router = express.Router(); const PORT = 5000; -const bodyparser = require('body-parser') +const bodyparser = require('body-parser'); const mysql = require('mysql'); var expressValidator = require('express-validator'); -const expressSession = require('express-session') +const expressSession = require('express-session'); app.use(bodyparser.json()); -app.use(bodyparser.urlencoded({ - extended: true -})); -app.use(expressValidator({save:"Theapp",saveUninitialized:false,resave:false})); +app.use( + bodyparser.urlencoded({ + extended: true + }) +); +app.use(expressValidator({ save: 'Theapp', saveUninitialized: false, resave: false })); const connection = mysql.createConnection({ - host : 'localhost', - user:'root', - password:"1111", - database: 'fdp' + host: 'sql7.freesqldatabase.com', + user: 'sql7293367', + password: 'syDLkTxPPN', + database: 'sql7293367' }); // HRLLO const UsersConection = mysql.createConnection({ - host : 'localhost', - user:'root', - password:"1111", - database: 'users' + host: 'sql7.freesqldatabase.com', + user: 'sql7293367', + password: 'syDLkTxPPN', + database: 'sql7293367' }); + app.use(function(req, res, next) { - res.header("Access-Control-Allow-Origin", "*"); - res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept"); - next(); + res.header('Access-Control-Allow-Origin', '*'); + res.header('Access-Control-Allow-Headers', 'Origin, X-Requested-With, Content-Type, Accept'); + next(); }); // getting the price from frontEnd and send the meals back -app.post('/getMealsByPrice',(req,res) =>{ - const price =req.body.price; - - let serchItem = `SELECT m.name as mealName,r.name as restName,mt.size, price,r.id as restId +app.post('/getMealsByPrice', (req, res) => { + const price = req.body.price; + + let serchItem = + `SELECT m.name as mealName,r.name as restName,mt.size, price,r.id as restId FROM restmealmenue rmm Inner Join restaurants r on (rmm.RestId = r.Id) Inner Join mealtype mt on (rmm.MealTypeId = mt.Id) Inner Join meals m on (mt.MealId = m.Id) - Where price <= ` + price - +` group by m.name, r.name, mt.size, price + Where price <= ` + + price + + ` group by m.name, r.name, mt.size, price order by m.name, r.name, mt.size, price`; - - connection.query(serchItem,(err,result)=>{ - if(err) throw err; - console.log(result); - res.send(result) - - }) - - }); - - // getting the meal from frondEnd and send the restauransts back - app.post('/getRest',(req,res) =>{ - const restId =req.body.restId; - let serchItem = `SELECT r.name, phone, address - FROM restaurants r - Where r.Id = N'` + restId + `'`; - - connection.query(serchItem,(err,result)=>{ - if(err) throw err; - console.log(result); - res.send(result) - - }) - - }); + connection.query(serchItem, (err, result) => { + if (err) throw err; + console.log(result); + res.send(result); + }); +}); + +// getting the meal from frondEnd and send the restauransts back +app.post('/getRest', (req, res) => { + const restId = req.body.restId; + let serchItem = + `SELECT r.name, phone, address + FROM restaurants r + Where r.Id = N'` + + restId + + `'`; + + connection.query(serchItem, (err, result) => { + if (err) throw err; + console.log(result); + res.send(result); + }); +}); // The connection made -connection.connect((err)=>{ - if(err){ - console.log("There is a error :",err); - } - console.log("The Conection made Successfully"); +connection.connect((err) => { + if (err) { + console.log('There is a error :', err); + } + console.log('The Conection made Successfully'); }); - // THE SERVER -app.use(express.static('public')) +app.use(express.static('public')); //////////////////////////////////////// USER AREA////////////////////////// -app.get('/registered',(req,res)=>{ - res.render('index',{title:"TheUserInfo",success:req.session.success,errors:req.session.errors}); - req.session.errors = null; -}) -app.post('/registered', function(req, res,next) { - const User =req.body.price; - req.check('UserName',"Invald Email Plese Try Another One").isEmail(); - req.check('Password',"The Password Should be Numbers").isNumeric().isLength({min:8}); - var err = req.validationErrors(); - - let newRestaurant = { - Name:req.body.UserName, - password:req.body.Password, - location:req.body.Location, - phonenumber:req.body.PhoneNumber, - TheRestaurant:req.body.Restaurant, - MealsandPrice:req.body.PriceandMeal - }; - const Check = `SELECT * From userInfo Where Name = ${req.body.UserName}`; - const added = 'INSERT INTO usersInfo SET ?' - - console.log(Check) - - - UsersConection.query(added,newRestaurant,(err,result)=>{ - console.log(newRestaurant) - if(err) throw err; - console.log(result); - console.log("User Was Added") - - }) - - // SEND EMAIL START - const nodemailer = require("nodemailer"); - - var transporter = nodemailer.createTransport({ - service: 'gmail', - auth: { - user: 'tafran56@gmail.com', - pass: '12345678D!' - },tls: { - rejectUnauthorized: false - } - }); - - var mailOptions = { - from: 'tafran56@gmail.com', - to: `${req.body.UserName}`, - subject: 'TAFRAN.inc Registerd in TAFRAN', - text: `Thank You For Registerd We Will Be in Toch With You Soon`, - html: `

TAFRAN.inc

+app.get('/registered', (req, res) => { + res.render('index', { title: 'TheUserInfo', success: req.session.success, errors: req.session.errors }); + req.session.errors = null; +}); +app.post('/registered', function(req, res, next) { + const User = req.body.price; + req.check('UserName', 'Invald Email Plese Try Another One').isEmail(); + req.check('Password', 'The Password Should be Numbers').isNumeric().isLength({ min: 8 }); + var err = req.validationErrors(); + + let newRestaurant = { + Name: req.body.UserName, + password: req.body.Password, + location: req.body.Location, + phonenumber: req.body.PhoneNumber, + TheRestaurant: req.body.Restaurant, + MealsandPrice: req.body.PriceandMeal + }; + const Check = `SELECT * From userInfo Where Name = ${req.body.UserName}`; + const added = 'INSERT INTO usersInfo SET ?'; + + console.log(Check); + + UsersConection.query(added, newRestaurant, (err, result) => { + console.log(newRestaurant); + if (err) throw err; + console.log(result); + console.log('User Was Added'); + }); + + // SEND EMAIL START + const nodemailer = require('nodemailer'); + + var transporter = nodemailer.createTransport({ + service: 'gmail', + auth: { + user: 'tafran56@gmail.com', + pass: '12345678D!' + }, + tls: { + rejectUnauthorized: false + } + }); + + var mailOptions = { + from: 'tafran56@gmail.com', + to: `${req.body.UserName}`, + subject: 'TAFRAN.inc Registerd in TAFRAN', + text: `Thank You For Registerd We Will Be in Toch With You Soon`, + html: `

TAFRAN.inc

Thank You For Registerd We Will Be in Toch With You Soon

More Info About TAFRAN App

@@ -143,33 +143,31 @@ app.post('/registered', function(req, res,next) {

Your Restaurnt will Be Exposse To thousands of people every day and You can get benefit from this to get new customers and make your busness biger.


Whate the requirements to get your restarunt accsepted

All You need to have is good restarunt and have a good customer servers and our team will come to you to check every thing and you will be accspted

- ` - }; - - transporter.sendMail(mailOptions, function(error, info){ - if (error) { - console.log(error); - } else { - console.log('Email sent: ' + info.response); - } - }); - - - // SEND EMAIL END - -res.redirect("http://localhost:3000/ThankYouPage") -}); - -app.post("/login",function(req,res){ - console.log(req.body.UserName); - const Find = 'select'`+re+` - res.send("Hi"); -}) - - /////////////////////////////////////USER AREA END //////////////////////////////////////// - - -app.get('/',(req,res,next) => res.json({Start:"The First Get"}) ); - + ` + }; + + transporter.sendMail(mailOptions, function(error, info) { + if (error) { + console.log(error); + } else { + console.log('Email sent: ' + info.response); + } + }); + + // SEND EMAIL END + + res.redirect('http://localhost:3000/ThankYouPage'); +}); + +app.post('/login', function(req, res) { + console.log(req.body.UserName); + const Find = 'select'`+re+`; + res.send('Hi'); +}); + +/////////////////////////////////////USER AREA END //////////////////////////////////////// + +app.get('/', (req, res, next) => res.json({ Start: 'The First Get' })); + module.exports = router; -app.listen(PORT, () => console.log("The Server is working on "+PORT)); +app.listen(PORT, () => console.log('The Server is working on ' + PORT)); diff --git a/Server/server.js b/Server/server.js index 9a5243e..bf0e875 100644 --- a/Server/server.js +++ b/Server/server.js @@ -2,76 +2,75 @@ const express = require('express'); const app = express(); const router = express.Router(); const PORT = 5000; -const bodyparser = require('body-parser') +const bodyparser = require('body-parser'); const mysql = require('mysql'); var expressValidator = require('express-validator'); -const expressSession = require('express-session') +const expressSession = require('express-session'); // const path = require('path'); app.use(bodyparser.json()); -app.use(bodyparser.urlencoded({ - extended: true -})); -app.use(expressValidator({save:"Theapp",saveUninitialized:false,resave:false})); +app.use( + bodyparser.urlencoded({ + extended: true + }) +); +app.use(expressValidator({ save: 'Theapp', saveUninitialized: false, resave: false })); // to creare the connection - - - const connection = mysql.createConnection({ - host : 'localhost', - user:'root', - password:"1111", - database: 'fdp' + host: 'localhost', + user: 'root', + password: '1111', + database: 'fdp' }); const UsersConection = mysql.createConnection({ - host : 'localhost', - user:'root', - password:"1111", - database: 'users' + host: 'localhost', + user: 'root', + password: '1111', + database: 'users' }); app.use(function(req, res, next) { - res.header("Access-Control-Allow-Origin", "*"); - res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept"); - next(); + res.header('Access-Control-Allow-Origin', '*'); + res.header('Access-Control-Allow-Headers', 'Origin, X-Requested-With, Content-Type, Accept'); + next(); }); // getting the price from frontEnd and send the meals back -app.post('/getMealsByPrice',(req,res) =>{ - const price =req.body.price; - - let serchItem = `SELECT m.name as mealName,r.name as restName,mt.size, price,r.id as restId +app.post('/getMealsByPrice', (req, res) => { + const price = req.body.price; + + let serchItem = + `SELECT m.name as mealName,r.name as restName,mt.size, price,r.id as restId FROM restmealmenue rmm Inner Join restaurants r on (rmm.RestId = r.Id) Inner Join mealtype mt on (rmm.MealTypeId = mt.Id) Inner Join meals m on (mt.MealId = m.Id) - Where price <= ` + price - +` group by m.name, r.name, mt.size, price + Where price <= ` + + price + + ` group by m.name, r.name, mt.size, price order by m.name, r.name, mt.size, price`; - - connection.query(serchItem,(err,result)=>{ - if(err) throw err; - console.log(result); - res.send(result) - - }) - - }); - - // getting the meal from frondEnd and send the restauransts back - app.post('/getRest',(req,res) =>{ - const restId =req.body.restId; - let serchItem = `SELECT r.name, phone, address - FROM restaurants r - Where r.Id = N'` + restId + `'`; - - connection.query(serchItem,(err,result)=>{ - if(err) throw err; - console.log(result); - res.send(result) - - }) - - }); + connection.query(serchItem, (err, result) => { + if (err) throw err; + console.log(result); + res.send(result); + }); +}); + +// getting the meal from frondEnd and send the restauransts back +app.post('/getRest', (req, res) => { + const restId = req.body.restId; + let serchItem = + `SELECT r.name, phone, address + FROM restaurants r + Where r.Id = N'` + + restId + + `'`; + + connection.query(serchItem, (err, result) => { + if (err) throw err; + console.log(result); + res.send(result); + }); +}); // // to creare the connection // const connection = mysql.createConnection({ @@ -82,170 +81,156 @@ app.post('/getMealsByPrice',(req,res) =>{ // }); // Create DB - qusai -app.get("/CRDATA",(req,res)=>{ - let sql = 'CREATE DATABASE if not exists Users' - connection.query(sql,(err,result)=>{ - if(err){ - throw err - }; - console.log(result); - res.send("The Database was created successfully") - console.log("Data Base Created") - connection.end(); - - }); +app.get('/CRDATA', (req, res) => { + let sql = 'CREATE DATABASE if not exists Users'; + connection.query(sql, (err, result) => { + if (err) { + throw err; + } + console.log(result); + res.send('The Database was created successfully'); + console.log('Data Base Created'); + connection.end(); + }); }); //create table inside DB -app.get("/CRTable",(req,res)=>{ -// To Create Tables fotm the server - let CreateTable = `CREATE TABLE if not exists restaurants( +app.get('/CRTable', (req, res) => { + // To Create Tables fotm the server + let CreateTable = `CREATE TABLE if not exists restaurants( id int primary key AUTO_INCREMENT, Name VARCHAR(255), address VARCHAR(255), Food VARCHAR(500), Phonenumber int - )` - connection.query(CreateTable,(err,result)=>{ - if(err) throw err; - console.log(result); - console.log("Table Was Created On Successfully") - res.send("Table Was Created") - }) - }); - - app.get("/price",(req,res)=>{ - res.send("Done") - }) - - // Create User Inside The Databasce /* TEST FOR ADMIN ACCOUNT*/ - app.get("/CN",(req,res)=>{ - let newRestaurant = { - Name:'Qusai', - password:"1111", - location:"Amman", - phonenumber:"07765489", - TheRestaurant:"YODu", - MealsandPrice:'Hummus 5$' - }; - const added = 'INSERT INTO usersInfo SET ?' - connection.query(added,newRestaurant,(err,result)=>{ - if(err) throw err; - console.log(result); - res.send("User Was Added") - - }) -}) - -// Search Into the database and appear all the data -var users =[]; -app.get("/getUsers",(req,res)=>{ - let serchItem = 'SELECT * FROM meals'; - connection.query(serchItem,(err,result,next)=>{ - if(err) throw err; - result.forEach(function(row){ - users.push(row.name); - }) - console.log(users) - res.json(users) - }); -}); - -// Search Into the database and appear all the data -app.get("/getoneUser",(req,res)=>{ - let serchItem = ` - SELECT * - FROM restaurants - WHERE id = 2 - ` - connection.query(serchItem,(err,result)=>{ - if(err) throw err; - console.log(result); - res.send(result) - - }); + )`; + connection.query(CreateTable, (err, result) => { + if (err) throw err; + console.log(result); + console.log('Table Was Created On Successfully'); + res.send('Table Was Created'); + }); }); +app.get('/price', (req, res) => { + res.send('Done'); +}); +// Create User Inside The Databasce /* TEST FOR ADMIN ACCOUNT*/ +app.get('/CN', (req, res) => { + let newRestaurant = { + Name: 'Qusai', + password: '1111', + location: 'Amman', + phonenumber: '07765489', + TheRestaurant: 'YODu', + MealsandPrice: 'Hummus 5$' + }; + const added = 'INSERT INTO usersInfo SET ?'; + connection.query(added, newRestaurant, (err, result) => { + if (err) throw err; + console.log(result); + res.send('User Was Added'); + }); +}); +// Search Into the database and appear all the data +var users = []; +app.get('/getUsers', (req, res) => { + let serchItem = 'SELECT * FROM meals'; + connection.query(serchItem, (err, result, next) => { + if (err) throw err; + result.forEach(function(row) { + users.push(row.name); + }); + console.log(users); + res.json(users); + }); +}); - +// Search Into the database and appear all the data +app.get('/getoneUser', (req, res) => { + let serchItem = ` + SELECT * + FROM restaurants + WHERE id = 2 + `; + connection.query(serchItem, (err, result) => { + if (err) throw err; + console.log(result); + res.send(result); + }); +}); // The connection made -connection.connect((err)=>{ - if(err){ - console.log("There is a error :",err); - } - console.log("The Conection made Successfully"); +connection.connect((err) => { + if (err) { + console.log('There is a error :', err); + } + console.log('The Conection made Successfully'); }); - // THE SERVER -app.use(express.static('public')) - - +app.use(express.static('public')); // app.post('/') -router.get('/UU',(req,res,nxt)=>{ - res.json([{ - id:1 , - usernname:"Qusai" - },{ - id:2, - UserName:"James" - } -]); -}); -app.get('/TE',(req,res) => res.json({Second:"The Second GEt"}) ); -app.post('/Q',(res,req) => req.json({Hi:"POST"}) ); +router.get('/UU', (req, res, nxt) => { + res.json([ + { + id: 1, + usernname: 'Qusai' + }, + { + id: 2, + UserName: 'James' + } + ]); +}); +app.get('/TE', (req, res) => res.json({ Second: 'The Second GEt' })); +app.post('/Q', (res, req) => req.json({ Hi: 'POST' })); //////////////////////////////////////// USER AREA////////////////////////// -app.get('/registered',(req,res)=>{ - res.render('index',{title:"TheUserInfo",success:req.session.success,errors:req.session.errors}); - req.session.errors = null; -}) -app.post('/registered', function(req, res,next) { - const User =req.body.price; - req.check('UserName',"Invald Email Plese Try Another One").isEmail(); - req.check('Password',"The Password Should be Numbers").isNumeric().isLength({min:8}); - var err = req.validationErrors(); - - - let newRestaurant = { - Name:req.body.UserName, - password:req.body.Password, - location:req.body.Location, - phonenumber:req.body.PhoneNumber, - TheRestaurant:req.body.Restaurant, - MealsandPrice:req.body.PriceandMeal - }; - const Check = `SELECT * From userInfo Where Name = ${req.body.UserName}`; - const added = 'INSERT INTO usersInfo SET ?' - - console.log(Check) - - - UsersConection.query(added,newRestaurant,(err,result)=>{ - console.log(newRestaurant) - if(err) throw err; - console.log(result); - console.log("User Was Added") - - }) - //erer -res.redirect("http://localhost:3000/ThankYouPage") -}); - -app.post("/login",function(req,res){ - console.log(req.body.UserName); - const Find = 'select'`+re+` - res.send("Hi"); -}) - - /////////////////////////////////////USER AREA END //////////////////////////////////////// - - - -app.get('/',(req,res,next) => res.json({Start:"The First Get"}) ); - +app.get('/registered', (req, res) => { + res.render('index', { title: 'TheUserInfo', success: req.session.success, errors: req.session.errors }); + req.session.errors = null; +}); +app.post('/registered', function(req, res, next) { + const User = req.body.price; + req.check('UserName', 'Invald Email Plese Try Another One').isEmail(); + req.check('Password', 'The Password Should be Numbers').isNumeric().isLength({ min: 8 }); + var err = req.validationErrors(); + + let newRestaurant = { + Name: req.body.UserName, + password: req.body.Password, + location: req.body.Location, + phonenumber: req.body.PhoneNumber, + TheRestaurant: req.body.Restaurant, + MealsandPrice: req.body.PriceandMeal + }; + const Check = `SELECT * From userInfo Where Name = ${req.body.UserName}`; + const added = 'INSERT INTO usersInfo SET ?'; + + console.log(Check); + + UsersConection.query(added, newRestaurant, (err, result) => { + console.log(newRestaurant); + if (err) throw err; + console.log(result); + console.log('User Was Added'); + }); + //erer + res.redirect('http://localhost:3000/ThankYouPage'); +}); + +app.post('/login', function(req, res) { + console.log(req.body.UserName); + const Find = 'select'`+re+`; + res.send('Hi'); +}); + +/////////////////////////////////////USER AREA END //////////////////////////////////////// + +app.get('/', (req, res, next) => res.json({ Start: 'The First Get' })); + module.exports = router; -app.listen(PORT, () => console.log("The Server is working on "+PORT)); +app.listen(PORT, () => console.log('The Server is working on ' + PORT)); diff --git a/package-lock.json b/package-lock.json index b8349d9..ca67702 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5114,9 +5114,9 @@ } }, "express": { - "version": "4.17.0", - "resolved": "https://registry.npmjs.org/express/-/express-4.17.0.tgz", - "integrity": "sha512-1Z7/t3Z5ZnBG252gKUPyItc4xdeaA0X934ca2ewckAsVsw9EG71i++ZHZPYnus8g/s5Bty8IMpSVEuRkmwwPRQ==", + "version": "4.17.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", + "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", "requires": { "accepts": "~1.3.7", "array-flatten": "1.1.1", diff --git a/package.json b/package.json index 27a404f..25cb091 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "add": "^2.0.6", "axios": "^0.18.0", "cors": "^2.8.5", - "express": "^4.17.0", + "express": "^4.17.1", "express-pino-logger": "^4.0.0", "express-session": "^1.16.1", "express-validator": "^5.3.1", diff --git a/src/App.css b/src/App.css index 7491c78..432d9ac 100644 --- a/src/App.css +++ b/src/App.css @@ -1,33 +1,27 @@ .App { - text-align: center; - - + text-align: center; } - .App-logo { - - animation: App-logo-spin infinite 20s linear; - height: 40vmin; - pointer-events: none; - + animation: App-logo-spin infinite 20s linear; + height: 40vmin; + pointer-events: none; } .App-header { - } .App-link { - color: #61dafb; + color: #61dafb; } @keyframes App-logo-spin { - from { - transform: rotate(0deg); - } - to { - transform: rotate(360deg); - } + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } } /* input.input { padding: 5%; @@ -37,212 +31,209 @@ } */ button.button { - padding: 25px; - margin: 10px; - width: 36%; - font-size: 30px; - + padding: 25px; + margin: 10px; + width: 36%; + font-size: 30px; } -.lodding{ - max-width: 350px; +.lodding { + max-width: 350px; } .ThankYouPage { - width: 50%; - margin: 0 AUTO; - padding: 25px; - border: 0.1px solid; - border-radius: 25px; - margin-top: 24px; - background: #ffb700; - border: 0.1px solid; - border-radius: 17px; - padding: 12px; - font-family: 'Francois One', sans-serif; - transition: 80ms; - + width: 50%; + margin: 0 AUTO; + padding: 25px; + border: 0.1px solid; + border-radius: 25px; + margin-top: 24px; + background: #ffb700; + border: 0.1px solid; + border-radius: 17px; + padding: 12px; + font-family: 'Francois One', sans-serif; + transition: 80ms; } .MealsF { - margin: 8px; - /* background: red; */ - margin-bottom: 14px; - padding: 14px; - color: #fff; - font-size: 24px; - font-family: 'Francois One', sans-serif; + margin: 8px; + /* background: red; */ + margin-bottom: 14px; + padding: 14px; + color: #fff; + font-size: 24px; + font-family: 'Francois One', sans-serif; } .TheMainInfo { - margin-top: 19px; - background: #000; - color: #fff; - padding: 25px; - border-radius: 17px; - width: 53%; - margin: 0 auto; - margin-top: 29px; - /* margin-left: 15%; */ + margin-top: 19px; + background: #000; + color: #fff; + padding: 25px; + border-radius: 17px; + width: 53%; + margin: 0 auto; + margin-top: 29px; + /* margin-left: 15%; */ } th.MealsR { - color: #fff; - font-family: 'Francois One', sans-serif; - + color: #fff; + font-family: 'Francois One', sans-serif; } -.fa, .fas { - font-weight: 900; - margin-right: 7px; +.fa, +.fas { + font-weight: 900; + margin-right: 7px; } input.input1 { - padding: 32px; - border-radius: 50px; - -moz-border-radius: 50px; - -webkit-border-radius: 50px; - border: 5px solid #71db76; - margin-top: 0; - margin-bottom: 0; - margin-left: auto; - margin-right: auto; - width: 45%; - text-align: center; - font-size: 29px; - margin: 27px 5px; - font-family: 'Francois One', sans-serif; + padding: 32px; + border-radius: 50px; + -moz-border-radius: 50px; + -webkit-border-radius: 50px; + border: 5px solid #71db76; + margin-top: 0; + margin-bottom: 0; + margin-left: auto; + margin-right: auto; + width: 45%; + text-align: center; + font-size: 29px; + margin: 27px 5px; + font-family: 'Francois One', sans-serif; } table.Tabel { - margin: 0 auto; + margin: 0 auto; } .search1 { - background-color: #fff; - border: none; - color: rgb(113, 219, 119); - padding: 20px; - text-align: center; - text-decoration: none; - display: inline-block; - font-size: 16px; - margin: 4px 2px; - cursor: pointer; - border-radius: 26px; + background-color: #fff; + border: none; + color: rgb(113, 219, 119); + padding: 20px; + text-align: center; + text-decoration: none; + display: inline-block; + font-size: 16px; + margin: 4px 2px; + cursor: pointer; + border-radius: 26px; } .fa-search:before { - content: "\f002"; - font-size: 39px; + content: "\f002"; + font-size: 39px; } td.restaurnt5 { - font-weight: 400; - padding: 18px; + font-weight: 400; + padding: 18px; } .UserHeader { - background: #ffb700; - width: 400px; - margin: 0 auto; - border: 0.1px solid; - border-radius: 19px; - font-size: 19px; - padding: 30px; - + background: #ffb700; + width: 400px; + margin: 0 auto; + border: 0.1px solid; + border-radius: 19px; + font-size: 19px; + padding: 30px; } h1.UserTitles { - font-size: 18px; + font-size: 18px; } .fas { - font-weight: 900; - margin-right: 7px; - font-size: 21px; + font-weight: 900; + margin-right: 7px; + font-size: 21px; } .UserInput { - padding: 7px; - border-radius: 17px; - border: 0.2px; + padding: 7px; + border-radius: 17px; + border: 0.2px; } .ButtonLog { - margin-top: 19px; - margin-bottom: 6px; - border-radius: 17px; - width: 32%; - border: 0.1px; - font-size: 23px; - font-family: 'Francois One', sans-serif; -} -.SignUp{ - font-size: 20px; - padding: 14px; - text-decoration: none; - color: #000; + margin-top: 19px; + margin-bottom: 6px; + border-radius: 17px; + width: 32%; + border: 0.1px; + font-size: 23px; + font-family: 'Francois One', sans-serif; +} +.SignUp { + font-size: 20px; + padding: 14px; + text-decoration: none; + color: #000; } .NaV { - margin-top: 2%; - margin-bottom: 2%; + margin-top: 2%; + margin-bottom: 2%; } div#TheMainHello { -width:100%; + width: 100%; } h1.HI { - width: 300px; - float: left; - display: inline; - margin: 25px; + width: 300px; + float: left; + display: inline; + margin: 25px; } p.Para { - background: #000; - color: #fff; - border-radius: 17px; - padding: 25px; - font-size: 15px; + background: #000; + color: #fff; + border-radius: 17px; + padding: 25px; + font-size: 15px; } -.AlUsers{ - width: 714px; - margin: 0 auto; +.AlUsers { + width: 714px; + margin: 0 auto; } .Reviws { - float: left; - background: #000; - width: 16%; - border-radius: 23px; - color: #fff; - width: 100%; + float: left; + background: #000; + width: 16%; + border-radius: 23px; + color: #fff; + width: 100%; } -.RE{ - float: left; - margin: 16px; +.RE { + float: left; + margin: 16px; } img.Img { - /* margin-left: -318px; */ - width: 100%; - max-height: 407px; + /* margin-left: -318px; */ + width: 100%; + max-height: 407px; } h1.TitlesS { - color: #fff; - position: absolute; - margin: 0 auto; - margin-left: 494px; - margin-top: 146px; - font-family: 'Francois One', sans-serif; - font-size: 50px; - background: #000; - padding: 25px; - border-radius: 17px; -} -.Buu{ - padding: 25px; - border-radius: 17px; - font-size: 26px; - border: 0.5px; - font-family: 'Francois One', sans-serif; - width: 300px; + color: #fff; + position: absolute; + margin: 0 auto; + margin-left: 494px; + margin-top: 146px; + font-family: 'Francois One', sans-serif; + font-size: 50px; + background: #000; + padding: 25px; + border-radius: 17px; +} +.Buu { + padding: 25px; + border-radius: 17px; + font-size: 26px; + border: 0.5px; + font-family: 'Francois One', sans-serif; + width: 300px; } a { - text-decoration: none; - color: #000; + text-decoration: none; + color: #000; } #UserTi { - font-size: 47px; + font-size: 47px; } #UserTi1 { - font-size: 47px; + font-size: 47px; } /* #Start{ margin-top: 105px; } */ p#NormalUser { - padding-bottom: 125px; -} \ No newline at end of file + padding-bottom: 125px; +} diff --git a/src/App.jsx b/src/App.jsx index 316eb17..24108b2 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -1,35 +1,29 @@ import React from 'react'; // import ReactDOM from 'react-dom' import './App.css'; -import { BrowserRouter , Route } from 'react-router-dom'; +import { BrowserRouter, Route } from 'react-router-dom'; import Food from './components/food.jsx'; -// import Err from './components/404Page.jsx'; import Navgation from './components/Nav.jsx'; import Login from './components/login.jsx'; import register from './components/registered.jsx'; import ThankYouPage from './components/ThankYouPage.jsx'; import WeclomePage from './components/WelcomePage.jsx'; - - - class App extends React.Component { - -render(){ - return ( - -
- - - - - - - - -
- ); - } + render() { + return ( +
+ + + + + + + + +
+ ); + } } -export default App; \ No newline at end of file +export default App; diff --git a/src/components/Nav.jsx b/src/components/Nav.jsx index 8364c3a..a5dae23 100644 --- a/src/components/Nav.jsx +++ b/src/components/Nav.jsx @@ -1,21 +1,20 @@ -import React from 'react'; -import {NavLink} from 'react-router-dom'; +import React from 'react'; +import { NavLink } from 'react-router-dom'; // import {MealList} from 'mealsList.jsx' // import React from 'react'; // import {NavLink} from 'react-router-dom'; -const Navgation =() =>{ - - return( -
- Sign Up - -
- - - ) - - -} +const Navgation = () => { + return ( +
+ + Sign Up + + + + +
+ ); +}; export default Navgation; diff --git a/src/components/ThankYouPage.jsx b/src/components/ThankYouPage.jsx index e258ad8..a6ad144 100644 --- a/src/components/ThankYouPage.jsx +++ b/src/components/ThankYouPage.jsx @@ -1,25 +1,17 @@ -import React from "react"; -import {browseRoute} from 'react-router-dom'; +import React from 'react'; +import { browseRoute } from 'react-router-dom'; - -class ThankYouPage extends React.Component{ - - render(){ - return( -
-
-

THANK YOU FOR REGISTERING

- -

We Will Be in Touch With You Soon

- -
- - - -
- - ) - } -} +class ThankYouPage extends React.Component { + render() { + return ( +
+
+

THANK YOU FOR REGISTERING

+ +

We Will Be in Touch With You Soon

+
+
+ ); + } +} export default ThankYouPage; - diff --git a/src/components/WelcomePage.jsx b/src/components/WelcomePage.jsx index fb57e93..76b40ea 100644 --- a/src/components/WelcomePage.jsx +++ b/src/components/WelcomePage.jsx @@ -1,58 +1,83 @@ -import React from "react"; -import {browseRoute} from 'react-router-dom'; +import React from 'react'; +import { browseRoute } from 'react-router-dom'; import '../App.css'; +class WelcomePage extends React.Component { + render() { + return ( +
+
+

Welcome to TAFRAN

+ -class WelcomePage extends React.Component{ +
+

+ +

+ {' '} +

Restaurnts Owners

Your Restaurnt will Be Exposse To thousands of people every + day and You can get benefit from this to get new customers and make your busness biger. + Whate the requirements to get your restarunt accsepted All You need to have is good + restarunt and have a good customer servers and our team will come to you to check every + thing and you will be accsepted +

+ +

- render(){ - return( -
-
-

Welcome to TAFRAN

- +

+ +

+ {' '} +

Normal User

This App Is to Make your life Easy when You order food You just Put + in How much you want to eat and we will take care of the rest we will give you famous + restaurnts and none famous restaurnt how have meals under your Budget and You will pick + Your favorite +

+ +

+
+

+ {' '} +

Koel Ganguly

Hands down the best food I had in Jordan. We went with friends + while visiting Amman and the whole experience was just great. Every item was delicious + and quantity was huge. We ordered various selection of appetizers. The customer service + was so very warm and friendly. The restaurant has a very warm welcoming decor. +

-
-

-

Restaurnts Owners

Your Restaurnt will Be Exposse To thousands of people every day and You can get benefit from this to get new customers and make your busness biger. - Whate the requirements to get your restarunt accsepted - All You need to have is good restarunt and have a good customer servers and our team will come to you to check every thing and you will be accsepted -

- - +

+ {' '} +

Sinisa Belina

I loved the food. Service was great, nice and peaceful atmosphere + - all you need to enjoy a good meal is available here. +

-

-

Normal User

This App Is to Make your life Easy when You order food You just Put in How much you want to eat and we will - take care of the rest we will give you famous restaurnts and none famous restaurnt how have meals under your Budget and You will pick Your favorite -

- - -
+

+ {' '} +

mohammad Gmal

best service and food. i highly reccomend it +

-

Koel Ganguly

Hands down the best food I had in Jordan. We went with friends while visiting Amman and the whole experience was just great. Every item was delicious and quantity was huge. We ordered various selection of appetizers. The customer service was so very warm and friendly. The restaurant has a very warm welcoming decor. -

- -

Sinisa Belina

I loved the food. Service was great, nice and peaceful atmosphere - all you need to enjoy a good meal is available here. - -

- -

mohammad Gmal

best service and food. i highly reccomend it

- -

Khaled Kurdi

Tannoureen has always been a family favorite when it comes to Lebanese cuisine.. The falafel are still as Yummy as I remember and the kubbeh niyyeh is outstanding with the garlic paste and onions.The shish kebab, meat, chicken and minced meat are yummy... If you want tasty food go there. The ambiance us very nice although on the noisy side, so this makes it a place were you can have loud conversations rather than a romantic dinner..enjoy.

-
- -
- -
- {/* DONE */} - -
- - ) - } -} +

+ {' '} +

Khaled Kurdi

Tannoureen has always been a family favorite when it comes to + Lebanese cuisine.. The falafel are still as Yummy as I remember and the kubbeh niyyeh is + outstanding with the garlic paste and onions.The shish kebab, meat, chicken and minced + meat are yummy... If you want tasty food go there. The ambiance us very nice although on + the noisy side, so this makes it a place were you can have loud conversations rather + than a romantic dinner..enjoy. +

+
+
+
+ {/* DONE */} +
+ ); + } +} export default WelcomePage; - diff --git a/src/components/food.jsx b/src/components/food.jsx index 8f1dc6b..2636f85 100644 --- a/src/components/food.jsx +++ b/src/components/food.jsx @@ -1,216 +1,212 @@ import React from 'react'; import { BrowserRouter } from 'react-router-dom'; -// import $ from 'jquery'; -import "../App.css" +// import $ from 'jquery'; +import '../App.css'; // import { userInfo } from 'os'; // Don't Touch this /Qusai/ -const url = "http://localhost:5000/"; +const url = 'http://localhost:5000/'; fetch(url) -.then(response => response.text()) -.then(contents => console.log(contents)) -.catch(() => console.log("Can’t access " + url + " response. Blocked by browser?")) + .then((response) => response.text()) + .then((contents) => console.log(contents)) + .catch(() => console.log('Can’t access ' + url + ' response. Blocked by browser?')); class Food extends React.Component { - constructor(props) { - super(props); - this.state = { - Price: '', - Name: '', - dispalyMealList: false, - displaRestList: false, - meals: [], - resturants: [], - isHidden: true - } - } - - handelPriceChange(e) { - this.setState({ - Price: e.target.value, - }); - console.log(this.state.Price); - } - - hande(e) { - this.setState({ - Price: e.target.value, - }); - console.log(this.state.Price); - } - - toggleHidden() { - this.setState({ - isHidden: !this.state.isHidden - }) - } - sendRestNameAndPrice(e, mealObj) { - e.preventDefault(); - - // var body = { - // price: this.state.Price, - // name : this.state.Name - // } - console.log(mealObj); - - fetch('http://localhost:5000/getRest', { - method: 'POST', - headers: { "Content-Type": "application/json" }, - body: JSON.stringify(mealObj) - }).then((response) => { - return response.json(); - }).then((data) => { - console.log(data); - this.setState({ - resturants:data, - dispalyMealList: false, - displaRestList: true - }) - }); - - - - } - - sendPriceToServer(e) { - e.preventDefault(); - var body = { - price: this.state.Price - } - console.log(body) - - fetch('http://localhost:5000/getMealsByPrice', { - method: 'POST', - headers: { "Content-Type": "application/json" }, - body: JSON.stringify(body) - }).then((response) => { - return response.json(); - }).then((data) => { - console.log(data); - this.setState({ - meals: data, - dispalyMealList: true - }) - }); - } - - - render() { - return ( - - -
-
-
- - -

- - - - {/* {!this.state.isHidden && } */} - {this.state.dispalyMealList ? - : - null - } - - {this.state.displaRestList ? - : - null - } - - -
- -
-
- ) - } -}; + constructor(props) { + super(props); + this.state = { + Price: '', + Name: '', + dispalyMealList: false, + displaRestList: false, + meals: [], + resturants: [], + isHidden: true + }; + } + + handelPriceChange(e) { + this.setState({ + Price: e.target.value + }); + console.log(this.state.Price); + } + + hande(e) { + this.setState({ + Price: e.target.value + }); + console.log(this.state.Price); + } + + toggleHidden() { + this.setState({ + isHidden: !this.state.isHidden + }); + } + sendRestNameAndPrice(e, mealObj) { + e.preventDefault(); + + // var body = { + // price: this.state.Price, + // name : this.state.Name + // } + console.log(mealObj); + + fetch('http://localhost:5000/getRest', { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify(mealObj) + }) + .then((response) => { + return response.json(); + }) + .then((data) => { + console.log(data); + this.setState({ + resturants: data, + dispalyMealList: false, + displaRestList: true + }); + }); + } + + sendPriceToServer(e) { + e.preventDefault(); + var body = { + price: this.state.Price + }; + console.log(body); + + fetch('http://localhost:5000/getMealsByPrice', { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify(body) + }) + .then((response) => { + return response.json(); + }) + .then((data) => { + console.log(data); + this.setState({ + meals: data, + dispalyMealList: true + }); + }); + } + + render() { + return ( + + +
+
+
+ + + +
+ + {/* {!this.state.isHidden && } */} + {this.state.dispalyMealList ? ( + + ) : null} + + {this.state.displaRestList ? : null} + +
+
+
+ ); + } +} class MealsList extends React.Component { - - render(props) { - - return ( -
{ - this.props.meals.length > 0 ? - - - - - - {/* */} - - - - - { - this.props.meals.map((meal, i) => { - return this.props.sendRestNameAndPrice(event, meal)}> - - {/* */} - - - {/* */} - - - - }) - } - - -
TheRestRuntMealAgePrice
{meal.restName}{meal.mealName}{" the price : "}{meal.price}{' JD'}
: 'Please, enter anothor price' - - } -
- ) - } + render(props) { + return ( +
+ {this.props.meals.length > 0 ? ( + + + + + + {/* */} + + + + + {this.props.meals.map((meal, i) => { + return ( + this.props.sendRestNameAndPrice(event, meal)} + > + {/* */} + + + {/* */} + + + ); + })} + +
+ TheRestRunt + MealAgePrice
{meal.restName}{meal.mealName}{" the price : "} + {meal.price} + {' JD'} +
+ ) : ( + 'Please, enter anothor price' + )} +
+ ); + } } - class Resturant extends React.Component { - - render(props) { - - return ( -
{ - this.props.resturants.length > 0 ? - - - - - - - - - - { - this.props.resturants.map((resturant, i) => { - return console.log("this is" + resturant.restName)}> - - - - - - - }) - } - -
Resturant NamePhone NumberAddress
{resturant.name}{resturant.phone}{resturant.address}
: null - - } -
- ) - } + render(props) { + return ( +
+ {this.props.resturants.length > 0 ? ( + + + + + + + + + + {this.props.resturants.map((resturant, i) => { + return ( + console.log('this is' + resturant.restName)}> + + + + + ); + })} + +
Resturant NamePhone NumberAddress
{resturant.name}{resturant.phone}{resturant.address}
+ ) : null} +
+ ); + } } - - - -export default Food; \ No newline at end of file +export default Food; diff --git a/src/components/login.jsx b/src/components/login.jsx index d690d27..f89aca1 100644 --- a/src/components/login.jsx +++ b/src/components/login.jsx @@ -1,40 +1,41 @@ -import React from "react"; -import {browseRoute} from 'react-router-dom'; +import React from 'react'; +import { browseRoute } from 'react-router-dom'; +class register extends React.Component { + constructor() { + super(); + this.state = { + UserName: '', + Password: '', + Location: '', + PhoneNumber: '', + Restaurant: '', + PriceandMeal: '', + errors: {} + }; + // this.onChange = this.onChange.bind(this); + // this.onClick = this.onClick.bind(this); + } -class register extends React.Component{ - constructor(){ - super(); - this.state={ - UserName:"", - Password:"", - Location:"", - PhoneNumber:"", - Restaurant:"", - PriceandMeal:"", - errors:{} + render() { + return ( +
+
+

+ UserName +

+ +

+ Password +

+ - } - // this.onChange = this.onChange.bind(this); - // this.onClick = this.onClick.bind(this); - } - - render(){ - return( -
- -

UserName

- -

Password

- - - - - -
- - ) - } -} + + +
+ ); + } +} export default register; - diff --git a/src/components/registered.jsx b/src/components/registered.jsx index 5edad66..a2c8e8e 100644 --- a/src/components/registered.jsx +++ b/src/components/registered.jsx @@ -1,127 +1,167 @@ -import React from "react"; -import {browseRoute} from 'react-router-dom'; +import React from 'react'; +import { browseRoute } from 'react-router-dom'; +class register extends React.Component { + constructor() { + super(); + this.state = { + UserName: '', + Password: '', + Location: '', + PhoneNumber: '', + Restaurant: '', + PriceandMeal: '', + UserNameErr: '', + PasswordErr: '', + LocationErr: '', + PhoneNumberErr: '', + PriceandMealErr: '', + errors: {} + }; + } -class register extends React.Component{ - constructor(){ - super(); - this.state={ - UserName:"", - Password:"", - Location:"", - PhoneNumber:"", - Restaurant:"", - PriceandMeal:"", - UserNameErr:"", - PasswordErr:"", - LocationErr:"", - PhoneNumberErr:"", - PriceandMealErr:"", - errors:{} + onChange(e) { + this.setState({ [e.target.name]: e.target.value }); + } + onClick(e) { + e.preventdefault(); + const Users = { + /// The Data For The Users + Username: this.state.UserName, + Password: this.state.Password, + Location: this.state.Location, + PhoneNumber: this.state.PhoneNumber, + Restaurant: this.state.Restaurant, + PriceandMeal: this.state.PriceandMeal + }; + } - } + sendRestNameAndPrice(e, mealObj) { + e.preventDefault(); + console.log(mealObj); + fetch('http://localhost:5000/reg', { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify(mealObj) + }) + .then((response) => { + return response.json(); + }) + .then((data) => { + console.log(data); + this.setState({ + resturants: data, + dispalyMealList: false, + displaRestList: true + }); + }); + } - } + handelUserChange(e) { + this.setState({ + UserName: e.target.value, + Password: e.target.value, + Location: e.target.value, + PhoneNumber: e.target.value, + Restaurant: e.target.value, + PriceandMeal: e.target.value + }); + console.log(this.state.UserName); + } - - onChange(e){ - this.setState({[e.target.name]:e.target.value}) - } - onClick(e){ - e.preventdefault(); - const Users = { - /// The Data For The Users - Username : this.state.UserName, - Password:this.state.Password, - Location:this.state.Location, - PhoneNumber:this.state.PhoneNumber, - Restaurant:this.state.Restaurant, - PriceandMeal:this.state.PriceandMeal - } - } + UserVal = () => { + let UserNameErr = ''; + let PasswordErr = ''; + let PriceandMealErr = ''; - sendRestNameAndPrice(e, mealObj) { - e.preventDefault(); - console.log(mealObj); - fetch('http://localhost:5000/reg', { - method: 'POST', - headers: { "Content-Type": "application/json" }, - body: JSON.stringify(mealObj) - }).then((response) => { - return response.json(); - }).then((data) => { - console.log(data); - this.setState({ - resturants:data, - dispalyMealList: false, - displaRestList: true - }) - }); - - - - } - - handelUserChange(e) { - this.setState({ - UserName: e.target.value, - Password: e.target.value, - Location: e.target.value, - PhoneNumber:e.target.value, - Restaurant:e.target.value, - PriceandMeal:e.target.value - }); - console.log(this.state.UserName); - } + if (!this.state.UserName.includes('@')) { + UserNameErr = 'Invalid Email'; + } + if (UserNameErr) { + this.setState({ UserNameErr, PasswordErr, PriceandMealErr }); + return false; + } + return true; + }; + inVokeUserVal = (event) => { + event.preventDefault(); + this.UserVal(); + }; - UserVal=()=>{ + render() { + return ( +
+
+

+ Email +

+ +
{this.state.UserNameErr}
+

+ Password +

+ +
{this.state.PasswordErr}
+

+ Location +

+ +

+ Phone Number +

+ +

+ The Restaurant +

+ +

+ Restaurant Info +

+ +
{this.state.PriceandMealErr}
- let UserNameErr = ''; - let PasswordErr = ''; - let PriceandMealErr =''; - - if(!this.state.UserName.includes("@")){ - UserNameErr = "Invalid Email"; - } - if(UserNameErr){ - this.setState({UserNameErr,PasswordErr,PriceandMealErr}); - return false; - } - return true; - }; - - inVokeUserVal=(event)=>{ - event.preventDefault(); - this.UserVal(); - }; - - render(){ - return( -
- -

Email

- -
{this.state.UserNameErr}
-

Password

- -
{this.state.PasswordErr}
-

Location

- -

Phone Number

- -

The Restaurant

- -

Restaurant Info

- -
{this.state.PriceandMealErr}
- - - -
- - ) - } -} + + +
+ ); + } +} export default register; - From fc5ace29b01967fa6c8b6029a2a650f31db8214c Mon Sep 17 00:00:00 2001 From: AmmarAlkhooly98 Date: Mon, 27 May 2019 16:02:23 +0300 Subject: [PATCH 02/17] initial files created for angular --- Angular/main.html | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 Angular/main.html diff --git a/Angular/main.html b/Angular/main.html new file mode 100644 index 0000000..ed9375e --- /dev/null +++ b/Angular/main.html @@ -0,0 +1,14 @@ + + + + + tafran legacy + + + + + + + + + \ No newline at end of file From 8026cb963c9960886abef0ae9eb81c7f2ef7463b Mon Sep 17 00:00:00 2001 From: mohamedartan Date: Mon, 27 May 2019 20:49:26 +0300 Subject: [PATCH 03/17] init --- Angular/App.js | 42 ++++++++++++++++++++ Angular/ThankYouPage.html | 8 ++++ Angular/WelcomePage.html | 43 ++++++++++++++++++++ Angular/food.html | 32 +++++++++++++++ Angular/main.html | 19 +++++++++ Angular/signin.html | 12 ++++++ Angular/signup.html | 29 ++++++++++++++ package-lock.json | 82 +++++++++++---------------------------- 8 files changed, 207 insertions(+), 60 deletions(-) create mode 100644 Angular/App.js create mode 100644 Angular/ThankYouPage.html create mode 100644 Angular/WelcomePage.html create mode 100644 Angular/food.html create mode 100644 Angular/main.html create mode 100644 Angular/signin.html create mode 100644 Angular/signup.html diff --git a/Angular/App.js b/Angular/App.js new file mode 100644 index 0000000..4ef4461 --- /dev/null +++ b/Angular/App.js @@ -0,0 +1,42 @@ + +angular.module( "app" ,['ngRoute']) + +.config(function($routeProvider){ + + $routeProvider + + + .when("/",{ + templateUrl:"./WelcomePage.html", +}) + + .when("/signup",{ + templateUrl:"./signup.html" + // controller:"signup" +}) + +.when("/signin", { + templateUrl:"./signin.html", + // controller: "signin" +}) + + +.when("/ThankYouPage",{ + templateUrl:"./ThankYouPage.html", +})}) + +// .controller("food",function($scope,$http,$location,$rootScope){ +// console.log("hi") + +// }) + +// headers: {'Content-Type': "application/json"} +// }).then(function(response){ +// $rootScope.data = response.data[0] +// $location.path("/profile") + +// }).catch(function(){ +// console.log('big error') +// }) +// } + diff --git a/Angular/ThankYouPage.html b/Angular/ThankYouPage.html new file mode 100644 index 0000000..bd25e83 --- /dev/null +++ b/Angular/ThankYouPage.html @@ -0,0 +1,8 @@ +
+

ThankYouPage

+ +
\ No newline at end of file diff --git a/Angular/WelcomePage.html b/Angular/WelcomePage.html new file mode 100644 index 0000000..0b75dac --- /dev/null +++ b/Angular/WelcomePage.html @@ -0,0 +1,43 @@ +
+

Welcome

+ + +
\ No newline at end of file diff --git a/Angular/food.html b/Angular/food.html new file mode 100644 index 0000000..65804b0 --- /dev/null +++ b/Angular/food.html @@ -0,0 +1,32 @@ + + +
+
+

food

+ +
+
\ No newline at end of file diff --git a/Angular/main.html b/Angular/main.html new file mode 100644 index 0000000..d22f267 --- /dev/null +++ b/Angular/main.html @@ -0,0 +1,19 @@ + + + + + tafran legacy + + + + + + + + + +
+ + + + \ No newline at end of file diff --git a/Angular/signin.html b/Angular/signin.html new file mode 100644 index 0000000..c2780af --- /dev/null +++ b/Angular/signin.html @@ -0,0 +1,12 @@ +
+

signin

+ +
\ No newline at end of file diff --git a/Angular/signup.html b/Angular/signup.html new file mode 100644 index 0000000..149c00b --- /dev/null +++ b/Angular/signup.html @@ -0,0 +1,29 @@ +
+

sign up

+ + + +
\ No newline at end of file diff --git a/package-lock.json b/package-lock.json index b8349d9..0812f46 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2840,8 +2840,7 @@ }, "ansi-regex": { "version": "2.1.1", - "bundled": true, - "optional": true + "bundled": true }, "aproba": { "version": "1.2.0", @@ -2859,13 +2858,11 @@ }, "balanced-match": { "version": "1.0.0", - "bundled": true, - "optional": true + "bundled": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, - "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -2878,18 +2875,15 @@ }, "code-point-at": { "version": "1.1.0", - "bundled": true, - "optional": true + "bundled": true }, "concat-map": { "version": "0.0.1", - "bundled": true, - "optional": true + "bundled": true }, "console-control-strings": { "version": "1.1.0", - "bundled": true, - "optional": true + "bundled": true }, "core-util-is": { "version": "1.0.2", @@ -2992,8 +2986,7 @@ }, "inherits": { "version": "2.0.3", - "bundled": true, - "optional": true + "bundled": true }, "ini": { "version": "1.3.5", @@ -3003,7 +2996,6 @@ "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, - "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -3016,20 +3008,17 @@ "minimatch": { "version": "3.0.4", "bundled": true, - "optional": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { "version": "0.0.8", - "bundled": true, - "optional": true + "bundled": true }, "minipass": { "version": "2.3.5", "bundled": true, - "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -3046,7 +3035,6 @@ "mkdirp": { "version": "0.5.1", "bundled": true, - "optional": true, "requires": { "minimist": "0.0.8" } @@ -3119,8 +3107,7 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true, - "optional": true + "bundled": true }, "object-assign": { "version": "4.1.1", @@ -3130,7 +3117,6 @@ "once": { "version": "1.4.0", "bundled": true, - "optional": true, "requires": { "wrappy": "1" } @@ -3206,8 +3192,7 @@ }, "safe-buffer": { "version": "5.1.2", - "bundled": true, - "optional": true + "bundled": true }, "safer-buffer": { "version": "2.1.2", @@ -3237,7 +3222,6 @@ "string-width": { "version": "1.0.2", "bundled": true, - "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -3255,7 +3239,6 @@ "strip-ansi": { "version": "3.0.1", "bundled": true, - "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -3294,13 +3277,11 @@ }, "wrappy": { "version": "1.0.2", - "bundled": true, - "optional": true + "bundled": true }, "yallist": { "version": "3.0.3", - "bundled": true, - "optional": true + "bundled": true } } }, @@ -7056,8 +7037,7 @@ }, "ansi-regex": { "version": "2.1.1", - "bundled": true, - "optional": true + "bundled": true }, "aproba": { "version": "1.2.0", @@ -7075,13 +7055,11 @@ }, "balanced-match": { "version": "1.0.0", - "bundled": true, - "optional": true + "bundled": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, - "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -7094,18 +7072,15 @@ }, "code-point-at": { "version": "1.1.0", - "bundled": true, - "optional": true + "bundled": true }, "concat-map": { "version": "0.0.1", - "bundled": true, - "optional": true + "bundled": true }, "console-control-strings": { "version": "1.1.0", - "bundled": true, - "optional": true + "bundled": true }, "core-util-is": { "version": "1.0.2", @@ -7208,8 +7183,7 @@ }, "inherits": { "version": "2.0.3", - "bundled": true, - "optional": true + "bundled": true }, "ini": { "version": "1.3.5", @@ -7219,7 +7193,6 @@ "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, - "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -7232,20 +7205,17 @@ "minimatch": { "version": "3.0.4", "bundled": true, - "optional": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { "version": "0.0.8", - "bundled": true, - "optional": true + "bundled": true }, "minipass": { "version": "2.3.5", "bundled": true, - "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -7262,7 +7232,6 @@ "mkdirp": { "version": "0.5.1", "bundled": true, - "optional": true, "requires": { "minimist": "0.0.8" } @@ -7335,8 +7304,7 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true, - "optional": true + "bundled": true }, "object-assign": { "version": "4.1.1", @@ -7346,7 +7314,6 @@ "once": { "version": "1.4.0", "bundled": true, - "optional": true, "requires": { "wrappy": "1" } @@ -7422,8 +7389,7 @@ }, "safe-buffer": { "version": "5.1.2", - "bundled": true, - "optional": true + "bundled": true }, "safer-buffer": { "version": "2.1.2", @@ -7453,7 +7419,6 @@ "string-width": { "version": "1.0.2", "bundled": true, - "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -7471,7 +7436,6 @@ "strip-ansi": { "version": "3.0.1", "bundled": true, - "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -7510,13 +7474,11 @@ }, "wrappy": { "version": "1.0.2", - "bundled": true, - "optional": true + "bundled": true }, "yallist": { "version": "3.0.3", - "bundled": true, - "optional": true + "bundled": true } } } From 9ee486241bdea9a6faec383c46f727b1a419470d Mon Sep 17 00:00:00 2001 From: areejobaid94 Date: Mon, 27 May 2019 22:20:36 +0300 Subject: [PATCH 04/17] add js files and connection --- Angular/App.js | 11 ++++++----- Angular/WelcomePage.html | 4 ++-- Angular/food.html | 33 +-------------------------------- Angular/food.js | 7 +++++++ Angular/main.html | 4 +++- Angular/signin.js | 7 +++++++ Angular/signup.js | 7 +++++++ 7 files changed, 33 insertions(+), 40 deletions(-) create mode 100644 Angular/food.js create mode 100644 Angular/signin.js create mode 100644 Angular/signup.js diff --git a/Angular/App.js b/Angular/App.js index 9cce706..e68aff4 100644 --- a/Angular/App.js +++ b/Angular/App.js @@ -4,25 +4,26 @@ angular.module( "app" ,['ngRoute']) $routeProvider - .when("/",{ templateUrl:"./WelcomePage.html", }) .when("/signup",{ - templateUrl:"./signup.html" - // controller:"signup" + templateUrl:"./signup.html", + controller : "signup" }) .when("/signin", { templateUrl:"./signin.html", - // controller: "signin" + controller: "signin" }) .when("/ThankYouPage",{ templateUrl:"./ThankYouPage.html", -})}) +}) +}) + // .controller("food",function($scope,$http,$location,$rootScope){ // console.log("hi") diff --git a/Angular/WelcomePage.html b/Angular/WelcomePage.html index 0b75dac..c421dad 100644 --- a/Angular/WelcomePage.html +++ b/Angular/WelcomePage.html @@ -1,6 +1,6 @@

Welcome

- +
\ No newline at end of file diff --git a/Angular/food.html b/Angular/food.html index 65804b0..7b2d2d1 100644 --- a/Angular/food.html +++ b/Angular/food.html @@ -1,32 +1 @@ - - -
-
-

food

- -
-
\ No newline at end of file +

mmm

\ No newline at end of file diff --git a/Angular/food.js b/Angular/food.js new file mode 100644 index 0000000..4514d3d --- /dev/null +++ b/Angular/food.js @@ -0,0 +1,7 @@ +angular.module( "app") + + +.controller("food",function($scope,$http,$location,$rootScope){ + console.log("hi") + + }) \ No newline at end of file diff --git a/Angular/main.html b/Angular/main.html index d22f267..aca8343 100644 --- a/Angular/main.html +++ b/Angular/main.html @@ -13,7 +13,9 @@
- + + + \ No newline at end of file diff --git a/Angular/signin.js b/Angular/signin.js new file mode 100644 index 0000000..7324da4 --- /dev/null +++ b/Angular/signin.js @@ -0,0 +1,7 @@ +angular.module( "app") + + +.controller("signin",function($scope,$http,$location,$rootScope){ + console.log("hi") + + }) \ No newline at end of file diff --git a/Angular/signup.js b/Angular/signup.js new file mode 100644 index 0000000..dbeb042 --- /dev/null +++ b/Angular/signup.js @@ -0,0 +1,7 @@ +angular.module( "app") + + +.controller("signup",function($scope,$http,$location,$rootScope){ + console.log("hi") + + }) \ No newline at end of file From f2742ee3c642fcd35528cb67ad3a4ac72e06d118 Mon Sep 17 00:00:00 2001 From: areejobaid94 Date: Mon, 27 May 2019 22:28:02 +0300 Subject: [PATCH 05/17] connection --- Angular/App.js | 7 +++++++ Angular/food.html | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Angular/App.js b/Angular/App.js index e68aff4..e8ed1cf 100644 --- a/Angular/App.js +++ b/Angular/App.js @@ -13,6 +13,13 @@ angular.module( "app" ,['ngRoute']) controller : "signup" }) + +.when("/food",{ + templateUrl:"./food.html", + controller : "food" +}) + + .when("/signin", { templateUrl:"./signin.html", controller: "signin" diff --git a/Angular/food.html b/Angular/food.html index 7b2d2d1..ea123fa 100644 --- a/Angular/food.html +++ b/Angular/food.html @@ -1 +1 @@ -

mmm

\ No newline at end of file +

food

\ No newline at end of file From 8c29988d78832f0784e8d2bbae9cb88fd06f7fe3 Mon Sep 17 00:00:00 2001 From: AmmarAlkhooly98 Date: Mon, 27 May 2019 23:12:21 +0300 Subject: [PATCH 06/17] start --- Angular/main.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Angular/main.html b/Angular/main.html index ed9375e..6447c17 100644 --- a/Angular/main.html +++ b/Angular/main.html @@ -9,6 +9,6 @@ - +

TAFRAN

\ No newline at end of file From 630086bb4a6b785af780d88a47c78b3ce7b00c1b Mon Sep 17 00:00:00 2001 From: mohamedartan Date: Mon, 27 May 2019 23:17:12 +0300 Subject: [PATCH 07/17] added login html --- .vscode/settings.json | 3 +++ Angular/signin.html | 15 ++++++--------- 2 files changed, 9 insertions(+), 9 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..aef8443 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "liveServer.settings.port": 5501 +} \ No newline at end of file diff --git a/Angular/signin.html b/Angular/signin.html index c2780af..b632d00 100644 --- a/Angular/signin.html +++ b/Angular/signin.html @@ -1,12 +1,9 @@ -
+

signin

- + +
\ No newline at end of file From 869b06cee5b779477ba61f3aa98ea13110dfd57b Mon Sep 17 00:00:00 2001 From: areejobaid94 Date: Tue, 28 May 2019 12:59:25 +0300 Subject: [PATCH 08/17] welcame page --- Angular/WelcomePage.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Angular/WelcomePage.html b/Angular/WelcomePage.html index c421dad..b159a0b 100644 --- a/Angular/WelcomePage.html +++ b/Angular/WelcomePage.html @@ -11,15 +11,15 @@

Whate the requirements to get your restarunt accsepted All You need to have is good restarunt and have a good customer servers and our team will come to you to check every thing and you will be accsepted

-

- +

Normal User

This App Is to Make your life Easy when You order food You just Put in How much you want to eat and we will take care of the rest we will give you famous restaurnts and none famous restaurnt how have meals under your Budget and You will pick Your favorite

-
From 28830550e2e9c82c4841a34da5754151c81a00ae Mon Sep 17 00:00:00 2001 From: areejobaid94 Date: Tue, 28 May 2019 15:47:05 +0300 Subject: [PATCH 09/17] bootstrape --- Angular/App.js | 20 ++------- Angular/WelcomePage.html | 95 ++++++++++++++++++++++++++++++---------- Angular/about.html | 1 + Angular/main.html | 19 ++++++-- 4 files changed, 92 insertions(+), 43 deletions(-) create mode 100644 Angular/about.html diff --git a/Angular/App.js b/Angular/App.js index e8ed1cf..3e5ecc0 100644 --- a/Angular/App.js +++ b/Angular/App.js @@ -1,4 +1,4 @@ -angular.module( "app" ,['ngRoute']) +angular.module( "app" ,['ui.bootstrap','ngRoute']) .config(function($routeProvider){ @@ -7,7 +7,9 @@ angular.module( "app" ,['ngRoute']) .when("/",{ templateUrl:"./WelcomePage.html", }) - +.when("/about",{ + templateUrl:"./about.html", +}) .when("/signup",{ templateUrl:"./signup.html", controller : "signup" @@ -32,18 +34,4 @@ angular.module( "app" ,['ngRoute']) }) -// .controller("food",function($scope,$http,$location,$rootScope){ -// console.log("hi") - -// }) - -// headers: {'Content-Type': "application/json"} -// }).then(function(response){ -// $rootScope.data = response.data[0] -// $location.path("/profile") - -// }).catch(function(){ -// console.log('big error') -// }) -// } diff --git a/Angular/WelcomePage.html b/Angular/WelcomePage.html index 22c7d02..c719dad 100644 --- a/Angular/WelcomePage.html +++ b/Angular/WelcomePage.html @@ -1,39 +1,88 @@
-
-

Welcome to TAFRAN

+
+

Welcome to TAFRAN

+
- + +
+

-

Restaurnts Owners

Your Restaurnt will Be Exposse To thousands of people every day and You can get benefit from this to get new customers and make your busness biger. - Whate the requirements to get your restarunt accsepted - All You need to have is good restarunt and have a good customer servers and our team will come to you to check every thing and you will be accsepted +

Restaurnts Owners

+
+

Your Restaurnt will Be Exposse To thousands of people every day and You can get benefit from this to get new customers and make your busness biger.

+

Whate the requirements to get your restarunt accsepted ?! + All You need to have is good restarunt and have a good

+

customer servers and our team will come to you to check every thing and you will be accsepted

- - +
+
+

-

Normal User

This App Is to Make your life Easy when You order food You just Put in How much you want to eat and we will - take care of the rest we will give you famous restaurnts and none famous restaurnt how have meals under your Budget and You will pick Your favorite +

Normal User

+
+

This App Is to Make your life Easy when You order food You just Put in How much you want to eat + and we will

+

take care of the rest we will give you famous restaurnts and none famous restaurnt how have meals under your Budget and You will pick Your favorite

- -
- -

Koel Ganguly

Hands down the best food I had in Jordan. We went with friends while visiting Amman and the whole experience was just great. Every item was delicious and quantity was huge. We ordered various selection of appetizers. The customer service was so very warm and friendly. The restaurant has a very warm welcoming decor. -

- -

Sinisa Belina

I loved the food. Service was great, nice and peaceful atmosphere - all you need to enjoy a good meal is available here. - -

- -

mohammad Gmal

best service and food. i highly reccomend it

- -

Khaled Kurdi

Tannoureen has always been a family favorite when it comes to Lebanese cuisine.. The falafel are still as Yummy as I remember and the kubbeh niyyeh is outstanding with the garlic paste and onions.The shish kebab, meat, chicken and minced meat are yummy... If you want tasty food go there. The ambiance us very nice although on the noisy side, so this makes it a place were you can have loud conversations rather than a romantic dinner..enjoy.

+
+
+
+
+

Feedbacks

+
+
+

Koel Ganguly

+
+ uploaded image +
+
+

Hands down the best food I had in Jordan. We went with friends while visiting Amman and the whole experience was just great. Every item was delicious and quantity was huge. We ordered various selection of appetizers. The customer service was so very warm and friendly. The restaurant has a very warm welcoming decor. +

+ +
+
+

Sinisa Belina

+
+ uploaded image +
+
+

I loved the food. Service was great, nice and peaceful atmosphere - all you need to enjoy a good meal is available here. +

+
+
+

mohammad Gmal

+
+ uploaded image +
+
+

best service and food. i highly reccomend it , I enjoyed it very much +

diff --git a/Angular/about.html b/Angular/about.html new file mode 100644 index 0000000..537b169 --- /dev/null +++ b/Angular/about.html @@ -0,0 +1 @@ +

about

\ No newline at end of file diff --git a/Angular/main.html b/Angular/main.html index a32f5c6..95bbaa6 100644 --- a/Angular/main.html +++ b/Angular/main.html @@ -11,11 +11,22 @@ - - -
+ + + + + +
+ +
+ +
From 3b6d151c5fa4852071f6b8b856618cde634bdfdb Mon Sep 17 00:00:00 2001 From: areejobaid94 Date: Tue, 28 May 2019 18:09:08 +0300 Subject: [PATCH 10/17] areej --- Angular/main.html | 1 + 1 file changed, 1 insertion(+) diff --git a/Angular/main.html b/Angular/main.html index 95bbaa6..687efc9 100644 --- a/Angular/main.html +++ b/Angular/main.html @@ -20,6 +20,7 @@