Skip to content

feat: add date from/to filter to mail archive listing - #151

Merged
shyim merged 2 commits into
mainfrom
cursor/add-date-filter-ecd8
Sep 21, 2026
Merged

shyim merged 2 commits into
mainfrom
cursor/add-date-filter-ecd8

Conversation

@shyim

@shyim shyim commented Sep 21, 2026

Copy link
Copy Markdown
Member

Closes #144

What

Adds a date range filter (from – to) to the filter sidebar of the mail archive listing, so archived mails can be filtered by their sent date (createdAt).

How

  • Two new sw-datepicker fields (dateType="date") in the filter sidebar, using the same deprecated compatibility pattern as the existing fields, so the module keeps working on Shopware 6.6 and 6.7
  • The selected dates are normalized to local day boundaries (from → 00:00:00.000, to → 23:59:59.999) and applied as a Criteria.range('createdAt', { gte, lte }) filter — the same approach Shopware core uses in its own sw-date-filter
  • Both values only filter when set, so filtering by only "from" or only "to" works as well
  • The new filter values participate in the existing URL query persistence (saveFilters/updateData), so filtered views stay shareable via URL
  • New snippets dateFrom / dateTo for en-GB and de-DE

Also fixed

  • The Reset filter button previously did not reset the transport state filter (the key was missing from the reset object); it now restores the full filter shape including the new date fields

Testing

  • Snippet JSON validity and en-GB/de-DE key parity verified (matches the check-snippets CI workflow)
  • Component JS syntax verified
  • sw-datepicker wrapper API (v-model:value, deprecated prop, emitted value format) verified against the Shopware 6.7 core sources
Open in Web Open in Cursor 

Adds two date pickers to the filter sidebar of the mail archive
listing to filter mails by their sent date (createdAt) within a
from-to range. The selected dates are normalized to local day
boundaries (00:00:00 - 23:59:59.999) and applied as a range filter.

Also resets the transport state filter when using the reset filter
button, as it was previously kept.

Closes #144

Co-authored-by: xai <xai@shyim.de>
@shyim

shyim commented Sep 21, 2026

Copy link
Copy Markdown
Member Author

@frosh-ci create-instance

@frosh-automation

Copy link
Copy Markdown
Contributor

Hey 👋,

I have created for you a Shopware installation with the current changes made here.

You can access the Shop here: https://bfe5deo-2a6h5nb2dmuf8.zrh2.namespaced.app

The URL is only for FriendsOfShopware members.

@shyim

shyim commented Sep 21, 2026

Copy link
Copy Markdown
Member Author

@frosh-ci format-cs

@shyim

shyim commented Sep 21, 2026

Copy link
Copy Markdown
Member Author

@frosh-ci fix-cs

@frosh-automation

Copy link
Copy Markdown
Contributor

Code style has been fixed and pushed to the branch.

@shyim
shyim marked this pull request as ready for review September 21, 2026 02:52
@shyim
shyim merged commit 5f9b502 into main Sep 21, 2026
4 checks passed
@shyim
shyim deleted the cursor/add-date-filter-ecd8 branch September 21, 2026 02:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

date filter (from - to)

2 participants