Commit 86447ce
feat: add bulk messages history table with status counts (#898)
* feat: add bulk messages history table with status counts
- Add GET /v1/bulk-messages endpoint that returns the last 10 bulk
message batches for the authenticated user
- Add optimized SQL query using GROUP BY and FILTER to aggregate
status counts (scheduled, pending, sent, delivered, failed) from
millions of messages
- Add Vuetify data table on /bulk-messages page showing history
- Add View action that navigates to /search-messages with the
bulk message ID pre-filled as a query parameter
- Update search-messages page to read ?query= URL param and
auto-fill + auto-search on page load
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* refactor: use StartWithLogger in GetBulkMessages
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: add error notification for bulk messages history fetch
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Generate swagger docs and models
* fix: address PR review comments
- Fix double-search CAPTCHA conflict by adding initialLoadComplete guard
to prevent the options watcher from firing before mounted completes
- Fix nil slice serializing as null by using make() for empty slice init
- Regenerate swagger docs to match actual type names
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* refactor: use v-simple-table for bulk message history
Replace v-data-table with v-simple-table to match the pattern used
in the settings page. Added a short description paragraph explaining
what the table shows.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: handle phone numbers without + prefix and fix CSV SendTime parsing
- Add + prefix normalization in validateMessages before phonenumbers.Parse
- Change SendTime from *time.Time to string (SendTimeRaw) for CSV unmarshaling
- Add GetSendTime() method that parses multiple date formats gracefully
- Empty SendTime fields no longer cause 'Cannot read contents' errors
- Support RFC3339, YYYY-MM-DDTHH:MM:SS, YYYY-MM-DD HH:MM:SS, YYYY-MM-DD formats
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: add expired count to bulk messages history table
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* revert: remove + prefix normalization in phone number validation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: increase search query max length from 20 to 50 characters
Allows searching by bulk message IDs (e.g. bulk-8dcc3d68-57bd-4913-a5ff-52c107ffc0c9)
which are 41 characters long.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* test: add bulk SMS integration tests for CSV and Excel upload
- TestBulkSMS_CSV: uploads CSV with 1 message, fires SENT event, verifies history
- TestBulkSMS_Excel: uploads Excel with 2 messages, fires DELIVERED on one, verifies mixed status counts
- Add shared helpers: uploadBulkFile, fetchBulkMessages, searchMessages, findBulkEntry
- Add excelize/v2 dependency for Excel file creation in tests
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: use correct query params for message index endpoint in integration tests
The searchMessages helper was using 'owners' (plural) param and missing 'contact',
but the GET /v1/messages endpoint requires 'owner' (singular) and 'contact' fields.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: correct expected status in TestBulkSMS_Excel assertion
Message 2 transitions to 'scheduled' after waitForFCMPush, not 'pending'.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* chore: remove old heartbeats index drop code
The old indexes (owner_1_timestamp_-1, user_id_1) have already been dropped
in production, so this migration code is no longer needed.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent d85234a commit 86447ce
23 files changed
Lines changed: 7325 additions & 5977 deletions
File tree
- api
- docs
- pkg
- entities
- handlers
- repositories
- requests
- responses
- services
- validators
- tests
- web
- models
- pages
- bulk-messages
- search-messages
- store
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
147 | 185 | | |
148 | 186 | | |
149 | 187 | | |
| |||
1759 | 1797 | | |
1760 | 1798 | | |
1761 | 1799 | | |
| 1800 | + | |
| 1801 | + | |
| 1802 | + | |
| 1803 | + | |
| 1804 | + | |
| 1805 | + | |
1762 | 1806 | | |
1763 | 1807 | | |
1764 | 1808 | | |
| |||
3299 | 3343 | | |
3300 | 3344 | | |
3301 | 3345 | | |
| 3346 | + | |
| 3347 | + | |
| 3348 | + | |
| 3349 | + | |
| 3350 | + | |
| 3351 | + | |
| 3352 | + | |
| 3353 | + | |
| 3354 | + | |
| 3355 | + | |
| 3356 | + | |
| 3357 | + | |
| 3358 | + | |
| 3359 | + | |
| 3360 | + | |
| 3361 | + | |
| 3362 | + | |
| 3363 | + | |
| 3364 | + | |
| 3365 | + | |
| 3366 | + | |
| 3367 | + | |
| 3368 | + | |
| 3369 | + | |
| 3370 | + | |
| 3371 | + | |
| 3372 | + | |
| 3373 | + | |
| 3374 | + | |
| 3375 | + | |
| 3376 | + | |
| 3377 | + | |
| 3378 | + | |
| 3379 | + | |
| 3380 | + | |
| 3381 | + | |
| 3382 | + | |
| 3383 | + | |
| 3384 | + | |
| 3385 | + | |
| 3386 | + | |
| 3387 | + | |
| 3388 | + | |
| 3389 | + | |
| 3390 | + | |
| 3391 | + | |
| 3392 | + | |
3302 | 3393 | | |
3303 | 3394 | | |
3304 | 3395 | | |
| |||
4599 | 4690 | | |
4600 | 4691 | | |
4601 | 4692 | | |
| 4693 | + | |
| 4694 | + | |
| 4695 | + | |
| 4696 | + | |
| 4697 | + | |
| 4698 | + | |
| 4699 | + | |
| 4700 | + | |
| 4701 | + | |
| 4702 | + | |
| 4703 | + | |
| 4704 | + | |
| 4705 | + | |
| 4706 | + | |
| 4707 | + | |
| 4708 | + | |
| 4709 | + | |
| 4710 | + | |
| 4711 | + | |
| 4712 | + | |
| 4713 | + | |
| 4714 | + | |
| 4715 | + | |
| 4716 | + | |
4602 | 4717 | | |
4603 | 4718 | | |
4604 | 4719 | | |
| |||
0 commit comments