Skip to content

Commit

Permalink
updated for Nova 3.31
Browse files Browse the repository at this point in the history
  • Loading branch information
theofanisv committed Mar 1, 2022
1 parent c22ecc5 commit 23eefff
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dist/js/tool.js

Large diffs are not rendered by default.

14 changes: 10 additions & 4 deletions resources/js/components/ResourceTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
<thead>
<tr>
<!-- Select Checkbox -->
<th class="w-16" v-if="shouldShowCheckboxes">
&nbsp;
</th>
<th class="w-16" v-if="shouldShowCheckboxes">&nbsp;</th>

<!-- Actions, View, Edit, Delete -->
<th>&nbsp;</th>
Expand All @@ -27,7 +25,7 @@
@reset="resetOrderBy(field)"
:resource-name="resourceName"
:uri-key="field.sortableUriKey"
v-if="field.sortable"
v-if="sortable && field.sortable"
>
{{ field.indexName }}
</sortable-icon>
Expand Down Expand Up @@ -55,6 +53,7 @@
:via-many-to-many="viaManyToMany"
:checked="selectedResources.indexOf(resource) > -1"
:actions-are-available="actionsAreAvailable"
:actions-endpoint="actionsEndpoint"
:should-show-checkboxes="shouldShowCheckboxes"
:update-selection-status="updateSelectionStatus"
/>
Expand Down Expand Up @@ -110,6 +109,13 @@ export default {
updateSelectionStatus: {
type: Function,
},
actionsEndpoint: {
default: null,
},
sortable: {
type: Boolean,
default: false,
},
},
data: () => ({
Expand Down
9 changes: 8 additions & 1 deletion resources/js/components/ResourceTableRow.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<template>
<tr :dusk="resource['id'].value + '-row'">
<tr
:dusk="resource['id'].value + '-row'"
:data-pivot-id="resource['id'].pivotValue"
>
<!-- Resource Selection Checkbox -->
<td class="w-16" v-if="shouldShowCheckboxes">
<checkbox
Expand All @@ -20,6 +23,7 @@
:resource="resource"
:resource-name="resourceName"
:actions="availableActions"
:endpoint="actionsEndpoint"
@actionExecuted="$emit('actionExecuted')"
/>

Expand Down Expand Up @@ -62,6 +66,7 @@
},
query: {
viaRelationship: viaRelationship,
viaPivotId: resource['id'].pivotValue,
},
}"
>
Expand Down Expand Up @@ -168,6 +173,7 @@
:resource-name="resourceName"
:via-resource="viaResource"
:via-resource-id="viaResourceId"
:resource="resource"
:field="field"
/>
</td>
Expand All @@ -190,6 +196,7 @@ export default {
'viaManyToMany',
'checked',
'actionsAreAvailable',
'actionsEndpoint',
'shouldShowCheckboxes',
'updateSelectionStatus',
'queryString',
Expand Down

0 comments on commit 23eefff

Please sign in to comment.