Skip to content

Commit

Permalink
Merge pull request #970 from UNICEFECAR/addSearchGame
Browse files Browse the repository at this point in the history
Add search game and advice should be filter by age period
  • Loading branch information
DivyaniPatel96 authored May 2, 2024
2 parents b9e2a09 + 02f5dc9 commit 080a783
Show file tree
Hide file tree
Showing 7 changed files with 583 additions and 269 deletions.
4 changes: 3 additions & 1 deletion app/assets/data/firebaseEvents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export const CHILD_MILESTONE_TRACKED="child_milestone_tracked"; //,{age_id: 'P12
export const VACCINE_REMINDER_SET="child_vaccine_reminder_set";
export const HEALTH_CHECKUP_ENTERED="child_health_checkup_entered";//,{age_id: 'P12453"}
export const GAME_AGEGROUP_SELECTED="game_age_group_selected"//,{age_id: 'P12453"}
export const ADVICE_AGEGROUP_SELECTED="advice_age_group_selected"//,{age_id: 'P12453"}
export const CHILD_DEVELOPMENT_AGEGROUP_SELECTED="child_development_age_group_selected"//,{age_id: 'P12453"}
export const HEALTH_CHECKUP_REMINDER_SET="child_health_checkup_reminder_set";
export const EXPECTED_CHILD_ENTERED="expected_child_entered";
Expand All @@ -30,4 +31,5 @@ export const CHATBOT_SUBCATEGORY_SELECTED="chatbot_subcategory_selected";//chatb
export const CHATBOT_FAQ_SELECTED="chatbot_faq_selected";//chatbot faq category
export const EMAIL_SENT="email_sent";//Email Sent
export const DONATE_OPENED="donate_opened";//Donate Event
export const ARTICLE_SEARCHED="article_searched";//Article Searched Event
export const ARTICLE_SEARCHED="article_searched";//Article Searched Event
export const ACTIVITY_SEARCHED="activity_searched";//Activity Searched Event
3 changes: 3 additions & 0 deletions app/assets/translations/appOfflineData/apiConstants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,15 @@ export const videoTypeImage = "novideo";
export const backupGDriveFolderName = 'ParentBuddy';
export const backupGDriveFileName = 'mybackup.json';
export const tempRealmFile = RNFS.DocumentDirectoryPath + '/' + 'user1.realm';
export const tempFuseJsonPath = RNFS.DocumentDirectoryPath + '/' + 'fuse-index.json';
export const backUpPath = RNFS.DocumentDirectoryPath + '/mybackup.json';
export const tempbackUpPath = RNFS.TemporaryDirectoryPath + 'mybackup.json';
export const firstPeriodicSyncDays = 7;
export const secondPeriodicSyncDays = 30;
export const shareText = (String(buildFor) != buildForBebbo) ? '\nhttps://www.bebbo.app/foleja/share/' : '\nhttps://www.bebbo.app/share/';
export const shareTextButton = (String(buildFor) != buildForBebbo) ? 'https://www.bebbo.app/foleja/share/' : 'https://www.bebbo.app/share/';
export const bebboShareMailId = 'mailto:[email protected]';
export const folejaShareMailId = 'mailto:[email protected]';
export const maleData: any = {
"id": 37,
"name": "Male",
Expand Down
4 changes: 3 additions & 1 deletion app/database/config/dataDbConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { VaccinationSchema } from "../schema/VaccinationSchema";
import { VideoArticleEntitySchema } from "../schema/VideoArticleSchema";
import { EventSchema } from "../schema/EventSchema";
import { SearchHistorySchema } from "../schema/SearchHistorySchema";
import { ActivitySearchHistorySchema } from '../schema/ActivitySearchHistorySchema';
import { ArticleActivityViewSchema } from '../schema/ArticleActivityViewSchema';

export const dataRealmConfig: Realm.Configuration = {
Expand All @@ -43,7 +44,8 @@ export const dataRealmConfig: Realm.Configuration = {
StandardDevHeightForAgeSchema,
FAQsSchema,
EventSchema,
SearchHistorySchema
SearchHistorySchema,
ActivitySearchHistorySchema
],
schemaVersion: 10,
onMigration: (oldRealm, newRealm) => {
Expand Down
17 changes: 17 additions & 0 deletions app/database/schema/ActivitySearchHistorySchema.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { ObjectSchema } from "realm";

export type ActivityHistoryEntity = {
keyword: string;
createdAt: Date;
};
export const ActivitySearchHistorySchema: ObjectSchema = {
name: 'ActivitySearchHistory',
properties: {
keyword: { type: 'string' },
createdAt: { type: "date" },

},
primaryKey: 'keyword'
};


2 changes: 1 addition & 1 deletion app/screens/AddSiblingData.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ const AddSiblingData = ({ route, navigation }: Props): any => {
const insertData: any = editScreen ? await getNewChild(uuid, isExpected, plannedTermDate, isPremature, birthDate, name, '', gender, createdAt) : await getNewChild('', isExpected, plannedTermDate, isPremature, birthDate, defaultName, '', gender, createdAt)
const childSet: Array<any> = [];
childSet.push(insertData);
addChild(languageCode, editScreen, 1, childSet, dispatch, navigation, childAge, null, null, netInfo,false,true);
addChild(languageCode, editScreen, 1, childSet, dispatch, navigation, childAge, null, null, netInfo,false,true,'');
}
const themeContext = useContext(ThemeContext);
const headerColor = themeContext?.colors.PRIMARY_REDESIGN_COLOR;
Expand Down
Loading

0 comments on commit 080a783

Please sign in to comment.