30117125 4 년 전
부모
커밋
79123394fa

+ 9
- 7
src/App.vue 파일 보기

@@ -20,12 +20,12 @@ export default {
20 20
   name: "app",
21 21
   data() {
22 22
     return {
23
-      isLandingPage: false
23
+      isLandingPage: false,
24 24
     };
25 25
   },
26 26
   components: {
27 27
     NavBar,
28
-    FooterSection
28
+    FooterSection,
29 29
   },
30 30
 
31 31
   methods: {
@@ -34,8 +34,8 @@ export default {
34 34
     },
35 35
     setLandingPage(item) {
36 36
       this.isLandingPage = item;
37
-    }
38
-  }
37
+    },
38
+  },
39 39
 };
40 40
 </script>
41 41
 
@@ -123,16 +123,18 @@ html {
123 123
   width: 100px;
124 124
 }
125 125
 .top-left {
126
-  position: absolute;
127
-  top: 8px;
128
-  width: 350px;
126
+  position: centre;
127
+  top: 5px;
128
+  width: 380px;
129 129
   color: white;
130 130
 }
131 131
 .normalText {
132 132
   background-color: #60cbeb;
133
+  color: white;
133 134
 }
134 135
 .pendingOffer {
135 136
   background-color: #ff8344;
137
+  color: white;
136 138
 }
