Merge branch 'cobaTampilan' of https://git.rssa.top/dwi.firman/cobaKeuangan into keycloak
This commit is contained in:
No files matched your search
@@ -0,0 +1,48 @@
|
||||
<script setup lang="ts">
|
||||
import typeUser from "@/data/dummy/keuangan.type_user.json";
|
||||
import role_menu from "@/data/dummy/keuangan.role_menu.json";
|
||||
import menu from "@/data/dummy/keuangan.menu.json";
|
||||
//misal id = 683d57b2bccc67d467a9e10f
|
||||
// const id=ref('683d57b2bccc67d467a9e10f')
|
||||
// const { data:role_menu } = await useFetch(`/api/role_menu/${id.value}`)
|
||||
// const data = ref([]);
|
||||
|
||||
const dataMenu = computed(() => {
|
||||
return role_menu.map((role_menu) => {
|
||||
const menuItem = menu.find((menu) => menu._id.$oid == role_menu.menu_id)
|
||||
const type_user= typeUser.find((type_user) => type_user._id.$oid == role_menu.type_user_id)
|
||||
|
||||
return {
|
||||
_id: role_menu._id,
|
||||
menu: menuItem?.display || '-',
|
||||
type_user: type_user?.display || '-',
|
||||
accessAdd: role_menu.access?.[0]?.add || 0,
|
||||
accessUpdate: role_menu.access?.[1]?.update || 0,
|
||||
accessRead: role_menu.access?.[2]?.read || 0,
|
||||
accessDelete: role_menu.access?.[3]?.delete || 0
|
||||
}
|
||||
});
|
||||
// console.log(data)
|
||||
});
|
||||
|
||||
const updateData = (id) => {
|
||||
console.log("update data:", id);
|
||||
};
|
||||
|
||||
const deleteData = (id) => {
|
||||
console.log("delete data:", id);
|
||||
};
|
||||
|
||||
const columns=ref([
|
||||
{label:'Nama Menu',key:'menu'},
|
||||
{label:'Tambah',key:'accessAdd'},
|
||||
{label:'Ubah',key:'accessUpdate'},
|
||||
{label:'Baca',key:'accessRead'},
|
||||
{label:'Hapus',key:'accessDelete'},
|
||||
{label:'Aksi',key:'actions'},
|
||||
])
|
||||
|
||||
</script>
|
||||
<template>
|
||||
<MasterTable :columns="columns" :data="dataMenu"/>
|
||||
</template>
|
||||
@@ -0,0 +1,35 @@
|
||||
<script setup lang="ts">
|
||||
// import encounter from "@/data/dummy/encounter.json";
|
||||
import typeUser from "@/data/dummy/keuangan.type_user.json";
|
||||
import role_menu from "@/data/dummy/keuangan.role_menu.json";
|
||||
import menu from "@/data/dummy/keuangan.menu.json";
|
||||
import { ref } from "vue";
|
||||
|
||||
console.log(typeUser);
|
||||
console.log(role_menu);
|
||||
console.log(menu);
|
||||
|
||||
const detailType = (item) => {
|
||||
console.log(item); //simpan pinia
|
||||
navigateTo(`/Setting/typeUser/HakAkses`);
|
||||
};
|
||||
const dialog = ref(false);
|
||||
|
||||
</script>
|
||||
<!-- ini list -->
|
||||
<template>
|
||||
<v-row no-gutters>
|
||||
<div class="d-flex justify-space-between">
|
||||
<template v-if="typeUser && typeUser.length > 0">
|
||||
<v-col v-for="(item, index) in typeUser" :key="index">
|
||||
<MasterCardList :item="item" @detail="detailType" />
|
||||
</v-col>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="d-flex justify-content-center align-items-center">
|
||||
<p>Tidak ada Pasien</p>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</v-row>
|
||||
</template>
|
||||
@@ -1,19 +0,0 @@
|
||||
<template>
|
||||
<!-- <v-row>
|
||||
<v-col cols="8"><MasterForm /></v-col>
|
||||
</v-row> -->
|
||||
<v-card elevation="9">
|
||||
<v-card-title>Form Pendaftaran</v-card-title>
|
||||
<v-card-text>
|
||||
<MasterForm />
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
+2
-94
@@ -1,95 +1,3 @@
|
||||
<script setup lang="ts">
|
||||
import dummy from '@/data/dummy/dataDummy.json'
|
||||
|
||||
// console.log(dummy)
|
||||
</script>
|
||||
<template>
|
||||
<!-- <v-row no-gutters>
|
||||
<div class="d-flex justify-space-between">
|
||||
<template v-if="resGetEncounter && resGetEncounter.length > 0">
|
||||
<v-col v-for="(item, index) in resGetEncounter" :key="index">
|
||||
<v-card
|
||||
elevation="10"
|
||||
:class="[
|
||||
'mx-auto',
|
||||
item.status === 'planned'
|
||||
? ''
|
||||
: item.status === 'in-progress'
|
||||
? 'bg-info'
|
||||
: item.status === 'completed'
|
||||
? 'bg-success'
|
||||
: item.status === 'cancelled'
|
||||
? 'bg-error'
|
||||
: '',
|
||||
]"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<v-avatar
|
||||
size="50"
|
||||
:class="[
|
||||
'mx-auto rounded-md',
|
||||
item.status === 'planned'
|
||||
? ''
|
||||
: item.status === 'in-progress'
|
||||
? 'bg-info'
|
||||
: item.status === 'completed'
|
||||
? 'bg-success'
|
||||
: item.status === 'cancelled'
|
||||
? 'bg-error'
|
||||
: '',
|
||||
]"
|
||||
>
|
||||
<Icon
|
||||
icon="solar:user-circle-broken"
|
||||
:class="[
|
||||
item.status === 'planned'
|
||||
? 'text-primary'
|
||||
: item.status === 'in-progress'
|
||||
? 'text-primary'
|
||||
: item.status === 'completed'
|
||||
? 'text-light'
|
||||
: item.status === 'cancelled'
|
||||
? 'text-light'
|
||||
: '',
|
||||
]"
|
||||
height="36"
|
||||
/>
|
||||
</v-avatar>
|
||||
</template>
|
||||
<template v-slot:title>
|
||||
<h3>{{ item.subject.display }}</h3>
|
||||
</template>
|
||||
<template v-slot:subtitle> </template>
|
||||
<template v-slot:text>
|
||||
<div class="pl-3">
|
||||
<div class="align-center d-flex">
|
||||
<Icon icon="mdi:doctor" class="text-primary" height="25" />
|
||||
<h4>{{ item.participant[0].actor.display }}</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pl-3 pt-2">
|
||||
<div class="align-center d-flex">
|
||||
<Icon
|
||||
icon="mdi:hospital-marker"
|
||||
class="text-primary"
|
||||
height="25"
|
||||
/>
|
||||
<h4>Sps. {{ item.location[0].location.display }}</h4>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:actions>
|
||||
<v-btn color="primary" class="ms-auto">Detail</v-btn>
|
||||
</template>
|
||||
|
||||
</v-card>
|
||||
</v-col>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="d-flex justify-content-center align-items-center">
|
||||
<p>Tidak ada Pasien</p>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</v-row> -->
|
||||
</template>
|
||||
<div>master</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user