Merge branch 'master' into hotfix_remove_reserved
This commit is contained in:
commit
71755025a6
|
@ -248,7 +248,7 @@ function getBadgeAttrs(row) {
|
|||
|
||||
let timeDiff = today - timeTicket;
|
||||
|
||||
if (timeDiff > 0) return { color: 'info', 'text-color': 'black' };
|
||||
if (timeDiff < 0) return { color: 'warning', 'text-color': 'black' };
|
||||
switch (row.entryTypeCode) {
|
||||
case 'regularization':
|
||||
case 'life':
|
||||
|
@ -273,7 +273,7 @@ function getBadgeAttrs(row) {
|
|||
default:
|
||||
break;
|
||||
}
|
||||
if (timeDiff < 0) return { color: 'warning', 'text-color': 'black' };
|
||||
if (timeDiff > 0) return { color: 'info', 'text-color': 'black' };
|
||||
return { color: 'transparent' };
|
||||
}
|
||||
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
<script setup>
|
||||
import { ref, computed } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
||||
import DepartmentDescriptorProxy from '../Worker/Department/Card/DepartmentDescriptorProxy.vue';
|
||||
import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorProxy.vue';
|
||||
import { toDateFormat } from 'src/filters/date.js';
|
||||
import VnTable from 'src/components/VnTable/VnTable.vue';
|
||||
import VnInputDate from 'src/components/common/VnInputDate.vue';
|
||||
import VnRow from 'src/components/ui/VnRow.vue';
|
||||
import { dateRange } from 'src/filters';
|
||||
import useOpenURL from 'src/composables/useOpenURL';
|
||||
const { t } = useI18n();
|
||||
|
||||
const dates = dateRange(Date.vnNew());
|
||||
|
@ -124,12 +125,16 @@ const openTab = (id) => useOpenURL(`#/customer/${id}/summary`);
|
|||
</VnRow>
|
||||
</template>
|
||||
<template #column-departmentFk="{ row }">
|
||||
<span class="link" :title="row.department" v-text="row.department" />
|
||||
<WorkerDescriptorProxy :id="row.departmentFk" dense />
|
||||
<span @click.stop.prevent class="link" :title="row.department">
|
||||
{{ row.department }}
|
||||
<DepartmentDescriptorProxy :id="row.departmentFk" dense
|
||||
/></span>
|
||||
</template>
|
||||
<template #column-clientFk="{ row }">
|
||||
<span class="link" :title="row.clientName" v-text="row.clientName" />
|
||||
<CustomerDescriptorProxy :id="row.clientFk" />
|
||||
<span @click.stop.prevent class="link" :title="row.clientName">
|
||||
{{ row.clientName }}
|
||||
<CustomerDescriptorProxy :id="row.clientFk" dense
|
||||
/></span>
|
||||
</template>
|
||||
</VnTable>
|
||||
</template>
|
||||
|
|
|
@ -9,6 +9,7 @@ import { toDateFormat, toDateTimeFormat } from 'src/filters/date.js';
|
|||
import { toCurrency } from 'src/filters';
|
||||
import { useVnConfirm } from 'composables/useVnConfirm';
|
||||
import axios from 'axios';
|
||||
import useOpenURL from 'src/composables/useOpenURL';
|
||||
|
||||
const { t } = useI18n();
|
||||
const { openConfirmationModal } = useVnConfirm();
|
||||
|
@ -108,8 +109,7 @@ const removeOrders = async () => {
|
|||
await table.value.reload();
|
||||
};
|
||||
|
||||
const openTab = (id) =>
|
||||
window.open(`#/order/${id}/summary`, '_blank', 'noopener, noreferrer');
|
||||
const openTab = (id) => useOpenURL(`#/order/${id}/summary`);
|
||||
</script>
|
||||
<template>
|
||||
<VnTable
|
||||
|
@ -178,16 +178,16 @@ const openTab = (id) =>
|
|||
</template>
|
||||
|
||||
<template #column-clientFk="{ row }">
|
||||
<QTd @click.stop>
|
||||
<span class="link" v-text="row.clientName" :title="row.clientName" />
|
||||
<CustomerDescriptorProxy :id="row.clientFk" />
|
||||
</QTd>
|
||||
<span class="link" @click.stop :title="row.clientName">
|
||||
{{ row.clientName }}
|
||||
<CustomerDescriptorProxy :id="row.clientFk" dense
|
||||
/></span>
|
||||
</template>
|
||||
<template #column-departmentFk="{ row }">
|
||||
<QTd @click.stop>
|
||||
<span class="link" v-text="row.departmentName" />
|
||||
<DepartmentDescriptorProxy :id="row.departmentFk" dense />
|
||||
</QTd>
|
||||
<span class="link" @click.stop :title="row.departmentName">
|
||||
{{ row.departmentName }}
|
||||
<DepartmentDescriptorProxy :id="row.departmentFk" dense
|
||||
/></span>
|
||||
</template>
|
||||
</VnTable>
|
||||
</template>
|
||||
|
|
|
@ -44,11 +44,12 @@ describe('EntryList', () => {
|
|||
},
|
||||
);
|
||||
|
||||
checkBadgeDate(
|
||||
// fix on task https://redmine.verdnatura.es/issues/8638
|
||||
/* checkBadgeDate(
|
||||
'td[data-col-field="landed"] > div .bg-info',
|
||||
(badgeDate, compareDate) => {
|
||||
expect(badgeDate.getTime()).to.be.lessThan(compareDate.getTime());
|
||||
},
|
||||
);
|
||||
); */
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue