step 19 : form rs232 desktop
This commit is contained in:
@@ -11,6 +11,16 @@ document.addEventListener('alpine:init', () => {
|
|||||||
namaInstrument: '',
|
namaInstrument: '',
|
||||||
// idJenis 2 ketambahan server
|
// idJenis 2 ketambahan server
|
||||||
server: '',
|
server: '',
|
||||||
|
// idJenis 3
|
||||||
|
idSerial: -1,
|
||||||
|
namaSerial: '',
|
||||||
|
speed: '',
|
||||||
|
idParity: -1,
|
||||||
|
namaParity: '',
|
||||||
|
idDataBit: -1,
|
||||||
|
namaDataBit: '',
|
||||||
|
idStopBit: -1,
|
||||||
|
namaStopBit: ''
|
||||||
},
|
},
|
||||||
dataSetting: [
|
dataSetting: [
|
||||||
{
|
{
|
||||||
@@ -104,12 +114,76 @@ document.addEventListener('alpine:init', () => {
|
|||||||
namaInstrument: 'Cobas C311',
|
namaInstrument: 'Cobas C311',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
selectedSerial: {
|
||||||
|
idSerial: -1,
|
||||||
|
namaSerial: 'Serial'
|
||||||
|
},
|
||||||
|
openSerial: false,
|
||||||
|
dataSerial: [
|
||||||
|
{
|
||||||
|
idSerial: 1,
|
||||||
|
namaSerial: 'ttyS0'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
idSerial: 2,
|
||||||
|
namaSerial: 'psx3'
|
||||||
|
},
|
||||||
|
],
|
||||||
|
selectedParity: {
|
||||||
|
idParity: -1,
|
||||||
|
namaParity: 'Parity'
|
||||||
|
},
|
||||||
|
openParity: false,
|
||||||
|
dataParity: [
|
||||||
|
{
|
||||||
|
idParity: 1,
|
||||||
|
namaParity: 'None'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
idParity: 2,
|
||||||
|
namaParity: 'All'
|
||||||
|
},
|
||||||
|
],
|
||||||
|
selectedDataBit: {
|
||||||
|
idDataBit: -1,
|
||||||
|
namaDataBit: 'DataBit'
|
||||||
|
},
|
||||||
|
openDataBit: false,
|
||||||
|
dataDataBit: [
|
||||||
|
{
|
||||||
|
idDataBit: 1,
|
||||||
|
namaDataBit: '1'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
idDataBit: 2,
|
||||||
|
namaDataBit: '6'
|
||||||
|
},
|
||||||
|
],
|
||||||
|
selectedStopBit: {
|
||||||
|
idStopBit: -1,
|
||||||
|
namaStopBit: 'StopBit'
|
||||||
|
},
|
||||||
|
openStopBit: false,
|
||||||
|
dataStopBit: [
|
||||||
|
{
|
||||||
|
idStopBit: 1,
|
||||||
|
namaStopBit: '0'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
idStopBit: 2,
|
||||||
|
namaStopBit: '1'
|
||||||
|
},
|
||||||
|
],
|
||||||
|
|
||||||
// 1. Inisialisasi End
|
// 1. Inisialisasi End
|
||||||
// 2. Fungsi Start
|
// 2. Fungsi Start
|
||||||
closeDialog() {
|
closeDialog() {
|
||||||
this.openJenis = false;
|
|
||||||
this.openInterface = false;
|
this.openInterface = false;
|
||||||
this.openInstrument = false;
|
this.openInstrument = false;
|
||||||
|
this.openSerial = false;
|
||||||
|
this.openParity = false;
|
||||||
|
this.openDataBit = false;
|
||||||
|
this.openStopBit = false;
|
||||||
this.selectedJenis = {
|
this.selectedJenis = {
|
||||||
idJenis: -1,
|
idJenis: -1,
|
||||||
namaJenis: 'Jenis'
|
namaJenis: 'Jenis'
|
||||||
@@ -122,11 +196,28 @@ document.addEventListener('alpine:init', () => {
|
|||||||
idInstrument: -1,
|
idInstrument: -1,
|
||||||
namaInstrument: 'Instrument'
|
namaInstrument: 'Instrument'
|
||||||
}
|
}
|
||||||
|
this.selectedSerial = {
|
||||||
|
idSerial: -1,
|
||||||
|
namaSerial: 'Serial'
|
||||||
|
},
|
||||||
|
this.selectedParity = {
|
||||||
|
idParity: -1,
|
||||||
|
namaParity: 'Parity'
|
||||||
|
},
|
||||||
|
this.selectedDataBit = {
|
||||||
|
idDataBit: -1,
|
||||||
|
namaDataBit: 'DataBit'
|
||||||
|
},
|
||||||
|
this.selectedStopBit = {
|
||||||
|
idStopBit: -1,
|
||||||
|
namaStopBit: 'StopBit'
|
||||||
|
},
|
||||||
this.showDialogAdd = false
|
this.showDialogAdd = false
|
||||||
},
|
},
|
||||||
onChangeJenis(item) {
|
onChangeJenis(item) {
|
||||||
this.openJenis = false;
|
this.openJenis = false;
|
||||||
this.selectedJenis = item;
|
this.selectedJenis = item;
|
||||||
|
|
||||||
// clear form
|
// clear form
|
||||||
this.objAddForm = {
|
this.objAddForm = {
|
||||||
port: '',
|
port: '',
|
||||||
@@ -135,6 +226,15 @@ document.addEventListener('alpine:init', () => {
|
|||||||
idInstrument: -1,
|
idInstrument: -1,
|
||||||
namaInstrument: '',
|
namaInstrument: '',
|
||||||
server: '',
|
server: '',
|
||||||
|
idSerial: -1,
|
||||||
|
namaSerial: '',
|
||||||
|
speed: '',
|
||||||
|
idParity: -1,
|
||||||
|
namaParity: '',
|
||||||
|
idDataBit: -1,
|
||||||
|
namaDataBit: '',
|
||||||
|
idStopBit: -1,
|
||||||
|
namaStopBit: ''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onChangeInterface(item) {
|
onChangeInterface(item) {
|
||||||
@@ -145,6 +245,22 @@ document.addEventListener('alpine:init', () => {
|
|||||||
this.openInstrument = false;
|
this.openInstrument = false;
|
||||||
this.selectedInstrument = item;
|
this.selectedInstrument = item;
|
||||||
},
|
},
|
||||||
|
onChangeSerial(item) {
|
||||||
|
this.openSerial = false;
|
||||||
|
this.selectedSerial = item;
|
||||||
|
},
|
||||||
|
onChangeParity(item) {
|
||||||
|
this.openParity = false;
|
||||||
|
this.selectedParity = item;
|
||||||
|
},
|
||||||
|
onChangeDataBit(item) {
|
||||||
|
this.openDataBit = false;
|
||||||
|
this.selectedDataBit = item;
|
||||||
|
},
|
||||||
|
onChangeStopBit(item) {
|
||||||
|
this.openStopBit = false;
|
||||||
|
this.selectedStopBit = item;
|
||||||
|
},
|
||||||
// 2. Fungsi End
|
// 2. Fungsi End
|
||||||
}))
|
}))
|
||||||
})
|
})
|
||||||
249
v1/settings.html
249
v1/settings.html
@@ -232,12 +232,11 @@
|
|||||||
<button @click="openInterface = !openInterface" type="button"
|
<button @click="openInterface = !openInterface" type="button"
|
||||||
class="w-full flex items-center justify-between bg-transparent text-gray-900 py-0.5 focus:outline-none">
|
class="w-full flex items-center justify-between bg-transparent text-gray-900 py-0.5 focus:outline-none">
|
||||||
<span x-text="selectedInterface.namaInterface" class="text-left"></span>
|
<span x-text="selectedInterface.namaInterface" class="text-left"></span>
|
||||||
<svg xmlns="http://www.w3.org/2000/svg"
|
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 transition-transform"
|
||||||
class="h-5 w-5 transition-transform"
|
:class="{ 'rotate-180': openInterface }" fill="none" viewBox="0 0 24 24"
|
||||||
:class="{ 'rotate-180': openInterface }" fill="none"
|
stroke="currentColor">
|
||||||
viewBox="0 0 24 24" stroke="currentColor">
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||||
<path stroke-linecap="round" stroke-linejoin="round"
|
d="M19 9l-7 7-7-7" />
|
||||||
stroke-width="2" d="M19 9l-7 7-7-7" />
|
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
@@ -262,14 +261,12 @@
|
|||||||
</span>
|
</span>
|
||||||
<button @click="openInstrument = !openInstrument" type="button"
|
<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">
|
class="w-full flex items-center justify-between bg-transparent text-gray-900 py-0.5 focus:outline-none">
|
||||||
<span x-text="selectedInstrument.namaInstrument"
|
<span x-text="selectedInstrument.namaInstrument" class="text-left"></span>
|
||||||
class="text-left"></span>
|
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 transition-transform"
|
||||||
<svg xmlns="http://www.w3.org/2000/svg"
|
|
||||||
class="h-5 w-5 transition-transform"
|
|
||||||
:class="{ 'rotate-180': openInstrument }" fill="none"
|
:class="{ 'rotate-180': openInstrument }" fill="none"
|
||||||
viewBox="0 0 24 24" stroke="currentColor">
|
viewBox="0 0 24 24" stroke="currentColor">
|
||||||
<path stroke-linecap="round" stroke-linejoin="round"
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||||
stroke-width="2" d="M19 9l-7 7-7-7" />
|
d="M19 9l-7 7-7-7" />
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
@@ -328,12 +325,11 @@
|
|||||||
<button @click="openInterface = !openInterface" type="button"
|
<button @click="openInterface = !openInterface" type="button"
|
||||||
class="w-full flex items-center justify-between bg-transparent text-gray-900 py-0.5 focus:outline-none">
|
class="w-full flex items-center justify-between bg-transparent text-gray-900 py-0.5 focus:outline-none">
|
||||||
<span x-text="selectedInterface.namaInterface" class="text-left"></span>
|
<span x-text="selectedInterface.namaInterface" class="text-left"></span>
|
||||||
<svg xmlns="http://www.w3.org/2000/svg"
|
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 transition-transform"
|
||||||
class="h-5 w-5 transition-transform"
|
:class="{ 'rotate-180': openInterface }" fill="none" viewBox="0 0 24 24"
|
||||||
:class="{ 'rotate-180': openInterface }" fill="none"
|
stroke="currentColor">
|
||||||
viewBox="0 0 24 24" stroke="currentColor">
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||||
<path stroke-linecap="round" stroke-linejoin="round"
|
d="M19 9l-7 7-7-7" />
|
||||||
stroke-width="2" d="M19 9l-7 7-7-7" />
|
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
@@ -358,14 +354,12 @@
|
|||||||
</span>
|
</span>
|
||||||
<button @click="openInstrument = !openInstrument" type="button"
|
<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">
|
class="w-full flex items-center justify-between bg-transparent text-gray-900 py-0.5 focus:outline-none">
|
||||||
<span x-text="selectedInstrument.namaInstrument"
|
<span x-text="selectedInstrument.namaInstrument" class="text-left"></span>
|
||||||
class="text-left"></span>
|
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 transition-transform"
|
||||||
<svg xmlns="http://www.w3.org/2000/svg"
|
|
||||||
class="h-5 w-5 transition-transform"
|
|
||||||
:class="{ 'rotate-180': openInstrument }" fill="none"
|
:class="{ 'rotate-180': openInstrument }" fill="none"
|
||||||
viewBox="0 0 24 24" stroke="currentColor">
|
viewBox="0 0 24 24" stroke="currentColor">
|
||||||
<path stroke-linecap="round" stroke-linejoin="round"
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||||
stroke-width="2" d="M19 9l-7 7-7-7" />
|
d="M19 9l-7 7-7-7" />
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
@@ -385,20 +379,215 @@
|
|||||||
</template>
|
</template>
|
||||||
<!-- namaJenis TCP Client -->
|
<!-- namaJenis TCP Client -->
|
||||||
|
|
||||||
<!-- -->
|
<!-- namaJenis RS232 -->
|
||||||
|
<template x-if="selectedJenis.idJenis === 3">
|
||||||
|
<div>
|
||||||
|
<!-- serial -->
|
||||||
|
<fieldset @click.outside="openSerial = 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="selectedSerial.idSerial != -1 ? 'Serial' : selectedSerial.namaSerial"
|
||||||
|
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="openSerial = !openSerial" type="button"
|
||||||
|
class="w-full flex items-center justify-between bg-transparent text-gray-900 py-0.5 focus:outline-none">
|
||||||
|
<span x-text="selectedSerial.namaSerial" class="text-left"></span>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 transition-transform"
|
||||||
|
:class="{ 'rotate-180': openSerial }" 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>
|
||||||
|
</button>
|
||||||
|
</fieldset>
|
||||||
|
<div x-show="openSerial"
|
||||||
|
class="absolute bg-white w-full border border-gray-300 rounded-md shadow-lg z-10 max-h-[200px] overflow-y-auto">
|
||||||
|
<ul>
|
||||||
|
<template x-for="item in dataSerial" :key="item.idSerial">
|
||||||
|
<li :id="item.idSerial" @click="onChangeSerial(item)"
|
||||||
|
class="py-2 px-3 hover:bg-blue-100 cursor-pointer text-gray-700">
|
||||||
|
<button x-text="item.namaSerial"></button>
|
||||||
|
</li>
|
||||||
|
</template>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="mb-5"></div>
|
||||||
|
<!-- speed -->
|
||||||
|
<label for="Speed"
|
||||||
|
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="Speed"
|
||||||
|
class="peer pl-2 border-none py-3 bg-transparent placeholder-transparent focus:border-transparent focus:ring-0 focus:outline-hidden"
|
||||||
|
placeholder="Speed" />
|
||||||
|
|
||||||
|
<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">
|
||||||
|
Speed
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
<div class="mb-5"></div>
|
||||||
|
<!-- parity -->
|
||||||
|
<fieldset @click.outside="openParity = 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="selectedParity.idParity != -1 ? 'DataBit' : selectedParity.namaParity"
|
||||||
|
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="openParity = !openParity" type="button"
|
||||||
|
class="w-full flex items-center justify-between bg-transparent text-gray-900 py-0.5 focus:outline-none">
|
||||||
|
<span x-text="selectedParity.namaParity" class="text-left"></span>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 transition-transform"
|
||||||
|
:class="{ 'rotate-180': openParity }" 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>
|
||||||
|
</button>
|
||||||
|
</fieldset>
|
||||||
|
<div x-show="openParity"
|
||||||
|
class="absolute bg-white w-full border border-gray-300 rounded-md shadow-lg z-10 max-h-[200px] overflow-y-auto">
|
||||||
|
<ul>
|
||||||
|
<template x-for="item in dataParity" :key="item.idParity">
|
||||||
|
<li :id="item.idParity" @click="onChangeParity(item)"
|
||||||
|
class="py-2 px-3 hover:bg-blue-100 cursor-pointer text-gray-700">
|
||||||
|
<button x-text="item.namaParity"></button>
|
||||||
|
</li>
|
||||||
|
</template>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="mb-5"></div>
|
||||||
|
<!-- data bits -->
|
||||||
|
<fieldset @click.outside="openDataBit = 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="selectedDataBit.idDataBit != -1 ? 'DataBit' : selectedDataBit.namaDataBit"
|
||||||
|
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="openDataBit = !openDataBit" type="button"
|
||||||
|
class="w-full flex items-center justify-between bg-transparent text-gray-900 py-0.5 focus:outline-none">
|
||||||
|
<span x-text="selectedDataBit.namaDataBit" class="text-left"></span>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 transition-transform"
|
||||||
|
:class="{ 'rotate-180': openDataBit }" 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>
|
||||||
|
</button>
|
||||||
|
</fieldset>
|
||||||
|
<div x-show="openDataBit"
|
||||||
|
class="absolute bg-white w-full border border-gray-300 rounded-md shadow-lg z-10 max-h-[200px] overflow-y-auto">
|
||||||
|
<ul>
|
||||||
|
<template x-for="item in dataDataBit" :key="item.idDataBit">
|
||||||
|
<li :id="item.idDataBit" @click="onChangeDataBit(item)"
|
||||||
|
class="py-2 px-3 hover:bg-blue-100 cursor-pointer text-gray-700">
|
||||||
|
<button x-text="item.namaDataBit"></button>
|
||||||
|
</li>
|
||||||
|
</template>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="mb-5"></div>
|
||||||
|
<!-- stop bit -->
|
||||||
|
<fieldset @click.outside="openStopBit = 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="selectedStopBit.idStopBit != -1 ? 'StopBit' : selectedStopBit.namaStopBit"
|
||||||
|
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="openStopBit = !openStopBit" type="button"
|
||||||
|
class="w-full flex items-center justify-between bg-transparent text-gray-900 py-0.5 focus:outline-none">
|
||||||
|
<span x-text="selectedStopBit.namaStopBit" class="text-left"></span>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 transition-transform"
|
||||||
|
:class="{ 'rotate-180': openStopBit }" 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>
|
||||||
|
</button>
|
||||||
|
</fieldset>
|
||||||
|
<div x-show="openStopBit"
|
||||||
|
class="absolute bg-white w-full border border-gray-300 rounded-md shadow-lg z-10 max-h-[200px] overflow-y-auto">
|
||||||
|
<ul>
|
||||||
|
<template x-for="item in dataStopBit" :key="item.idStopBit">
|
||||||
|
<li :id="item.idStopBit" @click="onChangeStopBit(item)"
|
||||||
|
class="py-2 px-3 hover:bg-blue-100 cursor-pointer text-gray-700">
|
||||||
|
<button x-text="item.namaStopBit"></button>
|
||||||
|
</li>
|
||||||
|
</template>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="mb-5"></div>
|
||||||
|
<!-- interface -->
|
||||||
|
<fieldset @click.outside="openInterface = 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="selectedInterface.idInterface != -1 ? 'Interface' : selectedInterface.namaInterface"
|
||||||
|
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="openInterface = !openInterface" type="button"
|
||||||
|
class="w-full flex items-center justify-between bg-transparent text-gray-900 py-0.5 focus:outline-none">
|
||||||
|
<span x-text="selectedInterface.namaInterface" class="text-left"></span>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 transition-transform"
|
||||||
|
:class="{ 'rotate-180': openInterface }" 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>
|
||||||
|
</button>
|
||||||
|
</fieldset>
|
||||||
|
<div x-show="openInterface"
|
||||||
|
class="absolute bg-white w-full border border-gray-300 rounded-md shadow-lg z-10 max-h-[200px] overflow-y-auto">
|
||||||
|
<ul>
|
||||||
|
<template x-for="item in dataInterface" :key="item.idInterface">
|
||||||
|
<li :id="item.idInterface" @click="onChangeInterface(item)"
|
||||||
|
class="py-2 px-3 hover:bg-blue-100 cursor-pointer text-gray-700">
|
||||||
|
<button x-text="item.namaInterface"></button>
|
||||||
|
</li>
|
||||||
|
</template>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="mb-5"></div>
|
||||||
|
<!-- instrument -->
|
||||||
|
<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"
|
||||||
|
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>
|
||||||
|
<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">
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||||
|
d="M19 9l-7 7-7-7" />
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
</fieldset>
|
||||||
|
<div x-show="openInstrument"
|
||||||
|
class="absolute bg-white w-full border border-gray-300 rounded-md shadow-lg z-10 max-h-[200px] overflow-y-auto">
|
||||||
|
<ul>
|
||||||
|
<template x-for="item in dataInstrument" :key="item.idInstrument">
|
||||||
|
<li :id="item.idInstrument" @click="onChangeInstrument(item)"
|
||||||
|
class="py-2 px-3 hover:bg-blue-100 cursor-pointer text-gray-700">
|
||||||
|
<button x-text="item.namaInstrument"></button>
|
||||||
|
</li>
|
||||||
|
</template>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="mb-5"></div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<!-- namaJenis RS232 -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- footer -->
|
<!-- footer -->
|
||||||
<div class="h-10 px-4 py-2 mb-5">
|
<div class="h-10 px-4 py-2 mb-5">
|
||||||
<div class="flex items-end justify-end">
|
<div class="flex items-end justify-end">
|
||||||
<button
|
<button @click="closeDialog()" class="mr-3 text-[#FF5252] hover:text-white font-bold text-sm uppercase transition duration-200
|
||||||
@click="closeDialog()"
|
|
||||||
class="mr-3 text-[#FF5252] hover:text-white font-bold text-sm uppercase transition duration-200
|
|
||||||
hover:bg-[#FF5252] px-4 py-2 rounded-md">
|
hover:bg-[#FF5252] px-4 py-2 rounded-md">
|
||||||
Cancel
|
Cancel
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button class="text-[#1976D2] font-bold text-sm uppercase px-4 py-2 rounded-md transition duration-200
|
||||||
class="text-[#1976D2] font-bold text-sm uppercase px-4 py-2 rounded-md transition duration-200
|
|
||||||
hover:bg-[#1976D2] hover:text-white">
|
hover:bg-[#1976D2] hover:text-white">
|
||||||
Save
|
Save
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
Reference in New Issue
Block a user