Fix shelving module
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details

This commit is contained in:
Kevin Martinez 2024-01-28 15:40:57 -03:00
parent 5449b34fa0
commit 4cf9548234
5 changed files with 22 additions and 26 deletions

View File

@ -21,19 +21,19 @@ function confirmRemove() {
.dialog({ .dialog({
component: VnConfirm, component: VnConfirm,
componentProps: { componentProps: {
title: t('confirmDeletion'), title: t('Confirm deletion'),
message: t('confirmDeletionMessage'), message: t('Are you sure you want to delete this shelving?'),
promise: remove, promise: remove
}, },
}) })
.onOk(async () => await router.push({ name: 'ShelvingList' }));
} }
async function remove() { async function remove() {
if (!$props.shelving.value.id) { if (!$props.shelving.id) {
return; return;
} }
await axios.delete(`Shelvings/${$props.shelving.value.id}`); await axios.delete(`Shelvings/${$props.shelving.id}`);
await router.push({ name: 'ShelvingList' });
quasar.notify({ quasar.notify({
message: t('globals.dataDeleted'), message: t('globals.dataDeleted'),
type: 'positive', type: 'positive',
@ -45,17 +45,13 @@ async function remove() {
<QItemSection avatar> <QItemSection avatar>
<QIcon name="delete" /> <QIcon name="delete" />
</QItemSection> </QItemSection>
<QItemSection>{{ t('deleteShelving') }}</QItemSection> <QItemSection>{{ t('Delete Shelving') }}</QItemSection>
</QItem> </QItem>
</template> </template>
<i18n> <i18n>
{ es:
"en": { Confirm deletion: Confirmar eliminación
"deleteShelving": "Delete Shelving" Are you sure you want to delete this shelving?: ¿Seguro que quieres eliminar este carro?
}, Delete Shelving: Eliminar carro
"es": {
"deleteShelving": "Eliminar carro"
}
}
</i18n> </i18n>

View File

@ -112,9 +112,11 @@ en:
parkingFk: Parking parkingFk: Parking
userFk: Worker userFk: Worker
isRecyclable: Recyclable isRecyclable: Recyclable
search: Search
es: es:
params: params:
parkingFk: Parking parkingFk: Parking
userFk: Trabajador userFk: Trabajador
isRecyclable: Reciclable isRecyclable: Reciclable
search: Contiene
</i18n> </i18n>

View File

@ -7,12 +7,12 @@ const { t } = useI18n();
<template> <template>
<VnSearchbar <VnSearchbar
data-key="ShelvingList" data-key="ShelvingList"
url="Shelvings"
:label="t('Search shelving')" :label="t('Search shelving')"
:info="t('You can search by search reference')" :info="t('You can search by search reference')"
/> />
</template> </template>
<style scoped lang="scss"></style>
<i18n> <i18n>
es: es:
Search shelving: Buscar carros Search shelving: Buscar carros

View File

@ -24,7 +24,7 @@ const hideRightDrawer = () => {
if (!isDialog) { if (!isDialog) {
stateStore.rightDrawer = false; stateStore.rightDrawer = false;
} }
} };
onMounted(hideRightDrawer); onMounted(hideRightDrawer);
onUnmounted(hideRightDrawer); onUnmounted(hideRightDrawer);
const filter = { const filter = {
@ -69,9 +69,13 @@ const filter = {
</template> </template>
<template #body="{ entity }"> <template #body="{ entity }">
<QCard class="vn-one"> <QCard class="vn-one">
<div class="header"> <RouterLink
class="header"
:to="{ name: 'ShelvingBasicData', params: { id: entityId } }"
>
{{ t('shelving.pageTitles.basicData') }} {{ t('shelving.pageTitles.basicData') }}
</div> <QIcon name="open_in_new" color="primary" />
</RouterLink>
<VnLv :label="t('shelving.summary.code')" :value="entity.code" /> <VnLv :label="t('shelving.summary.code')" :value="entity.code" />
<VnLv <VnLv
:label="t('shelving.summary.parking')" :label="t('shelving.summary.parking')"

View File

@ -80,6 +80,7 @@ function exprBuilder(param, value) {
url="Shelvings" url="Shelvings"
:filter="filter" :filter="filter"
:expr-builder="exprBuilder" :expr-builder="exprBuilder"
:limit="20"
auto-load auto-load
> >
<template #body="{ rows }"> <template #body="{ rows }">
@ -102,17 +103,10 @@ function exprBuilder(param, value) {
/> />
</template> </template>
<template #actions> <template #actions>
<QBtn
:label="t('components.smartCard.openCard')"
@click.stop="navigate(row.id)"
class="bg-vn-dark"
outline
/>
<QBtn <QBtn
:label="t('components.smartCard.openSummary')" :label="t('components.smartCard.openSummary')"
@click.stop="viewSummary(row.id)" @click.stop="viewSummary(row.id)"
color="primary" color="primary"
style="margin-top: 15px"
/> />
</template> </template>
</CardList> </CardList>