1if (typeof LimoLabs === 'undefined') { 2 LimoLabs = {}; 3} 4if (typeof LimoLabs.ICabbi === 'undefined') { 5 LimoLabs.ICabbi = {}; 6} 7if (typeof LimoLabs.ICabbi.Model === 'undefined') { 8 LimoLabs.ICabbi.Model = {}; 9} 10 11LimoLabs.ICabbi.Model.Booking = function() { 12}; 13 14LimoLabs.ICabbi.Model.Booking.prototype.DOAddress = null; 15LimoLabs.ICabbi.Model.Booking.prototype.DODetails = null; 16LimoLabs.ICabbi.Model.Booking.prototype.NumberOfLuggage = null; 17LimoLabs.ICabbi.Model.Booking.prototype.NumberOfPax = null; 18LimoLabs.ICabbi.Model.Booking.prototype.PUAddress = null; 19LimoLabs.ICabbi.Model.Booking.prototype.PUDetails = null; 20LimoLabs.ICabbi.Model.Booking.prototype.Account = null; 21LimoLabs.ICabbi.Model.Booking.prototype.AccountUser = null; 22LimoLabs.ICabbi.Model.Booking.prototype.PickUpDate = new Date(); 23LimoLabs.ICabbi.Model.Booking.prototype.rideLater = false; 24LimoLabs.ICabbi.Model.Booking.prototype.selectVehicleData = null; 25LimoLabs.ICabbi.Model.Booking.prototype.promoCode = null; 26LimoLabs.ICabbi.Model.Booking.prototype.DOAddressEnable = true; 27 28LimoLabs.ICabbi.Model.Booking.prototype.isValidForQuoting = function() { 29 30 if(this.DOAddressEnable){ 31 return this.PUDetails && this.DODetails && null !== this.NumberOfLuggage && null !== this.NumberOfPax; 32 } 33 34 return this.PUDetails && null !== this.NumberOfLuggage && null !== this.NumberOfPax; 35 36}; 37 38LimoLabs.ICabbi.Model.Booking.prototype.isValidForCheckout = function() { 39 return this.selectVehicleData && this.isValidForQuoting(); 40}; 41 42LimoLabs.ICabbi.Model.Booking.prototype.invalidateForCheckout = function() { 43 this.selectVehicleData = null; 44}; 45 46LimoLabs.ICabbi.Model.Booking.prototype.hasSameBookingDetailsAs = function(booking) { 47 return angular.equals(this.selectVehicleData, booking.selectVehicleData); 48}; 49 50LimoLabs.ICabbi.Model.Booking.prototype.isRideForLater = function(booking) { 51 return (this.PickUpDate.getTime() - Date.now()) > (1000 * 60 * 15) && this.rideLater; 52}; 53 54LimoLabs.ICabbi.Model.Booking.prototype.serialize = function() { 55 return angular.toJson(this); 56}; 57 58LimoLabs.ICabbi.Model.Booking.unserialize = function(json) { 59 var tmp = angular.fromJson(json); 60 61 var me = new LimoLabs.ICabbi.Model.Booking(); 62 63 angular.extend(me, tmp);
64 me.PickUpDate = new Date(me.PickUpDate); 65 66 return me; 67};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.