Skip to content
Snippets Groups Projects
Verified Commit 08c54cec authored by Alex ORLUC's avatar Alex ORLUC
Browse files

feat res basket list

parent 0abcefed
No related branches found
No related tags found
No related merge requests found
......@@ -15,27 +15,50 @@
<div class="example-loading-shade" *ngIf="isLoadingResults">
<mat-spinner *ngIf="isLoadingResults"></mat-spinner>
</div>
<mat-paginator [length]="resultsLength" [pageSize]="10"></mat-paginator>
<div class="row" style="margin:0px;">
<div class="col-md-6 col-xs-6">
<mat-button-toggle-group #group="matButtonToggleGroup" multiple>
<mat-button-toggle value="left">
<mat-icon class="fa fa-stopwatch" style="height:auto;"></mat-icon>
</mat-button-toggle>
<mat-button-toggle value="center">
<mat-icon class="fa fa-circle" style="height:auto;color:blue;"></mat-icon>
</mat-button-toggle>
<mat-button-toggle value="center">
<mat-icon class="fa fa-circle" style="height:auto;color:orange;"></mat-icon>
</mat-button-toggle>
<mat-button-toggle value="center">
<mat-icon class="fa fa-circle" style="height:auto;color:red;"></mat-icon>
</mat-button-toggle>
</mat-button-toggle-group>
</div>
<div class="col-md-6 col-xs-6">
<mat-paginator [length]="resultsLength" [pageSize]="10"></mat-paginator>
</div>
</div>
<table #tableBasketListSort="matSort" mat-table [dataSource]="data" matSort matSortActive="res_id" matSortDisableClear matSortDirection="asc"
style="width:100%;table-layout: fixed;">
<!-- Number Column -->
<ng-container matColumnDef="res_id">
<td mat-cell *matCellDef="let row" [ngStyle]="{'width': mobileMode ? '30%' : '10%'}" style="text-align:center;overflow:hidden;text-overflow: ellipsis;white-space: nowrap;padding: 5px;vertical-align: top;">
<td mat-cell *matCellDef="let row" [ngStyle]="{'width': mobileMode ? '30%' : '10%'}" style="text-align:center;overflow:hidden;text-overflow: ellipsis;white-space: nowrap;padding: 5px;vertical-align: middle;">
<div *ngIf="row.closing_date == null && mobileMode" id="{{row.res_id}}_creation_date" style="color: rgba(0,0,0,0.4);font-size: 90%;overflow: hidden;text-overflow: ellipsis;"
title='{{row.creation_date | date : "le dd/MM/y à HH:mm"}}'>
<i class="fa fa-calendar" title="date d'enregistrement"></i> {{row.creation_date | timeAgo}}
</div>
<div *ngIf="!mobileMode" style="padding-top: 5px;color: rgba(0,0,0,0.4);font-size: 90%;overflow: hidden;text-overflow: ellipsis;" title="{{lang[row.category_id]}}">
{{lang[row.category_id]}}
</div>
<div style="overflow: hidden;text-overflow: ellipsis;">
<mat-icon [ngStyle]="{'color': row.priority_color}" color="primary" class="{{row.status_icon.charAt(0)}}{{row.status_icon.charAt(1)}} {{row.status_icon}} {{row.status_icon.charAt(0)}}{{row.status_icon.charAt(1)}}-2x" title="{{row.status_label}}"></mat-icon>
<mat-icon [ngStyle]="{'color': row.priority_color}" color="primary" class="{{row.status_icon.charAt(0)}}{{row.status_icon.charAt(1)}} {{row.status_icon}} {{row.status_icon.charAt(0)}}{{row.status_icon.charAt(1)}}-2x" title="{{row.status_label}} ({{row.status_id}})"></mat-icon>
</div>
<div style="padding-top: 5px;color: rgba(0,0,0,0.4);font-size: 90%;overflow: hidden;text-overflow: ellipsis;" title="{{row.res_id}}">
<div style="padding-top: 5px;color: rgba(0,0,0,0.4);font-size: 90%;overflow: hidden;text-overflow: ellipsis;" title="{{row.alt_identifier}} (n°{{row.res_id}})">
{{row.alt_identifier}}
</div>
</td>
</ng-container>
<ng-container matColumnDef="subject">
<td mat-cell *matCellDef="let row" style="width:50%;overflow:hidden;text-overflow: ellipsis;white-space: nowrap;padding: 5px;vertical-align: top;">
<td mat-cell *matCellDef="let row" style="width:50%;overflow:hidden;text-overflow: ellipsis;white-space: nowrap;padding: 5px;vertical-align: middle;">
<div *ngIf="row.closing_date == null && mobileMode" style="color: rgba(0,0,0,0.4);font-size: 90%;overflow: hidden;text-overflow: ellipsis;text-align: right;">
<i class="fa fa-stopwatch" title="date limite de traitement"></i>&nbsp;
<span [innerHTML]="row.process_limit_date | timeLimit" title='{{row.process_limit_date | date : "le dd/MM/y à HH:mm"}}'></span>
......@@ -47,6 +70,13 @@
<div *ngIf="mobileMode" style="padding-top: 5px;color: rgba(0,0,0,0.4);font-size: 90%;overflow: hidden;text-overflow: ellipsis;text-align: right;">
{{row.dest_user}}
</div>
<div style="display:hidden;">
&nbsp;
</div>
<div *ngIf="!mobileMode && (row.folder_name || row.case_label)">
<span *ngIf="row.folder_name" class="label label-default" style="background-color:rgba(0,0,0,0.4);margin-left: 5px;margin-right: 5px;" title="Dossier"><i class="fa fa-folder"></i> {{row.folder_name}}</span>
<span *ngIf="row.case_label" class="label label-default" style="background-color:rgba(0,0,0,0.4);margin-left: 5px;margin-right: 5px;" title="Affaire"><i class="fa fa-suitcase"></i> {{row.case_label}}</span>
</div>
<!--<div>
<button mat-stroked-button color="primary" style="margin:5px;line-height: 20px;width: 150px;overflow: hidden;text-overflow: ellipsis;">réponse du zpfezk zekf opezf</button>
<button mat-stroked-button color="primary" style="margin:5px;line-height: 20px;width: 150px;overflow: hidden;text-overflow: ellipsis;">réponse du zpfezk zekf opezf</button>
......@@ -58,23 +88,26 @@
</td>
</ng-container>
<ng-container matColumnDef="contact_society">
<td mat-cell *matCellDef="let row" style="width:25%;overflow:hidden;text-overflow: ellipsis;white-space: nowrap;padding: 5px;vertical-align: top;">
<div style="overflow: hidden;text-overflow: ellipsis;">
<i class="fa fa-address-card" color="primary"></i>&nbsp;
<td mat-cell *matCellDef="let row" style="width:25%;overflow:hidden;text-overflow: ellipsis;white-space: nowrap;padding: 5px;vertical-align: middle;">
<div style="color: rgba(0,0,0,0.4);font-size: 90%;overflow: hidden;text-overflow: ellipsis;">
<b>De:</b>&nbsp;
<span *ngIf="row.user_firstname">{{row.user_firstname}}</span>&nbsp;
<span *ngIf="row.user_lastname">{{row.user_lastname}}</span>
<span *ngIf="row.contact_lastname==''">{{row.contact_society}}</span>
<span *ngIf="row.contact_society==''">{{row.contact_lastname}}</span> &nbsp;
<i class="fa fa-arrow-right"></i>&nbsp;
<i class="fa fa-sitemap" color="primary"></i>&nbsp;
<span title="{{row.entity_label}}">{{row.entity_destination}}</span>
</div>
<div style="padding-top: 5px;color: rgba(0,0,0,0.4);font-size: 90%;overflow: hidden;text-overflow: ellipsis;">
{{row.dest_user}}
<div style="color: rgba(0,0,0,0.4);font-size: 90%;overflow: hidden;text-overflow: ellipsis;">
<b>Pour:</b>&nbsp;
<span title="{{row.user_dest_firstname}}&nbsp;{{row.user_dest_lastname}} ({{row.entity_destination}})">{{row.user_dest_firstname}}&nbsp;{{row.user_dest_lastname}} ({{row.entity_destination}})</span>
</div>
<div style="padding-top:10px;">
<i class="fa fa-file" color="primary"></i>&nbsp;{{row.doctype_label}}
</div>
</td>
</ng-container>
<ng-container matColumnDef="creation_date">
<td mat-cell *matCellDef="let row" style="text-align: right;width:15%;overflow:hidden;text-overflow: ellipsis;white-space: nowrap;padding: 5px;vertical-align: top;">
<td mat-cell *matCellDef="let row" style="text-align: right;width:15%;overflow:hidden;text-overflow: ellipsis;white-space: nowrap;padding: 5px;vertical-align: middle;">
<div *ngIf="row.closing_date == null" id="{{row.res_id}}_creation_date" style="color: rgba(0,0,0,0.4);font-size: 90%;overflow: hidden;text-overflow: ellipsis;"
title='{{row.creation_date | date : "le dd/MM/y à HH:mm"}}'>
<i class="fa fa-calendar" title="date d'enregistrement"></i> {{row.creation_date | timeAgo}}
......@@ -85,7 +118,7 @@
</div>
<div *ngIf="row.closing_date != null" style="color: rgba(0,0,0,0.4);font-size: 90%;overflow: hidden;text-overflow: ellipsis;">
<i class="fa fa-lock" title="date de clôture"></i>&nbsp;
<span title='{{row.process_limit_date | date : "le dd/MM/y à HH:mm"}}'>{{row.closing_date | timeAgo}}</span>
<span title='{{row.closing_date | date : "le dd/MM/y à HH:mm"}}'>{{row.closing_date | timeAgo}}</span>
</div>
<div>
<button mat-icon-button>
......
......@@ -613,4 +613,7 @@ export const LANG_EN = {
"close" : "Close",
"contactGroupCreate" : "Create contact group",
"contactLink" : "Link contact",
"incoming" : "incoming",
"outgoing" : "outgoing",
"internal" : "internal",
};
......@@ -639,4 +639,7 @@ export const LANG_FR = {
"close" : "Fermer",
"contactGroupCreate" : "Créer un groupement de contact",
"contactLink" : "Associer un contact",
"incoming" : "courrier arrivé",
"outgoing" : "courrier départ",
"internal" : "courrier interne",
};
......@@ -45,15 +45,36 @@ abstract class ResModelAbstract
ValidatorModel::stringType($aArgs, ['clause']);
ValidatorModel::intType($aArgs, ['limit', 'offset']);
$where = ['res_view_letterbox.priority = priorities.id', 'res_view_letterbox.status = status.id'];
$where = ['res_view_letterbox.priority = priorities.id', 'res_view_letterbox.status = status.id', 'res_view_letterbox.dest_user = users.user_id'];
$where[] = $aArgs['clause'];
$aResources = DatabaseModel::select([
'select' => [
'res_id', 'alt_identifier', 'subject', 'type_label as doctype_label', 'process_limit_date', 'closing_date', 'entity_label as entity_destination', 'category_id', 'contact_lastname', 'contact_society',
'creation_date', 'dest_user', 'priorities.label as priority_label', 'priorities.color as priority_color', 'status.label_status as status_label', 'status.img_filename as status_icon'
'alt_identifier',
'category_id',
'case_label',
'closing_date',
'category_id',
'contact_lastname',
'contact_society',
'creation_date',
'entity_label as entity_destination',
'folder_name',
'priorities.color as priority_color',
'priorities.label as priority_label',
'process_limit_date',
'res_id',
'status.img_filename as status_icon',
'status.label_status as status_label',
'status.id as status_id',
'subject',
'type_label as doctype_label',
'user_lastname',
'user_firstname',
'users.lastname as user_dest_lastname',
'users.firstname as user_dest_firstname',
],
'table' => ['res_view_letterbox, priorities, status'],
'table' => ['res_view_letterbox, priorities, status, users'],
'where' => $where,
'data' => [],
'order_by' => empty($aArgs['orderBy']) ? [] : $aArgs['orderBy'],
......
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