fixed issues

master
umasoodch 6 years ago
parent 06f7cfa0fa
commit 79a79da53a

@ -77,6 +77,7 @@ export class SubmitAbsenceComponent implements OnInit {
/*****for resubmit******* */
getPassNotificationDetails: any;
getPassdirfromNotifiPage: boolean = false;
direction: string;
functionName: string = "";
private submitAbsObjList: any = [];
@ViewChild(IonSelect) select: IonSelect;
@ -93,6 +94,7 @@ export class SubmitAbsenceComponent implements OnInit {
private changeDetectorRef: ChangeDetectorRef
) {
this.direction = TranslatorService.getCurrentLanguageName();
////*new add*/////
/**********resubmit************ */
this.getPassNotificationDetails = this.common.sharedService.getSharedData(AbsenceNotificatonBodyResponse.NOT_WORKLIST, true);
@ -411,7 +413,8 @@ export class SubmitAbsenceComponent implements OnInit {
containerId,
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG
feildsList[i].REQUIRED_FLAG,
this.direction
);
} else {
this.timeInput = new TimeInput(
@ -421,20 +424,10 @@ export class SubmitAbsenceComponent implements OnInit {
containerId,
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG
feildsList[i].REQUIRED_FLAG,
this.direction
);
}
const elem = document.getElementById(
feildsList[i].APPLICATION_COLUMN_NAME
);
elem.addEventListener("click", e => {
if (feildsList[i].MOBILE_ENABLED != "Y") return false;
this.showTimePicker(
feildsList[i].APPLICATION_COLUMN_NAME,
feildsList[i].MAXIMUM_SIZE
);
e.stopImmediatePropagation();
});
}
} else {
if (feildsList[i].READ_ONLY == "Y") {

@ -23,7 +23,6 @@ import { AddEitResponse } from "../models/add.eit.response";
import { element } from '@angular/core/src/render3';
// import { EITNotificatonBodyResponse } from 'src/app/notification/models/EITNotificationBodyRes';
import { EITNotificatonBodyResponse } from "../models/EITNotificationBodyRes";
@Component({
selector: "app-add-eit",
templateUrl: "./add-eit.component.html",
@ -67,6 +66,7 @@ export class AddEitComponent implements OnInit {
//private updatedNotObject:any=[];
private updatedValues: any = [];
addEITData: any;
direction:string;
constructor(
public modalController: ModalController,
@ -75,6 +75,7 @@ export class AddEitComponent implements OnInit {
private eitService: EitService,
public datePicker: DatePicker
) {
this.direction = TranslatorService.getCurrentLanguageName();
this.selEmp = this.cs.sharedService.getSharedData(
MenuResponse.SHARED_SEL_EMP,
false
@ -216,7 +217,8 @@ export class AddEitComponent implements OnInit {
containerId,
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG
feildsList[i].REQUIRED_FLAG,
this.direction
);
} else {
this.dateInput = new DateInput(
@ -226,7 +228,8 @@ export class AddEitComponent implements OnInit {
containerId,
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG
feildsList[i].REQUIRED_FLAG,
this.direction
);
}
// else if(feildsList[i].DEFAULT_TYPE=="D"){//current date
@ -291,11 +294,12 @@ export class AddEitComponent implements OnInit {
this.timeInput = new TimeInput(
feildsList[i].SEGMENT_PROMPT,
feildsList[i].APPLICATION_COLUMN_NAME,
defaultVal,
"",
containerId,
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG
feildsList[i].REQUIRED_FLAG,
this.direction
);
} else {
this.timeInput = new TimeInput(
@ -305,25 +309,10 @@ export class AddEitComponent implements OnInit {
containerId,
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG
feildsList[i].REQUIRED_FLAG,
this.direction
);
}
const elem = document.getElementById(
feildsList[i].APPLICATION_COLUMN_NAME
);
elem.addEventListener("click", e => {
if (feildsList[i].MOBILE_ENABLED != "Y") return false;
this.showTimePicker(
feildsList[i].APPLICATION_COLUMN_NAME,
feildsList[i].MAXIMUM_SIZE
);
e.stopImmediatePropagation();
});
// else if(feildsList[i].DEFAULT_TYPE=="T"){
// this.timeInput = new TimeInput(feildsList[i].SEGMENT_PROMPT,feildsList[i].APPLICATION_COLUMN_NAME,"currentTime",containerId,feildsList[i].MOBILE_ENABLED);
// }else if(feildsList[i].DEFAULT_TYPE=="P"||feildsList[i].DEFAULT_TYPE=="S"){
// this.timeInput = new TimeInput(feildsList[i].SEGMENT_PROMPT,feildsList[i].APPLICATION_COLUMN_NAME,this.getDefaultValue(feildsList[i].DESC_FLEX_NAME,feildsList[i].DESC_FLEX_CONTEXT_CODE,feildsList[i].SEGMENT_NAME,feildsList[i].PARENT_SEGMENTS_VS_SplitedVS,feildsList[i].PARENT_SEGMENTS_DV_Splited),containerId,feildsList[i].MOBILE_ENABLED);
// }
}
} else {
if (feildsList[i].READ_ONLY == "Y") {
@ -1225,7 +1214,7 @@ export class AddEitComponent implements OnInit {
this.eitResponse[i].DISPLAY_FLAG != "N"
) {
//time
elemVal = elem.dataset.dtvalue;
elemVal = elemVal.substring(11, 16);
}
if (this.eitResponse[i].REQUIRED_FLAG == "Y" && !elemVal) {
elem.classList.add("requiredClassElm");

@ -60,7 +60,7 @@
</ion-segment-button>
<ion-segment-button
value="Team Members"
[ngClass]="activeSegment == 'Team Members' ? 'active-Segment' : 'normal-Segment'">
[ngClass]="[activeSegment == 'Team Members' ? 'active-Segment' : 'normal-Segment', empSubordinate.length === 0 ? 'disable-phone': '']">
<ion-label>{{ts.trPK('myTeam','team-members')}}</ion-label>
</ion-segment-button>
<ion-segment-button
@ -130,7 +130,7 @@
<div class="result-graph">
<div>
<span [ngClass]="direction == 'ltr' ? 'request-heading':'request-heading-ar'">{{ts.trPK('myTeam','attendance-statistics')}}</span>
<span [ngClass]="direction == 'en' ? 'request-heading':'request-heading-ar'">{{ts.trPK('myTeam','attendance-statistics')}}</span>
</div>
<div style="position: relative;">
<div class="label-container">

@ -27,6 +27,7 @@ export class HomeComponent implements OnInit {
public selMenu: any;
public selEmpNo: any;
public totalEmployees = 0;
public pageFirstVisit = false;
public options = {
cutoutPercentage: 80,
@ -146,7 +147,10 @@ export class HomeComponent implements OnInit {
this.getEmployeeSubordinatesRequestObject = body;
this.myTeamService.getEmployeeSubordinates(body).subscribe((result: any) => {
if (this.common.validResponse(result)) {
this.totalEmployees = result.P_NUM_OF_SUBORDINATES;
if (!this.pageFirstVisit) {
this.pageFirstVisit = true;
this.totalEmployees = result.P_NUM_OF_SUBORDINATES;
}
this.handleEmpResult(result.GetEmployeeSubordinatesList);
}
});

@ -1,7 +1,6 @@
import { UiElement } from "./ui-element";
import { UiElement } from './ui-element';
export class DateInput extends UiElement {
private currentDate: any = ""
private currentDate: any = '';
constructor(
private label: string,
private elementId: string,
@ -9,10 +8,10 @@ export class DateInput extends UiElement {
private containerId: string,
private disabled: string,
private hidden: string,
private required: string) {
private required: string,
private language: string = 'en') {
super(elementId, containerId, '');
this.createElement(this.getTemplate());
}
formatDate() {
@ -24,6 +23,8 @@ export class DateInput extends UiElement {
}
public getTemplate() {
let requiredClass: string = "";
const doneText = this.language === 'en' ? 'Done' : 'تم';
const cancelText = this.language === 'en' ? 'Cancel' : 'إلغاء';
if (this.disabled == "N") { this.disabled = "disabled" } else { this.disabled = "" }
if (this.hidden == "N") { this.hidden = "display:none;" } else { this.hidden = "" }
if (this.value == "currentDate") {
@ -44,7 +45,7 @@ export class DateInput extends UiElement {
"<ion-item class='dynamicField'>" +
" <ion-label position='floating' style='font-size: medium !important;' class='dynamiclable-float " + requiredClass + "' id='title' >" + this.label + "</ion-label>" +
// " <div class='daynamicForm-DateTime " + disaledClass + "' id='" + this.elementId + "' data-dtvalue='" + this.value + "' " + this.disabled + ">" + this.value + "</div>" +
"<ion-datetime min='1900' max='2100' class='onic-date' (ionChange)='setDate()' displayFormat='MMM/DD/YYYY' value='" + this.value + "' id='" + this.elementId + "' data-dtvalue='" + this.value + "' " + this.disabled + " ></ion-datetime>" +
"<ion-datetime min='1900' max='2100' class='onic-date' (ionChange)='setDate()' displayFormat='MMM/DD/YYYY' value='" + this.value + "' done-text='" + doneText + "' cancel-text='" + cancelText + "' id='" + this.elementId + "' data-dtvalue='" + this.value + "' " + this.disabled + " ></ion-datetime>" +
// " <input class='daynamicForm-DateTime' type='text' id='" + this.elementId + "' value='" + this.value + "' "+this.disabled+" (click)='showDateTimePicker()'/>"+
// " <input class='daynamicForm-DateTime' type='date' id='" + this.elementId + "' value='" + dateValue+ "' "+this.disabled+" />"+
// " <input class='daynamicForm-DateTime' type='time' id='" + this.elementId + "Time' value='" + timeValue + "' "+this.disabled+" />"+

@ -1,5 +1,4 @@
import { UiElement } from './ui-element';
// import { TranslatorService } from '../hmg-common/services/translator/translator.service';
export class TimeInput extends UiElement {
// public direction: string;
@ -10,9 +9,9 @@ export class TimeInput extends UiElement {
private containerId: string,
private disabled: string,
private hidden: string,
private required: string) {
private required: string,
private language: string = 'en') {
super(elementId, containerId, '');
// this.direction = TranslatorService.getCurrentLanguageName();
this.createElement(this.getTemplate());
}
@ -22,11 +21,16 @@ export class TimeInput extends UiElement {
this.value = date.getHours() + ':' + date.getMinutes() + ':' + date.getSeconds();
}
setDate() {
console.log('umar');
}
public getTemplate() {
let requiredClass = '';
let disaledClass = '';
const doneText = this.language === 'en' ? 'Done' : 'تم';
const cancelText = this.language === 'en' ? 'Cancel' : 'إلغاء';
// tslint:disable-next-line: triple-equals
if (this.required == 'Y') {
requiredClass = 'requiredClass';
@ -37,29 +41,12 @@ export class TimeInput extends UiElement {
if (this.value === 'currentTime') {
this.formatDate();
}
const template =
'<div class=\'custom-text-area-element\' style=\'' + this.hidden + '\'>' +
' <label class=\'daynamicForm-Label ' + requiredClass + '\' id=\'title\' >' + this.label + '</label>' +
// tslint:disable-next-line: max-line-length
// " <input class='daynamicForm-DateTime' type='time' id='" + this.elementId + "' value='" + this.value + "' "+this.disabled+" />"+
// tslint:disable-next-line: max-line-length
' <div class=\'daynamicForm-DateTime ' + disaledClass + '\' id=\'' + this.elementId + '\' data-dtvalue=\'' + this.value + '\' ' + this.disabled + '>' + this.value + '</div>' +
'</div>';
// "<ion-item>" +
// " <ion-label style='font-size: medium !important;' id='title' >" + this.label + "</ion-label>" +
// tslint:disable-next-line: max-line-length
// // " <div class='daynamicForm-DateTime " + disaledClass + "' id='" + this.elementId + "' data-dtvalue='" + this.value + "' " + this.disabled + ">" + this.value + "</div>" +
// tslint:disable-next-line: max-line-length
// "<ion-datetime displayFormat='hh:mm' value='" + this.value + "' id='" + this.elementId + "' " + this.disabled + "></ion-datetime>" +
// tslint:disable-next-line: max-line-length
// // " <input class='daynamicForm-DateTime' type='text' id='" + this.elementId + "' value='" + this.value + "' "+this.disabled+" (click)='showDateTimePicker()'/>"+
// // " <input class='daynamicForm-DateTime' type='date' id='" + this.elementId + "' value='" + dateValue+ "' "+this.disabled+" />"+
// tslint:disable-next-line: max-line-length
// // " <input class='daynamicForm-DateTime' type='time' id='" + this.elementId + "Time' value='" + timeValue + "' "+this.disabled+" />"+
// "</ion-item>"
const template =
"<ion-item class='dynamicField' style='" + this.hidden + "'>" +
" <ion-label position='floating' style='font-size: medium !important;' class='dynamiclable-float " + requiredClass + "' id='title' >" + this.label + "</ion-label>" +
"<ion-datetime display-format='h:mm' picker-format='h:mm' class='onic-date' value='" + this.value + "' done-text='" + doneText + "' cancel-text='" + cancelText + "' id='" + this.elementId + "' data-dtvalue='" + this.value + "' " + this.disabled + " ></ion-datetime>" +
"</ion-item>"
return template;
}
}

@ -1557,6 +1557,14 @@
}
},
"eit": {
"done-text": {
"en": "Done",
"ar": "تم"
},
"cancel-text": {
"en": "Cancel",
"ar": "إلغاء"
},
"my-requests": {
"en": "My Requests",
"ar": "طلباتي"

Loading…
Cancel
Save