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
export function empty(val) { | |
return (typeof val === 'undefined' || val === '' || val === 0 || val === '0' || val === null | |
|| val === false || (typeof val === 'object' && !Object.keys(val).length) || (Array.isArray(val) && !val.length ) | |
); | |
} | |
export function apiUrl (path, params, absolut = false) { | |
return URL_BASE + path | |
} |
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 PropTypes from 'prop-types'; | |
import config from 'config'; | |
import Helmet from 'react-helmet'; | |
import { connect } from 'react-redux'; | |
import { injectIntl, intlShape } from 'react-intl'; |
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
export const plansName = [ | |
{ | |
id: 'standard', | |
nameId: 'billing.plan.name.standard' | |
}, | |
{ | |
id: 'plus', | |
nameId: 'billing.plan.name.plus' | |
}, | |
]; |
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 PropTypes from 'prop-types'; | |
import SelectField from 'material-ui/SelectField'; | |
import MenuItem from 'material-ui/MenuItem'; | |
import { RadioButton, RadioButtonGroup } from 'material-ui/RadioButton'; | |
import RaisedButton from 'material-ui/RaisedButton'; | |
import Paper from 'material-ui/Paper'; |
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 superagent from 'superagent'; | |
import cookies from 'react-cookie'; | |
import config from '../config'; | |
import CryptoJS from 'crypto-js'; | |
import _clone from 'lodash/clone'; | |
import { normalizePayload } from 'utils/jwt'; | |
const methods = ['get', 'post', 'put', 'patch', 'del']; |
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
export function loadPlans(etag) { | |
return { | |
types: [LOAD_PLANS, LOAD_PLANS_SUCCESS, LOAD_PLANS_FAIL], | |
promise: (client) => client.get('/plans', { | |
headers: { | |
'If-None-Match': etag | |
} | |
}) | |
}; | |
} |
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
App.prototype.makeDynamicArc = function (data) { | |
var rowLen = data.rowLen; | |
var shape0_x, | |
shape0_y; | |
var shape0_w = data.tag.w, | |
shape0_h = data.tag.h; | |
var shapeType = data.shape.shapeType, | |
shapeW = data.shape.w, | |
shapeH = data.shape.h; |
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
App.prototype.calculateCoords = function (rowNumber, currentShape) { | |
var max_y = 20; | |
d3.selectAll('g.group').each(function (d) { | |
var coords = d3.transform(d3.select(this).attr("transform")); | |
var grpX = coords.translate[0]; | |
var grpY = coords.translate[1]; | |
if (grpY > max_y) { | |
max_y = grpY; | |
} | |
}); |
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
App.prototype.editRow = function (config) { | |
if(config.name) { | |
if(this._isUniqueTag(config.name, self.shapes['grouped'])) { | |
d3.select(self.currentGroupForEdit).select('text').text(config.name) | |
} else { | |
alert('Group tag have to be unique. ' + config.name + ' is already existing.') | |
} | |
} | |
if(config.numberOfSeats) { | |
var elements = d3.select(self.currentGroupForEdit).selectAll('g.point'); |
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
var MongoClient = require('mongodb').MongoClient, | |
commandLineArgs = require('command-line-args'), | |
assert = require('assert'); | |
var options = commandLineOptions(); | |
MongoClient.connect('mongodb://localhost:27017/crunchbase', function(err, db) { |
OlderNewer