mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-15 20:30:33 +00:00
BIG-58: add starts/ends with comparator option to advanced filter dropdown.
This commit is contained in:
@@ -255,6 +255,17 @@ export default abstract class DynamicFilterAbstructor
|
||||
return (builder) => {
|
||||
builder.whereNot(comparatorColumn, 'LIKE', `%${role.value}%`);
|
||||
};
|
||||
case COMPARATOR_TYPE.STARTS_WITH:
|
||||
case COMPARATOR_TYPE.START_WITH:
|
||||
return (builder) => {
|
||||
builder.where(comparatorColumn, 'LIKE', `${role.value}%`);
|
||||
};
|
||||
case COMPARATOR_TYPE.ENDS_WITH:
|
||||
case COMPARATOR_TYPE.END_WITH:
|
||||
return (builder) => {
|
||||
builder.where(comparatorColumn, 'LIKE', `%${role.value}`);
|
||||
};
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -24,6 +24,12 @@ export const COMPARATOR_TYPE = {
|
||||
AFTER: 'after',
|
||||
BEFORE: 'before',
|
||||
IN: 'in',
|
||||
|
||||
STARTS_WITH: 'starts_with',
|
||||
START_WITH: 'start_with',
|
||||
|
||||
ENDS_WITH: 'ends_with',
|
||||
END_WITH: 'end_with'
|
||||
};
|
||||
|
||||
export const FIELD_TYPE = {
|
||||
|
||||
Reference in New Issue
Block a user