refactor: optimize command center and stock management performance with lightweight JSON and DB indexes
This commit is contained in:
parent
5574f845ab
commit
51d5ac87c7
@ -0,0 +1,32 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::table('remote_commands', function (Blueprint $table) {
|
||||||
|
$table->index('command_type');
|
||||||
|
$table->index('status');
|
||||||
|
$table->index('created_at');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::table('remote_commands', function (Blueprint $table) {
|
||||||
|
$table->dropIndex(['command_type']);
|
||||||
|
$table->dropIndex(['status']);
|
||||||
|
$table->dropIndex(['created_at']);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
@ -148,7 +148,7 @@
|
|||||||
@foreach ($history as $item)
|
@foreach ($history as $item)
|
||||||
<tr
|
<tr
|
||||||
class="group hover:bg-slate-50/80 dark:hover:bg-slate-800/40 transition-all duration-300">
|
class="group hover:bg-slate-50/80 dark:hover:bg-slate-800/40 transition-all duration-300">
|
||||||
<td class="px-6 py-6 cursor-pointer" @click="selectMachine({{ Js::from($item->machine) }})">
|
<td class="px-6 py-6 cursor-pointer" @click="selectMachine({{ Js::from($item->machine->only(['id', 'name', 'serial_no', 'image_urls'])) }})">
|
||||||
<div class="flex items-center gap-4">
|
<div class="flex items-center gap-4">
|
||||||
<div
|
<div
|
||||||
class="w-12 h-12 rounded-2xl bg-slate-100 dark:bg-slate-800 flex items-center justify-center text-slate-400 border border-slate-200 dark:border-slate-700 group-hover:bg-cyan-500 group-hover:text-white transition-all duration-300 shadow-sm overflow-hidden shrink-0">
|
class="w-12 h-12 rounded-2xl bg-slate-100 dark:bg-slate-800 flex items-center justify-center text-slate-400 border border-slate-200 dark:border-slate-700 group-hover:bg-cyan-500 group-hover:text-white transition-all duration-300 shadow-sm overflow-hidden shrink-0">
|
||||||
@ -281,7 +281,7 @@
|
|||||||
<div class="xl:hidden grid grid-cols-1 md:grid-cols-2 gap-6">
|
<div class="xl:hidden grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||||
@forelse ($history as $item)
|
@forelse ($history as $item)
|
||||||
<div class="luxury-card p-6 rounded-[2rem] border border-slate-100 dark:border-slate-800 bg-white/50 dark:bg-slate-900/50 transition-all duration-300 group"
|
<div class="luxury-card p-6 rounded-[2rem] border border-slate-100 dark:border-slate-800 bg-white/50 dark:bg-slate-900/50 transition-all duration-300 group"
|
||||||
@click="selectMachine({{ Js::from($item->machine) }})">
|
@click="selectMachine({{ Js::from($item->machine->only(['id', 'name', 'serial_no', 'image_urls'])) }})">
|
||||||
<div class="flex items-start justify-between gap-4 mb-6">
|
<div class="flex items-start justify-between gap-4 mb-6">
|
||||||
<div class="flex items-center gap-4 min-w-0">
|
<div class="flex items-center gap-4 min-w-0">
|
||||||
<div class="w-14 h-14 rounded-2xl bg-slate-100 dark:bg-slate-800 flex items-center justify-center text-slate-400 border border-slate-200 dark:border-slate-700 group-hover:bg-cyan-500 group-hover:text-white transition-all duration-300 overflow-hidden shadow-sm shrink-0">
|
<div class="w-14 h-14 rounded-2xl bg-slate-100 dark:bg-slate-800 flex items-center justify-center text-slate-400 border border-slate-200 dark:border-slate-700 group-hover:bg-cyan-500 group-hover:text-white transition-all duration-300 overflow-hidden shadow-sm shrink-0">
|
||||||
@ -365,7 +365,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex items-center gap-3">
|
<div class="flex items-center gap-3">
|
||||||
<button type="button" @click.stop="selectMachine({{ Js::from($item->machine) }})"
|
<button type="button" @click.stop="selectMachine({{ Js::from($item->machine->only(['id', 'name', 'serial_no', 'image_urls'])) }})"
|
||||||
class="flex-1 flex items-center justify-center gap-2 py-3 rounded-xl bg-slate-100 dark:bg-slate-800 text-slate-600 dark:text-slate-300 font-black text-[10px] sm:text-xs tracking-widest hover:bg-slate-200 dark:hover:bg-slate-700 transition-all duration-300 border border-slate-200 dark:border-slate-700 shadow-sm">
|
class="flex-1 flex items-center justify-center gap-2 py-3 rounded-xl bg-slate-100 dark:bg-slate-800 text-slate-600 dark:text-slate-300 font-black text-[10px] sm:text-xs tracking-widest hover:bg-slate-200 dark:hover:bg-slate-700 transition-all duration-300 border border-slate-200 dark:border-slate-700 shadow-sm">
|
||||||
<svg class="w-4 h-4 stroke-[2.5]" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897l8.932-8.931Zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0 1 15.75 21H5.25A2.25 2.25 0 0 1 3 18.75V8.25A2.25 2.25 0 0 1 5.25 6H10" /></svg>
|
<svg class="w-4 h-4 stroke-[2.5]" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897l8.932-8.931Zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0 1 15.75 21H5.25A2.25 2.25 0 0 1 3 18.75V8.25A2.25 2.25 0 0 1 5.25 6H10" /></svg>
|
||||||
{{ __('New Command') }}
|
{{ __('New Command') }}
|
||||||
|
|||||||
@ -119,7 +119,7 @@
|
|||||||
<tbody class="divide-y divide-slate-50 dark:divide-slate-800/80">
|
<tbody class="divide-y divide-slate-50 dark:divide-slate-800/80">
|
||||||
@foreach ($history as $item)
|
@foreach ($history as $item)
|
||||||
<tr class="group hover:bg-slate-50/80 dark:hover:bg-slate-800/40 transition-all duration-300">
|
<tr class="group hover:bg-slate-50/80 dark:hover:bg-slate-800/40 transition-all duration-300">
|
||||||
<td class="px-6 py-6 cursor-pointer" @click="selectMachine(@js($item->machine))">
|
<td class="px-6 py-6 cursor-pointer" @click="selectMachine(@js($item->machine->only(['id', 'name', 'serial_no', 'image_urls'])))">
|
||||||
<div class="flex items-center gap-4">
|
<div class="flex items-center gap-4">
|
||||||
<div
|
<div
|
||||||
class="w-12 h-12 rounded-2xl bg-slate-100 dark:bg-slate-800 flex items-center justify-center text-slate-400 border border-slate-200 dark:border-slate-700 group-hover:bg-cyan-500 group-hover:text-white transition-all duration-300 shadow-sm overflow-hidden">
|
class="w-12 h-12 rounded-2xl bg-slate-100 dark:bg-slate-800 flex items-center justify-center text-slate-400 border border-slate-200 dark:border-slate-700 group-hover:bg-cyan-500 group-hover:text-white transition-all duration-300 shadow-sm overflow-hidden">
|
||||||
@ -162,10 +162,10 @@
|
|||||||
<span class="text-sm font-black text-slate-700 dark:text-slate-300 tracking-tight"
|
<span class="text-sm font-black text-slate-700 dark:text-slate-300 tracking-tight"
|
||||||
x-text="getCommandName(@js($item->command_type))"></span>
|
x-text="getCommandName(@js($item->command_type))"></span>
|
||||||
<div class="flex flex-col gap-0.5 mt-1">
|
<div class="flex flex-col gap-0.5 mt-1">
|
||||||
<span x-show="getPayloadDetails(@js($item))"
|
<span x-show="getPayloadDetails(@js($item->only(['payload', 'command_type', 'status'])))"
|
||||||
class="text-[11px] font-bold text-cyan-600 dark:text-cyan-400/80 bg-cyan-500/5 px-2 py-0.5 rounded-md border border-cyan-500/10 w-fit"
|
class="text-[11px] font-bold text-cyan-600 dark:text-cyan-400/80 bg-cyan-500/5 px-2 py-0.5 rounded-md border border-cyan-500/10 w-fit"
|
||||||
:class="{'line-through opacity-60': @js($item->status) === 'failed'}"
|
:class="{'line-through opacity-60': @js($item->status) === 'failed'}"
|
||||||
x-text="getPayloadDetails(@js($item))"></span>
|
x-text="getPayloadDetails(@js($item->only(['payload', 'command_type', 'status'])))"></span>
|
||||||
@if($item->note)
|
@if($item->note)
|
||||||
<span class="text-[10px] text-slate-400 italic pl-1"
|
<span class="text-[10px] text-slate-400 italic pl-1"
|
||||||
x-text="translateNote(@js($item->note))"></span>
|
x-text="translateNote(@js($item->note))"></span>
|
||||||
@ -226,7 +226,7 @@
|
|||||||
<div class="xl:hidden grid grid-cols-1 md:grid-cols-2 gap-6">
|
<div class="xl:hidden grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||||
@forelse ($history as $item)
|
@forelse ($history as $item)
|
||||||
<div class="luxury-card p-6 rounded-[2rem] border border-slate-100 dark:border-slate-800 bg-white/50 dark:bg-slate-900/50 transition-all duration-300 group"
|
<div class="luxury-card p-6 rounded-[2rem] border border-slate-100 dark:border-slate-800 bg-white/50 dark:bg-slate-900/50 transition-all duration-300 group"
|
||||||
@click="selectMachine(@js($item->machine))">
|
@click="selectMachine(@js($item->machine->only(['id', 'name', 'serial_no', 'image_urls'])))">
|
||||||
<div class="flex items-start justify-between gap-4 mb-6">
|
<div class="flex items-start justify-between gap-4 mb-6">
|
||||||
<div class="flex items-center gap-4 min-w-0">
|
<div class="flex items-center gap-4 min-w-0">
|
||||||
<div
|
<div
|
||||||
@ -268,10 +268,10 @@
|
|||||||
<span class="text-sm font-bold text-slate-700 dark:text-slate-300 tracking-tight"
|
<span class="text-sm font-bold text-slate-700 dark:text-slate-300 tracking-tight"
|
||||||
x-text="getCommandName(@js($item->command_type))"></span>
|
x-text="getCommandName(@js($item->command_type))"></span>
|
||||||
<div class="flex flex-wrap gap-1">
|
<div class="flex flex-wrap gap-1">
|
||||||
<span x-show="getPayloadDetails(@js($item))"
|
<span x-show="getPayloadDetails(@js($item->only(['payload', 'command_type', 'status'])))"
|
||||||
class="text-[10px] font-bold text-cyan-600 dark:text-cyan-400/80 bg-cyan-500/5 px-2 py-0.5 rounded-md border border-cyan-500/10 w-fit"
|
class="text-[10px] font-bold text-cyan-600 dark:text-cyan-400/80 bg-cyan-500/5 px-2 py-0.5 rounded-md border border-cyan-500/10 w-fit"
|
||||||
:class="{'line-through opacity-60': @js($item->status) === 'failed'}"
|
:class="{'line-through opacity-60': @js($item->status) === 'failed'}"
|
||||||
x-text="getPayloadDetails(@js($item))"></span>
|
x-text="getPayloadDetails(@js($item->only(['payload', 'command_type', 'status'])))"></span>
|
||||||
@if($item->note)
|
@if($item->note)
|
||||||
<span class="text-[10px] text-slate-400 italic" x-text="translateNote(@js($item->note))"></span>
|
<span class="text-[10px] text-slate-400 italic" x-text="translateNote(@js($item->note))"></span>
|
||||||
@endif
|
@endif
|
||||||
@ -305,7 +305,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex items-center gap-3">
|
<div class="flex items-center gap-3">
|
||||||
<button type="button" @click.stop="selectMachine(@js($item->machine))"
|
<button type="button" @click.stop="selectMachine(@js($item->machine->only(['id', 'name', 'serial_no', 'image_urls'])))"
|
||||||
class="flex-1 flex items-center justify-center gap-2 py-3 rounded-xl bg-slate-100 dark:bg-slate-800 text-slate-600 dark:text-slate-300 font-black text-[10px] sm:text-xs tracking-widest hover:bg-slate-200 dark:hover:bg-slate-700 transition-all duration-300 border border-slate-200 dark:border-slate-700 shadow-sm">
|
class="flex-1 flex items-center justify-center gap-2 py-3 rounded-xl bg-slate-100 dark:bg-slate-800 text-slate-600 dark:text-slate-300 font-black text-[10px] sm:text-xs tracking-widest hover:bg-slate-200 dark:hover:bg-slate-700 transition-all duration-300 border border-slate-200 dark:border-slate-700 shadow-sm">
|
||||||
<svg class="w-4 h-4 stroke-[2.5]" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
<svg class="w-4 h-4 stroke-[2.5]" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||||
<path stroke-linecap="round" stroke-linejoin="round"
|
<path stroke-linecap="round" stroke-linejoin="round"
|
||||||
|
|||||||
@ -77,7 +77,7 @@
|
|||||||
@foreach($machines as $machine)
|
@foreach($machines as $machine)
|
||||||
<tr
|
<tr
|
||||||
class="group hover:bg-slate-50/80 dark:hover:bg-slate-800/40 transition-all duration-300">
|
class="group hover:bg-slate-50/80 dark:hover:bg-slate-800/40 transition-all duration-300">
|
||||||
<td class="px-6 py-6 cursor-pointer" @click="selectMachine({{ Js::from($machine) }})">
|
<td class="px-6 py-6 cursor-pointer" @click="selectMachine({{ Js::from($machine->only(['id', 'name', 'serial_no', 'image_urls'])) }})">
|
||||||
<div class="flex items-center gap-4">
|
<div class="flex items-center gap-4">
|
||||||
<div
|
<div
|
||||||
class="w-12 h-12 rounded-2xl bg-slate-100 dark:bg-slate-800 flex items-center justify-center text-slate-400 border border-slate-200 dark:border-slate-700 group-hover:bg-cyan-500 group-hover:text-white transition-all duration-300 overflow-hidden shadow-sm shrink-0">
|
class="w-12 h-12 rounded-2xl bg-slate-100 dark:bg-slate-800 flex items-center justify-center text-slate-400 border border-slate-200 dark:border-slate-700 group-hover:bg-cyan-500 group-hover:text-white transition-all duration-300 overflow-hidden shadow-sm shrink-0">
|
||||||
@ -150,7 +150,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td class="px-6 py-6 text-right">
|
<td class="px-6 py-6 text-right">
|
||||||
<button @click="selectMachine({{ Js::from($machine) }})"
|
<button @click="selectMachine({{ Js::from($machine->only(['id', 'name', 'serial_no', 'image_urls'])) }})"
|
||||||
class="p-2.5 rounded-lg bg-slate-50 dark:bg-slate-800 text-slate-400 hover:text-cyan-500 hover:bg-cyan-500/5 transition-all border border-transparent hover:border-cyan-500/20"
|
class="p-2.5 rounded-lg bg-slate-50 dark:bg-slate-800 text-slate-400 hover:text-cyan-500 hover:bg-cyan-500/5 transition-all border border-transparent hover:border-cyan-500/20"
|
||||||
title="{{ __('Manage') }}">
|
title="{{ __('Manage') }}">
|
||||||
<svg class="w-4 h-4" fill="none" stroke="currentColor"
|
<svg class="w-4 h-4" fill="none" stroke="currentColor"
|
||||||
@ -170,7 +170,7 @@
|
|||||||
<div class="xl:hidden grid grid-cols-1 md:grid-cols-2 gap-6">
|
<div class="xl:hidden grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||||
@foreach($machines as $machine)
|
@foreach($machines as $machine)
|
||||||
<div class="luxury-card p-6 rounded-[2rem] border border-slate-100 dark:border-slate-800 bg-white/50 dark:bg-slate-900/50 transition-all duration-300 group"
|
<div class="luxury-card p-6 rounded-[2rem] border border-slate-100 dark:border-slate-800 bg-white/50 dark:bg-slate-900/50 transition-all duration-300 group"
|
||||||
@click="selectMachine({{ Js::from($machine) }})">
|
@click="selectMachine({{ Js::from($machine->only(['id', 'name', 'serial_no', 'image_urls'])) }})">
|
||||||
<div class="flex items-start justify-between gap-4 mb-6">
|
<div class="flex items-start justify-between gap-4 mb-6">
|
||||||
<div class="flex items-center gap-4 min-w-0">
|
<div class="flex items-center gap-4 min-w-0">
|
||||||
<div class="w-14 h-14 rounded-2xl bg-slate-100 dark:bg-slate-800 flex items-center justify-center text-slate-400 border border-slate-200 dark:border-slate-700 group-hover:bg-cyan-500 group-hover:text-white transition-all duration-300 overflow-hidden shadow-sm shrink-0">
|
<div class="w-14 h-14 rounded-2xl bg-slate-100 dark:bg-slate-800 flex items-center justify-center text-slate-400 border border-slate-200 dark:border-slate-700 group-hover:bg-cyan-500 group-hover:text-white transition-all duration-300 overflow-hidden shadow-sm shrink-0">
|
||||||
@ -226,7 +226,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex items-center gap-3">
|
<div class="flex items-center gap-3">
|
||||||
<button type="button" @click.stop="selectMachine({{ Js::from($machine) }})"
|
<button type="button" @click.stop="selectMachine({{ Js::from($machine->only(['id', 'name', 'serial_no', 'image_urls'])) }})"
|
||||||
class="flex-1 flex items-center justify-center gap-2 py-3 rounded-xl bg-slate-100 dark:bg-slate-800 text-slate-600 dark:text-slate-300 font-black text-[10px] sm:text-xs tracking-widest hover:bg-slate-200 dark:hover:bg-slate-700 transition-all duration-300 border border-slate-200 dark:border-slate-700 shadow-sm">
|
class="flex-1 flex items-center justify-center gap-2 py-3 rounded-xl bg-slate-100 dark:bg-slate-800 text-slate-600 dark:text-slate-300 font-black text-[10px] sm:text-xs tracking-widest hover:bg-slate-200 dark:hover:bg-slate-700 transition-all duration-300 border border-slate-200 dark:border-slate-700 shadow-sm">
|
||||||
<svg class="w-4 h-4 stroke-[2.5]" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897l8.932-8.931Zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0 1 15.75 21H5.25A2.25 2.25 0 0 1 3 18.75V8.25A2.25 2.25 0 0 1 5.25 6H10" /></svg>
|
<svg class="w-4 h-4 stroke-[2.5]" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897l8.932-8.931Zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0 1 15.75 21H5.25A2.25 2.25 0 0 1 3 18.75V8.25A2.25 2.25 0 0 1 5.25 6H10" /></svg>
|
||||||
{{ __('New Command') }}
|
{{ __('New Command') }}
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
<tbody class="divide-y divide-slate-50 dark:divide-slate-800/80">
|
<tbody class="divide-y divide-slate-50 dark:divide-slate-800/80">
|
||||||
@forelse($machines as $machine)
|
@forelse($machines as $machine)
|
||||||
<tr class="group hover:bg-slate-50/80 dark:hover:bg-slate-800/40 transition-all duration-300 cursor-pointer"
|
<tr class="group hover:bg-slate-50/80 dark:hover:bg-slate-800/40 transition-all duration-300 cursor-pointer"
|
||||||
@click="selectMachine({{ Js::from($machine) }})">
|
@click="selectMachine({{ Js::from($machine->only(['id', 'name', 'serial_no', 'image_urls'])) }})">
|
||||||
<td class="px-6 py-6">
|
<td class="px-6 py-6">
|
||||||
<div class="flex items-center gap-4">
|
<div class="flex items-center gap-4">
|
||||||
<div class="w-12 h-12 rounded-2xl bg-slate-100 dark:bg-slate-800 flex items-center justify-center text-slate-400 border border-slate-200 dark:border-slate-700 group-hover:bg-cyan-500 group-hover:text-white transition-all duration-300 overflow-hidden shadow-sm">
|
<div class="w-12 h-12 rounded-2xl bg-slate-100 dark:bg-slate-800 flex items-center justify-center text-slate-400 border border-slate-200 dark:border-slate-700 group-hover:bg-cyan-500 group-hover:text-white transition-all duration-300 overflow-hidden shadow-sm">
|
||||||
@ -93,7 +93,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td class="px-6 py-6 text-right">
|
<td class="px-6 py-6 text-right">
|
||||||
<div class="flex justify-end">
|
<div class="flex justify-end">
|
||||||
<button @click.stop="selectMachine({{ Js::from($machine) }})"
|
<button @click.stop="selectMachine({{ Js::from($machine->only(['id', 'name', 'serial_no', 'image_urls'])) }})"
|
||||||
class="p-2.5 rounded-lg bg-slate-50 dark:bg-slate-800 text-slate-400 hover:text-cyan-500 hover:bg-cyan-500/5 transition-all border border-transparent hover:border-cyan-500/20"
|
class="p-2.5 rounded-lg bg-slate-50 dark:bg-slate-800 text-slate-400 hover:text-cyan-500 hover:bg-cyan-500/5 transition-all border border-transparent hover:border-cyan-500/20"
|
||||||
title="{{ __('Manage') }}">
|
title="{{ __('Manage') }}">
|
||||||
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" stroke-width="2.5">
|
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" stroke-width="2.5">
|
||||||
@ -125,7 +125,7 @@
|
|||||||
<div class="xl:hidden grid grid-cols-1 md:grid-cols-2 gap-6">
|
<div class="xl:hidden grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||||
@forelse($machines as $machine)
|
@forelse($machines as $machine)
|
||||||
<div class="luxury-card p-6 rounded-[2rem] border border-slate-100 dark:border-slate-800 bg-white/50 dark:bg-slate-900/50 transition-all duration-300 group"
|
<div class="luxury-card p-6 rounded-[2rem] border border-slate-100 dark:border-slate-800 bg-white/50 dark:bg-slate-900/50 transition-all duration-300 group"
|
||||||
@click="selectMachine({{ Js::from($machine) }})">
|
@click="selectMachine({{ Js::from($machine->only(['id', 'name', 'serial_no', 'image_urls'])) }})">
|
||||||
<div class="flex items-start justify-between gap-4 mb-6">
|
<div class="flex items-start justify-between gap-4 mb-6">
|
||||||
<div class="flex items-center gap-4 min-w-0">
|
<div class="flex items-center gap-4 min-w-0">
|
||||||
<div class="w-14 h-14 rounded-2xl bg-slate-100 dark:bg-slate-800 flex items-center justify-center text-slate-400 border border-slate-200 dark:border-slate-700 group-hover:bg-cyan-500 group-hover:text-white transition-all duration-300 overflow-hidden shadow-sm shrink-0">
|
<div class="w-14 h-14 rounded-2xl bg-slate-100 dark:bg-slate-800 flex items-center justify-center text-slate-400 border border-slate-200 dark:border-slate-700 group-hover:bg-cyan-500 group-hover:text-white transition-all duration-300 overflow-hidden shadow-sm shrink-0">
|
||||||
@ -201,7 +201,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex items-center gap-3">
|
<div class="flex items-center gap-3">
|
||||||
<button type="button" @click.stop="selectMachine({{ Js::from($machine) }})"
|
<button type="button" @click.stop="selectMachine({{ Js::from($machine->only(['id', 'name', 'serial_no', 'image_urls'])) }})"
|
||||||
class="flex-1 flex items-center justify-center gap-2 py-3 rounded-xl bg-cyan-500/10 text-cyan-600 dark:text-cyan-400 font-black text-[10px] sm:text-xs tracking-widest hover:bg-cyan-500/20 transition-all duration-300 border border-cyan-500/20 shadow-sm">
|
class="flex-1 flex items-center justify-center gap-2 py-3 rounded-xl bg-cyan-500/10 text-cyan-600 dark:text-cyan-400 font-black text-[10px] sm:text-xs tracking-widest hover:bg-cyan-500/20 transition-all duration-300 border border-cyan-500/20 shadow-sm">
|
||||||
<svg class="w-4 h-4 stroke-[2.5]" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897l8.932-8.931Zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0 1 15.75 21H5.25A2.25 2.25 0 0 1 3 18.75V8.25A2.25 2.25 0 0 1 5.25 6H10" /></svg>
|
<svg class="w-4 h-4 stroke-[2.5]" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897l8.932-8.931Zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0 1 15.75 21H5.25A2.25 2.25 0 0 1 3 18.75V8.25A2.25 2.25 0 0 1 5.25 6H10" /></svg>
|
||||||
{{ __('Manage') }}
|
{{ __('Manage') }}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user