This file contains 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
<bill_data> | |
<id>3</id> | |
<canceled>true</canceled> | |
</bill_data> |
This file contains 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
<client_data> | |
<phone>+375291111111</phone> | |
<emaia>[email protected]</emaia> | |
<first_name>Валерий</first_name> | |
<last_name>Володин</last_name> | |
<patronymic>Васильевич</patronymic> | |
<is_jurist>False</is_jurist> | |
<uniq_id>112233445566</uniq_id> | |
<birth_date>2018-11-06</birth_date> | |
<city>Минск</city> |
This file contains 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
import React, { Component } from 'react'; | |
import { | |
Route, | |
Switch, | |
} from 'react-router-dom'; | |
import { YMInitializer } from 'react-yandex-metrika'; | |
import NoMatch from '../../components/NoMatch'; | |
import UsersEdit from '../Users/edit'; |
This file contains 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
import React from 'react'; | |
import GoogleAnalytics from 'react-ga'; | |
const { NODE_ENV } = process.env; | |
GoogleAnalytics.initialize('UA-47365686-9'); | |
const withTracker = (WrappedComponent) => { | |
const trackPage = (page) => { | |
GoogleAnalytics.set({ page }); | |
GoogleAnalytics.pageview(page); |
This file contains 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
renderAllStoryBlocks() { | |
const blocksTree = arrayToTree(this.state.stories, {parentProperty: 'parentId'}); | |
blocksTree.forEach((story, index) => { | |
this.renderStoryBlock(story, index, 0, window.innerHeight); | |
}); | |
} | |
renderStoryBlock(story, index, left, right) { |
This file contains 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
const ua = require('universal-analytics'); | |
const bluebird = require('bluebird'); | |
const GOOGLE_ANALYTICS_ID = require('../../config').googleAnalytics.uid; | |
class GoogleAnalytics { | |
constructor(uid) { | |
this._uid = uid; | |
this._visitor = ua(GOOGLE_ANALYTICS_ID, this._uid, { strictCidFormat: false, }); |
This file contains 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
sendEvent(category, action, label) { | |
if (!this._visitor) return; | |
this._visitor.eventAsync(category, action, label) | |
.catch(error => console.error(error)); | |
} |
This file contains 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
const ua = require('universal-analytics'); | |
const bluebird = require('bluebird'); | |
const GOOGLE_ANALYTICS_ID = require('../../config').googleAnalytics.uid; | |
class GoogleAnalytics { | |
constructor(uid) { | |
this._uid = uid; | |
this._visitor = ua(GOOGLE_ANALYTICS_ID, this._uid, { strictCidFormat: false, }); |
This file contains 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 OrdersController do | |
describe 'GET #index' do | |
it_requires_authentication do | |
get :index | |
end | |
for_users :admin, :analyst do | |
it 'loads all the orders in distinct order' do |
This file contains 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 CreateUsers < ActiveRecord::Migration | |
def change | |
create_table :users do |t| | |
t.string :telegram_id | |
t.string :first_name | |
t.string :last_name | |
t.jsonb :bot_command_data, default: {} | |
t.timestamps null: false | |
end |
NewerOlder