Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
pill_minder
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Phuengton Chummuel
pill_minder
Commits
09faea45
Commit
09faea45
authored
Feb 12, 2018
by
Phuengton Chummuel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor code a little
parent
c634a92a
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
134 additions
and
46 deletions
+134
-46
Utils.js
src/Utils.js
+5
-0
MedicineDetailCard.js
src/components/MedicineDetailCard.js
+5
-3
AppointmentListScreen.js
src/screens/AppointmentListScreen.js
+52
-19
AppointmentsScreen.js
src/screens/AppointmentsScreen.js
+5
-3
CameraScreen.js
src/screens/CameraScreen.js
+5
-2
HomeScreen.js
src/screens/HomeScreen.js
+4
-4
MedicationListScreen.js
src/screens/MedicationListScreen.js
+51
-10
MedicationsScreen.js
src/screens/MedicationsScreen.js
+6
-4
ReminderDetail.js
src/screens/ReminderDetail.js
+1
-1
No files found.
src/Utils.js
View file @
09faea45
...
@@ -53,4 +53,8 @@ export function appointmentNotification(message, date, id, payload) {
...
@@ -53,4 +53,8 @@ export function appointmentNotification(message, date, id, payload) {
//schedule the notification
//schedule the notification
PushNotification
.
localNotificationSchedule
(
notification
);
PushNotification
.
localNotificationSchedule
(
notification
);
}
export
function
cancleNotification
(
id
)
{
PushNotification
.
cancelLocalNotifications
({
id
:
id
});
}
}
\ No newline at end of file
src/components/MedicineDetailCard.js
View file @
09faea45
...
@@ -10,6 +10,7 @@ import moment from 'moment'
...
@@ -10,6 +10,7 @@ import moment from 'moment'
import
{
Grid
,
Col
}
from
'react-native-easy-grid'
;
import
{
Grid
,
Col
}
from
'react-native-easy-grid'
;
import
{
ToastAndroid
}
from
'react-native'
;
import
{
ToastAndroid
}
from
'react-native'
;
import
PushNotification
from
'react-native-push-notification'
;
import
PushNotification
from
'react-native-push-notification'
;
import
cancleNotification
from
'./../Utils'
;
import
realm
from
'./../Database'
;
import
realm
from
'./../Database'
;
class
MedicineDetailCard
extends
React
.
Component
{
class
MedicineDetailCard
extends
React
.
Component
{
...
@@ -21,7 +22,7 @@ class MedicineDetailCard extends React.Component {
...
@@ -21,7 +22,7 @@ class MedicineDetailCard extends React.Component {
render
()
{
render
()
{
const
{
headerStyle
,
timeTitleStyle
,
detailStyle
,
btnStyle
}
=
styles
;
const
{
headerStyle
,
timeTitleStyle
,
detailStyle
,
btnStyle
}
=
styles
;
const
{
id
,
medName
,
reminderTime
,
meal
}
=
this
.
props
.
item
const
{
id
,
medName
,
reminderTime
,
meal
,
dose
}
=
this
.
props
.
item
return
(
return
(
<
View
style
=
{{
flex
:
1
,
marginTop
:
10
}}
>
<
View
style
=
{{
flex
:
1
,
marginTop
:
10
}}
>
...
@@ -30,7 +31,8 @@ class MedicineDetailCard extends React.Component {
...
@@ -30,7 +31,8 @@ class MedicineDetailCard extends React.Component {
<
/View
>
<
/View
>
<
View
style
=
{
detailStyle
}
>
<
View
style
=
{
detailStyle
}
>
<
Text
>
{
medName
}
<
/Text
>
<
Text
>
{
medName
}
<
/Text
>
<
Text
>
Take
2
<
/Text
>
<
Text
>
{
meal
}
<
/Text
>
<
Text
>
{
"จำนวน "
+
dose
}
<
/Text
>
<
/View
>
<
/View
>
<
View
>
<
View
>
<
Grid
>
<
Grid
>
...
@@ -63,7 +65,7 @@ class MedicineDetailCard extends React.Component {
...
@@ -63,7 +65,7 @@ class MedicineDetailCard extends React.Component {
realm
.
write
(()
=>
{
realm
.
write
(()
=>
{
let
myReminder
=
realm
.
objects
(
'Reminder'
).
filtered
(
'id == '
+
id
)
let
myReminder
=
realm
.
objects
(
'Reminder'
).
filtered
(
'id == '
+
id
)
realm
.
delete
(
myReminder
)
realm
.
delete
(
myReminder
)
ToastAndroid
.
show
(
JSON
.
stringify
(
myReminder
),
ToastAndroid
.
SHORT
)
//
ToastAndroid.show(JSON.stringify(myReminder), ToastAndroid.SHORT)
})
})
}
}
},
},
...
...
src/screens/AppointmentListScreen.js
View file @
09faea45
import
React
,
{
Component
}
from
'react'
;
import
React
,
{
Component
}
from
'react'
;
import
{
Alert
,
ToastAndroid
,
TouchableOpacity
}
from
'react-native'
;
import
{
import
{
Container
,
Container
,
Content
,
Content
,
...
@@ -14,6 +15,7 @@ import {
...
@@ -14,6 +15,7 @@ import {
import
AppHeader
from
'./../components/Header'
;
import
AppHeader
from
'./../components/Header'
;
import
realm
from
'./../Database/'
;
import
realm
from
'./../Database/'
;
import
moment
from
'moment'
;
import
moment
from
'moment'
;
import
{
cancleNotification
}
from
'./../Utils'
;
class
AppointmentListScreen
extends
Component
{
class
AppointmentListScreen
extends
Component
{
...
@@ -30,7 +32,7 @@ class AppointmentListScreen extends Component {
...
@@ -30,7 +32,7 @@ class AppointmentListScreen extends Component {
render
()
{
render
()
{
const
{
appointmentListStyle
}
=
styles
const
{
appointmentListStyle
,
headerStyle
}
=
styles
const
{
goBack
}
=
this
.
props
.
navigation
const
{
goBack
}
=
this
.
props
.
navigation
return
(
return
(
...
@@ -49,22 +51,27 @@ class AppointmentListScreen extends Component {
...
@@ -49,22 +51,27 @@ class AppointmentListScreen extends Component {
}
}
/
>
/
>
<
Content
>
<
Content
>
<
Text
>
Appointment
List
<
/Text
>
<
View
style
=
{{
flex
:
1
,
backgroundColor
:
'white'
,
height
:
60
}}
>
<
List
dataArray
=
{
this
.
state
.
appointmentList
}
<
Text
style
=
{
headerStyle
}
>
Appointment
List
<
/Text
>
renderRow
=
{(
item
)
=>
<
/View
>
<
ListItem
style
=
{
appointmentListStyle
}
>
<
View
>
<
View
style
=
{{
flex
:
1
}}
>
<
List
dataArray
=
{
this
.
state
.
appointmentList
}
<
Text
>
{
"Doctor: "
+
item
.
doctorName
}
<
/Text
>
renderRow
=
{(
item
)
=>
<
Text
>
{
"Date: "
+
moment
(
item
.
date
).
format
(
"DD MM YYYY"
)}
<
/Text
>
<
ListItem
style
=
{
appointmentListStyle
}
>
<
Text
>
{
"Time: "
+
moment
(
item
.
date
).
format
(
"HH:mm"
)}
<
/Text
>
<
View
style
=
{{
flex
:
1
}}
>
<
Text
>
{
"Place: "
+
item
.
place
}
<
/Text
>
<
Text
>
{
"Doctor: "
+
item
.
doctorName
}
<
/Text
>
<
/View
>
<
Text
>
{
"Date: "
+
moment
(
item
.
date
).
format
(
"DD MMM YYYY"
)}
<
/Text
>
<
View
>
<
Text
>
{
"Time: "
+
moment
(
item
.
date
).
format
(
"HH:mm"
)}
<
/Text
>
<
Icon
name
=
'more'
/>
<
Text
>
{
"Place: "
+
item
.
place
}
<
/Text
>
<
/View
>
<
/View
>
<
/ListItem
>
}
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
_deleteAppointment
(
item
)}
>
<
/List
>
<
Icon
name
=
'more'
/>
<
/TouchableOpacity
>
<
/ListItem
>
}
>
<
/List
>
<
/View
>
<
/Content
>
<
/Content
>
<
/Container
>
<
/Container
>
)
)
...
@@ -79,6 +86,28 @@ class AppointmentListScreen extends Component {
...
@@ -79,6 +86,28 @@ class AppointmentListScreen extends Component {
this
.
setState
({
appointmentList
:
tmpAppointment
})
this
.
setState
({
appointmentList
:
tmpAppointment
})
}
}
_deleteAppointment
(
data
)
{
// ToastAndroid.show("Clicked", ToastAndroid.SHORT)
Alert
.
alert
(
'Confirm'
,
'Want to delete this appointment?'
,
[
{
text
:
'CANCLE'
,
onPress
:
()
=>
this
.
setState
({
addItemVisible
:
true
})
},
{
text
:
'OK'
,
onPress
:
()
=>
{
const
tmpAppointment
=
realm
.
objects
(
"Appointments"
).
filtered
(
'id == '
+
data
.
id
)
cancleNotification
(
data
.
id
)
realm
.
write
(()
=>
{
realm
.
delete
(
tmpAppointment
)
})
}
},
],
{
cancelable
:
false
}
)
}
}
}
const
styles
=
{
const
styles
=
{
...
@@ -88,8 +117,13 @@ const styles = {
...
@@ -88,8 +117,13 @@ const styles = {
marginTop
:
0
,
marginTop
:
0
,
marginBottom
:
0
,
marginBottom
:
0
,
padding
:
15
,
padding
:
15
,
},
headerStyle
:
{
color
:
"#1686C4"
,
fontSize
:
20
,
paddingTop
:
15
,
paddingLeft
:
15
}
}
}
}
export
default
AppointmentListScreen
;
export
default
AppointmentListScreen
;
\ No newline at end of file
src/screens/AppointmentsScreen.js
View file @
09faea45
...
@@ -102,7 +102,7 @@ class AppointmentsScreen extends React.Component {
...
@@ -102,7 +102,7 @@ class AppointmentsScreen extends React.Component {
let allReminder = realm.objects('
Appointments
')
let allReminder = realm.objects('
Appointments
')
realm.delete(allReminder)
realm.delete(allReminder)
})
})
ToastAndroid.show("reset", ToastAndroid.SHORT)
//
ToastAndroid.show("reset", ToastAndroid.SHORT)
}
}
_addAppointment() {
_addAppointment() {
...
@@ -112,7 +112,8 @@ class AppointmentsScreen extends React.Component {
...
@@ -112,7 +112,8 @@ class AppointmentsScreen extends React.Component {
'
Confrim
?
',
'
Confrim
?
',
'
Are
you
sure
to
add
this
appointment
?
',
'
Are
you
sure
to
add
this
appointment
?
',
[
[
{ text: '
CANCLE
', onPress: () => ToastAndroid.show("Cancled", ToastAndroid.SHORT) },
// { text: '
CANCLE
', onPress: () => ToastAndroid.show("Cancled", ToastAndroid.SHORT) },
{ text: '
CANCLE
', onPress: () => { } },
{
{
text: '
OK
', onPress: () => {
text: '
OK
', onPress: () => {
var id = Math.random() * 10000
var id = Math.random() * 10000
...
@@ -143,7 +144,8 @@ class AppointmentsScreen extends React.Component {
...
@@ -143,7 +144,8 @@ class AppointmentsScreen extends React.Component {
'
Please
enter
Doctor
name
/
Select
appointment
date
and
time
',
'
Please
enter
Doctor
name
/
Select
appointment
date
and
time
',
'',
'',
[
[
{ text: '
OK
', onPress: () => ToastAndroid.show("Please enter medine name / Select reminder time", ToastAndroid.SHORT) },
// { text: '
OK
', onPress: () => ToastAndroid.show("Please enter medine name / Select reminder time", ToastAndroid.SHORT) },
{ text: '
OK
', onPress: () => { } },
],
],
{ cancelable: false }
{ cancelable: false }
)
)
...
...
src/screens/CameraScreen.js
View file @
09faea45
...
@@ -110,10 +110,13 @@ class AppCamera extends Component {
...
@@ -110,10 +110,13 @@ class AppCamera extends Component {
break
;
break
;
}
}
var
timePeriod
=
data
.
period
==
1
?
'เช้า'
:
data
.
period
==
2
?
'กลางวัน'
:
data
.
period
==
3
?
'เย็น'
:
'ค่ำ'
;
var
beforeMeal
=
data
.
beforeMeal
?
"
\
tก่อนอาหาร"
:
"
\
tหลังอาหาร"
;
Alert
.
alert
(
Alert
.
alert
(
'Confrim?'
,
'Confrim?'
,
JSON
.
stringify
(
data
)
,
'ชื่อยา: '
+
data
.
medName
+
'
\
nก่อน/หลัง อาหาร: '
+
beforeMeal
+
'
\
nช่วงเวลา: '
+
timePeriod
+
'
\
nจำนวน: '
+
data
.
dose
,
[
[
{
text
:
'CANCLE'
,
onPress
:
()
=>
this
.
setState
({
addItemVisible
:
true
})
},
{
text
:
'CANCLE'
,
onPress
:
()
=>
this
.
setState
({
addItemVisible
:
true
})
},
{
{
...
@@ -122,7 +125,7 @@ class AppCamera extends Component {
...
@@ -122,7 +125,7 @@ class AppCamera extends Component {
var
id
=
Math
.
random
()
*
10000
var
id
=
Math
.
random
()
*
10000
var
reminderDate
=
moment
().
hour
(
time
[
0
]).
minute
(
time
[
1
]).
second
(
0
).
toDate
()
var
reminderDate
=
moment
().
hour
(
time
[
0
]).
minute
(
time
[
1
]).
second
(
0
).
toDate
()
var
beforeMeal
=
data
.
beforeMeal
?
"
\
tก่อนอาหาร"
:
"
\
tหลังอาหาร"
;
var
msg
=
"แจ้งเตือนกินยา
\n
"
+
"เวลา: "
+
time
[
0
]
+
":"
+
time
[
1
]
+
"
\n
ยา: "
+
data
.
medName
+
beforeMeal
;
var
msg
=
"แจ้งเตือนกินยา
\n
"
+
"เวลา: "
+
time
[
0
]
+
":"
+
time
[
1
]
+
"
\n
ยา: "
+
data
.
medName
+
beforeMeal
;
scheduleLocalNotification
(
msg
,
reminderDate
,
id
)
scheduleLocalNotification
(
msg
,
reminderDate
,
id
)
...
...
src/screens/HomeScreen.js
View file @
09faea45
...
@@ -125,7 +125,7 @@ class HomeScreen extends Component {
...
@@ -125,7 +125,7 @@ class HomeScreen extends Component {
}
}
_timePeriodPress
(
data
,
period
)
{
_timePeriodPress
(
data
,
period
)
{
ToastAndroid
.
show
(
JSON
.
stringify
(
data
),
ToastAndroid
.
SHORT
)
//
ToastAndroid.show(JSON.stringify(data), ToastAndroid.SHORT)
this
.
props
.
navigation
.
navigate
(
'Detail'
,
{
items
:
data
,
period
:
period
})
this
.
props
.
navigation
.
navigate
(
'Detail'
,
{
items
:
data
,
period
:
period
})
}
}
...
@@ -160,7 +160,7 @@ class HomeScreen extends Component {
...
@@ -160,7 +160,7 @@ class HomeScreen extends Component {
this
.
setState
({
morningReminder
:
tmpMorning
,
afternoonReminder
:
tmpAfternoon
,
eveningReminder
:
tmpEvening
,
nightReminder
:
tmpNight
})
this
.
setState
({
morningReminder
:
tmpMorning
,
afternoonReminder
:
tmpAfternoon
,
eveningReminder
:
tmpEvening
,
nightReminder
:
tmpNight
})
// ToastAndroid.show(JSON.stringify(myReminder), ToastAndroid.LONG)
// ToastAndroid.show(JSON.stringify(myReminder), ToastAndroid.LONG)
ToastAndroid
.
show
(
JSON
.
stringify
(
this
.
state
.
morningReminder
),
ToastAndroid
.
LONG
)
//
ToastAndroid.show(JSON.stringify(this.state.morningReminder), ToastAndroid.LONG)
}
}
_isFirstLaunched
()
{
_isFirstLaunched
()
{
...
@@ -171,10 +171,10 @@ class HomeScreen extends Component {
...
@@ -171,10 +171,10 @@ class HomeScreen extends Component {
ToastAndroid
.
show
(
error
.
toString
(),
ToastAndroid
.
SHORT
)
ToastAndroid
.
show
(
error
.
toString
(),
ToastAndroid
.
SHORT
)
})
// No need to wait for `setItem` to finish, although you might want to handle errors
})
// No need to wait for `setItem` to finish, although you might want to handle errors
this
.
setState
({
firstLaunch
:
true
});
this
.
setState
({
firstLaunch
:
true
});
ToastAndroid
.
show
(
"Frist Launch:"
+
this
.
state
.
firstLaunch
,
ToastAndroid
.
LONG
)
//
ToastAndroid.show("Frist Launch:" + this.state.firstLaunch, ToastAndroid.LONG)
}
else
{
}
else
{
this
.
setState
({
firstLaunch
:
false
});
this
.
setState
({
firstLaunch
:
false
});
ToastAndroid
.
show
(
"Frist Launch:"
+
this
.
state
.
firstLaunch
,
ToastAndroid
.
LONG
)
//
ToastAndroid.show("Frist Launch:" + this.state.firstLaunch, ToastAndroid.LONG)
}
}
})
// Add some error handling, also you can simply do this.setState({fistLaunch: value == null})
})
// Add some error handling, also you can simply do this.setState({fistLaunch: value == null})
}
}
...
...
src/screens/MedicationListScreen.js
View file @
09faea45
import
React
,
{
Component
}
from
'react'
;
import
React
,
{
Component
}
from
'react'
;
import
{
TouchableOpacity
,
Alert
}
from
'react-native'
;
import
{
import
{
Container
,
Container
,
Content
,
Content
,
...
@@ -9,8 +10,10 @@ import {
...
@@ -9,8 +10,10 @@ import {
List
,
List
,
ListItem
ListItem
}
from
'native-base'
;
}
from
'native-base'
;
import
{
cancleNotification
}
from
'./../Utils'
;
import
AppHeader
from
'./../components/Header'
;
import
AppHeader
from
'./../components/Header'
;
import
realm
from
'./../Database/'
import
realm
from
'./../Database/'
;
import
moment
from
'moment'
;
class
MedicationListScreen
extends
Component
{
class
MedicationListScreen
extends
Component
{
...
@@ -27,7 +30,7 @@ class MedicationListScreen extends Component {
...
@@ -27,7 +30,7 @@ class MedicationListScreen extends Component {
render
()
{
render
()
{
const
{
reminderListStyle
}
=
styles
const
{
reminderListStyle
,
headerStyle
}
=
styles
const
{
goBack
}
=
this
.
props
.
navigation
const
{
goBack
}
=
this
.
props
.
navigation
...
@@ -47,14 +50,26 @@ class MedicationListScreen extends Component {
...
@@ -47,14 +50,26 @@ class MedicationListScreen extends Component {
}
}
/
>
/
>
<
Content
>
<
Content
>
<
Text
>
Reminder
List
<
/Text
>
<
View
style
=
{{
flex
:
1
,
backgroundColor
:
'white'
,
height
:
60
}}
>
<
List
dataArray
=
{
this
.
state
.
reminderList
}
<
Text
style
=
{
headerStyle
}
>
Medication
List
<
/Text
>
renderRow
=
{(
item
)
=>
<
/View
>
<
ListItem
style
=
{
reminderListStyle
}
>
<
View
>
<
Text
>
{
item
.
medName
}
<
/Text
>
<
List
dataArray
=
{
this
.
state
.
reminderList
}
<
/ListItem
>
renderRow
=
{(
item
)
=>
}
>
<
ListItem
style
=
{
reminderListStyle
}
>
<
/List
>
<
View
style
=
{{
flex
:
1
}}
>
<
Text
>
{
item
.
medName
}
<
/Text
>
<
Text
>
{
"Take: "
+
item
.
dose
}
<
/Text
>
<
Text
>
{
'Time: '
+
moment
(
item
.
reminderTime
).
format
(
'HH:mm'
)}
<
/Text
>
<
/View
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
_deleteMedicine
(
item
)}
>
<
Icon
name
=
'more'
/>
<
/TouchableOpacity
>
<
/ListItem
>
}
>
<
/List
>
<
/View
>
<
/Content
>
<
/Content
>
<
/Container
>
<
/Container
>
)
)
...
@@ -71,8 +86,29 @@ class MedicationListScreen extends Component {
...
@@ -71,8 +86,29 @@ class MedicationListScreen extends Component {
this
.
props
.
navigation
.
navigate
(
"AddMedication"
)
this
.
props
.
navigation
.
navigate
(
"AddMedication"
)
}
}
_deleteMedicine
(
data
)
{
Alert
.
alert
(
'Confirm'
,
'Want to delete this medicine?'
,
[
{
text
:
'CANCLE'
,
onPress
:
()
=>
this
.
setState
({
addItemVisible
:
true
})
},
{
text
:
'OK'
,
onPress
:
()
=>
{
const
tmpMedicine
=
realm
.
objects
(
"Reminder"
).
filtered
(
'id == '
+
data
.
id
)
cancleNotification
(
data
.
id
)
realm
.
write
(()
=>
{
realm
.
delete
(
tmpMedicine
)
})
}
},
],
{
cancelable
:
false
}
)
}
}
}
const
styles
=
{
const
styles
=
{
reminderListStyle
:
{
reminderListStyle
:
{
marginLeft
:
0
,
marginLeft
:
0
,
...
@@ -80,6 +116,11 @@ const styles = {
...
@@ -80,6 +116,11 @@ const styles = {
marginTop
:
0
,
marginTop
:
0
,
marginBottom
:
0
,
marginBottom
:
0
,
padding
:
15
padding
:
15
},
headerStyle
:
{
color
:
"#1686C4"
,
fontSize
:
20
,
paddingTop
:
15
,
paddingLeft
:
15
}
}
}
}
...
...
src/screens/MedicationsScreen.js
View file @
09faea45
...
@@ -50,8 +50,8 @@ PushNotification.configure({
...
@@ -50,8 +50,8 @@ PushNotification.configure({
class
MedicationsScreen
extends
Component
{
class
MedicationsScreen
extends
Component
{
constructor
()
{
constructor
(
props
)
{
super
();
super
(
props
);
this
.
state
=
{
this
.
state
=
{
text
:
""
,
text
:
""
,
date
:
new
Date
(
Date
.
now
()).
toISOString
().
split
(
'T'
)[
0
],
date
:
new
Date
(
Date
.
now
()).
toISOString
().
split
(
'T'
)[
0
],
...
@@ -285,7 +285,8 @@ class MedicationsScreen extends Component {
...
@@ -285,7 +285,8 @@ class MedicationsScreen extends Component {
'Successful'
,
'Successful'
,
''
,
''
,
[
[
{
text
:
'OK'
,
onPress
:
()
=>
ToastAndroid
.
show
(
"Successful"
,
ToastAndroid
.
SHORT
)
},
// { text: 'OK', onPress: () => ToastAndroid.show("Successful", ToastAndroid.SHORT) },
{
text
:
'OK'
,
onPress
:
()
=>
{
}
},
],
],
{
cancelable
:
false
}
{
cancelable
:
false
}
)
)
...
@@ -295,7 +296,8 @@ class MedicationsScreen extends Component {
...
@@ -295,7 +296,8 @@ class MedicationsScreen extends Component {
'Please enter medine name / Select reminder time'
,
'Please enter medine name / Select reminder time'
,
''
,
''
,
[
[
{
text
:
'OK'
,
onPress
:
()
=>
ToastAndroid
.
show
(
"Please enter medine name / Select reminder time"
,
ToastAndroid
.
SHORT
)
},
// { text: 'OK', onPress: () => ToastAndroid.show("Please enter medine name / Select reminder time", ToastAndroid.SHORT) },
{
text
:
'OK'
,
onPress
:
()
=>
{
}
},
],
],
{
cancelable
:
false
}
{
cancelable
:
false
}
)
)
...
...
src/screens/ReminderDetail.js
View file @
09faea45
...
@@ -19,7 +19,7 @@ class ReminderDetail extends React.Component {
...
@@ -19,7 +19,7 @@ class ReminderDetail extends React.Component {
const
{
params
}
=
this
.
props
.
navigation
.
state
;
const
{
params
}
=
this
.
props
.
navigation
.
state
;
const
{
goBack
}
=
this
.
props
.
navigation
;
const
{
goBack
}
=
this
.
props
.
navigation
;
const
items
=
params
?
params
.
items
:
null
const
items
=
params
?
params
.
items
:
null
const
period
=
params
.
period
==
1
?
"Morni
gn
"
:
params
.
period
==
2
?
"Afternoon"
:
params
.
period
==
3
?
"Evening"
:
"Night"
const
period
=
params
.
period
==
1
?
"Morni
ng
"
:
params
.
period
==
2
?
"Afternoon"
:
params
.
period
==
3
?
"Evening"
:
"Night"
const
{
headerStyle
,
headerFontStyle
}
=
styles
const
{
headerStyle
,
headerFontStyle
}
=
styles
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment