8315-devToTest #1094

Merged
alexm merged 253 commits from 8315-devToTest into test 2024-12-18 10:31:55 +00:00
1 changed files with 3 additions and 3 deletions
Showing only changes of commit e01f1fe5d2 - Show all commits

View File

@ -25,7 +25,6 @@ const props = defineProps({
});
onMounted(() => {
console.log('called');
restoreTicket();
});
@ -52,6 +51,7 @@ const hasPdf = ref();
const weight = ref();
const hasDocuwareFile = ref();
const quasar = useQuasar();
const canRestoreTicket = ref(false);
const actions = {
clone: async () => {
const opts = { message: t('Ticket cloned'), type: 'positive' };
@ -384,8 +384,6 @@ async function uploadDocuware(force) {
if (data) notify({ message: t('PDF sent!'), type: 'positive' });
}
const canRestoreTicket = ref(false);
const restoreTicket = async () => {
const filter = {
fields: ['id', 'originFk', 'creationDate', 'newInstance'],
@ -397,7 +395,9 @@ const restoreTicket = async () => {
limit: 1,
};
const params = { filter: JSON.stringify(filter) };
const { data } = await axios.get(`TicketLogs`, { params });
if (data && data.length) {
const now = Date.vnNew();
const maxDate = new Date(data[0].creationDate);