Merge pull request 'fix(itemDescriptor): fix redirection to itemDiary' (!722) from hotFix_itemDiary_redirect_2 into master
gitea/salix-front/pipeline/head This commit looks good Details

Reviewed-on: #722
Reviewed-by: Jorge Penadés <jorgep@verdnatura.es>
This commit is contained in:
Alex Moreno 2024-09-17 08:25:36 +00:00
commit 3d6e9f9600
4 changed files with 9 additions and 5 deletions

View File

@ -24,7 +24,9 @@ const stateStore = useStateStore();
const route = useRoute();
const router = useRouter();
const url = computed(() => {
if (props.baseUrl) return `${props.baseUrl}/${route.params.id}`;
if (props.baseUrl) {
return `${props.baseUrl}/${route.params.id}`;
}
return props.customUrl;
});
const searchRightDataKey = computed(() => {
@ -40,8 +42,10 @@ onBeforeMount(async () => {
try {
if (!props.baseUrl) arrayData.store.filter.where = { id: route.params.id };
await arrayData.fetch({ append: false, updateRouter: false });
} catch (e) {
router.push({ name: 'WorkerList' });
} catch {
const { matched: matches } = router.currentRoute.value;
const { path } = matches.at(-1);
router.push({ path: path.replace(/:id.*/, '') });
}
});

View File

@ -12,7 +12,7 @@ import ItemListFilter from '../ItemListFilter.vue';
search-data-key="ItemList"
:searchbar-props="{
url: 'Items/filter',
label: 'searchbar.labelr',
label: 'searchbar.label',
info: 'searchbar.info',
}"
/>

View File

@ -199,6 +199,7 @@ const openCloneDialog = async () => {
<QBtn
:to="{
name: 'ItemDiary',
params: { id: entityId },
query: { warehouseFk, lineFk: $props.saleFk },
}"
size="md"

View File

@ -33,7 +33,6 @@ async function onSubmit() {
};
try {
console.log('newPassword: ', newPassword);
await axios.post(
'VnUsers/reset-password',
{ newPassword: newPassword.value },