- Added new modules for SIM management, internet management, and call history to the BFF, improving service organization and modularity. - Updated environment validation schema to reflect changes in Salesforce event channels, ensuring accurate configuration. - Refactored router configuration to include new subscription-related modules, enhancing API routing clarity. - Cleaned up Salesforce integration by removing unused service files and optimizing event handling logic. - Improved support service by adding cache invalidation logic for case comments, ensuring real-time updates for users. - Updated domain schemas to remove deprecated fields and enhance validation for residence card verification, promoting data integrity. - Enhanced utility functions in the portal for better address formatting and confirmation prompts, improving user experience.
65 lines
1.9 KiB
TypeScript
65 lines
1.9 KiB
TypeScript
/**
|
|
* Support Domain - Contract
|
|
*
|
|
* Constants for support case statuses, priorities, and categories.
|
|
* These are the DISPLAY values shown in the portal UI.
|
|
*
|
|
* Note: Salesforce uses Japanese API names internally (e.g., 新規, 対応中, 高, 中, 低)
|
|
* which are mapped to these English display values by the Salesforce mapper.
|
|
*/
|
|
|
|
/**
|
|
* Portal display status values (customer-friendly)
|
|
*
|
|
* Mapped from Salesforce API names:
|
|
* - 新規 → New
|
|
* - 対応中, Awaiting Approval, VPN Pending, Pending → In Progress (internal workflow hidden)
|
|
* - 完了済み (Replied) → Awaiting Customer (support replied, waiting for customer response)
|
|
* - Closed → Closed
|
|
*/
|
|
export const SUPPORT_CASE_STATUS = {
|
|
NEW: "New",
|
|
IN_PROGRESS: "In Progress",
|
|
AWAITING_CUSTOMER: "Awaiting Customer", // Support has replied, waiting for customer
|
|
CLOSED: "Closed",
|
|
} as const;
|
|
|
|
/** Statuses that indicate a case is closed (for UI logic - disables reply form) */
|
|
export const CLOSED_STATUSES = [SUPPORT_CASE_STATUS.CLOSED] as const;
|
|
|
|
/** Statuses that indicate a case is open (for UI logic) */
|
|
export const OPEN_STATUSES = [
|
|
SUPPORT_CASE_STATUS.NEW,
|
|
SUPPORT_CASE_STATUS.IN_PROGRESS,
|
|
SUPPORT_CASE_STATUS.AWAITING_CUSTOMER,
|
|
] as const;
|
|
|
|
/**
|
|
* Portal display priority values
|
|
* Mapped from Salesforce Japanese API names:
|
|
* - 高 → High
|
|
* - 中 → Medium
|
|
* - 低 → Low
|
|
*/
|
|
export const SUPPORT_CASE_PRIORITY = {
|
|
LOW: "Low",
|
|
MEDIUM: "Medium",
|
|
HIGH: "High",
|
|
} as const;
|
|
|
|
/**
|
|
* Case categories map to Salesforce Case.Type field
|
|
* Note: Type picklist may not be configured in your org
|
|
*/
|
|
export const SUPPORT_CASE_CATEGORY = {
|
|
TECHNICAL: "Technical",
|
|
BILLING: "Billing",
|
|
GENERAL: "General",
|
|
FEATURE_REQUEST: "Feature Request",
|
|
} as const;
|
|
|
|
/**
|
|
* Portal support origin - used to filter and create customer-visible portal support cases
|
|
*/
|
|
export const PORTAL_CASE_ORIGIN = "Portal Support" as const;
|