<?php $this->load->view('managements/includes/head'); ?>
<?php $this->load->view('managements/includes/sidebar'); ?>
<?php $this->load->view('managements/includes/topbar'); ?>
<style type="text/css">
	thead input {
		width: 100%;
	}
	.meetDetails{
		color: #BB001A;
		font-size: 21px;
	}
	.hiddenRow {
		padding: 0 !important;
	}
</style>
<?php  $votingDetails = json_decode(json_encode($votingDetails), true)['data'];  

	// print_r($meeting_data);
?>
<!-- Main content-->
<div class="container my-3">

	<div class="row mb-4">
		<div class="container">
			<div class="row container p-2">

					<div class="col-md-4" style="font-size:18px"><span class="meetDetails py-2 fw-bold">Meeting Title: </span><?= @$meeting_data['data'][0]['refDataName']; ?></div>
				<div class="col-md-4" style="font-size:18px"><span class="meetDetails py-2 fw-bold">Organizer: </span><?= @$meeting_data['data'][0]['refDataName5']; ?></div>
				<div class="col-md-4" style="font-size:18px"><span class="meetDetails py-2 fw-bold">Group: </span><?= @$meeting_data['data'][0]['refDataName1']; ?></div>

				<div class="col-md-4" style="font-size:18px"><span class="meetDetails py-2 fw-bold">Meeting Date: </span><?= @$meeting_data['data'][0]['refDataName2']; ?></div>
				<div class="col-md-4" style="font-size:18px"><span class="meetDetails py-2 fw-bold">Meeting Time: </span><?= @$meeting_data['data'][0]['refDataName3']; ?></div>
				<div class="col-md-4" style="font-size:18px"><span class="meetDetails py-2 fw-bold">Meeting Location: </span><?= @$meeting_data['data'][0]['refDataName4']; ?></div>
				
			</div>
		</div>
	</div>

	<div class="table-responsive" id="votingRegister">

		<div class="container">
			<div class="col-md-12">
				<div class="panel panel-default">
					<div class="panel-heading">
					</div>
					<div class="panel-body">
						<table class="table table-condensed shadow table-hover table-striped bg-white">
							<thead>
								<tr style="background-color: #BB001A;color: white;">
									<th>#</th>
									<th>Member Name</th>
									<th colspan="2" class="text-center">Meeting Notes</th>
									<th class="text-end">Voting Options</th>		
								</tr>
							</thead>


							<tbody>
								<?php foreach ($votingDetails as $key => $value) { ?>
									
									<?php foreach ($value['Child Grid'] as $key => $value) { ?>
										<tr>
											<td><?=++$key?></td>
											<td><?=$value['refDataName']?></td>
											<td colspan="2" class="text-center"><?=$value['Meeting Notes']?></td>
											<td class="text-end"><?=$value['votingOptions']?></td>
										</tr>
									<?php } ?>


								<?php } ?>
							</tbody>
						</table>
					</div>

				</div> 

			</div>
		</div>



	</div>

</div>
<!-- End Main content--> 
<?php $this->load->view('managements/includes/footer'); ?>
<script type="text/javascript" src="<?=base_url('assets/js/time-picker.js')?>"></script>
<script src="<?=base_url('assets/js/jquery-ui.min.js');?>"></script>
<script>
	$(document).ready(function() {
		$('#attendanceData').DataTable( {
			order: [[ 0, 'desc' ]],
			language: {
				emptyTable: "No Attendance Available to Show.."
			}
		});
	} );
</script>
</body>
</html>
