8315-devToTest #1094
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue