iachat/app/views/public/api/v1/portals
Pranav d79d9e8b46
fix: Include uncategorized articles in the all article section to allow edit/delete (#10153)
Fixes https://github.com/chatwoot/chatwoot/issues/9935
Fixes https://github.com/chatwoot/chatwoot/issues/8213

The articles were grouped by category, with locale being a derived
attribute from the category. If a category was deleted, the article
wouldn't appear on the dashboard. However, due to a bug, it would show
up in the uncategorized section on the public portal, leaving agents
unable to edit or update the article.

To address this issue, I've added a locale attribute directly to the
article. This attribute is automatically set from the category or the
portal's default locale if not supplied. The API parameters now use this
attribute to filter articles. As a result, the dashboard will display
articles even if they're not associated with a category, improving the
overall workflow.

**Main updates:** 
- Add locale attribute to the Article model. Add db migration to back
fill the data based on the above logic.
- Add a new scope search_by_locale and use it instead of
search_by_category_locale.
- Update the ERB template to include the locale filter.
- Move from `joins` to `left_outer_joins` to include the articles with
no categories.

---------

Co-authored-by: Sojan <sojan@pepalo.com>
2024-09-23 23:39:03 -07:00
..
articles fix: Removed author section from public help center (#8767) 2024-01-25 17:17:16 +05:30
categories fix: Removed author section from public help center (#8767) 2024-01-25 17:17:16 +05:30
error feat: Update public portal colors with new design (#8230) 2023-11-23 08:16:52 +05:30
_article_count.html.erb fix: Fix i18n issues with help center (#6559) 2023-02-27 17:45:57 -08:00
_authors.html.erb fix: Undefined method `name' for nil:NilClass (#8562) 2023-12-15 09:03:16 +05:30
_category-block.html.erb feat: Author sections in category block and category list (#8414) 2023-11-27 15:13:38 +05:30
_featured_articles.html.erb feat: Author sections in category block and category list (#8414) 2023-11-27 15:13:38 +05:30
_footer.html.erb feat: Updates branding logo and name in public portal footer (#8745) 2024-01-19 13:37:24 +04:00
_header.html.erb fix: Locale not correct in root url when accessing help center with custom domain (#9110) 2024-03-19 18:48:59 +05:30
_hero.html.erb feat: Update public portal colors with new design (#8230) 2023-11-23 08:16:52 +05:30
_thumbnail.html.erb feat: Author sections in category block and category list (#8414) 2023-11-27 15:13:38 +05:30
_uncategorized-block.html.erb feat: Update public portal colors with new design (#8230) 2023-11-23 08:16:52 +05:30
index.json.jbuilder feat: Sort articles based on views (#7599) 2023-07-24 20:27:43 -07:00
show.html.erb fix: Include uncategorized articles in the all article section to allow edit/delete (#10153) 2024-09-23 23:39:03 -07:00
show.json.jbuilder feat: Sort articles based on views (#7599) 2023-07-24 20:27:43 -07:00
sitemap.xml.erb feat: add sitemap for help center (#9280) 2024-04-26 21:36:39 +05:30