diff --git a/Mohem/src/app/hmg-common/services/dashbored/AttensanceTrackingList.ts b/Mohem/src/app/hmg-common/services/dashbored/AttensanceTrackingList.ts new file mode 100644 index 00000000..e4b22244 --- /dev/null +++ b/Mohem/src/app/hmg-common/services/dashbored/AttensanceTrackingList.ts @@ -0,0 +1,9 @@ + + +export class AttendanceTrackingList{ + public SCHEDULED_HOURS :string; + public SPENT_HOURS : string; + public REMAINING_HOURS : string; + public RETURN_STATUS : string; + public RETURN_MSG : string; +} \ No newline at end of file diff --git a/Mohem/src/app/hmg-common/services/dashbored/OpenMissingSwipesList.ts b/Mohem/src/app/hmg-common/services/dashbored/OpenMissingSwipesList.ts new file mode 100644 index 00000000..8b433128 --- /dev/null +++ b/Mohem/src/app/hmg-common/services/dashbored/OpenMissingSwipesList.ts @@ -0,0 +1,9 @@ + + +export class OpenMissingSwipesList{ + public OPEN_MISSING_SWIPES :number; + public RETURN_STATUS : string; + public RETURN_MSG : string; + +} + \ No newline at end of file diff --git a/Mohem/src/app/hmg-common/services/dashbored/OrganizationsSalariesList.ts b/Mohem/src/app/hmg-common/services/dashbored/OrganizationsSalariesList.ts new file mode 100644 index 00000000..16416bb3 --- /dev/null +++ b/Mohem/src/app/hmg-common/services/dashbored/OrganizationsSalariesList.ts @@ -0,0 +1,4 @@ +export class OrganizationsSalariesList{ + public ORGANIZATION_NAME :string; + public ORGANIZATIONS_SALARIES : number; +} \ No newline at end of file diff --git a/Mohem/src/app/hmg-common/services/dashbored/PerformanceAppraisalList.ts b/Mohem/src/app/hmg-common/services/dashbored/PerformanceAppraisalList.ts new file mode 100644 index 00000000..c932202a --- /dev/null +++ b/Mohem/src/app/hmg-common/services/dashbored/PerformanceAppraisalList.ts @@ -0,0 +1,6 @@ + +export class PerformanceAppraisalList{ + public APPRAISAL_SCORE :string; + public APPRAISAL_YEAR : number; + +} \ No newline at end of file diff --git a/Mohem/src/app/hmg-common/services/dashbored/attendance-tracking.response.ts b/Mohem/src/app/hmg-common/services/dashbored/attendance-tracking.response.ts new file mode 100644 index 00000000..82ec2ae0 --- /dev/null +++ b/Mohem/src/app/hmg-common/services/dashbored/attendance-tracking.response.ts @@ -0,0 +1,8 @@ + + +import { Response } from "src/app/hmg-common/services/models/response"; +import { AttendanceTrackingList } from './AttensanceTrackingList'; + + export class AttendanceTrackingResponse extends Response{ + public GetGetAttendanceTrackingList : AttendanceTrackingList[]; + } \ No newline at end of file diff --git a/Mohem/src/app/hmg-common/services/dashbored/dashbored.service.ts b/Mohem/src/app/hmg-common/services/dashbored/dashbored.service.ts index 8cb5a14a..808b5603 100644 --- a/Mohem/src/app/hmg-common/services/dashbored/dashbored.service.ts +++ b/Mohem/src/app/hmg-common/services/dashbored/dashbored.service.ts @@ -2,16 +2,70 @@ import { Injectable } from '@angular/core'; import { AuthenticationService } from "src/app/hmg-common/services/authentication/authentication.service"; import { ConnectorService } from "src/app/hmg-common/services/connector/connector.service"; import { Observable } from 'rxjs'; +import { Request } from "src/app/hmg-common/services/models/request"; +import { OrganizationSalariesResponse } from './organization-salaries.response'; +import { OpenMissingSwipesResponse } from './open-missing-swipes.response'; +import { PerformanceAppraisalResponse } from './performance-appraisal.response'; +import {AttendanceTrackingResponse} from './attendance-tracking.response' + @Injectable({ providedIn: 'root' }) export class DashboredService { + public static organizationSalariesUrl="Services/ERP.svc/REST/GET_ORGANIZATIONS_SALARIES" + public static openmissingswipesUrl="Services/ERP.svc/REST/GET_OPEN_MISSING_SWIPES" + public static performanceappraisalUrl="Services/ERP.svc/REST/GET_Performance_Appraisal" + public static attendancetrackingUrl="Services/ERP.svc/REST/GET_Attendance_Tracking" + constructor( - public api: ConnectorService, + public con: ConnectorService, public authService: AuthenticationService, ) { } + public getOrganizationSalaries(onError ?:any ,oerrorLable ?:any):Observable{ + const request = new Request(); + this.authService.authenticateRequest(request); + return this.con.post( + DashboredService.organizationSalariesUrl, + request, + onError, + oerrorLable + );} + + public getOpenMissingSwipes(onError ?:any ,oerrorLable ?:any):Observable{ + const request = new Request(); + this.authService.authenticateRequest(request); + return this.con.post( + DashboredService.openmissingswipesUrl, + request, + onError, + oerrorLable + ); + } + + + public getPerformanceAppraisal(onError ?:any ,oerrorLable ?:any):Observable{ + const request = new Request(); + this.authService.authenticateRequest(request); + return this.con.post( + DashboredService.performanceappraisalUrl, + request, + onError, + oerrorLable + ); +} +public getAttendanceTracking(onError ?:any ,oerrorLable ?:any):Observable{ + const request = new Request(); + this.authService.authenticateRequest(request); + return this.con.post( + DashboredService.attendancetrackingUrl, + request, + onError, + oerrorLable + ); +} + } diff --git a/Mohem/src/app/hmg-common/services/dashbored/open-missing-swipes.response.ts b/Mohem/src/app/hmg-common/services/dashbored/open-missing-swipes.response.ts new file mode 100644 index 00000000..63945935 --- /dev/null +++ b/Mohem/src/app/hmg-common/services/dashbored/open-missing-swipes.response.ts @@ -0,0 +1,8 @@ + + +import { Response } from "src/app/hmg-common/services/models/response"; +import { OpenMissingSwipesList } from './OpenMissingSwipesList'; + + export class OpenMissingSwipesResponse extends Response{ +public GetGetOpenMissingSwipesList : OpenMissingSwipesList[]; + } \ No newline at end of file diff --git a/Mohem/src/app/hmg-common/services/dashbored/organization-salaries.response.ts b/Mohem/src/app/hmg-common/services/dashbored/organization-salaries.response.ts new file mode 100644 index 00000000..9dbd2e53 --- /dev/null +++ b/Mohem/src/app/hmg-common/services/dashbored/organization-salaries.response.ts @@ -0,0 +1,6 @@ +import { Response } from "src/app/hmg-common/services/models/response"; +import { OrganizationsSalariesList } from './OrganizationsSalariesList'; + + export class OrganizationSalariesResponse extends Response{ + public GetGetOrganizationsSalariesList : OrganizationsSalariesList[]; + } \ No newline at end of file diff --git a/Mohem/src/app/hmg-common/services/dashbored/performance-appraisal.response.ts b/Mohem/src/app/hmg-common/services/dashbored/performance-appraisal.response.ts new file mode 100644 index 00000000..9dbe5845 --- /dev/null +++ b/Mohem/src/app/hmg-common/services/dashbored/performance-appraisal.response.ts @@ -0,0 +1,9 @@ + + + +import { Response } from "src/app/hmg-common/services/models/response"; +import { PerformanceAppraisalList } from './PerformanceAppraisalList'; + + export class PerformanceAppraisalResponse extends Response{ +public GetGetPerformanceAppraisalList :PerformanceAppraisalList[]; + } \ No newline at end of file diff --git a/Mohem/src/app/home/home.page.ts b/Mohem/src/app/home/home.page.ts index c4f01a48..b3c48889 100644 --- a/Mohem/src/app/home/home.page.ts +++ b/Mohem/src/app/home/home.page.ts @@ -25,6 +25,12 @@ import { DomSanitizer } from '@angular/platform-browser'; import {FileUploderProfileComponent} from '../hmg-common/ui/file-uploder-profile/file-uploder-profile.component' import { SharedDataService } from '../hmg-common/services/shared-data-service/shared-data.service'; import { DevicePermissionsService } from '../hmg-common/services/device-permissions/device-permissions.service'; +import { DashboredService } from '../hmg-common/services/dashbored/dashbored.service'; +import { OrganizationSalariesResponse } from '../hmg-common/services/dashbored/organization-salaries.response'; +import { OpenMissingSwipesResponse} from '../hmg-common/services/dashbored/open-missing-swipes.response'; +import {PerformanceAppraisalResponse} from '../hmg-common/services/dashbored/performance-appraisal.response'; +import { AttendanceTrackingResponse } from '../hmg-common/services/dashbored/attendance-tracking.response'; + @Component({ selector: "app-home", @@ -66,7 +72,8 @@ export class HomePage implements OnInit { //private transfer: Transfer, private file: File, //private filePath: FilePath - private permissions: DevicePermissionsService + private permissions: DevicePermissionsService, + public DS :DashboredService ) { this.events.subscribe("img-change", displayImg => { @@ -377,4 +384,36 @@ export class HomePage implements OnInit { openPersonalInfo() { this.common.openProfile(); } + + +/*************************************Dashboards Services**********************************************************8 */ + +showOrganizationSalaries(){ + this.DS.getOrganizationSalaries() .subscribe((result: OrganizationSalariesResponse ) => { + + });; +} + +showOpenMissingSwipes(){ + this.DS.getOpenMissingSwipes() .subscribe((result: OpenMissingSwipesResponse) => { + + });; + +} +showPerformanceAppraisal(){ + this.DS.getPerformanceAppraisal() .subscribe((result: PerformanceAppraisalResponse) => { + + });; + + +} + +showAttendanceTracking(){ + this.DS.getAttendanceTracking() .subscribe((result: AttendanceTrackingResponse) => { + + });; + + } +} +