fix(ui): use Alpine state for clone-to-environment destination uuid

Blade directives like @js() are not compiled inside component-tag
attributes, so the Clone resource button's @click expression reached
the browser as literal PHP and Alpine threw an expression error on
click, making the button do nothing. Use the currentDestinationUuid
Alpine variable already defined in the root x-data instead.

Closes #11340
This commit is contained in:
2026-08-18 10:40:09 +07:00
parent 69dbfe0079
commit e005b0fbd3
@@ -245,8 +245,7 @@
Uses {{ data_get($resource, 'destination.server.name') }} ·
{{ data_get($resource, 'destination.network') }}.
</p>
<x-forms.button
@click="$wire.cloneTo(@js($resource->destination->uuid), selectedCloneEnvironment)">
<x-forms.button @click="$wire.cloneTo(currentDestinationUuid, selectedCloneEnvironment)">
Clone resource
</x-forms.button>
</div>