Merge branch 'test' of https://gitea.verdnatura.es/verdnatura/salix-front into dev
gitea/salix-front/pipeline/head This commit looks good
Details
gitea/salix-front/pipeline/head This commit looks good
Details
This commit is contained in:
commit
ac7fab7ada
|
@ -1,6 +1,6 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { watch } from 'vue';
|
import { watch } from 'vue';
|
||||||
import { toDateString } from 'src/filters';
|
import { toDateHourMinSec } from 'src/filters';
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
value: { type: [String, Number, Boolean, Object], default: undefined },
|
value: { type: [String, Number, Boolean, Object], default: undefined },
|
||||||
|
@ -40,7 +40,7 @@ const updateValue = () => {
|
||||||
break;
|
break;
|
||||||
case 'object':
|
case 'object':
|
||||||
if (props.value instanceof Date) {
|
if (props.value instanceof Date) {
|
||||||
t = toDateString(props.value);
|
t = toDateHourMinSec(props.value);
|
||||||
} else {
|
} else {
|
||||||
t = props.value.toString();
|
t = props.value.toString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,7 +65,7 @@ describe('VnJsonValue', () => {
|
||||||
const date = new Date('2023-01-01');
|
const date = new Date('2023-01-01');
|
||||||
const wrapper = buildComponent({ value: date });
|
const wrapper = buildComponent({ value: date });
|
||||||
const span = wrapper.find('span');
|
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');
|
expect(span.classes()).toContain('json-object');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@ const { notify } = useNotify();
|
||||||
const loadingDocuware = ref(true);
|
const loadingDocuware = ref(true);
|
||||||
const tableRef = ref();
|
const tableRef = ref();
|
||||||
const dialog = ref();
|
const dialog = ref();
|
||||||
|
const getAvailablePdaRef = ref();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { openConfirmationModal } = useVnConfirm();
|
const { openConfirmationModal } = useVnConfirm();
|
||||||
const routeId = computed(() => route.params.id);
|
const routeId = computed(() => route.params.id);
|
||||||
|
@ -84,6 +85,7 @@ function reloadData() {
|
||||||
initialData.value.deviceProductionFk = null;
|
initialData.value.deviceProductionFk = null;
|
||||||
initialData.value.simFk = null;
|
initialData.value.simFk = null;
|
||||||
tableRef.value.reload();
|
tableRef.value.reload();
|
||||||
|
getAvailablePdaRef.value.fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
async function fetchDocuware() {
|
async function fetchDocuware() {
|
||||||
|
@ -135,6 +137,7 @@ async function deallocatePDA(deviceProductionFk) {
|
||||||
);
|
);
|
||||||
delete tableRef.value.CrudModelRef.formData[index];
|
delete tableRef.value.CrudModelRef.formData[index];
|
||||||
notify(t('PDA deallocated'), 'positive');
|
notify(t('PDA deallocated'), 'positive');
|
||||||
|
await getAvailablePdaRef.value.fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
function isSigned(row) {
|
function isSigned(row) {
|
||||||
|
@ -144,6 +147,7 @@ function isSigned(row) {
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<FetchData
|
<FetchData
|
||||||
|
ref="getAvailablePdaRef"
|
||||||
url="workers/getAvailablePda"
|
url="workers/getAvailablePda"
|
||||||
@on-fetch="(data) => (deviceProductions = data)"
|
@on-fetch="(data) => (deviceProductions = data)"
|
||||||
auto-load
|
auto-load
|
||||||
|
|
Loading…
Reference in New Issue