Merge branch 'cobaTampilan' of https://git.rssa.top/dwi.firman/cobaKeuangan into keycloak

# Conflicts:
#	components/Master/DialogModal.vue
#	pages/Setting/typeUser/index.vue
This commit is contained in:
2025-06-03 14:36:34 +07:00
4 changed files with 7796 additions and 524 deletions

View File

@@ -1,8 +1,8 @@
<script lang="ts" setup> <script lang="ts" setup>
import {ref, watch, defineProps} from 'vue'; import { ref, watch, defineProps } from 'vue';
const props = defineProps({ const props = defineProps({
stateValue: {type: Boolean, required: true} stateValue: { type: Boolean, required: true }
}); });
const isActive = ref(props.stateValue); const isActive = ref(props.stateValue);
@@ -41,12 +41,12 @@ $fetch(`/api/setting/getListMenu`)
</div> </div>
</div> </div>
</template> </template>
<template v-slot:text> <slot name="text">
<MasterListMenu :itemMenu="listMenu" /> <!-- text -->
</template> </slot>
<v-card-actions> <v-card-actions>
<v-btn text @click="$emit('stateValue', false)">Disagree</v-btn> <v-btn text @click="$emit('stateValue', false)">Disagree</v-btn>
<v-btn text @click="$emit('stateValue', false)">Agree</v-btn>
</v-card-actions> </v-card-actions>
</v-card> </v-card>
</template> </template>

View File

@@ -0,0 +1,42 @@
<script setup lang="ts">
const data = ref(null)
const onSubmit = () => {
// console.log("ini disimpan:",data.value?.data.typeUser);
console.log("ini disimpan:",data.value.form$.data);
}
</script>
<template>
<div class="d-flex flex-column gap-1 mx-1 pa-7 pt-0 pb-0">
<Vueform
ref="data"
validate-on="change|step"
method="post"
:endpoint="onSubmit"
size="md"
:display-errors="false"
>
<!-- <StaticElement
name="register_title"
content="Create account"
tag="h1"
/>
<StaticElement
name="divider"
tag="hr"
/> -->
<GroupElement
name="container"
description="Pastikan Tipe Pengguna Belum ada"
>
<TextElement
name="typeUser"
label="Type user"
:rules="['required', 'max:255', 'min:3']"
/>
</GroupElement>
<ButtonElement name="primaryButton" button-label="Button" :submits="true" size="lg"/>
</Vueform>
</div>
</template>

8249
package-lock.json generated
View File

File diff suppressed because it is too large Load Diff

View File

@@ -3,7 +3,7 @@
// import typeUser from "@/data/dummy/keuangan.type_user.json"; // import typeUser from "@/data/dummy/keuangan.type_user.json";
import role_menu from "@/data/dummy/keuangan.role_menu.json"; import role_menu from "@/data/dummy/keuangan.role_menu.json";
import menu from "@/data/dummy/keuangan.menu.json"; import menu from "@/data/dummy/keuangan.menu.json";
import {ref} from "vue"; import { ref } from "vue";
const typeUser = ref<any[]>([]); const typeUser = ref<any[]>([]);
$fetch("/api/setting/getTipeUser").then((res) => { $fetch("/api/setting/getTipeUser").then((res) => {
@@ -18,17 +18,20 @@ const detailType = (item) => {
console.log(item); //simpan pinia console.log(item); //simpan pinia
navigateTo(`/Setting/typeUser/HakAkses`); navigateTo(`/Setting/typeUser/HakAkses`);
}; };
const dialog = ref(false); // const dialog = ref(false);
// const detail = ref(false);
</script> </script>
<!-- ini list --> <!-- ini list -->
<template> <template>
<div class="d-flex pt-6 align-center justify-end">
<v-btn class="mr-16" color="primary" variant="tonal" @click="state= !state"><v-icon>mdi-plus</v-icon> Tipe User</v-btn>
</div>
<v-row no-gutters> <v-row no-gutters>
<v-col cols="12" md="4"> <v-col cols="12" md="4">
<div class="d-flex justify-space-between"> <div class="d-flex justify-space-between">
<template v-if="typeUser && typeUser.length > 0"> <template v-if="typeUser && typeUser.length > 0">
<v-col v-for="(item, index) in typeUser" :key="index"> <v-col v-for="(item, index) in typeUser" :key="index">
<MasterCardList :item="item" @detail="detailType"/> <MasterCardList :item="item" @detail="detailType" />
</v-col> </v-col>
</template> </template>
<template v-else> <template v-else>
@@ -39,4 +42,10 @@ const dialog = ref(false);
</div> </div>
</v-col> </v-col>
</v-row> </v-row>
<MasterDialogModal v-if="state" :stateValue="state" @stateValue="val => state = val" >
<template v-slot:text>
<!-- <p>coba ini</p> -->
<MasterFormTypeUser />
</template>
</MasterDialogModal>
</template> </template>