-
Notifications
You must be signed in to change notification settings - Fork 374
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix redirect on save as copy and resolve wrong titles on all records
- Loading branch information
Showing
9 changed files
with
85 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 0 additions & 31 deletions
31
client/web/compose/src/views/Public/Pages/Records/Create.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,15 @@ | ||
<script> | ||
import ViewRecord from './View' | ||
import { compose } from '@cortezaproject/corteza-js' | ||
export default { | ||
name: 'CreateRecord', | ||
extends: ViewRecord, | ||
props: { | ||
// When creating from related record blocks | ||
refRecord: { | ||
type: compose.Record, | ||
required: false, | ||
default: () => ({}), | ||
}, | ||
// If component was called (via router) with some pre-seed values | ||
values: { | ||
type: Object, | ||
required: false, | ||
default: () => ({}), | ||
}, | ||
}, | ||
data () { | ||
return { | ||
inEditing: true, | ||
inCreating: true, | ||
} | ||
}, | ||
created () { | ||
this.record = new compose.Record(this.module, { values: this.values }) | ||
if (this.refRecord) { | ||
// Record create form called from a related records block, | ||
// we'll try to find an appropriate field and cross-link this new record to ref | ||
const recRefField = this.module.fields.find(f => f.kind === 'Record' && f.options.moduleID === this.refRecord.moduleID) | ||
if (recRefField) { | ||
this.record.values[recRefField.name] = this.refRecord.recordID | ||
} | ||
} | ||
}, | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters