mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-27 19:51:09 -04:00
Merge branch 'rec-invoice' into 'master'
fix recurring invoice view page table See merge request mohit.panjvani/crater-web!1321
This commit is contained in:
@ -36,7 +36,7 @@
|
||||
route.name !== 'invoices.view' &&
|
||||
userStore.hasAbilities(abilities.VIEW_INVOICE)
|
||||
"
|
||||
:to="`invoices/${row.id}/view`"
|
||||
:to="`/admin/invoices/${row.id}/view`"
|
||||
>
|
||||
<BaseDropdownItem>
|
||||
<BaseIcon
|
||||
|
||||
@ -399,11 +399,14 @@ export const useRecurringInvoiceStore = (useWindow = false) => {
|
||||
},
|
||||
|
||||
setSelectedFrequency() {
|
||||
this.newRecurringInvoice.selectedFrequency = this.frequencies.find(
|
||||
let data = this.frequencies.find(
|
||||
(frequency) => {
|
||||
return frequency.value === this.newRecurringInvoice.frequency
|
||||
}
|
||||
)
|
||||
data ? this.newRecurringInvoice.selectedFrequency = data
|
||||
: this.newRecurringInvoice.selectedFrequency = { label: 'Custom', value: 'CUSTOM' }
|
||||
|
||||
},
|
||||
|
||||
resetSelectedNote() {
|
||||
|
||||
@ -235,10 +235,12 @@ const getStatusOptions = computed(() => {
|
||||
watch(
|
||||
() => recurringInvoiceStore.newRecurringInvoice.selectedFrequency,
|
||||
(newValue) => {
|
||||
if (newValue && newValue.value !== 'CUSTOM') {
|
||||
recurringInvoiceStore.newRecurringInvoice.frequency = newValue.value
|
||||
} else {
|
||||
recurringInvoiceStore.newRecurringInvoice.frequency = null
|
||||
if (!recurringInvoiceStore.isFetchingInitialSettings) {
|
||||
if (newValue && newValue.value !== 'CUSTOM') {
|
||||
recurringInvoiceStore.newRecurringInvoice.frequency = newValue.value
|
||||
} else {
|
||||
recurringInvoiceStore.newRecurringInvoice.frequency = null
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
<template>
|
||||
<SendInvoiceModal />
|
||||
<div class="relative table-container">
|
||||
<BaseTable
|
||||
ref="table"
|
||||
@ -49,6 +50,7 @@ import { useUserStore } from '@/scripts/stores/user'
|
||||
import { useRecurringInvoiceStore } from '@/scripts/stores/recurring-invoice'
|
||||
import abilities from '@/scripts/stub/abilities'
|
||||
import InvoiceDropdown from '@/scripts/components/dropdowns/InvoiceIndexDropdown.vue'
|
||||
import SendInvoiceModal from '@/scripts/components/modal-components/SendInvoiceModal.vue'
|
||||
|
||||
const recurringInvoiceStore = useRecurringInvoiceStore()
|
||||
|
||||
|
||||
@ -81,7 +81,7 @@ let isLoading = computed(() => {
|
||||
watch(
|
||||
route,
|
||||
() => {
|
||||
if (route.params.id) {
|
||||
if (route.params.id && route.name === 'recurring-invoices.view') {
|
||||
loadRecurringInvoice()
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user