2 Commits

Author SHA1 Message Date
  bregsiaju 8143c316d4 fix: push conflict 1 year ago
  bregsiaju ae0effe0e7 feat: search menu by name 1 year ago
1 changed files with 9 additions and 7 deletions
  1. 9
    7
      src/components/MenuContainer.vue

+ 9
- 7
src/components/MenuContainer.vue View File

2
   <div class="pb-4">
2
   <div class="pb-4">
3
     <h5 class="mb-3">Menu</h5>
3
     <h5 class="mb-3">Menu</h5>
4
     <p v-if="loading">Loading menu ...</p>
4
     <p v-if="loading">Loading menu ...</p>
5
-    <div v-if="menus.length === 0 || filteredMenus.length === 0" class="row g-4 row-cols-lg-3">
6
-      <p class="w-100 text-center">Menu yang dicari tidak ditemukan.</p>
7
-    </div>
8
-    <div v-else-if="isFilter || isSearch" class="row g-4 row-cols-lg-3">
9
-      <div v-for="menu in filteredMenus" :key="menu.id" class="col">
10
-        <CardMenu :data="menu" />
5
+    <div v-if="isFilter || isSearch">
6
+      <div v-if="filteredMenus.length !== 0" class="row g-4 row-cols-lg-3">
7
+        <div v-for="menu in filteredMenus" :key="menu.id" class="col">
8
+          <CardMenu :data="menu" />
9
+        </div>
10
+      </div>
11
+      <div v-else class="row g-4 row-cols-lg-3">
12
+        <p class="w-100 text-center">Menu yang dicari tidak ditemukan.</p>
11
       </div>
13
       </div>
12
     </div>
14
     </div>
13
-    <div v-else-if="menus" class="row g-4 row-cols-lg-3">
15
+    <div v-else-if="menus.length !== 0" class="row g-4 row-cols-lg-3">
14
       <div v-for="menu in menus" :key="menu.id" class="col">
16
       <div v-for="menu in menus" :key="menu.id" class="col">
15
         <CardMenu :data="menu" />
17
         <CardMenu :data="menu" />
16
       </div>
18
       </div>

Loading…
Cancel
Save