lot search query filters

deepsource-autofix-76c6eb20
Dan Gowans 2022-09-27 10:43:00 -04:00
parent 6c9c3e9128
commit 89a559d2b5
3 changed files with 12 additions and 4 deletions

View File

@ -10,7 +10,9 @@ export const handler = (request, response) => {
maps, maps,
lotTypes, lotTypes,
lotStatuses, lotStatuses,
mapId: request.query.mapId mapId: request.query.mapId,
lotTypeId: request.query.lotTypeId,
lotStatusId: request.query.lotStatusId
}); });
}; };
export default handler; export default handler;

View File

@ -16,7 +16,9 @@ export const handler: RequestHandler = (request, response) => {
maps, maps,
lotTypes, lotTypes,
lotStatuses, lotStatuses,
mapId: request.query.mapId mapId: request.query.mapId,
lotTypeId: request.query.lotTypeId,
lotStatusId: request.query.lotStatusId
}); });
}; };

View File

@ -49,7 +49,9 @@
<select id="searchFilter--lotTypeId" name="lotTypeId"> <select id="searchFilter--lotTypeId" name="lotTypeId">
<option value="">(All <%= configFunctions.getProperty("aliases.lot") %> Types)</option> <option value="">(All <%= configFunctions.getProperty("aliases.lot") %> Types)</option>
<% for (const lotType of lotTypes) { %> <% for (const lotType of lotTypes) { %>
<option value="<%= lotType.lotTypeId %>"><%= lotType.lotType || "(No Name)" %></option> <option value="<%= lotType.lotTypeId %>" <%= (lotType.lotTypeId.toString() === lotTypeId) ? " selected" : "" %>>
<%= lotType.lotType || "(No Name)" %>
</option>
<% } %> <% } %>
</select> </select>
</div> </div>
@ -89,7 +91,9 @@
<select id="searchFilter--lotStatusId" name="lotStatusId"> <select id="searchFilter--lotStatusId" name="lotStatusId">
<option value="">(All Statuses)</option> <option value="">(All Statuses)</option>
<% for (const lotStatus of lotStatuses) { %> <% for (const lotStatus of lotStatuses) { %>
<option value="<%= lotStatus.lotStatusId %>"><%= lotStatus.lotStatus %></option> <option value="<%= lotStatus.lotStatusId %>" <%= (lotStatus.lotStatusId.toString() === lotStatusId) ? " selected" : "" %>>
<%= lotStatus.lotStatus %>
</option>
<% } %> <% } %>
</select> </select>
</div> </div>