forked from verdnatura/salix-front
Merge branch 'dev' into 6280_vnLocation
This commit is contained in:
commit
b0083544f0
|
@ -37,6 +37,7 @@ const marker_labels = [
|
|||
{ value: DEFAULT_MIN_RESPONSABILITY, label: t('claim.summary.company') },
|
||||
{ value: DEFAULT_MAX_RESPONSABILITY, label: t('claim.summary.person') },
|
||||
];
|
||||
const multiplicatorValue = ref();
|
||||
|
||||
const columns = computed(() => [
|
||||
{
|
||||
|
@ -134,17 +135,7 @@ async function regularizeClaim() {
|
|||
message: t('globals.dataSaved'),
|
||||
type: 'positive',
|
||||
});
|
||||
if (claim.value.responsibility >= Math.ceil(DEFAULT_MAX_RESPONSABILITY) / 2) {
|
||||
quasar
|
||||
.dialog({
|
||||
component: VnConfirm,
|
||||
componentProps: {
|
||||
title: t('confirmGreuges'),
|
||||
message: t('confirmGreugesMessage'),
|
||||
},
|
||||
})
|
||||
.onOk(async () => await onUpdateGreugeAccept());
|
||||
}
|
||||
await onUpdateGreugeAccept();
|
||||
}
|
||||
|
||||
async function onUpdateGreugeAccept() {
|
||||
|
@ -153,9 +144,9 @@ async function onUpdateGreugeAccept() {
|
|||
filter: { where: { code: 'freightPickUp' } },
|
||||
})
|
||||
).data.id;
|
||||
const freightPickUpPrice = (await axios.get(`GreugeConfigs/findOne`)).data
|
||||
.freightPickUpPrice;
|
||||
|
||||
const freightPickUpPrice =
|
||||
(await axios.get(`GreugeConfigs/findOne`)).data.freightPickUpPrice *
|
||||
multiplicatorValue.value;
|
||||
await axios.post(`Greuges`, {
|
||||
clientFk: claim.value.clientFk,
|
||||
description: `${t('ClaimGreugeDescription')} ${claimId}`.toUpperCase(),
|
||||
|
@ -226,10 +217,10 @@ async function importToNewRefundTicket() {
|
|||
show-if-above
|
||||
v-if="claim"
|
||||
>
|
||||
<QCard class="totalClaim vn-card q-my-md q-pa-sm">
|
||||
<QCard class="totalClaim q-my-md q-pa-sm no-box-shadow">
|
||||
{{ `${t('Total claimed')}: ${toCurrency(totalClaimed)}` }}
|
||||
</QCard>
|
||||
<QCard class="vn-card q-mb-md q-pa-sm">
|
||||
<QCard class="q-mb-md q-pa-sm no-box-shadow">
|
||||
<QItem class="justify-between">
|
||||
<QItemLabel class="slider-container">
|
||||
<p class="text-primary">
|
||||
|
@ -250,6 +241,7 @@ async function importToNewRefundTicket() {
|
|||
</QItemLabel>
|
||||
</QItem>
|
||||
</QCard>
|
||||
<QCard class="q-mb-md q-pa-sm no-box-shadow" style="margin-bottom: 1em">
|
||||
<QItemLabel class="mana q-mb-md">
|
||||
<QCheckbox
|
||||
v-model="claim.isChargedToMana"
|
||||
|
@ -257,6 +249,23 @@ async function importToNewRefundTicket() {
|
|||
/>
|
||||
<span>{{ t('mana') }}</span>
|
||||
</QItemLabel>
|
||||
</QCard>
|
||||
<QCard class="q-mb-md q-pa-sm no-box-shadow" style="position: static">
|
||||
<QInput
|
||||
:disable="
|
||||
!(claim.responsibility >= Math.ceil(DEFAULT_MAX_RESPONSABILITY) / 2)
|
||||
"
|
||||
:label="t('confirmGreuges')"
|
||||
class="q-field__native text-grey-2"
|
||||
type="number"
|
||||
placeholder="0"
|
||||
id="multiplicatorValue"
|
||||
name="multiplicatorValue"
|
||||
min="0"
|
||||
max="50"
|
||||
v-model="multiplicatorValue"
|
||||
/>
|
||||
</QCard>
|
||||
</QDrawer>
|
||||
<Teleport to="#st-data" v-if="stateStore.isSubToolbarShown()"> </Teleport>
|
||||
<CrudModel
|
||||
|
@ -494,4 +503,5 @@ es:
|
|||
Id item: Id artículo
|
||||
confirmGreuges: ¿Desea insertar greuges?
|
||||
confirmGreugesMessage: Insertar greuges en la ficha del cliente
|
||||
Apply Greuges: Aplicar Greuges
|
||||
</i18n>
|
||||
|
|
|
@ -31,7 +31,6 @@ describe('ClaimAction', () => {
|
|||
|
||||
it('should regularize', () => {
|
||||
cy.get('[title="Regularize"]').click();
|
||||
cy.clickConfirm();
|
||||
});
|
||||
|
||||
it('should remove the line', () => {
|
||||
|
|
Loading…
Reference in New Issue