mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/tickme.git
synced 2026-08-23 14:34:10 +00:00
91 lines
3.4 KiB
Vue
91 lines
3.4 KiB
Vue
<template>
|
|
<div class="row" v-on:keyup.enter="submitForm()">
|
|
<div class="col">
|
|
<div class="row mb-3">
|
|
<div class="col">
|
|
<div class="row mb-3 animated fadeInDown fast">
|
|
<div class="col">
|
|
<validation-wrapper-component :validator="$v.parameters.assignee_id">
|
|
<input v-model="parameters.assignee_id" type="text" class="form-control">
|
|
<span>assignee_id</span>
|
|
</validation-wrapper-component>
|
|
</div>
|
|
</div>
|
|
<div class="row mb-3 animated fadeInDown fast">
|
|
<div class="col">
|
|
<validation-wrapper-component :validator="$v.parameters.assignee_type">
|
|
<input v-model="parameters.assignee_type" type="text" class="form-control">
|
|
<span>assignee_type</span>
|
|
</validation-wrapper-component>
|
|
</div>
|
|
</div>
|
|
<div class="row mb-3 animated fadeInDown fast">
|
|
<div class="col">
|
|
<validation-wrapper-component :validator="$v.parameters.assignment_id">
|
|
<input v-model="parameters.assignment_id" type="text" class="form-control">
|
|
<span>assignment_id</span>
|
|
</validation-wrapper-component>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row mb-3">
|
|
<div class="col">
|
|
<div class="row">
|
|
<div class="col text-right">
|
|
<button type="button" class="btn btn-outline-dark float-left" @click="closeModal()">Cancel</button>
|
|
<button type="button" class="btn btn-primary" @click="submitForm()">Submit</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
<script>
|
|
import { required, email } from "vuelidate/lib/validators";
|
|
export default {
|
|
props: {
|
|
section: {
|
|
type: String,
|
|
required: true
|
|
},
|
|
data: {
|
|
type: Object,
|
|
default: null
|
|
}
|
|
},
|
|
created() {
|
|
if(this.data){
|
|
this.parameters = this.data;
|
|
}
|
|
|
|
},
|
|
data() {
|
|
return {
|
|
parameters: {
|
|
assignee_id: '',
|
|
assignee_type: '',
|
|
assignment_id: ''
|
|
},
|
|
};
|
|
},
|
|
validations: {
|
|
parameters: {
|
|
assignee_id: { required },
|
|
assignee_type: { required },
|
|
assignment_id: { required }
|
|
}
|
|
},
|
|
|
|
methods:{
|
|
submitForm(){
|
|
this.submit((this.data ? this.route('api.task_assignee.update', this.data.id) : this.route('api.task_assignee.create')), (this.data ? 'put' : 'post'), this.section+'.form', true, true)
|
|
},
|
|
successHandler(){
|
|
this.crudSuccess();
|
|
}
|
|
}
|
|
}
|
|
</script>
|