Untitled

 avatar
unknown
plain_text
4 years ago
1.7 kB
5
Indexable
getecombooking(func,custcode) {
    console.log("---------- inside getecombooking ---------- ",custcode);
    
    fetch('https://lrpv2-demo.solverminds.net/EcomAPI/Booking/bookingSummary', {
    method: 'POST',
    headers: {
    
    'Content-Type': 'application/json',
    },
    
    
    body: JSON.stringify({
    
    // "usercode":"INSVM234",
    // "from_date":"2021-02-01",
    // "to_date":"2021-02-10"
    
    "usercode":custcode,
    "from_date":"",
    "to_date":""
    
    }
    
    ),
    }).then((response) => response.json())
    
    .then((responseJson) => {
    
    console.log(" getecombooking summary >>>>>>>>>", responseJson);
    
    
    const func1 = func;
    func1(responseJson);
    
    
    })
    .catch((error) => {
    alert('session expired ! try again ')
    console.error(error);
    
    });
    
    }
    
    
    getecom_booking1(func,bookno) {
    console.log("---------- inside getecombooking 1---------- ",bookno);
    
    fetch('https://lrpv2-demo.solverminds.net/EcomAPI/Booking/bookingView', {
    method: 'POST',
    headers: {
    
    'Content-Type': 'application/json',
    },
    
    
    body: JSON.stringify({
    
    
    "lrpBookNo":bookno,
    "lrpEcomStatus":"L",
    "appVersion":"",
    "bookNo":""
    
    
    }
    
    ),
    }).then((response) => response.json())
    
    .then((responseJson) => {
    
    console.log(" getecombooking1 >>>>>>>>>", responseJson);
    
    
    const func1 = func;
    func1(responseJson);
    
    
    })
    .catch((error) => {
    alert('session expired ! try again ')
    console.error(error);
    
    });
    
    }

}








Editor is loading...