step 32 : perbaikan validasi form & verifikasi mobile add, desktop add

This commit is contained in:
sindhu
2025-03-19 07:57:24 +07:00
parent 5ec7f61b05
commit 13a7a86395
4 changed files with 391 additions and 26 deletions

View File

@@ -159,18 +159,18 @@
</div>
</div>
<div class="w-1/2">
<!-- Assay No -->
<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" />
<!-- Assay No -->
<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>
<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>
@@ -231,12 +231,12 @@
<fieldset @click.outside="openInstrument = false"
class="relative border border-gray-400 rounded-md focus-within:border-blue-500 focus-within:ring-1 focus-within:ring-blue-500 px-3 pt-2 pb-2">
<span
x-text="selectedInstrument.idInstrument != -1 ? 'Instrument' : selectedInstrument.namaInstrument"
x-text="selectedInstrumentAdd.idInstrument != -1 ? 'Instrument' : selectedInstrumentAdd.namaInstrument"
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">
</span>
<button @click="openInstrument = !openInstrument" type="button"
class="w-full flex items-center justify-between bg-transparent text-gray-900 py-0.5 focus:outline-none">
<span x-text="selectedInstrument.namaInstrument" class="text-left"></span>
<span x-text="selectedInstrumentAdd.namaInstrument" class="text-left"></span>
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 transition-transform"
:class="{ 'rotate-180': openInstrument }" fill="none" viewBox="0 0 24 24"
stroke="currentColor">
@@ -265,7 +265,7 @@
<!-- Assay Code -->
<label for="Assay Code"
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 Code"
<input type="text" id="Assay Code" autocomplete="off" x-model="assayCode" @change="onChangeAssayCodeAdd()"
class="peer pl-2 border-none py-3 bg-transparent placeholder-transparent focus:border-transparent focus:ring-0 focus:outline-hidden"
placeholder="Assay Code" />
@@ -281,7 +281,7 @@
<!-- Decimal Font -->
<label for="Decimal"
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="Decimal"
<input type="text" id="Decimal" x-model="decimalFont" autocomplete="off" @change="onChangeDecimalFontAdd()"
class="peer pl-2 border-none py-3 bg-transparent placeholder-transparent focus:border-transparent focus:ring-0 focus:outline-hidden"
placeholder="Decimal" />
@@ -298,7 +298,7 @@
<label for="Formula"
class="relative block rounded-md border border-gray-400 focus-within:border-blue-600 focus-within:ring-1 focus-within:ring-blue-600">
<textarea id="Formula" x-model="formulaAdd"
<textarea id="Formula" x-model="formulaAdd" autocomplete="off" @change="onChangeFormulaAdd()"
class="resize-none peer w-full pl-2 border-none py-3 bg-transparent placeholder-transparent focus:border-transparent focus:ring-0 focus:outline-none"
placeholder="Formula"></textarea>
@@ -312,8 +312,10 @@
<!-- btn verifikasi -->
<div class="flex justify-end items-end">
<button @click="onProcessVerifiaksi()" class="flex items-center justify-center gap-2 text-white bg-[#4CAF50] font-bold text-sm uppercase px-4 py-2 rounded-md transition duration-200
hover:bg-[#388E3C] focus:outline-none focus:ring-2 focus:ring-green-400">
<button @click="onProcessVerifikasi()" :class="isVerifikasiDone == false
? 'flex items-center justify-center gap-2 text-white bg-[#4CAF50] font-bold text-sm uppercase px-4 py-2 rounded-md transition duration-200 hover:bg-[#388E3C] focus:outline-none focus:ring-2 focus:ring-green-400'
: 'flex items-center justify-center gap-2 bg-[#0000001F] text-[#00000042] cursor-not-allowed font-bold text-sm uppercase px-4 py-2 rounded-md transition duration-200'
">
<!-- Loading Spinner -->
<div x-show="loadingVerifikasi"
@@ -345,8 +347,9 @@
hover:bg-[#FF5252] px-4 py-2 rounded-md">
Cancel
</button>
<button class="text-[#1976D2] font-bold text-sm uppercase px-4 py-2 rounded-md transition duration-200
hover:bg-[#1976D2] hover:text-white">
<button @click="save()" :class="objForm.isValidForm
? 'text-white bg-[#1976D2] font-bold text-sm uppercase px-4 py-2 rounded-md transition duration-200 hover:bg-[#135BA1]'
: 'bg-gray-300 text-gray-500 cursor-not-allowed px-4 py-2 rounded-md'" :disabled="!objForm.isValidForm">
Save
</button>
</div>
@@ -406,7 +409,7 @@
<!-- Assay Code -->
<label for="Assay Code"
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 Code" x-model="assayCode"
<input type="text" id="Assay Code" x-model="assayCode" autocomplete="off"
class="peer pl-2 border-none py-3 bg-transparent placeholder-transparent focus:border-transparent focus:ring-0 focus:outline-hidden"
placeholder="Assay Code" />
@@ -424,7 +427,7 @@
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="Decimal" x-model="decimalFont"
class="peer pl-2 border-none py-3 bg-transparent placeholder-transparent focus:border-transparent focus:ring-0 focus:outline-hidden"
placeholder="Decimal" />
placeholder="Decimal" autocomplete="off" />
<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">
@@ -438,7 +441,7 @@
<label for="Formula"
class="relative block rounded-md border border-gray-400 focus-within:border-blue-600 focus-within:ring-1 focus-within:ring-blue-600">
<textarea id="Formula" x-model="formulaEdit"
<textarea id="Formula" x-model="formulaEdit" autocomplete="off"
class="resize-none peer w-full pl-2 border-none py-3 bg-transparent placeholder-transparent focus:border-transparent focus:ring-0 focus:outline-none"
placeholder="Formula"></textarea>
@@ -499,7 +502,7 @@
<!-- 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">
<a href="assay_format_mobile_add.html">
<span class="material-symbols-outlined text-[#2196F3]">add</span>
</a>
</div>