mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-28 12:11:08 -04:00
Merge branch 'v5-issues' into 'master'
V5 issues See merge request mohit.panjvani/crater-web!1301
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'),
|
||||||
|
|||||||
@ -184,7 +184,7 @@
|
|||||||
|
|
||||||
<!-- Estimate date -->
|
<!-- Estimate date -->
|
||||||
<template #cell-estimate_date="{ row }">
|
<template #cell-estimate_date="{ row }">
|
||||||
{{ row.data.formatted_estimate_date }}
|
{{ row.data.formatted_estimate_date }}
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #cell-estimate_number="{ row }">
|
<template #cell-estimate_number="{ row }">
|
||||||
@ -209,7 +209,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #cell-total="{ row }">
|
<template #cell-total="{ row }">
|
||||||
<BaseFormatMoney :amount="row.data.total" />
|
<BaseFormatMoney
|
||||||
|
:amount="row.data.total"
|
||||||
|
:currency="row.data.customer.currency"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- Actions -->
|
<!-- Actions -->
|
||||||
|
|||||||
@ -422,14 +422,21 @@ async function searchCustomer(search) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function loadData() {
|
async function loadData() {
|
||||||
expenseStore.currentExpense.currency_id = companyStore.selectedCompanyCurrency.id
|
if (!isEdit.value) {
|
||||||
expenseStore.currentExpense.selectedCurrency = companyStore.selectedCompanyCurrency
|
expenseStore.currentExpense.currency_id =
|
||||||
|
companyStore.selectedCompanyCurrency.id
|
||||||
|
expenseStore.currentExpense.selectedCurrency =
|
||||||
|
companyStore.selectedCompanyCurrency
|
||||||
|
}
|
||||||
|
|
||||||
isFetchingInitialData.value = true
|
isFetchingInitialData.value = true
|
||||||
await expenseStore.fetchPaymentModes({ limit: 'all' })
|
await expenseStore.fetchPaymentModes({ limit: 'all' })
|
||||||
|
|
||||||
if (isEdit.value) {
|
if (isEdit.value) {
|
||||||
await expenseStore.fetchExpense(route.params.id)
|
await expenseStore.fetchExpense(route.params.id)
|
||||||
|
|
||||||
|
expenseStore.currentExpense.currency_id =
|
||||||
|
expenseStore.currentExpense.selectedCurrency.id
|
||||||
} else if (route.query.customer) {
|
} else if (route.query.customer) {
|
||||||
expenseStore.currentExpense.customer_id = route.query.customer
|
expenseStore.currentExpense.customer_id = route.query.customer
|
||||||
}
|
}
|
||||||
|
|||||||
@ -181,7 +181,7 @@
|
|||||||
<template #cell-amount="{ row }">
|
<template #cell-amount="{ row }">
|
||||||
<BaseFormatMoney
|
<BaseFormatMoney
|
||||||
:amount="row.data.amount"
|
:amount="row.data.amount"
|
||||||
:currency="companyStore.selectedCompanyCurrency"
|
:currency="row.data.currency"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@ -194,7 +194,7 @@
|
|||||||
|
|
||||||
<!-- Invoice date -->
|
<!-- Invoice date -->
|
||||||
<template #cell-invoice_date="{ row }">
|
<template #cell-invoice_date="{ row }">
|
||||||
{{ row.data.formatted_invoice_date }}
|
{{ row.data.formatted_invoice_date }}
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- Invoice Total -->
|
<!-- Invoice Total -->
|
||||||
|
|||||||
@ -185,7 +185,7 @@
|
|||||||
<template #cell-amount="{ row }">
|
<template #cell-amount="{ row }">
|
||||||
<BaseFormatMoney
|
<BaseFormatMoney
|
||||||
:amount="row.data.amount"
|
:amount="row.data.amount"
|
||||||
:currency="companyStore.selectedCompanyCurrency"
|
:currency="row.data.customer.currency"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@ -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