diff --git a/Jenkinsfile b/Jenkinsfile index a52a9e91d..ea3f1b439 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -94,7 +94,7 @@ pipeline { parallel { stage('Unit') { steps { - sh 'pnpm run test:unit:ci' + sh 'pnpm run test:front:ci' } post { always { diff --git a/README.md b/README.md index e87a84d60..262e12e58 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ quasar dev ### Run unit tests ```bash -pnpm run test:unit +pnpm run test:front ``` ### Run e2e tests diff --git a/package.json b/package.json index e78b0cf3c..1361d1fd8 100644 --- a/package.json +++ b/package.json @@ -14,8 +14,8 @@ "test:e2e": "cypress open", "test:e2e:ci": "npm run resetDatabase && cd ../salix-front && cypress run", "test": "echo \"See package.json => scripts for available tests.\" && exit 0", - "test:unit": "vitest", - "test:unit:ci": "vitest run", + "test:front": "vitest", + "test:front:ci": "vitest run", "commitlint": "commitlint --edit", "prepare": "npx husky install", "addReferenceTag": "node .husky/addReferenceTag.js", diff --git a/src/components/VnTable/VnTable.vue b/src/components/VnTable/VnTable.vue index dd2cefd89..7e9f7aae0 100644 --- a/src/components/VnTable/VnTable.vue +++ b/src/components/VnTable/VnTable.vue @@ -681,6 +681,7 @@ const rowCtrlClickFunction = computed(() => { @update:selected="emit('update:selected', $event)" @selection="(details) => handleSelection(details, rows)" :hide-selected-banner="true" + :data-cy="$props.dataCy ?? 'vnTable'" > diff --git a/src/pages/Item/Card/ItemLastEntries.vue b/src/pages/Item/Card/ItemLastEntries.vue index 7d8890c2b..1fb8bc287 100644 --- a/src/pages/Item/Card/ItemLastEntries.vue +++ b/src/pages/Item/Card/ItemLastEntries.vue @@ -11,7 +11,6 @@ import { toCurrency } from 'filters/index'; import { useArrayData } from 'composables/useArrayData'; import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue'; import SupplierDescriptorProxy from 'src/pages/Supplier/Card/SupplierDescriptorProxy.vue'; - const { t } = useI18n(); const route = useRoute(); const from = ref(); @@ -41,7 +40,7 @@ const itemLastEntries = ref([]); const columns = computed(() => [ { - label: 'Nv', + label: 'NV', name: 'ig', align: 'center', }, @@ -70,6 +69,7 @@ const columns = computed(() => [ field: 'reference', align: 'center', format: (_, row) => toCurrency(row.price2) + ' / ' + toCurrency(row.price3), + style: (row) => highlightedRow(row), }, { label: t('lastEntries.printedStickers'), @@ -84,6 +84,7 @@ const columns = computed(() => [ field: 'stickers', align: 'center', format: (val) => dashIfEmpty(val), + style: (row) => highlightedRow(row), }, { label: 'Packing', @@ -102,12 +103,14 @@ const columns = computed(() => [ name: 'stems', field: 'stems', align: 'center', + style: (row) => highlightedRow(row), }, { label: t('lastEntries.quantity'), name: 'quantity', field: 'quantity', align: 'center', + style: (row) => highlightedRow(row), }, { label: t('lastEntries.cost'), @@ -120,12 +123,14 @@ const columns = computed(() => [ name: 'weight', field: 'weight', align: 'center', + style: (row) => highlightedRow(row), }, { label: t('lastEntries.cube'), name: 'cube', field: 'packagingFk', align: 'center', + style: (row) => highlightedRow(row), }, { label: t('lastEntries.supplier'), @@ -208,6 +213,14 @@ onMounted(async () => { function getBadgeClass(groupingMode, expectedGrouping) { return groupingMode === expectedGrouping ? 'accent-badge' : 'simple-badge'; } + +function highlightedRow(row) { + return row?.isInventorySupplier + ? { + 'background-color': 'var(--vn-section-hover-color)', + } + : ''; +}