changes
This commit is contained in:
@@ -43,7 +43,7 @@ export default defineNuxtPlugin((nuxtApp) => {
|
||||
$store.commit("snackbar", {
|
||||
component,
|
||||
vbind: {
|
||||
content: typeof content == "string" ? content : JSON.stringify(content),
|
||||
content: typeof content === "string" ? content : JSON.stringify(content),
|
||||
},
|
||||
});
|
||||
};
|
||||
@@ -190,7 +190,7 @@ export default defineNuxtPlugin((nuxtApp) => {
|
||||
};
|
||||
|
||||
const copyToClipboard = function (text) {
|
||||
snackbar("Copied to clipboard");
|
||||
snackbar("Copied to clipboard", "Success");
|
||||
if (window.clipboardData && window.clipboardData.setData) {
|
||||
// IE specific code path to prevent textarea being shown while dialog is visible.
|
||||
return clipboardData.setData("Text", text);
|
||||
@@ -296,8 +296,8 @@ export default defineNuxtPlugin((nuxtApp) => {
|
||||
};
|
||||
|
||||
const download = async function (url, fileName) {
|
||||
let name = dayjs(new Date()).format("YYYYMMDDhhmmss") + "-" + fileName;
|
||||
const response = await fetch(url, { method: "GET" });
|
||||
const name = dayjs(new Date()).format("YYYYMMDDhhmmss") + "-" + fileName;
|
||||
const response = await fetch(url);
|
||||
const blob = await response.blob();
|
||||
const urlDownload = window.URL.createObjectURL(blob);
|
||||
const link = document.createElement("a");
|
||||
|
||||
@@ -1516,9 +1516,7 @@ export default defineNuxtPlugin((nuxtApp) => {
|
||||
}
|
||||
|
||||
try {
|
||||
const response = await $fetch(url.toString(), {
|
||||
method: "GET",
|
||||
});
|
||||
const response = await $fetch(url.toString());
|
||||
|
||||
if (response && response.pdf) {
|
||||
const pdfUrl = `${apiBaseUrl}static/contract/${response.pdf}`;
|
||||
|
||||
Reference in New Issue
Block a user