How can I see only one user's associated data?

97
August 02, 2021, at 09:20 AM

I got lists of clients, services and associated services: the last list has names of clients and services, specs about services like contract date & their price. But I want to see specific data depending on the user I choose, for example: if I choose an user, i can see the service he contracted and the same information that has the table. Another question about it is about the access, how can I put the button in each user column? I only made the table page in yii like that:

$this->title = 'Asociados';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="asociados-index">
    <h1><?= Html::encode($this->title) ?></h1>
    <p>
        <?= Html::a('Crear Asociados', ['create'], ['class' => 'btn btn-success']) ?>
    </p>
    <?php // echo $this->render('_search', ['model' => $searchModel]); ?>
    <?= GridView::widget([
        'dataProvider' => $dataProvider,
        'filterModel' => $searchModel,
        'columns' => [
            ['class' => 'yii\grid\SerialColumn'],
            //'id',
            'cliente',
            'servicio',
            'fechaContrato',
            'fechaVencimiento',
            'precio',
            ['class' => 'yii\grid\ActionColumn'],
        ],
    ]); ?>
    <p><a class="btn btn-primary" href="http://c2111406.ferozo.com/report/web/index.php?r=servicios%2Findex">Ver servicios</a></p>

</div>

And this is the access from the clients index page:

<?= GridView::widget([
    'dataProvider' => $dataProvider,
    'filterModel' => $searchModel,
    'columns' => [
        ['class' => 'yii\grid\SerialColumn'],
        'id',
        'nombre',
        'apellidoPaterno',
        'apellidoMaterno',
        'RFC',
        //'fechaAlta',
        //'fechaDeNacimiento',
        //'domicilio',
        //'numeroTelefonico',
        //'correoElectronico',
        ['class' => 'yii\grid\ActionColumn'],
    ],
]); ?>
<p><a class="btn btn-primary" href="http://localhost/report/web/index.php?r=asociados%2Findex">Ver servicios asociados</a></p>
READ ALSO
Android app not receiving notification from device to device

Android app not receiving notification from device to device

I am trying to make a chatting app in android studioAll the basic functions are done but I have been struggling with a problem for a time

144
Is there a way to reset .bind(&ldquo;ended&rdquo;) for audio/video players in Javascript?

Is there a way to reset .bind(“ended”) for audio/video players in Javascript?

I am very new to javascriptI have a function that activates only when some media (audio or video) is played

64
How to create a confusion matrix for VGG16 image calssification (2 options) when using preprocessing.image_dataset_from_directory

How to create a confusion matrix for VGG16 image calssification (2 options) when using preprocessing.image_dataset_from_directory

I have been trying to create a confusion matrix to test my data on from my VGG16 classification model (python 38, using Keras)

151
I can&#39;t link the information from a database into my php document

I can't link the information from a database into my php document

I'm trying to make an online shop for my school canteen (this is a school assignment) and I'm really struggling with linking items from the database I've created into my PHP document

84