prework
This commit is contained in:
parent
cf1e4795b4
commit
5f6139b85d
@ -1,15 +1,15 @@
|
||||
<dialog class="modal" :open="isDialogValOpen">
|
||||
<template x-if="valAccessnumber">
|
||||
<div class="modal-box w-2/3 max-w-5xl">
|
||||
<p class='text-right mx-3 mb-2'>
|
||||
<button class="btn btn-sm btn-neutral" @click="closeValDialog()">Cancel</button>
|
||||
<button id="validate-btn" x-ref="validateBtn" class="btn btn-sm btn-success"
|
||||
@click="validate(valAccessnumber)" :disabled="!isValidateEnabled">Validate</button>
|
||||
@click="validate(valAccessnumber, '<?=session('userid');?>')" :disabled="!isValidateEnabled">Validate</button>
|
||||
</p>
|
||||
|
||||
<template x-if="valAccessnumber">
|
||||
<!-- <iframe id="result-iframe" src="http://glenlis/spooler_db/main_dev.php?acc=" width="750px" height="600px"></iframe> -->
|
||||
<iframe id="result-iframe" x-ref="resultIframe" src="<?=base_url('dummypage');?>" width="750px" height="600px"></iframe>
|
||||
</template>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
</dialog>
|
||||
|
||||
@ -294,11 +294,16 @@
|
||||
unval(accessnumber) {
|
||||
console.log("Unvalidate access number:", accessnumber);
|
||||
},
|
||||
validate() {
|
||||
// implement validation action
|
||||
console.log('Validate clicked for', this.valAccessnumber);
|
||||
},
|
||||
|
||||
validate(accessnumber, userid) {
|
||||
fetch(`${BASE_URL}/api/request/validate/${accessnumber}`, {
|
||||
method: "POST",
|
||||
headers: {"Content-Type": "application/json"},
|
||||
body: JSON.stringify({ userid:`${userid}` })
|
||||
}).then(response => {
|
||||
this.closeValDialog()
|
||||
console.log('Validate clicked for', this.valAccessnumber);
|
||||
});
|
||||
}
|
||||
}));
|
||||
});
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user