Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Quentin CHEVILLON
opacce
Commits
d06c1e1f
Commit
d06c1e1f
authored
Aug 11, 2021
by
efalcy
Committed by
Sebastien ANDRE
Aug 12, 2021
Browse files
hotline#139058: fix loan history board when no album
parent
64173db2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
2 deletions
+24
-2
VERSIONS_HOTLINE/139058
VERSIONS_HOTLINE/139058
+1
-0
library/Class/Loan/Pnb.php
library/Class/Loan/Pnb.php
+11
-2
tests/scenarios/PnbDilicom/PnbDilicomAdminLoansHistoryTest.php
.../scenarios/PnbDilicom/PnbDilicomAdminLoansHistoryTest.php
+12
-0
No files found.
VERSIONS_HOTLINE/139058
0 → 100644
View file @
d06c1e1f
- ticket #139058 : Administration : Correction de l'affichage du tableau des prêts PNB
\ No newline at end of file
library/Class/Loan/Pnb.php
View file @
d06c1e1f
...
...
@@ -175,12 +175,21 @@ class Class_Loan_Pnb extends Storm_Model_Abstract {
public
function
getGenres
()
{
return
array_filter
(
array_map
(
'trim'
,
explode
(
';'
,
$this
->
getAlbum
()
->
getGenre
())));
return
(
$album
=
$this
->
getAlbum
())
?
$this
->
_withAlbumDo
(
function
()
use
(
$album
)
{
return
$album
->
getGenre
();
})
:
[];
}
public
function
getSections
()
{
return
array_filter
(
array_map
(
'trim'
,
explode
(
';'
,
$this
->
getAlbum
()
->
getSections
())));
return
(
$album
=
$this
->
getAlbum
())
?
$this
->
_withAlbumDo
(
function
()
use
(
$album
)
{
return
$album
->
getSections
();
})
:
[];
}
protected
function
_withAlbumDo
(
$callback
)
{
return
array_filter
(
array_map
(
'trim'
,
explode
(
';'
,
$callback
())));
}
...
...
tests/scenarios/PnbDilicom/PnbDilicomAdminLoansHistoryTest.php
View file @
d06c1e1f
...
...
@@ -156,6 +156,18 @@ class PnbDilicomAdminLoansHistoryWithDilicomGenreSectionAdminVar extends PnbDili
public
function
setUp
()
{
parent
::
setup
();
Class_AdminVar
::
set
(
'DILICOM_PNB_BOARD_DISPLAY_SECTION'
,
1
);
$this
->
fixture
(
'Class_Loan_Pnb'
,
[
'id'
=>
33
,
'record_origin_id'
=>
'Dilicom-with-no-matching-album'
,
'subscriber_id'
=>
'000006'
,
'user_id'
=>
1
,
'expected_return_date'
=>
'2017-12-13 13:57:33'
,
'loan_date'
=>
'2017-11-13 13:57:33'
,
'loan_link'
=>
'https://pnb-dilicom.centprod.com/v2//XXXXXXXX.do'
,
'order_line_id'
=>
'12385'
,]);
$this
->
dispatch
(
'/admin/pnb/loans?'
.
http_build_query
([
'search_order'
=>
'loan_date'
,
'search_loan_date_debut'
=>
'10/11/2017'
,
...
...
Write
Preview
Markdown
is supported
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