Lines 90-96
export default {
Link Here
|
90 |
async fetchInitialData(dataType) { |
90 |
async fetchInitialData(dataType) { |
91 |
const client = APIClient.erm |
91 |
const client = APIClient.erm |
92 |
await client[dataType] |
92 |
await client[dataType] |
93 |
.getAll("_page=1&_per_page=20&_match=contains") |
93 |
.getAll( |
|
|
94 |
{}, |
95 |
{ |
96 |
_page: 1, |
97 |
_per_page: 20, |
98 |
_match: "contains", |
99 |
} |
100 |
) |
94 |
.then( |
101 |
.then( |
95 |
items => { |
102 |
items => { |
96 |
this.data = items |
103 |
this.data = items |
Lines 107-116
export default {
Link Here
|
107 |
this.data = [] |
114 |
this.data = [] |
108 |
this.search = e |
115 |
this.search = e |
109 |
const client = APIClient.erm |
116 |
const client = APIClient.erm |
|
|
117 |
const attribute = "me." + this.queryProperty |
118 |
const q = {} |
119 |
q[attribute] = { like: `%${e}%` } |
110 |
await client[this.dataType] |
120 |
await client[this.dataType] |
111 |
.getAll( |
121 |
.getAll(q, { |
112 |
`q={"me.${this.queryProperty}":{"like":"%${e}%"}}&_per_page=-1` |
122 |
_per_page: -1, |
113 |
) |
123 |
}) |
114 |
.then( |
124 |
.then( |
115 |
items => { |
125 |
items => { |
116 |
this.data = items |
126 |
this.data = items |
Lines 143-149
export default {
Link Here
|
143 |
const client = APIClient.erm |
153 |
const client = APIClient.erm |
144 |
await client[this.dataType] |
154 |
await client[this.dataType] |
145 |
.getAll( |
155 |
.getAll( |
146 |
`_page=${this.scrollPage}&_per_page=20&_match=contains` |
156 |
{}, |
|
|
157 |
{ |
158 |
_page: this.scrollPage, |
159 |
_per_page: 20, |
160 |
_match: "contains", |
161 |
} |
147 |
) |
162 |
) |
148 |
.then( |
163 |
.then( |
149 |
items => { |
164 |
items => { |
150 |
- |
|
|