Merge branch 'enad-issues' into umar-issues

master
umasoodch 6 years ago
commit b64f37b85c

@ -132,7 +132,7 @@ export class DevicePermissionsService {
return new Promise((resolve, reject) => {
this.cs.confirmAlertDialogPrimarySecondary(() => {
resolve(true);
}, this.ts.trPK('general', 'confirm'),
}, this.ts.trPK('general', 'accept'),
() => {
resolve(false);
}, this.ts.trPK('general', 'not-now'), this.ts.trPK('general', 'confirm'), message

@ -436,7 +436,7 @@ color: #888;
font-size: 15px;
}
.text-span{
font-size: 14px;
font-size: 12px;
color: #888;
background-color: white;
width: 93%;
@ -446,7 +446,7 @@ border-radius: 15px;
}
.text-span-active{
font-size: 14px;
font-size: 12px;
color: #888;
background-color:#22c6b3;
width: 93%;

@ -548,11 +548,29 @@ export class HomeComponent implements OnInit {
names[i] = result.RequestType[i].RequestTypeCode;
count++;
}
//this.sortArrayOfAll(this.ITGSegment[0].data)
console.log(this.ITGSegment);
});
}
// return arrayToSort.sort((a: any, b: any) =>
// new Date(b.date).getTime() - new Date(a.date).getTime()
// );
sortArrayOfAll(arrayOfAll){
let date1;
let date2;
for(let i=0; i< arrayOfAll.length; i++){
// for(const filter of arrayOfAll[i]){
console.log(arrayOfAll);
arrayOfAll.sort((a,b)=>(this.common.getDateTimeISOFromString(a.ModifiedDate), this.common.getDateTimeISOFromString(b.ModifiedDate))?1:-1);
console.log(arrayOfAll);
// console.log(this.common.getDateTimeISOFromString(filter.ModifiedDate));
// }
}
}
Details() {
this.workListService.getITGDetails('', '', this.isPostNoLoad)
.subscribe((result: any) => {

@ -22,10 +22,37 @@
<ion-col>
<label class="colItemReq"> {{dataContant.Title}}</label>
<br />
<label *ngIf="dataContant.Value">{{dataContant.Value}}</label>
<div *ngIf="dataContant.MultipleValue">
<label *ngFor="let multiData of dataContant.MultipleValue">{{multiData}}
<br/></label>
<label *ngIf="dataContant.Value && dataContant.Type != 'table'">{{dataContant.Value}}</label>
<div *ngIf="dataContant.MultipleValue && dataContant.Type == 'list'">
<label *ngFor="let data of dataContant.MultipleValue">{{data}}</label>
</div>
<div *ngIf="dataContant.Value && dataContant.Type =='table'">
<div *ngFor="let multiData of dataLabelAndValue">
<div *ngFor="let dataAll of multiData">
<div *ngFor="let dataLabel of dataAll">
<label >{{dataLabel.label}}
<br/></label>
<div *ngIf="dataLabel.isTable =='false'">
<label >{{dataLabel.textvalue}}
<br/></label>
<br/>
</div>
<div *ngIf="dataLabel.isTable == 'true'">
<div *ngFor="let subData of dataLabel.textvalue">
<div>
<label >{{subData.label}}
<br/></label>
<label >{{subData.textvalue}}
<br/></label>
<br/>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</ion-col>
</ion-row>
@ -74,12 +101,13 @@
<button ion-button style=" background: none;width: 60%;">
<img src="../assets/imgs/noteSmall.png">
</button>
<div
[ngClass]="{'bg-blue-dot' : approvalInfo.Action === 'Submit', 'bg-green-dot':approvalInfo.Action === 'Approved', 'bg-red-dot':approvalInfo.Action === 'Rejected', 'bg-gray-dot':approvalInfo.Action === 'Pending'}"
[class]="direction == 'en'? 'timeline-thumb-en timeline-icon': 'timeline-thumb-ar timeline-icon'"
[ngClass]="{'bg-gray-dot' : approvalInfo.Action === ''}">
</div>
<p style="margin-left: -20%; font-size: 12px !important;">{{approvalInfo.Action}}</p>
<p style="margin-left: -0%; font-size: 12px !important; width: 66px;">{{approvalInfo.Action}}</p>
</div>
</div>
<p style="margin-left: 10%;">{{approvalInfo.Name}}</p>

@ -34,6 +34,7 @@ export class WorkListMainItgComponent implements OnInit {
public segmentsArray: { name: string, number: number }[] = [];
public segmentData: { name: string, data: any }[] = [];
public requestDetailsData: { name: string, data: any }[] = [];
public dataLabelAndValue =[];
public header: any = [];
public rows: any = [];
public workList: any;
@ -89,16 +90,22 @@ export class WorkListMainItgComponent implements OnInit {
for (let i = 0; i < result.ITGRequest.FieldGoups.length; i++) {
this.segmentsArray[i] = { name: result.ITGRequest.FieldGoups[i].Title, number: i };
this.segmentData[i] = { name: result.ITGRequest.FieldGoups[i].Title, data: result.ITGRequest.FieldGoups[i].Fields }
for (let j = 0; j < this.segmentData[i].data.length; j++) {
if (this.segmentData[i].data[j].TableValue){
this.requestDetailsData[count] ={ name:this.segmentData[i].data[j].TableValue.Header,
data: this.segmentData[i].data[j].TableValue.Rows}
count++;
// console.log(this.segmentData[i].data[j])
if(this.segmentData[i].data[j].Type ==="table"){
// console.log(JSON.parse(this.segmentData[i].data[j].Value));
this.dataLabelAndValue.push(JSON.parse(this.segmentData[i].data[j].Value))
console.log(this.dataLabelAndValue);
}
// if (this.segmentData[i].data[j].TableValue){
// this.requestDetailsData[count] ={ name:this.segmentData[i].data[j].TableValue.Header,
// data: this.segmentData[i].data[j].TableValue.Rows}
// count++;
// }
}
}
console.log(this.requestDetailsData)
console.log(this.dataLabelAndValue)
//console.log(this.requestDetailsData)
this.segmentsArray[this.segmentsArray.length] = { name: 'Approval Level', number: this.segmentsArray.length }
this.workList = this.request_details.WFHistory;
this.options = this.request_details.AllowedActions;
@ -147,6 +154,9 @@ export class WorkListMainItgComponent implements OnInit {
if (actionName == "Delegate") {
return "../assets/imgs/action-info.png"
}
if (actionName == "Answer") {
return "../assets/imgs/action-info.png"
}
}
public segmentChangedClick(event: any) {

@ -205,6 +205,10 @@
}
},
"general": {
"not-now":{
"en":"not now",
"ar":"لاحقاً"
},
"birth_date": {
"en": "Birth Date",
"ar": "تاريخ الميلاد"

Loading…
Cancel
Save