Skip to content

Commit 23eefff

Browse files
committed
updated for Nova 3.31
1 parent c22ecc5 commit 23eefff

File tree

3 files changed

+19
-6
lines changed

3 files changed

+19
-6
lines changed

dist/js/tool.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

resources/js/components/ResourceTable.vue

+10-4
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@
1313
<thead>
1414
<tr>
1515
<!-- Select Checkbox -->
16-
<th class="w-16" v-if="shouldShowCheckboxes">
17-
&nbsp;
18-
</th>
16+
<th class="w-16" v-if="shouldShowCheckboxes">&nbsp;</th>
1917

2018
<!-- Actions, View, Edit, Delete -->
2119
<th>&nbsp;</th>
@@ -27,7 +25,7 @@
2725
@reset="resetOrderBy(field)"
2826
:resource-name="resourceName"
2927
:uri-key="field.sortableUriKey"
30-
v-if="field.sortable"
28+
v-if="sortable && field.sortable"
3129
>
3230
{{ field.indexName }}
3331
</sortable-icon>
@@ -55,6 +53,7 @@
5553
:via-many-to-many="viaManyToMany"
5654
:checked="selectedResources.indexOf(resource) > -1"
5755
:actions-are-available="actionsAreAvailable"
56+
:actions-endpoint="actionsEndpoint"
5857
:should-show-checkboxes="shouldShowCheckboxes"
5958
:update-selection-status="updateSelectionStatus"
6059
/>
@@ -110,6 +109,13 @@ export default {
110109
updateSelectionStatus: {
111110
type: Function,
112111
},
112+
actionsEndpoint: {
113+
default: null,
114+
},
115+
sortable: {
116+
type: Boolean,
117+
default: false,
118+
},
113119
},
114120
115121
data: () => ({

resources/js/components/ResourceTableRow.vue

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
<template>
2-
<tr :dusk="resource['id'].value + '-row'">
2+
<tr
3+
:dusk="resource['id'].value + '-row'"
4+
:data-pivot-id="resource['id'].pivotValue"
5+
>
36
<!-- Resource Selection Checkbox -->
47
<td class="w-16" v-if="shouldShowCheckboxes">
58
<checkbox
@@ -20,6 +23,7 @@
2023
:resource="resource"
2124
:resource-name="resourceName"
2225
:actions="availableActions"
26+
:endpoint="actionsEndpoint"
2327
@actionExecuted="$emit('actionExecuted')"
2428
/>
2529

@@ -62,6 +66,7 @@
6266
},
6367
query: {
6468
viaRelationship: viaRelationship,
69+
viaPivotId: resource['id'].pivotValue,
6570
},
6671
}"
6772
>
@@ -168,6 +173,7 @@
168173
:resource-name="resourceName"
169174
:via-resource="viaResource"
170175
:via-resource-id="viaResourceId"
176+
:resource="resource"
171177
:field="field"
172178
/>
173179
</td>
@@ -190,6 +196,7 @@ export default {
190196
'viaManyToMany',
191197
'checked',
192198
'actionsAreAvailable',
199+
'actionsEndpoint',
193200
'shouldShowCheckboxes',
194201
'updateSelectionStatus',
195202
'queryString',

0 commit comments

Comments
 (0)