feat: add admin panel layout, dashboard, and user management
This commit is contained in:
@@ -0,0 +1,73 @@
|
||||
(function () {
|
||||
'use strict';
|
||||
if (localStorage.getItem("menodarktheme")) {
|
||||
document.querySelector("html").setAttribute("data-theme-mode", "dark")
|
||||
document.querySelector("html").setAttribute("data-menu-styles", "dark")
|
||||
document.querySelector("html").setAttribute("data-header-styles", "dark")
|
||||
}
|
||||
if (localStorage.menortl) {
|
||||
let html = document.querySelector('html');
|
||||
html.setAttribute("dir", "rtl");
|
||||
document.querySelector("#style")?.setAttribute("href", "/assets/libs/bootstrap/css/bootstrap.rtl.min.css");
|
||||
// rtlFn();
|
||||
}
|
||||
if (localStorage.getItem("menolayout") == "horizontal") {
|
||||
document.querySelector("html").setAttribute("data-nav-layout", "horizontal")
|
||||
}
|
||||
function localStorageBackup() {
|
||||
|
||||
// if there is a value stored, update color picker and background color
|
||||
// Used to retrive the data from local storage
|
||||
if (localStorage.primaryRGB) {
|
||||
if (document.querySelector('.theme-container-primary')) {
|
||||
document.querySelector('.theme-container-primary').value = localStorage.primaryRGB;
|
||||
}
|
||||
document.querySelector('html').style.setProperty('--primary-rgb', localStorage.primaryRGB);
|
||||
}
|
||||
if (localStorage.bodyBgRGB && localStorage.bodylightRGB) {
|
||||
if (document.querySelector('.theme-container-background')) {
|
||||
document.querySelector('.theme-container-background').value = localStorage.bodyBgRGB;
|
||||
}
|
||||
document.querySelector('html').style.setProperty('--body-bg-rgb', localStorage.bodyBgRGB);
|
||||
document.querySelector('html').style.setProperty('--body-bg-rgb2', localStorage.bodylightRGB);
|
||||
document.querySelector('html').style.setProperty('--light-rgb', localStorage.bodylightRGB);
|
||||
document.querySelector('html').style.setProperty('--form-control-bg', `rgb(${localStorage.bodylightRGB})`);
|
||||
document.querySelector('html').style.setProperty('--input-border', "rgba(255,255,255,0.1)");
|
||||
let html = document.querySelector('html');
|
||||
html.setAttribute('data-theme-mode', 'dark');
|
||||
html.setAttribute('data-menu-styles', 'dark');
|
||||
html.setAttribute('data-header-styles', 'dark');
|
||||
|
||||
|
||||
}
|
||||
if (localStorage.menodarktheme) {
|
||||
let html = document.querySelector('html');
|
||||
html.setAttribute('data-theme-mode', 'dark');
|
||||
}
|
||||
if (localStorage.menortl) {
|
||||
let html = document.querySelector('html');
|
||||
html.setAttribute('dir', 'rtl');
|
||||
document.querySelector("#style")?.setAttribute("href", "/assets/libs/bootstrap/css/bootstrap.rtl.min.css");
|
||||
setTimeout(() => {
|
||||
rtlFn();
|
||||
}, 10);
|
||||
}
|
||||
}
|
||||
localStorageBackup()
|
||||
|
||||
})();
|
||||
|
||||
|
||||
function ltrFn() {
|
||||
let html = document.querySelector('html')
|
||||
if(!document.querySelector("#style").href.includes('bootstrap.min.css')){
|
||||
document.querySelector("#style")?.setAttribute("href", "/assets/libs/bootstrap/css/bootstrap.min.css");
|
||||
}
|
||||
html.setAttribute("dir", "ltr");
|
||||
}
|
||||
|
||||
function rtlFn() {
|
||||
let html = document.querySelector('html');
|
||||
html.setAttribute("dir", "rtl");
|
||||
document.querySelector("#style")?.setAttribute("href", "/assets/libs/bootstrap/css/bootstrap.rtl.min.css");
|
||||
}
|
||||
+1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
File diff suppressed because one or more lines are too long
+2
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,528 @@
|
||||
(function () {
|
||||
"use strict";
|
||||
|
||||
/* page loader */
|
||||
function hideLoader() {
|
||||
const loader = document.getElementById("loader");
|
||||
loader.classList.add("d-none")
|
||||
}
|
||||
|
||||
window.addEventListener("load", hideLoader);
|
||||
/* page loader */
|
||||
|
||||
/* tooltip */
|
||||
const tooltipTriggerList = document.querySelectorAll(
|
||||
'[data-bs-toggle="tooltip"]'
|
||||
);
|
||||
const tooltipList = [...tooltipTriggerList].map(
|
||||
(tooltipTriggerEl) => new bootstrap.Tooltip(tooltipTriggerEl)
|
||||
);
|
||||
|
||||
/* popover */
|
||||
const popoverTriggerList = document.querySelectorAll(
|
||||
'[data-bs-toggle="popover"]'
|
||||
);
|
||||
const popoverList = [...popoverTriggerList].map(
|
||||
(popoverTriggerEl) => new bootstrap.Popover(popoverTriggerEl)
|
||||
);
|
||||
|
||||
/* breadcrumb date range picker */
|
||||
// flatpickr("#daterange", {
|
||||
// mode: "range",
|
||||
// dateFormat: "Y-m-d",
|
||||
// defaultDate: ["2024-07-01", "2024-07-30"]
|
||||
// });
|
||||
/* breadcrumb date range picker */
|
||||
|
||||
if (document.querySelector("#switcher-canvas")) {
|
||||
//switcher color pickers
|
||||
const pickrContainerPrimary = document.querySelector(
|
||||
".pickr-container-primary"
|
||||
);
|
||||
const themeContainerPrimary = document.querySelector(
|
||||
".theme-container-primary"
|
||||
);
|
||||
const pickrContainerBackground = document.querySelector(
|
||||
".pickr-container-background"
|
||||
);
|
||||
const themeContainerBackground = document.querySelector(
|
||||
".theme-container-background"
|
||||
);
|
||||
|
||||
/* for theme primary */
|
||||
const nanoThemes = [
|
||||
[
|
||||
"nano",
|
||||
{
|
||||
defaultRepresentation: "RGB",
|
||||
components: {
|
||||
preview: true,
|
||||
opacity: false,
|
||||
hue: true,
|
||||
|
||||
interaction: {
|
||||
hex: false,
|
||||
rgba: true,
|
||||
hsva: false,
|
||||
input: true,
|
||||
clear: false,
|
||||
save: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
];
|
||||
const nanoButtons = [];
|
||||
let nanoPickr = null;
|
||||
for (const [theme, config] of nanoThemes) {
|
||||
const button = document.createElement("button");
|
||||
button.innerHTML = theme;
|
||||
nanoButtons.push(button);
|
||||
|
||||
button.addEventListener("click", () => {
|
||||
const el = document.createElement("p");
|
||||
pickrContainerPrimary.appendChild(el);
|
||||
|
||||
/* Delete previous instance */
|
||||
if (nanoPickr) {
|
||||
nanoPickr.destroyAndRemove();
|
||||
}
|
||||
|
||||
/* Apply active class */
|
||||
for (const btn of nanoButtons) {
|
||||
btn.classList[btn === button ? "add" : "remove"]("active");
|
||||
}
|
||||
|
||||
/* Create fresh instance */
|
||||
nanoPickr = new Pickr(
|
||||
Object.assign(
|
||||
{
|
||||
el,
|
||||
theme,
|
||||
default: "#589bff",
|
||||
},
|
||||
config
|
||||
)
|
||||
);
|
||||
|
||||
/* Set events */
|
||||
nanoPickr.on("changestop", (source, instance) => {
|
||||
let color = instance.getColor().toRGBA();
|
||||
let html = document.querySelector("html");
|
||||
html.style.setProperty(
|
||||
"--primary-rgb",
|
||||
`${Math.floor(color[0])}, ${Math.floor(color[1])}, ${Math.floor(
|
||||
color[2]
|
||||
)}`
|
||||
);
|
||||
/* theme color picker */
|
||||
localStorage.setItem(
|
||||
"primaryRGB",
|
||||
`${Math.floor(color[0])}, ${Math.floor(color[1])}, ${Math.floor(
|
||||
color[2]
|
||||
)}`
|
||||
);
|
||||
// updateColors();
|
||||
});
|
||||
});
|
||||
|
||||
themeContainerPrimary.appendChild(button);
|
||||
}
|
||||
nanoButtons[0].click();
|
||||
/* for theme primary */
|
||||
|
||||
/* for theme background */
|
||||
const nanoThemes1 = [
|
||||
[
|
||||
"nano",
|
||||
{
|
||||
defaultRepresentation: "RGB",
|
||||
components: {
|
||||
preview: true,
|
||||
opacity: false,
|
||||
hue: true,
|
||||
|
||||
interaction: {
|
||||
hex: false,
|
||||
rgba: true,
|
||||
hsva: false,
|
||||
input: true,
|
||||
clear: false,
|
||||
save: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
];
|
||||
const nanoButtons1 = [];
|
||||
let nanoPickr1 = null;
|
||||
for (const [theme, config] of nanoThemes) {
|
||||
const button = document.createElement("button");
|
||||
button.innerHTML = theme;
|
||||
nanoButtons1.push(button);
|
||||
|
||||
button.addEventListener("click", () => {
|
||||
const el = document.createElement("p");
|
||||
pickrContainerBackground.appendChild(el);
|
||||
|
||||
/* Delete previous instance */
|
||||
if (nanoPickr1) {
|
||||
nanoPickr1.destroyAndRemove();
|
||||
}
|
||||
|
||||
/* Apply active class */
|
||||
for (const btn of nanoButtons) {
|
||||
btn.classList[btn === button ? "add" : "remove"]("active");
|
||||
}
|
||||
|
||||
/* Create fresh instance */
|
||||
nanoPickr1 = new Pickr(
|
||||
Object.assign(
|
||||
{
|
||||
el,
|
||||
theme,
|
||||
default: "#589bff",
|
||||
},
|
||||
config
|
||||
)
|
||||
);
|
||||
|
||||
/* Set events */
|
||||
nanoPickr1.on("changestop", (source, instance) => {
|
||||
let color = instance.getColor().toRGBA();
|
||||
let html = document.querySelector("html");
|
||||
html.style.setProperty(
|
||||
"--body-bg-rgb",
|
||||
`${color[0]}, ${color[1]}, ${color[2]}`
|
||||
);
|
||||
document
|
||||
.querySelector("html")
|
||||
.style.setProperty(
|
||||
"--body-bg-rgb2",
|
||||
`${color[0] + 14}, ${color[1] + 14}, ${color[2] + 14}`
|
||||
);
|
||||
document
|
||||
.querySelector("html")
|
||||
.style.setProperty(
|
||||
"--light-rgb",
|
||||
`${color[0] + 14}, ${color[1] + 14}, ${color[2] + 14}`
|
||||
);
|
||||
document
|
||||
.querySelector("html")
|
||||
.style.setProperty(
|
||||
"--form-control-bg",
|
||||
`rgb(${color[0] + 14}, ${color[1] + 14}, ${color[2] + 14})`
|
||||
);
|
||||
document
|
||||
.querySelector("html")
|
||||
.style.setProperty(
|
||||
"--gray-3",
|
||||
`rgb(${color[0] + 14}, ${color[1] + 14}, ${color[2] + 14})`
|
||||
);
|
||||
localStorage.removeItem("bgtheme");
|
||||
// updateColors();
|
||||
html.setAttribute("data-theme-mode", "dark");
|
||||
html.setAttribute("data-menu-styles", "dark");
|
||||
html.setAttribute("data-header-styles", "dark");
|
||||
document.querySelector("#switcher-dark-theme").checked = true;
|
||||
document.querySelector("#switcher-menu-dark").checked = true;
|
||||
document.querySelector("#switcher-header-dark").checked = true;
|
||||
localStorage.setItem(
|
||||
"bodyBgRGB",
|
||||
`${color[0]}, ${color[1]}, ${color[2]}`
|
||||
);
|
||||
localStorage.setItem(
|
||||
"bodylightRGB",
|
||||
`${color[0] + 14}, ${color[1] + 14}, ${color[2] + 14}`
|
||||
);
|
||||
});
|
||||
});
|
||||
themeContainerBackground.appendChild(button);
|
||||
}
|
||||
nanoButtons1[0].click();
|
||||
/* for theme background */
|
||||
}
|
||||
|
||||
/* header theme toggle */
|
||||
function toggleTheme() {
|
||||
let html = document.querySelector("html");
|
||||
if (html.getAttribute("data-theme-mode") === "dark") {
|
||||
html.setAttribute("data-theme-mode", "light");
|
||||
html.setAttribute("data-header-styles", "light");
|
||||
html.setAttribute("data-menu-styles", "light");
|
||||
if (!localStorage.getItem("primaryRGB")) {
|
||||
html.setAttribute("style", "");
|
||||
}
|
||||
html.removeAttribute("data-bg-theme");
|
||||
if (document.querySelector("#switcher-canvas")) {
|
||||
document.querySelector("#switcher-light-theme").checked = true;
|
||||
document.querySelector("#switcher-menu-light").checked = true;
|
||||
}
|
||||
document
|
||||
.querySelector("html")
|
||||
.style.removeProperty("--body-bg-rgb", localStorage.bodyBgRGB);
|
||||
// checkOptions();
|
||||
html.style.removeProperty("--body-bg-rgb2");
|
||||
html.style.removeProperty("--light-rgb");
|
||||
html.style.removeProperty("--form-control-bg");
|
||||
html.style.removeProperty("--input-border");
|
||||
if (document.querySelector("#switcher-canvas")) {
|
||||
document.querySelector("#switcher-header-light").checked = true;
|
||||
document.querySelector("#switcher-menu-light").checked = true;
|
||||
document.querySelector("#switcher-light-theme").checked = true;
|
||||
document.querySelector("#switcher-background4").checked = false;
|
||||
document.querySelector("#switcher-background3").checked = false;
|
||||
document.querySelector("#switcher-background2").checked = false;
|
||||
document.querySelector("#switcher-background1").checked = false;
|
||||
document.querySelector("#switcher-background").checked = false;
|
||||
}
|
||||
localStorage.removeItem("menodarktheme");
|
||||
localStorage.removeItem("menoMenu");
|
||||
localStorage.removeItem("menoHeader");
|
||||
localStorage.removeItem("bodylightRGB");
|
||||
localStorage.removeItem("bodyBgRGB");
|
||||
html.setAttribute("data-header-styles", "light");
|
||||
} else {
|
||||
html.setAttribute("data-theme-mode", "dark");
|
||||
html.setAttribute("data-header-styles", "dark");
|
||||
if (!localStorage.getItem("primaryRGB")) {
|
||||
html.setAttribute("style", "");
|
||||
}
|
||||
html.setAttribute("data-menu-styles", "dark");
|
||||
|
||||
if (document.querySelector("#switcher-canvas")) {
|
||||
document.querySelector("#switcher-dark-theme").checked = true;
|
||||
document.querySelector("#switcher-menu-dark").checked = true;
|
||||
document.querySelector("#switcher-header-dark").checked = true;
|
||||
// checkOptions();
|
||||
document.querySelector("#switcher-menu-dark").checked = true;
|
||||
document.querySelector("#switcher-header-dark").checked = true;
|
||||
document.querySelector("#switcher-dark-theme").checked = true;
|
||||
document.querySelector("#switcher-background4").checked = false;
|
||||
document.querySelector("#switcher-background3").checked = false;
|
||||
document.querySelector("#switcher-background2").checked = false;
|
||||
document.querySelector("#switcher-background1").checked = false;
|
||||
document.querySelector("#switcher-background").checked = false;
|
||||
}
|
||||
localStorage.setItem("menodarktheme", "true");
|
||||
localStorage.setItem("menoMenu", "dark");
|
||||
localStorage.setItem("menoHeader", "dark");
|
||||
localStorage.removeItem("bodylightRGB");
|
||||
localStorage.removeItem("bodyBgRGB");
|
||||
}
|
||||
}
|
||||
|
||||
let layoutSetting = document.querySelector(".layout-setting");
|
||||
layoutSetting.addEventListener("click", toggleTheme);
|
||||
/* header theme toggle */
|
||||
|
||||
/* Choices JS */
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
var genericExamples = document.querySelectorAll("[data-trigger]");
|
||||
for (let i = 0; i < genericExamples.length; ++i) {
|
||||
var element = genericExamples[i];
|
||||
new Choices(element, {
|
||||
allowHTML: true,
|
||||
placeholderValue: "This is a placeholder set in the config",
|
||||
searchPlaceholderValue: "جستجو",
|
||||
});
|
||||
}
|
||||
});
|
||||
/* Choices JS */
|
||||
|
||||
/* footer year */
|
||||
document.getElementById("year").innerHTML = new Date().getFullYear();
|
||||
/* footer year */
|
||||
|
||||
/* node waves */
|
||||
Waves.attach(".btn-wave", ["waves-light"]);
|
||||
Waves.init();
|
||||
/* node waves */
|
||||
|
||||
/* card with close button */
|
||||
let DIV_CARD = ".card";
|
||||
let cardRemoveBtn = document.querySelectorAll(
|
||||
'[data-bs-toggle="card-remove"]'
|
||||
);
|
||||
cardRemoveBtn.forEach((ele) => {
|
||||
ele.addEventListener("click", function (e) {
|
||||
e.preventDefault();
|
||||
let $this = this;
|
||||
let card = $this.closest(DIV_CARD);
|
||||
card.remove();
|
||||
return false;
|
||||
});
|
||||
});
|
||||
/* card with close button */
|
||||
|
||||
/* card with fullscreen */
|
||||
let cardFullscreenBtn = document.querySelectorAll(
|
||||
'[data-bs-toggle="card-fullscreen"]'
|
||||
);
|
||||
cardFullscreenBtn.forEach((ele) => {
|
||||
ele.addEventListener("click", function (e) {
|
||||
let $this = this;
|
||||
let card = $this.closest(DIV_CARD);
|
||||
card.classList.toggle("card-fullscreen");
|
||||
card.classList.remove("card-collapsed");
|
||||
e.preventDefault();
|
||||
return false;
|
||||
});
|
||||
});
|
||||
/* card with fullscreen */
|
||||
|
||||
/* count-up */
|
||||
var i = 1;
|
||||
setInterval(() => {
|
||||
document.querySelectorAll(".count-up").forEach((ele) => {
|
||||
if (ele.getAttribute("data-count") >= i) {
|
||||
i = i + 1;
|
||||
ele.innerText = i;
|
||||
}
|
||||
});
|
||||
}, 10);
|
||||
/* count-up */
|
||||
|
||||
/* back to top */
|
||||
const scrollToTop = document.querySelector(".scrollToTop");
|
||||
const $rootElement = document.documentElement;
|
||||
const $body = document.body;
|
||||
window.onscroll = () => {
|
||||
const scrollTop = window.scrollY || window.pageYOffset;
|
||||
const clientHt = $rootElement.scrollHeight - $rootElement.clientHeight;
|
||||
if (window.scrollY > 100) {
|
||||
scrollToTop.style.display = "flex";
|
||||
} else {
|
||||
scrollToTop.style.display = "none";
|
||||
}
|
||||
};
|
||||
scrollToTop.onclick = () => {
|
||||
window.scrollTo(0, 0);
|
||||
};
|
||||
/* back to top */
|
||||
})();
|
||||
|
||||
/* full screen */
|
||||
var elem = document.documentElement;
|
||||
window.openFullscreen = function () {
|
||||
let open = document.querySelector(".full-screen-open");
|
||||
let close = document.querySelector(".full-screen-close");
|
||||
|
||||
if (
|
||||
!document.fullscreenElement &&
|
||||
!document.webkitFullscreenElement &&
|
||||
!document.msFullscreenElement
|
||||
) {
|
||||
if (elem.requestFullscreen) {
|
||||
elem.requestFullscreen();
|
||||
} else if (elem.webkitRequestFullscreen) {
|
||||
/* Safari */
|
||||
elem.webkitRequestFullscreen();
|
||||
} else if (elem.msRequestFullscreen) {
|
||||
/* IE11 */
|
||||
elem.msRequestFullscreen();
|
||||
}
|
||||
close.classList.add("d-block");
|
||||
close.classList.remove("d-none");
|
||||
open.classList.add("d-none");
|
||||
} else {
|
||||
if (document.exitFullscreen) {
|
||||
document.exitFullscreen();
|
||||
} else if (document.webkitExitFullscreen) {
|
||||
/* Safari */
|
||||
document.webkitExitFullscreen();
|
||||
} else if (document.msExitFullscreen) {
|
||||
/* IE11 */
|
||||
document.msExitFullscreen();
|
||||
}
|
||||
close.classList.remove("d-block");
|
||||
open.classList.remove("d-none");
|
||||
close.classList.add("d-none");
|
||||
open.classList.add("d-block");
|
||||
}
|
||||
}
|
||||
/* full screen */
|
||||
|
||||
/* toggle switches */
|
||||
let customSwitch = document.querySelectorAll(".toggle");
|
||||
customSwitch.forEach((e) =>
|
||||
e.addEventListener("click", () => {
|
||||
e.classList.toggle("on");
|
||||
})
|
||||
);
|
||||
/* toggle switches */
|
||||
|
||||
/* header dropdown close button */
|
||||
|
||||
/* for cart dropdown */
|
||||
const headerbtn = document.querySelectorAll(".dropdown-item-close");
|
||||
headerbtn.forEach((button) => {
|
||||
button.addEventListener("click", (e) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
button.parentNode.parentNode.parentNode.parentNode.parentNode.remove();
|
||||
document.getElementById("cart-data").innerText = `${document.querySelectorAll(".dropdown-item-close").length
|
||||
} مورد`;
|
||||
document.getElementById("cart-icon-badge").innerText = `${document.querySelectorAll(".dropdown-item-close").length
|
||||
}`;
|
||||
console.log(
|
||||
document.getElementById("header-cart-items-scroll").children.length
|
||||
);
|
||||
if (document.querySelectorAll(".dropdown-item-close").length == 0) {
|
||||
let elementHide = document.querySelector(".empty-header-item");
|
||||
let elementShow = document.querySelector(".empty-item");
|
||||
elementHide.classList.add("d-none");
|
||||
elementShow.classList.remove("d-none");
|
||||
}
|
||||
});
|
||||
});
|
||||
/* for cart dropdown */
|
||||
|
||||
/* for notifications dropdown */
|
||||
const headerbtn1 = document.querySelectorAll(".dropdown-item-close1");
|
||||
headerbtn1.forEach((button) => {
|
||||
button.addEventListener("click", (e) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
button.parentNode.parentNode.parentNode.parentNode.remove();
|
||||
document.getElementById("notifiation-data").innerText = `${document.querySelectorAll(".dropdown-item-close1").length
|
||||
} خوانده نشده`;
|
||||
if (document.querySelectorAll(".dropdown-item-close1").length == 0) {
|
||||
let elementHide1 = document.querySelector(".empty-header-item1");
|
||||
let elementShow1 = document.querySelector(".empty-item1");
|
||||
elementHide1.classList.add("d-none");
|
||||
elementShow1.classList.remove("d-none");
|
||||
}
|
||||
});
|
||||
});
|
||||
/* for notifications dropdown */
|
||||
|
||||
|
||||
$(document).ready(function () {
|
||||
$('#birth_date').persianDatepicker({
|
||||
format: 'YYYY/MM/DD',
|
||||
initialValueType: 'gregorian',
|
||||
calendarType: 'persian',
|
||||
autoClose: true
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
function previewAvatar(input) {
|
||||
if (input.files && input.files[0]) {
|
||||
const reader = new FileReader();
|
||||
reader.onload = function (e) {
|
||||
document.getElementById('avatarPreview').style.backgroundImage = `url(${e.target.result})`;
|
||||
};
|
||||
reader.readAsDataURL(input.files[0]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,41 @@
|
||||
(function () {
|
||||
'use strict'
|
||||
|
||||
/* dropzone */
|
||||
let myDropzone = new Dropzone(".dropzone");
|
||||
myDropzone.on("addedfile", file => {
|
||||
});
|
||||
|
||||
/* filepond */
|
||||
FilePond.registerPlugin(
|
||||
FilePondPluginImagePreview,
|
||||
FilePondPluginImageExifOrientation,
|
||||
FilePondPluginFileValidateSize,
|
||||
FilePondPluginFileEncode,
|
||||
FilePondPluginImageEdit,
|
||||
FilePondPluginFileValidateType,
|
||||
FilePondPluginImageCrop,
|
||||
FilePondPluginImageResize,
|
||||
FilePondPluginImageTransform
|
||||
);
|
||||
|
||||
/* multiple upload */
|
||||
const MultipleElement = document.querySelector('.multiple-filepond');
|
||||
FilePond.create(MultipleElement,);
|
||||
|
||||
/* single upload */
|
||||
FilePond.create(
|
||||
document.querySelector('.single-fileupload'),
|
||||
{
|
||||
labelIdle: `Drag & Drop your picture or <span class="filepond--label-action">Browse</span>`,
|
||||
imagePreviewHeight: 170,
|
||||
imageCropAspectRatio: '1:1',
|
||||
imageResizeTargetWidth: 200,
|
||||
imageResizeTargetHeight: 200,
|
||||
stylePanelLayout: 'compact circle',
|
||||
styleLoadIndicatorPosition: 'center bottom',
|
||||
styleButtonRemoveItemPosition: 'center bottom'
|
||||
}
|
||||
);
|
||||
|
||||
})();
|
||||
+2
File diff suppressed because one or more lines are too long
@@ -0,0 +1,373 @@
|
||||
(function () {
|
||||
"use strict";
|
||||
if (localStorage.getItem("menodarktheme")) {
|
||||
document.querySelector("html").setAttribute("data-theme-mode", "dark");
|
||||
document.querySelector("html").setAttribute("data-menu-styles", "dark");
|
||||
document.querySelector("html").setAttribute("data-header-styles", "dark");
|
||||
}
|
||||
if (localStorage.menortl) {
|
||||
let html = document.querySelector("html");
|
||||
html.setAttribute("dir", "rtl");
|
||||
document
|
||||
.querySelector("#style")
|
||||
?.setAttribute(
|
||||
"href",
|
||||
"assets/libs/bootstrap/css/bootstrap.rtl.min.css"
|
||||
);
|
||||
}
|
||||
if (localStorage.menolayout) {
|
||||
let html = document.querySelector("html");
|
||||
html.setAttribute("data-nav-layout", "horizontal");
|
||||
document.querySelector("html").setAttribute("data-menu-styles", "light");
|
||||
}
|
||||
if (localStorage.getItem("menolayout") == "horizontal") {
|
||||
document
|
||||
.querySelector("html")
|
||||
.setAttribute("data-nav-layout", "horizontal");
|
||||
}
|
||||
if (localStorage.loaderEnable == "true") {
|
||||
document.querySelector("html").setAttribute("loader", "enable");
|
||||
} else {
|
||||
if (!document.querySelector("html").getAttribute("loader")) {
|
||||
document.querySelector("html").setAttribute("loader", "disable");
|
||||
}
|
||||
}
|
||||
|
||||
function localStorageBackup() {
|
||||
// if there is a value stored, update color picker and background color
|
||||
// Used to retrive the data from local storage
|
||||
if (localStorage.primaryRGB) {
|
||||
if (document.querySelector(".theme-container-primary")) {
|
||||
document.querySelector(".theme-container-primary").value =
|
||||
localStorage.primaryRGB;
|
||||
}
|
||||
document
|
||||
.querySelector("html")
|
||||
.style.setProperty("--primary-rgb", localStorage.primaryRGB);
|
||||
}
|
||||
if (localStorage.bodyBgRGB && localStorage.bodylightRGB) {
|
||||
if (document.querySelector(".theme-container-background")) {
|
||||
document.querySelector(".theme-container-background").value =
|
||||
localStorage.bodyBgRGB;
|
||||
}
|
||||
document
|
||||
.querySelector("html")
|
||||
.style.setProperty("--body-bg-rgb", localStorage.bodyBgRGB);
|
||||
document
|
||||
.querySelector("html")
|
||||
.style.setProperty("--body-bg-rgb2", localStorage.bodylightRGB);
|
||||
document
|
||||
.querySelector("html")
|
||||
.style.setProperty("--light-rgb", localStorage.bodylightRGB);
|
||||
document
|
||||
.querySelector("html")
|
||||
.style.setProperty(
|
||||
"--form-control-bg",
|
||||
`rgb(${localStorage.bodylightRGB})`
|
||||
);
|
||||
document
|
||||
.querySelector("html")
|
||||
.style.setProperty("--gray-3", `rgb(${localStorage.bodylightRGB})`);
|
||||
document
|
||||
.querySelector("html")
|
||||
.style.setProperty("--input-border", "rgba(255,255,255,0.1)");
|
||||
let html = document.querySelector("html");
|
||||
html.setAttribute("data-theme-mode", "dark");
|
||||
html.setAttribute("data-menu-styles", "dark");
|
||||
html.setAttribute("data-header-styles", "dark");
|
||||
}
|
||||
if (localStorage.menodarktheme) {
|
||||
let html = document.querySelector("html");
|
||||
html.setAttribute("data-theme-mode", "dark");
|
||||
}
|
||||
if (localStorage.menolayout) {
|
||||
let html = document.querySelector("html");
|
||||
let layoutValue = localStorage.getItem("menolayout");
|
||||
html.setAttribute("data-nav-layout", "horizontal");
|
||||
html.setAttribute("data-nav-style", "menu-click");
|
||||
// setTimeout(() => {
|
||||
// clearNavDropdown();
|
||||
// }, 1000);
|
||||
// setTimeout(() => {
|
||||
// checkHoriMenu();
|
||||
// }, 5000);
|
||||
}
|
||||
if (localStorage.menoverticalstyles) {
|
||||
let html = document.querySelector("html");
|
||||
let verticalStyles = localStorage.getItem("menoverticalstyles");
|
||||
|
||||
if (verticalStyles == "default") {
|
||||
html.setAttribute("data-vertical-style", "default");
|
||||
localStorage.removeItem("menonavstyles");
|
||||
}
|
||||
if (verticalStyles == "closed") {
|
||||
html.setAttribute("data-vertical-style", "closed");
|
||||
localStorage.removeItem("menonavstyles");
|
||||
}
|
||||
if (verticalStyles == "icontext") {
|
||||
html.setAttribute("data-vertical-style", "icontext");
|
||||
localStorage.removeItem("menonavstyles");
|
||||
}
|
||||
if (verticalStyles == "overlay") {
|
||||
html.setAttribute("data-vertical-style", "overlay");
|
||||
localStorage.removeItem("menonavstyles");
|
||||
}
|
||||
if (verticalStyles == "detached") {
|
||||
html.setAttribute("data-vertical-style", "detached");
|
||||
localStorage.removeItem("menonavstyles");
|
||||
}
|
||||
if (verticalStyles == "doublemenu") {
|
||||
html.setAttribute("data-vertical-style", "doublemenu");
|
||||
localStorage.removeItem("menonavstyles");
|
||||
setTimeout(() => {
|
||||
const menuSlideItem = document.querySelectorAll(
|
||||
".main-menu > li > .side-menu__item"
|
||||
);
|
||||
|
||||
// Create the tooltip element
|
||||
const tooltip = document.createElement("div");
|
||||
tooltip.className = "custome-tooltip";
|
||||
// Set the CSS properties of the tooltip element
|
||||
tooltip.style.setProperty("position", "fixed");
|
||||
tooltip.style.setProperty("display", "none");
|
||||
tooltip.style.setProperty("padding", "0.5rem");
|
||||
tooltip.style.setProperty("font-weight", "500");
|
||||
tooltip.style.setProperty("font-size", "0.75rem");
|
||||
tooltip.style.setProperty("background-color", "rgb(15, 23 ,42)");
|
||||
tooltip.style.setProperty("color", "rgb(255, 255 ,255)");
|
||||
tooltip.style.setProperty("margin-inline-start", "48px");
|
||||
tooltip.style.setProperty("border-radius", "0.25rem");
|
||||
tooltip.style.setProperty("z-index", "99");
|
||||
|
||||
menuSlideItem.forEach((e) => {
|
||||
// Add an event listener to the menu slide item to show the tooltip
|
||||
e.addEventListener("mouseenter", () => {
|
||||
if (localStorage.menoverticalstyles == "doublemenu") {
|
||||
tooltip.style.setProperty("display", "block");
|
||||
tooltip.textContent =
|
||||
e.querySelector(".side-menu__label").textContent;
|
||||
if (
|
||||
document
|
||||
.querySelector("html")
|
||||
.getAttribute("data-vertical-style") == "doublemenu"
|
||||
) {
|
||||
e.appendChild(tooltip);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Add an event listener to hide the tooltip
|
||||
e.addEventListener("mouseleave", () => {
|
||||
tooltip.style.setProperty("display", "none");
|
||||
tooltip.textContent =
|
||||
e.querySelector(".side-menu__label").textContent;
|
||||
});
|
||||
});
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
if (localStorage.menonavstyles) {
|
||||
let html = document.querySelector("html");
|
||||
let navStyles = localStorage.getItem("menonavstyles");
|
||||
if (navStyles == "menu-click") {
|
||||
html.setAttribute("data-nav-style", "menu-click");
|
||||
localStorage.removeItem("menoverticalstyles");
|
||||
html.removeAttribute("data-vertical-style");
|
||||
}
|
||||
if (navStyles == "menu-hover") {
|
||||
html.setAttribute("data-nav-style", "menu-hover");
|
||||
localStorage.removeItem("menoverticalstyles");
|
||||
html.removeAttribute("data-vertical-style");
|
||||
}
|
||||
if (navStyles == "icon-click") {
|
||||
html.setAttribute("data-nav-style", "icon-click");
|
||||
localStorage.removeItem("menoverticalstyles");
|
||||
html.removeAttribute("data-vertical-style");
|
||||
}
|
||||
if (navStyles == "icon-hover") {
|
||||
html.setAttribute("data-nav-style", "icon-hover");
|
||||
localStorage.removeItem("menoverticalstyles");
|
||||
html.removeAttribute("data-vertical-style");
|
||||
}
|
||||
}
|
||||
if (localStorage.menoclassic) {
|
||||
let html = document.querySelector("html");
|
||||
html.setAttribute("data-page-style", "classic");
|
||||
}
|
||||
if (localStorage.menomodern) {
|
||||
let html = document.querySelector("html");
|
||||
html.setAttribute("data-page-style", "modern");
|
||||
}
|
||||
if (localStorage.menoboxed) {
|
||||
let html = document.querySelector("html");
|
||||
html.setAttribute("data-width", "boxed");
|
||||
}
|
||||
if (localStorage.menofullwidth) {
|
||||
let html = document.querySelector("html");
|
||||
html.setAttribute("data-width", "fullwidth");
|
||||
}
|
||||
if (localStorage.menodefaultwidth) {
|
||||
let html = document.querySelector("html");
|
||||
html.setAttribute("data-width", "default");
|
||||
}
|
||||
if (localStorage.menoheaderfixed) {
|
||||
let html = document.querySelector("html");
|
||||
html.setAttribute("data-header-position", "fixed");
|
||||
}
|
||||
if (localStorage.menoheaderscrollable) {
|
||||
let html = document.querySelector("html");
|
||||
html.setAttribute("data-header-position", "scrollable");
|
||||
}
|
||||
if (localStorage.menomenufixed) {
|
||||
let html = document.querySelector("html");
|
||||
html.setAttribute("data-menu-position", "fixed");
|
||||
}
|
||||
if (localStorage.menomenuscrollable) {
|
||||
let html = document.querySelector("html");
|
||||
html.setAttribute("data-menu-position", "scrollable");
|
||||
}
|
||||
if (localStorage.menoMenu) {
|
||||
let html = document.querySelector("html");
|
||||
let menuValue = localStorage.getItem("menoMenu");
|
||||
switch (menuValue) {
|
||||
case "light":
|
||||
html.setAttribute("data-menu-styles", "light");
|
||||
break;
|
||||
case "dark":
|
||||
html.setAttribute("data-menu-styles", "dark");
|
||||
break;
|
||||
case "color":
|
||||
html.setAttribute("data-menu-styles", "color");
|
||||
break;
|
||||
case "gradient":
|
||||
html.setAttribute("data-menu-styles", "gradient");
|
||||
break;
|
||||
case "transparent":
|
||||
html.setAttribute("data-menu-styles", "transparent");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (localStorage.menoHeader) {
|
||||
let html = document.querySelector("html");
|
||||
let headerValue = localStorage.getItem("menoHeader");
|
||||
html.setAttribute("data-header-styles", headerValue);
|
||||
}
|
||||
if (localStorage.bgimg) {
|
||||
let html = document.querySelector("html");
|
||||
let value = localStorage.getItem("bgimg");
|
||||
html.setAttribute("data-bg-img", value);
|
||||
}
|
||||
}
|
||||
localStorageBackup();
|
||||
|
||||
// keep chosen files here (useful when uploading)
|
||||
let selectedFiles = [];
|
||||
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const input = document.getElementById('imageInput');
|
||||
if (input) {
|
||||
input.addEventListener('change', previewImages);
|
||||
}
|
||||
|
||||
// Optional: allow dropping files onto the placeholder
|
||||
const placeholder = document.getElementById('uploadPlaceholder');
|
||||
if (placeholder) {
|
||||
placeholder.addEventListener('dragover', e => {
|
||||
e.preventDefault();
|
||||
placeholder.style.borderColor = '#555';
|
||||
});
|
||||
placeholder.addEventListener('dragleave', e => {
|
||||
placeholder.style.borderColor = '#cfcfcf';
|
||||
});
|
||||
placeholder.addEventListener('drop', e => {
|
||||
e.preventDefault();
|
||||
placeholder.style.borderColor = '#cfcfcf';
|
||||
const dtFiles = Array.from(e.dataTransfer.files || []);
|
||||
// Use same handler as input: create a fake event-like object with .files
|
||||
previewImages({ target: { files: dtFiles } });
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// Update the actual input.files property to match selectedFiles using DataTransfer
|
||||
function updateInputFiles() {
|
||||
const dataTransfer = new DataTransfer();
|
||||
selectedFiles.forEach(file => dataTransfer.items.add(file));
|
||||
const input = document.getElementById('imageInput');
|
||||
input.files = dataTransfer.files;
|
||||
}
|
||||
|
||||
function previewImages(event) {
|
||||
const container = document.getElementById('imagePreviewContainer');
|
||||
const uploadPlaceholder = document.getElementById('uploadPlaceholder');
|
||||
const newFiles = Array.from(event.target.files || []);
|
||||
|
||||
if (!newFiles.length) return;
|
||||
|
||||
newFiles.forEach(file => {
|
||||
if (!file.type.startsWith('image/')) return;
|
||||
|
||||
// avoid exact duplicates (same name + size)
|
||||
if (selectedFiles.some(f => f.name === file.name && f.size === file.size)) {
|
||||
return;
|
||||
}
|
||||
selectedFiles.push(file);
|
||||
|
||||
const reader = new FileReader();
|
||||
reader.onload = function(e) {
|
||||
const wrapper = document.createElement('div');
|
||||
wrapper.className = 'preview-item';
|
||||
wrapper.style.position = 'relative';
|
||||
wrapper.style.width = '150px';
|
||||
wrapper.style.height = '150px';
|
||||
wrapper.style.marginRight = '8px';
|
||||
|
||||
const img = document.createElement('img');
|
||||
img.src = e.target.result;
|
||||
img.alt = file.name;
|
||||
img.style.width = '100%';
|
||||
img.style.height = '100%';
|
||||
img.style.objectFit = 'cover';
|
||||
img.className = 'img-fluid rounded';
|
||||
|
||||
const btn = document.createElement('button');
|
||||
btn.type = 'button';
|
||||
btn.className = 'remove-btn btn btn-sm btn-danger position-absolute top-0 end-0';
|
||||
btn.innerText = '×';
|
||||
btn.title = 'Remove';
|
||||
btn.style.cursor = 'pointer';
|
||||
|
||||
// Position button at top right
|
||||
btn.style.position = 'absolute';
|
||||
btn.style.top = '2px';
|
||||
btn.style.right = '2px';
|
||||
btn.style.zIndex = '10';
|
||||
|
||||
btn.addEventListener('click', () => {
|
||||
wrapper.remove();
|
||||
selectedFiles = selectedFiles.filter(f => !(f.name === file.name && f.size === file.size));
|
||||
updateInputFiles();
|
||||
});
|
||||
|
||||
wrapper.appendChild(img);
|
||||
wrapper.appendChild(btn);
|
||||
|
||||
// insert before the upload placeholder so the placeholder stays on the right
|
||||
container.insertBefore(wrapper, uploadPlaceholder);
|
||||
};
|
||||
reader.readAsDataURL(file);
|
||||
});
|
||||
|
||||
// update input.files to include all selected files
|
||||
updateInputFiles();
|
||||
}
|
||||
|
||||
// for debugging: expose selectedFiles in console
|
||||
window.getSelectedFiles = () => selectedFiles;
|
||||
|
||||
})();
|
||||
|
||||
|
||||
|
||||
+3
File diff suppressed because one or more lines are too long
Vendored
+6
File diff suppressed because one or more lines are too long
@@ -0,0 +1,19 @@
|
||||
(function() {
|
||||
'use strict'
|
||||
|
||||
document.querySelectorAll(".prism-toggle").forEach((element)=>{
|
||||
element.addEventListener("click",()=>{
|
||||
let carElement = element.parentNode.parentNode
|
||||
if(!carElement.children[1].classList.contains("d-none")){
|
||||
element.firstElementChild.childNodes[1].className = "ri-code-s-slash-line ms-2 align-middle d-inline-block"
|
||||
carElement.children[1].classList.add("d-none")
|
||||
carElement.children[2].classList.remove("d-none")
|
||||
}else{
|
||||
element.firstElementChild.childNodes[1].className = "ri-code-line ms-2 align-middle d-inline-block"
|
||||
carElement.children[1].classList.remove("d-none")
|
||||
carElement.children[2].classList.add("d-none")
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
})();
|
||||
@@ -0,0 +1,590 @@
|
||||
(function () {
|
||||
"use strict";
|
||||
|
||||
/* Sales Revenue */
|
||||
var options = {
|
||||
chart: {
|
||||
height: 367,
|
||||
toolbar: {
|
||||
show: false,
|
||||
},
|
||||
zoom: {
|
||||
enabled: false,
|
||||
},
|
||||
dropShadow: {
|
||||
enabled: true,
|
||||
enabledOnSeries: undefined,
|
||||
top: 7,
|
||||
left: 0,
|
||||
blur: 1,
|
||||
color: ["var(--primary-color)", "var(--primary02)", "rgb(255, 90, 41)"],
|
||||
opacity: 0.05,
|
||||
},
|
||||
},
|
||||
grid: {
|
||||
show: true,
|
||||
borderColor: "rgba(119, 119, 142, 0.1)",
|
||||
strokeDashArray: 4,
|
||||
},
|
||||
dataLabels: {
|
||||
enabled: false,
|
||||
},
|
||||
stroke: {
|
||||
width: [1.5, 1.5],
|
||||
curve: "straight",
|
||||
},
|
||||
legend: {
|
||||
show: true,
|
||||
position: "top",
|
||||
horizontalAlign: "center",
|
||||
fontWeight: 600,
|
||||
fontSize: "11px",
|
||||
labels: {
|
||||
colors: "#74767c",
|
||||
},
|
||||
markers: {
|
||||
size: 4,
|
||||
strokeWidth: 0,
|
||||
strokeColor: '#fff',
|
||||
fillColors: undefined,
|
||||
radius: 5,
|
||||
customHTML: undefined,
|
||||
onClick: undefined,
|
||||
offsetX: 0,
|
||||
offsetY: 0
|
||||
},
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: "فروش",
|
||||
data: [5,15, 21,20,15,40,55,55, 55,30,45,100,85, 85,85,130,100,56, 131,140,195,140,140,140, 85,115,106,100,100,110, 129,140,137,135,140,145, 153,157,160,220,110,100,95, 90,90,105,92,105,120,122, 150,130,117, 108,120,127,150,],
|
||||
type: "area",
|
||||
},
|
||||
{
|
||||
name:"بازاریابی",
|
||||
data: [40,45, 47,49,52,50,80,86, 85,70,89,130,100, 110,110,180,130,106, 140,110,110,90,80,110, 135,145,120,110,110,120, 139,150,117,110,110,100, 123,137,110,110,130,140,135, 140,190,125,102,105,100,92, 108,120,127,150,130,117],
|
||||
type: "line",
|
||||
},
|
||||
],
|
||||
fill: {
|
||||
type: ['gradient', 'solid'],
|
||||
gradient: {
|
||||
shadeIntensity: 1,
|
||||
opacityFrom: 0.4,
|
||||
opacityTo: 0.1,
|
||||
stops: [0, 90, 100],
|
||||
colorStops: [
|
||||
[
|
||||
{
|
||||
offset: 0,
|
||||
color: "var(--primary01)",
|
||||
opacity: 0.1
|
||||
},
|
||||
{
|
||||
offset: 75,
|
||||
color: "var(--primary01)",
|
||||
opacity: 1
|
||||
},
|
||||
{
|
||||
offset: 100,
|
||||
color: 'var(--primary02)',
|
||||
opacity: 1
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
offset: 0,
|
||||
color: 'rgb(255, 90, 41)',
|
||||
opacity: 1
|
||||
},
|
||||
{
|
||||
offset: 75,
|
||||
color: 'rgb(255, 90, 41)',
|
||||
opacity: 1
|
||||
},
|
||||
{
|
||||
offset: 100,
|
||||
color: 'rgb(255, 90, 41)',
|
||||
opacity: 1
|
||||
}
|
||||
],
|
||||
]
|
||||
}
|
||||
},
|
||||
colors: ["var(--primary-color)", "rgb(184 ,122 ,243)"],
|
||||
yaxis: {
|
||||
min:0,
|
||||
title: {
|
||||
style: {
|
||||
color: "#adb5be",
|
||||
fontSize: "14px",
|
||||
fontFamily: "IRANSans",
|
||||
fontWeight: 600,
|
||||
cssClass: "apexcharts-yaxis-label",
|
||||
},
|
||||
},
|
||||
},
|
||||
xaxis: {
|
||||
type: "day",
|
||||
categories: [
|
||||
"فروردین",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"اردیبهشت",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"خرداد",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"تیر",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"مرداد",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"شهریور",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"مهر",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"آبان",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"آذر",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"دی",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"بهمن",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"اسفند",
|
||||
],
|
||||
axisBorder: {
|
||||
show: true,
|
||||
color: "rgba(119, 119, 142, 0.05)",
|
||||
offsetX: 0,
|
||||
offsetY: 0,
|
||||
},
|
||||
axisTicks: {
|
||||
show: true,
|
||||
borderType: "solid",
|
||||
color: "rgba(119, 119, 142, 0.05)",
|
||||
width: 6,
|
||||
offsetX: 0,
|
||||
offsetY: 0,
|
||||
},
|
||||
labels: {
|
||||
rotate: -90,
|
||||
style: {
|
||||
colors: "#8c9097",
|
||||
fontSize: "11px",
|
||||
fontWeight: 600,
|
||||
cssClass: "apexcharts-xaxis-label",
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
var chart = new ApexCharts(document.querySelector("#sales-revenue"), options);
|
||||
chart.render();
|
||||
/* Sales Revenue */
|
||||
|
||||
/* Sales Summary */
|
||||
var options = {
|
||||
series: [14, 18, 17, 15, 12, 10],
|
||||
chart: {
|
||||
type: 'polarArea',
|
||||
height: 251,
|
||||
|
||||
},
|
||||
stroke: {
|
||||
colors: ['#fff'],
|
||||
},
|
||||
fill: {
|
||||
opacity: 1
|
||||
},
|
||||
legend: {
|
||||
show: false,
|
||||
position: 'bottom',
|
||||
itemMargin: {
|
||||
horizontal: 5,
|
||||
vertical: 5
|
||||
},
|
||||
fontFamily: "IRANSans",
|
||||
},
|
||||
labels: ['تحویل شد', 'لغو', 'در حال تعلیق', 'بازگردانده شد', 'ارسال شد', 'ناموفق'],
|
||||
colors: ["var(--primary-color)", "rgba(175 ,109, 237,0.7)", "rgba(40 ,215 ,133,0.7)", "rgba(241 ,113 ,177,0.7)", "rgba(221 ,58, 82,0.7)", "rgba(253 ,126 ,20,0.7)"],
|
||||
responsive: [{
|
||||
breakpoint: 480,
|
||||
options: {
|
||||
chart: {
|
||||
width: 200,
|
||||
|
||||
},
|
||||
legend: {
|
||||
position: 'bottom'
|
||||
}
|
||||
}
|
||||
}]
|
||||
};
|
||||
var chart = new ApexCharts(document.querySelector("#sales-summary"), options);
|
||||
chart.render();
|
||||
/*Sales Summary */
|
||||
|
||||
/* Visitors Device */
|
||||
var options = {
|
||||
series: [
|
||||
{
|
||||
name: "هفته جاری",
|
||||
data: [25, 50, 30, 55, ]
|
||||
},
|
||||
|
||||
],
|
||||
chart: {
|
||||
height: 300,
|
||||
type: 'bar',
|
||||
offsetY: -10
|
||||
},
|
||||
plotOptions: {
|
||||
|
||||
bar: {
|
||||
startAngle: -135,
|
||||
endAngle: 135,
|
||||
columnWidth: "40%",
|
||||
|
||||
dataLabels: {
|
||||
name: {
|
||||
fontSize: '16px',
|
||||
color: undefined,
|
||||
offsetY: 120
|
||||
},
|
||||
value: {
|
||||
offsetY: 76,
|
||||
fontSize: '22px',
|
||||
color: undefined,
|
||||
formatter: function (val) {
|
||||
return val + "%";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
stroke: {
|
||||
dashArray: 4
|
||||
},
|
||||
labels: ['موبایل','دسکتاپ','لپ تاپ','تبلت'],
|
||||
colors: ["var(--primary-color)", "rgba(175 ,109, 237,0.7)", "rgba(40 ,215 ,133,0.7)", "rgba(241 ,113 ,177,0.7)", ],
|
||||
};
|
||||
var chart = new ApexCharts(document.querySelector("#visitors-device"), options);
|
||||
chart.render();
|
||||
/* Visitors Device */
|
||||
|
||||
/* line-graph charts */
|
||||
var options2 = {
|
||||
series: [{
|
||||
data: [25, 39, 15, 89, 47, 70, 44]
|
||||
}],
|
||||
chart: {
|
||||
type: 'line',
|
||||
width: 100,
|
||||
height: 35,
|
||||
sparkline: {
|
||||
enabled: true
|
||||
}
|
||||
},
|
||||
stroke: {
|
||||
width: [1.5],
|
||||
show: true,
|
||||
curve: 'smooth',
|
||||
lineCap: 'butt',
|
||||
},
|
||||
colors:["rgb(88 ,155, 255)"],
|
||||
tooltip: {
|
||||
fixed: {
|
||||
enabled: false
|
||||
},
|
||||
x: {
|
||||
show: false
|
||||
},
|
||||
y: {
|
||||
title: {
|
||||
formatter: function (seriesName) {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
marker: {
|
||||
show: false
|
||||
}
|
||||
}
|
||||
};
|
||||
var chart2 = new ApexCharts(document.querySelector("#line-graph1"), options2);
|
||||
chart2.render();
|
||||
|
||||
var options2 = {
|
||||
series: [{
|
||||
data: [5, 20, 15, 29, 17, 40, 4]
|
||||
}],
|
||||
chart: {
|
||||
type: 'line',
|
||||
width: 100,
|
||||
height: 35,
|
||||
sparkline: {
|
||||
enabled: true
|
||||
}
|
||||
},
|
||||
stroke: {
|
||||
width: [1.5],
|
||||
show: true,
|
||||
curve: 'smooth',
|
||||
lineCap: 'butt',
|
||||
},
|
||||
colors:["rgb(175 ,109, 237)"],
|
||||
tooltip: {
|
||||
fixed: {
|
||||
enabled: false
|
||||
},
|
||||
x: {
|
||||
show: false
|
||||
},
|
||||
y: {
|
||||
title: {
|
||||
formatter: function (seriesName) {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
marker: {
|
||||
show: false
|
||||
}
|
||||
}
|
||||
};
|
||||
var chart2 = new ApexCharts(document.querySelector("#line-graph2"), options2);
|
||||
chart2.render();
|
||||
|
||||
var options2 = {
|
||||
series: [{
|
||||
data: [55,9, 55, 29, 87, 70, 64]
|
||||
}],
|
||||
chart: {
|
||||
type: 'line',
|
||||
width: 100,
|
||||
height: 35,
|
||||
sparkline: {
|
||||
enabled: true
|
||||
}
|
||||
},
|
||||
stroke: {
|
||||
width: [1.5],
|
||||
show: true,
|
||||
curve: 'smooth',
|
||||
lineCap: 'butt',
|
||||
},
|
||||
colors:["rgb(40 ,215 ,133)"],
|
||||
tooltip: {
|
||||
fixed: {
|
||||
enabled: false
|
||||
},
|
||||
x: {
|
||||
show: false
|
||||
},
|
||||
y: {
|
||||
title: {
|
||||
formatter: function (seriesName) {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
marker: {
|
||||
show: false
|
||||
}
|
||||
}
|
||||
};
|
||||
var chart2 = new ApexCharts(document.querySelector("#line-graph3"), options2);
|
||||
chart2.render();
|
||||
|
||||
var options2 = {
|
||||
series: [{
|
||||
data: [2, 39, 5, 49, 37, 70, 24]
|
||||
}],
|
||||
chart: {
|
||||
type: 'line',
|
||||
width: 100,
|
||||
height: 35,
|
||||
sparkline: {
|
||||
enabled: true
|
||||
}
|
||||
},
|
||||
stroke: {
|
||||
width: [1.5],
|
||||
show: true,
|
||||
curve: 'smooth',
|
||||
lineCap: 'butt',
|
||||
},
|
||||
colors:["rgb(241 ,113 ,177)"],
|
||||
tooltip: {
|
||||
fixed: {
|
||||
enabled: false
|
||||
},
|
||||
x: {
|
||||
show: false
|
||||
},
|
||||
y: {
|
||||
title: {
|
||||
formatter: function (seriesName) {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
marker: {
|
||||
show: false
|
||||
}
|
||||
}
|
||||
};
|
||||
var chart2 = new ApexCharts(document.querySelector("#line-graph4"), options2);
|
||||
chart2.render();
|
||||
|
||||
var options2 = {
|
||||
series: [{
|
||||
data: [25, 89, 15, 89, 47, 70, 44]
|
||||
}],
|
||||
chart: {
|
||||
type: 'line',
|
||||
width: 100,
|
||||
height: 35,
|
||||
sparkline: {
|
||||
enabled: true
|
||||
}
|
||||
},
|
||||
stroke: {
|
||||
width: [1.5],
|
||||
show: true,
|
||||
curve: 'smooth',
|
||||
lineCap: 'butt',
|
||||
},
|
||||
colors:["rgb(253 ,126 ,20)"],
|
||||
tooltip: {
|
||||
fixed: {
|
||||
enabled: false
|
||||
},
|
||||
x: {
|
||||
show: false
|
||||
},
|
||||
y: {
|
||||
title: {
|
||||
formatter: function (seriesName) {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
marker: {
|
||||
show: false
|
||||
}
|
||||
}
|
||||
};
|
||||
var chart2 = new ApexCharts(document.querySelector("#line-graph5"), options2);
|
||||
chart2.render();
|
||||
/* line-graph charts */
|
||||
|
||||
/* Orders Summary */
|
||||
var options = {
|
||||
series: [1754, 834,549,234 ],
|
||||
labels: ["مرد", "زن", "سایر","نامشخص"],
|
||||
chart: {
|
||||
height: 310,
|
||||
type: 'donut',
|
||||
},
|
||||
dataLabels: {
|
||||
enabled: false,
|
||||
},
|
||||
|
||||
legend: {
|
||||
show: false,
|
||||
},
|
||||
stroke: {
|
||||
show: true,
|
||||
curve: 'smooth',
|
||||
lineCap: 'round',
|
||||
colors: "#fff",
|
||||
width: 2,
|
||||
dashArray: 0,
|
||||
},
|
||||
plotOptions: {
|
||||
pie: {
|
||||
startAngle: -90,
|
||||
endAngle: 90,
|
||||
offsetY: 10,
|
||||
expandOnClick: false,
|
||||
donut: {
|
||||
size: '75%',
|
||||
background: 'transparent',
|
||||
labels: {
|
||||
show: true,
|
||||
name: {
|
||||
show: true,
|
||||
fontSize: '20px',
|
||||
color: '#495057',
|
||||
fontFamily: "IRANSans",
|
||||
offsetY: -35
|
||||
},
|
||||
value: {
|
||||
show: true,
|
||||
fontSize: '22px',
|
||||
color: undefined,
|
||||
offsetY: -25,
|
||||
fontWeight: 600,
|
||||
fontFamily: "IRANSans",
|
||||
formatter: function (val) {
|
||||
return val + "%"
|
||||
}
|
||||
},
|
||||
total: {
|
||||
show: true,
|
||||
showAlways: true,
|
||||
label: 'کل بازدیدکنندگان',
|
||||
fontSize: '14px',
|
||||
fontWeight: 400,
|
||||
color: '#495057',
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
padding: {
|
||||
bottom: -100
|
||||
}
|
||||
},
|
||||
colors: ["var(--primary-color)", "rgb(175 ,109, 237)", "rgb(40 ,215 ,133)", "rgb(241 ,113 ,177)"],
|
||||
};
|
||||
var chart = new ApexCharts(document.querySelector("#orders-summary"), options);
|
||||
chart.render();
|
||||
/* Orders Summary */
|
||||
|
||||
|
||||
})();
|
||||
@@ -0,0 +1,17 @@
|
||||
|
||||
"use strict"
|
||||
|
||||
// for show password
|
||||
let createpassword = (type, ele) => {
|
||||
document.getElementById(type).type = document.getElementById(type).type == "password" ? "text" : "password"
|
||||
let icon = ele.childNodes[0].classList
|
||||
let stringIcon = icon.toString()
|
||||
if (stringIcon.includes("ri-eye-line")) {
|
||||
ele.childNodes[0].classList.remove("ri-eye-line")
|
||||
ele.childNodes[0].classList.add("ri-eye-off-line")
|
||||
}
|
||||
else {
|
||||
ele.childNodes[0].classList.add("ri-eye-line")
|
||||
ele.childNodes[0].classList.remove("ri-eye-off-line")
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
(function () {
|
||||
"use strict";
|
||||
|
||||
var myElement = document.getElementById('sidebar-scroll');
|
||||
new SimpleBar(myElement, { autoHide: true });
|
||||
|
||||
})();
|
||||
+10
File diff suppressed because one or more lines are too long
@@ -0,0 +1,21 @@
|
||||
|
||||
"use strict";
|
||||
(() => {
|
||||
window.addEventListener('scroll', stickyFn);
|
||||
var navbar = document.getElementById("sidebar");
|
||||
var navbar1 = document.getElementById("header");
|
||||
var sticky = navbar.offsetTop;
|
||||
var sticky1 = navbar1.offsetTop;
|
||||
function stickyFn() {
|
||||
if (window.scrollY >= 75) {
|
||||
navbar.classList.add("sticky-pin")
|
||||
navbar1.classList.add("sticky-pin")
|
||||
} else {
|
||||
navbar.classList.remove("sticky-pin");
|
||||
navbar1.classList.remove("sticky-pin");
|
||||
}
|
||||
}
|
||||
window.addEventListener('scroll', stickyFn);
|
||||
window.addEventListener('DOMContentLoaded', stickyFn);
|
||||
})();
|
||||
|
||||
Vendored
+2
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user