diff --git a/android/settings.gradle b/android/settings.gradle
index 6a329e6..8037889 100644
--- a/android/settings.gradle
+++ b/android/settings.gradle
@@ -1,22 +1,26 @@
rootProject.name = 'LearningTest2'
+
+include ':react-native-facebook-login'
+project(':react-native-facebook-login').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-facebook-login/android')
+
+include ':react-native-localization', ':app'
+project(':react-native-localization').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-localization/android')
+
include ':react-native-fs'
project(':react-native-fs').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-fs/android')
+
include ':react-native-image-resizer'
project(':react-native-image-resizer').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-image-resizer/android')
+
include ':react-native-image-picker'
project(':react-native-image-picker').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-image-picker/android')
-include ':react-native-localization', ':app'
-project(':react-native-localization').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-localization/android')
-
include ':react-native-vector-icons'
project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
include ':react-native-google-signin'
project(':react-native-google-signin').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-google-signin/android')
-include ':react-native-facebook-login'
-project(':react-native-facebook-login').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-facebook-login/android')
include ':react-native-svg'
project(':react-native-svg').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-svg/android')
diff --git a/app/actions/study.js b/app/actions/study.js
index 86ab4e1..e6eff2f 100644
--- a/app/actions/study.js
+++ b/app/actions/study.js
@@ -9,11 +9,11 @@ export function startLearn(studyType, startLearn, studyID){
}
export function endLearn(postValue){
-
return (dispatch) => {
- fetch('http://www.mocky.io/v2/5af163c63100002a0096c946',{
+ fetch('https://e-learning-backend.herokuapp.com/api/v1/finishStudy',{
method: 'POST',
headers: {
+ 'Authorization' : 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7InVzZXJJZCI6IjViMGI0ZWYzMjMwZjJmMjMyNjI3NjI4YSIsInJvbGUiOiJVU0VSIn0sImlhdCI6MTUyNzcyNjMwNywiZXhwIjoxNjg1NDI2MzA3fQ.jRQSMxc1AezfuTUFoHitSjQ74sDzUngArzQr8yTlhDM',
'Accept': 'application/json',
'Content-Type': 'application/json',
},
diff --git a/app/actions/summary.js b/app/actions/summary.js
index fdba9e1..b90689b 100644
--- a/app/actions/summary.js
+++ b/app/actions/summary.js
@@ -1,7 +1,28 @@
-import { SUMMARY_HOME } from '../lib/constants';
+import { SUMMARY_HOME , SUMMARY_TEST , SUMMARY_QUIZ } from '../lib/constants';
//================================ API FETCH ===================================
+export function getSummaryRecord(type, topicId, categoryId, studyId){
+ return (dispatch) => {
+ fetch('https://e-learning-backend.herokuapp.com/api/v1/lastReview?type=' + type + '&topicId=' + topicId + '&categoryId='+ categoryId +'&studyId='+ studyId,{
+ method: 'GET',
+ headers: {
+ 'Authorization' : 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7InVzZXJJZCI6IjViMGI0ZWYzMjMwZjJmMjMyNjI3NjI4YSIsInJvbGUiOiJVU0VSIn0sImlhdCI6MTUyNzcyNjMwNywiZXhwIjoxNjg1NDI2MzA3fQ.jRQSMxc1AezfuTUFoHitSjQ74sDzUngArzQr8yTlhDM',
+ 'Accept': 'application/json',
+ 'Content-Type': 'application/json',
+ },
+ }).then(data => data.json())
+ .then(json => {
+ if(type == 'QUIZ'){
+ dispatch(summaryRecordQuizDispatch(json, type))
+ }else{
+ dispatch(summaryRecordTestDispatch(json, type))
+ }
+ })
+ .catch(err => dispatch(failedSummary(err)))
+ };
+}
+
export function getHomeSummary(studentID){
return (dispatch) => {
fetch('http://www.mocky.io/v2/5b06d14d2f00002b00c61f1b')
@@ -15,10 +36,26 @@ export function getHomeSummary(studentID){
// ===================================== ACTION SENDING DATA TO REDUCER =================================================
export function setHomeSummary(homeData){
- console.log(homeData);
return {
type: SUMMARY_HOME,
data : homeData.data,
}
-}
\ No newline at end of file
+}
+export function summaryRecordTestDispatch(data, type){
+ return {
+ type: SUMMARY_TEST,
+ data : data.data,
+ }
+
+}
+export function summaryRecordQuizDispatch(data, type){
+ return {
+ type: SUMMARY_QUIZ,
+ data : data.data,
+ }
+
+
+}
+export function failedSummary(err){
+}
diff --git a/app/actions/user.js b/app/actions/user.js
index 9d5cdb7..fe40cca 100644
--- a/app/actions/user.js
+++ b/app/actions/user.js
@@ -1,21 +1,38 @@
-import {FETCH_USER , FETCH_USER_SUCCESS , FETCH_USER_FAILED, USER_REMOVE } from '../lib/constants';
+import {FETCH_USER , FETCH_USER_SUCCESS , FETCH_USER_FAILED, USER_REMOVE} from '../lib/constants';
+import { USER_LOGIN_SUCCESS, USER_LOGIN_FAILED, USER_UPDATE_SUCCESS} from '../lib/constants';
+import { AsyncStorage } from 'react-native';
+
+saveJWT = async (token) => {
+ try {
+ await AsyncStorage.setItem('jwtToken', token);
+ } catch (error) {
+ console.log("Error saving data" + error);
+ }
+}
+
+getJWT = async (callback) => {
+ const value = await AsyncStorage.getItem('jwtToken').then( data => {
+ callback(data);
+ });
+}
//================================ API FETCH ===================================
export function createUser(userValue){
- return (dispatch) => {
- fetch('http://www.mocky.io/v2/5af163c63100002a0096c946',{
- method: 'POST',
- headers: {
- 'Accept': 'application/json',
- 'Content-Type': 'application/json',
- },
- body: JSON.stringify(userValue)
- }).then(data => data.json())
- .then(json => {
- dispatch(fetchDataSuccess(userValue));
- })
- .catch(err => dispatch(fetchDataFailed(err)))
- };
+ return (dispatch) => {
+ // fetch('http://www.mocky.io/v2/5af163c63100002a0096c946',{
+ fetch('http://www.mocky.io/v2/5b0c41a53300002600b3ffae',{
+ method: 'POST',
+ headers: {
+ 'Accept': 'application/json',
+ 'Content-Type': 'application/json',
+ },
+ body: JSON.stringify(userValue)
+ }).then(data => data.json())
+ .then(json => {
+ dispatch(fetchDataSuccess(json));
+ })
+ .catch(err => dispatch(fetchDataFailed(err)))
+ };
}
export function updateUser(userValue){
@@ -27,7 +44,8 @@ export function updateUser(userValue){
'Content-Type': 'application/json',
},
body: JSON.stringify(userValue)
- }).then(data => data.json())
+ })
+ .then(data => data.json())
.then(json => {
dispatch(fetchDataSuccess(json));
})
@@ -35,6 +53,29 @@ export function updateUser(userValue){
};
}
+export function login(userValue,callback){
+ return (dispatch) => {
+ fetch('https://e-learning-backend.herokuapp.com/api/v1/login',{
+ method: 'POST',
+ headers: {
+ 'Accept': 'application/json',
+ 'Content-Type': 'application/json',
+ },
+ body: JSON.stringify(userValue)
+ }).then(data => {
+ saveJWT(data.headers.map.authorization[0]);
+ data.json()
+ .then( json =>{
+ callback(json);
+ dispatch(fetchDataSuccess(json));
+
+ }
+ )
+ })
+ .catch(err => dispatch(userLoginFailed(err)))
+ };
+}
+
export function deleteUserState(){
return (dispatch) => {
dispatch(deleteUserStateDispatch())
@@ -43,10 +84,38 @@ export function deleteUserState(){
export function updateProfile(userVal){
return (dispatch) => {
- dispatch(updateProfileDispatch(userVal))
+ dispatch(updateProfileSuccess(userVal))
};
}
+export function getUserProfile(){
+ return(dispatch) => {
+ fetch('http://www.mocky.io/v2/5b06bf5c2f0000b118c61ed7')
+ .then(data => data.json())
+ .then(json => {
+ dispatch(fetchDataSuccess(json));
+ })
+ .catch(err => dispatch(fetchDataFailed(err)))
+ };
+}
+
+export function updateUserProfile(userValue){
+ return(dispatch) => {
+ fetch('',{
+ method: 'PUT',
+ headers:{
+ 'Accept': 'application/json',
+ 'Content-Type': 'application/json',
+ },
+ body: JSON.stringify(uservalue)
+ }).then(data => data.json())
+ .then(json => {
+ dispatch(fetchDataSuccess(json));
+ })
+ .catch(err => dispatch(fetchDataFailed(err)))
+ };
+}
+
// ===================================== ACTION SENDING DATA TO REDUCER =================================================
export function fetchData() {
return {
@@ -57,10 +126,11 @@ export function fetchData() {
export function fetchDataSuccess(data) {
return {
type: FETCH_USER_SUCCESS,
- data: data
+ data: data.data
}
}
export function fetchDataFailed(error) {
+ console.log(error, 'errr');
return {
type: FETCH_USER_FAILED,
error: error
@@ -78,4 +148,33 @@ export function updateProfileDispatch(userVal) {
type: "UpdateProfile",
data: userVal,
}
+}
+
+export function userLoginSuccess(data){
+ console.log(data.success,"kimakn kau");
+ if(data.success){
+ return{
+ type: USER_LOGIN_SUCCESS,
+ data: data,
+ }
+ }else{
+ return{
+ type: USER_LOGIN_FAILED,
+ error: error,
+ }
+ }
+}
+
+export function updateProfileSuccess(userVal) {
+ return {
+ type: USER_UPDATE_SUCCESS,
+ data: userVal,
+ }
+}
+
+export function userLoginFailed(error){
+ return{
+ type: USER_LOGIN_FAILED,
+ error: error,
+ }
}
\ No newline at end of file
diff --git a/app/assets/img/topic/1.jpg b/app/assets/img/topic/1.jpg
new file mode 100644
index 0000000..e801cad
Binary files /dev/null and b/app/assets/img/topic/1.jpg differ
diff --git a/app/assets/img/topic/10.jpg b/app/assets/img/topic/10.jpg
new file mode 100644
index 0000000..85bba9c
Binary files /dev/null and b/app/assets/img/topic/10.jpg differ
diff --git a/app/assets/img/topic/11.jpg b/app/assets/img/topic/11.jpg
new file mode 100644
index 0000000..352b0da
Binary files /dev/null and b/app/assets/img/topic/11.jpg differ
diff --git a/app/assets/img/topic/12.jpg b/app/assets/img/topic/12.jpg
new file mode 100644
index 0000000..f72021b
Binary files /dev/null and b/app/assets/img/topic/12.jpg differ
diff --git a/app/assets/img/topic/14.jpg b/app/assets/img/topic/14.jpg
new file mode 100644
index 0000000..c2349a3
Binary files /dev/null and b/app/assets/img/topic/14.jpg differ
diff --git a/app/assets/img/topic/15.jpg b/app/assets/img/topic/15.jpg
new file mode 100644
index 0000000..40c7f52
Binary files /dev/null and b/app/assets/img/topic/15.jpg differ
diff --git a/app/assets/img/topic/2.jpg b/app/assets/img/topic/2.jpg
new file mode 100644
index 0000000..60398a7
Binary files /dev/null and b/app/assets/img/topic/2.jpg differ
diff --git a/app/assets/img/topic/3.jpg b/app/assets/img/topic/3.jpg
new file mode 100644
index 0000000..53c0d7a
Binary files /dev/null and b/app/assets/img/topic/3.jpg differ
diff --git a/app/assets/img/topic/4.jpg b/app/assets/img/topic/4.jpg
new file mode 100644
index 0000000..0b8f89f
Binary files /dev/null and b/app/assets/img/topic/4.jpg differ
diff --git a/app/assets/img/topic/5.jpg b/app/assets/img/topic/5.jpg
new file mode 100644
index 0000000..b1f78aa
Binary files /dev/null and b/app/assets/img/topic/5.jpg differ
diff --git a/app/assets/img/topic/6.jpg b/app/assets/img/topic/6.jpg
new file mode 100644
index 0000000..872c862
Binary files /dev/null and b/app/assets/img/topic/6.jpg differ
diff --git a/app/assets/img/topic/7.jpg b/app/assets/img/topic/7.jpg
new file mode 100644
index 0000000..57491a6
Binary files /dev/null and b/app/assets/img/topic/7.jpg differ
diff --git a/app/assets/img/topic/8.jpg b/app/assets/img/topic/8.jpg
new file mode 100644
index 0000000..2b5d551
Binary files /dev/null and b/app/assets/img/topic/8.jpg differ
diff --git a/app/assets/img/topic/9.jpg b/app/assets/img/topic/9.jpg
new file mode 100644
index 0000000..8c0421b
Binary files /dev/null and b/app/assets/img/topic/9.jpg differ
diff --git a/app/assets/img/topic/character exp dissapoint.png b/app/assets/img/topic/character exp dissapoint.png
new file mode 100644
index 0000000..ad796e4
Binary files /dev/null and b/app/assets/img/topic/character exp dissapoint.png differ
diff --git a/app/assets/img/topic/character exp happy.png b/app/assets/img/topic/character exp happy.png
new file mode 100644
index 0000000..f11c2f0
Binary files /dev/null and b/app/assets/img/topic/character exp happy.png differ
diff --git a/app/assets/img/topic/character exp normal.png b/app/assets/img/topic/character exp normal.png
new file mode 100644
index 0000000..9ee75c9
Binary files /dev/null and b/app/assets/img/topic/character exp normal.png differ
diff --git a/app/component/flashButton.js b/app/component/flashButton.js
new file mode 100644
index 0000000..4eafc29
--- /dev/null
+++ b/app/component/flashButton.js
@@ -0,0 +1,62 @@
+import React, { Component } from 'react';
+import { TouchableOpacity, View, Text, StyleSheet, Dimensions } from 'react-native';
+import PropTypes from 'prop-types';
+import { Icon } from 'react-native-elements';
+
+/**
+ Flashcard Button
+**/
+class FlashButton extends Component {
+ static propTypes = {
+ iconName: PropTypes.string,
+ textName: PropTypes.number,
+ btnType: PropTypes.string.isRequired,
+ }
+
+ _renderIconButton(){
+ return (
+ this.props.onPress()}
+ >
+
+
+ );
+ }
+
+ _renderTextButton(){
+ return (
+ this.props.onPress()}
+ >
+
+ { this.props.textName }x
+
+
+ );
+ }
+
+ render() {
+ const autoHeight = {
+ height: (Dimensions.get('window').width) * 0.2
+ }
+ let type;
+ if(this.props.btnType === 'icon') {
+ type = this._renderIconButton();
+ } else {
+ type = this._renderTextButton();
+ }
+ return (
+
+ { type }
+
+ );
+ }
+}
+
+
+export default FlashButton;
+
+const studyStyles = require('../styles/study');
\ No newline at end of file
diff --git a/app/component/responsiveText.js b/app/component/responsiveText.js
new file mode 100644
index 0000000..5bb74d0
--- /dev/null
+++ b/app/component/responsiveText.js
@@ -0,0 +1,59 @@
+import React, { Component } from 'react';
+import { View, Text, StyleSheet, } from 'react-native';
+import PropTypes from 'prop-types';
+
+/**
+ Flashcard Text
+**/
+class ResponsiveText extends Component {
+ static propTypes = {
+ content: PropTypes.string.isRequired,
+ title: PropTypes.string.isRequired,
+
+ }
+
+ constructor(props) {
+ super(props);
+ this.state = {
+ textSize: '',
+ test: 'HAHA',
+ }
+
+ if(this.props.title === 'FLASH_CARD_HIRAGANA' || this.props.title === 'FLASH_CARD_KATAKANA') {
+ this.state.test = 'HEHE';
+ this.state.textSize = 120;
+ } else {
+ this.state.test = 'HOHO';
+ this.state.textSize = 50;
+ }
+ }
+
+ render = () => {
+ const { textSize, content, test } = this.props;
+
+ return (
+
+
+ { this.props.content }
+
+
+ );
+ }
+}
+
+
+export default ResponsiveText;
+
+const studyStyles = StyleSheet.create({
+ textContent: {
+ color: 'black',
+ textAlign: 'center',
+ textAlignVertical: 'center',
+ },
+
+ box: {
+ width: '100%',
+ }
+});
\ No newline at end of file
diff --git a/app/config/MeFamilyLearn.js b/app/config/MeFamilyLearn.js
index f4acf06..a5e5eb6 100644
--- a/app/config/MeFamilyLearn.js
+++ b/app/config/MeFamilyLearn.js
@@ -1,35 +1,16 @@
-// export const mefamily = {
-// Goi:[
-// {title: 'お父さん', meaning: 'Father', detail: 'This is father', url: 'ka.mp3'},
-// {title: 'お母さん', meaning: 'Mother', detail: 'This is mother', url: 'ki.mp3'},
-// {title: 'お父さん', meaning: 'Father', detail: 'This is father', url: 'ku.mp3'},
-// ],
-
-// Bunpo: [
-// {title: 'は', meaning: 'Father', detail: 'This is father', url: 'ka.mp3'},
-// {title: 'が', meaning: 'Mother', detail: 'This is mother', url: 'ki.mp3'},
-// {title: 'を', meaning: 'Father', detail: 'This is father', url: 'ku.mp3'},
-// ],
-
-// Kanji: [
-// {title: 'お父さん', meaning: 'Father', detail: 'This is father', url: 'ka.mp3'},
-// {title: 'お母さん', meaning: 'Mother', detail: 'This is mother', url: 'ki.mp3'},
-// {title: 'お父さん', meaning: 'Father', detail: 'This is father', url: 'ku.mp3'},
-// ]};
-
export const goi = [
- {title: 'お父さん', meaning: 'Father', detail: 'This is father', url: 'ka.mp3'},
- {title: 'お母さん', meaning: 'Mother', detail: 'This is mother', url: 'ki.mp3'},
- {title: 'お母あさん', meaning: 'Grand Mother', detail: 'This is grand mother', url: 'ku.mp3'},
+ {key: 1, title: 'お父さん', meaning: 'Father', detail: 'This is father', url: 'ka.mp3'},
+ {key: 2, title: 'お母さん', meaning: 'Mother', detail: 'This is mother', url: 'ki.mp3'},
+ {key: 3, title: 'お母あさん', meaning: 'Grand Mother', detail: 'This is grand mother', url: 'ku.mp3'},
]
export const bunpo = [
- {title: 'は', meaning: 'ha', detail: 'This is ha', url: 'ka.mp3'},
- {title: 'を', meaning: 'wo', detail: 'This is wo', url: 'ki.mp3'},
- {title: 'が', meaning: 'ga', detail: 'This is ga', url: 'ku.mp3'},
+ {key: 1, title: 'は', meaning: 'ha', detail: 'This is ha', url: 'ka.mp3'},
+ {key: 2, title: 'を', meaning: 'wo', detail: 'This is wo', url: 'ki.mp3'},
+ {key: 3, title: 'が', meaning: 'ga', detail: 'This is ga', url: 'ku.mp3'},
]
export const kanji = [
- {title: '一', meaning: 'ichi', detail: 'This is ichi', url: 'ka.mp3'},
- {title: '二', meaning: 'ni', detail: 'This is ni', url: 'ki.mp3'},
- {title: '三', meaning: 'san', detail: 'This is san', url: 'ku.mp3'},
+ {key: 1, title: '一', meaning: 'ichi', detail: 'This is ichi', url: 'ka.mp3'},
+ {key: 2, title: '二', meaning: 'ni', detail: 'This is ni', url: 'ki.mp3'},
+ {key: 3, title: '三', meaning: 'san', detail: 'This is san', url: 'ku.mp3'},
]
\ No newline at end of file
diff --git a/app/config/data.js b/app/config/data.js
index 10dd22a..ef05b61 100644
--- a/app/config/data.js
+++ b/app/config/data.js
@@ -3039,4 +3039,108 @@ export const numberList = [
"audio":"ka.mp3"
},
+]
+
+export const englishLevel = [
+ {
+ "id" : 0,
+ "text" : "Choose english level"
+ },
+ {
+ "id" : 1,
+ "text" : "Beginner"
+ },
+ {
+ "id" : 2,
+ "text" : "elementary"
+ },
+ {
+ "id" : 3,
+ "text" : "Intermediate"
+ },
+ {
+ "id" : 4,
+ "text" : "Advanced"
+ },
+]
+
+export const japaneseStudyHistory =[
+ {
+ "id" : 0,
+ "text" : "Choose Japanese history"
+ },
+ {
+ "id" : 1,
+ "text" : "None"
+ },
+ {
+ "id" : 2,
+ "text" : "School"
+ },
+ {
+ "id" : 3,
+ "text" : "University"
+ },
+ {
+ "id" : 3,
+ "text" : "Myself"
+ },
+ {
+ "id" : 4,
+ "text" : "Other"
+ }
+]
+
+export const latestEducation =[
+ {
+ "id" : 0,
+ "text" : "Choose latest education"
+ },
+ {
+ "id" : 1,
+ "text" : "Primary School"
+ },
+ {
+ "id" : 2,
+ "text" : "Junior High School"
+ },
+ {
+ "id" : 3,
+ "text" : "Senior High School"
+ },
+ {
+ "id" : 4,
+ "text" : "University"
+ }
+]
+
+export const studyDays =[
+ {
+ "id" : 1,
+ "text" : "Monday"
+ },
+ {
+ "id" : 2,
+ "text" : "Tuesday"
+ },
+ {
+ "id" : 3,
+ "text" : "Wednesday"
+ },
+ {
+ "id" : 4,
+ "text" : "Thursday"
+ },
+ {
+ "id" : 5,
+ "text" : "Friday"
+ },
+ {
+ "id" : 6,
+ "text" : "Saturday"
+ },
+ {
+ "id" : 7,
+ "text" : "Sunday"
+ }
]
\ No newline at end of file
diff --git a/app/config/flash.js b/app/config/flash.js
index 2f38f8d..c5e7239 100644
--- a/app/config/flash.js
+++ b/app/config/flash.js
@@ -1814,7 +1814,1206 @@ export const flashData = [
"moji":"さようなら",
"url":"ka.mp3"
},
+ ],
+ TOPIC1_TITLE_and_vocabulary : [
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Kazoku",
+ "moji" : "かぞく",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Okaasan",
+ "moji" : "おかあさん",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Otousan",
+ "moji" : "おとうさん",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Oniisan",
+ "moji" : "おにいさん",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Oneesan",
+ "moji" : "おねえさん",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Imouto",
+ "moji" : "いもうと",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Otouto",
+ "moji" : "おとうと",
+ "url" : ""
+ },
+ ],
+ TOPIC1_TITLE_and_grammar : [
+ {
+ "id" : "1g_a",
+ "type" : "grammar",
+ "romaji": "Desu",
+ "moji" : "です",
+ "url" : ""
+ },
+ {
+ "id" : "1g_a",
+ "type" : "grammar",
+ "romaji": "Imasu",
+ "moji" : "います",
+ "url" : ""
+ },
+ {
+ "id" : "1g_a",
+ "type" : "grammar",
+ "romaji": "No",
+ "moji" : "の",
+ "url" : ""
+ },
+ {
+ "id" : "1g_a",
+ "type" : "grammar",
+ "romaji": "Ha",
+ "moji" : "は",
+ "url" : ""
+ },
+ ],
+ TOPIC1_TITLE_and_kanji : [
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Family",
+ "moji" : "家族",
+ "url" : ""
+ },
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "haha",
+ "moji" : "母",
+ "url" : ""
+ },
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Father",
+ "moji" : "父",
+ "url" : ""
+ },
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Older Brother",
+ "moji" : "兄",
+ "url" : ""
+ },
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Older Sister",
+ "moji" : "姉",
+ "url" : ""
+ },
+ ],
+ TOPIC2_TITLE_and_vocabulary : [
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "House",
+ "moji" : "いえ",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Room",
+ "moji" : "へや",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Bedroom",
+ "moji" : "しんしつ",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Living Room",
+ "moji" : "いま",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Kitchen",
+ "moji" : "だいどころ",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Garage",
+ "moji" : "しゃこ",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Cabinet",
+ "moji" : "とだな",
+ "url" : ""
+ },
+ ],
+ TOPIC2_TITLE_and_grammar : [
+ {
+ "id" : "1g_a",
+ "type" : "grammar",
+ "romaji": "Done in the same way as A",
+ "moji" : "A のように",
+ "url" : ""
+ },
+ {
+ "id" : "1g_a",
+ "type" : "grammar",
+ "romaji": "a B like/similar to A",
+ "moji" : "A のような B",
+ "url" : ""
+ },
+ ],
+ TOPIC2_TITLE_and_kanji : [
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "House",
+ "moji" : "家",
+ "url" : ""
+ },
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Room",
+ "moji" : "部屋",
+ "url" : ""
+ },
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Bedroom",
+ "moji" : "寝室",
+ "url" : ""
+ },
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Living Room",
+ "moji" : "居間",
+ "url" : ""
+ },
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Kitchen",
+ "moji" : "台所",
+ "url" : ""
+ },
+ ],
+ TOPIC3_TITLE_and_vocabulary : [
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Exercise",
+ "moji" : "うんどう",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Physical Education",
+ "moji" : "たいいく",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Baseball",
+ "moji" : "やきゅう",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Sumo Wrestling",
+ "moji" : "すもう",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Judo",
+ "moji" : "じゅうどう",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Kendo",
+ "moji" : "けんどう",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Aikido",
+ "moji" : "あいきどう",
+ "url" : ""
+ },
+ ],
+ TOPIC3_TITLE_and_grammar : [
+ {
+ "id" : "1g_a",
+ "type" : "grammar",
+ "romaji": "I'm playing A",
+ "moji" : "Aをします",
+ "url" : ""
+ },
+ ],
+ TOPIC3_TITLE_and_kanji : [
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Exercise/Sport",
+ "moji" : "運動",
+ "url" : ""
+ },
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Physical Education",
+ "moji" : "体育",
+ "url" : ""
+ },
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Baseball",
+ "moji" : "野球",
+ "url" : ""
+ },
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Sumo Wrestling",
+ "moji" : "相撲",
+ "url" : ""
+ },
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Judo",
+ "moji" : "柔道",
+ "url" : ""
+ },
+ ],
+
+ TOPIC4_TITLE_and_vocabulary : [
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Morning",
+ "moji" : "あさ",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Morning",
+ "moji" : "あさごはん",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Yen",
+ "moji" : "えん",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Ah!",
+ "moji" : "ああ",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "To meet",
+ "moji" : "あう",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Blue",
+ "moji" : "あおい",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Red",
+ "moji" : "あかい",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Light; Bright",
+ "moji" : "あかるい",
+ "url" : ""
+ },
+
+ ],
+ TOPIC4_TITLE_and_grammar : [
+ {
+ "id" : "1g_a",
+ "type" : "grammar",
+ "romaji": "A is B",
+ "moji" : "AはBです",
+ "url" : ""
+ },
+
+ ],
+ TOPIC4_TITLE_and_kanji : [
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Meet",
+ "moji" : "会",
+ "url" : ""
+ },
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Blue",
+ "moji" : "青",
+ "url" : ""
+ },
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Red",
+ "moji" : "赤",
+ "url" : ""
+ },
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Autumn; Fall",
+ "moji" : "秋",
+ "url" : ""
+ },
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Morning",
+ "moji" : "朝",
+ "url" : ""
+ },
+ ],
+ TOPIC5_TITLE_and_vocabulary : [
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Occupation",
+ "moji" : "しょくぎょう",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Doctor",
+ "moji" : "いしゃ",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Female Nurse",
+ "moji" : "かんごふ",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Nurse",
+ "moji" : "かんごし",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Dentist",
+ "moji" : "しかい",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Scientist",
+ "moji" : "かがくしゃ",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Hairdresser",
+ "moji" : "びようし",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Teacher",
+ "moji" : "きょうし",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Teacher",
+ "moji" : "せんせい",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Singer",
+ "moji" : "かしゅ",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Chauffeur",
+ "moji" : "うんてんしゅ",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Baseball Player",
+ "moji" : "やきゅうせんしゅ",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Painter/Artist",
+ "moji" : "がか",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Artist",
+ "moji" : "げいじゅつか",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Photographer",
+ "moji" : "しゃしんか",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Author/Writer",
+ "moji" : "さっか",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Speaker/Orator",
+ "moji" : "えんぜつか",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Performing Musician",
+ "moji" : "えんそうか",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Producer/Director",
+ "moji" : "えんしゅつか",
+ "url" : ""
+ },
+ ],
+ TOPIC5_TITLE_and_grammar : [
+ {
+ "id" : "1g_a",
+ "type" : "grammar",
+ "romaji": "to be",
+ "moji" : "だ・です",
+ "url" : ""
+ },
+ {
+ "id" : "1g_a",
+ "type" : "grammar",
+ "romaji": "Used to be (past)",
+ "moji" : "だった・でした",
+ "url" : ""
+ },
+
+ ],
+ TOPIC5_TITLE_and_kanji : [
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Occupation",
+ "moji" : "職業",
+ "url" : ""
+ },
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Doctor",
+ "moji" : "医者",
+ "url" : ""
+ },
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Female Nurse",
+ "moji" : "看護婦",
+ "url" : ""
+ },
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Nurse",
+ "moji" : "看護師",
+ "url" : ""
+ },
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Dentist",
+ "moji" : "歯科医",
+ "url" : ""
+ },
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Scientist",
+ "moji" : "科学者",
+ "url" : ""
+ },
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Hairdresser / Beauty Artist",
+ "moji" : "美容師",
+ "url" : ""
+ },
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Teacher",
+ "moji" : "教師",
+ "url" : ""
+ },
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Teacher",
+ "moji" : "先生",
+ "url" : ""
+ },
+ ],
+ TOPIC6_TITLE_and_vocabulary : [
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Travel / Trip / Journey",
+ "moji" : "たび",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Travel / Trip / Tour",
+ "moji" : "りょこう",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Group Tou",
+ "moji" : "だんたいりょこう",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Personal Tour",
+ "moji" : "こじんりょこう",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Package Tour",
+ "moji" : "パックりょこう",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Day Trip",
+ "moji" : "ひがえりりょこう",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Sightseeing Tour",
+ "moji" : "かんこうりょこう",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Overseas Travel / Traveling Abroad",
+ "moji" : "かいがいりょこう",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Foreign Travel / Oversea Trip",
+ "moji" : "がいこくりょこう",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Observation Tour",
+ "moji" : "けんがくりょこう",
+ "url" : ""
+ },
+
+ ],
+ TOPIC6_TITLE_and_grammar : [
+ {
+ "id" : "1g_a",
+ "type" : "grammar",
+ "romaji": "only; just; as much as",
+ "moji" : "だけ",
+ "url" : ""
+ },
+
+ ],
+ TOPIC6_TITLE_and_kanji : [
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Travel / Trip / Journey",
+ "moji" : "旅",
+ "url" : ""
+ },
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Travel / Trip / Tour",
+ "moji" : "旅行",
+ "url" : ""
+ },
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Group Tour",
+ "moji" : "団体旅行",
+ "url" : ""
+ },
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Personal Tour",
+ "moji" : "個人旅行",
+ "url" : ""
+ },
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Sightseeing Tour",
+ "moji" : "観光旅行",
+ "url" : ""
+ },
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Overseas Travel / Traveling Abroad",
+ "moji" : "海外旅行",
+ "url" : ""
+ },
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Foreign Travel / Oversea Trip",
+ "moji" : "外国旅行",
+ "url" : ""
+ },
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Observation Tour",
+ "moji" : "見学旅行",
+ "url" : ""
+ },
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "School Excursion / School Trip",
+ "moji" : "修学旅行",
+ "url" : ""
+ },
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Honeymoon",
+ "moji" : "新婚旅行",
+ "url" : ""
+ },
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Scientific Expedition",
+ "moji" : "研究旅行",
+ "url" : ""
+ },
+
+ ],
+ TOPIC7_TITLE_and_vocabulary : [
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Don’t look too good",
+ "moji" : "顔色が悪い",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "To catch a cold",
+ "moji" : "風邪をひく",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "To not feel good",
+ "moji" : "気持ち悪い",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Sick",
+ "moji" : "びょうき",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Heavy",
+ "moji" : "おもい",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Mental illness",
+ "moji" : "せいしんびょうき",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Body condition",
+ "moji" : "たいちょう",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Condition",
+ "moji" : "ぐあい",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Sympyom(s) of an illness",
+ "moji" : "しょうじょう",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Diarrhea",
+ "moji" : "げり",
+ "url" : ""
+ }
+ ],
+ TOPIC7_TITLE_and_grammar : [
+ {
+ "id" : "1g_a",
+ "type" : "grammar",
+ "romaji": "There is; is (living things)",
+ "moji" : "がいる",
+ "url" : ""
+ },
+ {
+ "id" : "1g_a",
+ "type" : "grammar",
+ "romaji": "There is; is (non-living things)",
+ "moji" : "がある",
+ "url" : ""
+ },
- ]
+ ],
+ TOPIC7_TITLE_and_kanji : [
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Sick",
+ "moji" : "病気",
+ "url" : ""
+ },
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Heavy",
+ "moji" : "重",
+ "url" : ""
+ },
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Mental illness",
+ "moji" : "精神病気",
+ "url" : ""
+ },
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Body condition",
+ "moji" : "体調",
+ "url" : ""
+ },
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Condition",
+ "moji" : "具合",
+ "url" : ""
+ },
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Sympyom(s)",
+ "moji" : "症状",
+ "url" : ""
+ },
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Diarrhea",
+ "moji" : "下痢",
+ "url" : ""
+ },
+ ],
+ TOPIC8_TITLE_and_vocabulary : [
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Shop / Store",
+ "moji" : "みせ",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Shop / Store",
+ "moji" : "しょうてん",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Long-established Shop",
+ "moji" : "しにせ",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Beauty Salon / Hairdresser's Salon",
+ "moji" : "びよういん",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Hair Salon",
+ "moji" : "りようしつ",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Barbershop / Barber",
+ "moji" : "とこや",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Barbershop",
+ "moji" : "りはつてん",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Stationery Shop / Stationer",
+ "moji" : "ぶんぼうぐてん",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Department Store",
+ "moji" : "ひゃっかてん",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Department Store",
+ "moji" : "デパート",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Supermarket",
+ "moji" : "スーパー",
+ "url" : ""
+ },
+ {
+ "id" : "1v_a",
+ "type" : "vocab",
+ "romaji": "Greengrocer / Vegetable Shop",
+ "moji" : "やおや",
+ "url" : ""
+ },
+
+
+ ],
+ TOPIC8_TITLE_and_grammar : [
+ {
+ "id" : "1g_a",
+ "type" : "grammar",
+ "romaji": "Plan to ~; intend to",
+ "moji" : "つもり",
+ "url" : ""
+ },
+ {
+ "id" : "1g_a",
+ "type" : "grammar",
+ "romaji": "Please do",
+ "moji" : "てください",
+ "url" : ""
+ },
+ {
+ "id" : "1g_a",
+ "type" : "grammar",
+ "romaji": "Ongoing action or current state",
+ "moji" : "ている",
+ "url" : ""
+ },
+ {
+ "id" : "1g_a",
+ "type" : "grammar",
+ "romaji": "Is/has been done",
+ "moji" : "てある",
+ "url" : ""
+ },
+ {
+ "id" : "1g_a",
+ "type" : "grammar",
+ "romaji": "Want to do something",
+ "moji" : "たい",
+ "url" : ""
+ },
+ {
+ "id" : "1g_a",
+ "type" : "grammar",
+ "romaji": "Please don't do",
+ "moji" : "ないでください",
+ "url" : ""
+ },
+ {
+ "id" : "1g_a",
+ "type" : "grammar",
+ "romaji": "Because; since; from",
+ "moji" : "から",
+ "url" : ""
+ },
+ {
+ "id" : "1g_a",
+ "type" : "grammar",
+ "romaji": "To not be (am not; is not; are not)",
+ "moji" : "じゃない・ではない",
+ "url" : ""
+ },
+ {
+ "id" : "1g_a",
+ "type" : "grammar",
+ "romaji": "De",
+ "moji" : "で",
+ "url" : ""
+ },
+
+ ],
+ TOPIC8_TITLE_and_kanji : [
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Shop / Store",
+ "moji" : "店",
+ "url" : ""
+ },
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Shop / Store",
+ "moji" : "商店",
+ "url" : ""
+ },
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Long-established Shop",
+ "moji" : "老舗",
+ "url" : ""
+ },
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Hair Salon",
+ "moji" : "理容室",
+ "url" : ""
+ },
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Stationery Shop / Stationer",
+ "moji" : "文房具店",
+ "url" : ""
+ },
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Department Store",
+ "moji" : "百貨店",
+ "url" : ""
+ },
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Greengrocer / Vegetable Shop",
+ "moji" : "八百屋",
+ "url" : ""
+ },
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Grocery Store",
+ "moji" : "乾物屋",
+ "url" : ""
+ },
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Butcher / Meat Shop",
+ "moji" : "肉屋",
+ "url" : ""
+ },
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Fish Dealer / Fishmonger",
+ "moji" : "魚屋",
+ "url" : ""
+ },
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Liquor Store",
+ "moji" : "酒屋",
+ "url" : ""
+ },
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Japanese-style Bar",
+ "moji" : "居酒屋",
+ "url" : ""
+ },
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Florist",
+ "moji" : "花屋",
+ "url" : ""
+ },
+ {
+ "id" : "1k_a",
+ "type" : "kanji",
+ "romaji": "Bookstore / Bookshop",
+ "moji" : "本屋",
+ "url" : ""
+ },
+ ],
}
]
\ No newline at end of file
diff --git a/app/config/image_list.js b/app/config/image_list.js
index 7dbf3e6..39af1f7 100644
--- a/app/config/image_list.js
+++ b/app/config/image_list.js
@@ -18,5 +18,21 @@ export const ImageData = {
HL2 : require('../assets/img/HL2.png'),
HomeImg : require('../assets/img/imgHome.png'),
//topic Img
+ T001 : require('../assets/img/topic/1.jpg'),
+ T002 : require('../assets/img/topic/2.jpg'),
+ T003 : require('../assets/img/topic/3.jpg'),
+ T004 : require('../assets/img/topic/4.jpg'),
+ T005 : require('../assets/img/topic/5.jpg'),
+ T006 : require('../assets/img/topic/6.jpg'),
+ T007 : require('../assets/img/topic/7.jpg'),
+ T008 : require('../assets/img/topic/8.jpg'),
+ T009 : require('../assets/img/topic/9.jpg'),
+ T010 : require('../assets/img/topic/10.jpg'),
+ T011 : require('../assets/img/topic/11.jpg'),
+ T012 : require('../assets/img/topic/12.jpg'),
+
+ T014 : require('../assets/img/topic/14.jpg'),
+ T015 : require('../assets/img/topic/15.jpg'),
+
}
\ No newline at end of file
diff --git a/app/config/localization.js b/app/config/localization.js
index d041823..c882004 100644
--- a/app/config/localization.js
+++ b/app/config/localization.js
@@ -6,7 +6,7 @@ import LocalizedStrings from 'react-native-localization';
export let strings = new LocalizedStrings({
en:{
- loginGuest: "Create Guest Account",
+ loginGuest: "Login",
vocabulary : "Vocabulary",
grammar : "Grammar",
kanji : "Kanji",
diff --git a/app/config/router.js b/app/config/router.js
index 337ba40..67c5f54 100644
--- a/app/config/router.js
+++ b/app/config/router.js
@@ -10,6 +10,9 @@ import LoginScreen from '../screens/Login/login';
import NameScreen from '../screens/Login/namein';
import TimeScreen from '../screens/Login/timein';
import ConfirmationScreen from '../screens/Login/confirmation';
+
+import UsernameScreen from '../screens/Login/username';
+import UserDataScreen from '../screens/Login/userData';
//import study screen
import StudyListScreen from '../screens/Study/studyList';
import TopicListScreen from '../screens/Study/topiclist';
@@ -31,6 +34,8 @@ import StudySummaryScreen from '../screens/Summary/studySummary';
import QuizFlashScreen from '../screens/Quiz/quizFlash';
//import setting data
import SettingScreen from '../screens/Setting/setting';
+//import profile screen
+import ProfileScreen from '../screens/Profile/profile';
//import testing redux
import StudyReduxScreen from '../screens/studyRedux';
//import learn lh1 screen
@@ -40,6 +45,7 @@ import KatakanaLearnScreen from '../screens/Learn/katakanalearn';
//summary
import SummaryTopicList from '../screens/Summary/studyPick';
import SummaryLearnDetail from '../screens/Summary/summaryLearn';
+import reviewScreen from '../screens/Summary/reviewSummary';
const styles = require('../styles/style');
@@ -74,6 +80,7 @@ const StudyStack = StackNavigator({
HiraganaFlash: HiraganaFlashcardScreen ,
LearnHL1: LearnHL1Screen,
summaryLearnData : SummaryLearnDetail,
+ reviewScreen : reviewScreen,
});
const SummaryStack = StackNavigator({
@@ -87,6 +94,9 @@ const SettingStack = StackNavigator({
SettingList: SettingScreen
});
+const ProfileStack = StackNavigator({
+ ProfileMain: ProfileScreen
+});
// const QuizHiraganaListStack = StackNavigator({
// QuizHiraganaList: QuizHiraganaListScreen
// })
@@ -119,14 +129,22 @@ export const AppStack = TabNavigator({
}
}
},
- Setting: {
- screen: SettingStack,
+ Profile: {
+ screen: ProfileStack,
navigationOptions: {
tabBarLabel: () => {
return ;
}
}
- }
+ },
+ // Setting: {
+ // screen: SettingStack,
+ // navigationOptions: {
+ // tabBarLabel: () => {
+ // return ;
+ // }
+ // }
+ // }
}, {
tabBarPosition: 'bottom',
tabBarOptions:{
@@ -150,7 +168,9 @@ export const AuthStack = StackNavigator(
LoginSr: LoginScreen,
NameIn: NameScreen,
TimeIn: TimeScreen,
- Confirmation: ConfirmationScreen
+ Confirmation: ConfirmationScreen,
+ Username : UsernameScreen,
+ UserData : UserDataScreen,
});
export const HiraganaLearnStack = TabNavigator({
diff --git a/app/config/studyList.js b/app/config/studyList.js
index a622be3..4d4f317 100644
--- a/app/config/studyList.js
+++ b/app/config/studyList.js
@@ -1,6 +1,6 @@
export const StudyList = [{
title : 'HIRAGANA_TITLE',
- img : 'class',
+ img : 'T001',
lock : false,
type : 'INITIAL',
topic_id: 'T001',
@@ -12,7 +12,7 @@ export const StudyList = [{
},
{
title : 'NUMBER_TITLE',
- img : 'number_chara',
+ img : 'T002',
lock : false,
type : 'INITIAL',
topic_id: 'T002',
@@ -25,7 +25,7 @@ export const StudyList = [{
},
{
title : 'GREETING_TITLE',
- img : 'loading',
+ img : 'T003',
lock : false,
type : 'INITIAL',
topic_id: 'T003',
@@ -38,7 +38,7 @@ export const StudyList = [{
},
{
title : 'TOPIC1_TITLE',
- img : 'me_family',
+ img : 'T004',
lock : false,
type : 'TOPIC',
topic_id: 'T004',
@@ -65,55 +65,55 @@ export const StudyList = [{
},
{
title : 'TOPIC2_TITLE',
- img : 'loading',
+ img : 'T005',
lock : false,
type : 'Topic',
topic_id: 'T005'
},
{
title : 'TOPIC3_TITLE',
- img : 'loading',
- lock : true,
+ img : 'T006',
+ lock : false,
type : 'TOPIC',
topic_id: 'T006'
},{
title : 'TOPIC4_TITLE',
- img : 'loading',
- lock : true,
+ img : 'T007',
+ lock : false,
type : 'TOPIC',
topic_id: 'T007'
},
{
title : 'TOPIC5_TITLE',
- img : 'office',
- lock : true,
+ img : 'T008',
+ lock : false,
type : 'TOPIC',
topic_id: 'T008'
},
{
title : 'TOPIC6_TITLE',
- img : 'travel',
+ img : 'T009',
lock : true,
type : 'TOPIC',
topic_id: 'T009'
},
{
title : 'TOPIC7_TITLE',
- img : 'health',
+ img : 'T010',
lock : true,
type : 'TOPIC',
topic_id: 'T010'
},
{
title : 'TOPIC8_TITLE',
- img : 'market',
+ img : 'T011',
lock : true,
type : 'TOPIC',
topic_id: 'T011'
},
{
title : 'TOPIC9_TITLE',
- img : 'ramen_shop',
+ img : 'T012',
lock : true,
type : 'TOPIC',
topic_id: 'T012'
@@ -127,14 +127,14 @@ export const StudyList = [{
},
{
title : 'TOPIC11_TITLE',
- img : 'loading',
+ img : 'T014',
lock : true,
type : 'TOPIC',
topic_id: 'T014'
},
{
title : 'TOPIC12_TITLE',
- img : 'loading',
+ img : 'T015',
lock : true,
type : 'TOPIC',
topic_id: 'T015'
@@ -217,71 +217,250 @@ export const StudyList = [{
title : 'GOI_LIST',
type : 'GL1',
study : '4',
- datatopic : 'Goi',
- config : 'mefamily'
},{
title : 'FLASH_CARD',
type : 'GL3',
study : '4'
- },
-],
-TOPIC1_TITLE_and_grammar : [{
- title : 'BUNPO_LIST',
- type : 'BL1',
- study : '4',
- datatopic : 'Bunpo',
- config : 'mefamily'
-},{
- title : 'FLASH_CARD',
- type : 'BL3',
- study : '4'
-},
-],
-TOPIC1_TITLE_and_kanji : [{
- title : 'KANJI_LIST',
- type : 'KL1',
- study : '4',
- datatopic : 'Kanji',
- config : 'mefamily'
-},{
- title : 'FLASH_CARD',
- type : 'KL3',
- study : '4'
-},
-],
-
+ },],
+ TOPIC2_TITLE_and_vocabulary : [{
+ title : 'GOI_LIST',
+ type : 'GL1',
+ study : '5',
+ },{
+ title : 'FLASH_CARD',
+ type : 'GL3',
+ study : '5'
+ },],
+ TOPIC3_TITLE_and_vocabulary : [{
+ title : 'GOI_LIST',
+ type : 'GL1',
+ study : '6',
+ },{
+ title : 'FLASH_CARD',
+ type : 'GL3',
+ study : '6'
+ },],
+ TOPIC4_TITLE_and_vocabulary : [{
+ title : 'GOI_LIST',
+ type : 'GL1',
+ study : '7',
+ },{
+ title : 'FLASH_CARD',
+ type : 'GL3',
+ study : '7'
+ },],
+ TOPIC5_TITLE_and_vocabulary : [{
+ title : 'GOI_LIST',
+ type : 'GL1',
+ study : '8',
+ },{
+ title : 'FLASH_CARD',
+ type : 'GL3',
+ study : '8'
+ },],
+ TOPIC6_TITLE_and_vocabulary : [{
+ title : 'GOI_LIST',
+ type : 'GL1',
+ study : '9',
+ },{
+ title : 'FLASH_CARD',
+ type : 'GL3',
+ study : '9'
+ },],
+ TOPIC7_TITLE_and_vocabulary : [{
+ title : 'GOI_LIST',
+ type : 'GL1',
+ study : '10',
+ },{
+ title : 'FLASH_CARD',
+ type : 'GL3',
+ study : '10'
+ },],
+ TOPIC8_TITLE_and_vocabulary : [{
+ title : 'GOI_LIST',
+ type : 'GL1',
+ study : '11',
+ },{
+ title : 'FLASH_CARD',
+ type : 'GL3',
+ study : '11'
+ },],
+ TOPIC1_TITLE_and_grammar : [{
+ title : 'BUNPO_LIST',
+ type : 'BL1',
+ study : '4',
+ },{
+ title : 'FLASH_CARD',
+ type : 'BL3',
+ study : '4'
+ },],
+ TOPIC2_TITLE_and_grammar : [{
+ title : 'BUNPO_LIST',
+ type : 'BL1',
+ study : '5',
+ },{
+ title : 'FLASH_CARD',
+ type : 'BL3',
+ study : '5'
+ },],
+ TOPIC3_TITLE_and_grammar : [{
+ title : 'BUNPO_LIST',
+ type : 'BL1',
+ study : '6',
+ },{
+ title : 'FLASH_CARD',
+ type : 'BL3',
+ study : '6'
+ },],
+ TOPIC4_TITLE_and_grammar : [{
+ title : 'BUNPO_LIST',
+ type : 'BL1',
+ study : '7',
+ },{
+ title : 'FLASH_CARD',
+ type : 'BL3',
+ study : '7'
+ },],
+ TOPIC5_TITLE_and_grammar : [{
+ title : 'BUNPO_LIST',
+ type : 'BL1',
+ study : '8',
+ },{
+ title : 'FLASH_CARD',
+ type : 'BL3',
+ study : '8'
+ },],
+ TOPIC6_TITLE_and_grammar : [{
+ title : 'BUNPO_LIST',
+ type : 'BL1',
+ study : '9',
+ },{
+ title : 'FLASH_CARD',
+ type : 'BL3',
+ study : '9'
+ },],
+ TOPIC7_TITLE_and_grammar : [{
+ title : 'BUNPO_LIST',
+ type : 'BL1',
+ study : '10',
+ },{
+ title : 'FLASH_CARD',
+ type : 'BL3',
+ study : '10'
+ },],
+ TOPIC8_TITLE_and_grammar : [{
+ title : 'BUNPO_LIST',
+ type : 'BL1',
+ study : '11',
+ },{
+ title : 'FLASH_CARD',
+ type : 'BL3',
+ study : '11'
+ },],
+ TOPIC1_TITLE_and_kanji : [{
+ title : 'KANJI_LIST',
+ type : 'KL1',
+ study : '4',
+ },{
+ title : 'FLASH_CARD',
+ type : 'KL3',
+ study : '4'
+ },],
+ TOPIC2_TITLE_and_kanji : [{
+ title : 'KANJI_LIST',
+ type : 'KL1',
+ study : '5',
+ },{
+ title : 'FLASH_CARD',
+ type : 'KL3',
+ study : '5'
+ },],
+ TOPIC3_TITLE_and_kanji : [{
+ title : 'KANJI_LIST',
+ type : 'KL1',
+ study : '6',
+ },{
+ title : 'FLASH_CARD',
+ type : 'KL3',
+ study : '6'
+ },],
+ TOPIC4_TITLE_and_kanji : [{
+ title : 'KANJI_LIST',
+ type : 'KL1',
+ study : '7',
+ },{
+ title : 'FLASH_CARD',
+ type : 'KL3',
+ study : '7'
+ },],
+ TOPIC5_TITLE_and_kanji : [{
+ title : 'KANJI_LIST',
+ type : 'KL1',
+ study : '8',
+ },{
+ title : 'FLASH_CARD',
+ type : 'KL3',
+ study : '8'
+ },],
+ TOPIC6_TITLE_and_kanji : [{
+ title : 'KANJI_LIST',
+ type : 'KL1',
+ study : '9',
+ },{
+ title : 'FLASH_CARD',
+ type : 'KL3',
+ study : '9'
+ },],
+ TOPIC7_TITLE_and_kanji : [{
+ title : 'KANJI_LIST',
+ type : 'KL1',
+ study : '10',
+ },{
+ title : 'FLASH_CARD',
+ type : 'KL3',
+ study : '10'
+ },],
+ TOPIC8_TITLE_and_kanji : [{
+ title : 'KANJI_LIST',
+ type : 'KL1',
+ study : '11',
+ },{
+ title : 'FLASH_CARD',
+ type : 'KL3',
+ study : '11'
+ },],
};
-export const QuizListData = {
- hiragana_katakana :[
- {
- title : 'HIKA_ROMA',
- type : 'moji_romaji'
- },
- {
- title : 'ROMA_HIKA',
- type : 'romaji_moji'
- },
- {
- title : 'LISTEN',
- type : 'audio_moji'
- }
- ],
- grammar :[
- {
- title : 'TRANSLATE_SENTENCE',
- type : 'english_moji',
- },{
- title : 'FLASH_CARD',
- type : 'audio_english',
- },
- {
- title : 'FILL_THE_BLANKS',
- type : 'fill',
- },
- {
- title : 'REARRANGE',
- type : 'arrange',
- }
- ],
- };
+ export const QuizListData = {
+ hiragana_katakana :[
+ {
+ title : 'HIKA_ROMA',
+ type : 'moji_romaji'
+ },
+ {
+ title : 'ROMA_HIKA',
+ type : 'romaji_moji'
+ },
+ {
+ title : 'LISTEN',
+ type : 'audio_moji'
+ }
+ ],
+ grammar :[
+ {
+ title : 'TRANSLATE_SENTENCE',
+ type : 'english_moji',
+ },{
+ title : 'FLASH_CARD',
+ type : 'audio_english',
+ },
+ {
+ title : 'FILL_THE_BLANKS',
+ type : 'fill',
+ },
+ {
+ title : 'REARRANGE',
+ type : 'arrange',
+ }
+ ],
+ };
\ No newline at end of file
diff --git a/app/img/character-exp-normal.png b/app/img/character-exp-normal.png
new file mode 100644
index 0000000..9ee75c9
Binary files /dev/null and b/app/img/character-exp-normal.png differ
diff --git a/app/lib/constants.js b/app/lib/constants.js
index ec5e996..2e5a1ac 100644
--- a/app/lib/constants.js
+++ b/app/lib/constants.js
@@ -12,7 +12,13 @@ export const START_TIME_QUIZ = 'START_TIME_QUIZ'; //import the action for start
export const END_TIME_QUIZ = 'END_TIME_QUIZ'; //import the action for start time
export const TAKE_QUIZ = 'TAKE_QUIZ'; //import the action for start time
+//action for user
+export const USER_LOGIN_SUCCESS = "USER_LOGIN_SUCCESS";
+export const USER_LOGIN_FAILED = " USER_LOGIN_FAILED";
+export const USER_UPDATE_SUCCESS = "USER_UPDATE_SUCCESS";
//summary
export const SUMMARY_HOME = 'SUMMARY_HOME'; //import the action for start time
+export const SUMMARY_TEST = 'SUMMARY_TEST'; //import the action for Summary Test
+export const SUMMARY_QUIZ = 'SUMMARY_QUIZ'; //import the action for Summary Quix
diff --git a/app/reducers/summary.js b/app/reducers/summary.js
index face049..fa7fc12 100644
--- a/app/reducers/summary.js
+++ b/app/reducers/summary.js
@@ -1,8 +1,10 @@
-import { SUMMARY_HOME } from '../lib/constants';
+import { SUMMARY_HOME , SUMMARY_TEST , SUMMARY_QUIZ } from '../lib/constants';
const initialState = {
dateFrom:'',
dateTo: '',
+ testData: [],
+ quizData: []
};
export default function userReducer (state = initialState, action) {
@@ -13,6 +15,18 @@ export default function userReducer (state = initialState, action) {
dateTo : new Date(action.data.dateTo*1000),
});
return state;
+ case SUMMARY_TEST:
+ state = Object.assign({}, state, {
+ testData: [],
+ testData : action.data,
+ });
+ return state;
+ case SUMMARY_QUIZ:
+ state = Object.assign({}, state, {
+ quizData: [],
+ quizData : action.data,
+ });
+ return state;
default:
return state;
}
diff --git a/app/reducers/user.js b/app/reducers/user.js
index 335cd60..dc4ca56 100644
--- a/app/reducers/user.js
+++ b/app/reducers/user.js
@@ -1,5 +1,7 @@
import {DATA_AVAILABLE ,FETCH_USER , FETCH_USER_SUCCESS , FETCH_USER_FAILED , USER_REMOVE} from '../lib/constants';
+import{USER_LOGIN_SUCCESS, USER_LOGIN_FAILED, USER_UPDATE_SUCCESS} from '../lib/constants';
+
const initialState = {
guestID:'',
user: [],
@@ -8,6 +10,9 @@ const initialState = {
dataNew: [],
nationality: '',
school: '',
+ isLogin:false,
+ jwtToken:'',
+ userID:'',
};
export default function userReducer (state = initialState, action) {
@@ -42,7 +47,25 @@ export default function userReducer (state = initialState, action) {
nationality: action.data.nationality,
school: action.data.school
});
- return state;
+ return state;
+ //USER LOGIN
+ case USER_LOGIN_SUCCESS:
+ state = Object.assign({}, state, {
+ isLogin : true
+ });
+ console.log(isLogin,"test login")
+ return state;
+ case USER_LOGIN_FAILED:
+ state = Object.assign({}, state, {
+ isLogin : false
+ });
+ console.log(isLogin,"test login failed")
+ return state;
+ case USER_UPDATE_SUCCESS:
+ state = Object.assign({}, state, {
+ user: action.data,
+ });
+ return state;
default:
return state;
}
diff --git a/app/screens/Learn/goilearn1.js b/app/screens/Learn/LearnGBK01.js
similarity index 77%
rename from app/screens/Learn/goilearn1.js
rename to app/screens/Learn/LearnGBK01.js
index 8e17b8e..37b0e49 100644
--- a/app/screens/Learn/goilearn1.js
+++ b/app/screens/Learn/LearnGBK01.js
@@ -1,6 +1,5 @@
import React, { Component } from 'react';
import {
- StyleSheet,
Text,
View,
ScrollView,
@@ -13,8 +12,7 @@ import {
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
-// import { HiraganaLearnStack } from '../../config/router';
-import { goi } from '../../config/MeFamilyLearn'
+import { goi, bunpo, kanji } from '../../config/MeFamilyLearn'
import { ImageData } from '../../config/image_list';
import { strings } from '../../config/localization';
import * as Actions from '../../actions/user'; //Import your actions
@@ -68,7 +66,9 @@ function playSound(testInfo, component) {
+ onPress={this.props.onPressButtonItem}
+ // onPress={this._setModalVisible.bin(this, true, this.props.item.title, this.props.item.meaning)}
+ />
{return playSound(this.props.item , this.props.component);}}
/>
@@ -80,7 +80,7 @@ function playSound(testInfo, component) {
}
}
- export class GoiLearn1 extends Component {
+ export class LearnGBK01Screen extends Component {
constructor(props) {
super(props);
@@ -103,12 +103,29 @@ function playSound(testInfo, component) {
detail: '',
studyType: this.props.studyType,
img: this.props.img,
- datatopic: this.props.datatopic,
+ listType: this.props.listType,
// config: this.props.config,
};
}
+
+ _getFlatListData = () => {
+ var data;
+ if(this.state.listType == 'GL1') {
+ data = goi;
+ } else if(this.state.listType == 'BL1') {
+ data = bunpo;
+ } else if(this.state.listType == 'KL1') {
+ data = kanji;
+ }else{
+ data = kanji;
+ }
+ return data;
+ }
render() {
+ var dataDisplay = this._getFlatListData();
+ console.log('dataDisplay');
+ console.log(dataDisplay);
return (
@@ -121,18 +138,25 @@ function playSound(testInfo, component) {
{
+ data={ dataDisplay }
+ keyExtractor={this._keyExtractor}
+ renderItem={({item}) => {
return(
- {this._setModalVisible(true, item.title, item.detail)}}/>
- );
+ {this._setModalVisible(!this.state.modalVisible, item.title, item.detail)}}
+ // onPressButtonItem={() => {this._setModalVisible(!this.state.modalVisible, item.title, item.detail)}}
+ />);
}}
numColumns={1}
/>
{
this._setModalVisible(!this.state.modalVisible);
}}
@@ -144,7 +168,7 @@ function playSound(testInfo, component) {
);
}
- // _keyExtractor = (item, index) => item.id;
+ _keyExtractor = (item) => item.key;
_setModalVisible = (visible, title, detail) => {
this.setState({modalVisible: visible , title: title, detail: detail});
@@ -187,5 +211,5 @@ function playSound(testInfo, component) {
}
//Connect everything
- export default connect(mapStateToProps, mapDispatchToProps)(GoiLearn1);
- // export default GoiLearn1;
\ No newline at end of file
+ export default connect(mapStateToProps, mapDispatchToProps)(LearnGBK01Screen);
+ // export default LearnGBK01Screen;
\ No newline at end of file
diff --git a/app/screens/Learn/LearnList.js b/app/screens/Learn/LearnList.js
index 7500880..ce1ac15 100644
--- a/app/screens/Learn/LearnList.js
+++ b/app/screens/Learn/LearnList.js
@@ -35,44 +35,35 @@ class LearnListScreen extends Component {
componentDidMount() {
const { navigation } = this.props;
this.setState({
+ index: navigation.getParam('index', null),
title: navigation.getParam('title', null),
type: navigation.getParam('type', null),
studyType: navigation.getParam('studyType', null),
+ categoryId: navigation.getParam('categoryId', null),
item: LearnListData[navigation.getParam('studyType', null)],
img: navigation.getParam('img', null),
});
}
navigateToPage=(item, index)=>{
+ item['index'] = this.state.index;
item['studyType'] = this.state.studyType;
item['img'] = this.state.img;
+ item['categoryId'] = this.state.categoryId;
// item['datatopic'] = this.state.datatopic;
// item['config'] = this.state.config;
console.log(item);
- if(item.type == 'Initial'){
- this.props.navigation.navigate('LearnHiraganaModule',(
- item
- ));
- }else{
- this.props.navigation.navigate('LearnHiraganaModule',(
- item
- ));
- }
+ this.props.navigation.navigate('LearnHiraganaModule',(item));
}
render() {
- console.log(this.state.title);
- console.log(this.state.type);
- console.log(this.state.item);
- console.log(this.state.studyType);
- console.log(this.state.img);
if(this.state.item){
return (
{ this.state.item.map((item, key)=>(
- {strings[item.title]}
+ {item.title}
))}
diff --git a/app/screens/Learn/LearnModule.js b/app/screens/Learn/LearnModule.js
index cc68ce1..0e0fca6 100644
--- a/app/screens/Learn/LearnModule.js
+++ b/app/screens/Learn/LearnModule.js
@@ -13,7 +13,7 @@ import {
} from 'react-native';
import { Icon } from 'react-native-elements';
import { strings } from '../../config/localization';
-import { LearnListData } from '../../config/studyList';
+import { LearnListData , StudyList} from '../../config/studyList';
import style from 'react-native-datepicker/style';
import LearningModule from '../Study/hiraganaFlashcard';
import HL2Screen from '../Learn/HL2';
@@ -22,11 +22,16 @@ import { HiraganaLearnStack } from '../../config/router';
import NumberLearnScreen from '../Learn/learnsl1';
import GreetingLearnScreen from '../Learn/learngl1';
import HL4 from '../sketch';
-import GoiLearn1 from '../Learn/goilearn1';
+//import GoiLearn1 from '../Learn/goilearn1';
+import { bindActionCreators } from 'redux';
+import { connect } from 'react-redux';
+import * as Actions from '../../actions/study'; //Import your actions
+import { studyList } from '../Study/studyList';
+import LearnGBK01Screen from '../Learn/LearnGBK01';
class LearnHiraganaModule extends Component {
- constructor() {
- super();
+ constructor(props) {
+ super(props);
this._onSetLanguageTo('en');
}
_onSetLanguageTo(value) {
@@ -37,25 +42,45 @@ class LearnHiraganaModule extends Component {
swipeEnabled: false
};
state = {
+ index: "",
title:"",
type: "",
study: "",
- studyType: ""
+ studyType: "",
+ categoryId : "",
+ reduxData : [],
}
componentDidMount() {
const { navigation } = this.props;
this.setState({
+ index: navigation.getParam('index', null),
title: navigation.getParam('title', null),
type: navigation.getParam('type', null),
study: navigation.getParam('study', null),
studyType: navigation.getParam('studyType', null),
img: navigation.getParam('img', null),
- // datatopic: navigation.getParam('datatopic', null),
- // config: navigation.getParam('config', null),
- });
+ categoryId : navigation.getParam('categoryId', null),
+ startTime : ( new Date().getTime() / 1000),
+ reduxData : this.setSentParamStart(navigation.getParam('index', null), navigation.getParam('categoryId', null), navigation.getParam('type', null))
+ });
+ }
+
+ setSentParamStart = (index, categoryId, type ) =>{
+ var startTime = ( new Date().getTime() / 1000);
+ var value = {
+ type : "LEARN",
+ topicId : StudyList[index].topic_id,
+ startTime : startTime,
+ categoryId : StudyList[index].topic_id + categoryId,
+ studyId : StudyList[index].topic_id + categoryId + type
+ }
+
+ return value;
}
componentWillUnmount(){
- console.log("redux send quiz");
+ var data = this.state.reduxData;
+ data['finishTime'] = ( new Date().getTime() / 1000);
+ this.props.endLearn(data);
}
goBack = () => {
this.navigation.navigate('LearnListScreen');
@@ -90,11 +115,11 @@ class LearnHiraganaModule extends Component {
}else if(this.state.type == 'HL3' || this.state.type == 'GL3' || this.state.type == 'KL3' || this.state.type == 'BL3' ){
if(this.state.title == "FLASH_CARD_HIRAGANA" || this.state.title == 'FLASH_CARD_KATAKANA'){
return (
-
+
);
}else{
return (
-
+
);
}
@@ -102,36 +127,27 @@ class LearnHiraganaModule extends Component {
return (
);
- }else if(this.state.type == 'GL1'){
- if(this.state.title == 'TOPIC1_GL1'){
+ }else
+ if(this.state.type == 'GL1'){
return (
-
);
- }
- } else if(this.state.type == 'BL1') {
- if(this.state.title == 'TOPIC1_BL1'){
+ } else
+ if(this.state.type == 'BL1') {
return (
-
);
- }
- } else if(this.state.type == 'KL1') {
- if(this.state.title == 'TOPIC1_KL1'){
+ } else
+ if(this.state.type == 'KL1') {
return (
-
);
- }
}
}else{
return (
@@ -151,4 +167,24 @@ class LearnHiraganaModule extends Component {
const styles = require('../../styles/style');
const study = require('../../styles/study');
-export default LearnHiraganaModule;
+
+// The function takes data from the app current state,
+// and insert/links it into the props of our component.
+// This function makes Redux know that this component needs to be passed a piece of the state
+function mapStateToProps(state, props) {
+ return {
+ StudentID: state.user.user.id,
+
+ }
+ }
+
+ // Doing this merges our actions into the component’s props,
+ // while wrapping them in dispatch() so that they immediately dispatch an Action.
+ // Just by doing this, we will have access to the actions defined in out actions file (action/home.js)
+ function mapDispatchToProps(dispatch) {
+ return bindActionCreators(Actions, dispatch);
+ }
+
+ //Connect everything
+ export default connect(mapStateToProps, mapDispatchToProps)(LearnHiraganaModule);
+
\ No newline at end of file
diff --git a/app/screens/Learn/learnsl1.js b/app/screens/Learn/learnsl1.js
index d47fcc4..dd16092 100644
--- a/app/screens/Learn/learnsl1.js
+++ b/app/screens/Learn/learnsl1.js
@@ -17,7 +17,8 @@ import {
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import { HiraganaLearnStack } from '../../config/router';
- import { number } from '../../config/numberlearn'
+ // import { number } from '../../config/numberlearn';
+ import { numberList } from '../../config/data';
import { ImageData } from '../../config/image_list';
import { strings } from '../../config/localization';
import * as Actions from '../../actions/user'; //Import your actions
@@ -53,25 +54,21 @@ function playSound(testInfo, component) {
// If the audio is a 'require' then the second parameter must be the callback.
if (testInfo.isRequire) {
- const sound = new Sound(testInfo.url, error => callback(error, sound));
+ const sound = new Sound(testInfo.audio, error => callback(error, sound));
} else {
- const sound = new Sound(testInfo.url, testInfo.basePath, error => callback(error, sound));
+ const sound = new Sound(testInfo.audio, testInfo.basePath, error => callback(error, sound));
}
}
class FlatListItem extends Component {
- ButtonClick = (item) => {
- Alert.alert(item);
- }
-
render(){
return(
{
return playSound(this.props.item , this.props.component);
}}>
- {this.props.item.number}
- {this.props.item.hiragana}
+ {this.props.item.kanji}
+ {this.props.item.moji}
{this.props.item.romaji}
);
@@ -80,12 +77,6 @@ function playSound(testInfo, component) {
export class NumberLearnScreen extends Component {
- // static navigationOptions = {
- // header: null,
- // title: 'LearnHL1',
- // tabBarLabel: 'Hiragana',
- // };
-
constructor(props) {
super(props);
Sound.setCategory('Playback', true); // true = mixWithOthers
@@ -106,9 +97,7 @@ function playSound(testInfo, component) {
}
componentWillMount() {
- // const { navigation } = this.props;
this.setState({
- // studyType: navigation.getParam('studyType', null),
studyType: this.props.studyType,
img: this.props.img,
});
@@ -124,13 +113,11 @@ function playSound(testInfo, component) {
{ strings[this.props.studyType] }
- {/* {this.props.title} */}
{
return(
diff --git a/app/screens/Login/confirmation.js b/app/screens/Login/confirmation.js
index 768545b..74bdbb9 100644
--- a/app/screens/Login/confirmation.js
+++ b/app/screens/Login/confirmation.js
@@ -9,6 +9,7 @@ import {
TouchableOpacity,
Text,
View,
+ ScrollView
} from 'react-native';
import { List, ListItem } from 'react-native-elements';
import Slider from 'react-native-slider';
@@ -20,44 +21,116 @@ import {
static navigationOptions = {
title: 'Create Guest Account',
};
+ state = {
+ userId:"",
+ userName : "",
+ userPass: "",
+ latestEducation : "",
+ latestEducationName : "",
+ major : "",
+ graduationDate : "",
+ englishLevel : "",
+ japaneseType : "",
+ japaneseSchoolName : "",
+ dateFrom : "",
+ dateTo : "",
+ studyDay: 1,
+ studyHours:1,
+ studyReason: "",
+ finishDate: "",
+ startDate:"",
+ }
+
+ componentDidMount() {
+ const { navigation } = this.props;
+ this.setState({
+ userId : navigation.getParam('userId', null),
+ userName : navigation.getParam('userName', null),
+ userPass : navigation.getParam('userPass',null),
+ latestEducation : navigation.getParam('latestEducation', null),
+ latestEducationName : navigation.getParam('latestEducationName', null),
+ major : navigation.getParam('major', null),
+ graduationDate : navigation.getParam('graduationDate', null),
+ englishLevel : navigation.getParam('englishLevel', null),
+ japaneseType : navigation.getParam('japaneseType', null),
+ japaneseSchoolName : navigation.getParam('japaneseSchoolName', null),
+ dateFrom : navigation.getParam('dateFrom', null),
+ dateTo : navigation.getParam('dateTo', null),
+ studyDay : navigation.getParam('studyDay', null),
+ studyHours : navigation.getParam('studyHours', null),
+ studyReason : navigation.getParam('studyReason', null),
+ finishDate : navigation.getParam('finishDate', null),
+ });
+ }
saveUserData = async () => {
- const { navigation } = this.props;
- let toUnixTimestamps = navigation.state.params.finishDate;
- toUnixTimestamps = toUnixTimestamps + " 00:00:00";
- navigation.state.params.finishDate = (new Date(toUnixTimestamps).getTime()/1000)
- var nav = navigation.state.params;
- nav['id'] = '1';
- console.log(nav);
- this.props.createUser(nav);
+ var userData = this.state;
+ var startDate = (new Date().getTime());
+ userData.graduationDate =this.unixTimeStamps(this.state.graduationDate) ;
+ userData.dateFrom = this.unixTimeStamps(this.state.dateFrom);
+ userData['dateTo'] = this.unixTimeStamps(this.state.dateTo);
+ userData['finishDate'] = this.unixTimeStamps(this.state.finishDate);
+ userData['startDate'] = this.unixTimeStamps(startDate);
+ this.props.updateProfile(userData);
+
};
+ unixTimeStamps = (date) =>{
+ let toUnixTimestamps = date;
+ toUnixTimestamps = toUnixTimestamps + " 00:00:00";
+ date = (new Date(toUnixTimestamps).getTime()/1000)
+ return date
+ }
+
+
render() {
const { navigation } = this.props;
- const userName = navigation.getParam('userName', null);
- const studyReason = navigation.getParam('studyReason', null);
- const day = navigation.getParam('day', null);
- const hours = navigation.getParam('hours', null);
- const finishDate = navigation.getParam('finishDate', null);
+ // const userName = navigation.getParam('userName', null);
+ // const userPass = navigation.getParam('userPass',null);
+ // const latestEducation = navigation.getParam('latestEducation', null);
+ // const latestEducationName = navigation.getParam('latestEducationName', null);
+ // const major = navigation.getParam('major', null);
+ // const graduationDate = navigation.getParam('graduationDate', null);
+ // const englishLevel = navigation.getParam('englishLevel', null);
+ // const japaneseType = navigation.getParam('japaneseType', null);
+ // const japaneseSchoolName = navigation.getParam('japaneseSchoolName', null);
+ // const dateFrom = navigation.getParam('dateFrom', null);
+ // const dateTo = navigation.getParam('dateTo', null);
return (
+
- Name
- {userName}
- Why you want to study japanese?
- {studyReason}
- How many times per week?
- {day}
- How many hours per day?
- {hours}
- Until when do you plan to finish your japanese studies?
- {finishDate}
-
+ Username
+ {this.state.userName}
+ Latest Education
+ {this.state.latestEducation}
+ School / University name
+ {this.state.latestEducationName}
+ Major
+ {this.state.major}
+ Graduation date
+ {this.state.graduationDate}
+ Your english level
+ {this.state.englishLevel}
+ Japanese study history
+ {this.state.japaneseType}
+ japanese school name
+ {this.state.japaneseSchoolName }
+ Date from
+ {this.state.dateFrom}
+ Date to
+ {this.state.dateTo}
+ Desired Finish Date
+ {this.state.finishDate}
+
- Done
-
+ >
+ Done
+
+
+
);
}
}
diff --git a/app/screens/Login/login.js b/app/screens/Login/login.js
index 6d58528..f25c5d4 100644
--- a/app/screens/Login/login.js
+++ b/app/screens/Login/login.js
@@ -9,6 +9,7 @@ import {
Text,
View,
TouchableOpacity,
+ Image
} from 'react-native';
import { List, ListItem } from 'react-native-elements';
import { FBLogin, FBLoginManager } from 'react-native-facebook-login';
@@ -36,68 +37,7 @@ import {
state = {
userName: "",
}
-
- // componentDidMount() {
- // GoogleSignin.hasPlayServices({ autoResolve: true }).then(() => {
- // // play services are available. can now configure library
- // })
- // .catch((err) => {
- // console.log("Play services error", err.code, err.message);
- // })
- // GoogleSignin.configure({
- // scopes: ["https://www.googleapis.com/auth/drive.readonly"], // what API you want to access on behalf of the user, default is email and profile
- // // iosClientId: , // only for iOS
- // webClientId: "108217245320-v76cn6u2ijr4k7207mkf8v0vduosd7he.apps.googleusercontent.com", // client ID of type WEB for your server (needed to verify user ID and offline access)
- // // offlineAccess: true // if you want to access Google API on behalf of the user FROM YOUR SERVER
- // // hostedDomain: '' // specifies a hosted domain restriction
- // // forceConsentPrompt: true // [Android] if you want to show the authorization prompt at each login
- // // accountName: '' // [Android] specifies an account name on the device that should be used
- // })
- // .then(() => {
- // GoogleSignin.currentUserAsync().then((user) => {
- // console.log('USER', user);
- // this.setState({user: user});
- // }).done();
- // });
- // }
-
- // _signIn(){
- // GoogleSignin.signIn()
- // .then((user) => {
- // this.setState({user: user});
- // })
- // .catch((err) => {
- // console.log('WRONG SIGNIN', err);
- // })
- // .done();
- // }
-
- // testOnPress = () => {
- // GoogleSignin.getAccessToken()
- // .then((token) => {
- // console.log(token);
- // })
- // .catch((err) => {
- // console.log(err);
- // })
- // .done();
- // }
- // _callGoogle(){
- // GoogleSignin.configure({
- // webClientId: "108217245320-v76cn6u2ijr4k7207mkf8v0vduosd7he.apps.googleusercontent.com",
- // })
- // .then(() => {
- // GoogleSignin.signIn()
- // .then((user) => {
- // alert('Hi ' +user.name+' you are succesfully login' )
- // })
- // .catch((err) => {
- // console.log('WRONG SIGNIN', err);
- // })
- // .done();
- // });
- // }
componentDidMount() {
this._setupGoogleSignin();
}
@@ -143,64 +83,24 @@ import {
var _thisProp = this.props.navigation;
return (
+
+ Welcome to
+
+ N5
+ Study
+
+
{ strings.loginGuest }
- Or Sign In With
-
-
- }
- ref={(fbLogin) => { this.fbLogin = fbLogin }}
- permissions={["email","user_friends"]}
- loginBehavior={FBLoginManager.LoginBehaviors.Native}
- onLogin={function(data){
- _this.setState({ user : data.profile });
- console.log(data.profile);
- _thisProp.navigate('NameIn',{
- fbData : data.profile,
- userName : data.profile.name,
- type : "FACEBOOK"});
- }}
- onLogout={function(){
- console.log("Logged out.");
- _this.setState({ user : null });
- }}
- onLoginFound={function(data){
- console.log("Existing login found.");
- console.log(data);
- _this.setState({ user : data.credentials });
- }}
- onLoginNotFound={function(){
- console.log("No user logged in.");
- _this.setState({ user : null });
- }}
- onError={function(data){
- console.log("ERROR");
- console.log(data);
- }}
- onCancel={function(){
- console.log("User cancelled.");
- }}
- onPermissionsMissing={function(data){
- console.log("Check permissions!");
- console.log(data);
- }}
- />
-
-
- { this.onGoogleSignInButton(); }}
- />
-
-
+
);
}
@@ -210,6 +110,10 @@ import {
type : "GUEST",
})
};
+
+ createUser = () => {
+ this.props.navigation.navigate('Username')
+ };
}
const styles = require('../../styles/style');
diff --git a/app/screens/Login/timein.js b/app/screens/Login/timein.js
index 485c103..eee3660 100644
--- a/app/screens/Login/timein.js
+++ b/app/screens/Login/timein.js
@@ -9,34 +9,66 @@ import {
TouchableOpacity,
Text,
View,
+ ScrollView,
+ Picker,
+ Alert,
+ Image
} from 'react-native';
- import { List, ListItem } from 'react-native-elements';
+ import { List, ListItem, CheckBox } from 'react-native-elements';
+ import { studyDays, studyReasonOption } from '../../config/data';
import Slider from 'react-native-slider';
import DatePicker from 'react-native-datepicker';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import * as Actions from '../../actions/user'; //Import your actions
+ import CircleCheckBox, {LABEL_POSITION} from 'react-native-circle-checkbox';
class TimeScreen extends Component {
static navigationOptions = {
- title: 'Create Guest Account',
+ title: 'Create Guest Account',
};
state = {
- day: 1,
- hours:1,
- userName: "",
- studyReason: "",
- finishDate: "2018-05-11",
- type: "",
+ userId : "",
+ userName : "",
+ userPass: "",
+ latestEducation : "",
+ latestEducationName : "",
+ major : "",
+ graduationDate : "",
+ englishLevel : "",
+ japaneseType : "",
+ japaneseSchoolName : "",
+ dateFrom : "",
+ dateTo : "",
+ studyDay: "",
+ studyHours:0.5,
+ studyReason: "Choose your Reason",
+ finishDate: "",
+ statusDays:false,
}
+ constructor(props){
+ super(props);
+ this.checkDays = [studyDays.map.length];
+ }
componentDidMount() {
const { navigation } = this.props;
+ console.log(this.props,"timein");
this.setState({
- userName: navigation.getParam('userName', null),
- studyReason: navigation.getParam('studyReason',null),
- type: navigation.getParam('type',null),
+ userId : navigation.getParam('userId', null),
+ userName : navigation.getParam('userName', null),
+ userPass : navigation.getParam('userPass',null),
+ latestEducation : navigation.getParam('latestEducation', null),
+ latestEducationName : navigation.getParam('latestEducationName', null),
+ major : navigation.getParam('major', null),
+ graduationDate : navigation.getParam('graduationDate', null),
+ englishLevel : navigation.getParam('englishLevel', null),
+ japaneseType : navigation.getParam('japaneseType', null),
+ japaneseSchoolName : navigation.getParam('japaneseSchoolName', null),
+ dateFrom : navigation.getParam('dateFrom', null),
+ dateTo : navigation.getParam('dateTo', null),
});
+ console.log(this.state.userId,"lolololo")
}
onDateChange = (date) => {
@@ -45,71 +77,148 @@ import {
});
};
- saveStudyTime = () => {
- this.props.navigation.navigate('Confirmation',(this.state));
+ updateReason = (reason) => {
+ this.setState({ studyReason: reason })
+ }
+
+ saveStudyTime = async () =>{
+ var userData = this.state;
+ userData['studyDay'] = this.combineDays();
+ // this.combineDays()
+ console.log(this.state,"mamak");
+ // if(!this.validation()){
+ // this.props.navigation.navigate('Confirmation',(this.state));
+ // }
+ this.props.navigation.navigate('Confirmation',(userData));
};
+ validation = () => {
+ const { studyReason, statusDays, finishDate} = this.state;
+ let error = '';
+ console.log(statusDays[1],"shit")
+ if (studyReason == "Choose your Reason") error = "Study reason is required";
+ else if (!statusDays[0] && !statusDays[1] && !statusDays[2] && !statusDays[3]
+ && !statusDays[4] && !statusDays[5] && !statusDays[6]) error = "You need to choose at least 1 day";
+ else if (!finishDate) error = "Desired finish date is required";
+ if (error) {
+ Alert.alert('Warning', error);
+ return true;
+ }
+ else{
+ return false;
+ }
+ }
+
+
render() {
const { navigation } = this.props;
return (
-
- Study Plan
- How many times per week?
- this.setState({day})}
- />
- {this.state.day} Days
- How many hours per day?
- this.setState({hours})}
- />
- {this.state.hours} Hours
- Until when do you plan to finish your japanese studies?
-
-
- Done
-
+
+
+
+
+ Study Plan
+ Why you want to study Japanese?
+
+ {studyReasonOption.map((item, key) => (
+
+ ))}
+
+
+ How many times per week?
+ {studyDays.map((item, key)=>(
+ this.checkDay(key)}
+ />
+ ))}
+ How many hours per day?
+
+ this.setState({studyHours})}
+ />
+ {this.state.studyHours} Hours
+ Until when do you plan to finish your japanese studies?
+
+
+ Done
+
+
+
+
+
+
+ Choose your study plan
+
+
+
);
}
+
+
+ checkDay(key) {
+ if(this.checkDays[key]==true){
+ this.checkDays[key] = false;
+ this.setState({ statusDays: this.checkDays });
+ }
+ else{
+ this.checkDays[key] = true;
+ this.setState({ statusDays: this.checkDays });
+ }
+ };
+ combineDays = () =>{
+ var test="";
+ for(x=0;x<7;x++){
+ if(this.checkDays[x] == true){
+ // test=test + studyDays[x].id+1
+ test=test+1
+ }else{
+ test=test+0
+ // test=test + studyDays[x].id+0
+ }
+ }
+ return test;
+ }
}
const styles = require('../../styles/style');
diff --git a/app/screens/Login/userData.js b/app/screens/Login/userData.js
new file mode 100644
index 0000000..25c5177
--- /dev/null
+++ b/app/screens/Login/userData.js
@@ -0,0 +1,276 @@
+import React, { Component } from 'react';
+import {
+ ActivityIndicator,
+ AsyncStorage,
+ Button,
+ StatusBar,
+ StyleSheet,
+ View,
+ AppRegistry,
+ TouchableOpacity,
+ Text,
+ TextInput,
+ Picker,
+ ScrollView,
+ Alert,
+ Image
+ } from 'react-native';
+ import { List, ListItem } from 'react-native-elements';
+ import { latestEducation, englishLevel, japaneseStudyHistory } from '../../config/data';
+ import { bindActionCreators } from 'redux';
+ import { connect } from 'react-redux';
+ import * as Actions from '../../actions/user'; //Import your actions
+ import Slider from 'react-native-slider';
+ import DatePicker from 'react-native-datepicker';
+
+ class UserDataScreen extends Component {
+ static navigationOptions = {
+ title: 'Create Guest Account',
+ };
+ state = {
+ userId : "",
+ userName: "",
+ userPass: "",
+ latestEducation : "Choose latest education",
+ latestEducationName: "",
+ major: "",
+ graduationDate: "",
+ englishLevel: "Choose english level",
+ japaneseType: "",
+ japaneseSchoolName : "",
+ dateFrom:"",
+ dateTo:""
+ }
+
+ validation () {
+ const { latestEducation, latestEducationName, major, graduationDate, englishLevel,
+ japaneseType, japaneseSchoolName, dateFrom, dateTo} = this.state;
+ let error = '';
+ console.log(latestEducation,"latest")
+ if (latestEducation == "Choose latest education") error = "Latest Education is required";
+ else if (!latestEducationName) error = "School / University name is required";
+ else if (latestEducation == "University" && !major) error = "Major is required";
+ else if (!graduationDate) error = "Graduation date is required";
+ else if (englishLevel == "Choose english level") error = "English level is required";
+ if (error) {
+ Alert.alert('Warning', error);
+ return true;
+ }
+ else{
+ return false;
+ }
+
+ }
+
+ componentDidMount() {
+
+ const { navigation } = this.props;
+ this.setState({
+ userId: navigation.getParam('userId', null),
+ userName: navigation.getParam('userName', null),
+ userPass: navigation.getParam('userPass', null),
+ });
+ }
+
+ // updateName = (name) => {
+ // this.setState({ userName: name })
+ // }
+
+ onDateChange = (date) => {
+ this.setState({
+ graduationDate: date,
+ });
+ };
+
+ dateFromChange = (date) => {
+ this.setState({
+ dateFrom: date,
+ });
+ };
+ dateToChange = (date) => {
+ this.setState({
+ dateTo: date,
+ });
+ };
+
+ updateEnglishLevel = (englishlvl) => {
+ this.setState({ englishLevel: englishlvl })
+ }
+ updateLatestEducation = (educationType) => {
+ this.setState({ latestEducation: educationType })
+ }
+ updateJapaneseType = (japaneseTypeUpdate) => {
+ this.setState({ japaneseType: japaneseTypeUpdate })
+ }
+
+ render() {
+ return (
+
+
+
+
+ Latest Education
+
+ {latestEducation.map((item, key) => (
+
+ ))}
+
+
+ School / University name
+ this.setState({latestEducationName})}
+ value={this.state.latestEducationName}
+ />
+
+ Major
+ this.setState({major})}
+ value={this.state.major}
+ />
+ Graduation date
+
+ Your english level
+
+ {englishLevel.map((item, key) => (
+
+ ))}
+
+
+ Japanese study history
+
+ {japaneseStudyHistory.map((item, key) => (
+
+ ))}
+
+
+ Japanese school name
+ this.setState({japaneseSchoolName})}
+ value={this.state.japaneseSchoolName}
+ />
+
+
+ From
+
+
+
+ To
+
+
+
+
+ Next
+
+
+
+
+
+
+ Input your latest education, english skill, and Japanese study history
+
+
+
+
+ );
+ }
+
+ timeIn = () => {
+ if(!this.validation()){
+ this.props.navigation.navigate('TimeIn',(this.state));
+ }
+ };
+
+
+
+ }
+
+ const styles = require('../../styles/style');
+ function mapStateToProps(state, props) {
+ return {
+ loading: state.user.loading,
+ data: state.user.user
+ }
+ }
+
+ function mapDispatchToProps(dispatch) {
+ return bindActionCreators(Actions, dispatch);
+ }
+
+ //Connect everything
+ export default connect(mapStateToProps, mapDispatchToProps)(UserDataScreen);
+
diff --git a/app/screens/Login/username.js b/app/screens/Login/username.js
new file mode 100644
index 0000000..9e68f70
--- /dev/null
+++ b/app/screens/Login/username.js
@@ -0,0 +1,146 @@
+import React, { Component } from 'react';
+import {
+ ActivityIndicator,
+ AsyncStorage,
+ Button,
+ StatusBar,
+ StyleSheet,
+ View,
+ AppRegistry,
+ TouchableOpacity,
+ Text,
+ TextInput,
+ Picker,
+ Alert,
+ Image
+ } from 'react-native';
+ import { List, ListItem } from 'react-native-elements';
+ import { bindActionCreators } from 'redux';
+ import { connect } from 'react-redux';
+ import * as Actions from '../../actions/user'; //Import your actions
+ import {isLogin} from '../../reducers/user';
+
+
+ class UsernameScreen extends Component {
+ static navigationOptions = {
+ title: 'Create Guest Account',
+ };
+ state = {
+ userId: "",
+ username: "",
+ password: "",
+ // userPassConfirm:"",
+ }
+
+
+ // componentDidMount() {
+ // const { navigation } = this.props;
+ // this.setState({
+ // userFB: navigation.getParam('fbData', null),
+ // userName: navigation.getParam('userName', null),
+ // type: navigation.getParam('type',null),
+ // });
+ // }
+
+ // updateName = (name) => {
+ // this.setState({ userName: name })
+ // }
+ // updateReason = (reason) => {
+ // this.setState({ studyReason: reason })
+ // }
+
+
+
+ render() {
+ return (
+
+
+ Username
+ this.setState({username})}
+ value={this.state.username}
+ />
+ Password
+ this.setState({password})}
+ value={this.state.password}
+ />
+
+ Sign In
+
+
+
+ Input your username and password
+
+
+
+ );
+ }
+
+ signIn = async () => {
+ if(!this.validation()){
+ this.props.login(this.state, data => {
+ this.setState({ userId: data.userId });
+ if(!this.checkUserValid(data)){
+ this.props.navigation.navigate('UserData',(this.state));
+ }
+ });
+ }
+
+ };
+
+
+ checkUserValid= (data) => {
+ let error = '';
+ if(data.success==false) error ="Username and password is wrong";
+ if (error) {
+ Alert.alert('Warning', error);
+ return true;
+ }
+ else{
+ return false;
+ }
+ }
+
+ validation = () => {
+ const { username, password} = this.state;
+ let error = '';
+ if (!username) error = "User name is required";
+ else if (!password) error = "Password is required";
+ // else if(data.success==false) error ="Username and password is wrong";
+ // else if (userPass.length < 6) error = "Password at least contain 6 character";
+ // else if (!userPassConfirm) error = "Confirm password is required";
+ // else if (userPass != userPassConfirm) error = "Password is not same";
+ if (error) {
+ Alert.alert('Warning', error);
+ return true;
+ }
+ else{
+ return false;
+ }
+ }
+ }
+
+ const styles = require('../../styles/style');
+ function mapStateToProps(state, props) {
+ return {
+ loading: state.user.loading,
+ data: state.user.user,
+ isLogin: state.user.isLogin,
+ userID : state.user.userID
+ }
+ }
+
+ function mapDispatchToProps(dispatch) {
+ return bindActionCreators(Actions, dispatch);
+ }
+
+ //Connect everything
+ export default connect(mapStateToProps, mapDispatchToProps)(UsernameScreen);
+
diff --git a/app/screens/Profile/profile.js b/app/screens/Profile/profile.js
new file mode 100644
index 0000000..8c3cb84
--- /dev/null
+++ b/app/screens/Profile/profile.js
@@ -0,0 +1,256 @@
+import React, { Component } from 'react';
+import {
+ ActivityIndicator,
+ AsyncStorage,
+ Button,
+ TouchableHighlight,
+ StatusBar,
+ StyleSheet,
+ Text,
+ View,
+ Image,
+ ScrollView,
+ TextInput,
+ TouchableOpacity,
+ } from 'react-native';
+import { List, ListItem } from 'react-native-elements';
+
+import PhotoUpload from 'react-native-photo-upload'
+import { bindActionCreators } from 'redux';
+import { connect } from 'react-redux';
+import * as Actions from '../../actions/user'; //Import your actions
+import FBLoginView from '../../component/fblogin';
+import { FBLogin, FBLoginManager } from 'react-native-facebook-login';
+import DatePicker from 'react-native-datepicker';
+
+ class ProfileScreen extends Component {
+ static navigationOptions = {
+ header: null,
+ title: 'Profile',
+ };
+ state = {
+ userName: "",
+ latestEducation : "",
+ latestEducationName: "",
+ major: "",
+ graduationDate: "",
+ englishLevel: "",
+ japaneseType: "",
+ japaneseSchoolName : "",
+ dateFrom:"",
+ dateTo:""
+ }
+ componentWillMount(){
+ this.getData();
+ }
+
+ componentWillUpdate(){
+ this.getData();
+ }
+
+ getData(){
+ this.props.getUserProfile()
+ if(this.props.user){
+ this.setState({
+ userName: this.props.user.username,
+ latestEducation: this.props.user.latestEducation,
+ latestEducationName: this.props.user.latestEducationName,
+ major: this.props.user.major,
+ graduationDate: this.props.user.graduationDate,
+ englishLevel: this.props.user.englishLevel,
+ japaneseType: this.props.user.japaneseType,
+ japaneseSchoolName: this.props.user.japaneseSchoolName,
+ dateFrom: this.props.user.dateFrom,
+ dateTo: this.props.user.dateTo,
+ });
+ }
+ }
+
+
+ updateUserData = async () => {
+ const { navigation } = this.props;
+ let toUnixTimestamps = navigation.state.params.finishDate;
+ toUnixTimestamps = toUnixTimestamps + " 00:00:00";
+ navigation.state.params.finishDate = (new Date(toUnixTimestamps).getTime()/1000)
+ var nav = navigation.state.params;
+ nav['id'] = '1';
+ console.log(nav);
+ this.props.updateUserProfile(nav);
+ };
+
+ _showMoreApp = async () => {
+ this.props.deleteUserState();
+ this.props.navigation.navigate('AuthLoading');
+ };
+
+ onDateChange = (date) => {
+ this.setState({
+ graduationDate: date
+ });
+ };
+
+ render() {
+ return (
+
+
+
+
+
+ {this.state.userName}
+
+
+
+ {
+ if (avatar) {
+ console.log('Image base64 string: ', avatar)
+ }
+ }}
+ >
+
+
+
+
+
+ Latest Education
+ School / University
+ this.setState({latestEducation})}
+ value={this.state.latestEducation}
+ />
+ Major
+ this.setState({major})}
+ value={this.state.major}
+ />
+ Graduation Year
+
+ English Level
+ this.setState({englishLevel})}
+ value={this.state.englishLevel}
+ />
+
+ Japanese Study History
+ {this.state.japaneseType}
+
+ this.setState({japaneseSchoolName})}
+ value={this.state.japaneseSchoolName}
+ />
+
+
+ {this.state.dateFrom} ~ {this.state.dateTo}
+
+ Account
+ Sign In :
+
+ }
+ ref={(fbLogin) => { this.fbLogin = fbLogin }}
+ permissions={["email","user_friends"]}
+ loginBehavior={FBLoginManager.LoginBehaviors.Native}
+ onLogin={function(data){
+ _this.setState({ user : data.profile });
+ console.log(data.profile);
+ _thisProp.navigate('NameIn',{
+ fbData : data.profile,
+ userName : data.profile.name,
+ type : "FACEBOOK"});
+ }}
+ onLogout={function(){
+ console.log("Logged out.");
+ _this.setState({ user : null });
+ }}
+ onLoginFound={function(data){
+ console.log("Existing login found.");
+ console.log(data);
+ _this.setState({ user : data.credentials });
+ }}
+ // onLoginNotFound={function(){
+ // console.log("No user logged in.");
+ // _this.setState({ user : null });
+ // }}
+ onError={function(data){
+ console.log("ERROR");
+ console.log(data);
+ }}
+ onCancel={function(){
+ console.log("User cancelled.");
+ }}
+ onPermissionsMissing={function(data){
+ console.log("Check permissions!");
+ console.log(data);
+ }}
+ />
+
+
+ Update
+
+
+
+ Learning Settings
+
+
+
+
+ Logout
+
+
+
+
+
+
+ );
+ }
+
+ }
+
+ const styles = require('../../styles/profileStyle');
+
+ function mapStateToProps(state, props) {
+ return {
+ user: state.user.user
+ }
+ }
+
+ function mapDispatchToProps(dispatch) {
+ return bindActionCreators(Actions, dispatch);
+ }
+
+ //Connect everything
+ export default connect(mapStateToProps, mapDispatchToProps)(ProfileScreen);
+
diff --git a/app/screens/Quiz/quizBeforeList.js b/app/screens/Quiz/quizBeforeList.js
index 6703e7d..5ce4b42 100644
--- a/app/screens/Quiz/quizBeforeList.js
+++ b/app/screens/Quiz/quizBeforeList.js
@@ -47,7 +47,8 @@ class QuizBeforeScreen extends Component {
topicId: navigation.getParam('topicId',null),
typeQuiz: navigation.getParam('typeQuiz',null),
index: navigation.getParam('index',null),
- headerTitle: navigation.getParam('headerTitle',null)
+ headerTitle: navigation.getParam('headerTitle',null),
+ categoryId : navigation.getParam('categoryId',null),
}
this.list = QuizListData[this.param.headerTitle];
diff --git a/app/screens/Quiz/quizFlash.js b/app/screens/Quiz/quizFlash.js
index 86ddcc1..a363598 100644
--- a/app/screens/Quiz/quizFlash.js
+++ b/app/screens/Quiz/quizFlash.js
@@ -71,6 +71,7 @@ import {
this.studyRecord = [];
this.startTime = null;
this.quizOptions = [];
+ this.reduxParam = [];
this.title = '';
this.oneType = '';
this.study = [];
@@ -546,8 +547,27 @@ import {
}
+ setSentParamStart = (index, categoryId, type ) =>{
+ var startTime = ( new Date().getTime() / 1000);
+ if(type == 'Test'){
+ var reduxType = "TEST";
+ }else{
+ var reduxType = "QUIZ";
+ }
+ var value = {
+ type : reduxType,
+ topicId : StudyList[index].topic_id,
+ startTime : startTime,
+ categoryId : StudyList[index].topic_id + categoryId,
+ studyId : StudyList[index].topic_id + categoryId
+ }
+
+ return value;
+ }
+
setStartQuiz = () => {
- this.startTime = new Date().getTime();
+ const { navigation } = this.props;
+ this.reduxParam = this.setSentParamStart(navigation.getParam('index', null), navigation.getParam('categoryId', null), navigation.getParam('type', null));
this.props.startLearn(this.state.studyType, this.startTime,this.title); //call our action
}
@@ -567,17 +587,13 @@ import {
};
setEndQuiz = () => {
- parseValue = {
- StudentID : this.props.StudentID,
- startTime : this.state.startTime,
- endTime : new Date().getTime(),
- subjectTitle: this.title,
- studyType : this.state.studyType,
- studyID : this.title,
- studyRecord : this.studyRecord,
- typeQuiz:this.state.type
- }
- this.props.endLearn(parseValue); //call our action
+ var endTime = ( new Date().getTime() / 1000);
+
+ var parseValue = this.reduxParam;
+ console.log(parseValue);
+ parseValue['finishTime'] = endTime;
+ parseValue['quizData'] = this.studyRecord;
+ this.props.endLearn(parseValue); //call our action
};
goNextQuestion() {
diff --git a/app/screens/Quiz/quizHiraganaList.js b/app/screens/Quiz/quizHiraganaList.js
index 50a9f69..5bd4951 100644
--- a/app/screens/Quiz/quizHiraganaList.js
+++ b/app/screens/Quiz/quizHiraganaList.js
@@ -157,6 +157,8 @@ import CircleCheckBox, {LABEL_POSITION} from 'react-native-circle-checkbox';
oneType: navigation.getParam('oneType',null),
idList: this.state.idList,
index: navigation.getParam('index',null),
+ categoryId : navigation.getParam('categoryId',null),
+
}
)
);
diff --git a/app/screens/Quiz/quizKatakanaList.js b/app/screens/Quiz/quizKatakanaList.js
index db9037d..a73172e 100644
--- a/app/screens/Quiz/quizKatakanaList.js
+++ b/app/screens/Quiz/quizKatakanaList.js
@@ -85,7 +85,7 @@ import CircleCheckBox, {LABEL_POSITION} from 'react-native-circle-checkbox';
/>
) : (
- None
+ None
) }
@@ -162,6 +162,7 @@ import CircleCheckBox, {LABEL_POSITION} from 'react-native-circle-checkbox';
oneType: navigation.getParam('quizOptions',null),
idList: this.state.idList,
index: navigation.getParam('index',null),
+ categoryId : navigation.getParam('categoryId',null),
});
};
diff --git a/app/screens/Quiz/quizMain.js b/app/screens/Quiz/quizMain.js
index 3fa373c..9965e73 100644
--- a/app/screens/Quiz/quizMain.js
+++ b/app/screens/Quiz/quizMain.js
@@ -51,7 +51,9 @@ class QuizMainScreen extends Component {
typeQuiz: navigation.getParam('typeQuiz',null),
quizOptions: navigation.getParam('quizOptions',null),
oneType: type,
- index: navigation.getParam('index',null), }
+ index: navigation.getParam('index',null),
+ categoryId : navigation.getParam('categoryId',null),
+ }
));
};
}
diff --git a/app/screens/Study/hiraganaFlashcard.js b/app/screens/Study/hiraganaFlashcard.js
index cca2036..8ae5c23 100644
--- a/app/screens/Study/hiraganaFlashcard.js
+++ b/app/screens/Study/hiraganaFlashcard.js
@@ -15,10 +15,14 @@ import {
} from 'react-native';
import { List, ListItem, Icon } from 'react-native-elements';
import {Dimensions} from 'react-native';
+ import {NavigationActions} from 'react-navigation';
// Config
import { ImageData } from '../../config/image_list';
import { flashData } from '../../config/flash';
-import LearnListScreen from '../Learn/LearnList';
+ import LearnListScreen from '../Learn/LearnList';
+ import ResponsiveText from '../../component/responsiveText';
+ import FlashButton from '../../component/flashButton';
+
var Sound = require('react-native-sound');
@@ -29,36 +33,33 @@ import LearnListScreen from '../Learn/LearnList';
/**
* Generic play function for majority of tests
*/
-function playSound(testInfo, component) {
- console.log(testInfo);
- setTestState(testInfo, component, 'pending');
-
- const callback = (error, sound) => {
- if (error) {
- Alert.alert('error', error.message);
- setTestState(testInfo, component, 'fail');
- return;
- }
- setTestState(testInfo, component, 'playing');
- // Run optional pre-play callback
- testInfo.onPrepared && testInfo.onPrepared(sound, component);
- sound.play(() => {
- // Success counts as getting to the end
- setTestState(testInfo, component, 'win');
- // Release when it's done so we're not using up resources
- sound.release();
- });
- };
-
- // If the audio is a 'require' then the second parameter must be the callback.
- if (testInfo.isRequire) {
- const sound = new Sound(testInfo.url, error => callback(error, sound));
- } else {
- const sound = new Sound(testInfo.url, testInfo.basePath, error => callback(error, sound));
- }
-}
+ function playSound(testInfo, component) {
+ setTestState(testInfo, component, 'pending');
+ const callback = (error, sound) => {
+ if (error) {
+ Alert.alert('error', error.message);
+ setTestState(testInfo, component, 'fail');
+ return;
+ }
+ setTestState(testInfo, component, 'playing');
+ // Run optional pre-play callback
+ testInfo.onPrepared && testInfo.onPrepared(sound, component);
+ sound.play(() => {
+ // Success counts as getting to the end
+ setTestState(testInfo, component, 'win');
+ // Release when it's done so we're not using up resources
+ sound.release();
+ });
+ };
+ // If the audio is a 'require' then the second parameter must be the callback.
+ if (testInfo.isRequire) {
+ const sound = new Sound(testInfo.url, error => callback(error, sound));
+ } else {
+ const sound = new Sound(testInfo.url, testInfo.basePath, error => callback(error, sound));
+ }
+ }
class HiraganaFlashcardScreen extends Component {
static navigationOptions = {
@@ -104,6 +105,9 @@ function playSound(testInfo, component) {
})
this.data = flashData[0][this.props.title];
+ this.data.sort(function() {
+ return 0.5 - Math.random()
+ })
this.state = {
front: this.data[0].moji,
@@ -116,7 +120,8 @@ function playSound(testInfo, component) {
isPause: false,
loopingSound: undefined,
tests: {},
- btnDisable: true
+ btnDisable: true,
+ isFinish: false
};
this.progressCounter = 0;
@@ -132,7 +137,7 @@ function playSound(testInfo, component) {
this.flipperFunction = (time) => {
this.flipperInterval = setInterval(() => {
- this.flipIndicator += 2;
+ this.flipIndicator += 4;
if(this.flipIndicator >= 100) {
if(this.state.flipped) {
this.updateNext();
@@ -147,8 +152,9 @@ function playSound(testInfo, component) {
componentDidMount() {
this.flipperFunction(this.tickInterval / this.flipSpeed);
+ playSound(this.state , this);
}
-
+
pause(){
this.flipIndicator = 0;
clearInterval(this.flipperInterval);
@@ -197,13 +203,21 @@ function playSound(testInfo, component) {
}
updateNext(){
- this.state.btnDisable = false;
+ this.setState({
+ btnDisable: false
+ });
if(this.progressCounter + 1 === this.data.length) {
- this.props.goBack.props.navigation.goBack(null) ;
+ this.setState({
+ isFinish: true
+ });
return;
}
this.pause();
this.progressCounter++;
+ this.setState({
+ url: this.data[this.progressCounter].url
+ });
+ playSound(this.state , this);
this.setState((previousState) => {
let state = previousState;
this.value = 180;
@@ -211,16 +225,12 @@ function playSound(testInfo, component) {
if(this.value >= 90){
state.front = this.data[this.progressCounter].moji;
state.fakeBack = this.data[this.progressCounter].romaji;
- state.url == this.data[this.progressCounter].url;
} else {
state.fakeFront = this.data[this.progressCounter].romaji;
state.back = this.data[this.progressCounter].moji;
- state.url == this.data[this.progressCounter].url;
}
state.flipped = true;
- console.log(this);
- playSound(this.state , this);
return state;
}, this.flipCard)
@@ -228,11 +238,17 @@ function playSound(testInfo, component) {
updatePrevious(){
if(this.progressCounter < 1){
- this.state.btnDisable = true;
+ this.setState({
+ btnDisable: true
+ });
return;
}
this.pause();
this.progressCounter--;
+ this.setState({
+ url: this.data[this.progressCounter].url
+ });
+ playSound(this.state , this);
this.setState((previousState) => {
let state = previousState;
this.value = 180;
@@ -277,20 +293,18 @@ function playSound(testInfo, component) {
if (this.value >= 90) {
Animated.spring(this.animatedValue, {
toValue: 0,
- friction: 30,
- tension: 40,
+ friction: 100,
+ tension: 100,
}).start(set);
} else {
Animated.spring(this.animatedValue, {
toValue: 180,
- friction: 30,
- tension: 40,
+ friction: 100,
+ tension: 100,
}).start(set);
}
}
-
-
render() {
const frontAnimatedStyle = {
transform: [
@@ -333,12 +347,12 @@ function playSound(testInfo, component) {
- { this.state.front }
+
- { this.state.back }
+
@@ -346,43 +360,28 @@ function playSound(testInfo, component) {
-
- this.updatePrevious()}
- >
-
-
-
-
- this.setAutoOrManual()}
- >
- { this.state.isPause ?
- () :
- ()
- }
-
-
-
-
- this.setToNSpeed()}
- >
-
-
-
-
- this.updateNext()}
- >
-
-
-
+ this.updatePrevious()} />
+
+ this.setAutoOrManual()} />
+
+ this.setToNSpeed()} />
+
+ {this.state.isFinish ? (
+ this.props.navigation.goBack()} />
+ ): (
+ this.updateNext()} />
+ )}
@@ -394,6 +393,7 @@ function playSound(testInfo, component) {
//await AsyncStorage.setItem('userToken', 'abc');
this.props.navigation.navigate('NameIn');
};
+
}
const styles = require('../../styles/style');
diff --git a/app/screens/Study/hiraganaList.js b/app/screens/Study/hiraganaList.js
index a6c32a2..ca1f850 100644
--- a/app/screens/Study/hiraganaList.js
+++ b/app/screens/Study/hiraganaList.js
@@ -16,6 +16,9 @@ import { List, ListItem, Icon } from 'react-native-elements';
import { strings } from '../../config/localization';
// import * as Actions from '../../../actions/Quiz'; //Import your actions
import { ImageData } from '../../config/image_list';
+import { bindActionCreators } from 'redux';
+import { connect } from 'react-redux';
+import * as Actions from '../../actions/summary'; //Import your actions
class HiraganaListScreen extends Component {
@@ -37,23 +40,25 @@ class HiraganaListScreen extends Component {
title: navigation.getParam('title', null),
img: navigation.getParam('img', null),
type: navigation.getParam('type', null),
+ categoryId : navigation.getParam('categoryId', null),
headerTitle : navigation.getParam('headerTitle', null),
studyType : navigation.getParam('studyType', null),
typeQuiz : navigation.getParam('typeQuiz', null),
topicId : navigation.getParam('topic_id', null),
quizOptions : navigation.getParam('quizOptions', null)
});
-
-
-
+ console.log('run');
+ this.props.getSummaryRecord('QUIZ',navigation.getParam('topic_id', null), navigation.getParam('topic_id', null) + navigation.getParam('categoryId', null), navigation.getParam('topic_id', null) + navigation.getParam('categoryId', null));
}
navigateToLearn=(type, topicId = null)=>{
if(type == 'Learn'){
this.props.navigation.navigate('LearnListScreen',(
{
+ index : this.state.index,
type : type,
title : this.state.title,
+ categoryId : this.state.categoryId,
studyType: this.state.studyType,
img: this.state.img,
}
@@ -65,6 +70,7 @@ class HiraganaListScreen extends Component {
type : type,
title : this.state.title,
studyType: this.state.studyType,
+ categoryId : this.state.categoryId,
img: this.state.img,
topicId: this.state.topicId,
headerTitle: this.state.headerTitle
@@ -105,7 +111,56 @@ class HiraganaListScreen extends Component {
topic_id : 'test',
});
}
+ getquizScore = () =>{
+ if(this.props.quiz){
+ var quiz = this.props.quiz;
+ var count = 0;
+ for(var i = 0; i{
+ if(this.props.test){
+ var quiz = this.props.test;
+ var count = 0;
+ for(var i = 0; i {
+ this.props.navigation.navigate('reviewScreen',(
+ {
+ type : type
+ }
+ ));
+ }
render() {
+ var scoreQuiz = this.getquizScore();
+ var scoreTest = this.gettestScore();
+
return (
@@ -129,7 +184,7 @@ class HiraganaListScreen extends Component {
Quiz
- 80/100
+ { scoreQuiz }
@@ -137,7 +192,7 @@ class HiraganaListScreen extends Component {
Start
-
+
Review
@@ -146,12 +201,16 @@ class HiraganaListScreen extends Component {
Test
- 80/100
+ { scoreTest }
Start
+
+
+ Review
+
@@ -174,4 +233,16 @@ class HiraganaListScreen extends Component {
const styles = require('../../styles/style');
const study = require('../../styles/study');
-export default HiraganaListScreen;
\ No newline at end of file
+function mapStateToProps(state, props) {
+ return {
+ test: state.summary.testData,
+ quiz: state.summary.quizData
+ }
+}
+
+function mapDispatchToProps(dispatch) {
+ return bindActionCreators(Actions, dispatch);
+}
+
+//Connect everything
+export default connect(mapStateToProps, mapDispatchToProps)(HiraganaListScreen);
diff --git a/app/screens/Study/studyList.js b/app/screens/Study/studyList.js
index ad25383..4a00aca 100644
--- a/app/screens/Study/studyList.js
+++ b/app/screens/Study/studyList.js
@@ -49,8 +49,8 @@ class StudyListScreen extends Component {
item['index'] = index;
item['studyType'] = item.title;
item['headerTitle'] = item.title;
-
- console.log(item);
+ item['categoryId'] = 'C001';
+
if(item.type == 'INITIAL'){
item['studyType'] = item.title;
this.props.navigation.navigate('HiraganaList',(
@@ -83,13 +83,13 @@ class StudyListScreen extends Component {
/>
{ strings[item.title] }
- { item.lock ? (
+ {/* { item.lock ? (
) : (
not lock
- )}
+ )} */}
)
)}
diff --git a/app/screens/Study/topiclist.js b/app/screens/Study/topiclist.js
index ec28666..ab8ec7f 100644
--- a/app/screens/Study/topiclist.js
+++ b/app/screens/Study/topiclist.js
@@ -48,7 +48,7 @@ class TopicListScreen extends Component {
//Console.log(navigation.getParam('userName', null),"NIAMAK");
}
- navigateToLearn=(type)=>{
+navigateToLearn=(type, categoryId)=>{
param = {
img : this.state.img,
@@ -56,6 +56,7 @@ class TopicListScreen extends Component {
index : this.state.index,
type : this.state.type,
headerTitle : type,
+ categoryId : categoryId,
studyType : this.state.title + '_and_' +type,
};
@@ -102,18 +103,18 @@ class TopicListScreen extends Component {
/>
-
+
{ strings['vocabulary'] }
-
+
{ strings['grammar'] }
-
+
{ strings['kanji'] }
-
+
{ strings['topic_test'] }
diff --git a/app/screens/Summary/reviewSummary.js b/app/screens/Summary/reviewSummary.js
new file mode 100644
index 0000000..a2a783e
--- /dev/null
+++ b/app/screens/Summary/reviewSummary.js
@@ -0,0 +1,244 @@
+import React, { Component } from 'react';
+import { strings } from '../../config/localization';
+import {
+ ActivityIndicator,
+ AsyncStorage,
+ Button,
+ StatusBar,
+ StyleSheet,
+ FlatList,
+ Text,
+ TextInput,
+ View,
+ ScrollView,
+ TouchableOpacity,
+ TouchableHighlight,
+ } from 'react-native';
+ import { NavigationActions } from 'react-navigation';
+ import { List, ListItem } from 'react-native-elements';
+ import { ProgressCircle } from 'react-native-svg-charts'
+ import { Icon } from 'react-native-elements';
+
+ import { bindActionCreators } from 'redux';
+ import { connect } from 'react-redux';
+ import * as Actions from '../../actions/study'; //Import your actions
+ import { StudyList } from '../../config/studyList';
+ import { quizItems } from '../../config/quiz';
+ import Header from '../../component/header';
+import score from '../Study/score';
+ class reviewScreen extends Component {
+ constructor(props) {
+ super(props);
+
+ }
+ state = {
+ typeQuiz: ""
+ }
+
+ componentDidMount() {
+ const { navigation } = this.props;
+ this.setState({
+ type: navigation.getParam('type', null),
+ });
+
+ //this.processData(navigation.getParam('studyTitle', null));
+
+ //Console.log(navigation.getParam('userName', null),"NIAMAK");
+ }
+ goToTopicSelection = () => {
+ if(this.state.type == 'Test'){
+ const resetAction = NavigationActions.reset({
+ index: 0,
+ actions: [
+ NavigationActions.navigate({ routeName: 'StudyList' }),
+ ]
+ });
+ this.props.navigation.dispatch(resetAction);
+ }else{
+ this.retry();
+ }
+ }
+ retry = () => {
+ var item = StudyList[this.state.index ];
+ item['index'] = this.state.index;
+ item['studyType'] = item.title;
+ item['headerTitle'] = item.title;
+
+ const resetAction = NavigationActions.reset({
+ index: 1,
+ actions: [
+ NavigationActions.navigate({ routeName: 'StudyList' }),
+ NavigationActions.navigate({ routeName: 'HiraganaList' , params: item })
+
+ ]
+ });
+
+ this.props.navigation.dispatch(resetAction);
+
+ }
+ gotToNext = () => {
+ var item = StudyList[this.state.index + 1];
+ item['index'] = this.state.index + 1;
+ item['studyType'] = item.title;
+ item['headerTitle'] = item.title;
+
+ const resetAction = NavigationActions.reset({
+ index: 1,
+ actions: [
+ NavigationActions.navigate({ routeName: 'StudyList' }),
+ NavigationActions.navigate({ routeName: 'HiraganaList' , params: item })
+
+ ]
+ });
+
+ this.props.navigation.dispatch(resetAction);
+
+ }
+ getRecord(){
+ if(this.state.type == 'QUIZ'){
+ return this.props.quiz;
+ }else{
+ return this.props.test;
+
+ }
+ }
+ countScore = () => {
+ var studyRecord = [];
+
+ if(this.state.type == 'QUIZ'){
+ studyRecord = this.props.quiz;
+ }else{
+ studyRecord = this.props.test;
+ }
+
+ var Score = '';
+ var CountQuest = studyRecord.length;
+ var correct = 0;
+
+ for(var i = 0; i < studyRecord.length; ++i) {
+ if(studyRecord[i].correct == '1'){
+ correct = correct + 1;
+ }
+ }
+
+ if(CountQuest !== 0 && correct !== 0){
+ Score = Math.floor(( correct / CountQuest) * 100 );
+ }else{
+ Score = 0;
+ }
+
+ console.log(Score,'countScore')
+ return Score;
+ }
+ renderItem({item, index}) {
+
+ return (
+
+
+ { item.correct_title }
+
+ { item.correct == '1' ? (
+
+
+
+ ) : (
+
+
+
+ ) }
+
+
+ )
+};
+
+ render() {
+ var recordStudy = this.getRecord();
+ var score = this.countScore();
+ return (
+
+
+ { score > 50 ? ( 'You Pass' ) : ('You Failed') }
+
+
+
+
+ { score}/100
+
+
+
+
+
+
+ SUMMARY
+
+
+ {recordStudy[0] ? (
+ index.toString()}/>
+ ) :No study data }
+
+
+
+ );
+ }
+
+ processData(title){
+ var recordStudy = [];
+ if(this.state.type == "QUIZ"){
+ recordStudy = this.props.quiz;
+ }else{
+ recordStudy = this.props.test;
+
+ }
+ this.quizItems = quizItems[title];
+ for(i = 0; i < recordStudy.length; i++){
+ current = recordStudy[i];
+ current.questionData = this.getData(current.questionID);
+ current.answerData = this.getData(current.answer);
+
+ recordStudy[i] = current;
+ }
+
+ }
+
+ getData(val){
+ return this.quizItems.find(function (obj) {
+ return obj.id == val;
+ });
+ }
+
+
+ }
+
+const styles = require('../../styles/style');
+const scoreStyle = require('../../styles/score');
+const study = require('../../styles/study');
+
+// The function takes data from the app current state,
+// and insert/links it into the props of our component.
+// This function makes Redux know that this component needs to be passed a piece of the state
+function mapStateToProps(state, props) {
+
+ return {
+ test: state.summary.testData,
+ quiz: state.summary.quizData
+ }
+}
+
+// Doing this merges our actions into the component’s props,
+// while wrapping them in dispatch() so that they immediately dispatch an Action.
+// Just by doing this, we will have access to the actions defined in out actions file (action/home.js)
+function mapDispatchToProps(dispatch) {
+ return bindActionCreators(Actions, dispatch);
+}
+
+//Connect everything
+export default connect(mapStateToProps, mapDispatchToProps)(reviewScreen);
+
diff --git a/app/screens/learn/hiraganalearn.js b/app/screens/learn/hiraganalearn.js
index b8339e3..680572f 100644
--- a/app/screens/learn/hiraganalearn.js
+++ b/app/screens/learn/hiraganalearn.js
@@ -18,7 +18,8 @@ import {
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import { HiraganaLearnStack } from '../../config/router';
- import { hiraganalearn } from '../../config/hiraganalearn'
+ // import { hiraganalearn } from '../../config/hiraganalearn'
+ import { hiraganaList, katakanaList } from '../../config/data'
import * as Actions from '../../actions/user'; //Import your actions
var Sound = require('react-native-sound');
@@ -52,9 +53,9 @@ function playSound(testInfo, component) {
// If the audio is a 'require' then the second parameter must be the callback.
if (testInfo.isRequire) {
- const sound = new Sound(testInfo.url, error => callback(error, sound));
+ const sound = new Sound(testInfo.audio, error => callback(error, sound));
} else {
- const sound = new Sound(testInfo.url, testInfo.basePath, error => callback(error, sound));
+ const sound = new Sound(testInfo.audio, testInfo.basePath, error => callback(error, sound));
}
}
@@ -69,7 +70,7 @@ function playSound(testInfo, component) {
{
return playSound(this.props.item , this.props.component);
}}>
- {this.props.item.hiragana}
+ {this.props.item.moji}
{this.props.item.romaji}
);
@@ -107,7 +108,7 @@ function playSound(testInfo, component) {
return (
{
return(
diff --git a/app/screens/learn/katakanalearn.js b/app/screens/learn/katakanalearn.js
index 8f4f69a..c8167cd 100644
--- a/app/screens/learn/katakanalearn.js
+++ b/app/screens/learn/katakanalearn.js
@@ -20,7 +20,7 @@ import {
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import { HiraganaLearnStack } from '../../config/router';
- import { katakanalearn } from '../../config/hiraganalearn';
+ import { katakanaList } from '../../config/data'
import * as Actions from '../../actions/user'; //Import your actions
var Sound = require('react-native-sound');
@@ -54,9 +54,9 @@ function playSound(testInfo, component) {
// If the audio is a 'require' then the second parameter must be the callback.
if (testInfo.isRequire) {
- const sound = new Sound(testInfo.url, error => callback(error, sound));
+ const sound = new Sound(testInfo.audio, error => callback(error, sound));
} else {
- const sound = new Sound(testInfo.url, testInfo.basePath, error => callback(error, sound));
+ const sound = new Sound(testInfo.audio, testInfo.basePath, error => callback(error, sound));
}
}
@@ -71,7 +71,7 @@ function playSound(testInfo, component) {
{
return playSound(this.props.item , this.props.component);
}}>
- {this.props.item.hiragana}
+ {this.props.item.moji}
{this.props.item.romaji}
);
@@ -109,7 +109,7 @@ function playSound(testInfo, component) {
return (
{
return(
@@ -138,4 +138,4 @@ function playSound(testInfo, component) {
//Connect everything
export default connect(mapStateToProps, mapDispatchToProps)(KatakanaLearnScreen);
- // export default LearnHL1Screen;
\ No newline at end of file
+ // export default KatakanaLearnScreen;
\ No newline at end of file
diff --git a/app/screens/main.js b/app/screens/main.js
index 8cad981..d17fb10 100644
--- a/app/screens/main.js
+++ b/app/screens/main.js
@@ -28,7 +28,7 @@ class MainScreen extends Component {
// Render any loading content that you like here
render() {
- if (this.props.data.id) {
+ if (this.props.data) {
return (
);
@@ -45,7 +45,8 @@ class MainScreen extends Component {
function mapStateToProps(state, props) {
return {
- data: state.user.user
+ data: state.user.user,
+ login: state.user.isLogin
}
}
function mapDispatchToProps(dispatch) {
diff --git a/app/styles/learnhl1.js b/app/styles/learnhl1.js
index d9cca4e..e8e5b83 100644
--- a/app/styles/learnhl1.js
+++ b/app/styles/learnhl1.js
@@ -20,23 +20,19 @@ module.exports = StyleSheet.create({
borderWidth: 1,
flex:1,
flexDirection: 'column',
- flexWrap: 'wrap',
- margin: 5,
- padding: 5,
- backgroundColor: 'white'
-
+ margin: 2,
+ backgroundColor: 'white',
+ justifyContent: 'center',
+ alignItems: 'center',
}
,
HiraganaItem: {
color: 'black',
- fontSize: 34,
- textAlign: 'left',
-
+ fontSize: 25,
},
RomajiItem: {
color: 'black',
fontSize: 15,
- textAlign: 'right',
},
});
\ No newline at end of file
diff --git a/app/styles/profileStyle.js b/app/styles/profileStyle.js
new file mode 100644
index 0000000..f0ad95b
--- /dev/null
+++ b/app/styles/profileStyle.js
@@ -0,0 +1,153 @@
+'use strict';
+
+var React = require('react-native');
+
+var {
+ StyleSheet,
+} = React;
+
+let primaryColor = '#45b4e7'; // blue
+let secondaryColor = '#d2f9fc';
+let textColor = '#333';
+let grayColor = '#ccc';
+
+module.exports = StyleSheet.create({
+
+ // container: {
+ // backgroundColor:"white",
+ // },
+
+ container: {
+ flex: 1,
+ alignItems: 'center',
+ position: 'relative',
+ backgroundColor: 'white'
+ },
+ containerFlexColumn: {
+ flex: 1,
+ flexDirection: 'column',
+ justifyContent: 'flex-start',
+ alignItems: "center",
+ padding: 10,
+ backgroundColor: '#d2f9fc',
+ },
+ rowRelative: {
+ flexDirection: 'row',
+ flex: 1,
+ flexWrap:'wrap',
+ position: 'relative',
+ backgroundColor: 'red'
+ },
+ containerWhiteTop: {
+ flex: 1,
+ flexDirection: 'column',
+ alignItems: 'stretch',
+ justifyContent: 'flex-start',
+ padding: 10,
+ backgroundColor: '#ffffff',
+ },
+ profileContent:{
+ width: '92%',
+ alignContent: 'space-between',
+ marginTop: 100,
+ },
+ userProfileLabelParent:{
+ color: grayColor,
+ fontSize:20,
+ },
+ userProfileLabelChild:{
+ // color: textColor
+ fontWeight: 'bold',
+ fontSize: 12,
+ marginStart: 5,
+ marginTop: 5,
+ color: 'black',
+ },
+ userProfileData:{
+ color: grayColor
+ },
+ inputStyle:{
+ height:40,
+ borderColor:"gray",
+ color: "gray",
+ fontSize:15
+ },
+ vline: {
+ borderWidth: 0.7,
+ borderColor:'#cccccc',
+ marginTop: 5,
+ },
+ socialContainer: {
+ flex:1,
+ height: 70,
+ },
+ bgColortop:{
+ backgroundColor: secondaryColor,
+ height:150,
+ width:"100%",
+ alignItems:'center',
+ position: 'relative'
+ },
+ topinfor: {
+ width: '82%',
+ alignItems: 'center',
+ marginTop: 20,
+ },
+ avatarinformation: {
+ position:'absolute',
+ zIndex:1,
+ width: '82%',
+ height: 150,
+ backgroundColor: 'white',
+ marginTop: 60,
+ alignItems: 'center',
+ justifyContent: 'flex-start',
+ paddingTop: 70,
+ borderRadius: 5,
+ borderWidth: 1,
+ borderColor: 'black',
+ },
+ profilePicture : {
+ position: 'absolute',
+ top:0,
+ width: '100%',
+ height: 180,
+ zIndex:2
+ },
+ btnupdate: {
+ backgroundColor: '#4573e7',
+ borderRadius: 5,
+ alignItems: 'center',
+ justifyContent: 'center',
+ width: '100%',
+ height: 40,
+ marginTop: 5,
+ marginBottom:30,
+ },
+ txtupdateButton: {
+ fontFamily: 'Roboto',
+ color: 'white',
+ fontWeight: 'bold',
+ },
+ nameEmail:{
+ position: 'absolute',
+ top:80,
+ width: '100%',
+ height: 50,
+ zIndex:3,
+ alignItems:'center',
+ },
+ vline: {
+ borderWidth: 1,
+ borderColor:'#999999',
+ marginTop: 5,
+ marginBottom:5,
+ },
+ menuOption:{
+ // color: textColor
+ fontWeight: 'bold',
+ fontSize: 15,
+ color: 'black',
+ },
+});
+
diff --git a/app/styles/study.js b/app/styles/study.js
index ab581c3..de775cd 100644
--- a/app/styles/study.js
+++ b/app/styles/study.js
@@ -70,6 +70,10 @@ module.exports = StyleSheet.create({
fontSize: 28,
},
+ text32: {
+ fontSize: 32,
+ },
+
textMd: {
fontSize: 22,
},
@@ -259,13 +263,6 @@ cardText: {
height: '100%'
},
-textContent: {
- color: 'black',
- textAlign: 'center',
- textAlignVertical: 'center',
- fontSize: 120
-},
-
backgroundImg: {
flex: 1,
width: null,
@@ -276,6 +273,17 @@ roundButton: {
backgroundColor:'#45B3EB',
borderRadius:50,
padding: '5%',
+ overflow: 'hidden',
+},
+
+roundButtonText: {
+ backgroundColor:'#45B3EB',
+ borderRadius:50,
+ paddingLeft: '3%',
+ paddingRight: '3%',
+ paddingBottom: '6%',
+ paddingTop: '6%',
+ overflow: 'hidden',
},
boxButton: {
diff --git a/app/styles/style.js b/app/styles/style.js
index 146f055..673759d 100644
--- a/app/styles/style.js
+++ b/app/styles/style.js
@@ -290,6 +290,7 @@ module.exports = StyleSheet.create({
justifyContent: 'center',
padding: 10,
backgroundColor: secondaryColor,
+ position:"relative",
},
containerWhite: {
flex: 1,
@@ -304,8 +305,9 @@ module.exports = StyleSheet.create({
flexDirection: 'column',
alignItems: 'stretch',
justifyContent: 'flex-start',
- padding: 10,
+ // padding: 10,
backgroundColor: '#ffffff',
+ position:"relative"
},
createGuestButton: {
backgroundColor: '#495057',
@@ -345,11 +347,11 @@ module.exports = StyleSheet.create({
color: '#999999',
alignSelf: 'center',
},
- socialContainer: {
+ flexRow: {
flexDirection: 'row',
- height: 150,
+ height: 100,
},
- socialButton: {
+ flex1: {
flex: 1,
},
socialFacebook:{
@@ -681,5 +683,81 @@ module.exports = StyleSheet.create({
},
correctText:{
fontSize:22
+ },
+ //Login Page
+ loginButton: {
+ backgroundColor: '#495057',
+ alignItems: 'center',
+ borderRadius: 5,
+ width:"100%",
+ position:"absolute",
+ left:"3%",
+ bottom : 60,
+ zIndex:2
+ },
+ loginCharacter:{
+ height:400,
+ width:150,
+ marginLeft:"60%",
+ position:"absolute",
+ zIndex:1,
+ },
+ loginTextNormal:{
+ fontSize:20,
+ color:"#566d97",
+ fontWeight:"bold",
+ },
+ loginTextN5:{
+ fontSize:30,
+ color:"#566d97",
+ fontWeight:"bold",
+ },
+ loginText:{
+ position:"absolute",
+ left:"25%",
+ top:"30%",
+ },
+ characterFixLogin:{
+ height:400,
+ width:150,
+ position:"absolute",
+ bottom: -150,
+ right: -10,
+ zIndex:2,
+ },
+ characterFixBottom:{
+ height:400,
+ width:150,
+ position:"absolute",
+ bottom: -200,
+ right: -10,
+ zIndex:2,
+ },
+ characterChatContainer:{
+ width:"100%",
+ height:80,
+ position:"absolute",
+ bottom:0,
+ right:0,
+ zIndex:1,
+ borderColor:"#999999",
+ backgroundColor:"#ffffff",
+ borderWidth:1,
+ paddingRight:"30%"
+ },
+
+
+ contentPadding10:{
+ padding:10
+ },
+ contentLoginData:{
+ padding:10,
+ marginBottom:190,
}
+
+
+
+
+
+
});
\ No newline at end of file
diff --git a/debug.log b/debug.log
index 07fcc3b..8dde7b7 100644
--- a/debug.log
+++ b/debug.log
@@ -5,3 +5,6 @@
[0523/204032.164:ERROR:crash_report_database_win.cc(427)] unexpected header
[0523/204126.607:ERROR:crash_report_database_win.cc(427)] unexpected header
[0524/174046.262:ERROR:crash_report_database_win.cc(427)] unexpected header
+[0528/103414.216:ERROR:crash_report_database_win.cc(427)] unexpected header
+[0528/112446.580:ERROR:crash_report_database_win.cc(427)] unexpected header
+[0529/090022.130:ERROR:crash_report_database_win.cc(427)] unexpected header