Explorar el Código

WeekList

master
Kobus hace 5 años
padre
commit
b13a966bcb

+ 7
- 1
src/components/timeshare/buy/weekListComponent.vue Ver fichero

3
     <table class="table table-bordered">
3
     <table class="table table-bordered">
4
       <thead>
4
       <thead>
5
         <tr>
5
         <tr>
6
+          <th>Region</th>
6
           <th>Resort</th>
7
           <th>Resort</th>
7
           <th>Unit Number</th>
8
           <th>Unit Number</th>
8
           <th>Week Number</th>
9
           <th>Week Number</th>
10
+          <th>Arrival Date</th>
11
+          <th>Departure Date</th>
9
           <th>Bedrooms</th>
12
           <th>Bedrooms</th>
10
           <th>Price</th>
13
           <th>Price</th>
11
           <th>Status</th>
14
           <th>Status</th>
14
       </thead>
17
       </thead>
15
       <tbody>
18
       <tbody>
16
         <tr v-for="(item, i) in filteredWeeks" :key="i">
19
         <tr v-for="(item, i) in filteredWeeks" :key="i">
17
-          <td>{{item.resort.resortName}}</td>
20
+          <td>{{item.region ? item.region.regionName : ''}}</td>
21
+          <td>{{item.resort ? item.resort.resortName : ''}}</td>
18
           <td>{{item.unitNumber}}</td>
22
           <td>{{item.unitNumber}}</td>
19
           <td>{{item.weekNumber}}</td>
23
           <td>{{item.weekNumber}}</td>
24
+          <td>{{item.arrivalDate}}</td>
25
+          <td>{{item.departureDate}}</td>
20
           <td>{{item.bedrooms}}</td>
26
           <td>{{item.bedrooms}}</td>
21
           <td>{{item.sellPrice | toCurrency}}</td>
27
           <td>{{item.sellPrice | toCurrency}}</td>
22
           <td>{{item.status ? item.status.description : ''}}</td>
28
           <td>{{item.status ? item.status.description : ''}}</td>

+ 3
- 3
src/store/modules/timeshare/weekList.js Ver fichero

33
       const {
33
       const {
34
         filter,
34
         filter,
35
       } = state;
35
       } = state;
36
-      console.log(JSON.stringify(weekList));
36
+      // console.log(JSON.stringify(weekList));
37
       if (filter) {
37
       if (filter) {
38
         if (filter.region) {
38
         if (filter.region) {
39
-          weekList = _.filter(weekList, x => x.region
40
-            && x.region.regionCode === filter.region.regionCode);
39
+          weekList = _.filter(weekList, x => x.region && x.region.regionCode === filter.region
40
+            .regionCode);
41
         }
41
         }
42
         if (filter.resort) {
42
         if (filter.resort) {
43
           weekList = _.filter(weekList, x => x.resort.resortCode
43
           weekList = _.filter(weekList, x => x.resort.resortCode

Loading…
Cancelar
Guardar