Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
21_22-J 38
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
21_22-J 38
21_22-J 38
Commits
30d612ff
Commit
30d612ff
authored
May 03, 2022
by
W.D.R.P. Sandeepa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some changes
parent
fa7915af
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
33 deletions
+23
-33
API/model/color/__pycache__/colorModel.cpython-39.pyc
API/model/color/__pycache__/colorModel.cpython-39.pyc
+0
-0
frontend/src/component/TableList.js
frontend/src/component/TableList.js
+22
-32
frontend/src/screen/activity/Red.js
frontend/src/screen/activity/Red.js
+1
-1
No files found.
API/model/color/__pycache__/colorModel.cpython-39.pyc
View file @
30d612ff
No preview for this file type
frontend/src/component/TableList.js
View file @
30d612ff
import
React
,
{
useEffect
,
useState
}
from
'
react
'
;
import
{
View
,
StyleSheet
,
ScrollView
}
from
'
react-native
'
;
import
{
Table
,
TableWrapper
,
Row
,
Rows
,
Col
}
from
'
react-native-table-component
'
;
import
AsyncStorage
from
'
@react-native-async-storage/async-storage
'
;
import
client
from
'
../screen/client/Client
'
;
const
userId
=
1
;
// const [tableContent, setTableContent] = useState();
const
CONTENT
=
{
tableHead
:
[
'
Date
'
,
'
Time
'
,
'
Name
'
,
'
Result
'
],
tableData
:
[],
};
const
CONTENT2
=
{
tableHead
:
[
'
Date
'
,
'
Time
'
,
'
Name
'
,
'
Result
'
],
tableData
:
[
[
'
1 jan 2022
'
,
'
2s
'
,
'
Red
'
,
'
Good
'
],
[
'
2 jan 2022
'
,
'
2s
'
,
'
Green
'
,
'
Good
'
],
[
'
3 jan 2022
'
,
'
2s
'
,
'
Black
'
,
'
Good
'
],
[
'
4 jan 2022
'
,
'
2s
'
,
'
White
'
,
'
Good
'
],
[
'
5 jan 2022
'
,
'
2s
'
,
'
Blue
'
,
'
Good
'
],
[
'
6 jan 2022
'
,
'
2s
'
,
'
Yellow
'
,
'
Good
'
],
export
default
function
App
()
{
],
};
const
[
tableData
,
setTableData
]
=
useState
({
tableHead
:
[
'
Date
'
,
'
Time
'
,
'
Name
'
,
'
Result
'
],
data
:
[],
});
export
default
function
App
()
{
useEffect
(()
=>
{
getResult
(
userId
);
},
[]);
function
getResult
(
userId
)
{
async
function
getResult
(
userId
)
{
client
.
get
(
'
getColorActivitiesResult/
'
+
userId
,
{
await
client
.
get
(
'
getColorActivitiesResult/
'
+
userId
,
{
headers
:
{
Accept
:
'
application/json
'
,
'
Content-Type
'
:
'
application/json
'
,
},
}).
then
((
response
)
=>
{
CONTENT
.
tableData
=
response
.
data
.
data
console
.
log
(
CONTENT
.
tableData
);
console
.
log
(
CONTENT2
.
tableData
);
// CONTENT.tableData = response.data.data
setTableData
({
tableHead
:
[
'
Date
'
,
'
Time
'
,
'
Name
'
,
'
Result
'
],
data
:
response
.
data
.
data
,
});
// console.log(CONTENT.tableData);
// userId = 5
// console.log(CONTENT2.tableData);
}).
catch
(
err
=>
{
console
.
log
(
err
);
});
}
useEffect
(()
=>
{
getResult
(
userId
);
},
[]);
return
(
<
ScrollView
>
<
View
style
=
{
styles
.
container
}
>
<
Table
borderStyle
=
{{
borderWidth
:
3
,
borderColor
:
'
#fff
'
}}
>
<
Table
borderStyle
=
{{
borderWidth
:
5
,
borderColor
:
'
#fff
'
}}
>
<
Row
data
=
{
CONTENT
.
tableHead
}
data
=
{
tableData
.
tableHead
}
flexArr
=
{[
1
,
1
,
1
,
1
]}
style
=
{
styles
.
head
}
textStyle
=
{
styles
.
text
}
/
>
<
TableWrapper
style
=
{
styles
.
wrapper
}
>
<
Rows
data
=
{
CONTENT2
.
tableD
ata
}
data
=
{
tableData
.
d
ata
}
flexArr
=
{[
1
,
1
,
1
,
1
]}
style
=
{
styles
.
row
}
textStyle
=
{
styles
.
text
}
...
...
frontend/src/screen/activity/Red.js
View file @
30d612ff
...
...
@@ -244,7 +244,7 @@ export default function Red({ navigation }) {
const
startRecording
=
async
()
=>
{
//
setModalVisible(true);
setModalVisible
(
true
);
try
{
await
Voice
.
start
(
'
en-US
'
);
...
...
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