Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
b4bc742
1
AbobakrAlduais Feb 19, 2017
98aac05
databaseBasicChanges
MoathDawahreh Feb 20, 2017
e30eb3a
db/newfield/getuserOrders
MoathDawahreh Feb 20, 2017
4f22fea
userProfile
AbobakrAlduais Feb 20, 2017
bfaa445
Merge pull request #1 from AbobakrAlduais/master
AbobakrAlduais Feb 20, 2017
d5caa55
sqlit
AbobakrAlduais Feb 20, 2017
7d71381
Merge pull request #3 from AbobakrAlduais/master
AbobakrAlduais Feb 20, 2017
311c373
44
AbobakrAlduais Feb 20, 2017
9b4c89b
Merge branch 'MoathDawahreh-master'
AbobakrAlduais Feb 20, 2017
19ef235
-
MoathDawahreh Feb 20, 2017
cb746eb
s
MoathDawahreh Feb 20, 2017
487291a
userProfile1
AbobakrAlduais Feb 20, 2017
f62f3f6
Merge pull request #5 from AbobakrAlduais/master
AbobakrAlduais Feb 20, 2017
a2a41a7
db
MoathDawahreh Feb 20, 2017
ac45bfb
-
MoathDawahreh Feb 20, 2017
03dfc24
user html
maherghnom Feb 20, 2017
40a46a9
Delete userProfile.html
AbobakrAlduais Feb 20, 2017
96a4420
Merge pull request #6 from maherghnom/master
AbobakrAlduais Feb 20, 2017
daceaea
Merge pull request #8 from MoathDawahreh/master
AbobakrAlduais Feb 20, 2017
ec54e31
db
MoathDawahreh Feb 20, 2017
a0993dd
Merge pull request #9 from MoathDawahreh/master
AbobakrAlduais Feb 20, 2017
e6d2686
changesOngetOrders
MoathDawahreh Feb 21, 2017
9d9925a
Merge pull request #10 from MoathDawahreh/master
AbobakrAlduais Feb 21, 2017
9336bbf
1
AbobakrAlduais Feb 21, 2017
4ea5c6b
orders
AbobakrAlduais Feb 21, 2017
d5d0202
approve orders
MoathDawahreh Feb 21, 2017
ee9a1dd
appro
AbobakrAlduais Feb 21, 2017
3457c91
Merge pull request #11 from MoathDawahreh/master
AbobakrAlduais Feb 21, 2017
dfdcb8c
Merge pull request #12 from AbobakrAlduais/master
AbobakrAlduais Feb 21, 2017
8a8485d
user order'
maherghnom Feb 21, 2017
6790d4d
user js
maherghnom Feb 21, 2017
ef899c5
data base
AbobakrAlduais Feb 21, 2017
c7e4684
Merge pull request #13 from AbobakrAlduais/master
AbobakrAlduais Feb 21, 2017
9db394f
req
maherghnom Feb 21, 2017
2d1a426
Merge pull request #14 from maherghnom/master
AbobakrAlduais Feb 21, 2017
b685ebe
first feature
maherghnom Feb 21, 2017
9105d11
Merge pull request #15 from maherghnom/master
AbobakrAlduais Feb 21, 2017
ff09b86
db
MoathDawahreh Feb 21, 2017
a9fd1b6
-
MoathDawahreh Feb 21, 2017
0b4b474
no btn
maherghnom Feb 21, 2017
e9a897b
Merge pull request #16 from maherghnom/master
AbobakrAlduais Feb 21, 2017
82658f2
db/deleteOrder
MoathDawahreh Feb 21, 2017
04d41b9
delete
maherghnom Feb 21, 2017
caf0bb6
corrections
MoathDawahreh Feb 21, 2017
dd4f11d
Delete GFProj.sqlite
AbobakrAlduais Feb 21, 2017
e72f495
Delete .gitignore
AbobakrAlduais Feb 21, 2017
9663b46
solvingConfilcts
MoathDawahreh Feb 21, 2017
1b6e7ee
tryingtosolveconfilcts
MoathDawahreh Feb 21, 2017
11d9cb4
Delete GFProj.sqlite
MoathDawahreh Feb 21, 2017
f9aa2e8
cf
MoathDawahreh Feb 21, 2017
c69a9b9
cf
MoathDawahreh Feb 21, 2017
e19d531
cf
MoathDawahreh Feb 21, 2017
ff11976
Add files via upload
MoathDawahreh Feb 21, 2017
c0b4f74
Merge pull request #19 from MoathDawahreh/master
AbobakrAlduais Feb 21, 2017
bbf9537
Merge pull request #20 from maherghnom/master
AbobakrAlduais Feb 21, 2017
42236b7
Add files via upload
AbobakrAlduais Feb 21, 2017
53557a8
exp module
AbobakrAlduais Feb 22, 2017
622ac6c
Merge pull request #21 from AbobakrAlduais/master
AbobakrAlduais Feb 22, 2017
b771182
cooker profile
maherghnom Feb 22, 2017
90f65bd
useprfile.js
AbobakrAlduais Feb 22, 2017
f979d36
Merge pull request #22 from AbobakrAlduais/master
AbobakrAlduais Feb 22, 2017
93c1f9d
Merge pull request #23 from maherghnom/master
AbobakrAlduais Feb 22, 2017
3506c50
yes button
AbobakrAlduais Feb 22, 2017
5356e9c
Merge pull request #24 from AbobakrAlduais/master
AbobakrAlduais Feb 22, 2017
9a87099
db/specialOrder
MoathDawahreh Feb 22, 2017
f548436
speatial order services
AbobakrAlduais Feb 22, 2017
8a1e26d
db/specialOrder
MoathDawahreh Feb 22, 2017
ccce6ae
Remove the now ignored directory node_modules
MoathDawahreh Feb 22, 2017
975fd60
Merge pull request #30 from AbobakrAlduais/master
AbobakrAlduais Feb 22, 2017
5bfa8a3
Merge pull request #31 from MoathDawahreh/master
AbobakrAlduais Feb 22, 2017
4312e0d
special order
maherghnom Feb 22, 2017
d64c429
remove the now ignored directory node_modules
maherghnom Feb 22, 2017
0753cd3
remove the now ignored directory GFProj.sqlite
maherghnom Feb 22, 2017
0cb7849
Merge pull request #32 from maherghnom/master
AbobakrAlduais Feb 22, 2017
b1c99b7
db
MoathDawahreh Feb 23, 2017
dfcbfea
Remove the now ignored directory node_modules
MoathDawahreh Feb 23, 2017
0f12f9e
Merge pull request #33 from MoathDawahreh/master
AbobakrAlduais Feb 23, 2017
beffaaa
REmove the now ignored directory node_modules
maherghnom Feb 23, 2017
f437780
Remove the now ignored directory node_modules
maherghnom Feb 23, 2017
82f8cd8
db/getCookerID/GetAllCookers
MoathDawahreh Feb 23, 2017
bfdc2c1
Merge pull request #34 from maherghnom/master
AbobakrAlduais Feb 23, 2017
956c386
Merge pull request #35 from MoathDawahreh/master
AbobakrAlduais Feb 23, 2017
11e8ec8
1
AbobakrAlduais Feb 23, 2017
a6aa135
remov node
AbobakrAlduais Feb 23, 2017
7004b9f
88
AbobakrAlduais Feb 23, 2017
cc38223
remov node1
AbobakrAlduais Feb 23, 2017
d71a121
resConflicts
MoathDawahreh Feb 23, 2017
520250a
-
MoathDawahreh Feb 23, 2017
88ab55a
Remove node
MoathDawahreh Feb 23, 2017
60798b4
corr
MoathDawahreh Feb 23, 2017
412d6da
heroku
AbobakrAlduais Feb 23, 2017
3154598
Merge pull request #40 from MoathDawahreh/master
AbobakrAlduais Feb 23, 2017
bb45591
heroku
AbobakrAlduais Feb 23, 2017
c78c3fe
userid
maherghnom Feb 23, 2017
a772f6f
add spaceal
maherghnom Feb 23, 2017
3e7ffd1
Merge pull request #41 from maherghnom/master
AbobakrAlduais Feb 23, 2017
8d8f7ab
jason
AbobakrAlduais Feb 23, 2017
5918229
show special orders
AbobakrAlduais Feb 23, 2017
de92d90
Merge pull request #42 from AbobakrAlduais/master
AbobakrAlduais Feb 23, 2017
5c2b920
heroku 2
AbobakrAlduais Feb 24, 2017
be9594d
Merge pull request #43 from AbobakrAlduais/master
AbobakrAlduais Feb 24, 2017
43c7350
heroku
AbobakrAlduais Feb 24, 2017
9519341
her
AbobakrAlduais Feb 24, 2017
497534a
remove user glyicon
maherghnom Feb 25, 2017
4d4fc46
Merge pull request #44 from maherghnom/master
AbobakrAlduais Feb 25, 2017
b7a9353
Merge branch 'master' of https://github.com/Jscell/Greenfield-Project
AbobakrAlduais Feb 25, 2017
02b8204
user html
maherghnom Feb 25, 2017
6453bc5
1
AbobakrAlduais Feb 25, 2017
7d65507
Merge pull request #45 from maherghnom/master
AbobakrAlduais Feb 25, 2017
fbd4bf4
Merge branch 'master' of https://github.com/Jscell/Greenfield-Project
AbobakrAlduais Feb 25, 2017
34f418d
Merge pull request #46 from AbobakrAlduais/master
AbobakrAlduais Feb 25, 2017
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
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,16 @@
.LSOverride
azure.err
iisnode.yml

