ソースを参照

Added list property to shortNav

master
30117125 4年前
コミット
bf2754fefc

+ 15
- 0
src/components/property/ListProperty/listPropertyPage.vue ファイルの表示

9
 <script>
9
 <script>
10
 /* eslint-disable */
10
 /* eslint-disable */
11
 import contentSection from "./contentSection";
11
 import contentSection from "./contentSection";
12
+import Log from "../../../assets/Log";
13
+
12
 export default {
14
 export default {
13
   components: {
15
   components: {
14
     contentSection
16
     contentSection
17
+  },
18
+  created() {
19
+    if (!Log.getPerson().name) {
20
+      this.$router.push({
21
+        name: "Login",
22
+        params: {
23
+          page: {
24
+            pageRedirect: "/property/list",
25
+            text: "Please Login or Register to add a property"
26
+          }
27
+        }
28
+      });
29
+    }
15
   }
30
   }
16
 };
31
 };
17
 </script>
32
 </script>

+ 12
- 0
src/components/shared/navBar.vue ファイルの表示

36
                     <i class="fa fa-calculator" aria-hidden="true"></i>
36
                     <i class="fa fa-calculator" aria-hidden="true"></i>
37
                     <span class="bondCalculatorDetail">Bond Calculator</span>
37
                     <span class="bondCalculatorDetail">Bond Calculator</span>
38
                   </a>
38
                   </a>
39
+                  <router-link to="/property/list">
40
+                    <i class="fa fa-home"></i>
41
+                    <span class="listProp">List Property</span>
42
+                  </router-link>
39
                 </div>
43
                 </div>
40
               </div>
44
               </div>
41
               <nav id="nav-menu-container">
45
               <nav id="nav-menu-container">
487
   margin-left: 3px;
491
   margin-left: 3px;
488
 }
492
 }
489
 
493
 
494
+.listProp {
495
+  margin-left: 3px;
496
+}
497
+
490
 /* Extra small devices (phones, 600px and down) */
498
 /* Extra small devices (phones, 600px and down) */
491
 @media only screen and (max-width: 600px) {
499
 @media only screen and (max-width: 600px) {
492
   .phoneIconDetail {
500
   .phoneIconDetail {
497
     display: none;
505
     display: none;
498
   }
506
   }
499
 
507
 
508
+  .listProp {
509
+    display: none;
510
+  }
511
+
500
   #header {
512
   #header {
501
     min-height: 120px;
513
     min-height: 120px;
502
   }
514
   }

+ 17
- 16
src/components/timeshare/buy/carouselSection.vue ファイルの表示

12
             <div class="row">
12
             <div class="row">
13
               <div class="form-group col-md-6">
13
               <div class="form-group col-md-6">
14
                 <div class="input-group">
14
                 <div class="input-group">
15
-                  <label v-if="!searchParams.region" class="uniSelectLabel" for="region">REGION</label>
15
+                  <label v-if="!searchParams.region" class="uniSelectLabel" for="region"
16
+                    >REGION</label
17
+                  >
16
                   <select
18
                   <select
17
                     class="form-control uniSelect"
19
                     class="form-control uniSelect"
18
                     name="region"
20
                     name="region"
40
                     v-if="!searchParams.resort"
42
                     v-if="!searchParams.resort"
41
                     class="uniSelectLabel"
43
                     class="uniSelectLabel"
42
                     for="weekInfoResortSelect"
44
                     for="weekInfoResortSelect"
43
-                  >RESORT</label>
45
+                    >RESORT</label
46
+                  >
44
                   <select
47
                   <select
45
                     id="weekInfoResortSelect"
48
                     id="weekInfoResortSelect"
46
                     class="form-control uniSelect"
49
                     class="form-control uniSelect"
52
                       :value="resort"
55
                       :value="resort"
53
                       @change="resortChange"
56
                       @change="resortChange"
54
                     >
57
                     >
55
-                      {{
56
-                      resort.resortName
57
-                      }}
58
+                      {{ resort.resortName }}
58
                     </option>
59
                     </option>
59
                   </select>
60
                   </select>
60
                 </div>
61
                 </div>
107
 import { mapState, mapActions, mapGetters } from "vuex";
108
 import { mapState, mapActions, mapGetters } from "vuex";
108
 export default {
109
 export default {
109
   components: {
110
   components: {
110
-    carousel,
111
+    carousel
111
   },
112
   },
112
   data() {
113
   data() {
113
     return {
114
     return {
116
       region: "",
117
       region: "",
117
       resort: "",
118
       resort: "",
118
       priceMin: undefined,
119
       priceMin: undefined,
119
-      priceMax: undefined,
120
+      priceMax: undefined
120
     };
121
     };
121
   },
122
   },
122
   methods: {
123
   methods: {
123
     ...mapActions("timeshare", ["initTimeshare", "onResortChange", "saveWeek"]),
124
     ...mapActions("timeshare", ["initTimeshare", "onResortChange", "saveWeek"]),
124
     regionChange(item) {
125
     regionChange(item) {
125
-      let reg = this.regions.find((r) => r.regionName === item.target.value);
126
+      let reg = this.regions.find(r => r.regionName === item.target.value);
126
       this.regionObj = reg;
127
       this.regionObj = reg;
127
     },
128
     },
128
     resortChange(item) {
129
     resortChange(item) {
129
-      let res = this.resorts.find((r) => r.resortName === item.target.value);
130
+      let res = this.resorts.find(r => r.resortName === item.target.value);
130
       this.resortObj = res;
131
       this.resortObj = res;
131
     },
132
     },
132
     Search() {
133
     Search() {
140
       if (!this.searchParams.resort) {
141
       if (!this.searchParams.resort) {
141
         this.searchParams.regionObj = this.regionObj;
142
         this.searchParams.regionObj = this.regionObj;
142
         this.$router.push("/timeshareToByResults");
143
         this.$router.push("/timeshareToByResults");
144
+      } else {
145
+        this.$router.push(`/resort/${this.searchParams.resort.resortCode}`);
143
       }
146
       }
144
-
145
-      this.$router.push(`/resort/${this.searchParams.resort.resortCode}`);
146
-    },
147
+    }
147
   },
148
   },
148
   computed: {
149
   computed: {
149
     ...mapState("timeshare", ["resorts", "regions", "detailedRegion"]),
150
     ...mapState("timeshare", ["resorts", "regions", "detailedRegion"]),
152
       let list = [];
153
       let list = [];
153
       if (this.searchParams.region && this.searchParams.region !== "") {
154
       if (this.searchParams.region && this.searchParams.region !== "") {
154
         const item = this.detailedRegion.find(
155
         const item = this.detailedRegion.find(
155
-          (region) => region.region.regionCode === this.regionObj.regionCode
156
+          region => region.region.regionCode === this.regionObj.regionCode
156
         );
157
         );
157
         if (item) {
158
         if (item) {
158
           list = item.children;
159
           list = item.children;
160
       } else {
161
       } else {
161
         list = this.resorts;
162
         list = this.resorts;
162
       }
163
       }
163
-      return _.sortBy(list, (x) => x.resortName);
164
-    },
164
+      return _.sortBy(list, x => x.resortName);
165
+    }
165
   },
166
   },
166
   created() {
167
   created() {
167
     this.initTimeshare(this.weekId);
168
     this.initTimeshare(this.weekId);
171
     this.searchParams.resort = null;
172
     this.searchParams.resort = null;
172
     this.filter.date = null;
173
     this.filter.date = null;
173
     this.filter.ddate = null;
174
     this.filter.ddate = null;
174
-  },
175
+  }
175
 };
176
 };
176
 </script>
177
 </script>
177
 
178
 

+ 12
- 13
src/components/timeshare/buy/searchResults.vue ファイルの表示

17
               src="../../../../public/img/blankImg.png"
17
               src="../../../../public/img/blankImg.png"
18
               alt
18
               alt
19
             />
19
             />
20
-            <p
21
-              v-if="resort.weeksAvailable == 1"
22
-              class="normalText"
23
-            >{{ resort.weeksAvailable }} Week Available</p>
24
-            <p
25
-              v-else-if="resort.weeksAvailable > 1"
26
-              class="normalText"
27
-            >{{ resort.weeksAvailable }} Weeks Available</p>
20
+            <p v-if="resort.weeksAvailable == 1" class="normalText">
21
+              {{ resort.weeksAvailable }} Week Available
22
+            </p>
23
+            <p v-else-if="resort.weeksAvailable > 1" class="normalText">
24
+              {{ resort.weeksAvailable }} Weeks Available
25
+            </p>
28
             <p v-else class="noWeeks">No Weeks Available</p>
26
             <p v-else class="noWeeks">No Weeks Available</p>
29
             <h4 class="mt-3">{{ resort.resortName }}</h4>
27
             <h4 class="mt-3">{{ resort.resortName }}</h4>
30
             <!-- <p>
28
             <!-- <p>
37
               class="btn-white-border"
35
               class="btn-white-border"
38
               :to="`/resort/${resort.resortCode}`"
36
               :to="`/resort/${resort.resortCode}`"
39
               :disable="resort.resortCode && resort.resortCode != ''"
37
               :disable="resort.resortCode && resort.resortCode != ''"
40
-            >VIEW</router-link>
38
+              >VIEW</router-link
39
+            >
41
           </div>
40
           </div>
42
         </div>
41
         </div>
43
       </div>
42
       </div>
48
         <img src="img/no-homes.png" />
47
         <img src="img/no-homes.png" />
49
         <br />
48
         <br />
50
         <br />
49
         <br />
51
-        <p>Sorry no listing where found matching your search</p>
50
+        <p>Sorry no listings were found matching your search.</p>
52
       </div>
51
       </div>
53
     </div>
