30117125 4 years ago
parent
commit
6ee5c385e6

+ 22
- 13
src/components/property/propertyImage.vue View File

7
           type="file"
7
           type="file"
8
           accept=".jpeg, .jpg, .gif, .png"
8
           accept=".jpeg, .jpg, .gif, .png"
9
           value="Upload Photo"
9
           value="Upload Photo"
10
-          style="width: 0px;height: 0px;overflow: hidden;"
10
+          style="width: 0px; height: 0px; overflow: hidden"
11
           name="images[]"
11
           name="images[]"
12
           @change="imagesAdd"
12
           @change="imagesAdd"
13
           :multiple="allowMultiple"
13
           :multiple="allowMultiple"
27
           @change="updateList(i)"
27
           @change="updateList(i)"
28
           :disabled="!mayEdit"
28
           :disabled="!mayEdit"
29
         />
29
         />
30
-        <label v-if="allowMultiple" for="checkbox" style="margin: 10px;">Main Image</label>
31
-        <img :src="img" style="height:200px; width:150px; object-fit: cover;" />
30
+        <label v-if="allowMultiple" for="checkbox" style="margin: 10px"
31
+          >Main Image</label
32
+        >
33
+        <img
34
+          :src="img"
35
+          style="height: 200px; width: 150px; object-fit: cover"
36
+        />
32
         <br />
37
         <br />
33
         <!-- <span class="input-group-text" align="center" style="width:150px" @click="removeImage(key)">
38
         <!-- <span class="input-group-text" align="center" style="width:150px" @click="removeImage(key)">
34
           <eva-icon name="trash-2-outline" fill="#60CBEB"></eva-icon>Delete
39
           <eva-icon name="trash-2-outline" fill="#60CBEB"></eva-icon>Delete
35
         </span>-->
40
         </span>-->
36
-        <button v-if="mayEdit" class="imageDeleteButton" @click="removeImage(i)">
41
+        <button
42
+          v-if="mayEdit"
43
+          class="imageDeleteButton"
44
+          @click="removeImage(i)"
45
+        >
37
           <i class="fa fa-trash"></i>
46
           <i class="fa fa-trash"></i>
38
         </button>
47
         </button>
39
       </div>
48
       </div>
48
     loadedImages: Function,
57
     loadedImages: Function,
49
     mayEdit: { type: Boolean, default: () => true },
58
     mayEdit: { type: Boolean, default: () => true },
50
     allowMultiple: { type: Boolean, default: () => true },
59
     allowMultiple: { type: Boolean, default: () => true },
51
-    savedImages: { type: Array, default: () => [] }
60
+    savedImages: { type: Array, default: () => [] },
52
   },
61
   },
53
   data() {
62
   data() {
54
     return {
63
     return {
55
       images: {},
64
       images: {},
56
       image: [],
65
       image: [],
57
       imagesDefault: [],
66
       imagesDefault: [],
58
-      maxSavedIndex: 0
67
+      maxSavedIndex: 0,
59
     };
68
     };
60
   },
69
   },
61
   // Commented out for now.
70
   // Commented out for now.
76
       const files = e.target.files || e.dataTransfer.files;
85
       const files = e.target.files || e.dataTransfer.files;
77
 
86
 
78
       for (let i = 0; i < files.length; i++) {
87
       for (let i = 0; i < files.length; i++) {
79
-        if (files[i].size > 1048576) {
88
+        if (files[i].size > 2097152) {
80
           alert(
89
           alert(
81
-            "One or more of your images are over 1 mb size. Please ensure that all your files are under 1 mb in size."
90
+            "One or more of your images are over 2 mb size. Please ensure that all your files are under 2 mb in size."
82
           );
91
           );
83
           return;
92
           return;
84
         }
93
         }
97
         const reader = new FileReader();
106
         const reader = new FileReader();
98
         var vm = this;
107
         var vm = this;
99
 
108
 
100
-        reader.onload = e => {
109
+        reader.onload = (e) => {
101
           vm.image.push(e.target.result);
110
           vm.image.push(e.target.result);
102
         };
111
         };
103
         reader.readAsDataURL(file[i]);
112
         reader.readAsDataURL(file[i]);
127
         }
136
         }
128
         this.$emit("DefaultImage", index);
137
         this.$emit("DefaultImage", index);
129
       }
138
       }
130
-    }
139
+    },
131
   },
140
   },
