Skip to content

Commit

Permalink
outgoing flights view
Browse files Browse the repository at this point in the history
  • Loading branch information
rana-saeed committed Apr 30, 2016
1 parent 3900bb2 commit 892c015
Show file tree
Hide file tree
Showing 12 changed files with 144 additions and 105 deletions.
1 change: 1 addition & 0 deletions .io-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"app_id":"bd6495de","api_key":"f0c6880aca6038a5b00883ea2a366ba528c0b015522d66c5"}
4 changes: 2 additions & 2 deletions ionic.project
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"name": "stackoverflow-says-what",
"app_id": ""
}
"app_id": "bd6495de"
}
93 changes: 0 additions & 93 deletions npm-debug.log

This file was deleted.

8 changes: 3 additions & 5 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,15 @@
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
<link href='https://fonts.googleapis.com/css?family=Lobster' rel='stylesheet' type='text/css'>

<link rel="stylesheet" href="styles/index.css" type="text/css" charset="utf-8"/>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>

<script type="text/javascript" src="https://js.stripe.com/v2/">stripe.setPublishableKey('pk_test_wAzEmAILhEkjKJZdSiui6s98')</script>
<!--<script src="https://checkout.stripe.com/checkout.js"></script> -->

<script src="/js/angular.min.js"></script>
<script src="/js/angular-route.min.js"></script>
<script src="/js/ui-bootstrap-tpls-1.2.5.min.js"></script>
<script type="text/javascript" src="https://js.stripe.com/v2/">stripe.setPublishableKey('pk_test_wAzEmAILhEkjKJZdSiui6s98')</script>

<script src="core.js"></script>
<script src="/controllers/mainCtrl.js"></script>
<script src="/controllers/confirmOCtrl.js"></script>
Expand Down
7 changes: 7 additions & 0 deletions www/css/outGoingFlights.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#flightDetails {
margin-right: 40%;
}

#priceButton {
margin-left: 20%;
}
Binary file added www/img/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@

<link href="lib/ionic/css/ionic.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">

<!-- IF using Sass (run gulp sass first), then uncomment below and remove the CSS includes above
<link href="css/ionic.app.css" rel="stylesheet">
Expand All @@ -23,6 +26,7 @@
<script src="js/controllers.js"></script>
<script src="services/FlightSrv.js"></script>
<script src="js/controllers/flightBookingCtrl.js"></script>
<script src="js/controllers/outGoingFlightsCtrl.js"></script>
</head>

