updated minister-reports component by creating reports based on specificfilters

parent e72a58de
......@@ -176,18 +176,18 @@
background-color: #fd9665;
}
.changecolor
.changecolor
{
color: red;
}
.changelistcolor
.changelistcolor
{
color:red!important ;
}
.aastyle{
color:black!important ;
color:black!important ;
}
.roundedNumber{
......@@ -223,3 +223,11 @@ overflow-x: scroll;
.d3-chart .axis text {
fill: #999;
}
.btn-lg.round {
border-radius: 24px;
}
.btn.sharp {
border-radius:0;
}
......@@ -667,7 +667,7 @@ export class HelperDataService implements OnInit, OnDestroy {
}
makeReport(username, userpassword, routepath) {
makeReport(username, userpassword, routepath, regionsel, adminsel, schsel) {
let headers = new Headers({
"Content-Type": "application/json",
......@@ -676,7 +676,10 @@ export class HelperDataService implements OnInit, OnDestroy {
this.createMinistryAuthorizationHeader(headers, username, userpassword );
let options = new RequestOptions({ headers: headers });
return this.http.get(`${AppSettings.API_ENDPOINT}` + routepath , options)
console.log("Testing..");
console.log(`${AppSettings.API_ENDPOINT}` + routepath + regionsel);
return this.http.get(`${AppSettings.API_ENDPOINT}` + routepath + regionsel + "/" + adminsel + "/" + schsel, options)
.map(response => response.json());
}
......@@ -710,7 +713,6 @@ export class HelperDataService implements OnInit, OnDestroy {
console.log(PerfectureId,"a");
let PerfectureIdNew = PerfectureId.toString();
this.loginInfo$.getValue().forEach(loginInfoToken => {
this.authToken = loginInfoToken.auth_token;
this.authRole = loginInfoToken.auth_role;
......@@ -718,7 +720,6 @@ export class HelperDataService implements OnInit, OnDestroy {
console.log("authToken=" + this.authToken);
console.log("authRole=" + this.authRole);
let headers = new Headers({
"Content-Type": "application/json",
});
......@@ -740,7 +741,6 @@ export class HelperDataService implements OnInit, OnDestroy {
console.log("authToken=" + this.authToken);
console.log("authRole=" + this.authRole);
let headers = new Headers({
"Content-Type": "application/json",
});
......@@ -750,6 +750,70 @@ export class HelperDataService implements OnInit, OnDestroy {
.map(response => response.json());
}
getRegions(username, userpassword) {
let headers = new Headers({
"Content-Type": "application/json",
});
this.createMinistryAuthorizationHeader(headers, username, userpassword );
let options = new RequestOptions({ headers: headers });
//return this.http.get(`${AppSettings.API_ENDPOINT}` + routepath , options)
// .map(response => response.json());
return this.http.get(`${AppSettings.API_ENDPOINT}/regionfields/list` , options)
.map(response => response.json());
}
getAdminAreas(username, userpassword, regionid) {
let headers = new Headers({
"Content-Type": "application/json",
});
this.createMinistryAuthorizationHeader(headers, username, userpassword );
let options = new RequestOptions({ headers: headers });
//return this.http.get(`${AppSettings.API_ENDPOINT}` + routepath , options)
// .map(response => response.json());
console.log("Test");
console.log(`${AppSettings.API_ENDPOINT}/adminfields/list/?region=` + regionid);
return this.http.get(`${AppSettings.API_ENDPOINT}/adminfields/list/?region=` + regionid , options)
.map(response => response.json());
}
getSchoolsPerRegion(username, userpassword, regionid) {
let headers = new Headers({
"Content-Type": "application/json",
});
this.createMinistryAuthorizationHeader(headers, username, userpassword );
let options = new RequestOptions({ headers: headers });
console.log("Test2");
console.log(`${AppSettings.API_ENDPOINT}/schoolfields_per_region/list/?region=` + regionid);
return this.http.get(`${AppSettings.API_ENDPOINT}/schoolfields_per_region/list/?region=` + regionid , options)
.map(response => response.json());
}
getSchoolsPerAdminArea(username, userpassword, adminid) {
let headers = new Headers({
"Content-Type": "application/json",
});
this.createMinistryAuthorizationHeader(headers, username, userpassword );
let options = new RequestOptions({ headers: headers });
console.log("Test3");
console.log(`${AppSettings.API_ENDPOINT}/schoolfields_per_admin/list/?adminarea=` + adminid);
return this.http.get(`${AppSettings.API_ENDPOINT}/schoolfields_per_admin/list/?adminarea=` + adminid , options)
.map(response => response.json());
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment