{"size": 1476, "ext": "js", "max_stars_repo_path": "UI/js/transitRep.js", "max_stars_repo_name": "kwizeraelvis/SendIT", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "UI/js/transitRep.js", "max_issues_repo_name": "kwizeraelvis/SendIT", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "UI/js/transitRep.js", "max_forks_repo_name": "kwizeraelvis/SendIT", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 32.0869565217, "max_line_length": 77, "alphanum_fraction": 0.6910569106}
//get all forms with order-form class
let orderFormss = [...document.getElementsByClassName("transit-form")];
let transitForms= [...document.getElementsByClassName("user-transit-form")];
const editOrApply = action => {
	//get the current form's index
	let activeIndex = orderFormss.indexOf(
		orderFormss.find(form => form.classList.contains("active"))
	);
	//desactivate the current form, and activate the next one
	orderFormss[activeIndex].classList.remove("active");

	// manupulate the next or pevious form and step
	switch (action) {
		case "open":
			orderFormss[activeIndex + 1].classList.add("active");
			break;
		case "cancel":
			orderFormss[activeIndex - 1].classList.add("active");
      case "apply":
  			orderFormss[activeIndex - 1].classList.add("active");
		default:
			return null;
	}
};
const editTransitDest =action =>{
	//get the current form's index
	let activeIndex = transitForms.indexOf(
		transitForms.find(form => form.classList.contains("active"))
	);
	//desactivate the current form, and activate the next one
	transitForms[activeIndex].classList.remove("active");

	// manupulate the next or pevious form and step
	switch (action) {
		case "open":
			transitForms[activeIndex + 1].classList.add("active");
			break;
		case "cancel":
			transitForms[activeIndex - 1].classList.add("active");
			case "apply":
				transitForms[activeIndex - 1].classList.add("active");
		default:
			return null;
	}
};
