Merge branch 'master' into hotfix_customer_minorchanges
gitea/salix-front/pipeline/pr-master This commit looks good
Details
gitea/salix-front/pipeline/pr-master This commit looks good
Details
This commit is contained in:
commit
0b6ba8fc5e
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,7 +68,6 @@ const filter = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
where: { and: [{ originFk: route.params.id }] },
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const paginate = ref();
|
const paginate = ref();
|
||||||
|
@ -267,13 +266,6 @@ onMounted(() => {
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
stateStore.rightDrawer = false;
|
stateStore.rightDrawer = false;
|
||||||
});
|
});
|
||||||
|
|
||||||
watch(
|
|
||||||
() => router.currentRoute.value.params.id,
|
|
||||||
() => {
|
|
||||||
applyFilter();
|
|
||||||
},
|
|
||||||
);
|
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<VnPaginate
|
<VnPaginate
|
||||||
|
@ -281,6 +273,7 @@ watch(
|
||||||
:data-key
|
:data-key
|
||||||
:url="dataKey + 's'"
|
:url="dataKey + 's'"
|
||||||
:user-filter="filter"
|
:user-filter="filter"
|
||||||
|
:filter="{ where: { and: [{ originFk: route.params.id }] } }"
|
||||||
:skeleton="false"
|
:skeleton="false"
|
||||||
auto-load
|
auto-load
|
||||||
@on-fetch="setLogTree"
|
@on-fetch="setLogTree"
|
||||||
|
|
|
@ -39,7 +39,7 @@ const checkboxOptions = ref([
|
||||||
{ name: 'select', label: 'Accesses', selected: false },
|
{ name: 'select', label: 'Accesses', selected: false },
|
||||||
]);
|
]);
|
||||||
const columns = computed(() => [
|
const columns = computed(() => [
|
||||||
{ name: 'changedModelValue' },
|
{ name: 'changedModelValue', orderBy: 'id' },
|
||||||
{ name: 'changedModel' },
|
{ name: 'changedModel' },
|
||||||
{ name: 'userType', orderBy: false },
|
{ name: 'userType', orderBy: false },
|
||||||
{ name: 'userFk' },
|
{ name: 'userFk' },
|
||||||
|
|
|
@ -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');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,9 @@ function handleDelete(row) {
|
||||||
ticketNotesCrudRef.value.remove([row]);
|
ticketNotesCrudRef.value.remove([row]);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function handleSave() {
|
async function handleSave(e) {
|
||||||
|
if (e.shiftKey && e.key === 'Enter') return;
|
||||||
|
e.preventDefault();
|
||||||
if (!isSaving.value) {
|
if (!isSaving.value) {
|
||||||
isSaving.value = true;
|
isSaving.value = true;
|
||||||
await ticketNotesCrudRef.value?.saveChanges();
|
await ticketNotesCrudRef.value?.saveChanges();
|
||||||
|
@ -70,7 +72,7 @@ async function handleSave() {
|
||||||
<div
|
<div
|
||||||
v-for="(row, index) in rows"
|
v-for="(row, index) in rows"
|
||||||
:key="index"
|
:key="index"
|
||||||
class="q-mb-md row items-center q-gutter-x-md"
|
class="q-mb-md row q-gutter-x-md"
|
||||||
>
|
>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('ticketNotes.observationType')"
|
:label="t('ticketNotes.observationType')"
|
||||||
|
@ -86,7 +88,8 @@ async function handleSave() {
|
||||||
:label="t('basicData.description')"
|
:label="t('basicData.description')"
|
||||||
v-model="row.description"
|
v-model="row.description"
|
||||||
class="col"
|
class="col"
|
||||||
@keyup.enter="handleSave"
|
@keydown.enter.stop="handleSave"
|
||||||
|
autogrow
|
||||||
data-cy="ticketNotesDescription"
|
data-cy="ticketNotesDescription"
|
||||||
/>
|
/>
|
||||||
<QIcon
|
<QIcon
|
||||||
|
|
|
@ -166,50 +166,44 @@ const yearList = ref(generateYears());
|
||||||
}}
|
}}
|
||||||
</QCardSection>
|
</QCardSection>
|
||||||
</div>
|
</div>
|
||||||
<QList dense class="list q-gutter-y-sm q-my-lg">
|
<div dense class="column q-gutter-y-sm q-px-md">
|
||||||
<QItem>
|
<VnSelect
|
||||||
<QItemSection>
|
:label="t('Year')"
|
||||||
<VnSelect
|
v-model="selectedYear"
|
||||||
:label="t('Year')"
|
:options="yearList"
|
||||||
v-model="selectedYear"
|
dense
|
||||||
:options="yearList"
|
filled
|
||||||
dense
|
use-input
|
||||||
filled
|
:is-clearable="false"
|
||||||
use-input
|
/>
|
||||||
:is-clearable="false"
|
<VnSelect
|
||||||
/>
|
:label="t('Contract')"
|
||||||
</QItemSection>
|
v-model="selectedBusinessFk"
|
||||||
<QItemSection>
|
:options="contractList"
|
||||||
<VnSelect
|
option-value="businessFk"
|
||||||
:label="t('Contract')"
|
option-label="businessFk"
|
||||||
v-model="selectedBusinessFk"
|
dense
|
||||||
:options="contractList"
|
filled
|
||||||
option-value="businessFk"
|
use-input
|
||||||
option-label="businessFk"
|
:is-clearable="false"
|
||||||
dense
|
>
|
||||||
filled
|
<template #option="scope">
|
||||||
use-input
|
<QItem v-bind="scope.itemProps">
|
||||||
:is-clearable="false"
|
<QItemSection>
|
||||||
>
|
<QItemLabel># {{ scope.opt?.businessFk }}</QItemLabel>
|
||||||
<template #option="scope">
|
<QItemLabel caption>
|
||||||
<QItem v-bind="scope.itemProps">
|
{{ toDateFormat(scope.opt?.started) }} -
|
||||||
<QItemSection>
|
{{
|
||||||
<QItemLabel># {{ scope.opt?.businessFk }}</QItemLabel>
|
scope.opt?.ended
|
||||||
<QItemLabel caption>
|
? toDateFormat(scope.opt?.ended)
|
||||||
{{ toDateFormat(scope.opt?.started) }} -
|
: 'Indef.'
|
||||||
{{
|
}}
|
||||||
scope.opt?.ended
|
</QItemLabel>
|
||||||
? toDateFormat(scope.opt?.ended)
|
</QItemSection>
|
||||||
: 'Indef.'
|
</QItem>
|
||||||
}}
|
</template>
|
||||||
</QItemLabel>
|
</VnSelect>
|
||||||
</QItemSection>
|
</div>
|
||||||
</QItem>
|
|
||||||
</template>
|
|
||||||
</VnSelect>
|
|
||||||
</QItemSection>
|
|
||||||
</QItem>
|
|
||||||
</QList>
|
|
||||||
<QList dense class="list q-gutter-y-xs q-my-md">
|
<QList dense class="list q-gutter-y-xs q-my-md">
|
||||||
<QItem v-for="type in absenceTypeList" :key="type.id">
|
<QItem v-for="type in absenceTypeList" :key="type.id">
|
||||||
<WorkerEventLabel
|
<WorkerEventLabel
|
||||||
|
|
|
@ -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