Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into test
gitea/salix-front/pipeline/head This commit looks good Details

This commit is contained in:
Joan Sanchez 2022-10-26 13:58:56 +02:00
commit a2eab92c86
6 changed files with 707 additions and 607 deletions

1220
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -18,10 +18,10 @@
"test:e2e:ci": "cross-env E2E_TEST=true start-test \"quasar dev\" http-get://localhost:8080 \"cypress run\"" "test:e2e:ci": "cross-env E2E_TEST=true start-test \"quasar dev\" http-get://localhost:8080 \"cypress run\""
}, },
"dependencies": { "dependencies": {
"@quasar/extras": "^1.14.0", "@quasar/extras": "^1.15.5",
"axios": "^0.21.1", "axios": "^0.21.1",
"core-js": "^3.6.5", "core-js": "^3.6.5",
"quasar": "^2.7.3", "quasar": "^2.10.0",
"validator": "^13.7.0", "validator": "^13.7.0",
"vue": "^3.0.0", "vue": "^3.0.0",
"vue-i18n": "^9.0.0", "vue-i18n": "^9.0.0",
@ -30,8 +30,8 @@
"devDependencies": { "devDependencies": {
"@babel/eslint-parser": "^7.13.14", "@babel/eslint-parser": "^7.13.14",
"@intlify/vue-i18n-loader": "^4.1.0", "@intlify/vue-i18n-loader": "^4.1.0",
"@quasar/app-webpack": "^3.5.3", "@quasar/app-webpack": "^3.6.2",
"@quasar/quasar-app-extension-testing-e2e-cypress": "^4.1.2", "@quasar/quasar-app-extension-testing-e2e-cypress": "^4.2.2",
"@quasar/quasar-app-extension-testing-unit-jest": "^3.0.0-alpha.10", "@quasar/quasar-app-extension-testing-unit-jest": "^3.0.0-alpha.10",
"eslint": "^8.10.0", "eslint": "^8.10.0",
"eslint-config-prettier": "^8.1.0", "eslint-config-prettier": "^8.1.0",

View File

@ -219,14 +219,19 @@ export default {
attendedBy: 'Attended by', attendedBy: 'Attended by',
created: 'Created', created: 'Created',
state: 'State', state: 'State',
details: { details: 'Details',
title: 'Details', item: 'Item',
columns: { landed: 'Landed',
item: 'Item', quantity: 'Quantity',
landed: 'Delivered', claimed: 'Claimed',
quantity: 'Quantity' description: 'Description',
} price: 'Price',
}, discount: 'Discount',
total: 'Total',
actions: 'Actions',
responsibility: 'Responsibility',
company: 'Company',
person: 'Employee/Customer'
}, },
basicData: { basicData: {
customer: 'Customer', customer: 'Customer',

View File

@ -218,14 +218,19 @@ export default {
attendedBy: 'Atendida por', attendedBy: 'Atendida por',
created: 'Creada', created: 'Creada',
state: 'Estado', state: 'Estado',
details: { details: 'Detalles',
title: 'Detalles', item: 'Artículo',
columns: { landed: 'Entregado',
item: 'Artículo2', quantity: 'Cantidad',
landed: 'Entregado', claimed: 'Reclamado',
quantity: 'Cantidad' description: 'Descripción',
} price: 'Precio',
}, discount: 'Descuento',
total: 'Total',
actions: 'Acciones',
responsibility: 'Responsabilidad',
company: 'Empresa',
person: 'Comercial/Cliente'
}, },
basicData: { basicData: {
customer: 'Cliente', customer: 'Cliente',

View File

@ -1,9 +1,9 @@
<script setup> <script setup>
import { onMounted, defineProps, ref, computed } from 'vue'; import { onMounted, ref, computed } from 'vue';
import { useRoute } from 'vue-router'; import { useRoute } from 'vue-router';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import axios from 'axios'; import axios from 'axios';
import { toDate } from 'src/filters'; import { toDate, toCurrency } from 'src/filters';
import SkeletonSummary from 'src/components/SkeletonSummary'; import SkeletonSummary from 'src/components/SkeletonSummary';
onMounted(() => fetch()); onMounted(() => fetch());
@ -33,51 +33,51 @@ function fetch() {
const detailsColumns = ref([ const detailsColumns = ref([
{ {
name: 'item', name: 'item',
label: t('claim.summary.details.columns.item'), label: 'claim.summary.item',
field: (row) => row.sale.itemFk, field: (row) => row.sale.itemFk,
sortable: true, sortable: true,
}, },
{ {
name: 'landed', name: 'landed',
label: t('claim.summary.details.columns.landed'), label: 'claim.summary.landed',
field: (row) => row.sale.ticket.landed, field: (row) => row.sale.ticket.landed,
format: (value) => toDate(value), format: (value) => toDate(value),
sortable: true, sortable: true,
}, },
{ {
name: 'quantity', name: 'quantity',
label: t('claim.summary.details.columns.quantity'), label: 'claim.summary.quantity',
field: (row) => row.sale.quantity, field: (row) => row.sale.quantity,
sortable: true, sortable: true,
}, },
{ {
name: 'claimed', name: 'claimed',
label: 'Claimed', label: 'claim.summary.claimed',
field: (row) => row.quantity, field: (row) => row.quantity,
sortable: true, sortable: true,
}, },
{ {
name: 'description', name: 'description',
label: 'Description', label: 'claim.summary.description',
field: (row) => row.sale.concept, field: (row) => row.sale.concept,
}, },
{ {
name: 'price', name: 'price',
label: 'Price', label: 'claim.summary.price',
field: (row) => row.sale.price, field: (row) => row.sale.price,
sortable: true, sortable: true,
}, },
{ {
name: 'discount', name: 'discount',
label: 'Discount', label: 'claim.summary.discount',
field: (row) => row.sale.discount, field: (row) => row.sale.discount,
format: (value) => `${value} %`, format: (value) => `${value} %`,
sortable: true, sortable: true,
}, },
{ {
name: 'total', name: 'total',
label: 'Total', label: 'claim.summary.total',
field: ({ sale }) => sale.quantity * sale.price * ((100 - sale.discount) / 100), field: ({ sale }) => toCurrency(sale.quantity * sale.price * ((100 - sale.discount) / 100)),
sortable: true, sortable: true,
}, },
]); ]);
@ -123,23 +123,31 @@ function stateColor(code) {
</q-item> </q-item>
</q-list> </q-list>
<q-card-section class="q-pa-md"> <q-card-section class="q-pa-md">
<h6>{{ t('claim.summary.details.title') }}</h6> <h6>{{ t('claim.summary.details') }}</h6>
<q-table :columns="detailsColumns" :rows="salesClaimed" flat></q-table> <q-table :columns="detailsColumns" :rows="salesClaimed" flat>
<template #header="props">
<q-tr :props="props">
<q-th v-for="col in props.cols" :key="col.name" :props="props">
{{ t(col.label) }}
</q-th>
</q-tr>
</template>
</q-table>
</q-card-section> </q-card-section>
<q-card-section class="q-pa-md"> <q-card-section class="q-pa-md">
<h6>Action</h6> <h6>{{ t('claim.summary.actions') }}</h6>
<q-separator /> <q-separator />
<div id="slider-container"> <div id="slider-container">
<q-slider <q-slider
v-model="claim.responsibility" v-model="claim.responsibility"
label label
:label-value="'Responsibility'" :label-value="t('claim.summary.responsibility')"
label-always label-always
color="primary" color="primary"
markers markers
:marker-labels="[ :marker-labels="[
{ value: 1, label: 'Company' }, { value: 1, label: t('claim.summary.company') },
{ value: 5, label: 'Person' }, { value: 5, label: t('claim.summary.person') },
]" ]"
:min="1" :min="1"
:max="5" :max="5"

View File

@ -1,5 +1,5 @@
<script setup> <script setup>
import { onMounted, defineProps, ref, computed } from 'vue'; import { onMounted, ref, computed } from 'vue';
import { useRoute } from 'vue-router'; import { useRoute } from 'vue-router';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import axios from 'axios'; import axios from 'axios';