<template>
    <form @submit.prevent="submit">
        
        <div class="form-group row">
          <div class="col-md-12">
            <label for="imei_data_number">IMEI Data_number</label>
            <input type="hidden" name="ime_data_id" id="ime_data_id" v-model="fields.ime_data_id">
            <input type="text" class="form-control" name="imei_data_number" id="imei_data_number" v-model="fields.imei_data_number" placeholder="Enter imei_data_number..."/>
            <div v-if="errors && errors.imei_data_number" class="text-danger">{{ errors.imei_data_number[0] }}</div>
          </div>

          <div class="col-md-12">
            <label for="phone">Valid Till</label>
            <input type="date" class="form-control" name="valid_till" id="valid_till" v-model="fields.valid_till" placeholder="Enter valid_till..."/>
            <div v-if="errors && errors.valid_till" class="text-danger">{{ errors.valid_till[0] }}</div>
          </div>          </div>

        <div class="form-group">
            <button type="submit" class="btn btn-success btn-round">Save</button>
            <button type="reset" class="btn btn-danger btn-round">Clear</button>
        </div>       
    </form>
</template>

<script>
import FormMixin from '../shared/FormMixin';

export default {
  mixins: [ FormMixin ],
  props: ['imeisdata'],
  data() {
    return {
        'action': '/at/warrant/ime/updateimei',
      'text': 'IMEI Updated succesfully',
      'redirect': '/at/ime',
      fields: {
          ime_data_id:this.imeisdata.ime_data_id,
          imei_data_number:this.imeisdata.imei_data_number,
          valid_till:this.imeisdata.valid_till,
 
      }
    }
  },
  mounted(){
          this.fields.ime_data_id=this.imeisdata.ime_data_id;
          this.fields.imei_data_number=this.imeisdata.imei_data_number;
          this.fields.valid_till=this.imeisdata.valid_till;
  }
}

</script>