{:uriI"file:///Users/tvd/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/bundler/gems/solidus-81b759a355f7/backend/app/assets/javascripts/spree/backend/views/order/customer_details.js?type=application/javascript&pipeline=self&id=cfca29adf58a8f8bdab0df5607eef061268597edebfa9bb63dc5a1a333a467d8:ET:load_pathI"z/Users/tvd/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/bundler/gems/solidus-81b759a355f7/backend/app/assets/javascripts;T: filenameI"/Users/tvd/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/bundler/gems/solidus-81b759a355f7/backend/app/assets/javascripts/spree/backend/views/order/customer_details.js;T: nameI"/spree/backend/views/order/customer_details;T:logical_pathI"7spree/backend/views/order/customer_details.self.js;T:content_typeI"application/javascript;T: sourceI"2Spree.Views.Order.CustomerDetails = Backbone.View.extend({ initialize: function() { this.billAddressView = new Spree.Views.Order.Address({ model: this.model.get("bill_address"), el: this.$('.js-billing-address') }); this.shipAddressView = new Spree.Views.Order.Address({ model: this.model.get("ship_address"), el: this.$('.js-shipping-address') }); this.customerSelectView = new Spree.Views.Order.CustomerSelect({ el: this.$('#customer_search') }); this.listenTo(this.customerSelectView, "select", this.onSelectCustomer); this.onGuestCheckoutChanged(); this.onChange(); this.listenTo(this.model, "change", this.render) this.render() }, events: { "click #guest_checkout_true": "onGuestCheckoutChanged", "click #order_use_billing": "onChange", "change #order_email": "onChange" }, onGuestCheckoutChanged: function() { if(this.$('#guest_checkout_true').is(':checked')) { this.model.set({user_id: null}) } }, onChange: function() { this.model.set({ use_billing: this.$('#order_use_billing').is(':checked'), email: this.$("#order_email").val() }) }, onSelectCustomer: function(customer) { this.model.set({ email: customer.email, user_id: customer.id, bill_address: customer.bill_address }) }, render: function() { var user_id = this.model.get("user_id") || $("#user_id").val() this.$("#user_id").val(user_id); this.$('#guest_checkout_true') .prop("checked", !user_id); this.$('#guest_checkout_false') .prop("checked", !!user_id) .prop("disabled", !user_id); this.$('#shipping').toggleClass("hidden", !!this.model.get("use_billing")); this.$('#order_email').val(this.model.get("email")) } }) ;T: metadata{ :dependencieso:Set: @hash} I"environment-version;TTI"environment-paths;TTI"rails-env;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"file-digest:///Users/tvd/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/bundler/gems/solidus-81b759a355f7/backend/app/assets/javascripts/spree/backend/views/order/customer_details.js;TTF: requiredo;;}F: stubbedo;;}F: linkso;;}F: charsetI" utf-8;F: digest"%w"m~s3U5SZB7mn: lengthi2:dependencies_digest"%3[*[$1QMøă /:idI"Ecfca29adf58a8f8bdab0df5607eef061268597edebfa9bb63dc5a1a333a467d8;F: mtimel+%[