Kobus 5 роки тому
джерело
коміт
913cb3fbd0

+ 0
- 1
src/components/admin/property/propertyTypeEdit.vue Переглянути файл

@@ -36,7 +36,6 @@
36 36
                 >
37 37
                   <option value="0">Residential</option>
38 38
                   <option value="1">Commercial</option>
39
-                  <option value="2">Both</option>
40 39
                 </select>
41 40
               </div>
42 41
             </div>

+ 4
- 3
src/components/admin/property/propertyTypeList.vue Переглянути файл

@@ -24,14 +24,14 @@
24 24
             <th>Description</th>
25 25
             <th>Property Type</th>
26 26
             <th></th>
27
+            <th></th>
27 28
           </tr>
28 29
         </thead>
29 30
         <tbody>
30 31
           <tr v-for="(item, i) in propertyTypes" :key="i">
31 32
             <td>{{ item.description }}</td>
32 33
             <td v-if="item.usageType === 0">Residential</td>
33
-            <td v-else-if="item.usageType === 1">Commercial</td>
34
-            <td v-else>Both</td>
34
+            <td v-else>Commercial</td>
35 35
             <td>
36 36
               <button
37 37
                 type="button"
@@ -39,7 +39,8 @@
39 39
                 class="btn btn-b-n"
40 40
                 style="width: 85px; height:40px;"
41 41
               >Edit</button>
42
-              |
42
+            </td>
43
+            <td>
43 44
               <button
44 45
                 type="button"
45 46
                 @click="Delete(item.id)"

src/components/admin/property/userDefinedFieldPage.vue → src/components/admin/property/userDefinedField.vue Переглянути файл

@@ -66,21 +66,22 @@
66 66
 <script>
67 67
 export default {
68 68
   name: 'UserField',
69
+  props: {
70
+    field: {},
71
+  },
69 72
   data() {
70 73
     return {
71
-      userField: {
72
-        fieldName: '',
73
-        fieldType: '',
74
-        rank: 0,
75
-      },
74
+      userField: {},
76 75
     };
77 76
   },
78 77
   mounted() {
79
-    this.userField = this.$route.query.field;
78
+    if (this.field) {
79
+      this.userField = this.field;
80
+    }
80 81
   },
81 82
   methods: {
82 83
     SubmitData() {
83
-      //this.$emit();
84
+      this.$emit('UpdateUserField', this.userField);
84 85
     },
85 86
   },
86 87
 };

+ 210
- 136
src/components/admin/property/userDefinedGroupPage.vue Переглянути файл

@@ -1,157 +1,190 @@
1 1
 <template>
2
+  <!-- eslint-disable max-len -->
2 3
   <div>
3
-    <section class="intro-single">
4
-      <div class="container">
5
-        <div class="row">
6
-          <div class="col-md-12 col-lg-8">
7
-            <div class="title-single-box">
8
-              <h2 class="title-single">User Defined Group</h2>
4
+    <div v-if="showField === false">
5
+      <section class="intro-single">
6
+        <div class="container">
7
+          <div class="row">
8
+            <div class="col-md-12 col-lg-8">
9
+              <div class="title-single-box">
10
+                <h2 class="title-single">User Defined Group</h2>
11
+              </div>
9 12
             </div>
10 13
           </div>
11 14
         </div>
12
-      </div>
13
-    </section>
14
-    <div class="container">
15
-      <div class="row mb-3">
16
-        <div class="col-md-12">
17
-          <form id="mainForm">
18
-            <div v-if="userDefinedGroup" class="form-group row">
19
-              <div class="col-md-4">
20
-                <label>Description</label>
21
-                <input
22
-                  class="form-control"
23
-                  type="text"
24
-                  name="description"
25
-                  id="description"
26
-                  v-model="userDefinedGroup.description"
27
-                />
28
-              </div>
29
-              <div class="col-md-4">
30
-                <label>Property Type</label>
31
-                <select
32
-                  class="form-control"
33
-                  name="UsageType"
34
-                  id="UsageType"
35
-                  v-model="userDefinedGroup.usageType"
36
-                >
37
-                  <option value="0">Residential</option>
38
-                  <option value="1">Commercial</option>
39
-                  <option value="2">Both</option>
40
-                </select>
41
-              </div>
42
-              <div class="col-md-4">
43
-                <label>Order</label>
44
-                <input
45
-                  class="form-control"
46
-                  type="number"
47
-                  name="rank"
48
-                  id="rank"
49
-                  v-model="userDefinedGroup.rank"
50
-                />
51
-              </div>
52
-            </div>
53
-            <div v-if="!userDefinedGroup" class="form-group row">
54
-              <div class="col-md-4">
55
-                <label>Description</label>
56
-                <input
57
-                  class="form-control"
58
-                  type="text"
59
-                  name="description"
60
-                  id="description"
61
-                  v-model="group.description"
62
-                />
63
-              </div>
64
-              <div class="col-md-4">
65
-                <label>Property Type</label>
66
-                <select
67
-                  class="form-control"
68
-                  name="UsageType"
69
-                  id="UsageType"
70
-                  v-model="group.usageType"
71
-                >
72
-                  <option value="0">Residential</option>
73
-                  <option value="1">Commercial</option>
74
-                  <option value="2">Both</option>
75
-                </select>
15
+      </section>
16
+      <div class="container">
17
+        <div class="row mb-3">
18
+          <div class="col-md-12">
19
+            <form id="mainForm">
20
+              <div v-if="userDefinedGroup" class="form-group row">
21
+                <div class="col-md-4">
22
+                  <label>Description</label>
23
+                  <input
24
+                    class="form-control"
25
+                    type="text"
26
+                    name="description"
27
+                    id="description"
28
+                    v-model="userDefinedGroup.description"
29
+                  />
30
+                </div>
31
+                <div class="col-md-4">
32
+                  <label>Property Type</label>
33
+                  <select
34
+                    class="form-control"
35
+                    name="UsageType"
36
+                    id="UsageType"
37
+                    v-model="userDefinedGroup.usageType"
38
+                  >
39
+                    <option value="0">Residential</option>
40
+                    <option value="1">Commercial</option>
41
+                    <option value="2">Both</option>
42
+                  </select>
43
+                </div>
44
+                <div class="col-md-4">
45
+                  <label>Order</label>
46
+                  <input
47
+                    class="form-control"
48
+                    type="number"
49
+                    name="rank"
50
+                    id="rank"
51
+                    v-model="userDefinedGroup.rank"
52
+                  />
53
+                </div>
76 54
               </div>
77
-              <div class="col-md-4">
78
-                <label>Order</label>
79
-                <input
80
-                  class="form-control"
81
-                  type="number"
82
-                  name="rank"
83
-                  id="rank"
84
-                  v-model="group.rank"
85
-                />
55
+              <div v-if="!userDefinedGroup" class="form-group row">
56
+                <div class="col-md-4">
57
+                  <label>Description</label>
58
+                  <input
59
+                    class="form-control"
60
+                    type="text"
61
+                    name="description"
62
+                    id="description"
63
+                    v-model="group.description"
64
+                  />
65
+                </div>
66
+                <div class="col-md-4">
67
+                  <label>Property Type</label>
68
+                  <select
69
+                    class="form-control"
70
+                    name="UsageType"
71
+                    id="UsageType"
72
+                    v-model="group.usageType"
73
+                  >
74
+                    <option value="0">Residential</option>
75
+                    <option value="1">Commercial</option>
76
+                    <option value="2">Both</option>
77
+                  </select>
78
+                </div>
79
+                <div class="col-md-4">
80
+                  <label>Order</label>
81
+                  <input
82
+                    class="form-control"
83
+                    type="number"
84
+                    name="rank"
85
+                    id="rank"
86
+                    v-model="group.rank"
87
+                  />
88
+                </div>
86 89
               </div>
87
-            </div>
88
-          </form>
90
+            </form>
91
+          </div>
89 92
         </div>
90 93
       </div>
91
-    </div>
92
-    <div class="container">
94
+      <div class="container">
95
+        <button
96
+          type="button"
97
+          @click="newItem()"
98
+          class="btn btn-b-n"
99
+          style="width: 85px; height:40px;"
100
+        >New</button>
101
+        <br />
102
+        <table class="table table-bordered">
103
+          <thead>
104
+            <tr>
105
+              <th>Field Name</th>
106
+              <th>Field Type</th>
107
+              <th>Order</th>
108
+              <th></th>
109
+              <th></th>
110
+            </tr>
111
+          </thead>
112
+          <tbody>
113
+            <tr v-for="(item, i) in userFields" :key="i">
114
+              <td>{{item.fieldName}}</td>
115
+              <td v-if="item.fieldType === 'text'">Text</td>
116
+              <td v-else-if="item.fieldType === 'number'">Number</td>
117
+              <td v-else>Yes / No</td>
118
+              <td>{{item.rank}}</td>
119
+              <td>
120
+                <button
121
+                  type="button"
122
+                  @click="Edit(item)"
123
+                  class="btn btn-b-n"
124
+                  style="width: 85px; height:40px;"
125
+                >Edit</button>
126
+              </td>
127
+              <td>
128
+                <button
129
+                  type="button"
130
+                  @click="Delete(item)"
131
+                  class="btn btn-b-n"
132
+                  style="width: 85px; height:40px;"
133
+                >Delete</button>
134
+              </td>
135
+            </tr>
136
+          </tbody>
137
+        </table>
138
+      </div>
139
+      <button
140
+        type="button"
141
+        @click="SubmitData()"
142
+        class="btn btn-b-n"
143
+        style="width: 85px; height:40px;"
144
+      >Save</button>
93 145
       <button
94 146
         type="button"
95
-        @click="newItem()"
147
+        @click="Close()"
96 148
         class="btn btn-b-n"
97 149
         style="width: 85px; height:40px;"
98
-      >New</button>
99
-      <br />
100
-      <table class="table table-bordered">
101
-        <thead>
102
-          <tr>
103
-            <th>Field Name</th>
104
-            <th>Field Type</th>
105
-            <th>Order</th>
106
-            <th></th>
107
-          </tr>
108
-        </thead>
109
-        <tbody>
110
-          <tr v-for="(item, i) in userFields" :key="i">
111
-            <td>{{item.fieldName}}</td>
112
-            <td>{{item.fieldType}}</td>
113
-            <td>{{item.rank}}</td>
114
-            <td>
115
-              <router-link :to="{ name: 'UserDefinedField', query: { field: item }}">Edit</router-link>
116
-              <!-- <router-link :to="`/userField`">Edit</router-link>| Delete -->
117
-            </td>
118
-          </tr>
119
-        </tbody>
120
-      </table>
150
+      >Close</button>
151
+    </div>
152
+    <div v-else>
153
+      <userFields @UpdateUserField="UpdateUserField" :field="item" />
121 154
     </div>
122
-    <button
123
-      type="button"
124
-      @click="SubmitData()"
125
-      class="btn btn-b-n"
126
-      style="width: 85px; height:40px;"
127
-    >Save</button>
128 155
   </div>
129 156
 </template>
130 157
 
131 158
 <script>
132 159
 import { mapState, mapActions } from 'vuex';
160
+import userFields from './userDefinedField.vue';
133 161
 
