Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MaarchCourrier
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Harbor Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maarch
MaarchCourrier
Commits
46a55ebd
Verified
Commit
46a55ebd
authored
6 years ago
by
Alex ORLUC
Browse files
Options
Downloads
Patches
Plain Diff
FIX #8956 assigned basket save filter
parent
1e470b3f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/frontend/app/list/basket-list.component.ts
+1
-1
1 addition, 1 deletion
src/frontend/app/list/basket-list.component.ts
src/frontend/service/filtersList.service.ts
+43
-42
43 additions, 42 deletions
src/frontend/service/filtersList.service.ts
with
44 additions
and
43 deletions
src/frontend/app/list/basket-list.component.ts
+
1
−
1
View file @
46a55ebd
...
@@ -147,7 +147,7 @@ export class BasketListComponent implements OnInit {
...
@@ -147,7 +147,7 @@ export class BasketListComponent implements OnInit {
window
[
'
MainHeaderComponent
'
].
setSnav
(
this
.
sidenavLeft
);
window
[
'
MainHeaderComponent
'
].
setSnav
(
this
.
sidenavLeft
);
window
[
'
MainHeaderComponent
'
].
setSnavRight
(
this
.
sidenavRight
);
window
[
'
MainHeaderComponent
'
].
setSnavRight
(
this
.
sidenavRight
);
this
.
listProperties
=
this
.
filtersListService
.
initListsProperties
(
'
bbain
'
,
params
[
'
groupSerialId
'
],
params
[
'
basketId
'
]
);
this
.
listProperties
=
this
.
filtersListService
.
initListsProperties
(
this
.
currentBasketInfo
.
ownerId
,
this
.
currentBasketInfo
.
groupId
,
this
.
currentBasketInfo
.
basketId
);
this
.
refreshDao
();
this
.
refreshDao
();
...
...
This diff is collapsed.
Click to expand it.
src/frontend/service/filtersList.service.ts
+
43
−
42
View file @
46a55ebd
import
{
Injectable
}
from
'
@angular/core
'
;
import
{
Injectable
}
from
'
@angular/core
'
;
interface
listProperties
{
interface
listProperties
{
'
id
'
:
string
,
'
id
'
:
number
,
'
groupId
'
:
number
,
'
groupId
'
:
number
,
'
basketId
'
:
number
,
'
basketId
'
:
number
,
'
page
'
:
string
,
'
page
'
:
string
,
'
order
'
:
string
,
'
order
'
:
string
,
'
orderDir
'
:
string
,
'
orderDir
'
:
string
,
'
search
'
:
string
,
'
search
'
:
string
,
'
delayed
'
:
boolean
,
'
delayed
'
:
boolean
,
'
categories
'
:
string
[],
'
categories
'
:
string
[],
'
priorities
'
:
string
[],
'
priorities
'
:
string
[],
'
entities
'
:
string
[],
'
entities
'
:
string
[],
'
statuses
'
:
string
[]
'
statuses
'
:
string
[]
}
}
@
Injectable
()
@
Injectable
()
...
@@ -26,11 +26,11 @@ export class FiltersListService {
...
@@ -26,11 +26,11 @@ export class FiltersListService {
this
.
listsProperties
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'
propertyList
'
));
this
.
listsProperties
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'
propertyList
'
));
}
}
initListsProperties
(
userId
:
string
,
groupId
:
number
,
basketId
:
number
)
{
initListsProperties
(
userId
:
number
,
groupId
:
number
,
basketId
:
number
)
{
this
.
listsPropertiesIndex
=
0
;
this
.
listsPropertiesIndex
=
0
;
let
listProperties
:
listProperties
;
let
listProperties
:
listProperties
;
if
(
this
.
listsProperties
!=
null
)
{
if
(
this
.
listsProperties
!=
null
)
{
this
.
listsProperties
.
forEach
((
element
,
index
)
=>
{
this
.
listsProperties
.
forEach
((
element
,
index
)
=>
{
if
(
element
.
id
==
userId
&&
element
.
groupId
==
groupId
&&
element
.
basketId
==
basketId
)
{
if
(
element
.
id
==
userId
&&
element
.
groupId
==
groupId
&&
element
.
basketId
==
basketId
)
{
...
@@ -39,38 +39,39 @@ export class FiltersListService {
...
@@ -39,38 +39,39 @@ export class FiltersListService {
}
}
});
});
}
else
{
}
else
{
this
.
listsProperties
=
[];
this
.
listsProperties
=
[];
}
}
if
(
!
listProperties
)
{
if
(
!
listProperties
)
{
listProperties
=
{
listProperties
=
{
'
id
'
:
userId
,
'
id
'
:
userId
,
'
groupId
'
:
groupId
,
'
groupId
'
:
groupId
,
'
basketId
'
:
basketId
,
'
basketId
'
:
basketId
,
'
page
'
:
'
0
'
,
'
page
'
:
'
0
'
,
'
order
'
:
''
,
'
order
'
:
''
,
'
orderDir
'
:
'
DESC
'
,
'
orderDir
'
:
'
DESC
'
,
'
search
'
:
''
,
'
search
'
:
''
,
'
delayed
'
:
false
,
'
delayed
'
:
false
,
'
categories
'
:
[],
'
categories
'
:
[],
'
priorities
'
:
[],
'
priorities
'
:
[],
'
entities
'
:
[],
'
entities
'
:
[],
'
statuses
'
:
[],
'
statuses
'
:
[],
};
};
this
.
listsProperties
.
push
(
listProperties
);
this
.
listsProperties
.
push
(
listProperties
);
this
.
saveListsProperties
();
this
.
saveListsProperties
();
}
}
return
listProperties
;
return
listProperties
;
}
}
updateListsPropertiesPage
(
page
:
number
)
{
updateListsPropertiesPage
(
page
:
number
)
{
if
(
this
.
listsProperties
)
{
if
(
this
.
listsProperties
)
{
this
.
listsProperties
[
this
.
listsPropertiesIndex
].
page
=
page
;
this
.
listsProperties
[
this
.
listsPropertiesIndex
].
page
=
page
;
this
.
saveListsProperties
();
this
.
saveListsProperties
();
}
}
}
}
updateListsProperties
(
listProperties
:
any
)
{
updateListsProperties
(
listProperties
:
any
)
{
if
(
this
.
listsProperties
)
{
if
(
this
.
listsProperties
)
{
this
.
listsProperties
[
this
.
listsPropertiesIndex
]
=
listProperties
;
this
.
listsProperties
[
this
.
listsPropertiesIndex
]
=
listProperties
;
this
.
saveListsProperties
();
this
.
saveListsProperties
();
...
@@ -81,53 +82,53 @@ export class FiltersListService {
...
@@ -81,53 +82,53 @@ export class FiltersListService {
sessionStorage
.
setItem
(
'
propertyList
'
,
JSON
.
stringify
(
this
.
listsProperties
));
sessionStorage
.
setItem
(
'
propertyList
'
,
JSON
.
stringify
(
this
.
listsProperties
));
}
}
getUrlFilters
()
{
getUrlFilters
()
{
let
filters
=
''
;
let
filters
=
''
;
if
(
this
.
listsProperties
)
{
if
(
this
.
listsProperties
)
{
if
(
this
.
listsProperties
[
this
.
listsPropertiesIndex
].
delayed
)
{
if
(
this
.
listsProperties
[
this
.
listsPropertiesIndex
].
delayed
)
{
filters
+=
'
&delayed=true
'
;
filters
+=
'
&delayed=true
'
;
}
}
if
(
this
.
listsProperties
[
this
.
listsPropertiesIndex
].
order
.
length
>
0
)
{
if
(
this
.
listsProperties
[
this
.
listsPropertiesIndex
].
order
.
length
>
0
)
{
filters
+=
'
&order=
'
+
this
.
listsProperties
[
this
.
listsPropertiesIndex
].
order
+
'
'
+
this
.
listsProperties
[
this
.
listsPropertiesIndex
].
orderDir
;
filters
+=
'
&order=
'
+
this
.
listsProperties
[
this
.
listsPropertiesIndex
].
order
+
'
'
+
this
.
listsProperties
[
this
.
listsPropertiesIndex
].
orderDir
;
}
}
if
(
this
.
listsProperties
[
this
.
listsPropertiesIndex
].
search
.
length
>
0
)
{
if
(
this
.
listsProperties
[
this
.
listsPropertiesIndex
].
search
.
length
>
0
)
{
filters
+=
'
&search=
'
+
this
.
listsProperties
[
this
.
listsPropertiesIndex
].
search
;
filters
+=
'
&search=
'
+
this
.
listsProperties
[
this
.
listsPropertiesIndex
].
search
;
}
}
if
(
this
.
listsProperties
[
this
.
listsPropertiesIndex
].
categories
.
length
>
0
)
{
if
(
this
.
listsProperties
[
this
.
listsPropertiesIndex
].
categories
.
length
>
0
)
{
let
cat
:
any
[]
=
[];
let
cat
:
any
[]
=
[];
this
.
listsProperties
[
this
.
listsPropertiesIndex
].
categories
.
forEach
((
element
:
any
)
=>
{
this
.
listsProperties
[
this
.
listsPropertiesIndex
].
categories
.
forEach
((
element
:
any
)
=>
{
cat
.
push
(
element
.
id
);
cat
.
push
(
element
.
id
);
});
});
filters
+=
'
&categories=
'
+
cat
.
join
(
'
,
'
);
filters
+=
'
&categories=
'
+
cat
.
join
(
'
,
'
);
}
}
if
(
this
.
listsProperties
[
this
.
listsPropertiesIndex
].
priorities
.
length
>
0
)
{
if
(
this
.
listsProperties
[
this
.
listsPropertiesIndex
].
priorities
.
length
>
0
)
{
let
prio
:
any
[]
=
[];
let
prio
:
any
[]
=
[];
this
.
listsProperties
[
this
.
listsPropertiesIndex
].
priorities
.
forEach
((
element
:
any
)
=>
{
this
.
listsProperties
[
this
.
listsPropertiesIndex
].
priorities
.
forEach
((
element
:
any
)
=>
{
prio
.
push
(
element
.
id
);
prio
.
push
(
element
.
id
);
});
});
filters
+=
'
&priorities=
'
+
prio
.
join
(
'
,
'
);
filters
+=
'
&priorities=
'
+
prio
.
join
(
'
,
'
);
}
}
if
(
this
.
listsProperties
[
this
.
listsPropertiesIndex
].
statuses
.
length
>
0
)
{
if
(
this
.
listsProperties
[
this
.
listsPropertiesIndex
].
statuses
.
length
>
0
)
{
let
status
:
any
[]
=
[];
let
status
:
any
[]
=
[];
this
.
listsProperties
[
this
.
listsPropertiesIndex
].
statuses
.
forEach
((
element
:
any
)
=>
{
this
.
listsProperties
[
this
.
listsPropertiesIndex
].
statuses
.
forEach
((
element
:
any
)
=>
{
status
.
push
(
element
.
id
);
status
.
push
(
element
.
id
);
});
});
filters
+=
'
&statuses=
'
+
status
.
join
(
'
,
'
);
filters
+=
'
&statuses=
'
+
status
.
join
(
'
,
'
);
}
}
if
(
this
.
listsProperties
[
this
.
listsPropertiesIndex
].
entities
.
length
>
0
)
{
if
(
this
.
listsProperties
[
this
.
listsPropertiesIndex
].
entities
.
length
>
0
)
{
let
ent
:
any
[]
=
[];
let
ent
:
any
[]
=
[];
this
.
listsProperties
[
this
.
listsPropertiesIndex
].
entities
.
forEach
((
element
:
any
)
=>
{
this
.
listsProperties
[
this
.
listsPropertiesIndex
].
entities
.
forEach
((
element
:
any
)
=>
{
ent
.
push
(
element
.
id
);
ent
.
push
(
element
.
id
);
});
});
filters
+=
'
&entities=
'
+
ent
.
join
(
'
,
'
);
filters
+=
'
&entities=
'
+
ent
.
join
(
'
,
'
);
}
}
}
}
return
filters
;
return
filters
;
}
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment