Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
44b1df6
before refactoring
AmmarAlkhooly98 May 27, 2019
afa6d8e
Merge pull request #1 from AmmarAlkhooly98/master
AmmarAlkhooly98 May 27, 2019
fc5ace2
initial files created for angular
AmmarAlkhooly98 May 27, 2019
a6efec2
Merge branch 'master' of https://github.com/bug-busters-200/Tafran
AmmarAlkhooly98 May 27, 2019
537d617
Merge pull request #2 from AmmarAlkhooly98/master
AmmarAlkhooly98 May 27, 2019
8026cb9
init
mohaelmi May 27, 2019
6f45963
(fix)conflict
mohaelmi May 27, 2019
d4d086e
Merge pull request #3 from areejobaid94/master
AmmarAlkhooly98 May 27, 2019
9ee4862
add js files and connection
areejobaid94 May 27, 2019
eae0933
connection
areejobaid94 May 27, 2019
f2742ee
connection
areejobaid94 May 27, 2019
67ae9af
Merge pull request #4 from areejobaid94/master
AmmarAlkhooly98 May 27, 2019
8c29988
start
AmmarAlkhooly98 May 27, 2019
630086b
added login html
mohaelmi May 27, 2019
3415f06
Merge branch 'master' of https://github.com/bug-busters-200/Tafran
mohaelmi May 27, 2019
869b06c
welcame page
areejobaid94 May 28, 2019
7f3bac4
welcame page conniction
areejobaid94 May 28, 2019
2883055
bootstrape
areejobaid94 May 28, 2019
3b6d151
areej
areejobaid94 May 28, 2019
3c1e384
new pull upstream
areejobaid94 May 28, 2019
67b7252
added the for fetching data from the database through the server
AmmarAlkhooly98 May 28, 2019
b81011c
areej work
areejobaid94 May 29, 2019
aa4aaab
Merge pull request #5 from areejobaid94/master
AmmarAlkhooly98 May 29, 2019
368f714
refactored the food file. Restaurant discription left to do
AmmarAlkhooly98 May 29, 2019
97c5703
fish login and check if exist or not .. and redirect to welcome page
mohaelmi May 29, 2019
9bf3f8f
conflict resolved
AmmarAlkhooly98 May 29, 2019
f36888d
Merge pull request #6 from AmmarAlkhooly98/master
AmmarAlkhooly98 May 29, 2019
1ececfb
fixed server issue
AmmarAlkhooly98 May 29, 2019
fe4d0e2
Merge branch 'master' of https://github.com/bug-busters-200/Tafran
AmmarAlkhooly98 May 29, 2019
6803abe
fixed server issue
AmmarAlkhooly98 May 29, 2019
745671f
Merge pull request #7 from AmmarAlkhooly98/master
AmmarAlkhooly98 May 29, 2019
2e07b08
resolved conflict
mohaelmi May 29, 2019
055722c
resolved conflict
mohaelmi May 29, 2019
0a95515
resolved conflict
mohaelmi May 29, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"liveServer.settings.port": 5501
}
24 changes: 24 additions & 0 deletions Angular/App.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
angular.module('app', [ 'ui.bootstrap', 'ngRoute' ]).config(function($routeProvider) {
$routeProvider
.when('/', {
templateUrl: './WelcomePage.html'
})
.when('/about', {
templateUrl: './about.html'
})
.when('/signup', {
templateUrl: './signup.html',
controller: 'signup'
})
.when('/food', {
templateUrl: './food.html',
controller: 'food'
})
.when('/signin', {
templateUrl: './signin.html',
controller: 'signin'
})
.when('/ThankYouPage', {
templateUrl: './ThankYouPage.html'
});
});
4 changes: 4 additions & 0 deletions Angular/ThankYouPage.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<div className="UserHeader">
<h1>ThankYouPage</h1>

</div>
93 changes: 93 additions & 0 deletions Angular/WelcomePage.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
<div class="well">


<div class="jumbotron text-center">
<h1 >Welcome to TAFRAN</h1>
</div>
<img className="Img" src="https://i.pinimg.com/originals/6b/1a/e2/6b1ae29eecf24e0e046e51293891bb20.jpg" style="width: 50%" />

<br/>
<br/>
<div className="AlUsers">
<h1 className="HI"><i id="UserTi" class="fas fa-user-tie"></i>
<h1>Restaurnts Owners</h1>
<br/>
<p style="font-size:20px;"> 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.</p>
<p style="font-size:20px;">Whate the requirements to get your restarunt accsepted ?!
All You need to have is good restarunt and have a good </p>
<p style="font-size:20px;">customer servers and our team will come to you to check every thing and you will be accsepted
</p>
<br/>
<button class="btn btn-default" disabled="disabled"><a href= "http://localhost:5000/#!/signup">Register</a>
</button>
<br/>
<br/>
<br/>

