129 lines
3.4 KiB
PHTML
129 lines
3.4 KiB
PHTML
<h1>Enrichissement</h1>
|
|
|
|
<h2>Aide</h2>
|
|
<p>
|
|
Caractéristiques du fichier à charger : <br/>
|
|
Les colonnes "siren" et "nic" sont obligatoire, avec "ref" en facultatif.<br/>
|
|
Le séparateur utilisé est la virgule (,).
|
|
</p>
|
|
|
|
<p>
|
|
<a href="<?=$this->url(array('controller'=>'envoi', 'action'=>'fileform'))?>">Envoi d'un fichier CSV</a>
|
|
</p>
|
|
<p>
|
|
<a href="<?=$this->url(array('controller'=>'profil', 'action'=>'index'))?>">Gestion des profils d'enrichissement</a>
|
|
</p>
|
|
|
|
<h2>En attente de profil</h2>
|
|
<div>
|
|
<?php if (count($this->fileAttenteProfil)) {?>
|
|
<table class="table table-striped">
|
|
<thead>
|
|
<tr><th>Fichier</th><th>Profil</th><th>Action</th></tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach($this->fileAttenteProfil as $file) {?>
|
|
<tr><td><?=$file->fichier?></td>
|
|
<td>
|
|
<select name="profil">
|
|
<option value="" selected>-</option>
|
|
<?php if (count($this->listProfil)>0) { ?>
|
|
<?php foreach($this->listProfil as $profil) {?>
|
|
<option value="<?=$profil->id?>"><?=$profil->reference?></option>
|
|
<?php }?>
|
|
<?php }?>
|
|
</select>
|
|
<a class="setprofil" href="<?=$this->url(array('controller'=>'profil', 'action'=>'set', 'idfile'=>$file->id))?>">Ok</a>
|
|
</td>
|
|
<td><a class="delprofil" href="<?=$this->url(array('controller'=>'profil','action'=>'delete','idfile'=>$file->id))?>">Supprimer</a></td>
|
|
</tr>
|
|
<?php }?>
|
|
</tbody>
|
|
</table>
|
|
<?php } else {?>
|
|
<p>Vide</p>
|
|
<?php }?>
|
|
</div>
|
|
|
|
<h2>Enrichissements en cours</h2>
|
|
<div>
|
|
<?php if (count($this->fileEnCours)) {?>
|
|
<table class="table table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th>Fichier</th>
|
|
<th>Ajout</th>
|
|
<th>Départ</th>
|
|
<th>Lignes Traités</th>
|
|
<th>Lignes Total</th>
|
|
<th>Message d'erreur</th>
|
|
<th>Action</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach($this->fileEnCours as $file) {?>
|
|
<tr id="<?=$file->id?>" class="encours">
|
|
<td><?=$file->fichier?></td>
|
|
<td><?=$file->dateAdded?></td>
|
|
<td><?=$file->dateStart?></td>
|
|
<td class="ligne"><?=$file->nbLigneT?></td>
|
|
<td><?=$file->nbLigne?></td>
|
|
<td><?=$file->error?></td>
|
|
<td>
|
|
<a class="restart" href="<?=$this->url(array('action'=>'restart', 'id'=>$file->id))?>">Remise à zéro et redémarrage</a>
|
|
<?php if ( !empty($file->error) ) {?>
|
|
| <a class="reprise" href="<?=$this->url(array('action'=>'reprise', 'id'=>$file->id))?>">Reprise manuelle sur erreur</a>
|
|
<?php }?>
|
|
</td>
|
|
</tr>
|
|
<?php }?>
|
|
</tbody>
|
|
</table>
|
|
<?php } else {?>
|
|
<p>Vide</p>
|
|
<?php }?>
|
|
</div>
|
|
|
|
<h2>Enrichissements terminés</h2>
|
|
<div>
|
|
<form method="post" action="./">
|
|
<label>Client</label>
|
|
<select name="idClient">
|
|
<option value="">-</option>
|
|
<?php foreach ($this->clients as $client) {?>
|
|
<?php $select = ''; if ( null!=$this->idClient && $client->id == $this->idClient) { $select = ' selected'; }?>
|
|
<option value="<?=$client->id?>"<?=$select?>><?=$client->nom?></option>
|
|
<?php }?>
|
|
</select>
|
|
<input type="submit" name="submit" value="Selection" />
|
|
</form>
|
|
</div>
|
|
|
|
<div>
|
|
<?php if (count($this->fileFinish)) {?>
|
|
<table class="table table-striped">
|
|
<thead>
|
|
<tr><th>#</th><th>Fichier</th><th>Ajout</th><th>Départ</th><th>Fin</th><th>Lignes total</th><th>Fichier enrichi</th></tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach($this->fileFinish as $file) {?>
|
|
<tr>
|
|
<td><?=$file->id?></td>
|
|
<td><?=$file->fichier?></td>
|
|
<td><?=$file->dateAdded?></td>
|
|
<td><?=$file->dateStart?></td>
|
|
<td><?=$file->dateStop?></td>
|
|
<td><?=$file->nbLigneT?></td>
|
|
<td>
|
|
<a href="<?=$this->url(array('controller'=>'index','action'=>'getfile', 'file'=>$file->fichierOut))?>">
|
|
<?=$file->fichierOut?></a>
|
|
</td>
|
|
</tr>
|
|
<?php }?>
|
|
</tbody>
|
|
</table>
|
|
<?php } else {?>
|
|
<p>Vide</p>
|
|
<?php }?>
|
|
</div>
|
|
</div>
|