mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 22:30:31 +00:00
BIG-58: add starts/ends with comparator option to advanced filter dropdown.
This commit is contained in:
@@ -29,6 +29,8 @@ export const getTextCompatators = () => [
|
|||||||
{ value: 'not_contain', label: intl.get('not_contain') },
|
{ value: 'not_contain', label: intl.get('not_contain') },
|
||||||
{ value: 'equal', label: intl.get('equals') },
|
{ value: 'equal', label: intl.get('equals') },
|
||||||
{ value: 'not_equal', label: intl.get('not_equals') },
|
{ value: 'not_equal', label: intl.get('not_equals') },
|
||||||
|
{ value: 'starts_with', label: intl.get('starts_with') },
|
||||||
|
{ value: 'ends_with', label: intl.get('ends_with') },
|
||||||
];
|
];
|
||||||
|
|
||||||
export const getDateCompatators = () => [
|
export const getDateCompatators = () => [
|
||||||
|
|||||||
@@ -209,6 +209,8 @@
|
|||||||
"not_equal": "ليس متساوي",
|
"not_equal": "ليس متساوي",
|
||||||
"contain": "يحتوي",
|
"contain": "يحتوي",
|
||||||
"not_contain": "لا يحتوي",
|
"not_contain": "لا يحتوي",
|
||||||
|
"starts_with": "يبدأ بـ",
|
||||||
|
"ends_with": "ينتهي بـ",
|
||||||
"cash": "النقدية",
|
"cash": "النقدية",
|
||||||
"accrual": "الاستحقاق",
|
"accrual": "الاستحقاق",
|
||||||
"from": "من",
|
"from": "من",
|
||||||
|
|||||||
@@ -202,6 +202,8 @@
|
|||||||
"not_equal": "Not Equal",
|
"not_equal": "Not Equal",
|
||||||
"contain": "Contain",
|
"contain": "Contain",
|
||||||
"not_contain": "Not Contain",
|
"not_contain": "Not Contain",
|
||||||
|
"starts_with": "Starts with",
|
||||||
|
"ends_with": "Ends with",
|
||||||
"cash": "Cash",
|
"cash": "Cash",
|
||||||
"accrual": "Accrual",
|
"accrual": "Accrual",
|
||||||
"from": "From",
|
"from": "From",
|
||||||
|
|||||||
@@ -255,6 +255,17 @@ export default abstract class DynamicFilterAbstructor
|
|||||||
return (builder) => {
|
return (builder) => {
|
||||||
builder.whereNot(comparatorColumn, 'LIKE', `%${role.value}%`);
|
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',
|
AFTER: 'after',
|
||||||
BEFORE: 'before',
|
BEFORE: 'before',
|
||||||
IN: 'in',
|
IN: 'in',
|
||||||
|
|
||||||
|
STARTS_WITH: 'starts_with',
|
||||||
|
START_WITH: 'start_with',
|
||||||
|
|
||||||
|
ENDS_WITH: 'ends_with',
|
||||||
|
END_WITH: 'end_with'
|
||||||
};
|
};
|
||||||
|
|
||||||
export const FIELD_TYPE = {
|
export const FIELD_TYPE = {
|
||||||
|
|||||||
Reference in New Issue
Block a user