@ -1,39 +1,42 @@
<!DOCTYPE html>
< html xmlns:th = "http://www.thymeleaf.org" >
< head th:replace = "~{fragments/modules/base/head :: head}" > < / head >
< style >
.required{
color: red;
}
/* Mobile screens - targeting devices with a max width of 767px */
@media (max-width: 767px)
{
#requestlistform label {
margin-top: 10px;
}
}
.required {
color: red;
}
/* Mobile screens - targeting devices with a max width of 767px */
@media (max-width: 767px) {
#requestlistform label {
margin-top: 10px;
}
}
#viewModal .modal-body {
max-height: 70vh; /* Limit the height to 70% of the viewport */
overflow-y: auto; /* Enable vertical scrolling */
max-height: 70vh;
/* Limit the height to 70% of the viewport */
overflow-y: auto;
/* Enable vertical scrolling */
}
.custom-doc-btn {
height: 20px;
width: 80px;
font-size: 9px;
font-weight:bold;
text-align: center;
padding: 0px;
border:1px solid grey;
}
.col-md-3{
padding-bottom: 10px;
}
.comment {
height: 20px;
width: 80px;
font-size: 9px;
font-weight: bold;
text-align: center;
padding: 0px;
border: 1px solid grey;
}
.col-md-3 {
padding-bottom: 10px;
}
.comment {
margin-bottom: 20px;
}
@ -58,244 +61,251 @@ padding-bottom: 10px;
border-top: 1px solid #ccc;
}
< / style >
< body >
<!-- [if lt IE 8]>
< body >
<!-- [if lt IE 8]>
< p class = "browserupgrade" > You are using an < strong > outdated< / strong > browser. Please < a href = "http://browsehappy.com/" > upgrade your browser< / a > to improve your experience.< / p >
<![endif]-->
< div class = "wrapper" >
<!-- header top menu Start -->
< header th:replace = "~{fragments/modules/base/header :: header}" > < / header >
<!-- header top menu end -->
< div class = "page-wrap" >
<!-- =============== Left Menu side Start ================ -->
< div th:replace = "~{fragments/modules/base/menu :: menu}" > < / div >
<!-- =============== Left side End ================ -->
< div class = "main-content" >
< div class = "container-fluid" >
< div class = "page-header mb-2" >
< div class = "row align-items-end" >
< div class = "col-lg-8" >
< div class = "page-header-title" >
< i class = "far fa-calendar-plus bg-blue" > < / i >
< div class = "d-inline" >
< h5 > Meeting List< / h5 >
< span > Vending Committe< / span >
< / div >
< / div >
< / div >
< div class = "col-lg-4" >
< nav class = "breadcrumb-container" aria-label = "breadcrumb" >
< ol class = "breadcrumb" >
< li class = "breadcrumb-item" > < a href = "/gcc/index" > < i
class="ik ik-home">< / i > < / a > < / li >
< li class = "breadcrumb-item" aria-current = "page" > Vending Committe< / li >
< li class = "breadcrumb-item active" aria-current = "page" > Meeting List< / li >
< / ol >
< / nav >
< / div >
< / div >
< / div >
< div class = "row" >
< div class = "col-md-12" >
< div class = "card" >
< div class = "card-header" >
< span style = "font-size: medium;font-weight: bold;" > Reports Filters< / span > < span th:text = "${LoginUserId}" id = "userIdSpan" style = "display: none;" > < / span > < span th:text = "${zone}" id = "userzone" style = "display: none;" > < / span >
< / div >
< div class = "card-body" >
< div class = "row" >
< div class = "col-md-4 mb-1" >
< label for = "meetingdropdown" style = "font-size: medium;" > Meeting:< / label >
< select id = "meetingdropdown" class = "form-control" >
< option value = "" > Select an Meeting< / option >
< / select >
< / div >
< div class = "col-md-2 mb-1" >
< label for = "statusdropdown" style = "font-size: medium;" > Status:< / label >
< select id = "statusdropdown" class = "form-control" >
< option value = "" > Select Status< / option >
< option value = "Approved" > Approved< / option >
< option value = "Rejected" > Rejected< / option >
< option value = "Postponed" > Postponed< / option >
< / select >
< / div >
< div class = "col-md-3 mb-1" >
< label for = "zonedropdown" style = "font-size: medium;" > Zone:< / label >
< select id = "zonedropdown" class = "form-control" >
< option value = "" > Select an Zone< / option >
< / select >
< / div >
< div class = "col-md-3 mb-1" >
< label for = "warddropdown" style = "font-size: medium;" > Ward:< / label >
< select id = "warddropdown" class = "form-control" >
< option value = "" > Select an Ward< / option >
< / select >
< / div >
<!-- <div class="col - md - 4 mb - 1">
< div class = "wrapper" >
<!-- header top menu Start -->
< header th:replace = "~{fragments/modules/base/header :: header}" > < / header >
<!-- header top menu end -->
< div class = "page-wrap" >
<!-- =============== Left Menu side Start ================ -->
< div th:replace = "~{fragments/modules/base/menu :: menu}" > < / div >
<!-- =============== Left side End ================ -->
< div class = "main-content" >
< div class = "container-fluid" >
< div class = "page-header mb-2" >
< div class = "row align-items-end" >
< div class = "col-lg-8" >
< div class = "page-header-title" >
< i class = "far fa-calendar-plus bg-blue" > < / i >
< div class = "d-inline" >
< h5 > Meeting List< / h5 >
< span > Vending Committe< / span >
< / div >
< / div >
< / div >
< div class = "col-lg-4" >
< nav class = "breadcrumb-container" aria-label = "breadcrumb" >
< ol class = "breadcrumb" >
< li class = "breadcrumb-item" > < a href = "/gcc/index" > < i class = "ik ik-home" > < / i > < / a >
< / li >
< li class = "breadcrumb-item" aria-current = "page" > Vending Committe< / li >
< li class = "breadcrumb-item active" aria-current = "page" > Meeting List< / li >
< / ol >
< / nav >
< / div >
< / div >
< / div >
< div class = "row" >
< div class = "col-md-12" >
< div class = "card" >
< div class = "card-header" >
< span style = "font-size: medium;font-weight: bold;" > Reports Filters< / span > < span
th:text="${LoginUserId}" id="userIdSpan" style="display: none;">< / span > < span
th:text="${zone}" id="userzone" style="display: none;">< / span >
< / div >
< div class = "card-body" >
< div class = "row" >
< div class = "col-md-4 mb-1" >
< label for = "meetingdropdown" style = "font-size: medium;" > Meeting:< / label >
< select id = "meetingdropdown" class = "form-control" >
< option value = "" > Select an Meeting< / option >
< / select >
< / div >
< div class = "col-md-2 mb-1" >
< label for = "statusdropdown" style = "font-size: medium;" > Status:< / label >
< select id = "statusdropdown" class = "form-control" >
< option value = "" > Select Status< / option >
< option value = "Approved" > Approved< / option >
< option value = "Rejected" > Rejected< / option >
< option value = "Postponed" > Postponed< / option >
< / select >
< / div >
< div class = "col-md-3 mb-1" >
< label for = "zonedropdown" style = "font-size: medium;" > Zone:< / label >
< select id = "zonedropdown" class = "form-control" >
< option value = "" > Select an Zone< / option >
< / select >
< / div >
< div class = "col-md-3 mb-1" >
< label for = "warddropdown" style = "font-size: medium;" > Ward:< / label >
< select id = "warddropdown" class = "form-control" >
< option value = "" > Select an Ward< / option >
< / select >
< / div >
<!-- <div class="col - md - 4 mb - 1">
< button class = "btn btn-primary" style = "margin-top: 32px;" id = "submitBtn" > Submit< / button >
< / div > -->
< / div >
< div class = "row mt-4" >
< div class = "col-12 d-flex justify-content-center" >
< button class = "btn btn-primary" id = "submitBtn" > Submit< / button >
< button class = "btn btn-danger mx-2" id = "resetBtn"
name="reset" type="reset">Reset< / button >
< / div >
< / div >
< / div >
< div class = "card-block" >
< div class = "page-header-title" >
< h5 style = "margin: 0;font-weight: bold;" > Vendors Meeting List< / h5 > < hr >
< / div >
< table id = "RequestListDatatable" class = "table table-striped table-bordered table-hover dataTable" role = "grid" >
< thead class = "thead-dark" >
< tr role = "row" >
< th class = "text-center" > S.No< / th >
< th class = "text-center" > Request No< / th >
< th class = "text-center" > Zone< / th >
< th class = "text-center" > Ward< / th >
< th class = "text-center" > Public Name< / th >
< th class = "text-center" > Mobile< / th >
< th class = "text-center" > Status< / th >
< th class = "text-center no-sort" width = "%2" > View Details< / th >
< / tr >
< / thead >
< tbody >
< / tbody >
< tfoot class = "thead-dark" >
< tr >
< th class = "text-center" > S.No< / th >
< th class = "text-center" > Request No< / th >
< th class = "text-center" > Zone< / th >
< th class = "text-center" > Ward< / th >
< th class = "text-center" > Public Name< / th >
< th class = "text-center" > Mobile< / th >
< th class = "text-center" > Status< / th >
< th class = "text-center no-sort" width = "%2" > View Details< / th >
< / tr >
< / tfoot >
< / table >
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
< div class = "row mt-4" >
< div class = "col-12 d-flex justify-content-center" >
< button class = "btn btn-primary" id = "submitBtn" > Submit< / button >
< button class = "btn btn-danger mx-2" id = "resetBtn" name = "reset"
type="reset">Reset< / button >
< / div >
< / div >
< / div >
< div class = "card-block" >
< div class = "page-header-title" >
< h5 style = "margin: 0;font-weight: bold;" > Vendors Meeting List< / h5 >
< hr >
< / div >
< table id = "RequestListDatatable"
class="table table-striped table-bordered table-hover dataTable" role="grid">
< thead class = "thead-dark" >
< tr role = "row" >
< th class = "text-center" > S.No< / th >
< th class = "text-center" > Request No< / th >
< th class = "text-center" > Zone< / th >
< th class = "text-center" > Ward< / th >
< th class = "text-center" > Public Name< / th >
< th class = "text-center" > Mobile< / th >
< th class = "text-center" > Status< / th >
< th class = "text-center no-sort" width = "%2" > View Details< / th >
< / tr >
< / thead >
< tbody >
< / tbody >
< tfoot class = "thead-dark" >
< tr >
< th class = "text-center" > S.No< / th >
< th class = "text-center" > Request No< / th >
< th class = "text-center" > Zone< / th >
< th class = "text-center" > Ward< / th >
< th class = "text-center" > Public Name< / th >
< th class = "text-center" > Mobile< / th >
< th class = "text-center" > Status< / th >
< th class = "text-center no-sort" width = "%2" > View Details< / th >
< / tr >
< / tfoot >
< / table >
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
<!-- Modal -->
< div class = "modal fade" id = "viewModal" tabindex = "-1" aria-labelledby = "viewModalLabel" aria-hidden = "true"
data-bs-backdrop="static" data-bs-keyboard="false">
< div class = "modal-dialog modal-lg" >
< div class = "modal-content" >
< div class = "modal-header" >
< h5 class = "modal-title" id = "viewModalLabel" > Request Details< / h5 >
< button type = "button" class = "close" data-bs-dismiss = "modal" aria-label = "Close" >
< span aria-hidden = "true" > × < / span >
< / button >
< / div >
< div class = "modal-body" id = "modalBodyContent" >
<!-- Dynamic content loads here -->
< / div >
< div class = "modal-footer" >
< button type = "button" class = "btn btn-secondary" data-bs-dismiss = "modal" > Close< / button >
< / div >
< / div >
< / div >
< / div >
<!-- Image Modal -->
< div class = "modal fade" id = "docModal" tabindex = "-1" aria-hidden = "true" >
< div class = "modal-dialog modal-dialog-scrollable modal-lg" >
< div class = "modal-content border-0" >
< div class = "modal-body p-0 text-center" style = "background-color: #f8f9fa;" >
< div id = "docContainer" style = "max-height: 90vh; overflow: auto;" > < / div >
< / div >
< / div >
< / div >
<!-- Modal -->
< div class = "modal fade" id = "viewModal" tabindex = "-1" aria-labelledby = "viewModalLabel" aria-hidden = "true" data-bs-backdrop = "static" data-bs-keyboard = "false" >
< div class = "modal-dialog modal-lg" >
< div class = "modal-content" >
< div class = "modal-header" >
< h5 class = "modal-title" id = "viewModalLabel" > Request Details< / h5 >
< button type = "button" class = "close" data-bs-dismiss = "modal" aria-label = "Close" >
< span aria-hidden = "true" > × < / span >
< / button >
< / div >
< div class = "modal-body" id = "modalBodyContent" >
<!-- Dynamic content loads here -->
< / div >
< div class = "modal-footer" >
< button type = "button" class = "btn btn-secondary" data-bs-dismiss = "modal" > Close< / button >
< / div >
< / div >
< / div >
< / div >
<!-- Image Modal -->
< div class = "modal fade" id = "docModal" tabindex = "-1" aria-hidden = "true" >
< div class = "modal-dialog modal-dialog-scrollable modal-lg" >
< div class = "modal-content border-0" >
< div class = "modal-body p-0 text-center" style = "background-color: #f8f9fa;" >
< div id = "docContainer" style = "max-height: 90vh; overflow: auto;" > < / div >
< / div >
< / div >
< / div >
< / div >
< div id = "pageLoader" style = "display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255, 255, 255, 0.8); z-index: 9999; text-align: center;" >
< div style = "position: relative; top: 50%; transform: translateY(-50%);" >
< div class = "spinner-border text-primary" role = "status" style = "width: 3rem; height: 3rem;" >
< span class = "sr-only" > Loading...< / span >
< / div >
<!-- Add the 'Please wait' text below the spinner -->
< p style = "margin-top: 1rem; font-size: 1.2rem; color: #007bff;" > Please wait...< / p >
< / div >
< / div >
< footer th:replace = "~{fragments/modules/base/footer :: footer}" > < / footer >
< / div >
< / div >
< div th:replace = "~{fragments/modules/base/app_module_menu_box :: div}" > < / div >
< script th:replace = "~{fragments/modules/base/script :: script}" > < / script >
< script src = "node_modules/tempusdominus-bootstrap-4/build/js/tempusdominus-bootstrap-4.min.js" > < / script >
< script src = "https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.18.5/xlsx.full.min.js" > < / script >
< script src = "https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js" > < / script >
< script type = "text/javascript" >
< / div >
< div id = "pageLoader"
style="display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255, 255, 255, 0.8); z-index: 9999; text-align: center;">
< div style = "position: relative; top: 50%; transform: translateY(-50%);" >
< div class = "spinner-border text-primary" role = "status" style = "width: 3rem; height: 3rem;" >
< span class = "sr-only" > Loading...< / span >
< / div >
<!-- Add the 'Please wait' text below the spinner -->
< p style = "margin-top: 1rem; font-size: 1.2rem; color: #007bff;" > Please wait...< / p >
< / div >
< / div >
< footer th:replace = "~{fragments/modules/base/footer :: footer}" > < / footer >
< / div >
< / div >
< div th:replace = "~{fragments/modules/base/app_module_menu_box :: div}" > < / div >
< script th:replace = "~{fragments/modules/base/script :: script}" > < / script >
< script src = "node_modules/tempusdominus-bootstrap-4/build/js/tempusdominus-bootstrap-4.min.js" > < / script >
< script src = "https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.18.5/xlsx.full.min.js" > < / script >
< script src = "https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js" > < / script >
< script type = "text/javascript" >
let userzone = document.getElementById('userzone').textContent;
let userId = document.getElementById('userIdSpan').textContent;
// GLOBAL scope — must be outside any other function
function openDocModal(fileUrl) {
const container = document.getElementById('docContainer');
const ext = fileUrl.split('.').pop().toLowerCase();
if (ext === 'pdf') {
container.innerHTML = `< iframe src = "${fileUrl}" style = "width:100%; height:90vh;" frameborder = "0" > < / iframe > `;
} else {
container.innerHTML = `< img src = "${fileUrl}" class = "img-fluid" style = "max-height:90vh; max-width:100%;" onerror = "this.src='/default.jpg'" > `;
}
$('#docModal').modal('show');
}
$(document).ready(function() {
var table = $('#RequestListDatatable').DataTable({
// GLOBAL scope — must be outside any other function
function openDocModal(fileUrl) {
const container = document.getElementById('docContainer');
const ext = fileUrl.split('.').pop().toLowerCase();
if (ext === 'pdf') {
container.innerHTML = `< iframe src = "${fileUrl}" style = "width:100%; height:90vh;" frameborder = "0" > < / iframe > `;
} else {
container.innerHTML = `< img src = "${fileUrl}" class = "img-fluid" style = "max-height:90vh; max-width:100%;" onerror = "this.src='/default.jpg'" > `;
}
$('#docModal').modal('show');
}
$(document).ready(function () {
var table = $('#RequestListDatatable').DataTable({
dom: 'Bftip',
columnDefs: [
{ targets: 'no-sort', orderable: false }
@ -304,7 +314,7 @@ padding-bottom: 10px;
[50, 100, 200, 500, -1],
['50 rows', '100 rows', '200 rows', 'Show all']
],
scrollY: '50vh',
scrollY: '50vh',
buttons: [
{
extend: 'pageLength',
@ -342,12 +352,12 @@ padding-bottom: 10px;
searching: false,
select: false,
processing: false
});
fetchEventDropdown();
fetchEventDropdown(userId);
let zoneString = userzone; // e.g. "01,02,03,04,05"
if (zoneString) {
@ -369,10 +379,10 @@ padding-bottom: 10px;
fetchWardDropdown(selectedZone);
}
});
fetchVendingCommitteeList("","","","",userId)
fetchVendingCommitteeList("", "", "", "", userId)
});
function fetchWardDropdown(zone) {
$.ajax({
@ -403,45 +413,45 @@ padding-bottom: 10px;
}
});
}
$('#resetBtn').on('click', function () {
location.reload();
return;
location.reload();
return;
});
$('#submitBtn').on('click', function () {
const meeting = $('#meetingdropdown').val();
const status = $('#statusdropdown').val();
const zone = $('#zonedropdown').val();
const ward = $('#warddropdown').val();
console.log("Selected Meeting Value:", meeting);
console.log("Selected Status Value:", status);
console.log("Selected zone Value:", zone);
console.log("Selected ward Value:", ward);
// 👉 Now call your API or next function using these two
fetchVendingCommitteeList (meeting, status , zone , ward,userId);
fetchVendingCommitteeList(meeting, status, zone, ward, userId);
});
function fetchVendingCommitteeList(event_req_id,status,zone,ward) {
$('#pageLoader').show();
function fetchVendingCommitteeList(event_req_id, status, zone, ward) {
$('#pageLoader').show();
$.ajax({
url: '/gcc/api/vending/getreports',
data: { meeting: event_req_id,status:status,zone:zone,ward:ward,userId:userId },
data: { meeting: event_req_id, status: status, zone: zone, ward: ward, userId: userId },
method: 'GET',
contentType: 'application/json',
success: function (data) {
$('#pageLoader').hide();
$('#pageLoader').hide();
let tableContainer = $('#RequestListDatatable');
// Destroy any existing DataTable instance
@ -488,11 +498,11 @@ padding-bottom: 10px;
} else if (cellData === 'Rejected') {
$(td).css('color', 'red').css('font-weight', 'bold');
}
else{
$(td).css('color', 'orange').css('font-weight', 'bold');
else {
$(td).css('color', 'orange').css('font-weight', 'bold');
}
}
},
},
{
data: 'id',
render: function (data, type, row) {
@ -500,7 +510,7 @@ padding-bottom: 10px;
},
className: 'text-center'
}
],
dom: 'Bfrtip',
buttons: [
@ -512,25 +522,25 @@ padding-bottom: 10px;
],
columnDefs: [{ targets: 'no-sort', orderable: false }],
lengthMenu: [
[50, 100, 200, 500, -1],
['50 rows', '100 rows', '200 rows', 'Show all']
],
[50, 100, 200, 500, -1],
['50 rows', '100 rows', '200 rows', 'Show all']
],
scrollY: '80vh',
scrollX: true,
responsive: false
});
// Bind view buttons
tableContainer.off('click', '.btn-view');
// Bind view buttons
tableContainer.off('click', '.btn-view');
tableContainer.on('click', '.btn-view', function () {
let id = $(this).data('id');
let id = $(this).data('id');
$.ajax({
url: `/gcc/api/vending/finalvendorDetailsById?requestId=${id}`,
method: 'GET',
success: function (detailData) {
if (!detailData || detailData.length === 0) {
$('#modalBodyContent').html("< p > No data found for this request.< / p > ");
$('#viewModal').modal('show');
@ -538,32 +548,32 @@ padding-bottom: 10px;
}
const details = detailData[0];
const historyList = detailData.map(h => ({
date: h.vc_Inspection_date || "N/A",
status: h.vc_status || "N/A",
remarks: h.vc_remarks || "",
event: h.event_name || "-"
}));
const diffAbledDisplay = details.diff_abled ? (details.diff_abled ? 'Yes' : 'No') : '-';
const pmLoanDisplay = details.pm_svanidhi_loan ? (details.pm_svanidhi_loan ? 'Yes' : 'No') : '-';
const bankAccDisplay = details.bank_acc_status ? (details.bank_acc_status === '1' ? 'Yes' : 'No') : '-';
const idCardDisplay= details.vendor_id_card ? (details.vendor_id_card ==='1' ? 'Yes' : 'No') : '-';
const idCardDisplay = details.vendor_id_card ? (details.vendor_id_card === '1' ? 'Yes' : 'No') : '-';
const bankPassbookDisplay = details.bank_acc_status === '1' & & details.bank_passbook
? `< img src = "${details.bank_passbook}" alt = "Bank Passbook" class = "img-fluid" style = "max-width: 150px;" onerror = "this.src='/default.jpg'" > `
: '-';
? `< img src = "${details.bank_passbook}" alt = "Bank Passbook" class = "img-fluid" style = "max-width: 150px;" onerror = "this.src='/default.jpg'" > `
: '-';
const aadharFrontBtn = details.aadhar_front_photo ? `< button class = "btn btn-sm btn-light custom-doc-btn" onclick = "openDocModal('${details.aadhar_front_photo}')" > View< / button > ` : '-';
const rationCardBtn = details.ration_card_photo ? `< button class = "btn btn-sm btn-light custom-doc-btn" onclick = "openDocModal('${details.ration_card_photo}')" > View< / button > ` : '-';
const aadharBackBtn = details.aadhar_back_photo ? `< button class = "btn btn-sm btn-light custom-doc-btn" onclick = "openDocModal('${details.aadhar_back_photo}')" > View< / button > ` : '-';
const bankPassbookBtn = details.bank_acc_status === '1' & & details.bank_passbook
? `< button class = "btn btn-sm btn-light custom-doc-btn" onclick = "openDocModal('${details.bank_passbook}')" > View< / button > `
: '-';
const spacePhotoBtn= details.vendor_space_photo ? `< button class = "btn btn-sm btn-light custom-doc-btn" onclick = "openDocModal('${details.vendor_space_photo}')" > View< / button > ` : '-';
const spacePhotoBtn = details.vendor_space_photo ? `< button class = "btn btn-sm btn-light custom-doc-btn" onclick = "openDocModal('${details.vendor_space_photo}')" > View< / button > ` : '-';
let historyHtml = "";
historyList.forEach(h => {
historyHtml += `
@ -579,8 +589,8 @@ padding-bottom: 10px;
< / div >
< / div > `;
});
const content = `
< div class = "container-fluid" >
<!-- Personal Details -->
@ -734,8 +744,8 @@ padding-bottom: 10px;
< / div >
< / div >
`;
`;
$('#modalBodyContent').html(content);
$('#viewModalLabel').text(`Vendor Details - ${id}`);
$('#viewModal').modal('show');
@ -746,22 +756,23 @@ padding-bottom: 10px;
}
});
});
},
error: function (xhr, status, error) {
$('#pageLoader').hide();
$('#pageLoader').hide();
console.error("Error fetching data:", error);
alert("Failed to load vendor list.");
}
});
}
// Call this function on page load
function fetchEventDropdown() {
// Call this function on page load
function fetchEventDropdown(userId ) {
$.ajax({
url: '/gcc/api/vending/committedropdown',
type: 'GET',
data: { userId: userId },
dataType: 'json',
success: function (data) {
let eventDropdown = $('#meetingdropdown');
@ -769,13 +780,13 @@ padding-bottom: 10px;
eventDropdown.append('< option value = "" > Select an Meeting< / option > ');
data.forEach(function (event) {
// Optional: filter active & not deleted
eventDropdown.append(
$('< option > < / option > ')
.val(event.req_id)
.text(`${event.event_name} - ${event.formated_date}`)
);
// Optional: filter active & not deleted
eventDropdown.append(
$('< option > < / option > ')
.val(event.req_id)
.text(`${event.event_name} - ${event.formated_date}`)
);
});
},
error: function (xhr, status, error) {
@ -784,10 +795,11 @@ padding-bottom: 10px;
}
});
}
< / script >
< / body >
< / script >
< / body >
< / html >