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