Current File : /home/n742ef5/royalanteam.com/wp-content/plugins/myhome-core/views/user/payment-packages.php |
<?php
use Tangibledesign\Framework\Models\User\User;
/* @var User $user */
$userPaymentPackages = $user->getAllPackages();
?>
<h2><?php esc_html_e('User Payment Packages', 'myhome-core'); ?></h2>
<div>
<a
class="button button-primary"
href="<?php echo esc_url(admin_url('admin.php?page=tdf-user-payment-packages-apply&user=' . $user->getId())); ?>"
>
<?php esc_html_e('Apply Payment Package', 'myhome-core'); ?>
</a>
</div>
<?php
if ($userPaymentPackages->isEmpty()) {
return;
}
?>
<table class="form-table tdf-app">
<?php foreach ($userPaymentPackages as $userPaymentPackage) : ?>
<tr id="user-payment-package-<?php echo esc_attr($userPaymentPackage->getId()); ?>">
<th>
<?php echo esc_html($userPaymentPackage->getName()); ?>
</th>
<td>
<a
class="button button-secondary"
href="<?php echo esc_url($userPaymentPackage->getEditUrl()); ?>"
>
<?php esc_html_e('Edit', 'myhome-core'); ?>
</a>
<mh-delete-user-payment-package
:user-payment-package-id="<?php echo esc_attr($userPaymentPackage->getId()); ?>"
request-url="<?php echo esc_url(tdf_action_url(tdf_prefix() . '/user-payment-packages/remove')); ?>"
>
<button
class="button"
slot-scope="props"
@click.stop.prevent="props.deleteUserPaymentPackage"
>
<?php esc_html_e('Delete', 'myhome-core'); ?>
</button>
</mh-delete-user-payment-package>
</td>
</tr>
<?php endforeach; ?>
</table>