Commit 55a7c950 authored by Hamza HRAMCHI's avatar Hamza HRAMCHI
Browse files

FIX #16304 TIME 0:25 Result list customization - separate creation date and processing deadline

parent 57c8996f
......@@ -9,5 +9,5 @@
</head>
<body>
<app-root></app-root>
<script src="runtime.ab8a82d9fa1776b0f9a2.js" defer></script><script src="polyfills-es5.edc5de4d1140a2eeda65.js" nomodule defer></script><script src="scripts.60c39912a218172ee4ca.js" defer></script><script src="main.ac4f1986c9b76668a5c2.js" defer></script></body>
<script src="runtime.ab8a82d9fa1776b0f9a2.js" defer></script><script src="polyfills-es5.edc5de4d1140a2eeda65.js" nomodule defer></script><script src="scripts.60c39912a218172ee4ca.js" defer></script><script src="main.a59dbce5208bbb985c82.js" defer></script></body>
</html>
......@@ -123,6 +123,10 @@ class ResourceListController
} elseif ($value['value'] == 'getCreationAndProcessLimitDates') {
$select[] = 'res_letterbox.creation_date';
$select[] = 'res_letterbox.process_limit_date';
} elseif ($value['value'] == 'getCreationDate') {
$select[] = 'res_letterbox.creation_date';
} elseif ($value['value'] == 'getProcessLimitDate') {
$select[] = 'res_letterbox.process_limit_date';
} elseif ($value['value'] == 'getModificationDate') {
$select[] = 'res_letterbox.modification_date';
} elseif ($value['value'] == 'getOpinionLimitDate') {
......@@ -929,6 +933,12 @@ class ResourceListController
} elseif ($value['value'] == 'getCreationAndProcessLimitDates') {
$value['displayValue'] = ['creationDate' => $resource['creation_date'], 'processLimitDate' => $resource['process_limit_date']];
$display[] = $value;
} elseif ($value['value'] == 'getCreationDate') {
$value['displayValue'] = $resource['creation_date'];
$display[] = $value;
} elseif ($value['value'] == 'getProcessLimitDate') {
$value['displayValue'] = $resource['process_limit_date'];
$display[] = $value;
} elseif ($value['value'] == 'getModificationDate') {
$value['displayValue'] = $resource['modification_date'];
$display[] = $value;
......
......@@ -86,6 +86,20 @@ export class ListAdministrationComponent implements OnInit {
'cssClasses': ['align_leftData'],
'icon': 'fa-calendar'
},
{
'value': 'getCreationDate',
'label': this.lang.getCreationDate,
'sample': this.lang.getCreationDateSample,
'cssClasses': ['align_leftData'],
'icon': 'fa-calendar'
},
{
'value': 'getProcessLimitDate',
'label': this.lang.getProcessLimitDate,
'sample': this.lang.getProcessLimitDateSample,
'cssClasses': ['align_leftData'],
'icon': 'fa-stopwatch'
},
{
'value': 'getVisaWorkflow',
'label': this.lang.getVisaWorkflow,
......@@ -235,9 +249,11 @@ export class ListAdministrationComponent implements OnInit {
let indexData: number = 0;
this.basketGroup.list_display.forEach((element: any) => {
indexData = this.availableData.map((e: any) => e.value).indexOf(element.value);
this.availableData[indexData].cssClasses = element.cssClasses;
this.displayedSecondaryData.push(this.availableData[indexData]);
this.availableData.splice(indexData, 1);
if (indexData !== -1) {
this.availableData[indexData].cssClasses = element.cssClasses;
this.displayedSecondaryData.push(this.availableData[indexData]);
this.availableData.splice(indexData, 1);
}
});
this.selectedListEvent = this.basketGroup.list_event;
this.selectedListEventClone = this.selectedListEvent;
......
......@@ -65,24 +65,38 @@
text-overflow: ellipsis;
padding-left: 5px;
padding-right: 5px;" [class.hasEvent]="data.event" (click)="launchEventSubData(data, row)">
<ng-container *ngIf="data.value == 'getCreationAndProcessLimitDates'">
<ng-container *ngIf="['getCreationDate', 'getProcessLimitDate', 'getCreationAndProcessLimitDates'].indexOf(data.value) > -1">
<ng-container *ngIf="row.closing_date != lang.undefined">
<i class="fa fa-lock" title="{{lang.closingDate}}"></i>&nbsp;<span
[innerHTML]="row.closing_date | timeAgo"
title='{{row.closing_date | fullDate}}'></span>
</ng-container>
<ng-container *ngIf="row.closing_date == lang.undefined">
<i class="fa fa-calendar"
<ng-container *ngIf="data.value === 'getCreationAndProcessLimitDates'">
<i class="fa fa-calendar"
title="{{lang.creationDate}}"></i>&nbsp;<span
[innerHTML]="data.displayValue.creationDate | timeAgo"
title='{{data.displayValue.creationDate | fullDate}}'></span>
- <i class="fa fa-stopwatch"
title="{{lang.processLimitDate}}"></i>&nbsp;<span
[innerHTML]="data.displayValue.processLimitDate | timeLimit"
title='{{data.displayValue.processLimitDate | fullDate}}'></span>
- <i class="fa fa-stopwatch"
title="{{lang.processLimitDate}}"></i>&nbsp;<span
[innerHTML]="data.displayValue.processLimitDate | timeLimit"
title='{{data.displayValue.processLimitDate | fullDate}}'></span>
</ng-container>
<ng-container *ngIf="data.value === 'getCreationDate'">
<i class="fa {{data.icon}}"
title="{{lang.creationDate}}"></i>&nbsp;<span
[innerHTML]="data.displayValue | timeAgo" style="margin-left: 3px;"
title='{{data.displayValue | fullDate}}'></span>
</ng-container>
<ng-container *ngIf="data.value === 'getProcessLimitDate'">
<i class="fa {{data.icon}}"
title="{{lang.processLimitDate}}"></i>&nbsp;<span
[innerHTML]="data.displayValue | timeLimit" style="margin-left: 3px;"
title='{{data.displayValue | fullDate}}'></span>
</ng-container>
</ng-container>
</ng-container>
<ng-container *ngIf="data.icon != ''">
<ng-container *ngIf="data.icon != '' && ['getCreationDate', 'getProcessLimitDate'].indexOf(data.value) === -1">
<i class="fa {{data.icon}}" title="{{data.label}}"></i>
&nbsp;
</ng-container>
......@@ -93,7 +107,7 @@
title="{{lang[data.displayValue]}}">{{lang[data.displayValue]}}</span>
</ng-container>
<ng-container
*ngIf="data.value != 'getCategory' && data.value != 'getCreationAndProcessLimitDates'">
*ngIf="data.value != 'getCategory' && data.value != 'getCreationDate' && data.value !== 'getProcessLimitDate' && data.value !== 'getCreationAndProcessLimitDates'">
<span *ngIf="!data.value.includes('Date')" title="{{data.displayTitle}}"
[innerHTML]="data.displayValue"></span>
<span *ngIf="data.value.includes('Date')"
......
......@@ -309,7 +309,7 @@ export class BasketListComponent implements OnInit, OnDestroy {
element.display.forEach((key: any) => {
key.event = false;
key.displayTitle = key.displayValue;
if ((key.displayValue == null || key.displayValue === '') && ['getCreationAndProcessLimitDates', 'getParallelOpinionsNumber'].indexOf(key.value) === -1) {
if ((key.displayValue == null || key.displayValue === '') && ['getCreationDate', 'getProcessLimitDate', 'getCreationAndProcessLimitDates', 'getParallelOpinionsNumber'].indexOf(key.value) === -1) {
key.displayValue = this.lang.undefined;
key.displayTitle = '';
} else if (['getSenders', 'getRecipients'].indexOf(key.value) > -1) {
......
......@@ -1744,5 +1744,9 @@ export const LANG_EN = {
"youCannotUnsign": "You do not have the right to <b>unsign</b> this document. You must be the person who signed this document.",
"arContentIsEmpty": "AR content is empty",
"company": "Company",
"noRecipient": "No associated recipient."
"noRecipient": "No associated recipient.",
"getProcessLimitDate": "Processing deadline",
"getProcessLimitDateSample": "<b color=\"warn\">3 day(s)</b>",
"getCreationDate": "Creation date",
"getCreationDateSample": "Jan. 1st",
};
......@@ -1746,5 +1746,9 @@ export const LANG_FR = {
"youCannotUnsign" : "Vous n'avez pas le droit de <b>dé-signer</b> ce document. Vous devez ếtre la personne qui a signé ce document.",
"arContentIsEmpty": "Le contenu de l'accusé de réception est vide",
"company": "Organisation",
"noRecipient": "Aucun destinataire associé."
"noRecipient": "Aucun destinataire associé.",
"getProcessLimitDate": "Date limite de traitement",
"getProcessLimitDateSample": "<b color=\"warn\">3 jour(s)</b>",
"getCreationDate": "Date de création",
"getCreationDateSample": "1er janv.",
};
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment