Procházet zdrojové kódy

Default date - do not display

master
GJWilliams87 před 4 roky
rodič
revize
0d3d76605f
1 změnil soubory, kde provedl 37 přidání a 16 odebrání
  1. 37
    16
      src/components/timeshare/buy/weekListComponent.vue

+ 37
- 16
src/components/timeshare/buy/weekListComponent.vue Zobrazit soubor

@@ -22,9 +22,19 @@
22 22
             <td>#{{ item.id }}</td>
23 23
             <td>{{ item.unitNumber }}</td>
24 24
             <td>{{ item.weekNumber }}</td>
25
-            <td v-if="item.arrivalDate === '0001-01-01T00:00:00'"></td>
25
+            <td
26
+              v-if="
27
+                item.arrivalDate === '0001-01-01T00:00:00' ||
28
+                item.arrivalDate === '1753-01-01T00:00:00'
29
+              "
30
+            ></td>
26 31
             <td v-else>{{ item.arrivalDate | toDate }}</td>
27
-            <td v-if="item.departureDate === '0001-01-01T00:00:00'"></td>
32
+            <td
33
+              v-if="
34
+                item.departureDate === '0001-01-01T00:00:00' ||
35
+                item.departureDate === '1753-01-01T00:00:00'
36
+              "
37
+            ></td>
28 38
             <td v-else>{{ item.departureDate | toDate }}</td>
29 39
             <td>{{ item.bedrooms }}</td>
30 40
             <td>{{ item.season }}</td>
@@ -40,7 +50,12 @@
40 50
             <!-- <td>{{item.status ? item.status.description : ''}}</td> -->
41 51
 
42 52
             <td>
43
-              <a v-on:click="View(item)" class="btn-solid-blue" style="color:white">YES</a>
53
+              <a
54
+                v-on:click="View(item)"
55
+                class="btn-solid-blue"
56
+                style="color: white"
57
+                >YES</a
58
+              >
44 59
             </td>
45 60
             <!-- <div class="col-md-12">
46 61
                 <button type="button" class="btn btn-b-n" >View</button>
@@ -56,11 +71,13 @@
56 71
             v-model="visibleItemsPerPageCount"
57 72
             @change="onChangeItemsPerPage()"
58 73
           >
59
-            <option v-for="(item, i) in visibleItemSelector" :key="i">{{ item }}</option>
74
+            <option v-for="(item, i) in visibleItemSelector" :key="i">
75
+              {{ item }}
76
+            </option>
60 77
           </select>
61 78
         </div>
62 79
         <div class="col-md-10 mt-4">
63
-          <div style="float:right">
80
+          <div style="float: right">
64 81
             <BasePagination
65 82
               :currentPage="currentPage"
66 83
               :pageCount="PageCount"
@@ -83,7 +100,7 @@
83 100
             class="img-fluid"
84 101
             src="/img/kloader.gif"
85 102
             alt="UVProp logo"
86
-            style="width:128px;height:128px;"
103
+            style="width: 128px; height: 128px"
87 104
           />
88 105
         </div>
89 106
         <div v-else>No Results Found</div>
@@ -103,27 +120,27 @@ export default {
103 120
     resortCode: undefined,
104 121
     userId: undefined,
105 122
     currentPage: {
106
-      default: 1
107
-    }
123
+      default: 1,
124
+    },
108 125
   },
109 126
   data() {
110 127
     return {
111 128
       visibleItemsPerPageCount: 8,
112
-      visibleItemSelector: [5, 8, 10, 20, 50, 100]
129
+      visibleItemSelector: [5, 8, 10, 20, 50, 100],
113 130
     };
114 131
   },
115 132
   components: {
116
-    BasePagination
133
+    BasePagination,
117 134
   },
118 135
   computed: {
119 136
     ...mapState("weekList", ["weeks", "status"]),
120 137
     ...mapGetters({
121 138
       filteredWeeks: "weekList/filteredWeeks",
122
-      getRegions: "weekList/getRegions"
139
+      getRegions: "weekList/getRegions",
123 140
     }),
124 141
     DisplayItems() {
125 142
       const list = [];
126
-      this.filteredWeeks.forEach(week => {
143
+      this.filteredWeeks.forEach((week) => {
127 144
         if (week.publish) {
128 145
           list.push(week);
129 146
         }
@@ -140,7 +157,7 @@ export default {
140 157
       return this.visibleItemsPerPageCount !== 0
141 158
         ? Math.ceil(this.filteredWeeks.length / this.visibleItemsPerPageCount)
142 159
         : 1;
143
-    }
160
+    },
144 161
   },
145 162
   mounted() {
146 163
     if (this.resortCode) {
@@ -150,7 +167,11 @@ export default {
150 167
     //this.getWeeks();
151 168
   },
152 169
   methods: {
153
-    ...mapActions("weekList", ["getWeeks", "applyResortFilter", "getByResortCode"]),
170
+    ...mapActions("weekList", [
171
+      "getWeeks",
172
+      "applyResortFilter",
173
+      "getByResortCode",
174
+    ]),
154 175
     View(item) {
155 176
       this.$router.push(`/resort/${item.resort.resortCode}/${item.unitNumber}`);
156 177
     },
@@ -170,8 +191,8 @@ export default {
170 191
         default:
171 192
           this.currentPage = value;
172 193
       }
173
-    }
174
-  }
194
+    },
195
+  },
175 196
 };
176 197
 </script>
177 198
 

Načítá se…
Zrušit
Uložit