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>
|
<template>
|
||||||
<transition name="fade">
|
<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="modal-body">
|
||||||
<div class="close-icon">
|
<div class="close-icon">
|
||||||
<font-awesome-icon class="mr-2" icon="times" @click="closeModal"/>
|
<font-awesome-icon class="mr-2" icon="times" @click="closeModal"/>
|
||||||
|
|||||||
@ -425,7 +425,7 @@ export default {
|
|||||||
if (response.data) {
|
if (response.data) {
|
||||||
this.filters.status = 'ACCEPTED'
|
this.filters.status = 'ACCEPTED'
|
||||||
this.$refs.table.refresh()
|
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="page-actions row">
|
||||||
<div class="col-xs-2">
|
<div class="col-xs-2">
|
||||||
<base-button
|
<base-button
|
||||||
|
v-if="estimate.status !== 'SENT'"
|
||||||
:loading="isRequestOnGoing"
|
:loading="isRequestOnGoing"
|
||||||
:disabled="isRequestOnGoing"
|
:disabled="isRequestOnGoing"
|
||||||
:outline="true"
|
:outline="true"
|
||||||
@ -33,7 +34,7 @@
|
|||||||
</v-dropdown>
|
</v-dropdown>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="estimate-sidebar">
|
<div class="estimate-si debar">
|
||||||
<base-loader v-if="isSearching" />
|
<base-loader v-if="isSearching" />
|
||||||
<div v-else class="side-header">
|
<div v-else class="side-header">
|
||||||
<base-input
|
<base-input
|
||||||
@ -144,6 +145,8 @@ export default {
|
|||||||
orderByField: null,
|
orderByField: null,
|
||||||
searchText: null
|
searchText: null
|
||||||
},
|
},
|
||||||
|
status: ['DRAFT', 'SENT', 'VIEWED', 'EXPIRED', 'ACCEPTED', 'REJECTED'],
|
||||||
|
isMarkAsSent: false,
|
||||||
isRequestOnGoing: false,
|
isRequestOnGoing: false,
|
||||||
isSearching: false
|
isSearching: false
|
||||||
}
|
}
|
||||||
@ -230,9 +233,9 @@ export default {
|
|||||||
dangerMode: true
|
dangerMode: true
|
||||||
}).then(async (willMarkAsSent) => {
|
}).then(async (willMarkAsSent) => {
|
||||||
if (willMarkAsSent) {
|
if (willMarkAsSent) {
|
||||||
this.isRequestOnGoing = true
|
this.isMarkAsSent = true
|
||||||
let response = await this.markAsSent({id: this.estimate.id})
|
let response = await this.markAsSent({id: this.estimate.id})
|
||||||
this.isRequestOnGoing = false
|
this.isMarkAsSent = false
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
window.toastr['success'](this.$tc('estimates.mark_as_sent'))
|
window.toastr['success'](this.$tc('estimates.mark_as_sent'))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -274,6 +274,7 @@ fieldset[disabled] .multiselect {
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
min-width: 100%;
|
min-width: 100%;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
|
padding-bottom: 70px;
|
||||||
}
|
}
|
||||||
.multiselect--above .multiselect__content-wrapper {
|
.multiselect--above .multiselect__content-wrapper {
|
||||||
bottom: 100%;
|
bottom: 100%;
|
||||||
|
|||||||
Reference in New Issue
Block a user