Merge branch 'dev' into 7543-StandarizeDescriptors
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
6bf2a8c2f6
|
@ -60,7 +60,7 @@ const emit = defineEmits(['refresh', 'clear', 'search', 'init', 'remove']);
|
|||
const arrayData = useArrayData($props.dataKey, {
|
||||
exprBuilder: $props.exprBuilder,
|
||||
searchUrl: $props.searchUrl,
|
||||
navigate: {},
|
||||
navigate: $props.redirect ? {} : null,
|
||||
});
|
||||
const route = useRoute();
|
||||
const store = arrayData.store;
|
||||
|
|
|
@ -21,7 +21,7 @@ const currentUser = ref(state.getUser());
|
|||
const newNote = ref('');
|
||||
const vnPaginateRef = ref();
|
||||
function handleKeyUp(event) {
|
||||
if (event.key === 'Enter') {
|
||||
if (event.key === 'Enter') {
|
||||
event.preventDefault();
|
||||
if (!event.shiftKey) insert();
|
||||
}
|
||||
|
@ -78,6 +78,7 @@ async function insert() {
|
|||
ref="vnPaginateRef"
|
||||
class="show"
|
||||
v-bind="$attrs"
|
||||
search-url="notes"
|
||||
>
|
||||
<template #body="{ rows }">
|
||||
<TransitionGroup name="list" tag="div" class="column items-center full-width">
|
||||
|
|
|
@ -73,7 +73,6 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) {
|
|||
const filter = {
|
||||
order: store.order,
|
||||
limit: store.limit,
|
||||
skip: store.skip,
|
||||
};
|
||||
|
||||
let exprFilter;
|
||||
|
@ -88,7 +87,7 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) {
|
|||
}
|
||||
|
||||
Object.assign(filter, store.userFilter, exprFilter);
|
||||
Object.assign(store.filter, filter);
|
||||
Object.assign(store.filter, { ...filter, skip: store.skip });
|
||||
const params = {
|
||||
filter: JSON.stringify(store.filter),
|
||||
};
|
||||
|
|
|
@ -850,6 +850,7 @@ worker:
|
|||
calendar: Calendar
|
||||
timeControl: Time control
|
||||
locker: Locker
|
||||
balance: Balance
|
||||
formation: Formation
|
||||
list:
|
||||
name: Name
|
||||
|
@ -931,6 +932,13 @@ worker:
|
|||
remark: Bonficado
|
||||
hasDiploma: Diploma
|
||||
imageNotFound: Image not found
|
||||
balance:
|
||||
tableVisibleColumns:
|
||||
paymentDate: Date
|
||||
incomeType: Type
|
||||
debit: Debt
|
||||
credit: Have
|
||||
concept: Concept
|
||||
wagon:
|
||||
pageTitles:
|
||||
wagons: Wagons
|
||||
|
|
|
@ -846,6 +846,7 @@ worker:
|
|||
calendar: Calendario
|
||||
timeControl: Control de horario
|
||||
locker: Taquilla
|
||||
balance: Balance
|
||||
formation: Formación
|
||||
list:
|
||||
name: Nombre
|
||||
|
@ -918,6 +919,13 @@ worker:
|
|||
remark: Bonficado
|
||||
hasDiploma: Diploma
|
||||
imageNotFound: No se ha encontrado la imagen
|
||||
balance:
|
||||
tableVisibleColumns:
|
||||
paymentDate: Fecha
|
||||
incomeType: Tipo
|
||||
debit: Debe
|
||||
credit: Haber
|
||||
concept: Concepto
|
||||
wagon:
|
||||
pageTitles:
|
||||
wagons: Vagones
|
||||
|
|
|
@ -119,7 +119,7 @@ const departments = ref();
|
|||
emit-value
|
||||
hide-selected
|
||||
map-options
|
||||
option-label="country"
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
outlined
|
||||
rounded
|
||||
|
|
|
@ -219,6 +219,7 @@ const useLang = (values) => {
|
|||
:expr-builder="exprBuilder"
|
||||
:custom-tags="['tagGroups']"
|
||||
@remove="clearFilter"
|
||||
:redirect="false"
|
||||
>
|
||||
<template #tags="{ tag, formatFn }">
|
||||
<strong v-if="tag.label === 'categoryFk'">
|
||||
|
|
|
@ -104,10 +104,14 @@ const totalEntryPrice = (rows) => {
|
|||
for (const row of rows) {
|
||||
let total = 0;
|
||||
let quantity = 0;
|
||||
for (const buy of row.buys) {
|
||||
total = total + buy.total;
|
||||
quantity = quantity + buy.quantity;
|
||||
|
||||
if (row.buys) {
|
||||
for (const buy of row.buys) {
|
||||
total = total + buy.total;
|
||||
quantity = quantity + buy.quantity;
|
||||
}
|
||||
}
|
||||
|
||||
row.total = total;
|
||||
row.quantity = quantity;
|
||||
totalPrice = totalPrice + total;
|
||||
|
|
|
@ -50,7 +50,7 @@ const itemCategoriesOptions = ref([]);
|
|||
@on-fetch="(data) => (itemCategoriesOptions = data)"
|
||||
auto-load
|
||||
/>
|
||||
<VnFilterPanel :data-key="props.dataKey" :search-button="true">
|
||||
<VnFilterPanel :data-key="props.dataKey" :search-button="true" :redirect="false">
|
||||
<template #tags="{ tag, formatFn }">
|
||||
<div class="q-gutter-x-xs">
|
||||
<strong>{{ t(`params.${tag.label}`) }}: </strong>
|
||||
|
|
|
@ -0,0 +1,91 @@
|
|||
<script setup>
|
||||
import { ref, computed } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useRoute } from 'vue-router';
|
||||
import VnTable from 'components/VnTable/VnTable.vue';
|
||||
const tableRef = ref();
|
||||
const { t } = useI18n();
|
||||
const route = useRoute();
|
||||
const entityId = computed(() => route.params.id);
|
||||
|
||||
const columns = computed(() => [
|
||||
{
|
||||
align: 'left',
|
||||
name: 'paymentDate',
|
||||
label: t('worker.balance.tableVisibleColumns.paymentDate'),
|
||||
create: true,
|
||||
component: 'date',
|
||||
field: 'paymentDate',
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'incomeTypeFk',
|
||||
label: t('worker.balance.tableVisibleColumns.incomeType'),
|
||||
create: true,
|
||||
component: 'select',
|
||||
attrs: {
|
||||
url: 'payrollComponents',
|
||||
fields: ['id', 'name'],
|
||||
},
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'debit',
|
||||
label: t('worker.balance.tableVisibleColumns.debit'),
|
||||
create: true,
|
||||
component: 'input',
|
||||
field: 'debit',
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'credit',
|
||||
label: t('worker.balance.tableVisibleColumns.credit'),
|
||||
create: true,
|
||||
component: 'input',
|
||||
field: 'credit',
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'concept',
|
||||
label: t('worker.balance.tableVisibleColumns.concept'),
|
||||
create: true,
|
||||
component: 'input',
|
||||
field: 'concept',
|
||||
cardVisible: true,
|
||||
},
|
||||
]);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<VnTable
|
||||
ref="tableRef"
|
||||
data-key="WorkerBalance"
|
||||
:url="`Workers/${entityId}/incomes`"
|
||||
:url-create="`Workers/${entityId}/incomes`"
|
||||
save-url="WorkerIncomes/crud"
|
||||
:create="{
|
||||
urlCreate: 'workerIncomes',
|
||||
title: t('Create workerBalance'),
|
||||
onDataSaved: () => tableRef.reload(),
|
||||
formInitialData: {
|
||||
workerFk: entityId,
|
||||
},
|
||||
}"
|
||||
order="paymentDate DESC"
|
||||
:columns="columns"
|
||||
default-mode="table"
|
||||
auto-load
|
||||
:right-search="false"
|
||||
:is-editable="true"
|
||||
:use-model="true"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<i18n>
|
||||
es:
|
||||
Create workerBalance: Crear balance
|
||||
</i18n>
|
|
@ -35,6 +35,7 @@ const columns = computed(() => [
|
|||
url: 'TrainingCourseTypes',
|
||||
fields: ['id', 'name'],
|
||||
},
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
|
@ -52,6 +53,7 @@ const columns = computed(() => [
|
|||
component: 'date',
|
||||
field: 'ended',
|
||||
create: true,
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
|
@ -63,6 +65,7 @@ const columns = computed(() => [
|
|||
url: 'TrainingCenters',
|
||||
fields: ['id', 'name'],
|
||||
},
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
|
@ -78,6 +81,7 @@ const columns = computed(() => [
|
|||
component: 'input',
|
||||
field: 'amount',
|
||||
create: true,
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
|
|
|
@ -274,7 +274,7 @@ export default {
|
|||
name: 'CustomerBalance',
|
||||
meta: {
|
||||
title: 'balance',
|
||||
icon: 'vn:invoice',
|
||||
icon: 'balance',
|
||||
},
|
||||
component: () =>
|
||||
import('src/pages/Customer/Card/CustomerBalance.vue'),
|
||||
|
|
|
@ -23,6 +23,7 @@ export default {
|
|||
'WorkerDms',
|
||||
'WorkerTimeControl',
|
||||
'WorkerLocker',
|
||||
'WorkerBalance',
|
||||
'WorkerFormation',
|
||||
],
|
||||
},
|
||||
|
@ -177,6 +178,15 @@ export default {
|
|||
},
|
||||
component: () => import('src/pages/Worker/Card/WorkerLocker.vue'),
|
||||
},
|
||||
{
|
||||
name: 'WorkerBalance',
|
||||
path: 'balance',
|
||||
meta: {
|
||||
title: 'balance',
|
||||
icon: 'balance',
|
||||
},
|
||||
component: () => import('src/pages/Worker/Card/WorkerBalance.vue'),
|
||||
},
|
||||
{
|
||||
name: 'WorkerFormation',
|
||||
path: 'formation',
|
||||
|
|
|
@ -6,15 +6,14 @@ describe('InvoiceInCorrective', () => {
|
|||
const saveDialog = '.q-card > .q-card__actions > .q-btn--standard ';
|
||||
|
||||
it('should create a correcting invoice', () => {
|
||||
cy.viewport(1280, 720);
|
||||
cy.login('developer');
|
||||
cy.visit(`/#/invoice-in/1/summary?limit=10`);
|
||||
|
||||
cy.openLeftMenu();
|
||||
cy.openActionsDescriptor();
|
||||
|
||||
cy.get(createRectificative).click();
|
||||
cy.get(saveDialog).click();
|
||||
cy.openLeftMenu();
|
||||
cy.get(rectificativeSection).click();
|
||||
cy.get('tbody > tr:visible').should('have.length', 1);
|
||||
});
|
||||
|
|
|
@ -5,18 +5,15 @@ describe('InvoiceInDescriptor', () => {
|
|||
'.q-card:nth-child(3) .vn-label-value:nth-child(5) > .value > span';
|
||||
|
||||
it('should booking and unbooking the invoice properly', () => {
|
||||
cy.viewport(1280, 720);
|
||||
cy.login('developer');
|
||||
cy.visit(`/#/invoice-in/1/summary?limit=10`);
|
||||
cy.visit('/#/invoice-in/1/summary');
|
||||
|
||||
cy.openLeftMenu();
|
||||
cy.openActionsDescriptor();
|
||||
cy.get(firstDescritorOpt).click();
|
||||
cy.get(dialogBtns).eq(1).click();
|
||||
cy.get('.fullscreen').first().click();
|
||||
cy.get(isBookedField).should('have.attr', 'title', 'true');
|
||||
|
||||
cy.openLeftMenu();
|
||||
cy.openActionsDescriptor();
|
||||
cy.get(firstDescritorOpt).click();
|
||||
cy.get(dialogBtns).eq(1).click();
|
||||
cy.get(isBookedField).should('have.attr', 'title', 'false');
|
||||
|
|
Loading…
Reference in New Issue