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:
@ -45,6 +45,8 @@ class ForgotPasswordController extends Controller
|
|||||||
*/
|
*/
|
||||||
protected function sendResetLinkFailedResponse(Request $request, $response)
|
protected function sendResetLinkFailedResponse(Request $request, $response)
|
||||||
{
|
{
|
||||||
return response('Email could not be sent to this email address.', 403);
|
return response()->json([
|
||||||
|
'error' => 'Email could not be sent to this email address.'
|
||||||
|
], 403);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -140,6 +140,10 @@ export const showError = (error) => {
|
|||||||
showToaster('errors.not_allowed')
|
showToaster('errors.not_allowed')
|
||||||
break
|
break
|
||||||
|
|
||||||
|
case 'Email could not be sent to this email address.':
|
||||||
|
showToaster('errors.email_could_not_be_sent')
|
||||||
|
break
|
||||||
|
|
||||||
default:
|
default:
|
||||||
showToaster(error, false)
|
showToaster(error, false)
|
||||||
break
|
break
|
||||||
|
|||||||
@ -1383,7 +1383,8 @@
|
|||||||
"invalid_credentials": "Invalid Credentials.",
|
"invalid_credentials": "Invalid Credentials.",
|
||||||
"not_allowed": "Not Allowed",
|
"not_allowed": "Not Allowed",
|
||||||
"login_invalid_credentials": "These credentials do not match our records.",
|
"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_label": "Estimate",
|
||||||
"pdf_estimate_number": "Estimate Number",
|
"pdf_estimate_number": "Estimate Number",
|
||||||
|
|||||||
@ -278,6 +278,14 @@ export const useInvoiceStore = (useWindow = false) => {
|
|||||||
axios
|
axios
|
||||||
.post(`/api/v1/invoices/${data.id}/status`, data)
|
.post(`/api/v1/invoices/${data.id}/status`, data)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
|
let pos = this.invoices.findIndex(
|
||||||
|
(invoices) => invoices.id === data.id
|
||||||
|
)
|
||||||
|
|
||||||
|
if (this.invoices[pos]) {
|
||||||
|
this.invoices[pos].status = 'SENT'
|
||||||
|
}
|
||||||
|
|
||||||
notificationStore.showNotification({
|
notificationStore.showNotification({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: global.t('invoices.mark_as_sent_successfully'),
|
message: global.t('invoices.mark_as_sent_successfully'),
|
||||||
|
|||||||
@ -124,7 +124,11 @@
|
|||||||
"
|
"
|
||||||
>
|
>
|
||||||
<!-- Tabs -->
|
<!-- 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.active')" filter="ACTIVE" />
|
||||||
<BaseTab :title="$t('recurring_invoices.on_hold')" filter="ON_HOLD" />
|
<BaseTab :title="$t('recurring_invoices.on_hold')" filter="ON_HOLD" />
|
||||||
<BaseTab :title="$t('recurring_invoices.all')" filter="ALL" />
|
<BaseTab :title="$t('recurring_invoices.all')" filter="ALL" />
|
||||||
@ -189,7 +193,7 @@
|
|||||||
|
|
||||||
<!-- Starts at -->
|
<!-- Starts at -->
|
||||||
<template #cell-starts_at="{ row }">
|
<template #cell-starts_at="{ row }">
|
||||||
{{ row.data.formatted_starts_at }}
|
{{ row.data.formatted_starts_at }}
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- Customer -->
|
<!-- Customer -->
|
||||||
@ -331,6 +335,10 @@ onUnmounted(() => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const currentStatusIndex = computed(() => {
|
||||||
|
return statusList.value.findIndex((status) => status === filters.status)
|
||||||
|
})
|
||||||
|
|
||||||
function canViewActions() {
|
function canViewActions() {
|
||||||
return userStore.hasAbilities([
|
return userStore.hasAbilities([
|
||||||
abilities.DELETE_RECURRING_INVOICE,
|
abilities.DELETE_RECURRING_INVOICE,
|
||||||
|
|||||||
Reference in New Issue
Block a user