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 fetchTokenAndPostCreditCard(card) { | |
return (dispatch) => { | |
dispatch(requestCardToken()) | |
return new Promise( | |
function(resolve, reject) { | |
return iiTokenization.resolveToken({ | |
env: 'dev2', | |
dev: true, | |
accessToken: 'a696c977-b32c-4751-9916-33e6329a921b', | |
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
* As a salesperson I want to add clients to the application so I contact them and keep track of our interactions | |
* As a salesperson I want to edit client data so that I can keep the info I have on them up to date | |
* As a salesperson I want to add information about an interaction with a client so that it's logged and can be shared later | |
* As a salesperson I want the ability to maintain multiple points of contact for a client (so...) | |
* |
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 * as ProgramApi from '../models/ProgramApi' | |
import standardAction from '../util/standardAction' | |
export const BEGIN_INDEX = 'PROGRAMS:BEGIN_INDEX' | |
export const RECEIVE_INDEX = 'PROGRAMS:RECEIVE_INDEX' | |
export function indexRequest(filterOptions) { | |
return (dispatch) => { | |
dispatch(standardAction(BEGIN_INDEX))} | |
return ProgramApi.index(filterOptions) |
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 searchIds = (query, options = {}) => { | |
return client | |
.search({index, ...options, body: query}) | |
.then((results) => { | |
const {hits} = results.hits | |
return hits.map((result) => result._id) | |
}) | |
} |
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, PropTypes} from 'react' | |
import textWithPlaceholder from '../util/textWithPlaceholder' | |
class DataCol extends Component { | |
static propTypes = { | |
label: PropTypes.string.isRequired, | |
text: PropTypes.string, | |
className: PropTypes.string, | |
} |
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
Environment.config do | |
required :ENV_KEY | |
warn :ENV_KEY_2 | |
end |
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 ViewModel { | |
constructor(subject) { | |
this.subject = subject | |
} | |
} | |
class ExampleViewModel extends ViewModel { | |
fooPlus(num) { | |
return subject.foo + num | |
} |
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
_isEditThrow() { | |
const { scoreFrame } = this.props | |
const isTenth = scoreFrame.position === 10 | |
if (!scoreFrame) { return 1 } | |
return (isTenth && scoreFrame.throw2) ? 3 : 2 | |
} |
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 MyCoolButton extends Component { | |
_onPressButton() { | |
this.props.beforeButtonAction() | |
console.log("this button doesn't do anything useful") | |
} | |
render() { | |
return <Button onPress={this._onPressButton.bind(this)}> | |
} | |
} |