Skip to content
Snippets Groups Projects
Verified Commit f656ce8f authored by Damien's avatar Damien
Browse files

FEAT #9284 Export Filter front

parent 45050e75
No related branches found
No related tags found
No related merge requests found
......@@ -340,9 +340,6 @@ if (!empty($_REQUEST['page']) && empty($_REQUEST['triggerAngular'])) {
//HTML CONTENT OF ANGULAR
echo \SrcCore\models\CoreConfigModel::initAngularStructure();
if ($user['status'] == 'ABS') {
$_REQUEST['triggerAngular'] = 'activateUser';
}
$loggingMethod = \SrcCore\models\CoreConfigModel::getLoggingMethod();
if (!in_array($loggingMethod['id'], ['sso', 'cas', 'ldap', 'ozwillo', 'shibboleth'])) {
$passwordRules = \SrcCore\models\PasswordModel::getEnabledRules();
......@@ -358,6 +355,9 @@ if (!empty($_REQUEST['page']) && empty($_REQUEST['triggerAngular'])) {
}
}
}
if ($user['status'] == 'ABS') {
$_REQUEST['triggerAngular'] = 'activateUser';
}
if (isset($_SESSION['HTTP_REFERER'])) {
......
......@@ -24,7 +24,6 @@ use Resource\models\ResourceListModel;
use Respect\Validation\Validator;
use Slim\Http\Request;
use Slim\Http\Response;
use Slim\Http\Stream;
use SrcCore\models\ValidatorModel;
use Tag\models\TagModel;
use User\models\UserModel;
......
......@@ -34,9 +34,9 @@
<div class="col-md-6 available-data">
<h2><span class="title">Donnée(s) disponible(s)</span> <i class="fa fa-plus-circle removeAllDatas" color="primary" title="Ajouter toutes les données disponibles" (click)="addAllData()"></i></h2>
<div cdkDropList #dataAvailableList="cdkDropList" [cdkDropListData]="dataAvailable" [cdkDropListConnectedTo]="[dataExportList]" class="cdk-list" (cdkDropListDropped)="drop($event)">
<div class="columns" *ngFor="let item of dataAvailable | filterList:listFilter.value:'label';let i = index"
<div class="columns" *ngFor="let item of dataAvailable | filterList:listFilter.value:'label'"
cdkDrag>{{item.label}} <i class="fa fa-plus" color="primary" style="cursor:pointer;"
(click)="addData(i)"></i></div>
(click)="addData(item)"></i></div>
<div *ngIf="dataAvailable.length == 0" class="noData">Aucune donnée disponible</div>
</div>
</div>
......
......@@ -277,8 +277,16 @@ export class ListAdministrationComponent implements OnInit {
});
}
addData(i: number) {
transferArrayItem(this.dataAvailable, this.exportModel.data, i, this.exportModel.data.length);
addData(item: any) {
var realIndex = 0;
this.dataAvailable.forEach((value : any, index : number) => {
if (value.value == item.value) {
realIndex = index;
}
});
transferArrayItem(this.dataAvailable, this.exportModel.data, realIndex, this.exportModel.data.length);
this.listFilter.nativeElement.value = '';
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment