fix conflict

MOHEMM-SFH-COLORS
ashwaq 6 years ago
commit 7779a2ed61

@ -190,7 +190,20 @@
"cordova-plugin-fingerprint-aio": {
"FACEID_USAGE_DESCRIPTION": "User Authentication"
},
"cordova-plugin-firebasex": {}
"cordova-plugin-firebasex": {
"FIREBASE_ANALYTICS_COLLECTION_ENABLED": "true",
"FIREBASE_PERFORMANCE_COLLECTION_ENABLED": "true",
"FIREBASE_CRASHLYTICS_COLLECTION_ENABLED": "true",
"ANDROID_ICON_ACCENT": "#FF00FFFF",
"ANDROID_PLAY_SERVICES_TAGMANAGER_VERSION": "17.0.0",
"ANDROID_FIREBASE_ANALYTICS_VERSION": "17.2.1",
"ANDROID_FIREBASE_MESSAGING_VERSION": "20.0.0",
"ANDROID_FIREBASE_CONFIG_VERSION": "19.0.3",
"ANDROID_FIREBASE_PERF_VERSION": "19.0.1",
"ANDROID_FIREBASE_AUTH_VERSION": "19.1.0",
"ANDROID_CRASHLYTICS_VERSION": "2.10.1",
"ANDROID_CRASHLYTICS_NDK_VERSION": "2.1.1"
}
},
"platforms": [
"browser",
@ -198,4 +211,4 @@
"android"
]
}
}
}

@ -102,6 +102,7 @@ import { AccordinCustomComponent } from './ui/accordin-custom/accordin-custom.co
import { AccordinTabCustomComponent} from './ui/accordin-custom/accordin-tab-custom/accordin-tab-custom.component';
import{ConfirmLoginComponent} from '../authentication/confirm-login/confirm-login.component'
import{WelcomeComponent} from './ui/welcome-login/welcome.component'
import {DashboredService} from './services/dashbored/dashbored.service'
@NgModule({
imports: [
CommonModule,
@ -229,6 +230,7 @@ import{WelcomeComponent} from './ui/welcome-login/welcome.component'
],
providers: [
DashboredService,
ConnectorService,
TranslatorService,
Globalization,

@ -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;
}

@ -0,0 +1,9 @@
export class OpenMissingSwipesList{
public OPEN_MISSING_SWIPES :number;
public RETURN_STATUS : string;
public RETURN_MSG : string;
}

@ -0,0 +1,4 @@
export class OrganizationsSalariesList{
public ORGANIZATION_NAME :string;
public ORGANIZATIONS_SALARIES : number;
}

@ -0,0 +1,6 @@
export class PerformanceAppraisalList{
public APPRAISAL_SCORE :string;
public APPRAISAL_YEAR : number;
}

@ -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[];
}

@ -0,0 +1,12 @@
import { TestBed } from '@angular/core/testing';
import { DashboredService } from './dashbored.service';
describe('DashboredService', () => {
beforeEach(() => TestBed.configureTestingModule({}));
it('should be created', () => {
const service: DashboredService = TestBed.get(DashboredService);
expect(service).toBeTruthy();
});
});

@ -0,0 +1,99 @@
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'
import {OpenPeriodDatesResponse} from '../../services/dashbored/models/openPeriodDatesResponse'
import {GetSubordinatesLeavesRequest} from './models/GetSubordinatesLeavesRequest';
import {GetSubordinatesLeavesResponse} from './models/GetSubordinatesLeavesResponse';
import {GetSubordinatesAttdStatusRequest} from './models/GetSubordinatesAttdStatusRequest';
import {GetSubordinatesAttdStatusResponse} from './models/GetSubordinatesAttdStatusResponse';
import {GetOpenNotificationsResponse} from './models/GetOpenNotificationsResponse'
@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"
public static getOpenPeriodDates = 'Services/ERP.svc/REST/GET_OPEN_PERIOD_DATES';
public static getOpenNotifications = 'Services/ERP.svc/REST/GET_OPEN_NOTIFICATIONS';
public static getSubordinatesLeaves = 'Services/ERP.svc/REST/GET_SUBORDINATES_LEAVES';
public static getSubordinatesAttStatus = 'Services/ERP.svc/REST/GET_SUBORDINATES_ATTD_STATUS';
constructor(
public con: ConnectorService,
public authService: AuthenticationService,
) { }
public getOrganizationSalaries(onError ?:any ,oerrorLable ?:any):Observable<OrganizationSalariesResponse>{
const request = new Request();
this.authService.authenticateRequest(request);
return this.con.post(
DashboredService.organizationSalariesUrl,
request,
onError,
oerrorLable
);}
public getOpenMissingSwipes(onError ?:any ,oerrorLable ?:any):Observable<OpenMissingSwipesResponse>{
const request = new Request();
this.authService.authenticateRequest(request);
return this.con.post(
DashboredService.openmissingswipesUrl,
request,
onError,
oerrorLable
);
}
public getPerformanceAppraisal(onError ?:any ,oerrorLable ?:any):Observable<PerformanceAppraisalResponse>{
const request = new Request();
this.authService.authenticateRequest(request);
return this.con.post(
DashboredService.performanceappraisalUrl,
request,
onError,
oerrorLable
);
}
public getAttendanceTracking(onError ?:any ,oerrorLable ?:any):Observable<AttendanceTrackingResponse>{
const request = new Request();
this.authService.authenticateRequest(request);
return this.con.post(
DashboredService.attendancetrackingUrl,
request,
onError,
oerrorLable
);
}
public getOpenPeriodDates( onError?: any, errorLabel?: string): Observable<OpenPeriodDatesResponse> {
const request = new Request();
this.authService.authenticateRequest(request);
return this.con.post(DashboredService.getOpenPeriodDates, request, onError, errorLabel);
}
public getOpenNotifications( onError?: any, errorLabel?: string): Observable<GetOpenNotificationsResponse> {
const request = new Request();
this.authService.authenticateRequest(request);
return this.con.post(DashboredService.getOpenNotifications, request, onError, errorLabel);
}
public getSubordinatesLeaves( req:GetSubordinatesLeavesRequest,onError?: any, errorLabel?: string): Observable<GetSubordinatesLeavesResponse> {
this.authService.authenticateRequest(req);
return this.con.post(DashboredService.getSubordinatesLeaves, req, onError, errorLabel);
}
public getSubordinatesAttStatus( req:GetSubordinatesAttdStatusRequest, onError?: any, errorLabel?: string): Observable<GetSubordinatesAttdStatusResponse> {
this.authService.authenticateRequest(req);
return this.con.post(DashboredService.getSubordinatesAttStatus, req, onError, errorLabel);
}
}