137 139
 .noWeeks {
138 140
   background-color: #ff4444;

+ 11
- 5
src/components/admin/status/editTimeShareAdminPage.vue 파일 보기

@@ -72,8 +72,7 @@
72 72
                   <select
73 73
                     id="weekInfoRegionSelect"
74 74
                     class="form-control uniSelect"
75
-                    v-model="sellItem.region"
76
-                    @change="regionChange()"
75
+                    v-model="week.region"
77 76
                     style="font-size: 15px"
78 77
                   >
79 78
                     <option v-for="(region, r) in regions" :key="r" :value="region">{{
@@ -504,12 +503,12 @@
504 503
               </div>
505 504
             </div>
506 505
             <div class="text-center col-12" v-if="CanSave">
507
-              <button class="btn-solid-blue" v-if="!sellItem.id" @click="submitSale()">
506
+              <button class="btn-solid-blue">
508 507
                 Save
509 508
               </button>
510 509
             </div>
511 510
             <div class="text-center col-12">
512
-              <button class="btn-solid-blue" @click="paygateRedirect()">Back</button>
511
+              <button class="btn-solid-blue" v-on:click="backToListView()">Back</button>
513 512
             </div>
514 513
             <br />
515 514
             <br />
@@ -544,7 +543,8 @@ export default {
544 543
     return {
545 544
       wait: false,
546 545
       userLoggedIn: Log.isLoggedIn(),
547
-      listedWeekId: this.$route.params.id
546
+      listedWeekId: this.$route.params.id,
547
+      selectedItems: [],
548 548
     };
549 549
   },
550 550
   components: {
@@ -558,6 +558,7 @@ export default {
558 558
     this.initTimeshare(0);
559 559
     this.getIndividual(Log.getUser().id);
560 560
     this.getBanks();
561
+    this.getWeek(this.$route.params.id)
561 562
   },
562 563
   created() {
563 564
     this.initTimeshare(this.weekId);
@@ -579,6 +580,7 @@ export default {
579 580
     ]),
580 581
     ...mapState("individual", ["indiv"]),
581 582
     ...mapState("authentication", ["isLoggedIn"]),
583
+    ...mapState("myWeeks", ["items", "week"]),
582 584
     ...mapGetters({
583 585
       user: "authentication/getUser",
584 586
       person: "authentication/getPerson"
@@ -630,6 +632,7 @@ export default {
630 632
     ...mapActions("timeshare", ["initTimeshare", "onResortChange", "saveWeek", "getBlankWeek"]),
631 633
     ...mapActions("payment", ["addPayment"]),
632 634
     ...mapActions("bank", ["getBanks"]),
635
+    ...mapActions("myWeeks", ["getItems", "getWeek"]),
633 636
     newSale() {
634 637
       this.weekId = 0;
635 638
       this.getBlankWeek();
@@ -712,6 +715,9 @@ export default {
712 715
       } else {
713 716
         this.sellItem.mandateDate = undefined;
714 717
       }
718
+    },
719
+    backToListView() {
720
+      this.$router.push("/status/timeshareAdmin");
715 721
     }
716 722
   }
717 723
 };

+ 7
- 9
src/components/property/commercial/latestListings.vue 파일 보기

@@ -12,9 +12,9 @@
12 12
         <div class="row">
13 13
           <div class="col">
14 14
             <propertyCard
15
-              v-if="properties.length > 0"
15
+              v-if="latestProperties.length > 0"
16 16
               name="propertyholder"
17
-              :properties="properties"
17
+              :properties="latestProperties"
18 18
               :showSort="false"
19 19
             />
20 20
           </div>
@@ -30,19 +30,17 @@ import { mapState, mapActions } from "vuex";
30 30
 import propertyCard from "../propertyCard";
31 31
 export default {
32 32
   components: {
33
-    propertyCard
33
+    propertyCard,
34 34
   },
35 35
   methods: {
36
-    ...mapActions("propertySearch", ["searchProperties"])
36
+    ...mapActions("propertySearch", ["searchLatestPropertiesType"]),
37 37
   },
38 38
   mounted() {
39
-    this.propertySearch.propertyUsageType = "Commercial";
40
-
41
-    this.searchProperties(this.propertySearch);
39
+    this.searchLatestPropertiesType("Commercial");
42 40
   },
43 41
   computed: {
44
-    ...mapState("propertySearch", ["properties", "propertySearch"])
45
-  }
42
+    ...mapState("propertySearch", ["latestProperties"]),
43
+  },
46 44
 };
47 45
 </script>
48 46
 

+ 85
- 8
src/components/property/editProperty/editProperty.vue 파일 보기

@@ -14,13 +14,18 @@
14 14
                     class="form-control uniSelect"
15 15
                     v-model="property.propertyUsageType"
16 16
                     @change="UpdateUsageType"
17
+                    :disabled="!canEdit"
17 18
                   >
18 19
                     <option>Commercial</option>
19 20
                     <option>Residential</option>
20 21
                   </select>
21 22
                 </div>
22 23
                 <div class="col-md-6">
23
-                  <select class="form-control uniSelect" v-model="property.statusString">
24
+                  <select
25
+                    class="form-control uniSelect"
26
+                    v-model="property.statusString"
27
+                    @change="StatusChanged"
28
+                  >
24 29
                     <option v-for="(item, i) in statuses" :key="i">{{ item }}</option>
25 30
                   </select>
26 31
                 </div>
@@ -35,6 +40,7 @@
35 40
                     type="text"
36 41
                     name="propertyName"
37 42
                     v-model="property.propertyName"
43
+                    :disabled="!canEdit"
38 44
                   />
39 45
                 </div>
40 46
                 <div class="col-md-6">
@@ -46,6 +52,7 @@
46 52
                     type="text"
47 53
                     name="propertyRef"
48 54
                     v-model="property.propertyRef"
55
+                    :disabled="!canEdit"
49 56
                   />
50 57
                 </div>
51 58
               </div>
@@ -56,6 +63,7 @@
56 63
                     name="propertyType"
57 64
                     id="propertyType"
58 65
                     v-model="property.propertyTypeId"
66
+                    :disabled="!canEdit"
59 67
                   >
60 68
                     <option value="0">Please select type *</option>
61 69
                     <option
@@ -75,6 +83,7 @@
75 83
                     name="unit"
76 84
                     id="unit"
77 85
                     v-model="property.unit"
86
+                    :disabled="!canEdit"
78 87
                   />
79 88
                 </div>
80 89
               </div>
@@ -83,11 +92,13 @@
83 92
                   <mapSection
84 93
                     v-on:map-location="updateLocation"
85 94
                     :savedCoords="property.propertCoords"
95
+                    :canEdit="canEdit"
86 96
                   />
87 97
                   <input
88 98
                     type="checkbox"
89 99
                     v-model="property.showAddress"
90 100
                     style="margin-right: 10px; margin-top: 10px;"
101
+                    :disabled="!canEdit"
91 102
                   />
92 103
                   <label>Show address on listing</label>
93 104
                 </div>
@@ -107,14 +118,16 @@
107 118
                         name="price"
108 119
                         id="price"
109 120
                         v-model="property.price"
121
+                        :disabled="!canEdit"
110 122
                       />
111 123
                     </div>
112
-                    <div v-if="property.salesTypeString === 'Rental'" class="col-md-6">
124
+                    <div v-if="!property.isSale" class="col-md-6">
113 125
                       <select
114 126
                         class="form-control uniSelect"
115 127
                         name="propertyType"
116 128
                         id="propertyType"
117 129
                         v-model="property.pricePer"
130
+                        :disabled="!canEdit"
118 131
                       >
119 132
                         <option value>Please select</option>
120 133
                         <option value="Month">Month</option>
@@ -128,7 +141,8 @@
128 141
                         type="date"
129 142
                         class="form-control uniInput"
130 143
                         name="date"
131
-                        v-model="property.dateAvailable"
144
+                        v-model="property.dateAvailableString"
145
+                        :disabled="!canEdit"
132 146
                       />
133 147
                     </div>
134 148
                   </div>
@@ -254,7 +268,11 @@
254 268
               <div class="row">
255 269
                 <div class="col-md-12">
256 270
                   <label for="Property Description" style="font-family:'muli'">Description:</label>
257
-                  <vue-editor v-model="property.description" :editor-toolbar="customToolbar" />
271
+                  <vue-editor
272
+                    v-model="property.description"
273
+                    :editor-toolbar="customToolbar"
274
+                    :disabled="!canEdit"
275
+                  />
258 276
                   <br />
259 277
                   <p>
260 278
                     * A listing fee of R380 including VAT is payable to list your Property on the
@@ -274,12 +292,17 @@
274 292
                         type="number"
275 293
                         class="form-control uniInput"
276 294
                         v-model="field.value"
295
+                        :disabled="!canEdit"
277 296
                       />
278 297
                     </div>
279 298
                     <div v-else class="display:none"></div>
280 299
                     <div v-if="field.type === 'yesno'">
281 300
                       {{ field.name }}
282
-                      <input type="checkbox" v-model="field.value" />
301
+                      <input
302
+                        type="checkbox"
303
+                        v-model="field.value"
304
+                        :disabled="!canEdit"
305
+                      />
283 306
                     </div>
284 307
                   </div>
285 308
                 </div>
@@ -301,6 +324,7 @@
301 324
                       name="vtlink"
302 325
                       id="vtlink"
303 326
                       v-model="property.virtualTour"
327
+                      :disabled="!canEdit"
304 328
                     />
305 329
                   </div>
306 330
                 </div>
@@ -315,6 +339,7 @@
315 339
                       name="vlink"
316 340
                       id="vlink"
317 341
                       v-model="property.video"
342
+                      :disabled="!canEdit"
318 343
                     />
319 344
                   </div>
320 345
                 </div>
@@ -329,9 +354,11 @@
329 354
                 </div>
330 355
               </div>
331 356
               <ImageLoad
332
-                :savedImaged="propertyImages"
357
+                :savedImages="propertyImages"
333 358
                 :loadedImages="loadedImages"
334 359
                 @DefaultImage="UpdateDefaultImage"
360
+                @DeleteImage="DeleteImage"
361
+                :mayEdit="canEdit"
335 362
               />
336 363
               <button v-if="!wait" type="button" @click="SubmitData()" class="btn-solid-blue">Save</button>
337 364
               <button v-if="!wait" type="button" @click="Close()" class="btn-solid-blue">Close</button>
@@ -360,6 +387,7 @@ import ImageLoad from "../propertyImage";
360 387
 import _ from "lodash";
361 388
 
362 389
 export default {
390
+  name: "PropertyEditPage",
363 391
   components: {
364 392
     mapSection,
365 393
     ImageLoad,
@@ -370,6 +398,7 @@ export default {
370 398
       defaultImage: 0,
371 399
       images: [],
372 400
       wait: false,
401
+      canEdit: true,
373 402
     };
374 403
   },
375 404
   methods: {
@@ -379,6 +408,23 @@ export default {
379 408
       "getPropertyFields",
380 409
       "updateProperty",
381 410
     ]),
411
+    StatusChanged(item) {
412
+      if (
413
+        item.target.value === "Offer Pending" ||
414
+        item.target.value === "Sold" ||
415
+        item.target.value === "Rented Out"
416
+      ) {
417
+        this.canEdit = false;
418
+      } else {
419
+        this.canEdit = true;
420
+      }
421
+      if (item.target.value === "For Rent") {
422
+        this.property.isSale = false;
423
+      }
424
+      if (item.target.value === "For Sale") {
425
+        this.property.isSale = true;
426
+      }
427
+    },
382 428
     clearAddress() {
383 429
       this.addressSet = false;
384 430
       this.property.streetNumber = undefined;
@@ -397,6 +443,13 @@ export default {
397 443
     },
398 444
     UpdateDefaultImage(item) {
399 445
       this.defaultImage = item;
446
+      for (let i = 0; i < this.propertyImages.length; i++) {
447
+        if (i === item) {
448
+          this.propertyImages[i].isDefault = true;
449
+        } else {
450
+          this.propertyImages[i].isDefault = false;
451
+        }
452
+      }
400 453
     },
401 454
     loadedImages(values) {
402 455
       this.images = values;
@@ -420,6 +473,10 @@ export default {
420 473
         });
421 474
       }
422 475
 
476
+      this.property.propertyImages = this.propertyImages;
477
+
478
+      //console.log(JSON.stringify(this.property));
479
+
423 480
       this.updateProperty(this.property).then((fulfilled) => {
424 481
         this.$router.push("/PropertyAdmin");
425 482
       });
@@ -439,10 +496,23 @@ export default {
439 496
       this.property.addressUrl = place.url;
440 497
       this.property.propertCoords = place.coords;
441 498
     },
499
+    DeleteImage(item) {
500
+      this.propertyImages[item].isDeleted = true;
501
+    },
442 502
   },
443 503
   mounted() {
444
-    this.wait = false;
445
-    this.getProperty(this.$route.params.id);
504
+    this.getProperty(this.$route.params.id).then((fulfilled) => {
505
+      this.wait = false;
506
+      if (
507
+        this.property.statusString === "Offer Pending" ||
508
+        this.property.statusString === "Sold" ||
509
+        this.property.statusString === "Rented Out"
510
+      ) {
511
+        this.canEdit = false;
512
+      } else {
513
+        this.canEdit = true;
514
+      }
515
+    });
446 516
   },
447 517
   computed: {
448 518
     ...mapState("property", [
@@ -452,6 +522,13 @@ export default {
452 522
       "propertyFields",
453 523
       "statuses",
454 524
     ]),
525
+    savedImages() {
526
+      const list = [];
527
+      for (let i = 0; i < this.propertyImages.length; i++) {
528
+        list.push(this.proeprtyImages[i].image);
529
+      }
530
+      return list;
531
+    },
455 532
   },
456 533
 };
457 534
 </script>

+ 25
- 14
src/components/property/mapSection.vue 파일 보기

@@ -1,8 +1,10 @@
1 1
 <template>
2 2
   <div>
3
-    <gmap-autocomplete class="form-control mb-3 uniInput" @place_changed="setPlace"
4
-      >*</gmap-autocomplete
5
-    >
3
+    <gmap-autocomplete
4
+      class="form-control mb-3 uniInput"
5
+      @place_changed="setPlace"
6
+      :disabled="!canEdit"
7
+    >*</gmap-autocomplete>
6 8
     <GmapMap
7 9
       :center="mapCenter"
8 10
       :zoom="mapZoom"
@@ -10,7 +12,13 @@
10 12
       style="width: 100%; height: 500px"
11 13
       ref="map"
12 14
     >
13
-      <GmapMarker v-if="this.place" :position="mapCenter" :clickable="true" :draggable="false" />
15
+      <GmapMarker
16
+        v-if="this.place"
17
+        :position="mapCenter"
18
+        :clickable="true"
19
+        :draggable="false"
20
+        :disabled="!canEdit"
21
+      />
14 22
     </GmapMap>
15 23
   </div>
16 24
 </template>
@@ -20,10 +28,11 @@
20 28
 import { gmapApi } from "vue2-google-maps";
21 29
 export default {
22 30
   computed: {
23
-    google: gmapApi
31
+    google: gmapApi,
24 32
   },
25 33
   props: {
26
-    savedCoords: { default: "" }
34
+    savedCoords: { default: "" },
35
+    canEdit: { default: true },
27 36
   },
28 37
   data() {
29 38
     return {
@@ -38,7 +47,7 @@ export default {
38 47
       country: "",
39 48
       postalCode: "",
40 49
       url: "",
41
-      coords: {}
50
+      coords: {},
42 51
     };
43 52
   },
44 53
 
@@ -70,7 +79,9 @@ export default {
70 79
         if (place.address_components[i].types[0] === "locality") {
71 80
           this.city = place.address_components[i].long_name;
72 81
         }
73
-        if (place.address_components[i].types[0] === "administrative_area_level_1") {
82
+        if (
83
+          place.address_components[i].types[0] === "administrative_area_level_1"
84
+        ) {
74 85
           this.province = place.address_components[i].long_name;
75 86
         }
76 87
         if (place.address_components[i].types[0] === "country") {
@@ -90,9 +101,9 @@ export default {
90 101
         province: this.province,
91 102
         country: this.country,
92 103
         postalCode: this.postalCode,
93
-        url: this.url
104
+        url: this.url,
94 105
       });
95
-    }
106
+    },
96 107
   },
97 108
   watch: {
98 109
     savedCoords: {
@@ -102,13 +113,13 @@ export default {
102 113
           var array = val.split(",");
103 114
           this.mapCenter = {
104 115
             lat: Number(array[0]),
105
-            lng: Number(array[1])
116
+            lng: Number(array[1]),
106 117
           };
107 118
           this.mapZoom = 17;
108 119
         }
109
-      }
110
-    }
111
-  }
120
+      },
121
+    },
122
+  },
112 123
 };
113 124
 </script>
114 125
 

+ 25
- 7
src/components/property/propertyCard.vue 파일 보기

@@ -15,11 +15,26 @@
15 15
                   <img
16 16
                     style="max-height:165px; object-fit: cover;"
17 17
                     :src="currentProperty.displayImage"
18
-                    alt=""
18
+                    alt
19 19
                   />
20 20
                 </div>
21 21
                 <h1>{{ currentProperty.suburb }}</h1>
22
-                <p><strong>Property Reference</strong> #{{ currentProperty.id }}</p>
22
+                <p>
23
+                  <strong>Property Reference</strong>
24
+                  {{ currentProperty.propertyReference }}
25
+                </p>
26
+                <p
27
+                  v-if="!currentProperty.isSale"
28
+                  :class="[currentProperty.hasPendingOffer ? 'pendingOffer' : 'normalText']"
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>
37
+                </p>
23 38
               </div>
24 39
             </router-link>
25 40
           </div>
@@ -31,11 +46,14 @@
31 46
                   <img
32 47
                     style="max-height:165px; object-fit: cover;"
33 48
                     :src="currentProperty.displayImage"
34
-                    alt=""
49
+                    alt
35 50
                   />
36 51
                 </div>
37 52
                 <h1>{{ currentProperty.suburb }}</h1>
38
-                <p><strong>Property Reference</strong> #{{ currentProperty.id }}</p>
53
+                <p>
54
+                  <strong>Property Reference</strong>
55
+                  {{ currentProperty.propertyReference }}
56
+                </p>
39 57
               </div>
40 58
             </router-link>
41 59
           </div>
@@ -53,7 +71,7 @@ export default {
53 71
   props: {
54 72
     properties: { type: Array, default: () => [] },
55 73
     showSort: { type: Boolean, default: true },
56
-    salesType: { type: String, default: "Rent" }
74
+    salesType: { type: String, default: "Rent" },
57 75
   },
58 76
   methods: {
59 77
     sortHighPrice() {
@@ -91,8 +109,8 @@ export default {
91 109
       }
92 110
 
93 111
       return this.properties.sort(compare);
94
-    }
95
-  }
112
+    },
113
+  },
96 114
 };
97 115
 </script>
98 116
 

+ 17
- 4
src/components/property/propertyImage.vue 파일 보기

@@ -24,6 +24,7 @@
24 24
           id="checkbox"
25 25
           v-model="imagesDefault[i]"
26 26
           @change="updateList(i)"
27
+          :disabled="!mayEdit"
27 28
         />
28 29
         <label v-if="allowMultiple" for="checkbox" style="margin: 10px;">Main Image</label>
