This commit is contained in:
Iliyan Angelov
2025-10-13 22:47:06 +03:00
parent 5ad9cbe3a6
commit dfcaebaf8c
12 changed files with 3233 additions and 373 deletions

View File

@@ -9,9 +9,10 @@ type ModalType = 'create' | 'knowledge' | 'status' | null;
interface SupportCenterContentProps {
activeModal: ModalType;
onClose: () => void;
onOpenModal?: (type: ModalType) => void;
}
const SupportCenterContent = ({ activeModal, onClose }: SupportCenterContentProps) => {
const SupportCenterContent = ({ activeModal, onClose, onOpenModal }: SupportCenterContentProps) => {
// Close modal on escape key
useEffect(() => {
const handleEscape = (e: KeyboardEvent) => {
@@ -115,7 +116,13 @@ const SupportCenterContent = ({ activeModal, onClose }: SupportCenterContentProp
{/* Modal Body */}
<div className="support-modal-body" style={{ padding: '40px' }}>
{activeModal === 'create' && <CreateTicketForm />}
{activeModal === 'create' && (
<CreateTicketForm onOpenStatusCheck={() => {
if (onOpenModal) {
onOpenModal('status');
}
}} />
)}
{activeModal === 'knowledge' && <KnowledgeBase />}
{activeModal === 'status' && <TicketStatusCheck />}
</div>