mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-25 15:34:02 +00:00
39 lines
1.2 KiB
Vue
39 lines
1.2 KiB
Vue
<template>
|
|
<div class="row">
|
|
<div class="col p-r-0">
|
|
<validation-wrapper-component :validator="$v.parameters.name">
|
|
<input type="text" class="form-control fs-12" placeholder="Edit company name" v-model.trim="parameters.name">
|
|
</validation-wrapper-component>
|
|
</div>
|
|
<div class="col-auto bg-success d-flex justify-content-center align-items-center pointer text-white">
|
|
<i class="fa fa-check" @click="submitForm"></i>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
<script>
|
|
import modalFormHandler from '../../../general/mixins/modalFormHandler';
|
|
import { required } from "vuelidate/lib/validators";
|
|
|
|
export default {
|
|
data() {
|
|
return {
|
|
name: this.data.name,
|
|
};
|
|
},
|
|
validations: {
|
|
parameters: {
|
|
name: { required },
|
|
}
|
|
},
|
|
|
|
methods: {
|
|
submitForm() {
|
|
this.parameters.name = this.data.name;
|
|
this.submit(this.route('api.company.update', this.data.id), 'put', '', false, false);
|
|
this.$emit('submit');
|
|
}
|
|
},
|
|
mixins: [modalFormHandler]
|
|
}
|
|
</script>
|