step 51 : master data add mobile

This commit is contained in:
sindhu
2025-04-04 09:34:49 +07:00
parent a552d0d4f6
commit e6b2c874d6
6 changed files with 422 additions and 6 deletions

View File

@@ -296,8 +296,10 @@
<li class="py-2 px-3 text-gray-500 text-center">Data
tidak ada</li>
</template>
<template x-for="item in form.dataAlatForm" :key="item.idAlat">
<li :id="item.idAlat" @click="onChangeInstrument(item, form.idForm, 'add')"
<template x-for="item in form.dataAlatForm"
:key="item.idAlat">
<li :id="item.idAlat"
@click="onChangeInstrument(item, form.idForm, 'add')"
class="py-2 px-3 hover:bg-blue-100 cursor-pointer text-gray-700">
<button x-text="item.namaAlat"></button>
</li>
@@ -315,7 +317,8 @@
<div
class="flex items-center bg-blue-100 text-blue-700 text-sm px-2 py-1 rounded-md">
<span x-text="item.namaAssay"></span>
<button @click="removeItemAssayToForm(form.idForm, idx, 'add')"
<button
@click="removeItemAssayToForm(form.idForm, idx, 'add')"
class="ml-2 focus:outline-none">
<svg class="w-4 h-4 text-blue-500 hover:text-blue-700"
fill="none" stroke="currentColor"
@@ -505,8 +508,10 @@
<li class="py-2 px-3 text-gray-500 text-center">Data
tidak ada</li>
</template>
<template x-for="item in form.dataAlatForm" :key="item.idAlat">
<li :id="item.idAlat" @click="onChangeInstrument(item, form.idForm, 'edit')"
<template x-for="item in form.dataAlatForm"
:key="item.idAlat">
<li :id="item.idAlat"
@click="onChangeInstrument(item, form.idForm, 'edit')"
class="py-2 px-3 hover:bg-blue-100 cursor-pointer text-gray-700">
<button x-text="item.namaAlat"></button>
</li>
@@ -524,7 +529,8 @@
<div
class="flex items-center bg-blue-100 text-blue-700 text-sm px-2 py-1 rounded-md">
<span x-text="item.namaAssay"></span>
<button @click="removeItemAssayToForm(form.idForm, idx, 'edit')"
<button
@click="removeItemAssayToForm(form.idForm, idx, 'edit')"
class="ml-2 focus:outline-none">
<svg class="w-4 h-4 text-blue-500 hover:text-blue-700"
fill="none" stroke="currentColor"
@@ -611,6 +617,47 @@
</div>
</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">Master Data</h2>
<a href="master_data_mobile_add.html">
<span class="material-symbols-outlined text-[#2196F3]">add</span>
</a>
</div>
<!-- Bagian MOBILE (LIST MASTER DATA) START -->
<div class="w-full lg:hidden rounded-lg flex flex-col flex-1 overflow-auto">
<!-- table become list in mobile -->
<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 dataMaster" :key="item.idMaster">
<div class="bg-white mr-0 mb-5 rounded-md lg:mr-5 p-2 w-full lg:w-1/2 lg:mb-0 relative">
<div class="flex justify-between">
<h2 class="text-black/87 font-medium text-xl mb-4" x-text="item.kode"></h2>
<div class="relative flex h-4 w-4">
<button @click="editMobilePage(item)"><span
class="material-symbols-outlined text-[#2196F3]">edit</span></button>
</div>
</div>
<div class="flex justify-between">
<p class="text-[#00000099] font-normal text-sm mb-2">Nama Pemeriksaan</p>
<p class="text-black/87 font-normal text-sm mb-2" x-text="item.namaPemeriksaan"></p>
</div>
<div class="flex justify-between">
<p class="text-[#00000099] font-normal text-sm mb-2">Harga</p>
<p class="text-black/87 font-normal text-sm mb-2" x-text="item.harga"></p>
</div>
<div class="flex justify-between">
<p class="text-[#00000099] font-normal text-sm mb-2">Assay Format</p>
<p class="text-black/87 font-normal text-sm mb-2" x-text="item.pemeriksaanStr"></p>
</div>
</div>
</template>
</div>
</div>
</div>
<!-- Bagian MOBILE (LIST MASTER DATA) END -->
</div>
<script src="js/master_data.js"></script>