mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-27 19:51:09 -04:00
added mark as default changes in estimate and invoice template
This commit is contained in:
@ -13,6 +13,7 @@ import { handleError } from '@/scripts/helpers/error-handling'
|
||||
import estimateStub from '../stub/estimate'
|
||||
import estimateItemStub from '../stub/estimate-item'
|
||||
import taxStub from '../stub/tax'
|
||||
import { useUserStore } from './user'
|
||||
|
||||
export const useEstimateStore = (useWindow = false) => {
|
||||
const defineStoreFunc = useWindow ? window.pinia.defineStore : defineStore
|
||||
@ -497,6 +498,7 @@ export const useEstimateStore = (useWindow = false) => {
|
||||
const itemStore = useItemStore()
|
||||
const taxTypeStore = useTaxTypeStore()
|
||||
const route = useRoute()
|
||||
const userStore = useUserStore()
|
||||
|
||||
this.isFetchingInitialSettings = true
|
||||
this.newEstimate.selectedCurrency = companyStore.selectedCompanyCurrency
|
||||
@ -546,6 +548,9 @@ export const useEstimateStore = (useWindow = false) => {
|
||||
}
|
||||
|
||||
this.setTemplate(this.templates[0].name)
|
||||
this.newEstimate.template_name =
|
||||
userStore.currentUserSettings.default_estimate_template ?
|
||||
userStore.currentUserSettings.default_estimate_template : this.newEstimate.template_name
|
||||
}
|
||||
|
||||
if (isEdit) {
|
||||
|
||||
Reference in New Issue
Block a user