52
     </div>
54
   </section>
53
   </section>
57
 <script>
56
 <script>
58
 export default {
57
 export default {
59
   props: {
58
   props: {
60
-    resorts: [],
61
-  },
59
+    resorts: {}
60
+  }
62
 };
61
 };
63
-</script>
62
+</script>

+ 9
- 11
src/components/timeshare/buy/toBuySearchResults.vue ファイルの表示

43
             <searchPanal :resorts="Available" />
43
             <searchPanal :resorts="Available" />
44
           </div>
44
           </div>
45
           <div class="tab-pane fade" id="directions" role="tabpanel" aria-labelledby="profile-tab">
45
           <div class="tab-pane fade" id="directions" role="tabpanel" aria-labelledby="profile-tab">
46
-            <searchPanal :resorts="resorts" />
46
+            <searchPanal v-if="resorts.length > 0" :resorts="resorts" />
47
           </div>
47
           </div>
48
         </div>
48
         </div>
49
         <div v-if="wait" id="preloader"></div>
49
         <div v-if="wait" id="preloader"></div>
60
 export default {
60
 export default {
61
   name: "ToBuySearchResults",
61
   name: "ToBuySearchResults",
62
   components: {
62
   components: {
63
-    searchPanal,
63
+    searchPanal
64
   },
64
   },
65
   data() {
65
   data() {
66
     return {
66
     return {
67
-      wait: false,
67
+      wait: false
68
     };
68
     };
69
   },
69
   },
70
   methods: {
70
   methods: {
71
-    ...mapActions("resort", ["getResorts", "getImage1"]),
71
+    ...mapActions("resort", ["getResorts", "getImage1"])
72
     //methods
72
     //methods
73
   },
73
   },
74
   computed: {
74
   computed: {
76
     ...mapState("resort", ["resorts"]),
76
     ...mapState("resort", ["resorts"]),
77
     Available() {
77
     Available() {
78
       let resortList = this.resorts;
78
       let resortList = this.resorts;
79
-      resortList = _.filter(resortList, (x) => x.weeksAvailable > 0);
79
+      resortList = _.filter(resortList, x => x.weeksAvailable > 0);
80
       return resortList;
80
       return resortList;
81
-    },
81
+    }
82
   },
82
   },
83
   mounted() {
83
   mounted() {
84
     this.wait = true;
84
     this.wait = true;
85
     this.getResorts(this.searchParams.regionObj.regionCode)
85
     this.getResorts(this.searchParams.regionObj.regionCode)
86
-      .then((fulfilled) => {
86
+      .then(fulfilled => {
87
         this.wait = false;
87
         this.wait = false;
88
       })
88
       })
89
-      .catch((error) => {
89
+      .catch(error => {
90
         this.wait = false;
90
         this.wait = false;
91
       });
91
       });
92
-  },
92
+  }
93
 };
93
 };
94
 </script>
94
 </script>
95
-
96
-

+ 14
- 4
src/components/user/loginPage.vue ファイルの表示

16
                         :type="'ERROR'"
16
                         :type="'ERROR'"
17
                       />
17
                       />
18
                     </div>
18
                     </div>
19
+                    <div v-if="page">
20
+                      <alert :text="page.text" :type="'INFO'" />
21
+                    </div>
19
                     <div class="form-label-group">
22
                     <div class="form-label-group">
20
                       <input
23
                       <input
21
                         type="text"
24
                         type="text"
87
     carousel,
90
     carousel,
88
     alert
91
     alert
89
   },
92
   },
93
+  props: {
94
+    page: {}
95
+  },
90
   data() {
96
   data() {
91
     return {
97
     return {
92
       username: "",
98
       username: "",
119
     Login() {
125
     Login() {
120
       this.login({ username: this.username, password: this.password })
126
       this.login({ username: this.username, password: this.password })
121
         .then(() => {
127
         .then(() => {
122
-          console.log(Log.getUser());
123
-          if (!Log.getUser().loginPasswordChange) {
124
-            this.$router.push("/");
128
+          // console.log(Log.getUser());
129
+          if (!this.page) {
130
+            if (!Log.getUser().loginPasswordChange) {
131
+              this.$router.push("/");
132
+            } else {
133
+              this.$router.push("/user/changePasswordOnLogin");
134
+            }
125
           } else {
135
           } else {
126
-            this.$router.push("/user/changePasswordOnLogin");
136
+            this.$router.push(this.page.pageRedirect);
127
           }
137
           }
128
         })
138
         })
129
         .catch(err => {
139
         .catch(err => {

+ 3
- 0
src/router/index.js ファイルの表示

151
     {
151
     {
152
       path: "/user/login",
152
       path: "/user/login",
153
       name: "Login",
153
       name: "Login",
154
+      props: route => ({
155
+        ...route.params
156
+      }),
154
       component: Login
157
       component: Login
155
     },
158
     },
156
     {
159
     {

読み込み中…
キャンセル
保存