Add Time card Module

master
Mohamed Mekawy 6 years ago
parent 7046c7fa43
commit 7f8a37897c

@ -1,30 +1,31 @@
import { NgModule } from '@angular/core';
import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
import { NgModule } from '@angular/core';
import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
const routes: Routes = [
{ path: '', redirectTo: 'authentication/login', pathMatch: 'full' },
{
path: 'authentication', loadChildren: './authentication/authentication.module#AuthenticationPageModule'},
{ path: 'home', loadChildren: './home/home.module#HomePageModule' },
{ path: 'profile', loadChildren: './profile/profile.module#ProfilePageModule' },
{ path: 'vacation-rule', loadChildren: './vacation-rule/vacation-rule.module#VacationRulePageModule' },
{ path: 'accrual-balances', loadChildren: './accrual-balances/accrual-balances.module#AccrualBalancesPageModule' },
{ path: 'my-team', loadChildren: './my-team/my-team.module#MyTeamPageModule' },
{ path: 'attendance', loadChildren: './attendance/attendance.module#AttendancePageModule' },
{ path: 'eit', loadChildren: './eit/eit.module#EITPageModule' },
{ path: 'absence', loadChildren: './absence/absence.module#AbsencePageModule' },
{ path: 'notification', loadChildren: './notification/notification.module#NotificationPageModule' },
{ path: 'my-specialist', loadChildren: './my-specialist/my-specialist.module#MySpecialistPageModule' },
{ path: 'my-subordinate', loadChildren: './my-subordinate/my-subordinate.module#MySubordinatePageModule' }, { path: 'time-card', loadChildren: './time-card/time-card.module#TimeCardPageModule' }
const routes: Routes = [
{ path: '', redirectTo: 'authentication/login', pathMatch: 'full' },
{
path: 'authentication', loadChildren: './authentication/authentication.module#AuthenticationPageModule'},
{ path: 'home', loadChildren: './home/home.module#HomePageModule' },
{ path: 'profile', loadChildren: './profile/profile.module#ProfilePageModule' },
{ path: 'vacation-rule', loadChildren: './vacation-rule/vacation-rule.module#VacationRulePageModule' },
{ path: 'accrual-balances', loadChildren: './accrual-balances/accrual-balances.module#AccrualBalancesPageModule' },
{ path: 'my-team', loadChildren: './my-team/my-team.module#MyTeamPageModule' },
{ path: 'attendance', loadChildren: './attendance/attendance.module#AttendancePageModule' },
{ path: 'eit', loadChildren: './eit/eit.module#EITPageModule' },
{ path: 'absence', loadChildren: './absence/absence.module#AbsencePageModule' },
{ path: 'notification', loadChildren: './notification/notification.module#NotificationPageModule' },
{ path: 'my-specialist', loadChildren: './my-specialist/my-specialist.module#MySpecialistPageModule' },
{ path: 'my-subordinate', loadChildren: './my-subordinate/my-subordinate.module#MySubordinatePageModule' }
];
@NgModule({
imports: [
/*RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules}),*/
RouterModule.forRoot(routes),
],
exports: [RouterModule]
})
export class AppRoutingModule { }
];
@NgModule({
imports: [
/*RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules}),*/
RouterModule.forRoot(routes),
],
exports: [RouterModule]
})
export class AppRoutingModule { }

File diff suppressed because it is too large Load Diff

@ -23,8 +23,9 @@ export class ConnectorService {
public static timeOut = 30 * 1000;
// public static host = 'http://10.50.100.113:6060/'; // development service
//public static host = "https://uat.hmgwebservices.com/";
//public static host = "https://uat.hmgwebservices.com/";
public static host = 'https://hmgwebservices.com/';
//public static host = 'http://10.200.204.11:4444/'; // production service
// public static host = 'http://10.50.100.198:6060/';
// public static host = 'http://10.50.100.113:6060/'; // development service
/* public static host = 'http://10.50.100.198:6060/';

@ -16,6 +16,7 @@ import { PRNotificatonBodyResponse } from "../models/PRNotificationBodyRes";
import { StaticInjector } from "@angular/core/src/di/injector";
import { POItemHistoryRes } from "../models/POItemHistoryRes";
import { MOItemHistoryRes } from "../models/MOItemHistoryRes";
import { QuotationAnalysisResponse } from '../models/quotationAnalysisRes';
@Injectable()
export class WorklistMainService {
@ -38,6 +39,9 @@ export class WorklistMainService {
"Services/ERP.svc/REST/NOTIFICATION_ACTIONS";
public static getNotificationRespondAtt =
"Services/ERP.svc/REST/NOTIFICATION_GET_RESPOND_ATTRIBUTES";
public static getQutationAnalysisUrl =
"Services/ERP.svc/REST/GET_QUOTATION_ANALYSIS";
constructor(
public api: ConnectorService,
public authService: AuthenticationService
@ -148,6 +152,21 @@ export class WorklistMainService {
);
}
public getQutationAnalysis(
qutationAnalysis: any,
onError?: any,
errorLabel?: string
): Observable<QuotationAnalysisResponse> {
const request = qutationAnalysis;
this.authService.authenticateRequest(request);
return this.api.post(
WorklistMainService.getQutationAnalysisUrl,
request,
onError,
errorLabel
);
}
public getNotificationButtons(
WorkListButtonRequest: any,
onError?: any,

@ -0,0 +1,42 @@
export class DayHoursTypeDetailsList {
public RTP_ID: number;
public ASSIGNMENT_ID: number;
public SCHEDULE_DATE: Date;
public SCHEDULED_HRS: string;
public SCHEDULED_PLANNED_OT_HRS: string;
public SCHEDULED_ON_CALL_HRS: string;
public ACTUAL_HRS: string;
public PLANNED_OT_HRS: string;
public ON_CALL_HRS: string;
public EXCESS_HRS: string;
public COMP_OFF_HRS: string;
public COMP_OFF_H_HRS: string;
public COMP_OFF_N_HRS: string;
public COMP_OFF_W_HRS: string;
public TIMEBACK_HRS: string;
public SHORTAGE_HRS: string;
public LATE_IN_HRS: string;
public EARLY_OUT_HRS: string;
public APPROVED_TIMEBACK_HRS: string;
public REMARKS: string;
public ABSENCE_ATTENDANCE_TYPE_ID: number;
public PERSON_EXTRA_INFO_ID: number;
public DAY_TYPE: string;
public MISSING_SWIPE_FLAG: string;
public EXCESS_FLAG: string;
public COMP_OFF_FLAG: string;
public TIMEBACK_FLAG: string;
public SHORTAGE_FLAG: string;
public LATE_IN_FLAG: string;
public EARLY_OUT_FLA: string;
public APPR_TIMEBACK_FLAG: string;
public PLANNED_OT_HRS_FLAG: string;
public ANALAYZED_FLAG: string;
public NON_SCHEDULED_FLAG: string;
public ROW_NUM: number;
public NO_OF_ROWS: number;
public FROM_ROW_NUM: number;
public TO_ROW_NUM: number;
public CALENDAR_ENTRY_ID: number;
public ABSENCE_ATTENDANCE_ID: number;
}

@ -0,0 +1,24 @@
import { Request } from "src/app/hmg-common/services/models/request";
import { DateTimeInput } from "src/app/uI-elements/date-time.input";
export class GetDayAndHoursDetailsRequest extends Request {
public P_SELECTED_EMPLOYEE_NUMBER: string;
public P_MENU_TYPE: string;
public P_SELECTED_RESP_ID: number;
public P_SCHEDULE_DATE_FROM: DateTimeInput;
public P_SCHEDULE_DATE_TO: DateTimeInput;
public P_EXCESS_FLAG: string;
public P_TIMEBACK_FLAG: string;
public P_COMP_OFF_FLAG: string;
public P_NON_SCHEDULED_FLAG: string;
public P_LATE_IN_FLAG: string;
public P_EARLY_OUT_FLAG: string;
public P_SHORTAGE_FLAG: string;
public P_MISSING_SWIPE_FLAG: string;
public P_ANALAYZED_FLAG: string;
public P_APPR_TIMEBACK_FLAG: string;
public P_SHT_TYPE: string;
public P_ACTUAL_WOB_SEC: string;
public P_PAGE_NUM: number;
public P_PAGE_LIMIT: number;
}

@ -0,0 +1,6 @@
import { Response } from "src/app/hmg-common/services/models/response";
import { DayHoursTypeDetailsList } from './DayHoursTypeDetailsList';
export class GetDayAndHoursDetailsResponse extends Response {
public GetDayHoursTypeDetailsList: DayHoursTypeDetailsList[];
}

@ -0,0 +1,7 @@
import { Request } from "src/app/hmg-common/services/models/request";
export class GetShiftDetailRequest extends Request {
public P_RTP_ID: number;
public P_PAGE_NUM: number;
public P_PAGE_LIMIT: number;
}

@ -0,0 +1,6 @@
import { Response } from "src/app/hmg-common/services/models/response";
import { ScheduleShiftsDetailsList } from "./scheduleShiftsDetailsList";
export class GetShiftDetailResponse extends Response {
public GetScheduleShiftsDetailsList: ScheduleShiftsDetailsList[];
}

@ -0,0 +1,5 @@
import { Response } from "src/app/hmg-common/services/models/response";
import { ShiftTypeList } from "./shiftTypeList";
export class GetShiftTypeResponse extends Response {
public GetShiftTypesList: ShiftTypeList[];
}

@ -0,0 +1,9 @@
import { Request } from "src/app/hmg-common/services/models/request";
import { DateTimeInput } from "src/app/uI-elements/date-time.input";
export class GetSwipesRequest extends Request {
public P_SELECTED_EMPLOYEE_NUMBER: string;
public P_SCHEDULE_DATE: DateTimeInput;
public P_PAGE_NUM: number;
public P_PAGE_LIMIT: number;
}

@ -0,0 +1,6 @@
import { Response } from "src/app/hmg-common/services/models/response";
import { SwipesList } from './swipesList';
export class GetSwipesResponse extends Response {
public GetSwipesList: SwipesList[];
}

@ -0,0 +1,22 @@
import { Request } from "src/app/hmg-common/services/models/request";
import { DateTimeInput } from "src/app/uI-elements/date-time.input";
export class GetTimeCardSummaryRequest extends Request {
public P_SELECTED_EMPLOYEE_NUMBER: string;
public P_MENU_TYPE: string;
public P_SELECTED_RESP_ID: number;
public P_SCHEDULE_DATE_FROM: DateTimeInput;
public P_SCHEDULE_DATE_TO: DateTimeInput;
public P_EXCESS_FLAG: string;
public P_TIMEBACK_FLAG: string;
public P_COMP_OFF_FLAG: string;
public P_NON_SCHEDULED_FLAG: string;
public P_LATE_IN_FLAG: string;
public P_EARLY_OUT_FLAG: string;
public P_SHORTAGE_FLAG: string;
public P_MISSING_SWIPE_FLAG: string;
public P_ANALAYZED_FLAG: string;
public P_APPR_TIMEBACK_FLAG: string;
public P_SHT_TYPE: string;
public P_ACTUAL_WOB_SEC: string;
}

@ -0,0 +1,6 @@
import { Response } from "src/app/hmg-common/services/models/response";
import { TimeCardSummaryList } from './timeCardSummaryList';
export class GetTimeCardSummaryResponse extends Response {
public GetTimeCardSummaryList: TimeCardSummaryList[];
}

@ -0,0 +1,32 @@
export class ScheduleShiftsDetailsList {
public st: string;
public RTP_ID: number;
public ASSIGNMENT_ID: number;
public RTP_SCHEDULE_ID: number;
public SCHEDULE_DATE: Date;
public SEQ_NO: number;
public SHT_NAME: string;
public SHT_CODE: string;
public SHT_TYPE: string;
public SHT_TYPE_DESC: string;
public BREAK_NAME: string;
public ACTUAL_WOB_HRS: string;
public SHT_ACTUAL_START_DATETIME: string;
public SHT_ACTUAL_START_TIME: string;
public SHT_ACTUAL_END_DATETIME: string;
public SHT_ACTUAL_END_TIME: string;
public APPROVED_START_DATETIME: string;
public APPROVED_START_TIME: string;
public APPROVED_START_REASON: string;
public APPROVED_START_REASON_DESC: string;
public APPROVED_END_DATETIME: string;
public APPROVED_END_TIME: string;
public APPROVED_END_REASON: string;
public APPROVED_END_REASON_DESC: string;
public SHT_ACTUAL_HRS: string;
public ROW_NUM: number;
public NO_OF_ROWS: number;
public FROM_ROW_NUM: number;
public TO_ROW_NUM: number;
}

@ -0,0 +1,4 @@
export class ShiftTypeList {
public SHT_TYPE: string;
public SHT_TYPE_DESC: string;
}

@ -0,0 +1,15 @@
export class SwipesList {
public SWIPE_DATE: number;
public SWIPE_TIME: number;
public SWIPE_STATUS: string;
public MACHINE_LOCATION: string;
public UNIT_NAME: string;
public UNIT_NUMBER: string;
public EXCLUDE_FLAG: string;
public RETURN_MESSAGE: string;
public RETURN_STATUS: string;
public NO_OF_ROWS: number;
public ROW_NUM: number;
public FROM_ROW_NUM: number;
public TO_ROW_NUM: number;
}

@ -0,0 +1,37 @@
export class TimeCardSummaryList {
public ASSIGNMENT_ID: number;
public COMP_OFF_W_HRS: number;
public ATTENDED_DAYS: number;
public COMP_OFF_N_HRS: number;
public COMP_OFF_H_HRS: number;
public EXCESS_HRS: number;
public ON_CALL_HRS: number;
public LATE_IN_HRS: number;
public EARLY_OUT_HRS: number;
public UNCOVERD_SHORTAGE_HRS: number;
public DESIRED_SCHEDULED_HRS: number;
public PERIOD_DAYS: number;
public SHORTAGE_HRS: number;
public OFF_DAYS: number;
public APPROVED_TIMEBACK_HRS: number;
public TIMEBACK_HRS: number;
public PLANNED_OTHRS: number;
public ACTUAL_HRS: number;
public SCHEDULED_ON_CALL_HRS: number;
public SCHEDULED_PLANNED_OT_HRS: number;
public SCHEDULED_HRS: number;
public NOT_ANALYZED_DAYS: number;
public LEAVES_HOLIDAYS_HRS: number;
public HALF_DAY_LEAVE: number;
public UNPAID_LEAVE: number;
public PAID_LEAVE: number;
public BUSINESS_TRIP: number;
public SHORTAGE_SCHEDULE_HRS: number;
public SCHEDULE_DAYS: number;
public NON_SCHEDULE_DAYS: number;
public ABSENT_DAYS: number;
public SICK_LEAVE: number;
public UNAUTHORIZED_LEAVE: number;
public PUBLIC_HOLIDAY: number;
public TIME_BACK_BALANCE: number;
}

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

@ -0,0 +1,104 @@
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 { Request } from "src/app/hmg-common/services/models/request";
import { Observable } from "rxjs";
import { GetShiftTypeResponse } from "./models/get-shift-type.response";
import { GetDayAndHoursDetailsResponse } from "./models/get-day-hours-type-details.response";
import { GetTimeCardSummaryResponse } from "./models/get-time-card-summary.response";
import { GetShiftDetailResponse } from "./models/get-shift-detail.response";
import { GetSwipesResponse } from "./models/get-swipes-response";
@Injectable({
providedIn: "root"
})
export class TimeCardService {
public static getShiftTypeUrl = "Services/ERP.svc/REST/GET_SHIFT_TYPES";
public static getTimeCardSummaryUrl =
"Services/ERP.svc/REST/GET_TIME_CARD_SUMMARY";
public static getDayHourDetailsUrl =
"Services/ERP.svc/REST/GET_DAY_HOURS_TYPE_DETAILS";
public static getShiftDetailUrl =
"Services/ERP.svc/REST/GET_SCHEDULE_SHIFTS_DETAILS";
public static getSwipeUrl = "Services/ERP.svc/REST/GET_SWIPES";
constructor(
public con: ConnectorService,
private authService: AuthenticationService
) {}
public getShiftType(
onError?: any,
errorLabel?: string
): Observable<GetShiftTypeResponse> {
const request = new Request();
this.authService.authenticateRequest(request);
return this.con.post(
TimeCardService.getShiftTypeUrl,
request,
onError,
errorLabel
);
}
public getTimeCardSummary(
timeCardSummaryReq,
onError?: any,
errorLabel?: string
): Observable<GetTimeCardSummaryResponse> {
const request = timeCardSummaryReq;
this.authService.authenticateRequest(request);
return this.con.post(
TimeCardService.getTimeCardSummaryUrl,
request,
onError,
errorLabel
);
}
public getDayHoursTypeDetails(
dayHoursDetailsReq,
onError?: any,
errorLabel?: string
): Observable<GetDayAndHoursDetailsResponse> {
const request = dayHoursDetailsReq;
this.authService.authenticateRequest(request);
return this.con.post(
TimeCardService.getDayHourDetailsUrl,
request,
onError,
errorLabel
);
}
public getShiftDetail(
shiftDetailReq,
onError?: any,
errorLabel?: string
): Observable<GetShiftDetailResponse> {
const request = shiftDetailReq;
this.authService.authenticateRequest(request);
return this.con.post(
TimeCardService.getShiftDetailUrl,
request,
onError,
errorLabel
);
}
public getSwipes(
getSwipeReq,
onError?: any,
errorLabel?: string
): Observable<GetSwipesResponse> {
const request = getSwipeReq;
this.authService.authenticateRequest(request);
return this.con.post(
TimeCardService.getSwipeUrl,
request,
onError,
errorLabel
);
}
}

@ -0,0 +1,26 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { Routes, RouterModule } from '@angular/router';
import { IonicModule } from '@ionic/angular';
import { TimeCardPage } from './time-card.page';
const routes: Routes = [
{
path: '',
component: TimeCardPage
}
];
@NgModule({
imports: [
CommonModule,
FormsModule,
IonicModule,
RouterModule.forChild(routes)
],
declarations: [TimeCardPage]
})
export class TimeCardPageModule {}

@ -0,0 +1,9 @@
<ion-header>
<ion-toolbar>
<ion-title>time-card</ion-title>
</ion-toolbar>
</ion-header>
<ion-content>
</ion-content>

@ -0,0 +1,27 @@
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { TimeCardPage } from './time-card.page';
describe('TimeCardPage', () => {
let component: TimeCardPage;
let fixture: ComponentFixture<TimeCardPage>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ TimeCardPage ],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(TimeCardPage);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-time-card',
templateUrl: './time-card.page.html',
styleUrls: ['./time-card.page.scss'],
})
export class TimeCardPage implements OnInit {
constructor() { }
ngOnInit() {
}
}

@ -0,0 +1 @@
,HMG/Mohamed.Mekawy,CS-1F-MOHAMED,24.10.2019 14:24,file:///C:/Users/mohamed.mekawy/AppData/Roaming/LibreOffice/4;
Loading…
Cancel
Save