@@ -31,39 +31,50 @@ export function newSearch(filters, productData) {
31
31
const dates = store . getState ( ) . mainSlice . searchDateRangeValue
32
32
const productId = store . getState ( ) . mainSlice . selectedProductData . id
33
33
console . log ( geometry , dates , filters )
34
-
34
+ console . log ( geometry )
35
35
const query = {
36
- product_id : productId ,
37
- datetime : `${ dates [ 0 ] } /${ dates [ 1 ] } ` ,
38
- geometry : geometry . geometry ,
36
+ //product_id: productId,
37
+ datetime : "2025-04-21T00:00:00.000Z/2025-04-29T23:59:59.000Z" || `${ dates [ 0 ] } /${ dates [ 1 ] } ` ,
38
+ geometry : {
39
+ type : 'Polygon' ,
40
+ coordinates : [
41
+ [
42
+ [ 131.4067090823608 , - 24.863581247683243 ] ,
43
+ [ 131.4067090823608 , - 24.946918997631883 ] ,
44
+ [ 131.51697981183463 , - 24.946918997631883 ] ,
45
+ [ 131.51697981183463 , - 24.863581247683243 ] ,
46
+ [ 131.4067090823608 , - 24.863581247683243 ]
47
+ ]
48
+ ]
49
+ } ,
39
50
filter : {
40
- op : 'and' ,
41
- args : [ ]
51
+ // op: 'and',
52
+ // args: []
42
53
}
43
54
}
44
55
45
- for ( const [ key , value ] of Object . entries ( filters ) ) {
46
- const lowerBounds = {
47
- op : '>=' ,
48
- args : [
49
- {
50
- property : key
51
- } ,
52
- value [ 0 ]
53
- ]
54
- }
55
- query . filter . args . push ( lowerBounds )
56
- const upperBounds = {
57
- op : '<=' ,
58
- args : [
59
- {
60
- property : key
61
- } ,
62
- value [ 1 ]
63
- ]
64
- }
65
- query . filter . args . push ( upperBounds )
66
- }
56
+ // for (const [key, value] of Object.entries(filters)) {
57
+ // const lowerBounds = {
58
+ // op: '>=',
59
+ // args: [
60
+ // {
61
+ // property: key
62
+ // },
63
+ // value[0]
64
+ // ]
65
+ // }
66
+ // query.filter.args.push(lowerBounds)
67
+ // const upperBounds = {
68
+ // op: '<=',
69
+ // args: [
70
+ // {
71
+ // property: key
72
+ // },
73
+ // value[1]
74
+ // ]
75
+ // }
76
+ // query.filter.args.push(upperBounds)
77
+ // }
67
78
68
79
console . log ( query )
69
80
0 commit comments