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 : 3.142.212.225


Current Path : /var/www/oasis/js/
Upload File :
Current File : /var/www/oasis/js/practcalDailyReport.js

function callPractcalDailyReport() {
  $("#page_main_div").load(
    "../html_modules/practcalDailyReport.html",
    function () {
      document.getElementById("display_module_name").innerHTML =
        " Practical Daily Report ";
      document.getElementById("module_name_for_save").value =
        "Practical Daily Report";
      getDefaultHeadFooterLinks("Practical Daily Report");

      if (db == "demo") {
        $("#report_topsheet_degree_code").val("BCA1");
        $("#report_topsheet_degree_name").val(
          "Bachelor of Computer Application (2018 Batch Only)"
        );
        $("#report_topsheet_Examno").val("E");
        $("#report_topsheet_Examno_name").val("V Semseter");
      }
      loadDegreePD();
    }
  );
}

function loadDegreePD() {
  $.ajax({
    type: "GET",
    url: $host_url + "getBatchWisePRDegree",
    success: function (res) {
      var response = JSON.parse(res);
      if (response.error_code == 0) {
        var degree = "";
        degree += `<option>---select---</option>`;
        for (var i = 0; i < response.data.length; i++) {
          degree += `<option value="${response.data[i].fdegree}">${response.data[i].fdegree} - ${response.data[i].fdescpn}</option>`;
        }
        $("#report_topsheet_degree_code").html(degree);
      } else {
        alert(response.data);
        return;
      }
    },
  });
}

function getBatchWiseSemesterDetailsPD() {
  let degree = $("#report_topsheet_degree_code").val();
  if (degree == "---select---" || degree == "" || degree == null) {
    alert("Please Select Degree");
    return;
  }
  $.ajax({
    type: "GET",
    url: $host_url + "getBatchWisePRSemister",
    data: "degree=" + degree,
    success: function (res) {
      let response = JSON.parse(res);
      if (response.error_code == 0) {
        var sem = "";
        sem += `<option>---select---</option>`;
        for (var i in response.data) {
          sem += `<option value="${response.data[i].fexamno}">${response.data[i].fexamno} - ${response.data[i].fexamname}</option>`;
          i++;
        }
        $("#report_topsheet_Examno").html(sem);
      } else {
        alert(response.data);
        return;
      }
    },
  });
}

function Generatetopsheet() {
  var degree = $("#report_topsheet_degree_code").val();
  var sem = $("#report_topsheet_Examno").val();
  if (degree == "---select---" || degree == null || degree == "") {
    alert("Please Select degree");
    return;
  }
  if (sem == "---select---" || sem == null || sem == "") {
    alert("Please Select Exam No");
    return;
  }
  window.open(
    $host_url +
      "Generatetopsheet&degree_code=" +
      trim($("#report_topsheet_degree_code").val()) +
      "&examno=" +
      trim($("#report_topsheet_Examno").val()) +
      "&batch_from=" +
      trim($("#report_topsheet_from").val()) +
      "&batch_to=" +
      trim($("#report_topsheet_to").val())
  );
}

function Enabletopsheetpr() {
  callPractcalDailyReport();
}