|
33 | 33 | <select @change="(e) => {
|
34 | 34 | state.other.requestType = requestTypes.find((obj) => { return e.target.value == obj.name})
|
35 | 35 | state.other.organization = 'All'
|
36 |
| - load() |
| 36 | + reload() |
37 | 37 | }"
|
38 | 38 | id="reponseType" name="responseType" class="block mt-1 pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm rounded-md">
|
39 | 39 | <template x-for="item in requestTypes" :key="item.id">
|
|
47 | 47 | <div class="content-start">
|
48 | 48 | <label for="filter" class="block text-sm font-medium text-gray-700">Filter by Organization</label>
|
49 | 49 | <select @change="(e) => {
|
50 |
| - load() |
| 50 | + reload() |
51 | 51 | }"
|
52 | 52 | x-model="state.other.organization"
|
53 | 53 | id="reponseType" name="responseType" class="block mt-1 pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm rounded-md">
|
|
82 | 82 | <div class="content-start">
|
83 | 83 | <label for="filter" class="block text-sm font-medium text-gray-700">Filter by Response</label>
|
84 | 84 | <select @change="() => {
|
85 |
| - load() |
| 85 | + reload() |
86 | 86 | }"
|
87 | 87 | x-model="state.other.responseType" id="reponseType" name="responseType" class="block mt-1 pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm rounded-md">
|
88 | 88 | <option>All</option>
|
|
97 | 97 | <select @change="(e) => {
|
98 | 98 | state.other.requestType = requestTypes.find((obj) => { return e.target.value == obj.name})
|
99 | 99 | state.other.organization = 'All'
|
100 |
| - load() |
| 100 | + reload() |
101 | 101 | }"
|
102 | 102 | id="reponseType" name="responseType" class="block mt-1 pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm rounded-md">
|
103 | 103 | <template x-for="item in requestTypes" :key="item.id">
|
|
112 | 112 | <label for="filter" class="block text-sm font-medium text-gray-700">Filter by Organization</label>
|
113 | 113 | <select @change="(e) => {
|
114 | 114 | state.other.organization = e.target.value
|
115 |
| - load() |
| 115 | + reload() |
116 | 116 | }"
|
117 | 117 | id="reponseType" name="responseType" class="block mt-1 pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm rounded-md">
|
118 | 118 | <template x-for="item in organizations">
|
|
392 | 392 | const offset = filter * page;
|
393 | 393 | search = encodeURIComponent(search)
|
394 | 394 | requestTypeParam = requestType == '' ? '' : '&requestType=' + requestType
|
395 |
| - organizationParam = organization == 'All' ? '' : '&organization=' + organization |
| 395 | + organizationParam = organization.toLowerCase() == 'all' ? '' : '&organization=' + organization |
396 | 396 | const res = await fetch(`/api/items/type/${type}/status/${status}?filter=${filter}&offset=${offset}&search=${search}${requestTypeParam}${organizationParam}`)
|
397 | 397 | const data = await res.json()
|
398 | 398 | return data
|
|
0 commit comments