# Icon must ends with two \r.
Icon

node_modules

# Thumbnails
._*

# Files that might appear on external disk
.Spotlight-V100
.Trashes
node_modules/

# Floobits
.floo
.floobit
Expand Down
Binary file modified GFProj.sqlite
Binary file not shown.
12 changes: 5 additions & 7 deletions client/app/account/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,16 @@ angular.module('otbo5ly.auth', [])
$scope.signin = function () {
Auth.signin($scope.user)
.then(function (data) {
//console.log(data)

if(data.status === '500'){
$scope.msg = 'Wrong password or username!'
} else {

$scope.msg = '';

$window.localStorage.setItem('com.otbo5ly', data.token);

var userData = {ID:data.ID,
UserName: data.UserName, UserTypeName: data.UserTypeName};


$window.localStorage.setItem('user.otbo5ly', JSON.stringify(userData));

Expand All @@ -33,9 +31,10 @@ angular.module('otbo5ly.auth', [])
if(data.UserTypeName === 'cooker'){
$rootScope.isCooker = true;
$location.path('/users/'+ data.UserName );
} else {
$location.path('/');
}
}else if(data.UserTypeName === 'user'){
$rootScope.isUser = true;
$location.path('/userProfile/'+data.UserName);
}else{ $location.path('/') }

}

Expand All @@ -54,7 +53,6 @@ angular.module('otbo5ly.auth', [])
}
Auth.signup($scope.user)
.then(function (data) {
//console.log(data)

if(data.status === '500'){
$scope.msg = 'Wrong password or username!'
Expand Down
5 changes: 5 additions & 0 deletions client/app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ angular.module('otbo5ly', [
'otbo5ly.auth',
'otbo5ly.main',
'otbo5ly.newOrder',
'otbo5ly.userProfile',
'ngRoute'
])
.config(function ($routeProvider, $httpProvider) {
Expand Down Expand Up @@ -38,6 +39,10 @@ angular.module('otbo5ly', [
templateUrl: 'app/main/main.html',
controller: 'MainController'
})
.when('/userProfile/:user', {
templateUrl: 'app/profile/userProfile.html',
controller: 'userProfileController'
})
.otherwise({redirectTo:'/'});

// We add our $httpInterceptor into the array
Expand Down
3 changes: 2 additions & 1 deletion client/app/main/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ angular.module('otbo5ly.main', [])
$scope.data = {};

Users.getTodayCookings().then(function(data){
$scope.data.cookings = data;
console.log(data)
$scope.data.cookings = data;
});

// Users.getTopCookers().then(function(data){
Expand Down
5 changes: 3 additions & 2 deletions client/app/order/order.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
angular.module('otbo5ly.newOrder', [])


.controller('NewOrderController', function ($scope, $location, Users, Auth, OrderService) {
.controller('NewOrderController', function ($scope, $location, Users, Auth, OrderService,$rootScope) {

$scope.order = {};

Expand All @@ -27,7 +27,8 @@ angular.module('otbo5ly.newOrder', [])
alert('Something went wrong try again');
} else {
alert('your order has been sent successfully')
$location.path('/');
$rootScope.isUser = true;
$location.path('/userProfile/:user');
}
})
}
Expand Down
90 changes: 69 additions & 21 deletions client/app/profile/orders.html
Original file line number Diff line number Diff line change
@@ -1,46 +1,94 @@
<!-- In this page we are sending the cooker a message telling him
about the client's order details (time, cookName and quantity). -->
<!-- We don't really care about the date because it will be sent the next day always. -->
<style>
<!-- <style>
.info {
background-color: #e7f3fe;
border-left: 30px solid #2196F3;
}
</style>
</style> -->
<style>
.none {
background-color: #e7f3fe;
border-left: 30px solid #2196F3;
}
.yes{
background-color: #e7f3fe;
border-left: 30px solid #096d27;
}
.no {
background-color: #e7f3fe;
border-left: 30px solid #b21813;
}
.ifo{
background-color: #e7f3fe;
border-left: 10px solid #2196F3;
border-right: 10px solid #2196F3;
border-bottom: 10px solid #2196F3;
border-top: 10px solid #2196F3;

}
.animate-if {
/*font-family: Courier*/
color: red;
font-size: 150%
}
.animate-iff {
background:white;
border:1px solid black;
padding:10px;
}

</style>



<div class="container" ng-controller="ProfileController" ng-init="getOrders()">
<br><br><br><br>

<h2><center><strong>You Have New Order</strong></center></h2>
<div class="info" ng-repeat="order in orders"><br>
<div ng-repeat="order in orders" ><br>

<div ng-class="myVar || order.approved " >
<div class="ifo" >

<!-- <img ng-src="{{order.img}}" class="pull-right img-rounded " style="width: 400px height: 400px ; "/> -->
<h2><strong><center>Order Details</center></strong></h2>
<ul style="font-size:18px">

<ul style="font-size:18px">


<li><strong>Client Name:</strong>
<dd>- {{ order.CLientFullName }}</dd>
</li>
<li><strong>Cook Name:</strong>
<dd>- {{ order.Name }}</dd>
<li ><strong>Cook Name:</strong>
<dd ng-if ="order.Name != 'special'" > {{ order.Name }}</dd>
<dd ng-if ="order.Name == 'special'" class="animate-if">- special order -- {{ order.DisheName }}</dd>
</li>
<br>
<li><strong>Amount:</strong>
<dd>- {{ order.Quantity }}</dd>
</li>
<br>
<li><strong>The Client Will Receive The Order AT :</strong>

<li><strong>Delivery Time :</strong>
<dd>- {{ order.DeliveryDate }} - at {{order.DeliverTime}}</dd>
</li>
<br>
<li><strong ng-if= "order.approved == 'yes'"><p style=" font-size: 25px;"> You accepted This Order</p></strong></li>
<li ng-if= "order.approved == 'none'"><strong ><p style=" font-size: 25px;">Do You Agree This Order</p>
<input id="yesbtn" type="submit" value="yes" ng-click="myVar='yes';acceptOrder(order.OrderID)"
ng-model="order.approved">
<input id="nobtn" type="submit" value="no" ng-click="myVar='no';dos();cancelOrder(order.OrderID)"
ng-model="order.approved">
</strong>
</li>
<br>
</ul><br>

</ul><br>
</div>
<br><br>
<center><strong>
<p style=" font-size: 25px;"> I Can Handle It <input type="checkbox" ng-model = "accept" ng-init = "false">
</p>
</strong>
</center>
<div ng-if="accept">
<center>
<h3><strong>Okay, Let's Start Cooking...<span class="glyphicon glyphicon-cutlery"></strong></h3>
</center>
</div>
</div>
</div>

</div>


</div>
14 changes: 8 additions & 6 deletions client/app/profile/profile.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<div ng-init="getProfile()">
<div class="row" style="
background: url('assets/inside-bg.jpg');
background-position: top;
min-height: 500px;
z-index: 2;
padding-top: 100px;
" ng-controller="ProfileController" ng-init="getProfile()">
">

<div class="row" style="padding-bottom: 50px;margin:0px;"><div class="col-md-10 col-md-offset-1 text-center">

Expand All @@ -19,7 +20,7 @@

<h1 style="font-weight: bold;color: #fff;text-align: left;margin-bottom: 40px;">
{{ data.FullName }}</h1>

asdfssdfsd
<div class="col-md-6 col-xs-12">
<i class="glyphicon glyphicon-phone" style="font-size: 3em;"></i>
<p style="line-height: 40px;font-size: 15pt;">
Expand All @@ -38,7 +39,7 @@ <h1 style="font-weight: bold;color: #fff;text-align: left;margin-bottom: 40px;">
<div class="col-xs-12" style="margin-top: 50px;" ng-if="data.todayCook !== ''">
<span style="padding: 20px;font-size: 1.7em;color: #fff;"><b>{{ data.FullName }}</b> cooking for today is : <b>{{ data.todayCook.Name }}</b>, just for
<b>{{ data.todayCook.Price }}</b> JOD!</span>
<button ng-click="setOrder($root.UserID, data.todayCook.ID, 1, data.todayCook.FullName, data.todayCook.Name)" class="btn btn-lg btn-primary">Order now</button>

</div>

</div>
Expand All @@ -50,13 +51,13 @@ <h1 style="font-weight: bold;color: #fff;text-align: left;margin-bottom: 40px;">

<div class="row" style="margin-top: 40px;">

<div class="col-md-10 col-md-offset-1 col-xs-12">
<div class="col-md-10 col-md-offset-1 col-xs-12">


<div class="panel panel-default">
<div class="panel-heading"><b>{{ data.user.FullName }}</b> schedule</div>
<div class="panel-heading"><b>{{ data.FullName }}</b> schedule</div>

<table class="table">
<table class="table">
<tbody>
<tr style="font-weight: bold;">
<td>Day</td>
Expand Down Expand Up @@ -85,5 +86,6 @@ <h1>User reviews <small> for {{ data.FullName }}</small></h1>
</div>
</div>

</div>
</div>
</div>
23 changes: 22 additions & 1 deletion client/app/profile/profile.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
angular.module('otbo5ly.profile', [])

.controller('ProfileController', function ($scope, $routeParams, $window, $location, Users, OrderService) {
.controller('ProfileController', function ($scope, $routeParams, $window, $location,$route, Users, OrderService,Approve) {
$scope.data = {};
$scope.orders = {};

Expand Down Expand Up @@ -29,4 +29,25 @@ angular.module('otbo5ly.profile', [])
CookNamesID: cookNameID, FullName : FullName, cookName: cookName});
}

$scope.acceptOrder = function(orderId){
console.log(orderId)

Approve.acceptOrder({orderId:orderId}).then(function(){
$route.reload();

})
}
$scope.cancelOrder = function(orderId){

Approve.cancelOrder({orderId:orderId}).then(function(){
$route.reload();
})
}

$scope.dos=function(){
$(".no").fadeOut()
}



});
Loading