forked from verdnatura/salix-front
refs #7355 fix Rol, alias
This commit is contained in:
parent
cbc055fba2
commit
a43a6aec82
|
@ -3,28 +3,23 @@ import { useRouter } from 'vue-router';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { ref, computed } from 'vue';
|
import { ref, computed } from 'vue';
|
||||||
import VnTable from 'components/VnTable/VnTable.vue';
|
import VnTable from 'components/VnTable/VnTable.vue';
|
||||||
import VnPaginate from 'components/ui/VnPaginate.vue';
|
|
||||||
import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
||||||
import CardList from 'src/components/ui/CardList.vue';
|
|
||||||
import VnLv from 'src/components/ui/VnLv.vue';
|
|
||||||
import AliasSummary from './Alias/Card/AliasSummary.vue';
|
|
||||||
import AliasCreateForm from './Alias/AliasCreateForm.vue';
|
|
||||||
|
|
||||||
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
|
||||||
import { useStateStore } from 'stores/useStateStore';
|
import { useStateStore } from 'stores/useStateStore';
|
||||||
|
const route = useRoute();
|
||||||
|
import { useRoute } from 'vue-router';
|
||||||
|
|
||||||
defineProps({
|
const $props = defineProps({
|
||||||
id: {
|
id: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 0,
|
default: 0,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
const entityId = computed(() => $props.id || route.params.id);
|
||||||
|
|
||||||
|
const tableRef = ref();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const { viewSummary } = useSummaryDialog();
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const stateStore = useStateStore();
|
const stateStore = useStateStore();
|
||||||
const aliasCreateDialogRef = ref(null);
|
|
||||||
|
|
||||||
const exprBuilder = (param, value) => {
|
const exprBuilder = (param, value) => {
|
||||||
switch (param) {
|
switch (param) {
|
||||||
|
@ -49,6 +44,7 @@ const columns = computed(() => [
|
||||||
label: t('alias'),
|
label: t('alias'),
|
||||||
field: 'alias',
|
field: 'alias',
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
|
create: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
@ -56,12 +52,9 @@ const columns = computed(() => [
|
||||||
label: t('description'),
|
label: t('description'),
|
||||||
field: 'description',
|
field: 'description',
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
|
create: true,
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const navigate = (id) => router.push({ name: 'AliasSummary', params: { id } });
|
|
||||||
|
|
||||||
const openCreateModal = () => aliasCreateDialogRef.value.show();
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -78,20 +71,19 @@ const openCreateModal = () => aliasCreateDialogRef.value.show();
|
||||||
</template>
|
</template>
|
||||||
<VnTable
|
<VnTable
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
data-key="MailAliases"
|
data-key="AccountAliasList"
|
||||||
:url="`MailAliases`"
|
:url="`MailAliases`"
|
||||||
:create="{
|
:create="{
|
||||||
urlCreate: 'MailAliases',
|
urlCreate: 'MailAliases',
|
||||||
title: 'Create MailAlias',
|
title: 'Create MailAlias',
|
||||||
onDataSaved: () => tableRef.reload(),
|
onDataSaved: ({ id }) => tableRef.redirect(id),
|
||||||
formInitialData: {
|
formInitialData: {},
|
||||||
workerFk: entityId,
|
|
||||||
},
|
|
||||||
}"
|
}"
|
||||||
order="id DESC"
|
order="id DESC"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
default-mode="table"
|
default-mode="table"
|
||||||
auto-load
|
auto-load
|
||||||
|
redirect="account/alias"
|
||||||
:right-search="false"
|
:right-search="false"
|
||||||
:is-editable="true"
|
:is-editable="true"
|
||||||
:use-model="true"
|
:use-model="true"
|
||||||
|
|
|
@ -4,28 +4,21 @@ import { useRouter } from 'vue-router';
|
||||||
import { computed, ref } from 'vue';
|
import { computed, ref } from 'vue';
|
||||||
import VnTable from 'components/VnTable/VnTable.vue';
|
import VnTable from 'components/VnTable/VnTable.vue';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
|
|
||||||
import VnPaginate from 'src/components/ui/VnPaginate.vue';
|
|
||||||
import VnLv from 'src/components/ui/VnLv.vue';
|
|
||||||
import CardList from 'src/components/ui/CardList.vue';
|
|
||||||
import RoleSummary from './Card/RoleSummary.vue';
|
|
||||||
import RoleForm from './Card/RoleForm.vue';
|
|
||||||
import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
||||||
import AccountRolesFilter from './AccountRolesFilter.vue';
|
import AccountRolesFilter from './AccountRolesFilter.vue';
|
||||||
|
|
||||||
import { useStateStore } from 'stores/useStateStore';
|
import { useStateStore } from 'stores/useStateStore';
|
||||||
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const stateStore = useStateStore();
|
const stateStore = useStateStore();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const { viewSummary } = useSummaryDialog();
|
|
||||||
const $props = defineProps({
|
const $props = defineProps({
|
||||||
id: {
|
id: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 0,
|
default: 0,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
const tableRef = ref();
|
||||||
const entityId = computed(() => $props.id || route.params.id);
|
const entityId = computed(() => $props.id || route.params.id);
|
||||||
const roleCreateDialogRef = ref(null);
|
const roleCreateDialogRef = ref(null);
|
||||||
|
|
||||||
|
@ -130,7 +123,7 @@ const navigate = (event, id) => {
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
default-mode="table"
|
default-mode="table"
|
||||||
auto-load
|
auto-load
|
||||||
redirect="role"
|
redirect="account/role"
|
||||||
:right-search="false"
|
:right-search="false"
|
||||||
:is-editable="true"
|
:is-editable="true"
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -9,7 +9,7 @@ import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
import TravelSummary from './Card/TravelSummary.vue';
|
import TravelSummary from './Card/TravelSummary.vue';
|
||||||
import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
||||||
import { dashIfEmpty, toDate } from 'src/filters';
|
import { toDate } from 'src/filters';
|
||||||
const { viewSummary } = useSummaryDialog();
|
const { viewSummary } = useSummaryDialog();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
Loading…
Reference in New Issue