main
unknown 6 months ago
parent afaf36ba01
commit 7287c9aa2a
  1. 1
      Helpers/GeolocationHelper.cs
  2. 5
      MauiProgram.cs
  3. 23
      Resources/Images/log.svg
  4. BIN
      Resources/Images/logo.png
  5. 0
      Resources/Raw/splash.svg
  6. 23
      Resources/Splash/log.svg
  7. 12
      Services/AuthorityService.cs
  8. 35
      Services/SmsService.cs
  9. 6
      Views/AuthorityReportsPage.xaml.cs
  10. 127
      Views/IncidentReportPage.xaml.cs
  11. 8
      Views/LoginPage.xaml.cs

@ -20,7 +20,6 @@ namespace Justice.Helpers
DesiredAccuracy = GeolocationAccuracy.High,
Timeout = TimeSpan.FromSeconds(10)
});
if (location != null)
{
// Reverse geocode the location to get the address

@ -1,4 +1,6 @@
using Microsoft.Extensions.Logging;
using Microsoft.Maui.Controls.Maps;
namespace Justice
{
@ -14,9 +16,10 @@ namespace Justice
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
});
#if DEBUG
builder.Logging.AddDebug();
builder.Logging.AddDebug();
#endif
return builder.Build();

@ -0,0 +1,23 @@
<svg width="1024" height="1024" viewBox="0 0 1024 1024" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="1024" height="1024" fill="white"/>
<circle cx="516.81" cy="512" r="375.555" fill="white" stroke="black" stroke-width="17.5858"/>
<path d="M313.916 713.725C328.789 705.532 334.223 686.772 326.03 671.899C317.837 657.025 299.078 651.592 284.204 659.784C269.331 667.977 263.897 686.737 272.09 701.61C280.283 716.484 299.047 721.914 313.916 713.725ZM290.122 670.527C299.071 665.598 310.358 668.867 315.287 677.816C320.213 686.76 316.947 698.053 307.998 702.982C299.049 707.911 287.764 704.633 282.838 695.69C277.909 686.741 281.178 675.454 290.122 670.527Z" fill="black"/>
<path d="M219.23 737.73L280.901 703.76C283.604 702.271 284.472 698.657 282.839 695.692C281.205 692.726 277.686 691.528 274.983 693.017L213.312 726.987C210.609 728.476 209.741 732.091 211.374 735.056C213.007 738.021 216.522 739.221 219.23 737.73Z" fill="black"/>
<path d="M311.941 630.104C326.815 621.911 332.248 603.152 324.056 588.278C315.863 573.404 297.103 567.971 282.23 576.164C267.356 584.356 261.923 603.116 270.115 617.989C278.308 632.863 297.073 638.293 311.941 630.104ZM288.147 586.907C297.096 581.977 308.383 585.247 313.313 594.195C318.239 603.139 314.973 614.432 306.024 619.361C297.075 624.29 285.79 621.012 280.864 612.069C275.935 603.12 279.204 591.833 288.147 586.907Z" fill="black"/>
<path d="M184.794 671.985L276.537 621.451C280.558 619.236 282.496 615.032 280.863 612.067C279.23 609.102 274.641 608.493 270.62 610.708L178.876 661.242C174.855 663.457 172.917 667.661 174.55 670.626C176.184 673.591 180.765 674.204 184.794 671.985Z" fill="black"/>
<path d="M244.295 580.159C259.169 571.966 264.602 553.207 256.41 538.333C248.217 523.46 229.458 518.026 214.584 526.219C199.71 534.411 194.277 553.171 202.47 568.045C210.662 582.918 229.427 588.349 244.295 580.159ZM220.501 536.962C229.45 532.033 240.738 535.302 245.667 544.251C250.593 553.194 247.327 564.487 238.378 569.416C229.429 574.345 218.144 571.068 213.218 562.124C208.289 553.175 211.558 541.888 220.501 536.962Z" fill="black"/>
<path d="M157.046 600.064L211.827 569.889C214.228 568.567 214.851 565.087 213.218 562.122C211.585 559.157 208.311 557.824 205.91 559.147L151.129 589.321C148.728 590.644 148.105 594.123 149.738 597.088C151.371 600.053 154.641 601.389 157.046 600.064Z" fill="black"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M364.707 585.175C364.717 585.04 364.722 584.903 364.722 584.765V288.434C364.722 277.486 373.628 268.58 384.576 268.58H658.573C669.521 268.58 678.427 277.486 678.427 288.434V377.651C678.427 380.687 680.886 383.141 683.917 383.141C686.948 383.141 689.407 380.687 689.407 377.651V288.434C689.407 271.43 675.577 257.599 658.573 257.599H384.576C367.572 257.599 353.741 271.436 353.741 288.434V584.765C353.741 585.129 353.776 585.484 353.844 585.828C355.041 601.593 367.448 613.428 383.603 613.428C392.209 613.428 392.209 602.447 383.603 602.447C373.036 602.447 365.237 595.503 364.707 585.175Z" fill="black"/>
<path d="M562.154 368.6H411.73C408.314 368.6 405.542 366.946 405.542 364.9C405.542 362.854 408.314 361.2 411.73 361.2H562.154C565.577 361.2 568.343 362.854 568.343 364.9C568.343 366.946 565.57 368.6 562.154 368.6Z" fill="black" stroke="black" stroke-width="3.70003"/>
<path d="M633.342 324.2H414.543C409.574 324.2 405.542 322.546 405.542 320.5C405.542 318.454 409.574 316.8 414.543 316.8H633.342C638.32 316.8 642.343 318.454 642.343 320.5C642.343 322.546 638.311 324.2 633.342 324.2Z" fill="black" stroke="black" stroke-width="3.70003"/>
<path d="M545.523 412.608H411.073C408.02 412.608 405.542 411.129 405.542 409.301C405.542 407.472 408.02 405.993 411.073 405.993H545.523C548.582 405.993 551.054 407.472 551.054 409.301C551.054 411.129 548.576 412.608 545.523 412.608Z" fill="#C50878" stroke="#C50878" stroke-width="3.30711"/>
<path d="M507.415 456.642H409.567C407.345 456.642 405.542 455.327 405.542 453.701C405.542 452.074 407.345 450.759 409.567 450.759H507.415C509.641 450.759 511.44 452.074 511.44 453.701C511.44 455.327 509.637 456.642 507.415 456.642Z" fill="black" stroke="black" stroke-width="3.69734"/>
<path d="M345.568 426.251L330.255 374.419C329.514 372.482 328.536 370.367 327.421 368.345C326.309 366.321 325.043 364.358 323.659 362.518C322.278 360.681 320.747 358.916 319.11 357.278C317.476 355.647 315.714 354.116 313.87 352.732C312.036 351.354 310.074 350.086 308.043 348.967C306.021 347.855 303.903 346.877 301.747 346.062L250.14 330.827L301.972 315.514C303.903 314.776 306.021 313.801 308.049 312.683C310.08 311.564 312.039 310.296 313.873 308.918C315.717 307.534 317.479 306.003 319.113 304.372C320.75 302.735 322.278 300.972 323.659 299.132C325.046 297.289 326.312 295.326 327.424 293.305C328.54 291.283 329.514 289.165 330.33 287.009L345.568 235.399L360.881 287.231C361.628 289.174 362.602 291.293 363.715 293.308C364.824 295.326 366.092 297.289 367.48 299.135C368.858 300.972 370.389 302.738 372.026 304.375C373.66 306.006 375.422 307.537 377.266 308.921C379.1 310.299 381.062 311.567 383.093 312.686C385.12 313.801 387.236 314.776 389.385 315.589L440.995 330.83L389.167 346.14C387.233 346.88 385.114 347.858 383.09 348.974C381.059 350.092 379.1 351.361 377.262 352.739C375.419 354.123 373.657 355.654 372.023 357.285C370.386 358.922 368.858 360.684 367.477 362.521C366.086 364.371 364.821 366.33 363.712 368.348C362.621 370.329 361.656 372.413 360.843 374.541L345.568 426.251Z" fill="#EFDB5D"/>
<path d="M257.542 472.206L248.883 442.896C248.537 442.006 248.056 440.964 247.511 439.973C246.959 438.972 246.337 438.006 245.656 437.102C244.975 436.193 244.22 435.327 243.417 434.524C242.615 433.722 241.75 432.969 240.841 432.285C239.932 431.602 238.969 430.98 237.973 430.43C236.978 429.88 235.932 429.4 234.872 428.998L205.741 420.399L235.048 411.74C235.932 411.399 236.978 410.916 237.976 410.368C238.969 409.821 239.932 409.199 240.839 408.516C241.75 407.832 242.615 407.079 243.415 406.279C244.22 405.477 244.973 404.61 245.656 403.698C246.335 402.794 246.959 401.828 247.511 400.83C248.059 399.839 248.539 398.797 248.943 397.732L257.542 368.6L266.199 397.91C266.545 398.799 267.026 399.842 267.571 400.833C268.123 401.833 268.745 402.799 269.426 403.703C270.107 404.612 270.862 405.479 271.665 406.282C272.467 407.084 273.332 407.837 274.241 408.521C275.15 409.204 276.113 409.826 277.109 410.376C278.104 410.923 279.15 411.406 280.21 411.807L309.341 420.402L280.034 429.06C279.15 429.402 278.104 429.885 277.106 430.433C276.113 430.98 275.15 431.602 274.243 432.285C273.332 432.969 272.467 433.722 271.667 434.522C270.862 435.324 270.109 436.191 269.426 437.102C268.747 438.006 268.123 438.972 267.571 439.971C267.038 440.936 266.568 441.949 266.171 442.985L257.542 472.206Z" fill="#EFDB5D"/>
<mask id="path-15-outside-1_62_3" maskUnits="userSpaceOnUse" x="385.298" y="388.442" width="453" height="371" fill="black">
<rect fill="white" x="385.298" y="388.442" width="453" height="371"/>
<path d="M830.355 552.774H818.102L776.34 421.449C782.017 417.127 784.555 409.508 781.992 402.46C780.462 398.258 777.393 394.905 773.34 393.018C769.287 391.131 764.747 390.932 760.545 392.457C756.343 393.987 752.99 397.056 751.098 401.114C749.935 403.607 749.493 406.285 749.622 408.957L641.115 448.315C635.358 437.825 624.207 430.692 611.418 430.692C592.752 430.692 577.568 445.881 577.568 464.542C577.568 466.822 577.801 469.042 578.233 471.198L469.82 510.789C468.201 508.663 466.14 506.895 463.651 505.733C459.603 503.85 455.053 503.642 450.851 505.176C442.179 508.33 437.694 517.956 440.848 526.629C442.035 529.887 444.151 532.539 446.774 534.432L405.518 664.158H393.265C390.523 664.158 388.298 666.378 388.298 669.125V685.938C388.298 699.11 399.017 709.834 412.194 709.834H500.948C514.12 709.834 524.844 699.115 524.844 685.938V669.125C524.844 666.378 522.619 664.158 519.877 664.158H507.624L466.363 534.397C468.643 532.748 470.521 530.597 471.742 527.98C472.905 525.481 473.347 522.804 473.218 520.127L581.601 480.545C584.636 486.178 589.225 490.842 594.783 493.991V664.506C565.642 666.388 542.387 689.986 541.036 719.266H526.105C523.364 719.266 521.139 721.486 521.139 724.233V751.333C521.139 754.079 523.364 756.3 526.105 756.3H696.74C699.486 756.3 701.706 754.079 701.706 751.333V724.233C701.706 721.486 699.486 719.266 696.74 719.266H681.804C680.453 689.981 657.198 666.383 628.057 664.506V493.991C638.323 488.17 645.277 477.158 645.277 464.537C645.277 462.168 645.029 459.858 644.562 457.623L753.02 418.29C754.242 419.899 755.737 421.265 757.48 422.343L716.001 552.774H703.748C701.001 552.774 698.781 555 698.781 557.741V574.554C698.781 587.727 709.5 598.445 722.677 598.445H811.431C824.603 598.445 835.327 587.727 835.327 574.554V557.741C835.322 555 833.102 552.774 830.355 552.774ZM454.244 514.514C455.004 514.236 455.794 514.102 456.573 514.102C457.557 514.102 458.53 514.315 459.449 514.743C461.098 515.508 462.345 516.873 462.966 518.577V518.582C463.582 520.286 463.507 522.133 462.737 523.778C461.972 525.427 460.607 526.673 458.903 527.294C455.386 528.59 451.462 526.753 450.181 523.231C448.894 519.71 450.722 515.796 454.244 514.514ZM514.91 685.933C514.91 693.632 508.647 699.895 500.948 699.895H412.194C404.495 699.895 398.232 693.632 398.232 685.933V674.087H514.91V685.933ZM415.944 664.158L456.186 537.615C456.325 537.62 456.459 537.645 456.593 537.645C456.712 537.645 456.837 537.615 456.961 537.615L497.198 664.158H415.944ZM691.773 746.371H531.072V729.205H545.869H676.976H691.773V746.371ZM671.935 719.271H550.905C552.296 694.213 573.117 674.256 598.513 674.256H599.75H623.085H624.322C649.723 674.256 670.539 694.213 671.935 719.271ZM618.123 664.322H604.722V497.726C606.888 498.163 609.128 498.396 611.423 498.396C613.717 498.396 615.957 498.163 618.123 497.726V664.322ZM611.423 488.468C598.235 488.468 587.507 477.734 587.507 464.547C587.507 451.36 598.235 440.631 611.423 440.631C624.615 440.631 635.343 451.36 635.343 464.547C635.343 477.734 624.61 488.468 611.423 488.468ZM760.103 405.306C760.873 403.662 762.239 402.41 763.942 401.79C764.702 401.511 765.492 401.377 766.277 401.377C767.255 401.377 768.234 401.591 769.148 402.018C770.792 402.788 772.043 404.149 772.664 405.853C773.946 409.379 772.123 413.293 768.601 414.574C766.893 415.2 765.05 415.116 763.396 414.351C761.757 413.586 760.505 412.225 759.884 410.517C759.884 410.512 759.879 410.512 759.879 410.507C759.258 408.803 759.333 406.955 760.103 405.306ZM767.051 425.02L807.676 552.774H726.427L767.051 425.02ZM825.388 574.554C825.388 582.253 819.125 588.517 811.426 588.517H722.677C714.978 588.517 708.715 582.253 708.715 574.554V562.708H719.617C719.622 562.708 719.627 562.708 719.632 562.708C719.637 562.708 719.642 562.708 719.647 562.708H814.456C814.461 562.708 814.466 562.708 814.471 562.708C814.476 562.708 814.481 562.708 814.486 562.708H825.388V574.554Z"/>
</mask>
<path d="M830.355 552.774H818.102L776.34 421.449C782.017 417.127 784.555 409.508 781.992 402.46C780.462 398.258 777.393 394.905 773.34 393.018C769.287 391.131 764.747 390.932 760.545 392.457C756.343 393.987 752.99 397.056 751.098 401.114C749.935 403.607 749.493 406.285 749.622 408.957L641.115 448.315C635.358 437.825 624.207 430.692 611.418 430.692C592.752 430.692 577.568 445.881 577.568 464.542C577.568 466.822 577.801 469.042 578.233 471.198L469.82 510.789C468.201 508.663 466.14 506.895 463.651 505.733C459.603 503.85 455.053 503.642 450.851 505.176C442.179 508.33 437.694 517.956 440.848 526.629C442.035 529.887 444.151 532.539 446.774 534.432L405.518 664.158H393.265C390.523 664.158 388.298 666.378 388.298 669.125V685.938C388.298 699.11 399.017 709.834 412.194 709.834H500.948C514.12 709.834 524.844 699.115 524.844 685.938V669.125C524.844 666.378 522.619 664.158 519.877 664.158H507.624L466.363 534.397C468.643 532.748 470.521 530.597 471.742 527.98C472.905 525.481 473.347 522.804 473.218 520.127L581.601 480.545C584.636 486.178 589.225 490.842 594.783 493.991V664.506C565.642 666.388 542.387 689.986 541.036 719.266H526.105C523.364 719.266 521.139 721.486 521.139 724.233V751.333C521.139 754.079 523.364 756.3 526.105 756.3H696.74C699.486 756.3 701.706 754.079 701.706 751.333V724.233C701.706 721.486 699.486 719.266 696.74 719.266H681.804C680.453 689.981 657.198 666.383 628.057 664.506V493.991C638.323 488.17 645.277 477.158 645.277 464.537C645.277 462.168 645.029 459.858 644.562 457.623L753.02 418.29C754.242 419.899 755.737 421.265 757.48 422.343L716.001 552.774H703.748C701.001 552.774 698.781 555 698.781 557.741V574.554C698.781 587.727 709.5 598.445 722.677 598.445H811.431C824.603 598.445 835.327 587.727 835.327 574.554V557.741C835.322 555 833.102 552.774 830.355 552.774ZM454.244 514.514C455.004 514.236 455.794 514.102 456.573 514.102C457.557 514.102 458.53 514.315 459.449 514.743C461.098 515.508 462.345 516.873 462.966 518.577V518.582C463.582 520.286 463.507 522.133 462.737 523.778C461.972 525.427 460.607 526.673 458.903 527.294C455.386 528.59 451.462 526.753 450.181 523.231C448.894 519.71 450.722 515.796 454.244 514.514ZM514.91 685.933C514.91 693.632 508.647 699.895 500.948 699.895H412.194C404.495 699.895 398.232 693.632 398.232 685.933V674.087H514.91V685.933ZM415.944 664.158L456.186 537.615C456.325 537.62 456.459 537.645 456.593 537.645C456.712 537.645 456.837 537.615 456.961 537.615L497.198 664.158H415.944ZM691.773 746.371H531.072V729.205H545.869H676.976H691.773V746.371ZM671.935 719.271H550.905C552.296 694.213 573.117 674.256 598.513 674.256H599.75H623.085H624.322C649.723 674.256 670.539 694.213 671.935 719.271ZM618.123 664.322H604.722V497.726C606.888 498.163 609.128 498.396 611.423 498.396C613.717 498.396 615.957 498.163 618.123 497.726V664.322ZM611.423 488.468C598.235 488.468 587.507 477.734 587.507 464.547C587.507 451.36 598.235 440.631 611.423 440.631C624.615 440.631 635.343 451.36 635.343 464.547C635.343 477.734 624.61 488.468 611.423 488.468ZM760.103 405.306C760.873 403.662 762.239 402.41 763.942 401.79C764.702 401.511 765.492 401.377 766.277 401.377C767.255 401.377 768.234 401.591 769.148 402.018C770.792 402.788 772.043 404.149 772.664 405.853C773.946 409.379 772.123 413.293 768.601 414.574C766.893 415.2 765.05 415.116 763.396 414.351C761.757 413.586 760.505 412.225 759.884 410.517C759.884 410.512 759.879 410.512 759.879 410.507C759.258 408.803 759.333 406.955 760.103 405.306ZM767.051 425.02L807.676 552.774H726.427L767.051 425.02ZM825.388 574.554C825.388 582.253 819.125 588.517 811.426 588.517H722.677C714.978 588.517 708.715 582.253 708.715 574.554V562.708H719.617C719.622 562.708 719.627 562.708 719.632 562.708C719.637 562.708 719.642 562.708 719.647 562.708H814.456C814.461 562.708 814.466 562.708 814.471 562.708C814.476 562.708 814.481 562.708 814.486 562.708H825.388V574.554Z" fill="black"/>
<path d="M830.355 552.774H818.102L776.34 421.449C782.017 417.127 784.555 409.508 781.992 402.46C780.462 398.258 777.393 394.905 773.34 393.018C769.287 391.131 764.747 390.932 760.545 392.457C756.343 393.987 752.99 397.056 751.098 401.114C749.935 403.607 749.493 406.285 749.622 408.957L641.115 448.315C635.358 437.825 624.207 430.692 611.418 430.692C592.752 430.692 577.568 445.881 577.568 464.542C577.568 466.822 577.801 469.042 578.233 471.198L469.82 510.789C468.201 508.663 466.14 506.895 463.651 505.733C459.603 503.85 455.053 503.642 450.851 505.176C442.179 508.33 437.694 517.956 440.848 526.629C442.035 529.887 444.151 532.539 446.774 534.432L405.518 664.158H393.265C390.523 664.158 388.298 666.378 388.298 669.125V685.938C388.298 699.11 399.017 709.834 412.194 709.834H500.948C514.12 709.834 524.844 699.115 524.844 685.938V669.125C524.844 666.378 522.619 664.158 519.877 664.158H507.624L466.363 534.397C468.643 532.748 470.521 530.597 471.742 527.98C472.905 525.481 473.347 522.804 473.218 520.127L581.601 480.545C584.636 486.178 589.225 490.842 594.783 493.991V664.506C565.642 666.388 542.387 689.986 541.036 719.266H526.105C523.364 719.266 521.139 721.486 521.139 724.233V751.333C521.139 754.079 523.364 756.3 526.105 756.3H696.74C699.486 756.3 701.706 754.079 701.706 751.333V724.233C701.706 721.486 699.486 719.266 696.74 719.266H681.804C680.453 689.981 657.198 666.383 628.057 664.506V493.991C638.323 488.17 645.277 477.158 645.277 464.537C645.277 462.168 645.029 459.858 644.562 457.623L753.02 418.29C754.242 419.899 755.737 421.265 757.48 422.343L716.001 552.774H703.748C701.001 552.774 698.781 555 698.781 557.741V574.554C698.781 587.727 709.5 598.445 722.677 598.445H811.431C824.603 598.445 835.327 587.727 835.327 574.554V557.741C835.322 555 833.102 552.774 830.355 552.774ZM454.244 514.514C455.004 514.236 455.794 514.102 456.573 514.102C457.557 514.102 458.53 514.315 459.449 514.743C461.098 515.508 462.345 516.873 462.966 518.577V518.582C463.582 520.286 463.507 522.133 462.737 523.778C461.972 525.427 460.607 526.673 458.903 527.294C455.386 528.59 451.462 526.753 450.181 523.231C448.894 519.71 450.722 515.796 454.244 514.514ZM514.91 685.933C514.91 693.632 508.647 699.895 500.948 699.895H412.194C404.495 699.895 398.232 693.632 398.232 685.933V674.087H514.91V685.933ZM415.944 664.158L456.186 537.615C456.325 537.62 456.459 537.645 456.593 537.645C456.712 537.645 456.837 537.615 456.961 537.615L497.198 664.158H415.944ZM691.773 746.371H531.072V729.205H545.869H676.976H691.773V746.371ZM671.935 719.271H550.905C552.296 694.213 573.117 674.256 598.513 674.256H599.75H623.085H624.322C649.723 674.256 670.539 694.213 671.935 719.271ZM618.123 664.322H604.722V497.726C606.888 498.163 609.128 498.396 611.423 498.396C613.717 498.396 615.957 498.163 618.123 497.726V664.322ZM611.423 488.468C598.235 488.468 587.507 477.734 587.507 464.547C587.507 451.36 598.235 440.631 611.423 440.631C624.615 440.631 635.343 451.36 635.343 464.547C635.343 477.734 624.61 488.468 611.423 488.468ZM760.103 405.306C760.873 403.662 762.239 402.41 763.942 401.79C764.702 401.511 765.492 401.377 766.277 401.377C767.255 401.377 768.234 401.591 769.148 402.018C770.792 402.788 772.043 404.149 772.664 405.853C773.946 409.379 772.123 413.293 768.601 414.574C766.893 415.2 765.05 415.116 763.396 414.351C761.757 413.586 760.505 412.225 759.884 410.517C759.884 410.512 759.879 410.512 759.879 410.507C759.258 408.803 759.333 406.955 760.103 405.306ZM767.051 425.02L807.676 552.774H726.427L767.051 425.02ZM825.388 574.554C825.388 582.253 819.125 588.517 811.426 588.517H722.677C714.978 588.517 708.715 582.253 708.715 574.554V562.708H719.617C719.622 562.708 719.627 562.708 719.632 562.708C719.637 562.708 719.642 562.708 719.647 562.708H814.456C814.461 562.708 814.466 562.708 814.471 562.708C814.476 562.708 814.481 562.708 814.486 562.708H825.388V574.554Z" stroke="black" stroke-width="5.65919" mask="url(#path-15-outside-1_62_3)"/>
</svg>

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 183 KiB

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

@ -0,0 +1,23 @@
<svg width="1024" height="1024" viewBox="0 0 1024 1024" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="1024" height="1024" fill="white"/>
<circle cx="516.81" cy="512" r="375.555" fill="white" stroke="black" stroke-width="17.5858"/>
<path d="M313.916 713.725C328.789 705.532 334.223 686.772 326.03 671.899C317.837 657.025 299.078 651.592 284.204 659.784C269.331 667.977 263.897 686.737 272.09 701.61C280.283 716.484 299.047 721.914 313.916 713.725ZM290.122 670.527C299.071 665.598 310.358 668.867 315.287 677.816C320.213 686.76 316.947 698.053 307.998 702.982C299.049 707.911 287.764 704.633 282.838 695.69C277.909 686.741 281.178 675.454 290.122 670.527Z" fill="black"/>
<path d="M219.23 737.73L280.901 703.76C283.604 702.271 284.472 698.657 282.839 695.692C281.205 692.726 277.686 691.528 274.983 693.017L213.312 726.987C210.609 728.476 209.741 732.091 211.374 735.056C213.007 738.021 216.522 739.221 219.23 737.73Z" fill="black"/>
<path d="M311.941 630.104C326.815 621.911 332.248 603.152 324.056 588.278C315.863 573.404 297.103 567.971 282.23 576.164C267.356 584.356 261.923 603.116 270.115 617.989C278.308 632.863 297.073 638.293 311.941 630.104ZM288.147 586.907C297.096 581.977 308.383 585.247 313.313 594.195C318.239 603.139 314.973 614.432 306.024 619.361C297.075 624.29 285.79 621.012 280.864 612.069C275.935 603.12 279.204 591.833 288.147 586.907Z" fill="black"/>
<path d="M184.794 671.985L276.537 621.451C280.558 619.236 282.496 615.032 280.863 612.067C279.23 609.102 274.641 608.493 270.62 610.708L178.876 661.242C174.855 663.457 172.917 667.661 174.55 670.626C176.184 673.591 180.765 674.204 184.794 671.985Z" fill="black"/>
<path d="M244.295 580.159C259.169 571.966 264.602 553.207 256.41 538.333C248.217 523.46 229.458 518.026 214.584 526.219C199.71 534.411 194.277 553.171 202.47 568.045C210.662 582.918 229.427 588.349 244.295 580.159ZM220.501 536.962C229.45 532.033 240.738 535.302 245.667 544.251C250.593 553.194 247.327 564.487 238.378 569.416C229.429 574.345 218.144 571.068 213.218 562.124C208.289 553.175 211.558 541.888 220.501 536.962Z" fill="black"/>
<path d="M157.046 600.064L211.827 569.889C214.228 568.567 214.851 565.087 213.218 562.122C211.585 559.157 208.311 557.824 205.91 559.147L151.129 589.321C148.728 590.644 148.105 594.123 149.738 597.088C151.371 600.053 154.641 601.389 157.046 600.064Z" fill="black"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M364.707 585.175C364.717 585.04 364.722 584.903 364.722 584.765V288.434C364.722 277.486 373.628 268.58 384.576 268.58H658.573C669.521 268.58 678.427 277.486 678.427 288.434V377.651C678.427 380.687 680.886 383.141 683.917 383.141C686.948 383.141 689.407 380.687 689.407 377.651V288.434C689.407 271.43 675.577 257.599 658.573 257.599H384.576C367.572 257.599 353.741 271.436 353.741 288.434V584.765C353.741 585.129 353.776 585.484 353.844 585.828C355.041 601.593 367.448 613.428 383.603 613.428C392.209 613.428 392.209 602.447 383.603 602.447C373.036 602.447 365.237 595.503 364.707 585.175Z" fill="black"/>
<path d="M562.154 368.6H411.73C408.314 368.6 405.542 366.946 405.542 364.9C405.542 362.854 408.314 361.2 411.73 361.2H562.154C565.577 361.2 568.343 362.854 568.343 364.9C568.343 366.946 565.57 368.6 562.154 368.6Z" fill="black" stroke="black" stroke-width="3.70003"/>
<path d="M633.342 324.2H414.543C409.574 324.2 405.542 322.546 405.542 320.5C405.542 318.454 409.574 316.8 414.543 316.8H633.342C638.32 316.8 642.343 318.454 642.343 320.5C642.343 322.546 638.311 324.2 633.342 324.2Z" fill="black" stroke="black" stroke-width="3.70003"/>
<path d="M545.523 412.608H411.073C408.02 412.608 405.542 411.129 405.542 409.301C405.542 407.472 408.02 405.993 411.073 405.993H545.523C548.582 405.993 551.054 407.472 551.054 409.301C551.054 411.129 548.576 412.608 545.523 412.608Z" fill="#C50878" stroke="#C50878" stroke-width="3.30711"/>
<path d="M507.415 456.642H409.567C407.345 456.642 405.542 455.327 405.542 453.701C405.542 452.074 407.345 450.759 409.567 450.759H507.415C509.641 450.759 511.44 452.074 511.44 453.701C511.44 455.327 509.637 456.642 507.415 456.642Z" fill="black" stroke="black" stroke-width="3.69734"/>
<path d="M345.568 426.251L330.255 374.419C329.514 372.482 328.536 370.367 327.421 368.345C326.309 366.321 325.043 364.358 323.659 362.518C322.278 360.681 320.747 358.916 319.11 357.278C317.476 355.647 315.714 354.116 313.87 352.732C312.036 351.354 310.074 350.086 308.043 348.967C306.021 347.855 303.903 346.877 301.747 346.062L250.14 330.827L301.972 315.514C303.903 314.776 306.021 313.801 308.049 312.683C310.08 311.564 312.039 310.296 313.873 308.918C315.717 307.534 317.479 306.003 319.113 304.372C320.75 302.735 322.278 300.972 323.659 299.132C325.046 297.289 326.312 295.326 327.424 293.305C328.54 291.283 329.514 289.165 330.33 287.009L345.568 235.399L360.881 287.231C361.628 289.174 362.602 291.293 363.715 293.308C364.824 295.326 366.092 297.289 367.48 299.135C368.858 300.972 370.389 302.738 372.026 304.375C373.66 306.006 375.422 307.537 377.266 308.921C379.1 310.299 381.062 311.567 383.093 312.686C385.12 313.801 387.236 314.776 389.385 315.589L440.995 330.83L389.167 346.14C387.233 346.88 385.114 347.858 383.09 348.974C381.059 350.092 379.1 351.361 377.262 352.739C375.419 354.123 373.657 355.654 372.023 357.285C370.386 358.922 368.858 360.684 367.477 362.521C366.086 364.371 364.821 366.33 363.712 368.348C362.621 370.329 361.656 372.413 360.843 374.541L345.568 426.251Z" fill="#EFDB5D"/>
<path d="M257.542 472.206L248.883 442.896C248.537 442.006 248.056 440.964 247.511 439.973C246.959 438.972 246.337 438.006 245.656 437.102C244.975 436.193 244.22 435.327 243.417 434.524C242.615 433.722 241.75 432.969 240.841 432.285C239.932 431.602 238.969 430.98 237.973 430.43C236.978 429.88 235.932 429.4 234.872 428.998L205.741 420.399L235.048 411.74C235.932 411.399 236.978 410.916 237.976 410.368C238.969 409.821 239.932 409.199 240.839 408.516C241.75 407.832 242.615 407.079 243.415 406.279C244.22 405.477 244.973 404.61 245.656 403.698C246.335 402.794 246.959 401.828 247.511 400.83C248.059 399.839 248.539 398.797 248.943 397.732L257.542 368.6L266.199 397.91C266.545 398.799 267.026 399.842 267.571 400.833C268.123 401.833 268.745 402.799 269.426 403.703C270.107 404.612 270.862 405.479 271.665 406.282C272.467 407.084 273.332 407.837 274.241 408.521C275.15 409.204 276.113 409.826 277.109 410.376C278.104 410.923 279.15 411.406 280.21 411.807L309.341 420.402L280.034 429.06C279.15 429.402 278.104 429.885 277.106 430.433C276.113 430.98 275.15 431.602 274.243 432.285C273.332 432.969 272.467 433.722 271.667 434.522C270.862 435.324 270.109 436.191 269.426 437.102C268.747 438.006 268.123 438.972 267.571 439.971C267.038 440.936 266.568 441.949 266.171 442.985L257.542 472.206Z" fill="#EFDB5D"/>
<mask id="path-15-outside-1_62_3" maskUnits="userSpaceOnUse" x="385.298" y="388.442" width="453" height="371" fill="black">
<rect fill="white" x="385.298" y="388.442" width="453" height="371"/>
<path d="M830.355 552.774H818.102L776.34 421.449C782.017 417.127 784.555 409.508 781.992 402.46C780.462 398.258 777.393 394.905 773.34 393.018C769.287 391.131 764.747 390.932 760.545 392.457C756.343 393.987 752.99 397.056 751.098 401.114C749.935 403.607 749.493 406.285 749.622 408.957L641.115 448.315C635.358 437.825 624.207 430.692 611.418 430.692C592.752 430.692 577.568 445.881 577.568 464.542C577.568 466.822 577.801 469.042 578.233 471.198L469.82 510.789C468.201 508.663 466.14 506.895 463.651 505.733C459.603 503.85 455.053 503.642 450.851 505.176C442.179 508.33 437.694 517.956 440.848 526.629C442.035 529.887 444.151 532.539 446.774 534.432L405.518 664.158H393.265C390.523 664.158 388.298 666.378 388.298 669.125V685.938C388.298 699.11 399.017 709.834 412.194 709.834H500.948C514.12 709.834 524.844 699.115 524.844 685.938V669.125C524.844 666.378 522.619 664.158 519.877 664.158H507.624L466.363 534.397C468.643 532.748 470.521 530.597 471.742 527.98C472.905 525.481 473.347 522.804 473.218 520.127L581.601 480.545C584.636 486.178 589.225 490.842 594.783 493.991V664.506C565.642 666.388 542.387 689.986 541.036 719.266H526.105C523.364 719.266 521.139 721.486 521.139 724.233V751.333C521.139 754.079 523.364 756.3 526.105 756.3H696.74C699.486 756.3 701.706 754.079 701.706 751.333V724.233C701.706 721.486 699.486 719.266 696.74 719.266H681.804C680.453 689.981 657.198 666.383 628.057 664.506V493.991C638.323 488.17 645.277 477.158 645.277 464.537C645.277 462.168 645.029 459.858 644.562 457.623L753.02 418.29C754.242 419.899 755.737 421.265 757.48 422.343L716.001 552.774H703.748C701.001 552.774 698.781 555 698.781 557.741V574.554C698.781 587.727 709.5 598.445 722.677 598.445H811.431C824.603 598.445 835.327 587.727 835.327 574.554V557.741C835.322 555 833.102 552.774 830.355 552.774ZM454.244 514.514C455.004 514.236 455.794 514.102 456.573 514.102C457.557 514.102 458.53 514.315 459.449 514.743C461.098 515.508 462.345 516.873 462.966 518.577V518.582C463.582 520.286 463.507 522.133 462.737 523.778C461.972 525.427 460.607 526.673 458.903 527.294C455.386 528.59 451.462 526.753 450.181 523.231C448.894 519.71 450.722 515.796 454.244 514.514ZM514.91 685.933C514.91 693.632 508.647 699.895 500.948 699.895H412.194C404.495 699.895 398.232 693.632 398.232 685.933V674.087H514.91V685.933ZM415.944 664.158L456.186 537.615C456.325 537.62 456.459 537.645 456.593 537.645C456.712 537.645 456.837 537.615 456.961 537.615L497.198 664.158H415.944ZM691.773 746.371H531.072V729.205H545.869H676.976H691.773V746.371ZM671.935 719.271H550.905C552.296 694.213 573.117 674.256 598.513 674.256H599.75H623.085H624.322C649.723 674.256 670.539 694.213 671.935 719.271ZM618.123 664.322H604.722V497.726C606.888 498.163 609.128 498.396 611.423 498.396C613.717 498.396 615.957 498.163 618.123 497.726V664.322ZM611.423 488.468C598.235 488.468 587.507 477.734 587.507 464.547C587.507 451.36 598.235 440.631 611.423 440.631C624.615 440.631 635.343 451.36 635.343 464.547C635.343 477.734 624.61 488.468 611.423 488.468ZM760.103 405.306C760.873 403.662 762.239 402.41 763.942 401.79C764.702 401.511 765.492 401.377 766.277 401.377C767.255 401.377 768.234 401.591 769.148 402.018C770.792 402.788 772.043 404.149 772.664 405.853C773.946 409.379 772.123 413.293 768.601 414.574C766.893 415.2 765.05 415.116 763.396 414.351C761.757 413.586 760.505 412.225 759.884 410.517C759.884 410.512 759.879 410.512 759.879 410.507C759.258 408.803 759.333 406.955 760.103 405.306ZM767.051 425.02L807.676 552.774H726.427L767.051 425.02ZM825.388 574.554C825.388 582.253 819.125 588.517 811.426 588.517H722.677C714.978 588.517 708.715 582.253 708.715 574.554V562.708H719.617C719.622 562.708 719.627 562.708 719.632 562.708C719.637 562.708 719.642 562.708 719.647 562.708H814.456C814.461 562.708 814.466 562.708 814.471 562.708C814.476 562.708 814.481 562.708 814.486 562.708H825.388V574.554Z"/>
</mask>
<path d="M830.355 552.774H818.102L776.34 421.449C782.017 417.127 784.555 409.508 781.992 402.46C780.462 398.258 777.393 394.905 773.34 393.018C769.287 391.131 764.747 390.932 760.545 392.457C756.343 393.987 752.99 397.056 751.098 401.114C749.935 403.607 749.493 406.285 749.622 408.957L641.115 448.315C635.358 437.825 624.207 430.692 611.418 430.692C592.752 430.692 577.568 445.881 577.568 464.542C577.568 466.822 577.801 469.042 578.233 471.198L469.82 510.789C468.201 508.663 466.14 506.895 463.651 505.733C459.603 503.85 455.053 503.642 450.851 505.176C442.179 508.33 437.694 517.956 440.848 526.629C442.035 529.887 444.151 532.539 446.774 534.432L405.518 664.158H393.265C390.523 664.158 388.298 666.378 388.298 669.125V685.938C388.298 699.11 399.017 709.834 412.194 709.834H500.948C514.12 709.834 524.844 699.115 524.844 685.938V669.125C524.844 666.378 522.619 664.158 519.877 664.158H507.624L466.363 534.397C468.643 532.748 470.521 530.597 471.742 527.98C472.905 525.481 473.347 522.804 473.218 520.127L581.601 480.545C584.636 486.178 589.225 490.842 594.783 493.991V664.506C565.642 666.388 542.387 689.986 541.036 719.266H526.105C523.364 719.266 521.139 721.486 521.139 724.233V751.333C521.139 754.079 523.364 756.3 526.105 756.3H696.74C699.486 756.3 701.706 754.079 701.706 751.333V724.233C701.706 721.486 699.486 719.266 696.74 719.266H681.804C680.453 689.981 657.198 666.383 628.057 664.506V493.991C638.323 488.17 645.277 477.158 645.277 464.537C645.277 462.168 645.029 459.858 644.562 457.623L753.02 418.29C754.242 419.899 755.737 421.265 757.48 422.343L716.001 552.774H703.748C701.001 552.774 698.781 555 698.781 557.741V574.554C698.781 587.727 709.5 598.445 722.677 598.445H811.431C824.603 598.445 835.327 587.727 835.327 574.554V557.741C835.322 555 833.102 552.774 830.355 552.774ZM454.244 514.514C455.004 514.236 455.794 514.102 456.573 514.102C457.557 514.102 458.53 514.315 459.449 514.743C461.098 515.508 462.345 516.873 462.966 518.577V518.582C463.582 520.286 463.507 522.133 462.737 523.778C461.972 525.427 460.607 526.673 458.903 527.294C455.386 528.59 451.462 526.753 450.181 523.231C448.894 519.71 450.722 515.796 454.244 514.514ZM514.91 685.933C514.91 693.632 508.647 699.895 500.948 699.895H412.194C404.495 699.895 398.232 693.632 398.232 685.933V674.087H514.91V685.933ZM415.944 664.158L456.186 537.615C456.325 537.62 456.459 537.645 456.593 537.645C456.712 537.645 456.837 537.615 456.961 537.615L497.198 664.158H415.944ZM691.773 746.371H531.072V729.205H545.869H676.976H691.773V746.371ZM671.935 719.271H550.905C552.296 694.213 573.117 674.256 598.513 674.256H599.75H623.085H624.322C649.723 674.256 670.539 694.213 671.935 719.271ZM618.123 664.322H604.722V497.726C606.888 498.163 609.128 498.396 611.423 498.396C613.717 498.396 615.957 498.163 618.123 497.726V664.322ZM611.423 488.468C598.235 488.468 587.507 477.734 587.507 464.547C587.507 451.36 598.235 440.631 611.423 440.631C624.615 440.631 635.343 451.36 635.343 464.547C635.343 477.734 624.61 488.468 611.423 488.468ZM760.103 405.306C760.873 403.662 762.239 402.41 763.942 401.79C764.702 401.511 765.492 401.377 766.277 401.377C767.255 401.377 768.234 401.591 769.148 402.018C770.792 402.788 772.043 404.149 772.664 405.853C773.946 409.379 772.123 413.293 768.601 414.574C766.893 415.2 765.05 415.116 763.396 414.351C761.757 413.586 760.505 412.225 759.884 410.517C759.884 410.512 759.879 410.512 759.879 410.507C759.258 408.803 759.333 406.955 760.103 405.306ZM767.051 425.02L807.676 552.774H726.427L767.051 425.02ZM825.388 574.554C825.388 582.253 819.125 588.517 811.426 588.517H722.677C714.978 588.517 708.715 582.253 708.715 574.554V562.708H719.617C719.622 562.708 719.627 562.708 719.632 562.708C719.637 562.708 719.642 562.708 719.647 562.708H814.456C814.461 562.708 814.466 562.708 814.471 562.708C814.476 562.708 814.481 562.708 814.486 562.708H825.388V574.554Z" fill="black"/>
<path d="M830.355 552.774H818.102L776.34 421.449C782.017 417.127 784.555 409.508 781.992 402.46C780.462 398.258 777.393 394.905 773.34 393.018C769.287 391.131 764.747 390.932 760.545 392.457C756.343 393.987 752.99 397.056 751.098 401.114C749.935 403.607 749.493 406.285 749.622 408.957L641.115 448.315C635.358 437.825 624.207 430.692 611.418 430.692C592.752 430.692 577.568 445.881 577.568 464.542C577.568 466.822 577.801 469.042 578.233 471.198L469.82 510.789C468.201 508.663 466.14 506.895 463.651 505.733C459.603 503.85 455.053 503.642 450.851 505.176C442.179 508.33 437.694 517.956 440.848 526.629C442.035 529.887 444.151 532.539 446.774 534.432L405.518 664.158H393.265C390.523 664.158 388.298 666.378 388.298 669.125V685.938C388.298 699.11 399.017 709.834 412.194 709.834H500.948C514.12 709.834 524.844 699.115 524.844 685.938V669.125C524.844 666.378 522.619 664.158 519.877 664.158H507.624L466.363 534.397C468.643 532.748 470.521 530.597 471.742 527.98C472.905 525.481 473.347 522.804 473.218 520.127L581.601 480.545C584.636 486.178 589.225 490.842 594.783 493.991V664.506C565.642 666.388 542.387 689.986 541.036 719.266H526.105C523.364 719.266 521.139 721.486 521.139 724.233V751.333C521.139 754.079 523.364 756.3 526.105 756.3H696.74C699.486 756.3 701.706 754.079 701.706 751.333V724.233C701.706 721.486 699.486 719.266 696.74 719.266H681.804C680.453 689.981 657.198 666.383 628.057 664.506V493.991C638.323 488.17 645.277 477.158 645.277 464.537C645.277 462.168 645.029 459.858 644.562 457.623L753.02 418.29C754.242 419.899 755.737 421.265 757.48 422.343L716.001 552.774H703.748C701.001 552.774 698.781 555 698.781 557.741V574.554C698.781 587.727 709.5 598.445 722.677 598.445H811.431C824.603 598.445 835.327 587.727 835.327 574.554V557.741C835.322 555 833.102 552.774 830.355 552.774ZM454.244 514.514C455.004 514.236 455.794 514.102 456.573 514.102C457.557 514.102 458.53 514.315 459.449 514.743C461.098 515.508 462.345 516.873 462.966 518.577V518.582C463.582 520.286 463.507 522.133 462.737 523.778C461.972 525.427 460.607 526.673 458.903 527.294C455.386 528.59 451.462 526.753 450.181 523.231C448.894 519.71 450.722 515.796 454.244 514.514ZM514.91 685.933C514.91 693.632 508.647 699.895 500.948 699.895H412.194C404.495 699.895 398.232 693.632 398.232 685.933V674.087H514.91V685.933ZM415.944 664.158L456.186 537.615C456.325 537.62 456.459 537.645 456.593 537.645C456.712 537.645 456.837 537.615 456.961 537.615L497.198 664.158H415.944ZM691.773 746.371H531.072V729.205H545.869H676.976H691.773V746.371ZM671.935 719.271H550.905C552.296 694.213 573.117 674.256 598.513 674.256H599.75H623.085H624.322C649.723 674.256 670.539 694.213 671.935 719.271ZM618.123 664.322H604.722V497.726C606.888 498.163 609.128 498.396 611.423 498.396C613.717 498.396 615.957 498.163 618.123 497.726V664.322ZM611.423 488.468C598.235 488.468 587.507 477.734 587.507 464.547C587.507 451.36 598.235 440.631 611.423 440.631C624.615 440.631 635.343 451.36 635.343 464.547C635.343 477.734 624.61 488.468 611.423 488.468ZM760.103 405.306C760.873 403.662 762.239 402.41 763.942 401.79C764.702 401.511 765.492 401.377 766.277 401.377C767.255 401.377 768.234 401.591 769.148 402.018C770.792 402.788 772.043 404.149 772.664 405.853C773.946 409.379 772.123 413.293 768.601 414.574C766.893 415.2 765.05 415.116 763.396 414.351C761.757 413.586 760.505 412.225 759.884 410.517C759.884 410.512 759.879 410.512 759.879 410.507C759.258 408.803 759.333 406.955 760.103 405.306ZM767.051 425.02L807.676 552.774H726.427L767.051 425.02ZM825.388 574.554C825.388 582.253 819.125 588.517 811.426 588.517H722.677C714.978 588.517 708.715 582.253 708.715 574.554V562.708H719.617C719.622 562.708 719.627 562.708 719.632 562.708C719.637 562.708 719.642 562.708 719.647 562.708H814.456C814.461 562.708 814.466 562.708 814.471 562.708C814.476 562.708 814.481 562.708 814.486 562.708H825.388V574.554Z" stroke="black" stroke-width="5.65919" mask="url(#path-15-outside-1_62_3)"/>
</svg>

