kopia lustrzana https://github.com/FacilMap/facilmap
Add lower() function to filter for case-insensitive comparison
rodzic
cc81bbdcba
commit
51ef12f9fe
|
@ -45,13 +45,13 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>typeId</code></td>
|
<td><code>typeId</code></td>
|
||||||
<td><span v-for="(type, idx) in types"><span v-if="idx != 0"> / </span> <code>{{type.id}}</code> ({{type.name}})</span></td>
|
<td><span v-for="(type, idx) in types"><span v-if="idx != 0"> / </span> <code>{{type.id}}</code> ({{type.name}})</span></td>
|
||||||
<td><code>typeId == 1</code></td>
|
<td><code>typeId == {{types[0].id || 1}}</code></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>data.<field></code> / <code>prop(data, <field>)</code></td>
|
<td><code>data.<field></code> / <code>prop(data, <field>)</code></td>
|
||||||
<td>Field values (example: <code>data.Description</code> or <code>prop(data, "Description")</code></td>
|
<td>Field values (example: <code>data.Description</code> or <code>prop(data, "Description")</code></td>
|
||||||
<td><code>data.Description ~= "camp"</code></td>
|
<td><code>lower(data.Description) ~= "camp"</code></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -180,6 +180,12 @@
|
||||||
<td><code>name ~= "^[Cc]amp$"</code></td>
|
<td><code>name ~= "^[Cc]amp$"</code></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td><code>lower()</code></td>
|
||||||
|
<td>Convert to lower case</td>
|
||||||
|
<td><code>lower(name) ~= "untitled"</code></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>ceil()</code>, <code>floor()</code>, <code>round()</code></td>
|
<td><code>ceil()</code>, <code>floor()</code>, <code>round()</code></td>
|
||||||
<td>Round (<code>ceil</code>: up, <code>floor</code>: down)</td>
|
<td>Round (<code>ceil</code>: up, <code>floor</code>: down)</td>
|
||||||
|
|
|
@ -9,7 +9,14 @@ const customFuncs = {
|
||||||
return obj && getProperty(obj, key);
|
return obj && getProperty(obj, key);
|
||||||
},
|
},
|
||||||
|
|
||||||
random() { } // Does not work well with angular digest cycles
|
random() { }, // Does not work well with angular digest cycles
|
||||||
|
|
||||||
|
lower(obj: any) {
|
||||||
|
if (typeof obj == "string")
|
||||||
|
return obj.toLowerCase();
|
||||||
|
else
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export function filterHasError(expr: string): Error | undefined {
|
export function filterHasError(expr: string): Error | undefined {
|
||||||
|
|
Ładowanie…
Reference in New Issue