+
{{ t('No data to display') }}
@@ -416,6 +413,7 @@ defineExpose({
v-shortcut
@click="showFormDialog()"
class="fill-icon"
+ data-cy="addButton"
>
{{ t('Upload file') }}
diff --git a/src/components/ui/CardDescriptor.vue b/src/components/ui/CardDescriptor.vue
index 9c0c484b4..cf74e4485 100644
--- a/src/components/ui/CardDescriptor.vue
+++ b/src/components/ui/CardDescriptor.vue
@@ -180,6 +180,7 @@ const toModule = computed(() => {
color="white"
class="link"
v-if="summary"
+ data-cy="openSummaryBtn"
>
{{ t('components.smartCard.openSummary') }}
@@ -194,6 +195,7 @@ const toModule = computed(() => {
icon="launch"
round
size="md"
+ data-cy="goToSummaryBtn"
>
{{ t('components.cardDescriptor.summary') }}
diff --git a/src/components/ui/CardSummary.vue b/src/components/ui/CardSummary.vue
index 6a61994c1..05bfed998 100644
--- a/src/components/ui/CardSummary.vue
+++ b/src/components/ui/CardSummary.vue
@@ -81,6 +81,7 @@ async function fetch() {
name: `${moduleName ?? route.meta.moduleName}Summary`,
params: { id: entityId || entity.id },
}"
+ data-cy="goToSummaryBtn"
>
diff --git a/src/pages/Entry/Card/EntryBasicData.vue b/src/pages/Entry/Card/EntryBasicData.vue
index 6462ed24a..34e4a0f9c 100644
--- a/src/pages/Entry/Card/EntryBasicData.vue
+++ b/src/pages/Entry/Card/EntryBasicData.vue
@@ -13,6 +13,7 @@ import VnSelect from 'src/components/common/VnSelect.vue';
import VnInputNumber from 'src/components/common/VnInputNumber.vue';
import VnSelectTravelExtended from 'src/components/common/VnSelectTravelExtended.vue';
import VnSelectSupplier from 'src/components/common/VnSelectSupplier.vue';
+import VnCheckbox from 'src/components/common/VnCheckbox.vue';
const route = useRoute();
const { t } = useI18n();
@@ -53,7 +54,7 @@ onMounted(() => {
:clear-store-on-unmount="false"
>
-
+
{
:required="true"
/>
-
+
{
:positive="false"
/>
-
+
{
:options="companiesOptions"
option-value="id"
option-label="code"
+ sort-by="code"
map-options
hide-selected
:required="true"
/>
-
+
{
:options="currenciesOptions"
option-value="id"
option-label="code"
+ sort-by="code"
/>
-
+
{
:decimal-places="2"
:positive="false"
/>
+
-
+
{
fill-input
/>
-
-
-
-
+
-
+
+ parseFloat(row['price2']).toFixed(2),
@@ -320,7 +291,9 @@ const columns = [
label: t('Box'),
name: 'price3',
component: 'number',
- createDisable: true,
+ createAttrs: {
+ disable: true,
+ },
cellEvent: {
'update:modelValue': async (value, oldValue, row) => {
row['price2'] = row['price2'] * (value / oldValue);
@@ -340,13 +313,6 @@ const columns = [
toggleIndeterminate: false,
},
component: 'checkbox',
- cellEvent: {
- 'update:modelValue': async (value, oldValue, row) => {
- await axios.patch(`Items/${row['itemFk']}`, {
- hasMinPrice: value,
- });
- },
- },
width: '25px',
},
{
@@ -356,13 +322,6 @@ const columns = [
toolTip: t('Minimum price'),
name: 'minPrice',
component: 'number',
- cellEvent: {
- 'update:modelValue': async (value, oldValue, row) => {
- await axios.patch(`Items/${row['itemFk']}`, {
- minPrice: value,
- });
- },
- },
width: '35px',
style: (row) => {
if (!row?.hasMinPrice) return { color: 'var(--vn-label-color)' };
@@ -425,6 +384,23 @@ const columns = [
},
},
];
+const buyerFk = ref(null);
+const itemTypeFk = ref(null);
+const inkFk = ref(null);
+const tag1 = ref(null);
+const tag2 = ref(null);
+const tag1Filter = ref(null);
+const tag2Filter = ref(null);
+const filter = computed(() => {
+ const where = {};
+ where.workerFk = buyerFk.value;
+ where.itemTypeFk = itemTypeFk.value;
+ where.inkFk = inkFk.value;
+ where.tag1 = tag1.value;
+ where.tag2 = tag2.value;
+
+ return { where };
+});
function getQuantityStyle(row) {
if (row?.quantity !== row?.stickers * row?.packing)
@@ -610,6 +586,7 @@ onMounted(() => {
:url="`Entries/${entityId}/getBuyList`"
search-url="EntryBuys"
save-url="Buys/crud"
+ :filter="filter"
:disable-option="{ card: true }"
v-model:selected="selectedRows"
@on-fetch="() => footerFetchDataRef.fetch()"
@@ -655,7 +632,7 @@ onMounted(() => {
:is-editable="editableMode"
:without-header="!editableMode"
:with-filters="editableMode"
- :right-search="editableMode"
+ :right-search="false"
:row-click="false"
:columns="columns"
:beforeSaveFn="beforeSave"
@@ -666,6 +643,46 @@ onMounted(() => {
data-cy="entry-buys"
overlay
>
+
+
+
+
+
+
+
+
+
@@ -696,7 +713,7 @@ onMounted(() => {
- {{ footer?.weight }}
+ {{ footer?.weight }}
@@ -704,9 +721,8 @@ onMounted(() => {
-
- {{ footer?.amount }}
-
+ {{ footer?.amount }} /
+ {{ footer?.checkedAmount }}
{
es:
+ Buyer: Comprador
+ Family: Familia
Article: Artículo
Siz.: Med.
Size: Medida
diff --git a/src/pages/Entry/Card/EntryNotes.vue b/src/pages/Entry/Card/EntryNotes.vue
index 459c3b069..4159ed5ca 100644
--- a/src/pages/Entry/Card/EntryNotes.vue
+++ b/src/pages/Entry/Card/EntryNotes.vue
@@ -2,153 +2,82 @@
import { ref, computed } from 'vue';
import { useRoute } from 'vue-router';
import { useI18n } from 'vue-i18n';
-
-import FetchData from 'components/FetchData.vue';
-import CrudModel from 'components/CrudModel.vue';
-import VnInput from 'src/components/common/VnInput.vue';
-import VnSelect from 'src/components/common/VnSelect.vue';
+import VnTable from 'src/components/VnTable/VnTable.vue';
const { params } = useRoute();
const { t } = useI18n();
-
+const selectedRows = ref([]);
const entryObservationsRef = ref(null);
-const entryObservationsOptions = ref([]);
-const selected = ref([]);
-
-const sortEntryObservationOptions = (data) => {
- entryObservationsOptions.value = [...data].sort((a, b) =>
- a.description.localeCompare(b.description),
- );
-};
-
+const entityId = ref(params.id);
const columns = computed(() => [
{
- name: 'observationType',
- label: t('entry.notes.observationType'),
- field: (row) => row.observationTypeFk,
- sortable: true,
- options: entryObservationsOptions.value,
- required: true,
- model: 'observationTypeFk',
- optionValue: 'id',
- optionLabel: 'description',
- tabIndex: 1,
- align: 'left',
+ name: 'id',
+ isId: true,
+ visible: false,
+ isEditable: false,
+ columnFilter: false,
},
{
+ name: 'observationTypeFk',
+ label: t('entry.notes.observationType'),
+ component: 'select',
+ columnFilter: { inWhere: true },
+ attrs: {
+ inWhere: true,
+ url: 'ObservationTypes',
+ fields: ['id', 'description'],
+ optionValue: 'id',
+ optionLabel: 'description',
+ sortBy: 'description',
+ },
+ width: '30px',
+ create: true,
+ },
+ {
+ align: 'left',
name: 'description',
label: t('globals.description'),
- field: (row) => row.description,
- tabIndex: 2,
- align: 'left',
+ component: 'input',
+ columnFilter: false,
+ attrs: { autogrow: true },
+ create: true,
},
]);
+
+const filter = computed(() => ({
+ fields: ['id', 'entryFk', 'observationTypeFk', 'description'],
+ include: ['observationType'],
+ where: { entryFk: entityId },
+}));
- sortEntryObservationOptions(data)"
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
es:
- Add note: Añadir nota
- Remove note: Quitar nota
+ Create note: Crear nota
diff --git a/src/pages/Entry/Card/EntrySummary.vue b/src/pages/Entry/Card/EntrySummary.vue
index c40e2ba46..53967e66f 100644
--- a/src/pages/Entry/Card/EntrySummary.vue
+++ b/src/pages/Entry/Card/EntrySummary.vue
@@ -92,13 +92,13 @@ onMounted(async () => {