Merge branch 'arabic-version' of https://hmg.git.cloudforge.com/mohemmionic5 into arabic-version

arabic-version^2
enadhilal 6 years ago
commit 3eb8914986

@ -0,0 +1,25 @@
import { Request } from 'src/app/hmg-common/services/models/request';
export class attendanceSwipeScannerRequest extends Request{
public static SHARED_DATA = 'attendanceSwipeScanner-request';
public P_USER_NAME:string;
public P_PASSWORD: string;
public UserName: string;
public CompanyID:number;
public BranchID: number;
public UID:string;
public Latitude:number;
public Longitude:number;
public QRValue: string;
public MemberID:number;
public EmployeeID: number;
public IPAdress: string;
public UserID: string;
}

@ -0,0 +1,20 @@
import { Injectable } from "@angular/core";
import { Observable } from "rxjs";
import { ConnectorService } from "src/app/hmg-common/services/connector/connector.service";
import { AuthenticationService } from "src/app/hmg-common/services/authentication/authentication.service";
import { attendanceSwipeScannerRequest } from '../models/attendanceSwipe.Request';
@Injectable({
providedIn: "root"
})
export class AttendanceService {
public AttendanceSwipeURL : string ='Services/SWP.svc/REST/AuthenticateAndSwipeUser';
constructor(
public con: ConnectorService,
public authService: AuthenticationService
) {}
public attendanceSwipeScanner(attendanceSwipeScanner: attendanceSwipeScannerRequest, onError?: any, errorLabel?: string): Observable<any> {
const request = attendanceSwipeScanner;
this.authService.authenticateRequest(request);
return this.con.post(this.AttendanceSwipeURL,request,onError,errorLabel);
}
}

@ -23,6 +23,7 @@ ion-label {
padding-left: 10px;
}
.header-toolbar-new{
--background: #22c6b3;
}

@ -131,7 +131,7 @@
<div>
<ion-row>
<ion-col class="colBold">
<label for="">{{"confirmAddEit.status" | translate}}</label>
<label for="">{{'confirmAddEit , status' | translate}}</label>
</ion-col>
<ion-col>
<label for="">{{eitAddedObj.status}}</label>

@ -300,4 +300,4 @@ z-index: 1;
margin-right: 1px;
margin-left: 5px;
}

@ -2,6 +2,7 @@
<ion-toolbar class="header-toolbar-new">
<ion-title color="light">{{headerTitle}}</ion-title>
<ion-buttons slot="start">
<!-- <ion-buttons [ngClass]="direction == 'rtl'? 'icon-right' : 'icon-left' "> -->
<nav-buttons backLink=""></nav-buttons>
</ion-buttons>
</ion-toolbar>

@ -1,7 +1,9 @@
import { UiElement } from "./ui-element";
import { TranslatorService } from '../hmg-common/services/translator/translator.service';
export class SelectInput extends UiElement {
public direction: string;
constructor(
private label: string,
private elementId: string,
@ -11,25 +13,49 @@ export class SelectInput extends UiElement {
private hidden: string,
private required: string) {
super(elementId, containerId, '');
this.direction = TranslatorService.getCurrentLanguageName();
this.createElement(this.getTemplate());
}
public getTemplate() {
let template :string = "";
let requiredClass: string = "";
if (this.required == 'Y')
requiredClass = "requiredClass"
if (this.disabled == "N") { this.disabled = "disabled" } else { this.disabled = "" }
if (this.hidden == "N") { this.hidden = "display:none;" } else { this.hidden = "" }
const template =
"<div class='custom-text-area-element dynamicField' style='"+this.hidden+"'>" +
" <label class='daynamicForm-Label "+requiredClass+"' id='title' >" + this.label + "</label>" +
" <select class='daynamicForm-Select' id='" + this.elementId + "' "+this.disabled+">"+
"<option value='"+this.value+"' >"+this.value+"</option>"+
"</select>"+
"</div> ";
// const template =
// "<div class='custom-text-area-element dynamicField' style='"+this.hidden+"'>" +
// " <label class='daynamicForm-Label "+requiredClass+"' id='title' >" + this.label + "</label>" +
// " <select [ngClass]= direction == 'en'? 'daynamicForm-Select' : 'ardaynamicForm-Select' id='" + this.elementId + "' "+this.disabled+">"+
// "<option value='"+this.value+"' >"+this.value+"</option>"+
// "</select>"+
// "</div> ";
if(this.direction == 'en'){
template =
"<div class='custom-text-area-element dynamicField' style='"+this.hidden+"'>" +
" <label class='daynamicForm-Label "+requiredClass+"' id='title' >" + this.label + "</label>" +
" <select class='daynamicForm-Select' id='" + this.elementId + "' "+this.disabled+">"+
"<option value='"+this.value+"' >"+this.value+"</option>"+
"</select>"+
"</div> ";
}
else{
template =
"<div class='custom-text-area-element dynamicField' style='"+this.hidden+"'>" +
" <label class='ardaynamicForm-Label "+requiredClass+"' id='title' >" + this.label + "</label>" +
" <select class='ardaynamicForm-Select' id='" + this.elementId + "' "+this.disabled+">"+
"<option value='"+this.value+"' >"+this.value+"</option>"+
"</select>"+
"</div> ";
}
//[ngClass]=\"{\'daynamicForm-Select\': !ar,\'daynamicForm-Selects\':ar}\
// [ngClass]= direction == 'en'? 'daynamicForm-Select' : 'daynamicForm-Selects'
// [ngClass]=" direction === 'rtl' ? 'daynamicForm-Selects' : 'daynamicForm-Select'"
// class='daynamicForm-Select' id='" + this.elementId + "'
// "<ion-item style='" + this.hidden + "'>" +

@ -1,6 +1,8 @@
import { UiElement } from "./ui-element";
// import { TranslatorService } from '../hmg-common/services/translator/translator.service';
export class TimeInput extends UiElement {
// public direction: string;
constructor(
private label: string,
private elementId: string,
@ -10,6 +12,7 @@ export class TimeInput extends UiElement {
private hidden: string,
private required: string) {
super(elementId, containerId, '');
// this.direction = TranslatorService.getCurrentLanguageName();
this.createElement(this.getTemplate());
}
@ -21,6 +24,7 @@ export class TimeInput extends UiElement {
public getTemplate() {
let requiredClass: string = "";
let disaledClass = "";
if (this.required == 'Y')
@ -31,11 +35,12 @@ export class TimeInput extends UiElement {
this.formatDate();
}
const template =
"<div class='custom-text-area-element dynamicField' style='"+this.hidden+"'>" +
"<div class='custom-text-area-element' style='"+this.hidden+"'>" +
" <label class='daynamicForm-Label "+requiredClass+"' id='title' >" + this.label + "</label>" +
// " <input class='daynamicForm-DateTime' type='time' id='" + this.elementId + "' value='" + this.value + "' "+this.disabled+" />"+
" <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>" +

@ -576,6 +576,37 @@ ion-col.colBold,ion-col.colBold>label{
}
}
.ardaynamicForm-Label{
font-size: 16px;
// margin-left: 15px;
color: #a2a5a6 !important;
display: block;
overflow: hidden;
-webkit-box-flex: 1;
-webkit-flex: 1;
-ms-flex: 1;
flex: 1;
/* font-size: inherit; */
// text-overflow: ellipsis;
// white-space: nowrap;
white-space: normal;
// padding-top: 10px;
padding: 5px 0px;
padding-left: 10px !important;
margin: 10px auto;
margin-right: 12px !important;
:root[dir="ltr"]{
font-family: var(--fontFamilySemiBoldEN) !important;
}
:root[dir="rtl"]{
font-family: var(--fontFamilyIOSAR) !important;
font-weight: bold;
}
}
img.flipImg{
:root[dir="rtl"]{
-webkit-transform: scaleX(-1);
@ -646,6 +677,7 @@ img.flipImg{
box-shadow: none;
-webkit-box-shadow:none;
-moz-box-shadow: none;
margin-bottom: 8px;
}
.daynamicForm-DateTime:after{
width: 0;
@ -683,7 +715,8 @@ img.flipImg{
background-color: var(--light);
border-bottom: var(--cusgray) solid 1px;
border-radius: 0px;
margin-left: 20px;
// margin-left: 20px;
margin-left: 34px;
margin-top: -10px;
// -webkit-appearance: none;
// -moz-appearance: none;
@ -712,6 +745,54 @@ img.flipImg{
}
}
.ardaynamicForm-Select{
color: var(--dark);
font-size: 15px;
// background: url(http://i62.tinypic.com/15xvbd5.png) no-repeat 96% 0;
// background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPAgICAgPC9nPgogICAgICAgICAgICA8L2c+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4=), -webkit-gradient(linear, left bottom, left top, color-stop(50%, rgba(0, 0, 0, 0.12)), color-stop(50%, rgba(0, 0, 0, 0.12)));
// background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPAgICAgPC9nPgogICAgICAgICAgICA8L2c+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4=), linear-gradient(to top, rgba(0, 0, 0, 0.12) 50%, rgba(0, 0, 0, 0.12) 50%);
// background-size: 96% 0;
// background-repeat: no-repeat;
border: none;
font-weight: 400;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
width: 80%;
padding: 6px 0px;
background-color: var(--light);
border-bottom: var(--cusgray) solid 1px;
border-radius: 0px;
margin-right: 34px;
margin-top: -10px;
// -webkit-appearance: none;
// -moz-appearance: none;
text-indent: 1px;
// text-overflow: '';
box-shadow: none;
-webkit-box-shadow:none;
-moz-box-shadow: none;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
:root[dir="ltr"]{
background-image: linear-gradient(45deg, transparent 50%, #999 50%), linear-gradient(135deg, #999 50%, transparent 50%), linear-gradient(to right, #ffffff, #ffffff);
background-position: calc(100% - 14px) calc(1em + 2px), calc(100% - 8px) calc(1em + 2px), 100% 0;
background-size: 6px 6px, 6px 6px, 2.9em 2.9em;
background-repeat: no-repeat;
padding-right: 20px;
}
:root[dir="rtl"]{
background-image: linear-gradient(-135deg, #999 50%, transparent 50%),linear-gradient(-45deg, transparent 50%, #999 50%), linear-gradient(to right, #ffffff, #ffffff);
background-position: calc(1em - 10px) calc(100% - 8px), calc(1em - 4px) calc(100% - 8px), 0 100%;
background-size: 6px 6px, 6px 6px, 2.9em 2.9em;
background-repeat: no-repeat;
padding-left: 20px;
}
}
.daynamicForm-Select:after{
width: 0;
height: 0;

Loading…
Cancel
Save