mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/izyim.git
synced 2026-08-19 04:24:00 +00:00
large changes
This commit is contained in:
Vendored
-3
@@ -83,9 +83,6 @@ Vue.component('warehouse-form-component', require('./components/warehouse/forms/
|
||||
|
||||
Vue.component('order-form-component', require('./components/order/forms/OrderFormComponent.vue'));
|
||||
|
||||
Vue.component('create-account-form-component', require('./components/account/forms/CreateAccountFormComponent.vue'));
|
||||
|
||||
|
||||
|
||||
Vue.component('notification-component', require('./components/common/NotificationComponent.vue'));
|
||||
Vue.component('company-error-notification-component', require('./components/company/notifications/CompanyErrorComponent.vue'));
|
||||
|
||||
@@ -1,88 +0,0 @@
|
||||
<template>
|
||||
<div class="row align-items-center justify-content-center h-100">
|
||||
<div class="col">
|
||||
<loading-component v-show="isLoading"></loading-component>
|
||||
<div class="row m-t-20">
|
||||
<div class="col">
|
||||
<div class="b-l b-success p-l-15 m-b-15" style="border-left-width: 3px;">
|
||||
<h6 class="bold all-caps no-margin text-success">Create User</h6>
|
||||
<div class="muted all-caps fs-12">Send an invitation to a new user</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<form method="post" @submit.prevent="createAccount">
|
||||
<div class="row">
|
||||
<div class="col no-padding">
|
||||
<div class="form-group form-group-default required">
|
||||
<label class="muted">first name</label>
|
||||
<input class="form-control" v-model="account.first_name">
|
||||
</div>
|
||||
<div class="form-group form-group-default required">
|
||||
<label class="muted">last name</label>
|
||||
<input class="form-control" v-model="account.last_name">
|
||||
</div>
|
||||
<div class="form-group form-group-default required">
|
||||
<label class="muted">email</label>
|
||||
<input class="form-control" v-model="account.email">
|
||||
</div>
|
||||
<div class="form-group form-group-default required">
|
||||
<label class="muted">password</label>
|
||||
<input class="form-control" type="password" v-model="account.password">
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col text-right no-padding">
|
||||
<button class="btn b-rad-none btn-success" @click="createAccount" data-dismiss="modal">Send Invite</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data(){
|
||||
return {
|
||||
account: {
|
||||
first_name: null,
|
||||
last_name: null,
|
||||
email: null,
|
||||
password: null
|
||||
},
|
||||
isLoading: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
createAccount(){
|
||||
//turn on loading animation
|
||||
this.isLoading = true;
|
||||
|
||||
fetch(route('api.account.test'), {
|
||||
method: 'post',
|
||||
body: JSON.stringify(this.account),
|
||||
headers: {
|
||||
'content-type': 'application/json'
|
||||
}
|
||||
}).then((response) => {
|
||||
Event.$emit('updateAccountList');
|
||||
this.clearForm();
|
||||
|
||||
//turn off loading animation
|
||||
this.isLoading = false;
|
||||
|
||||
})
|
||||
},
|
||||
clearForm() {
|
||||
this.account = {
|
||||
first_name: null,
|
||||
last_name: null,
|
||||
email: null,
|
||||
password: null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -75,10 +75,6 @@
|
||||
</div>
|
||||
<div class="col text-right parentContainer">
|
||||
<button class="btn b-rad-none btn-sm btn-success m-b-20 requestModal" data-type="new">Invite User</button>
|
||||
<button class="btn b-rad-none btn-sm btn-success m-b-20 requestModal" data-type="create">create User</button>
|
||||
<modal-component type="create" effect="slide-right">
|
||||
<create-account-form-component class="text-left"></create-account-form-component>
|
||||
</modal-component>
|
||||
<modal-component type="new" effect="slide-right">
|
||||
<invite-account-form-component class="text-left"></invite-account-form-component>
|
||||
</modal-component>
|
||||
|
||||
Reference in New Issue
Block a user