|
|
|
@ -5,6 +5,11 @@ import { MetaInj } from '~/context'
|
|
|
|
|
|
|
|
|
|
const { isUIAllowed } = useUIPermission() |
|
|
|
|
|
|
|
|
|
const formState = reactive({ |
|
|
|
|
heading: 'TestForm1', |
|
|
|
|
subheading: '', |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
const isEditable = isUIAllowed('editFormView' as Permission) |
|
|
|
|
|
|
|
|
|
const meta = inject(MetaInj) |
|
|
|
@ -16,10 +21,12 @@ const hiddenColumns = computed(() => [])
|
|
|
|
|
function addAllColumns() {} |
|
|
|
|
|
|
|
|
|
function removeAllColumns() {} |
|
|
|
|
|
|
|
|
|
function updateView() {} |
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
<template> |
|
|
|
|
<a-row class="h-full"> |
|
|
|
|
<a-row class="h-full flex"> |
|
|
|
|
<a-col v-if="isEditable" :span="6" class="bg-[#f7f7f7] shadow-md pa-5"> |
|
|
|
|
<div class="flex"> |
|
|
|
|
<div class="flex flex-row flex-1 text-lg"> |
|
|
|
@ -43,7 +50,39 @@ function removeAllColumns() {}
|
|
|
|
|
</div> |
|
|
|
|
TODO: Draggable |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :span="editEnabled ? 18 : 24"> TODO: Form </a-col> |
|
|
|
|
<a-col :span="isEditable ? 18 : 24"> |
|
|
|
|
<a-card class="px-10 py-20 h-full"> |
|
|
|
|
<a-form :model="formState" class="bg-[#fefefe]"> |
|
|
|
|
<!-- Header --> |
|
|
|
|
<div class="pb-2"> |
|
|
|
|
<a-form-item class="ma-0 gap-0 pa-0"> |
|
|
|
|
<a-input |
|
|
|
|
v-model:value="formState.heading" |
|
|
|
|
class="w-full text-bold text-h3 cursor-pointer" |
|
|
|
|
size="large" |
|
|
|
|
hide-details |
|
|
|
|
placeholder="Form Title" |
|
|
|
|
:bordered="false" |
|
|
|
|
@blur="updateView()" |
|
|
|
|
@keydown.enter="updateView()" |
|
|
|
|
/> |
|
|
|
|
</a-form-item> |
|
|
|
|
</div> |
|
|
|
|
<!-- Sub Header --> |
|
|
|
|
<a-form-item> |
|
|
|
|
<a-input |
|
|
|
|
v-model:value="formState.subheading" |
|
|
|
|
class="w-full cursor-pointer" |
|
|
|
|
size="large" |
|
|
|
|
hide-details |
|
|
|
|
:placeholder="$t('msg.info.formDesc')" |
|
|
|
|
:bordered="false" |
|
|
|
|
@click="updateView" |
|
|
|
|
/> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-form> |
|
|
|
|
</a-card> |
|
|
|
|
</a-col> |
|
|
|
|
</a-row> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|