Created
December 26, 2025 08:05
-
-
Save buraxta/a336ce9db9fa4671d30c88e852eac481 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const badgeDefinitions = [ | |
| { | |
| id: 'golden-quality', | |
| name: 'Altın Kalite Rozeti', | |
| description: 'Aylık ortalama kalite puanı ≥93', | |
| icon: IconTrophy, | |
| color: '#FFD700', | |
| bgColor: 'rgba(255, 215, 0, 0.1)', | |
| check: (data, allChannelData, vendorAgentStatistic) => { | |
| return data.totalPointMean >= 93; | |
| }, | |
| }, | |
| { | |
| id: 'quality-legend', | |
| name: 'Kalite Efsanesi Rozeti', | |
| description: 'Çok yüksek kalite puanı (≥95)', | |
| icon: IconCrown, | |
| color: '#FF6B35', | |
| bgColor: 'rgba(255, 107, 53, 0.1)', | |
| check: (data, allChannelData, vendorAgentStatistic) => { | |
| return data.totalPointMean >= 95; | |
| }, | |
| }, | |
| { | |
| id: 'quality-stability', | |
| name: 'Kalite İstikrar Ustası Rozeti', | |
| description: 'Aylık kalite puanı ≥90', | |
| icon: IconShield, | |
| color: '#4ECDC4', | |
| bgColor: 'rgba(78, 205, 196, 0.1)', | |
| check: (data, allChannelData, vendorAgentStatistic) => { | |
| return data.totalPointMean >= 90; | |
| }, | |
| }, | |
| { | |
| id: 'fluent-speech', | |
| name: 'Akıcı Konuşma Rozeti', | |
| description: 'Aylık sessizlik süreleri ekip ortalamasının altında', | |
| icon: IconVolumeOff, | |
| color: '#95E1D3', | |
| bgColor: 'rgba(149, 225, 211, 0.1)', | |
| check: (data, allChannelData, vendorAgentStatistic) => { | |
| const teamMeanSilence = allChannelData?.VendorMetricStatistic?.meanOfSlience || 0; | |
| return data.meanOfSlience < teamMeanSilence && teamMeanSilence > 0; | |
| }, | |
| }, | |
| { | |
| id: 'golden-balance', | |
| name: 'Altın Denge Rozeti', | |
| description: 'Aylık ortalama görüşme süresi 3–4 dakika arası (180-240 saniye)', | |
| icon: IconClock, | |
| color: '#F38181', | |
| bgColor: 'rgba(243, 129, 129, 0.1)', | |
| check: (data, allChannelData, vendorAgentStatistic) => { | |
| const duration = data.meanOfDuration || 0; | |
| return duration >= 180 && duration <= 240; | |
| }, | |
| }, | |
| { | |
| id: 'closing-master', | |
| name: 'Kapanış Ustası Rozeti', | |
| description: 'Aylık görüşme sonunda kapanış kriteri hatası 50 ve altında', | |
| icon: IconCheck, | |
| color: '#AA96DA', | |
| bgColor: 'rgba(170, 150, 218, 0.1)', | |
| check: (data, allChannelData, vendorAgentStatistic) => { | |
| const closingErrors = | |
| (data.promptFailDict?.['Kapanış / Son yardım önerisi sunuldu mu?'] || 0) + | |
| (data.promptFailDict?.['Son Yardım Önerisi Sunuldu Mu? '] || 0) + | |
| (data.promptFailDict?.['Kapanış/Son yardım önerisi sunuldu mu?'] || 0); | |
| return closingErrors <= 50; | |
| }, | |
| }, | |
| { | |
| id: 'communication-power', | |
| name: 'İletişim Gücü Rozeti', | |
| description: 'Aylık etkili iletişim kriterinde 50 hatanın altında', | |
| icon: IconMessages, | |
| color: '#FCBAD3', | |
| bgColor: 'rgba(252, 186, 211, 0.1)', | |
| check: (data, allChannelData, vendorAgentStatistic) => { | |
| const communicationErrors = | |
| (data.promptFailDict?.['Etkin Dinleme ve Soru Sorma'] || 0) + | |
| (data.promptFailDict?.['Müşteri Bilgilendirme- Akış/Süreç/Prosedür'] || 0); | |
| return communicationErrors <= 50; | |
| }, | |
| }, | |
| { | |
| id: 'professional-language', | |
| name: 'Profesyonel Dil Elçisi Rozeti', | |
| description: 'Aylık yasaklı ifade kriterinde 50 hata ve altında', | |
| icon: IconLanguage, | |
| color: '#FFD93D', | |
| bgColor: 'rgba(255, 217, 61, 0.1)', | |
| check: (data, allChannelData, vendorAgentStatistic) => { | |
| const bannedWordErrors = | |
| (data.promptFailDict?.['Yasaklı Kelimeler/ Anlatım Dili/ Günlük Dil Kullanımı/ Diksiyon'] || 0) + | |
| (data.promptFailDict?.['Günlük Yazım Dili Kullanımı - Yazının Akışının Anlaşılır Olması'] || 0) + | |
| (data.bannedWordCount || 0); | |
| return bannedWordErrors <= 50; | |
| }, | |
| }, | |
| { | |
| id: 'perfect-start', | |
| name: 'Mükemmel Başlangıç Rozeti', | |
| description: 'Aylık açılış kriterinde 50 hata ve altında', | |
| icon: IconSparkles, | |
| color: '#6BCB77', | |
| bgColor: 'rgba(107, 203, 119, 0.1)', | |
| check: (data, allChannelData, vendorAgentStatistic) => { | |
| const openingErrors = | |
| (data.promptFailDict?.['Açılış Anonsu Doğru Yapıldı Mı?'] || 0) + | |
| (data.promptFailDict?.['Açılış Anonsu Doğru Yapıldı Mı?'] || 0); | |
| return openingErrors <= 50; | |
| }, | |
| }, | |
| { | |
| id: 'quality-peak', | |
| name: 'Kalite Zirvesi Rozeti', | |
| description: 'Haftalık olarak aynı ekip içinde kalite metriklerinde üst dilimde yer alan temsilciler (ilk 5)', | |
| icon: IconChartBar, | |
| color: '#4D96FF', | |
| bgColor: 'rgba(77, 150, 255, 0.1)', | |
| check: (data, allChannelData, vendorAgentStatistic) => { | |
| return vendorAgentStatistic?.agentTeamScoreRank <= 5; | |
| }, | |
| }, | |
| { | |
| id: 'silence-ninja', | |
| name: "Sessizlik Ninja'sı Rozeti", | |
| description: 'Haftalık olarak en düşük sessizlik oranına sahip temsilciler arasında yer alanlar (ilk 5)', | |
| icon: IconHandStop, | |
| color: '#9B59B6', | |
| bgColor: 'rgba(155, 89, 182, 0.1)', | |
| check: (data, allChannelData, vendorAgentStatistic) => { | |
| // Bu bilgi backend'den gelecek, şimdilik sessizlik ortalamasına göre kontrol ediyoruz | |
| return false; // Backend'den rank bilgisi gelene kadar false | |
| }, | |
| }, | |
| { | |
| id: 'perfect-month', | |
| name: 'Dört Dörtlük Ay Rozeti', | |
| description: 'Ay içinde sıfırlama yaşamayan temsilciler', | |
| icon: IconStar, | |
| color: '#FF6B9D', | |
| bgColor: 'rgba(255, 107, 157, 0.1)', | |
| check: (data, allChannelData, vendorAgentStatistic) => { | |
| return (data.zeroPointCount || 0) === 0; | |
| }, | |
| }, | |
| { | |
| id: 'survey-master', | |
| name: 'Anket Ustası Rozeti', | |
| description: 'Aylık görüşme sonunda müşteriyi doğru şekilde ankete yönlendiren temsilciler (50 hatanın altında)', | |
| icon: IconTarget, | |
| color: '#FFA07A', | |
| bgColor: 'rgba(255, 160, 122, 0.1)', | |
| check: (data, allChannelData, vendorAgentStatistic) => { | |
| const surveyErrors = | |
| (data.promptFailDict?.['Ankete Yönlendirme'] || 0) + | |
| (data.promptFailDict?.['Anket Sunumu Doğru Yapıldı Mı?'] || 0); | |
| return surveyErrors <= 50; | |
| }, | |
| }, | |
| { | |
| id: 'customer-friendly', | |
| name: 'Müşteri Dostu Rozeti', | |
| description: 'Empatik yaklaşım ve pozitif, içten iletişim kriterlerinde yüksek performans (50 hatanın altında)', | |
| icon: IconHeartHandshake, | |
| color: '#FF69B4', | |
| bgColor: 'rgba(255, 105, 180, 0.1)', | |
| check: (data, allChannelData, vendorAgentStatistic) => { | |
| const empathyErrors = | |
| (data.promptFailDict?.['Empatik Yaklaşım/ Pozitif İçten İletişim'] || 0) + | |
| (data.promptFailDict?.["Müşterinin Sorunu Sahiplenildi Mi, Empati Kuruldu Mu?"] || 0); | |
| return empathyErrors <= 50; | |
| }, | |
| }, | |
| { | |
| id: 'personal-communication', | |
| name: 'Kişisel İletişim Rozeti', | |
| description: 'Müşteriden isim/soyisim alarak görüşmede doğru hitap kullanan temsilciler (50 hata altı)', | |
| icon: IconId, | |
| color: '#87CEEB', | |
| bgColor: 'rgba(135, 206, 235, 0.1)', | |
| check: (data, allChannelData, vendorAgentStatistic) => { | |
| const nameErrors = | |
| (data.promptFailDict?.['İsimle Hitap Etme/İsim Soy isim Alma'] || 0) + | |
| (data.promptFailDict?.['İsim ile Hitap Standartlarına Uyuldu Mu?'] || 0); | |
| return nameErrors <= 50; | |
| }, | |
| }, | |
| { | |
| id: 'knowledge-master', | |
| name: 'Bilgi Ustası Rozeti', | |
| description: 'Ürün ve süreç bilgisi doğru, eksiksiz işlem yapan temsilciler (50 hata altı)', | |
| icon: IconBook, | |
| color: '#20B2AA', | |
| bgColor: 'rgba(32, 178, 170, 0.1)', | |
| check: (data, allChannelData, vendorAgentStatistic) => { | |
| const knowledgeErrors = | |
| data.promptFailDict?.[ | |
| 'Ürün/Süreç Bilgisi Doğru ve Eksiksiz Verildi Mi/Eksiksiz ve Doğru İşlem Yapıldı Mı?' | |
| ] || 0; | |
| return knowledgeErrors <= 50; | |
| }, | |
| }, | |
| ]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment