mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-28 20:21:10 -04:00
mark-as-sent in vue action
This commit is contained in:
@ -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"/>
|
||||
|
||||
@ -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'))
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@ -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"
|
||||
@ -33,7 +34,7 @@
|
||||
</v-dropdown>
|
||||
</div>
|
||||
</div>
|
||||
<div class="estimate-sidebar">
|
||||
<div class="estimate-si debar">
|
||||
<base-loader v-if="isSearching" />
|
||||
<div v-else class="side-header">
|
||||
<base-input
|
||||
@ -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'))
|
||||
}
|
||||
|
||||
@ -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%;
|
||||
|
||||
Reference in New Issue
Block a user