serenity-is / Serenity

Business Apps Made Simple with Asp.Net Core MVC / TypeScript
https://serenity.is
MIT License
2.57k stars 796 forks source link

[Bug report]: Cannot change filter criteria back to 'and' after changing to 'or' #7174

Closed edwardch closed 4 weeks ago

edwardch commented 4 weeks ago

Before submitting the bug report, please read and check the following items

What happened?

When building a custom filter (using the "edit filter" link from the bottom right of a grid), I can add multiple criteria to filter on. If I toggle the and to an or, I cannot change the or back to and.

What did you expect to happen?

I should be able to change between or and and freely on the FilterDialog.

How to reproduce?

  1. Navigate to https://demo.serenity.is/Northwind/Customer
  2. Click "edit filter" on the bottom right of the grid
  3. Select "Company name" and give it a value
  4. Click "add criteria"
  5. Click the "and" text to change it to "or"
  6. Click the "or" text to try to change it back to "and"

What Serenity Nuget Versions are you seeing the problem on? (separated by comma)

8.5.x (Latest Demo)

Relevant log output

No response

Serene template version

8.5.5

Sergen version

No response

Code editor

Visual Studio 2022

Operating System

Windows 11

Node.js version

v18.18.0

TypeScript version

No response

Database type and version

SQL Server

On which device do you see the problem?

Desktop

On which operating system do you see the problem?

Windows (11)

On which browsers do you see the problem?

Firefox, Microsoft Edge

On what version of the browsers do you see the problem?

Latest

Additional information

The text changes from lowercase "and" to "Or" I suspect it is case sensitive and needs to change to "or". If I click OK and let the grid filter, then open the saved filter (from the bottom left of the grid), it pops up showing lowercase "or". If I click this "or", it changes to "Or", with a capital...

https://github.com/serenity-is/Serenity/blob/43caad382137ffbe02bca488f56d93e25cdefa23/packages/corelib/src/ui/filtering/filterpanel.ts#L496

VictorTomaili commented 4 weeks ago

Fixed, this is only a text issue https://github.com/serenity-is/Serenity/blob/53735f43be36bf1d280c0252907dbac6d55c315f/packages/corelib/src/ui/filtering/filterpanel.ts#L496