After

Width:  |  Height:  |  Size: 18 KiB

@ -13,12 +13,12 @@ namespace Justice.Services
{
private List<Authority> _authorities = new List<Authority>
{
new Authority { Name = "Police", Email = "amritsyangtan1@gmail.com", Latitude = 47.7008, Longitude = 60.3000, AuthorityType = "Accident" },
new Authority { Name = "Police", Email = "amreitsyanf@gmail.com", Latitude = 27.7008, Longitude = 85.3000, AuthorityType = "Accident" },
new Authority { Name = "Fire Department", Email = "amAritsyangtan1@gmail.com", Latitude = 27.7110, Longitude = 85.2915, AuthorityType = "Fire" },
new Authority { Name = "Crime", Email = "amritsyangtan1@gmail.com", Latitude = 47.7110, Longitude = 90.2915, AuthorityType = "Police" },
new Authority { Name = "Crime", Email = "amreitsyanf@gmail.com", Latitude = 30.7110, Longitude = 80.2915, AuthorityType = "Police" },
new Authority { Name = "Ambulance", Email = "ambulance@example.com", Latitude = 27.7052, Longitude = 85.3092, AuthorityType = "Ambulance" }
new Authority { Name = "Police", Email = "", Latitude = 27.7008, Longitude = 27.7008, AuthorityType = "Accident" },
new Authority { Name = "Police", Email = "policed282@gmail.com", Latitude = 27.7008, Longitude = 85.3000, AuthorityType = "Accident" },
new Authority { Name = "Fire Department", Email = "", Latitude = 27.7008, Longitude = 27.7008, AuthorityType = "Fire" },
new Authority { Name = "Crime", Email = "amreitsyanf@gmail.com", Latitude = 27.7008, Longitude = 27.7008, AuthorityType = "Police" },
new Authority { Name = "Crime", Email = "", Latitude = 27.7008, Longitude = 27.7008, AuthorityType = "Police" },
new Authority { Name = "Ambulance", Email = "", Latitude = 27.7008, Longitude = 27.7008, AuthorityType = "Ambulance" }
};
public List<Authority> GetNearByAuthorities(double incidentLatitude, double incidentLongitude, double radiusKm = 10)
{

@ -0,0 +1,35 @@
using Microsoft.Maui.ApplicationModel.Communication;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Justice.Services
{
public class SmsService
{
/// <summary>
/// Sends a bulk SMS message to a list of phone numbers.
/// </summary>
/// <param name="phoneNumbers">List of phone numbers to send the SMS to.</param>
/// <param name="message">The message to send.</param>
public async Task SendBulkSmsAsync(List<string> phoneNumbers, string message)
{
foreach (var number in phoneNumbers)
{
try
{
var sms = new SmsMessage(message, new[] { number });
await Sms.ComposeAsync(sms);
}
catch (FeatureNotSupportedException)
{
Console.WriteLine($"SMS not supported on this device for number {number}.");
}
catch (Exception ex)
{
Console.WriteLine($"Failed to send SMS to {number}: {ex.Message}");
}
}
}
}
}

@ -29,8 +29,11 @@ namespace Justice.Views
try
{
Reports.Clear();
// Fetch reports from the database and sort them by DateTime in descending order
var reportsFromDb = await _dbHelper.GetAllAsync<IncidentReport>();
foreach (var report in reportsFromDb)
var sortedReports = reportsFromDb.OrderByDescending(r => r.DateTime).ToList();
foreach (var report in sortedReports)
{
Reports.Add(report);
}
@ -41,6 +44,7 @@ namespace Justice.Views
}
}
private async void OnUpdateStatusClicked(object sender, EventArgs e)
{
var button = sender as Button;

@ -1,11 +1,10 @@
using Justice.Services;
using Justice.Helpers;
using Justice.Models;
using Microsoft.Maui.Storage;
using System;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
using MailKit;
namespace Justice.Views
{
@ -15,6 +14,16 @@ namespace Justice.Views
private readonly EmailService _emailService;
private string _selectedAttachmentPath; // Store the file path of the selected attachment
// Mapping Incident Types to Authority Emails
private readonly Dictionary<string, string> _incidentTypeToEmail = new()
{
{ "Accident", "amreitsyanf@gmail.com" },
{ "Fire", "policed282@gmail.com" },
{ "Crime", "policed282@gmail.com" },
{ "Medical", "amreitsyanf@gmail.com" },
{ "Other", "general_authority@example.com" }
};
public IncidentReportPage()
{
InitializeComponent();
@ -40,8 +49,6 @@ namespace Justice.Views
{
var (latitude, longitude, address) = await GeolocationHelper.GetLocationAsync();
LocationEntry.Text = address;
}
catch (Exception ex)
{
@ -59,11 +66,11 @@ namespace Justice.Views
try
{
var customFileType = new FilePickerFileType(new Dictionary<DevicePlatform, IEnumerable<string>>
{
{ DevicePlatform.Android, new[] { "*/*" } }, // Allow all files on Android
{ DevicePlatform.iOS, new[] { "public.data" } }, // iOS equivalent for all files
{ DevicePlatform.WinUI, new[] { "*" } } // Allow all files on Windows
});
{
{ DevicePlatform.Android, new[] { "*/*" } }, // Allow all files on Android
{ DevicePlatform.iOS, new[] { "public.data" } }, // iOS equivalent for all files
{ DevicePlatform.WinUI, new[] { "*" } } // Allow all files on Windows
});
var pickOptions = new PickOptions
{
@ -91,7 +98,6 @@ namespace Justice.Views
}
}
private async void OnSubmitReportClicked(object sender, EventArgs e)
{
if (string.IsNullOrWhiteSpace(ReporterNameEntry.Text) ||
@ -101,7 +107,7 @@ namespace Justice.Views
await DisplayAlert("Error", "Please fill in all required fields.", "OK");
return;
}
await SetLoadingStateAsync(true); //show loader
await SetLoadingStateAsync(true); // Show loader
try
{
var (latitude, longitude, address) = await GeolocationHelper.GetLocationAsync();
@ -116,86 +122,39 @@ namespace Justice.Views
DateTime = DateTime.Now,
AttachmentPath = _selectedAttachmentPath
};
//save report to database
// Save report to database
await _databaseHelper.InsertAsync(report);
// get nearby authorities based on incident location
var authorityService = new AuthorityService();
var nearbyAuthorities = authorityService.GetNearByAuthorities(report.Latitude, report.Longitude);
// Prepare the email content
string emailBody = $"Incident Report:\n\n" +
$"Name: {report.ReporterName}\n" +
$"Type: {report.IncidentType}\n" +
$"Description: {report.Description}\n" +
$"Latitude: {report.Latitude}\n" +
$"Longitude: {report.Longitude}\n" +
$"Location: {report.Address}\n" +
$"Date/Time: {report.DateTime}";
// Send email to each nearby authority
foreach (var authority in nearbyAuthorities)
// Get the email address for the selected incident type
string incidentType = report.IncidentType;
if (_incidentTypeToEmail.TryGetValue(incidentType, out var recipientEmail))
{
bool emailSent = await _emailService.SendEmailWithAttachmentAsync(authority.Email, "Incident Report", emailBody, _selectedAttachmentPath);
// Prepare the email content
string emailBody = $"Incident Report:\n\n" +
$"Name: {report.ReporterName}\n" +
$"Type: {report.IncidentType}\n" +
$"Description: {report.Description}\n" +
$"Latitude: {report.Latitude}\n" +
$"Longitude: {report.Longitude}\n" +
$"Location: {report.Address}\n" +
$"Date/Time: {report.DateTime}";
// Send email
bool emailSent = await _emailService.SendEmailWithAttachmentAsync(recipientEmail, "Incident Report", emailBody, _selectedAttachmentPath);
if (emailSent)
{
Console.WriteLine($"Email sent to: {authority.Name}");
Console.WriteLine($"Email sent to: {recipientEmail}");
await DisplayAlert("Success", "Incident report submitted and email sent.", "OK");
}
else
{
await DisplayAlert("Error", "Failed to send email.", "OK");
}
}
await DisplayAlert("Success", "Incident report submitted and email alert sent to nearby authorities.", "OK");
}
catch (Exception ex)
{
await DisplayAlert("Error", $"Failed to submit report:{ex.Message}", "OK");
}
finally
{
await SetLoadingStateAsync(false); //hide loader
}
// var (latitude, longitude, address) = await GeolocationHelper.GetLocationAsync();
/* var report = new IncidentReport
{
ReporterName = ReporterNameEntry.Text.Trim(),
IncidentType = IncidentTypePicker.SelectedItem.ToString(),
Description = DescriptionEditor.Text.Trim(),
Latitude = latitude,
Longitude = longitude,
Address = address,
DateTime = DateTime.Now,
AttachmentPath = _selectedAttachmentPath // Save the attachment path
};
try
{
// Save the report to the database
await _databaseHelper.InsertAsync(report);
// Get the recipient email based on the incident type
string recipientEmail = _emailService.GetRecipientEmail(report.IncidentType);
// Prepare the email content
string emailBody = $"Incident Report:\n\n" +
$"Name: {report.ReporterName}\n" +
$"Type: {report.IncidentType}\n" +
$"Description: {report.Description}\n" +
$"Latitude: {report.Latitude}\n" +
$"Longitude: {report.Longitude}\n" +
$"Location: {report.Address}\n" +
$"Date/Time: {report.DateTime}";
// Send email
bool emailSent = await _emailService.SendEmailWithAttachmentAsync(recipientEmail, "Incident Report", emailBody, _selectedAttachmentPath);
if (emailSent)
{
await DisplayAlert("Success", "Incident report submitted and email alert sent.", "OK");
}
else
{
await DisplayAlert("Error", "Failed to send email alert.", "OK");
await DisplayAlert("Error", "No authority found for the selected incident type.", "OK");
}
}
catch (Exception ex)
@ -204,10 +163,8 @@ namespace Justice.Views
}
finally
{
await SetLoadingStateAsync(false);
await SetLoadingStateAsync(false); // Hide loader
}
*/
}
}
}

@ -20,10 +20,10 @@ namespace Justice.Views
private async void OnLoginButtonClicked(object sender, EventArgs e)
{
var endvalidUsername = "enduser";
var endvalidPassword = "enduser123";
var authvalidUsername = "authuser";
var authvalidPassword = "authuser123";
var endvalidUsername = "euser";
var endvalidPassword = "euser123";
var authvalidUsername = "auser";
var authvalidPassword = "auser123";
var enteredUsername = UsernameEntry?.Text?.Trim();
var enteredPassword = PasswordEntry?.Text?.Trim();

Loading…
Cancel
Save