diff --git a/index.html b/index.html index 62bb506..410abc9 100644 --- a/index.html +++ b/index.html @@ -44,6 +44,129 @@ generalVC: {} } + @@ -78,12 +201,14 @@
  • Apply
  • List
  • +
  • Intern
  • +

    Intro

    @@ -118,68 +243,111 @@ -
    -

    Apply

    -
    -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - - -
    - + +
    + -
    - - - + + + + + + + @@ -205,6 +373,30 @@ + +
    +

    Intern Information

    + +
    + + +
    + + +
    +
    +

    +

    NEVER lose your Private Key
    + NEVER share your Private Key with anyone

    + Losing your Private Key means losing all the accomplishments, data & money attached to your + Internship ID. Private Key once lost can NEVER be recovered. Please store + it safely. +

    +

    +
    + +
    +
    @@ -9408,7 +9600,7 @@ } } - + async function fetchInternApplicants() { let applicants = await floCloudAPI.requestGeneralData('test') @@ -9419,12 +9611,25 @@ ev.preventDefault() let mainObj = validateForm() + if (mainObj != 0) { + + document.getElementById('applytabmain').style.display = 'none' + document.getElementById('applytabwaiting').style.display = 'initial' + floCloudAPI.sendGeneralData(JSON.stringify(mainObj), 'test4').then((result, mainObj) => { + if (result.split(":")[0].trim() == "Data sent to supernode") { //document.getElementById('directapply_resetform').click() - alert(`You have sucessfully applied for ${aproject}`) + document.getElementById('applytabwaiting').style.display = 'none' + document.getElementById('applytabsuccessful').style.display = 'initial' + + setTimeout(function(){ + document.getElementById('applytabsuccessful').style.display = 'none'; + document.getElementById('applytabmain').style.display = 'initial'; + window.location.href = "#list"; }, 2500) + // disable project from apply list and other list let projectlistchildren = document.getElementById('projectlist').children for (let i = 0; i < projectlistchildren.length; i++) { @@ -9442,20 +9647,23 @@ let projectlisttablebody = document.getElementById('projectlisttablebody') // appending application to applicant list - projectlisttablebody.innerHTML = projectlisttablebody.innerHTML + + projectlisttablebody.innerHTML = ` ${myFloID} ${aproject} - ` + ` + projectlisttablebody.innerHTML } else { - alert("Something went wrong, please reload the page") + + document.getElementById('applytabwaiting').style.display = 'none' + document.getElementById('applytabfailure').style.display = 'initial' + setTimeout(function(){ + document.getElementById('applytabfailure').style.display = 'none'; + document.getElementById('applytabmain').style.display = 'initial' }, 2500) } }) - - } }) @@ -9623,8 +9831,8 @@ document.getElementById('privkey_signin_btn_alt').addEventListener('click', (ev) => { document.getElementById('priv_key_field').value = document.getElementById("newprivatekey").value document.getElementById('privkey_signin_btn').click() - }) - + }) + }) } @@ -9648,7 +9856,8 @@ document.querySelector("#signin .close").style.display = 'initial' document.getElementById('welcome_message_top').innerText = `Welcome` document.getElementById('welcome_message_bottom').innerText = `${myFloID}` - document.getElementById('floid').value = myFloID + document.getElementById('floid').value = document.getElementById('internfloid').value = myFloID + document.getElementById('internprivatekey').value = myPrivKey //App functions.... @@ -9700,7 +9909,7 @@ document.getElementById('whatsapp').value = 'encrypted' document.getElementById('whatsapp').readOnly = true document.getElementById('directapply_resetform').style.display = 'none' - + tcounter = tcounter + 1 } } @@ -9720,7 +9929,7 @@ let projectlistContainer = document.getElementById('projectlist') let formprojectlistContainer = document.getElementById('formprojectlist') - for (let i = 0; i < projectDetailsKeys.length; i++) { + for (let i = projectDetailsKeys.length -1; i >= 0; i++) { let disabledtext = '' let radionametext = 'projectlistitem' let checkedtext = ''