Merge branch 'dev' into 7826_fix
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
commit
dc65f7ad20
154
CHANGELOG.md
154
CHANGELOG.md
|
@ -1,3 +1,157 @@
|
|||
# Version 25.04 - 2025-01-28
|
||||
|
||||
### Added 🆕
|
||||
|
||||
- chore: add task comment by:jorgep
|
||||
- chore: refs #8198 rollback by:jorgep
|
||||
- chore: refs #8322 unnecessary prop by:alexm
|
||||
- feat: refs #7055 added new test case by:provira
|
||||
- feat: refs #7055 created FilterItemForm test by:provira
|
||||
- feat: refs #7077 created test for VnInputTime by:provira
|
||||
- feat: refs #7078 created test for VnJsonValue by:provira
|
||||
- feat: refs #7087 added more test cases by:provira
|
||||
- feat: refs #7087 added new test by:provira
|
||||
- feat: refs #7087 created CardSummary test by:provira
|
||||
- feat: refs #7088 created test for FetchedTags by:provira
|
||||
- feat: refs #7202 added new field by:Jon
|
||||
- feat: refs #7882 Added coords to create a address by:guillermo
|
||||
- feat: refs #7957 add tooltip and i18n support for search link in VnSearchbar component by:jorgep
|
||||
- feat: refs #7957 enhance search functionality and improve data filtering logic by:jorgep
|
||||
- feat: refs #7957 open in new tab by:jorgep
|
||||
- feat: refs #7957 simplify fn to by:jorgep
|
||||
- feat: refs #7957 update VnSearchbar component with improved search URL handling and styling enhancements by:jorgep
|
||||
- feat: refs #8117 filters and values added as needed by:jtubau
|
||||
- feat: refs #8197 useHasContent and use in VnSection and RightMenu by:alexm
|
||||
- feat: refs #8219 added invoice out e2e tests by:Jon
|
||||
- feat: refs #8219 global invoicing e2e by:Jon
|
||||
- feat: refs #8220 added barcodes e2e test by:Jon
|
||||
- feat: refs #8220 created items e2e by:Jon
|
||||
- feat: refs #8220 modified create item form and added respective e2e by:Jon
|
||||
- feat: refs #8225 added account and invoiceOut modules by:Jon
|
||||
- feat: refs #8225 added entry module and fixed translations by:Jon
|
||||
- feat: refs #8225 added invoiceIn and travel module by:Jon
|
||||
- feat: refs #8225 added moreOptions and use it in customer and ticket summary by:Jon
|
||||
- feat: refs #8225 added route and shelving module by:Jon
|
||||
- feat: refs #8225 added worker and zone modules by:Jon
|
||||
- feat: refs #8225 use it in claim, item and order modules by:Jon
|
||||
- feat: refs #8258 added button to pass to uppercase by:provira
|
||||
- feat: refs #8258 added uppercase option to VnInput by:provira
|
||||
- feat: refs #8258 added uppercase validation on supplier create by:provira
|
||||
- feat: refs #8298 add price optimum input and update translations for bonus and price optimum by:jgallego
|
||||
- feat: refs #8316 add entryFilter prop to VnTable component in EntryList by:jtubau
|
||||
- feat: refs #8322 added department changes by:provira
|
||||
- feat: refs #8372 workerPBX by:robert
|
||||
- feat: refs #8381 add initial and final temperature fields to entry forms and summaries by:jgallego
|
||||
- feat: refs #8381 add initial and final temperature labels in English and Spanish locales by:jgallego
|
||||
- feat: refs #8381 add toCelsius filter and update temperature fields in entry forms and summaries by:jgallego
|
||||
- feat: skip tests by:jorgep
|
||||
- style: refs #7957 update VnSearchbar padding for improved layout by:jorgep
|
||||
|
||||
### Changed 📦
|
||||
|
||||
- perf: refs #8219 #8219 minor change by:Javier Segarra
|
||||
- perf: refs #8220 on-fetch and added missing translations by:Jon
|
||||
- perf: refs #8220 on-fetch by:Jon
|
||||
- perf: refs #8220 translations by:Jon
|
||||
- perf: refs #8220 use searchbar selector in e2e tests by:Jon
|
||||
- perf: remove warning default value by:Javier Segarra
|
||||
- refactor: redirect using params by:Jon
|
||||
- refactor: refs #7077 removed some comments by:provira
|
||||
- refactor: refs #7087 removed unused imports by:provira
|
||||
- refactor: refs #7100 added const mockData by:jtubau
|
||||
- refactor: refs #7100 delete unnecesary set prop by:jtubau
|
||||
- refactor: refs #7100 refactorized with methods by:jtubau
|
||||
- refactor: refs #7957 remove blank by:jorgep
|
||||
- refactor: refs #8198 simplify data fetching and filtering logic by:jorgep
|
||||
- refactor: refs #8198 simplify state management and data fetching in ItemDiary component by:jorgep
|
||||
- refactor: refs #8219 modified e2e tests and fixed some translations by:Jon
|
||||
- refactor: refs #8219 modified list test, created cypress download folder and added to gitignore by:Jon
|
||||
- refactor: refs #8219 requested changes by:Jon
|
||||
- refactor: refs #8219 use checkNotification command by:Jon
|
||||
- refactor: refs #8220 added data-cy for e2e tests by:Jon
|
||||
- refactor: refs #8220 requested changes by:Jon
|
||||
- refactor: refs #8220 skip failling test and modifed tag test by:Jon
|
||||
- refactor: refs #8225 requested changes by:Jon
|
||||
- refactor: refs #8247 use new acl for sysadmin by:Jon
|
||||
- refactor: refs #8316 added claimFilter by:jtubau
|
||||
- refactor: refs #8316 added entryFilter by:jtubau
|
||||
- refactor: refs #8316 add new localization keys and update existing ones for entry components by:jtubau
|
||||
- refactor: refs #8316 moved localizations to local locale by:jtubau
|
||||
- refactor: refs #8316 move order localization by:jtubau
|
||||
- refactor: refs #8316 remove unused OrderSearchbar component by:jtubau
|
||||
- refactor: refs #8316 update EntryCard to use user-filter prop and remove exprBuilder from EntryList by:jtubau
|
||||
- refactor: refs #8316 used VnSection and VnCardBeta by:jtubau
|
||||
- refactor: refs #8322 changed translations by:provira
|
||||
- refactor: refs #8322 changed Worker component to use VnSection/VnCardBeta by:provira
|
||||
- refactor: refs #8322 set department inside worker by:alexm
|
||||
- refactor: skip intermitent failing test by:Jon
|
||||
|
||||
### Fixed 🛠️
|
||||
|
||||
- feat: refs #8225 added entry module and fixed translations by:Jon
|
||||
- fix: added missing translations in InvoiceIn by:provira
|
||||
- fix: changed invoiceIn for InvoiceIn by:provira
|
||||
- fix: changed translations to only use "invoicein" by:provira
|
||||
- fix: department descriptor link by:Jon
|
||||
- fix: e2e tests by:Jon
|
||||
- fix: entry summary view and build warnings by:Jon
|
||||
- fix: fixed InvoiceIn filter translations by:provira
|
||||
- fix: modified setData in customerDescriptor to show the icons by:Jon
|
||||
- fix: redirect to TicketSale from OrderLines (origin/Fix-RedirectToTicketSale) by:Jon
|
||||
- fix: redirect when confirming lines by:Jon
|
||||
- fix: refs #7055 #7055 #7055 fixed some tests by:provira
|
||||
- fix: refs #7077 removed unused imports by:provira
|
||||
- fix: refs #7078 added missing case with array by:provira
|
||||
- fix: refs #7087 fixed some tests by:provira
|
||||
- fix: refs #7088 changed "vm.vm" to "vm" by:provira
|
||||
- fix: refs #7088 changed wrapper to vm by:provira
|
||||
- fix: refs #7699 add icons and hint by:carlossa
|
||||
- fix: refs #7699 add pwd vnInput by:carlossa
|
||||
- fix: refs #7699 fix component by:carlossa
|
||||
- fix: refs #7699 fix password visibility by:carlossa
|
||||
- fix: refs #7699 fix tfront clean code by:carlossa
|
||||
- fix: refs #7699 fix vnChangePassword, clean VnInput by:carlossa
|
||||
- fix: refs #7699 fix vnInputPassword by:carlossa
|
||||
- fix: refs #7957 add missing closing brace by:jorgep
|
||||
- fix: refs #7957 css by:jorgep
|
||||
- fix: refs #7957 rollback by:jorgep
|
||||
- fix: refs #7957 update data-cy by:jorgep
|
||||
- fix: refs #7957 update visibility handling for clear icon in VnInput component by:jorgep
|
||||
- fix: refs #7957 vn-searchbar test by:jorgep
|
||||
- fix: refs #8117 update salesPersonFk filter options and URL for improved data retrieval by:jtubau
|
||||
- fix: refs #8197 not use yet by:alexm
|
||||
- fix: refs #8198 update query param by:jorgep
|
||||
- fix: refs #8219 fixed e2e tests by:Jon
|
||||
- fix: refs #8219 fixed summary and global tests by:Jon
|
||||
- fix: refs #8219 forgotten dataCy by:Jon
|
||||
- fix: refs #8219 global e2e by:Jon
|
||||
- fix: refs #8219 requested changes by:Jon
|
||||
- fix: refs #8220 itemTag test by:Javier Segarra
|
||||
- fix: refs #8225 invoice in translations by:Jon
|
||||
- fix: refs #8243 fixed SkeletonSummary by:provira
|
||||
- fix: refs #8247 conflicts by:Jon
|
||||
- fix: refs #8247 fixed acls and added lost options by:Jon
|
||||
- fix: refs #8316 ref="claimFilterRef" by:alexm
|
||||
- fix: refs #8316 userFilter by:alexm
|
||||
- fix: refs #8316 use rightMenu by:alexm
|
||||
- fix: refs #8316 use section-searchbar by:alexm
|
||||
- fix: refs #8317 disable action buttons when no rows are selected in ItemFixedPrice by:jtubau
|
||||
- fix: refs #8322 unnecessary section by:alexm
|
||||
- fix: refs #8338 fixed VnTable translations by:provira
|
||||
- fix: refs #8338 removed chipLocale property/added more translations by:provira
|
||||
- fix: refs #8448 e2e by:Jon
|
||||
- fix: refs #8448 not use croppie by:alexm
|
||||
- fix: remove departmentCode by:Javier Segarra
|
||||
- fix: removed unused searchbar by:PAU ROVIRA ROSALENY
|
||||
- fix: skip failling e2e by:Jon
|
||||
- fix: sort by name in description by:Jon
|
||||
- fix: translations by:Jon
|
||||
- fix: use entryFilter by:alexm
|
||||
- fix(VnCardBeta): add userFilter by:alexm
|
||||
- refactor: refs #8219 modified e2e tests and fixed some translations by:Jon
|
||||
- revert: revert header by:alexm
|
||||
- test: fix expedition e2e by:alexm
|
||||
|
||||
# Version 25.00 - 2025-01-14
|
||||
|
||||
### Added 🆕
|
||||
|
|
|
@ -30,9 +30,11 @@ export default defineConfig({
|
|||
testFiles: '**/*.spec.js',
|
||||
supportFile: 'test/cypress/support/unit.js',
|
||||
},
|
||||
setupNodeEvents(on, config) {
|
||||
import('cypress-mochawesome-reporter/plugin').then((plugin) => plugin.default(on));
|
||||
// implement node event listeners here
|
||||
setupNodeEvents: async (on, config) => {
|
||||
const plugin = await import('cypress-mochawesome-reporter/plugin');
|
||||
plugin.default(on);
|
||||
|
||||
return config;
|
||||
},
|
||||
viewportWidth: 1280,
|
||||
viewportHeight: 720,
|
||||
|
|
|
@ -149,7 +149,7 @@ function filter(value, update, filterOptions) {
|
|||
(ref) => {
|
||||
ref.setOptionIndex(-1);
|
||||
ref.moveOptionSelection(1, true);
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -215,7 +215,7 @@ async function remove(data) {
|
|||
|
||||
if (preRemove.length) {
|
||||
newData = newData.filter(
|
||||
(form) => !preRemove.some((index) => index == form.$index)
|
||||
(form) => !preRemove.some((index) => index == form.$index),
|
||||
);
|
||||
const changes = getChanges();
|
||||
if (!changes.creates?.length && !changes.updates?.length)
|
||||
|
|
|
@ -349,4 +349,11 @@ es:
|
|||
floramondo: Floramondo
|
||||
salesPersonFk: Comprador
|
||||
categoryFk: Categoría
|
||||
Plant: Planta natural
|
||||
Flower: Flor fresca
|
||||
Handmade: Hecho a mano
|
||||
Artificial: Artificial
|
||||
Green: Verdes frescos
|
||||
Accessories: Complementos florales
|
||||
Fruit: Fruta
|
||||
</i18n>
|
||||
|
|
|
@ -62,7 +62,6 @@ const refresh = () => window.location.reload();
|
|||
/>
|
||||
<QSpace />
|
||||
<div id="searchbar" class="searchbar"></div>
|
||||
<div id="searchbar-after"></div>
|
||||
<QSpace />
|
||||
<div class="q-pl-sm q-gutter-sm row items-center no-wrap">
|
||||
<div id="actions-prepend"></div>
|
||||
|
|
|
@ -20,7 +20,7 @@ watch(
|
|||
(val) => {
|
||||
if (stateStore) stateStore.rightAdvancedDrawer = val;
|
||||
},
|
||||
{ immediate: true }
|
||||
{ immediate: true },
|
||||
);
|
||||
</script>
|
||||
<template>
|
||||
|
@ -30,8 +30,8 @@ watch(
|
|||
flat
|
||||
@click="stateStore.toggleRightAdvancedDrawer()"
|
||||
round
|
||||
dense
|
||||
icon="tune"
|
||||
color="white"
|
||||
>
|
||||
<QTooltip bottom anchor="bottom right">
|
||||
{{ t('globals.advancedMenu') }}
|
||||
|
|
|
@ -26,6 +26,7 @@ onMounted(() => {
|
|||
round
|
||||
dense
|
||||
icon="dock_to_left"
|
||||
data-cy="toggle-right-drawer"
|
||||
>
|
||||
<QTooltip bottom anchor="bottom right">
|
||||
{{ t('globals.collapseMenu') }}
|
||||
|
|
|
@ -202,7 +202,7 @@ const columns = computed(() => [
|
|||
prop.row.id,
|
||||
$props.downloadModel,
|
||||
undefined,
|
||||
prop.row.download
|
||||
prop.row.download,
|
||||
),
|
||||
},
|
||||
{
|
||||
|
@ -374,7 +374,7 @@ defineExpose({
|
|||
v-if="
|
||||
shouldRenderButton(
|
||||
button.name,
|
||||
props.row.isDocuware
|
||||
props.row.isDocuware,
|
||||
)
|
||||
"
|
||||
:is="button.component"
|
||||
|
|
|
@ -75,6 +75,7 @@ const focus = () => {
|
|||
|
||||
defineExpose({
|
||||
focus,
|
||||
vnInputRef,
|
||||
});
|
||||
|
||||
const mixinRules = [
|
||||
|
@ -174,7 +175,11 @@ const handleUppercase = () => {
|
|||
v-if="!$attrs.disabled && !($attrs.readonly) && $props.uppercase"
|
||||
@click="handleUppercase"
|
||||
class="uppercase-icon"
|
||||
/>
|
||||
>
|
||||
<QTooltip>
|
||||
{{ t('Convert to uppercase') }}
|
||||
</QTooltip>
|
||||
</QIcon>
|
||||
|
||||
<slot name="append" v-if="$slots.append && !$attrs.disabled" />
|
||||
<QIcon v-if="info" name="info">
|
||||
|
@ -187,13 +192,26 @@ const handleUppercase = () => {
|
|||
</div>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
.uppercase-icon {
|
||||
transition: color 0.3s, transform 0.2s;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.uppercase-icon:hover {
|
||||
color: #ed9937;
|
||||
transform: scale(1.2);
|
||||
}
|
||||
</style>
|
||||
<i18n>
|
||||
en:
|
||||
inputMin: Must be more than {value}
|
||||
maxLength: The value exceeds {value} characters
|
||||
inputMax: Must be less than {value}
|
||||
|
||||
es:
|
||||
inputMin: Debe ser mayor a {value}
|
||||
maxLength: El valor excede los {value} carácteres
|
||||
inputMax: Debe ser menor a {value}
|
||||
Convert to uppercase: Convertir a mayúsculas
|
||||
</i18n>
|
|
@ -804,7 +804,7 @@ watch(
|
|||
<QItem class="q-mt-sm">
|
||||
<QInput
|
||||
class="full-width"
|
||||
:label="t('to')"
|
||||
:label="t('globals.to')"
|
||||
@click="dateToDialog = true"
|
||||
@focus="(evt) => evt.target.blur()"
|
||||
@clear="selectFilter('date', 'from')"
|
||||
|
@ -1059,9 +1059,9 @@ en:
|
|||
Deletes: Deletes
|
||||
Accesses: Accesses
|
||||
Users:
|
||||
User: Usuario
|
||||
All: Todo
|
||||
System: Sistema
|
||||
User: User
|
||||
All: All
|
||||
System: System
|
||||
properties:
|
||||
id: ID
|
||||
claimFk: Claim ID
|
||||
|
|
|
@ -75,6 +75,10 @@ onMounted(() => {
|
|||
onUnmounted(unsubscribe);
|
||||
});
|
||||
|
||||
onUnmounted(() => {
|
||||
if (arrayData) arrayData.destroy();
|
||||
});
|
||||
|
||||
function checkIsMain() {
|
||||
isMainSection.value = sectionValue.value == route.name;
|
||||
if (!isMainSection.value && arrayData) {
|
||||
|
|
|
@ -9,9 +9,9 @@ const $props = defineProps({
|
|||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
hasInfo: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
info: {
|
||||
type: String,
|
||||
default: undefined,
|
||||
},
|
||||
modelValue: {
|
||||
type: [String, Number, Object],
|
||||
|
@ -57,9 +57,9 @@ const url = computed(() => {
|
|||
<template #prepend v-if="$props.hasAvatar">
|
||||
<VnAvatar :worker-id="value" color="primary" v-bind="$attrs" />
|
||||
</template>
|
||||
<template #append v-if="$props.hasInfo">
|
||||
<template #append v-if="$props.info">
|
||||
<QIcon name="info" class="cursor-pointer">
|
||||
<QTooltip>{{ $t($props.hasInfo) }}</QTooltip>
|
||||
<QTooltip>{{ $t($props.info) }}</QTooltip>
|
||||
</QIcon>
|
||||
</template>
|
||||
<template #option="scope">
|
||||
|
|
|
@ -10,6 +10,10 @@ defineProps({
|
|||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
width: {
|
||||
type: String,
|
||||
default: 'md-width',
|
||||
},
|
||||
});
|
||||
|
||||
defineEmits([...useDialogPluginComponent.emits]);
|
||||
|
@ -17,7 +21,19 @@ defineEmits([...useDialogPluginComponent.emits]);
|
|||
const { dialogRef, onDialogHide } = useDialogPluginComponent();
|
||||
</script>
|
||||
<template>
|
||||
<QDialog ref="dialogRef" @hide="onDialogHide" full-width>
|
||||
<component :is="summary" :id="id" />
|
||||
<QDialog ref="dialogRef" @hide="onDialogHide">
|
||||
<component :is="summary" :id="id" :class="width" />
|
||||
</QDialog>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.md-width {
|
||||
max-width: $width-md;
|
||||
}
|
||||
.lg-width {
|
||||
max-width: $width-lg;
|
||||
}
|
||||
.xlg-width {
|
||||
max-width: $width-xl;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -37,6 +37,10 @@ const $props = defineProps({
|
|||
type: Object,
|
||||
default: null,
|
||||
},
|
||||
width: {
|
||||
type: String,
|
||||
default: 'md-width',
|
||||
},
|
||||
});
|
||||
|
||||
const state = useState();
|
||||
|
@ -128,9 +132,8 @@ const toModule = computed(() =>
|
|||
</QTooltip>
|
||||
</QBtn></slot
|
||||
>
|
||||
|
||||
<QBtn
|
||||
@click.stop="viewSummary(entity.id, $props.summary)"
|
||||
@click.stop="viewSummary(entity.id, $props.summary, $props.width)"
|
||||
round
|
||||
flat
|
||||
dense
|
||||
|
|
|
@ -170,7 +170,7 @@ function emitStoreData() {
|
|||
async function paginate() {
|
||||
const { page, rowsPerPage, sortBy, descending } = pagination.value;
|
||||
|
||||
if (!props.url) return;
|
||||
if (!arrayData.store.url) return;
|
||||
|
||||
isLoading.value = true;
|
||||
await arrayData.loadMore();
|
||||
|
|
|
@ -102,7 +102,7 @@ watch(
|
|||
(val) => {
|
||||
arrayData = useArrayData(val, { ...props });
|
||||
store = arrayData.store;
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
onMounted(() => {
|
||||
|
@ -176,6 +176,7 @@ async function search() {
|
|||
>
|
||||
<QTooltip>{{ t(props.info) }}</QTooltip>
|
||||
</QIcon>
|
||||
<div id="searchbar-after"></div>
|
||||
</template>
|
||||
</VnInput>
|
||||
</QForm>
|
||||
|
|
|
@ -4,10 +4,10 @@ import { useQuasar } from 'quasar';
|
|||
export function useSummaryDialog() {
|
||||
const quasar = useQuasar();
|
||||
|
||||
function viewSummary(id, summary) {
|
||||
function viewSummary(id, summary, width) {
|
||||
quasar.dialog({
|
||||
component: VnSummaryDialog,
|
||||
componentProps: { id, summary },
|
||||
componentProps: { id, summary, width },
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Binary file not shown.
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 180 KiB After Width: | Height: | Size: 185 KiB |
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
|
@ -1,10 +1,10 @@
|
|||
@font-face {
|
||||
font-family: 'icon';
|
||||
src: url('fonts/icon.eot?y0x93o');
|
||||
src: url('fonts/icon.eot?y0x93o#iefix') format('embedded-opentype'),
|
||||
url('fonts/icon.ttf?y0x93o') format('truetype'),
|
||||
url('fonts/icon.woff?y0x93o') format('woff'),
|
||||
url('fonts/icon.svg?y0x93o#icon') format('svg');
|
||||
src: url('fonts/icon.eot?7j3xju');
|
||||
src: url('fonts/icon.eot?7j3xju#iefix') format('embedded-opentype'),
|
||||
url('fonts/icon.ttf?7j3xju') format('truetype'),
|
||||
url('fonts/icon.woff?7j3xju') format('woff'),
|
||||
url('fonts/icon.svg?7j3xju#icon') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-display: block;
|
||||
|
@ -25,8 +25,14 @@
|
|||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.icon-entry_lastbuys:before {
|
||||
content: "\e91a";
|
||||
.icon-hasItemLost:before {
|
||||
content: "\e957";
|
||||
}
|
||||
.icon-hasItemDelay:before {
|
||||
content: "\e96d";
|
||||
}
|
||||
.icon-add_entries:before {
|
||||
content: "\e953";
|
||||
}
|
||||
.icon-100:before {
|
||||
content: "\e901";
|
||||
|
@ -52,6 +58,9 @@
|
|||
.icon-addperson:before {
|
||||
content: "\e908";
|
||||
}
|
||||
.icon-agencia_tributaria:before {
|
||||
content: "\e948";
|
||||
}
|
||||
.icon-agency:before {
|
||||
content: "\e92a";
|
||||
}
|
||||
|
@ -189,6 +198,9 @@
|
|||
.icon-entry:before {
|
||||
content: "\e937";
|
||||
}
|
||||
.icon-entry_lastbuys:before {
|
||||
content: "\e91a";
|
||||
}
|
||||
.icon-exit:before {
|
||||
content: "\e938";
|
||||
}
|
||||
|
|
|
@ -33,6 +33,11 @@ $dark-shadow-color: black;
|
|||
$layout-shadow-dark: 0 0 10px 2px #00000033, 0 0px 10px #0000003d;
|
||||
$spacing-md: 16px;
|
||||
$color-font-secondary: #777;
|
||||
$width-xs: 400px;
|
||||
$width-sm: 544px;
|
||||
$width-md: 800px;
|
||||
$width-lg: 1280px;
|
||||
$width-xl: 1600px;
|
||||
.bg-success {
|
||||
background-color: $positive;
|
||||
}
|
||||
|
|
|
@ -453,6 +453,7 @@ ticket:
|
|||
service: Service
|
||||
attender: Attender
|
||||
ok: Ok
|
||||
consigneeStreet: Street
|
||||
create:
|
||||
address: Address
|
||||
invoiceOut:
|
||||
|
@ -721,6 +722,7 @@ travel:
|
|||
destination: Destination
|
||||
thermograph: Thermograph
|
||||
travelFileDescription: 'Travel id { travelId }'
|
||||
carrier: Carrier
|
||||
components:
|
||||
topbar: {}
|
||||
itemsFilterPanel:
|
||||
|
|
|
@ -448,6 +448,7 @@ ticket:
|
|||
purchaseRequest: Petición de compra
|
||||
service: Servicio
|
||||
attender: Consignatario
|
||||
consigneeStreet: Dirección
|
||||
create:
|
||||
address: Dirección
|
||||
order:
|
||||
|
@ -691,6 +692,7 @@ travel:
|
|||
destination: Destino
|
||||
thermograph: Termógrafo
|
||||
travelFileDescription: 'Id envío { travelId }'
|
||||
carrier: Transportista
|
||||
components:
|
||||
topbar: {}
|
||||
itemsFilterPanel:
|
||||
|
|
|
@ -53,6 +53,7 @@ const debtWarning = computed(() => {
|
|||
@on-fetch="setData"
|
||||
:summary="$props.summary"
|
||||
data-key="customer"
|
||||
width="lg-width"
|
||||
>
|
||||
<template #menu="{ entity }">
|
||||
<CustomerDescriptorMenu :customer="entity" />
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
<script setup>
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
|
||||
|
@ -169,9 +170,16 @@ en:
|
|||
fi: FI
|
||||
salesPersonFk: Salesperson
|
||||
provinceFk: Province
|
||||
isActive: Is active
|
||||
city: City
|
||||
phone: Phone
|
||||
email: Email
|
||||
isToBeMailed: Mailed
|
||||
isEqualizated: Equailized
|
||||
businessTypeFk: Business type
|
||||
sageTaxTypeFk: Sage Tax Type
|
||||
sageTransactionTypeFk: Sage Tax Type
|
||||
payMethodFk: Billing data
|
||||
zoneFk: Zone
|
||||
socialName : Social name
|
||||
name: Name
|
||||
|
@ -180,6 +188,13 @@ es:
|
|||
params:
|
||||
search: Contiene
|
||||
fi: NIF
|
||||
isActive: Activo
|
||||
isToBeMailed: A enviar
|
||||
isEqualizated: Recargo de equivalencia
|
||||
businessTypeFk: Tipo de negocio
|
||||
sageTaxTypeFk: Tipo de impuesto Sage
|
||||
sageTransactionTypeFk: Tipo de impuesto Sage
|
||||
payMethodFk: Forma de pago
|
||||
salesPersonFk: Comercial
|
||||
provinceFk: Provincia
|
||||
city: Ciudad
|
||||
|
|
|
@ -38,8 +38,8 @@ const columns = computed(() => [
|
|||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('globals.name'),
|
||||
name: 'name',
|
||||
label: t('globals.name'),
|
||||
isTitle: true,
|
||||
create: true,
|
||||
columnClass: 'expand',
|
||||
|
@ -51,25 +51,30 @@ const columns = computed(() => [
|
|||
isTitle: true,
|
||||
create: true,
|
||||
columnClass: 'expand',
|
||||
attrs: {
|
||||
uppercase: true,
|
||||
},
|
||||
columnFilter: {
|
||||
component: 'select',
|
||||
attrs: {
|
||||
url: 'Clients',
|
||||
fields: ['socialName'],
|
||||
optionLabel: 'socialName',
|
||||
optionValue: 'socialName',
|
||||
uppercase: false,
|
||||
},
|
||||
},
|
||||
attrs: {
|
||||
uppercase: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('customer.extendedList.tableVisibleColumns.fi'),
|
||||
name: 'fi',
|
||||
label: t('customer.extendedList.tableVisibleColumns.fi'),
|
||||
create: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('customer.extendedList.tableVisibleColumns.salesPersonFk'),
|
||||
name: 'salesPersonFk',
|
||||
label: t('customer.extendedList.tableVisibleColumns.salesPersonFk'),
|
||||
component: 'select',
|
||||
attrs: {
|
||||
url: 'Workers/activeWithInheritedRole',
|
||||
|
@ -85,8 +90,8 @@ const columns = computed(() => [
|
|||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('customer.summary.credit'),
|
||||
name: 'credit',
|
||||
label: t('customer.summary.credit'),
|
||||
columnFilter: {
|
||||
component: 'number',
|
||||
inWhere: true,
|
||||
|
@ -94,8 +99,8 @@ const columns = computed(() => [
|
|||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('customer.extendedList.tableVisibleColumns.creditInsurance'),
|
||||
name: 'creditInsurance',
|
||||
label: t('customer.extendedList.tableVisibleColumns.creditInsurance'),
|
||||
columnFilter: {
|
||||
component: 'number',
|
||||
inWhere: true,
|
||||
|
@ -103,8 +108,8 @@ const columns = computed(() => [
|
|||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('customer.extendedList.tableVisibleColumns.phone'),
|
||||
name: 'phone',
|
||||
label: t('customer.extendedList.tableVisibleColumns.phone'),
|
||||
cardVisible: true,
|
||||
columnFilter: {
|
||||
component: 'number',
|
||||
|
@ -123,8 +128,8 @@ const columns = computed(() => [
|
|||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('customer.summary.mobile'),
|
||||
name: 'mobile',
|
||||
label: t('customer.summary.mobile'),
|
||||
cardVisible: true,
|
||||
columnFilter: {
|
||||
component: 'number',
|
||||
|
@ -133,8 +138,8 @@ const columns = computed(() => [
|
|||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('customer.extendedList.tableVisibleColumns.street'),
|
||||
name: 'street',
|
||||
label: t('customer.extendedList.tableVisibleColumns.street'),
|
||||
create: true,
|
||||
columnFilter: {
|
||||
inWhere: true,
|
||||
|
@ -143,8 +148,8 @@ const columns = computed(() => [
|
|||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('customer.extendedList.tableVisibleColumns.countryFk'),
|
||||
name: 'countryFk',
|
||||
label: t('customer.extendedList.tableVisibleColumns.countryFk'),
|
||||
columnFilter: {
|
||||
component: 'select',
|
||||
inWhere: true,
|
||||
|
@ -157,8 +162,8 @@ const columns = computed(() => [
|
|||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('customer.extendedList.tableVisibleColumns.provinceFk'),
|
||||
name: 'provinceFk',
|
||||
label: t('customer.extendedList.tableVisibleColumns.provinceFk'),
|
||||
component: 'select',
|
||||
attrs: {
|
||||
url: 'Provinces',
|
||||
|
@ -170,24 +175,24 @@ const columns = computed(() => [
|
|||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('customer.summary.city'),
|
||||
name: 'city',
|
||||
label: t('customer.summary.city'),
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('customer.summary.postcode'),
|
||||
name: 'postcode',
|
||||
label: t('customer.summary.postcode'),
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('globals.params.email'),
|
||||
name: 'email',
|
||||
label: t('globals.params.email'),
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('customer.extendedList.tableVisibleColumns.created'),
|
||||
name: 'created',
|
||||
label: t('customer.extendedList.tableVisibleColumns.created'),
|
||||
format: ({ created }) => toDate(created),
|
||||
columnFilter: {
|
||||
component: 'date',
|
||||
|
@ -197,10 +202,13 @@ const columns = computed(() => [
|
|||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('customer.extendedList.tableVisibleColumns.businessTypeFk'),
|
||||
name: 'businessTypeFk',
|
||||
label: t('customer.extendedList.tableVisibleColumns.businessTypeFk'),
|
||||
create: true,
|
||||
component: 'select',
|
||||
columnFilter: {
|
||||
inWhere: true,
|
||||
},
|
||||
attrs: {
|
||||
url: 'BusinessTypes',
|
||||
fields: ['code', 'description'],
|
||||
|
@ -215,8 +223,8 @@ const columns = computed(() => [
|
|||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('customer.summary.payMethodFk'),
|
||||
name: 'payMethodFk',
|
||||
label: t('customer.summary.payMethodFk'),
|
||||
columnFilter: {
|
||||
component: 'select',
|
||||
attrs: {
|
||||
|
@ -236,8 +244,6 @@ const columns = computed(() => [
|
|||
optionLabel: 'vat',
|
||||
url: 'SageTaxTypes',
|
||||
},
|
||||
alias: 'sti',
|
||||
inWhere: true,
|
||||
},
|
||||
format: (row, dashIfEmpty) => dashIfEmpty(row.sageTaxType),
|
||||
},
|
||||
|
@ -251,15 +257,13 @@ const columns = computed(() => [
|
|||
optionLabel: 'transaction',
|
||||
url: 'SageTransactionTypes',
|
||||
},
|
||||
alias: 'stt',
|
||||
inWhere: true,
|
||||
},
|
||||
format: (row, dashIfEmpty) => dashIfEmpty(row.sageTransactionType),
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('customer.summary.isActive'),
|
||||
name: 'isActive',
|
||||
label: t('customer.summary.isActive'),
|
||||
chip: {
|
||||
color: null,
|
||||
condition: (value) => !value,
|
||||
|
@ -271,24 +275,24 @@ const columns = computed(() => [
|
|||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('globals.isVies'),
|
||||
name: 'isVies',
|
||||
label: t('globals.isVies'),
|
||||
columnFilter: {
|
||||
inWhere: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('customer.extendedList.tableVisibleColumns.isTaxDataChecked'),
|
||||
name: 'isTaxDataChecked',
|
||||
label: t('customer.extendedList.tableVisibleColumns.isTaxDataChecked'),
|
||||
columnFilter: {
|
||||
inWhere: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('customer.summary.isEqualizated'),
|
||||
name: 'isEqualizated',
|
||||
label: t('customer.summary.isEqualizated'),
|
||||
create: true,
|
||||
columnFilter: {
|
||||
inWhere: true,
|
||||
|
@ -296,8 +300,8 @@ const columns = computed(() => [
|
|||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('customer.extendedList.tableVisibleColumns.isFreezed'),
|
||||
name: 'isFreezed',
|
||||
label: t('customer.extendedList.tableVisibleColumns.isFreezed'),
|
||||
chip: {
|
||||
color: null,
|
||||
condition: (value) => value,
|
||||
|
@ -309,48 +313,48 @@ const columns = computed(() => [
|
|||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('customer.extendedList.tableVisibleColumns.hasToInvoice'),
|
||||
name: 'hasToInvoice',
|
||||
label: t('customer.extendedList.tableVisibleColumns.hasToInvoice'),
|
||||
columnFilter: {
|
||||
inWhere: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('customer.extendedList.tableVisibleColumns.hasToInvoiceByAddress'),
|
||||
name: 'hasToInvoiceByAddress',
|
||||
label: t('customer.extendedList.tableVisibleColumns.hasToInvoiceByAddress'),
|
||||
columnFilter: {
|
||||
inWhere: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('customer.extendedList.tableVisibleColumns.isToBeMailed'),
|
||||
name: 'isToBeMailed',
|
||||
label: t('customer.extendedList.tableVisibleColumns.isToBeMailed'),
|
||||
columnFilter: {
|
||||
inWhere: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('customer.summary.hasLcr'),
|
||||
name: 'hasLcr',
|
||||
label: t('customer.summary.hasLcr'),
|
||||
columnFilter: {
|
||||
inWhere: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('customer.summary.hasCoreVnl'),
|
||||
name: 'hasCoreVnl',
|
||||
label: t('customer.summary.hasCoreVnl'),
|
||||
columnFilter: {
|
||||
inWhere: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('customer.extendedList.tableVisibleColumns.hasSepaVnl'),
|
||||
name: 'hasSepaVnl',
|
||||
label: t('customer.extendedList.tableVisibleColumns.hasSepaVnl'),
|
||||
columnFilter: {
|
||||
inWhere: true,
|
||||
},
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
import { onBeforeMount, ref } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
|
||||
import { useQuasar } from 'quasar';
|
||||
import axios from 'axios';
|
||||
import VnLocation from 'src/components/common/VnLocation.vue';
|
||||
import FetchData from 'components/FetchData.vue';
|
||||
|
@ -13,11 +13,12 @@ import VnSelect from 'src/components/common/VnSelect.vue';
|
|||
import VnSelectDialog from 'src/components/common/VnSelectDialog.vue';
|
||||
import CustomerNewCustomsAgent from 'src/pages/Customer/components/CustomerNewCustomsAgent.vue';
|
||||
import VnInputNumber from 'src/components/common/VnInputNumber.vue';
|
||||
import VnConfirm from 'components/ui/VnConfirm.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
|
||||
const quasar = useQuasar();
|
||||
const urlUpdate = ref('');
|
||||
const agencyModes = ref([]);
|
||||
const incoterms = ref([]);
|
||||
|
@ -83,8 +84,26 @@ const deleteNote = (id, index) => {
|
|||
notes.value.splice(index, 1);
|
||||
};
|
||||
|
||||
const onDataSaved = async () => {
|
||||
let payload = {
|
||||
const updateAddress = async (data) => {
|
||||
await axios.patch(urlUpdate.value, data);
|
||||
};
|
||||
|
||||
const updateAddressTicket = async () => {
|
||||
urlUpdate.value += '?updateObservations=true';
|
||||
};
|
||||
|
||||
const updateObservations = async (payload) => {
|
||||
await axios.post('AddressObservations/crud', payload);
|
||||
notes.value = [];
|
||||
deletes.value = [];
|
||||
toCustomerAddress();
|
||||
};
|
||||
async function updateAll({ data, payload }) {
|
||||
await updateObservations(payload);
|
||||
await updateAddress(data);
|
||||
}
|
||||
function getPayload() {
|
||||
return {
|
||||
creates: notes.value.filter((note) => note.$isNew),
|
||||
deletes: deletes.value,
|
||||
updates: notes.value
|
||||
|
@ -101,14 +120,40 @@ const onDataSaved = async () => {
|
|||
where: { id: note.id },
|
||||
})),
|
||||
};
|
||||
}
|
||||
|
||||
await axios.post('AddressObservations/crud', payload);
|
||||
notes.value = [];
|
||||
deletes.value = [];
|
||||
async function handleDialog(data) {
|
||||
const payload = getPayload();
|
||||
const body = { data, payload };
|
||||
if (payload.updates.length) {
|
||||
quasar
|
||||
.dialog({
|
||||
component: VnConfirm,
|
||||
componentProps: {
|
||||
title: t(
|
||||
'confirmTicket'
|
||||
),
|
||||
message: t('confirmDeletionMessage'),
|
||||
},
|
||||
})
|
||||
.onOk(async () => {
|
||||
await updateAddressTicket();
|
||||
await updateAll(body);
|
||||
toCustomerAddress();
|
||||
};
|
||||
})
|
||||
.onCancel(async () => {
|
||||
await updateAll(body);
|
||||
toCustomerAddress();
|
||||
});
|
||||
} else {
|
||||
updateAll(body);
|
||||
toCustomerAddress();
|
||||
}
|
||||
}
|
||||
|
||||
const toCustomerAddress = () => {
|
||||
notes.value = [];
|
||||
deletes.value = [];
|
||||
router.push({
|
||||
name: 'CustomerAddress',
|
||||
params: {
|
||||
|
@ -143,7 +188,7 @@ function handleLocation(data, location) {
|
|||
:observe-form-changes="false"
|
||||
:url-update="urlUpdate"
|
||||
:url="`Addresses/${route.params.addressId}`"
|
||||
@on-data-saved="onDataSaved()"
|
||||
:save-fn="handleDialog"
|
||||
auto-load
|
||||
>
|
||||
<template #moreActions>
|
||||
|
@ -336,4 +381,9 @@ es:
|
|||
Remove note: Eliminar nota
|
||||
Longitude: Longitud
|
||||
Latitude: Latitud
|
||||
confirmTicket: ¿Desea modificar también los estados de todos los tickets que están a punto de ser servidos?
|
||||
confirmDeletionMessage: Si le das a aceptar, se modificaran todas las notas de los ticket a futuro
|
||||
en:
|
||||
confirmTicket: Do you also want to modify the states of all the tickets that are about to be served?
|
||||
confirmDeletionMessage: If you click accept, all the notes of the future tickets will be modified
|
||||
</i18n>
|
||||
|
|
|
@ -114,7 +114,7 @@ const columns = computed(() => [
|
|||
action: ({ id }) =>
|
||||
window.open(
|
||||
router.resolve({ params: { id }, name: 'TicketSale' }).href,
|
||||
'_blank'
|
||||
'_blank',
|
||||
),
|
||||
isPrimary: true,
|
||||
},
|
||||
|
@ -122,7 +122,7 @@ const columns = computed(() => [
|
|||
title: t('components.smartCard.viewSummary'),
|
||||
icon: 'preview',
|
||||
isPrimary: true,
|
||||
action: (row) => viewSummary(row.id, TicketSummary),
|
||||
action: (row) => viewSummary(row.id, TicketSummary, 'lg-width'),
|
||||
},
|
||||
],
|
||||
},
|
||||
|
|
|
@ -2,13 +2,10 @@
|
|||
import { ref, computed, onMounted } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
import CardDescriptor from 'components/ui/CardDescriptor.vue';
|
||||
import VnLv from 'src/components/ui/VnLv.vue';
|
||||
|
||||
import { toDate } from 'src/filters';
|
||||
import { getUrl } from 'src/composables/getUrl';
|
||||
import filter from './EntryFilter.js';
|
||||
import EntryDescriptorMenu from './EntryDescriptorMenu.vue';
|
||||
|
||||
const $props = defineProps({
|
||||
|
@ -23,7 +20,42 @@ const route = useRoute();
|
|||
const { t } = useI18n();
|
||||
const entryDescriptorRef = ref(null);
|
||||
const url = ref();
|
||||
|
||||
const entryFilter = {
|
||||
include: [
|
||||
{
|
||||
relation: 'travel',
|
||||
scope: {
|
||||
fields: ['id', 'landed', 'shipped', 'agencyModeFk', 'warehouseOutFk'],
|
||||
include: [
|
||||
{
|
||||
relation: 'agency',
|
||||
scope: {
|
||||
fields: ['name'],
|
||||
},
|
||||
},
|
||||
{
|
||||
relation: 'warehouseOut',
|
||||
scope: {
|
||||
fields: ['name'],
|
||||
},
|
||||
},
|
||||
{
|
||||
relation: 'warehouseIn',
|
||||
scope: {
|
||||
fields: ['name'],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
relation: 'supplier',
|
||||
scope: {
|
||||
fields: ['id', 'nickname'],
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
const entityId = computed(() => {
|
||||
return $props.id || route.params.id;
|
||||
});
|
||||
|
@ -58,9 +90,10 @@ const getEntryRedirectionFilter = (entry) => {
|
|||
ref="entryDescriptorRef"
|
||||
module="Entry"
|
||||
:url="`Entries/${entityId}`"
|
||||
:filter="filter"
|
||||
:userFilter="entryFilter"
|
||||
title="supplier.nickname"
|
||||
data-key="Entry"
|
||||
width="lg-width"
|
||||
>
|
||||
<template #menu="{ entity }">
|
||||
<EntryDescriptorMenu :id="entity.id" />
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
<script setup>
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { useQuasar } from 'quasar';
|
||||
import axios from 'axios';
|
||||
import { usePrintService } from 'composables/usePrintService';
|
||||
import useNotify from 'src/composables/useNotify.js';
|
||||
import VnConfirm from 'src/components/ui/VnConfirm.vue';
|
||||
|
||||
const { openReport } = usePrintService();
|
||||
|
||||
|
@ -9,14 +15,47 @@ const $props = defineProps({
|
|||
required: true,
|
||||
},
|
||||
});
|
||||
const { t } = useI18n();
|
||||
const { notify } = useNotify();
|
||||
const quasar = useQuasar();
|
||||
const route = useRoute();
|
||||
|
||||
function showEntryReport() {
|
||||
openReport(`Entries/${$props.id}/entry-order-pdf`);
|
||||
}
|
||||
|
||||
const openDialog = () => {
|
||||
quasar.dialog({
|
||||
component: VnConfirm,
|
||||
componentProps: {
|
||||
title: t('transferEntryDialog'),
|
||||
promise: transferEntry,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
const transferEntry = async () => {
|
||||
const { data } = await axios.post(`Entries/${route.params.id}/transfer`);
|
||||
notify('globals.dataSaved', 'positive');
|
||||
const url = `#/entry/${data.newEntryFk.newEntryFk}/summary`;
|
||||
window.open(url, '_blank');
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<QItem v-ripple clickable @click="showEntryReport">
|
||||
<QItemSection>{{ $t('entryList.list.showEntryReport') }}</QItemSection>
|
||||
<QItemSection>{{ $t('entry.descriptorMenu.showEntryReport') }}</QItemSection>
|
||||
</QItem>
|
||||
<QItem v-ripple clickable @click="openDialog">
|
||||
<QItemSection>{{ t('transferEntry') }}</QItemSection>
|
||||
</QItem>
|
||||
</template>
|
||||
|
||||
<i18n>
|
||||
en:
|
||||
transferEntryDialog: The entries will be transferred to the next day
|
||||
transferEntry: Transfer Entry
|
||||
es:
|
||||
transferEntryDialog: Se van a transferir las compras al dia siguiente
|
||||
transferEntry: Transferir Entrada
|
||||
</i18n>
|
||||
|
|
|
@ -76,6 +76,8 @@ entry:
|
|||
warehouseInFk: Warehouse in
|
||||
search: Search entries
|
||||
searchInfo: You can search by entry reference
|
||||
descriptorMenu:
|
||||
showEntryReport: Show entry report
|
||||
entryFilter:
|
||||
params:
|
||||
invoiceNumber: Invoice number
|
||||
|
|
|
@ -75,6 +75,8 @@ entry:
|
|||
warehouseInFk: Alm. entrada
|
||||
daysOnward: Días adelante
|
||||
daysAgo: Días atras
|
||||
descriptorMenu:
|
||||
showEntryReport: Ver informe del pedido
|
||||
search: Buscar entradas
|
||||
searchInfo: Puedes buscar por referencia de entrada
|
||||
entryFilter:
|
||||
|
|
|
@ -268,7 +268,7 @@ function deleteFile(dmsFk) {
|
|||
</VnRow>
|
||||
<VnRow>
|
||||
<VnSelect
|
||||
:label="t('invoicein.summary.sage')"
|
||||
:label="t('invoiceIn.summary.sage')"
|
||||
v-model="data.withholdingSageFk"
|
||||
:options="sageWithholdings"
|
||||
option-value="id"
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
<script setup>
|
||||
import VnCard from 'components/common/VnCard.vue';
|
||||
import VnCardBeta from 'components/common/VnCardBeta.vue';
|
||||
import InvoiceInDescriptor from './InvoiceInDescriptor.vue';
|
||||
import InvoiceInFilter from '../InvoiceInFilter.vue';
|
||||
import InvoiceInSearchbar from '../InvoiceInSearchbar.vue';
|
||||
import { onBeforeRouteUpdate } from 'vue-router';
|
||||
import { setRectificative } from '../composables/setRectificative';
|
||||
|
||||
const filter = {
|
||||
include: [
|
||||
|
@ -39,20 +35,13 @@ const filter = {
|
|||
},
|
||||
],
|
||||
};
|
||||
|
||||
onBeforeRouteUpdate(async (to) => await setRectificative(to));
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<VnCard
|
||||
<VnCardBeta
|
||||
data-key="InvoiceIn"
|
||||
base-url="InvoiceIns"
|
||||
:filter="filter"
|
||||
:descriptor="InvoiceInDescriptor"
|
||||
:filter-panel="InvoiceInFilter"
|
||||
search-data-key="InvoiceInList"
|
||||
>
|
||||
<template #searchbar>
|
||||
<InvoiceInSearchbar />
|
||||
</template>
|
||||
</VnCard>
|
||||
:user-filter="filter"
|
||||
/>
|
||||
</template>
|
||||
|
|
|
@ -105,7 +105,7 @@ async function setInvoiceCorrection(id) {
|
|||
if (correctingData[0]) invoiceInCorrection.corrected = correctingData[0].correctedFk;
|
||||
|
||||
invoiceInCorrection.correcting = correctedData.map(
|
||||
(corrected) => corrected.correctingFk
|
||||
(corrected) => corrected.correctingFk,
|
||||
);
|
||||
}
|
||||
</script>
|
||||
|
@ -117,18 +117,19 @@ async function setInvoiceCorrection(id) {
|
|||
:url="`InvoiceIns/${entityId}`"
|
||||
:filter="filter"
|
||||
title="supplierRef"
|
||||
width="xlg-width"
|
||||
>
|
||||
<template #menu="{ entity }">
|
||||
<InvoiceInDescriptorMenu :invoice="entity" />
|
||||
</template>
|
||||
<template #body="{ entity }">
|
||||
<VnLv :label="t('invoicein.list.issued')" :value="toDate(entity.issued)" />
|
||||
<VnLv :label="t('invoiceIn.list.issued')" :value="toDate(entity.issued)" />
|
||||
<VnLv
|
||||
:label="t('invoicein.summary.bookedDate')"
|
||||
:label="t('invoiceIn.summary.bookedDate')"
|
||||
:value="toDate(entity.booked)"
|
||||
/>
|
||||
<VnLv :label="t('invoicein.list.amount')" :value="toCurrency(totalAmount)" />
|
||||
<VnLv :label="t('invoicein.list.supplier')">
|
||||
<VnLv :label="t('invoiceIn.list.amount')" :value="toCurrency(totalAmount)" />
|
||||
<VnLv :label="t('invoiceIn.list.supplier')">
|
||||
<template #value>
|
||||
<span class="link">
|
||||
{{ entity?.supplier?.nickname }}
|
||||
|
@ -145,7 +146,7 @@ async function setInvoiceCorrection(id) {
|
|||
color="primary"
|
||||
:to="routes.getSupplier(entity.supplierFk)"
|
||||
>
|
||||
<QTooltip>{{ t('invoicein.list.supplier') }}</QTooltip>
|
||||
<QTooltip>{{ t('globals.supplier') }}</QTooltip>
|
||||
</QBtn>
|
||||
<QBtn
|
||||
size="md"
|
||||
|
@ -153,7 +154,7 @@ async function setInvoiceCorrection(id) {
|
|||
color="primary"
|
||||
:to="routes.getEntry(entity.entryFk)"
|
||||
>
|
||||
<QTooltip>{{ t('Entry') }}</QTooltip>
|
||||
<QTooltip>{{ t('globals.entry') }}</QTooltip>
|
||||
</QBtn>
|
||||
<QBtn
|
||||
size="md"
|
||||
|
@ -161,7 +162,7 @@ async function setInvoiceCorrection(id) {
|
|||
color="primary"
|
||||
:to="routes.getTickets(entity.supplierFk)"
|
||||
>
|
||||
<QTooltip>{{ t('InvoiceOut.card.ticketList') }}</QTooltip>
|
||||
<QTooltip>{{ t('globals.ticketList') }}</QTooltip>
|
||||
</QBtn>
|
||||
<QBtn
|
||||
v-if="
|
||||
|
|
|
@ -40,15 +40,15 @@ const cplusRectificationTypes = ref([]);
|
|||
const siiTypeInvoiceIns = ref([]);
|
||||
const actions = {
|
||||
unbook: {
|
||||
title: t('assertAction', { action: t('invoicein.descriptorMenu.unbook') }),
|
||||
title: t('assertAction', { action: t('invoiceIn.descriptorMenu.unbook') }),
|
||||
action: toUnbook,
|
||||
},
|
||||
delete: {
|
||||
title: t('assertAction', { action: t('invoicein.descriptorMenu.delete') }),
|
||||
title: t('assertAction', { action: t('invoiceIn.descriptorMenu.delete') }),
|
||||
action: deleteInvoice,
|
||||
},
|
||||
clone: {
|
||||
title: t('assertAction', { action: t('invoicein.descriptorMenu.clone') }),
|
||||
title: t('assertAction', { action: t('invoiceIn.descriptorMenu.clone') }),
|
||||
action: cloneInvoice,
|
||||
},
|
||||
showPdf: { cb: showPdfInvoice },
|
||||
|
@ -96,7 +96,7 @@ async function deleteInvoice() {
|
|||
await axios.delete(`InvoiceIns/${entityId.value}`);
|
||||
quasar.notify({
|
||||
type: 'positive',
|
||||
message: t('invoicein.descriptorMenu.invoiceDeleted'),
|
||||
message: t('invoiceIn.descriptorMenu.invoiceDeleted'),
|
||||
});
|
||||
push({ path: '/invoice-in' });
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ async function cloneInvoice() {
|
|||
const { data } = await axios.post(`InvoiceIns/${entityId.value}/clone`);
|
||||
quasar.notify({
|
||||
type: 'positive',
|
||||
message: t('invoicein.descriptorMenu.invoiceCloned'),
|
||||
message: t('invoiceIn.descriptorMenu.invoiceCloned'),
|
||||
});
|
||||
push({ path: `/invoice-in/${data.id}/summary` });
|
||||
}
|
||||
|
@ -149,7 +149,7 @@ function sendPdfInvoice({ address }) {
|
|||
const createInvoiceInCorrection = async () => {
|
||||
const { data: correctingId } = await axios.post(
|
||||
'InvoiceIns/corrective',
|
||||
Object.assign(correctionFormData, { id: entityId.value })
|
||||
Object.assign(correctionFormData, { id: entityId.value }),
|
||||
);
|
||||
push({ path: `/invoice-in/${correctingId}/summary` });
|
||||
};
|
||||
|
@ -186,7 +186,7 @@ const createInvoiceInCorrection = async () => {
|
|||
clickable
|
||||
@click="book(entityId)"
|
||||
>
|
||||
<QItemSection>{{ t('invoicein.descriptorMenu.toBook') }}</QItemSection>
|
||||
<QItemSection>{{ t('invoiceIn.descriptorMenu.toBook') }}</QItemSection>
|
||||
</QItem>
|
||||
</template>
|
||||
</InvoiceInToBook>
|
||||
|
@ -197,7 +197,7 @@ const createInvoiceInCorrection = async () => {
|
|||
@click="triggerMenu('unbook')"
|
||||
>
|
||||
<QItemSection>
|
||||
{{ t('invoicein.descriptorMenu.toUnbook') }}
|
||||
{{ t('invoiceIn.descriptorMenu.toUnbook') }}
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem
|
||||
|
@ -206,19 +206,19 @@ const createInvoiceInCorrection = async () => {
|
|||
clickable
|
||||
@click="triggerMenu('delete')"
|
||||
>
|
||||
<QItemSection>{{ t('invoicein.descriptorMenu.deleteInvoice') }}</QItemSection>
|
||||
<QItemSection>{{ t('invoiceIn.descriptorMenu.deleteInvoice') }}</QItemSection>
|
||||
</QItem>
|
||||
<QItem v-if="canEditProp('clone')" v-ripple clickable @click="triggerMenu('clone')">
|
||||
<QItemSection>{{ t('invoicein.descriptorMenu.cloneInvoice') }}</QItemSection>
|
||||
<QItemSection>{{ t('invoiceIn.descriptorMenu.cloneInvoice') }}</QItemSection>
|
||||
</QItem>
|
||||
<QItem v-if="isAgricultural()" v-ripple clickable @click="triggerMenu('showPdf')">
|
||||
<QItemSection>{{
|
||||
t('invoicein.descriptorMenu.showAgriculturalPdf')
|
||||
t('invoiceIn.descriptorMenu.showAgriculturalPdf')
|
||||
}}</QItemSection>
|
||||
</QItem>
|
||||
<QItem v-if="isAgricultural()" v-ripple clickable @click="triggerMenu('sendPdf')">
|
||||
<QItemSection
|
||||
>{{ t('invoicein.descriptorMenu.sendAgriculturalPdf') }}...</QItemSection
|
||||
>{{ t('invoiceIn.descriptorMenu.sendAgriculturalPdf') }}...</QItemSection
|
||||
>
|
||||
</QItem>
|
||||
<QItem
|
||||
|
@ -228,7 +228,7 @@ const createInvoiceInCorrection = async () => {
|
|||
@click="triggerMenu('correct')"
|
||||
>
|
||||
<QItemSection
|
||||
>{{ t('invoicein.descriptorMenu.createCorrective') }}...</QItemSection
|
||||
>{{ t('invoiceIn.descriptorMenu.createCorrective') }}...</QItemSection
|
||||
>
|
||||
</QItem>
|
||||
<QItem v-if="invoice.dmsFk" v-ripple clickable @click="downloadFile(invoice.dmsFk)">
|
||||
|
@ -272,7 +272,6 @@ const createInvoiceInCorrection = async () => {
|
|||
>
|
||||
<template #option="{ itemProps, opt }">
|
||||
<QItem v-bind="itemProps">
|
||||
{{ console.log('opt: ', opt) }}
|
||||
<QItemSection>
|
||||
<QItemLabel
|
||||
>{{ opt.id }} -
|
||||
|
|
|
@ -27,14 +27,14 @@ const intrastatTotals = ref({ amount: 0, net: 0, stems: 0 });
|
|||
const vatColumns = ref([
|
||||
{
|
||||
name: 'expense',
|
||||
label: 'invoicein.summary.expense',
|
||||
label: 'invoiceIn.summary.expense',
|
||||
field: (row) => row.expenseFk,
|
||||
sortable: true,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
name: 'landed',
|
||||
label: 'invoicein.summary.taxableBase',
|
||||
label: 'invoiceIn.summary.taxableBase',
|
||||
field: (row) => row.taxableBase,
|
||||
format: (value) => toCurrency(value),
|
||||
sortable: true,
|
||||
|
@ -42,7 +42,7 @@ const vatColumns = ref([
|
|||
},
|
||||
{
|
||||
name: 'vat',
|
||||
label: 'invoicein.summary.sageVat',
|
||||
label: 'invoiceIn.summary.sageVat',
|
||||
field: (row) => {
|
||||
if (row.taxTypeSage) return `#${row.taxTypeSage.id} : ${row.taxTypeSage.vat}`;
|
||||
},
|
||||
|
@ -52,7 +52,7 @@ const vatColumns = ref([
|
|||
},
|
||||
{
|
||||
name: 'transaction',
|
||||
label: 'invoicein.summary.sageTransaction',
|
||||
label: 'invoiceIn.summary.sageTransaction',
|
||||
field: (row) => {
|
||||
if (row.transactionTypeSage)
|
||||
return `#${row.transactionTypeSage.id} : ${row.transactionTypeSage?.transaction}`;
|
||||
|
@ -63,7 +63,7 @@ const vatColumns = ref([
|
|||
},
|
||||
{
|
||||
name: 'rate',
|
||||
label: 'invoicein.summary.rate',
|
||||
label: 'invoiceIn.summary.rate',
|
||||
field: (row) => taxRate(row.taxableBase, row.taxTypeSage?.rate),
|
||||
format: (value) => toCurrency(value),
|
||||
sortable: true,
|
||||
|
@ -71,7 +71,7 @@ const vatColumns = ref([
|
|||
},
|
||||
{
|
||||
name: 'currency',
|
||||
label: 'invoicein.summary.currency',
|
||||
label: 'invoiceIn.summary.currency',
|
||||
field: (row) => row.foreignValue,
|
||||
format: (val) => val && toCurrency(val, currency.value),
|
||||
sortable: true,
|
||||
|
@ -82,21 +82,21 @@ const vatColumns = ref([
|
|||
const dueDayColumns = ref([
|
||||
{
|
||||
name: 'date',
|
||||
label: 'invoicein.summary.dueDay',
|
||||
label: 'invoiceIn.summary.dueDay',
|
||||
field: (row) => toDate(row.dueDated),
|
||||
sortable: true,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
name: 'bank',
|
||||
label: 'invoicein.summary.bank',
|
||||
label: 'invoiceIn.summary.bank',
|
||||
field: (row) => row.bank.bank,
|
||||
sortable: true,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
name: 'amount',
|
||||
label: 'invoicein.list.amount',
|
||||
label: 'invoiceIn.list.amount',
|
||||
field: (row) => row.amount,
|
||||
format: (value) => toCurrency(value),
|
||||
sortable: true,
|
||||
|
@ -104,7 +104,7 @@ const dueDayColumns = ref([
|
|||
},
|
||||
{
|
||||
name: 'landed',
|
||||
label: 'invoicein.summary.foreignValue',
|
||||
label: 'invoiceIn.summary.foreignValue',
|
||||
field: (row) => row.foreignValue,
|
||||
format: (val) => val && toCurrency(val, currency.value),
|
||||
sortable: true,
|
||||
|
@ -115,7 +115,7 @@ const dueDayColumns = ref([
|
|||
const intrastatColumns = ref([
|
||||
{
|
||||
name: 'code',
|
||||
label: 'invoicein.summary.code',
|
||||
label: 'invoiceIn.summary.code',
|
||||
field: (row) => {
|
||||
return `${row.intrastat.id}: ${row.intrastat?.description}`;
|
||||
},
|
||||
|
@ -124,21 +124,21 @@ const intrastatColumns = ref([
|
|||
},
|
||||
{
|
||||
name: 'amount',
|
||||
label: 'invoicein.list.amount',
|
||||
label: 'invoiceIn.list.amount',
|
||||
field: (row) => toCurrency(row.amount),
|
||||
sortable: true,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
name: 'net',
|
||||
label: 'invoicein.summary.net',
|
||||
label: 'invoiceIn.summary.net',
|
||||
field: (row) => row.net,
|
||||
sortable: true,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
name: 'stems',
|
||||
label: 'invoicein.summary.stems',
|
||||
label: 'invoiceIn.summary.stems',
|
||||
field: (row) => row.stems,
|
||||
format: (value) => value,
|
||||
sortable: true,
|
||||
|
@ -146,7 +146,7 @@ const intrastatColumns = ref([
|
|||
},
|
||||
{
|
||||
name: 'landed',
|
||||
label: 'invoicein.summary.country',
|
||||
label: 'invoiceIn.summary.country',
|
||||
field: (row) => row.country?.code,
|
||||
format: (value) => value,
|
||||
sortable: true,
|
||||
|
@ -214,7 +214,7 @@ const getLink = (param) => `#/invoice-in/${entityId.value}/${param}`;
|
|||
/>
|
||||
</QCardSection>
|
||||
<VnLv
|
||||
:label="t('invoicein.list.supplier')"
|
||||
:label="t('invoiceIn.list.supplier')"
|
||||
:value="entity.supplier?.name"
|
||||
>
|
||||
<template #value>
|
||||
|
@ -225,14 +225,14 @@ const getLink = (param) => `#/invoice-in/${entityId.value}/${param}`;
|
|||
</template>
|
||||
</VnLv>
|
||||
<VnLv
|
||||
:label="t('invoicein.list.supplierRef')"
|
||||
:label="t('invoiceIn.list.supplierRef')"
|
||||
:value="entity.supplierRef"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('invoicein.summary.currency')"
|
||||
:label="t('invoiceIn.summary.currency')"
|
||||
:value="entity.currency?.code"
|
||||
/>
|
||||
<VnLv :label="t('invoicein.serial')" :value="`${entity.serial}`" />
|
||||
<VnLv :label="t('invoiceIn.serial')" :value="`${entity.serial}`" />
|
||||
<VnLv
|
||||
:label="t('globals.country')"
|
||||
:value="entity.supplier?.country?.code"
|
||||
|
@ -247,19 +247,19 @@ const getLink = (param) => `#/invoice-in/${entityId.value}/${param}`;
|
|||
</QCardSection>
|
||||
<VnLv
|
||||
:ellipsis-value="false"
|
||||
:label="t('invoicein.summary.issued')"
|
||||
:label="t('invoiceIn.summary.issued')"
|
||||
:value="toDate(entity.issued)"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('invoicein.summary.operated')"
|
||||
:label="t('invoiceIn.summary.operated')"
|
||||
:value="toDate(entity.operated)"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('invoicein.summary.bookEntried')"
|
||||
:label="t('invoiceIn.summary.bookEntried')"
|
||||
:value="toDate(entity.bookEntried)"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('invoicein.summary.bookedDate')"
|
||||
:label="t('invoiceIn.summary.bookedDate')"
|
||||
:value="toDate(entity.booked)"
|
||||
/>
|
||||
<VnLv :label="t('globals.isVies')" :value="entity.supplier?.isVies" />
|
||||
|
@ -272,18 +272,18 @@ const getLink = (param) => `#/invoice-in/${entityId.value}/${param}`;
|
|||
/>
|
||||
</QCardSection>
|
||||
<VnLv
|
||||
:label="t('invoicein.summary.sage')"
|
||||
:label="t('invoiceIn.summary.sage')"
|
||||
:value="entity.sageWithholding?.withholding"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('invoicein.summary.vat')"
|
||||
:label="t('invoiceIn.summary.vat')"
|
||||
:value="entity.expenseDeductible?.name"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('invoicein.card.company')"
|
||||
:label="t('invoiceIn.card.company')"
|
||||
:value="entity.company?.code"
|
||||
/>
|
||||
<VnLv :label="t('invoicein.isBooked')" :value="invoiceIn?.isBooked" />
|
||||
<VnLv :label="t('invoiceIn.isBooked')" :value="invoiceIn?.isBooked" />
|
||||
</QCard>
|
||||
<QCard class="vn-one">
|
||||
<QCardSection class="q-pa-none">
|
||||
|
@ -294,11 +294,11 @@ const getLink = (param) => `#/invoice-in/${entityId.value}/${param}`;
|
|||
</QCardSection>
|
||||
<QCardSection class="q-pa-none">
|
||||
<VnLv
|
||||
:label="t('invoicein.summary.taxableBase')"
|
||||
:label="t('invoiceIn.summary.taxableBase')"
|
||||
:value="toCurrency(entity.totals.totalTaxableBase)"
|
||||
/>
|
||||
<VnLv label="Total" :value="toCurrency(entity.totals.totalVat)" />
|
||||
<VnLv :label="t('invoicein.summary.dueTotal')">
|
||||
<VnLv :label="t('invoiceIn.summary.dueTotal')">
|
||||
<template #value>
|
||||
<QChip
|
||||
dense
|
||||
|
@ -306,8 +306,8 @@ const getLink = (param) => `#/invoice-in/${entityId.value}/${param}`;
|
|||
:color="amountsNotMatch ? 'negative' : 'transparent'"
|
||||
:title="
|
||||
amountsNotMatch
|
||||
? t('invoicein.summary.noMatch')
|
||||
: t('invoicein.summary.dueTotal')
|
||||
? t('invoiceIn.summary.noMatch')
|
||||
: t('invoiceIn.summary.dueTotal')
|
||||
"
|
||||
>
|
||||
{{ toCurrency(entity.totals.totalDueDay) }}
|
||||
|
@ -318,7 +318,7 @@ const getLink = (param) => `#/invoice-in/${entityId.value}/${param}`;
|
|||
</QCard>
|
||||
<!--Vat-->
|
||||
<QCard v-if="entity.invoiceInTax.length" class="vat">
|
||||
<VnTitle :url="getLink('vat')" :text="t('invoicein.card.vat')" />
|
||||
<VnTitle :url="getLink('vat')" :text="t('invoiceIn.card.vat')" />
|
||||
<QTable
|
||||
:columns="vatColumns"
|
||||
:rows="entity.invoiceInTax"
|
||||
|
@ -366,7 +366,7 @@ const getLink = (param) => `#/invoice-in/${entityId.value}/${param}`;
|
|||
</QCard>
|
||||
<!--Due Day-->
|
||||
<QCard v-if="entity.invoiceInDueDay.length" class="due-day">
|
||||
<VnTitle :url="getLink('due-day')" :text="t('invoicein.card.dueDay')" />
|
||||
<VnTitle :url="getLink('due-day')" :text="t('invoiceIn.card.dueDay')" />
|
||||
<QTable :columns="dueDayColumns" :rows="entity.invoiceInDueDay" flat>
|
||||
<template #header="dueDayProps">
|
||||
<QTr :props="dueDayProps" class="bg">
|
||||
|
@ -404,7 +404,7 @@ const getLink = (param) => `#/invoice-in/${entityId.value}/${param}`;
|
|||
<QCard v-if="entity.invoiceInIntrastat.length">
|
||||
<VnTitle
|
||||
:url="getLink('intrastat')"
|
||||
:text="t('invoicein.card.intrastat')"
|
||||
:text="t('invoiceIn.card.intrastat')"
|
||||
/>
|
||||
<QTable
|
||||
:columns="intrastatColumns"
|
||||
|
|
|
@ -83,7 +83,7 @@ const redirectToInvoiceInBasicData = (__, { id }) => {
|
|||
</template>
|
||||
</VnSelect>
|
||||
<VnInput
|
||||
:label="t('invoicein.list.supplierRef')"
|
||||
:label="t('invoiceIn.list.supplierRef')"
|
||||
v-model="data.supplierRef"
|
||||
/>
|
||||
</VnRow>
|
||||
|
@ -97,10 +97,10 @@ const redirectToInvoiceInBasicData = (__, { id }) => {
|
|||
map-options
|
||||
hide-selected
|
||||
:required="true"
|
||||
:rules="validate('invoicein.companyFk')"
|
||||
:rules="validate('invoiceIn.companyFk')"
|
||||
/>
|
||||
<VnInputDate
|
||||
:label="t('invoicein.summary.issued')"
|
||||
:label="t('invoiceIn.summary.issued')"
|
||||
v-model="data.issued"
|
||||
/>
|
||||
</VnRow>
|
||||
|
|
|
@ -164,7 +164,7 @@ function handleDaysAgo(params, daysAgo) {
|
|||
<QItem>
|
||||
<QItemSection>
|
||||
<QCheckbox
|
||||
:label="$t('invoicein.isBooked')"
|
||||
:label="$t('invoiceIn.isBooked')"
|
||||
v-model="params.isBooked"
|
||||
@update:model-value="searchFn()"
|
||||
toggle-indeterminate
|
||||
|
|
|
@ -8,17 +8,17 @@ import InvoiceInFilter from './InvoiceInFilter.vue';
|
|||
import InvoiceInSummary from './Card/InvoiceInSummary.vue';
|
||||
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
||||
import SupplierDescriptorProxy from 'src/pages/Supplier/Card/SupplierDescriptorProxy.vue';
|
||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||
import InvoiceInSearchbar from 'src/pages/InvoiceIn/InvoiceInSearchbar.vue';
|
||||
import VnTable from 'src/components/VnTable/VnTable.vue';
|
||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
import VnInputDate from 'src/components/common/VnInputDate.vue';
|
||||
import FetchData from 'src/components/FetchData.vue';
|
||||
import VnSection from 'src/components/common/VnSection.vue';
|
||||
|
||||
const user = useState().getUser();
|
||||
const { viewSummary } = useSummaryDialog();
|
||||
const { t } = useI18n();
|
||||
const dataKey = 'InvoiceInList';
|
||||
|
||||
const tableRef = ref();
|
||||
const companies = ref([]);
|
||||
|
@ -26,7 +26,7 @@ const cols = computed(() => [
|
|||
{
|
||||
align: 'left',
|
||||
name: 'isBooked',
|
||||
label: t('invoicein.isBooked'),
|
||||
label: t('invoiceIn.isBooked'),
|
||||
columnFilter: false,
|
||||
},
|
||||
{
|
||||
|
@ -41,7 +41,7 @@ const cols = computed(() => [
|
|||
{
|
||||
align: 'left',
|
||||
name: 'supplierFk',
|
||||
label: t('invoicein.list.supplier'),
|
||||
label: t('invoiceIn.list.supplier'),
|
||||
columnFilter: {
|
||||
component: 'select',
|
||||
attrs: {
|
||||
|
@ -55,16 +55,16 @@ const cols = computed(() => [
|
|||
{
|
||||
align: 'left',
|
||||
name: 'supplierRef',
|
||||
label: t('invoicein.list.supplierRef'),
|
||||
label: t('invoiceIn.list.supplierRef'),
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'serial',
|
||||
label: t('invoicein.serial'),
|
||||
label: t('invoiceIn.serial'),
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('invoicein.list.issued'),
|
||||
label: t('invoiceIn.list.issued'),
|
||||
name: 'issued',
|
||||
component: null,
|
||||
columnFilter: {
|
||||
|
@ -74,7 +74,7 @@ const cols = computed(() => [
|
|||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('invoicein.list.dueDated'),
|
||||
label: t('invoiceIn.list.dueDated'),
|
||||
name: 'dueDated',
|
||||
component: null,
|
||||
columnFilter: {
|
||||
|
@ -86,12 +86,12 @@ const cols = computed(() => [
|
|||
{
|
||||
align: 'left',
|
||||
name: 'awbCode',
|
||||
label: t('invoicein.list.awb'),
|
||||
label: t('invoiceIn.list.awb'),
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'amount',
|
||||
label: t('invoicein.list.amount'),
|
||||
label: t('invoiceIn.list.amount'),
|
||||
format: ({ amount }) => toCurrency(amount),
|
||||
cardVisible: true,
|
||||
},
|
||||
|
@ -130,19 +130,25 @@ const cols = computed(() => [
|
|||
},
|
||||
]);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<FetchData url="Companies" @on-fetch="(data) => (companies = data)" auto-load />
|
||||
<InvoiceInSearchbar />
|
||||
<RightMenu>
|
||||
<template #right-panel>
|
||||
<InvoiceInFilter data-key="InvoiceInList" />
|
||||
<VnSection
|
||||
:data-key
|
||||
:columns="cols"
|
||||
prefix="invoiceIn"
|
||||
:array-data-props="{
|
||||
url: 'InvoiceIns/filter',
|
||||
order: ['issued DESC', 'id DESC'],
|
||||
}"
|
||||
>
|
||||
<template #advanced-menu>
|
||||
<InvoiceInFilter :data-key />
|
||||
</template>
|
||||
</RightMenu>
|
||||
<template #body>
|
||||
<VnTable
|
||||
ref="tableRef"
|
||||
data-key="InvoiceInList"
|
||||
url="InvoiceIns/filter"
|
||||
:order="['issued DESC', 'id DESC']"
|
||||
:data-key
|
||||
:create="{
|
||||
urlCreate: 'InvoiceIns',
|
||||
title: t('globals.createInvoiceIn'),
|
||||
|
@ -165,7 +171,7 @@ const cols = computed(() => [
|
|||
<VnSelect
|
||||
v-model="data.supplierFk"
|
||||
url="Suppliers"
|
||||
:fields="['id', 'nickname', 'name']"
|
||||
:fields="['id', 'name', 'nickname']"
|
||||
:label="t('globals.supplier')"
|
||||
option-value="id"
|
||||
option-label="nickname"
|
||||
|
@ -176,13 +182,15 @@ const cols = computed(() => [
|
|||
<QItem v-bind="scope.itemProps">
|
||||
<QItemSection>
|
||||
<QItemLabel>{{ scope.opt?.nickname }}</QItemLabel>
|
||||
<QItemLabel caption> #{{ scope.opt?.id }}, {{ scope.opt?.name }} </QItemLabel>
|
||||
<QItemLabel caption>
|
||||
#{{ scope.opt?.id }}, {{ scope.opt?.name }}
|
||||
</QItemLabel>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
</template>
|
||||
</VnSelect>
|
||||
<VnInput
|
||||
:label="t('invoicein.list.supplierRef')"
|
||||
:label="t('invoiceIn.list.supplierRef')"
|
||||
v-model="data.supplierRef"
|
||||
/>
|
||||
<VnSelect
|
||||
|
@ -194,7 +202,12 @@ const cols = computed(() => [
|
|||
option-label="code"
|
||||
:required="true"
|
||||
/>
|
||||
<VnInputDate :label="t('invoicein.summary.issued')" v-model="data.issued" />
|
||||
<VnInputDate
|
||||
:label="t('invoiceIn.summary.issued')"
|
||||
v-model="data.issued"
|
||||
/>
|
||||
</template>
|
||||
</VnTable>
|
||||
</template>
|
||||
</VnSection>
|
||||
</template>
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
<script setup>
|
||||
import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
const { t } = useI18n();
|
||||
</script>
|
||||
<template>
|
||||
<VnSearchbar
|
||||
data-key="InvoiceInList"
|
||||
:label="t('Search invoice')"
|
||||
:info="t('Search invoices in by id or supplier fiscal name')"
|
||||
url="InvoiceIns/filter"
|
||||
/>
|
||||
</template>
|
||||
<i18n>
|
||||
es:
|
||||
Search invoice: Buscar factura recibida
|
||||
Search invoices in by id or supplier fiscal name: Buscar facturas recibidas por id o por nombre fiscal del proveedor
|
||||
</i18n>
|
|
@ -1,4 +1,6 @@
|
|||
invoicein:
|
||||
invoiceIn:
|
||||
search: Search invoice
|
||||
searchInfo: Search incoming invoices by ID or supplier fiscal name
|
||||
serial: Serial
|
||||
isBooked: Is booked
|
||||
list:
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
invoicein:
|
||||
invoiceIn:
|
||||
search: Buscar factura recibida
|
||||
searchInfo: Buscar facturas recibidas por ID o nombre fiscal del proveedor
|
||||
serial: Serie
|
||||
isBooked: Contabilizada
|
||||
list:
|
||||
|
@ -63,6 +65,7 @@ invoicein:
|
|||
params:
|
||||
search: Id o nombre proveedor
|
||||
correctedFk: Rectificada
|
||||
isBooked: Contabilizada
|
||||
account: Cuenta contable
|
||||
correctingFk: Rectificativa
|
||||
|
||||
|
|
|
@ -62,6 +62,7 @@ const setData = (entity) => (data.value = useCardDescription(entity.ref, entity.
|
|||
:subtitle="data.subtitle"
|
||||
@on-fetch="setData"
|
||||
data-key="invoiceOutData"
|
||||
width="lg-width"
|
||||
>
|
||||
<template #menu="{ entity, menuRef }">
|
||||
<InvoiceOutDescriptorMenu :invoice-out-data="entity" :menu-ref="menuRef" />
|
||||
|
|
|
@ -13,10 +13,9 @@ import axios from 'axios';
|
|||
const route = useRoute();
|
||||
const { t } = useI18n();
|
||||
|
||||
const itemTagsRef = ref(null);
|
||||
const itemTagsRef = ref();
|
||||
const tagOptions = ref([]);
|
||||
const valueOptionsMap = ref(new Map());
|
||||
|
||||
const getSelectedTagValues = async (tag) => {
|
||||
if (!tag.tagFk && tag.tag.isFree) return;
|
||||
const filter = {
|
||||
|
@ -59,10 +58,6 @@ const insertTag = (rows) => {
|
|||
itemTagsRef.value.formData[itemTagsRef.value.formData.length - 1].priority =
|
||||
getHighestPriority(rows);
|
||||
};
|
||||
|
||||
const submitTags = async (data) => {
|
||||
itemTagsRef.value.onSubmit(data);
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -149,7 +144,7 @@ const submitTags = async (data) => {
|
|||
v-model="row.value"
|
||||
:label="t('itemTags.value')"
|
||||
:is-clearable="false"
|
||||
@keyup.enter.stop="submitTags(row)"
|
||||
@keyup.enter.stop="(data) => itemTagsRef.onSubmit(data)"
|
||||
/>
|
||||
<VnInput
|
||||
:label="t('itemBasicData.relevancy')"
|
||||
|
@ -157,7 +152,7 @@ const submitTags = async (data) => {
|
|||
v-model="row.priority"
|
||||
:required="true"
|
||||
:rules="validate('itemTag.priority')"
|
||||
@keyup.enter.stop="submitTags(row)"
|
||||
@keyup.enter.stop="(data) => itemTagsRef.onSubmit(data)"
|
||||
/>
|
||||
<div class="row justify-center" style="flex: 0">
|
||||
<QIcon
|
||||
|
@ -197,4 +192,5 @@ const submitTags = async (data) => {
|
|||
<i18n>
|
||||
es:
|
||||
Tags can not be repeated: Las etiquetas no pueden repetirse
|
||||
The value must be a number or a range of numbers: El valor debe ser un número o un rango de números
|
||||
</i18n>
|
||||
|
|
|
@ -422,6 +422,7 @@ function handleOnDataSave({ CrudModelRef }) {
|
|||
onDataSaved: handleOnDataSave,
|
||||
}"
|
||||
:disable-option="{ card: true }"
|
||||
:has-sub-toolbar="false"
|
||||
>
|
||||
<template #header-selection="scope">
|
||||
<QCheckbox v-model="scope.selected" />
|
||||
|
|
|
@ -272,11 +272,12 @@ const onDenyAccept = (_, responseData) => {
|
|||
<template #column-achieved="{ row }">
|
||||
<span>
|
||||
<VnInput
|
||||
ref="achievedRef"
|
||||
type="number"
|
||||
v-model.number="row.saleQuantity"
|
||||
:disable="!row.itemFk || row.isOk != null"
|
||||
@blur="changeQuantity(row)"
|
||||
@keyup.enter="changeQuantity(row)"
|
||||
@keyup.enter="$refs.achievedRef.vnInputRef.blur()"
|
||||
dense
|
||||
/>
|
||||
</span>
|
||||
|
|
|
@ -48,14 +48,14 @@ const itemPackingTypesOptions = ref([]);
|
|||
>
|
||||
<template #form="{ data }">
|
||||
<VnRow>
|
||||
<VnInput v-model="data.code" :label="t('shared.code')" />
|
||||
<VnInput v-model="data.name" :label="t('shared.name')" />
|
||||
<VnInput v-model="data.code" :label="t('itemType.shared.code')" />
|
||||
<VnInput v-model="data.name" :label="t('itemType.shared.name')" />
|
||||
</VnRow>
|
||||
<VnRow>
|
||||
<VnSelect
|
||||
url="Workers/search"
|
||||
v-model="data.workerFk"
|
||||
:label="t('shared.worker')"
|
||||
:label="t('itemType.shared.worker')"
|
||||
sort-by="nickname ASC"
|
||||
:fields="['id', 'nickname']"
|
||||
option-label="nickname"
|
||||
|
@ -83,7 +83,7 @@ const itemPackingTypesOptions = ref([]);
|
|||
>
|
||||
<VnSelect
|
||||
v-model="data.categoryFk"
|
||||
:label="t('shared.category')"
|
||||
:label="t('itemType.shared.category')"
|
||||
:options="categoriesOptions"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
|
@ -93,27 +93,30 @@ const itemPackingTypesOptions = ref([]);
|
|||
<VnRow>
|
||||
<VnSelect
|
||||
v-model="data.temperatureFk"
|
||||
:label="t('shared.temperature')"
|
||||
:label="t('itemType.shared.temperature')"
|
||||
:options="temperaturesOptions"
|
||||
option-value="code"
|
||||
option-label="name"
|
||||
hide-selected
|
||||
/>
|
||||
<VnInput v-model="data.life" :label="t('shared.life')" />
|
||||
<VnInput v-model="data.life" :label="t('itemType.summary.life')" />
|
||||
</VnRow>
|
||||
<VnRow>
|
||||
<VnSelect
|
||||
v-model="data.itemPackingTypeFk"
|
||||
:label="t('shared.itemPackingType')"
|
||||
:label="t('itemType.shared.itemPackingType')"
|
||||
:options="itemPackingTypesOptions"
|
||||
option-value="code"
|
||||
option-label="description"
|
||||
hide-selected
|
||||
/>
|
||||
<VnInput v-model="data.maxRefs" :label="t('shared.maxRefs')" />
|
||||
<VnInput v-model="data.maxRefs" :label="t('itemType.shared.maxRefs')" />
|
||||
</VnRow>
|
||||
<VnRow>
|
||||
<QCheckbox v-model="data.isFragile" :label="t('shared.fragile')" />
|
||||
<QCheckbox
|
||||
v-model="data.isFragile"
|
||||
:label="t('itemType.shared.fragile')"
|
||||
/>
|
||||
</VnRow>
|
||||
</template>
|
||||
</FormModel>
|
||||
|
|
|
@ -50,15 +50,15 @@ const setData = (entity) => (data.value = useCardDescription(entity.code, entity
|
|||
@on-fetch="setData"
|
||||
>
|
||||
<template #body="{ entity }">
|
||||
<VnLv :label="t('shared.code')" :value="entity.code" />
|
||||
<VnLv :label="t('shared.name')" :value="entity.name" />
|
||||
<VnLv :label="t('shared.worker')">
|
||||
<VnLv :label="t('itemType.shared.code')" :value="entity.code" />
|
||||
<VnLv :label="t('itemType.shared.name')" :value="entity.name" />
|
||||
<VnLv :label="t('itemType.shared.worker')">
|
||||
<template #value>
|
||||
<span class="link">{{ entity.worker?.firstName }}</span>
|
||||
<WorkerDescriptorProxy :id="entity.worker?.id" />
|
||||
</template>
|
||||
</VnLv>
|
||||
<VnLv :label="t('shared.category')" :value="entity.category?.name" />
|
||||
<VnLv :label="t('itemType.shared.category')" :value="entity.category?.name" />
|
||||
</template>
|
||||
</CardDescriptor>
|
||||
</template>
|
||||
|
|
|
@ -76,13 +76,6 @@ itemTags:
|
|||
searchbar:
|
||||
label: Search item
|
||||
info: Search by item id
|
||||
itemType:
|
||||
shared:
|
||||
code: Code
|
||||
name: Name
|
||||
worker: Worker
|
||||
category: Category
|
||||
temperature: Temperature
|
||||
item:
|
||||
params:
|
||||
daysOnward: Days onward
|
||||
|
|
|
@ -80,6 +80,9 @@ itemType:
|
|||
worker: Trabajador
|
||||
category: Reino
|
||||
temperature: Temperatura
|
||||
searchbar:
|
||||
label: Buscar artículo
|
||||
info: Buscar por id de artículo
|
||||
params:
|
||||
state: asfsdf
|
||||
item:
|
||||
|
|
|
@ -2,11 +2,12 @@
|
|||
import { computed } from 'vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
|
||||
import VnTable from 'components/VnTable/VnTable.vue';
|
||||
import VnSection from 'src/components/common/VnSection.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const router = useRouter();
|
||||
const dataKey = 'AgencyList';
|
||||
function navigate(id) {
|
||||
router.push({ path: `/agency/${id}` });
|
||||
}
|
||||
|
@ -67,26 +68,28 @@ const columns = computed(() => [
|
|||
]);
|
||||
</script>
|
||||
<template>
|
||||
<VnSearchbar
|
||||
:info="t('You can search by name')"
|
||||
:label="t('Search agency')"
|
||||
data-key="AgencyList"
|
||||
:expr-builder="exprBuilder"
|
||||
/>
|
||||
<div class="list-container">
|
||||
<div class="list">
|
||||
<VnSection
|
||||
:data-key
|
||||
:columns="columns"
|
||||
prefix="agency"
|
||||
:right-filter="false"
|
||||
:array-data-props="{
|
||||
url: 'Agencies',
|
||||
order: 'name',
|
||||
exprBuilder,
|
||||
}"
|
||||
>
|
||||
<template #body>
|
||||
<VnTable
|
||||
data-key="AgencyList"
|
||||
url="Agencies"
|
||||
order="name"
|
||||
:data-key
|
||||
:columns="columns"
|
||||
:right-search="false"
|
||||
:use-model="true"
|
||||
redirect="agency"
|
||||
redirect="route/agency"
|
||||
default-mode="card"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</VnSection>
|
||||
</template>
|
||||
<style lang="scss" scoped>
|
||||
.list {
|
||||
|
@ -104,8 +107,6 @@ const columns = computed(() => [
|
|||
es:
|
||||
isOwn: Tiene propietario
|
||||
isAnyVolumeAllowed: Permite cualquier volumen
|
||||
Search agency: Buscar agencia
|
||||
You can search by name: Puedes buscar por nombre
|
||||
en:
|
||||
isOwn: Has owner
|
||||
isAnyVolumeAllowed: Allows any volume
|
||||
|
|
|
@ -1,17 +1,7 @@
|
|||
<script setup>
|
||||
import AgencyDescriptor from 'pages/Route/Agency/Card/AgencyDescriptor.vue';
|
||||
import VnCard from 'components/common/VnCard.vue';
|
||||
import VnCardBeta from 'src/components/common/VnCardBeta.vue';
|
||||
</script>
|
||||
<template>
|
||||
<VnCard
|
||||
data-key="Agency"
|
||||
base-url="Agencies"
|
||||
:descriptor="AgencyDescriptor"
|
||||
search-data-key="AgencyList"
|
||||
:searchbar-props="{
|
||||
url: 'Agencies',
|
||||
label: 'agency.searchBar.label',
|
||||
info: 'agency.searchBar.info',
|
||||
}"
|
||||
/>
|
||||
<VnCardBeta data-key="Agency" base-url="Agencies" :descriptor="AgencyDescriptor" />
|
||||
</template>
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
agency:
|
||||
search: Search agency
|
||||
searchInfo: You can search by name
|
||||
isOwn: Own
|
||||
isAnyVolumeAllowed: Any volume allowed
|
||||
notification:
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
agency:
|
||||
search: Buscar agencia
|
||||
searchInfo: Puedes buscar por nombre
|
||||
isOwn: Propio
|
||||
isAnyVolumeAllowed: Cualquier volumen
|
||||
removeItem: Agencia eliminada correctamente
|
||||
|
|
|
@ -1,19 +1,12 @@
|
|||
<script setup>
|
||||
import VnCard from 'components/common/VnCard.vue';
|
||||
import RouteDescriptor from 'pages/Route/Card/RouteDescriptor.vue';
|
||||
import RouteFilter from './RouteFilter.vue';
|
||||
import RouteSearchbar from 'pages/Route/Card/RouteSearchbar.vue';
|
||||
import VnCardBeta from 'src/components/common/VnCardBeta.vue';
|
||||
</script>
|
||||
<template>
|
||||
<VnCard
|
||||
<VnCardBeta
|
||||
data-key="Route"
|
||||
base-url="Routes"
|
||||
custom-url="Routes/filter"
|
||||
:descriptor="RouteDescriptor"
|
||||
:filter-panel="RouteFilter"
|
||||
search-data-key="RouteList"
|
||||
>
|
||||
<template #searchbar>
|
||||
<RouteSearchbar />
|
||||
</template>
|
||||
</VnCard>
|
||||
/>
|
||||
</template>
|
||||
|
|
|
@ -76,6 +76,7 @@ const setData = (entity) => (data.value = useCardDescription(entity.code, entity
|
|||
:subtitle="data.subtitle"
|
||||
data-key="routeData"
|
||||
@on-fetch="setData"
|
||||
width="lg-width"
|
||||
>
|
||||
<template #body="{ entity }">
|
||||
<VnLv :label="t('Date')" :value="toDate(entity?.dated)" />
|
||||
|
|
|
@ -1,19 +1,7 @@
|
|||
<script setup>
|
||||
import VnCard from 'components/common/VnCard.vue';
|
||||
import VnCardBeta from 'components/common/VnCardBeta.vue';
|
||||
import RoadmapDescriptor from 'pages/Route/Roadmap/RoadmapDescriptor.vue';
|
||||
import RoadmapFilter from 'pages/Route/Roadmap/RoadmapFilter.vue';
|
||||
</script>
|
||||
<template>
|
||||
<VnCard
|
||||
data-key="Roadmap"
|
||||
base-url="Roadmaps"
|
||||
:descriptor="RoadmapDescriptor"
|
||||
:filter-panel="RoadmapFilter"
|
||||
search-data-key="RoadmapList"
|
||||
:searchbar-props="{
|
||||
url: 'Roadmaps',
|
||||
label: 'Search roadmap',
|
||||
info: 'You can search by roadmap id or customer name',
|
||||
}"
|
||||
/>
|
||||
<VnCardBeta data-key="Roadmap" base-url="Roadmaps" :descriptor="RoadmapDescriptor" />
|
||||
</template>
|
||||
|
|
|
@ -18,22 +18,6 @@ const props = defineProps({
|
|||
const emit = defineEmits(['search']);
|
||||
|
||||
const supplierList = ref([]);
|
||||
const exprBuilder = (param, value) => {
|
||||
switch (param) {
|
||||
case 'tractorPlate':
|
||||
case 'trailerPlate':
|
||||
case 'driverName':
|
||||
case 'phone':
|
||||
return { [param]: { like: `%${value}%` } };
|
||||
case 'supplierFk':
|
||||
case 'price':
|
||||
return { [param]: value };
|
||||
case 'from':
|
||||
return { etd: { gte: value } };
|
||||
case 'to':
|
||||
return { etd: { lte: value } };
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -48,7 +32,6 @@ const exprBuilder = (param, value) => {
|
|||
<VnFilterPanel
|
||||
:data-key="props.dataKey"
|
||||
:search-button="true"
|
||||
:expr-builder="exprBuilder"
|
||||
@search="emit('search')"
|
||||
>
|
||||
<template #tags="{ tag, formatFn }">
|
||||
|
|
|
@ -3,17 +3,16 @@ import { computed, ref } from 'vue';
|
|||
import { useI18n } from 'vue-i18n';
|
||||
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
||||
import { toHour } from 'src/filters';
|
||||
|
||||
import RouteSearchbar from 'pages/Route/Card/RouteSearchbar.vue';
|
||||
import RouteSummary from 'pages/Route/Card/RouteSummary.vue';
|
||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||
import RouteFilter from 'pages/Route/Card/RouteFilter.vue';
|
||||
import VnTable from 'components/VnTable/VnTable.vue';
|
||||
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
||||
import VnSection from 'src/components/common/VnSection.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const { viewSummary } = useSummaryDialog();
|
||||
const tableRef = ref([]);
|
||||
const dataKey = 'RouteList';
|
||||
const routeFilter = {
|
||||
include: [
|
||||
{
|
||||
|
@ -110,18 +109,23 @@ const columns = computed(() => [
|
|||
]);
|
||||
</script>
|
||||
<template>
|
||||
<RouteSearchbar />
|
||||
<RightMenu>
|
||||
<template #right-panel>
|
||||
<RouteFilter data-key="RouteList" />
|
||||
<VnSection
|
||||
:data-key
|
||||
:columns="columns"
|
||||
prefix="route"
|
||||
:array-data-props="{
|
||||
url: 'Routes/filter',
|
||||
userFilter: routeFilter,
|
||||
}"
|
||||
>
|
||||
<template #advanced-menu>
|
||||
<RouteFilter :data-key />
|
||||
</template>
|
||||
</RightMenu>
|
||||
<template #body>
|
||||
<VnTable
|
||||
data-key="RouteList"
|
||||
url="Routes/filter"
|
||||
:data-key
|
||||
:columns="columns"
|
||||
:right-search="false"
|
||||
:filter="routeFilter"
|
||||
redirect="route"
|
||||
:create="{
|
||||
urlCreate: 'Routes',
|
||||
|
@ -138,4 +142,6 @@ const columns = computed(() => [
|
|||
</span>
|
||||
</template>
|
||||
</VnTable>
|
||||
</template>
|
||||
</VnSection>
|
||||
</template>
|
||||
|
|
|
@ -15,11 +15,14 @@ import RoadmapSummary from 'pages/Route/Roadmap/RoadmapSummary.vue';
|
|||
import VnConfirm from 'components/ui/VnConfirm.vue';
|
||||
import VnInputDate from 'components/common/VnInputDate.vue';
|
||||
import VnInputTime from 'src/components/common/VnInputTime.vue';
|
||||
import VnSection from 'src/components/common/VnSection.vue';
|
||||
import RoadmapFilter from './Roadmap/RoadmapFilter.vue';
|
||||
|
||||
const { viewSummary } = useSummaryDialog();
|
||||
const { t } = useI18n();
|
||||
const quasar = useQuasar();
|
||||
const selectedRows = ref([]);
|
||||
const dataKey = 'RoadmapList';
|
||||
const columns = computed(() => [
|
||||
{
|
||||
align: 'left',
|
||||
|
@ -128,14 +131,28 @@ function confirmRemove() {
|
|||
})
|
||||
.onOk(() => tableRef.value++);
|
||||
}
|
||||
|
||||
function exprBuilder(param, value) {
|
||||
switch (param) {
|
||||
case 'search':
|
||||
return /^\d+$/.test(value) ? { id: value } : { name: { like: `%${value}%` } };
|
||||
case 'tractorPlate':
|
||||
case 'trailerPlate':
|
||||
case 'driverName':
|
||||
case 'phone':
|
||||
return { [param]: { like: `%${value}%` } };
|
||||
case 'supplierFk':
|
||||
case 'price':
|
||||
return { [param]: value };
|
||||
case 'from':
|
||||
return { etd: { gte: value } };
|
||||
case 'to':
|
||||
return { etd: { lte: value } };
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<VnSearchbar
|
||||
data-key="RoadmapList"
|
||||
:label="t('Search roadmaps')"
|
||||
:info="t('You can search by roadmap reference')"
|
||||
/>
|
||||
<QDialog v-model="isCloneDialogOpen">
|
||||
<QCard style="min-width: 350px">
|
||||
<QCardSection>
|
||||
|
@ -177,12 +194,24 @@ function confirmRemove() {
|
|||
</QBtn>
|
||||
</template>
|
||||
</VnSubToolbar>
|
||||
<VnSection
|
||||
:data-key
|
||||
:columns="columns"
|
||||
prefix="route.roadmap"
|
||||
:array-data-props="{
|
||||
url: 'roadmaps',
|
||||
exprBuilder,
|
||||
}"
|
||||
>
|
||||
<template #advanced-menu>
|
||||
<RoadmapFilter :dataKey />
|
||||
</template>
|
||||
<template #body>
|
||||
<VnTable
|
||||
ref="tableRef"
|
||||
data-key="RoadmapList"
|
||||
url="roadmaps"
|
||||
:data-key
|
||||
:columns="columns"
|
||||
:right-search="true"
|
||||
:right-search="false"
|
||||
:use-model="true"
|
||||
default-mode="table"
|
||||
v-model:selected="selectedRows"
|
||||
|
@ -210,6 +239,8 @@ function confirmRemove() {
|
|||
<VnInputTime v-model="data.etd" />
|
||||
</template>
|
||||
</VnTable>
|
||||
</template>
|
||||
</VnSection>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
route:
|
||||
roadmap:
|
||||
search: Search roadmap
|
||||
searchInfo: You can search by roadmap reference
|
||||
params:
|
||||
etd: ETD
|
||||
tractorPlate: Plate
|
||||
|
@ -36,6 +39,8 @@ route:
|
|||
Summary: Summary
|
||||
Route is closed: Route is closed
|
||||
Route is not served: Route is not served
|
||||
search: Search route
|
||||
searchInfo: You can search by route reference
|
||||
cmr:
|
||||
list:
|
||||
results: results
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
route:
|
||||
roadmap:
|
||||
search: Buscar troncales
|
||||
searchInfo: Puedes buscar por referencia del troncal
|
||||
params:
|
||||
agencyModeName: Agencia Ruta
|
||||
agencyAgreement: Agencia Acuerdo
|
||||
|
@ -37,6 +40,8 @@ route:
|
|||
Summary: Resumen
|
||||
Route is closed: La ruta está cerrada
|
||||
Route is not served: La ruta no está servida
|
||||
search: Buscar rutas
|
||||
searchInfo: Puedes buscar por referencia de la ruta
|
||||
cmr:
|
||||
list:
|
||||
results: resultados
|
||||
|
|
|
@ -36,7 +36,7 @@ const companySizes = [
|
|||
/>
|
||||
<VnSelectWorker
|
||||
v-model="data.workerFk"
|
||||
has-info="Responsible for approving invoices"
|
||||
info="Responsible for approving invoices"
|
||||
:rules="validate('supplier.workerFk')"
|
||||
/>
|
||||
<VnSelect
|
||||
|
|
|
@ -94,7 +94,7 @@ function handleLocation(data, location) {
|
|||
<VnInput
|
||||
v-model="data.name"
|
||||
:label="t('supplier.fiscalData.name')"
|
||||
uppercase="true"
|
||||
:uppercase="true"
|
||||
clearable
|
||||
/>
|
||||
<VnInput
|
||||
|
|
|
@ -16,6 +16,10 @@ const $props = defineProps({
|
|||
required: false,
|
||||
default: null,
|
||||
},
|
||||
summary: {
|
||||
type: Object,
|
||||
default: null,
|
||||
},
|
||||
});
|
||||
|
||||
const route = useRoute();
|
||||
|
@ -102,6 +106,10 @@ const data = ref(useCardDescription());
|
|||
function ticketFilter(ticket) {
|
||||
return JSON.stringify({ clientFk: ticket.clientFk });
|
||||
}
|
||||
|
||||
const setData = (entity) => {
|
||||
data.value = useCardDescription(entity.ref, entity.id);
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -111,7 +119,10 @@ function ticketFilter(ticket) {
|
|||
:filter="filter"
|
||||
:title="data.title"
|
||||
:subtitle="data.subtitle"
|
||||
@on-fetch="setData"
|
||||
:summary="$props.summary"
|
||||
data-key="ticketData"
|
||||
width="lg-width"
|
||||
>
|
||||
<template #menu="{ entity }">
|
||||
<TicketDescriptorMenu :ticket="entity" />
|
||||
|
@ -157,7 +168,7 @@ function ticketFilter(ticket) {
|
|||
<VnLv :label="t('globals.alias')" :value="entity.nickname" />
|
||||
</template>
|
||||
<template #icons="{ entity }">
|
||||
<QCardActions class="q-gutter-x-xs">
|
||||
<QCardActions class="q-gutter-x-md">
|
||||
<QIcon
|
||||
v-if="entity.client.isActive == false"
|
||||
name="vn:disabled"
|
||||
|
@ -201,7 +212,7 @@ function ticketFilter(ticket) {
|
|||
</QCardActions>
|
||||
</template>
|
||||
<template #actions="{ entity }">
|
||||
<QCardActions>
|
||||
<QCardActions class="flex justify-center" style="padding-inline: 0">
|
||||
<QBtn
|
||||
size="md"
|
||||
icon="vn:client"
|
||||
|
|
|
@ -6,7 +6,6 @@ import { useI18n } from 'vue-i18n';
|
|||
import axios from 'axios';
|
||||
import { dashIfEmpty, toDate, toCurrency } from 'src/filters';
|
||||
import CardSummary from 'components/ui/CardSummary.vue';
|
||||
import FetchData from 'components/FetchData.vue';
|
||||
import FetchedTags from 'components/ui/FetchedTags.vue';
|
||||
import InvoiceOutDescriptorProxy from 'pages/InvoiceOut/Card/InvoiceOutDescriptorProxy.vue';
|
||||
import VnLv from 'src/components/ui/VnLv.vue';
|
||||
|
@ -29,15 +28,14 @@ const { t } = useI18n();
|
|||
const $props = defineProps({
|
||||
id: {
|
||||
type: Number,
|
||||
required: false,
|
||||
default: null,
|
||||
},
|
||||
});
|
||||
|
||||
const entityId = computed(() => $props.id || route.params.id);
|
||||
|
||||
const summaryRef = ref();
|
||||
const ticket = computed(() => summaryRef.value?.entity);
|
||||
const summary = ref();
|
||||
const ticket = computed(() => summary.value?.entity);
|
||||
const editableStates = ref([]);
|
||||
const ticketUrl = ref();
|
||||
const grafanaUrl = 'https://grafana.verdnatura.es';
|
||||
|
@ -48,16 +46,6 @@ onMounted(async () => {
|
|||
ticketUrl.value = (await getUrl('ticket/')) + entityId.value + '/';
|
||||
});
|
||||
|
||||
function formattedAddress() {
|
||||
if (!ticket.value) return '';
|
||||
|
||||
const address = ticket.value.address;
|
||||
const postcode = address.postalCode;
|
||||
const province = address.province ? `(${address.province.name})` : '';
|
||||
|
||||
return `${address.street} - ${postcode} - ${address.city} ${province}`;
|
||||
}
|
||||
|
||||
function isEditable() {
|
||||
try {
|
||||
return !ticket.value.ticketState?.state?.alertLevel;
|
||||
|
@ -76,26 +64,27 @@ async function changeState(value) {
|
|||
};
|
||||
await axios.post(`Tickets/state`, formData);
|
||||
notify('globals.dataSaved', 'positive');
|
||||
summaryRef.value?.fetch();
|
||||
summary.value?.fetch();
|
||||
descriptorData.fetch({});
|
||||
}
|
||||
|
||||
function toTicketUrl(section) {
|
||||
return '#/ticket/' + entityId.value + '/' + section;
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
const filter = { fields: ['code', 'name', 'id', 'alertLevel'] };
|
||||
const params = { filter: JSON.stringify(filter) };
|
||||
editableStates.value = (await axios.get('States/editableStates', { params }))?.data;
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<FetchData
|
||||
url="States/editableStates"
|
||||
:filter="{ fields: ['code', 'name', 'id', 'alertLevel'], order: 'name ASC' }"
|
||||
auto-load
|
||||
@on-fetch="(data) => (editableStates = data)"
|
||||
/>
|
||||
<CardSummary
|
||||
ref="summaryRef"
|
||||
ref="summary"
|
||||
:url="`Tickets/${entityId}/summary`"
|
||||
data-key="TicketSummary"
|
||||
v-bind="$attrs.width"
|
||||
>
|
||||
<template #header-left>
|
||||
<VnToSummary
|
||||
|
@ -207,7 +196,7 @@ function toTicketUrl(section) {
|
|||
</VnLv>
|
||||
<VnLv :label="t('globals.weight')" :value="dashIfEmpty(entity.weight)" />
|
||||
</QCard>
|
||||
<QCard class="vn-one" style="flex: 2 1">
|
||||
<QCard class="vn-one">
|
||||
<VnTitle
|
||||
:url="toTicketUrl('basic-data')"
|
||||
:text="t('globals.summary.basicData')"
|
||||
|
@ -244,7 +233,11 @@ function toTicketUrl(section) {
|
|||
</VnLv>
|
||||
<VnLv
|
||||
:label="t('ticket.summary.consignee')"
|
||||
:value="formattedAddress()"
|
||||
:value="`${entity.address?.nickname} #${entity.address?.id}`"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('ticket.summary.consigneeStreet')"
|
||||
:value="entity.address?.street"
|
||||
/>
|
||||
</QCard>
|
||||
<QCard class="vn-one" v-if="entity.notes.length">
|
||||
|
@ -454,7 +447,7 @@ function toTicketUrl(section) {
|
|||
toCurrency(
|
||||
props.row.quantity *
|
||||
props.row.price *
|
||||
((100 - props.row.discount) / 100)
|
||||
((100 - props.row.discount) / 100),
|
||||
)
|
||||
}}
|
||||
</QTd>
|
||||
|
|
|
@ -11,6 +11,7 @@ import { useStateStore } from 'stores/useStateStore';
|
|||
import { dashIfEmpty } from 'src/filters';
|
||||
import axios from 'axios';
|
||||
import VnTable from 'src/components/VnTable/VnTable.vue';
|
||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||
|
||||
const route = useRoute();
|
||||
const stateStore = useStateStore();
|
||||
|
@ -23,7 +24,7 @@ watch(
|
|||
async () => {
|
||||
await nextTick();
|
||||
salesRef.value?.fetch();
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
const salesFilter = computed(() => ({
|
||||
|
@ -100,10 +101,8 @@ onMounted(() => (stateStore.rightDrawer = true));
|
|||
@on-fetch="(data) => applyVolumes(data)"
|
||||
auto-load
|
||||
/>
|
||||
<Teleport
|
||||
to="#right-panel"
|
||||
v-if="stateStore.isHeaderMounted() && packingTypeVolume.length"
|
||||
>
|
||||
<RightMenu>
|
||||
<template #right-panel>
|
||||
<QCard
|
||||
v-for="(packingType, index) in packingTypeVolume"
|
||||
:key="index"
|
||||
|
@ -122,7 +121,8 @@ onMounted(() => (stateStore.rightDrawer = true));
|
|||
<span> {{ t('volume.volume') }}: {{ packingType.volume }} </span>
|
||||
</QCardSection>
|
||||
</QCard>
|
||||
</Teleport>
|
||||
</template>
|
||||
</RightMenu>
|
||||
<VnTable
|
||||
ref="tableRef"
|
||||
data-key="TicketVolume"
|
||||
|
|
|
@ -136,6 +136,12 @@ const thermographsTableColumns = computed(() => {
|
|||
name: 'temperatureFk',
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
label: t('travel.thermographs.carrier'),
|
||||
field: (row) => row.agencyMode?.name,
|
||||
name: 'agencyModeFk',
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
label: t('globals.maxTemperature'),
|
||||
field: 'maxTemperature',
|
||||
|
@ -179,33 +185,31 @@ const entriesTableRows = computed(() => {
|
|||
return entries.value;
|
||||
});
|
||||
|
||||
const entriesTotalHb = computed(() =>
|
||||
entriesTableRows.value.reduce((acc, { hb }) => acc + hb, 0)
|
||||
);
|
||||
const entriesTotals = computed(() => {
|
||||
const totals = {
|
||||
hb: 0,
|
||||
freightValue: 0,
|
||||
packageValue: 0,
|
||||
cc: 0,
|
||||
pallet: 0,
|
||||
m3: 0,
|
||||
};
|
||||
|
||||
const entriesTotalFreight = computed(() =>
|
||||
toCurrency(
|
||||
entriesTableRows.value.reduce((acc, { freightValue }) => acc + freightValue, 0)
|
||||
)
|
||||
);
|
||||
entriesTableRows.value.forEach((row) => {
|
||||
for (const key in totals) {
|
||||
totals[key] += row[key] || 0;
|
||||
}
|
||||
});
|
||||
|
||||
const entriesTotalPackageValue = computed(() =>
|
||||
toCurrency(
|
||||
entriesTableRows.value.reduce((acc, { packageValue }) => acc + packageValue, 0)
|
||||
)
|
||||
);
|
||||
|
||||
const entriesTotalCc = computed(() =>
|
||||
entriesTableRows.value.reduce((acc, { cc }) => acc + cc, 0)
|
||||
);
|
||||
|
||||
const entriesTotalPallet = computed(() =>
|
||||
entriesTableRows.value.reduce((acc, { pallet }) => acc + pallet, 0)
|
||||
);
|
||||
|
||||
const entriesTotalM3 = computed(() =>
|
||||
entriesTableRows.value.reduce((acc, { m3 }) => acc + m3, 0)
|
||||
);
|
||||
return {
|
||||
hb: totals.hb.toFixed(2),
|
||||
freight: toCurrency(totals.freightValue),
|
||||
packageValue: toCurrency(totals.packageValue),
|
||||
cc: totals.cc.toFixed(2),
|
||||
pallet: totals.pallet.toFixed(2),
|
||||
m3: totals.m3.toFixed(2),
|
||||
};
|
||||
});
|
||||
|
||||
const getTravelEntries = async (id) => {
|
||||
const { data } = await axios.get(`Travels/${id}/getEntries`);
|
||||
|
@ -214,17 +218,25 @@ const getTravelEntries = async (id) => {
|
|||
|
||||
const getTravelThermographs = async (id) => {
|
||||
const filter = {
|
||||
include: {
|
||||
include: [
|
||||
{
|
||||
relation: 'agencyMode',
|
||||
scope: {
|
||||
fields: ['id', 'name'],
|
||||
},
|
||||
},
|
||||
{
|
||||
relation: 'warehouse',
|
||||
scope: {
|
||||
fields: ['id', 'name'],
|
||||
},
|
||||
},
|
||||
],
|
||||
where: { travelFk: id },
|
||||
};
|
||||
|
||||
const { data } = await axios.get('TravelThermographs', {
|
||||
params: { filter: JSON.parse(JSON.stringify(filter)) },
|
||||
params: { filter },
|
||||
});
|
||||
thermographs.value = data;
|
||||
};
|
||||
|
@ -368,12 +380,12 @@ const getLink = (param) => `#/travel/${entityId.value}/${param}`;
|
|||
<QTd></QTd>
|
||||
<QTd></QTd>
|
||||
<QTd></QTd>
|
||||
<QTd class="text-bold">{{ entriesTotalHb }}</QTd>
|
||||
<QTd class="text-bold">{{ entriesTotalFreight }}</QTd>
|
||||
<QTd class="text-bold">{{ entriesTotalPackageValue }}</QTd>
|
||||
<QTd class="text-bold">{{ entriesTotalCc }}</QTd>
|
||||
<QTd class="text-bold">{{ entriesTotalPallet }}</QTd>
|
||||
<QTd class="text-bold">{{ entriesTotalM3 }}</QTd>
|
||||
<QTd class="text-bold">{{ entriesTotals.hb }}</QTd>
|
||||
<QTd class="text-bold">{{ entriesTotals.freight }}</QTd>
|
||||
<QTd class="text-bold">{{ entriesTotals.packageValue }}</QTd>
|
||||
<QTd class="text-bold">{{ entriesTotals.cc }}</QTd>
|
||||
<QTd class="text-bold">{{ entriesTotals.pallet }}</QTd>
|
||||
<QTd class="text-bold">{{ entriesTotals.m3 }}</QTd>
|
||||
</template>
|
||||
</QTable>
|
||||
</QCard>
|
||||
|
|
|
@ -12,6 +12,7 @@ import axios from 'axios';
|
|||
import useNotify from 'src/composables/useNotify.js';
|
||||
import { toDate, toCelsius } from 'src/filters';
|
||||
import { downloadFile } from 'src/composables/downloadFile';
|
||||
import { useArrayData } from 'src/composables/useArrayData';
|
||||
|
||||
const route = useRoute();
|
||||
const quasar = useQuasar();
|
||||
|
@ -19,16 +20,25 @@ const router = useRouter();
|
|||
const { t } = useI18n();
|
||||
const { notify } = useNotify();
|
||||
|
||||
const travel = computed(() => useArrayData('Travel').store.data);
|
||||
const thermographPaginateRef = ref();
|
||||
const warehouses = ref([]);
|
||||
|
||||
const thermographFilter = {
|
||||
include: {
|
||||
include: [
|
||||
{
|
||||
relation: 'agencyMode',
|
||||
scope: {
|
||||
fields: ['id', 'name'],
|
||||
},
|
||||
},
|
||||
{
|
||||
relation: 'warehouse',
|
||||
scope: {
|
||||
fields: ['id', 'name'],
|
||||
},
|
||||
},
|
||||
],
|
||||
where: { travelFk: route.params.id },
|
||||
order: ['created'],
|
||||
};
|
||||
|
@ -47,6 +57,12 @@ const TableColumns = computed(() => {
|
|||
name: 'temperatureFk',
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
label: t('travel.thermographs.carrier'),
|
||||
field: (row) => row.agencyMode?.name,
|
||||
name: 'agencyModeFk',
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
label: t('globals.maxTemperature'),
|
||||
field: 'maxTemperature',
|
||||
|
@ -116,7 +132,9 @@ const redirectToThermographForm = (action, id) => {
|
|||
};
|
||||
|
||||
if (action === 'edit' && id) {
|
||||
routeDetails.query = { travelThermographFk: id };
|
||||
routeDetails.query = { id };
|
||||
} else if (action === 'create') {
|
||||
routeDetails.query = { agencyModeFk: travel.value?.agencyModeFk };
|
||||
}
|
||||
router.push(routeDetails);
|
||||
};
|
||||
|
|
|
@ -39,6 +39,7 @@ const warehousesOptions = ref([]);
|
|||
const temperaturesOptions = ref([]);
|
||||
const thermographForm = ref({});
|
||||
const inputFileRef = ref(null);
|
||||
const agencyModeOptions = ref([]);
|
||||
|
||||
onBeforeMount(async () => {
|
||||
if (props.viewAction === 'create') {
|
||||
|
@ -49,8 +50,8 @@ onBeforeMount(async () => {
|
|||
|
||||
if (route.query.thermographData) {
|
||||
const thermographData = JSON.parse(route.query.thermographData);
|
||||
for (let key in thermographForm) {
|
||||
thermographForm[key] = thermographData[key];
|
||||
for (let key in thermographForm.value) {
|
||||
thermographForm.value[key] = thermographData[key];
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -72,6 +73,7 @@ const setCreateDefaultParams = async () => {
|
|||
thermographForm.value.reference = route.params.id;
|
||||
thermographForm.value.dmsTypeId = dataResponse.id;
|
||||
thermographForm.value.state = 'Ok';
|
||||
thermographForm.value.agencyModeFk = +route.query.agencyModeFk;
|
||||
thermographForm.value.description = t('travel.thermographs.travelFileDescription', {
|
||||
travelId: route.params.id,
|
||||
}).toUpperCase();
|
||||
|
@ -81,7 +83,7 @@ const setEditDefaultParams = async () => {
|
|||
const filterObj = { include: { relation: 'dms' } };
|
||||
const filter = encodeURIComponent(JSON.stringify(filterObj));
|
||||
const { data } = await axios.get(
|
||||
`TravelThermographs/${route.query.travelThermographFk}?filter=${filter}`
|
||||
`TravelThermographs/${route.query.id}?filter=${filter}`,
|
||||
);
|
||||
|
||||
if (data) {
|
||||
|
@ -98,6 +100,7 @@ const setEditDefaultParams = async () => {
|
|||
thermographForm.value.minTemperature = data.minTemperature;
|
||||
thermographForm.value.temperatureFk = data.temperatureFk;
|
||||
thermographForm.value.travelThermographFk = data.id;
|
||||
thermographForm.value.agencyModeFk = data.agencyModeFk;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -159,9 +162,14 @@ const onThermographCreated = async (data) => {
|
|||
auto-load
|
||||
url="Temperatures"
|
||||
/>
|
||||
<FetchData
|
||||
@on-fetch="(data) => (agencyModeOptions = data)"
|
||||
auto-load
|
||||
url="AgencyModeIncomings"
|
||||
/>
|
||||
|
||||
<QPage class="column items-center full-width">
|
||||
<QForm
|
||||
model="travel"
|
||||
:form-initial-data="thermographForm"
|
||||
:observe-form-changes="viewAction === 'create'"
|
||||
:default-actions="true"
|
||||
|
@ -201,10 +209,11 @@ const onThermographCreated = async (data) => {
|
|||
}"
|
||||
sort-by="thermographFk ASC"
|
||||
option-label="thermographFk"
|
||||
option-filter-value="thermographFk"
|
||||
option-filter-value="id"
|
||||
:disable="viewAction === 'edit'"
|
||||
:tooltip="t('New thermograph')"
|
||||
:roles-allowed-to-create="['logistic']"
|
||||
data-key="travelThermographSelect"
|
||||
>
|
||||
<template #form>
|
||||
<CreateThermographForm
|
||||
|
@ -218,10 +227,20 @@ const onThermographCreated = async (data) => {
|
|||
/>
|
||||
</VnRow>
|
||||
<VnRow>
|
||||
<VnSelect
|
||||
:label="t('travel.thermographs.carrier')"
|
||||
v-model="thermographForm.agencyModeFk"
|
||||
:options="agencyModeOptions"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
/>
|
||||
|
||||
<VnInput
|
||||
v-model="thermographForm.reference"
|
||||
:label="t('globals.reference')"
|
||||
/>
|
||||
</VnRow>
|
||||
<VnRow>
|
||||
<VnSelect
|
||||
:label="t('globals.type')"
|
||||
v-model="thermographForm.dmsTypeId"
|
||||
|
@ -229,8 +248,6 @@ const onThermographCreated = async (data) => {
|
|||
option-value="id"
|
||||
option-label="name"
|
||||
/>
|
||||
</VnRow>
|
||||
<VnRow>
|
||||
<VnSelect
|
||||
:label="t('globals.company')"
|
||||
v-model="thermographForm.companyId"
|
||||
|
@ -238,6 +255,8 @@ const onThermographCreated = async (data) => {
|
|||
option-value="id"
|
||||
option-label="code"
|
||||
/>
|
||||
</VnRow>
|
||||
<VnRow>
|
||||
<VnSelect
|
||||
:label="t('globals.warehouse')"
|
||||
v-model="thermographForm.warehouseId"
|
||||
|
@ -245,8 +264,6 @@ const onThermographCreated = async (data) => {
|
|||
option-value="id"
|
||||
option-label="name"
|
||||
/>
|
||||
</VnRow>
|
||||
<VnRow>
|
||||
<VnSelect
|
||||
:label="t('travel.thermographs.temperature')"
|
||||
:options="temperaturesOptions"
|
||||
|
@ -256,6 +273,8 @@ const onThermographCreated = async (data) => {
|
|||
v-model="thermographForm.temperatureFk"
|
||||
:required="true"
|
||||
/>
|
||||
</VnRow>
|
||||
<VnRow>
|
||||
<VnInputNumber
|
||||
v-model="thermographForm.maxTemperature"
|
||||
:label="t('globals.maxTemperature')"
|
||||
|
|
|
@ -1,25 +1,13 @@
|
|||
import { RouterView } from 'vue-router';
|
||||
|
||||
export default {
|
||||
path: '/agency',
|
||||
name: 'Agency',
|
||||
meta: {
|
||||
title: 'agency',
|
||||
icon: 'garage_home',
|
||||
moduleName: 'Agency',
|
||||
},
|
||||
component: RouterView,
|
||||
redirect: { name: 'AgencyCard' },
|
||||
menus: {
|
||||
main: [],
|
||||
card: ['AgencyBasicData', 'AgencyModes', 'AgencyWorkCenters', 'AgencyLog'],
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: '/agency/:id',
|
||||
const agencyCard = {
|
||||
path: ':id',
|
||||
name: 'AgencyCard',
|
||||
component: () => import('src/pages/Route/Agency/Card/AgencyCard.vue'),
|
||||
redirect: { name: 'AgencySummary' },
|
||||
meta: {
|
||||
menu: ['AgencyBasicData', 'AgencyModes', 'AgencyWorkCenters', 'AgencyLog'],
|
||||
},
|
||||
children: [
|
||||
{
|
||||
name: 'AgencySummary',
|
||||
|
@ -28,8 +16,7 @@ export default {
|
|||
title: 'summary',
|
||||
icon: 'view_list',
|
||||
},
|
||||
component: () =>
|
||||
import('src/pages/Route/Agency/Card/AgencySummary.vue'),
|
||||
component: () => import('src/pages/Route/Agency/Card/AgencySummary.vue'),
|
||||
},
|
||||
{
|
||||
name: 'AgencyBasicData',
|
||||
|
@ -38,8 +25,7 @@ export default {
|
|||
title: 'basicData',
|
||||
icon: 'vn:settings',
|
||||
},
|
||||
component: () =>
|
||||
import('pages/Route/Agency/Card/AgencyBasicData.vue'),
|
||||
component: () => import('pages/Route/Agency/Card/AgencyBasicData.vue'),
|
||||
},
|
||||
{
|
||||
path: 'workCenter',
|
||||
|
@ -54,9 +40,7 @@ export default {
|
|||
title: 'workCenters',
|
||||
},
|
||||
component: () =>
|
||||
import(
|
||||
'src/pages/Route/Agency/Card/AgencyWorkcenter.vue'
|
||||
),
|
||||
import('src/pages/Route/Agency/Card/AgencyWorkcenter.vue'),
|
||||
},
|
||||
],
|
||||
},
|
||||
|
@ -87,6 +71,43 @@ export default {
|
|||
component: () => import('src/pages/Route/Agency/Card/AgencyLog.vue'),
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
export default {
|
||||
name: 'Agency',
|
||||
path: '/agency',
|
||||
meta: {
|
||||
title: 'agency',
|
||||
icon: 'garage_home',
|
||||
moduleName: 'Agency',
|
||||
},
|
||||
component: RouterView,
|
||||
redirect: { name: 'RouteMain' },
|
||||
children: [
|
||||
{
|
||||
name: 'AgencyMain',
|
||||
path: '',
|
||||
component: () => import('src/components/common/VnModule.vue'),
|
||||
redirect: { name: 'AgencyIndexMain' },
|
||||
children: [
|
||||
{
|
||||
name: 'AgencyIndexMain',
|
||||
path: '',
|
||||
redirect: { name: 'AgencyList' },
|
||||
component: () => import('src/pages/Route/Agency/AgencyList.vue'),
|
||||
children: [
|
||||
{
|
||||
name: 'AgencyList',
|
||||
path: 'list',
|
||||
meta: {
|
||||
title: 'list',
|
||||
icon: 'view_list',
|
||||
},
|
||||
},
|
||||
agencyCard,
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
||||
|
|
|
@ -12,8 +12,6 @@ import Supplier from './supplier';
|
|||
import Travel from './travel';
|
||||
import Order from './order';
|
||||
import Entry from './entry';
|
||||
import roadmap from './roadmap';
|
||||
import Agency from './agency';
|
||||
import Zone from './zone';
|
||||
import Account from './account';
|
||||
import Monitor from './monitor';
|
||||
|
@ -33,8 +31,6 @@ export default [
|
|||
Order,
|
||||
invoiceIn,
|
||||
Entry,
|
||||
roadmap,
|
||||
Agency,
|
||||
Zone,
|
||||
Account,
|
||||
Monitor,
|
||||
|
|
|
@ -1,18 +1,12 @@
|
|||
import { RouterView } from 'vue-router';
|
||||
import { setRectificative } from 'src/pages/InvoiceIn/composables/setRectificative';
|
||||
export default {
|
||||
path: '/invoice-in',
|
||||
name: 'InvoiceIn',
|
||||
|
||||
const invoiceInCard = {
|
||||
name: 'InvoiceInCard',
|
||||
path: ':id',
|
||||
component: () => import('src/pages/InvoiceIn/Card/InvoiceInCard.vue'),
|
||||
redirect: { name: 'InvoiceInSummary' },
|
||||
meta: {
|
||||
title: 'invoiceIns',
|
||||
icon: 'vn:invoice-in',
|
||||
moduleName: 'InvoiceIn',
|
||||
},
|
||||
component: RouterView,
|
||||
redirect: { name: 'InvoiceInMain' },
|
||||
menus: {
|
||||
main: ['InvoiceInList', 'InvoiceInSerial'],
|
||||
card: [
|
||||
menu: [
|
||||
'InvoiceInBasicData',
|
||||
'InvoiceInVat',
|
||||
'InvoiceInDueDay',
|
||||
|
@ -23,60 +17,13 @@ export default {
|
|||
},
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
name: 'InvoiceInMain',
|
||||
component: () => import('src/components/common/VnModule.vue'),
|
||||
redirect: { name: 'InvoiceInList' },
|
||||
children: [
|
||||
{
|
||||
path: 'list',
|
||||
name: 'InvoiceInList',
|
||||
meta: {
|
||||
title: 'list',
|
||||
icon: 'view_list',
|
||||
},
|
||||
component: () => import('src/pages/InvoiceIn/InvoiceInList.vue'),
|
||||
},
|
||||
{
|
||||
path: 'serial',
|
||||
name: 'InvoiceInSerial',
|
||||
meta: {
|
||||
title: 'serial',
|
||||
icon: 'view_list',
|
||||
},
|
||||
component: () =>
|
||||
import('src/pages/InvoiceIn/Serial/InvoiceInSerial.vue'),
|
||||
},
|
||||
{
|
||||
path: 'create',
|
||||
name: 'InvoiceInCreare',
|
||||
meta: {
|
||||
title: 'invoiceInCreate',
|
||||
icon: 'create',
|
||||
},
|
||||
component: () => import('src/pages/InvoiceIn/InvoiceInCreate.vue'),
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'InvoiceInCard',
|
||||
path: ':id',
|
||||
component: () => import('src/pages/InvoiceIn/Card/InvoiceInCard.vue'),
|
||||
redirect: { name: 'InvoiceInSummary' },
|
||||
beforeEnter: async (to, from, next) => {
|
||||
await setRectificative(to);
|
||||
next();
|
||||
},
|
||||
children: [
|
||||
{
|
||||
name: 'InvoiceInSummary',
|
||||
path: 'summary',
|
||||
name: 'InvoiceInSummary',
|
||||
meta: {
|
||||
title: 'summary',
|
||||
icon: 'view_list',
|
||||
},
|
||||
component: () =>
|
||||
import('src/pages/InvoiceIn/Card/InvoiceInSummary.vue'),
|
||||
component: () => import('src/pages/InvoiceIn/Card/InvoiceInSummary.vue'),
|
||||
},
|
||||
{
|
||||
name: 'InvoiceInBasicData',
|
||||
|
@ -117,15 +64,6 @@ export default {
|
|||
component: () =>
|
||||
import('src/pages/InvoiceIn/Card/InvoiceInIntrastat.vue'),
|
||||
},
|
||||
{
|
||||
name: 'InvoiceInLog',
|
||||
path: 'log',
|
||||
meta: {
|
||||
title: 'log',
|
||||
icon: 'history',
|
||||
},
|
||||
component: () => import('src/pages/InvoiceIn/Card/InvoiceInLog.vue'),
|
||||
},
|
||||
{
|
||||
name: 'InvoiceInCorrective',
|
||||
path: 'corrective',
|
||||
|
@ -136,6 +74,71 @@ export default {
|
|||
component: () =>
|
||||
import('src/pages/InvoiceIn/Card/InvoiceInCorrective.vue'),
|
||||
},
|
||||
{
|
||||
name: 'InvoiceInLog',
|
||||
path: 'log',
|
||||
meta: {
|
||||
title: 'log',
|
||||
icon: 'history',
|
||||
},
|
||||
component: () => import('src/pages/InvoiceIn/Card/InvoiceInLog.vue'),
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
export default {
|
||||
name: 'InvoiceIn',
|
||||
path: '/invoice-in',
|
||||
meta: {
|
||||
title: 'invoiceIns',
|
||||
icon: 'vn:invoice-in',
|
||||
moduleName: 'InvoiceIn',
|
||||
menu: ['InvoiceInList', 'InvoiceInSerial'],
|
||||
},
|
||||
component: RouterView,
|
||||
redirect: { name: 'InvoiceInMain' },
|
||||
children: [
|
||||
{
|
||||
name: 'InvoiceInMain',
|
||||
path: '',
|
||||
component: () => import('src/components/common/VnModule.vue'),
|
||||
redirect: { name: 'InvoiceInIndexMain' },
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
name: 'InvoiceInIndexMain',
|
||||
redirect: { name: 'InvoiceInList' },
|
||||
component: () => import('src/pages/InvoiceIn/InvoiceInList.vue'),
|
||||
children: [
|
||||
{
|
||||
name: 'InvoiceInList',
|
||||
path: 'list',
|
||||
meta: {
|
||||
title: 'list',
|
||||
icon: 'view_list',
|
||||
},
|
||||
},
|
||||
invoiceInCard,
|
||||
],
|
||||
},
|
||||
{
|
||||
path: 'create',
|
||||
name: 'InvoiceInCreare',
|
||||
meta: {
|
||||
title: 'invoiceInCreate',
|
||||
icon: 'create',
|
||||
},
|
||||
component: () => import('src/pages/InvoiceIn/InvoiceInCreate.vue'),
|
||||
},
|
||||
{
|
||||
path: 'serial',
|
||||
name: 'InvoiceInSerial',
|
||||
meta: {
|
||||
title: 'serial',
|
||||
icon: 'view_list',
|
||||
},
|
||||
component: () => import('src/pages/InvoiceIn/Serial/InvoiceInSerial.vue'),
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
|
|
@ -1,53 +0,0 @@
|
|||
import { RouterView } from 'vue-router';
|
||||
|
||||
export default {
|
||||
path: '/route/roadmap',
|
||||
name: 'Roadmap',
|
||||
meta: {
|
||||
title: 'roadmap',
|
||||
icon: 'vn:troncales',
|
||||
moduleName: 'Roadmap',
|
||||
},
|
||||
component: RouterView,
|
||||
redirect: { name: 'RouteMain' },
|
||||
menus: {
|
||||
card: ['RoadmapBasicData', 'RoadmapStops'],
|
||||
},
|
||||
children: [
|
||||
{
|
||||
name: 'RouteRoadmapCard',
|
||||
path: ':id',
|
||||
component: () => import('src/pages/Route/Roadmap/RoadmapCard.vue'),
|
||||
redirect: { name: 'RoadmapSummary' },
|
||||
children: [
|
||||
{
|
||||
name: 'RoadmapSummary',
|
||||
path: 'summary',
|
||||
meta: {
|
||||
title: 'summary',
|
||||
icon: 'open_in_new',
|
||||
},
|
||||
component: () => import('pages/Route/Roadmap/RoadmapSummary.vue'),
|
||||
},
|
||||
{
|
||||
name: 'RoadmapBasicData',
|
||||
path: 'basic-data',
|
||||
meta: {
|
||||
title: 'basicData',
|
||||
icon: 'vn:settings',
|
||||
},
|
||||
component: () => import('pages/Route/Roadmap/RoadmapBasicData.vue'),
|
||||
},
|
||||
{
|
||||
name: 'RoadmapStops',
|
||||
path: 'stops',
|
||||
meta: {
|
||||
title: 'stops',
|
||||
icon: 'vn:lines',
|
||||
},
|
||||
component: () => import('pages/Route/Roadmap/RoadmapStops.vue'),
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
|
@ -1,110 +1,13 @@
|
|||
import { RouterView } from 'vue-router';
|
||||
|
||||
export default {
|
||||
path: '/route',
|
||||
name: 'Route',
|
||||
meta: {
|
||||
title: 'routes',
|
||||
icon: 'vn:delivery',
|
||||
moduleName: 'Route',
|
||||
},
|
||||
component: RouterView,
|
||||
redirect: { name: 'RouteMain' },
|
||||
menus: {
|
||||
main: [
|
||||
'RouteList',
|
||||
'RouteExtendedList',
|
||||
'RouteAutonomous',
|
||||
'RouteRoadmap',
|
||||
'CmrList',
|
||||
'AgencyList',
|
||||
],
|
||||
card: ['RouteBasicData', 'RouteTickets', 'RouteLog'],
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: '/route',
|
||||
name: 'RouteMain',
|
||||
component: () => import('src/components/common/VnModule.vue'),
|
||||
redirect: { name: 'RouteList' },
|
||||
children: [
|
||||
{
|
||||
path: 'list',
|
||||
name: 'RouteList',
|
||||
meta: {
|
||||
title: 'RouteList',
|
||||
icon: 'view_list',
|
||||
},
|
||||
component: () => import('src/pages/Route/RouteList.vue'),
|
||||
},
|
||||
{
|
||||
path: 'extended-list',
|
||||
name: 'RouteExtendedList',
|
||||
meta: {
|
||||
title: 'RouteExtendedList',
|
||||
icon: 'format_list_bulleted',
|
||||
},
|
||||
component: () => import('src/pages/Route/RouteExtendedList.vue'),
|
||||
},
|
||||
{
|
||||
path: 'create',
|
||||
name: 'RouteCreate',
|
||||
meta: {
|
||||
title: 'routeCreate',
|
||||
icon: 'add',
|
||||
},
|
||||
component: () => import('src/pages/Route/Card/RouteForm.vue'),
|
||||
},
|
||||
{
|
||||
path: 'agency-term',
|
||||
name: 'RouteAutonomous',
|
||||
meta: {
|
||||
title: 'autonomous',
|
||||
icon: 'vn:agency-term',
|
||||
},
|
||||
component: () => import('src/pages/Route/RouteAutonomous.vue'),
|
||||
},
|
||||
{
|
||||
path: 'roadmap',
|
||||
name: 'RouteRoadmap',
|
||||
meta: {
|
||||
title: 'RouteRoadmap',
|
||||
icon: 'vn:troncales',
|
||||
},
|
||||
component: () => import('src/pages/Route/RouteRoadmap.vue'),
|
||||
},
|
||||
{
|
||||
path: 'cmr',
|
||||
name: 'CmrList',
|
||||
meta: {
|
||||
title: 'cmrsList',
|
||||
icon: 'fact_check',
|
||||
},
|
||||
component: () => import('src/pages/Route/Cmr/CmrList.vue'),
|
||||
},
|
||||
{
|
||||
path: '/agency',
|
||||
redirect: { name: 'AgencyList' },
|
||||
children: [
|
||||
{
|
||||
path: 'list',
|
||||
name: 'AgencyList',
|
||||
meta: {
|
||||
title: 'agencyList',
|
||||
icon: 'list',
|
||||
},
|
||||
component: () =>
|
||||
import('src/pages/Route/Agency/AgencyList.vue'),
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
const routeCard = {
|
||||
name: 'RouteCard',
|
||||
path: ':id',
|
||||
component: () => import('src/pages/Route/Card/RouteCard.vue'),
|
||||
redirect: { name: 'RouteSummary' },
|
||||
meta: {
|
||||
menu: ['RouteBasicData', 'RouteTickets', 'RouteLog'],
|
||||
},
|
||||
children: [
|
||||
{
|
||||
name: 'RouteBasicData',
|
||||
|
@ -143,6 +46,241 @@ export default {
|
|||
component: () => import('src/pages/Route/RouteLog.vue'),
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
const agencyCard = {
|
||||
path: ':id',
|
||||
name: 'AgencyCard',
|
||||
component: () => import('src/pages/Route/Agency/Card/AgencyCard.vue'),
|
||||
redirect: { name: 'AgencySummary' },
|
||||
meta: {
|
||||
menu: ['AgencyBasicData', 'AgencyModes', 'AgencyWorkCenters', 'AgencyLog'],
|
||||
},
|
||||
children: [
|
||||
{
|
||||
name: 'AgencySummary',
|
||||
path: 'summary',
|
||||
meta: {
|
||||
title: 'summary',
|
||||
icon: 'view_list',
|
||||
},
|
||||
component: () => import('src/pages/Route/Agency/Card/AgencySummary.vue'),
|
||||
},
|
||||
{
|
||||
name: 'AgencyBasicData',
|
||||
path: 'basic-data',
|
||||
meta: {
|
||||
title: 'basicData',
|
||||
icon: 'vn:settings',
|
||||
},
|
||||
component: () => import('pages/Route/Agency/Card/AgencyBasicData.vue'),
|
||||
},
|
||||
{
|
||||
path: 'workCenter',
|
||||
name: 'AgencyWorkCenterCard',
|
||||
redirect: { name: 'AgencyWorkCenters' },
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
name: 'AgencyWorkCenters',
|
||||
meta: {
|
||||
icon: 'apartment',
|
||||
title: 'workCenters',
|
||||
},
|
||||
component: () =>
|
||||
import('src/pages/Route/Agency/Card/AgencyWorkcenter.vue'),
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: 'modes',
|
||||
name: 'AgencyModesCard',
|
||||
redirect: { name: 'AgencyModes' },
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
name: 'AgencyModes',
|
||||
meta: {
|
||||
icon: 'format_list_bulleted',
|
||||
title: 'modes',
|
||||
},
|
||||
component: () =>
|
||||
import('src/pages/Route/Agency/Card/AgencyModes.vue'),
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'AgencyLog',
|
||||
path: 'log',
|
||||
meta: {
|
||||
title: 'log',
|
||||
icon: 'history',
|
||||
},
|
||||
component: () => import('src/pages/Route/Agency/Card/AgencyLog.vue'),
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
const roadmapCard = {
|
||||
path: ':id',
|
||||
name: 'RoadmapCard',
|
||||
component: () => import('src/pages/Route/Roadmap/RoadmapCard.vue'),
|
||||
redirect: { name: 'RoadmapSummary' },
|
||||
meta: {
|
||||
menu: ['RoadmapBasicData', 'RoadmapStops'],
|
||||
},
|
||||
children: [
|
||||
{
|
||||
name: 'RoadmapSummary',
|
||||
path: 'summary',
|
||||
meta: {
|
||||
title: 'summary',
|
||||
icon: 'open_in_new',
|
||||
},
|
||||
component: () => import('pages/Route/Roadmap/RoadmapSummary.vue'),
|
||||
},
|
||||
{
|
||||
name: 'RoadmapBasicData',
|
||||
path: 'basic-data',
|
||||
meta: {
|
||||
title: 'basicData',
|
||||
icon: 'vn:settings',
|
||||
},
|
||||
component: () => import('pages/Route/Roadmap/RoadmapBasicData.vue'),
|
||||
},
|
||||
{
|
||||
name: 'RoadmapStops',
|
||||
path: 'stops',
|
||||
meta: {
|
||||
title: 'stops',
|
||||
icon: 'vn:lines',
|
||||
},
|
||||
component: () => import('pages/Route/Roadmap/RoadmapStops.vue'),
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
export default {
|
||||
name: 'Route',
|
||||
path: '/route',
|
||||
meta: {
|
||||
title: 'routes',
|
||||
icon: 'vn:delivery',
|
||||
moduleName: 'Route',
|
||||
menu: [
|
||||
'RouteList',
|
||||
'RouteExtendedList',
|
||||
'RouteAutonomous',
|
||||
'RouteRoadmap',
|
||||
'CmrList',
|
||||
'AgencyList',
|
||||
],
|
||||
},
|
||||
component: RouterView,
|
||||
redirect: { name: 'RouteMain' },
|
||||
children: [
|
||||
{
|
||||
name: 'RouteMain',
|
||||
path: '',
|
||||
component: () => import('src/components/common/VnModule.vue'),
|
||||
redirect: { name: 'RouteIndexMain' },
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
name: 'RouteIndexMain',
|
||||
redirect: { name: 'RouteList' },
|
||||
component: () => import('src/pages/Route/RouteList.vue'),
|
||||
children: [
|
||||
{
|
||||
name: 'RouteList',
|
||||
path: 'list',
|
||||
meta: {
|
||||
title: 'list',
|
||||
icon: 'view_list',
|
||||
},
|
||||
},
|
||||
routeCard,
|
||||
],
|
||||
},
|
||||
{
|
||||
path: 'extended-list',
|
||||
name: 'RouteExtendedList',
|
||||
meta: {
|
||||
title: 'RouteExtendedList',
|
||||
icon: 'format_list_bulleted',
|
||||
},
|
||||
component: () => import('src/pages/Route/RouteExtendedList.vue'),
|
||||
},
|
||||
{
|
||||
path: 'create',
|
||||
name: 'RouteCreate',
|
||||
meta: {
|
||||
title: 'routeCreate',
|
||||
icon: 'add',
|
||||
},
|
||||
component: () => import('src/pages/Route/Card/RouteForm.vue'),
|
||||
},
|
||||
{
|
||||
path: 'agency-term',
|
||||
name: 'RouteAutonomous',
|
||||
meta: {
|
||||
title: 'autonomous',
|
||||
icon: 'vn:agency-term',
|
||||
},
|
||||
component: () => import('src/pages/Route/RouteAutonomous.vue'),
|
||||
},
|
||||
{
|
||||
path: 'roadmap',
|
||||
name: 'RouteRoadmap',
|
||||
redirect: { name: 'RoadmapList' },
|
||||
meta: {
|
||||
title: 'RouteRoadmap',
|
||||
icon: 'vn:troncales',
|
||||
},
|
||||
component: () => import('src/pages/Route/RouteRoadmap.vue'),
|
||||
children: [
|
||||
{
|
||||
name: 'RoadmapList',
|
||||
path: 'list',
|
||||
meta: {
|
||||
title: 'list',
|
||||
icon: 'view_list',
|
||||
},
|
||||
},
|
||||
roadmapCard,
|
||||
],
|
||||
},
|
||||
{
|
||||
path: 'cmr',
|
||||
name: 'CmrList',
|
||||
meta: {
|
||||
title: 'cmrsList',
|
||||
icon: 'fact_check',
|
||||
},
|
||||
component: () => import('src/pages/Route/Cmr/CmrList.vue'),
|
||||
},
|
||||
{
|
||||
path: 'agency',
|
||||
name: 'RouteAgency',
|
||||
redirect: { name: 'AgencyList' },
|
||||
meta: {
|
||||
title: 'agency',
|
||||
icon: 'garage_home',
|
||||
},
|
||||
component: () => import('src/pages/Route/Agency/AgencyList.vue'),
|
||||
children: [
|
||||
{
|
||||
name: 'AgencyList',
|
||||
path: 'list',
|
||||
meta: {
|
||||
title: 'list',
|
||||
icon: 'view_list',
|
||||
},
|
||||
},
|
||||
agencyCard,
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
||||
|
|
|
@ -12,8 +12,6 @@ import travel from './modules/travel';
|
|||
import shelving from 'src/router/modules/shelving';
|
||||
import order from 'src/router/modules/order';
|
||||
import entry from 'src/router/modules/entry';
|
||||
import roadmap from 'src/router/modules/roadmap';
|
||||
import agency from 'src/router/modules/agency';
|
||||
import zone from 'src/router/modules/zone';
|
||||
import account from './modules/account';
|
||||
import monitor from 'src/router/modules/monitor';
|
||||
|
@ -82,9 +80,7 @@ const routes = [
|
|||
route,
|
||||
supplier,
|
||||
travel,
|
||||
roadmap,
|
||||
entry,
|
||||
agency,
|
||||
zone,
|
||||
account,
|
||||
{
|
||||
|
|
|
@ -9,7 +9,7 @@ describe('InvoiceInList', () => {
|
|||
cy.viewport(1920, 1080);
|
||||
cy.login('developer');
|
||||
cy.visit(`/#/invoice-in/list`);
|
||||
cy.get('#searchbar input').type('{enter}');
|
||||
cy.get('#searchbar input').should('be.visible').type('{enter}');
|
||||
});
|
||||
|
||||
it('should redirect on clicking a invoice', () => {
|
||||
|
@ -22,7 +22,7 @@ describe('InvoiceInList', () => {
|
|||
});
|
||||
});
|
||||
// https://redmine.verdnatura.es/issues/8420
|
||||
it.skip('should open the details', () => {
|
||||
it('should open the details', () => {
|
||||
cy.get(firstDetailBtn).click();
|
||||
cy.get(summaryHeaders).eq(1).contains('Basic data');
|
||||
cy.get(summaryHeaders).eq(4).contains('Vat');
|
||||
|
|
|
@ -2,7 +2,7 @@ describe('AgencyWorkCenter', () => {
|
|||
beforeEach(() => {
|
||||
cy.viewport(1920, 1080);
|
||||
cy.login('developer');
|
||||
cy.visit(`/#/agency/11/workCenter`);
|
||||
cy.visit(`/#/route/agency/11/workCenter`);
|
||||
});
|
||||
const createButton = '.q-page-sticky > div > .q-btn > .q-btn__content > .q-icon';
|
||||
const workCenterCombobox = 'input[role="combobox"]';
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
describe('RoadMap', () => {
|
||||
beforeEach(() => {
|
||||
cy.viewport(1920, 1080);
|
||||
cy.login('developer');
|
||||
cy.visit(`/#/route/roadmap`);
|
||||
});
|
||||
it('Route list create roadmap and redirect', () => {
|
||||
cy.addBtnClick();
|
||||
cy.get('input[name="name"]').eq(1).type('roadMapTestOne{enter}');
|
||||
cy.get('input[name="name"]').type('roadMapTestOne{enter}');
|
||||
cy.get('.q-notification__message').should('have.text', 'Data created');
|
||||
cy.url().should('include', '/summary');
|
||||
});
|
||||
|
|
|
@ -30,14 +30,15 @@ describe('TicketList', () => {
|
|||
cy.get(firstRow).find('.q-btn:first').click();
|
||||
cy.get('@windowOpen').should('be.calledWithMatch', /\/ticket\/\d+\/sale/);
|
||||
});
|
||||
// https://redmine.verdnatura.es/issues/8424
|
||||
it.skip('should open ticket summary', () => {
|
||||
|
||||
it('should open ticket summary', () => {
|
||||
searchResults();
|
||||
cy.get(firstRow).find('.q-btn:last').click();
|
||||
cy.dataCy('ticketSummary').should('exist');
|
||||
cy.get('.summaryHeader').should('exist');
|
||||
cy.get('.summaryBody').should('exist');
|
||||
});
|
||||
|
||||
it.skip('Client list create new client', () => {
|
||||
it('Client list create new client', () => {
|
||||
cy.dataCy('vnTableCreateBtn').should('exist');
|
||||
cy.dataCy('vnTableCreateBtn').click();
|
||||
const data = {
|
||||
|
@ -45,9 +46,9 @@ describe('TicketList', () => {
|
|||
Warehouse: { val: 'Warehouse One', type: 'select' },
|
||||
Address: { val: 'employee', type: 'select' },
|
||||
Landed: { val: '01-01-2024', type: 'date' },
|
||||
Agency: { val: 'Other agency', type: 'select' },
|
||||
};
|
||||
cy.fillInForm(data);
|
||||
cy.dataCy('Agency_select').click();
|
||||
cy.dataCy('FormModelPopup_save').click();
|
||||
cy.checkNotification('Data created');
|
||||
cy.url().should('match', /\/ticket\/\d+\/summary/);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/// <reference types="cypress" />
|
||||
describe('TicketRequest', () => {
|
||||
describe('TicketNotes', () => {
|
||||
beforeEach(() => {
|
||||
cy.login('developer');
|
||||
cy.viewport(1920, 1080);
|
||||
|
@ -13,7 +13,7 @@ describe('TicketRequest', () => {
|
|||
cy.selectOption('[data-cy="ticketNotesObservationType"]:last', 'Weight');
|
||||
cy.dataCy('ticketNotesDescription').should('exist');
|
||||
cy.get('[data-cy="ticketNotesDescription"]:last').type(
|
||||
'This is a note description'
|
||||
'This is a note description',
|
||||
);
|
||||
cy.dataCy('crudModelDefaultSaveBtn').click();
|
||||
cy.checkNotification('Data saved');
|
||||
|
|
|
@ -6,7 +6,7 @@ describe('TicketRequest', () => {
|
|||
cy.visit('/#/ticket/31/request');
|
||||
});
|
||||
|
||||
it.skip('Creates a new request', () => {
|
||||
it('Creates a new request', () => {
|
||||
cy.dataCy('vnTableCreateBtn').should('exist');
|
||||
cy.dataCy('vnTableCreateBtn').click();
|
||||
const data = {
|
||||
|
|
|
@ -10,14 +10,14 @@ describe('VnLog', () => {
|
|||
cy.openRightMenu();
|
||||
});
|
||||
|
||||
it.skip('should filter by insert actions', () => {
|
||||
it('should filter by insert actions', () => {
|
||||
cy.checkOption(':nth-child(7) > .q-checkbox');
|
||||
cy.get('.q-page').click();
|
||||
cy.validateContent(chips[0], 'Document');
|
||||
cy.validateContent(chips[1], 'Beginning');
|
||||
});
|
||||
|
||||
it.skip('should filter by entity', () => {
|
||||
it('should filter by entity', () => {
|
||||
cy.selectOption('.q-drawer--right .q-item > .q-select', 'Claim');
|
||||
cy.get('.q-page').click();
|
||||
cy.validateContent(chips[0], 'Claim');
|
||||
|
|
|
@ -71,7 +71,7 @@ Cypress.Commands.add('getValue', (selector) => {
|
|||
return cy
|
||||
.get(
|
||||
selector +
|
||||
'> .q-field > .q-field__inner > .q-field__control > .q-field__control-container > .q-field__native > input'
|
||||
'> .q-field > .q-field__inner > .q-field__control > .q-field__control-container > .q-field__native > input',
|
||||
)
|
||||
.invoke('val');
|
||||
}
|
||||
|
@ -264,7 +264,7 @@ Cypress.Commands.add('openListSummary', (row) => {
|
|||
|
||||
Cypress.Commands.add('openRightMenu', (element) => {
|
||||
if (element) cy.waitForElement(element);
|
||||
cy.get('#actions-append').click();
|
||||
cy.get('[data-cy="toggle-right-drawer"]').click();
|
||||
});
|
||||
|
||||
Cypress.Commands.add('openLeftMenu', (element) => {
|
||||
|
@ -330,7 +330,7 @@ Cypress.Commands.add('clickButtonsDescriptor', (id) => {
|
|||
|
||||
Cypress.Commands.add('openUserPanel', () => {
|
||||
cy.get(
|
||||
'.column > .q-avatar > .q-avatar__content > .q-img > .q-img__container > .q-img__image'
|
||||
'.column > .q-avatar > .q-avatar__content > .q-img > .q-img__container > .q-img__image',
|
||||
).click();
|
||||
});
|
||||
|
||||
|
@ -356,7 +356,7 @@ Cypress.Commands.add('checkValueForm', (id, search) => {
|
|||
|
||||
Cypress.Commands.add('checkValueSelectForm', (id, search) => {
|
||||
cy.get(
|
||||
`.grid-create > :nth-child(${id}) > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > .q-field__native > .q-field__input`
|
||||
`.grid-create > :nth-child(${id}) > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > .q-field__native > .q-field__input`,
|
||||
).should('have.value', search);
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue