tampilan
This commit is contained in:
No files matched your search
@@ -0,0 +1,52 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from "vue";
|
||||
import {useSettingStore} from "@/stores/api/setting/setting"
|
||||
|
||||
const {getTypeUser,getRoleMenuById} = useSettingStore()
|
||||
const {listTypeUser,typeUser} =storeToRefs(useSettingStore())
|
||||
|
||||
|
||||
const state = ref(false)
|
||||
const type = ref('')
|
||||
const detailType = async(item:any) => {
|
||||
//simpan pinia
|
||||
await getRoleMenuById(item._id)
|
||||
type.value='detail'
|
||||
state.value= true
|
||||
};
|
||||
onMounted(async() => {
|
||||
await getTypeUser()
|
||||
})
|
||||
</script>
|
||||
<!-- ini list -->
|
||||
<template>
|
||||
<div class="d-flex pt-6 align-center ml-3 mb-6">
|
||||
<v-btn class="mr-16" color="primary" variant="tonal" @click="state= !state; type='create'"><v-icon>mdi-plus</v-icon> Tipe User</v-btn>
|
||||
</div>
|
||||
<v-row no-gutters>
|
||||
<v-col cols="12" md="4">
|
||||
<div class="d-flex justify-space-between">
|
||||
<template v-if="listTypeUser && listTypeUser.length > 0">
|
||||
<v-col v-for="(item, index) in listTypeUser" :key="index">
|
||||
<MasterCardList :item="item" @detail="detailType" >
|
||||
<template v-slot:actions></template>
|
||||
</MasterCardList>
|
||||
</v-col>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="d-flex justify-content-center align-items-center ml-3">
|
||||
<p>Tidak ada Pasien</p>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<MasterDialogModal v-if="state" :stateValue="state" @stateValue="val => state = val" >
|
||||
<template v-slot:text>
|
||||
|
||||
<MasterFormTypeUser v-if="type=='create'"/>
|
||||
<MasterFormAdd v-if="type=='detail'" @stateValue="val => state = val"/>
|
||||
<!-- <MasterContoh v-if="type=='detail'"/> -->
|
||||
</template>
|
||||
</MasterDialogModal>
|
||||
</template>
|
||||
Reference in New Issue
Block a user