binaryruel
binaryruel
FFilament
Created by zydnrbrn on 7/31/2024 in #❓┊help
Combining with Inertia
My front-end is Inertia+Vue and my backend is Filament. Seems to work fine.
6 replies
FFilament
Created by binaryruel on 6/14/2024 in #❓┊help
custom Collection as data to Table
Thanks Dennis, do you have the Roadmap link for v4?
5 replies
FFilament
Created by binaryruel on 2/3/2024 in #❓┊help
Table Actions for RelationshipManager be Visible in ViewPage
This is resolved in the docs https://filamentphp.com/docs/3.x/panels/resources/relation-managers#read-only-mode
public function isReadOnly(): bool
{
return false;
}
public function isReadOnly(): bool
{
return false;
}
Thanks!
4 replies
FFilament
Created by binaryruel on 2/1/2024 in #❓┊help
Announecment Plugin?
Thanks @awcodes !!
7 replies
FFilament
Created by binaryruel on 2/1/2024 in #❓┊help
Announecment Plugin?
An option to have a banner-like annoucement at the top of the resource.
7 replies
FFilament
Created by binaryruel on 12/2/2023 in #❓┊help
Resource Label Uppercase?
This is solved!
protected static ?string $breadcrumb = "SSML Applications";

protected static ?string $navigationLabel = "SSML Applications";
protected static ?string $breadcrumb = "SSML Applications";

protected static ?string $navigationLabel = "SSML Applications";
4 replies
FFilament
Created by binaryruel on 12/2/2023 in #❓┊help
Resource Label Uppercase?
No description
4 replies
FFilament
Created by binaryruel on 10/10/2023 in #❓┊help
Save an array state on a Custom Field
@Hugh Messenger , I've implemented your way. Question though, if I need just the coordinates, I just need to update the statePath? Or the whole config array gets updated? Sorry, totally newb.
12 replies
FFilament
Created by binaryruel on 10/16/2023 in #❓┊help
Subdomain routing
Yes, Patrick.
7 replies
FFilament
Created by binaryruel on 10/10/2023 in #❓┊help
Save an array state on a Custom Field
weird, so submitting the form carry out the additional polylines, but the json_encode didn't update while I draw them
12 replies
FFilament
Created by binaryruel on 10/10/2023 in #❓┊help
Save an array state on a Custom Field
here's the update
<script>
function {{$map_id}}InitMap(config) {
return {
value: config?.value ?? {},
readableCoordinates: {},
{{$map_id}}init: function () {
console.log('initialize map');
const map = new google.maps.Map(this.$refs.{{$map_id}}map, {
center: {lat: -34.397, lng: 150.644},
zoom: 8
});

this.drawings = this.value;

const drawingManager = new google.maps.drawing.DrawingManager({
drawingMode: google.maps.drawing.OverlayType.POLYLINE,
drawingControl: true,
drawingControlOptions: {
position: google.maps.ControlPosition.TOP_CENTER,
drawingModes: ['polyline']
},
polylineOptions: {
strokeColor: '#FF0000',
strokeOpacity: 1.0,
strokeWeight: 2
}
});
drawingManager.setMap(map);

const alpineThis = this;

google.maps.event.addListener(drawingManager, 'overlaycomplete', function(event) {
const that = this;
if (event.type === 'polyline') {
const completedPolyline = event.overlay;
const path = event.overlay.getPath();
const coordinates = path.getArray();
alpineThis.readableCoordinates = coordinates.map(latLng => {
return {lat: latLng.lat(), lng: latLng.lng()};
});
console.log('polyline completed');
}
});

this.$watch('readableCoordinates', () => {
this.value.push({
coordinates: this.readableCoordinates,
centerMarker: {
lat: 0,
lng: 0
},
type: 'type1',
color: '#FF0000'
})

console.log('coordinates changed');
});

}
}
}
</script>

<x-dynamic-component
:component="$getFieldWrapperView()"
:field="$field"
>
<div
wire:ignore
x-data="{{$map_id}}InitMap({
value: $wire.entangle('{{ $getStatePath() }}'),
})"
x-init="{{$map_id}}init()"
>
<div
x-ref="{{$map_id}}map"
class="w-full" style="height: 500px; min-height: 30vh; z-index: 1 !important;">

</div>
</div>
</x-dynamic-component>
<script>
function {{$map_id}}InitMap(config) {
return {
value: config?.value ?? {},
readableCoordinates: {},
{{$map_id}}init: function () {
console.log('initialize map');
const map = new google.maps.Map(this.$refs.{{$map_id}}map, {
center: {lat: -34.397, lng: 150.644},
zoom: 8
});

this.drawings = this.value;

const drawingManager = new google.maps.drawing.DrawingManager({
drawingMode: google.maps.drawing.OverlayType.POLYLINE,
drawingControl: true,
drawingControlOptions: {
position: google.maps.ControlPosition.TOP_CENTER,
drawingModes: ['polyline']
},
polylineOptions: {
strokeColor: '#FF0000',
strokeOpacity: 1.0,
strokeWeight: 2
}
});
drawingManager.setMap(map);

const alpineThis = this;

google.maps.event.addListener(drawingManager, 'overlaycomplete', function(event) {
const that = this;
if (event.type === 'polyline') {
const completedPolyline = event.overlay;
const path = event.overlay.getPath();
const coordinates = path.getArray();
alpineThis.readableCoordinates = coordinates.map(latLng => {
return {lat: latLng.lat(), lng: latLng.lng()};
});
console.log('polyline completed');
}
});

this.$watch('readableCoordinates', () => {
this.value.push({
coordinates: this.readableCoordinates,
centerMarker: {
lat: 0,
lng: 0
},
type: 'type1',
color: '#FF0000'
})

console.log('coordinates changed');
});

}
}
}
</script>

<x-dynamic-component
:component="$getFieldWrapperView()"
:field="$field"
>
<div
wire:ignore
x-data="{{$map_id}}InitMap({
value: $wire.entangle('{{ $getStatePath() }}'),
})"
x-init="{{$map_id}}init()"
>
<div
x-ref="{{$map_id}}map"
class="w-full" style="height: 500px; min-height: 30vh; z-index: 1 !important;">

</div>
</div>
</x-dynamic-component>
12 replies
FFilament
Created by binaryruel on 10/10/2023 in #❓┊help
Save an array state on a Custom Field
Tried it but no luck. There is no reactivity when an array is passed.
12 replies
FFilament
Created by binaryruel on 6/19/2023 in #❓┊help
Form Relations not firing Model Observers?
What's the best way to listen on those changes?
7 replies
FFilament
Created by binaryruel on 6/19/2023 in #❓┊help
Form Relations not firing Model Observers?
I meant when saving and updating the repeater items. Nothing happens.
7 replies
FFilament
Created by sotjj on 5/25/2023 in #❓┊help
Access filters in action
There's a filters property on the $livewire object.
9 replies
FFilament
Created by binaryruel on 5/25/2023 in #❓┊help
Action Buttons on Top of Page
Thanks Dan! I did it by overriding the render method and copying the edit-record and adding another form actions above the form.
...
<x-filament::form wire:submit.prevent="save">

<x-filament::form.actions
:actions="$this->getCachedFormActions()"
:full-width="$this->hasFullWidthFormActions()"
/>

{{ $this->form }}

<x-filament::form.actions
:actions="$this->getCachedFormActions()"
:full-width="$this->hasFullWidthFormActions()"
/>
</x-filament::form>
...
...
<x-filament::form wire:submit.prevent="save">

<x-filament::form.actions
:actions="$this->getCachedFormActions()"
:full-width="$this->hasFullWidthFormActions()"
/>

{{ $this->form }}

<x-filament::form.actions
:actions="$this->getCachedFormActions()"
:full-width="$this->hasFullWidthFormActions()"
/>
</x-filament::form>
...
and in my EditRecord class
public function render(): View
{
return view('my-blade-view', $this->getViewData())
->layout(static::$layout, $this->getLayoutData());
}
public function render(): View
{
return view('my-blade-view', $this->getViewData())
->layout(static::$layout, $this->getLayoutData());
}
Let me know if that's the easiest way.
6 replies
FFilament
Created by binaryruel on 5/22/2023 in #❓┊help
Default pagination to "All"
Yes it's -1
8 replies
FFilament
Created by binaryruel on 5/22/2023 in #❓┊help
Default pagination to "All"
This is solved. 🙂 Thanks Dan!
8 replies
FFilament
Created by binaryruel on 5/22/2023 in #❓┊help
Default pagination to "All"
oh? -1?
8 replies
FFilament
Created by binaryruel on 5/22/2023 in #❓┊help
Default pagination to "All"
protected function getDefaultTableRecordsPerPageSelectOption(): int
{
return ?;
}
protected function getDefaultTableRecordsPerPageSelectOption(): int
{
return ?;
}
the return type is int
8 replies