This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import jsPdf from 'jspdf'; | |
domToPng(ticketElement).then(dataUrl => { | |
const pdf = new jsPdf(); | |
const imgProps = pdf.getImageProperties(dataUrl); | |
const pdfWidth = pdf.internal.pageSize.getWidth(); | |
// const pdfHeight = pdf.internal.pageSize.getHeight(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const token = pm.environment.get("variable_key"); | |
pm.request.headers.add('Authorization', token) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const emit = defineEmits<{ | |
(event: "faqDeleted", data: Faq); | |
(event: "close", data: any); | |
}>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import moment from "moment"; | |
const formatDate = (date) => { | |
const momntDate = moment(date); | |
if (!momntDate.isValid()) ""; | |
return moment(date).format("D-MM-YYYY"); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
axios.get('/api/some-endpoint') | |
.then(response => { | |
// Handle successful response | |
console.log(response.data); | |
}) | |
.catch(error => { | |
// Handle error | |
if (error.response) { | |
// The request was made, and the server responded with a status code | |
// that falls out of the range of 2xx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const vuexLocalStorage = new VuexPersist({ | |
key: 'sano-vuex', | |
storage: window.localStorage, // or window.sessionStorage or localForage | |
// pass the state of the store to be persisted | |
reducer: state => ({ | |
auth: state.auth, | |
lang: state.lang, | |
}), | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const Router = createRouter({ | |
history: createWebHistory(), | |
routes, | |
scrollBehavior: (to, from, savedPosition) => { | |
if (to && to.hash) { | |
return { el: to.hash, behavior: 'smooth' }; | |
} else { | |
return { x: 0, y: 0 }; | |
} | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div class="row mtp-3"> | |
<div class="block-27"> | |
<ul class="pagination-ul"> | |
<li @click="prev" class="cursor"> | |
<a> | |
<img | |
class="chevron_right_pag" | |
src="/assets/img/chevron_big_right.png" | |
alt="right" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const router = new Router({ | |
mode: "history", | |
routes, | |
scrollBehavior: (to, from, savedPosition) => { | |
if (to && to.hash) { | |
return { selector: to.hash }; | |
} else { | |
return { x: 0, y: 0 }; | |
} | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shuf -i 1-10 -n 1 | |
// -i the range (here from 1 to 10) | |
// -n number of results (here one number between the given range will be printed |
NewerOlder