29 30
         <img :src="img" style="height:200px; width:150px; object-fit: cover;" />
@@ -31,7 +32,7 @@
31 32
         <!-- <span class="input-group-text" align="center" style="width:150px" @click="removeImage(key)">
32 33
           <eva-icon name="trash-2-outline" fill="#60CBEB"></eva-icon>Delete
33 34
         </span>-->
34
-        <button align="center" class="imageDeleteButton" @click="removeImage(i)">
35
+        <button v-if="mayEdit" class="imageDeleteButton" @click="removeImage(i)">
35 36
           <i class="fa fa-trash"></i>
36 37
         </button>
37 38
       </div>
@@ -46,13 +47,14 @@ export default {
46 47
     loadedImages: Function,
47 48
     mayEdit: { type: Boolean, default: () => true },
48 49
     allowMultiple: { type: Boolean, default: () => true },
49
-    savedImaged: { type: Array, default: () => [] },
50
+    savedImages: { type: Array, default: () => [] },
50 51
   },
51 52
   data() {
52 53
     return {
53 54
       images: {},
54 55
       image: [],
55 56
       imagesDefault: [],
57
+      maxSavedIndex: 0,
56 58
     };
57 59
   },
58 60
   // Commented out for now.
@@ -93,12 +95,17 @@ export default {
93 95
     },
