Proje: Okul.com.tr CRM · Hub: Okul.com.tr CRM — Domain

CRM Okul Yorumları Modeli

SchoolComment Entity

interface SchoolComment {
    id: number;
    school_id: number;
    school_name: string;
    user_id: number;
    user_type_id: number;
    commenter_name: string;
    commenter_email: string;
    replied_id: number | null;
    comment: string;
    comment_negative: string | null;   // ← Negatif yorum alanı (son eklendi)
    student_name: string | null;
    student_date_of_birth: string | null;
    comment_rate: string | null;
    do_recommend: boolean | null;
    rated_up: number;
    rated_down: number;
    show_home_page: boolean;
    status: boolean | number | string | null;
    reject_stage: string | null;
    approved_type: string | null;      // 'positive' veya başka değer
    lead_status: string | null;
    registration_status: string | null;
    comment_note: string | null;
    reject_note: string | null;
    approved_by: number | null;
    approved_at: string | null;
    deleted_at: string | null;
    school?: { ... school fields ... };
    user?: User;
    user_type?: UserType;
    approved_by_user?: User;
}

Moderasyon Akışı

Onaylama

SchoolCommentService.approve(id, approvedType: string = 'positive')
// PATCH /admin/school-comments/{id}/approve
// Body: { approved_type: 'positive' }

Reddetme

SchoolCommentService.reject(id, rejectStage: string, rejectNote?: string)
// PATCH /admin/school-comments/{id}/reject
// Body: { reject_stage: string, reject_note?: string }

FormValues

interface SchoolCommentFormValues {
    school_id: number;
    user_id?: number | string;
    user_type_id?: number | string;
    commenter_name: string;
    commenter_email: string;
    comment: string;
    comment_negative?: string | null;  // ← Düzenleme ve dialog'larda mevcut
    status?: string | null;
}

comment_negative Alanı

Sonradan eklendi. Yorumun olumsuz kısmını içerir. Düzenleme formunda ve onay/ret dialog’larında gösterilir.

ActionConfirmationDialog Kullanımı

Onay ve ret işlemleri ActionConfirmationDialog bileşeniyle gerçekleştirilir — countdown timer, system effects listesi içerir.