fix issues

This commit is contained in:
makwanar587
2021-12-01 14:46:25 +05:30
parent f3dad8d48b
commit e22f60ff16
5 changed files with 27 additions and 4 deletions

View File

@ -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);
} }
} }

View File

@ -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

View File

@ -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",

View File

@ -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'),

View File

@ -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,