Project

General

Profile

Edit Copy Actions

Feature #11712

open

[FAQ] Dynamic FAQ management and storefront FAQ page

Added by Yalavarthi Thriveni 7 days ago. Updated 2 days ago.

Status:
Resolved
Priority:
Normal
Assignee:
Start date:
10/30/2026
Due date:
10/31/2026 (2 days late)
% Done:

100%

Estimated time:
12:00 h
Spent time:

Description

Each company manages its own FAQ categories and questions from the admin panel. The storefront shows them on a FAQ page with category filter, search, "Was this helpful?" votes and a help form on the right side. Data is stored in the tenant's own database, so no tenantId field is needed. Collections: faq_categories, faqs, faq_enquiries. New tenants get default FAQs (US or India template) when they are provisioned.
Done when:
• Admin can create, edit, reorder and publish FAQs and categories.
• Customer sees only published FAQs on the storefront and can search and vote.
• Help form submissions reach the admin inbox and email notification.
• A newly onboarded company already has default FAQs.

API Summary
1.GET, POST -/api/admin/faq-categories - Admin, Manager
2.PATCH, DELETE - /api/admin/faq-categories/:id - Admin, Manager
3.GET, POST - /api/admin/faqs - Admin, Manager
4.GET, PATCH, DELETE - /api/admin/faqs/:id - Admin, Manager
5.PATCH - /api/admin/faqs/reorder - Admin, Manager
6.PATCH - /api/admin/faqs/:id/publish - Admin, Manager
7.GET - /api/faqs - Public
8.POST - /api/faqs/:id/feedback - Public
9.POST - /api/faq-enquiries - Public
10.GET, PATCH - /api/admin/faq-enquiries - Admin, Manager


Files


Add

Subtasks


Add

Related issues

Actions #1

Updated by Yalavarthi Thriveni 7 days ago

Actions #2

Updated by Ajit A 3 days ago

  • Status changed from New to In Progress

Updated by Ajit A 2 days ago

  • Due date set to 10/31/2026
  • Start date changed from 10/26/2026 to 10/30/2026
  • % Done changed from 0 to 70
  • Estimated time changed from 8:00 h to 12:00 h

Bug or feature: FAQ Module Implementation, Navigation Flyout Visibility, and Route Modernization Fix:

Backend Model & Route Mounting:

Implemented FAQ categories, FAQ items, helpful feedback votes, and customer enquiries schemas in models/nursery/.
Registered and exported getFaqModel, getFaqCategoryModel, getFaqVoteModel, and getFaqEnquiryModel in

dbUtils.js
with multi-tenant database connection pooling.
Mounted faq.route.js into shop.route.js under /api/v1/nus-shop and expanded adminAuth middleware authorization roles (admin, super_admin, superadmin, super-admin, manager, owner, staff).
Implemented automated seeder (seedDefaultFaqs.js) to provision standard eCommerce default FAQ categories and questions.
Admin Frontend (evergreen_pos_fe):

Modernized routes from /ecom/faqs, /ecom/faq-categories, and /ecom/faq-enquiries to /faqs, /faq-categories, and /faq-enquiries, maintaining backwards-compatible aliases in

router.link.tsx
.
Resolved intermittent disappearance of FAQ module items under the "Trust" sidebar section in

Sidebar/index.tsx
by strengthening catalogOwnsMenu merge logic and dynamic screen whitelist in

dynamicMenu.tsx
.
Updated

roleMenuAccess.ts
and

RbacContext.tsx
to prevent race conditions during initial RBAC access resolution.
Fixed Ant Design console warnings in

FaqFormModal.tsx
(dropdownRender -> popupRender and single-child requirement in <Form.Item name="answer">).
Fixed table DOM nesting in

EcommerceAdminShell.tsx
and updated deprecated dropdownMatchSelectWidth in

WarehouseOverviewDashboard.tsx
.
Storefront Web Application (evergreenpos_E-commerce_new):

Integrated customer-facing FAQ centre with category tabs, collapsible accordions, helpfulness vote tracking, and live search.
Created customer enquiry help form with client-side validation, rate limiting, and honeypot bot defense.
Connected Order Details help card directly to FAQ lookup via /faq?orderId=....
Added verbatim module syntax compliance and HTML sanitization for FAQ answers.

Updated by Ajit A 2 days ago

1. Safety & Regressions Analysis
evergreen_pos_be (Backend):

faq.service.js: Removed the .filter(cat => cat.faqs.length > 0) constraint so newly created categories appear on the storefront even before FAQs are published. This is safe and expected because categories with zero FAQs will display a clean empty state or allow filtering without crashes.
faqValidation.js: Reduced minimum message length from 5 to 3 characters for the customer help form. This prevents valid short queries (such as "why", "help", "order") from being rejected.
Risk: Negligible. All tenant boundaries, honeypots, rate limiters, and schema protections remain strictly enforced.
evergreen_pos_fe (Admin Frontend):

Sidebar/index.tsx: Added FAQ Categories (/faq-categories) under the Trust section next to Store FAQs and FAQ Enquiries.
FaqCategoriesPage.tsx: Redesigned the Add/Edit Category modal with pixel-perfect alignment to the wireframe (custom border styling, inline active switch, cancel/save button states).
Risk: None. Uses established design tokens and existing router bindings.
evergreenpos_E-commerce_new (Storefront):

api.ts & faqApi.ts: Exported api default and used type-only imports (import type { ... }) to avoid Vite runtime module export resolution errors.
FaqPage.tsx & FaqAccordion.tsx: Integrated live/static mapping, single-open accordion behavior with Lucide <ChevronDown /> rotation, clean mobile navigation (removed redundant back/title header), elevated the floating "Ask a Question" button (bottom-20), and tightened the vertical gap between search bar and questions.
Risk: Low. If backend is unreachable or empty,

faqDataMapper.ts
safely backfills store-aware defaults.
2. Redmine Task Update
Bug or feature: E-commerce FAQ Module - Live/Static Data Mapping, Admin Category CRUD & Responsive UX Fixes Fix:

Dynamic Storefront Data Mapping & Fallback:
Implemented faqDataMapper.ts to dynamically map live backend FAQs with fallback store-aware defaults (incorporating store pickup, free delivery minimums, company contact info, and rewards points).
Ensured all active categories from the database appear immediately on the storefront pill bar.
Decoupled type exports into faq.types.ts with explicit type-only imports to resolve Vite/esbuild module resolution errors.
Storefront Responsive UI & Mobile UX:
Updated FaqAccordion.tsx to enforce single-open expansion behavior and replaced plaintext arrows with animated Lucide ChevronDown icons.
Removed duplicate in-page mobile headers and local breadcrumbs in FaqPage.tsx, allowing the global Header.tsx and AutoBreadcrumbs.tsx to handle top navigation cleanly.
Tightened vertical spacing between search input and accordion items.
Elevated the mobile floating action button (Ask a Question) above the bottom tab navigation bar and updated its icon to Lucide MessageSquarePlus.
Compacted FaqHelpForm.tsx on mobile with a responsive 2-column layout and reduced textarea rows to keep the "Send message" button fully visible without scrolling.
Admin Portal Enhancements:
Added direct navigation for FAQ Categories (/faq-categories) under the Admin Trust sidebar menu.
Updated the Add/Edit Category modal in FaqCategoriesPage.tsx to match the exact design wireframe with custom inline active toggle and emerald action buttons.

Actions #5

Updated by Ajit A 2 days ago

  • Status changed from In Progress to Resolved
  • % Done changed from 70 to 100
Edit Copy Actions

Also available in: Atom PDF