Skip to content

Commit c59b64a

Browse files
authored
fix: Edit button on ResourceTableRow doesn't work with many-to-many resource
fixes #210
1 parent 905a164 commit c59b64a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

resources/js/components/ResourceTableRow.vue

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,16 @@ export default {
363363
...mapGetters(['currentUser']),
364364
365365
updateURL() {
366+
if (this.viaManyToMany) {
367+
return this.$url(
368+
`/resources/${this.viaResource}/${this.viaResourceId}/edit-attached/${this.resourceName}/${this.resource.id.value}`,
369+
{
370+
viaRelationship: this.viaRelationship,
371+
viaPivotId: this.resource.id.pivotValue,
372+
}
373+
)
374+
}
375+
366376
return this.$url(
367377
`/resources/${this.resourceName}/${this.resource.id.value}/edit`,
368378
{

0 commit comments

Comments
 (0)