Spaces:
Sleeping
Sleeping
File size: 20,445 Bytes
d34aa41 3fab7e5 d34aa41 3fab7e5 4042397 d34aa41 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 | import type { Region, UserRole } from '@prisma/client';
import { DEMO_PASSWORD } from '@/lib/constants';
export type DemoUser = {
id: string;
username: string;
email: string;
name: string;
role: UserRole;
region: Region | null;
password: string;
};
export type DemoAgency = {
code: string;
name: string;
city: string;
address: string;
region: Region;
category: string;
owner: string;
contact: string;
phone: string;
latitude: number;
longitude: number;
lastVisitAt: string;
potential: 'Yuksek' | 'Orta' | 'Dusuk';
riskReason?: string;
score: number;
monthlyRevenue: number;
growth: number;
openActionCount: number;
status: 'Yuksek Potansiyel' | 'Stabil' | 'Riskli';
};
export type DemoVisit = {
id: string;
agencyCode: string;
agencyName: string;
city: string;
owner: string;
date: string;
type: 'Yuz yuze' | 'Online' | 'Telefon' | 'Ad-hoc';
status: 'Planli' | 'Tamamlandi' | 'Ertelendi';
note: string;
title?: string;
topic?: string;
prepNote?: string;
postNote?: string;
sentiment?: 'POZITIF' | 'NOTR' | 'NEGATIF';
nextActions?: string[];
};
export type DemoKpi = {
name: string;
owner: string;
target: number;
actual: number;
unit: string;
};
export type DemoAccountingItem = {
agencyName: string;
balance: number;
lastInvoice: number;
status: 'Eslesmis' | 'Kontrol Gerekli' | 'Bekliyor';
};
export const demoUsers: DemoUser[] = [
{
id: 'demo-admin',
username: 'admin',
email: 'admin@ajet.com.tr',
name: 'AJet Admin',
role: 'ADMIN',
region: null,
password: DEMO_PASSWORD,
},
{
id: 'demo-gm',
username: 'gm',
email: 'gm@ajet.com.tr',
name: 'Genel Mudur',
role: 'GENEL_MUDUR',
region: null,
password: DEMO_PASSWORD,
},
{
id: 'demo-sm-dogu',
username: 'sm.dogu',
email: 'sm.dogu@ajet.com.tr',
name: 'Dogu Satis Muduru',
role: 'SATIS_MUDURU',
region: 'DOGU',
password: DEMO_PASSWORD,
},
{
id: 'demo-sp1',
username: 'sp1',
email: 'sp1@ajet.com.tr',
name: 'Saha Personeli Dogu',
role: 'SATIS_PERSONELI',
region: 'DOGU',
password: DEMO_PASSWORD,
},
{
id: 'demo-analiz',
username: 'analiz',
email: 'analiz@ajet.com.tr',
name: 'Veri Analisti',
role: 'VERI_ANALISTI',
region: null,
password: DEMO_PASSWORD,
},
{
id: 'demo-muhasebe',
username: 'muhasebe',
email: 'muhasebe@ajet.com.tr',
name: 'Muhasebe Uzmani',
role: 'MUHASEBE',
region: null,
password: DEMO_PASSWORD,
},
];
export const demoAgencies: DemoAgency[] = [
{
code: 'AJ-IST-001',
name: 'Istanbul Jet Travel',
city: 'Istanbul',
address: 'Istiklal Cd. No: 42, Beyoglu, Istanbul',
region: 'BATI',
category: 'IATA',
owner: 'Saha Personeli Bati',
contact: 'Murat Kaya',
phone: '+90 212 555 0101',
latitude: 41.0369,
longitude: 28.9851,
lastVisitAt: '2026-03-28T10:30:00+03:00',
potential: 'Yuksek',
score: 92,
monthlyRevenue: 4200000,
growth: 14,
openActionCount: 1,
status: 'Yuksek Potansiyel',
},
{
code: 'AJ-ANT-001',
name: 'Antalya Holiday Desk',
city: 'Antalya',
address: 'Lara Cd. No: 18, Muratpasa, Antalya',
region: 'BATI',
category: 'IATA',
owner: 'Bati Satis Muduru',
contact: 'Ozge Turan',
phone: '+90 242 555 0107',
latitude: 36.8841,
longitude: 30.7056,
lastVisitAt: '2026-04-15T11:00:00+03:00',
potential: 'Yuksek',
score: 89,
monthlyRevenue: 3850000,
growth: 18,
openActionCount: 2,
status: 'Yuksek Potansiyel',
},
{
code: 'AJ-ANK-001',
name: 'Ankara Corporate Flights',
city: 'Ankara',
address: 'Tunali Hilmi Cd. No: 65, Cankaya, Ankara',
region: 'DOGU',
category: 'Kurumsal',
owner: 'Saha Personeli Dogu',
contact: 'Can Yildiz',
phone: '+90 312 555 0103',
latitude: 39.9076,
longitude: 32.8614,
lastVisitAt: '2026-03-18T14:00:00+03:00',
potential: 'Orta',
score: 81,
monthlyRevenue: 2760000,
growth: 7,
openActionCount: 0,
status: 'Stabil',
},
{
code: 'AJ-IZM-001',
name: 'Izmir Horizon Tourism',
city: 'Izmir',
address: 'Cumhuriyet Blv. No: 110, Konak, Izmir',
region: 'BATI',
category: 'IATA',
owner: 'Saha Personeli Bati',
contact: 'Deniz Oz',
phone: '+90 232 555 0105',
latitude: 38.4237,
longitude: 27.1428,
lastVisitAt: '2026-02-24T09:45:00+03:00',
potential: 'Orta',
score: 74,
monthlyRevenue: 1980000,
growth: 3,
openActionCount: 1,
status: 'Stabil',
},
{
code: 'AJ-TRB-001',
name: 'Trabzon Blacksea Travel',
city: 'Trabzon',
address: 'Kahramanmaras Cd. No: 8, Ortahisar, Trabzon',
region: 'DOGU',
category: 'Non-IATA',
owner: 'Saha Personeli Dogu',
contact: 'Burak Demir',
phone: '+90 462 555 0109',
latitude: 41.0027,
longitude: 39.7168,
lastVisitAt: '2026-01-30T15:30:00+03:00',
potential: 'Dusuk',
riskReason: 'Buyume negatif ve acik aksiyon sayisi yuksek.',
score: 61,
monthlyRevenue: 920000,
growth: -6,
openActionCount: 3,
status: 'Riskli',
},
];
export const demoMoscowAgencies: DemoAgency[] = [
{
code: 'AJ-MOW-001',
name: 'Red Square Travel Center',
city: 'Moskova',
address: 'Nikolskaya St. 10, Tverskoy, Moscow',
region: 'ONLINE',
category: 'IATA',
owner: 'Moskova Saha Ekibi',
contact: 'Ivan Petrov',
phone: '+7 495 555 0101',
latitude: 55.7586,
longitude: 37.6204,
lastVisitAt: '2026-01-28T11:00:00+03:00',
potential: 'Yuksek',
riskReason: 'Merkez lokasyonda hacim dususu ve uzun ziyaret araligi var.',
score: 64,
monthlyRevenue: 2250000,
growth: -9,
openActionCount: 3,
status: 'Riskli',
},
{
code: 'AJ-MOW-002',
name: 'Arbat Business Flights',
city: 'Moskova',
address: 'Arbat St. 24, Arbat, Moscow',
region: 'ONLINE',
category: 'Kurumsal',
owner: 'Moskova Saha Ekibi',
contact: 'Elena Smirnova',
phone: '+7 495 555 0102',
latitude: 55.752,
longitude: 37.592,
lastVisitAt: '2026-02-06T13:15:00+03:00',
potential: 'Yuksek',
riskReason: 'Kurumsal portfoy buyumesi geride.',
score: 72,
monthlyRevenue: 1980000,
growth: -4,
openActionCount: 2,
status: 'Riskli',
},
{
code: 'AJ-MOW-003',
name: 'Moscow North Tour',
city: 'Moskova',
address: 'Leningradsky Ave. 62, Aeroport, Moscow',
region: 'ONLINE',
category: 'Non-IATA',
owner: 'Moskova Saha Ekibi',
contact: 'Mikhail Orlov',
phone: '+7 495 555 0103',
latitude: 55.8005,
longitude: 37.532,
lastVisitAt: '2026-01-18T10:00:00+03:00',
potential: 'Orta',
riskReason: 'Kuzey hatta satis ve aksiyon takibi zayif.',
score: 69,
monthlyRevenue: 1420000,
growth: -11,
openActionCount: 3,
status: 'Riskli',
},
{
code: 'AJ-MOW-004',
name: 'Sokol Corporate Desk',
city: 'Moskova',
address: 'Volokolamskoe Hwy. 2, Sokol, Moscow',
region: 'ONLINE',
category: 'Kurumsal',
owner: 'Moskova Saha Ekibi',
contact: 'Daria Volkova',
phone: '+7 495 555 0104',
latitude: 55.805,
longitude: 37.515,
lastVisitAt: '2026-03-02T16:00:00+03:00',
potential: 'Orta',
score: 78,
monthlyRevenue: 1760000,
growth: 2,
openActionCount: 1,
status: 'Stabil',
},
{
code: 'AJ-MOW-005',
name: 'VDNH Holiday Sales',
city: 'Moskova',
address: 'Prospekt Mira 119, Ostankino, Moscow',
region: 'ONLINE',
category: 'IATA',
owner: 'Moskova Saha Ekibi',
contact: 'Sergey Kuznetsov',
phone: '+7 495 555 0105',
latitude: 55.821,
longitude: 37.637,
lastVisitAt: '2026-02-12T12:30:00+03:00',
potential: 'Yuksek',
riskReason: 'Yuksek potansiyel, sezon oncesi dusuk ivme.',
score: 74,
monthlyRevenue: 1880000,
growth: -3,
openActionCount: 2,
status: 'Riskli',
},
{
code: 'AJ-MOW-006',
name: 'Izmailovo Avia Partner',
city: 'Moskova',
address: 'Izmailovsky Blvd. 43, Izmailovo, Moscow',
region: 'ONLINE',
category: 'Non-IATA',
owner: 'Moskova Saha Ekibi',
contact: 'Anna Morozova',
phone: '+7 495 555 0106',
latitude: 55.789,
longitude: 37.75,
lastVisitAt: '2025-12-20T15:00:00+03:00',
potential: 'Orta',
riskReason: 'En dusuk skor grubu ve coklu acik aksiyon.',
score: 58,
monthlyRevenue: 960000,
growth: -14,
openActionCount: 4,
status: 'Riskli',
},
{
code: 'AJ-MOW-007',
name: 'Kurskaya Transit Agency',
city: 'Moskova',
address: 'Zemlyanoy Val St. 33, Basmanny, Moscow',
region: 'ONLINE',
category: 'IATA',
owner: 'Moskova Saha Ekibi',
contact: 'Pavel Sokolov',
phone: '+7 495 555 0107',
latitude: 55.758,
longitude: 37.659,
lastVisitAt: '2026-01-31T09:30:00+03:00',
potential: 'Yuksek',
riskReason: 'Transit hacmi dusuyor, merkez dogu hattina yakin.',
score: 66,
monthlyRevenue: 2110000,
growth: -7,
openActionCount: 3,
status: 'Riskli',
},
{
code: 'AJ-MOW-008',
name: 'Paveletsky Premium Travel',
city: 'Moskova',
address: 'Paveletskaya Sq. 2, Zamoskvorechye, Moscow',
region: 'ONLINE',
category: 'IATA',
owner: 'Moskova Saha Ekibi',
contact: 'Natalia Belova',
phone: '+7 495 555 0108',
latitude: 55.729,
longitude: 37.637,
lastVisitAt: '2026-03-20T14:00:00+03:00',
potential: 'Yuksek',
score: 83,
monthlyRevenue: 2440000,
growth: 6,
openActionCount: 1,
status: 'Yuksek Potansiyel',
},
{
code: 'AJ-MOW-009',
name: 'Moscow South Connect',
city: 'Moskova',
address: 'Andropova Ave. 18, Nagatino, Moscow',
region: 'ONLINE',
category: 'Non-IATA',
owner: 'Moskova Saha Ekibi',
contact: 'Roman Fedorov',
phone: '+7 495 555 0109',
latitude: 55.681,
longitude: 37.629,
lastVisitAt: '2026-01-12T11:45:00+03:00',
potential: 'Orta',
riskReason: 'Guney hatta negatif buyume ve geciken takip var.',
score: 62,
monthlyRevenue: 1180000,
growth: -12,
openActionCount: 3,
status: 'Riskli',
},
{
code: 'AJ-MOW-010',
name: 'Sparrow Hills Group',
city: 'Moskova',
address: 'Universitetsky Ave. 9, Ramenki, Moscow',
region: 'ONLINE',
category: 'Kurumsal',
owner: 'Moskova Saha Ekibi',
contact: 'Olga Mikhailova',
phone: '+7 495 555 0110',
latitude: 55.7,
longitude: 37.548,
lastVisitAt: '2026-02-25T10:15:00+03:00',
potential: 'Orta',
riskReason: 'Bati-guney hattinda hafif ivme kaybi.',
score: 76,
monthlyRevenue: 1690000,
growth: -2,
openActionCount: 1,
status: 'Stabil',
},
{
code: 'AJ-MOW-011',
name: 'City West Aviation',
city: 'Moskova',
address: 'Presnenskaya Emb. 12, Presnensky, Moscow',
region: 'ONLINE',
category: 'Kurumsal',
owner: 'Moskova Saha Ekibi',
contact: 'Kirill Antonov',
phone: '+7 495 555 0111',
latitude: 55.749,
longitude: 37.539,
lastVisitAt: '2026-02-01T16:30:00+03:00',
potential: 'Yuksek',
riskReason: 'Yuksek potansiyel ama son temas eski.',
score: 71,
monthlyRevenue: 2050000,
growth: -5,
openActionCount: 2,
status: 'Riskli',
},
{
code: 'AJ-MOW-012',
name: 'Kuntsevo Leisure Office',
city: 'Moskova',
address: 'Yartsevskaya St. 19, Kuntsevo, Moscow',
region: 'ONLINE',
category: 'Non-IATA',
owner: 'Moskova Saha Ekibi',
contact: 'Viktoria Lebedeva',
phone: '+7 495 555 0112',
latitude: 55.74,
longitude: 37.414,
lastVisitAt: '2026-01-25T13:00:00+03:00',
potential: 'Orta',
riskReason: 'Bati ucunda dusen talep ve acik aksiyonlar var.',
score: 67,
monthlyRevenue: 1320000,
growth: -8,
openActionCount: 2,
status: 'Riskli',
},
];
const europeanTravelMarkets = [
{
country: 'Almanya',
city: 'Berlin',
prefix: 'BER',
owner: 'Almanya Saha Ekibi',
phonePrefix: '+49 30 555',
center: { latitude: 52.52, longitude: 13.405 },
},
{
country: 'Fransa',
city: 'Paris',
prefix: 'PAR',
owner: 'Fransa Saha Ekibi',
phonePrefix: '+33 1 555',
center: { latitude: 48.8566, longitude: 2.3522 },
},
{
country: 'Hollanda',
city: 'Amsterdam',
prefix: 'AMS',
owner: 'Hollanda Saha Ekibi',
phonePrefix: '+31 20 555',
center: { latitude: 52.3676, longitude: 4.9041 },
},
{
country: 'Italya',
city: 'Roma',
prefix: 'ROM',
owner: 'Italya Saha Ekibi',
phonePrefix: '+39 06 555',
center: { latitude: 41.9028, longitude: 12.4964 },
},
{
country: 'Ispanya',
city: 'Madrid',
prefix: 'MAD',
owner: 'Ispanya Saha Ekibi',
phonePrefix: '+34 91 555',
center: { latitude: 40.4168, longitude: -3.7038 },
},
{
country: 'Ingiltere',
city: 'Londra',
prefix: 'LON',
owner: 'Ingiltere Saha Ekibi',
phonePrefix: '+44 20 555',
center: { latitude: 51.5072, longitude: -0.1276 },
},
];
const europeanAgencyPatterns: Array<{
name: string;
district: string;
category: string;
contact: string;
offsetLat: number;
offsetLng: number;
lastVisitAt: string;
potential: DemoAgency['potential'];
score: number;
monthlyRevenue: number;
growth: number;
openActionCount: number;
status: DemoAgency['status'];
riskReason?: string;
}> = [
{
name: 'Central Flight Center',
district: 'Merkez',
category: 'IATA',
contact: 'Alex Morgan',
offsetLat: 0.004,
offsetLng: -0.006,
lastVisitAt: '2026-01-18T10:00:00+03:00',
potential: 'Yuksek',
score: 63,
monthlyRevenue: 2450000,
growth: -10,
openActionCount: 3,
status: 'Riskli',
riskReason: 'Merkez portfoyde hacim dususu ve uzun ziyaret araligi var.',
},
{
name: 'Corporate Air Desk',
district: 'Is Bolgesi',
category: 'Kurumsal',
contact: 'Maria Weber',
offsetLat: 0.026,
offsetLng: 0.032,
lastVisitAt: '2026-02-08T13:15:00+03:00',
potential: 'Yuksek',
score: 72,
monthlyRevenue: 2920000,
growth: -4,
openActionCount: 2,
status: 'Riskli',
},
{
name: 'Holiday Partner',
district: 'Turizm Hatti',
category: 'Non-IATA',
contact: 'Sofia Marin',
offsetLat: -0.021,
offsetLng: 0.019,
lastVisitAt: '2026-03-18T15:00:00+03:00',
potential: 'Orta',
score: 80,
monthlyRevenue: 1320000,
growth: 4,
openActionCount: 1,
status: 'Stabil',
},
{
name: 'West Aviation Office',
district: 'Bati',
category: 'IATA',
contact: 'Daniel Rossi',
offsetLat: 0.013,
offsetLng: -0.07,
lastVisitAt: '2026-01-29T09:30:00+03:00',
potential: 'Orta',
score: 68,
monthlyRevenue: 1180000,
growth: -8,
openActionCount: 3,
status: 'Riskli',
},
{
name: 'Premium Tours',
district: 'Kuzey',
category: 'IATA',
contact: 'Emma Novak',
offsetLat: 0.054,
offsetLng: 0.014,
lastVisitAt: '2026-03-24T12:30:00+03:00',
potential: 'Yuksek',
score: 86,
monthlyRevenue: 2680000,
growth: 9,
openActionCount: 1,
status: 'Yuksek Potansiyel',
},
{
name: 'Airport Sales Office',
district: 'Havalimani',
category: 'Kurumsal',
contact: 'Noah Clark',
offsetLat: -0.07,
offsetLng: -0.11,
lastVisitAt: '2025-12-20T16:00:00+03:00',
potential: 'Yuksek',
score: 60,
monthlyRevenue: 2140000,
growth: -13,
openActionCount: 4,
status: 'Riskli',
riskReason: 'Havalimani hattinda eski temas ve riskli portfoy.',
},
];
export const demoEuropeanAgencies: DemoAgency[] = europeanTravelMarkets.flatMap(
(market) =>
europeanAgencyPatterns.map((pattern, index) => ({
code: `AJ-${market.prefix}-${String(index + 1).padStart(3, '0')}`,
name: `${market.city} ${pattern.name}`,
city: market.city,
address: `${pattern.district} demo adresi ${index + 1}, ${market.city}, ${market.country}`,
region: 'ONLINE',
category: pattern.category,
owner: market.owner,
contact: pattern.contact,
phone: `${market.phonePrefix} ${String(100 + index)}`,
latitude: Number((market.center.latitude + pattern.offsetLat).toFixed(4)),
longitude: Number((market.center.longitude + pattern.offsetLng).toFixed(4)),
lastVisitAt: pattern.lastVisitAt,
potential: pattern.potential,
riskReason: pattern.riskReason,
score: pattern.score,
monthlyRevenue: pattern.monthlyRevenue,
growth: pattern.growth,
openActionCount: pattern.openActionCount,
status: pattern.status,
})),
);
export const demoVisits: DemoVisit[] = [
{
id: 'visit-1',
agencyCode: 'AJ-IST-001',
agencyName: 'Istanbul Jet Travel',
city: 'Istanbul',
owner: 'Saha Personeli Bati',
date: '2026-04-18T10:00:00+03:00',
type: 'Yuz yuze',
status: 'Planli',
note: 'Yaz kampanyasi hedefleri ve ek kontenjan ihtiyaci gorusulecek.',
},
{
id: 'visit-2',
agencyCode: 'AJ-ANK-001',
agencyName: 'Ankara Corporate Flights',
city: 'Ankara',
owner: 'Saha Personeli Dogu',
date: '2026-04-19T14:30:00+03:00',
type: 'Online',
status: 'Planli',
note: 'Kurumsal musteri hacmi ve odeme vadeleri kontrol edilecek.',
},
{
id: 'visit-3',
agencyCode: 'AJ-ANT-001',
agencyName: 'Antalya Holiday Desk',
city: 'Antalya',
owner: 'Bati Satis Muduru',
date: '2026-04-15T11:00:00+03:00',
type: 'Yuz yuze',
status: 'Tamamlandi',
note: 'Sezon oncesi satis ivmesi guclu, ek tesvik talebi var.',
},
{
id: 'visit-4',
agencyCode: 'AJ-TRB-001',
agencyName: 'Trabzon Blacksea Travel',
city: 'Trabzon',
owner: 'Saha Personeli Dogu',
date: '2026-04-16T16:00:00+03:00',
type: 'Telefon',
status: 'Ertelendi',
note: 'Dusuk performans icin aksiyon planina takip gerekecek.',
},
];
export const demoKpis: DemoKpi[] = [
{
name: 'Aylik Satis Hacmi',
owner: 'Tum ekip',
target: 15000000,
actual: 13710000,
unit: 'TRY',
},
{
name: 'Ziyaret Tamamlama',
owner: 'Satis',
target: 24,
actual: 18,
unit: 'adet',
},
{
name: 'Riskli Acente Aksiyonu',
owner: 'Satis Mudurleri',
target: 8,
actual: 5,
unit: 'adet',
},
{
name: 'Muhasebe Eslesme',
owner: 'Muhasebe',
target: 100,
actual: 92,
unit: '%',
},
];
export const demoAccountingItems: DemoAccountingItem[] = [
{
agencyName: 'Istanbul Jet Travel',
balance: 1240000,
lastInvoice: 680000,
status: 'Eslesmis',
},
{
agencyName: 'Antalya Holiday Desk',
balance: 890000,
lastInvoice: 520000,
status: 'Bekliyor',
},
{
agencyName: 'Trabzon Blacksea Travel',
balance: -180000,
lastInvoice: 160000,
status: 'Kontrol Gerekli',
},
];
export function findDemoUserByLogin(login: string) {
const normalized = login.trim().toLowerCase();
return demoUsers.find((user) => {
const email = user.email.toLowerCase();
return (
email === normalized ||
user.username === normalized ||
email.split('@')[0] === normalized
);
});
}
export function getMvpMetrics() {
const revenue = demoAgencies.reduce(
(total, agency) => total + agency.monthlyRevenue,
0,
);
const openActions = demoAgencies.reduce(
(total, agency) => total + agency.openActionCount,
0,
);
const plannedVisits = demoVisits.filter(
(visit) => visit.status === 'Planli',
).length;
const averageScore = Math.round(
demoAgencies.reduce((total, agency) => total + agency.score, 0) /
demoAgencies.length,
);
return [
{
title: 'Aylik Satis',
value: revenue,
hint: 'Demo acente portfoyu',
kind: 'currency' as const,
},
{
title: 'Aktif Acente',
value: demoAgencies.length,
hint: 'Test veri seti',
kind: 'number' as const,
},
{
title: 'Planli Ziyaret',
value: plannedVisits,
hint: 'Bu hafta',
kind: 'number' as const,
},
{
title: 'Ortalama Skor',
value: averageScore,
hint: '100 uzerinden',
kind: 'score' as const,
},
{
title: 'Acik Aksiyon',
value: openActions,
hint: 'Takip gerektirir',
kind: 'number' as const,
},
];
}
|