Skip to content

Commit

Permalink
default filter fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
nidhikachhawa24 committed Jun 25, 2024
1 parent 527ebf8 commit 59bbdbb
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 60 deletions.
2 changes: 1 addition & 1 deletion src/app/pages/home/home.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ export class HomePage implements OnInit, OnTabViewWillEnter, OnDestroy {
this.showSheenAnimation = true;
// try {
let lang = await this.storage.getData('lang')
let content = await this.configService.getAllContent(req, lang);
let content = await this.configService.getAllContent(req, lang, this.configVariables.defaultContentFilter.key, this.configVariables.defaultContentFilter.value);
this.mappUIContentList(content);
// }
// catch (e) {
Expand Down
5 changes: 4 additions & 1 deletion src/app/services/config.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,15 @@ export class ConfigService {
})
}

async getAllContent(req: any, lang: any): Promise<any> {
async getAllContent(req: any, lang: any, defaultContentFilterKey: any, defaultContentFilterValue: any): Promise<any> {
let requestBody = {
language: lang,
request: {
orderBy: {
"mimetype": "video/x-youtube"
},
filters: {
[defaultContentFilterKey] : defaultContentFilterValue
}
}
}
Expand Down
4 changes: 4 additions & 0 deletions src/assets/appConfig/garhwal-school.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
"siteName": "Garhwal English Medium",
"siteByLine": "Listen, Learn & Grow !!!",
"splashImage": "assets/school/GEMS.jpeg",
"defaultContentFilter": {
"key": "title",
"value": "Rice"
},
"headerFilters": [{
"defaultFilter": {
"id": "All",
Expand Down
4 changes: 4 additions & 0 deletions src/assets/appConfig/hummingbird-school.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
"siteName": "Hummingbird School in Assam",
"siteByLine": "Listen, Learn & Grow !!!",
"splashImage": "assets/school/THSM_152x152.png",
"defaultContentFilter": {
"key": "title",
"value": "Rice"
},
"headerFilters": [{
"defaultFilter": {
"id": "All",
Expand Down
4 changes: 4 additions & 0 deletions src/assets/appConfig/localhost.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
"siteName": "Hummingbird School in Assam",
"siteByLine": "Listen, Learn & Grow !!!",
"splashImage": "assets/school/THSM_152x152.png",
"defaultContentFilter": {
"key": "title",
"value": "Rice"
},
"headerFilters": [{
"defaultFilter": {
"id": "All",
Expand Down
116 changes: 58 additions & 58 deletions src/garhwal-school.webmanifest
Original file line number Diff line number Diff line change
@@ -1,60 +1,60 @@
{
"name": "Garhwal English Medium School",
"short_name": "GEMS",
"theme_color": "#1976d2",
"background_color": "#fafafa",
"display": "standalone",
"scope": "./",
"start_url": "./",
"icons": [
{
"src": "assets/school/GEMS_72x72.png",
"sizes": "72x72",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "assets/school/GEMS_96x96.png",
"sizes": "96x96",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "assets/school/GEMS_128x128.png",
"sizes": "128x128",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "assets/school/GEMS_144x144.png",
"sizes": "144x144",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "assets/school/GEMS_152x152.png",
"sizes": "152x152",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "assets/school/GEMS_192x192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "assets/school/GEMS_384x384.png",
"sizes": "384x384",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "assets/school/GEMS_512x512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "maskable any"
}
]
}
"name": "Garhwal English Medium School",
"short_name": "GEMS",
"theme_color": "#1976d2",
"background_color": "#fafafa",
"display": "standalone",
"scope": "./",
"start_url": "./",
"icons": [
{
"src": "assets/school/GEMS_72x72.png",
"sizes": "72x72",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "assets/school/GEMS_96x96.png",
"sizes": "96x96",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "assets/school/GEMS_128x128.png",
"sizes": "128x128",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "assets/school/GEMS_144x144.png",
"sizes": "144x144",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "assets/school/GEMS_152x152.png",
"sizes": "152x152",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "assets/school/GEMS_192x192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "assets/school/GEMS_384x384.png",
"sizes": "384x384",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "assets/school/GEMS_512x512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "maskable any"
}
]
}

0 comments on commit 59bbdbb

Please sign in to comment.