@ -0,0 +1,11 @@
export class GetOpenNotificationsList
{
public ITEM_TYPE: number;
public ITEM_TYPE_DISPLAY_NAME:number;
public OPEN_NTF_NUMBER:number;
}

@ -0,0 +1,7 @@
import { GetOpenNotificationsList } from './GetOpenNotificationsList';
import { Response } from '../../../services/models/response'
export class GetOpenNotificationsResponse extends Response {
public GetOpenNotificationsList: GetOpenNotificationsList [];
}

@ -0,0 +1,16 @@
export class GetSubordinatesAttdStatusList
{
public NUMBER_OF_EMPLOYEES: number;
public LATE_IN:number;
public EARLY_OUT:number;
public ON_TIME:number;
public ABSENCE:number;
}

@ -0,0 +1,7 @@
import { Request } from '../../../services/models/request'
export class GetSubordinatesAttdStatusRequest extends Request{
//public static SHARED_DATA = '';
public P_SCHEDULE_DATE_FROM :any;
public P_SCHEDULE_DATE_TO :any;
}

@ -0,0 +1,7 @@
import { GetSubordinatesAttdStatusList } from './GetSubordinatesAttdStatusList';
import { Response } from '../../../services/models/response'
export class GetSubordinatesAttdStatusResponse extends Response {
public GetSubordinatesAttdStatusList: GetSubordinatesAttdStatusList [];
}

@ -0,0 +1,35 @@
export class GetSubordinatesLeavesList
{
public LVL: number;
public EMPLOYEE_NUMBER:String;
public EMPLOYEE_NAME:String;
public ORGANIZATION_ID:number;
public ORGANIZATION_NAME:String
public SUPERVISOR_NUMBER:String;
public SUPERVISOR_NAME:String;
public SUPERVISOR_ORGANIZATION_ID:number;
public SUPERVISOR_ORGANIZATION_NAME:String;
public EVENT_DATE:any;//DATE;
public LEAVE_TYPE:String;
public DATE_START:any;//DATE;
public DATE_END:any;//DATE;
public ABSENCE_ATTENDANCE_TYPE_NAME:String;
public CALENDAR_ENTRY_DESC:String;
public STATUS:String;
}

