[FEAT] Machine Utilization UI refinement & localization
This commit is contained in:
@@ -159,7 +159,7 @@ window.utilizationDashboard = function(initialMachines, initialStats) {
|
||||
custom: function({ series, seriesIndex, dataPointIndex, w }) {
|
||||
return '<div class="px-3 py-2 bg-slate-900 text-white rounded-lg border border-slate-700 shadow-xl">' +
|
||||
'<span class="text-[10px] font-black uppercase tracking-widest block opacity-50 mb-1">' + w.globals.categoryLabels[dataPointIndex] + '</span>' +
|
||||
'<span class="text-sm font-black">' + series[seriesIndex][dataPointIndex] + '% OEE</span>' +
|
||||
'<span class="text-sm font-black">' + series[seriesIndex][dataPointIndex] + '% {{ __("OEE") }}</span>' +
|
||||
'</div>';
|
||||
}
|
||||
}
|
||||
@@ -270,11 +270,17 @@ window.utilizationDashboard = function(initialMachines, initialStats) {
|
||||
|
||||
<!-- Search -->
|
||||
<div class="relative group">
|
||||
<span class="absolute inset-y-0 left-0 pl-4 flex items-center pointer-events-none">
|
||||
<svg class="size-4 text-slate-400 group-focus-within:text-cyan-500 transition-colors" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/></svg>
|
||||
<span class="absolute inset-y-0 left-0 flex items-center pl-4 pointer-events-none z-10">
|
||||
<svg class="h-4 w-4 text-slate-400 group-focus-within:text-cyan-500 transition-colors"
|
||||
viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
|
||||
stroke-linejoin="round">
|
||||
<circle cx="11" cy="11" r="8"></circle>
|
||||
<line x1="21" y1="21" x2="16.65" y2="16.65"></line>
|
||||
</svg>
|
||||
</span>
|
||||
<input type="text" x-model="searchQuery" placeholder="{{ __('Search serial or name...') }}"
|
||||
class="luxury-input pl-11 py-3 w-full text-sm">
|
||||
<input type="text" x-model="searchQuery"
|
||||
placeholder="{{ __('Search serial or name...') }}"
|
||||
class="luxury-input py-2.5 pl-12 pr-6 block w-full text-sm">
|
||||
</div>
|
||||
|
||||
<!-- List Container -->
|
||||
@@ -317,7 +323,7 @@ window.utilizationDashboard = function(initialMachines, initialStats) {
|
||||
<div class="absolute top-0 right-0 p-8">
|
||||
<div class="flex items-center gap-2 px-4 py-2 rounded-full bg-slate-900/5 dark:bg-white/5 backdrop-blur-md">
|
||||
<div :class="selectedMachine.status === 'online' ? 'bg-emerald-500' : 'bg-slate-400'" class="size-2 rounded-full"></div>
|
||||
<span class="text-[10px] font-black uppercase tracking-widest" x-text="selectedMachine.status"></span>
|
||||
<span class="text-[10px] font-black uppercase tracking-widest" x-text="selectedMachine.status === 'online' ? '{{ __("Online") }}' : '{{ __("Offline") }}'"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -327,7 +333,7 @@ window.utilizationDashboard = function(initialMachines, initialStats) {
|
||||
</div>
|
||||
<div>
|
||||
<h2 class="text-3xl font-black text-slate-800 dark:text-white tracking-tight" x-text="selectedMachine.name"></h2>
|
||||
<p class="text-sm font-bold text-slate-500 uppercase tracking-[0.2em] mt-1" x-text="'Serial NO: ' + selectedMachine.serial_no"></p>
|
||||
<p class="text-sm font-bold text-slate-500 uppercase tracking-[0.2em] mt-1" x-text="'{{ __("Serial NO") }}: ' + selectedMachine.serial_no"></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -339,7 +345,7 @@ window.utilizationDashboard = function(initialMachines, initialStats) {
|
||||
</div>
|
||||
<div>
|
||||
<p class="text-[10px] font-bold text-slate-400 uppercase tracking-widest mb-1">{{ __('Utilized Time') }}</p>
|
||||
<p class="text-xl font-black text-slate-800 dark:text-slate-200" x-text="(selectedMachine.utilized_minutes || 0) + ' min'"></p>
|
||||
<p class="text-xl font-black text-slate-800 dark:text-slate-200" x-text="(selectedMachine.utilized_minutes || 0) + ' {{ __("min") }}'"></p>
|
||||
</div>
|
||||
<div>
|
||||
<p class="text-[10px] font-bold text-slate-400 uppercase tracking-widest mb-1">{{ __('Output Count') }}</p>
|
||||
@@ -347,7 +353,7 @@ window.utilizationDashboard = function(initialMachines, initialStats) {
|
||||
</div>
|
||||
<div>
|
||||
<p class="text-[10px] font-bold text-slate-400 uppercase tracking-widest mb-1">{{ __('Avg Cycle') }}</p>
|
||||
<p class="text-xl font-black text-slate-800 dark:text-slate-200" x-text="(selectedMachine.avg_cycle || 0) + 's'"></p>
|
||||
<p class="text-xl font-black text-slate-800 dark:text-slate-200" x-text="(selectedMachine.avg_cycle || 0) + '{{ __("s") }}'"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user