<body ng-app="starter">
Expand Down
18 changes: 18 additions & 0 deletions www/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,24 @@ IonicApp.config(function($stateProvider, $urlRouterProvider) {
}
}
})
.state('app.outGoingFlights', {
url: '/outGoingFlights',
views: {
'menuContent': {
templateUrl: 'templates/outGoingFlights.html',
controller: 'outGoingFlightsCtrl'
}
}
})
.state('app.inGoingFlights', {
url: '/inGoingFlights',
views: {
'menuContent': {
templateUrl: 'templates/inGoingFlights.html',
controller: 'outGoingFlightsCtrl'
}
}
})
.state('app.contactUs', {
url: '/contactUs',
views: {
Expand Down
40 changes: 40 additions & 0 deletions www/js/controllers/outGoingFlightsCtrl.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
IonicApp.controller('outGoingFlightsCtrl', function($scope, FlightSrv,$location) {

/*function getOutFlights(){
flightSrv.getOutFlights(function(result){
$scope.outflights = result;
});
};
function getInFlights(){
flightSrv.getInFlights(function(result){
$scope.inflights = result;
});
};
*/
// $scope.test = "bate5";
$scope.bookOutgoing = function (flight,price,seatClass){
//$scope.test = "potato";
flightSrv.setOutgoingFlight(flight);
flightSrv.setPriceOutgoingFlight(price);
flightSrv.setOutgoingFlightClass(seatClass);
if (flightSrv.getType() === 'OneWay')
$location.url(""); //todo
else
$location.url(""); //todo
};

$scope.bookIngoing = function (flight,price,seatClass){
flightSrv.setIngoingFlight(flight);
flightSrv.setPriceIngoingFlight(price);
flightSrv.setIngoingFlightClass(seatClass);
$location.url(""); //todo
};


/*
getOutFlights();
if (flightSrv.getType() != 'OneWay')
getInFlights();
*/
});
31 changes: 31 additions & 0 deletions www/templates/inGoingFlights.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<link href="css/outGoingFlights.css" rel="stylesheet">
<ion-navbar *navbar hideBackButton class="show-navbar">
<ion-title>INGOING FLIGHTS</ion-title>
</ion-navbar>

<ion-content>
<ion-list>
<ion-item ng-click = "bookOutgoing();">
<div class="row">
<div class="col">
<ion-thumbnail item-left>
<img src="/../../img/favicon.png">
</ion-thumbnail>
</div>
<div class="col" id="flightDetails">
<h2> Airline: {{ flight.airline }}</h2>
<p> Flight Number: {{ flight.flightNumber }}</p>
<p> Origin: {{ flight.origin }}</p>
<p> Destination: {{ flight.destination }}</p>
<p> Departure Date: {{ flight.departureDateTime | date:'yyyy-MM-dd hh:mm' }}</p>
<p> Arrival Date: {{ flight.arrivalDateTime | date:'yyyy-MM-dd hh:mm' }}</p>
<p> Cost: $ {{ flight.cost }}</p>
</div>
<!-- <div class="col">
<button clear item-right type="button" class="btn btn-success" id="priceButton"> $ {{ flight.cost }}</button>
</div> -->
</div>
</ion-item>

</ion-list>
</ion-content>
12 changes: 7 additions & 5 deletions www/templates/menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,27 @@ <h1 class="title">Left</h1>
</ion-header-bar> -->
<ion-content>
<ion-list>

<ion-item menu-close href="#/app/welcomePage">
Home
</ion-item>
<ion-item menu-close href="#/app/oneWayBooking">
Book a One-Way Flight
</ion-item>
<ion-item menu-close href="#/app/roundTripBooking">
Book a Round-Trip Flight
</ion-item>
<ion-item menu-close href="#/app/searchByRefrence">
search By Refrence Number
Search By Refrence Number
</ion-item>
<ion-item menu-close href="#/app/contactUs">
Contact Us
</ion-item>
<ion-item menu-close href="#/app/ourteam">
Our Team
</ion-item>
<ion-item menu-close href="#/app/welcomePage">
Home
</ion-item>
<ion-item menu-close href="#/app/outGoingFlights">
Outgoing Flights
</ion-item>
</ion-list>
</ion-content>
</ion-side-menu>
Expand Down
31 changes: 31 additions & 0 deletions www/templates/outGoingFlights.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<link href="css/outGoingFlights.css" rel="stylesheet">
<ion-navbar *navbar hideBackButton class="show-navbar">
<ion-title>OUTGOING FLIGHTS</ion-title>
</ion-navbar>

<ion-content>
<ion-list>
<ion-item ng-click = "bookOutgoing();">
<div class="row">
<div class="col">
<ion-thumbnail item-left>
<img src="/../../img/favicon.png">
</ion-thumbnail>
</div>
<div class="col" id="flightDetails">
<h2> Airline: {{ flight.airline }}</h2>
<p> Flight Number: {{ flight.flightNumber }}</p>
<p> Origin: {{ flight.origin }}</p>
<p> Destination: {{ flight.destination }}</p>
<p> Departure Date: {{ flight.departureDateTime | date:'yyyy-MM-dd hh:mm' }}</p>
<p> Arrival Date: {{ flight.arrivalDateTime | date:'yyyy-MM-dd hh:mm' }}</p>
<p> Cost: $ {{ flight.cost }}</p>
</div>
<!-- <div class="col">
<button clear item-right type="button" class="btn btn-success" id="priceButton"> $ {{ flight.cost }}</button>
</div> -->
</div>
</ion-item>

</ion-list>
</ion-content>

0 comments on commit 892c015

Please sign in to comment.