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:
mchev
2024-06-06 12:16:41 +02:00
committed by GitHub
parent 14c599ed4f
commit bb8258036a
25 changed files with 262 additions and 2 deletions

View File

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