Commit 6b5bd69a authored by François Agneray's avatar François Agneray
Browse files

#51 => done

parent 69da0f9c
...@@ -21,6 +21,6 @@ export class BetweenCriterion extends Criterion { ...@@ -21,6 +21,6 @@ export class BetweenCriterion extends Criterion {
} }
getCriterionStr() { getCriterionStr() {
return this.id + ':bw:' + this.min + '|' + this.max; return this.id + '::bw::' + this.min + '|' + this.max;
} }
} }
...@@ -15,6 +15,6 @@ export class BetweenDateCriterion extends Criterion { ...@@ -15,6 +15,6 @@ export class BetweenDateCriterion extends Criterion {
} }
getCriterionStr() { getCriterionStr() {
return this.id + ':bd:' + this.min + '|' + this.max; return this.id + '::bd::' + this.min + '|' + this.max;
} }
} }
...@@ -17,9 +17,9 @@ export class CheckboxCriterion extends Criterion { ...@@ -17,9 +17,9 @@ export class CheckboxCriterion extends Criterion {
getCriterionStr(): string { getCriterionStr(): string {
if (this.operator === 'eq') { 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 { } 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(';');
} }
} }
} }
...@@ -25,6 +25,6 @@ export class DatetimeCriterion extends Criterion { ...@@ -25,6 +25,6 @@ export class DatetimeCriterion extends Criterion {
const minute = ('0' + (this.value.getMinutes())).slice(-2); const minute = ('0' + (this.value.getMinutes())).slice(-2);
const date = this.value.getFullYear() + '-' + month + '-' + day; const date = this.value.getFullYear() + '-' + month + '-' + day;
const time = hour + ':' + minute; const time = hour + ':' + minute;
return this.id + ':eq:' + date + '.' + time; return this.id + '::eq::' + date + '.' + time;
} }
} }
...@@ -15,6 +15,6 @@ export class FieldCriterion extends Criterion { ...@@ -15,6 +15,6 @@ export class FieldCriterion extends Criterion {
} }
getCriterionStr(): string { getCriterionStr(): string {
return this.id + ':' + this.operator + ':' + this.value; return this.id + '::' + this.operator + '::' + this.value;
} }
} }
...@@ -17,6 +17,6 @@ export class JsonCriterion extends Criterion { ...@@ -17,6 +17,6 @@ export class JsonCriterion extends Criterion {
} }
getCriterionStr() { getCriterionStr() {
return this.id + ':js:' + this.path + '|' + this.operator + '|' + this.value; return this.id + '::js::' + this.path + '|' + this.operator + '|' + this.value;
} }
} }
...@@ -17,9 +17,9 @@ export class SelectMultipleCriterion extends Criterion { ...@@ -17,9 +17,9 @@ export class SelectMultipleCriterion extends Criterion {
getCriterionStr(): string { getCriterionStr(): string {
if (this.operator === 'eq') { 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 { } 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(';');
} }
} }
} }
...@@ -81,7 +81,7 @@ export class SearchEffects { ...@@ -81,7 +81,7 @@ export class SearchEffects {
if (state.router.state.queryParams.c) { if (state.router.state.queryParams.c) {
defaultCriteriaList = state.router.state.queryParams.c.split(';').map((c: string) => { 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)); const attribute = loadAttributeSearchMetaSuccessAction.payload.find(a => a.id === parseInt(params[0], 10));
switch (attribute.search_type) { switch (attribute.search_type) {
case 'fd': case 'fd':
......
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