make segment active when first open & fixing skip function

MOHEMM-SFH-COLORS
enadhilal 6 years ago
parent 05ea5e349f
commit 1f50906684

@ -406,6 +406,7 @@ export class HomeComponent implements OnInit {
style: false
};
}
this.setActive(this.ITGSegment[0].code);
});
}

@ -134,19 +134,19 @@ export class WorkListMainItgComponent implements OnInit {
}
skip() {
for (let i = 0; i < this.all_request.length; i++) {
if (this.index < this.all_request.length) {
if (this.request_info.ID == this.all_request[i].ID) {
this.index = i + 1;
for (let i = 0; i < this.all_request.length; i++) { // search for the request that clicked on all request
if (this.request_info.ID == this.all_request[i].ID) { // check if the ID for the request is found.
this.index = i + 1;
if (this.index !== this.all_request.length) { // check if its last one to redirecte to home otherwise to next request.
this.clearDataArray();
this.changeITGForm(this.all_request[i + 1], this.request_name);
this.changeITGForm(this.all_request[this.index], this.request_name);
break;
} else {
alert("not found")
this.common.openNotificationPage();
break;
}
} else {
alert(" not found at all")
this.common.openNotificationPage();
break;
}
}

Loading…
Cancel
Save