134 162
 export default {
135 163
   name: 'UserDefinedGroup',
164
+  components: {
165
+    userFields,
166
+  },
136 167
   data() {
137 168
     return {
138
-      group: {
139
-        description: '',
140
-        usageType: 0,
141
-        rank: 0,
142
-      },
169
+      item: {},
170
+      showField: false,
143 171
     };
144 172
   },
145 173
   mounted() {
174
+    this.clearUserFields();
175
+    this.clearUserGroup();
176
+
146 177
     if (this.$route.params.id > 0) {
147
-      this.getUserDefinedGroup(
148
-        Object.assign({}, { id: this.$route.params.id }),
149
-      );
150
-      this.getUserFields(Object.assign({}, { groupId: this.$route.params.id }));
178
+      this.getUserDefinedGroup(this.$route.params.id);
179
+      this.getUserFields(this.$route.params.id);
151 180
     }
152 181
   },
153 182
   computed: {
154
-    ...mapState('propertyAdmin', ['userDefinedGroup', 'userFields']),
183
+    ...mapState('propertyAdmin', [
184
+      'userDefinedGroup',
185
+      'userFields',
186
+      'userField',
187
+    ]),
155 188
   },
156 189
   methods: {
157 190
     ...mapActions('propertyAdmin', [
@@ -159,27 +192,68 @@ export default {
159 192
       'getUserFields',
160 193
       'saveUserDefinedGroup',
161 194
       'updateUserDefinedGroup',
195
+      'clearUserGroup',
196
+      'clearUserFields',
197
+      'clearUserField',
198
+      'saveUserField',
199
+      'updateUserField',
200
+      'deleteUserField',
162 201
     ]),
163 202
     SubmitData() {
203
+      this.userDefinedGroup.fields = [];
204
+      let reload = false;
164 205
       if (this.$route.params.id > 0) {
165
-        this.updateUserDefinedGroup(
166
-          Object.assign({}, { group: this.userDefinedGroup }),
167
-        );
206
+        this.updateUserDefinedGroup(this.userDefinedGroup);
207
+        this.userFields.forEach((fieldData) => {
208
+          if (fieldData.id === 0) {
209
+            fieldData.groupId = this.userDefinedGroup.id;
210
+            this.saveUserField(fieldData);
211
+          } else {
212
+            this.updateUserField(fieldData);
213
+          }
214
+        });
168 215
       } else {
169
-        this.saveUserDefinedGroup(Object.assign({}, { group: this.group }));
216
+        reload = true;
217
+        this.userFields.forEach((fieldData) => {
218
+          this.userDefinedGroup.fields.push({
219
+            fieldName: fieldData.fieldName,
220
+            fieldType: fieldData.fieldType,
221
+            rank: fieldData.rank,
222
+          });
223
+        });
224
+        this.saveUserDefinedGroup(this.userDefinedGroup);
170 225
       }
171 226
       this.$router.push('/userDefinedGroups/list');
227
+      // this.$router.push({
228
+      //   path: '/userDefinedGroups/list',
229
+      //   query: { reload },
230
+      // });
172 231
     },
173 232
     newItem() {
174
-      const newField = {
175
-        fieldName: '',
176
-        fieldType: 'Text',
177
-        rank: 0,
178
-      };
179
-      this.$router.push({
180
-        path: '/userField',
181
-        query: { field: newField },
182
-      });
233
+      this.clearUserField();
234
+      this.item = this.userField;
235
+      this.item.groupId = this.userDefinedGroup.id;
236
+      this.showField = true;
237
+    },
238
+    Edit(item) {
239
+      this.item = item;
240
+      this.showField = true;
241
+    },
242
+    Close() {
243
+      this.$router.push('/userDefinedGroups/list');
244
+    },
245
+    UpdateUserField(item) {
246
+      if (item.id === 0) {
247
+        this.userFields.push(item);
248
+      }
249
+      this.showField = false;
250
+    },
251
+    Delete(item) {
252
+      if (item.id === 0) {
253
+        this.userFields.pop(this.userFields.find(p => p.id === item.id));
254
+      } else {
255
+        this.deleteUserField(item.id);
256
+      }
183 257
     },
184 258
   },
185 259
 };

+ 31
- 7
src/components/admin/property/userDefinedGroupsPage.vue Переглянути файл

@@ -1,4 +1,5 @@
1 1
 <template>
2
+  <!-- eslint-disable max-len -->
2 3
   <div>
3 4
     <section class="intro-single">
4 5
       <div class="container">
@@ -12,7 +13,7 @@
12 13
       </div>
13 14
     </section>
14 15
     <div class="container">
15
-      <router-link :to="`/userDefinedGroups/userDefinedGroup`">New</router-link>
16
+      <button type="button" @click="New()" class="btn btn-b-n" style="width: 85px; height:40px;">New</button>
16 17
       <table class="table table-bordered">
17 18
         <thead>
18 19
           <tr>
@@ -31,10 +32,20 @@
31 32
             <td v-else>Both</td>
32 33
             <td>{{item.rank}}</td>
33 34
             <td>
34
-              <router-link :to="`/userDefinedGroups/userDefinedGroup/${item.id}`">Edit</router-link>
35
+              <button
36
+                type="button"
37
+                @click="Edit(item.id)"
38
+                class="btn btn-b-n"
39
+                style="width: 85px; height:40px;"
40
+              >Edit</button>
35 41
             </td>
36 42
             <td>
37
-              <button>Delete</button>
43
+              <button
44
+                type="button"
45
+                @click="Delete(item)"
46
+                class="btn btn-b-n"
47
+                style="width: 85px; height:40px;"
48
+              >Delete</button>
38 49
             </td>
39 50
           </tr>
40 51
         </tbody>
@@ -47,16 +58,29 @@ import { mapState, mapActions } from 'vuex';
47 58
 
48 59
 export default {
49 60
   name: 'UserDefinedGroup',
50
-  created() {
61
+  mounted() {
51 62
     this.getUserDefinedGroups();
52 63
   },
53 64
   computed: {
54 65
     ...mapState('propertyAdmin', ['userDefinedGroups']),
55 66
   },
56 67
   methods: {
57
-    ...mapActions('propertyAdmin', ['getUserDefinedGroups']),
68
+    ...mapActions('propertyAdmin', [
69
+      'getUserDefinedGroups',
70
+      'deleteUserDefinedGroup',
71
+    ]),
72
+    New() {
73
+      this.$router.push('/userDefinedGroups/userDefinedGroup');
74
+    },
75
+    Edit(id) {
76
+      this.$router.push(`/userDefinedGroups/userDefinedGroup/${id}`);
77
+    },
78
+    Delete(item) {
79
+      if (item.id === 0) {
80
+        this.userDefinedGroups.pop(item);
81
+      }
82
+      this.deleteUserDefinedGroup(item.id);
83
+    },
58 84
   },
59 85
 };
60 86
 </script>
61
-<style>
62
-</style>

+ 1
- 0
src/components/home/propertySection.vue Переглянути файл

@@ -15,6 +15,7 @@
15 15
           v-if="latestProperties.length > 0"
16 16
           name="propertyholder"
17 17
           :properties="latestProperties"
18
+          :showSort="false"
18 19
         />
19 20
       </div>
20 21
     </section>

+ 116
- 63
src/components/property/propertyCard.vue Переглянути файл

@@ -1,74 +1,97 @@
1 1
 <template>
2
-  <div class="form-group row">
3
-    <div class="col-md-4" v-for="currentProperty in properties" :key="currentProperty.id">
4
-      <div class="card-box-a card-shadow">
5
-        <div class="img-box-a">
6
-          <img
7
-            :src="currentProperty.displayImage"
8
-            alt
9
-            class="img-a img-fluid"
10
-            style="height:466px; width:350px; object-fit: cover;"
11
-          />
12
-        </div>
13
-        <div class="card-overlay">
14
-          <div class="card-overlay-a-content">
15
-            <div class="card-header-a">
16
-              <h4 class="card-title-a">
17
-                <router-link
18
-                  :to="`/property/property/${currentProperty.id}`"
19
-                  class="link-a"
20
-                >{{ currentProperty.shortDescription }}</router-link>
21
-              </h4>
22
-              <h4 class="card-title-c">
2
+  <div>
3
+    <div class="form-group row" v-if="showSort">
4
+      <button
5
+        type="button"
6
+        class="btn btn-link font-weight-bold color-b"
7
+        style="width: 150px; height:40px;"
8
+        @click="sortNewest()"
9
+      >Newest</button>
10
+      <button
11
+        type="button"
12
+        class="btn btn-link font-weight-bold color-b"
13
+        style="width: 150px; height:40px;"
14
+        @click="sortLowPrice()"
15
+      >Lowest Price</button>
16
+      <button
17
+        type="button"
18
+        class="btn btn-link font-weight-bold color-b"
19
+        style="width: 150px; height:40px;"
20
+        @click="sortHighPrice()"
21
+      >Highest Price</button>
22
+      <hr />
23
+    </div>
24
+    <div class="form-group row">
25
+      <div class="col-md-4" v-for="currentProperty in properties" :key="currentProperty.id">
26
+        <div class="card-box-a card-shadow">
27
+          <div class="img-box-a">
28
+            <img
29
+              :src="currentProperty.displayImage"
30
+              alt
31
+              class="img-a img-fluid"
32
+              style="height:466px; width:350px; object-fit: cover;"
33
+            />
34
+          </div>
35
+          <div class="card-overlay">
36
+            <div class="card-overlay-a-content">
37
+              <div class="card-header-a">
38
+                <h4 class="card-title-a">
39
+                  <router-link
40
+                    :to="`/property/property/${currentProperty.id}`"
41
+                    class="link-a"
42
+                  >{{ currentProperty.shortDescription }}</router-link>
43
+                </h4>
44
+                <h4 class="card-title-c">
45
+                  <router-link :to="`/property/property/${currentProperty.id}`" class="link-a">
46
+                    {{ currentProperty.province }}
47
+                    <br />
48
+                    {{ currentProperty.city }}
49
+                    <br />
50
+                    {{ currentProperty.suburb }}
51
+                  </router-link>
52
+                </h4>
53
+              </div>
54
+              <div class="card-body-a">
55
+                <div class="price-box d-flex">
56
+                  <span
57
+                    v-if="currentProperty.isSale"
58
+                    class="price-a"
59
+                  >sale | {{ currentProperty.displayPrice }}</span>
60
+                  <span
61
+                    v-if="!currentProperty.isSale"
62
+                    class="price-a"
63
+                  >rent | {{ currentProperty.displayPrice }}</span>
64
+                </div>
23 65
                 <router-link :to="`/property/property/${currentProperty.id}`" class="link-a">
24
-                  {{ currentProperty.province }}
25
-                  <br />
26
-                  {{ currentProperty.city }}
27
-                  <br />
28
-                  {{ currentProperty.suburb }}
66
+                  Click here to view
67
+                  <span class="ion-ios-arrow-forward"></span>
29 68
                 </router-link>
30
-              </h4>
31
-            </div>
32
-            <div class="card-body-a">
33
-              <div class="price-box d-flex">
34
-                <span
35
-                  v-if="currentProperty.isSale"
36
-                  class="price-a"
37
-                >sale | {{ currentProperty.displayPrice }}</span>
38
-                <span
39
-                  v-if="!currentProperty.isSale"
40
-                  class="price-a"
41
-                >rent | {{ currentProperty.displayPrice }}</span>
42 69
               </div>
43
-              <router-link :to="`/property/property/${currentProperty.id}`" class="link-a">
44
-                Click here to view
45
-                <span class="ion-ios-arrow-forward"></span>
46
-              </router-link>
47
-            </div>
48
-            <div class="card-footer-a" v-if="currentProperty.showFooter">
49
-              <ul class="card-info d-flex justify-content-around">
50
-                <li v-if="currentProperty.area !== null">
51
-                  <h4 class="card-info-title">Area</h4>
52
-                  <span v-html="currentProperty.area"></span>
53
-                </li>
54
-                <li v-if="currentProperty.beds !== null">
55
-                  <h4 class="card-info-title">Beds</h4>
56
-                  <span>{{ currentProperty.beds }}</span>
57
-                </li>
58
-                <li v-if="currentProperty.baths !== null">
59
-                  <h4 class="card-info-title">Baths</h4>
60
-                  <span>{{ currentProperty.baths }}</span>
61
-                </li>
62
-                <li v-if="currentProperty.garages !== null">
63
-                  <h4 class="card-info-title">Garages</h4>
64
-                  <span>{{ currentProperty.garages }}</span>
65
-                </li>
66
-              </ul>
70
+              <div class="card-footer-a" v-if="currentProperty.showFooter">
71
+                <ul class="card-info d-flex justify-content-around">
72
+                  <li v-if="currentProperty.area !== null">
73
+                    <h4 class="card-info-title">Area</h4>
74
+                    <span v-html="currentProperty.area"></span>
75
+                  </li>
76
+                  <li v-if="currentProperty.beds !== null">
77
+                    <h4 class="card-info-title">Beds</h4>
78
+                    <span>{{ currentProperty.beds }}</span>
79
+                  </li>
80
+                  <li v-if="currentProperty.baths !== null">
81
+                    <h4 class="card-info-title">Baths</h4>
82
+                    <span>{{ currentProperty.baths }}</span>
83
+                  </li>
84
+                  <li v-if="currentProperty.garages !== null">
85
+                    <h4 class="card-info-title">Garages</h4>
86
+                    <span>{{ currentProperty.garages }}</span>
87
+                  </li>
88
+                </ul>
89
+              </div>
67 90
             </div>
68 91
           </div>
69 92
         </div>
93
+        <br />
70 94
       </div>
71
-      <br />
72 95
     </div>
73 96
   </div>
74 97
 </template>
@@ -77,6 +100,36 @@
77 100
 export default {
78 101
   props: {
79 102
     properties: { type: Array, default: () => [] },
103
+    showSort: { type: Boolean, default: true },
104
+  },
105
+  methods: {
106
+    sortHighPrice() {
107
+      function compare(a, b) {
108
+        if (a.price < b.price) return 1;
109
+        if (a.price > b.price) return -1;
110
+        return 0;
111
+      }
112
+
113
+      return this.properties.sort(compare);
114
+    },
115
+    sortLowPrice() {
116
+      function compare(a, b) {
117
+        if (a.price < b.price) return -1;
118
+        if (a.price > b.price) return 1;
119
+        return 0;
120
+      }
121
+
122
+      return this.properties.sort(compare);
123
+    },
124
+    sortNewest() {
125
+      function compare(a, b) {
126
+        if (a.dateCreated < b.dateCreated) return 1;
127
+        if (a.dateCreated > b.dateCreated) return -1;
128
+        return 0;
129
+      }
130
+
131
+      return this.properties.sort(compare);
132
+    },
80 133
   },
81 134
 };
82 135
 </script>

+ 22
- 7
src/components/property/propertyImage.vue Переглянути файл

@@ -16,6 +16,8 @@
16 16
     <br />
17 17
     <div class="form-group row">
18 18
       <div v-for="(img, i) in image" class="col-md-2" :key="i">
19
+        <input type="checkbox" id="checkbox" v-model="imagesDefault[i]" @change="updateList(i)" />
20
+        <label for="checkbox" style="margin: 10px;">Main Image</label>
19 21
         <img :src="img" style="height:200px; width:150px; object-fit: cover;" />
20 22
         <br />
21 23
         <a class="fa fa-times del" @click="removeImage(key)" />
@@ -29,19 +31,22 @@
29 31
 export default {
30 32
   props: {
31 33
     loadedImages: Function,
32
-    savedImages: { type: Array, default: () => [] },
33 34
   },
34 35
   data() {
35 36
     return {
36 37
       images: {},
37 38
       image: [],
39
+      imagesDefault: [],
38 40
     };
39 41
   },
40
-  mounted() {
41
-    if (this.savedImages.length > 0) {
42
-      this.image = this.savedImages;
43
-    }
44
-  },
42
+  // Commented out for now.
43
+  // created() {
44
+  //   if (this.savedImages && this.savedImages.length > 0) {
45
+  //     this.savedImages.forEach((element) => {
46
+  //       this.images.push(element);
47
+  //     });
48
+  //   }
49
+  // },
45 50
   methods: {
46 51
     imagesAdd(e) {
47 52
       const files = e.target.files || e.dataTransfer.files;
@@ -61,7 +66,6 @@ export default {
61 66
 
62 67
         reader.onload = (e) => {
63 68
           vm.image.push(e.target.result);
64
-          console.log(vm.image);
65 69
         };
66 70
         reader.readAsDataURL(file[i]);
67 71
       }
@@ -75,6 +79,17 @@ export default {
75 79
         this.$refs.im.value = '';
76 80
       }
77 81
     },
82
+
83
+    updateList(index) {
84
+      if (this.imagesDefault) {
85
+        for (let i = 0; i < this.imagesDefault.length; i++) {
86
+          if (i !== index) {
87
+            this.imagesDefault[i] = false;
88
+          }
89
+        }
90
+        this.$emit('DefaultImage', index);
91
+      }
92
+    },
78 93
   },
79 94
 };
80 95
 </script>

+ 29
- 12
src/components/property/propertyList.vue Переглянути файл

@@ -26,24 +26,30 @@
26 26
             <th>Type</th>
27 27
             <th>Publish</th>
28 28
             <th>Status</th>
29
-            <th>Edit</th>
30
-            <th>Delete</th>
29
+            <th></th>
30
+            <th></th>
31 31
           </tr>
32 32
         </thead>
33 33
         <tbody>
34 34
           <tr v-for="(item, i) in properties" :key="i">
35
-            <td v-if="item.propertyType.usageType === 1">{{item.propertyName}}</td>
36
-            <td v-else>{{ item.shortDescription }}</td>
37
-            <td>{{item.id}}</td>
38
-            <td></td>
35
+            <td>{{ item.name }}</td>
36
+            <td>{{ item.id }}</td>
37
+            <td v-html="item.size" />
39 38
             <td>{{ item.price }}</td>
40
-            <td>{{ item.propertyType.description }}</td>
39
+            <td>{{ item.type }}</td>
41 40
             <td>{{ item.publish }}</td>
42
-            <td>Publish</td>
41
+            <td>{{ item.status }}</td>
43 42
             <td>
44
-              <router-link :to="`/property/${item.id}`">Edit</router-link>
43
+              <button
44
+                type="button"
45
+                @click="Edit(item)"
46
+                class="btn btn-b-n"
47
+                style="width: 85px; height:40px;"
48
+              >Edit</button>
49
+            </td>
50
+            <td>
51
+              <button type="button" class="btn btn-b-n" style="width: 85px; height:40px;">Delete</button>
45 52
             </td>
46
-            <td>Delete</td>
47 53
           </tr>
48 54
         </tbody>
49 55
       </table>
@@ -64,17 +70,28 @@ export default {
64 70
   },
65 71
   methods: {
66 72
     ...mapActions('propertyList', ['getProperties']),
73
+    Edit(item) {
74
+      const salesType = item.isSale ? 'Sale' : 'Rental';
75
+      this.$router.push({
76
+        path: `/property/${this.propertyType}/${salesType}`,
77
+        query: { id: item.id },
78
+      });
79
+    },
67 80
   },
68 81
   mounted() {
69 82
     this.propertyType = this.$route.params.propertyType;
70 83
     this.user = this.$route.params.user;
71 84
 
85
+    if (this.user === 'MyListings') {
86
+      this.user = 'GeorgeW';
87
+    }
88
+
72 89
     this.getProperties(
73 90
       Object.assign(
74 91
         {},
75 92
         {
76
-          propertyType: this.$route.params.propertyType,
77
-          user: this.$route.params.user,
93
+          propertyType: this.propertyType,
94
+          user: this.user,
78 95
         },
79 96
       ),
80 97
     );

+ 10
- 2
src/components/property/propertyPage.vue Переглянути файл

@@ -36,7 +36,7 @@
36 36
                     </div>
37 37
                   </div>
38 38
                 </div>
39
-                <div class="property-description" v-html="property ? property.description : ''" />
39
+                <div class="property-description" v-html="property.description" />
40 40
                 <div v-for="display in property.displayData" :key="display.id">
41 41
                   <div class="row section-t3">
42 42
                     <div class="col-sm-12">
@@ -63,6 +63,7 @@
63 63
                     </div>
64 64
                     <div class="card-title-c align-self-center">
65 65
                       <h5 class="title-c">{{ formatPrice(property.price) }}</h5>
66
+                      <h6 v-if="property.pricePer">Per {{property.pricePer}}</h6>
66 67
                     </div>
67 68
                   </div>
68 69
                 </div>
@@ -245,7 +246,11 @@ export default {
245 246
     ...mapState('property', ['property', 'propertyImages']),
246 247
   },
247 248
   methods: {
248
-    ...mapActions('property', ['getProperty', 'getPropertyImages']),
249
+    ...mapActions('property', [
250
+      'getProperty',
251
+      'getPropertyImages',
252
+      'clearPropertyImages',
253
+    ]),
249 254
     formatPrice(value) {
250 255
       const val = (value / 1).toFixed(2);
251 256
       return val.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ' ');
@@ -257,6 +262,9 @@ export default {
257 262
       return '';
258 263
     },
259 264
   },
265
+  beforeDestroy() {
266
+    this.clearPropertyImages();
267
+  },
260 268
 };
261 269
 </script>
262 270
 

+ 6
- 6
src/components/property/propertySearchPage.vue Переглянути файл

@@ -1,7 +1,7 @@
1 1
 <template>
2 2
   <!-- eslint-disable max-len -->
3 3
   <div class="container">
4
-    <div class="container col-md-10" v-if="propertyType === 'Residential'">
4
+    <div class="container col-md-12" v-if="propertyType === 'Residential'">
5 5
       <div class="col-sm-12">
6 6
         <div class="about-img-box">
7 7
           <img
@@ -23,7 +23,7 @@
23 23
         <div class="col-md-12">
24 24
           <h1 class="my-4">About Residential Properties</h1>
25 25
         </div>
26
-        <div class="col-md-8 text-left">
26
+        <div class="container col-md-6 text-left">
27 27
           <p>
28 28
             Uni-Vate Properties understands the necessity in property-seekers
29 29
             to find that perfect fit;
@@ -48,7 +48,7 @@
48 48
             <router-link to="/property/Residential/Sale">Click Here</router-link>
49 49
           </p>
50 50
         </div>
51
-        <div class="col-md-4 text-center">
51
+        <div class="col-md-4">
52 52
           <p>
53 53
             <img class="img-fluid" src="./../../../public/img/residential.jpg" alt="About Resale" />
54 54
           </p>
@@ -71,7 +71,7 @@
71 71
       <br />
72 72
     </div>
73 73
 
74
-    <div class="container col-md-10" v-if="propertyType === 'Commercial'">
74
+    <div class="container col-md-12" v-if="propertyType === 'Commercial'">
75 75
       <div class="col-sm-12">
76 76
         <div class="about-img-box">
77 77
           <img
@@ -93,7 +93,7 @@
93 93
         <div class="col-md-12">
94 94
           <h1 class="my-4">About Commercial Properties</h1>
95 95
         </div>
96
-        <div class="col-md-8 text-left">
96
+        <div class="container col-md-6 text-left">
97 97
           <p>
98 98
             Commercial properties are characteristically any larger properties that
99 99
             generate profit through leasing or rental activities. These properties
@@ -116,7 +116,7 @@
116 116
             <router-link to="/property/Commercial/Sale">Click Here</router-link>
117 117
           </p>
118 118
         </div>
119
-        <div class="col-md-4 text-center">
119
+        <div class="col-md-4">
120 120
           <p>
121 121
             <img class="img-fluid" src="./../../../public/img/commercial.jpg" alt="About Resale" />
122 122
           </p>

+ 0
- 1
src/components/property/propertyUserField.vue Переглянути файл

@@ -40,7 +40,6 @@ export default {
40 40
   name: 'UserDefinedField',
41 41
   props: {
42 42
     fields: { type: Array, default: () => [] },
43
-    SetFieldValue: Function,
44 43
   },
45 44
   data() {
46 45
     return {

+ 111
- 49
src/components/property/propertyeditPage.vue Переглянути файл

@@ -38,7 +38,7 @@
38 38
                   id="propertyType"
39 39
                   v-model="property.propertyTypeId"
40 40
                 >
41
-                  <option value="0">Please Select</option>
41
+                  <option value="0">Please select type</option>
42 42
                   <option
43 43
                     v-for="item in propertyTypes"
44 44
                     :value="item.id"
@@ -74,6 +74,8 @@
74 74
                   class="form-control"
75 75
                   type="text"
76 76
                   name="address1"
77
+                  placeholder="Apartment, suite, unit, building, floor, Po Box etc."
78
+                  style="font-size: 50%"
77 79
                   id="address1"
78 80
                   v-model="property.addressLine1"
79 81
                 />
@@ -84,16 +86,20 @@
84 86
                   class="form-control"
85 87
                   type="text"
86 88
                   name="address2"
89
+                  placeholder="Complex, estate, company name, etc."
90
+                  style="font-size: 50%"
87 91
                   id="address2"
88 92
                   v-model="property.addressLine2"
89 93
                 />
90 94
               </div>
91 95
               <div class="col-md-4">
92
-                <label>Address Line 3</label>
96
+                <label>Street</label>
93 97
                 <input
94 98
                   class="form-control"
95 99
                   type="text"
96 100
                   name="address3"
101
+                  placeholder="Street or c/o name"
102
+                  style="font-size: 50%"
97 103
                   id="address3"
98 104
                   v-model="property.addressLine3"
99 105
                 />
@@ -109,7 +115,7 @@
109 115
                   @change="ProvinceSelected"
110 116
                   v-model="property.provinceId"
111 117
                 >
112
-                  <option value="0">Please select</option>
118
+                  <option value="0">Please select province</option>
113 119
                   <option
114 120
                     v-for="province in provinces"
115 121
                     :value="province.id"
@@ -126,7 +132,7 @@
126 132
                   @change="CitySelected"
127 133
                   v-model="property.cityId"
128 134
                 >
129
-                  <option value="0">Please Select</option>
135
+                  <option value="0">Please select city</option>
130 136
                   <option
131 137
                     v-for="city in cities"
132 138
                     :value="city.id"
@@ -142,7 +148,7 @@
142 148
                   id="suburbselector"
143 149
                   v-model="property.suburbId"
144 150
                 >
145
-                  <option value="0">Please Select</option>
151
+                  <option value="0">Please select suburb</option>
146 152
                   <option
147 153
                     v-for="suburb in suburbs"
148 154
                     :value="suburb.id"
@@ -155,14 +161,19 @@
155 161
               <div class="col-md-4">
156 162
                 <label v-if="salesType === 'Rental'">Rental Price</label>
157 163
                 <label v-if="salesType !== 'Rental'">Sales Price</label>
158
-                <input
159
-                  class="form-control"
160
-                  type="number"
161
-                  name="price"
162
-                  id="price"
163
-                  placeholder="R"
164
-                  v-model="property.price"
165
-                />
164
+                <div class="input-group-prepend">
165
+                  <span class="input-group-text" style="color: #60CBEB">
166
+                    <b>R</b>
167
+                  </span>
168
+                  <input
169
+                    class="form-control"
170
+                    type="number"
171
+                    name="price"
172
+                    id="price"
173
+                    placeholder="R"
174
+                    v-model="property.price"
175
+                  />
176
+                </div>
166 177
               </div>
167 178
               <div class="col-md-4" v-if="salesType === 'Rental'">
168 179
                 <label>Per</label>
@@ -170,11 +181,11 @@
170 181
                   class="form-control"
171 182
                   name="propertyType"
172 183
                   id="propertyType"
173
-                  v-model="property.per"
184
+                  v-model="property.pricePer"
174 185
                 >
175 186
                   <option value>Please select</option>
176
-                  <option value="month">Month</option>
177
-                  <option value="day">Day</option>
187
+                  <option value="Month">Month</option>
188
+                  <option value="Day">Day</option>
178 189
                 </select>
179 190
               </div>
180 191
             </div>
@@ -196,9 +207,10 @@
196 207
               v-if="propertyType === 'Residential' & propertyOverviewFields.length > 0"
197 208
               :fields="propertyOverviewFields[0].fields"
198 209
               @UpdateUserDefinedFields="UpdateUserDefinedFields"
210
+              :id="1"
199 211
             ></UserField>
200 212
             <div class="form-group row" />
201
-            <div v-for="item in propertyFields" :key="item.id">
213
+            <div v-for="(item, i) in propertyFields" :key="item.id">
202 214
               <div class="row">
203 215
                 <div class="col-sm-12">
204 216
                   <div class="title-box-d">
@@ -208,7 +220,7 @@
208 220
               </div>
209 221
               <UserField
210 222
                 :fields="item.fields"
211
-                :id="item.id"
223
+                :id="item.name"
212 224
                 @UpdateUserDefinedFields="UpdateUserDefinedFields"
213 225
               />
214 226
             </div>
@@ -222,11 +234,17 @@
222 234
             </div>
223 235
             <ImageLoad :loadedImages="loadedImages" :savedImages="propertyImages" />
224 236
             <button
237
+              v-if="!wait"
225 238
               type="button"
226 239
               @click="SubmitData()"
227 240
               class="btn btn-b-n"
228 241
               style="width: 85px; height:40px;"
229
-            >Save</button>
242
+            >
243
+              <!-- <span class="spinner-border" role="status" aria-hidden="true"></span>
244
+              <span class="sr-only">Loading...</span>-->
245
+              Save
246
+            </button>
247
+            <label v-if="wait">Please wait...</label>
230 248
           </form>
231 249
         </div>
232 250
       </div>
@@ -255,6 +273,8 @@ export default {
255 273
       selectedCity: '',
256 274
       images: [],
257 275
       propertyFieldValues: [],
276
+      defaultImage: 0,
277
+      wait: false,
258 278
     };
259 279
   },
260 280
   methods: {
@@ -266,24 +286,36 @@ export default {
266 286
       'saveProperty',
267 287
       'getProperty',
268 288
       'getPropertyImages',
289
+      'clearProperty',
290
+      'clearPropertyImages',
291
+      'getPropertyEditDisplay',
292
+      'getPropertySavedOverviewFields',
293
+      'getPropertySavedFields',
294
+      'getSavedPropertyData',
269 295
     ]),
270 296
     SubmitData() {
271
-      let isDefault = true;
272
-      this.images.forEach((imagedata) => {
297
+      this.wait = true;
298
+      for (let i = 0; i < this.images.length; i++) {
299
+        let setAsDefault = false;
300
+        if (i === this.defaultImage) {
301
+          setAsDefault = true;
302
+        }
273 303
         this.property.propertyImages.push({
274
-          image: imagedata,
275
-          isDefault,
304
+          image: this.images[i],
305
+          isDefault: setAsDefault,
276 306
         });
277
-        isDefault = false;
278
-      });
279
-      this.property.propertyUserFields = this.propertyFieldValues;
307
+      }
308
+      this.property.createdBy = 'GeorgeW';
280 309
 
281 310
       this.saveProperty(this.property);
282 311
 
283
-      this.$router.push({
284
-        path: '/property/search',
285
-        query: { type: this.salesType, propertyType: this.propertyType },
286
-      });
312
+      setTimeout(
313
+        () => this.$router.push({
314
+            path: '/property/search',
315
+            query: { type: this.salesType, propertyType: this.propertyType },
316
+          }),
317
+        3000,
318
+      );
287 319
     },
288 320
     ProvinceSelected(item) {
289 321
       if (item.target.options.selectedIndex > 0) {
@@ -321,31 +353,61 @@ export default {
321 353
         this.propertyFieldValues.push(item);
322 354
       }
323 355
     },
356
+    UpdateDefaultImage(item) {
357
+      this.defaultImage = item;
358
+    },
324 359
   },
325 360
   mounted() {
361
+    this.wait = false;
362
+    this.clearProperty();
363
+    this.clearPropertyImages();
364
+    this.images = [];
365
+    this.defaultImage = 0;
366
+
367
+    if (this.propertyOverviewFields.length > 0) {
368
+      this.propertyOverviewFields = [];
369
+    }
370
+    if (this.propertyFields.length > 0) {
371
+      this.propertyFields = [];
372
+    }
373
+
326 374
     this.propertyType = this.$route.params.propType;
327 375
     this.salesType = this.$route.params.saleType;
328 376
 
329
-    this.getProvince();
330 377
     this.getPropertyTypes(this.$route.params.propType);
331
-    this.getPropertyOverviewFields();
332
-    this.getPropertyFields(this.$route.params.propType);
333 378
 
379
+    this.getProvince();
380
+    if (this.$route.query.id) {
381
+      // this.getCities(Object.assign({}, { province: this.selectedProvince }));
382
+      this.getSavedPropertyData(
383
+        Object.assign({}, { id: this.$route.query.id, type: this.propertyType }),
384
+      );
385
+    } else {
386
+      this.getPropertyOverviewFields();
387
+      this.getPropertyFields(this.$route.params.propType);
388
+    }
334 389
     // if (this.$route.params.id) {
390
+    //   this.getPropertyEditDisplay(4); // (this.$route.params.id);
391
+    //   this.propertyType = 'Residential'; // this.propertyEditDisplay.propertyType;
392
+    //   this.salesType = 'Rental'; // this.propertyEditDisplay.saleType;
393
+
394
+    //   this.getProvince();
395
+    //   this.getPropertyTypes('Residential');
396
+    //   this.getPropertySavedOverviewFields(4);
397
+    //   this.getPropertySavedFields(
398
+    //     Object.assign(
399
+    //       {},
400
+    //       {
401
+    //         type: 'Residential',
402
+    //         id: 4,
403
+    //       },
404
+    //     ),
405
+    //   );
406
+
335 407
     //   this.getProperty(this.$route.params.id);
336
-    //   this.getPropertyImages(this.$route.params.id);
408
+    // } else {
409
+
337 410
     // }
338
-    /*
339
-    if (this.$route.params.id) {
340
-      this.getProperty(this.$route.params.id);
341
-      this.getPropertyImages(this.$route.params.id);
342
-      if (this.property.propertyType.usageType === 0) {
343
-        this.propertyType = 'Residential';
344
-      } else {
345
-        this.propertyType = 'Commercial';
346
-      }
347
-      this.salesType = this.property.isSale ? 'Sale' : 'Rental';
348
-    } */
349 411
   },
350 412
   computed: {
351 413
     ...mapState('searchTab', ['provinces', 'cities', 'suburbs']),
@@ -361,10 +423,10 @@ export default {
361 423
       this.propertyType = this.$route.params.propType;
362 424
       // eslint-disable-next-line vue/no-side-effects-in-computed-properties
363 425
       this.salesType = this.$route.params.saleType;
364
-
365
-      this.getPropertyTypes(this.$route.params.propType);
366
-
367
-      this.getPropertyFields(this.$route.params.propType);
426
+      if (!this.$route.query.id) {
427
+        this.getPropertyTypes(this.$route.params.propType);
428
+        this.getPropertyFields(this.$route.params.propType);
429
+      }
368 430
 
369 431
       return this.propertyType;
370 432
     },

+ 2
- 2
src/components/shared/navBar.vue Переглянути файл

@@ -96,7 +96,7 @@
96 96
               >To Sell</div>
97 97
               <div
98 98
                 class="dropdown-item cursor-pointer"
99
-                @click="routerGoTo('/property/list/Residential/GeorgeW')"
99
+                @click="routerGoTo('/property/list/Residential/MyListings')"
100 100
               >My Residential Properties</div>
101 101
               <div
102 102
                 class="dropdown-item cursor-pointer"
@@ -129,7 +129,7 @@
129 129
               >To Sell</a>
130 130
               <a
131 131
                 class="dropdown-item cursor-pointer"
132
-                @click="routerGoTo('/property/list/Commercial/GeorgeW')"
132
+                @click="routerGoTo('/property/list/Commercial/MyListings')"
133 133
               >My Commercial Properties</a>
134 134
               <a
135 135
                 class="dropdown-item cursor-pointer"

+ 19
- 36
src/components/timeshare/sell/sellPage.vue Переглянути файл

@@ -129,23 +129,11 @@
129 129
           <div class="form-group row">
130 130
             <div class="col-md-6">
131 131
               <label for="Module">Module</label>
132
-              <input
133
-                class="form-control"
134
-                placeholder="Module"
135
-                type="text"
136
-                name="module"
137
-                v-model="sellItem.module"
138
-              />
132
+              <input class="form-control" type="text" name="module" v-model="sellItem.module" />
139 133
             </div>
140 134
             <div class="col-md-6">
141 135
               <label for="Week number">Week Number</label>
142
-              <input
143
-                class="form-control"
144
-                placeholder="Week Number"
145
-                type="text"
146
-                name="week"
147
-                v-model="sellItem.weekNumber"
148
-              />
136
+              <input class="form-control" type="text" name="week" v-model="sellItem.weekNumber" />
149 137
             </div>
150 138
           </div>
151 139
           <div class="form-group row">
@@ -165,23 +153,11 @@
165 153
           <div class="form-group row">
166 154
             <div class="col-md-6">
167 155
               <label for="Unit number">Unit Number</label>
168
-              <input
169
-                class="form-control"
170
-                placeholder="Unit Number"
171
-                type="text"
172
-                name="unit"
173
-                v-model="sellItem.unitNumber"
174
-              />
156
+              <input class="form-control" type="text" name="unit" v-model="sellItem.unitNumber" />
175 157
             </div>
176 158
             <div class="col-md-6">
177 159
               <label for="Owner">Owner</label>
178
-              <input
179
-                class="form-control"
180
-                placeholder="Owner"
181
-                type="text"
182
-                name="owner"
183
-                v-model="sellItem.owner"
184
-              />
160
+              <input class="form-control" type="text" name="owner" v-model="sellItem.owner" />
185 161
             </div>
186 162
           </div>
187 163
           <div class="form-group row">
@@ -189,7 +165,6 @@
189 165
               <label for="Levy">Levy Amount</label>
190 166
               <input
191 167
                 class="form-control"
192
-                placeholder="Levy"
193 168
                 type="number"
194 169
                 step="any"
195 170
                 name="levy"
@@ -238,9 +213,12 @@
238 213
               >
239 214
                 <option v-for="(item, i) in bankedEntities" :key="i">{{item}}</option>
240 215
               </select>
216
+              <br />
217
+              <br />
218
+              <br />
219
+              <DetailIndividual />
241 220
             </div>
242 221
           </div>
243
-          <br />
244 222
           <hr />
245 223
           <br />
246 224
           <h3>Share transfer information</h3>
@@ -344,14 +322,15 @@
344 322
             <div class="col-md-4">
345 323
               <div class="input-group mb-3">
346 324
                 <div class="input-group-prepend">
347
-                  <span class="input-group-text">R</span>
325
+                  <span class="input-group-text" style="color: #60CBEB">
326
+                    <b>R</b>
327
+                  </span>
348 328
                 </div>
349 329
                 <input
350 330
                   class="form-control"
351 331
                   type="number"
352 332
                   step="any"
353 333
                   name="purchasePrice"
354
-                  placeholder="R"
355 334
                   v-model="sellItem.originalPurchasePrice"
356 335
                 />
357 336
               </div>
@@ -395,14 +374,15 @@
395 374
             <div class="col-md-4">
396 375
               <div class="input-group mb-3">
397 376
                 <div class="input-group-prepend">
398
-                  <span class="input-group-text">R</span>
377
+                  <span class="input-group-text" style="color: #60CBEB">
378
+                    <b>R</b>
379
+                  </span>
399 380
                 </div>
400 381
                 <input
401 382
                   class="form-control"
402 383
                   type="number"
403 384
                   step="any"
404 385
                   name="sellingPrice"
405
-                  placeholder="R"
406 386
                   v-model="sellItem.sellingPrice"
407 387
                 />
408 388
               </div>
@@ -420,14 +400,15 @@
420 400
             <div class="col-md-4">
421 401
               <div class="input-group mb-3">
422 402
                 <div class="input-group-prepend">
423
-                  <span class="input-group-text">R</span>
403
+                  <span class="input-group-text" style="color: #60CBEB">
404
+                    <b>R</b>
405
+                  </span>
424 406
                 </div>
425 407
                 <input
426 408
                   class="form-control"
427 409
                   type="number"
428 410
                   step="any"
429 411
                   name="commission"
430
-                  placeholder="R"
431 412
                   v-model="sellItem.agentCommission"
432 413
                 />
433 414
               </div>
@@ -465,9 +446,11 @@
465 446
 </template>
466 447
 <script>
467 448
 import { mapState, mapActions } from 'vuex';
449
+import DetailIndividual from '../../user/timeshareIndividual.vue';
468 450
 
469 451
 export default {
470 452
   name: 'TimeshareToSell',
453
+  components: { DetailIndividual },
471 454
   created() {
472 455
     this.initTimeshare();
473 456
   },

+ 3
- 11
src/components/user/loginPage.vue Переглянути файл

@@ -102,13 +102,13 @@ export default {
102 102
   },
103 103
   methods: {
104 104
     Login() {
105
-      console.log(this.username + this.password);
106 105
       axios
107
-        .post('http://localhost:57260/api/register/authenticate', {
106
+        .post('/api/register/authenticate', {
108 107
           username: this.username,
109 108
           password: this.password,
110 109
         })
111
-        .then(response => console.log(response.data));
110
+        .then(response => console.log(response.data))
111
+        .catch(error => console.log(error.push));
112 112
       this.$router.push('/');
113 113
     },
114 114
     togglePassword() {
@@ -119,14 +119,6 @@ export default {
119 119
       this.showPassword = false;
120 120
       this.isPasswordShown = 'password';
121 121
     },
122
-    authHeader() {
123
-      const user = JSON.parse(localStorage.getItem('user'));
124
-
125
-      if (user && user.token) {
126
-        return { Authoriztion: `Bearer ${user.token}` };
127
-      }
128
-      return {};
129
-    },
130 122
     SendMail() {},
131 123
   },
132 124
 };

+ 2
- 0
src/components/user/registerAgencySection.vue Переглянути файл

@@ -5,6 +5,7 @@
5 5
       <div class="reg-page">
6 6
         <div class="regform" style="text-align:left">
7 7
           <h4>Agency Details</h4>
8
+          <div class="row">
8 9
           <div class="row" style="text-align:left">
9 10
             <div class="col-md-8" style="margin-bottom: 1em">
10 11
               <div class="input-group-prepend">
@@ -49,6 +50,7 @@
49 50
               </div>
50 51
             </div>
51 52
           </div>
53
+          </div>
52 54
           <hr />
53 55
           <div class="col-md-10" style="text-align:left">
54 56
             <h5 style="margin-bottom: 1em">Agency Administrator</h5>

+ 88
- 102
src/components/user/registerPage.vue Переглянути файл

@@ -5,11 +5,12 @@
5 5
       <div class="regform">
6 6
         <div class="col-md-10" style="text-align:left">
7 7
           <h4>Private Individual</h4>
8
+          <div class="form-group row"></div>
8 9
           <div class="row" style="text-align:left">
9 10
             <div class="col-md-8" style="margin-bottom: 1em">
10 11
               <div class="input-group-prepend">
11 12
                 <span class="input-group-text">
12
-                  <eva-icon name="people" fill="#60CBEB"></eva-icon>
13
+                  <eva-icon name="person-outline" fill="#60CBEB"></eva-icon>
13 14
                 </span>
14 15
                 <input
15 16
                   class="form-control"
@@ -23,7 +24,7 @@
23 24
             <div class="col-md-8" style="margin-bottom: 1em">
24 25
               <div class="input-group-prepend">
25 26
                 <span class="input-group-text">
26
-                  <eva-icon name="book" fill="#60CBEB"></eva-icon>
27
+                  <eva-icon name="book-outline" fill="#60CBEB"></eva-icon>
27 28
                 </span>
28 29
                 <input
29 30
                   class="form-control"
@@ -34,121 +35,106 @@
34 35
                 />
35 36
               </div>
36 37
             </div>
37
-          </div>
38
-
39
-          <div class="row" style="text-align:left">
40
-            <div class="col-md-7" style="text-align:left">
41
-              <div class="input-group mb-3">
42
-                <div class="input-group-prepend">
43
-                  <span class="input-group-text">
44
-                    <eva-icon name="email" fill="#60CBEB"></eva-icon>
45
-                  </span>
46
-                  <input
47
-                    class="form-control"
48
-                    type="text"
49
-                    name="email"
50
-                    placeholder="Email Address"
51
-                    v-model="registerIndividual.email"
52
-                  />
53
-                  <div class="form-group row"></div>
54
-                </div>
38
+            <div class="col-md-8" style="margin-bottom: 1em">
39
+              <div class="input-group-prepend">
40
+                <span class="input-group-text">
41
+                  <eva-icon name="email-outline" fill="#60CBEB"></eva-icon>
42
+                </span>
43
+                <input
44
+                  class="form-control"
45
+                  type="text"
46
+                  name="email"
47
+                  placeholder="Email Address"
48
+                  v-model="registerIndividual.email"
49
+                />
55 50
               </div>
56 51
             </div>
57
-
58
-            <div class="col-md-8" style="text-align:left">
59
-              <div class="input-group mb-3">
60
-                <div class="input-group-prepend">
61
-                  <span class="input-group-text">
62
-                    <eva-icon name="smartphone" fill="#60CBEB"></eva-icon>
63
-                  </span>
64
-                  <input
65
-                    class="form-control"
66
-                    type="number"
67
-                    name="cellnumber"
68
-                    placeholder="Cellphone Number"
69
-                    v-model="registerIndividual.cellNumber"
70
-                  />
71
-                </div>
52
+            <div class="col-md-8" style="margin-bottom: 1em">
53
+              <div class="input-group-prepend">
54
+                <span class="input-group-text">
55
+                  <eva-icon name="smartphone-outline" fill="#60CBEB"></eva-icon>
56
+                </span>
57
+                <input
58
+                  class="form-control"
59
+                  type="text"
60
+                  name="cellnumber"
61
+                  placeholder="Cellphone Number"
62
+                  v-model="registerIndividual.cellNumber"
63
+                />
72 64
               </div>
73
-              <div class="input-group mb-3">
74
-                <div class="input-group-prepend">
75
-                  <span class="input-group-text">
76
-                    <eva-icon name="phone-outline" fill="#60CBEB"></eva-icon>
77
-                  </span>
78
-                  <input
79
-                    class="form-control"
80
-                    type="number"
81
-                    name="landline"
82
-                    placeholder="Landline Number"
83
-                    v-model="registerIndividual.telephone"
84
-                  />
85
-                </div>
65
+            </div>
66
+            <div class="col-md-8" style="margin-bottom: 1em">
67
+              <div class="input-group-prepend">
68
+                <span class="input-group-text">
69
+                  <eva-icon name="phone-outline" fill="#60CBEB"></eva-icon>
70
+                </span>
71
+                <input
72
+                  class="form-control"
73
+                  type="text"
74
+                  name="landline"
75
+                  placeholder="Landline Number"
76
+                  v-model="registerIndividual.telephone"
77
+                />
86 78
               </div>
87 79
             </div>
88 80
           </div>
89 81
           <hr />
90 82
           <div class="row">
91 83
             <div class="col-md-8" style="margin-bottom: 1em">
92
-              <div class="input-group mb-3">
93
-                <div class="input-group-prepend">
94
-                  <span class="input-group-text">
95
-                    <eva-icon name="person" fill="#60CBEB"></eva-icon>
96
-                  </span>
97
-                  <input
98
-                    class="form-control"
99
-                    type="text"
100
-                    name="username"
101
-                    placeholder="Username"
102
-                    v-model="registerIndividual.username"
103
-                  />
104
-                </div>
84
+              <div class="input-group-prepend">
85
+                <span class="input-group-text">
86
+                  <eva-icon name="person" fill="#60CBEB"></eva-icon>
87
+                </span>
88
+                <input
89
+                  class="form-control"
90
+                  type="text"
91
+                  name="username"
92
+                  placeholder="Username"
93
+                  v-model="registerIndividual.username"
94
+                />
105 95
               </div>
106 96
             </div>
107 97
             <div class="col-md-8" style="margin-bottom: 1em">
108
-              <div class="input-group mb-3">
109
-                <div class="input-group-prepend">
110
-                  <span class="input-group-text">
111
-                    <eva-icon name="lock" fill="#60CBEB"></eva-icon>
112
-                  </span>
113
-                  <input
114
-                    class="form-control"
115
-                    :type="isPasswordShown"
116
-                    v-model="registerIndividual.password"
117
-                    id="password"
118
-                    placeholder="Password"
119
-                    name="password"
120
-                    value
121
-                  />
122
-                </div>
98
+              <div class="input-group-prepend">
99
+                <span class="input-group-text">
100
+                  <eva-icon name="lock" fill="#60CBEB"></eva-icon>
101
+                </span>
102
+                <input
103
+                  class="form-control"
104
+                  :type="isPasswordShown"
105
+                  v-model="registerIndividual.password"
106
+                  id="password"
107
+                  placeholder="Password"
108
+                  name="password"
109
+                  value
110
+                />
123 111
               </div>
124 112
             </div>
125 113
             <div class="col-md-8" style="margin-bottom: 1em">
126
-              <div class="input-group mb-3">
127
-                <div class="input-group-prepend">
128
-                  <span class="input-group-text">
129
-                    <eva-icon name="lock" fill="#60CBEB"></eva-icon>
130
-                  </span>
131
-                  <input
132
-                    class="form-control"
133
-                    :type="isPasswordShown"
134
-                    v-model="registerIndividual.password"
135
-                    id="password"
136
-                    placeholder="Confirm Password"
137
-                    name="confirmpassword"
138
-                    value
139
-                  />
140
-                  <div>
141
-                    <div class="input-group-append">
142
-                      <span class="input-group-text">
143
-                        <eva-icon
144
-                          v-if="!showPassword"
145
-                          name="eye-off"
146
-                          fill="#60CBEB"
147
-                          @click="togglePassword()"
148
-                        ></eva-icon>
149
-                        <eva-icon v-else name="eye" fill="#60CBEB" @click="passwordToggled()"></eva-icon>
150
-                      </span>
151
-                    </div>
114
+              <div class="input-group-prepend">
115
+                <span class="input-group-text">
116
+                  <eva-icon name="lock" fill="#60CBEB"></eva-icon>
117
+                </span>
118
+                <input
119
+                  class="form-control"
120
+                  :type="isPasswordShown"
121
+                  v-model="registerIndividual.password"
122
+                  id="password"
123
+                  placeholder="Confirm Password"
124
+                  name="confirmpassword"
125
+                  value
126
+                />
127
+                <div>
128
+                  <div class="input-group-append">
129
+                    <span class="input-group-text">
130
+                      <eva-icon
131
+                        v-if="!showPassword"
132
+                        name="eye-off"
133
+                        fill="#60CBEB"
134
+                        @click="togglePassword()"
135
+                      ></eva-icon>
136
+                      <eva-icon v-else name="eye" fill="#60CBEB" @click="passwordToggled()"></eva-icon>
137
+                    </span>
152 138
                   </div>
153 139
                 </div>
154 140
               </div>

+ 194
- 0
src/components/user/timeshareIndividual.vue Переглянути файл

@@ -0,0 +1,194 @@
1
+<template>
2
+  <!-- eslint-disable max-len -->
3
+  <div class="reg-page">
4
+    <hr />
5
+    <div class="form-group row"></div>
6
+    <div class="col-md-12" style="text-align:left">
7
+      <h4>Detailed Individual Information</h4>
8
+      <div class="form-group row"></div>
9
+      <div class="row" style="text-align:left">
10
+        <div class="col-md-6">
11
+          <div class="input-group-prepend">
12
+            <span class="input-group-text">
13
+              <eva-icon name="person" fill="#60CBEB"></eva-icon>
14
+            </span>
15
+            <input
16
+              class="form-control"
17
+              type="text"
18
+              name="name"
19
+              placeholder="Name"
20
+              v-model="registerIndividual.name"
21
+            />
22
+          </div>
23
+        </div>
24
+        <div class="col-md-6" style="margin-bottom: 1em">
25
+          <div class="input-group-prepend">
26
+            <span class="input-group-text">
27
+              <eva-icon name="book" fill="#60CBEB"></eva-icon>
28
+            </span>
29
+            <input
30
+              class="form-control"
31
+              type="text"
32
+              name="surname"
33
+              placeholder="Surname"
34
+              v-model="registerIndividual.surname"
35
+            />
36
+          </div>
37
+        </div>
38
+        <div class="col-md-6" style="margin-bottom: 1em">
39
+          <div class="input-group-prepend">
40
+            <span class="input-group-text">
41
+              <eva-icon name="archive" fill="#60CBEB"></eva-icon>
42
+            </span>
43
+            <input class="form-control" type="text" name="idnumber" placeholder="ID Number" />
44
+          </div>
45
+        </div>
46
+        <div class="col-md-6" style="margin-bottom: 1em">
47
+          <div class="input-group-prepend">
48
+            <span class="input-group-text">
49
+              <eva-icon name="npm" fill="#60CBEB"></eva-icon>
50
+            </span>
51
+            <input
52
+              class="form-control"
53
+              type="text"
54
+              name="companyregnumber"
55
+              placeholder="Company Reg Number"
56
+            />
57
+          </div>
58
+        </div>
59
+        <div class="col-md-6" style="margin-bottom: 1em">
60
+          <div class="input-group-prepend">
61
+            <span class="input-group-text">
62
+              <eva-icon name="people" fill="#60CBEB"></eva-icon>
63
+            </span>
64
+            <input
65
+              class="form-control"
66
+              type="text"
67
+              name="maritalstatus"
68
+              placeholder="Marital Status"
69
+            />
70
+          </div>
71
+        </div>
72
+        <div class="col-md-6" style="margin-bottom: 1em">
73
+          <div class="input-group-prepend">
74
+            <span class="input-group-text">
75
+              <eva-icon name="email" fill="#60CBEB"></eva-icon>
76
+            </span>
77
+            <input
78
+              class="form-control"
79
+              type="text"
80
+              name="email"
81
+              placeholder="Email Address"
82
+              v-model="registerIndividual.email"
83
+            />
84
+          </div>
85
+        </div>
86
+        <div class="col-md-6" style="margin-bottom: 1em">
87
+          <div class="input-group-prepend">
88
+            <span class="input-group-text">
89
+              <eva-icon name="smartphone" fill="#60CBEB"></eva-icon>
90
+            </span>
91
+            <input
92
+              class="form-control"
93
+              type="text"
94
+              name="cellnumber"
95
+              placeholder="Cellphone Number"
96
+              v-model="registerIndividual.cellNumber"
97
+            />
98
+          </div>
99
+        </div>
100
+        <div class="col-md-6" style="margin-bottom: 1em">
101
+          <div class="input-group-prepend">
102
+            <span class="input-group-text">
103
+              <eva-icon name="phone" fill="#60CBEB"></eva-icon>
104
+            </span>
105
+            <input
106
+              class="form-control"
107
+              type="text"
108
+              name="landline"
109
+              placeholder="Landline Number"
110
+              v-model="registerIndividual.telephone"
111
+            />
112
+          </div>
113
+        </div>
114
+        <div class="col-md-6" style="margin-bottom: 1em">
115
+          <div class="input-group-prepend">
116
+            <span class="input-group-text">
117
+              <eva-icon name="home" fill="#60CBEB"></eva-icon>
118
+            </span>
119
+            <input
120
+              class="form-control"
121
+              type="text"
122
+              name="address"
123
+              placeholder="Address"
124
+              v-model="registerIndividual.telephone"
125
+            />
126
+          </div>
127
+        </div>
128
+      </div>
129
+    </div>
130
+  </div>
131
+</template>
132
+
133
+<script>
134
+import { mapState, mapActions } from 'vuex';
135
+
136
+export default {
137
+  props: {
138
+    RegisterHeader: { type: String, default: undefined },
139
+  },
140
+  name: 'PrivateIndividual',
141
+  data() {
142
+    return {
143
+      user: null,
144
+      isPasswordShown: 'password',
145
+      selectItems: [{ text: 'password', value: 0 }],
146
+      selectErrors: 'Some error with the field',
147
+      select: null,
148
+      textErrors: 'Some error with the field',
149
+      text: '',
150
+      showPassword: false,
151
+    };
152
+  },
153
+  computed: {
154
+    ...mapState('registerIndividual', ['registerIndividual']),
155
+
156
+    Header() {
157
+      return this.RegisterHeader
158
+        ? 'Agency Administrator Details'
159
+        : 'Private Individual';
160
+    },
161
+  },
162
+  methods: {
163
+    ...mapActions('registerIndividual', [
164
+      'getIndividual',
165
+      'saveIndividual',
166
+      'updateIndividual',
167
+      'clearIndividual',
168
+    ]),
169
+
170
+    togglePassword() {
171
+      this.showPassword = true;
172
+      this.isPasswordShown = 'text';
173
+    },
174
+    passwordToggled() {
175
+      this.showPassword = false;
176
+      this.isPasswordShown = 'password';
177
+    },
178
+    SubmitData() {
179
+      this.saveIndividual(this.registerIndividual);
180
+
181
+      this.$router.push('/registerIndividual/');
182
+    },
183
+    Close() {
184
+      this.$router.push('/registerIndividual/');
185
+    },
186
+  },
187
+};
188
+</script>
189
+
190
+<style>
191
+.goDown {
192
+  margin-top: 150px;
193
+}
194
+</style>

+ 158
- 163
src/router/index.js Переглянути файл

@@ -19,7 +19,6 @@ import PropertyTypeList from '../components/admin/property/propertyTypeList.vue'
19 19
 import PropertyType from '../components/admin/property/propertyTypeEdit.vue';
20 20
 import UserDefinedGroups from '../components/admin/property/userDefinedGroupsPage.vue';
21 21
 import UserDefinedGroup from '../components/admin/property/userDefinedGroupPage.vue';
22
-import UserField from '../components/admin/property/userDefinedFieldPage.vue';
23 22
 
24 23
 import AboutUs from '../components/about/aboutUsPage.vue';
25 24
 import AboutTimeshare from '../components/about/aboutTimeshare.vue';
@@ -40,167 +39,163 @@ import PrivacyPolicy from '../components/misc/privacyPolicyPage.vue';
40 39
 Vue.use(Router);
41 40
 
42 41
 export default new Router({
43
-  routes: [{
44
-    path: '/',
45
-    name: 'Home',
46
-    component: HomePage,
47
-  },
48
-  {
49
-    path: '/about/us',
50
-    name: 'aboutus',
51
-    component: AboutUs,
52
-  },
53
-  {
54
-    path: '/about/timeshare',
55
-    name: 'abouttimeshare',
56
-    component: AboutTimeshare,
57
-  },
58
-  {
59
-    path: '/timeshare/sell',
60
-    name: 'TimeshareSell',
61
-    component: TimeshareSell,
62
-  },
63
-  {
64
-    path: '/timeshare/buy',
65
-    name: 'TimeshareBuy',
66
-    component: TimeshareBuy,
67
-  },
68
-  {
69
-    path: '/timeshare/faq',
70
-    name: 'TimeshareFAQ',
71
-    component: TimeshareFAQ,
72
-  },
73
-  {
74
-    path: '/user/login',
75
-    name: 'Login',
76
-    component: Login,
77
-  },
78
-  {
79
-    path: '/user/register',
80
-    name: 'PrivateIndividual',
81
-    component: PrivateIndividual,
82
-  },
83
-  {
84
-    path: '/user/registeragency',
85
-    name: 'Agency',
86
-    component: Agency,
87
-  },
88
-  {
89
-    path: '/property/property/:id',
90
-    name: 'PropertyPage',
91
-    component: PropertyPage,
92
-  },
93
-  {
94
-    path: '/property/:propertyType/search',
95
-    name: 'PropertySearch',
96
-    component: PropertySearch,
97
-  },
98
-  {
99
-    path: '/property/search',
100
-    name: 'PropertySearchTab',
101
-    component: PropertySearch,
102
-  },
103
-  {
104
-    path: '/property/:propType/:saleType',
105
-    name: 'PropertyNew',
106
-    component: PropertyEdit,
107
-  },
108
-  {
109
-    path: '/property/:id',
110
-    name: 'PropertyEdit',
111
-    component: PropertyEdit,
112
-  },
113
-  {
114
-    path: '/property/list/:propertyType/:user',
115
-    name: 'PropertyList',
116
-    component: PropertyList,
117
-  },
118
-  {
119
-    path: '/propertyTypes/list',
120
-    name: 'PropertyTypeList',
121
-    component: PropertyTypeList,
122
-  },
123
-  {
124
-    path: '/propertyType/new',
125
-    name: 'PropertyTypeNew',
126
-    component: PropertyType,
127
-  },
128
-  {
129
-    path: '/propertyType/:id',
130
-    name: 'PropertyTypeEdit',
131
-    component: PropertyType,
132
-  },
133
-  {
134
-    path: '/userDefinedGroups/list',
135
-    name: 'UserDefinedGroupsList',
136
-    component: UserDefinedGroups,
137
-  },
138
-  {
139
-    path: '/userDefinedGroups/userDefinedGroup/:id',
140
-    name: 'UserDefinedGroupEdit',
141
-    component: UserDefinedGroup,
142
-  },
143
-  {
144
-    path: '/userDefinedGroups/userDefinedGroup',
145
-    name: 'UserDefinedGroupNew',
146
-    component: UserDefinedGroup,
147
-  },
148
-  {
149
-    path: '/userField',
150
-    name: 'UserDefinedField',
151
-    component: UserField,
152
-  },
153
-  {
154
-    path: '/status/list',
155
-    name: 'StatusList',
156
-    component: Status,
157
-  },
158
-  {
159
-    path: '/status/timeshareAdmin',
160
-    name: 'TimeshareAdmin',
161
-    component: timeshareAdminPage,
162
-  },
163
-  {
164
-    path: '/status/tenderWeekAdmin',
165
-    name: 'TenderWeekAdmin',
166
-    component: tenderWeekAdminPage,
167
-  },
168
-  {
169
-    path: '/status/userManagementPage',
170
-    name: 'userManagementPage',
171
-    component: userManagementPage,
172
-  },
173
-  {
174
-    path: '/status/changeLogPage',
175
-    name: 'changeLogPage',
176
-    component: changeLogPage,
177
-  },
178
-  {
179
-    path: '/unitConfiguration/list',
180
-    name: 'UnitConfiguration',
181
-    component: UnitConfiguration,
182
-  },
183
-  {
184
-    path: '/contactus',
185
-    name: 'ContactUs',
186
-    component: ContactUs,
187
-  },
188
-  {
189
-    path: '/privacypolicy',
190
-    name: 'PrivacyPolicy',
191
-    component: PrivacyPolicy,
192
-  },
193
-  {
194
-    path: '/resort/:resortCode',
195
-    name: 'ResortPage',
196
-    component: ResortPage,
197
-    props: true,
198
-  },
199
-  {
200
-    path: '/resort/:resortCode/:weekId',
201
-    name: 'UnitPage',
202
-    component: UnitPage,
203
-    props: true,
204
-  },
42
+  routes: [
43
+    {
44
+      path: '/',
45
+      name: 'Home',
46
+      component: HomePage,
47
+    },
48
+    {
49
+      path: '/about/us',
50
+      name: 'aboutus',
51
+      component: AboutUs,
52
+    },
53
+    {
54
+      path: '/about/timeshare',
55
+      name: 'abouttimeshare',
56
+      component: AboutTimeshare,
57
+    },
58
+    {
59
+      path: '/timeshare/sell',
60
+      name: 'TimeshareSell',
61
+      component: TimeshareSell,
62
+    },
63
+    {
64
+      path: '/timeshare/buy',
65
+      name: 'TimeshareBuy',
66
+      component: TimeshareBuy,
67
+    },
68
+    {
69
+      path: '/timeshare/faq',
70
+      name: 'TimeshareFAQ',
71
+      component: TimeshareFAQ,
72
+    },
73
+    {
74
+      path: '/user/login',
75
+      name: 'Login',
76
+      component: Login,
77
+    },
78
+    {
79
+      path: '/user/register',
80
+      name: 'PrivateIndividual',
81
+      component: PrivateIndividual,
82
+    },
83
+    {
84
+      path: '/user/registeragency',
85
+      name: 'Agency',
86
+      component: Agency,
87
+    },
88
+    {
89
+      path: '/property/property/:id',
90
+      name: 'PropertyPage',
91
+      component: PropertyPage,
92
+    },
93
+    {
94
+      path: '/property/:propertyType/search',
95
+      name: 'PropertySearch',
96
+      component: PropertySearch,
97
+    },
98
+    {
99
+      path: '/property/search',
100
+      name: 'PropertySearchTab',
101
+      component: PropertySearch,
102
+    },
103
+    {
104
+      path: '/property/:propType/:saleType',
105
+      name: 'PropertyNew',
106
+      component: PropertyEdit,
107
+    },
108
+    {
109
+      path: '/property/edit/:id/:propType/:saleType',
110
+      name: 'PropertyEdit',
111
+      component: PropertyEdit,
112
+    },
113
+    {
114
+      path: '/property/list/:propertyType/:user',
115
+      name: 'PropertyList',
116
+      component: PropertyList,
117
+    },
118
+    {
119
+      path: '/propertyTypes/list',
120
+      name: 'PropertyTypeList',
121
+      component: PropertyTypeList,
122
+    },
123
+    {
124
+      path: '/propertyType/new',
125
+      name: 'PropertyTypeNew',
126
+      component: PropertyType,
127
+    },
128
+    {
129
+      path: '/propertyType/:id',
130
+      name: 'PropertyTypeEdit',
131
+      component: PropertyType,
132
+    },
133
+    {
134
+      path: '/userDefinedGroups/list',
135
+      name: 'UserDefinedGroupsList',
136
+      component: UserDefinedGroups,
137
+    },
138
+    {
139
+      path: '/userDefinedGroups/userDefinedGroup/:id',
140
+      name: 'UserDefinedGroupEdit',
141
+      component: UserDefinedGroup,
142
+    },
143
+    {
144
+      path: '/userDefinedGroups/userDefinedGroup',
145
+      name: 'UserDefinedGroupNew',
146
+      component: UserDefinedGroup,
147
+    },
148
+    {
149
+      path: '/status/list',
150
+      name: 'StatusList',
151
+      component: Status,
152
+    },
153
+    {
154
+      path: '/status/timeshareAdmin',
155
+      name: 'TimeshareAdmin',
156
+      component: timeshareAdminPage,
157
+    },
158
+    {
159
+      path: '/status/tenderWeekAdmin',
160
+      name: 'TenderWeekAdmin',
161
+      component: tenderWeekAdminPage,
162
+    },
163
+    {
164
+      path: '/status/userManagementPage',
165
+      name: 'userManagementPage',
166
+      component: userManagementPage,
167
+    },
168
+    {
169
+      path: '/status/changeLogPage',
170
+      name: 'changeLogPage',
171
+      component: changeLogPage,
172
+    },
173
+    {
174
+      path: '/unitConfiguration/list',
175
+      name: 'UnitConfiguration',
176
+      component: UnitConfiguration,
177
+    },
178
+    {
179
+      path: '/contactus',
180
+      name: 'ContactUs',
181
+      component: ContactUs,
182
+    },
183
+    {
184
+      path: '/privacypolicy',
185
+      name: 'PrivacyPolicy',
186
+      component: PrivacyPolicy,
187
+    },
188
+    {
189
+      path: '/resort/:resortCode',
190
+      name: 'ResortPage',
191
+      component: ResortPage,
192
+      props: true,
193
+    },
194
+    {
195
+      path: '/resort/:resortCode/:weekId',
196
+      name: 'UnitPage',
197
+      component: UnitPage,
198
+      props: true,
199
+    },
205 200
   ],
206 201
 });

+ 92
- 17
src/store/modules/property/property.js Переглянути файл

@@ -4,22 +4,26 @@ export default {
4 4
   namespaced: true,
5 5
   state: {
6 6
     property: {
7
-      id: 0,
7
+      createdBy: '',
8 8
       propertyTypeId: 0,
9 9
       propertyName: '',
10 10
       unit: '',
11
+      operationalCosts: 0.0,
12
+      price: 0,
13
+      pricePer: '',
14
+      isSale: false,
15
+      description: '',
16
+      shortDescription: '',
11 17
       addressLine1: '',
12 18
       addressLine2: '',
13 19
       addressLine3: '',
14 20
       suburbId: 0,
15 21
       cityId: 0,
16 22
       provinceId: 0,
17
-      price: '',
18
-      per: '',
19
-      description: '',
20
-      isSale: false,
23
+      published: false,
21 24
       propertyUserFields: [],
22 25
       propertyImages: [],
26
+      id: 0,
23 27
     },
24 28
     propertyImages: [],
25 29
     propertyTypes: [],
@@ -61,75 +65,146 @@ export default {
61 65
     setLatestProperties(state, properties) {
62 66
       state.latestProperties = properties;
63 67
     },
68
+    clearProperty(state) {
69
+      state.property = {
70
+        createdBy: '',
71
+        propertyTypeId: 0,
72
+        propertyName: '',
73
+        unit: '',
74
+        operationalCosts: 0.0,
75
+        price: 0,
76
+        pricePer: '',
77
+        isSale: false,
78
+        description: '',
79
+        shortDescription: '',
80
+        addressLine1: '',
81
+        addressLine2: '',
82
+        addressLine3: '',
83
+        suburbId: 0,
84
+        cityId: 0,
85
+        provinceId: 0,
86
+        published: false,
87
+        propertyUserFields: [],
88
+        propertyImages: [],
89
+        id: 0,
90
+      };
91
+    },
92
+    clearPropertyImages(state) {
93
+      state.propertyImages = [];
94
+    },
95
+    setProperties(state, properties) {
96
+      state.properties = properties;
97
+    },
64 98
   },
65 99
   getters: {},
66 100
   actions: {
67 101
     getProperty({ commit }, id) {
68
-      console.log(id);
69 102
       axios
70
-        .get(`http://localhost:57260/Property/Property/${id}`)
103
+        .get(`/api/Property/${id}`)
71 104
         .then(result => commit('setProperty', result.data))
72 105
         .catch(console.error);
73 106
     },
74 107
     getPropertyImages({ commit }, id) {
75 108
       axios
76
-        .get(`http://localhost:57260/property/PropertyImage/getpropertyimages/${id}`)
109
+        .get(`/api/PropertyImage/getPropertyImages/${id}`)
77 110
         .then(result => commit('setPropertyImages', result.data))
78 111
         .catch(console.error);
79 112
     },
80 113
     getPropertyTypes({ commit }, propertyType) {
81 114
       axios
82
-        .get(`http://localhost:57260/Property/PropertyType/type/${propertyType}`)
115
+        .get(`/api/PropertyType/type/${propertyType}`)
83 116
         .then(result => commit('setPropertyTypes', result.data))
84 117
         .catch(console.error);
85 118
     },
86 119
     getPropertyTypesRes({ commit }) {
87 120
       axios
88
-        .get('http://localhost:57260/Property/PropertyType/type/Residential')
121
+        .get('/api/PropertyType/type/Residential')
89 122
         .then(result => commit('setPropertyTypesRes', result.data))
90 123
         .catch(console.error);
91 124
     },
92 125
     getPropertyTypesCom({ commit }) {
93 126
       axios
94
-        .get('http://localhost:57260/Property/PropertyType/type/Commercial')
127
+        .get('/api/PropertyType/type/Commercial')
95 128
         .then(result => commit('setPropertyTypesCom', result.data))
96 129
         .catch(console.error);
97 130
     },
98 131
     getPropertyOverviewFields({ commit }) {
99 132
       axios
100
-        .get('http://localhost:57260/Property/PropertyFields/Property Overview')
133
+        .get('/api/PropertyFields/Property Overview')
101 134
         .then(response => commit('setPropertyOverviewFields', response.data));
102 135
     },
103 136
     getPropertyFields({ commit }, propertyType) {
104 137
       axios
105
-        .get(`http://localhost:57260/property/propertyfields/Propertytype/${propertyType}`)
138
+        .get(`/api/propertyFields/PropertyType/${propertyType}`)
106 139
         .then(response => commit('setPropertyFields', response.data));
107 140
     },
141
+    getPropertySavedOverviewFields({ commit }, id) {
142
+      axios
143
+        .get(`/api/PropertyFields/GetSavedValues/Residential/Property Overview/${id}`)
144
+        .then(response => commit('setPropertyOverviewFields', response.data))
145
+        .catch(console.error);
146
+    },
147
+    getPropertySavedFields({ commit }, item) {
148
+      axios
149
+        .get(`/api/PropertyFields/GetSavedValues/${item.type}/All/${item.id}`)
150
+        .then(response => commit('setPropertyFields', response.data))
151
+        .catch(console.error);
152
+    },
108 153
     saveProperty({ commit }, item) {
109 154
       axios
110
-        .post('http://localhost:57260/Property/Property', item)
155
+        .post('/api/Property', item)
111 156
         .then(result => commit('updateCurrentProperty', result.data))
112 157
         .catch(console.error);
113 158
     },
114 159
     searchPropertiesParams({ commit }, item) {
115 160
       axios
116 161
         .get(
117
-          `http://localhost:57260/Property/Property/Search/${item.type}/${item.propertyType}/${item.province}/${item.city}/${item.suburb}/${item.propType}`,
162
+          `/api/property/search/${item.type}/${item.propertyType}/${item.province}/${item.city}/${item.suburb}/${item.propType}`,
118 163
         )
119 164
         .then(response => commit('updateSearch', response.data))
120 165
         .catch(console.error);
121 166
     },
122 167
     searchPropertiesKeyword({ commit }, item) {
123 168
       axios
124
-        .get(`http://localhost:57260/Property/Property/Search/${item.keyword}`)
169
+        .get(`/api/Property/Search/${item.keyword}`)
125 170
         .then(response => commit('updateSearch', response.data))
126 171
         .catch(console.error);
127 172
     },
128 173
     searchLatestProperties({ commit }) {
129 174
       axios
130
-        .get('http://localhost:57260/property/property/latestProperties')
175
+        .get('/api/property/latestProperties')
131 176
         .then(response => commit('setLatestProperties', response.data))
132 177
         .catch(console.error);
133 178
     },
179
+    clearProperty({ commit }) {
180
+      commit('clearProperty');
181
+    },
182
+    clearPropertyImages({ commit }) {
183
+      commit('clearPropertyImages');
184
+    },
185
+    getSavedPropertyData({ commit }, item) {
186
+      commit('clearProperty');
187
+      commit('clearPropertyImages');
188
+
189
+      axios
190
+        .get(`/api/Property/${item.id}`)
191
+        .then(result => commit('setProperty', result.data))
192
+        .catch(console.error);
193
+
194
+      axios
195
+        .get(`/api/PropertyImage/getPropertyImages/${item.id}`)
196
+        .then(result => commit('setPropertyImages', result.data))
197
+        .catch(console.error);
198
+
199
+      axios
200
+        .get(`/api/PropertyFields/GetSavedValues/Residential/Property Overview/${item.id}`)
201
+        .then(response => commit('setPropertyOverviewFields', response.data))
202
+        .catch(console.error);
203
+
204
+      axios
205
+        .get(`/api/PropertyFields/GetSavedValues/${item.type}/All/${item.id}`)
206
+        .then(response => commit('setPropertyFields', response.data))
207
+        .catch(console.error);
208
+    },
134 209
   },
135 210
 };

+ 96
- 19
src/store/modules/property/propertyAdmin.js Переглянути файл

@@ -4,9 +4,21 @@ export default {
4 4
   namespaced: true,
5 5
   state: {
6 6
     userDefinedGroups: [],
7
-    userDefinedGroup: null,
7
+    userDefinedGroup: {
8
+      id: 0,
9
+      description: '',
10
+      usageType: 0,
11
+      rank: 0,
12
+      fields: [],
13
+    },
8 14
     userFields: [],
9
-    userField: null,
15
+    userField: {
16
+      id: 0,
17
+      groupId: 0,
18
+      fieldName: '',
19
+      fieldType: '',
20
+      rank: 0,
21
+    },
10 22
   },
11 23
   mutations: {
12 24
     setUserDefinedGroups(state, groups) {
@@ -21,53 +33,118 @@ export default {
21 33
     setUserField(state, field) {
22 34
       state.userField = field;
23 35
     },
24
-    updateUserDefinedGroups(state, field) {
36
+    addUserDefinedGroups(state, field) {
25 37
       state.userDefinedGroups.push(field);
26 38
     },
39
+    updateUserDefinedGroups(state, field) {
40
+      state.userDefinedGroups.find(item => item.id === field.id).description = field.description;
41
+      state.userDefinedGroups.find(item => item.id === field.id).usageType = field.usageType;
42
+      state.userDefinedGroups.find(item => item.id === field.id).rank = field.rank;
43
+    },
44
+    addUserField(state, field) {
45
+      state.userFields.push(field);
46
+    },
47
+    updateUserFields(state, field) {
48
+      state.userFields.find(item => item.id === field.id).fieldName = field.fieldName;
49
+      state.userFields.find(item => item.id === field.id).fieldType = field.fieldType;
50
+      state.userFields.find(item => item.id === field.id).rank = field.rank;
51
+    },
52
+    removeUserDefinedGroup(state, id) {
53
+      state.userDefinedGroups.pop(state.userDefinedGroups.find(p => p.id === id));
54
+    },
55
+    removeUserField(state, id) {
56
+      state.userFields.pop(state.userFields.find(p => p.id === id));
57
+    },
58
+    clearUserGroup(state) {
59
+      state.userDefinedGroup = {
60
+        id: 0,
61
+        description: '',
62
+        usageType: 0,
63
+        rank: 0,
64
+      };
65
+    },
66
+    clearUserField(state) {
67
+      state.userField = {
68
+        id: 0,
69
+        fieldName: '',
70
+        fieldType: '',
71
+        rank: 0,
72
+      };
73
+    },
74
+    clearUserFields(state) {
75
+      state.userFields = [];
76
+    },
27 77
   },
28 78
   getters: {},
29 79
   actions: {
30 80
     getUserDefinedGroups({ commit }) {
31 81
       axios
32
-        .get('http://localhost:57260/Property/UserDefinedGroup')
82
+        .get('/api/UserDefinedGroup')
33 83
         .then(result => commit('setUserDefinedGroups', result.data))
34 84
         .catch(console.error);
35 85
     },
36
-    getUserDefinedGroup({ commit }, item) {
86
+    getUserDefinedGroup({ commit }, id) {
37 87
       axios
38
-        .get(`http://localhost:57260/Property/UserDefinedGroup/${item.id}`)
88
+        .get(`/api/UserDefinedGroup/${id}`)
39 89
         .then(result => commit('setUserDefinedGroup', result.data))
40 90
         .catch(console.error);
41 91
     },
42
-    getUserFields({ commit }, item) {
92
+    getUserFields({ commit }, groupId) {
43 93
       axios
44
-        .get(`http://localhost:57260/Property/UserDefinedField/group/${item.groupId}`)
94
+        .get(`/api/UserDefinedField/group/${groupId}`)
45 95
         .then(result => commit('setUserFields', result.data))
46 96
         .catch(console.error);
47 97
     },
48
-    getUserField({ commit }, item) {
98
+    getUserField({ commit }, id) {
49 99
       axios
50
-        .get(`http://localhost:57260/Property/UserDefinedField/${item.id}`)
100
+        .get(`/api/UserDefinedField/${id}`)
51 101
         .then(result => commit('setUserField', result.data))
52 102
         .catch(console.error);
53 103
     },
54 104
     saveUserDefinedGroup({ commit }, item) {
55 105
       axios
56
-        .post('http://localhost:57260/Property/UserDefinedGroup', item.group)
57
-        .then(response => commit('updateUserDefinedGroups', response.data))
106
+        .post('/api/UserDefinedGroup', item)
107
+        .then(response => commit('addUserDefinedGroups', response.data))
58 108
         .catch(console.error);
59 109
     },
60 110
     updateUserDefinedGroup({ commit }, item) {
61 111
       axios
62
-        .put('http://localhost:57260/Property/UserDefinedGroup', item.group)
112
+        .put('/api/UserDefinedGroup', item)
63 113
         .then(response => commit('updateUserDefinedGroups', response.data))
64 114
         .catch(console.error);
65 115
     },
66
-    // deleteUserDefinedGroup(item) {
67
-    //   axios
68
-    //     .delete(`http://localhost:57260/Property/UserDefinedField/${item.id}`)
69
-    //     .then((response) => {})
70
-    //     .catch(console.error);
71
-    // },
116
+    saveUserField({ commit }, item) {
117
+      axios
118
+        .post('/api/UserDefinedField', item)
119
+        .then(response => commit('addUserField', response.data))
120
+        .catch(console.error);
121
+    },
122
+    updateUserField({ commit }, item) {
123
+      axios
124
+        .put('/api/UserDefinedField', item)
125
+        .then(response => commit('updateUserFields', response.data))
126
+        .catch(console.error);
127
+    },
128
+    deleteUserDefinedGroup({ commit }, id) {
129
+      axios
130
+        .delete(`/api/UserDefinedGroup/${id}`)
131
+        .then(result => commit('removeUserDefinedGroup', id))
132
+        .catch(console.error);
133
+    },
134
+    deleteUserField({ commit }, id) {
135
+      axios
136
+        .delete(`/api/UserDefinedField/${id}`)
137
+        .then(result => commit('removeUserField', id))
138
+        .catch(console.error);
139
+    },
140
+    clearUserGroup({ commit }) {
141
+      commit('clearUserGroup');
142
+    },
143
+    clearUserField({ commit }) {
144
+      commit('clearUserField');
145
+    },
146
+    clearUserFields({ commit }) {
147
+      commit('clearUserFields');
148
+    },
72 149
   },
73 150
 };

+ 1
- 1
src/store/modules/property/propertyLists.js Переглянути файл

@@ -14,7 +14,7 @@ export default {
14 14
   actions: {
15 15
     getProperties({ commit }, item) {
16 16
       axios
17
-        .get(`http://localhost:57260/Property/property/${item.propertyType}/${item.user}`)
17
+        .get(`/api/property/${item.propertyType}/${item.user}`)
18 18
         .then(result => commit('setProperties', result.data))
19 19
         .catch(console.error);
20 20
     },

+ 5
- 5
src/store/modules/property/propertyTypes.js Переглянути файл

@@ -37,25 +37,25 @@ export default {
37 37
   actions: {
38 38
     getPropertyTypes({ commit }) {
39 39
       axios
40
-        .get('http://localhost:57260/Property/PropertyType')
40
+        .get('/api/PropertyType')
41 41
         .then(result => commit('setPropertyTypes', result.data))
42 42
         .catch(console.error);
43 43
     },
44 44
     getPropertyType({ commit }, id) {
45 45
       axios
46
-        .get(`http://localhost:57260/Property/PropertyType/${id}`)
46
+        .get(`/api/PropertyType/${id}`)
47 47
         .then(result => commit('setPropertyType', result.data))
48 48
         .catch(console.error);
49 49
     },
50 50
     savePropertyType({ commit }, item) {
51 51
       axios
52
-        .post('http://localhost:57260/Property/PropertyType', item)
52
+        .post('/api/PropertyType', item)
53 53
         .then(result => commit('addToPropertyTypes', result.data))
54 54
         .catch(console.error);
55 55
     },
56 56
     updatePropertyType({ commit }, item) {
57 57
       axios
58
-        .put('http://localhost:57260/Property/PropertyType', item)
58
+        .put('/api/PropertyType', item)
59 59
         .then(result => commit('updatePropertyTypes', item))
60 60
         .catch(console.error);
61 61
     },
@@ -64,7 +64,7 @@ export default {
64 64
     },
65 65
     deletePropertyType({ commit }, id) {
66 66
       axios
67
-        .delete(`http://localhost:57260/Property/PropertyType/${id}`)
67
+        .delete(`/api/PropertyType/${id}`)
68 68
         .then(result => commit('removePropertyType', id))
69 69
         .catch(console.error);
70 70
     },

+ 3
- 3
src/store/modules/searchTab.js Переглянути файл

@@ -22,18 +22,18 @@ export default {
22 22
   actions: {
23 23
     getProvince({ commit }) {
24 24
       axios
25
-        .get('http://localhost:57260/region/province')
25
+        .get('/api/province')
26 26
         .then(result => commit('setProvince', result.data))
27 27
         .catch(console.error);
28 28
     },
29 29
     getCities({ commit }, item) {
30 30
       axios
31
-        .get(`http://localhost:57260/region/city/getby/${item.province}`)
31
+        .get(`/api/city/getBy/${item.province}`)
32 32
         .then(result => commit('setCities', result.data));
33 33
     },
34 34
     getSuburbs({ commit }, item) {
35 35
       axios
36
-        .get(`http://localhost:57260/region/Suburb/${item.province}/${item.city}`)
36
+        .get(`/api/Suburb/${item.province}/${item.city}`)
37 37
         .then(result => commit('setSuburbs', result.data));
38 38
     },
39 39
   },

+ 8
- 8
src/store/modules/user/register.js Переглянути файл

@@ -86,7 +86,7 @@ export default {
86 86
     //   commit,
87 87
     // }, id) {
88 88
     //   axios
89
-    //     .get(`http://localhost:57260/api/user/${id}`)
89
+    //     .get(`http://192.168.6.188:5000/api/user/${id}`)
90 90
     //     .then(result => commit('setIndividual', result.data))
91 91
     //     .catch(console.error);
92 92
     // },
@@ -94,7 +94,7 @@ export default {
94 94
     //   commit,
95 95
     // }, id) {
96 96
     //   axios
97
-    //     .get(`http://localhost:57260/api/agency/${id}`)
97
+    //     .get(`http://192.168.6.188:5000/api/agency/${id}`)
98 98
     //     .then(result => commit('setAgency', result.data))
99 99
     //     .catch(console.error);
100 100
     // },
@@ -103,7 +103,7 @@ export default {
103 103
       commit,
104 104
     }, item) {
105 105
       axios
106
-        .post('http://localhost:57260/api/register/register', item)
106
+        .post('http://192.168.6.188:5000/api/register/register', item)
107 107
         .then(result => commit('addIndividual', result.data))
108 108
         .catch(console.error);
109 109
     },
@@ -111,7 +111,7 @@ export default {
111 111
       commit,
112 112
     }, item) {
113 113
       axios
114
-        .post('http://localhost:57260/api/register/registeragency', item)
114
+        .post('http://192.168.6.188:5000/api/register/registeragency', item)
115 115
         .then(result => commit('addAgency', result.data))
116 116
         .catch(console.error);
117 117
     },
@@ -119,7 +119,7 @@ export default {
119 119
     //   commit,
120 120
     // }, item) {
121 121
     //   axios
122
-    //     .put('http://localhost:57260/api/individual', item)
122
+    //     .put('http://192.168.6.188:5000/api/individual', item)
123 123
     //     .then(result => commit('updateIndividual', item))
124 124
     //     .catch(console.error);
125 125
     // },
@@ -127,7 +127,7 @@ export default {
127 127
     //   commit,
128 128
     // }, item) {
129 129
     //   axios
130
-    //     .put('http://localhost:57260/api/agency', item)
130
+    //     .put('http://192.168.6.188:5000/api/agency', item)
131 131
     //     .then(result => commit('updateAgency', item))
132 132
     //     .catch(console.error);
133 133
     // },
@@ -145,7 +145,7 @@ export default {
145 145
     //   commit,
146 146
     // }, id) {
147 147
     //   axios
148
-    //     .delete(`http://localhost:57260/api/individual/${id}`)
148
+    //     .delete(`http://192.168.6.188:5000/api/individual/${id}`)
149 149
     //     .then(result => commit('removeIndividual', id))
150 150
     //     .catch(console.error);
151 151
     // },
@@ -153,7 +153,7 @@ export default {
153 153
     //   commit,
154 154
     // }, id) {
155 155
     //   axios
156
-    //     .delete(`http://localhost:57260/api/agency/${id}`)
156
+    //     .delete(`http://192.168.6.188:5000/api/agency/${id}`)
157 157
     //     .then(result => commit('removeAgency', id))
158 158
     //     .catch(console.error);
159 159
     // },

Завантаження…
Відмінити
Зберегти