make segment active when first open & fixing skip function

arabic-version
enadhilal 6 years ago
parent 05ea5e349f
commit 1f50906684

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

@ -134,19 +134,19 @@ export class WorkListMainItgComponent implements OnInit {
} }
skip() { skip() {
for (let i = 0; i < this.all_request.length; i++) { for (let i = 0; i < this.all_request.length; i++) { // search for the request that clicked on all request
if (this.index < this.all_request.length) { if (this.request_info.ID == this.all_request[i].ID) { // check if the ID for the request is found.
if (this.request_info.ID == this.all_request[i].ID) { this.index = i + 1;
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.clearDataArray();
this.changeITGForm(this.all_request[i + 1], this.request_name); this.changeITGForm(this.all_request[this.index], this.request_name);
break; break;
} else { } else {
alert("not found") this.common.openNotificationPage();
break; break;
} }
} else { } else {
alert(" not found at all") this.common.openNotificationPage();
break; break;
} }
} }

Loading…
Cancel
Save