132
   watch: {
141
   watch: {
133
     savedImages: {
142
     savedImages: {
142
             this.maxSavedIndex = i;
151
             this.maxSavedIndex = i;
143
           }
152
           }
144
         }
153
         }
145
-      }
146
-    }
147
-  }
154
+      },
155
+    },
156
+  },
148
 };
157
 };
149
 </script>
158
 </script>
150
 
159
 

+ 37
- 16
src/components/timeshare/buy/weekListComponent.vue View File

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

+ 20
- 8
src/components/timeshare/resort/unit/summarySection.vue View File

13
       </div>
13
       </div>
14
       <div class="col-md-12 col-lg-8 summarySection">
14
       <div class="col-md-12 col-lg-8 summarySection">
15
         <h4>
15
         <h4>
16
-          Unit {{ week ? week.unitNumber : "" }} | {{ week ? week.bedrooms : "" }} Bedroom/{{
17
-          week ? week.maxSleep : ""
16
+          Unit {{ week ? week.unitNumber : "" }} |
17
+          {{ week ? week.bedrooms : "" }} Bedroom/{{
18
+            week ? week.maxSleep : ""
18
           }}
19
           }}
19
           Sleeper
20
           Sleeper
20
         </h4>
21
         </h4>
21
-        <p style="text-align:left">Reference: #{{ week.id }}</p>
22
+        <p style="text-align: left">Reference: #{{ week.id }}</p>
22
         <table class="table table-striped">
23
         <table class="table table-striped">
23
           <thead>
24
           <thead>
24
             <tr>
25
             <tr>
35
             <tr>
36
             <tr>
36
               <td>{{ week ? week.unitNumber : "" }}</td>
37
               <td>{{ week ? week.unitNumber : "" }}</td>
37
               <td>{{ week ? week.weekNumber : "" }}</td>
38
               <td>{{ week ? week.weekNumber : "" }}</td>
38
-              <td v-if="week.arrivalDate === '0001-01-01T00:00:00'"></td>
39
+              <td
40
+                v-if="
41
+                  week.arrivalDate === '0001-01-01T00:00:00' ||
42
+                  week.arrivalDate === '1753-01-01T00:00:00'
43
+                "
44
+              ></td>
39
               <td v-else>{{ week.arrivalDate | toDate }}</td>
45
               <td v-else>{{ week.arrivalDate | toDate }}</td>
40
               <td>{{ week ? week.bedrooms : "" }}</td>
46
               <td>{{ week ? week.bedrooms : "" }}</td>
41
               <td>{{ week ? week.season : "" }}</td>
47
               <td>{{ week ? week.season : "" }}</td>
47
 
53
 
48
         <div class="row mt-5">
54
         <div class="row mt-5">
49
           <div align="center" class="col-md-6">
55
           <div align="center" class="col-md-6">
50
-            <a href="javascript:history.back()" class="btn-white-border">Back</a>
56
+            <a href="javascript:history.back()" class="btn-white-border"
57
+              >Back</a
58
+            >
51
           </div>
59
           </div>
52
           <div align="center" class="col-md-6">
60
           <div align="center" class="col-md-6">
53
             <button
61
             <button
54
               class="btn-solid-blue"
62
               class="btn-solid-blue"
55
-              style="color:white"
63
+              style="color: white"
56
               data-toggle="modal"
64
               data-toggle="modal"
57
               data-target="#myModal"
65
               data-target="#myModal"
58
-            >Make an Offer</button>
66
+            >
67
+              Make an Offer
68
+            </button>
59
             <div class="col-md-12">
69
             <div class="col-md-12">
60
               <div id="myModal" class="modal fade" role="dialog">
70
               <div id="myModal" class="modal fade" role="dialog">
61
                 <div class="modal-dialog modal-lg">
71
                 <div class="modal-dialog modal-lg">
62
                   <!-- Modal content-->
72
                   <!-- Modal content-->
63
                   <div class="modal-content">
73
                   <div class="modal-content">
64
                     <div class="modal-header">
74
                     <div class="modal-header">
65
-                      <button type="button" class="close" data-dismiss="modal">&times;</button>
75
+                      <button type="button" class="close" data-dismiss="modal">
76
+                        &times;
77
+                      </button>
66
                     </div>
78
                     </div>
67
                     <div padding-left="20px">
79
                     <div padding-left="20px">
68
                       <makeOffer
80
                       <makeOffer

Loading…
Cancel
Save