fixed bugs with address in incognito and NaN in delivery costs and total
This commit is contained in:
BIN
back-office/.DS_Store
vendored
BIN
back-office/.DS_Store
vendored
Binary file not shown.
BIN
back-office/app/assets/images/.DS_Store
vendored
BIN
back-office/app/assets/images/.DS_Store
vendored
Binary file not shown.
BIN
back-office/public/.DS_Store
vendored
BIN
back-office/public/.DS_Store
vendored
Binary file not shown.
BIN
front-api/.DS_Store
vendored
BIN
front-api/.DS_Store
vendored
Binary file not shown.
@@ -3,8 +3,8 @@ class DeliveryDestination < ActiveRecord::Base
|
|||||||
belongs_to :user
|
belongs_to :user
|
||||||
|
|
||||||
def self.create_from_last(anonymous_id, user_id)
|
def self.create_from_last(anonymous_id, user_id)
|
||||||
dd = DeliveryDestination.where(user_id: user_id).order("id desc").first
|
dd = DeliveryDestination.where(["user_id is not null and user_id = ?", user_id]).order("id desc").first
|
||||||
dd ||= DeliveryDestination.where(anonymous_id_string: anonymous_id).order("id desc").first
|
dd ||= DeliveryDestination.where(["anonymous_id_string is not null and anonymous_id_string = ?", anonymous_id]).order("id desc").first
|
||||||
dd ||= DeliveryDestination.new({user_id: user_id, anonymous_id_string: anonymous_id })
|
dd ||= DeliveryDestination.new({user_id: user_id, anonymous_id_string: anonymous_id })
|
||||||
attributes = dd.as_json
|
attributes = dd.as_json
|
||||||
attributes.delete("id")
|
attributes.delete("id")
|
||||||
|
|||||||
BIN
front-ui/.DS_Store
vendored
BIN
front-ui/.DS_Store
vendored
Binary file not shown.
BIN
front-ui/app/.DS_Store
vendored
BIN
front-ui/app/.DS_Store
vendored
Binary file not shown.
BIN
front-ui/app/components/.DS_Store
vendored
BIN
front-ui/app/components/.DS_Store
vendored
Binary file not shown.
BIN
front-ui/app/components/items/.DS_Store
vendored
BIN
front-ui/app/components/items/.DS_Store
vendored
Binary file not shown.
BIN
front-ui/app/components/shared/.DS_Store
vendored
BIN
front-ui/app/components/shared/.DS_Store
vendored
Binary file not shown.
@@ -12,7 +12,8 @@ var Place = Backbone.Model.extend({
|
|||||||
},
|
},
|
||||||
|
|
||||||
url: function() {
|
url: function() {
|
||||||
return Globals.ApiUrl + '/place/' + this.postalCode.trim();
|
var postalCode = this.postalCode || "00000";
|
||||||
|
return Globals.ApiUrl + '/place/' + postalCode.trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user