86 lines
2.5 KiB
JavaScript
86 lines
2.5 KiB
JavaScript
document.addEventListener('alpine:init', () => {
|
|
Alpine.data('assayFormat', () => ({
|
|
// 0. Init dijalankan sebelum inisialisasi
|
|
init(){
|
|
|
|
},
|
|
// 1. Inisialisasi Start
|
|
showDialogAdd: false,
|
|
showDialogEdit: false,
|
|
loadingVerifikasi: false,
|
|
dataAssayFormat: [
|
|
{
|
|
idAssayFormat: 1,
|
|
idInstrument: 1,
|
|
namaInstrument: 'Hema 01',
|
|
assayCode: 'WBC',
|
|
decimalFont: '5001',
|
|
formula: ''
|
|
},
|
|
{
|
|
idAssayFormat: 2,
|
|
idInstrument: 2,
|
|
namaInstrument: 'Axsym',
|
|
assayCode: 'IgG',
|
|
decimalFont: '2001',
|
|
formula: ''
|
|
},
|
|
{
|
|
idAssayFormat: 3,
|
|
idInstrument: 3,
|
|
namaInstrument: 'Cobas C311',
|
|
assayCode: 'DBIL',
|
|
decimalFont: '4001',
|
|
formula: '(TBIL) - (DBIL)'
|
|
},
|
|
],
|
|
selectedInstrument: {
|
|
idInstrument: -1,
|
|
namaInstrument: 'Instrument'
|
|
},
|
|
openInstrument: false,
|
|
dataInstrument: [
|
|
{
|
|
idInstrument: 1,
|
|
namaInstrument: 'Hema 01',
|
|
},
|
|
{
|
|
idInstrument: 2,
|
|
namaInstrument: 'Axsym',
|
|
},
|
|
{
|
|
idInstrument: 3,
|
|
namaInstrument: 'Cobas C311',
|
|
},
|
|
],
|
|
hasilVerifikasi: '',
|
|
isErrorVerifikasi: false,
|
|
// 1. Inisialisasi End
|
|
// 2. Fungsi Start
|
|
closeDialog(){
|
|
this.openInstrument = false;
|
|
this.selectedInstrument = {
|
|
idInstrument: -1,
|
|
namaInstrument: 'Instrument'
|
|
};
|
|
this.loadingVerifikasi = false;
|
|
this.isErrorVerifikasi = false;
|
|
this.hasilVerifikasi = ''
|
|
this.showDialogAdd = false
|
|
},
|
|
onChangeInstrument(item){
|
|
this.openInstrument = false;
|
|
this.selectedInstrument = item;
|
|
},
|
|
onProcessVerifiaksi(){
|
|
this.loadingVerifikasi = true;
|
|
|
|
setTimeout(() => {
|
|
this.loadingVerifikasi = false;
|
|
this.isErrorVerifikasi = false;
|
|
this.hasilVerifikasi = 'Formula is valid';
|
|
}, 2000);
|
|
},
|
|
// 2. Fungsi End
|
|
}))
|
|
}) |