Skip to content

Commit

Permalink
Added config files for all school app
Browse files Browse the repository at this point in the history
  • Loading branch information
Pratikshakhandagale committed Jul 11, 2024
1 parent 059e0f5 commit 3ee15e4
Show file tree
Hide file tree
Showing 35 changed files with 4,802 additions and 12 deletions.
6 changes: 4 additions & 2 deletions configuration/environment.prod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ export const environment = {
export const config = {
api: {
BASE_URL: 'https://school-api-dev.tekdinext.com/',
BASE_URL_BOT: 'https://school-openai.tekdinext.com/',
// BASE_URL_BOT: 'https://school-openai.tekdinext.com/',
BASE_URL_BOT: 'https://e97a-114-143-119-218.ngrok-free.app/',

TELEMETRY_BASE_URL: 'https://school-dev.tekdinext.com/',
CONFIG: 'seeker/configuration',
PAGE_SEARCH_API: 'content/search',
Expand All @@ -15,7 +17,7 @@ export const config = {
SEARCH_API: 'content/search',
CONFIRM_API: 'confirm',
BOT_SAKHI_API_PATH: 'v1/query',
BOT_ACTIVITY_API_PATH: 'api/activitybot/v1/query',
BOT_ACTIVITY_API_PATH: 'v1/query',
REGISTER_DEVICE_API_PATH: 'api/registerMobileDevice',
KEY: 'myjp-0.1',
SECRET: '7tVOEu0xj0zYQiYtCYbauEkNC3NBXCpM'
Expand Down
17 changes: 14 additions & 3 deletions src/app/services/bot-api.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,28 @@ import { BotChatEntry } from './bot/db/chat.schema';
import { BotChatEntryMapper } from './bot/db/utils/bot.chat.entry.mapper';
import { Directory, Filesystem } from '@capacitor/filesystem';
import { HttpHeaders } from '@angular/common/http';
import {ConfigVariables } from '../config';

@Injectable({
providedIn: 'root'
})
export class BotApiService {
config: any;
domainConfig: any;

constructor(
private apiService: ApiService,
private translate: TranslateService,
private dbService: DbService
) { }
) {
ConfigVariables.then(config => {
console.log('Configuration------->:', config);
this.domainConfig = config;
// Use the config data as needed
}).catch(error => {
console.error('Failed to load configuration:', error);
});
}

async getBotMessage(text: string, audio: string, botType: string, lang: any): Promise<any> {
console.log('text ', text, text !== "");
Expand All @@ -39,14 +50,14 @@ export class BotApiService {
language: lang,
text: text,
audio: "",
context: botType
context: this.domainConfig['sub-domain'] + '_' + botType
}
} else if (audio !== "") {
req.input = {
language: lang,
audio: audio,
text: "",
context: botType
context: this.domainConfig['sub-domain'] + '_' + botType
}
}

Expand Down
4 changes: 3 additions & 1 deletion src/app/services/config.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ export class ConfigService {
},
filters: {
[defaultContentFilterKey] : defaultContentFilterValue
}
},
fields: ["mimetype", "identifier","keywords","name", "thumbnail", "media", "agegroup", "language", "sourceorg", "url", "domain", "category"]

}
}
const apiRequest = new ApiRequest.Builder()
Expand Down
9 changes: 7 additions & 2 deletions src/app/services/search.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ export class SearchService {
request: {
orderBy: {
"mimetype": "video/x-youtube"
}
},
fields: ["mimetype", "identifier","keywords","name", "thumbnail", "media", "agegroup", "language", "sourceorg", "url", "domain", "category"]

}
}
} else {
Expand All @@ -33,7 +35,8 @@ export class SearchService {
request: {
orderBy: {
"mimetype": "video/x-youtube"
}
},
fields: ["mimetype", "identifier","keywords","name", "thumbnail", "media", "agegroup", "language", "sourceorg", "url", "domain", "category"]
}
}
}
Expand Down Expand Up @@ -66,6 +69,8 @@ export class SearchService {
orderBy: {
"mimetype": "video/x-youtube"
},
fields: ["mimetype", "identifier","keywords","name", "thumbnail", "media", "agegroup", "language", "sourceorg", "url", "domain", "category"]

}
}
const apiRequest = new ApiRequest.Builder()
Expand Down
90 changes: 90 additions & 0 deletions src/assets/appConfig/bright-future-english-school..json
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
{
"tenantLogo": "assets/school/TVS_128x128.svg",
"siteName": "Bright Future English School",
"siteByLine": "Listen, Learn & Grow !!!",
"splashImage": "assets/school/TVS_152x152.png",
"defaultContentFilter": {

},
"headerFilters": [{
"defaultFilter": {
"id": "All",
"label": "All",
"query": "",
"filters": "All"
},
"additionalFilters": [
{
"id": "Stories",
"label": "Stories",
"query": "Stories",
"filters": "Stories"
},
{
"id": "Activities",
"label": "Activities",
"query": "Activities",
"filters": "Activities"
},
{
"id": "Songs",
"label": "Songs",
"query": "Songs",
"filters": "Songs"
},
{
"id": "Audio Books",
"label": "Audio Books",
"query": "Audio Books",
"filters": "Audio Books"
},
{
"id": "Handbooks",
"label": "Handbooks",
"query": "Handbooks",
"filters": "Handbooks"
}
]
}],
"languages": [
{
"id": "en",
"label": "English",
"default": false
},
{
"id": "hi",
"label": "हिंदी",
"default": true
},
{
"id": "as",
"label": "অসমীয়া",
"default": false
},
{
"id": "bn",
"label": "বাংলা",
"default": true
}
],
"titleCode": [
"en", "hi"
],
"en": {
"kathaSakhiBotName": "Katha Sangini",
"parentTaraBotName": "Parents Sangini,",
"teacherTaraBotName": "Shikshak Sangini,"
},
"hi": {
"kathaSakhiBotName": "कथा संगिनी",
"parentTaraBotName": "पेरेंट संगिनी",
"teacherTaraBotName": "टीचर संगिनी"
},

"footerText": "Developed with ❤️ by Tekdi Technologies ",
"headerColor": "brown",
"headerFontSize": "16",
"footerColor": "brown",
"footerFontSize": "16"
}
100 changes: 100 additions & 0 deletions src/assets/appConfig/imamiya-mission-school.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
{
"tenantLogo": "assets/school/IMS_128x128.svg",
"siteName": "Imamiya Mission School",
"siteByLine": "Listen, Learn & Grow !!!",
"splashImage": "assets/school/IMS_152x152.png",
"defaultContentFilter": {

},
"headerFilters": [{
"defaultFilter": {
"id": "All",
"label": "All",
"query": "",
"filters": "All"
},
"additionalFilters": [
{
"id": "Stories",
"label": "Stories",
"query": "Stories",
"filters": "Stories"
},
{
"id": "Activities",
"label": "Activities",
"query": "Activities",
"filters": "Activities"
},
{
"id": "Songs",
"label": "Songs",
"query": "Songs",
"filters": "Songs"
},
{
"id": "Audio Books",
"label": "Audio Books",
"query": "Audio Books",
"filters": "Audio Books"
},
{
"id": "Handbooks",
"label": "Handbooks",
"query": "Handbooks",
"filters": "Handbooks"
}
]
}],
"languages": [
{
"id": "en",
"label": "English",
"default": false
},
{
"id": "hi",
"label": "हिंदी",
"default": true
},
{
"id": "ur",
"label": "اردو",
"default": false
},
{
"id": "bo",
"label": "བོ་ཐི།",
"default": true
}
],
"titleCode": [
"en", "hi", "ur", "bo"
],
"en": {
"kathaSakhiBotName": "Kahani",
"parentTaraBotName": "Phama",
"teacherTaraBotName": "Gergan"
},
"hi": {
"kathaSakhiBotName": "कहानी",
"parentTaraBotName": "फामा",
"teacherTaraBotName": "गेर्गन"
},
"ur": {
"kathaSakhiBotName": "کہانی",
"parentTaraBotName": "فاما",
"teacherTaraBotName": "گرگن"
},
"bo": {
"kathaSakhiBotName": "ཀ་ཧ་ནི་",
"parentTaraBotName": "ཕ་མ།",
"teacherTaraBotName": "གྷེར་གྷན།"
},

"footerText": "Developed with ❤️ by Tekdi Technologies ",
"headerColor": "brown",
"headerFontSize": "16",
"footerColor": "brown",
"footerFontSize": "16"
}
10 changes: 6 additions & 4 deletions src/assets/appConfig/localhost.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
"siteName": "Garhwal English Medium",
"siteByLine": "Listen, Learn & Grow !!!",
"splashImage": "assets/school/GEMS.jpeg",
"defaultContentFilter": {
"key": "agegroup",
"value": "3-6"
},
"sub-domain": "dharmalife",
"defaultContentFilter": [{
"agegroup": "3-6",
"sourseorg": ["ABC"]
}
],
"headerFilters": [
{
"defaultFilter": {
Expand Down
Loading

0 comments on commit 3ee15e4

Please sign in to comment.