<h1 className="HI"><i id="UserTi1" class="fas fa-user"></i>
<h1>Normal User</h1>
<br/>
<p style="font-size:20px;">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 </p>
<p style="font-size:20px;">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
</p>
<br/>
<button class="btn btn-default" disabled="disabled" ><a href="http://localhost:5000/#!/food">START NOW</a>
</button>
</h1>
<br/>
<br/>
<br/>
<br/>
<h1> Feedbacks</h1>
<br/>
<div class="col-sm-4">
<h3>Koel Ganguly</h3>
<br/>
<img
src = 'https://bestlifeonline.com/wp-content/uploads/media/images/ext/383304538/happy-man.jpg'
alt="uploaded image"
height="150"
width="200"
/>
<br/>
<br/>
<p style="font-size:17px;">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.
</p>

</div>
<div class="col-sm-4">
<h3>Sinisa Belina</h3>
<br/>
<img
src = 'https://media.istockphoto.com/photos/laughing-woman-in-park-picture-id658617510?k=6&m=658617510&s=612x612&w=0&h=Ycl_BBwWQop7Wj1wWG3nyQqB5glPxRuqmb02WpKp0ao='
alt="uploaded image"
height="150"
width="200"
/>
<br/>
<br/>
<p style="font-size:17px;">I loved the food. Service was great, nice and peaceful atmosphere - all you need to enjoy a good meal is available here.
</p>
</div>
<div class="col-sm-4">
<h3>mohammad Gmal</h3>
<br/>
<img
src = 'https://www.healthline.com/hlcmsresource/images/imce/mens-health-symptoms_thumb.jpg'
alt="uploaded image"
height="150"
width="200"
/>
<br/>
<br/>
<p style="font-size:17px;">best service and food. i highly reccomend it , I enjoyed it very much
</p>
</div>

</div>

</div>

</div>
</body>
1 change: 1 addition & 0 deletions Angular/about.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<h1>about</h1>
33 changes: 33 additions & 0 deletions Angular/data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
[
{
"resturant": "Al Hanayen",
"meal": "shawarma arabic",
"price": 5,
"describtion": "this returent in jabal amman near circle two"
},
{
"resturant": "Hashem",
"meal": "Broasted",
"price": 6,
"describtion": "this returent in down town near abu jabara"
},
{
"resturant": "Ghazal",
"meal": "Burger",
"price": 3,
"describtion": "this returent in abdalla alchosheh street near circle seven"
},
{
"resturant": "Ghazal",
"meal": "Zinger",
"price": 2,
"describtion": "this returent in abdalla alchosheh street near circle seven"
},
{
"resturant": "KFC",
"meal": "Burger",
"price": 2,
"describtion": "this returent in abdalla alchosheh street near circle seven"
}

]
18 changes: 18 additions & 0 deletions Angular/filter.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// angular.module('app')
// .filter('filterData', function(){
// return function(resturentList , priceInfo){

// var max = priceInfo;
// console.log(max)
// var choosedPrice = [];

// angular.forEach(resturentList, function(resturent){
// console.log(resturent)
// if(resturent.price <= max){
// choosedPrice.push(resturent)
// }
// })
// console.log(choosedPrice)
// return choosedPrice;
// }
// })
14 changes: 14 additions & 0 deletions Angular/food.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<body>
<br>
<input ng-model = "input" type="number" placeholder="Enter your budget here">
<button class="btn-success" style="width: 6%" ng-click = "search()">search<img src="https://lh3.googleusercontent.com/sYwSR9uDYdDtkHMpS52BxNLxNdEOMqbxulQkTYE5KXc4hXEAL-1EEWad4ca6wDsKDCI=w412-h220-rw" style="width: 30%"/>
</button><br><br><br>
<div ng-repeat = "meal in meals" class="well">
<strong>Meal Name:</strong> {{meal.mealName}}
<strong>Restraunt Name:</strong> {{meal.restName}}
<strong>Meal Size:</strong> {{meal.size}}
<strong>Meal Price:</strong> {{meal.price}}
<button >More Info</button>
</div>

