Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Maarch
MaarchCourrier
Commits
849b5dfc
Commit
849b5dfc
authored
Oct 11, 2021
by
Hamza HRAMCHI
Browse files
FIX #16304 TIME 0:30 Result list customization - separate creation date and processing deadline
parent
4832ff73
Changes
6
Hide whitespace changes
Inline
Side-by-side
src/app/resource/controllers/ResourceListController.php
View file @
849b5dfc
...
...
@@ -177,6 +177,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'
)
{
...
...
@@ -968,6 +972,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
;
...
...
src/frontend/app/administration/basket/list/list-administration.component.ts
View file @
849b5dfc
...
...
@@ -89,6 +89,20 @@ export class ListAdministrationComponent implements OnInit {
'
cssClasses
'
:
[
'
align_leftData
'
],
'
icon
'
:
'
fa-calendar
'
},
{
'
value
'
:
'
getCreationDate
'
,
'
label
'
:
this
.
translate
.
instant
(
'
lang.getCreationDate
'
),
'
sample
'
:
this
.
translate
.
instant
(
'
lang.getCreationDateSample
'
),
'
cssClasses
'
:
[
'
align_leftData
'
],
'
icon
'
:
'
fa-calendar
'
},
{
'
value
'
:
'
getProcessLimitDate
'
,
'
label
'
:
this
.
translate
.
instant
(
'
lang.getProcessLimitDate
'
),
'
sample
'
:
this
.
translate
.
instant
(
'
lang.getProcessLimitDateSample
'
),
'
cssClasses
'
:
[
'
align_leftData
'
],
'
icon
'
:
'
fa-stopwatch
'
},
{
'
value
'
:
'
getVisaWorkflow
'
,
'
label
'
:
this
.
translate
.
instant
(
'
lang.getVisaWorkflow
'
),
...
...
@@ -273,8 +287,10 @@ export class ListAdministrationComponent implements OnInit {
this
.
selectedTemplateDisplayedSecondaryDataClone
=
this
.
selectedTemplateDisplayedSecondaryData
;
this
.
basketGroup
.
list_display
.
subInfos
.
forEach
((
element
:
any
)
=>
{
this
.
addData
(
element
.
value
);
this
.
displayedSecondaryData
[
this
.
displayedSecondaryData
.
length
-
1
].
cssClasses
=
element
.
cssClasses
;
if
(
element
!==
undefined
)
{
this
.
addData
(
element
.
value
);
this
.
displayedSecondaryData
[
this
.
displayedSecondaryData
.
length
-
1
].
cssClasses
=
element
.
cssClasses
;
}
});
this
.
selectedListEvent
=
this
.
basketGroup
.
list_event
;
...
...
src/frontend/app/list/basket-list.component.html
View file @
849b5dfc
...
...
@@ -66,8 +66,8 @@
text-overflow: ellipsis;
padding-left: 5px;
padding-right: 5px;"
[class.hasEvent]=
"data.event && data.displayValue !== ('lang.undefined' | translate)"
(click)=
"launchEventSubData(data, row)"
>
<ng-container
*ngIf=
"
data.value ==
'getCreationAndProcessLimitDates'"
>
<ng-container
*ngIf=
"row.closing_date != ('lang.undefined' | translate)"
>
<ng-container
*ngIf=
"
['getCreationDate', 'getProcessLimitDate',
'getCreationAndProcessLimitDates'
].indexOf(data.value) > -1
"
>
<ng-container
*ngIf=
"
data.value === 'getCreationAndProcessLimitDates' &&
row.closing_date != ('lang.undefined' | translate)"
>
<i
class=
"fa fa-calendar"
title=
"{{'lang.creationDate' | translate}}"
></i>
<span
[innerHTML]=
"data.displayValue.creationDate | timeAgo"
...
...
@@ -77,7 +77,8 @@
title=
'{{row.closing_date | fullDate}}'
></span>
</ng-container>
<ng-container
*ngIf=
"row.closing_date == ('lang.undefined' | translate)"
>
<i
class=
"fa fa-calendar"
<ng-container
*ngIf=
"data.value === 'getCreationAndProcessLimitDates'"
>
<i
class=
"fa fa-calendar"
title=
"{{'lang.creationDate' | translate}}"
></i>
<span
[innerHTML]=
"data.displayValue.creationDate | timeAgo"
title=
'{{data.displayValue.creationDate | fullDate}}'
></span>
...
...
@@ -85,9 +86,22 @@
title=
"{{'lang.processLimitDate' | translate}}"
></i>
<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.getCreationDate' | translate}}"
></i>
<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.getProcessLimitDate' | translate}}"
></i>
<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>
</ng-container>
...
...
@@ -98,7 +112,7 @@
title=
"{{'lang.' + data.displayValue | translate}}"
>
{{'lang.' + data.displayValue | translate}}
</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')"
...
...
src/frontend/app/list/basket-list.component.ts
View file @
849b5dfc
...
...
@@ -305,7 +305,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
.
translate
.
instant
(
'
lang.undefined
'
);
key
.
displayTitle
=
''
;
}
else
if
([
'
getSenders
'
,
'
getRecipients
'
].
indexOf
(
key
.
value
)
>
-
1
)
{
...
...
src/lang/lang-en.json
View file @
849b5dfc
...
...
@@ -2555,5 +2555,9 @@
"otpVisaUser"
:
"The user will be notified by <b> email </b> at the time of his turn in the circuit."
,
"mustSign"
:
"The signature position for external users is mandatory."
,
"autoRedirectToUser"
:
"To myself"
,
"applicationVersion"
:
"Maarch courrier {{version}} Powered by {{author}}"
"applicationVersion"
:
"Maarch courrier {{version}} Powered by {{author}}"
,
"getProcessLimitDate"
:
"Processing deadline"
,
"getProcessLimitDateSample"
:
"<b color=
\"
warn
\"
>3 day(s)</b>"
,
"getCreationDate"
:
"Creation date"
,
"getCreationDateSample"
:
"Jan. 1st"
}
src/lang/lang-fr.json
View file @
849b5dfc
...
...
@@ -2545,5 +2545,9 @@
"requestedOpinion"
:
"Avis demandé à la place de"
,
"sharePointWarning"
:
"Fermez l'éditeur du document avant de valider l'édition"
,
"autoRedirectToUser"
:
"A moi-même"
,
"applicationVersion"
:
"Maarch courrier {{version}} Powered by {{author}}"
"applicationVersion"
:
"Maarch courrier {{version}} Powered by {{author}}"
,
"getProcessLimitDate"
:
"Date limite de traitement"
,
"getProcessLimitDateSample"
:
"<b color=
\"
warn
\"
>3 jour(s)</b>"
,
"getCreationDate"
:
"Date de création"
,
"getCreationDateSample"
:
"1er janv."
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment