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

This commit is contained in:
Alex Moreno 2025-04-09 07:41:26 +02:00
commit ac7fab7ada
3 changed files with 7 additions and 3 deletions

View File

@ -1,6 +1,6 @@
<script setup>
import { watch } from 'vue';
import { toDateString } from 'src/filters';
import { toDateHourMinSec } from 'src/filters';
const props = defineProps({
value: { type: [String, Number, Boolean, Object], default: undefined },
@ -40,7 +40,7 @@ const updateValue = () => {
break;
case 'object':
if (props.value instanceof Date) {
t = toDateString(props.value);
t = toDateHourMinSec(props.value);
} else {
t = props.value.toString();
}

View File

@ -65,7 +65,7 @@ describe('VnJsonValue', () => {
const date = new Date('2023-01-01');
const wrapper = buildComponent({ value: date });
const span = wrapper.find('span');
expect(span.text()).toBe('2023-01-01');
expect(span.text()).toBe('01/01/2023, 01:00:00');
expect(span.classes()).toContain('json-object');
});

View File

@ -20,6 +20,7 @@ const { notify } = useNotify();
const loadingDocuware = ref(true);
const tableRef = ref();
const dialog = ref();
const getAvailablePdaRef = ref();
const route = useRoute();
const { openConfirmationModal } = useVnConfirm();
const routeId = computed(() => route.params.id);
@ -84,6 +85,7 @@ function reloadData() {
initialData.value.deviceProductionFk = null;
initialData.value.simFk = null;
tableRef.value.reload();
getAvailablePdaRef.value.fetch();
}
async function fetchDocuware() {
@ -135,6 +137,7 @@ async function deallocatePDA(deviceProductionFk) {
);
delete tableRef.value.CrudModelRef.formData[index];
notify(t('PDA deallocated'), 'positive');
await getAvailablePdaRef.value.fetch();
}
function isSigned(row) {
@ -144,6 +147,7 @@ function isSigned(row) {
<template>
<FetchData
ref="getAvailablePdaRef"
url="workers/getAvailablePda"
@on-fetch="(data) => (deviceProductions = data)"
auto-load