Project

General

Profile

Edit Copy Actions

Bug #11097

open

Product module bug fix , to implement company module, company details,Customer Management Module with Address Autocomplete, Action History Tracking, and Export Utilities

Added by Ajit A 8 days ago. Updated 4 days ago.

Status:
Resolved
Priority:
Normal
Assignee:
Start date:
09/28/2026
Due date:
% Done:

100%

Estimated time:
8:00 h
Spent time:
Tested Date:
09/27/2026
Raised by Tester:

Add

Subtasks


Add

Related issues

Actions #1

Updated by Ajit A 7 days ago

  • Subject changed from Product module bug fix to Product module bug fix & dynamic currenty based on company details
  • Estimated time changed from 4:00 h to 8:00 h
Actions #2

Updated by Ajit A 7 days ago

  • Subject changed from Product module bug fix & dynamic currenty based on company details to Product module bug fix , to implement compnay module, dynamic currenty based on company details
Actions #3

Updated by Yalavarthi Thriveni 7 days ago

  • Target version set to Sprint (09/28/2026 - 10/02/2026)
Actions #4

Updated by Ajit A 7 days ago

  • Subject changed from Product module bug fix , to implement compnay module, dynamic currenty based on company details to Product module bug fix , to implement compnay module, dynamic currenty based on company details,customer list CRUD in dashboard
  • Target version deleted (Sprint (09/28/2026 - 10/02/2026))
Actions #5

Updated by Yalavarthi Thriveni 7 days ago

  • Target version set to Sprint (09/28/2026 - 10/02/2026)

Updated by Ajit A 7 days ago

  • Subject changed from Product module bug fix , to implement compnay module, dynamic currenty based on company details,customer list CRUD in dashboard to Product module bug fix , to implement company module, company details,Customer Management Module with Address Autocomplete, Action History Tracking, and Export Utilities
  • Target version deleted (Sprint (09/28/2026 - 10/02/2026))
  • % Done changed from 0 to 100

1. Backend Repository (Noxa-Jewellery-be)
Admin Customer Management:
Implemented full administrative customer CRUD APIs (GET /customer, GET /customer/:id, POST /customer, PUT /customer/:id, DELETE /customer/:id, PUT /customer/:id/restore, DELETE /customer/:id/address/:addressId).
Added Excel and PDF export endpoints (/customer/export/excel, /customer/export/pdf) with search, role, country, date range, and deleted status filtering.
Audit Logs & Action History:
Integrated detailed state snapshot capturing (oldValue, newValue, changedFields) for customer creations, updates, soft-deletions, restorations, and address deletions.
Added snapshot sanitization to prevent sensitive/internal fields (password, otp, otpExpires, __v) from leaking into action history diffs.
Enhanced

ActionHistoryService.getLogs
to match CUSTOMER and USER entity types interchangeably.
Fixed TypeScript type narrowing (TS2358) in

action-history.interceptor.ts
.
PDF Export Utility Improvements:
Enhanced

generatePDF
with dynamic proportional column scaling across 100% of the printable width.
Increased first column spacing and adjusted padding to resolve "S No" header vertical wrapping.
Company Profile & Invoicing:
Added company profile module for managing multi-currency and country configurations.
2. Admin Frontend Repository (Noxa-Jewellery-fe)
Customer Management Module:
Created complete Customers module: Customer List table with status counts (Total, Customer, Guest), Customer Details view with order history, and unified Customer Create/Edit Modal.
Implemented Mapbox/Photon deliverycharges autocomplete API for address lookup scoped to the selected country.
Created custom, mobile-responsive

PhoneCodeDropdown
component with ISO country calling codes, flags, and compact trigger buttons (US +1, IN +91).
Added comprehensive client-side validations for email (RFC regex), name, and country-specific phone formatting.
Action History Tooltip:
Cleaned performer display to show only the user's name (removed email and phone).
Filtered out internal fields (otp, otpExpires, password, token) from change diffs to display only actual modified attributes.
Compacted header padding and vertical spacing.
Navigation & UI Refinements:
Positioned the Customers tab directly below Orders in sidebar navigation.
Fixed duplicate delete toast notifications triggered simultaneously from delete modals.
Adjusted global pagination "Go" input placeholder font size (11px) and input sizing for uniform mobile/desktop display.
3. E-Commerce Storefront Repository (Noxa_E_Comm_Fe)
Currency & Country Sync:
Updated header currency/country selector and store integration to synchronize with active company profile country configurations.
Advertising & Popups:
Refined popup ad display triggers and timing.

1. Backend (Noxa-Jewellery-be)
File Change Type Summary of Changes

src/customer/customer.service.ts
Modified Implemented full admin customer CRUD (createAdminCustomer, updateAdminCustomer, softDeleteCustomer, restoreCustomer, deleteCustomerAddress), added Excel/PDF export logic, and integrated action history logging with snapshot sanitization (sanitizeCustomerSnapshot).

src/customer/customer.controller.ts
Modified Added controller routes for admin customer operations (POST /customer, PUT /customer/:id, DELETE /customer/:id, PUT /customer/:id/restore, DELETE /customer/:id/address/:addressId) and passed req.user for audit logs.

src/customer/customer.module.ts
Modified Imported ActionHistoryModule and Order model into CustomerModule.

src/customer/dto/create-customer.dto.ts
Added Created DTO for validating new customer payload (name, email, phone, role, country, addresses).

src/customer/dto/update-customer.dto.ts
Added Created partial DTO for validating customer updates.

src/action-history/audit-logs.service.ts
Modified Updated getLogs query to match both CUSTOMER and USER entity types interchangeably and support flexible ObjectId matching.

src/common/interceptors/action-history.interceptor.ts
Modified Fixed TypeScript type-narrowing error (TS2358) on rawEntityId instanceof Types.ObjectId.

src/common/decorators/log-action.decorator.ts
Modified Updated getEntityId return type signature in LogActionOptions.

src/common/utils/export.utility.ts
Modified Enhanced generatePDF with proportional column scaling (fills 100% table width with no empty right margin) and resolved "S No" header vertical wrapping.

src/company-profile/*
Added Created company profile schemas, service, controller, and DTOs for multi-currency & country configurations.
2. Admin Frontend (Noxa-Jewellery-fe)
File Change Type Summary of Changes

src/pages/customers/CustomersList.tsx
Added Built complete Customer List page with role tabs (Total, Customer, Guest), search, date filtering, pagination, action history tooltips, Excel/PDF exports, and soft-delete/restore flows.

src/pages/customers/CustomerDetails.tsx
Added Built Customer Details view displaying order stats, customer addresses, order list, and expandable audit log action history.

src/pages/customers/components/CustomerModal.tsx
Added Built unified customer create/edit modal with Mapbox/Photon address autocomplete, custom mobile-friendly PhoneCodeDropdown component, and email/phone validations.

src/services/service.customer.ts
Added HTTP client service for customer CRUD, address removal, and action history endpoints.

src/services/service.companyProfile.ts
Added HTTP client service for fetching enabled countries, currencies, and company profile.

src/components/ActionHistoryTooltip.tsx
Modified Cleaned performer label (shows only user name, removed email/phone), excluded internal fields (otp, password, token) from diffs, and reduced header padding.

src/components/GlobalPagination.tsx
Modified Fixed "Go" page input placeholder styling and dimensions (text-xs, placeholder:text-[11px]) for clean mobile and desktop rendering.

src/components/ResponsivePaginationControls.tsx
Modified Adjusted "Go to page" input placeholder and font sizing.

src/services/service.auditLog.ts
Modified Added getLogs alias to getHistory.

src/routes/routes.ts
Modified Positioned the Customers route directly below Orders in the sidebar navigation.

src/routes/AppRoutes.tsx
Modified Registered /customers and /customers/:id routes.

src/utils/countries.ts
Modified Added country-to-calling-code mapping (countryPhoneCodes) and getCountryPhoneCode helper.
3. Storefront Frontend (Noxa_E_Comm_Fe)
File Change Type Summary of Changes
components/layout/Header.tsx Modified Updated currency and country selector to sync with enabled company profile countries and currencies.
store/currencyStore.ts Modified Synchronized currency store state with backend company profile settings.
components/home/Advertising/PopupAd.tsx Modified Refined popup advertisement display timing and dismiss logic.

Actions #7

Updated by Ajit A 4 days ago

  • Status changed from New to Resolved
Actions #8

Updated by Ajit A 4 days ago

  • Target version set to Sprint (09/28/2026 - 10/02/2026)
Edit Copy Actions

Also available in: Atom PDF