fix: patient form/view field order, sync nav visibility, and backup 504

This commit is contained in:
SajjadMahmoody 2026-05-31 23:18:48 +03:30
parent d19191a320
commit 4a85e07804
5 changed files with 38 additions and 11 deletions

View File

@ -213,6 +213,10 @@ public static function form(Schema $schema): Schema
]) ])
->maxLength(50), ->maxLength(50),
TextInput::make('home_phone')
->label(__('patients.fields.home_phone'))
->maxLength(50),
TextInput::make('age') TextInput::make('age')
->label(__('patients.fields.age')) ->label(__('patients.fields.age'))
->numeric() ->numeric()
@ -248,10 +252,6 @@ public static function form(Schema $schema): Schema
->label(__('patients.fields.job')) ->label(__('patients.fields.job'))
->maxLength(50), ->maxLength(50),
TextInput::make('home_phone')
->label(__('patients.fields.home_phone'))
->maxLength(50),
TextInput::make('work_phone') TextInput::make('work_phone')
->label(__('patients.fields.work_phone')) ->label(__('patients.fields.work_phone'))
->maxLength(50), ->maxLength(50),
@ -543,6 +543,9 @@ public static function infolist(Schema $schema): Schema
TextEntry::make('hand_phone') TextEntry::make('hand_phone')
->label(__('patients.fields.hand_phone')) ->label(__('patients.fields.hand_phone'))
->placeholder('-'), ->placeholder('-'),
TextEntry::make('home_phone')
->label(__('patients.fields.home_phone'))
->placeholder('-'),
TextEntry::make('age') TextEntry::make('age')
->label(__('patients.fields.age')) ->label(__('patients.fields.age'))
->placeholder('-'), ->placeholder('-'),
@ -571,9 +574,6 @@ public static function infolist(Schema $schema): Schema
TextEntry::make('job') TextEntry::make('job')
->label(__('patients.fields.job')) ->label(__('patients.fields.job'))
->placeholder('-'), ->placeholder('-'),
TextEntry::make('home_phone')
->label(__('patients.fields.home_phone'))
->placeholder('-'),
TextEntry::make('work_phone') TextEntry::make('work_phone')
->label(__('patients.fields.work_phone')) ->label(__('patients.fields.work_phone'))
->placeholder('-'), ->placeholder('-'),

View File

@ -1,6 +1,8 @@
<div <div
class="flex items-center gap-1" class="flex items-center gap-1"
@can('View:SyncPage')
x-init="if (['/admin', '/admin/'].includes(window.location.pathname)) $wire.checkPeerStatus()" x-init="if (['/admin', '/admin/'].includes(window.location.pathname)) $wire.checkPeerStatus()"
@endcan
> >
@can('View:SyncPage') @can('View:SyncPage')
@ -27,7 +29,6 @@ class="flex items-center justify-center w-9 h-9 rounded-lg text-gray-500 hover:t
</span> </span>
</button> </button>
@can('View:SyncPage')
<div <div
class="relative" class="relative"
x-data="{ x-data="{
@ -110,6 +111,7 @@ class="flex items-center justify-center w-9 h-9 rounded-lg text-gray-500 hover:t
class="absolute inset-s-0 mt-1 w-52 rounded-xl bg-white dark:bg-gray-800 shadow-lg ring-1 ring-gray-200 dark:ring-gray-700 z-50 py-1" class="absolute inset-s-0 mt-1 w-52 rounded-xl bg-white dark:bg-gray-800 shadow-lg ring-1 ring-gray-200 dark:ring-gray-700 z-50 py-1"
style="display:none" style="display:none"
> >
@can('View:SyncPage')
<button <button
type="button" type="button"
@click="confirmSync()" @click="confirmSync()"
@ -127,6 +129,7 @@ class="flex items-center gap-3 px-4 py-2.5 text-sm text-gray-700 dark:text-gray-
<x-heroicon-o-document-magnifying-glass class="w-4 h-4 text-info-500 shrink-0" /> <x-heroicon-o-document-magnifying-glass class="w-4 h-4 text-info-500 shrink-0" />
{{ __('navigation.sync.details') }} {{ __('navigation.sync.details') }}
</a> </a>
@endcan
<a <a
href="{{ route('backup.download') }}" href="{{ route('backup.download') }}"
@ -138,6 +141,7 @@ class="flex items-center gap-3 px-4 py-2.5 text-sm text-gray-700 dark:text-gray-
</a> </a>
</div> </div>
@can('View:SyncPage')
<template x-teleport="body"> <template x-teleport="body">
<div <div
x-show="showConfirm" x-show="showConfirm"
@ -236,8 +240,8 @@ class="px-4 py-2 text-sm font-medium text-white rounded-lg transition"
</div> </div>
</div> </div>
</template> </template>
@endcan
</div> </div>
@endcan
</div> </div>

View File

@ -43,7 +43,10 @@
set_time_limit(0); set_time_limit(0);
ini_set('memory_limit', '256M'); ini_set('memory_limit', '256M');
$dbPath = database_path('database.sqlite'); $dbRaw = config('database.connections.sqlite.database', 'database/database.sqlite');
$dbPath = str_starts_with($dbRaw, '/') || preg_match('/^[A-Za-z]:/', $dbRaw)
? $dbRaw
: base_path($dbRaw);
if (! file_exists($dbPath)) { if (! file_exists($dbPath)) {
abort(404, 'Database not found.'); abort(404, 'Database not found.');
} }

View File

@ -65,6 +65,16 @@ http {
try_files $uri $uri/ /index.php?$query_string; try_files $uri $uri/ /index.php?$query_string;
} }
location = /backup/download {
fastcgi_pass php_fpm;
fastcgi_read_timeout 600;
fastcgi_param SCRIPT_FILENAME $document_root/index.php;
fastcgi_param QUERY_STRING $query_string;
include fastcgi_params;
fastcgi_keep_conn on;
fastcgi_buffering off;
}
location ~ \.php$ { location ~ \.php$ {
fastcgi_pass php_fpm; fastcgi_pass php_fpm;
fastcgi_index index.php; fastcgi_index index.php;

View File

@ -65,6 +65,16 @@ http {
try_files $uri $uri/ /index.php?$query_string; try_files $uri $uri/ /index.php?$query_string;
} }
location = /backup/download {
fastcgi_pass php_fpm;
fastcgi_read_timeout 600;
fastcgi_param SCRIPT_FILENAME $document_root/index.php;
fastcgi_param QUERY_STRING $query_string;
include fastcgi_params;
fastcgi_keep_conn on;
fastcgi_buffering off;
}
location ~ \.php$ { location ~ \.php$ {
fastcgi_pass php_fpm; fastcgi_pass php_fpm;
fastcgi_index index.php; fastcgi_index index.php;