forked from verdnatura/salix-front
fix(itemDescriptor): fix redirection to itemDiary
This commit is contained in:
parent
198c47f0c9
commit
3d1bb0c67a
|
@ -24,7 +24,9 @@ const stateStore = useStateStore();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const url = computed(() => {
|
const url = computed(() => {
|
||||||
if (props.baseUrl) return `${props.baseUrl}/${route.params.id}`;
|
if (props.baseUrl) {
|
||||||
|
return `${props.baseUrl}/${route.params.id}`;
|
||||||
|
}
|
||||||
return props.customUrl;
|
return props.customUrl;
|
||||||
});
|
});
|
||||||
const searchRightDataKey = computed(() => {
|
const searchRightDataKey = computed(() => {
|
||||||
|
@ -40,8 +42,10 @@ onBeforeMount(async () => {
|
||||||
try {
|
try {
|
||||||
if (!props.baseUrl) arrayData.store.filter.where = { id: route.params.id };
|
if (!props.baseUrl) arrayData.store.filter.where = { id: route.params.id };
|
||||||
await arrayData.fetch({ append: false, updateRouter: false });
|
await arrayData.fetch({ append: false, updateRouter: false });
|
||||||
} catch (e) {
|
} catch {
|
||||||
router.push({ name: 'WorkerList' });
|
const { matched: matches } = router.currentRoute.value;
|
||||||
|
const { path } = matches.at(-1);
|
||||||
|
router.push({ path: path.replace(/:id.*/, '') });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ import ItemListFilter from '../ItemListFilter.vue';
|
||||||
search-data-key="ItemList"
|
search-data-key="ItemList"
|
||||||
:searchbar-props="{
|
:searchbar-props="{
|
||||||
url: 'Items/filter',
|
url: 'Items/filter',
|
||||||
label: 'searchbar.labelr',
|
label: 'searchbar.label',
|
||||||
info: 'searchbar.info',
|
info: 'searchbar.info',
|
||||||
}"
|
}"
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -199,6 +199,7 @@ const openCloneDialog = async () => {
|
||||||
<QBtn
|
<QBtn
|
||||||
:to="{
|
:to="{
|
||||||
name: 'ItemDiary',
|
name: 'ItemDiary',
|
||||||
|
params: { id: entityId },
|
||||||
query: { warehouseFk, lineFk: $props.saleFk },
|
query: { warehouseFk, lineFk: $props.saleFk },
|
||||||
}"
|
}"
|
||||||
size="md"
|
size="md"
|
||||||
|
|
|
@ -33,7 +33,6 @@ async function onSubmit() {
|
||||||
};
|
};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
console.log('newPassword: ', newPassword);
|
|
||||||
await axios.post(
|
await axios.post(
|
||||||
'VnUsers/reset-password',
|
'VnUsers/reset-password',
|
||||||
{ newPassword: newPassword.value },
|
{ newPassword: newPassword.value },
|
||||||
|
|
Loading…
Reference in New Issue