Skip to content

Commit

Permalink
Merge pull request #304 from Sunbird-cQube/dev
Browse files Browse the repository at this point in the history
merge dev to staging
  • Loading branch information
htvenkatesh authored Jul 12, 2023
2 parents 1664d28 + d15e9d9 commit 605174c
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 47 deletions.
2 changes: 1 addition & 1 deletion src/app/core/services/map/map.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class MapService {
}

async getStateGeoJSON(drillDownDetails?: any): Promise<any> {
if (!this.stateGeoJSON) {
if (!this.stateGeoJSON || environment.config === 'NVSK') {
var response;
if (environment.config === 'NVSK' && drillDownDetails?.state) {
let stateCode = StateCodes[Number(drillDownDetails?.state)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#map {
height: 90vh;
}

// ::ng-deep{
// .leaflet-pane {
// z-index: 1002 !important;
Expand All @@ -10,21 +11,29 @@
// min-width: fit-content !important;
// }
// }
::ng-deep{
.leaflet-notification{
::ng-deep {
.leaflet-popup {
word-break: break-all;
// min-width: fit-content !important;
}

.leaflet-notification {
background-color: white;
padding: 10px;
margin-right: 0px;
color: red;
font-size: 11px;
font-weight: 700;
}

.leaflet-top {
pointer-events: auto !important;
}
.clickable-range{

.clickable-range {
cursor: pointer;
}

.legend-range {
margin-top: 10px;
padding: 5px;
Expand All @@ -35,18 +44,22 @@
font-weight: bold;
width: 100%;
}
.leaflet-interactive:focus, .leaflet-interactive:active{
outline:none;

.leaflet-interactive:focus,
.leaflet-interactive:active {
outline: none;
}
.legend-checkbox{

.legend-checkbox {
display: inline-block;
// margin-bottom: 0.5rem;
margin-top: 3px;
float: left;
margin-left: 10px;
display: flex !important;
}
.button-content{

.button-content {
display: column;
// justify-content: space-evenly;
}
Expand Down
3 changes: 2 additions & 1 deletion src/app/views/ncert-quiz/config/quiz_config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,8 @@ export const config = {
"options": {
"bigNumber": {
"title": ['Total Quizzes', 'Total Medium', 'Total States/UTs Participating', 'Total Enrolment', 'Total Certification'],
"property": ['total_quizzes', 'total_medium', 'total_states', 'total_enrolment', 'total_certification']
"property": ['total_quizzes', 'total_medium', 'total_states', 'total_enrolment', 'total_certification'],
"valueSuffix": ['', '', '', '', '']
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/views/ncf/config/ncf_config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export const config = {
],
"options": {
"bigNumber": {
"title": ['Total District Consultation Report (DCR) Completed/Uploaded', 'Total Mobile Survey', 'Total National District Groups (NDGs) created', 'Total Digital Survey for National Curriculum (DiSaNC) Survey',],
"title": ['Total District Consultation Report (DCR) Completed/Uploaded', 'Total Mobile Survey', 'Total National District Groups (NDGs) created', 'Total Digital Survey for National Curriculum (DiSaNC) Survey'],
"valueSuffix": ['','','',''],
"property": ['total_dcr', 'total_mobile_survey', 'total_ndg', 'participants']
}
Expand Down
6 changes: 3 additions & 3 deletions src/app/views/pgi/config/pgi_config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ export const config = {
"hierarchyLevel": "0",
"actions": {
"queries": {
"bigNumber1": "select sum(sum) as outcome from datasets.pgi_category_ermmbwaaaaaaaaaalxqd as t where category_name = 'outcome'",
"bigNumber2": "select sum(sum) as infra_score from datasets.pgi_category_ermmbwaaaaaaaaaalxqd as t where category_name = 'infrastructure_facilities_studententitlements'",
"bigNumber3": "select sum(sum) as governance_processes from datasets.pgi_category_ermmbwaaaaaaaaaalxqd as t where category_name = 'governance_processes'",
"bigNumber1": "select sum(sum) as outcome from datasets.pgi_category_state0categorypgi as t where category_name = 'outcome'",
"bigNumber2": "select sum(sum) as infra_score from datasets.pgi_category_state0categorypgi as t where category_name = 'infrastructure_facilities_studententitlements'",
"bigNumber3": "select sum(sum) as governance_processes from datasets.pgi_category_state0categorypgi as t where category_name = 'governance_processes'",
"bigNumber4": "",
"bigNumber5": ""
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,25 @@ export class StateWisePerformanceComponent implements OnInit, OnDestroy {
}

async getReportData(values: any): Promise<void> {
let { filterValues, timeSeriesValues } = values ?? {};
this.startDate = timeSeriesValues?.startDate;
this.endDate = timeSeriesValues?.endDate;
let metricFilter = [...filterValues].filter((filter: any) => {
return filter.filterType === 'metric'
})
this.metricFilter = metricFilter

filterValues = [...filterValues].filter((filter: any) => {
return filter.filterType !== 'metric'
})

this.commonFilter = filterValues
if (this.drillDownDetails !== undefined) {
let result: any = await this._drillDownService.drilldown({ hierarchyLevel: this.drillDownLevel }, this.rbacDetails, config[this.reportName], this.startDate, this.endDate, this.drillDownDetails, this.metricFilter, this.commonFilter)
this.drillDownDetails = result?.drillDownDetails
this.reportData = result?.reportData
}
else {
let { filterValues, timeSeriesValues } = values ?? {};
this.startDate = timeSeriesValues?.startDate;
this.endDate = timeSeriesValues?.endDate;
let reportConfig = config

let { timeSeriesQueries, queries, levels, defaultLevel, filters, options } = reportConfig[this.reportName];
Expand Down Expand Up @@ -102,18 +112,6 @@ export class StateWisePerformanceComponent implements OnInit, OnDestroy {
}
let query = buildQuery(onLoadQuery, defaultLevel, this.levels, this.filters, this.startDate, this.endDate, key, this.compareDateRange);

let metricFilter = [...filterValues].filter((filter: any) => {
return filter.filterType === 'metric'
})
this.metricFilter = metricFilter

filterValues = [...filterValues].filter((filter: any) => {
return filter.filterType !== 'metric'
})

this.commonFilter = filterValues


filterValues.forEach((filterParams: any) => {
query = parseFilterToQuery(query, filterParams)
});
Expand Down
10 changes: 5 additions & 5 deletions src/app/views/udise/config/udise_config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,10 @@ export const config = {
"actions": {
"queries": {
"bigNumber1": "select sum(sum) as total_students from datasets.udise_no_of_students_state",
"bigNumber2": "select round(cast (avg(sum) as numeric),2) as ptr from datasets.udise_category_ynl7ygbvaaaaaaaaaaaq where category_name = 'ptr'",
"bigNumber3": "select round(cast (avg(sum) as numeric),2) as schs_with_toilet from datasets.udise_category_ynl7ygbvaaaaaaaaaaaq where category_name = '%_schools_having_toilet'",
"bigNumber4": "select round(cast (avg(sum) as numeric),2) as schs_having_electricity from datasets.udise_category_ynl7ygbvaaaaaaaaaaaq where category_name = '%_schools_having_electricity'",
"bigNumber5": "select round(cast (avg(sum) as numeric),2) as schs_having_water from datasets.udise_category_ynl7ygbvaaaaaaaaaaaq where category_name = '%_schools_having_drinking_water'",
"bigNumber2": "select round(cast (avg(sum) as numeric),2) as ptr from datasets.udise_category_state0categoryudise where category_name = 'ptr'",
"bigNumber3": "select round(cast (avg(sum) as numeric),2) as schs_with_toilet from datasets.udise_category_state0categoryudise where category_name = '%_schools_having_toilet'",
"bigNumber4": "select round(cast (avg(sum) as numeric),2) as schs_having_electricity from datasets.udise_category_state0categoryudise where category_name = '%_schools_having_electricity'",
"bigNumber5": "select round(cast (avg(sum) as numeric),2) as schs_having_water from datasets.udise_category_state0categoryudise where category_name = '%_schools_having_drinking_water'",
},
"level": "state"
}
Expand Down Expand Up @@ -260,7 +260,7 @@ export const config = {
{
"queries":
{
"map": "select t2.district_name, t1.district_id, t1.district_id as level , t1.category_name,latitude, longitude,round(cast(sum(t1.sum) as numeric ),2) as percentage from datasets.udise_category_district0categoryudise as t1 join dimensions.district as t2 on t2.district_id = t1.district_id group by t1.district_id, t2.district_name,t1.category_name, latitude, longitude"
"map": "select t2.district_name, t1.district_id, t1.district_id as level , t1.category_name,latitude, longitude,round(cast(sum(t1.sum) as numeric ),2) as percentage from datasets.udise_category_district0categoryudise as t1 join dimensions.district as t2 on t2.district_id = t1.district_id where t2.state_id = {state_id} group by t1.district_id, t2.district_name,t1.category_name, latitude, longitude"
},
"level": "district",
"nextLevel": "block"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,25 @@ export class StateWisePerformanceComponent implements OnInit, OnDestroy {
}

async getReportData(values: any): Promise<void> {
let { filterValues, timeSeriesValues } = values ?? {};
this.startDate = timeSeriesValues?.startDate;
this.endDate = timeSeriesValues?.endDate;
let metricFilter = [...filterValues].filter((filter: any) => {
return filter.filterType === 'metric'
})
this.metricFilter = metricFilter

filterValues = [...filterValues].filter((filter: any) => {
return filter.filterType !== 'metric'
})

this.commonFilter = filterValues
if (this.drillDownDetails !== undefined) {
let result: any = await this._drillDownService.drilldown({ hierarchyLevel: this.drillDownLevel }, this.rbacDetails, config[this.reportName], this.startDate, this.endDate, this.drillDownDetails, this.metricFilter, this.commonFilter)
this.drillDownDetails = result?.drillDownDetails
this.reportData = result?.reportData
}
else {
let { filterValues, timeSeriesValues } = values ?? {};
this.startDate = timeSeriesValues?.startDate;
this.endDate = timeSeriesValues?.endDate;
let reportConfig = config

let { timeSeriesQueries, queries, levels, defaultLevel, filters, options } = reportConfig[this.reportName];
Expand Down Expand Up @@ -106,17 +116,6 @@ export class StateWisePerformanceComponent implements OnInit, OnDestroy {
}
let query = buildQuery(onLoadQuery, defaultLevel, this.levels, this.filters, this.startDate, this.endDate, key, this.compareDateRange);

let metricFilter = [...filterValues].filter((filter: any) => {
return filter.filterType === 'metric'
})
this.metricFilter = metricFilter

filterValues = [...filterValues].filter((filter: any) => {
return filter.filterType !== 'metric'
})

this.commonFilter = filterValues

filterValues.forEach((filterParams: any) => {
query = parseFilterToQuery(query, filterParams)
});
Expand Down

0 comments on commit 605174c

Please sign in to comment.