lot name contains, starts with, or ends with
parent
69c97d0d02
commit
75ced51d7e
|
|
@ -8,6 +8,7 @@ interface GetLotOccupanciesFilters {
|
|||
occupantName?: string;
|
||||
occupancyTypeId?: number | string;
|
||||
mapId?: number | string;
|
||||
lotNameSearchType?: "" | "startsWith" | "endsWith";
|
||||
lotName?: string;
|
||||
lotTypeId?: number | string;
|
||||
workOrderId?: number | string;
|
||||
|
|
|
|||
|
|
@ -15,10 +15,20 @@ export const getLotOccupancies = (filters, options, connectedDatabase) => {
|
|||
sqlParameters.push(filters.lotId);
|
||||
}
|
||||
if (filters.lotName) {
|
||||
const lotNamePieces = filters.lotName.toLowerCase().split(" ");
|
||||
for (const lotNamePiece of lotNamePieces) {
|
||||
sqlWhereClause += " and instr(lower(l.lotName), ?)";
|
||||
sqlParameters.push(lotNamePiece);
|
||||
if (filters.lotNameSearchType === "startsWith") {
|
||||
sqlWhereClause += " and l.lotName like ? || '%'";
|
||||
sqlParameters.push(filters.lotName);
|
||||
}
|
||||
else if (filters.lotNameSearchType === "endsWith") {
|
||||
sqlWhereClause += " and l.lotName like '%' || ?";
|
||||
sqlParameters.push(filters.lotName);
|
||||
}
|
||||
else {
|
||||
const lotNamePieces = filters.lotName.toLowerCase().split(" ");
|
||||
for (const lotNamePiece of lotNamePieces) {
|
||||
sqlWhereClause += " and instr(lower(l.lotName), ?)";
|
||||
sqlParameters.push(lotNamePiece);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (filters.occupantName) {
|
||||
|
|
@ -36,19 +46,22 @@ export const getLotOccupancies = (filters, options, connectedDatabase) => {
|
|||
if (filters.occupancyTime) {
|
||||
const currentDateString = dateToInteger(new Date());
|
||||
switch (filters.occupancyTime) {
|
||||
case "current":
|
||||
case "current": {
|
||||
sqlWhereClause +=
|
||||
" and o.occupancyStartDate <= ? and (o.occupancyEndDate is null or o.occupancyEndDate >= ?)";
|
||||
sqlParameters.push(currentDateString, currentDateString);
|
||||
break;
|
||||
case "past":
|
||||
}
|
||||
case "past": {
|
||||
sqlWhereClause += " and o.occupancyEndDate < ?";
|
||||
sqlParameters.push(currentDateString);
|
||||
break;
|
||||
case "future":
|
||||
}
|
||||
case "future": {
|
||||
sqlWhereClause += " and o.occupancyStartDate > ?";
|
||||
sqlParameters.push(currentDateString);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (filters.occupancyStartDateString) {
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ interface GetLotOccupanciesFilters {
|
|||
occupantName?: string;
|
||||
occupancyTypeId?: number | string;
|
||||
mapId?: number | string;
|
||||
lotNameSearchType?: "" | "startsWith" | "endsWith";
|
||||
lotName?: string;
|
||||
lotTypeId?: number | string;
|
||||
workOrderId?: number | string;
|
||||
|
|
@ -57,10 +58,18 @@ export const getLotOccupancies = (
|
|||
}
|
||||
|
||||
if (filters.lotName) {
|
||||
const lotNamePieces = filters.lotName.toLowerCase().split(" ");
|
||||
for (const lotNamePiece of lotNamePieces) {
|
||||
sqlWhereClause += " and instr(lower(l.lotName), ?)";
|
||||
sqlParameters.push(lotNamePiece);
|
||||
if (filters.lotNameSearchType === "startsWith") {
|
||||
sqlWhereClause += " and l.lotName like ? || '%'";
|
||||
sqlParameters.push(filters.lotName);
|
||||
} else if (filters.lotNameSearchType === "endsWith") {
|
||||
sqlWhereClause += " and l.lotName like '%' || ?";
|
||||
sqlParameters.push(filters.lotName);
|
||||
} else {
|
||||
const lotNamePieces = filters.lotName.toLowerCase().split(" ");
|
||||
for (const lotNamePiece of lotNamePieces) {
|
||||
sqlWhereClause += " and instr(lower(l.lotName), ?)";
|
||||
sqlParameters.push(lotNamePiece);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -82,21 +91,24 @@ export const getLotOccupancies = (
|
|||
const currentDateString = dateToInteger(new Date());
|
||||
|
||||
switch (filters.occupancyTime) {
|
||||
case "current":
|
||||
case "current": {
|
||||
sqlWhereClause +=
|
||||
" and o.occupancyStartDate <= ? and (o.occupancyEndDate is null or o.occupancyEndDate >= ?)";
|
||||
sqlParameters.push(currentDateString, currentDateString);
|
||||
break;
|
||||
}
|
||||
|
||||
case "past":
|
||||
case "past": {
|
||||
sqlWhereClause += " and o.occupancyEndDate < ?";
|
||||
sqlParameters.push(currentDateString);
|
||||
break;
|
||||
}
|
||||
|
||||
case "future":
|
||||
case "future": {
|
||||
sqlWhereClause += " and o.occupancyStartDate > ?";
|
||||
sqlParameters.push(currentDateString);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import sqlite from "better-sqlite3";
|
||||
import type * as recordTypes from "../../types/recordTypes";
|
||||
interface GetLotsFilters {
|
||||
lotNameSearchType?: "" | "startsWith" | "endsWith";
|
||||
lotName?: string;
|
||||
mapId?: number | string;
|
||||
lotTypeId?: number | string;
|
||||
|
|
|
|||
|
|
@ -10,10 +10,20 @@ export const getLots = (filters, options, connectedDatabase) => {
|
|||
let sqlWhereClause = " where l.recordDelete_timeMillis is null";
|
||||
const sqlParameters = [];
|
||||
if (filters.lotName) {
|
||||
const lotNamePieces = filters.lotName.toLowerCase().split(" ");
|
||||
for (const lotNamePiece of lotNamePieces) {
|
||||
sqlWhereClause += " and instr(lower(l.lotName), ?)";
|
||||
sqlParameters.push(lotNamePiece);
|
||||
if (filters.lotNameSearchType === "startsWith") {
|
||||
sqlWhereClause += " and l.lotName like ? || '%'";
|
||||
sqlParameters.push(filters.lotName);
|
||||
}
|
||||
else if (filters.lotNameSearchType === "endsWith") {
|
||||
sqlWhereClause += " and l.lotName like '%' || ?";
|
||||
sqlParameters.push(filters.lotName);
|
||||
}
|
||||
else {
|
||||
const lotNamePieces = filters.lotName.toLowerCase().split(" ");
|
||||
for (const lotNamePiece of lotNamePieces) {
|
||||
sqlWhereClause += " and instr(lower(l.lotName), ?)";
|
||||
sqlParameters.push(lotNamePiece);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (filters.mapId) {
|
||||
|
|
@ -33,8 +43,7 @@ export const getLots = (filters, options, connectedDatabase) => {
|
|||
sqlWhereClause += " and lotOccupancyCount > 0";
|
||||
}
|
||||
else if (filters.occupancyStatus === "unoccupied") {
|
||||
sqlWhereClause +=
|
||||
" and (lotOccupancyCount is null or lotOccupancyCount = 0)";
|
||||
sqlWhereClause += " and (lotOccupancyCount is null or lotOccupancyCount = 0)";
|
||||
}
|
||||
}
|
||||
if (filters.workOrderId) {
|
||||
|
|
@ -88,12 +97,7 @@ export const getLots = (filters, options, connectedDatabase) => {
|
|||
") o on l.lotId = o.lotId") +
|
||||
sqlWhereClause +
|
||||
" order by userFn_lotNameSortName(l.lotName), l.lotId" +
|
||||
(options
|
||||
? " limit " +
|
||||
options.limit +
|
||||
" offset " +
|
||||
options.offset
|
||||
: ""))
|
||||
(options ? " limit " + options.limit + " offset " + options.offset : ""))
|
||||
.all(sqlParameters);
|
||||
if (options.limit === -1) {
|
||||
count = lots.length;
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import * as configFunctions from "../functions.config.js";
|
|||
import type * as recordTypes from "../../types/recordTypes";
|
||||
|
||||
interface GetLotsFilters {
|
||||
lotNameSearchType?: "" | "startsWith" | "endsWith";
|
||||
lotName?: string;
|
||||
mapId?: number | string;
|
||||
lotTypeId?: number | string;
|
||||
|
|
@ -40,13 +41,22 @@ export const getLots = (
|
|||
const sqlParameters = [];
|
||||
|
||||
if (filters.lotName) {
|
||||
const lotNamePieces = filters.lotName.toLowerCase().split(" ");
|
||||
for (const lotNamePiece of lotNamePieces) {
|
||||
sqlWhereClause += " and instr(lower(l.lotName), ?)";
|
||||
sqlParameters.push(lotNamePiece);
|
||||
if (filters.lotNameSearchType === "startsWith") {
|
||||
sqlWhereClause += " and l.lotName like ? || '%'";
|
||||
sqlParameters.push(filters.lotName);
|
||||
} else if (filters.lotNameSearchType === "endsWith") {
|
||||
sqlWhereClause += " and l.lotName like '%' || ?";
|
||||
sqlParameters.push(filters.lotName);
|
||||
} else {
|
||||
const lotNamePieces = filters.lotName.toLowerCase().split(" ");
|
||||
for (const lotNamePiece of lotNamePieces) {
|
||||
sqlWhereClause += " and instr(lower(l.lotName), ?)";
|
||||
sqlParameters.push(lotNamePiece);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (filters.mapId) {
|
||||
sqlWhereClause += " and l.mapId = ?";
|
||||
sqlParameters.push(filters.mapId);
|
||||
|
|
@ -66,8 +76,7 @@ export const getLots = (
|
|||
if (filters.occupancyStatus === "occupied") {
|
||||
sqlWhereClause += " and lotOccupancyCount > 0";
|
||||
} else if (filters.occupancyStatus === "unoccupied") {
|
||||
sqlWhereClause +=
|
||||
" and (lotOccupancyCount is null or lotOccupancyCount = 0)";
|
||||
sqlWhereClause += " and (lotOccupancyCount is null or lotOccupancyCount = 0)";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -82,25 +91,25 @@ export const getLots = (
|
|||
let count: number;
|
||||
|
||||
if (options.limit !== -1) {
|
||||
count = database
|
||||
.prepare(
|
||||
"select count(*) as recordCount" +
|
||||
" from Lots l" +
|
||||
(" left join (" +
|
||||
"select lotId, count(lotOccupancyId) as lotOccupancyCount" +
|
||||
" from LotOccupancies" +
|
||||
" where recordDelete_timeMillis is null" +
|
||||
" and occupancyStartDate <= " +
|
||||
currentDate +
|
||||
" and (occupancyEndDate is null or occupancyEndDate >= " +
|
||||
currentDate +
|
||||
")" +
|
||||
" group by lotId" +
|
||||
") o on l.lotId = o.lotId") +
|
||||
sqlWhereClause
|
||||
)
|
||||
.get(sqlParameters).recordCount;
|
||||
}
|
||||
count = database
|
||||
.prepare(
|
||||
"select count(*) as recordCount" +
|
||||
" from Lots l" +
|
||||
(" left join (" +
|
||||
"select lotId, count(lotOccupancyId) as lotOccupancyCount" +
|
||||
" from LotOccupancies" +
|
||||
" where recordDelete_timeMillis is null" +
|
||||
" and occupancyStartDate <= " +
|
||||
currentDate +
|
||||
" and (occupancyEndDate is null or occupancyEndDate >= " +
|
||||
currentDate +
|
||||
")" +
|
||||
" group by lotId" +
|
||||
") o on l.lotId = o.lotId") +
|
||||
sqlWhereClause
|
||||
)
|
||||
.get(sqlParameters).recordCount;
|
||||
}
|
||||
|
||||
let lots: recordTypes.Lot[] = [];
|
||||
|
||||
|
|
@ -134,12 +143,7 @@ export const getLots = (
|
|||
") o on l.lotId = o.lotId") +
|
||||
sqlWhereClause +
|
||||
" order by userFn_lotNameSortName(l.lotName), l.lotId" +
|
||||
(options
|
||||
? " limit " +
|
||||
options.limit +
|
||||
" offset " +
|
||||
options.offset
|
||||
: "")
|
||||
(options ? " limit " + options.limit + " offset " + options.offset : "")
|
||||
)
|
||||
.all(sqlParameters);
|
||||
|
||||
|
|
|
|||
|
|
@ -33,38 +33,47 @@
|
|||
<input id="searchFilter--limit" name="limit" type="hidden" value="100" />
|
||||
<input id="searchFilter--offset" name="offset" type="hidden" value="0" />
|
||||
<div class="columns">
|
||||
<div class="column">
|
||||
<div class="field">
|
||||
<label class="label" for="searchFilter--lotName"><%= configFunctions.getProperty("aliases.lot") %></label>
|
||||
<div class="control has-icons-left">
|
||||
<input class="input" id="searchFilter--lotName" name="lotName" accesskey="f" />
|
||||
<span class="icon is-small is-left">
|
||||
<i class="fas fa-search" aria-hidden="true"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="column">
|
||||
<div class="field">
|
||||
<label class="label" for="searchFilter--lotTypeId"><%= configFunctions.getProperty("aliases.lot") %> Type</label>
|
||||
<div class="control has-icons-left">
|
||||
<div class="select is-fullwidth">
|
||||
<select id="searchFilter--lotTypeId" name="lotTypeId">
|
||||
<option value="">(All <%= configFunctions.getProperty("aliases.lot") %> Types)</option>
|
||||
<% for (const lotType of lotTypes) { %>
|
||||
<option value="<%= lotType.lotTypeId %>" <%= (lotType.lotTypeId.toString() === lotTypeId) ? " selected" : "" %>>
|
||||
<%= lotType.lotType || "(No Name)" %>
|
||||
</option>
|
||||
<% } %>
|
||||
</select>
|
||||
<div class="column">
|
||||
<label class="label" for="searchFilter--lotName"><%= configFunctions.getProperty("aliases.lot") %></label>
|
||||
<div class="field has-addons">
|
||||
<div class="control has-icons-left">
|
||||
<div class="select">
|
||||
<select id="selectFilter--lotNameSearchType" name="lotNameSearchType">
|
||||
<option value="">contains</option>
|
||||
<option value="startsWith">starts with</option>
|
||||
<option value="endsWith">ends with</option>
|
||||
</select>
|
||||
</div>
|
||||
<span class="icon is-small is-left">
|
||||
<i class="fas fa-search" aria-hidden="true"></i>
|
||||
</span>
|
||||
</div>
|
||||
<div class="control is-expanded">
|
||||
<input class="input" id="searchFilter--lotName" name="lotName" />
|
||||
</div>
|
||||
</div>
|
||||
<span class="icon is-small is-left">
|
||||
<i class="fas fa-search" aria-hidden="true"></i>
|
||||
</span>
|
||||
</div>
|
||||
<div class="column">
|
||||
<div class="field">
|
||||
<label class="label" for="searchFilter--lotTypeId"><%= configFunctions.getProperty("aliases.lot") %> Type</label>
|
||||
<div class="control has-icons-left">
|
||||
<div class="select is-fullwidth">
|
||||
<select id="searchFilter--lotTypeId" name="lotTypeId">
|
||||
<option value="">(All <%= configFunctions.getProperty("aliases.lot") %> Types)</option>
|
||||
<% for (const lotType of lotTypes) { %>
|
||||
<option value="<%= lotType.lotTypeId %>" <%= (lotType.lotTypeId.toString() === lotTypeId) ? " selected" : "" %>>
|
||||
<%= lotType.lotType || "(No Name)" %>
|
||||
</option>
|
||||
<% } %>
|
||||
</select>
|
||||
</div>
|
||||
<span class="icon is-small is-left">
|
||||
<i class="fas fa-search" aria-hidden="true"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="columns">
|
||||
<div class="column">
|
||||
<div class="field">
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
</nav>
|
||||
|
||||
<h1 class="title is-1">
|
||||
Find an <%= configFunctions.getProperty("aliases.occupancy") %> Record
|
||||
Find an <%= configFunctions.getProperty("aliases.occupancy") %> Record
|
||||
</h1>
|
||||
|
||||
<% if (user.userProperties.canUpdate) { %>
|
||||
|
|
@ -34,110 +34,117 @@
|
|||
<% } %>
|
||||
|
||||
<div class="box">
|
||||
<form id="form--searchFilters">
|
||||
<input id="searchFilter--limit" name="limit" type="hidden" value="100" />
|
||||
<input id="searchFilter--offset" name="offset" type="hidden" value="0" />
|
||||
<div class="columns">
|
||||
<div class="column">
|
||||
<div class="field">
|
||||
<label class="label" for="searchFilter--occupantName"><%= configFunctions.getProperty("aliases.occupant") %> Name</label>
|
||||
<div class="control has-icons-left">
|
||||
<input class="input" id="searchFilter--occupantName" name="occupantName" accesskey="f" />
|
||||
<span class="icon is-small is-left">
|
||||
<i class="fas fa-search" aria-hidden="true"></i>
|
||||
</span>
|
||||
<form id="form--searchFilters">
|
||||
<input id="searchFilter--limit" name="limit" type="hidden" value="100" />
|
||||
<input id="searchFilter--offset" name="offset" type="hidden" value="0" />
|
||||
<div class="columns">
|
||||
<div class="column">
|
||||
<div class="field">
|
||||
<label class="label" for="searchFilter--occupantName"><%= configFunctions.getProperty("aliases.occupant") %> Name</label>
|
||||
<div class="control has-icons-left">
|
||||
<input class="input" id="searchFilter--occupantName" name="occupantName" accesskey="f" />
|
||||
<span class="icon is-small is-left">
|
||||
<i class="fas fa-search" aria-hidden="true"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="column">
|
||||
<div class="field">
|
||||
<label class="label" for="searchFilter--occupancyTypeId"><%= configFunctions.getProperty("aliases.occupancy") %> Type</label>
|
||||
<div class="control has-icons-left">
|
||||
<div class="select is-fullwidth">
|
||||
<select id="searchFilter--occupancyTypeId" name="occupancyTypeId">
|
||||
<option value="">(All <%= configFunctions.getProperty("aliases.occupancy") %> Types)</option>
|
||||
<% for (const occupancyType of occupancyTypes) { %>
|
||||
<option value="<%= occupancyType.occupancyTypeId %>"><%= occupancyType.occupancyType %></option>
|
||||
<% } %>
|
||||
</select>
|
||||
</div>
|
||||
<span class="icon is-small is-left">
|
||||
<i class="fas fa-search" aria-hidden="true"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="column">
|
||||
<div class="field">
|
||||
<label class="label" for="searchFilter--occupancyTime"><%= configFunctions.getProperty("aliases.occupancy") %> Time</label>
|
||||
<div class="control has-icons-left">
|
||||
<div class="select is-fullwidth">
|
||||
<select id="searchFilter--occupancyTime" name="occupancyTime">
|
||||
<option value="">(All Times)</option>
|
||||
<option value="current" selected>Current</option>
|
||||
<option value="past">Past</option>
|
||||
<option value="future">Future</option>
|
||||
</select>
|
||||
</div>
|
||||
<span class="icon is-small is-left">
|
||||
<i class="fas fa-search" aria-hidden="true"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="column">
|
||||
<div class="field">
|
||||
<label class="label" for="searchFilter--occupancyTypeId"><%= configFunctions.getProperty("aliases.occupancy") %> Type</label>
|
||||
<div class="columns">
|
||||
<div class="column">
|
||||
<div class="field">
|
||||
<label class="label" for="searchFilter--mapId"><%= configFunctions.getProperty("aliases.map") %></label>
|
||||
<div class="control has-icons-left">
|
||||
<div class="select is-fullwidth">
|
||||
<select id="searchFilter--mapId" name="mapId">
|
||||
<option value="">(All <%= configFunctions.getProperty("aliases.maps") %>)</option>
|
||||
<% for (const map of maps) { %>
|
||||
<option value="<%= map.mapId %>" <%= (map.mapId.toString() === mapId) ? " selected" : "" %>>
|
||||
<%= map.mapName || "(No Name)" %>
|
||||
</option>
|
||||
<% } %>
|
||||
</select>
|
||||
</div>
|
||||
<span class="icon is-small is-left">
|
||||
<i class="fas fa-search" aria-hidden="true"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="column">
|
||||
<div class="field">
|
||||
<label class="label" for="searchFilter--lotTypeId"><%= configFunctions.getProperty("aliases.lot") %> Type</label>
|
||||
<div class="control has-icons-left">
|
||||
<div class="select is-fullwidth">
|
||||
<select id="searchFilter--occupancyTypeId" name="occupancyTypeId">
|
||||
<option value="">(All <%= configFunctions.getProperty("aliases.occupancy") %> Types)</option>
|
||||
<% for (const occupancyType of occupancyTypes) { %>
|
||||
<option value="<%= occupancyType.occupancyTypeId %>"><%= occupancyType.occupancyType %></option>
|
||||
<% } %>
|
||||
</select>
|
||||
<select id="searchFilter--lotTypeId" name="lotTypeId">
|
||||
<option value="">(All <%= configFunctions.getProperty("aliases.lot") %> Types)</option>
|
||||
<% for (const lotType of lotTypes) { %>
|
||||
<option value="<%= lotType.lotTypeId %>"><%= lotType.lotType %></option>
|
||||
<% } %>
|
||||
</select>
|
||||
</div>
|
||||
<span class="icon is-small is-left">
|
||||
<i class="fas fa-search" aria-hidden="true"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="column">
|
||||
<div class="field">
|
||||
<label class="label" for="searchFilter--occupancyTime"><%= configFunctions.getProperty("aliases.occupancy") %> Time</label>
|
||||
<div class="control has-icons-left">
|
||||
<div class="select is-fullwidth">
|
||||
<select id="searchFilter--occupancyTime" name="occupancyTime">
|
||||
<option value="">(All Times)</option>
|
||||
<option value="current" selected>Current</option>
|
||||
<option value="past">Past</option>
|
||||
<option value="future">Future</option>
|
||||
</select>
|
||||
</div>
|
||||
<span class="icon is-small is-left">
|
||||
<i class="fas fa-search" aria-hidden="true"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="columns">
|
||||
<div class="column">
|
||||
<div class="field">
|
||||
<label class="label" for="searchFilter--mapId"><%= configFunctions.getProperty("aliases.map") %></label>
|
||||
<div class="control has-icons-left">
|
||||
<div class="select is-fullwidth">
|
||||
<select id="searchFilter--mapId" name="mapId">
|
||||
<option value="">(All <%= configFunctions.getProperty("aliases.maps") %>)</option>
|
||||
<% for (const map of maps) { %>
|
||||
<option value="<%= map.mapId %>" <%= (map.mapId.toString() === mapId) ? " selected" : "" %>>
|
||||
<%= map.mapName || "(No Name)" %>
|
||||
</option>
|
||||
<% } %>
|
||||
</select>
|
||||
</div>
|
||||
<span class="icon is-small is-left">
|
||||
<i class="fas fa-search" aria-hidden="true"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="column">
|
||||
<div class="field">
|
||||
<label class="label" for="searchFilter--lotName"><%= configFunctions.getProperty("aliases.lot") %></label>
|
||||
<label class="label" for="searchFilter--lotName"><%= configFunctions.getProperty("aliases.lot") %></label>
|
||||
<div class="field has-addons">
|
||||
<div class="control has-icons-left">
|
||||
<div class="select">
|
||||
<select id="selectFilter--lotNameSearchType" name="lotNameSearchType">
|
||||
<option value="">contains</option>
|
||||
<option value="startsWith">starts with</option>
|
||||
<option value="endsWith">ends with</option>
|
||||
</select>
|
||||
</div>
|
||||
<span class="icon is-small is-left">
|
||||
<i class="fas fa-search" aria-hidden="true"></i>
|
||||
</span>
|
||||
</div>
|
||||
<div class="control is-expanded">
|
||||
<input class="input" id="searchFilter--lotName" name="lotName" />
|
||||
<span class="icon is-small is-left">
|
||||
<i class="fas fa-search" aria-hidden="true"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="column">
|
||||
<div class="field">
|
||||
<label class="label" for="searchFilter--lotTypeId"><%= configFunctions.getProperty("aliases.lot") %> Type</label>
|
||||
<div class="control has-icons-left">
|
||||
<div class="select is-fullwidth">
|
||||
<select id="searchFilter--lotTypeId" name="lotTypeId">
|
||||
<option value="">(All <%= configFunctions.getProperty("aliases.lot") %> Types)</option>
|
||||
<% for (const lotType of lotTypes) { %>
|
||||
<option value="<%= lotType.lotTypeId %>"><%= lotType.lotType %></option>
|
||||
<% } %>
|
||||
</select>
|
||||
</div>
|
||||
<span class="icon is-small is-left">
|
||||
<i class="fas fa-search" aria-hidden="true"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div id="container--searchResults"></div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue