Skip to content

Commit

Permalink
chore: prettify js files
Browse files Browse the repository at this point in the history
  • Loading branch information
zuramai committed Aug 9, 2022
1 parent c285dd6 commit 485fe8b
Show file tree
Hide file tree
Showing 22 changed files with 1,178 additions and 1,142 deletions.
7 changes: 3 additions & 4 deletions src/assets/js/app.js
@@ -1,10 +1,9 @@

// Feather icons are used on some pages
// Replace() replaces [data-feather] elements with icons
import featherIcons from "feather-icons"
featherIcons.replace();
featherIcons.replace()

// Mazer internal JS. Include this in your project to get
// the sidebar running.
require("./components/dark");
require("./mazer");
require("./components/dark")
require("./mazer")
1 change: 1 addition & 0 deletions src/assets/js/components/dark.js
@@ -1,3 +1,4 @@

const THEME_KEY = "theme"
const THEME_REGEX = /\btheme-[a-z0-9]+\b/g
const toggler = document.getElementById("toggle-dark")
Expand Down
8 changes: 3 additions & 5 deletions src/assets/js/mazer.js
Expand Up @@ -2,10 +2,8 @@
// Here, we load it in our app.js

// We could import PerfectScrollbar directly in the sidebar module
window.PerfectScrollbar = require('perfect-scrollbar/dist/perfect-scrollbar.min.js');
window.PerfectScrollbar = require("perfect-scrollbar/dist/perfect-scrollbar.min.js")

let Sidebar = require('./components/sidebar');
let Sidebar = require("./components/sidebar")

export {
Sidebar
}
export { Sidebar }
9 changes: 3 additions & 6 deletions src/assets/js/pages/ckeditor.js
@@ -1,6 +1,3 @@

ClassicEditor
.create(document.querySelector('#editor'))
.catch(error => {
console.error(error);
});
ClassicEditor.create(document.querySelector("#editor")).catch((error) => {
console.error(error)
})
250 changes: 146 additions & 104 deletions src/assets/js/pages/dashboard.js
@@ -1,116 +1,158 @@
var optionsProfileVisit = {
annotations: {
position: 'back'
},
dataLabels: {
enabled:false
},
chart: {
type: 'bar',
height: 300
},
fill: {
opacity:1
},
plotOptions: {
},
series: [{
name: 'sales',
data: [9,20,30,20,10,20,30,20,10,20,30,20]
}],
colors: '#435ebe',
xaxis: {
categories: ["Jan","Feb","Mar","Apr","May","Jun","Jul", "Aug","Sep","Oct","Nov","Dec"],
},
annotations: {
position: "back",
},
dataLabels: {
enabled: false,
},
chart: {
type: "bar",
height: 300,
},
fill: {
opacity: 1,
},
plotOptions: {},
series: [
{
name: "sales",
data: [9, 20, 30, 20, 10, 20, 30, 20, 10, 20, 30, 20],
},
],
colors: "#435ebe",
xaxis: {
categories: [
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
"Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec",
],
},
}
let optionsVisitorsProfile = {
series: [70, 30],
labels: ['Male', 'Female'],
colors: ['#435ebe','#55c6e8'],
chart: {
type: 'donut',
width: '100%',
height:'350px'
},
legend: {
position: 'bottom'
},
plotOptions: {
pie: {
donut: {
size: '30%'
}
}
}
let optionsVisitorsProfile = {
series: [70, 30],
labels: ["Male", "Female"],
colors: ["#435ebe", "#55c6e8"],
chart: {
type: "donut",
width: "100%",
height: "350px",
},
legend: {
position: "bottom",
},
plotOptions: {
pie: {
donut: {
size: "30%",
},
},
},
}

var optionsEurope = {
series: [{
name: 'series1',
data: [310, 800, 600, 430, 540, 340, 605, 805,430, 540, 340, 605]
}],
chart: {
height: 80,
type: 'area',
toolbar: {
show:false,
},
},
colors: ['#5350e9'],
stroke: {
width: 2,
},
grid: {
show:false,
},
dataLabels: {
enabled: false
},
xaxis: {
type: 'datetime',
categories: ["2018-09-19T00:00:00.000Z", "2018-09-19T01:30:00.000Z", "2018-09-19T02:30:00.000Z", "2018-09-19T03:30:00.000Z", "2018-09-19T04:30:00.000Z", "2018-09-19T05:30:00.000Z", "2018-09-19T06:30:00.000Z","2018-09-19T07:30:00.000Z","2018-09-19T08:30:00.000Z","2018-09-19T09:30:00.000Z","2018-09-19T10:30:00.000Z","2018-09-19T11:30:00.000Z"],
axisBorder: {
show:false
},
axisTicks: {
show:false
},
labels: {
show:false,
}
},
show:false,
yaxis: {
labels: {
show:false,
},
},
tooltip: {
x: {
format: 'dd/MM/yy HH:mm'
},
},
};
series: [
{
name: "series1",
data: [310, 800, 600, 430, 540, 340, 605, 805, 430, 540, 340, 605],
},
],
chart: {
height: 80,
type: "area",
toolbar: {
show: false,
},
},
colors: ["#5350e9"],
stroke: {
width: 2,
},
grid: {
show: false,
},
dataLabels: {
enabled: false,
},
xaxis: {
type: "datetime",
categories: [
"2018-09-19T00:00:00.000Z",
"2018-09-19T01:30:00.000Z",
"2018-09-19T02:30:00.000Z",
"2018-09-19T03:30:00.000Z",
"2018-09-19T04:30:00.000Z",
"2018-09-19T05:30:00.000Z",
"2018-09-19T06:30:00.000Z",
"2018-09-19T07:30:00.000Z",
"2018-09-19T08:30:00.000Z",
"2018-09-19T09:30:00.000Z",
"2018-09-19T10:30:00.000Z",
"2018-09-19T11:30:00.000Z",
],
axisBorder: {
show: false,
},
axisTicks: {
show: false,
},
labels: {
show: false,
},
},
show: false,
yaxis: {
labels: {
show: false,
},
},
tooltip: {
x: {
format: "dd/MM/yy HH:mm",
},
},
}

let optionsAmerica = {
...optionsEurope,
colors: ['#008b75'],
...optionsEurope,
colors: ["#008b75"],
}
let optionsIndonesia = {
...optionsEurope,
colors: ['#dc3545'],
...optionsEurope,
colors: ["#dc3545"],
}

var chartProfileVisit = new ApexCharts(
document.querySelector("#chart-profile-visit"),
optionsProfileVisit
)
var chartVisitorsProfile = new ApexCharts(
document.getElementById("chart-visitors-profile"),
optionsVisitorsProfile
)
var chartEurope = new ApexCharts(
document.querySelector("#chart-europe"),
optionsEurope
)
var chartAmerica = new ApexCharts(
document.querySelector("#chart-america"),
optionsAmerica
)
var chartIndonesia = new ApexCharts(
document.querySelector("#chart-indonesia"),
optionsIndonesia
)


var chartProfileVisit = new ApexCharts(document.querySelector("#chart-profile-visit"), optionsProfileVisit);
var chartVisitorsProfile = new ApexCharts(document.getElementById('chart-visitors-profile'), optionsVisitorsProfile)
var chartEurope = new ApexCharts(document.querySelector("#chart-europe"), optionsEurope);
var chartAmerica = new ApexCharts(document.querySelector("#chart-america"), optionsAmerica);
var chartIndonesia = new ApexCharts(document.querySelector("#chart-indonesia"), optionsIndonesia);

chartIndonesia.render();
chartAmerica.render();
chartEurope.render();
chartProfileVisit.render();
chartVisitorsProfile.render()
chartIndonesia.render()
chartAmerica.render()
chartEurope.render()
chartProfileVisit.render()
chartVisitorsProfile.render()
2 changes: 1 addition & 1 deletion src/assets/js/pages/datatables.js
@@ -1 +1 @@
let jquery_datatable = $("#table1").DataTable();
let jquery_datatable = $("#table1").DataTable()

0 comments on commit 485fe8b

Please sign in to comment.