mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-04-07 13:41:23 +00:00
Clone estimates (#97)
* Clone estimates * Clone estimate test feature * Resolve namespace * Fix string to int for Carbon * Fix homes routes and default queue key * Move dropdown item below View and use the propper translation key
This commit is contained in:
@@ -329,6 +329,25 @@ export const useEstimateStore = (useWindow = false) => {
|
||||
})
|
||||
},
|
||||
|
||||
cloneEstimate(data) {
|
||||
return new Promise((resolve, reject) => {
|
||||
axios
|
||||
.post(`/api/v1/estimates/${data.id}/clone`, data)
|
||||
.then((response) => {
|
||||
const notificationStore = useNotificationStore()
|
||||
notificationStore.showNotification({
|
||||
type: 'success',
|
||||
message: global.t('estimates.cloned_successfully'),
|
||||
})
|
||||
resolve(response)
|
||||
})
|
||||
.catch((err) => {
|
||||
handleError(err)
|
||||
reject(err)
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
markAsAccepted(data) {
|
||||
return new Promise((resolve, reject) => {
|
||||
axios
|
||||
|
||||
Reference in New Issue
Block a user