Project: Mall App Client: Maiora
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

malls.page.html 5.2 KiB

6 年之前
6 年之前
6 年之前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <ion-content>
  2. <ion-refresher slot="fixed" (ionRefresh)="doRefresh($event)">
  3. <ion-refresher-content
  4. pullingIcon="arrow-down"
  5. pullingText="Pull to refresh"
  6. refreshingSpinner="circles"
  7. refreshingText="Refreshing...">
  8. </ion-refresher-content>
  9. </ion-refresher>
  10. <div class="overlay" [ngClass]="{ 'active' : show_sort_popup }"></div>
  11. <section class="header-bar">
  12. <h2 *ngIf="!showSearchBar"> Find malls near you </h2>
  13. <input type="text" *ngIf="showSearchBar" placeholder="Search Malls" [(ngModel)]="searchTerm" (input)="searchAllMalls()" autocomplete="off" #searchbar>
  14. <button (click)="toggleSearchBar()">
  15. <ion-icon *ngIf="!showSearchBar" src="assets/custom/search.svg"></ion-icon>
  16. <ion-icon *ngIf="showSearchBar" name="close" mode="md"></ion-icon>
  17. </button>
  18. </section>
  19. <div class="top-bar-holder">
  20. <div class="tabs-holder">
  21. <button (click)="selected_tab = 'you'" class="tab" [ngClass]="{'active' : selected_tab === 'you'}"> For you </button>
  22. <button (click)="selected_tab = 'recomended'" class="tab" [ngClass]="{'active' : selected_tab === 'recomended'}"> Recommended </button>
  23. <button (click)="selected_tab = 'trendy'" class="tab" [ngClass]="{'active' : selected_tab === 'trendy'}"> Trendy </button>
  24. <button (click)="selected_tab = 'recent'" class="tab" [ngClass]="{'active' : selected_tab === 'recent'}"> Recent </button>
  25. </div>
  26. </div>
  27. <div class="results-utilities-holder no-padding">
  28. <h5> Categories </h5>
  29. <ion-button disabled color="default" fill="clear"> SEE ALL </ion-button>
  30. </div>
  31. <div class="food-types-holder">
  32. <ng-container *ngFor="let foodType of foodTypes">
  33. <button (click)="getMallsByFoodType(foodType.name)" [ngClass]="{'active' : selectedFoodType === foodType.name}">
  34. <img [src]="foodType.icon" alt=""> <span> {{ foodType.name }} </span>
  35. </button>
  36. </ng-container>
  37. </div>
  38. <div class="results-utilities-holder">
  39. <h5 *ngIf="tempMalls"> {{ tempMalls.length }} MALLS </h5>
  40. <ion-button color="default" fill="clear" (click)="show_sort_popup = true"> SORT / FILTER </ion-button>
  41. </div>
  42. <ion-list lines="none" class="result-list">
  43. <ng-container *ngFor="let mallData of tempMalls;">
  44. <ion-item *ngIf="mallData.mall.outlet && mallData.mall.outlet.length > 0">
  45. <img src="{{ mallData.mall.image_url }}" slot="start">
  46. <ion-label>
  47. <h3>
  48. <span (click)="showMallDetails(mallData)"> {{ mallData.mall.mall_name }} </span>
  49. <ion-icon (click)="toggleMallBookmark(mallData)" name="bookmark"
  50. [ngClass]="{'active' : mallData.mall.is_bookmarked }"></ion-icon>
  51. </h3>
  52. <p class="description" (click)="showMallDetails(mallData)"> {{ mallData.mall.description }} </p>
  53. <div class="offers-holder">
  54. <div class="offer">
  55. <ion-icon src="assets/custom/restaurant.svg"></ion-icon>
  56. Offers: <strong> {{ mallData.mall.offers_count }} </strong>
  57. </div>
  58. </div>
  59. <div class="utilities-holder">
  60. <div class="container">
  61. <div class="utility">
  62. <ion-icon name="star"></ion-icon> {{ mallData.mall.rating }}
  63. </div>
  64. <div class="utility">
  65. <ion-icon name="pin"></ion-icon> {{ mallData.mall.mall_distance }} km
  66. </div>
  67. </div>
  68. <div class="container">
  69. <button class="utility-button" (click)="shareMallDetails(mallData)">
  70. <ion-icon name="share"></ion-icon>
  71. </button>
  72. <a class="utility-button" target="_blank"
  73. href="https://maps.google.com/?q={{ mallData.latitude }},{{ mallData.longitude }}">
  74. <ion-icon name="navigate"></ion-icon>
  75. </a>
  76. </div>
  77. </div>
  78. </ion-label>
  79. </ion-item>
  80. </ng-container>
  81. </ion-list>
  82. <div class="common-semi-modal sort-holder" [ngClass]="{'active' : show_sort_popup }">
  83. <header>
  84. Sort / Filter <button (click)="show_sort_popup = false"> Done </button>
  85. </header>
  86. <div class="sort-buttons-holder">
  87. <button [ngClass]="{'active' : selected_sort === 'name'}"
  88. (click)="sortBy('name')">
  89. <div class="icon-holder"> A-Z </div>
  90. <span> NAME </span>
  91. </button>
  92. <button [ngClass]="{'active' : selected_sort === 'rating'}"
  93. (click)="sortBy('rating')">
  94. <div class="icon-holder"> <ion-icon name="star"></ion-icon> </div>
  95. <span> RATING </span>
  96. </button>
  97. </div>
  98. </div>
  99. </ion-content>