</body>
37 changes: 37 additions & 0 deletions Angular/food.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
angular.module('app').controller('food', function($scope, $http, $location, $rootScope) {
$scope.meals;
$scope.search = function() {
$http({
method: 'post',
url: '/getMealsByPrice',
data: JSON.stringify({
price: $scope.input
}),
headers: { 'Content-Type': 'application/json' }
})
.then(function(response) {
console.log(response.data);
$scope.meals = response.data;
})
.catch(function(error) {
console.log(error);
});
};

// $scope.showInfo = function() {
// $http({
// method: 'post',
// url: '/getRest',
// data: JSON.stringify({
// info: $scope.meal.restId
// }),
// headers: { 'Content-Type': 'application/json' }
// })
// .then(function(result) {
// console.log(result);
// })
// .catch(function(error) {
// console.log(error);
// });
// };
});
37 changes: 37 additions & 0 deletions Angular/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>tafran legacy</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.7.8/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.7.8/angular-route.min.js"></script>
<script src = 'https://cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/2.5.0/ui-bootstrap.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/2.5.0/ui-bootstrap-tpls.min.js'></script>
</head>
<body class="text-center" ng-app="app" class="jumbotron text-center">




<div >

<ul class="nav nav-tabs">
<li class="active"><a data-toggle="tab" href="http://localhost:5000/#!/">Home</a></li>
<li><a data-toggle="tab" href="http://localhost:5000/#!/food">Start now</a></li>
<li><a data-toggle="tab" href="http://localhost:5000/#!/signin">Sign In</a></li>
<li><a data-toggle="tab" href="http://localhost:5000/#!/signup">Sign Up</a></li>
<li><a data-toggle="tab" href="http://localhost:5000/#!/about">About</a></li>
</ul>
</div>

<div ng-view ></div>
<script src="./App.js"> </script>
<script src="./signin.js"> </script>
<script src="./signup.js"> </script>
<script src="./food.js"> </script>
<script src='filter.js'></script>
</body>
</html>
12 changes: 12 additions & 0 deletions Angular/signin.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<body>
<div class="well">
<h1>signin</h1>
<form >
{{errorMessage}}
<h2><pre>username: <input type="text" placeholder="username" ng-model ="username"></pre></h2>
<h2><pre>password:<input type="password" placeholder="password" ng-model ="password"></pre></h2>

<button class="btn btn-primary" ng-click="login()" >login</button>
</form>
</div>
</body>
31 changes: 31 additions & 0 deletions Angular/signin.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
angular.module( "app")


.controller("signin",function($scope,$http,$location,$rootScope){


$scope.login=function(){
//console.log($scope.username)
$http({
method:'post',
url:'/login',
data:JSON.stringify({
UserName:$scope.username,
Password:$scope.password
}),
headers: {'Content-Type': "application/json; charset = utf-8"}
}).then( (data)=>{
console.log(data)
if(data.data.length !== 0){
$location.path('/');
}else{
$scope.errorMessage = "username or passowrd is incorrect"
}

}).catch(function(error){
console.log(error)
})
}


})
29 changes: 29 additions & 0 deletions Angular/signup.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<div className="UserHeader">
<h1>sign up</h1>
<!--
<div className="UserHeader">
<form action="/registered" method="POST">
<h1 className="UserTitles" ><i class="fas fa-user"></i> Email</h1>
<input type="email" className="UserInput" name="UserName" onChange={this.handelUserChange.bind(this)} required/>
<div>{this.state.UserNameErr}</div>
<h1 className="UserTitles" ><i class="fas fa-lock"></i> Password</h1>
<input type="password" name="Password" className="UserInput" onChange={this.handelUserChange.bind(this)} required/>
<div>{this.state.PasswordErr}</div>
<h1 className="UserTitles"><i class="fas fa-map-marked-alt"></i> Location</h1>
<input type="text" name="Location" className="UserInput" onChange={this.handelUserChange.bind(this)} required/>
<h1 className="UserTitles" ><i class="fas fa-mobile-alt"></i> Phone Number</h1>
<input type="text" name="PhoneNumber" className="UserInput"onChange={this.handelUserChange.bind(this)} required />
<h1 className="UserTitles"><i class="fas fa-store"></i> The Restaurant</h1>
<input type="text" className="UserInput" name="Restaurant" onChange={this.handelUserChange.bind(this)}required />
<h1 className="UserTitles"><i class="fas fa-dollar-sign"></i>Restaurant Info</h1>
<input type="text" className="UserInput" name="PriceandMeal" onChange={this.handelUserChange.bind(this)} />
<div>{this.state.PriceandMealErr}</div>

<button type="submit" className="ButtonLog" >register</button>
</form>
</div>
</form>
</div> -->


</div>
3 changes: 3 additions & 0 deletions Angular/signup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
angular.module('app').controller('signup', function($scope, $http, $location, $rootScope) {
console.log('hi');
});
Loading