30117125 4 年之前
父節點
當前提交
3f1c44d87e

+ 8
- 0
src/App.vue 查看文件

136
   background-color: #ff8344;
136
   background-color: #ff8344;
137
   color: white;
137
   color: white;
138
 }
138
 }
139
+.redText {
140
+  background-color: #eb5252;
141
+  color: white;
142
+}
143
+.greenText {
144
+  background-color: #43e243;
145
+  color: white;
146
+}
139
 .noWeeks {
147
 .noWeeks {
140
   background-color: #ff4444;
148
   background-color: #ff4444;
141
 }
149
 }

+ 10
- 8
src/components/admin/property/propertyList.vue 查看文件

276
       }
276
       }
277
     });
277
     });
278
   },
278
   },
279
-  // watch: {
280
-  //   sortKey: {
281
-  //     immediate: true,
282
-  //     handler(val, oldVal) {
283
-  //       return this.FilteredProperties;
284
-  //     },
285
-  //   },
286
-  // },
279
+  watch: {
280
+    filter: {
281
+      immediate: true,
282
+      handler(val, oldVal) {
283
+        if (val != oldVal) {
284
+          this.currentPage = 1;
285
+        }
286
+      },
287
+    },
288
+  },
287
 };
289
 };
288
 </script>
290
 </script>
289
 
291
 

+ 30
- 2
src/components/property/editProperty/editProperty.vue 查看文件

26
                     v-model="property.statusString"
26
                     v-model="property.statusString"
27
                     @change="StatusChanged"
27
                     @change="StatusChanged"
28
                   >
28
                   >
29
-                    <option v-for="(item, i) in statuses" :key="i">{{ item }}</option>
29
+                    <option v-for="(item, i) in Statuses" :key="i">{{ item }}</option>
30
                   </select>
30
                   </select>
31
                 </div>
31
                 </div>
32
               </div>
32
               </div>
135
                       </select>
135
                       </select>
136
                     </div>
136
                     </div>
137
                   </div>
137
                   </div>
138
-                  <div class="row my-3">
138
+                  <div v-if="!property.isSale" class="row my-3">
139
                     <div class="col-md-12">
139
                     <div class="col-md-12">
140
+                      Date Available
140
                       <input
141
                       <input
141
                         type="date"
142
                         type="date"
142
                         class="form-control uniInput"
143
                         class="form-control uniInput"
146
                       />
147
                       />
147
                     </div>
148
                     </div>
148
                   </div>
149
                   </div>
150
+                  <div
151
+                    class="row my-3"
152
+                    v-if="property.statusString === 'Sold' || property.statusString ==='Rented Out'"
153
+                  >
154
+                    <div class="col-md-12">
155
+                      Hide Property After
156
+                      <input
157
+                        type="date"
158
+                        class="form-control uniInput"
159
+                        name="date"
160
+                        v-model="property.cutOffDisplayDateString"
161
+                      />
162
+                    </div>
163
+                  </div>
164
+
149
                   <div class="row my-3">
165
                   <div class="row my-3">
150
                     <br />
166
                     <br />
151
                   </div>
167
                   </div>
540
       }
556
       }
541
       return list;
557
       return list;
542
     },
558
     },
559
+    Statuses() {
560
+      const list = [];
561
+      for (let i = 0; i < this.statuses.length; i++) {
562
+        if (this.property.isSale && this.statuses[i] !== "Rented Out") {
563
+          list.push(this.statuses[i]);
564
+        }
565
+        if (!this.property.isSale && this.statuses[i] !== "Sold") {
566
+          list.push(this.statuses[i]);
567
+        }
568
+      }
569
+      return list;
570
+    },
543
   },
571
   },
544
 };
572
 };
545
 </script>
573
 </script>

+ 14
- 14
src/components/property/propertyCard.vue 查看文件

14
                   <h3>{{ currentProperty.displayPrice }}</h3>
14
                   <h3>{{ currentProperty.displayPrice }}</h3>
15
                   <div>
15
                   <div>
16
                     <img
16
                     <img
17
-                      style="max-height:165px; object-fit: cover;"
17
+                      style="height:165px; object-fit: cover;"
18
                       :src="currentProperty.displayImage"
18
                       :src="currentProperty.displayImage"
19
                       alt
19
                       alt
20
                     />
20
                     />
26
                   {{ currentProperty.propertyReference }}
26
                   {{ currentProperty.propertyReference }}
27
                 </p>
27
                 </p>
28
                 <p
28
                 <p
29
-                  v-if="!currentProperty.isSale"
30
-                  :class="[currentProperty.hasPendingOffer ? 'pendingOffer' : 'normalText']"
29
+                  v-if="currentProperty.displayText != ''"
30
+                  :class="[currentProperty.displayColor === 'green' ? 'greenText' : currentProperty.displayColor === 'orange' ? 'pendingOffer' : currentProperty.displayColor === 'red' ? 'redText' : 'normalText']"
31
                 >
31
                 >
32
-                  <strong>{{ currentProperty.available }}</strong>
33
-                </p>
34
-                <p
35
-                  v-if="currentProperty.isSale && currentProperty.hasPendingOffer"
36
-                  class="pendingOffer"
37
-                >
38
-                  <strong>{{ currentProperty.available }}</strong>
32
+                  <strong>{{ currentProperty.displayText }}</strong>
39
                 </p>
33
                 </p>
