Dashboard
This commit is contained in:
parent
0233d4b34f
commit
17e152ce0b
@ -35,6 +35,7 @@ class DashboardController extends Libs_Controller
|
|||||||
$comptage = $object->ciblagedetail($request->getParam('id'));
|
$comptage = $object->ciblagedetail($request->getParam('id'));
|
||||||
$enrichissement = $object->enrichissement($request->getParam('id'));
|
$enrichissement = $object->enrichissement($request->getParam('id'));
|
||||||
|
|
||||||
|
$this->view->comptageId = $request->getParam('id');
|
||||||
$this->view->label = new Fields();
|
$this->view->label = new Fields();
|
||||||
$this->view->criteres = $comptage['criteres'];
|
$this->view->criteres = $comptage['criteres'];
|
||||||
$this->view->comptages = $comptage['comptages'];
|
$this->view->comptages = $comptage['comptages'];
|
||||||
|
@ -1,18 +1,25 @@
|
|||||||
<div id="dashboard" style="padding:10px">
|
<div id="dashboard" style="padding:10px">
|
||||||
<a href="/dashboard/index">Tableau de bord</a> > Detail du ciblage
|
<a href="/dashboard/index">Tableau de bord</a> > Detail du ciblage<br /><br />
|
||||||
<h2></h2>
|
<a class="update" href="<?=$this->url(array('controller'=> 'comptage','action'=>'update', 'id'=>$this->comptageId))?>">Actualiser</a> |
|
||||||
|
<a href="<?=$this->url(array('controller'=> 'index','action'=>'index', 'id'=>$this->comptageId))?>">Recharger les critères de ciblage</a> |
|
||||||
|
<a class="enrichissementref" href="<?=$this->url(array('controller'=> 'enrichissement','action'=>'reference', 'id'=>$this->comptageId))?>">Enrichissement</a>
|
||||||
|
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>Critères</legend>
|
<legend>Critères</legend>
|
||||||
<?php foreach(json_decode($this->criteres['criteres'], true) as $critere => $valeur): ?>
|
<?php foreach(json_decode($this->criteres['criteres'], true) as $critere => $valeur): ?>
|
||||||
<?php if(!empty($valeur) and $valeur != ',' and !empty($critere)): ?>
|
<?php if(!empty($valeur) and $valeur != ',' and !empty($critere)): ?>
|
||||||
<?php $label = $this->label->get($critere); ?>
|
<?php $label = $this->label->get($critere); ?>
|
||||||
|
<?php if(!is_array($valeur)): ?>
|
||||||
<?php if($label['type'] != 'textarea' and $label['type'] != 'interval') :?>
|
<?php if($label['type'] != 'textarea' and $label['type'] != 'interval') :?>
|
||||||
<?php echo '<b>'.$label['label'] . '</b> : '.$label['fields'][$label['type']]['value'][$valeur];?><br />
|
<?php echo '<b>'.$label['label'] . '</b> : '.$label['fields'][$label['type']]['value'][$valeur];?><br />
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<?php echo '<b>'.$label['label'] . '</b>:'.$valeur; ?><br />
|
<?php echo '<b>'.$label['label'] . '</b>:'.$valeur; ?><br />
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
<?php else:?>
|
||||||
|
<?php echo '<b>'.$label['label'] .'</b> : '. implode(',', $valeur).'<br />'; ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php endforeach;?>
|
<?php endif; ?>
|
||||||
|
<?php endforeach;?>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<fieldset>
|
<fieldset>
|
||||||
|
@ -1,5 +1,14 @@
|
|||||||
<div id="financiere">
|
<div id="financiere">
|
||||||
<ul id="fieldsblock">
|
<ul id="fieldsblock">
|
||||||
|
<li style="background: none; height:80px;">
|
||||||
|
<div id="bilType_ex" class="exclusion" style="display:none">
|
||||||
|
<?php echo $this->Field('bilType_ex', $this->fields->get('bilType_ex'));?>
|
||||||
|
</div>
|
||||||
|
<div id="bilType_in" class="inclusion">
|
||||||
|
<?php echo $this->Field('bilType', $this->fields->get('bilType'));?>
|
||||||
|
</div>
|
||||||
|
Valeurs exclusions : <input value="1" type="checkbox" class="checkbox_ex" name="bilType" />
|
||||||
|
</li>
|
||||||
<li style="background: none; height:150px;">
|
<li style="background: none; height:150px;">
|
||||||
<div id="avisCs_ex" class="exclusion" style="display:none">
|
<div id="avisCs_ex" class="exclusion" style="display:none">
|
||||||
<?php echo $this->Field('avisCs_ex', $this->fields->get('avisCs_ex'));?>
|
<?php echo $this->Field('avisCs_ex', $this->fields->get('avisCs_ex'));?>
|
||||||
|
@ -20,14 +20,12 @@ a
|
|||||||
</style>
|
</style>
|
||||||
<table id="criteres_ra" style="margin:10px">
|
<table id="criteres_ra" style="margin:10px">
|
||||||
<tr>
|
<tr>
|
||||||
<td id="Valide" style="text-align: center" colspan="3">
|
<td id="Valide" style="text-align: center" colspan="3"><a class="saveciblage" href="/comptage/savedialog">Valider mon comptage</a></td>
|
||||||
<a class="saveciblage" href="/comptage/savedialog">Valider mon comptage</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<?php $color = 0;foreach($this->criteres as $critere => $valeur):?>
|
<?php $color = 0;foreach($this->criteres as $critere => $valeur):?>
|
||||||
<?php $label = $this->field->get($critere); ?>
|
<?php $label = $this->field->get($critere); ?>
|
||||||
<?php if($valeur != 'tous' and $valeur != null and $valeur != 'null' and $valeur != ',' and $critere != 'adr_com'):?>
|
<?php if($valeur != 'tous' and $valeur != null and $valeur != 'null' and $valeur != ',' and $critere != 'adr_com'):?>
|
||||||
<?php if($label['type'] =! 'selectMultiple') $valeur = explode(',', $valeur); ?>
|
<?php if(!is_array($valeur)) {$valeur = explode(',', $valeur);} ?>
|
||||||
<tr <?php echo ((($color%2) == 0)?'class="color"':''); $color++;?>>
|
<tr <?php echo ((($color%2) == 0)?'class="color"':''); $color++;?>>
|
||||||
<td valign="top" style="padding:5px;width:150px">
|
<td valign="top" style="padding:5px;width:150px">
|
||||||
<?php echo $label['label'];?>
|
<?php echo $label['label'];?>
|
||||||
@ -35,7 +33,6 @@ a
|
|||||||
<td>
|
<td>
|
||||||
<?php if(is_array($valeur)):?>
|
<?php if(is_array($valeur)):?>
|
||||||
<?php $i=0; foreach ($valeur as $val):?>
|
<?php $i=0; foreach ($valeur as $val):?>
|
||||||
<?php if(!empty($val)) :?>
|
|
||||||
<?php if($label['type'] != 'textarea' and $label['type'] != 'interval' and $label['type'] != 'intervalSelect') :?>
|
<?php if($label['type'] != 'textarea' and $label['type'] != 'interval' and $label['type'] != 'intervalSelect') :?>
|
||||||
<?php echo $label['fields'][$label['type']]['value'][$val];?> <?php (($i%3 == 0)?'<br />':''); $i++;?>
|
<?php echo $label['fields'][$label['type']]['value'][$val];?> <?php (($i%3 == 0)?'<br />':''); $i++;?>
|
||||||
<?php else :?>
|
<?php else :?>
|
||||||
@ -49,7 +46,6 @@ a
|
|||||||
echo $val.', ';
|
echo $val.', ';
|
||||||
?>
|
?>
|
||||||
<?php endif;?>
|
<?php endif;?>
|
||||||
<?php endif;?>
|
|
||||||
<?php endforeach;?>
|
<?php endforeach;?>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<?php echo $val;?>
|
<?php echo $val;?>
|
||||||
|
@ -82,6 +82,7 @@ Class Ciblage
|
|||||||
}
|
}
|
||||||
public function execute($need = false)
|
public function execute($need = false)
|
||||||
{
|
{
|
||||||
|
//echo $this->alpha;
|
||||||
if($need) {
|
if($need) {
|
||||||
$return = array();
|
$return = array();
|
||||||
$limit = 0;
|
$limit = 0;
|
||||||
@ -108,7 +109,7 @@ Class Ciblage
|
|||||||
$this->sphinx->SetFilterRange($name, intval($valeur[0]), intval($valeur[1]));
|
$this->sphinx->SetFilterRange($name, intval($valeur[0]), intval($valeur[1]));
|
||||||
}
|
}
|
||||||
protected function writeRequest($name, $valeur, $ex, $or = false) {
|
protected function writeRequest($name, $valeur, $ex, $or = false) {
|
||||||
$this->alpha .= '@'.$name . (($ex)?' -':'').'(';
|
$this->alpha .= '@'.$name . (($ex)?" -":" ").'(';
|
||||||
if(!is_array($valeur)) {
|
if(!is_array($valeur)) {
|
||||||
$this->alpha .= $valeur.')';
|
$this->alpha .= $valeur.')';
|
||||||
} else {
|
} else {
|
||||||
@ -314,8 +315,21 @@ Class Ciblage
|
|||||||
$this->setFilterRange('bilDuree', $valeur);
|
$this->setFilterRange('bilDuree', $valeur);
|
||||||
}
|
}
|
||||||
protected function bilType($valeur) {
|
protected function bilType($valeur) {
|
||||||
|
foreach ($valeur as $val) {
|
||||||
|
$string .= '-'.$val;
|
||||||
|
}
|
||||||
|
$string = substr($string, 1);
|
||||||
|
$valeur = explode('-', $string);
|
||||||
$this->setAlpha('bilType', $valeur);
|
$this->setAlpha('bilType', $valeur);
|
||||||
}
|
}
|
||||||
|
protected function bilType_ex($valeur) {
|
||||||
|
foreach ($valeur as $val) {
|
||||||
|
$string .= '-'.$val;
|
||||||
|
}
|
||||||
|
$string = substr($string, 1);
|
||||||
|
$valeur = explode('-', $string);
|
||||||
|
$this->setFilter('biltype', $valeur, true);
|
||||||
|
}
|
||||||
protected function bilAnnee($valeur) {
|
protected function bilAnnee($valeur) {
|
||||||
$this->setFilter('bilAnnee', $valeur);
|
$this->setFilter('bilAnnee', $valeur);
|
||||||
}
|
}
|
||||||
|
@ -576,6 +576,20 @@ Class Fields
|
|||||||
'type' => 'selectMultiple',
|
'type' => 'selectMultiple',
|
||||||
'class' => null
|
'class' => null
|
||||||
),
|
),
|
||||||
|
'bilType_ex' => array(
|
||||||
|
'label' => 'Type du dernier bilan (Exclure)',
|
||||||
|
'fields' => array(
|
||||||
|
'selectMultiple' => array('value' => array(
|
||||||
|
'I' => 'Inconnue',
|
||||||
|
'R' => 'Réel',
|
||||||
|
'E' => 'Estimé')
|
||||||
|
),
|
||||||
|
),
|
||||||
|
'famille' => 'financier',
|
||||||
|
'activated' => true,
|
||||||
|
'type' => 'selectMultiple',
|
||||||
|
'class' => null
|
||||||
|
),
|
||||||
'avisCs' => array(
|
'avisCs' => array(
|
||||||
'label' => 'Informations de paiements',
|
'label' => 'Informations de paiements',
|
||||||
'fields' => array(
|
'fields' => array(
|
||||||
|
Loading…
Reference in New Issue
Block a user