mark-as-sent in vue action

This commit is contained in:
bansarishukla
2019-11-14 19:02:34 +05:30
parent 8fc1ef9348
commit 929ae6bdc7
4 changed files with 9 additions and 5 deletions

View File

@ -1,6 +1,6 @@
<template>
<transition name="fade">
<div v-if="modalActive" class="base-modal" :class="'size-' + modalSize">
<div v-if="modalActive" :class="'size-' + modalSize" class="base-modal">
<div class="modal-body">
<div class="close-icon">
<font-awesome-icon class="mr-2" icon="times" @click="closeModal"/>

View File

@ -425,7 +425,7 @@ export default {
if (response.data) {
this.filters.status = 'ACCEPTED'
this.$refs.table.refresh()
window.toastr['success'](this.$tc('estimates.marked_as_rejected_message'))
window.toastr['success'](this.$tc('estimates.confirm_mark_as_accepted'))
}
}
})

View File

@ -5,6 +5,7 @@
<div class="page-actions row">
<div class="col-xs-2">
<base-button
v-if="estimate.status !== 'SENT'"
:loading="isRequestOnGoing"
:disabled="isRequestOnGoing"
:outline="true"
@ -144,6 +145,8 @@ export default {
orderByField: null,
searchText: null
},
status: ['DRAFT', 'SENT', 'VIEWED', 'EXPIRED', 'ACCEPTED', 'REJECTED'],
isMarkAsSent: false,
isRequestOnGoing: false,
isSearching: false
}
@ -230,9 +233,9 @@ export default {
dangerMode: true
}).then(async (willMarkAsSent) => {
if (willMarkAsSent) {
this.isRequestOnGoing = true
this.isMarkAsSent = true
let response = await this.markAsSent({id: this.estimate.id})
this.isRequestOnGoing = false
this.isMarkAsSent = false
if (response.data) {
window.toastr['success'](this.$tc('estimates.mark_as_sent'))
}

View File

@ -274,6 +274,7 @@ fieldset[disabled] .multiselect {
margin: 0;
min-width: 100%;
vertical-align: top;
padding-bottom: 70px;
}
.multiselect--above .multiselect__content-wrapper {
bottom: 100%;