From e9fde81bfb38305f65011cccbfeda004d35f2ef7 Mon Sep 17 00:00:00 2001 From: Deon George Date: Mon, 2 Dec 2024 19:39:11 +1100 Subject: [PATCH] Fix sorting of FTN zones in table Admin->Domain table --- resources/views/domain/home.blade.php | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/resources/views/domain/home.blade.php b/resources/views/domain/home.blade.php index 93cbb02..e49be0c 100644 --- a/resources/views/domain/home.blade.php +++ b/resources/views/domain/home.blade.php @@ -1,3 +1,5 @@ +@use(App\Models\Domain) + @extends('layouts.app') @section('htmlheader_title') FTN Domains @@ -10,14 +12,14 @@

In FTN network addresses, a domain is the 5th dimension and used when a system supports 5D addressing, ie: zone:net/node.point@domain.

Domains are used with zones to uniquely identify a FTN network.

Some legacy Fidonet software is not 5D aware and may behave unexpectedly when a domain is used

-

This system is aware of the following domains @can('admin',(new \App\Models\Domain))(you can add more)@endcan:

+

This system is aware of the following domains @can('admin',(new Domain))(you can add more)@endcan:

- @if (\App\Models\Domain::count() === 0) - @can('admin',(new \App\Models\Domain)) + @if (Domain::count() === 0) + @can('admin',(new Domain))

There are no domains setup, to set up your first.

@else

There are no domains - you need to ask an admin to create one for you.

@@ -35,7 +37,7 @@ - @foreach (\App\Models\Domain::orderBy('name')->with(['zones'])->get() as $oo) + @foreach (Domain::orderBy('name')->with(['zones'])->get() as $oo) {{ $oo->id }} {{ $oo->name }} @@ -75,6 +77,17 @@ style: 'fade', speed: 500 }, + columnDefs: [ + { + targets: 4, + type: 'num-fmt', + render: { + 'sort': function (data,type,row,meta) { + return data ? parseFloat(data) : 0; + }, + } + } + ], language: { paginate: { previous: '<<',