EIT Form fixes ongoing

MOHEMM-SFH-COLORS
haroon amjad 6 years ago
parent 08f588c302
commit 7fe2bef41e

@ -119,10 +119,10 @@
<plugin name="cordova-plugin-apprate" spec="^1.4.0" />
<engine name="browser" spec="5.0.4" />
<engine name="ios" spec="4.5.5" />
<engine name="android" spec="7.1.4" />
<plugin name="cordova-plugin-geolocation" spec="4.0.1">
<variable name="GEOLOCATION_USAGE_DESCRIPTION" value="To fetch location for marking attendance" />
</plugin>
<plugin name="cordova-plugin-cszbar" spec="1.3.4" />
<plugin name="cordova-plugin-datepicker" spec="0.9.3" />
<engine name="android" spec="~7.1.4" />
</widget>

@ -3209,6 +3209,216 @@
"serialize-javascript": "^1.4.0"
}
},
"cordova-android": {
"version": "7.1.4",
"resolved": "https://registry.npmjs.org/cordova-android/-/cordova-android-7.1.4.tgz",
"integrity": "sha512-Rtvu002I83uzfVyCsE6p2krFKVHt9TSAqZUATes+zH+o9cdxYGrLHY+PKCQo4SLCdSMdrkIHCDnQPTYTp/d7+g==",
"requires": {
"abbrev": "*",
"android-versions": "1.4.0",
"ansi": "*",
"balanced-match": "*",
"base64-js": "1.2.0",
"big-integer": "1.6.32",
"bplist-parser": "*",
"brace-expansion": "*",
"concat-map": "*",
"cordova-common": "2.2.5",
"cordova-registry-mapper": "*",
"elementtree": "0.1.6",
"glob": "5.0.15",
"inflight": "*",
"inherits": "*",
"minimatch": "*",
"nopt": "3.0.1",
"once": "*",
"path-is-absolute": "1.0.1",
"plist": "2.1.0",
"properties-parser": "0.2.3",
"q": "1.4.1",
"sax": "0.3.5",
"semver": "5.5.0",
"shelljs": "0.5.3",
"underscore": "*",
"unorm": "*",
"wrappy": "*",
"xmlbuilder": "8.2.2",
"xmldom": "*"
},
"dependencies": {
"abbrev": {
"version": "1.1.1",
"bundled": true
},
"android-versions": {
"version": "1.4.0",
"bundled": true,
"requires": {
"semver": "^5.4.1"
}
},
"ansi": {
"version": "0.3.1",
"bundled": true
},
"balanced-match": {
"version": "1.0.0",
"bundled": true
},
"base64-js": {
"version": "1.2.0",
"bundled": true
},
"big-integer": {
"version": "1.6.32",
"bundled": true
},
"bplist-parser": {
"version": "0.1.1",
"bundled": true,
"requires": {
"big-integer": "^1.6.7"
}
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
}
},
"concat-map": {
"version": "0.0.1",
"bundled": true
},
"cordova-common": {
"version": "2.2.5",
"bundled": true,
"requires": {
"ansi": "^0.3.1",
"bplist-parser": "^0.1.0",
"cordova-registry-mapper": "^1.1.8",
"elementtree": "0.1.6",
"glob": "^5.0.13",
"minimatch": "^3.0.0",
"plist": "^2.1.0",
"q": "^1.4.1",
"shelljs": "^0.5.3",
"underscore": "^1.8.3",
"unorm": "^1.3.3"
}
},
"cordova-registry-mapper": {
"version": "1.1.15",
"bundled": true
},
"elementtree": {
"version": "0.1.6",
"bundled": true,
"requires": {
"sax": "0.3.5"
}
},
"glob": {
"version": "5.0.15",
"bundled": true,
"requires": {
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "2 || 3",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
}
},
"inflight": {
"version": "1.0.6",
"bundled": true,
"requires": {
"once": "^1.3.0",
"wrappy": "1"
}
},
"inherits": {
"version": "2.0.3",
"bundled": true
},
"minimatch": {
"version": "3.0.4",
"bundled": true,
"requires": {
"brace-expansion": "^1.1.7"
}
},
"nopt": {
"version": "3.0.1",
"bundled": true,
"requires": {
"abbrev": "1"
}
},
"once": {
"version": "1.4.0",
"bundled": true,
"requires": {
"wrappy": "1"
}
},
"path-is-absolute": {
"version": "1.0.1",
"bundled": true
},
"plist": {
"version": "2.1.0",
"bundled": true,
"requires": {
"base64-js": "1.2.0",
"xmlbuilder": "8.2.2",
"xmldom": "0.1.x"
}
},
"properties-parser": {
"version": "0.2.3",
"bundled": true
},
"q": {
"version": "1.4.1",
"bundled": true
},
"sax": {
"version": "0.3.5",
"bundled": true
},
"semver": {
"version": "5.5.0",
"bundled": true
},
"shelljs": {
"version": "0.5.3",
"bundled": true
},
"underscore": {
"version": "1.9.1",
"bundled": true
},
"unorm": {
"version": "1.4.1",
"bundled": true
},
"wrappy": {
"version": "1.0.2",
"bundled": true
},
"xmlbuilder": {
"version": "8.2.2",
"bundled": true
},
"xmldom": {
"version": "0.1.27",
"bundled": true
}
}
},
"cordova-browser": {
"version": "5.0.4",
"resolved": "https://registry.npmjs.org/cordova-browser/-/cordova-browser-5.0.4.tgz",

@ -97,7 +97,7 @@
"ng2-pdf-viewer": "^5.3.2",
"phonegap-plugin-barcodescanner": "^8.1.0",
"phonegap-plugin-multidex": "^1.0.0",
"phonegap-plugin-push": "2.2.3",
"phonegap-plugin-push": "^2.2.3",
"primeicons": "^1.0.0",
"primeng": "^7.1.3",
"run": "1.4.0",
@ -196,7 +196,8 @@
"cordova-android-support-gradle-release": {
"ANDROID_SUPPORT_VERSION": "27.+"
},
"cordova-plugin-datepicker": {}
"cordova-plugin-datepicker": {},
"phonegap-plugin-barcodescanner": {}
},
"platforms": [
"browser",

@ -16,7 +16,7 @@
<ion-card>
<ion-card-header class="boxHdr">
<div class="hrTitle">{{"addAttach.title" | translate}}</div>
<div class="hrTitle">{{'general, addAttach' | translate}}</div>
<div class="fileDiv"> <input end class="inputfile" type="file" ng2FileSelect [uploader]="uploader"
(change)="onFileSelected($event)" />
<label end for="file">

@ -0,0 +1,10 @@
.inputfile {
width: 0.1px;
height: 0.1px;
opacity: 0;
overflow: hidden;
position: absolute;
width: 40px;
height: 40px;
// z-index: -1;
}

@ -1,7 +1,23 @@
.footer-button {
border-radius: 2px;
padding: 0 1.1em;
min-height: 45px;
min-width: 200px;
}
border-radius: 2px;
padding: 0 1.1em;
min-height: 45px;
min-width: 200px;
}
ion-label {
color: var(--customnavy) !important;
}
.daynamicForm-Label {
font-size: 16px;
color: var(--customnavy) !important;
display: block;
overflow: hidden;
-webkit-flex: 1;
flex: 1;
font-size: inherit;
white-space: normal;
padding: 5px 0px;
margin: 10px auto;
}

@ -137,7 +137,6 @@ export class AddEitComponent implements OnInit {
const containerId = 'containerDiv';
this.eitVALSettoCall = [];
for (let i = 0; i < feildsList.length; i++) {
console.log(feildsList[i]);
let defaultVal: string = "";
let defaultValText: string = "";
defaultVal = feildsList[i].E_SERVICES_DV.P_ID_COLUMN_NAME ? feildsList[i].E_SERVICES_DV.P_ID_COLUMN_NAME : "";
@ -213,7 +212,7 @@ export class AddEitComponent implements OnInit {
}
} else {
if (feildsList[i].READ_ONLY == 'Y') {
this.textInput = new TextInput(feildsList[i].SEGMENT_PROMPT, feildsList[i].APPLICATION_COLUMN_NAME, defaultValText, containerId, defaultVal, feildsList[i].MOBILE_ENABLED, feildsList[i].DISPLAY_FLAG, feildsList[i].REQUIRED_FLAG);
this.textInput = new TextInput(feildsList[i].SEGMENT_PROMPT, feildsList[i].APPLICATION_COLUMN_NAME, defaultVal, containerId, defaultVal, feildsList[i].MOBILE_ENABLED, feildsList[i].DISPLAY_FLAG, feildsList[i].REQUIRED_FLAG);
} else {
// dropdown list missing open in differnt page
//check this validation since he doesnt check the other default_type
@ -386,11 +385,18 @@ export class AddEitComponent implements OnInit {
}
bindHtmlElemEvents(id, obj) {
console.log('bindElement: ' + id);
const elem = document.getElementById(id);
console.log(elem);
console.log(obj);
const elemType = elem.tagName;
let changeEvent = 'ionChange';
if (elemType == 'SELECT')
changeEvent = 'change';
try {
elem.addEventListener("change", (e) => {
// elem.addEventListener("change", (e) => {
elem.addEventListener(changeEvent, (e) => {
//console.log("elem change "+elem.id);
//let x=e.currentTarget as HTMLInputElement;
//let isEmpty:boolean=false;
@ -482,6 +488,7 @@ export class AddEitComponent implements OnInit {
this.eitService.getDefaultValue(body).subscribe((result: any) => {
let elem = this.getElementByName(segmentName);
console.log(elem);
// if(elem.dataset.hiddenval){
// elem.dataset.hiddenval="";
// return false;
@ -490,8 +497,10 @@ export class AddEitComponent implements OnInit {
let val = obj.value;
let text = obj.text;
if (isStandardDate) {
console.log('isStandardDate');
elem.value = this.cs.reverseFormatDate(val);
} else if (isStandardTimeDate) {
console.log('isStandardTimeDate');
if (val) {
elem.dataset.dtvalue = this.cs.reverseFormatStandardDate(val);
elem.innerHTML = this.cs.reverseFormatStandardDate(val);
@ -500,6 +509,7 @@ export class AddEitComponent implements OnInit {
elem.innerHTML = "";
}
} else if (isStandardTime) {
console.log('isStandardTime');
if (val) {
elem.dataset.dtvalue = val;
elem.innerHTML = val;
@ -508,7 +518,11 @@ export class AddEitComponent implements OnInit {
elem.innerHTML = "";
}
} else {
console.log('else - ' + elem.value);
elem.value = val;
elem.innerText = val;
elem.setAttribute('value', val);
console.log('else - ' + elem.value);
}
if (isHidden || isReadOnlyList) {
if (val)
@ -517,7 +531,7 @@ export class AddEitComponent implements OnInit {
elem.dataset.colmText = "";
elem.value = text;
}
var event = new Event('change');
var event = new Event('ionChange');
elem.dispatchEvent(event);
});
}
@ -635,7 +649,8 @@ export class AddEitComponent implements OnInit {
}
idColName = val;
if (this.eitResponse[j].FORMAT_TYPE == "X") {//date
idColName = this.cs.formatDate(val);
// idColName = this.cs.formatDate(val);
idColName = this.cs.formatDateNew(val);
}
}
parentArr.push({ SEGMENT_NAME: this.eitResponse[j].SEGMENT_NAME, VALUE_COLUMN_NAME: val, DESCRIPTION: "", ID_COLUMN_NAME: idColName, FLEX_VALUE_SET_NAME: this.eitResponse[j].FLEX_VALUE_SET_NAME })

@ -9,7 +9,7 @@
<ion-card>
<ion-card-header class="boxHdr">
<div class="hrTitle">{{"confirmAddEit.approverList" | translate}}</div>
<div class="hrTitle">{{'confirmAddEit, approverList' | translate}}</div>
</ion-card-header>
<ion-card-content>
@ -112,11 +112,21 @@
<ion-card>
<ion-card-header class="boxHdr">
<div class="hrTitle">{{"absenceList, attachList" | translate}}</div>
<button ion-button (click)="addAttachment(true,-1)">
<img class="imgSize" src="../assets/imgs/attachment.png"></button>
<ion-grid no-padding>
<ion-row style="width: 100%;" class="hrTitle" nowrap>
<ion-col size="10">
<ion-text style="font-size: larger;"><b>{{"absenceList, attachList" | translate}}</b></ion-text>
</ion-col>
<ion-col size="2">
<button class="btnBack" ion-button (click)="addAttachment(true,-1)">
<img class="imgSize" src="../assets/imgs/attachment.png"></button>
</ion-col>
</ion-row>
</ion-grid>
</ion-card-header>
<ion-card-content>
<ion-grid *ngIf="attachListOver?.length > 0">
<div *ngFor="let attachList of attachListOver ; let i = index">

@ -1,7 +1,16 @@
.footer-button {
border-radius: 2px;
padding: 0 1.1em;
min-height: 45px;
min-width: 200px;
}
border-radius: 2px;
padding: 0 1.1em;
min-height: 45px;
min-width: 200px;
}
.imgSize {
width: 22px;
height: 22px;
}
.btnBack {
background: transparent;
float: right;
}

@ -1114,6 +1114,7 @@ export class CommonService {
}
public formatDate(date) {
let FormatedDate;
console.log(date);
if (date) {
FormatedDate = date.replace(/-/g, "/");
FormatedDate = FormatedDate + " 00:00:00";
@ -1122,4 +1123,19 @@ export class CommonService {
}
return FormatedDate;
}
public formatDateNew(date) {
let FormatedDate;
console.log(date);
if (date) {
// FormatedDate = date.replace(/-/g, "/");
FormatedDate = date.split("T")[0];
FormatedDate = FormatedDate + " 00:00:00";
console.log(FormatedDate);
} else {
FormatedDate = date;
}
return FormatedDate;
}
}

Loading…
Cancel
Save