Преглед на файлове

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

Loading…
Отказ
Запис