94 96
 
95 97
     removeImage(key) {
98
+      this.$emit("DeleteImage", key);
96 99
       this.image.splice(key, 1);
97 100
       this.images.splice(key, 1);
98 101
 
99 102
       if (!this.image.length) {
100 103
         this.$refs.im.value = "";
101 104
       }
105
+
106
+      // if (key <= this.maxSavedIndex) {
107
+      //   this.$emit("DeleteImage", key);
108
+      // }
102 109
     },
103 110
 
104 111
     updateList(index) {
@@ -113,11 +120,17 @@ export default {
113 120
     },
114 121
   },
115 122
   watch: {
116
-    savedImaged: {
123
+    savedImages: {
117 124
       immediate: true,
118 125
       handler(val, oldVal) {
119 126
         if (val) {
120
-          this.image = val;
127
+          this.image = [];
128
+          this.imagesDefault = [];
129
+          for (let i = 0; i < val.length; i++) {
130
+            this.image.push(val[i].image);
131
+            this.imagesDefault.push(val[i].isDefault);
132
+            this.maxSavedIndex = i;
133
+          }
121 134
         }
122 135
       },
123 136
     },

+ 7
- 8
src/components/property/residential/latestListings.vue 파일 보기

@@ -13,9 +13,9 @@
13 13
           <div class="row">
14 14
             <div class="col">
15 15
               <propertyCard
16
-                v-if="properties.length > 0"
16
+                v-if="latestProperties.length > 0"
17 17
                 name="propertyholder"
18
-                :properties="properties"
18
+                :properties="latestProperties"
19 19
                 :showSort="false"
20 20
               />
21 21
             </div>
@@ -32,18 +32,17 @@ import { mapState, mapActions } from "vuex";
32 32
 import propertyCard from "../propertyCard";
33 33
 export default {
34 34
   components: {
35
-    propertyCard
35
+    propertyCard,
36 36
   },
37 37
   methods: {
38
-    ...mapActions("propertySearch", ["searchProperties"])
38
+    ...mapActions("propertySearch", ["searchLatestPropertiesType"]),
39 39
   },
40 40
   async mounted() {
41
-    this.propertySearch.propertyUsageType = "Residential";
42
-    await this.searchProperties(this.propertySearch);
41
+    await this.searchLatestPropertiesType("Residential");
43 42
   },
44 43
   computed: {
45
-    ...mapState("propertySearch", ["properties", "propertySearch"])
46
-  }
44
+    ...mapState("propertySearch", ["latestProperties"]),
45
+  },
47 46
 };
48 47
 </script>
49 48
 

+ 1
- 1
src/components/shared/navBar.vue 파일 보기

@@ -199,7 +199,7 @@
199 199
                         <router-link to="/property/list">List My Property</router-link>
200 200
                       </li>
201 201
 
202
-                      <li>
202
+                      <li v-if="ROLE === 'Super Admin'">
203 203
                         <router-link to="/status/timeshareAdmin">Timeshare Week Admin</router-link>
204 204
                       </li>
205 205
                       <li v-if="ROLE === 'Super Admin'">

+ 0
- 1
src/components/timeshare/myWeeksPage.vue 파일 보기

@@ -32,7 +32,6 @@
32 32
       <div class="offset-1 col-md-10">
33 33
         <ListView
34 34
           :items="items"
35
-          :editable="true"
36 35
           @onNew="onNew"
37 36
           @onRowClick="onRowClick"
38 37
           @onClearSelected="onClearSelected"

+ 11
- 1
src/store/modules/property/property.js 파일 보기

@@ -21,6 +21,10 @@ export default {
21 21
     },
22 22
     setPropertyImages(state, images) {
23 23
       state.propertyImages = images;
24
+      state.propertyImageList = [];
25
+      for (let i = 0; i < images.length; i++) {
26
+        state.propertyImageList.push(images[i].image);
27
+      }
24 28
     },
25 29
     setPropertyTypes(state, types) {
26 30
       state.propertyTypes = types;
@@ -63,7 +67,7 @@ export default {
63 67
           .then(result => {
64 68
             commit("setProperty", result.data);
65 69
             dispatch("getPropertyTypes", result.data.propertyUsageType);
66
-            dispatch("getPropertyImages", result.data.id);
70
+            dispatch("getSavedPropertyImages", result.data.id);
67 71
             dispatch("getSavedPropertyFields", result.data.id);
68 72
             dispatch("getStatuses");
69 73
             resolve();
@@ -77,6 +81,12 @@ export default {
77 81
         .then(result => commit("setPropertyImages", result.data))
78 82
         .catch(console.error);
79 83
     },
84
+    getSavedPropertyImages({ commit }, id) {
85
+      axios
86
+        .get(`/api/PropertyImage/GetProperySavedImages/${id}`)
87
+        .then(result => commit("setPropertyImages", result.data))
88
+        .catch(console.error);
89
+    },
80 90
     getPropertyTypes({ commit }, propertyType) {
81 91
       axios
82 92
         .get(`/api/PropertyType/type/${propertyType}`)

+ 6
- 0
src/store/modules/property/propertySearch.js 파일 보기

@@ -114,6 +114,12 @@ export default {
114 114
         .then(response => commit("setLatestProperties", response.data))
115 115
         .catch(console.error);
116 116
     },
117
+    searchLatestPropertiesType({ commit }, type) {
118
+      axios
119
+        .get(`/api/property/latestProperties/${type}`)
120
+        .then(response => commit("setLatestProperties", response.data))
121
+        .catch(console.error);
122
+    },
117 123
     applyFilter({ commit }, value) {
118 124
       commit("setFilter", { value });
119 125
     },

+ 12
- 0
src/store/modules/timeshare/myWeeks.js 파일 보기

@@ -11,6 +11,9 @@ export default {
11 11
     setItems(state, list) {
12 12
       state.items = list;
13 13
     },
14
+    setItem(state, item) {
15
+      state.week = item;
16
+    }
14 17
   },
15 18
   getters: {
16 19
     getNeedsVerify(state) {
@@ -47,5 +50,14 @@ export default {
47 50
     //   .then(result => commit('removeListing', id))
48 51
     //   .catch(console.error);
49 52
     // }
53
+    getWeek({ commit }, id) {
54
+      axios
55
+      .get(`/api/timeshareweek/${id}`)
56
+      .then(r => {
57
+        console.log(JSON.stringify(r));
58
+        commit('setItem', r.data);
59
+      })
60
+      .catch(console.error);
61
+    },
50 62
   },
51 63
 };

Loading…
취소
저장