จัดโค้ดบรรจุ รายชื่อผู้สอบผ่าน
This commit is contained in:
parent
eb80e5e267
commit
9f9879202e
9 changed files with 527 additions and 411 deletions
|
|
@ -1,5 +1,6 @@
|
|||
<script setup lang="ts">
|
||||
|
||||
/** รับค่ามาจากหน้าหลัก */
|
||||
const props = defineProps({
|
||||
editvisible: Boolean,
|
||||
modalEdit: Boolean,
|
||||
|
|
@ -20,23 +21,29 @@ const props = defineProps({
|
|||
default: () => console.log("not function"),
|
||||
},
|
||||
});
|
||||
|
||||
const emit = defineEmits([
|
||||
"update:editvisible",
|
||||
"update:next",
|
||||
"update:previous",
|
||||
]);
|
||||
|
||||
const updateEdit = (value: Boolean) => {
|
||||
/**
|
||||
* ฟังชั่น update
|
||||
* @param value true/false
|
||||
*/
|
||||
function updateEdit(value: Boolean){
|
||||
emit("update:editvisible", value);
|
||||
};
|
||||
// const cancel = async () => {
|
||||
// props.cancel();
|
||||
// };
|
||||
const edit = async () => {
|
||||
|
||||
/** update edit */
|
||||
async function edit(){
|
||||
updateEdit(!props.editvisible);
|
||||
props.edit();
|
||||
};
|
||||
const checkSave = () => {
|
||||
|
||||
/** save */
|
||||
function checkSave(){
|
||||
props.validate();
|
||||
props.save();
|
||||
|
||||
|
|
@ -51,9 +58,9 @@ const checkSave = () => {
|
|||
:disabled="editvisible"
|
||||
:color="editvisible ? 'grey-7' : 'primary'"
|
||||
@click="edit"
|
||||
><!-- icon="mdi-pencil-outline"
|
||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip> -->
|
||||
>
|
||||
</q-btn>
|
||||
|
||||
<div v-else>
|
||||
<q-btn
|
||||
unelevated
|
||||
|
|
@ -62,8 +69,7 @@ const checkSave = () => {
|
|||
:color="!editvisible ? 'grey-7' : 'public'"
|
||||
@click="checkSave"
|
||||
>
|
||||
</q-btn><!-- icon="mdi-content-save-outline">
|
||||
<q-tooltip>บันทึก</q-tooltip> -->
|
||||
</q-btn>
|
||||
</div>
|
||||
</q-card-actions>
|
||||
</template>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue