<div class="row" id="loyalty<?php echo $p['id_loyalty']; ?>">
	<div class="col-1">
		<?php if (!empty($p['id_order'])) { 
		?>
				<span class="ps-id badge badge-pill" data-toggle="tooltip" title="Ver en PS" style="background-color: <?php echo $estados_ventas[$p['ps_state']]['fondo'];?>; color: <?php echo $estados_ventas[$p['ps_state']]['color'];?>;" data-ps-id="<?php echo $p['id_order']; ?>">
					<?php echo $p['id_order']; ?>
		</span>
	<?php }
		else {
			echo '-';
		}
	?>
	</div>
	<div class="col-4 loyalty-description">
		<?php echo $p['description']; ?>
	</div>
	<div class="col-2">
		<?php echo fechaHora($p['date_add']); ?>
	</div>
	<div class="col-2 loyalty-points">
		<?php 
			echo '<span class="badge badge-pill ' . $estados_puntos[$p['id_loyalty_state']]['class'] . '">' .$p['points'] . '</span>'; 
		?>
	</div>
	<div class="col-2 loyalty-state">
		<?php echo $estados_puntos[$p['id_loyalty_state']]['nombre']; ?>
	</div>
	<?php 
	if ($_SESSION['usuario']['admin']) {
		?>
		<div class="col-1 mb-1">
			<button type="button" class="btn btn-primary btn-sm" data-toggle="modal" data-target="#modalPuntos" data-id="<?php echo $p['id_loyalty']; ?>">
				<i class="fas fa-pencil-alt"></i>
			</button>
		</div>
		<?php
	}
	?>
</div>