Dashboard

This commit is contained in:
Damien LASSERRE 2012-04-06 09:49:41 +00:00
parent 0233d4b34f
commit 17e152ce0b
6 changed files with 67 additions and 26 deletions

View File

@ -35,6 +35,7 @@ class DashboardController extends Libs_Controller
$comptage = $object->ciblagedetail($request->getParam('id'));
$enrichissement = $object->enrichissement($request->getParam('id'));
$this->view->comptageId = $request->getParam('id');
$this->view->label = new Fields();
$this->view->criteres = $comptage['criteres'];
$this->view->comptages = $comptage['comptages'];

View File

@ -1,18 +1,25 @@
<div id="dashboard" style="padding:10px">
<a href="/dashboard/index">Tableau de bord</a> > Detail du ciblage
<h2></h2>
<a href="/dashboard/index">Tableau de bord</a> > Detail du ciblage<br /><br />
<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>
<legend>Critères</legend>
<?php foreach(json_decode($this->criteres['criteres'], true) as $critere => $valeur): ?>
<?php if(!empty($valeur) and $valeur != ',' and !empty($critere)): ?>
<?php $label = $this->label->get($critere); ?>
<?php if(!is_array($valeur)): ?>
<?php if($label['type'] != 'textarea' and $label['type'] != 'interval') :?>
<?php echo '<b>'.$label['label'] . '</b> : '.$label['fields'][$label['type']]['value'][$valeur];?><br />
<?php else: ?>
<?php echo '<b>'.$label['label'] . '</b>:'.$valeur; ?><br />
<?php endif; ?>
<?php else:?>
<?php echo '<b>'.$label['label'] .'</b> : '. implode(',', $valeur).'<br />'; ?>
<?php endif; ?>
<?php endforeach;?>
<?php endif; ?>
<?php endforeach;?>
</fieldset>
<fieldset>

View File

@ -1,5 +1,14 @@
<div id="financiere">
<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;">
<div id="avisCs_ex" class="exclusion" style="display:none">
<?php echo $this->Field('avisCs_ex', $this->fields->get('avisCs_ex'));?>

View File

@ -20,14 +20,12 @@ a
</style>
<table id="criteres_ra" style="margin:10px">
<tr>
<td id="Valide" style="text-align: center" colspan="3">
<a class="saveciblage" href="/comptage/savedialog">Valider mon comptage</a>
</td>
<td id="Valide" style="text-align: center" colspan="3"><a class="saveciblage" href="/comptage/savedialog">Valider mon comptage</a></td>
</tr>
<?php $color = 0;foreach($this->criteres as $critere => $valeur):?>
<?php $label = $this->field->get($critere); ?>
<?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++;?>>
<td valign="top" style="padding:5px;width:150px">
<?php echo $label['label'];?>
@ -35,7 +33,6 @@ a
<td>
<?php if(is_array($valeur)):?>
<?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 echo $label['fields'][$label['type']]['value'][$val];?> <?php (($i%3 == 0)?'<br />':''); $i++;?>
<?php else :?>
@ -49,7 +46,6 @@ a
echo $val.', ';
?>
<?php endif;?>
<?php endif;?>
<?php endforeach;?>
<?php else: ?>
<?php echo $val;?>

View File

@ -82,6 +82,7 @@ Class Ciblage
}
public function execute($need = false)
{
//echo $this->alpha;
if($need) {
$return = array();
$limit = 0;
@ -108,7 +109,7 @@ Class Ciblage
$this->sphinx->SetFilterRange($name, intval($valeur[0]), intval($valeur[1]));
}
protected function writeRequest($name, $valeur, $ex, $or = false) {
$this->alpha .= '@'.$name . (($ex)?' -':'').'(';
$this->alpha .= '@'.$name . (($ex)?" -":" ").'(';
if(!is_array($valeur)) {
$this->alpha .= $valeur.')';
} else {
@ -314,8 +315,21 @@ Class Ciblage
$this->setFilterRange('bilDuree', $valeur);
}
protected function bilType($valeur) {
foreach ($valeur as $val) {
$string .= '-'.$val;
}
$string = substr($string, 1);
$valeur = explode('-', $string);
$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) {
$this->setFilter('bilAnnee', $valeur);
}

View File

@ -576,6 +576,20 @@ Class Fields
'type' => 'selectMultiple',
'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(
'label' => 'Informations de paiements',
'fields' => array(