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
fc65b4b2
Commit
fc65b4b2
authored
May 04, 2018
by
Phuengton Chummuel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
...
parent
fb253d7f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
12 deletions
+11
-12
ReminderDialogForm.js
src/components/ReminderDialogForm.js
+6
-5
CameraScreen.js
src/screens/CameraScreen.js
+5
-7
No files found.
src/components/ReminderDialogForm.js
View file @
fc65b4b2
...
@@ -8,6 +8,8 @@ import {
...
@@ -8,6 +8,8 @@ import {
}
from
'native-base'
}
from
'native-base'
import
{
SinglePickerMaterialDialog
}
from
'react-native-material-dialog'
import
{
SinglePickerMaterialDialog
}
from
'react-native-material-dialog'
import
{
ToastAndroid
}
from
'react-native'
import
{
ToastAndroid
}
from
'react-native'
import
{
connect
}
from
'react-redux'
import
{
reminderCreate
}
from
'./../actions'
import
realm
from
'./../Database'
import
realm
from
'./../Database'
class
ReminderDialogForm
extends
Component
{
class
ReminderDialogForm
extends
Component
{
...
@@ -42,12 +44,12 @@ class ReminderDialogForm extends Component {
...
@@ -42,12 +44,12 @@ class ReminderDialogForm extends Component {
const
dose
=
[
'1'
,
'2'
,
'3'
,
'4'
,
'5'
,
'6'
,
'7'
,
'8'
,
'9'
,
'10'
]
const
dose
=
[
'1'
,
'2'
,
'3'
,
'4'
,
'5'
,
'6'
,
'7'
,
'8'
,
'9'
,
'10'
]
const
{
uploadProgress
,
imageToText
}
=
this
.
props
const
{
uploadProgress
,
imageToText
,
onOk
}
=
this
.
props
const
Loading
=
({
uploadProgress
})
=>
{
const
Loading
=
({
uploadProgress
})
=>
{
return
(
return
(
<
View
>
<
View
>
<
Text
>
{
"Upload : "
+
uploadProgress
+
"%
\n
"
}
<
/Text
>
<
Text
>
{
"Upload : "
+
uploadProgress
+
"%
\n
"
+
onOk
.
toString
()
}
<
/Text
>
<
/View
>
<
/View
>
)
)
}
}
...
@@ -55,7 +57,6 @@ class ReminderDialogForm extends Component {
...
@@ -55,7 +57,6 @@ class ReminderDialogForm extends Component {
if
(
uploadProgress
!==
"100"
)
{
if
(
uploadProgress
!==
"100"
)
{
return
<
Loading
uploadProgress
=
{
uploadProgress
}
/>
;
return
<
Loading
uploadProgress
=
{
uploadProgress
}
/>
;
}
else
{
}
else
{
if
(
imageToText
&&
imageToText
.
closeMatches
!=
-
1
)
{
if
(
imageToText
&&
imageToText
.
closeMatches
!=
-
1
)
{
return
(
return
(
<
View
>
<
View
>
...
@@ -109,4 +110,4 @@ class ReminderDialogForm extends Component {
...
@@ -109,4 +110,4 @@ class ReminderDialogForm extends Component {
}
}
}
}
export
default
ReminderDialogForm
;
export
default
connect
(
null
,
{
reminderCreate
})(
ReminderDialogForm
);
\ No newline at end of file
\ No newline at end of file
src/screens/CameraScreen.js
View file @
fc65b4b2
...
@@ -30,10 +30,10 @@ class AppCamera extends Component {
...
@@ -30,10 +30,10 @@ class AppCamera extends Component {
visible
:
false
,
visible
:
false
,
imageToText
:
""
,
imageToText
:
""
,
uploadProgress
:
"0"
,
uploadProgress
:
"0"
,
a
ddReminder
:
false
,
onA
ddReminder
:
false
,
dataType
:
''
,
dataType
:
''
,
qrData
:
{},
qrData
:
{},
uuid
:
''
uuid
:
''
,
}
}
}
}
...
@@ -72,11 +72,12 @@ class AppCamera extends Component {
...
@@ -72,11 +72,12 @@ class AppCamera extends Component {
<
MaterialDialog
<
MaterialDialog
title
=
"Add Reminder"
title
=
"Add Reminder"
visible
=
{
this
.
state
.
visible
}
visible
=
{
this
.
state
.
visible
}
onOk
=
{()
=>
this
.
setState
({
visible
:
false
,
imageToText
:
''
,
uploadProgress
:
'0'
})}
onOk
=
{()
=>
this
.
setState
({
visible
:
false
,
imageToText
:
''
,
uploadProgress
:
'0'
,
onAddReminder
:
true
})}
onCancel
=
{()
=>
this
.
setState
({
visible
:
false
,
imageToText
:
''
,
uploadProgress
:
'0'
})}
>
onCancel
=
{()
=>
this
.
setState
({
visible
:
false
,
imageToText
:
''
,
uploadProgress
:
'0'
,
onAddReminder
:
false
})}
>
<
ReminderDialogForm
<
ReminderDialogForm
uploadProgress
=
{
this
.
state
.
uploadProgress
}
uploadProgress
=
{
this
.
state
.
uploadProgress
}
imageToText
=
{
this
.
state
.
imageToText
}
imageToText
=
{
this
.
state
.
imageToText
}
onOk
=
{
this
.
state
.
onAddReminder
}
/
>
/
>
<
/MaterialDialog
>
<
/MaterialDialog
>
<
MaterialDialog
<
MaterialDialog
...
@@ -155,9 +156,6 @@ class AppCamera extends Component {
...
@@ -155,9 +156,6 @@ class AppCamera extends Component {
break
;
break
;
}
}
}
}
}
}
...
...
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