@ -0,0 +1,8 @@
import { Request } from '../../../services/models/request'
export class GetSubordinatesLeavesRequest extends Request{
//public static SHARED_DATA = '';
public P_DATE_FROM :any;
public P_DATE_TO :any;
}

@ -0,0 +1,7 @@
import { GetSubordinatesLeavesList } from './GetSubordinatesLeavesList';
import { Response } from '../../../services/models/response'
export class GetSubordinatesLeavesResponse extends Response {
public GetSubordinatesLeavesList: GetSubordinatesLeavesList [];
}

@ -0,0 +1,7 @@
export class OpenPeriodDatesList {
public P_CLOSING_PERIOD_DATE: any;
public P_PERIOD_END_DATE: any;
public P_PERIOD_START_DATE: any;
public P_RETURN_MSG: string;
public P_RETURN_STATUS: string;
}

@ -0,0 +1,7 @@
import { OpenPeriodDatesList } from './openPeriodDatesList';
import { Response } from '../../../services/models/response'
export class OpenPeriodDatesResponse extends Response {
public openPeriodDatesList: OpenPeriodDatesList [];
}

@ -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[];
}

@ -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[];
}

@ -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[];
}

@ -25,6 +25,18 @@ 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';
import { OpenPeriodDatesResponse } from '../hmg-common/services/dashbored/models/openPeriodDatesResponse';
import {GetSubordinatesAttdStatusRequest} from '../hmg-common/services/dashbored/models/GetSubordinatesAttdStatusRequest';
import {GetSubordinatesLeavesRequest} from '../hmg-common/services/dashbored/models/GetSubordinatesLeavesRequest'
import {GetOpenNotificationsResponse}from '../hmg-common/services/dashbored/models/GetOpenNotificationsResponse'
import {GetSubordinatesAttdStatusResponse}from '../hmg-common/services/dashbored/models/GetSubordinatesAttdStatusResponse'
import {GetSubordinatesLeavesResponse}from '../hmg-common/services/dashbored/models/GetSubordinatesLeavesResponse'
@Component({
selector: "app-home",
@ -66,7 +78,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 +390,90 @@ 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) => {
});;
}
openPeriodDateDashbored(){
this.DS.getOpenPeriodDates( ()=> {console.log("Error ");} ).subscribe((result:OpenPeriodDatesResponse)=>{
if (this.common.validResponse(result)) {
console.log("response");
}
});
}
openNotificationsDashbored(){
this.DS.getOpenNotifications( ()=> {console.log("Error ");} ).subscribe((result:GetOpenNotificationsResponse)=>{
if (this.common.validResponse(result)) {
console.log("response");
console.log(result);
}
});
}
getSubordinatesLeaves(){
let request:GetSubordinatesLeavesRequest=new GetSubordinatesLeavesRequest();
request.P_DATE_FROM="/Date(1578603600000+0300)/"; //test
request.P_DATE_TO="/Date(1576011600000+0300)/"; //test
this.DS.getSubordinatesLeaves( request,()=> {console.log("Error ");} ).subscribe((result:GetSubordinatesLeavesResponse)=>{
if (this.common.validResponse(result)) {
console.log("response");
console.log(result);
}
});
}
getSubordinatesAttStatus(){
let request: GetSubordinatesAttdStatusRequest = new GetSubordinatesAttdStatusRequest();
request.P_SCHEDULE_DATE_FROM="/Date(1578603600000+0300)/"; //test
request.P_SCHEDULE_DATE_TO="/Date(1576011600000+0300)/";//test
this.DS.getSubordinatesAttStatus( request,()=> {console.log("Error ");} ).subscribe((result:GetSubordinatesAttdStatusResponse)=>{
if (this.common.validResponse(result)) {
console.log("response");
console.log(result);
}
});
}
}

@ -7,7 +7,6 @@ import { WorKListResponse } from "../models/workListResponse";
import { WorklistService } from "../service/worklist.service";
import { IonInfiniteScroll } from '@ionic/angular';
import { WorklistMainService } from '../service/work-list.main.service';
@Component({
selector: "app-home",
templateUrl: "./home.component.html",
@ -48,7 +47,7 @@ export class HomeComponent implements OnInit {
public common: CommonService,
public ts: TranslatorService,
public WorklistService: WorklistService,
public workListService: WorklistMainService
public workListService: WorklistMainService,
) {
this.WorkListObj = new WorkListRequest();
this.WorkListObj.P_NOTIFICATION_TYPE = "1";
@ -332,4 +331,6 @@ export class HomeComponent implements OnInit {
this.isSearch = !this.isSearch;
}
}

Loading…
Cancel
Save