update category
This commit is contained in:
@@ -72,6 +72,9 @@ func (r *CategoryRepositoryImpl) List(ctx context.Context, filters map[string]in
|
||||
case "search":
|
||||
searchValue := "%" + value.(string) + "%"
|
||||
query = query.Where("name ILIKE ? OR description ILIKE ?", searchValue, searchValue)
|
||||
case "outlet_id":
|
||||
// Include outlet-specific categories AND global categories (outlet_id IS NULL)
|
||||
query = query.Where("outlet_id = ? OR outlet_id IS NULL", value)
|
||||
default:
|
||||
query = query.Where(key+" = ?", value)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user