소스 검색

Save button color & size change

master
JannekeDL 5 년 전
부모
커밋
9f879270d3
1개의 변경된 파일51개의 추가작업 그리고 44개의 파일을 삭제
  1. 51
    44
      src/components/property/propertyeditPage.vue

+ 51
- 44
src/components/property/propertyeditPage.vue 파일 보기

@@ -41,19 +41,21 @@
41 41
                 </select>
42 42
               </div>
43 43
               <div v-if="propertyType === 'Commercial'" class="col-md-4">
44
-                <label>Property Name</label>
44
+                <label for="Property Name"></label>
45 45
                 <input
46
-                  class="form-control form-control-lg form-control-a"
46
+                  class="form-control"
47 47
                   type="text"
48
+                  placeholder="Property Name"
48 49
                   name="propertyName"
49 50
                   id="propertyName"
50 51
                   v-model="property.propertyName"
51 52
                 />
52 53
               </div>
53 54
               <div v-if="propertyType === 'Commercial'" class="col-md-4">
54
-                <label>Unit</label>
55
+                <label for="Unit"></label>
55 56
                 <input
56
-                  class="form-control form-control-lg form-control-a"
57
+                  class="form-control"
58
+                  placeholder="Unit"
57 59
                   type="text"
58 60
                   name="unit"
59 61
                   id="unit"
@@ -220,7 +222,12 @@
220 222
               </div>
221 223
             </div>
222 224
             <ImageLoad :loadedImages="loadedImages" />
223
-            <button type="button" @click="SubmitData()" class="btn btn-a">Save</button>
225
+            <button
226
+              type="button"
227
+              @click="SubmitData()"
228
+              class="btn btn-b-n"
229
+              style="width: 85px; height:40px;"
230
+            >Save</button>
224 231
             <!-- <router-link
225 232
               to="/property/search"
226 233
               @click.stop.prevent="SubmitData()"
@@ -235,48 +242,48 @@
235 242
 </template>
236 243
 
237 244
 <script>
238
-import UserField from "./propertyUserField.vue";
239
-import ImageLoad from "./propertyImage.vue";
245
+import UserField from './propertyUserField.vue';
246
+import ImageLoad from './propertyImage.vue';
240 247
 // https://vuejsexamples.com/a-vue-wrapper-around-the-trix-rich-text-editor/
241 248
 export default {
242
-  name: "PropertyEdit",
249
+  name: 'PropertyEdit',
243 250
   components: {
244 251
     UserField,
245
-    ImageLoad
252
+    ImageLoad,
246 253
   },
247 254
   data() {
248 255
     return {
249 256
       ApiRunning: true,
250
-      propertyType: "Residential",
251
-      salesType: "Rental",
252
-      imageFile: "",
257
+      propertyType: 'Residential',
258
+      salesType: 'Rental',
259
+      imageFile: '',
253 260
       provinces: [],
254 261
       cities: [],
255 262
       suburbs: [],
256 263
       propertyValues: [],
257 264
       propValuesProp: [],
258 265
       propertyTypes: [],
259
-      selectedProvince: "",
260
-      selectedCity: "",
266
+      selectedProvince: '',
267
+      selectedCity: '',
261 268
       property: {
262 269
         propertyTypeId: 0,
263
-        propertyName: "",
264
-        unit: "",
265
-        addressLine1: "",
266
-        addressLine2: "",
267
-        addressLine3: "",
270
+        propertyName: '',
271
+        unit: '',
272
+        addressLine1: '',
273
+        addressLine2: '',
274
+        addressLine3: '',
268 275
         suburbId: 0,
269 276
         cityId: 0,
270 277
         provinceId: 0,
271
-        price: "",
272
-        per: "",
273
-        description: "",
278
+        price: '',
279
+        per: '',
280
+        description: '',
274 281
         isSale: false,
275 282
         propertyUserFields: [],
276
-        propertyImages: []
283
+        propertyImages: [],
277 284
       },
278 285
       images: [],
279
-      propertyFieldValues: []
286
+      propertyFieldValues: [],
280 287
     };
281 288
   },
282 289
   methods: {
@@ -302,8 +309,8 @@ export default {
302 309
 
303 310
       // this.$router.push("/property/search");
304 311
       this.$router.push({
305
-        path: "/property/search",
306
-        query: { type: this.salesType, propertyType: this.propertyType }
312
+        path: '/property/search',
313
+        query: { type: this.salesType, propertyType: this.propertyType },
307 314
       });
308 315
     },
309 316
     ProvinceSelected(item) {
@@ -311,10 +318,10 @@ export default {
311 318
         this.selectedProvince = this.provinces[
312 319
           item.target.options.selectedIndex - 1
313 320
         ].description;
314
-        const axios = require("axios");
321
+        const axios = require('axios');
315 322
         axios
316 323
           .get(
317
-            `http://localhost:57260/region/city/getby/${this.selectedProvince}`
324
+            `http://localhost:57260/region/city/getby/${this.selectedProvince}`,
318 325
           )
319 326
           .then(response => (this.cities = response.data));
320 327
       }
@@ -324,10 +331,10 @@ export default {
324 331
         this.selectedCity = this.cities[
325 332
           item.target.options.selectedIndex - 1
326 333
         ].description;
327
-        const axios = require("axios");
334
+        const axios = require('axios');
328 335
         axios
329 336
           .get(
330
-            `http://localhost:57260/region/Suburb/${this.selectedProvince}/${this.selectedCity}`
337
+            `http://localhost:57260/region/Suburb/${this.selectedProvince}/${this.selectedCity}`,
331 338
           )
332 339
           .then(response => (this.suburbs = response.data));
333 340
       }
@@ -337,7 +344,7 @@ export default {
337 344
     },
338 345
     UpdateUserDefinedFields(item) {
339 346
       let update = false;
340
-      this.propertyFieldValues.forEach(element => {
347
+      this.propertyFieldValues.forEach((element) => {
341 348
         if (element.userDefinedFieldId === item.userDefinedFieldId) {
342 349
           element.value = item.value;
343 350
           update = true;
@@ -346,31 +353,31 @@ export default {
346 353
       if (!update) {
347 354
         this.propertyFieldValues.push(item);
348 355
       }
349
-    }
356
+    },
350 357
   },
351 358
   mounted() {
352 359
     this.propertyType = this.$route.params.propType;
353 360
     this.salesType = this.$route.params.saleType;
354 361
 
355
-    const axios = require("axios");
362
+    const axios = require('axios');
356 363
     axios
357
-      .get("http://localhost:57260/Property/PropertyFields/Property Overview")
364
+      .get('http://localhost:57260/Property/PropertyFields/Property Overview')
358 365
       .then(response => (this.propValuesProp = response.data));
359 366
 
360 367
     axios
361 368
       .get(
362
-        `http://localhost:57260/property/propertyfields/Propertytype/${this.propertyType}`
369
+        `http://localhost:57260/property/propertyfields/Propertytype/${this.propertyType}`,
363 370
       )
364 371
       .then(response => (this.propertyValues = response.data));
365 372
 
366 373
     axios
367 374
       .get(
368
-        `http://localhost:57260/Property/PropertyType/type/${this.propertyType}`
375
+        `http://localhost:57260/Property/PropertyType/type/${this.propertyType}`,
369 376
       )
370 377
       .then(response => (this.propertyTypes = response.data));
371 378
 
372 379
     axios
373
-      .get("http://localhost:57260/region/province")
380
+      .get('http://localhost:57260/region/province')
374 381
       .then(response => (this.provinces = response.data));
375 382
   },
376 383
   computed: {
@@ -378,24 +385,24 @@ export default {
378 385
       this.propertyType = this.$route.params.propType;
379 386
       this.salesType = this.$route.params.saleType;
380 387
 
381
-      const axios = require("axios");
388
+      const axios = require('axios');
382 389
       axios
383 390
         .get(
384
-          `http://localhost:57260/Property/PropertyType/type/${this.propertyType}`
391
+          `http://localhost:57260/Property/PropertyType/type/${this.propertyType}`,
385 392
         )
386 393
         .then(response => (this.propertyTypes = response.data));
387 394
 
388 395
       axios
389 396
         .get(
390
-          `http://localhost:57260/property/propertyfields/Propertytype/${this.propertyType}`
397
+          `http://localhost:57260/property/propertyfields/Propertytype/${this.propertyType}`,
391 398
         )
392 399
         .then(response => (this.propertyValues = response.data));
393
-    }
400
+    },
394 401
   },
395 402
   watch: {
396 403
     SalesTypeChanged() {
397 404
       console.log(this.salesType);
398
-    }
399
-  }
405
+    },
406
+  },
400 407
 };
401
-</script>
408
+</script>

Loading…
취소
저장