form belum fix
This commit is contained in:
8
components/Form/Lib/master/Email.vue
Normal file
8
components/Form/Lib/master/Email.vue
Normal file
@@ -0,0 +1,8 @@
|
||||
<template>
|
||||
<TextElement
|
||||
name="email"
|
||||
input-type="email"
|
||||
:rules="['nullable', 'email']"
|
||||
label="Email"
|
||||
/>
|
||||
</template>
|
||||
3
components/Form/Lib/master/Name.vue
Normal file
3
components/Form/Lib/master/Name.vue
Normal file
@@ -0,0 +1,3 @@
|
||||
<template>
|
||||
<TextElement name="username" label="Nama" />
|
||||
</template>
|
||||
3
components/Form/Lib/master/Password.vue
Normal file
3
components/Form/Lib/master/Password.vue
Normal file
@@ -0,0 +1,3 @@
|
||||
<template>
|
||||
<TextElement name="password" input-type="password" label="Password" />
|
||||
</template>
|
||||
24
components/Form/Lib/master/Role.vue
Normal file
24
components/Form/Lib/master/Role.vue
Normal file
@@ -0,0 +1,24 @@
|
||||
<template>
|
||||
<SelectElement
|
||||
name="role"
|
||||
:search="true"
|
||||
:native="false"
|
||||
input-type="search"
|
||||
autocomplete="off"
|
||||
label="Hak Akses"
|
||||
:items="[
|
||||
{
|
||||
value: 0,
|
||||
label: 'Administrator',
|
||||
},
|
||||
{
|
||||
value: '1',
|
||||
label: 'Manager',
|
||||
},
|
||||
{
|
||||
value: '2',
|
||||
label: 'Staff',
|
||||
},
|
||||
]"
|
||||
/>
|
||||
</template>
|
||||
@@ -23,6 +23,23 @@ const sidebarItem: menu[] = [
|
||||
icon: "adhesive-plaster-outline",
|
||||
to: "/",
|
||||
},
|
||||
{
|
||||
title: "master",
|
||||
to: "/master",
|
||||
external: false,
|
||||
children:[
|
||||
{
|
||||
title: "index",
|
||||
to: "/master/index",
|
||||
external: false,
|
||||
},
|
||||
{
|
||||
title: "master",
|
||||
to: "/master/form",
|
||||
external: false,
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
title: "Front Pages",
|
||||
icon: "home-angle-linear",
|
||||
|
||||
30
components/master/Form.vue
Normal file
30
components/master/Form.vue
Normal file
@@ -0,0 +1,30 @@
|
||||
<template>
|
||||
<!-- <v-card elevation="10" >
|
||||
<v-card-item> -->
|
||||
<div class="d-md-flex justify-space-between mb-mb-0 mb-3">
|
||||
<!-- <v-card-title class="text-h5">Revenue Forecast</v-card-title> -->
|
||||
</div>
|
||||
<div class="mt-4 pt-2">
|
||||
<Vueform v-model="data" validate-on="change|step" method="post" :endpoint="onSubmit">
|
||||
<FormLibMasterName />
|
||||
<FormLibMasterEmail />
|
||||
<FormLibMasterPassword />
|
||||
<FormLibMasterRole />
|
||||
<ButtonElement
|
||||
name="primaryButton"
|
||||
button-label="Button"
|
||||
:submits="true"
|
||||
align="center"
|
||||
size="lg"
|
||||
/>
|
||||
</Vueform>
|
||||
</div>
|
||||
<!-- </v-card-item>
|
||||
</v-card> -->
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
const data = ref('')
|
||||
const onSubmit = () => {
|
||||
console.log(data)
|
||||
}
|
||||
</script>
|
||||
101
data/dummy/dataDummy.json
Normal file
101
data/dummy/dataDummy.json
Normal file
@@ -0,0 +1,101 @@
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"username": "admin",
|
||||
"email": "admin@company.com",
|
||||
"password": "123456",
|
||||
"full_name": "System Administrator",
|
||||
"role": "Administrator",
|
||||
"role_description": "Administrative access with most permissions",
|
||||
"permissions": [
|
||||
{
|
||||
"action": "Create",
|
||||
"code": "C",
|
||||
"description": "Create new records"
|
||||
},
|
||||
{
|
||||
"action": "Read",
|
||||
"code": "R",
|
||||
"description": "View/Read records"
|
||||
},
|
||||
{
|
||||
"action": "Update",
|
||||
"code": "U",
|
||||
"description": "Edit/Update existing records"
|
||||
},
|
||||
{
|
||||
"action": "Delete",
|
||||
"code": "D",
|
||||
"description": "Delete records"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"username": "manager1",
|
||||
"email": "manager1@company.com",
|
||||
"password": "234567",
|
||||
"full_name": "John Manager",
|
||||
"role": "Manager",
|
||||
"role_description": "Management level access for operational tasks",
|
||||
"permissions": [
|
||||
{
|
||||
"action": "Read",
|
||||
"code": "R",
|
||||
"description": "View/Read records"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"username": "staff1",
|
||||
"email": "staff1@company.com",
|
||||
"password": "345678",
|
||||
"full_name": "Jane Staff",
|
||||
"role": "Staff",
|
||||
"role_description": "Regular staff access for daily operations",
|
||||
"permissions": [
|
||||
{
|
||||
"action": "Read",
|
||||
"code": "R",
|
||||
"description": "View/Read records"
|
||||
},
|
||||
{
|
||||
"action": "Create",
|
||||
"code": "C",
|
||||
"description": "Create new records"
|
||||
},
|
||||
{
|
||||
"action": "Update",
|
||||
"code": "U",
|
||||
"description": "Edit/Update existing records"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"username": "staff2",
|
||||
"email": "staff2@company.com",
|
||||
"password": "456789",
|
||||
"full_name": "Bob Staff",
|
||||
"role": "Staff",
|
||||
"role_description": "Regular staff access for daily operations",
|
||||
"permissions": [
|
||||
{
|
||||
"action": "Read",
|
||||
"code": "R",
|
||||
"description": "View/Read records"
|
||||
},
|
||||
{
|
||||
"action": "Create",
|
||||
"code": "C",
|
||||
"description": "Create new records"
|
||||
},
|
||||
{
|
||||
"action": "Update",
|
||||
"code": "U",
|
||||
"description": "Edit/Update existing records"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
13315
package-lock.json
generated
Normal file
13315
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
19
pages/master/form.vue
Normal file
19
pages/master/form.vue
Normal file
@@ -0,0 +1,19 @@
|
||||
<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>
|
||||
95
pages/master/index.vue
Normal file
95
pages/master/index.vue
Normal file
@@ -0,0 +1,95 @@
|
||||
<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>
|
||||
Reference in New Issue
Block a user