This commit is contained in:
2021-07-26 23:58:28 +00:00
parent e342757788
commit 3ed136613c
3 changed files with 79 additions and 35 deletions

View File

@@ -97,8 +97,20 @@ export default {
} else {
//new path
if (this.$route.params.obj) {
//DUPLICATE
//DUPLICATE OR GEN FROM QUOTE OR PM
this.obj = this.$route.params.obj;
if (this.$route.params.fromQuote) {
//FROM QUOTE
//TODO:
//delete quote specific fields, set fromQuoteId, add a default state for new wo from global settings, add partrequests empty collection and any missing servicewo stuff
//handle copy wiki and copy attachments (somehow for attachments, maybe set a flag on first save if success it then triggers an attachment route that copies attachments to another object so not duped in system)
} else if (this.$route.params.fromPM) {
//FROM PM
//TODO:
//delete pm specific fields, set fromPMId, add a default state for new wo from global settings, add partrequests empty collection
}
this.obj.concurrency = undefined;
this.obj.id = 0;
this.obj.serial = 0;