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