0xV3NOMx
Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64



Your IP : 18.220.227.250


Current Path : /var/www/html/studentportal_wait/js/
Upload File :
Current File : /var/www/html/studentportal_wait/js/script.js

function loadYourExmAppList() {
  $("#loadtab").css({ padding: "0px", "margin-bottom": "10%" });
  $("#loadtab").load(
    "html_modules/yourExmAppList.html?v=" + version,
    function() {
      $.ajax({
        type: "GET",
        url: `${$host_url}DisplayApplications&univcode=041&fregno=${FREGNO}`,
        success: response => {
          var { status, error_code, data } = JSON.parse(response);
          console.log("RES", JSON.parse(response), data);

          if (error_code == "0") {
            var tblDet = `
                  <thead style = "height:40px;background-color: #184F76 !important;color: #fff;">
                    <tr >
                      <th class="text-center">Sl.No.</th>
                      <th class="text-center">App. No.</th>
                      <th class="text-center">Amount</th>
                      <th class="text-center">Date</th>
                      <th class="text-center">Payment Type</th>
                      <th class="text-center">Status</th>
                      <th class="text-center">Action</th>                  
                    </tr> `;

            tblDet += `
                  </tr>
                  </thead>
                  <tbody>`;
            var SuccCnt = 0;
            data.list.forEach((el, i) => {
              var action = "";
              var payBtn = "";

              if (el.FPAYMENTCONFIRM == "success") {
                action +=
                  "<span style='color:green'><b>Received at University for processing</b></span>";
                payBtn += `<a class="btn btn-primary waves-effect mr-1" href="${el.link}">Print</a>`;
                SuccCnt++;
              } else {
                if (el.FPAYMENTYPE == "POSTOFFICE") {
                  action += `<b>Payment not made at ${el.FPAYMENTYPE} </b>`;
                  payBtn += `<Button type="button" class="btn btn-primary waves-effect mr-1"
                  id="idpayment" onClick="PrintApplicationForm(${el.FPAYMENTYPE},${el.APPNO})">Print App</button>`;
                }
                // else if (el.FPAYMENTYPE == "DEBIT/CREDIT/NET BANKING")
                //   action += "Online Payment Pending";
                else {
                  action += "<b>Payment Pending</b>";
                  payBtn += `<Button type="button" class="btn btn-primary waves-effect mr-1"
                  id="idpayment" onclick="rvrtResponse(${el.APPNO})">Make Payment</button>`;
                }
                if (data.lastDate > 0) {
                  payBtn = `<span style="color:red">Last Date is Over</span>`;
                }
              }
              if (SuccCnt > 1) {
                payBtn += `<Button type="button" class="btn btn-primary waves-effect mr-1"
                id="refundBtn">Refund</Button>`;
              }

              tblDet += `
                <tr style="text-align:center">
                  <td style="width:10px">${i + 1}</td>
                  <td>${el.APPNO}</td>
                  <td>${el.FTOTALFEE}</td>
                  <td>${el.FAPPDATE}</td>
                  <td>${el.FPAYMENTYPE}</td>
                  <td>${action}</td>
                  <td >${payBtn}</td>
                  </tr>`;
            });

            $("#yourExmAppsDet").html(tblDet);
          } else {
            alert("No Applications Found.");
          }
        }
      });
    }
  );
}