%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/ugotscom/bos_naturals/resources/js/components/properties/
Upload File :
Create Path :
Current File : /home/ugotscom/bos_naturals/resources/js/components/properties/editproperty.vue

<template>
    <div class="row">
        <div class="col-12">
            <div class="card">
                <div class="card-header">
                    <h4>Edit Property</h4>
                </div>
                <div class="card-body">
                    <form @submit.prevent="updateProduct()">
                      <div class="form-group">
            <label for="title">Title</label>
            <input type="text" v-model="property.title" class="form-control">
        </div>    
             <div class="form-group">
            <label for="title">Property Name</label>
            <input type="text" v-model="property.property_name" class="form-control">
        </div>  
             <div class="form-group">
            <label for="title">Property Price</label>
            <input type="text" v-model="property.price" class="form-control">
        </div>  
             <div class="form-group">
            <label for="title">Carpet Area</label>
            <input type="text" v-model="property.carpet_area" class="form-control">
        </div>  
              <div class="form-group">
  <label for="exampleFormControlTextarea2">Description</label>
  <textarea class="form-control rounded-0" id="exampleFormControlTextarea2" rows="3" v-model="property.description" ></textarea>
</div>     
  <input type="radio" name="buy" v-model="property.property_for" value="1" id="Rent">Rent
         <input type="radio" name="rent" v-model="property.property_for" value="2" id="Ssle">Sale
           <div class="form-group">
              <label for="">Property Type</label>
            <select v-model="property.property_type" class="form-control"> 
   
          <optgroup label="Residential">
          <option value="1">Apartment</option>
          <option  value="2">House</option>
          <option  value="3">Villa Gated Community</option>
          <option  value="4">Residential Land</option>
          </optgroup>
          <optgroup label="Commercial">
           <option  value="9">Commercial Office Space</option>
            <option  value="5">Office in IT Park/ SEZ</option>
            <option  value="6">Shop/Showroom/Retail Space</option>        
            <option  value="7">Commercial Land</option>
            <option  value="8">Warehouse/ Godown</option>          
          </optgroup>
        </select>
          </div>   
           <div class="form-group">
               <label for="">Locality</label>
            <select v-model="property.location" class="form-control">
             <option v-for="option in locationlist" :value="option.location_id" :key="option.location_id">{{option.location}}</option>

        </select>
          </div>   
                               <div class="dselect">
 <p>BHK</p>
<input type="radio" name="payment" id="bhk-1" value="1" v-model="property.bhk" checked>
<label for="bhk-1">
    <i class="" aria-hidden="true"></i>
    <span>1</span>
</label>
<input type="radio" name="payment" id="bhk-2" value="2" v-model="property.bhk">
<label for="bhk-2">
    <i class="" aria-hidden="true"></i>
    <span>2</span>
</label>
<input type="radio" name="payment" id="bhk-3" value="3" v-model="property.bhk">
<label for="bhk-3">
    <i class="" aria-hidden="true"></i>
    <span>3</span>
</label> 
<input type="radio" name="payment" id="bhk-4" value="4" v-model="property.bhk">
<label for="bhk-4">
    <i class="" aria-hidden="true"></i>
    <span>4</span>
</label>     
</div> 
          <button type="submit" class="btn btn-primary">Submit</button>
                    </form>
                </div>
            </div>
        </div>
    </div>
</template>

<script>
 
    export default {
        data(){
        return {
            id:this.$route.params.id,
            clientid:1,
            client_id:'',
            task:'',
            status:'',
            id:this.$route.params.id,
            properties:{},
            tasks:{},  
            activeItem: 'activity',
            properties:{},
            leads:{},
            profiles:[],
            client:{
                name:"",
                phone:"",
                cc:"",
                wcc:"",
                wphone:"",
                email:"",
                profile:"",
                status:""
            },
                property:{
                title:"",
                property_name:"",
                carpet_area:"",
                description:"",
                property_for:"",
                property_type:"",
                furnishing:"",
                price:"",
                bhk:"",
                mmc:"",
                image:"",
                status:""
            }
        }
        },
  mounted() {
          this.loadusers();
        },
        methods:{
         loadusers(){
                axios.get('/properties/propertydetails/'+this.id) .then(response => {
                this.properties = response.data;   
                 this.property.title =this.properties[0].title
                this.property.property_name =this.properties[0].property_name   
                this.property.description=this.properties[0].description  
                this.property.property_for=this.properties[0].property_for  
                this.property.property_type=this.properties[0].property_type      
                this.property.carpet_area=this.properties[0].carpet_area     
                this.property.location=this.properties[0].location
                this.property.price=this.properties[0].price
                this.property.bhk=this.properties[0].bhk
                this.property.status=this.properties[0].status
             })
            },
         
     updateProduct() {
               axios.patch('/properties/'+this.id,this.property                   
         ) .then( response => this.$router.push({ path: '/propertydetail/'+this.id})
	);
		 }

        },
      
   
    }
</script>

Zerion Mini Shell 1.0