'contentOptions' => ['class' => 'column-actions'], | 'contentOptions' => ['class' => 'column-actions'], | ||||
'buttons' => [ | 'buttons' => [ | ||||
'send' => function($url, $model) { | 'send' => function($url, $model) { | ||||
return ((!$model->isStatusDraft() && isset($model->user) && strlen($model->user->email) > 0) ? Html::a('<span class="glyphicon glyphicon-send"></span>', $url, [ | |||||
return ((isset($model->user) && strlen($model->user->email) > 0) ? Html::a('<span class="glyphicon glyphicon-send"></span>', $url, [ | |||||
'title' => 'Envoyer', 'class' => 'btn btn-default' | 'title' => 'Envoyer', 'class' => 'btn btn-default' | ||||
]) : ''); | ]) : ''); | ||||
}, | }, |
]) : ''); | ]) : ''); | ||||
}, | }, | ||||
'send' => function($url, $model) { | 'send' => function($url, $model) { | ||||
return ((!$model->isStatusDraft() && isset($model->user) && strlen($model->user->email) > 0) ? Html::a('<span class="glyphicon glyphicon-send"></span>', $url, [ | |||||
return ((isset($model->user) && strlen($model->user->email) > 0) ? Html::a('<span class="glyphicon glyphicon-send"></span>', $url, [ | |||||
'title' => 'Envoyer', 'class' => 'btn btn-default' | 'title' => 'Envoyer', 'class' => 'btn btn-default' | ||||
]) : ''); | ]) : ''); | ||||
}, | }, |
]) : ''); | ]) : ''); | ||||
}, | }, | ||||
'send' => function($url, $model) { | 'send' => function($url, $model) { | ||||
return ((!$model->isStatusDraft() && isset($model->user) && strlen($model->user->email) > 0) ? Html::a('<span class="glyphicon glyphicon-send"></span>', $url, [ | |||||
return ((isset($model->user) && strlen($model->user->email) > 0) ? Html::a('<span class="glyphicon glyphicon-send"></span>', $url, [ | |||||
'title' => 'Envoyer', 'class' => 'btn btn-default' | 'title' => 'Envoyer', 'class' => 'btn btn-default' | ||||
]) : ''); | ]) : ''); | ||||
}, | }, |
<div class="content-max-height"> | <div class="content-max-height"> | ||||
<ul id="list-users"> | <ul id="list-users"> | ||||
<li v-for="user in usersArray" v-if="!termSearchUser.length || (termSearchUser.length && (user.lastname.toLowerCase().indexOf(termSearchUser.toLowerCase()) != -1 || user.name.toLowerCase().indexOf(termSearchUser.toLowerCase()) != -1 ))"> | <li v-for="user in usersArray" v-if="!termSearchUser.length || (termSearchUser.length && (user.lastname.toLowerCase().indexOf(termSearchUser.toLowerCase()) != -1 || user.name.toLowerCase().indexOf(termSearchUser.toLowerCase()) != -1 ))"> | ||||
<input type="checkbox" :id="'user_'+user.user_id" v-model="user.checked" @change="reportChange()" /> | |||||
<label :for="'user_'+user.user_id" v-html="user.lastname+' '+user.name"></label> | |||||
<input type="checkbox" :id="'user_'+user.user_id" v-model="user.checked" @change="reportChange()" /> | |||||
<label :for="'user_'+user.user_id" v-html="(user.name_legal_person && user.name_legal_person.length) ? user.name_legal_person : user.lastname+' '+user.name"></label> | |||||
</li> | </li> | ||||
</ul> | </ul> | ||||
</div> | </div> |
->with($optionsSearch['with']) | ->with($optionsSearch['with']) | ||||
->joinWith($optionsSearch['join_with']) | ->joinWith($optionsSearch['join_with']) | ||||
->where(['delivery_note.id_producer' => GlobalParam::getCurrentProducerId()]) | ->where(['delivery_note.id_producer' => GlobalParam::getCurrentProducerId()]) | ||||
->orderBy('delivery_note.status ASC, delivery_note.reference DESC'); | |||||
->orderBy('delivery_note.status ASC, delivery_note.reference DESC') | |||||
->groupBy('delivery_note.id'); | |||||
$dataProvider = new ActiveDataProvider([ | $dataProvider = new ActiveDataProvider([ | ||||
'query' => $query, | 'query' => $query, |
->with($optionsSearch['with']) | ->with($optionsSearch['with']) | ||||
->joinWith($optionsSearch['join_with']) | ->joinWith($optionsSearch['join_with']) | ||||
->where(['invoice.id_producer' => GlobalParam::getCurrentProducerId()]) | ->where(['invoice.id_producer' => GlobalParam::getCurrentProducerId()]) | ||||
->orderBy('invoice.status ASC, invoice.reference DESC'); | |||||
->orderBy('invoice.status ASC, invoice.reference DESC') | |||||
->groupBy('invoice.id'); | |||||
$dataProvider = new ActiveDataProvider([ | $dataProvider = new ActiveDataProvider([ | ||||
'query' => $query, | 'query' => $query, |
->with($optionsSearch['with']) | ->with($optionsSearch['with']) | ||||
->joinWith($optionsSearch['join_with']) | ->joinWith($optionsSearch['join_with']) | ||||
->where(['quotation.id_producer' => GlobalParam::getCurrentProducerId()]) | ->where(['quotation.id_producer' => GlobalParam::getCurrentProducerId()]) | ||||
->orderBy('quotation.status ASC, quotation.reference DESC'); | |||||
->orderBy('quotation.status ASC, quotation.reference DESC') | |||||
->groupBy('quotation.id'); | |||||
$dataProvider = new ActiveDataProvider([ | $dataProvider = new ActiveDataProvider([ | ||||
'query' => $query, | 'query' => $query, |