Merge pull request 'hotFix_vnJsonValue_showHours' (!1689) from hotFix_vnJsonValue_showHours into master
gitea/salix-front/pipeline/head This commit looks good Details

Reviewed-on: #1689
Reviewed-by: Jon Elias <jon@verdnatura.es>
This commit is contained in:
Alex Moreno 2025-04-08 13:00:58 +00:00
commit 9d00668acb
2 changed files with 3 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');
});