Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
anis
anis-client
Commits
6b5bd69a
Commit
6b5bd69a
authored
Aug 20, 2019
by
François Agneray
Browse files
#51
=> done
parent
69da0f9c
Changes
8
Hide whitespace changes
Inline
Side-by-side
src/app/search/store/model/between-criterion.model.ts
View file @
6b5bd69a
...
...
@@ -21,6 +21,6 @@ export class BetweenCriterion extends Criterion {
}
getCriterionStr
()
{
return
this
.
id
+
'
:bw:
'
+
this
.
min
+
'
|
'
+
this
.
max
;
return
this
.
id
+
'
:
:
bw:
:
'
+
this
.
min
+
'
|
'
+
this
.
max
;
}
}
src/app/search/store/model/between-date-criterion.model.ts
View file @
6b5bd69a
...
...
@@ -15,6 +15,6 @@ export class BetweenDateCriterion extends Criterion {
}
getCriterionStr
()
{
return
this
.
id
+
'
:bd:
'
+
this
.
min
+
'
|
'
+
this
.
max
;
return
this
.
id
+
'
:
:
bd:
:
'
+
this
.
min
+
'
|
'
+
this
.
max
;
}
}
src/app/search/store/model/checkbox-criterion.model.ts
View file @
6b5bd69a
...
...
@@ -17,9 +17,9 @@ export class CheckboxCriterion extends Criterion {
getCriterionStr
():
string
{
if
(
this
.
operator
===
'
eq
'
)
{
return
this
.
id
+
'
:in:
'
+
this
.
values
.
map
(
option
=>
option
.
value
).
join
(
'
|
'
);
return
this
.
id
+
'
:
:
in:
:
'
+
this
.
values
.
map
(
option
=>
option
.
value
).
join
(
'
|
'
);
}
else
{
return
this
.
values
.
map
(
option
=>
this
.
id
+
'
:
'
+
this
.
operator
+
'
:
'
+
option
.
value
).
join
(
'
;
'
);
return
this
.
values
.
map
(
option
=>
this
.
id
+
'
:
:
'
+
this
.
operator
+
'
:
:
'
+
option
.
value
).
join
(
'
;
'
);
}
}
}
src/app/search/store/model/datetime-criterion.model.ts
View file @
6b5bd69a
...
...
@@ -25,6 +25,6 @@ export class DatetimeCriterion extends Criterion {
const
minute
=
(
'
0
'
+
(
this
.
value
.
getMinutes
())).
slice
(
-
2
);
const
date
=
this
.
value
.
getFullYear
()
+
'
-
'
+
month
+
'
-
'
+
day
;
const
time
=
hour
+
'
:
'
+
minute
;
return
this
.
id
+
'
:eq:
'
+
date
+
'
.
'
+
time
;
return
this
.
id
+
'
:
:
eq:
:
'
+
date
+
'
.
'
+
time
;
}
}
src/app/search/store/model/field-criterion.model.ts
View file @
6b5bd69a
...
...
@@ -15,6 +15,6 @@ export class FieldCriterion extends Criterion {
}
getCriterionStr
():
string
{
return
this
.
id
+
'
:
'
+
this
.
operator
+
'
:
'
+
this
.
value
;
return
this
.
id
+
'
:
:
'
+
this
.
operator
+
'
:
:
'
+
this
.
value
;
}
}
src/app/search/store/model/json-criterion.model.ts
View file @
6b5bd69a
...
...
@@ -17,6 +17,6 @@ export class JsonCriterion extends Criterion {
}
getCriterionStr
()
{
return
this
.
id
+
'
:js:
'
+
this
.
path
+
'
|
'
+
this
.
operator
+
'
|
'
+
this
.
value
;
return
this
.
id
+
'
:
:
js:
:
'
+
this
.
path
+
'
|
'
+
this
.
operator
+
'
|
'
+
this
.
value
;
}
}
src/app/search/store/model/select-multiple-criterion.model.ts
View file @
6b5bd69a
...
...
@@ -17,9 +17,9 @@ export class SelectMultipleCriterion extends Criterion {
getCriterionStr
():
string
{
if
(
this
.
operator
===
'
eq
'
)
{
return
this
.
id
+
'
:in:
'
+
this
.
options
.
map
(
option
=>
option
.
value
).
join
(
'
|
'
);
return
this
.
id
+
'
:
:
in:
:
'
+
this
.
options
.
map
(
option
=>
option
.
value
).
join
(
'
|
'
);
}
else
{
return
this
.
options
.
map
(
option
=>
this
.
id
+
'
:
'
+
this
.
operator
+
'
:
'
+
option
.
value
).
join
(
'
;
'
);
return
this
.
options
.
map
(
option
=>
this
.
id
+
'
:
:
'
+
this
.
operator
+
'
:
:
'
+
option
.
value
).
join
(
'
;
'
);
}
}
}
src/app/search/store/search.effects.ts
View file @
6b5bd69a
...
...
@@ -81,7 +81,7 @@ export class SearchEffects {
if
(
state
.
router
.
state
.
queryParams
.
c
)
{
defaultCriteriaList
=
state
.
router
.
state
.
queryParams
.
c
.
split
(
'
;
'
).
map
((
c
:
string
)
=>
{
const
params
=
c
.
split
(
'
:
'
);
const
params
=
c
.
split
(
'
:
:
'
);
const
attribute
=
loadAttributeSearchMetaSuccessAction
.
payload
.
find
(
a
=>
a
.
id
===
parseInt
(
params
[
0
],
10
));
switch
(
attribute
.
search_type
)
{
case
'
fd
'
:
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment