step 30 : mobile search selected instrument & assay No
This commit is contained in:
@@ -441,9 +441,99 @@
|
||||
</div>
|
||||
<!-- modal edit desktop -->
|
||||
|
||||
<!-- Kiri Mobile -->
|
||||
<div class="bg-[#F2F9FF] h-5 flex justify-between space-x-2 lg:hidden">
|
||||
<h2 class="text-black/87 font-medium text-xl mb-4">Assay Format</h2>
|
||||
<a href="settings_mobile_add.html">
|
||||
<span class="material-symbols-outlined text-[#2196F3]">add</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- dialog instrument mobile start -->
|
||||
<div>
|
||||
<!-- Overlay -->
|
||||
<div x-show="openInstrumentMobile" class="fixed inset-0 bg-black/50 transition-opacity z-50"
|
||||
@click="openInstrumentMobile = false">
|
||||
</div>
|
||||
|
||||
<!-- Modal -->
|
||||
<div x-show="openInstrumentMobile" x-transition
|
||||
class="fixed bottom-0 left-0 w-full bg-white p-6 rounded-t-[32px] shadow-lg transform transition-transform duration-300 ease-in-out z-50"
|
||||
x-bind:class="openInstrumentMobile ? 'translate-y-0' : 'translate-y-full'">
|
||||
<div class="flex justify-between space-x-2">
|
||||
<p class="text-[16px] font-medium text-[#212B36]">Instrument</p>
|
||||
<button @click="openInstrumentMobile = false">
|
||||
<svg xmlns="http://www.w3.org/2000/svg"
|
||||
class="w-6 h-6 text-[#637381] hover:text-gray-700 transition-colors" viewBox="0 0 24 24"
|
||||
fill="none">
|
||||
<path
|
||||
d="M13.4099 12.0002L17.7099 7.71019C17.8982 7.52188 18.004 7.26649 18.004 7.00019C18.004 6.73388 17.8982 6.47849 17.7099 6.29019C17.5216 6.10188 17.2662 5.99609 16.9999 5.99609C16.7336 5.99609 16.4782 6.10188 16.2899 6.29019L11.9999 10.5902L7.70994 6.29019C7.52164 6.10188 7.26624 5.99609 6.99994 5.99609C6.73364 5.99609 6.47824 6.10188 6.28994 6.29019C6.10164 6.47849 5.99585 6.73388 5.99585 7.00019C5.99585 7.26649 6.10164 7.52188 6.28994 7.71019L10.5899 12.0002L6.28994 16.2902C6.19621 16.3831 6.12182 16.4937 6.07105 16.6156C6.02028 16.7375 5.99414 16.8682 5.99414 17.0002C5.99414 17.1322 6.02028 17.2629 6.07105 17.3848C6.12182 17.5066 6.19621 17.6172 6.28994 17.7102C6.3829 17.8039 6.4935 17.8783 6.61536 17.9291C6.73722 17.9798 6.86793 18.006 6.99994 18.006C7.13195 18.006 7.26266 17.9798 7.38452 17.9291C7.50638 17.8783 7.61698 17.8039 7.70994 17.7102L11.9999 13.4102L16.2899 17.7102C16.3829 17.8039 16.4935 17.8783 16.6154 17.9291C16.7372 17.9798 16.8679 18.006 16.9999 18.006C17.132 18.006 17.2627 17.9798 17.3845 17.9291C17.5064 17.8783 17.617 17.8039 17.7099 17.7102C17.8037 17.6172 17.8781 17.5066 17.9288 17.3848C17.9796 17.2629 18.0057 17.1322 18.0057 17.0002C18.0057 16.8682 17.9796 16.7375 17.9288 16.6156C17.8781 16.4937 17.8037 16.3831 17.7099 16.2902L13.4099 12.0002Z"
|
||||
fill="currentColor" />
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
<!-- spacer 24px -->
|
||||
<div class="mb-6"></div>
|
||||
<!-- list radio button -->
|
||||
<div class="max-h-[200px] overflow-y-auto">
|
||||
<template x-if="dataInstrument.length === 0">
|
||||
<p class="py-2 px-3 text-gray-500 text-center">Data tidak ada</p>
|
||||
</template>
|
||||
<template x-for="item in dataInstrument" :key="item.idInstrument">
|
||||
<div :id="item.idInstrument" class="mb-6">
|
||||
<label class="flex items-center space-x-3 cursor-pointer">
|
||||
<input type="radio" :value="item.idInstrument" class="peer hidden"
|
||||
x-model="selectedInstrument.idInstrument" @change="onChangeInstrumentMobile(item)">
|
||||
<div
|
||||
class="w-5 h-5 border-2 border-gray-400 rounded-full flex items-center justify-center peer-checked:border-[#2196F3] peer-checked:bg-[#2196F3]">
|
||||
<div class="w-2 h-2 bg-white rounded-full opacity-100 transition"></div>
|
||||
</div>
|
||||
<span class="text-gray-900" x-text="item.namaInstrument"></span>
|
||||
</label>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- dialog instrument mobile end -->
|
||||
|
||||
<!-- Bagian Kanan (PORT STATUS) -->
|
||||
<div class="w-full lg:w-1/2 rounded-lg flex flex-col flex-1 overflow-auto">
|
||||
<!-- table become list in mobile -->
|
||||
<!-- inputan selected -->
|
||||
<div class="bg-white w-full flex flex-row lg:hidden lg:mb-0">
|
||||
<!-- instrument selected -->
|
||||
<div class="bg-white w-full px-3 py-2" @click="openInstrumentMobile = true">
|
||||
<div class="flex justify-between items-center">
|
||||
<p class="text-black/60" aria-readonly="true" x-text="(selectedInstrument.idInstrument != -1)
|
||||
? selectedInstrument.namaInstrument
|
||||
: 'Instrument'"></p>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 transition-transform text-[#0000008A]"
|
||||
:class="{ 'rotate-180': openInstrument }" fill="none" viewBox="0 0 24 24"
|
||||
stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7" />
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- spacer 8px -->
|
||||
<div class="mb-2"></div>
|
||||
<!-- Assay No Inputan -->
|
||||
<div class="bg-white w-full px-3 py-2 lg:hidden lg:mb-0">
|
||||
<label for="Assay No"
|
||||
class="relative block rounded-md border border-gray-400 focus-within:border-blue-600 focus-within:ring-1 focus-within:ring-blue-600">
|
||||
<input type="text" id="Assay No"
|
||||
class="peer pl-2 border-none py-3 bg-transparent placeholder-transparent focus:border-transparent focus:ring-0 focus:outline-hidden"
|
||||
placeholder="Assay No" />
|
||||
|
||||
<span
|
||||
class="pointer-events-none absolute start-2.5 top-0 -translate-y-1/2 bg-white p-0.5 text-xs text-gray-700 transition-all peer-placeholder-shown:top-1/2 peer-placeholder-shown:text-sm peer-focus:top-0 peer-focus:text-xs">
|
||||
Assay No
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-row mb-6 lg:hidden lg:mb-0">
|
||||
<div class="flex flex-col w-full lg:flex-row mb-5">
|
||||
<template x-for="item in dataSetting" :key="item.idSetting">
|
||||
|
||||
@@ -43,6 +43,7 @@ document.addEventListener('alpine:init', () => {
|
||||
namaInstrument: 'Instrument'
|
||||
},
|
||||
openInstrument: false,
|
||||
openInstrumentMobile: false,
|
||||
dataInstrument: [
|
||||
{
|
||||
idInstrument: 1,
|
||||
@@ -77,6 +78,11 @@ document.addEventListener('alpine:init', () => {
|
||||
this.openInstrument = false;
|
||||
this.selectedInstrument = item;
|
||||
},
|
||||
onChangeInstrumentMobile(item){
|
||||
this.openInstrumentMobile = false;
|
||||
// this.selectedInstrument = item;
|
||||
this.selectedInstrument = { ...item };
|
||||
},
|
||||
onProcessVerifiaksi(){
|
||||
this.loadingVerifikasi = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user