Merge branch 'test' into dev
This commit is contained in:
commit
57b939bdd5
|
@ -35,7 +35,7 @@ const itemComputed = computed(() => {
|
|||
</QItemSection>
|
||||
<QItemSection>
|
||||
{{ t(itemComputed.title) }}
|
||||
<QTooltip>
|
||||
<QTooltip v-if="item.keyBinding">
|
||||
{{ 'Ctrl + Alt + ' + item?.keyBinding?.toUpperCase() }}
|
||||
</QTooltip>
|
||||
</QItemSection>
|
||||
|
|
|
@ -34,7 +34,7 @@ const model = defineModel(undefined, { required: true });
|
|||
const arrayData = useArrayData($props.dataKey, { searchUrl: $props.searchUrl });
|
||||
const columnFilter = computed(() => $props.column?.columnFilter);
|
||||
|
||||
const updateEvent = { 'update:modelValue': addFilter, remove: () => addFilter(null) };
|
||||
const updateEvent = { 'update:modelValue': addFilter };
|
||||
const enterEvent = {
|
||||
'keyup.enter': () => addFilter(model.value),
|
||||
remove: () => addFilter(null),
|
||||
|
|
|
@ -284,6 +284,14 @@ globals:
|
|||
createInvoiceIn: Create invoice in
|
||||
myAccount: My account
|
||||
noOne: No one
|
||||
params:
|
||||
clientFk: Client id
|
||||
salesPersonFk: Sales person
|
||||
warehouseFk: Warehouse
|
||||
provinceFk: Province
|
||||
from: From
|
||||
To: To
|
||||
stateFk: State
|
||||
errors:
|
||||
statusUnauthorized: Access denied
|
||||
statusInternalServerError: An internal server error has ocurred
|
||||
|
@ -721,6 +729,7 @@ worker:
|
|||
newWorker: New worker
|
||||
card:
|
||||
workerId: Worker ID
|
||||
user: User
|
||||
name: Name
|
||||
email: Email
|
||||
phone: Phone
|
||||
|
|
|
@ -288,6 +288,14 @@ globals:
|
|||
createInvoiceIn: Crear factura recibida
|
||||
myAccount: Mi cuenta
|
||||
noOne: Nadie
|
||||
params:
|
||||
clientFk: Id cliente
|
||||
salesPersonFk: Comercial
|
||||
warehouseFk: Almacén
|
||||
provinceFk: Provincia
|
||||
from: Desde
|
||||
To: Hasta
|
||||
stateFk: Estado
|
||||
errors:
|
||||
statusUnauthorized: Acceso denegado
|
||||
statusInternalServerError: Ha ocurrido un error interno del servidor
|
||||
|
@ -728,6 +736,7 @@ worker:
|
|||
newWorker: Nuevo trabajador
|
||||
card:
|
||||
workerId: ID Trabajador
|
||||
user: Usuario
|
||||
name: Nombre
|
||||
email: Correo personal
|
||||
phone: Teléfono
|
||||
|
|
|
@ -19,7 +19,15 @@ watch(
|
|||
</script>
|
||||
<template>
|
||||
<FetchData url="VnRoles" auto-load @on-fetch="(data) => (rolesOptions = data)" />
|
||||
<FormModel ref="formModelRef" model="AccountPrivileges" url="VnUsers" auto-load>
|
||||
<FormModel
|
||||
ref="formModelRef"
|
||||
model="AccountPrivileges"
|
||||
url="VnUsers/preview"
|
||||
:filter="{ where: { id: route.params.id } }"
|
||||
:url-create="`VnUsers/${route.params.id}/privileges`"
|
||||
:id="route.params.id"
|
||||
auto-load
|
||||
>
|
||||
<template #form="{ data }">
|
||||
<div class="q-gutter-y-sm">
|
||||
<QCheckbox
|
||||
|
|
|
@ -16,7 +16,6 @@ const claimReasons = ref([]);
|
|||
const claimResults = ref([]);
|
||||
const claimResponsibles = ref([]);
|
||||
const claimRedeliveries = ref([]);
|
||||
const workers = ref([]);
|
||||
const selected = ref([]);
|
||||
const saveButtonRef = ref();
|
||||
|
||||
|
@ -82,7 +81,9 @@ const columns = computed(() => [
|
|||
label: t('Worker'),
|
||||
field: (row) => row.workerFk,
|
||||
sortable: true,
|
||||
options: workers.value,
|
||||
url: 'Workers/search',
|
||||
where: { active: 1 },
|
||||
sortBy: 'name ASC',
|
||||
model: 'workerFk',
|
||||
optionValue: 'id',
|
||||
optionLabel: 'nickname',
|
||||
|
@ -129,13 +130,6 @@ const columns = computed(() => [
|
|||
@on-fetch="(data) => (claimRedeliveries = data)"
|
||||
auto-load
|
||||
/>
|
||||
<FetchData
|
||||
url="Workers/search"
|
||||
:where="{ active: 1 }"
|
||||
order="name ASC"
|
||||
@on-fetch="(data) => (workers = data)"
|
||||
auto-load
|
||||
/>
|
||||
<CrudModel
|
||||
data-key="ClaimDevelopments"
|
||||
url="ClaimDevelopments"
|
||||
|
@ -165,6 +159,9 @@ const columns = computed(() => [
|
|||
>
|
||||
<VnSelect
|
||||
v-model="row[col.model]"
|
||||
:url="col.url"
|
||||
:where="col.where"
|
||||
:sort-by="col.sortBy"
|
||||
:options="col.options"
|
||||
:option-value="col.optionValue"
|
||||
:option-label="col.optionLabel"
|
||||
|
|
|
@ -45,7 +45,7 @@ async function onFetchClaim(data) {
|
|||
|
||||
const amount = ref();
|
||||
const amountClaimed = ref();
|
||||
async function onFetch(rows, newRows) {
|
||||
function onFetch(rows, newRows) {
|
||||
if (newRows) rows = newRows;
|
||||
amount.value = 0;
|
||||
amountClaimed.value = 0;
|
||||
|
@ -155,7 +155,7 @@ function showImportDialog() {
|
|||
async function saveWhenHasChanges() {
|
||||
if (claimLinesForm.value.getChanges().updates) {
|
||||
await claimLinesForm.value.onSubmit();
|
||||
await claimLinesForm.value.reload();
|
||||
onFetch(claimLinesForm.value.formData);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -211,7 +211,7 @@ async function saveWhenHasChanges() {
|
|||
<template #body-cell-claimed="{ row }">
|
||||
<QTd auto-width align="right" class="text-primary">
|
||||
<QInput
|
||||
v-model="row.quantity"
|
||||
v-model.number="row.quantity"
|
||||
type="number"
|
||||
dense
|
||||
@keyup.enter="saveWhenHasChanges()"
|
||||
|
@ -266,7 +266,9 @@ async function saveWhenHasChanges() {
|
|||
<template v-if="column.name === 'claimed'">
|
||||
<QItemLabel class="text-primary">
|
||||
<QInput
|
||||
v-model="props.row.quantity"
|
||||
v-model.number="
|
||||
props.row.quantity
|
||||
"
|
||||
type="number"
|
||||
dense
|
||||
autofocus
|
||||
|
|
|
@ -94,8 +94,8 @@ const detailsColumns = ref([
|
|||
{
|
||||
name: 'total',
|
||||
label: 'claim.total',
|
||||
field: ({ sale }) =>
|
||||
toCurrency(sale.quantity * sale.price * ((100 - sale.discount) / 100)),
|
||||
field: (row) =>
|
||||
toCurrency(row.quantity * row.sale.price * ((100 - row.sale.discount) / 100)),
|
||||
sortable: true,
|
||||
},
|
||||
]);
|
||||
|
|
|
@ -52,6 +52,7 @@ const columns = computed(() => [
|
|||
name: 'attendedBy',
|
||||
orderBy: 'workerFk',
|
||||
columnFilter: {
|
||||
name: 'attenderFk',
|
||||
component: 'select',
|
||||
attrs: {
|
||||
url: 'Workers/activeWithInheritedRole',
|
||||
|
|
|
@ -116,7 +116,7 @@ const entriesTableColumns = computed(() => [
|
|||
{{ col.value }}
|
||||
</QTd>
|
||||
<QBtn
|
||||
icon="print"
|
||||
icon="visibility"
|
||||
v-if="props.row.stickers > 0"
|
||||
:loading="isLoading"
|
||||
@click="
|
||||
|
@ -126,7 +126,7 @@ const entriesTableColumns = computed(() => [
|
|||
"
|
||||
unelevated
|
||||
>
|
||||
<QTooltip>{{ t('printLabel') }}</QTooltip>
|
||||
<QTooltip>{{ t('viewLabel') }}</QTooltip>
|
||||
</QBtn>
|
||||
</QTr>
|
||||
</template>
|
||||
|
|
|
@ -11,4 +11,4 @@ shipped: Shipped
|
|||
fromShipped: Shipped(from)
|
||||
toShipped: Shipped(to)
|
||||
printLabels: Print stickers
|
||||
printLabel: Print sticker
|
||||
viewLabel: View sticker
|
||||
|
|
|
@ -15,4 +15,4 @@ shipped: F. salida
|
|||
fromShipped: F. salida(desde)
|
||||
toShipped: F. salida(hasta)
|
||||
printLabels: Imprimir etiquetas
|
||||
printLabel: Imprimir etiqueta
|
||||
viewLabel: Ver etiqueta
|
||||
|
|
|
@ -40,7 +40,7 @@ const handleScopeDays = (params, days, callback) => {
|
|||
<VnFilterPanel
|
||||
:data-key="dataKey"
|
||||
:search-button="true"
|
||||
:hidden-tags="['from', 'to']"
|
||||
:hidden-tags="['from', 'to', 'search']"
|
||||
:custom-tags="['scopeDays']"
|
||||
:unremovable-params="['from', 'to', 'scopeDays']"
|
||||
>
|
||||
|
@ -64,7 +64,7 @@ const handleScopeDays = (params, days, callback) => {
|
|||
<QItem>
|
||||
<QItemSection>
|
||||
<VnInput
|
||||
:label="t('params.clientFk')"
|
||||
:label="t('globals.params.clientFk')"
|
||||
v-model="params.clientFk"
|
||||
is-outlined
|
||||
/>
|
||||
|
@ -105,7 +105,7 @@ const handleScopeDays = (params, days, callback) => {
|
|||
outlined
|
||||
dense
|
||||
rounded
|
||||
:label="t('params.salesPersonFk')"
|
||||
:label="t('globals.params.salesPersonFk')"
|
||||
v-model="params.salesPersonFk"
|
||||
url="Workers/search"
|
||||
:params="{ departmentCodes: ['VT'] }"
|
||||
|
@ -158,7 +158,7 @@ const handleScopeDays = (params, days, callback) => {
|
|||
outlined
|
||||
dense
|
||||
rounded
|
||||
:label="t('params.stateFk')"
|
||||
:label="t('globals.params.stateFk')"
|
||||
v-model="params.stateFk"
|
||||
url="States"
|
||||
is-outlined
|
||||
|
@ -184,7 +184,7 @@ const handleScopeDays = (params, days, callback) => {
|
|||
outlined
|
||||
dense
|
||||
rounded
|
||||
:label="t('params.warehouseFk')"
|
||||
:label="t('globals.params.warehouseFk')"
|
||||
v-model="params.warehouseFk"
|
||||
:options="warehouses"
|
||||
/>
|
||||
|
@ -196,7 +196,7 @@ const handleScopeDays = (params, days, callback) => {
|
|||
outlined
|
||||
dense
|
||||
rounded
|
||||
:label="t('params.provinceFk')"
|
||||
:label="t('globals.params.provinceFk')"
|
||||
v-model="params.provinceFk"
|
||||
url="Provinces"
|
||||
/>
|
||||
|
@ -235,22 +235,15 @@ const handleScopeDays = (params, days, callback) => {
|
|||
<i18n>
|
||||
en:
|
||||
params:
|
||||
clientFk: Client id
|
||||
orderFk: Order id
|
||||
scopeDays: Days onward
|
||||
nickname: Nickname
|
||||
salesPersonFk: Sales person
|
||||
refFk: Invoice
|
||||
agencyModeFk: Agency
|
||||
stateFk: State
|
||||
groupedStates: Grouped State
|
||||
warehouseFk: Warehouse
|
||||
provinceFk: Province
|
||||
myTeam: My team
|
||||
problems: With problems
|
||||
pending: Pending
|
||||
from: From
|
||||
to: To
|
||||
alertLevel: Grouped State
|
||||
FREE: Free
|
||||
DELIVERED: Delivered
|
||||
|
@ -261,22 +254,15 @@ en:
|
|||
|
||||
es:
|
||||
params:
|
||||
clientFk: Id cliente
|
||||
orderFk: Id cesta
|
||||
scopeDays: Días en adelante
|
||||
nickname: Nombre mostrado
|
||||
salesPersonFk: Comercial
|
||||
refFk: Factura
|
||||
agencyModeFk: Agencia
|
||||
stateFk: Estado
|
||||
groupedStates: Estado agrupado
|
||||
warehouseFk: Almacén
|
||||
provinceFk: Provincia
|
||||
myTeam: Mi equipo
|
||||
problems: Con problemas
|
||||
pending: Pendiente
|
||||
from: Desde
|
||||
To: Hasta
|
||||
alertLevel: Estado agrupado
|
||||
FREE: Libre
|
||||
DELIVERED: Servido
|
||||
|
|
|
@ -3,7 +3,7 @@ import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
|||
</script>
|
||||
<template>
|
||||
<VnSearchbar
|
||||
data-key="SalesMonitorTickets"
|
||||
data-key="saleMonitorTickets"
|
||||
url="SalesMonitors/salesFilter"
|
||||
:redirect="false"
|
||||
:label="$t('searchBar.label')"
|
||||
|
|
|
@ -1,17 +1,11 @@
|
|||
<script setup>
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { computed } from 'vue';
|
||||
|
||||
import VnCard from 'components/common/VnCard.vue';
|
||||
import TicketDescriptor from './TicketDescriptor.vue';
|
||||
import TicketFilter from '../TicketFilter.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const route = useRoute();
|
||||
|
||||
const routeName = computed(() => route.name);
|
||||
const customRouteRedirectName = computed(() => routeName.value);
|
||||
</script>
|
||||
<template>
|
||||
<VnCard
|
||||
|
@ -21,7 +15,7 @@ const customRouteRedirectName = computed(() => routeName.value);
|
|||
:descriptor="TicketDescriptor"
|
||||
search-data-key="TicketList"
|
||||
:searchbar-props="{
|
||||
customRouteRedirectName,
|
||||
url: 'Tickets/filter',
|
||||
label: t('card.search'),
|
||||
info: t('card.searchInfo'),
|
||||
}"
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<script setup>
|
||||
import axios from 'axios';
|
||||
import { computed, ref, onMounted } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { useStateStore } from 'stores/useStateStore';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { toDate, toCurrency } from 'src/filters/index';
|
||||
|
@ -24,8 +25,11 @@ const addressesOptions = ref([]);
|
|||
const agenciesOptions = ref([]);
|
||||
const selectedClient = ref();
|
||||
const stateStore = useStateStore();
|
||||
const route = useRoute();
|
||||
const from = Date.vnNew();
|
||||
from.setHours(0, 0, 0, 0);
|
||||
const to = Date.vnNew();
|
||||
to.setHours(23, 59, 0, 0);
|
||||
to.setDate(to.getDate() + 1);
|
||||
|
||||
const userParams = {
|
||||
|
@ -42,6 +46,16 @@ const initializeFromQuery = () => {
|
|||
Object.assign(userParams, { from, to });
|
||||
};
|
||||
|
||||
// Método para inicializar las variables desde la query string
|
||||
const initializeFromQuery = () => {
|
||||
const query = route.query.table ? JSON.parse(route.query.table) : {};
|
||||
|
||||
// Asigna los valores a las variables correspondientes
|
||||
from.value = query.from || from.toISOString();
|
||||
to.value = query.to || to.toISOString();
|
||||
Object.assign(userParams, { from, to });
|
||||
};
|
||||
|
||||
const columns = computed(() => [
|
||||
{
|
||||
align: 'left',
|
||||
|
@ -219,18 +233,18 @@ onMounted(() => {
|
|||
|
||||
<template>
|
||||
<VnSearchbar
|
||||
data-key="Tickets"
|
||||
data-key="Ticket"
|
||||
:label="t('Search ticket')"
|
||||
:info="t('You can search by ticket id or alias')"
|
||||
/>
|
||||
<RightMenu>
|
||||
<template #right-panel>
|
||||
<TicketFilter data-key="Tickets" />
|
||||
<TicketFilter data-key="Ticket" />
|
||||
</template>
|
||||
</RightMenu>
|
||||
<VnTable
|
||||
ref="tableRef"
|
||||
data-key="Tickets"
|
||||
data-key="Ticket"
|
||||
url="Tickets/filter"
|
||||
:create="{
|
||||
urlCreate: 'Tickets/new',
|
||||
|
@ -239,7 +253,7 @@ onMounted(() => {
|
|||
formInitialData: {},
|
||||
}"
|
||||
default-mode="table"
|
||||
order="id DESC"
|
||||
:order="['shippedDate DESC', 'shippedHour ASC', 'zoneLanding ASC', 'id']"
|
||||
:columns="columns"
|
||||
:user-params="userParams"
|
||||
:right-search="false"
|
||||
|
|
|
@ -151,7 +151,7 @@ const refetch = async () => await cardDescriptorRef.value.getData();
|
|||
</div>
|
||||
</template>
|
||||
<template #body="{ entity }">
|
||||
<VnLv :label="t('worker.card.name')" :value="entity.user?.nickname" />
|
||||
<VnLv :label="t('worker.card.user')" :value="entity.user?.name" />
|
||||
<VnLv :label="t('worker.card.email')" :value="entity.user?.email" copy />
|
||||
<VnLv
|
||||
:label="t('worker.list.department')"
|
||||
|
|
|
@ -8,6 +8,8 @@ describe('ClaimDevelopment', () => {
|
|||
cy.viewport(1920, 1080);
|
||||
cy.login('developer');
|
||||
cy.visit(`/#/claim/${claimId}/development`);
|
||||
cy.intercept('GET', /\/api\/Workers\/search/).as('workers');
|
||||
cy.intercept('GET', /\/api\/Workers\/search/).as('workers');
|
||||
cy.waitForElement('tbody');
|
||||
});
|
||||
|
||||
|
@ -32,10 +34,19 @@ describe('ClaimDevelopment', () => {
|
|||
});
|
||||
|
||||
it('should add and remove new line', () => {
|
||||
cy.wait(['@workers', '@workers']);
|
||||
cy.addCard();
|
||||
|
||||
cy.get(thirdRow).should('exist');
|
||||
|
||||
const rowData = [false, 'Novato', 'Roces', 'Compradores', 'employeeNick', 'Tour'];
|
||||
const rowData = [
|
||||
false,
|
||||
'Novato',
|
||||
'Roces',
|
||||
'Compradores',
|
||||
'administrativeNick',
|
||||
'Tour',
|
||||
];
|
||||
cy.fillRow(thirdRow, rowData);
|
||||
|
||||
cy.saveCard();
|
||||
|
|
Loading…
Reference in New Issue