PWA Fundvelo der Caritas.
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

CaritasServiceFundVeloMissingConclusion.razor 7.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. @page "/fundvelo/conclusion_missing"
  2. @using cwebplusApp.Shared.Services;
  3. @using cwebplusApp.Shared.Models;
  4. @inject NavigationManager NavigationManager;
  5. @inject IStringLocalizer<Resources> i18n;
  6. @inject PageHistoryManager PageHistoryManager;
  7. @inject ReportDataProvider ReportDataProvider;
  8. @inject ILFBicycleRest ILFBicycleRest;
  9. @inject Toaster Toaster;
  10. @inject AppState AppState;
  11. <div class="row px-3 h-100">
  12. <div class="row no-gutters align-items-start justify-content-center w-100">
  13. <MatHeadline4 Style="font-family:Ubuntu;padding-top:0.5em">@i18n["Info"]</MatHeadline4>
  14. </div>
  15. <div class="row no-gutters align-items-start justify-content-center w-100">
  16. @if (running) {
  17. <div style="width:48px;margin:0 auto;">
  18. <MatProgressCircle Indeterminate="true" Size="MatProgressCircleSize.Large" />
  19. </div>
  20. <div class="w-100" style="text-align:center;">
  21. <h6 style="font-style:italic;padding-bottom:1em">@i18n["Info.Report.Transmitting"]</h6>
  22. </div>
  23. } else {
  24. if (responseOk) {
  25. <MatHeadline5 Style="font-family:Ubuntu; text-align:center">@i18n["FinishedTextMissing"]</MatHeadline5>
  26. <MatSubtitle1 Class="w-100" Style="font-family:Ubuntu; text-align:left; font-weight:800">@i18n["FinishedTextMissing_Heading1"]</MatSubtitle1>
  27. <ul class="w-100">
  28. <li class="w-100" style="font-family: Ubuntu; text-align: left">@i18n["FinishedTextMissing_2"]</li>
  29. <li class="w-100" style="font-family: Ubuntu; text-align: left">@i18n["FinishedTextMissing_3"]</li>
  30. </ul>
  31. <MatSubtitle1 Class="w-100" Style="font-family:Ubuntu; text-align:left; font-weight:800;padding-top:20px">@i18n["FinishedTextMissing_Heading2"]</MatSubtitle1>
  32. <ul class="w-100">
  33. <li class="w-100" style="font-family: Ubuntu; text-align: left">@i18n["FinishedTextMissing_4"]</li>
  34. <li class="w-100" style="font-family: Ubuntu; text-align: left">@i18n["FinishedTextMissing_5"]</li>
  35. <li class="w-100" style="font-family: Ubuntu; text-align: left">@i18n["FinishedTextMissing_6"]</li>
  36. </ul>
  37. <MatHeadline5 Class="w-100" Style="font-family: Ubuntu; text-align: left;padding-top:20px">@i18n["FinishedTextMissing_Heading3"]</MatHeadline5>
  38. <div class="w-100">
  39. <MatIcon Style="padding-right:1rem">
  40. <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000">
  41. <path d="M0 0h24v24H0V0z" fill="none" />
  42. <path d="M19 17.47c-.88-.07-1.75-.22-2.6-.45l-1.19 1.19c1.2.41 2.48.67 3.8.75v-1.49zM5.03 5c.09 1.32.35 2.59.75 3.8l1.2-1.2c-.23-.84-.38-1.71-.44-2.6H5.03z" opacity=".3" />
  43. <path d="M9.07 7.57C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.49c0-.55-.45-1-1-1-1.24 0-2.45-.2-3.57-.57-.1-.04-.21-.05-.31-.05-.26 0-.51.1-.71.29l-2.2 2.2c-2.83-1.45-5.15-3.76-6.59-6.59l2.2-2.2c.28-.28.36-.67.25-1.02zm7.33 9.45c.85.24 1.72.39 2.6.45v1.49c-1.32-.09-2.59-.35-3.8-.75l1.2-1.19zM5.79 8.8c-.41-1.21-.67-2.48-.76-3.8h1.5c.07.89.22 1.76.46 2.59L5.79 8.8z" />
  44. </svg>
  45. </MatIcon>
  46. <MatSubtitle1 Class="w-100" Style="font-family:Ubuntu; text-align:left; font-weight:800;display:contents">@i18n["FinishedTextMissing_LostOffice_Phone"]</MatSubtitle1>
  47. </div>
  48. <div class="w-100">
  49. <MatIcon Style="padding-right:1rem">
  50. <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000">
  51. <path d="M0 0h24v24H0V0z" fill="none" />
  52. <path d="M20 8l-8 5-8-5v10h16zm0-2H4l8 4.99z" opacity=".3" />
  53. <path d="M4 20h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2zM20 6l-8 4.99L4 6h16zM4 8l8 5 8-5v10H4V8z" />
  54. </svg>
  55. </MatIcon>
  56. <MatSubtitle1 Class="w-100" Style="font-family: Ubuntu;text-align:left; font-weight:800; display:contents">@i18n["FinishedTextMissing_LostOffice_Mail"]</MatSubtitle1>
  57. </div>
  58. <div class="w-100">
  59. <MatIcon Style="padding-right:1rem">
  60. <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000">
  61. <path d="M0 0h24v24H0V0z" fill="none" />
  62. <path d="M12 4C9.24 4 7 6.24 7 9c0 2.85 2.92 7.21 5 9.88 2.11-2.69 5-7 5-9.88 0-2.76-2.24-5-5-5zm0 7.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z" opacity=".3" />
  63. <path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zM7 9c0-2.76 2.24-5 5-5s5 2.24 5 5c0 2.88-2.88 7.19-5 9.88C9.92 16.21 7 11.85 7 9z" />
  64. <circle cx="12" cy="9" r="2.5" />
  65. </svg>
  66. </MatIcon>
  67. <MatSubtitle1 Class="w-100" Style="font-family:Ubuntu; text-align:left; font-weight:800; display:contents">@i18n["FinishedTextMissing_LostOffice_Address"]</MatSubtitle1>
  68. </div>
  69. } else {
  70. <Animate Animation="Animations.ZoomIn" Duration="TimeSpan.FromSeconds(2.5)">
  71. <FailureImage></FailureImage>
  72. </Animate>
  73. }
  74. }
  75. </div>
  76. <div class="row no-gutters align-items-end justify-content-center w-100" style="padding-top: 2em; padding-bottom: 1em">
  77. <div class="col w-100 text-center">
  78. <MatButton Class="w-50" Raised="true" @onclick="Finished">@i18n["Finished"]</MatButton>
  79. </div>
  80. </div>
  81. </div>
  82. @code {
  83. private bool responseOk = false;
  84. private bool running = true;
  85. ReportResponse response;
  86. protected async override void OnInitialized() {
  87. base.OnInitialized();
  88. PageHistoryManager.AddPageToHistory(NavigationManager.Uri);
  89. try {
  90. response = await ILFBicycleRest.SendMissingReport(ReportDataProvider.Report);
  91. responseOk = System.Net.HttpStatusCode.OK == response.StatusCode ? true : false;
  92. } catch (HttpRequestException ex) {
  93. response = new(i18n.GetString("MissingBike"), new string[] { ex.Message });
  94. responseOk = false;
  95. }
  96. running = false;
  97. if (responseOk) {
  98. Toaster.ShowSuccess(i18n.GetString("MissingBike"), response.Message);
  99. PageHistoryManager.Reset();
  100. } else {
  101. Toaster.ShowError(response.Message, response.GetDataAsFormattedList());
  102. }
  103. StateHasChanged();
  104. AppState.NotifyChanged();
  105. }
  106. private void Finished() {
  107. NavigationManager.NavigateTo("caritas_services");
  108. }
  109. }