Browse Source

Merge branch 'dev'

master
Guillaume 4 years ago
parent
commit
542cfda6be
3 changed files with 7 additions and 2 deletions
  1. +1
    -1
      backend/views/distribution/index.php
  2. +5
    -1
      backend/views/subscription/_form.php
  3. +1
    -0
      producer/controllers/SiteController.php

+ 1
- 1
backend/views/distribution/index.php View File

<option value="0">--</option> <option value="0">--</option>
<option v-for="user in users" :value="user.id_user" @click="userChange"> <option v-for="user in users" :value="user.id_user" @click="userChange">
<template v-if="user.name_legal_person && user.name_legal_person.length"> <template v-if="user.name_legal_person && user.name_legal_person.length">
{{ user.name_legal_person }}
Personne morale / {{ user.name_legal_person }}
</template> </template>
<template v-else> <template v-else>
{{ user.lastname +' '+ user.name }} {{ user.lastname +' '+ user.name }}

+ 5
- 1
backend/views/subscription/_form.php View File

<?php endif; ?> <?php endif; ?>
<div class="col-md-5" id="bloc-select-user"> <div class="col-md-5" id="bloc-select-user">
<?= $form->field($model, 'id_user')->dropDownList( ArrayHelper::map(User::find()->joinWith('userProducer')->where('user_producer.id_producer = '.GlobalParam::getCurrentProducerId())->andWhere('user_producer.active = 1')->orderBy('lastname ASC, name ASC')->all(), 'id', function($model, $defaultValue) { <?= $form->field($model, 'id_user')->dropDownList( ArrayHelper::map(User::find()->joinWith('userProducer')->where('user_producer.id_producer = '.GlobalParam::getCurrentProducerId())->andWhere('user_producer.active = 1')->orderBy('lastname ASC, name ASC')->all(), 'id', function($model, $defaultValue) {
return $model['lastname'].' '.$model['name'];
if (isset($model['name_legal_person']) && strlen($model['name_legal_person'])) {
return 'Personne morale / '.$model['name_legal_person'];
} else {
return $model['lastname'] . ' ' . $model['name'];
}
}), ['prompt' => '--','class' => 'form-control user-id', ]) ?> }), ['prompt' => '--','class' => 'form-control user-id', ]) ?>
</div> </div>
<div class="col-md-1" id="or-user"> <div class="col-md-1" id="or-user">

+ 1
- 0
producer/controllers/SiteController.php View File

'query' => PointSale::find() 'query' => PointSale::find()
->where([ ->where([
'id_producer' => $this->getProducer()->id, 'id_producer' => $this->getProducer()->id,
'restricted_access' => 0
]), ]),
'pagination' => [ 'pagination' => [
'pageSize' => 50, 'pageSize' => 50,

Loading…
Cancel
Save