mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-28 04:01:10 -04:00
fix issues
This commit is contained in:
@ -140,6 +140,10 @@ export const showError = (error) => {
|
||||
showToaster('errors.not_allowed')
|
||||
break
|
||||
|
||||
case 'Email could not be sent to this email address.':
|
||||
showToaster('errors.email_could_not_be_sent')
|
||||
break
|
||||
|
||||
default:
|
||||
showToaster(error, false)
|
||||
break
|
||||
|
||||
@ -1383,7 +1383,8 @@
|
||||
"invalid_credentials": "Invalid Credentials.",
|
||||
"not_allowed": "Not Allowed",
|
||||
"login_invalid_credentials": "These credentials do not match our records.",
|
||||
"enter_valid_cron_format": "Please enter a valid cron format"
|
||||
"enter_valid_cron_format": "Please enter a valid cron format",
|
||||
"email_could_not_be_sent": "Email could not be sent to this email address."
|
||||
},
|
||||
"pdf_estimate_label": "Estimate",
|
||||
"pdf_estimate_number": "Estimate Number",
|
||||
|
||||
@ -278,6 +278,14 @@ export const useInvoiceStore = (useWindow = false) => {
|
||||
axios
|
||||
.post(`/api/v1/invoices/${data.id}/status`, data)
|
||||
.then((response) => {
|
||||
let pos = this.invoices.findIndex(
|
||||
(invoices) => invoices.id === data.id
|
||||
)
|
||||
|
||||
if (this.invoices[pos]) {
|
||||
this.invoices[pos].status = 'SENT'
|
||||
}
|
||||
|
||||
notificationStore.showNotification({
|
||||
type: 'success',
|
||||
message: global.t('invoices.mark_as_sent_successfully'),
|
||||
|
||||
@ -124,7 +124,11 @@
|
||||
"
|
||||
>
|
||||
<!-- Tabs -->
|
||||
<BaseTabGroup class="-mb-5" @change="setStatusFilter">
|
||||
<BaseTabGroup
|
||||
class="-mb-5"
|
||||
:default-index="currentStatusIndex"
|
||||
@change="setStatusFilter"
|
||||
>
|
||||
<BaseTab :title="$t('recurring_invoices.active')" filter="ACTIVE" />
|
||||
<BaseTab :title="$t('recurring_invoices.on_hold')" filter="ON_HOLD" />
|
||||
<BaseTab :title="$t('recurring_invoices.all')" filter="ALL" />
|
||||
@ -189,7 +193,7 @@
|
||||
|
||||
<!-- Starts at -->
|
||||
<template #cell-starts_at="{ row }">
|
||||
{{ row.data.formatted_starts_at }}
|
||||
{{ row.data.formatted_starts_at }}
|
||||
</template>
|
||||
|
||||
<!-- Customer -->
|
||||
@ -331,6 +335,10 @@ onUnmounted(() => {
|
||||
}
|
||||
})
|
||||
|
||||
const currentStatusIndex = computed(() => {
|
||||
return statusList.value.findIndex((status) => status === filters.status)
|
||||
})
|
||||
|
||||
function canViewActions() {
|
||||
return userStore.hasAbilities([
|
||||
abilities.DELETE_RECURRING_INVOICE,
|
||||
|
||||
Reference in New Issue
Block a user