This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FinOperation < ActiveRecord::Base | |
acts_as_tenant | |
include FinOperableConcern | |
MAIN_TYPES = ['CreditFinOperation', 'DebitFinOperation', 'MoveFinOperation', 'DeliveryPayFinOperation'] | |
default_scope { order 'operation_date DESC, id DESC' } | |
scope :reverse_order, -> { reorder 'operation_date ASC, id ASC' } | |
scope :accepted, -> { where(accepted: true) } | |
scope :unaccepted, -> { where(accepted: false) } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('baton.controllers', []) | |
.controller('EditActiveList', function( $scope, storage, $element, $rootScope ) { | |
$scope.isEdit = false; | |
$scope.list = null; | |
$scope.init = function( list ) { | |
$scope.list = list; | |
if($scope.list){ | |
$scope.list.last_name = $scope.list.name; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Map.prototype.generateMap = function(cities_settings) { | |
this.terrain = new Agency9.Layer.A3XTerrainLayer("terrain", cities_settings.terrain); | |
this.terrain.setFocusOnTerrain(false); | |
this.instance.addLayer(this.terrain); | |
this.buildings_layer_geometry_style = new Agency9.Model.GeometryStyle(); | |
this.buildings_layer_model_style = new Agency9.Style.ModelStyle(); | |
this.buildings_layer_model_style.setGeometryStyle(this.buildings_layer_geometry_style); | |
this.buildings_layer = new Agency9.Layer.CachedFeatureLayer("buildings", cities_settings.buildings_urls); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rails_helper' | |
describe Admin::Employees::CheckinsController do | |
login_admin | |
before(:all) do | |
@tenant = create(:tenant) | |
Tenant.set_current_tenant(@tenant) | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def check_and_update_kitcheners | |
if params.has_key?(:restaurant_shop) | |
related_properties_params = Array.new | |
params[:restaurant_shop].each do |restaurant_shop_id, person_ids| | |
person_ids.each do |person_id| | |
kitchener_obj = {person_id: person_id, restaurant_shop_id: restaurant_shop_id} | |
related_properties_params.push kitchener_obj | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{\"id\":\"368\",\"amount\":\"10000\",\"fin_account_id\":\"60\",\"balance\":\"10000\"}, | |
{\"id\":\"370\",\"amount\":\"-5000\",\"fin_account_id\":\"60\",\"balance\":\"5000\"}, | |
{\"id\":\"372\",\"amount\":\"-4000\",\"fin_account_id\":\"60\",\"balance\":\"1000\"}, | |
{\"id\":\"371\",\"amount\":\"5000\",\"fin_account_id\":\"59\",\"balance\":\"6000\"}, | |
{\"id\":\"373\",\"amount\":\"4000\",\"fin_account_id\":\"59\",\"balance\":\"10000\"} | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
describe CategoriesController do | |
let!(:category) { create :category } | |
let!(:not_published_product) { create :product, category: category } | |
let!(:product) { create :published_product, category: category, published_at: Time.current - 1.month } | |
let!(:new_selected_product) { create :published_product, category: category, selection: create(:selection) } | |
let!(:new_product) { create :published_product, category: category, published_without_selection: true } | |
context "without current_user" do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ -> | |
if window.location.hash.indexOf("open_auth") > -1 | |
$(window).on 'load', () -> | |
$('.tours-header__menu-item__auth a,header__menu-item__auth a').click() | |
$('.tours-popular__list-item a').on "click", (e) -> | |
e.preventDefault() | |
index = $(@).parent().data("index") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.tour-organizator | |
.tour-organizator__avatar | |
= image_tag @tour.guide.avatar.thumb | |
.tour-organizator__agent-name= @tour.guide.name | |
.tour-organizator__post Организатор экскурсии | |
= render partial: 'tour_question' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module SendAnalyticsEvents | |
extend ActiveSupport::Concern | |
def send_registration_event | |
registration_event = MixpanelService.new({ | |
user_id: self.id | |
}).registration | |
end | |
def send_make_guide_event |