Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 
 
 

233 lignes
10 KiB

  1. <ion-content *ngIf="currentMatch">
  2. <section class="header-with-action-buttons">
  3. <div class="nav">
  4. <button (click)="back()"> <ion-icon name="chevron-back-outline"></ion-icon> <span> BACK </span> </button>
  5. </div>
  6. <header> {{ currentMatch.Teams[currentMatch.Matchdetail.Team_Home].Name_Short }} v/s {{ currentMatch.Teams[currentMatch.Matchdetail.Team_Away].Name_Short }} <br>
  7. <span> {{ currentMatch.Matchdetail.Venue.Name }} </span> </header>
  8. <div class="action">
  9. <button> <ion-icon name="share-social"></ion-icon> </button>
  10. </div>
  11. </section>
  12. <div class="segment-holder">
  13. <section class="segments" [ngClass]="{'active': selectedSegment === 'MATCH' }">
  14. <button (click)="selectedSegment = 'SCORE'"> Scorecard </button>
  15. <button (click)="selectedSegment = 'MATCH'"> Match </button>
  16. </section>
  17. </div>
  18. <div class="score-container" *ngIf="selectedSegment === 'SCORE' && currentMatch.Innings">
  19. <section class="score-card" *ngFor="let inning of getReversedArray(currentMatch.Innings)">
  20. <header>
  21. <h5> {{ currentMatch.Teams[inning.Battingteam].Name_Short }} </h5>
  22. <p> {{ inning.Total }}/{{ inning.Wickets }} <span> ({{ inning.Overs }}) </span> </p>
  23. </header>
  24. <div class="container">
  25. <table>
  26. <thead>
  27. <tr>
  28. <th>
  29. Batsman
  30. </th>
  31. <th>
  32. Score
  33. </th>
  34. <th>
  35. Balls
  36. </th>
  37. <th>
  38. 6s
  39. </th>
  40. <th>
  41. 4s
  42. </th>
  43. <th>
  44. SR
  45. </th>
  46. </tr>
  47. </thead>
  48. <tbody>
  49. <ng-container *ngFor="let batsman of inning.Batsmen">
  50. <tr>
  51. <td>
  52. <label> {{ currentMatch.Teams[inning.Battingteam].Players[batsman.Batsman].Name_Full }} </label> <br>
  53. <span> {{ batsman.Howout }} </span>
  54. </td>
  55. <td>
  56. {{ batsman.Runs }}
  57. </td>
  58. <td>
  59. {{ batsman.Balls }}
  60. </td>
  61. <td>
  62. {{ batsman.Sixes }}
  63. </td>
  64. <td>
  65. {{ batsman.Fours }}
  66. </td>
  67. <td>
  68. {{ batsman.Strikerate }}
  69. </td>
  70. </tr>
  71. </ng-container>
  72. </tbody>
  73. </table>
  74. </div>
  75. <br>
  76. <div class="container">
  77. <table>
  78. <thead>
  79. <tr>
  80. <th>
  81. Bowler
  82. </th>
  83. <th>
  84. Wickets
  85. </th>
  86. <th>
  87. Overs
  88. </th>
  89. <th>
  90. Dots
  91. </th>
  92. <th>
  93. Runs
  94. </th>
  95. <th>
  96. Economy
  97. </th>
  98. </tr>
  99. </thead>
  100. <tbody>
  101. <ng-container *ngFor="let bowler of inning.Bowlers">
  102. <tr>
  103. <td>
  104. <label> {{ currentMatch.Teams[inning.Bowlingteam].Players[bowler.Bowler].Name_Full }} </label>
  105. </td>
  106. <td>
  107. {{ bowler.Wickets }}
  108. </td>
  109. <td>
  110. {{ bowler.Overs }}
  111. </td>
  112. <td>
  113. {{ bowler.Dots }}
  114. </td>
  115. <td>
  116. {{ bowler.Runs }}
  117. </td>
  118. <td>
  119. {{ bowler.Economyrate }}
  120. </td>
  121. </tr>
  122. </ng-container>
  123. </tbody>
  124. </table>
  125. </div>
  126. </section>
  127. </div>
  128. <ng-container *ngIf="selectedSegment === 'MATCH'">
  129. <div class="commentary-container" *ngIf="selectedRoster === 'LIVE' && commentaryList">
  130. <section class="score-card" *ngIf="currentMatch.Innings">
  131. <div class="team" *ngFor="let inning of getReversedArray(currentMatch.Innings)">
  132. <header> <h5> {{ currentMatch.Teams[inning.Battingteam].Name_Short }} </h5> {{ inning.Total }}/{{ inning.Wickets }} <span> ({{ inning.Overs }}) </span> </header>
  133. </div>
  134. </section>
  135. <ul *ngFor="let list of getReversedArray(commentaryList)">
  136. <header>
  137. <h5> Innings #{{ list.InningNo }} </h5>
  138. </header>
  139. <li *ngFor="let commentary of list.Commentary">
  140. <div class="over-data">
  141. <label *ngIf="commentary.Isball"> {{ commentary.Over }} </label>
  142. <span *ngIf="commentary.Isball"
  143. [ngClass]="{'boundary' : commentary.Runs === '4',
  144. 'six': commentary.Runs === '6',
  145. 'wicket': commentary.Iswicket }"> {{ commentary.Runs }} </span>
  146. <span *ngIf="!commentary.Isball">
  147. <ion-icon name="mic-outline"></ion-icon>
  148. </span>
  149. </div>
  150. <div class="comment">
  151. <p>
  152. {{ commentary.Commentary }}
  153. </p>
  154. <div class="small-stats" *ngIf="commentary.Batsman_Name">
  155. <span> <strong> Score: </strong> {{ commentary.Score }} </span>
  156. <span> <strong> Strike: </strong> {{ commentary.Batsman_Name }} </span>
  157. <span> <strong> Bowling: </strong> {{ commentary.Bowler_Name }} </span>
  158. </div>
  159. </div>
  160. </li>
  161. </ul>
  162. </div>
  163. <div *ngIf="selectedSegment === 'MATCH'" class="team-selection" [ngClass]="{'active': selectedRoster === 'AWAY', 'live': selectedRoster === 'LIVE', 'change-bg' : selectedRoster !== 'LIVE' }">
  164. <button (click)="selectedRoster = 'HOME'"> {{ currentMatch.Teams[currentMatch.Matchdetail.Team_Home].Name_Short }} </button>
  165. <button class="live" (click)="selectedRoster = 'LIVE'"> <span></span> </button>
  166. <button (click)="selectedRoster = 'AWAY'"> {{ currentMatch.Teams[currentMatch.Matchdetail.Team_Away].Name_Short }} </button>
  167. </div>
  168. <section class="player-list" *ngIf="selectedRoster === 'HOME'">
  169. <ul>
  170. <li *ngFor="let player of getArrayOfPlayers(currentMatch.Teams[currentMatch.Matchdetail.Team_Home].Players)" (click)="selectPlayerDetails(player)">
  171. <label> {{ currentMatch.Teams[currentMatch.Matchdetail.Team_Home].Players[player].Position }} </label>
  172. <div class="details">
  173. <h4> {{ currentMatch.Teams[currentMatch.Matchdetail.Team_Home].Players[player].Name_Full }} </h4>
  174. <img *ngIf="currentMatch.Teams[currentMatch.Matchdetail.Team_Home].Players[player].Skill === '4'" src="assets/icons/gloves.png">
  175. <img *ngIf="currentMatch.Teams[currentMatch.Matchdetail.Team_Home].Players[player].Skill === '1'" src="assets/icons/batsman.png">
  176. <img *ngIf="currentMatch.Teams[currentMatch.Matchdetail.Team_Home].Players[player].Skill === '2'" src="assets/icons/ball.png">
  177. </div>
  178. </li>
  179. </ul>
  180. </section>
  181. <section class="player-list" *ngIf="selectedRoster === 'AWAY'">
  182. <ul>
  183. <li *ngFor="let player of getArrayOfPlayers(currentMatch.Teams[currentMatch.Matchdetail.Team_Away].Players)" (click)="selectPlayerDetails(player)">
  184. <label> {{ currentMatch.Teams[currentMatch.Matchdetail.Team_Away].Players[player].Position }} </label>
  185. <div class="details">
  186. <h4> {{ currentMatch.Teams[currentMatch.Matchdetail.Team_Away].Players[player].Name_Full }} </h4>
  187. <img *ngIf="currentMatch.Teams[currentMatch.Matchdetail.Team_Away].Players[player].Skill === '4'" src="assets/icons/gloves.png">
  188. <img *ngIf="currentMatch.Teams[currentMatch.Matchdetail.Team_Away].Players[player].Skill === '1'" src="assets/icons/batsman.png">
  189. <img *ngIf="currentMatch.Teams[currentMatch.Matchdetail.Team_Away].Players[player].Skill === '2'" src="assets/icons/ball.png">
  190. </div>
  191. </li>
  192. </ul>
  193. </section>
  194. </ng-container>
  195. <section class="player-details" *ngIf="isPlayerSelected">
  196. <button class="close-button" (click)="isPlayerSelected = false">
  197. <ion-icon name="close-outline"></ion-icon>
  198. </button>
  199. <app-player-details [playerId]="selectedPlayer"></app-player-details>
  200. </section>
  201. </ion-content>