-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #979 from UNICEFECAR/dynamicCountryChange
Implement Dynamic country change
- Loading branch information
Showing
43 changed files
with
1,808 additions
and
1,118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-156 KB
app/assets/appOfflineImages/kyrgyzstan/partner/LogoMoESKGWhiteSide.png
Binary file not shown.
Binary file removed
BIN
-27.7 KB
app/assets/appOfflineImages/montenegro/partner/MoHMontenegroLogo_0.png
Binary file not shown.
Binary file removed
BIN
-34.9 KB
app/assets/appOfflineImages/montenegro/sponser/EUlogozaaplikaciju.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-70.2 KB
app/assets/appOfflineImages/serbia/partner/GZZJZNtionalPartner1000WideWith.png
Binary file not shown.
Binary file removed
BIN
-23.9 KB
app/assets/appOfflineImages/serbia/sponser/nordeusFondacijaLogo1000Wide.png
Binary file not shown.
Binary file removed
BIN
-23.3 KB
app/assets/appOfflineImages/slovakia/partner/PEDIATRIlogarium01av.png
Binary file not shown.
Binary file removed
BIN
-53.3 KB
app/assets/appOfflineImages/tajikistan/partner/MOH_Tajikistan_Logo_TAJ.png
Binary file not shown.
Binary file removed
BIN
-151 KB
app/assets/appOfflineImages/uzbekistan/partner/newMinistry161121Test2.png
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,8 +23,8 @@ 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 bebboShareMailId = 'mailto:[email protected]'; | ||
// export const folejaShareMailId = 'mailto:[email protected]'; | ||
export const maleData: any = { | ||
"id": 37, | ||
"name": "Male", | ||
|
@@ -51,6 +51,8 @@ export const fiveYearFromNow = today; | |
export const restOfTheWorldCountryId = 126; | ||
export const videoArticleMandatory = 0; | ||
export const maxArticleSize = 5; | ||
export const bebboName = 'Bebbo'; | ||
export const folejaName = 'Foleja'; | ||
export const appConfig = { | ||
articles: 'articles', | ||
videoArticles: 'video-articles', | ||
|
@@ -70,20 +72,28 @@ export const appConfig = { | |
checkUpdate: 'check-update', | ||
faqs: 'faqs', | ||
archive: 'archive', | ||
countryGroups: 'country-groups', | ||
} | ||
export const finalUrl = (apiEndpoint: string, selectedCountry: number | undefined, selectedLang: string): any => { | ||
if (apiEndpoint == appConfig.sponsors) { | ||
return apiUrlDevelop + '/' + apiEndpoint + '/' + selectedCountry; | ||
} | ||
if (apiEndpoint == appConfig.taxonomies) { | ||
return apiUrlDevelop + '/' + apiEndpoint + '/' + selectedLang + '/all'; | ||
} | ||
if (apiEndpoint == appConfig.checkUpdate) { | ||
return apiUrlDevelop + '/' + apiEndpoint + '/' + selectedCountry; | ||
} | ||
return apiUrlDevelop + '/' + apiEndpoint + '/' + selectedLang; | ||
} | ||
export const finalUrl = ( | ||
apiEndpoint: string, | ||
selectedCountry: number | undefined, | ||
selectedLang: string | ||
): string => { | ||
const baseUrl = `${apiUrlDevelop}/${apiEndpoint}`; | ||
|
||
switch (apiEndpoint) { | ||
case appConfig.countryGroups: | ||
return `${baseUrl}/${buildFor === String(buildForFoleja) ? folejaName : bebboName}`; | ||
case appConfig.sponsors: | ||
return `${baseUrl}/${selectedCountry}`; | ||
case appConfig.taxonomies: | ||
return `${baseUrl}/${selectedLang}/all`; | ||
case appConfig.checkUpdate: | ||
return `${baseUrl}/${selectedCountry}`; | ||
default: | ||
return `${baseUrl}/${selectedLang}`; | ||
} | ||
}; | ||
|
||
export const allApisObject = (isDatetimeReq: any, dateTimeObj: any): any => { | ||
const allApiObject = [ | ||
|
@@ -93,6 +103,12 @@ export const allApisObject = (isDatetimeReq: any, dateTimeObj: any): any => { | |
postdata: {}, | ||
saveinDB: false, | ||
}, | ||
{ | ||
apiEndpoint: appConfig.countryGroups, | ||
method: 'get', | ||
postdata: {}, | ||
saveinDB: false, | ||
}, | ||
{ | ||
apiEndpoint: appConfig.taxonomies, | ||
method: 'get', | ||
|
Oops, something went wrong.