0
0
Fork 0

Compare commits

..

No commits in common. "warmFix_accountAcls" and "dev" have entirely different histories.

3 changed files with 6 additions and 30 deletions

View File

@ -151,8 +151,8 @@ const tableModes = [
}, },
]; ];
onBeforeMount(() => { onBeforeMount(() => {
const urlParams = route.query[$props.searchUrl]; setUserParams(route.query[$props.searchUrl]);
hasParams.value = urlParams && Object.keys(urlParams).length !== 0; hasParams.value = params.value && Object.keys(params.value).length !== 0;
}); });
onMounted(() => { onMounted(() => {
@ -185,8 +185,7 @@ watch(
watch( watch(
() => route.query[$props.searchUrl], () => route.query[$props.searchUrl],
(val) => setUserParams(val), (val) => setUserParams(val)
{ immediate: true, deep: true }
); );
const isTableMode = computed(() => mode.value == TABLE_MODE); const isTableMode = computed(() => mode.value == TABLE_MODE);

View File

@ -9,8 +9,6 @@ import { useQuasar } from 'quasar';
import VnTable from 'components/VnTable/VnTable.vue'; import VnTable from 'components/VnTable/VnTable.vue';
import VnSearchbar from 'components/ui/VnSearchbar.vue'; import VnSearchbar from 'components/ui/VnSearchbar.vue';
import VnConfirm from 'components/ui/VnConfirm.vue'; import VnConfirm from 'components/ui/VnConfirm.vue';
import FetchData from 'src/components/FetchData.vue';
import { useValidator } from 'src/composables/useValidator';
defineProps({ defineProps({
id: { id: {
@ -25,18 +23,11 @@ const stateStore = useStateStore();
const quasar = useQuasar(); const quasar = useQuasar();
const tableRef = ref(); const tableRef = ref();
const roles = ref();
const validationsStore = useValidator();
const { models } = validationsStore;
const exprBuilder = (param, value) => { const exprBuilder = (param, value) => {
switch (param) { switch (param) {
case 'search': case 'search':
return { return { model: { like: `%${value}%` } };
or: [
{ model: { like: `%${value}%` } },
{ property: { like: `%${value}%` } },
],
};
default: default:
return { [param]: value }; return { [param]: value };
} }
@ -56,13 +47,6 @@ const columns = computed(() => [
label: t('model'), label: t('model'),
cardVisible: true, cardVisible: true,
create: true, create: true,
columnCreate: {
label: t('model'),
component: 'select',
attrs: {
options: Object.keys(models),
},
},
}, },
{ {
align: 'left', align: 'left',
@ -71,10 +55,9 @@ const columns = computed(() => [
cardVisible: true, cardVisible: true,
component: 'select', component: 'select',
attrs: { attrs: {
options: roles, url: 'VnRoles',
optionLabel: 'name', optionLabel: 'name',
optionValue: 'name', optionValue: 'name',
inputDebounce: 0,
}, },
create: true, create: true,
}, },
@ -147,11 +130,6 @@ const deleteAcl = async ({ id }) => {
/> />
<QDrawer v-model="stateStore.rightDrawer" side="right" :width="256" show-if-above> <QDrawer v-model="stateStore.rightDrawer" side="right" :width="256" show-if-above>
</QDrawer> </QDrawer>
<FetchData
url="VnRoles?fields=['name']"
auto-load
@on-fetch="(data) => (roles = data)"
/>
<VnTable <VnTable
ref="tableRef" ref="tableRef"
data-key="AccountAcls" data-key="AccountAcls"

View File

@ -33,7 +33,6 @@ const rolesOptions = ref([]);
:search-button="true" :search-button="true"
:hidden-tags="['search']" :hidden-tags="['search']"
:redirect="false" :redirect="false"
search-url="table"
> >
<template #tags="{ tag, formatFn }"> <template #tags="{ tag, formatFn }">
<div class="q-gutter-x-xs"> <div class="q-gutter-x-xs">