40
               </div>
34
               </div>
41
             </router-link>
35
             </router-link>
46
                 <div class="feature-top pt-3 mb-2">
40
                 <div class="feature-top pt-3 mb-2">
47
                   <h3>{{ currentProperty.displayPrice }}</h3>
41
                   <h3>{{ currentProperty.displayPrice }}</h3>
48
                   <img
42
                   <img
49
-                    style="max-height:165px; object-fit: cover;"
43
+                    style="height:165px; object-fit: cover;"
50
                     :src="currentProperty.displayImage"
44
                     :src="currentProperty.displayImage"
51
                     alt
45
                     alt
52
                   />
46
                   />
56
                   <strong>Property Reference</strong>
50
                   <strong>Property Reference</strong>
57
                   {{ currentProperty.propertyReference }}
51
                   {{ currentProperty.propertyReference }}
58
                 </p>
52
                 </p>
53
+                <p
54
+                  v-if="currentProperty.displayText != ''"
55
+                  :class="[currentProperty.displayColor === 'green' ? 'greenText' : currentProperty.displayColor === 'orange' ? 'pendingOffer' : currentProperty.displayColor === 'red' ? 'redText' : 'normalText']"
56
+                >
57
+                  <strong>{{ currentProperty.displayText }}</strong>
58
+                </p>
59
               </div>
59
               </div>
60
             </router-link>
60
             </router-link>
61
           </div>
61
           </div>
73
   props: {
73
   props: {
74
     properties: { type: Array, default: () => [] },
74
     properties: { type: Array, default: () => [] },
75
     showSort: { type: Boolean, default: true },
75
     showSort: { type: Boolean, default: true },
76
-    salesType: { type: String, default: "Rent" }
76
+    salesType: { type: String, default: "Rent" },
77
   },
77
   },
78
   methods: {
78
   methods: {
79
     sortHighPrice() {
79
     sortHighPrice() {
111
       }
111
       }
112
 
112
 
113
       return this.properties.sort(compare);
113
       return this.properties.sort(compare);
114
-    }
115
-  }
114
+    },
115
+  },
116
 };
116
 };
117
 </script>
117
 </script>
118
 
118
 

+ 8
- 14
src/components/property/propertyCardSearch.vue 查看文件

13
                 <div class="feature-top pt-3 mb-2">
13
                 <div class="feature-top pt-3 mb-2">
14
                   <h3 style="color:white !important">{{ currentProperty.displayPrice }}</h3>
14
                   <h3 style="color:white !important">{{ currentProperty.displayPrice }}</h3>
15
                   <img
15
                   <img
16
-                    style="max-height:165px; object-fit: cover;"
16
+                    style="height:165px; object-fit: cover;"
17
                     :src="currentProperty.displayImage"
17
                     :src="currentProperty.displayImage"
18
                     alt
18
                     alt
19
                   />
19
                   />
24
                   {{ currentProperty.propertyReference }}
24
                   {{ currentProperty.propertyReference }}
25
                 </p>
25
                 </p>
26
                 <p
26
                 <p
27
-                  v-if="!currentProperty.isSale"
28
-                  :class="[currentProperty.hasPendingOffer ? 'pendingOffer' : 'normalText']"
27
+                  v-if="currentProperty.displayText != ''"
28
+                  :class="[currentProperty.displayColor === 'green' ? 'greenText' : currentProperty.displayColor === 'orange' ? 'pendingOffer' : currentProperty.displayColor === 'red' ? 'redText' : 'normalText']"
29
                 >
29
                 >
30
-                  <strong>{{ currentProperty.available }}</strong>
31
-                </p>
32
-                <p
33
-                  v-if="currentProperty.isSale && currentProperty.hasPendingOffer"
34
-                  class="pendingOffer"
35
-                >
36
-                  <strong>{{ currentProperty.available }}</strong>
30
+                  <strong>{{ currentProperty.displayText }}</strong>
37
                 </p>
31
                 </p>
38
               </div>
32
               </div>
39
             </router-link>
33
             </router-link>
44
                 <div class="feature-top pt-3 mb-2">
38
                 <div class="feature-top pt-3 mb-2">
45
                   <h3>{{ currentProperty.displayPrice }}</h3>
39
                   <h3>{{ currentProperty.displayPrice }}</h3>
46
                   <img
40
                   <img
47
-                    style="max-height:165px; object-fit: cover;"
41
+                    style="height:165px; object-fit: cover;"
48
                     :src="currentProperty.displayImage"
42
                     :src="currentProperty.displayImage"
49
                     alt
43
                     alt
50
                   />
44
                   />
71
   props: {
65
   props: {
72
     properties: { type: Array, default: () => [] },
66
     properties: { type: Array, default: () => [] },
73
     showSort: { type: Boolean, default: true },
67
     showSort: { type: Boolean, default: true },
74
-    salesType: { type: String, default: "Rent" }
68
+    salesType: { type: String, default: "Rent" },
75
   },
69
   },
76
   methods: {
70
   methods: {
77
     sortHighPrice() {
71
     sortHighPrice() {
109
       }
103
       }
110
 
104
 
111
       return this.properties.sort(compare);
105
       return this.properties.sort(compare);
112
-    }
113
-  }
106
+    },
107
+  },
114
 };
108
 };
115
 </script>
109
 </script>
116
 
110
 

Loading…
取消
儲存