Skip to content
This repository was archived by the owner on Dec 20, 2022. It is now read-only.

Commit c51d481

Browse files
committedOct 4, 2017
texting and confirm modal start
1 parent 7cbaa89 commit c51d481

File tree

5 files changed

+30
-1
lines changed

5 files changed

+30
-1
lines changed
 

‎package.json

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"lodash": "^4.17.4",
1212
"react": "16.0.0-alpha.12",
1313
"react-native": "0.48.4",
14+
"react-native-communications": "^2.2.1",
1415
"react-native-router-flux": "3.41.0",
1516
"react-redux": "^5.0.6",
1617
"redux": "^3.7.2",

‎src/components/EmployeeEdit.js

+13
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import _ from 'lodash';
22
import React, { Component } from 'react';
33
import { connect } from 'react-redux';
4+
import Communications from 'react-native-communications';
45
import EmployeeForm from './EmployeeForm';
56
import { employeeUpdate, employeeSave } from '../actions';
67
import { Card, CardSection, Button } from './common';
@@ -18,6 +19,12 @@ class EmployeeEdit extends Component {
1819
this.props.employeeSave({ name, phone, shift, uid: this.props.employee.uid });
1920
}
2021

22+
onTextPress() {
23+
const { phone, shift } = this.props;
24+
25+
Communications.text(phone, `Your upcoming shift is on ${shift}`);
26+
}
27+
2128
render() {
2229
return (
2330
<Card>
@@ -27,6 +34,12 @@ class EmployeeEdit extends Component {
2734
Save Changes
2835
</Button>
2936
</CardSection>
37+
38+
<CardSection>
39+
<Button onPress={this.onTextPress.bind(this)}>
40+
Text Schedule
41+
</Button>
42+
</CardSection>
3043
</Card>
3144
);
3245
}

‎src/components/common/Confirm.js

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import React from 'react';
2+
import { Text, View, Modal } from 'react-native';
3+
import { CardSection } from './CardSection';
4+
import { Button } from './Button';
5+
6+
const Confirm = () => {
7+
8+
};
9+
10+
export { Confirm };

‎src/components/common/index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ export * from './Card';
33
export * from './CardSection';
44
export * from './Header';
55
export * from './Input';
6-
export * from './Spinner';
6+
export * from './Spinner';
7+
export * from './Confirm';

‎yarn.lock

+4
Original file line numberDiff line numberDiff line change
@@ -3585,6 +3585,10 @@ react-devtools-core@^2.5.0:
35853585
shell-quote "^1.6.1"
35863586
ws "^2.0.3"
35873587

3588+
react-native-communications@^2.2.1:
3589+
version "2.2.1"
3590+
resolved "https://registry.yarnpkg.com/react-native-communications/-/react-native-communications-2.2.1.tgz#7883b56b20a002eeb790c113f8616ea8692ca795"
3591+
35883592
react-native-experimental-navigation@^0.28.0:
35893593
version "0.28.0"
35903594
resolved "https://registry.yarnpkg.com/react-native-experimental-navigation/-/react-native-experimental-navigation-0.28.0.tgz#561298190320cd336dc5b00c2e8bc2435cfb4909"

0 commit comments

Comments
 (0)
This repository has been archived.