Compare commits
49 Commits
e505ec255d
...
ebca039df5
| Author | SHA1 | Date |
|---|---|---|
|
|
ebca039df5 | |
|
|
bb5c90544b | |
|
|
f8bf3ca576 | |
|
|
6b437b071d | |
|
|
ddba1c1088 | |
|
|
775c663594 | |
|
|
e656a2a4d5 | |
|
|
d133696fb7 | |
|
|
8f6a344620 | |
|
|
9653256b11 | |
|
|
a88adf70ce | |
|
|
a8cc5b1009 | |
|
|
4bef2d1322 | |
|
|
d367f85e45 | |
|
|
a8016cfb9b | |
|
|
cdefacc532 | |
|
|
83a1ab1268 | |
|
|
9a9a378c3e | |
|
|
2dbb355d1e | |
|
|
3fbab7583f | |
|
|
f9961c1b03 | |
|
|
35a332ee72 | |
|
|
3c485c17da | |
|
|
e4b51f05a2 | |
|
|
12ee5b2846 | |
|
|
b737251f06 | |
|
|
2de033dde1 | |
|
|
e988d0900c | |
|
|
38e41edad0 | |
|
|
787964a22c | |
|
|
845b881a16 | |
|
|
972b3e73ac | |
|
|
cc9213dce2 | |
|
|
33b13a5be8 | |
|
|
a068e18324 | |
|
|
a877aa6bb8 | |
|
|
73e5aa16c2 | |
|
|
2efc9420bd | |
|
|
baddd3bc32 | |
|
|
b173dc024a | |
|
|
9a9da92137 | |
|
|
915a36a545 | |
|
|
88b7c45123 | |
|
|
c9cb1cc606 | |
|
|
1102c9ce49 | |
|
|
370ad2ca1b | |
|
|
e9aba64ffe | |
|
|
98010dd240 | |
|
|
b065b794da |
|
|
@ -18,8 +18,12 @@
|
|||
'version': '0.1',
|
||||
|
||||
# any module necessary for this one to work correctly
|
||||
|
||||
'depends': ['base','hr','account','mail','hr_skills', 'hr_contract'],
|
||||
|
||||
|
||||
|
||||
|
||||
# always loaded
|
||||
'data': [
|
||||
'security/security.xml',
|
||||
|
|
|
|||
|
|
@ -256,6 +256,8 @@ class HRJobRecruitment(models.Model):
|
|||
rec.submission_status = 'zero'
|
||||
|
||||
|
||||
experience = fields.Many2one('candidate.experience', string="Experience")
|
||||
|
||||
@api.depends('application_ids.submitted_to_client')
|
||||
def _compute_no_of_submissions(self):
|
||||
counts = dict(self.env['hr.applicant']._read_group(
|
||||
|
|
|
|||
|
|
@ -121,6 +121,12 @@ Dashboard Ninja v16.0,
|
|||
'/ks_dashboard_ninja/static/lib/js/gridstack-h5.js',
|
||||
'ks_dashboard_ninja/static/src/js/ks_dashboard_ninja_new.js',
|
||||
'ks_dashboard_ninja/static/src/js/ks_global_functions.js',
|
||||
'ks_dashboard_ninja/static/lib/js/am4_core.js',
|
||||
'ks_dashboard_ninja/static/lib/js/am4_charts.js',
|
||||
'ks_dashboard_ninja/static/lib/js/am4_animated.js',
|
||||
'ks_dashboard_ninja/static/lib/js/am4_dark.js',
|
||||
'ks_dashboard_ninja/static/lib/js/am4_material.js',
|
||||
'ks_dashboard_ninja/static/lib/js/am4_moonrise.js',
|
||||
'ks_dashboard_ninja/static/lib/js/index.js',
|
||||
'/ks_dashboard_ninja/static/lib/js/pdfmake.min.js',
|
||||
'ks_dashboard_ninja/static/lib/js/percent.js',
|
||||
|
|
|
|||
|
|
@ -208,7 +208,11 @@ class KsDashboardNinjaBoard(models.Model):
|
|||
return record
|
||||
|
||||
def unlink(self):
|
||||
if self.env.ref('ks_dashboard_ninja.ks_my_default_dashboard_board').id in self.ids:
|
||||
default_dashboard = self.env.ref(
|
||||
'ks_dashboard_ninja.ks_my_default_dashboard_board', raise_if_not_found=False
|
||||
)
|
||||
|
||||
if default_dashboard and default_dashboard.id in self.ids:
|
||||
raise ValidationError(_("Default Dashboard can't be deleted."))
|
||||
else:
|
||||
for rec in self:
|
||||
|
|
@ -216,6 +220,7 @@ class KsDashboardNinjaBoard(models.Model):
|
|||
rec.ks_child_dashboard_ids.unlink()
|
||||
rec.ks_dashboard_menu_id.sudo().unlink()
|
||||
rec.ks_dashboard_items_ids.unlink()
|
||||
|
||||
res = super(KsDashboardNinjaBoard, self).unlink()
|
||||
return res
|
||||
|
||||
|
|
@ -510,6 +515,7 @@ class KsDashboardNinjaBoard(models.Model):
|
|||
'ks_target_view': rec.ks_target_view,
|
||||
'ks_date_filter_selection': rec.ks_date_filter_selection,
|
||||
'ks_show_data_value': rec.ks_show_data_value,
|
||||
'ks_three_d': rec.ks_three_d,
|
||||
'ks_show_records': rec.ks_show_records,
|
||||
'ks_unit': rec.ks_unit,
|
||||
'ks_unit_selection': rec.ks_unit_selection,
|
||||
|
|
@ -846,6 +852,7 @@ class KsDashboardNinjaBoard(models.Model):
|
|||
'ks_year_period_2': rec.ks_year_period_2,
|
||||
'ks_domain_2': rec.ks_domain_2,
|
||||
'ks_show_data_value': rec.ks_show_data_value,
|
||||
'ks_three_d': rec.ks_three_d,
|
||||
'ks_list_target_deviation_field': rec.ks_list_target_deviation_field.name,
|
||||
'ks_unit': rec.ks_unit,
|
||||
'ks_show_records': rec.ks_show_records,
|
||||
|
|
|
|||
|
|
@ -691,6 +691,10 @@ class KsDashboardNinjaItems(models.Model):
|
|||
|
||||
|
||||
|
||||
ks_three_d = fields.Boolean(string='3D View', default=False)
|
||||
|
||||
|
||||
|
||||
@api.model
|
||||
def create_ai_dash(self, data, ks_dash_id, model):
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -0,0 +1,21 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright (c) 2018 amCharts (Antanas Marcelionis, Martynas Majeris)
|
||||
*
|
||||
* This sofware is provided under multiple licenses. Please see below for
|
||||
* links to appropriate usage.
|
||||
*
|
||||
* Free amCharts linkware license. Details and conditions:
|
||||
* https://github.com/amcharts/amcharts4/blob/master/LICENSE
|
||||
*
|
||||
* One of the amCharts commercial licenses. Details and pricing:
|
||||
* https://www.amcharts.com/online-store/
|
||||
* https://www.amcharts.com/online-store/licenses-explained/
|
||||
*
|
||||
* If in doubt, contact amCharts at contact@amcharts.com
|
||||
*
|
||||
* PLEASE DO NOT REMOVE THIS COPYRIGHT NOTICE.
|
||||
* @hidden
|
||||
*/
|
||||
am4internal_webpackJsonp(["ab45"],{lhmh:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i("aCit"),a=function(t){Object(n.b)(t,"SpriteState")&&(t.transitionDuration=400),Object(n.b)(t,"Component")&&(t.rangeChangeDuration=500,t.interpolationDuration=500,t.sequencedInterpolation=!1,Object(n.b)(t,"SankeyDiagram")&&(t.sequencedInterpolation=!0),Object(n.b)(t,"FunnelSeries")&&(t.sequencedInterpolation=!0)),Object(n.b)(t,"Chart")&&(t.defaultState.transitionDuration=2e3,t.hiddenState.transitionDuration=1e3),Object(n.b)(t,"Tooltip")&&(t.animationDuration=400,t.defaultState.transitionDuration=400,t.hiddenState.transitionDuration=400),Object(n.b)(t,"Scrollbar")&&(t.animationDuration=500),Object(n.b)(t,"Series")&&(t.defaultState.transitionDuration=1e3,t.hiddenState.transitionDuration=700,t.hiddenState.properties.opacity=1,t.showOnInit=!0),Object(n.b)(t,"MapSeries")&&(t.hiddenState.properties.opacity=0),Object(n.b)(t,"PercentSeries")&&(t.hiddenState.properties.opacity=0),Object(n.b)(t,"FunnelSlice")&&(t.defaultState.transitionDuration=800,t.hiddenState.transitionDuration=1e3,t.hiddenState.properties.opacity=1),Object(n.b)(t,"Slice")&&(t.defaultState.transitionDuration=700,t.hiddenState.transitionDuration=1e3,t.hiddenState.properties.opacity=1),Object(n.b)(t,"Preloader")&&(t.hiddenState.transitionDuration=2e3),Object(n.b)(t,"Column")&&(t.defaultState.transitionDuration=700,t.hiddenState.transitionDuration=1e3,t.hiddenState.properties.opacity=1),Object(n.b)(t,"Column3D")&&(t.hiddenState.properties.opacity=0)};window.am4themes_animated=a}},["lhmh"]);
|
||||
//# sourceMappingURL=animated.js.map
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,21 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright (c) 2018 amCharts (Antanas Marcelionis, Martynas Majeris)
|
||||
*
|
||||
* This sofware is provided under multiple licenses. Please see below for
|
||||
* links to appropriate usage.
|
||||
*
|
||||
* Free amCharts linkware license. Details and conditions:
|
||||
* https://github.com/amcharts/amcharts4/blob/master/LICENSE
|
||||
*
|
||||
* One of the amCharts commercial licenses. Details and pricing:
|
||||
* https://www.amcharts.com/online-store/
|
||||
* https://www.amcharts.com/online-store/licenses-explained/
|
||||
*
|
||||
* If in doubt, contact amCharts at contact@amcharts.com
|
||||
*
|
||||
* PLEASE DO NOT REMOVE THIS COPYRIGHT NOTICE.
|
||||
* @hidden
|
||||
*/
|
||||
am4internal_webpackJsonp(["356d"],{"J7F+":function(t,e,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var b=c("aCit"),r=c("8ZqG"),o=function(t){Object(b.b)(t,"InterfaceColorSet")&&(t.setFor("stroke",Object(r.c)("#000000")),t.setFor("fill",Object(r.c)("#2b2b2b")),t.setFor("primaryButton",Object(r.c)("#6794dc").lighten(-.2)),t.setFor("primaryButtonHover",Object(r.c)("#6771dc").lighten(-.2)),t.setFor("primaryButtonDown",Object(r.c)("#68dc75").lighten(-.2)),t.setFor("primaryButtonActive",Object(r.c)("#68dc75").lighten(-.2)),t.setFor("primaryButtonText",Object(r.c)("#FFFFFF")),t.setFor("primaryButtonStroke",Object(r.c)("#6794dc")),t.setFor("secondaryButton",Object(r.c)("#3b3b3b")),t.setFor("secondaryButtonHover",Object(r.c)("#3b3b3b").lighten(.1)),t.setFor("secondaryButtonDown",Object(r.c)("#3b3b3b").lighten(.15)),t.setFor("secondaryButtonActive",Object(r.c)("#3b3b3b").lighten(.15)),t.setFor("secondaryButtonText",Object(r.c)("#bbbbbb")),t.setFor("secondaryButtonStroke",Object(r.c)("#3b3b3b").lighten(-.2)),t.setFor("grid",Object(r.c)("#bbbbbb")),t.setFor("background",Object(r.c)("#000000")),t.setFor("alternativeBackground",Object(r.c)("#ffffff")),t.setFor("text",Object(r.c)("#ffffff")),t.setFor("alternativeText",Object(r.c)("#000000")),t.setFor("disabledBackground",Object(r.c)("#bbbbbb"))),Object(b.b)(t,"Scrollbar")&&(t.background.fillOpacity=.4,t.thumb.background.fillOpacity=.5)};window.am4themes_dark=o}},["J7F+"]);
|
||||
//# sourceMappingURL=dark.js.map
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright (c) 2018 amCharts (Antanas Marcelionis, Martynas Majeris)
|
||||
*
|
||||
* This sofware is provided under multiple licenses. Please see below for
|
||||
* links to appropriate usage.
|
||||
*
|
||||
* Free amCharts linkware license. Details and conditions:
|
||||
* https://github.com/amcharts/amcharts4/blob/master/LICENSE
|
||||
*
|
||||
* One of the amCharts commercial licenses. Details and pricing:
|
||||
* https://www.amcharts.com/online-store/
|
||||
* https://www.amcharts.com/online-store/licenses-explained/
|
||||
*
|
||||
* If in doubt, contact amCharts at contact@amcharts.com
|
||||
*
|
||||
* PLEASE DO NOT REMOVE THIS COPYRIGHT NOTICE.
|
||||
* @hidden
|
||||
*/
|
||||
am4internal_webpackJsonp(["8593"],{d66p:function(c,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var b=e("aCit"),o=e("8ZqG"),n=function(c){Object(b.b)(c,"ColorSet")&&(c.list=[Object(o.c)("#F44336"),Object(o.c)("#E91E63"),Object(o.c)("#9C27B0"),Object(o.c)("#673AB7"),Object(o.c)("#3F51B5"),Object(o.c)("#2196F3"),Object(o.c)("#03A9F4"),Object(o.c)("#00BCD4"),Object(o.c)("#009688"),Object(o.c)("#4CAF50"),Object(o.c)("#8BC34A"),Object(o.c)("#CDDC39"),Object(o.c)("#FFEB3B"),Object(o.c)("#FFC107"),Object(o.c)("#FF9800"),Object(o.c)("#FF5722"),Object(o.c)("#795548"),Object(o.c)("#9E9E9E"),Object(o.c)("#607D8B")],c.minLightness=.2,c.maxLightness=.7,c.reuse=!0),Object(b.b)(c,"ResizeButton")&&(c.background.cornerRadiusTopLeft=20,c.background.cornerRadiusTopRight=20,c.background.cornerRadiusBottomLeft=20,c.background.cornerRadiusBottomRight=20),Object(b.b)(c,"Tooltip")&&(c.animationDuration=800)};window.am4themes_material=n}},["d66p"]);
|
||||
//# sourceMappingURL=material.js.map
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright (c) 2018 amCharts (Antanas Marcelionis, Martynas Majeris)
|
||||
*
|
||||
* This sofware is provided under multiple licenses. Please see below for
|
||||
* links to appropriate usage.
|
||||
*
|
||||
* Free amCharts linkware license. Details and conditions:
|
||||
* https://github.com/amcharts/amcharts4/blob/master/LICENSE
|
||||
*
|
||||
* One of the amCharts commercial licenses. Details and pricing:
|
||||
* https://www.amcharts.com/online-store/
|
||||
* https://www.amcharts.com/online-store/licenses-explained/
|
||||
*
|
||||
* If in doubt, contact amCharts at contact@amcharts.com
|
||||
*
|
||||
* PLEASE DO NOT REMOVE THIS COPYRIGHT NOTICE.
|
||||
* @hidden
|
||||
*/
|
||||
am4internal_webpackJsonp(["364f"],{ORxu:function(e,c,t){"use strict";Object.defineProperty(c,"__esModule",{value:!0});var b=t("aCit"),n=t("8ZqG"),O=function(e){Object(b.b)(e,"ColorSet")&&(e.list=[Object(n.c)("#3a1302"),Object(n.c)("#601205"),Object(n.c)("#8a2b0d"),Object(n.c)("#c75e24"),Object(n.c)("#c79f59"),Object(n.c)("#a4956a"),Object(n.c)("#868569"),Object(n.c)("#756f61"),Object(n.c)("#586160"),Object(n.c)("#617983")],e.minLightness=.2,e.maxLightness=.7,e.reuse=!0)};window.am4themes_moonrisekingdom=O}},["ORxu"]);
|
||||
//# sourceMappingURL=moonrisekingdom.js.map
|
||||
|
|
@ -363,6 +363,300 @@ export class Ksdashboardgraph extends Component{
|
|||
this.ks_breadcrumb = item.ks_action_name
|
||||
}
|
||||
|
||||
|
||||
// Helper function to configure number formatter based on format type
|
||||
configureNumberFormatter(formatter, formatType) {
|
||||
if (formatType === 'global') {
|
||||
formatter.numberFormat = "#.0a";
|
||||
formatter.bigNumberPrefixes = [
|
||||
{"number":1e+3,"suffix":"k"},
|
||||
{"number":1e+6,"suffix":"M"},
|
||||
{"number":1e+9,"suffix":"G"},
|
||||
{"number":1e+12,"suffix":"T"},
|
||||
{"number":1e+15,"suffix":"P"},
|
||||
{"number":1e+18,"suffix":"E"}
|
||||
];
|
||||
} else if (formatType === 'indian') {
|
||||
formatter.numberFormat = "#.0a";
|
||||
formatter.bigNumberPrefixes = [
|
||||
{"number":1e+3,"suffix":"Th"},
|
||||
{"number":1e+5,"suffix":"Lakh"},
|
||||
{"number":1e+7,"suffix":"Cr"},
|
||||
{"number":1e+9,"suffix":"Arab"}
|
||||
];
|
||||
} else if (formatType === 'colombian') {
|
||||
formatter.numberFormat = "#.a";
|
||||
formatter.bigNumberPrefixes = [
|
||||
{"number":1e+6,"suffix":"M"},
|
||||
{"number":1e+9,"suffix":"M"},
|
||||
{"number":1e+12,"suffix":"M"},
|
||||
{"number":1e+15,"suffix":"M"},
|
||||
{"number":1e+18,"suffix":"M"}
|
||||
];
|
||||
} else {
|
||||
formatter.numberFormat = "#";
|
||||
}
|
||||
}
|
||||
|
||||
// 3D Bar Chart Implementation
|
||||
create3DBarChart(chart, data, ks_data, item) {
|
||||
// Create axes
|
||||
debugger;
|
||||
var categoryAxis = chart.xAxes.push(new am4charts.CategoryAxis());
|
||||
categoryAxis.dataFields.category = "category";
|
||||
categoryAxis.renderer.labels.template.rotation = -45;
|
||||
categoryAxis.renderer.labels.template.hideOversized = false;
|
||||
categoryAxis.renderer.minGridDistance = 20;
|
||||
categoryAxis.renderer.labels.template.horizontalCenter = "right";
|
||||
categoryAxis.renderer.labels.template.verticalCenter = "middle";
|
||||
|
||||
var valueAxis = chart.yAxes.push(new am4charts.ValueAxis());
|
||||
valueAxis.title.text = "Value";
|
||||
valueAxis.title.fontWeight = "bold";
|
||||
|
||||
// Auto-adjust max value
|
||||
let maxValue = 0;
|
||||
data.forEach(entry => {
|
||||
ks_data.forEach(ks => {
|
||||
if (ks.type !== "line") {
|
||||
const val = parseFloat(entry[ks.label]);
|
||||
if (!isNaN(val) && val > maxValue) maxValue = val;
|
||||
}
|
||||
});
|
||||
});
|
||||
valueAxis.max = Math.ceil(maxValue * 1.2); // or hardcode valueAxis.max = 15;
|
||||
|
||||
|
||||
// Apply number formatting
|
||||
const rec = item;
|
||||
const numberFormatter = new am4core.NumberFormatter();
|
||||
this.configureNumberFormatter(numberFormatter, rec.ks_data_format);
|
||||
valueAxis.numberFormatter = numberFormatter;
|
||||
|
||||
// Create series
|
||||
for (let k = 0; k < ks_data.length; k++) {
|
||||
if (ks_data[k].type != "line") {
|
||||
var series = chart.series.push(new am4charts.ColumnSeries3D());
|
||||
series.dataFields.valueY = ks_data[k].label;
|
||||
series.dataFields.categoryX = "category";
|
||||
series.name = ks_data[k].label;
|
||||
series.tooltipText = "{categoryX}: [bold]{name}: {valueY.formatNumber('" + numberFormatter.numberFormat + "')}[/]";
|
||||
series.columns.template.fillOpacity = 0.8;
|
||||
|
||||
var columnTemplate = series.columns.template;
|
||||
columnTemplate.strokeWidth = 2;
|
||||
columnTemplate.strokeOpacity = 1;
|
||||
columnTemplate.stroke = am4core.color("#FFFFFF");
|
||||
|
||||
columnTemplate.adapter.add("fill", function(fill, target) {
|
||||
return chart.colors.getIndex(k);
|
||||
});
|
||||
|
||||
columnTemplate.adapter.add("stroke", function(stroke, target) {
|
||||
return chart.colors.getIndex(k);
|
||||
});
|
||||
|
||||
if (item.ks_bar_chart_stacked) {
|
||||
series.stacked = true;
|
||||
}
|
||||
|
||||
if (item.ks_show_data_value == true && series) {
|
||||
var labelBullet = series.bullets.push(new am4charts.LabelBullet());
|
||||
labelBullet.label.text = "{valueY.formatNumber('" + numberFormatter.numberFormat + "')}";
|
||||
labelBullet.label.horizontalCenter = "middle";
|
||||
labelBullet.label.verticalCenter = "bottom";
|
||||
labelBullet.label.dy = -10;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Add cursor
|
||||
chart.cursor = new am4charts.XYCursor();
|
||||
chart.cursor.lineX.strokeOpacity = 0;
|
||||
chart.cursor.lineY.strokeOpacity = 0;
|
||||
|
||||
if (item.ks_hide_legend == true && series) {
|
||||
chart.legend = new am4charts.Legend();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 3D Horizontal Bar Chart Implementation
|
||||
create3DHorizontalBarChart(chart, data, ks_data, item) {
|
||||
// Create axes (inverted for horizontal)
|
||||
var categoryAxis = chart.yAxes.push(new am4charts.CategoryAxis());
|
||||
categoryAxis.dataFields.category = "category";
|
||||
categoryAxis.renderer.inversed = true;
|
||||
categoryAxis.renderer.minGridDistance = 30;
|
||||
|
||||
var valueAxis = chart.xAxes.push(new am4charts.ValueAxis());
|
||||
valueAxis.title.text = "Value";
|
||||
valueAxis.title.fontWeight = "bold";
|
||||
|
||||
// Apply number formatting
|
||||
const rec = item;
|
||||
const numberFormatter = new am4core.NumberFormatter();
|
||||
this.configureNumberFormatter(numberFormatter, rec.ks_data_format);
|
||||
valueAxis.numberFormatter = numberFormatter;
|
||||
|
||||
// Create series
|
||||
for (let k = 0; k < ks_data.length; k++) {
|
||||
if (ks_data[k].type != "line") {
|
||||
var series = chart.series.push(new am4charts.ColumnSeries3D());
|
||||
series.dataFields.valueX = ks_data[k].label;
|
||||
series.dataFields.categoryY = "category";
|
||||
series.name = ks_data[k].label;
|
||||
series.tooltipText = "{categoryY}: [bold]{name}: {valueX.formatNumber('" + numberFormatter.numberFormat + "')}[/]";
|
||||
series.columns.template.fillOpacity = 0.8;
|
||||
|
||||
var columnTemplate = series.columns.template;
|
||||
columnTemplate.strokeWidth = 2;
|
||||
columnTemplate.strokeOpacity = 1;
|
||||
columnTemplate.stroke = am4core.color("#FFFFFF");
|
||||
|
||||
columnTemplate.adapter.add("fill", function(fill, target) {
|
||||
return chart.colors.getIndex(k);
|
||||
});
|
||||
|
||||
if (item.ks_bar_chart_stacked) {
|
||||
series.stacked = true;
|
||||
}
|
||||
|
||||
if (item.ks_show_data_value == true && series) {
|
||||
var labelBullet = series.bullets.push(new am4charts.LabelBullet());
|
||||
labelBullet.label.text = "{valueX.formatNumber('" + numberFormatter.numberFormat + "')}";
|
||||
labelBullet.label.horizontalCenter = "left";
|
||||
labelBullet.label.verticalCenter = "middle";
|
||||
labelBullet.label.dx = 10;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Add cursor
|
||||
chart.cursor = new am4charts.XYCursor();
|
||||
chart.cursor.lineX.strokeOpacity = 0;
|
||||
chart.cursor.lineY.strokeOpacity = 0;
|
||||
|
||||
if (item.ks_hide_legend == true && series) {
|
||||
chart.legend = new am4charts.Legend();
|
||||
}
|
||||
}
|
||||
|
||||
// 3D Pie Chart Implementation
|
||||
create3DPieChart(chart, data, ks_data, item, root, graph_render) {
|
||||
// Dispose previous chart if exists
|
||||
if (root) {
|
||||
root.dispose();
|
||||
}
|
||||
|
||||
// Create root and chart
|
||||
root = am4core.create(graph_render, am4charts.PieChart3D);
|
||||
chart = root;
|
||||
chart.data = data;
|
||||
|
||||
// Configure chart based on item type
|
||||
const isDonut = item.ks_dashboard_item_type === "ks_doughnut_chart";
|
||||
const isSemiCircle = item.ks_semi_circle_chart;
|
||||
|
||||
if (isDonut) {
|
||||
chart.innerRadius = am4core.percent(50);
|
||||
}
|
||||
|
||||
if (isSemiCircle) {
|
||||
chart.startAngle = 180;
|
||||
chart.endAngle = 360;
|
||||
}
|
||||
|
||||
// Create series for each dataset
|
||||
let series = [];
|
||||
for (let k = 0; k < ks_data.length; k++) {
|
||||
let pieSeries = chart.series.push(new am4charts.PieSeries3D());
|
||||
pieSeries.dataFields.value = ks_data[k].label;
|
||||
pieSeries.dataFields.category = "category";
|
||||
pieSeries.name = ks_data[k].label;
|
||||
|
||||
// Slice appearance
|
||||
pieSeries.slices.template.stroke = am4core.color("#fff");
|
||||
pieSeries.slices.template.strokeWidth = 2;
|
||||
pieSeries.slices.template.strokeOpacity = 1;
|
||||
|
||||
// Configure tooltips
|
||||
if (item.ks_show_records) {
|
||||
pieSeries.slices.template.tooltip = new am4core.Tooltip();
|
||||
pieSeries.slices.template.tooltipText = "[bold]{category}[/]\n{name}: {value}";
|
||||
if (pieSeries.slices.template.tooltip) {
|
||||
pieSeries.slices.template.tooltip.pointerOrientation = "vertical";
|
||||
pieSeries.slices.template.tooltip.dy = -20;
|
||||
}
|
||||
}
|
||||
|
||||
// Configure labels
|
||||
if (item.ks_show_data_value) {
|
||||
const formatString = this.getFormatString(item.ks_data_format);
|
||||
pieSeries.labels.template.text = item.ks_data_label_type === 'value' ?
|
||||
"{value.formatNumber('" + formatString + "')}" :
|
||||
"{value.percent.formatNumber('#.0')}%";
|
||||
|
||||
pieSeries.labels.template.radius = am4core.percent(-25);
|
||||
pieSeries.labels.template.fill = am4core.color("#0a0a0a");
|
||||
pieSeries.labels.template.fontSize = "bold";
|
||||
|
||||
// Adjust label position based on data length
|
||||
if (data.length > 10) {
|
||||
pieSeries.labels.template.disabled = true;
|
||||
}
|
||||
} else {
|
||||
pieSeries.labels.template.disabled = true;
|
||||
}
|
||||
// Disable ticks
|
||||
pieSeries.ticks.template.disabled = true;
|
||||
|
||||
// Add click event
|
||||
pieSeries.slices.template.events.on("hit", function(ev) {
|
||||
if (item.ks_data_calculation_type === 'custom') {
|
||||
self.onChartCanvasClick_funnel(ev, `${item.id}`, item);
|
||||
}
|
||||
});
|
||||
|
||||
series.push(pieSeries);
|
||||
}
|
||||
|
||||
// Configure legend
|
||||
if (item.ks_hide_legend == true) {
|
||||
chart.legend = new am4charts.Legend();
|
||||
chart.legend.position = "bottom";
|
||||
chart.legend.contentAlign = "center";
|
||||
|
||||
// Make legend scrollable if many items
|
||||
if (data.length > 8) {
|
||||
chart.legend.scrollable = true;
|
||||
chart.legend.maxHeight = 150;
|
||||
}
|
||||
}
|
||||
|
||||
// Animation
|
||||
chart.series.each(function(series) {
|
||||
series.hiddenState.properties.opacity = 1;
|
||||
series.hiddenState.properties.endAngle = -90;
|
||||
series.hiddenState.properties.startAngle = -90;
|
||||
});
|
||||
|
||||
chart.appear(1000, 100);
|
||||
|
||||
return { root, chart };
|
||||
}
|
||||
|
||||
// Helper function to get format string
|
||||
getFormatString(formatType) {
|
||||
switch(formatType) {
|
||||
case 'global': return '#.0a';
|
||||
case 'indian': return '#.0a';
|
||||
case 'colombian': return '#.a';
|
||||
default: return '#';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ks_render_graphs(ks_gridstack_container,item, zooming_enabled = false){
|
||||
var self =this;
|
||||
var chartCardBodies = ks_gridstack_container?.querySelectorAll('.ks_chart_card_body');
|
||||
|
|
@ -436,12 +730,56 @@ export class Ksdashboardgraph extends Component{
|
|||
data2["category"] = ks_labels[i]
|
||||
data.push(data2)
|
||||
}
|
||||
const theme = item.ks_chart_item_color
|
||||
|
||||
const use3D = item.ks_three_d &&
|
||||
['ks_bar_chart','ks_horizontalBar_chart','ks_pie_chart','ks_doughnut_chart'].includes(item.ks_dashboard_item_type);
|
||||
|
||||
if (use3D) {
|
||||
debugger;
|
||||
switch (theme) {
|
||||
case "dark":
|
||||
am4core.unuseAllThemes();
|
||||
am4core.useTheme(am4themes_animated); // helps restore labels & animations
|
||||
break;
|
||||
case "material":
|
||||
am4core.unuseAllThemes();
|
||||
am4core.useTheme(am4themes_material);
|
||||
break;
|
||||
case "moonrise":
|
||||
am4core.unuseAllThemes();
|
||||
am4core.useTheme(am4themes_moonrisekingdom);
|
||||
break;
|
||||
default:
|
||||
am4core.unuseAllThemes();
|
||||
am4core.useTheme(am4themes_animated);
|
||||
}
|
||||
|
||||
// Create new chart
|
||||
var root = am4core.create(graph_render[0], am4charts.XYChart3D);
|
||||
var chart = root;
|
||||
|
||||
chart.data = data;
|
||||
|
||||
switch(item.ks_dashboard_item_type) {
|
||||
case "ks_bar_chart":
|
||||
this.create3DBarChart(chart, data, ks_data, item);
|
||||
break;
|
||||
case "ks_horizontalBar_chart":
|
||||
this.create3DHorizontalBarChart(chart, data, ks_data, item);
|
||||
break;
|
||||
case "ks_pie_chart":
|
||||
case "ks_doughnut_chart":
|
||||
this.create3DPieChart(chart, data, ks_data, item, root, graph_render[0]);
|
||||
break;
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
if(graph_render){
|
||||
var root = am5.Root.new(graph_render[0]);
|
||||
}
|
||||
|
||||
const theme = item.ks_chart_item_color
|
||||
|
||||
switch(theme){
|
||||
case "default":
|
||||
|
|
@ -1382,6 +1720,7 @@ export class Ksdashboardgraph extends Component{
|
|||
series.appear();
|
||||
}
|
||||
ks_gridstack_container.querySelector('.ks_li_' + item.ks_chart_item_color)?.classList.add('ks_date_filter_selected');
|
||||
}
|
||||
}else{
|
||||
var ksChartCardBody = ks_gridstack_container?.querySelector('.ks_chart_card_body');
|
||||
if(ksChartCardBody) {
|
||||
|
|
|
|||
|
|
@ -41,10 +41,10 @@ export class KSDashboardNinjaOverview extends Component{
|
|||
});
|
||||
});
|
||||
|
||||
onMounted(()=>{
|
||||
if(!document.body.classList.contains('ks_body_class'))
|
||||
dnNavBarAddClasses();
|
||||
});
|
||||
// onMounted(()=>{
|
||||
// if(!document.body.classList.contains('ks_body_class'))
|
||||
// dnNavBarAddClasses();
|
||||
// });
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,48 +11,48 @@ import { MessagingMenu } from "@mail/core/public_web/messaging_menu";
|
|||
|
||||
|
||||
|
||||
const dnMenuIcons = {
|
||||
'My Dashboards': {
|
||||
'templateIcon': `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M10.54 13.4533C10.3667 13.4533 10.1867 13.4466 9.99338 13.4266C9.64671 13.4 9.25338 13.3333 8.84671 13.2333L7.72671 12.9666C4.65338 12.24 3.64671 10.6133 4.36671 7.54664L5.02005 4.7533C5.16671 4.11997 5.34005 3.60664 5.55338 3.17997C6.70005 0.813303 8.89338 1.02664 10.4534 1.3933L11.5667 1.6533C13.1267 2.01997 14.1134 2.59997 14.6667 3.48664C15.2134 4.3733 15.3 5.5133 14.9334 7.0733L14.28 9.85997C13.7067 12.3 12.5134 13.4533 10.54 13.4533ZM8.74671 2.16664C7.63338 2.16664 6.92671 2.62664 6.45338 3.6133C6.28005 3.9733 6.12671 4.41997 5.99338 4.97997L5.34005 7.7733C4.74671 10.2933 5.43338 11.3933 7.95338 11.9933L9.07338 12.26C9.43338 12.3466 9.77338 12.4 10.08 12.4266C11.8934 12.6066 12.7934 11.8133 13.3 9.6333L13.9534 6.84664C14.2534 5.55997 14.2134 4.65997 13.8134 4.0133C13.4134 3.36664 12.6267 2.92664 11.3334 2.62664L10.22 2.36664C9.66671 2.2333 9.17338 2.16664 8.74671 2.16664Z" fill=""></path>
|
||||
<path d="M5.55341 14.8334C3.84008 14.8334 2.74674 13.8067 2.04674 11.64L1.19341 9.0067C0.246742 6.07337 1.09341 4.42003 4.01341 3.47337L5.06674 3.13337C5.41341 3.0267 5.67341 2.95337 5.90674 2.91337C6.10007 2.87337 6.28674 2.9467 6.40008 3.10003C6.51341 3.25337 6.53341 3.45337 6.45341 3.6267C6.28008 3.98003 6.12674 4.4267 6.00008 4.9867L5.34674 7.78003C4.75341 10.3 5.44007 11.4 7.96007 12L9.08008 12.2667C9.44007 12.3534 9.78008 12.4067 10.0867 12.4334C10.3001 12.4534 10.4734 12.6 10.5334 12.8067C10.5867 13.0134 10.5067 13.2267 10.3334 13.3467C9.89341 13.6467 9.34008 13.9 8.64008 14.1267L7.58674 14.4734C6.82008 14.7134 6.15341 14.8334 5.55341 14.8334ZM5.18674 4.1467L4.32674 4.4267C1.94674 5.19337 1.38008 6.31337 2.14674 8.70003L3.00008 11.3334C3.77341 13.7134 4.89341 14.2867 7.27341 13.52L8.32674 13.1734C8.36674 13.16 8.40007 13.1467 8.44007 13.1334L7.73341 12.9667C4.66008 12.24 3.65341 10.6134 4.37341 7.5467L5.02674 4.75337C5.07341 4.54003 5.12674 4.33337 5.18674 4.1467Z" fill=""></path>
|
||||
<path d="M11.6599 7.00664C11.6199 7.00664 11.5799 6.99997 11.5332 6.99331L8.29992 6.17331C8.03325 6.10664 7.87325 5.83331 7.93992 5.56664C8.00658 5.29997 8.27992 5.13997 8.54658 5.20664L11.7799 6.02664C12.0466 6.09331 12.2066 6.36664 12.1399 6.63331C12.0866 6.85331 11.8799 7.00664 11.6599 7.00664Z" fill=""></path>
|
||||
<path d="M9.70643 9.25993C9.66643 9.25993 9.62643 9.25326 9.57976 9.2466L7.63976 8.75326C7.37309 8.6866 7.21309 8.41326 7.27976 8.1466C7.34643 7.87993 7.61976 7.71993 7.88643 7.7866L9.82643 8.27993C10.0931 8.3466 10.2531 8.61993 10.1864 8.8866C10.1331 9.11326 9.93309 9.25993 9.70643 9.25993Z" fill=""></path>
|
||||
</svg>`
|
||||
},
|
||||
'Quick Access': {
|
||||
'Overview': `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12.2133 8.50006H10C8.34 8.50006 7.5 7.56006 7.5 5.70006V3.78672C7.5 3.10672 7.58 2.13339 8.28667 1.60006C8.88 1.16006 9.73333 1.12672 10.9933 1.49339C12.6467 1.97339 14.0267 3.35339 14.5067 5.00672C14.8733 6.26006 14.84 7.12006 14.4 7.70672C13.8667 8.42006 12.8933 8.50006 12.2133 8.50006ZM9.52 2.24006C9.24667 2.24006 9.03333 2.29339 8.89333 2.40006C8.63333 2.59339 8.50667 3.04672 8.50667 3.78672V5.70672C8.50667 7.20006 9.08 7.50672 10.0067 7.50672H12.22C12.9533 7.50672 13.4067 7.38006 13.6067 7.12006C13.84 6.81339 13.82 6.20006 13.56 5.30006C13.1733 3.98672 12.04 2.84672 10.7267 2.46672C10.2333 2.31339 9.83333 2.24006 9.52 2.24006Z" fill=""></path>
|
||||
<path d="M7.37992 15.1667C7.02659 15.1667 6.66659 15.1401 6.30659 15.0801C3.57992 14.6401 1.35992 12.4267 0.919922 9.70005C0.353255 6.19338 2.61325 2.88672 6.07326 2.18005C6.34659 2.12672 6.60659 2.30005 6.66659 2.56672C6.71992 2.84005 6.54659 3.10005 6.27992 3.16005C3.35326 3.76005 1.43326 6.56005 1.91992 9.54005C2.29326 11.8467 4.16659 13.7201 6.47326 14.0934C9.46659 14.5734 12.2599 12.6467 12.8533 9.70672C12.9066 9.43338 13.1733 9.26005 13.4399 9.31338C13.7133 9.36672 13.8866 9.63338 13.8333 9.90005C13.1999 13.0134 10.4799 15.1667 7.37992 15.1667Z" fill=""></path>
|
||||
</svg>`,
|
||||
'Inbox': `<svg width="16" height="16" viewBox="0 0 16 16" fill="" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M11.3335 14.1667H4.66683C4.3935 14.1667 4.16683 13.94 4.16683 13.6667C4.16683 13.3934 4.3935 13.1667 4.66683 13.1667H11.3335C13.2402 13.1667 14.1668 12.24 14.1668 10.3334V5.66671C14.1668 3.76004 13.2402 2.83337 11.3335 2.83337H4.66683C2.76016 2.83337 1.8335 3.76004 1.8335 5.66671C1.8335 5.94004 1.60683 6.16671 1.3335 6.16671C1.06016 6.16671 0.833496 5.94004 0.833496 5.66671C0.833496 3.23337 2.2335 1.83337 4.66683 1.83337H11.3335C13.7668 1.83337 15.1668 3.23337 15.1668 5.66671V10.3334C15.1668 12.7667 13.7668 14.1667 11.3335 14.1667Z" fill=""></path>
|
||||
<path d="M7.99969 8.57998C7.43969 8.57998 6.87302 8.40665 6.43969 8.05331L4.35302 6.38665C4.13969 6.21331 4.09969 5.89998 4.27302 5.68665C4.44636 5.47331 4.75968 5.43332 4.97302 5.60665L7.05969 7.27332C7.56635 7.67998 8.42635 7.67998 8.93302 7.27332L11.0197 5.60665C11.233 5.43332 11.553 5.46665 11.7197 5.68665C11.893 5.89998 11.8597 6.21998 11.6397 6.38665L9.55301 8.05331C9.12635 8.40665 8.55969 8.57998 7.99969 8.57998Z" fill=""></path>
|
||||
<path d="M5.3335 11.5H1.3335C1.06016 11.5 0.833496 11.2733 0.833496 11C0.833496 10.7267 1.06016 10.5 1.3335 10.5H5.3335C5.60683 10.5 5.8335 10.7267 5.8335 11C5.8335 11.2733 5.60683 11.5 5.3335 11.5Z" fill=" "></path>
|
||||
<path d="M3.3335 8.83337H1.3335C1.06016 8.83337 0.833496 8.60671 0.833496 8.33337C0.833496 8.06004 1.06016 7.83337 1.3335 7.83337H3.3335C3.60683 7.83337 3.8335 8.06004 3.8335 8.33337C3.8335 8.60671 3.60683 8.83337 3.3335 8.83337Z" fill=""></path>
|
||||
</svg>`,
|
||||
},
|
||||
'Configuration': {
|
||||
'Dashboards': `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M13.18 9.16671H10.4867C9.14667 9.16671 8.5 8.54671 8.5 7.26671V2.73337C8.5 1.45337 9.15333 0.833374 10.4867 0.833374H13.18C14.52 0.833374 15.1667 1.45337 15.1667 2.73337V7.26671C15.1667 8.54671 14.5133 9.16671 13.18 9.16671ZM10.4867 1.83337C9.64 1.83337 9.5 2.06004 9.5 2.73337V7.26671C9.5 7.94004 9.64 8.16671 10.4867 8.16671H13.18C14.0267 8.16671 14.1667 7.94004 14.1667 7.26671V2.73337C14.1667 2.06004 14.0267 1.83337 13.18 1.83337H10.4867Z" fill=""></path>
|
||||
<path d="M13.18 15.1666H10.4867C9.14667 15.1666 8.5 14.5466 8.5 13.2666V12.0666C8.5 10.7866 9.15333 10.1666 10.4867 10.1666H13.18C14.52 10.1666 15.1667 10.7866 15.1667 12.0666V13.2666C15.1667 14.5466 14.5133 15.1666 13.18 15.1666ZM10.4867 11.1666C9.64 11.1666 9.5 11.3933 9.5 12.0666V13.2666C9.5 13.94 9.64 14.1666 10.4867 14.1666H13.18C14.0267 14.1666 14.1667 13.94 14.1667 13.2666V12.0666C14.1667 11.3933 14.0267 11.1666 13.18 11.1666H10.4867Z" fill=""></path>
|
||||
<path d="M5.5135 15.1667H2.82016C1.48016 15.1667 0.833496 14.5467 0.833496 13.2667V8.73337C0.833496 7.45337 1.48683 6.83337 2.82016 6.83337H5.5135C6.8535 6.83337 7.50016 7.45337 7.50016 8.73337V13.2667C7.50016 14.5467 6.84683 15.1667 5.5135 15.1667ZM2.82016 7.83337C1.9735 7.83337 1.8335 8.06004 1.8335 8.73337V13.2667C1.8335 13.94 1.9735 14.1667 2.82016 14.1667H5.5135C6.36016 14.1667 6.50016 13.94 6.50016 13.2667V8.73337C6.50016 8.06004 6.36016 7.83337 5.5135 7.83337H2.82016Z" fill=""></path>
|
||||
<path d="M5.5135 5.83337H2.82016C1.48016 5.83337 0.833496 5.21337 0.833496 3.93337V2.73337C0.833496 1.45337 1.48683 0.833374 2.82016 0.833374H5.5135C6.8535 0.833374 7.50016 1.45337 7.50016 2.73337V3.93337C7.50016 5.21337 6.84683 5.83337 5.5135 5.83337ZM2.82016 1.83337C1.9735 1.83337 1.8335 2.06004 1.8335 2.73337V3.93337C1.8335 4.60671 1.9735 4.83337 2.82016 4.83337H5.5135C6.36016 4.83337 6.50016 4.60671 6.50016 3.93337V2.73337C6.50016 2.06004 6.36016 1.83337 5.5135 1.83337H2.82016Z" fill=""></path>
|
||||
</svg>`,
|
||||
'Dashboard Layouts': `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M7.85993 7.91996C7.49993 7.91996 7.13327 7.85329 6.8466 7.72663L2.91327 5.97996C1.91327 5.53329 1.7666 4.93329 1.7666 4.60663C1.7666 4.27996 1.91327 3.67996 2.91327 3.23329L6.8466 1.48663C7.4266 1.22663 8.29994 1.22663 8.87994 1.48663L12.8199 3.23329C13.8133 3.67329 13.9666 4.27996 13.9666 4.60663C13.9666 4.93329 13.8199 5.53329 12.8199 5.97996L8.87994 7.72663C8.5866 7.85996 8.2266 7.91996 7.85993 7.91996ZM7.85993 2.29329C7.63327 2.29329 7.41327 2.32663 7.25327 2.39996L3.31993 4.14663C2.91327 4.33329 2.7666 4.51996 2.7666 4.60663C2.7666 4.69329 2.91327 4.88663 3.31327 5.06663L7.2466 6.81329C7.5666 6.95329 8.1466 6.95329 8.4666 6.81329L12.4066 5.06663C12.8133 4.88663 12.9599 4.69329 12.9599 4.60663C12.9599 4.51996 12.8133 4.32663 12.4066 4.14663L8.47327 2.39996C8.31327 2.33329 8.0866 2.29329 7.85993 2.29329Z" fill="#"></path>
|
||||
<path d="M8 11.3934C7.74667 11.3934 7.49333 11.34 7.25333 11.2334L2.72667 9.22004C2.04 8.92004 1.5 8.08671 1.5 7.33337C1.5 7.06004 1.72667 6.83337 2 6.83337C2.27333 6.83337 2.5 7.06004 2.5 7.33337C2.5 7.70004 2.8 8.16004 3.13333 8.31337L7.66 10.3267C7.87333 10.42 8.12 10.42 8.34 10.3267L12.8667 8.31337C13.2 8.16671 13.5 7.70004 13.5 7.33337C13.5 7.06004 13.7267 6.83337 14 6.83337C14.2733 6.83337 14.5 7.06004 14.5 7.33337C14.5 8.08671 13.96 8.92004 13.2733 9.22671L8.74667 11.24C8.50667 11.34 8.25333 11.3934 8 11.3934Z" fill=""></path>
|
||||
<path d="M8 14.7267C7.74667 14.7267 7.49333 14.6734 7.25333 14.5667L2.72667 12.5534C1.98 12.22 1.5 11.48 1.5 10.66C1.5 10.3867 1.72667 10.16 2 10.16C2.27333 10.16 2.5 10.3934 2.5 10.6667C2.5 11.0867 2.74667 11.4734 3.13333 11.6467L7.66 13.66C7.87333 13.7534 8.12 13.7534 8.34 13.66L12.8667 11.6467C13.2533 11.4734 13.5 11.0934 13.5 10.6667C13.5 10.3934 13.7267 10.1667 14 10.1667C14.2733 10.1667 14.5 10.3934 14.5 10.6667C14.5 11.4867 14.02 12.2267 13.2733 12.56L8.74667 14.5734C8.50667 14.6734 8.25333 14.7267 8 14.7267Z" fill=""></path>
|
||||
</svg>`,
|
||||
'Import Dashboards': `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" class="import-svg">
|
||||
<path d="M6 7.33337V11.3334L7.33333 10" fill="#4B5563"/>
|
||||
<path d="M6 7.33337V11.3334L7.33333 10" stroke="#4B5563" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M6.00033 11.3333L4.66699 10" stroke="#4B5563" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M14.6663 6.66671V10C14.6663 13.3334 13.333 14.6667 9.99967 14.6667H5.99967C2.66634 14.6667 1.33301 13.3334 1.33301 10V6.00004C1.33301 2.66671 2.66634 1.33337 5.99967 1.33337H9.33301" stroke="#4B5563" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M14.6663 6.66671H11.9997C9.99967 6.66671 9.33301 6.00004 9.33301 4.00004V1.33337L14.6663 6.66671Z" stroke="#4B5563" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>`,
|
||||
}
|
||||
}
|
||||
//const dnMenuIcons = {
|
||||
// 'My Dashboards': {
|
||||
// 'templateIcon': `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
// <path d="M10.54 13.4533C10.3667 13.4533 10.1867 13.4466 9.99338 13.4266C9.64671 13.4 9.25338 13.3333 8.84671 13.2333L7.72671 12.9666C4.65338 12.24 3.64671 10.6133 4.36671 7.54664L5.02005 4.7533C5.16671 4.11997 5.34005 3.60664 5.55338 3.17997C6.70005 0.813303 8.89338 1.02664 10.4534 1.3933L11.5667 1.6533C13.1267 2.01997 14.1134 2.59997 14.6667 3.48664C15.2134 4.3733 15.3 5.5133 14.9334 7.0733L14.28 9.85997C13.7067 12.3 12.5134 13.4533 10.54 13.4533ZM8.74671 2.16664C7.63338 2.16664 6.92671 2.62664 6.45338 3.6133C6.28005 3.9733 6.12671 4.41997 5.99338 4.97997L5.34005 7.7733C4.74671 10.2933 5.43338 11.3933 7.95338 11.9933L9.07338 12.26C9.43338 12.3466 9.77338 12.4 10.08 12.4266C11.8934 12.6066 12.7934 11.8133 13.3 9.6333L13.9534 6.84664C14.2534 5.55997 14.2134 4.65997 13.8134 4.0133C13.4134 3.36664 12.6267 2.92664 11.3334 2.62664L10.22 2.36664C9.66671 2.2333 9.17338 2.16664 8.74671 2.16664Z" fill=""></path>
|
||||
// <path d="M5.55341 14.8334C3.84008 14.8334 2.74674 13.8067 2.04674 11.64L1.19341 9.0067C0.246742 6.07337 1.09341 4.42003 4.01341 3.47337L5.06674 3.13337C5.41341 3.0267 5.67341 2.95337 5.90674 2.91337C6.10007 2.87337 6.28674 2.9467 6.40008 3.10003C6.51341 3.25337 6.53341 3.45337 6.45341 3.6267C6.28008 3.98003 6.12674 4.4267 6.00008 4.9867L5.34674 7.78003C4.75341 10.3 5.44007 11.4 7.96007 12L9.08008 12.2667C9.44007 12.3534 9.78008 12.4067 10.0867 12.4334C10.3001 12.4534 10.4734 12.6 10.5334 12.8067C10.5867 13.0134 10.5067 13.2267 10.3334 13.3467C9.89341 13.6467 9.34008 13.9 8.64008 14.1267L7.58674 14.4734C6.82008 14.7134 6.15341 14.8334 5.55341 14.8334ZM5.18674 4.1467L4.32674 4.4267C1.94674 5.19337 1.38008 6.31337 2.14674 8.70003L3.00008 11.3334C3.77341 13.7134 4.89341 14.2867 7.27341 13.52L8.32674 13.1734C8.36674 13.16 8.40007 13.1467 8.44007 13.1334L7.73341 12.9667C4.66008 12.24 3.65341 10.6134 4.37341 7.5467L5.02674 4.75337C5.07341 4.54003 5.12674 4.33337 5.18674 4.1467Z" fill=""></path>
|
||||
// <path d="M11.6599 7.00664C11.6199 7.00664 11.5799 6.99997 11.5332 6.99331L8.29992 6.17331C8.03325 6.10664 7.87325 5.83331 7.93992 5.56664C8.00658 5.29997 8.27992 5.13997 8.54658 5.20664L11.7799 6.02664C12.0466 6.09331 12.2066 6.36664 12.1399 6.63331C12.0866 6.85331 11.8799 7.00664 11.6599 7.00664Z" fill=""></path>
|
||||
// <path d="M9.70643 9.25993C9.66643 9.25993 9.62643 9.25326 9.57976 9.2466L7.63976 8.75326C7.37309 8.6866 7.21309 8.41326 7.27976 8.1466C7.34643 7.87993 7.61976 7.71993 7.88643 7.7866L9.82643 8.27993C10.0931 8.3466 10.2531 8.61993 10.1864 8.8866C10.1331 9.11326 9.93309 9.25993 9.70643 9.25993Z" fill=""></path>
|
||||
// </svg>`
|
||||
// },
|
||||
// 'Quick Access': {
|
||||
// 'Overview': `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
// <path d="M12.2133 8.50006H10C8.34 8.50006 7.5 7.56006 7.5 5.70006V3.78672C7.5 3.10672 7.58 2.13339 8.28667 1.60006C8.88 1.16006 9.73333 1.12672 10.9933 1.49339C12.6467 1.97339 14.0267 3.35339 14.5067 5.00672C14.8733 6.26006 14.84 7.12006 14.4 7.70672C13.8667 8.42006 12.8933 8.50006 12.2133 8.50006ZM9.52 2.24006C9.24667 2.24006 9.03333 2.29339 8.89333 2.40006C8.63333 2.59339 8.50667 3.04672 8.50667 3.78672V5.70672C8.50667 7.20006 9.08 7.50672 10.0067 7.50672H12.22C12.9533 7.50672 13.4067 7.38006 13.6067 7.12006C13.84 6.81339 13.82 6.20006 13.56 5.30006C13.1733 3.98672 12.04 2.84672 10.7267 2.46672C10.2333 2.31339 9.83333 2.24006 9.52 2.24006Z" fill=""></path>
|
||||
// <path d="M7.37992 15.1667C7.02659 15.1667 6.66659 15.1401 6.30659 15.0801C3.57992 14.6401 1.35992 12.4267 0.919922 9.70005C0.353255 6.19338 2.61325 2.88672 6.07326 2.18005C6.34659 2.12672 6.60659 2.30005 6.66659 2.56672C6.71992 2.84005 6.54659 3.10005 6.27992 3.16005C3.35326 3.76005 1.43326 6.56005 1.91992 9.54005C2.29326 11.8467 4.16659 13.7201 6.47326 14.0934C9.46659 14.5734 12.2599 12.6467 12.8533 9.70672C12.9066 9.43338 13.1733 9.26005 13.4399 9.31338C13.7133 9.36672 13.8866 9.63338 13.8333 9.90005C13.1999 13.0134 10.4799 15.1667 7.37992 15.1667Z" fill=""></path>
|
||||
// </svg>`,
|
||||
// 'Inbox': `<svg width="16" height="16" viewBox="0 0 16 16" fill="" xmlns="http://www.w3.org/2000/svg">
|
||||
// <path d="M11.3335 14.1667H4.66683C4.3935 14.1667 4.16683 13.94 4.16683 13.6667C4.16683 13.3934 4.3935 13.1667 4.66683 13.1667H11.3335C13.2402 13.1667 14.1668 12.24 14.1668 10.3334V5.66671C14.1668 3.76004 13.2402 2.83337 11.3335 2.83337H4.66683C2.76016 2.83337 1.8335 3.76004 1.8335 5.66671C1.8335 5.94004 1.60683 6.16671 1.3335 6.16671C1.06016 6.16671 0.833496 5.94004 0.833496 5.66671C0.833496 3.23337 2.2335 1.83337 4.66683 1.83337H11.3335C13.7668 1.83337 15.1668 3.23337 15.1668 5.66671V10.3334C15.1668 12.7667 13.7668 14.1667 11.3335 14.1667Z" fill=""></path>
|
||||
// <path d="M7.99969 8.57998C7.43969 8.57998 6.87302 8.40665 6.43969 8.05331L4.35302 6.38665C4.13969 6.21331 4.09969 5.89998 4.27302 5.68665C4.44636 5.47331 4.75968 5.43332 4.97302 5.60665L7.05969 7.27332C7.56635 7.67998 8.42635 7.67998 8.93302 7.27332L11.0197 5.60665C11.233 5.43332 11.553 5.46665 11.7197 5.68665C11.893 5.89998 11.8597 6.21998 11.6397 6.38665L9.55301 8.05331C9.12635 8.40665 8.55969 8.57998 7.99969 8.57998Z" fill=""></path>
|
||||
// <path d="M5.3335 11.5H1.3335C1.06016 11.5 0.833496 11.2733 0.833496 11C0.833496 10.7267 1.06016 10.5 1.3335 10.5H5.3335C5.60683 10.5 5.8335 10.7267 5.8335 11C5.8335 11.2733 5.60683 11.5 5.3335 11.5Z" fill=" "></path>
|
||||
// <path d="M3.3335 8.83337H1.3335C1.06016 8.83337 0.833496 8.60671 0.833496 8.33337C0.833496 8.06004 1.06016 7.83337 1.3335 7.83337H3.3335C3.60683 7.83337 3.8335 8.06004 3.8335 8.33337C3.8335 8.60671 3.60683 8.83337 3.3335 8.83337Z" fill=""></path>
|
||||
// </svg>`,
|
||||
// },
|
||||
// 'Configuration': {
|
||||
// 'Dashboards': `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
// <path d="M13.18 9.16671H10.4867C9.14667 9.16671 8.5 8.54671 8.5 7.26671V2.73337C8.5 1.45337 9.15333 0.833374 10.4867 0.833374H13.18C14.52 0.833374 15.1667 1.45337 15.1667 2.73337V7.26671C15.1667 8.54671 14.5133 9.16671 13.18 9.16671ZM10.4867 1.83337C9.64 1.83337 9.5 2.06004 9.5 2.73337V7.26671C9.5 7.94004 9.64 8.16671 10.4867 8.16671H13.18C14.0267 8.16671 14.1667 7.94004 14.1667 7.26671V2.73337C14.1667 2.06004 14.0267 1.83337 13.18 1.83337H10.4867Z" fill=""></path>
|
||||
// <path d="M13.18 15.1666H10.4867C9.14667 15.1666 8.5 14.5466 8.5 13.2666V12.0666C8.5 10.7866 9.15333 10.1666 10.4867 10.1666H13.18C14.52 10.1666 15.1667 10.7866 15.1667 12.0666V13.2666C15.1667 14.5466 14.5133 15.1666 13.18 15.1666ZM10.4867 11.1666C9.64 11.1666 9.5 11.3933 9.5 12.0666V13.2666C9.5 13.94 9.64 14.1666 10.4867 14.1666H13.18C14.0267 14.1666 14.1667 13.94 14.1667 13.2666V12.0666C14.1667 11.3933 14.0267 11.1666 13.18 11.1666H10.4867Z" fill=""></path>
|
||||
// <path d="M5.5135 15.1667H2.82016C1.48016 15.1667 0.833496 14.5467 0.833496 13.2667V8.73337C0.833496 7.45337 1.48683 6.83337 2.82016 6.83337H5.5135C6.8535 6.83337 7.50016 7.45337 7.50016 8.73337V13.2667C7.50016 14.5467 6.84683 15.1667 5.5135 15.1667ZM2.82016 7.83337C1.9735 7.83337 1.8335 8.06004 1.8335 8.73337V13.2667C1.8335 13.94 1.9735 14.1667 2.82016 14.1667H5.5135C6.36016 14.1667 6.50016 13.94 6.50016 13.2667V8.73337C6.50016 8.06004 6.36016 7.83337 5.5135 7.83337H2.82016Z" fill=""></path>
|
||||
// <path d="M5.5135 5.83337H2.82016C1.48016 5.83337 0.833496 5.21337 0.833496 3.93337V2.73337C0.833496 1.45337 1.48683 0.833374 2.82016 0.833374H5.5135C6.8535 0.833374 7.50016 1.45337 7.50016 2.73337V3.93337C7.50016 5.21337 6.84683 5.83337 5.5135 5.83337ZM2.82016 1.83337C1.9735 1.83337 1.8335 2.06004 1.8335 2.73337V3.93337C1.8335 4.60671 1.9735 4.83337 2.82016 4.83337H5.5135C6.36016 4.83337 6.50016 4.60671 6.50016 3.93337V2.73337C6.50016 2.06004 6.36016 1.83337 5.5135 1.83337H2.82016Z" fill=""></path>
|
||||
// </svg>`,
|
||||
// 'Dashboard Layouts': `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
// <path d="M7.85993 7.91996C7.49993 7.91996 7.13327 7.85329 6.8466 7.72663L2.91327 5.97996C1.91327 5.53329 1.7666 4.93329 1.7666 4.60663C1.7666 4.27996 1.91327 3.67996 2.91327 3.23329L6.8466 1.48663C7.4266 1.22663 8.29994 1.22663 8.87994 1.48663L12.8199 3.23329C13.8133 3.67329 13.9666 4.27996 13.9666 4.60663C13.9666 4.93329 13.8199 5.53329 12.8199 5.97996L8.87994 7.72663C8.5866 7.85996 8.2266 7.91996 7.85993 7.91996ZM7.85993 2.29329C7.63327 2.29329 7.41327 2.32663 7.25327 2.39996L3.31993 4.14663C2.91327 4.33329 2.7666 4.51996 2.7666 4.60663C2.7666 4.69329 2.91327 4.88663 3.31327 5.06663L7.2466 6.81329C7.5666 6.95329 8.1466 6.95329 8.4666 6.81329L12.4066 5.06663C12.8133 4.88663 12.9599 4.69329 12.9599 4.60663C12.9599 4.51996 12.8133 4.32663 12.4066 4.14663L8.47327 2.39996C8.31327 2.33329 8.0866 2.29329 7.85993 2.29329Z" fill="#"></path>
|
||||
// <path d="M8 11.3934C7.74667 11.3934 7.49333 11.34 7.25333 11.2334L2.72667 9.22004C2.04 8.92004 1.5 8.08671 1.5 7.33337C1.5 7.06004 1.72667 6.83337 2 6.83337C2.27333 6.83337 2.5 7.06004 2.5 7.33337C2.5 7.70004 2.8 8.16004 3.13333 8.31337L7.66 10.3267C7.87333 10.42 8.12 10.42 8.34 10.3267L12.8667 8.31337C13.2 8.16671 13.5 7.70004 13.5 7.33337C13.5 7.06004 13.7267 6.83337 14 6.83337C14.2733 6.83337 14.5 7.06004 14.5 7.33337C14.5 8.08671 13.96 8.92004 13.2733 9.22671L8.74667 11.24C8.50667 11.34 8.25333 11.3934 8 11.3934Z" fill=""></path>
|
||||
// <path d="M8 14.7267C7.74667 14.7267 7.49333 14.6734 7.25333 14.5667L2.72667 12.5534C1.98 12.22 1.5 11.48 1.5 10.66C1.5 10.3867 1.72667 10.16 2 10.16C2.27333 10.16 2.5 10.3934 2.5 10.6667C2.5 11.0867 2.74667 11.4734 3.13333 11.6467L7.66 13.66C7.87333 13.7534 8.12 13.7534 8.34 13.66L12.8667 11.6467C13.2533 11.4734 13.5 11.0934 13.5 10.6667C13.5 10.3934 13.7267 10.1667 14 10.1667C14.2733 10.1667 14.5 10.3934 14.5 10.6667C14.5 11.4867 14.02 12.2267 13.2733 12.56L8.74667 14.5734C8.50667 14.6734 8.25333 14.7267 8 14.7267Z" fill=""></path>
|
||||
// </svg>`,
|
||||
// 'Import Dashboards': `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" class="import-svg">
|
||||
// <path d="M6 7.33337V11.3334L7.33333 10" fill="#4B5563"/>
|
||||
// <path d="M6 7.33337V11.3334L7.33333 10" stroke="#4B5563" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
// <path d="M6.00033 11.3333L4.66699 10" stroke="#4B5563" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
// <path d="M14.6663 6.66671V10C14.6663 13.3334 13.333 14.6667 9.99967 14.6667H5.99967C2.66634 14.6667 1.33301 13.3334 1.33301 10V6.00004C1.33301 2.66671 2.66634 1.33337 5.99967 1.33337H9.33301" stroke="#4B5563" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
// <path d="M14.6663 6.66671H11.9997C9.99967 6.66671 9.33301 6.00004 9.33301 4.00004V1.33337L14.6663 6.66671Z" stroke="#4B5563" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
// </svg>`,
|
||||
// }
|
||||
// }
|
||||
|
||||
export function dnNavBarAddClasses(){
|
||||
document.querySelector('body')?.classList.add('ks_body_class');
|
||||
|
|
@ -94,19 +94,6 @@ patch(MenuDropdown.prototype,{
|
|||
},
|
||||
|
||||
addIcons(){
|
||||
let menuName = this.togglerRef.el?.textContent;
|
||||
if( menuName && this.dnMenuRef.el && this?.env.services.menu.getCurrentApp?.().xmlid === "ks_dashboard_ninja.board_menu_root"){
|
||||
let dropdownItems = this.dnMenuRef.el.querySelectorAll('.dropdown-item')
|
||||
dropdownItems.forEach( (dropdownItem) => {
|
||||
let dropdownName = menuName !== 'My Dashboards' ? dropdownItem.textContent : 'templateIcon'
|
||||
let icon = "<span class='me-2 dash-dd-icons'>" + dnMenuIcons[menuName][dropdownName] + "</span>"
|
||||
dropdownItem.insertAdjacentHTML("afterbegin", icon);
|
||||
|
||||
let currentActiveMenu = this.env.services.router.current?.hash.menu_id
|
||||
if(currentActiveMenu && parseInt(dropdownItem.dataset.section) === currentActiveMenu)
|
||||
dropdownItem.classList.add('nav-active');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
|
@ -114,20 +101,6 @@ patch(MenuDropdown.prototype,{
|
|||
patch(NavBar.prototype,{
|
||||
setup(){
|
||||
super.setup();
|
||||
onMounted( () => {
|
||||
let apps_menu_icon = this.root.el?.querySelector('.o_navbar_apps_menu .o-dropdown');
|
||||
if(apps_menu_icon)
|
||||
apps_menu_icon.innerHTML += `<div class="ks-apps-menu-icon d-none">
|
||||
<span class="img-bg">
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M16.475 9.37508H13.1083C11.4333 9.37508 10.625 8.63341 10.625 7.10008V3.31675C10.625 1.78341 11.4417 1.04175 13.1083 1.04175H16.475C18.15 1.04175 18.9583 1.78341 18.9583 3.31675V7.09175C18.9583 8.63341 18.1417 9.37508 16.475 9.37508ZM13.1083 2.29175C11.9917 2.29175 11.875 2.60841 11.875 3.31675V7.09175C11.875 7.80841 11.9917 8.11675 13.1083 8.11675H16.475C17.5917 8.11675 17.7083 7.80008 17.7083 7.09175V3.31675C17.7083 2.60008 17.5917 2.29175 16.475 2.29175H13.1083Z" fill=""/>
|
||||
<path d="M16.475 18.9583H13.1083C11.4333 18.9583 10.625 18.1417 10.625 16.475V13.1083C10.625 11.4333 11.4417 10.625 13.1083 10.625H16.475C18.15 10.625 18.9583 11.4417 18.9583 13.1083V16.475C18.9583 18.1417 18.1417 18.9583 16.475 18.9583ZM13.1083 11.875C12.125 11.875 11.875 12.125 11.875 13.1083V16.475C11.875 17.4583 12.125 17.7083 13.1083 17.7083H16.475C17.4583 17.7083 17.7083 17.4583 17.7083 16.475V13.1083C17.7083 12.125 17.4583 11.875 16.475 11.875H13.1083Z" fill=""/>
|
||||
<path d="M6.8915 9.37508H3.52484C1.84984 9.37508 1.0415 8.63341 1.0415 7.10008V3.31675C1.0415 1.78341 1.85817 1.04175 3.52484 1.04175H6.8915C8.5665 1.04175 9.37484 1.78341 9.37484 3.31675V7.09175C9.37484 8.63341 8.55817 9.37508 6.8915 9.37508ZM3.52484 2.29175C2.40817 2.29175 2.2915 2.60841 2.2915 3.31675V7.09175C2.2915 7.80841 2.40817 8.11675 3.52484 8.11675H6.8915C8.00817 8.11675 8.12484 7.80008 8.12484 7.09175V3.31675C8.12484 2.60008 8.00817 2.29175 6.8915 2.29175H3.52484Z" fill=""/>
|
||||
<path d="M6.8915 18.9583H3.52484C1.84984 18.9583 1.0415 18.1417 1.0415 16.475V13.1083C1.0415 11.4333 1.85817 10.625 3.52484 10.625H6.8915C8.5665 10.625 9.37484 11.4417 9.37484 13.1083V16.475C9.37484 18.1417 8.55817 18.9583 6.8915 18.9583ZM3.52484 11.875C2.5415 11.875 2.2915 12.125 2.2915 13.1083V16.475C2.2915 17.4583 2.5415 17.7083 3.52484 17.7083H6.8915C7.87484 17.7083 8.12484 17.4583 8.12484 16.475V13.1083C8.12484 12.125 7.87484 11.875 6.8915 11.875H3.52484Z" fill=""/>
|
||||
</svg>
|
||||
</span>
|
||||
</div>`
|
||||
});
|
||||
},
|
||||
|
||||
async adapt(){
|
||||
|
|
|
|||
|
|
@ -272,8 +272,8 @@ export class KsDashboardNinja extends Component {
|
|||
|
||||
onRendered(()=>{
|
||||
|
||||
if(!document.body.classList.contains('ks_body_class'))
|
||||
dnNavBarAddClasses();
|
||||
// if(!document.body.classList.contains('ks_body_class'))
|
||||
// dnNavBarAddClasses();
|
||||
|
||||
if(this.env.services.menu.getCurrentApp()?.xmlid !== "ks_dashboard_ninja.board_menu_root")
|
||||
this.env.services.menu.reload()
|
||||
|
|
|
|||
|
|
@ -984,35 +984,35 @@ body.ks_body_class {
|
|||
}
|
||||
}
|
||||
|
||||
.ks_body_class .dropdown-menu {
|
||||
border-radius: 8px;
|
||||
box-shadow: 0px 4px 12px 0px #00000040;
|
||||
border: none !important;
|
||||
width: max-content;
|
||||
background-color: $color-white !important;
|
||||
|
||||
.dropdown-item {
|
||||
padding: 8px 16px !important;
|
||||
font-size: $font-14;
|
||||
font-weight: $f-w-400;
|
||||
line-height: 16px;
|
||||
text-align: left;
|
||||
color: $color-paragraph;
|
||||
cursor: pointer;
|
||||
overflow: hidden;
|
||||
text-wrap: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 240px;
|
||||
|
||||
&.ui-state-active {
|
||||
background-color: $color-white !important;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: $color-FFF5F5 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
// .ks_body_class .dropdown-menu {
|
||||
// border-radius: 8px;
|
||||
// box-shadow: 0px 4px 12px 0px #00000040;
|
||||
// border: none !important;
|
||||
// width: max-content;
|
||||
// background-color: $color-white !important;
|
||||
//
|
||||
// .dropdown-item {
|
||||
// padding: 8px 16px !important;
|
||||
// font-size: $font-14;
|
||||
// font-weight: $f-w-400;
|
||||
// line-height: 16px;
|
||||
// text-align: left;
|
||||
// color: $color-paragraph;
|
||||
// cursor: pointer;
|
||||
// overflow: hidden;
|
||||
// text-wrap: nowrap;
|
||||
// text-overflow: ellipsis;
|
||||
// max-width: 240px;
|
||||
//
|
||||
// &.ui-state-active {
|
||||
// background-color: $color-white !important;
|
||||
// }
|
||||
//
|
||||
// &:hover {
|
||||
// background-color: $color-FFF5F5 !important;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
.ks_body_class .favorite-btn {
|
||||
border: 0.81px solid $color-E5E7EB;
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ export class KsGraphPreview extends Component{
|
|||
}
|
||||
this._Ks_render()
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
createGraphTextElement(text) {
|
||||
|
|
@ -74,19 +73,323 @@ export class KsGraphPreview extends Component{
|
|||
}
|
||||
}
|
||||
|
||||
// 3D Bar Chart Implementation
|
||||
// Helper function to configure number formatter based on format type
|
||||
configureNumberFormatter(formatter, formatType) {
|
||||
if (formatType === 'global') {
|
||||
formatter.numberFormat = "#.0a";
|
||||
formatter.bigNumberPrefixes = [
|
||||
{"number":1e+3,"suffix":"k"},
|
||||
{"number":1e+6,"suffix":"M"},
|
||||
{"number":1e+9,"suffix":"G"},
|
||||
{"number":1e+12,"suffix":"T"},
|
||||
{"number":1e+15,"suffix":"P"},
|
||||
{"number":1e+18,"suffix":"E"}
|
||||
];
|
||||
} else if (formatType === 'indian') {
|
||||
formatter.numberFormat = "#.0a";
|
||||
formatter.bigNumberPrefixes = [
|
||||
{"number":1e+3,"suffix":"Th"},
|
||||
{"number":1e+5,"suffix":"Lakh"},
|
||||
{"number":1e+7,"suffix":"Cr"},
|
||||
{"number":1e+9,"suffix":"Arab"}
|
||||
];
|
||||
} else if (formatType === 'colombian') {
|
||||
formatter.numberFormat = "#.a";
|
||||
formatter.bigNumberPrefixes = [
|
||||
{"number":1e+6,"suffix":"M"},
|
||||
{"number":1e+9,"suffix":"M"},
|
||||
{"number":1e+12,"suffix":"M"},
|
||||
{"number":1e+15,"suffix":"M"},
|
||||
{"number":1e+18,"suffix":"M"}
|
||||
];
|
||||
} else {
|
||||
formatter.numberFormat = "#";
|
||||
}
|
||||
}
|
||||
|
||||
// 3D Bar Chart Implementation
|
||||
create3DBarChart(chart, data, ks_data) {
|
||||
// Create axes
|
||||
var categoryAxis = chart.xAxes.push(new am4charts.CategoryAxis());
|
||||
categoryAxis.dataFields.category = "category";
|
||||
categoryAxis.renderer.labels.template.rotation = -45;
|
||||
categoryAxis.renderer.labels.template.hideOversized = false;
|
||||
categoryAxis.renderer.minGridDistance = 20;
|
||||
categoryAxis.renderer.labels.template.horizontalCenter = "right";
|
||||
categoryAxis.renderer.labels.template.verticalCenter = "middle";
|
||||
|
||||
var valueAxis = chart.yAxes.push(new am4charts.ValueAxis());
|
||||
valueAxis.title.text = "Value";
|
||||
valueAxis.title.fontWeight = "bold";
|
||||
|
||||
// Apply number formatting
|
||||
const rec = this.props.record.data;
|
||||
const numberFormatter = new am4core.NumberFormatter();
|
||||
this.configureNumberFormatter(numberFormatter, rec.ks_data_format);
|
||||
valueAxis.numberFormatter = numberFormatter;
|
||||
|
||||
// Create series
|
||||
for (let k = 0; k < ks_data.length; k++) {
|
||||
if (ks_data[k].type != "line") {
|
||||
var series = chart.series.push(new am4charts.ColumnSeries3D());
|
||||
series.dataFields.valueY = ks_data[k].label;
|
||||
series.dataFields.categoryX = "category";
|
||||
series.name = ks_data[k].label;
|
||||
series.tooltipText = "{categoryX}: [bold]{name}: {valueY.formatNumber('" + numberFormatter.numberFormat + "')}[/]";
|
||||
series.columns.template.fillOpacity = 0.8;
|
||||
|
||||
var columnTemplate = series.columns.template;
|
||||
columnTemplate.strokeWidth = 2;
|
||||
columnTemplate.strokeOpacity = 1;
|
||||
columnTemplate.stroke = am4core.color("#FFFFFF");
|
||||
|
||||
columnTemplate.adapter.add("fill", function(fill, target) {
|
||||
return chart.colors.getIndex(k);
|
||||
});
|
||||
|
||||
columnTemplate.adapter.add("stroke", function(stroke, target) {
|
||||
return chart.colors.getIndex(k);
|
||||
});
|
||||
|
||||
if (this.props.record.data.ks_bar_chart_stacked) {
|
||||
series.stacked = true;
|
||||
}
|
||||
|
||||
if (this.props.record.data.ks_show_data_value == true && series) {
|
||||
var labelBullet = series.bullets.push(new am4charts.LabelBullet());
|
||||
labelBullet.label.text = "{valueY.formatNumber('" + numberFormatter.numberFormat + "')}";
|
||||
labelBullet.label.horizontalCenter = "middle";
|
||||
labelBullet.label.verticalCenter = "bottom";
|
||||
labelBullet.label.dy = -10;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Add cursor
|
||||
chart.cursor = new am4charts.XYCursor();
|
||||
chart.cursor.lineX.strokeOpacity = 0;
|
||||
chart.cursor.lineY.strokeOpacity = 0;
|
||||
|
||||
if (this.props.record.data.ks_hide_legend == true && series) {
|
||||
chart.legend = new am4charts.Legend();
|
||||
}
|
||||
}
|
||||
|
||||
// 3D Horizontal Bar Chart Implementation
|
||||
create3DHorizontalBarChart(chart, data, ks_data) {
|
||||
// Create axes (inverted for horizontal)
|
||||
var categoryAxis = chart.yAxes.push(new am4charts.CategoryAxis());
|
||||
categoryAxis.dataFields.category = "category";
|
||||
categoryAxis.renderer.inversed = true;
|
||||
categoryAxis.renderer.minGridDistance = 30;
|
||||
|
||||
var valueAxis = chart.xAxes.push(new am4charts.ValueAxis());
|
||||
valueAxis.title.text = "Value";
|
||||
valueAxis.title.fontWeight = "bold";
|
||||
|
||||
// Apply number formatting
|
||||
const rec = this.props.record.data;
|
||||
const numberFormatter = new am4core.NumberFormatter();
|
||||
this.configureNumberFormatter(numberFormatter, rec.ks_data_format);
|
||||
valueAxis.numberFormatter = numberFormatter;
|
||||
|
||||
// Create series
|
||||
for (let k = 0; k < ks_data.length; k++) {
|
||||
if (ks_data[k].type != "line") {
|
||||
var series = chart.series.push(new am4charts.ColumnSeries3D());
|
||||
series.dataFields.valueX = ks_data[k].label;
|
||||
series.dataFields.categoryY = "category";
|
||||
series.name = ks_data[k].label;
|
||||
series.tooltipText = "{categoryY}: [bold]{name}: {valueX.formatNumber('" + numberFormatter.numberFormat + "')}[/]";
|
||||
series.columns.template.fillOpacity = 0.8;
|
||||
|
||||
var columnTemplate = series.columns.template;
|
||||
columnTemplate.strokeWidth = 2;
|
||||
columnTemplate.strokeOpacity = 1;
|
||||
columnTemplate.stroke = am4core.color("#FFFFFF");
|
||||
|
||||
columnTemplate.adapter.add("fill", function(fill, target) {
|
||||
return chart.colors.getIndex(k);
|
||||
});
|
||||
|
||||
if (this.props.record.data.ks_bar_chart_stacked) {
|
||||
series.stacked = true;
|
||||
}
|
||||
|
||||
if (this.props.record.data.ks_show_data_value == true && series) {
|
||||
var labelBullet = series.bullets.push(new am4charts.LabelBullet());
|
||||
labelBullet.label.text = "{valueX.formatNumber('" + numberFormatter.numberFormat + "')}";
|
||||
labelBullet.label.horizontalCenter = "left";
|
||||
labelBullet.label.verticalCenter = "middle";
|
||||
labelBullet.label.dx = 10;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Add cursor
|
||||
chart.cursor = new am4charts.XYCursor();
|
||||
chart.cursor.lineX.strokeOpacity = 0;
|
||||
chart.cursor.lineY.strokeOpacity = 0;
|
||||
|
||||
if (this.props.record.data.ks_hide_legend == true && series) {
|
||||
chart.legend = new am4charts.Legend();
|
||||
}
|
||||
}
|
||||
|
||||
// 3D Pie Chart Implementation
|
||||
create3DPieChart(chart, data, ks_data) {
|
||||
// Dispose previous chart if exists
|
||||
if (this.root) {
|
||||
this.root.dispose();
|
||||
}
|
||||
|
||||
// Create the appropriate 3D chart type
|
||||
const isDonut = this.props.record.data.ks_dashboard_item_type === "ks_doughnut_chart";
|
||||
const isSemiCircle = this.props.record.data.ks_semi_circle_chart;
|
||||
|
||||
this.root = am4core.create(this.graphref.el, am4charts.PieChart3D);
|
||||
chart = this.root;
|
||||
var self = this;
|
||||
|
||||
chart.data = data;
|
||||
|
||||
// Configure donut if needed
|
||||
if (isDonut) {
|
||||
chart.innerRadius = am4core.percent(50);
|
||||
}
|
||||
|
||||
// Configure semi-circle if needed
|
||||
if (isSemiCircle) {
|
||||
chart.startAngle = 180;
|
||||
chart.endAngle = 360;
|
||||
}
|
||||
|
||||
// Create pie series
|
||||
var pieSeries = chart.series.push(new am4charts.PieSeries3D());
|
||||
pieSeries.dataFields.value = ks_data[0].label; // First data field for pie
|
||||
pieSeries.dataFields.category = "category";
|
||||
|
||||
// Slice appearance
|
||||
pieSeries.slices.template.stroke = am4core.color("#fff");
|
||||
pieSeries.slices.template.strokeWidth = 2;
|
||||
pieSeries.slices.template.strokeOpacity = 1;
|
||||
|
||||
// Label configuration - improved positioning
|
||||
pieSeries.labels.template.text = "{category}: {value}";
|
||||
pieSeries.labels.template.radius = am4core.percent(-40); // Move labels inside
|
||||
pieSeries.labels.template.fill = am4core.color("#fff");
|
||||
pieSeries.labels.template.fontSize = 12;
|
||||
pieSeries.labels.template.dy = -10; // Adjust vertical position
|
||||
|
||||
// Hide labels if too many slices
|
||||
if (data.length > 10) {
|
||||
pieSeries.labels.template.disabled = true;
|
||||
}
|
||||
|
||||
// Disable ticks
|
||||
pieSeries.ticks.template.disabled = true;
|
||||
|
||||
// Initialize tooltip first
|
||||
pieSeries.slices.template.tooltip = new am4core.Tooltip();
|
||||
pieSeries.slices.template.tooltipText = "{category}: [bold]{value}[/]";
|
||||
|
||||
// Only set pointerOrientation if tooltip exists
|
||||
if (pieSeries.slices.template.tooltip) {
|
||||
pieSeries.slices.template.tooltip.pointerOrientation = "vertical";
|
||||
pieSeries.slices.template.tooltip.dy = -20;
|
||||
}
|
||||
|
||||
// Value label configuration (if enabled)
|
||||
if (this.props.record.data.ks_show_data_value) {
|
||||
pieSeries.labels.template.text = this.props.record.data.ks_data_label_type === 'value' ?
|
||||
"{value}" : "{value.percent.formatNumber('#.0')}%";
|
||||
|
||||
// Better positioning for value labels
|
||||
pieSeries.labels.template.radius = am4core.percent(-25);
|
||||
pieSeries.labels.template.fill = am4core.color("0a0a0a");
|
||||
pieSeries.labels.template.fontWeight = "bold";
|
||||
} else {
|
||||
pieSeries.labels.template.disabled = true;
|
||||
}
|
||||
|
||||
if (this.props.record.data.ks_show_data_value) {
|
||||
const rec = this.props.record.data;
|
||||
let formatString = "#";
|
||||
|
||||
if (rec.ks_data_format && rec.ks_data_format == 'global') {
|
||||
formatString = "#.0a";
|
||||
} else if (rec.ks_data_format && rec.ks_data_format == 'indian') {
|
||||
formatString = "#.0a";
|
||||
} else if (rec.ks_data_format && rec.ks_data_format == 'colombian') {
|
||||
formatString = "#.a";
|
||||
}
|
||||
|
||||
pieSeries.labels.template.text = this.props.record.data.ks_data_label_type === 'value' ?
|
||||
"{value.formatNumber('" + formatString + "')}" :
|
||||
"{value.percent.formatNumber('#.0')}%";
|
||||
|
||||
// Better positioning for value labels
|
||||
pieSeries.labels.template.radius = am4core.percent(-25);
|
||||
pieSeries.labels.template.fill = am4core.color("#0a0a0a");
|
||||
pieSeries.labels.template.fontWeight = "bold";
|
||||
} else {
|
||||
pieSeries.labels.template.disabled = true;
|
||||
}
|
||||
|
||||
// Add legend if not hidden
|
||||
if (this.props.record.data.ks_hide_legend == true && pieSeries) {
|
||||
chart.legend = new am4charts.Legend();
|
||||
chart.legend.position = "bottom";
|
||||
chart.legend.contentAlign = "center";
|
||||
|
||||
// Make legend scrollable if many items
|
||||
if (data.length > 8) {
|
||||
chart.legend.scrollable = true;
|
||||
chart.legend.maxHeight = 150;
|
||||
}
|
||||
}
|
||||
|
||||
// Add cursor for interactivity
|
||||
chart.cursor = new am4charts.XYCursor();
|
||||
chart.cursor.behavior = "none"; // Disable zoom/pan for pie charts
|
||||
|
||||
// Animation
|
||||
pieSeries.hiddenState.properties.opacity = 1;
|
||||
pieSeries.hiddenState.properties.endAngle = -90;
|
||||
pieSeries.hiddenState.properties.startAngle = -90;
|
||||
pieSeries.appear(1000, 100);
|
||||
}
|
||||
|
||||
get_chart(rec) {
|
||||
typeof am4themes_dark;
|
||||
console.log(typeof am4themes_dark);
|
||||
console.log("dark theme issue");
|
||||
// Clear existing elements
|
||||
var graphTextElements = this.graphref.el?.querySelectorAll(".graph_text");
|
||||
if (graphTextElements.length) {
|
||||
graphTextElements.forEach((el) => {
|
||||
el.remove();
|
||||
});
|
||||
}
|
||||
|
||||
// Dispose previous chart if exists
|
||||
if (this.root) {
|
||||
this.root.dispose();
|
||||
this.root = null;
|
||||
}
|
||||
|
||||
// Force garbage collection
|
||||
if (am4core.isDisposed) {
|
||||
am4core.disposeAllCharts();
|
||||
}
|
||||
|
||||
// Parse chart data
|
||||
const chart_data = JSON.parse(this.props.record.data.ks_chart_data);
|
||||
var ks_labels = chart_data['labels'];
|
||||
var ks_data = chart_data.datasets;
|
||||
|
||||
if (this.props.record.data.ks_chart_cumulative_field.count) {
|
||||
|
||||
for (var i = 0; i < ks_data.length; i++) {
|
||||
var ks_temp_com = 0;
|
||||
var datasets = {};
|
||||
|
|
@ -106,25 +409,68 @@ export class KsGraphPreview extends Component{
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
let data = [];
|
||||
if (ks_data && ks_labels) {
|
||||
if (ks_data.length && ks_labels.length) {
|
||||
for (let i = 0; i < ks_labels.length; i++) {
|
||||
let data2 = {};
|
||||
for (let j = 0; j < ks_data.length; j++) {
|
||||
if (ks_data[j].type == "line"){
|
||||
data2[ks_data[j].label] = ks_data[j].data[i]
|
||||
}else{
|
||||
data2[ks_data[j].label] = ks_data[j].data[i]
|
||||
}
|
||||
}
|
||||
data2["category"] = ks_labels[i]
|
||||
data.push(data2)
|
||||
}
|
||||
|
||||
// Check if we should use 3D charts
|
||||
const use3D = this.props.record.data.ks_three_d &&
|
||||
['ks_bar_chart', 'ks_horizontalBar_chart', 'ks_pie_chart','ks_doughnut_chart'].includes(this.props.record.data.ks_dashboard_item_type);
|
||||
|
||||
if (use3D) {
|
||||
// Set theme BEFORE creating any chart elements
|
||||
const theme = this.props.record.data.ks_chart_item_color;
|
||||
switch (theme) {
|
||||
case "dark":
|
||||
am4core.unuseAllThemes();
|
||||
am4core.useTheme(am4themes_animated); // helps restore labels & animations
|
||||
break;
|
||||
case "material":
|
||||
am4core.unuseAllThemes();
|
||||
am4core.useTheme(am4themes_material);
|
||||
break;
|
||||
case "moonrise":
|
||||
am4core.unuseAllThemes();
|
||||
am4core.useTheme(am4themes_moonrisekingdom);
|
||||
break;
|
||||
default:
|
||||
am4core.unuseAllThemes();
|
||||
am4core.useTheme(am4themes_animated);
|
||||
}
|
||||
|
||||
// Force immediate theme application
|
||||
am4core.options.autoDispose = true;
|
||||
am4core.options.queue = true;
|
||||
|
||||
// Create new chart
|
||||
this.root = am4core.create(this.graphref.el, am4charts.XYChart3D);
|
||||
var chart = this.root;
|
||||
|
||||
// Set data
|
||||
chart.data = data;
|
||||
|
||||
switch(this.props.record.data.ks_dashboard_item_type) {
|
||||
case "ks_pie_chart":
|
||||
case "ks_doughnut_chart":
|
||||
this.create3DPieChart(chart, data, ks_data);
|
||||
break;
|
||||
case "ks_horizontalBar_chart":
|
||||
this.create3DHorizontalBarChart(chart, data, ks_data);
|
||||
break;
|
||||
case "ks_bar_chart":
|
||||
this.create3DBarChart(chart, data, ks_data);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
// Original am5 implementation for non-3D charts
|
||||
this.root = am5.Root.new(this.graphref.el);
|
||||
var self = this;
|
||||
|
||||
|
|
@ -144,7 +490,6 @@ export class KsGraphPreview extends Component{
|
|||
break;
|
||||
};
|
||||
|
||||
|
||||
var chart_type = this.props.record.data.ks_dashboard_item_type
|
||||
switch (chart_type) {
|
||||
case "ks_bar_chart":
|
||||
|
|
@ -153,8 +498,13 @@ export class KsGraphPreview extends Component{
|
|||
} else {
|
||||
var wheely_val = 'none';
|
||||
}
|
||||
var chart = this.root.container.children.push(am5xy.XYChart.new(this.root, {panX: false,panY: false,
|
||||
wheelX: "panX",wheelY: wheely_val,layout: this.root.verticalLayout}));
|
||||
var chart = this.root.container.children.push(am5xy.XYChart.new(this.root, {
|
||||
panX: false,
|
||||
panY: false,
|
||||
wheelX: "panX",
|
||||
wheelY: wheely_val,
|
||||
layout: this.root.verticalLayout
|
||||
}));
|
||||
|
||||
var xRenderer = am5xy.AxisRendererX.new(this.root, {
|
||||
minGridDistance: 15,
|
||||
|
|
@ -168,18 +518,23 @@ export class KsGraphPreview extends Component{
|
|||
paddingRight: 10
|
||||
});
|
||||
|
||||
var xAxis = chart.xAxes.push(am5xy.CategoryAxis.new(this.root, {categoryField: "category",
|
||||
renderer: xRenderer,tooltip: am5.Tooltip.new(this.root, {})}));
|
||||
var xAxis = chart.xAxes.push(am5xy.CategoryAxis.new(this.root, {
|
||||
categoryField: "category",
|
||||
renderer: xRenderer,
|
||||
tooltip: am5.Tooltip.new(this.root, {})
|
||||
}));
|
||||
|
||||
xRenderer.grid.template.setAll({location: 1})
|
||||
|
||||
xAxis.data.setAll(data);
|
||||
|
||||
var yAxis = chart.yAxes.push(am5xy.ValueAxis.new(this.root, {extraMin: 0,
|
||||
extraMax: 0.1,renderer: am5xy.AxisRendererY.new(this.root, {strokeOpacity: 0.1}) }));
|
||||
var yAxis = chart.yAxes.push(am5xy.ValueAxis.new(this.root, {
|
||||
extraMin: 0,
|
||||
extraMax: 0.1,
|
||||
renderer: am5xy.AxisRendererY.new(this.root, {strokeOpacity: 0.1})
|
||||
}));
|
||||
|
||||
// Add series
|
||||
|
||||
for (let k = 0; k < ks_data.length; k++) {
|
||||
var tooltip = am5.Tooltip.new(this.root, {
|
||||
textAlign: "center",
|
||||
|
|
@ -227,7 +582,6 @@ export class KsGraphPreview extends Component{
|
|||
if (self.props.record.data.ks_show_data_value == true && series) {
|
||||
series.bullets.push(function () {
|
||||
return am5.Bullet.new(self.root, {
|
||||
// locationY:1,
|
||||
sprite: am5.Label.new(self.root, {
|
||||
text: "{valueY}",
|
||||
centerY: am5.p100,
|
||||
|
|
@ -276,6 +630,7 @@ export class KsGraphPreview extends Component{
|
|||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case "ks_horizontalBar_chart":
|
||||
if(this.props.record.data.zoom_enabled){
|
||||
var wheely_val = "zoomX";
|
||||
|
|
@ -878,8 +1233,8 @@ export class KsGraphPreview extends Component{
|
|||
}
|
||||
break;
|
||||
}
|
||||
if (rec.ks_dashboard_item_type != 'ks_pie_chart' && rec.ks_dashboard_item_type != 'ks_doughnut_chart' )
|
||||
{
|
||||
|
||||
if (rec.ks_dashboard_item_type != 'ks_pie_chart' && rec.ks_dashboard_item_type != 'ks_doughnut_chart') {
|
||||
this.root.rtl = true;
|
||||
var legend = chart.children.push(
|
||||
am5.Legend.new(this.root, {
|
||||
|
|
@ -902,7 +1257,6 @@ export class KsGraphPreview extends Component{
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
if (rec.ks_data_format && rec.ks_data_format == 'global') {
|
||||
this.root.numberFormatter.setAll({
|
||||
numberFormat: "#.0a",
|
||||
|
|
@ -932,15 +1286,16 @@ export class KsGraphPreview extends Component{
|
|||
if (rec.ks_dashboard_item_type != 'ks_pie_chart' && rec.ks_dashboard_item_type != 'ks_doughnut_chart' && series) {
|
||||
series.appear();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.graphref.el.innerHTML += renderToString("ksNoItemChartView", {});
|
||||
}
|
||||
} else {
|
||||
this.graphref.el.innerHTML += renderToString("ksNoItemChartView", {});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
KsGraphPreview.template = "Ksgraphview";
|
||||
export const KsGraphPreviewfield = {
|
||||
component: KsGraphPreview,
|
||||
|
|
|
|||
|
|
@ -55,142 +55,142 @@
|
|||
<!-- </t>-->
|
||||
|
||||
|
||||
<t t-inherit="web.NavBar.SectionsMenu" t-inherit-mode="extension">
|
||||
<xpath expr="//t[@t-call='web.NavBar.SectionsMenu.Dropdown.MenuSlot']" position="inside">
|
||||
<t t-set="sectionName" t-value="section.name" />
|
||||
</xpath>
|
||||
</t>
|
||||
<!-- <t t-inherit="web.NavBar.SectionsMenu" t-inherit-mode="extension">-->
|
||||
<!-- <xpath expr="//t[@t-call='web.NavBar.SectionsMenu.Dropdown.MenuSlot']" position="inside">-->
|
||||
<!-- <t t-set="sectionName" t-value="section.name" />-->
|
||||
<!-- </xpath>-->
|
||||
<!-- </t>-->
|
||||
|
||||
<t t-inherit="mail.MessagingMenu" t-inherit-mode="extension">
|
||||
<xpath expr="//div[@t-att-class='discussSystray.class']//Dropdown[@menuClass='discussSystray.menuClass']/button/span[contains(@class, 'o-mail-MessagingMenu-counter')]" position="before">
|
||||
<span class="img-bg d-none ks-comments-systray"><img src="/ks_dashboard_ninja/static/images/dashboardOverview/message-notif.svg" alt="message-notif-logo" class="img-fluid" loading="lazy"/></span>
|
||||
</xpath>
|
||||
</t>
|
||||
<!-- <t t-inherit="mail.MessagingMenu" t-inherit-mode="extension">-->
|
||||
<!-- <xpath expr="//div[@t-att-class='discussSystray.class']//Dropdown[@menuClass='discussSystray.menuClass']/button/span[contains(@class, 'o-mail-MessagingMenu-counter')]" position="before">-->
|
||||
<!-- <span class="img-bg d-none ks-comments-systray"><img src="/ks_dashboard_ninja/static/images/dashboardOverview/message-notif.svg" alt="message-notif-logo" class="img-fluid" loading="lazy"/></span>-->
|
||||
<!-- </xpath>-->
|
||||
<!-- </t>-->
|
||||
|
||||
<t t-inherit="mail.ActivityMenu" t-inherit-mode="extension" priority="0">
|
||||
<xpath expr="//Dropdown/button/i" position="after">
|
||||
<span class="img-bg d-none ks-mail-systray"><img src="/ks_dashboard_ninja/static/images/dashboardOverview/note-text.svg" alt="message-notif-logo" class="img-fluid" loading="lazy"/></span>
|
||||
</xpath>
|
||||
</t>
|
||||
<!-- <t t-inherit="mail.ActivityMenu" t-inherit-mode="extension" priority="0">-->
|
||||
<!-- <xpath expr="//Dropdown/button/i" position="after">-->
|
||||
<!-- <span class="img-bg d-none ks-mail-systray"><img src="/ks_dashboard_ninja/static/images/dashboardOverview/note-text.svg" alt="message-notif-logo" class="img-fluid" loading="lazy"/></span>-->
|
||||
<!-- </xpath>-->
|
||||
<!-- </t>-->
|
||||
|
||||
<t t-inherit="web.UserMenu" t-inherit-mode="extension">
|
||||
<xpath expr="//div[contains(@class, 'o_user_menu')]/DropdownGroup/Dropdown/button/img" position="after">
|
||||
<div class="d-none ks_user_avatar">
|
||||
<div class="user-name d-lg-block d-none">
|
||||
<t t-set="nameParts" t-value="userName.split(' ')"/>
|
||||
<t t-if="nameParts.length">
|
||||
<t t-esc="nameParts[0] ? nameParts[0].charAt(0).toUpperCase() : ''"/>
|
||||
<t t-esc="nameParts[1] ? nameParts[1].charAt(0).toUpperCase() : ''"/>
|
||||
</t>
|
||||
<t t-else="">
|
||||
U
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</xpath>
|
||||
</t>
|
||||
<!-- <t t-inherit="web.UserMenu" t-inherit-mode="extension">-->
|
||||
<!-- <xpath expr="//div[contains(@class, 'o_user_menu')]/DropdownGroup/Dropdown/button/img" position="after">-->
|
||||
<!-- <div class="d-none ks_user_avatar">-->
|
||||
<!-- <div class="user-name d-lg-block d-none">-->
|
||||
<!-- <t t-set="nameParts" t-value="userName.split(' ')"/>-->
|
||||
<!-- <t t-if="nameParts.length">-->
|
||||
<!-- <t t-esc="nameParts[0] ? nameParts[0].charAt(0).toUpperCase() : ''"/>-->
|
||||
<!-- <t t-esc="nameParts[1] ? nameParts[1].charAt(0).toUpperCase() : ''"/>-->
|
||||
<!-- </t>-->
|
||||
<!-- <t t-else="">-->
|
||||
<!-- U-->
|
||||
<!-- </t>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </xpath>-->
|
||||
<!-- </t>-->
|
||||
|
||||
<t t-inherit="web.NavBar.SectionsMenu.Dropdown.MenuSlot" t-inherit-mode="extension">
|
||||
<xpath expr="//DropdownItem[@t-if='!item.childrenTree.length']" position="replace">
|
||||
<DropdownItem
|
||||
t-if="!item.childrenTree.length"
|
||||
class="{
|
||||
'dropdown-item ks_dn_navbar_dd_item': true,
|
||||
o_dropdown_menu_group_entry: decalage gt 20
|
||||
}"
|
||||
onSelected="() => this.onNavBarDropdownItemSelection(item)"
|
||||
attrs="{ style: style, href: getMenuItemHref(item), 'data-menu-xmlid': item.xmlid, 'data-section': item.id }">
|
||||
<!-- <t t-inherit="web.NavBar.SectionsMenu.Dropdown.MenuSlot" t-inherit-mode="extension">-->
|
||||
<!-- <xpath expr="//DropdownItem[@t-if='!item.childrenTree.length']" position="replace">-->
|
||||
<!-- <DropdownItem-->
|
||||
<!-- t-if="!item.childrenTree.length"-->
|
||||
<!-- class="{-->
|
||||
<!-- 'dropdown-item ks_dn_navbar_dd_item': true,-->
|
||||
<!-- o_dropdown_menu_group_entry: decalage gt 20-->
|
||||
<!-- }"-->
|
||||
<!-- onSelected="() => this.onNavBarDropdownItemSelection(item)"-->
|
||||
<!-- attrs="{ style: style, href: getMenuItemHref(item), 'data-menu-xmlid': item.xmlid, 'data-section': item.id }">-->
|
||||
|
||||
<t t-set="currentActionName" t-value="env.services.action.currentController?.action?.tag"/>
|
||||
<t t-set="currentAppXmlid" t-value="currentApp?.xmlid"/>
|
||||
<t t-if="currentAppXmlid === 'ks_dashboard_ninja.board_menu_root'
|
||||
|| currentActionName === 'ks_dashboard_ninja'">
|
||||
<!-- <t t-set="currentActionName" t-value="env.services.action.currentController?.action?.tag"/>-->
|
||||
<!-- <t t-set="currentAppXmlid" t-value="currentApp?.xmlid"/>-->
|
||||
<!-- <t t-if="currentAppXmlid === 'ks_dashboard_ninja.board_menu_root'-->
|
||||
<!-- || currentActionName === 'ks_dashboard_ninja'">-->
|
||||
|
||||
<t t-if="sectionName === 'Quick Access'">
|
||||
<t t-if="item.name === 'Overview'">
|
||||
<span class="me-2 dash-dd-icons">
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12.2133 8.50006H10C8.34 8.50006 7.5 7.56006 7.5 5.70006V3.78672C7.5 3.10672 7.58 2.13339 8.28667 1.60006C8.88 1.16006 9.73333 1.12672 10.9933 1.49339C12.6467 1.97339 14.0267 3.35339 14.5067 5.00672C14.8733 6.26006 14.84 7.12006 14.4 7.70672C13.8667 8.42006 12.8933 8.50006 12.2133 8.50006ZM9.52 2.24006C9.24667 2.24006 9.03333 2.29339 8.89333 2.40006C8.63333 2.59339 8.50667 3.04672 8.50667 3.78672V5.70672C8.50667 7.20006 9.08 7.50672 10.0067 7.50672H12.22C12.9533 7.50672 13.4067 7.38006 13.6067 7.12006C13.84 6.81339 13.82 6.20006 13.56 5.30006C13.1733 3.98672 12.04 2.84672 10.7267 2.46672C10.2333 2.31339 9.83333 2.24006 9.52 2.24006Z" fill=""></path>
|
||||
<path d="M7.37992 15.1667C7.02659 15.1667 6.66659 15.1401 6.30659 15.0801C3.57992 14.6401 1.35992 12.4267 0.919922 9.70005C0.353255 6.19338 2.61325 2.88672 6.07326 2.18005C6.34659 2.12672 6.60659 2.30005 6.66659 2.56672C6.71992 2.84005 6.54659 3.10005 6.27992 3.16005C3.35326 3.76005 1.43326 6.56005 1.91992 9.54005C2.29326 11.8467 4.16659 13.7201 6.47326 14.0934C9.46659 14.5734 12.2599 12.6467 12.8533 9.70672C12.9066 9.43338 13.1733 9.26005 13.4399 9.31338C13.7133 9.36672 13.8866 9.63338 13.8333 9.90005C13.1999 13.0134 10.4799 15.1667 7.37992 15.1667Z" fill=""></path>
|
||||
</svg>
|
||||
</span>
|
||||
<t t-esc="item.name"/>
|
||||
</t>
|
||||
<t t-elif="item.name === 'Inbox'">
|
||||
<span class="me-2 dash-dd-inbox dash-dd-icons">
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M11.3335 14.1667H4.66683C4.3935 14.1667 4.16683 13.94 4.16683 13.6667C4.16683 13.3934 4.3935 13.1667 4.66683 13.1667H11.3335C13.2402 13.1667 14.1668 12.24 14.1668 10.3334V5.66671C14.1668 3.76004 13.2402 2.83337 11.3335 2.83337H4.66683C2.76016 2.83337 1.8335 3.76004 1.8335 5.66671C1.8335 5.94004 1.60683 6.16671 1.3335 6.16671C1.06016 6.16671 0.833496 5.94004 0.833496 5.66671C0.833496 3.23337 2.2335 1.83337 4.66683 1.83337H11.3335C13.7668 1.83337 15.1668 3.23337 15.1668 5.66671V10.3334C15.1668 12.7667 13.7668 14.1667 11.3335 14.1667Z" fill=""></path>
|
||||
<path d="M7.99969 8.57998C7.43969 8.57998 6.87302 8.40665 6.43969 8.05331L4.35302 6.38665C4.13969 6.21331 4.09969 5.89998 4.27302 5.68665C4.44636 5.47331 4.75968 5.43332 4.97302 5.60665L7.05969 7.27332C7.56635 7.67998 8.42635 7.67998 8.93302 7.27332L11.0197 5.60665C11.233 5.43332 11.553 5.46665 11.7197 5.68665C11.893 5.89998 11.8597 6.21998 11.6397 6.38665L9.55301 8.05331C9.12635 8.40665 8.55969 8.57998 7.99969 8.57998Z" fill=""></path>
|
||||
<path d="M5.3335 11.5H1.3335C1.06016 11.5 0.833496 11.2733 0.833496 11C0.833496 10.7267 1.06016 10.5 1.3335 10.5H5.3335C5.60683 10.5 5.8335 10.7267 5.8335 11C5.8335 11.2733 5.60683 11.5 5.3335 11.5Z" fill=" "></path>
|
||||
<path d="M3.3335 8.83337H1.3335C1.06016 8.83337 0.833496 8.60671 0.833496 8.33337C0.833496 8.06004 1.06016 7.83337 1.3335 7.83337H3.3335C3.60683 7.83337 3.8335 8.06004 3.8335 8.33337C3.8335 8.60671 3.60683 8.83337 3.3335 8.83337Z" fill=""></path>
|
||||
</svg>
|
||||
</span>
|
||||
<t t-esc="item.name"/>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<t t-esc="item.name"/>
|
||||
</t>
|
||||
</t>
|
||||
<t t-elif="sectionName === 'My Dashboards'">
|
||||
<span class="me-2 dash-dd-icons">
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M10.54 13.4533C10.3667 13.4533 10.1867 13.4466 9.99338 13.4266C9.64671 13.4 9.25338 13.3333 8.84671 13.2333L7.72671 12.9666C4.65338 12.24 3.64671 10.6133 4.36671 7.54664L5.02005 4.7533C5.16671 4.11997 5.34005 3.60664 5.55338 3.17997C6.70005 0.813303 8.89338 1.02664 10.4534 1.3933L11.5667 1.6533C13.1267 2.01997 14.1134 2.59997 14.6667 3.48664C15.2134 4.3733 15.3 5.5133 14.9334 7.0733L14.28 9.85997C13.7067 12.3 12.5134 13.4533 10.54 13.4533ZM8.74671 2.16664C7.63338 2.16664 6.92671 2.62664 6.45338 3.6133C6.28005 3.9733 6.12671 4.41997 5.99338 4.97997L5.34005 7.7733C4.74671 10.2933 5.43338 11.3933 7.95338 11.9933L9.07338 12.26C9.43338 12.3466 9.77338 12.4 10.08 12.4266C11.8934 12.6066 12.7934 11.8133 13.3 9.6333L13.9534 6.84664C14.2534 5.55997 14.2134 4.65997 13.8134 4.0133C13.4134 3.36664 12.6267 2.92664 11.3334 2.62664L10.22 2.36664C9.66671 2.2333 9.17338 2.16664 8.74671 2.16664Z" fill=""></path>
|
||||
<path d="M5.55341 14.8334C3.84008 14.8334 2.74674 13.8067 2.04674 11.64L1.19341 9.0067C0.246742 6.07337 1.09341 4.42003 4.01341 3.47337L5.06674 3.13337C5.41341 3.0267 5.67341 2.95337 5.90674 2.91337C6.10007 2.87337 6.28674 2.9467 6.40008 3.10003C6.51341 3.25337 6.53341 3.45337 6.45341 3.6267C6.28008 3.98003 6.12674 4.4267 6.00008 4.9867L5.34674 7.78003C4.75341 10.3 5.44007 11.4 7.96007 12L9.08008 12.2667C9.44007 12.3534 9.78008 12.4067 10.0867 12.4334C10.3001 12.4534 10.4734 12.6 10.5334 12.8067C10.5867 13.0134 10.5067 13.2267 10.3334 13.3467C9.89341 13.6467 9.34008 13.9 8.64008 14.1267L7.58674 14.4734C6.82008 14.7134 6.15341 14.8334 5.55341 14.8334ZM5.18674 4.1467L4.32674 4.4267C1.94674 5.19337 1.38008 6.31337 2.14674 8.70003L3.00008 11.3334C3.77341 13.7134 4.89341 14.2867 7.27341 13.52L8.32674 13.1734C8.36674 13.16 8.40007 13.1467 8.44007 13.1334L7.73341 12.9667C4.66008 12.24 3.65341 10.6134 4.37341 7.5467L5.02674 4.75337C5.07341 4.54003 5.12674 4.33337 5.18674 4.1467Z" fill=""></path>
|
||||
<path d="M11.6599 7.00664C11.6199 7.00664 11.5799 6.99997 11.5332 6.99331L8.29992 6.17331C8.03325 6.10664 7.87325 5.83331 7.93992 5.56664C8.00658 5.29997 8.27992 5.13997 8.54658 5.20664L11.7799 6.02664C12.0466 6.09331 12.2066 6.36664 12.1399 6.63331C12.0866 6.85331 11.8799 7.00664 11.6599 7.00664Z" fill=""></path>
|
||||
<path d="M9.70643 9.25993C9.66643 9.25993 9.62643 9.25326 9.57976 9.2466L7.63976 8.75326C7.37309 8.6866 7.21309 8.41326 7.27976 8.1466C7.34643 7.87993 7.61976 7.71993 7.88643 7.7866L9.82643 8.27993C10.0931 8.3466 10.2531 8.61993 10.1864 8.8866C10.1331 9.11326 9.93309 9.25993 9.70643 9.25993Z" fill=""></path>
|
||||
</svg>
|
||||
</span>
|
||||
<t t-esc="item.name"/>
|
||||
</t>
|
||||
<t t-elif="sectionName === 'Configuration'">
|
||||
<!-- <t t-if="sectionName === 'Quick Access'">-->
|
||||
<!-- <t t-if="item.name === 'Overview'">-->
|
||||
<!-- <span class="me-2 dash-dd-icons">-->
|
||||
<!-- <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">-->
|
||||
<!-- <path d="M12.2133 8.50006H10C8.34 8.50006 7.5 7.56006 7.5 5.70006V3.78672C7.5 3.10672 7.58 2.13339 8.28667 1.60006C8.88 1.16006 9.73333 1.12672 10.9933 1.49339C12.6467 1.97339 14.0267 3.35339 14.5067 5.00672C14.8733 6.26006 14.84 7.12006 14.4 7.70672C13.8667 8.42006 12.8933 8.50006 12.2133 8.50006ZM9.52 2.24006C9.24667 2.24006 9.03333 2.29339 8.89333 2.40006C8.63333 2.59339 8.50667 3.04672 8.50667 3.78672V5.70672C8.50667 7.20006 9.08 7.50672 10.0067 7.50672H12.22C12.9533 7.50672 13.4067 7.38006 13.6067 7.12006C13.84 6.81339 13.82 6.20006 13.56 5.30006C13.1733 3.98672 12.04 2.84672 10.7267 2.46672C10.2333 2.31339 9.83333 2.24006 9.52 2.24006Z" fill=""></path>-->
|
||||
<!-- <path d="M7.37992 15.1667C7.02659 15.1667 6.66659 15.1401 6.30659 15.0801C3.57992 14.6401 1.35992 12.4267 0.919922 9.70005C0.353255 6.19338 2.61325 2.88672 6.07326 2.18005C6.34659 2.12672 6.60659 2.30005 6.66659 2.56672C6.71992 2.84005 6.54659 3.10005 6.27992 3.16005C3.35326 3.76005 1.43326 6.56005 1.91992 9.54005C2.29326 11.8467 4.16659 13.7201 6.47326 14.0934C9.46659 14.5734 12.2599 12.6467 12.8533 9.70672C12.9066 9.43338 13.1733 9.26005 13.4399 9.31338C13.7133 9.36672 13.8866 9.63338 13.8333 9.90005C13.1999 13.0134 10.4799 15.1667 7.37992 15.1667Z" fill=""></path>-->
|
||||
<!-- </svg>-->
|
||||
<!-- </span>-->
|
||||
<!-- <t t-esc="item.name"/>-->
|
||||
<!-- </t>-->
|
||||
<!-- <t t-elif="item.name === 'Inbox'">-->
|
||||
<!-- <span class="me-2 dash-dd-inbox dash-dd-icons">-->
|
||||
<!-- <svg width="16" height="16" viewBox="0 0 16 16" fill="" xmlns="http://www.w3.org/2000/svg">-->
|
||||
<!-- <path d="M11.3335 14.1667H4.66683C4.3935 14.1667 4.16683 13.94 4.16683 13.6667C4.16683 13.3934 4.3935 13.1667 4.66683 13.1667H11.3335C13.2402 13.1667 14.1668 12.24 14.1668 10.3334V5.66671C14.1668 3.76004 13.2402 2.83337 11.3335 2.83337H4.66683C2.76016 2.83337 1.8335 3.76004 1.8335 5.66671C1.8335 5.94004 1.60683 6.16671 1.3335 6.16671C1.06016 6.16671 0.833496 5.94004 0.833496 5.66671C0.833496 3.23337 2.2335 1.83337 4.66683 1.83337H11.3335C13.7668 1.83337 15.1668 3.23337 15.1668 5.66671V10.3334C15.1668 12.7667 13.7668 14.1667 11.3335 14.1667Z" fill=""></path>-->
|
||||
<!-- <path d="M7.99969 8.57998C7.43969 8.57998 6.87302 8.40665 6.43969 8.05331L4.35302 6.38665C4.13969 6.21331 4.09969 5.89998 4.27302 5.68665C4.44636 5.47331 4.75968 5.43332 4.97302 5.60665L7.05969 7.27332C7.56635 7.67998 8.42635 7.67998 8.93302 7.27332L11.0197 5.60665C11.233 5.43332 11.553 5.46665 11.7197 5.68665C11.893 5.89998 11.8597 6.21998 11.6397 6.38665L9.55301 8.05331C9.12635 8.40665 8.55969 8.57998 7.99969 8.57998Z" fill=""></path>-->
|
||||
<!-- <path d="M5.3335 11.5H1.3335C1.06016 11.5 0.833496 11.2733 0.833496 11C0.833496 10.7267 1.06016 10.5 1.3335 10.5H5.3335C5.60683 10.5 5.8335 10.7267 5.8335 11C5.8335 11.2733 5.60683 11.5 5.3335 11.5Z" fill=" "></path>-->
|
||||
<!-- <path d="M3.3335 8.83337H1.3335C1.06016 8.83337 0.833496 8.60671 0.833496 8.33337C0.833496 8.06004 1.06016 7.83337 1.3335 7.83337H3.3335C3.60683 7.83337 3.8335 8.06004 3.8335 8.33337C3.8335 8.60671 3.60683 8.83337 3.3335 8.83337Z" fill=""></path>-->
|
||||
<!-- </svg>-->
|
||||
<!-- </span>-->
|
||||
<!-- <t t-esc="item.name"/>-->
|
||||
<!-- </t>-->
|
||||
<!-- <t t-else="">-->
|
||||
<!-- <t t-esc="item.name"/>-->
|
||||
<!-- </t>-->
|
||||
<!-- </t>-->
|
||||
<!-- <t t-elif="sectionName === 'My Dashboards'">-->
|
||||
<!-- <span class="me-2 dash-dd-icons">-->
|
||||
<!-- <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">-->
|
||||
<!-- <path d="M10.54 13.4533C10.3667 13.4533 10.1867 13.4466 9.99338 13.4266C9.64671 13.4 9.25338 13.3333 8.84671 13.2333L7.72671 12.9666C4.65338 12.24 3.64671 10.6133 4.36671 7.54664L5.02005 4.7533C5.16671 4.11997 5.34005 3.60664 5.55338 3.17997C6.70005 0.813303 8.89338 1.02664 10.4534 1.3933L11.5667 1.6533C13.1267 2.01997 14.1134 2.59997 14.6667 3.48664C15.2134 4.3733 15.3 5.5133 14.9334 7.0733L14.28 9.85997C13.7067 12.3 12.5134 13.4533 10.54 13.4533ZM8.74671 2.16664C7.63338 2.16664 6.92671 2.62664 6.45338 3.6133C6.28005 3.9733 6.12671 4.41997 5.99338 4.97997L5.34005 7.7733C4.74671 10.2933 5.43338 11.3933 7.95338 11.9933L9.07338 12.26C9.43338 12.3466 9.77338 12.4 10.08 12.4266C11.8934 12.6066 12.7934 11.8133 13.3 9.6333L13.9534 6.84664C14.2534 5.55997 14.2134 4.65997 13.8134 4.0133C13.4134 3.36664 12.6267 2.92664 11.3334 2.62664L10.22 2.36664C9.66671 2.2333 9.17338 2.16664 8.74671 2.16664Z" fill=""></path>-->
|
||||
<!-- <path d="M5.55341 14.8334C3.84008 14.8334 2.74674 13.8067 2.04674 11.64L1.19341 9.0067C0.246742 6.07337 1.09341 4.42003 4.01341 3.47337L5.06674 3.13337C5.41341 3.0267 5.67341 2.95337 5.90674 2.91337C6.10007 2.87337 6.28674 2.9467 6.40008 3.10003C6.51341 3.25337 6.53341 3.45337 6.45341 3.6267C6.28008 3.98003 6.12674 4.4267 6.00008 4.9867L5.34674 7.78003C4.75341 10.3 5.44007 11.4 7.96007 12L9.08008 12.2667C9.44007 12.3534 9.78008 12.4067 10.0867 12.4334C10.3001 12.4534 10.4734 12.6 10.5334 12.8067C10.5867 13.0134 10.5067 13.2267 10.3334 13.3467C9.89341 13.6467 9.34008 13.9 8.64008 14.1267L7.58674 14.4734C6.82008 14.7134 6.15341 14.8334 5.55341 14.8334ZM5.18674 4.1467L4.32674 4.4267C1.94674 5.19337 1.38008 6.31337 2.14674 8.70003L3.00008 11.3334C3.77341 13.7134 4.89341 14.2867 7.27341 13.52L8.32674 13.1734C8.36674 13.16 8.40007 13.1467 8.44007 13.1334L7.73341 12.9667C4.66008 12.24 3.65341 10.6134 4.37341 7.5467L5.02674 4.75337C5.07341 4.54003 5.12674 4.33337 5.18674 4.1467Z" fill=""></path>-->
|
||||
<!-- <path d="M11.6599 7.00664C11.6199 7.00664 11.5799 6.99997 11.5332 6.99331L8.29992 6.17331C8.03325 6.10664 7.87325 5.83331 7.93992 5.56664C8.00658 5.29997 8.27992 5.13997 8.54658 5.20664L11.7799 6.02664C12.0466 6.09331 12.2066 6.36664 12.1399 6.63331C12.0866 6.85331 11.8799 7.00664 11.6599 7.00664Z" fill=""></path>-->
|
||||
<!-- <path d="M9.70643 9.25993C9.66643 9.25993 9.62643 9.25326 9.57976 9.2466L7.63976 8.75326C7.37309 8.6866 7.21309 8.41326 7.27976 8.1466C7.34643 7.87993 7.61976 7.71993 7.88643 7.7866L9.82643 8.27993C10.0931 8.3466 10.2531 8.61993 10.1864 8.8866C10.1331 9.11326 9.93309 9.25993 9.70643 9.25993Z" fill=""></path>-->
|
||||
<!-- </svg>-->
|
||||
<!-- </span>-->
|
||||
<!-- <t t-esc="item.name"/>-->
|
||||
<!-- </t>-->
|
||||
<!-- <t t-elif="sectionName === 'Configuration'">-->
|
||||
|
||||
<t t-if="item.name === 'Dashboards'">
|
||||
<span class="me-2 dash-dd-icons">
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M13.18 9.16671H10.4867C9.14667 9.16671 8.5 8.54671 8.5 7.26671V2.73337C8.5 1.45337 9.15333 0.833374 10.4867 0.833374H13.18C14.52 0.833374 15.1667 1.45337 15.1667 2.73337V7.26671C15.1667 8.54671 14.5133 9.16671 13.18 9.16671ZM10.4867 1.83337C9.64 1.83337 9.5 2.06004 9.5 2.73337V7.26671C9.5 7.94004 9.64 8.16671 10.4867 8.16671H13.18C14.0267 8.16671 14.1667 7.94004 14.1667 7.26671V2.73337C14.1667 2.06004 14.0267 1.83337 13.18 1.83337H10.4867Z" fill=""></path>
|
||||
<path d="M13.18 15.1666H10.4867C9.14667 15.1666 8.5 14.5466 8.5 13.2666V12.0666C8.5 10.7866 9.15333 10.1666 10.4867 10.1666H13.18C14.52 10.1666 15.1667 10.7866 15.1667 12.0666V13.2666C15.1667 14.5466 14.5133 15.1666 13.18 15.1666ZM10.4867 11.1666C9.64 11.1666 9.5 11.3933 9.5 12.0666V13.2666C9.5 13.94 9.64 14.1666 10.4867 14.1666H13.18C14.0267 14.1666 14.1667 13.94 14.1667 13.2666V12.0666C14.1667 11.3933 14.0267 11.1666 13.18 11.1666H10.4867Z" fill=""></path>
|
||||
<path d="M5.5135 15.1667H2.82016C1.48016 15.1667 0.833496 14.5467 0.833496 13.2667V8.73337C0.833496 7.45337 1.48683 6.83337 2.82016 6.83337H5.5135C6.8535 6.83337 7.50016 7.45337 7.50016 8.73337V13.2667C7.50016 14.5467 6.84683 15.1667 5.5135 15.1667ZM2.82016 7.83337C1.9735 7.83337 1.8335 8.06004 1.8335 8.73337V13.2667C1.8335 13.94 1.9735 14.1667 2.82016 14.1667H5.5135C6.36016 14.1667 6.50016 13.94 6.50016 13.2667V8.73337C6.50016 8.06004 6.36016 7.83337 5.5135 7.83337H2.82016Z" fill=""></path>
|
||||
<path d="M5.5135 5.83337H2.82016C1.48016 5.83337 0.833496 5.21337 0.833496 3.93337V2.73337C0.833496 1.45337 1.48683 0.833374 2.82016 0.833374H5.5135C6.8535 0.833374 7.50016 1.45337 7.50016 2.73337V3.93337C7.50016 5.21337 6.84683 5.83337 5.5135 5.83337ZM2.82016 1.83337C1.9735 1.83337 1.8335 2.06004 1.8335 2.73337V3.93337C1.8335 4.60671 1.9735 4.83337 2.82016 4.83337H5.5135C6.36016 4.83337 6.50016 4.60671 6.50016 3.93337V2.73337C6.50016 2.06004 6.36016 1.83337 5.5135 1.83337H2.82016Z" fill=""></path>
|
||||
</svg>
|
||||
</span>
|
||||
<t t-esc="item.name"/>
|
||||
</t>
|
||||
<t t-elif="item.name === 'Dashboard Layouts'">
|
||||
<span class="me-2 dash-dd-icons">
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M7.85993 7.91996C7.49993 7.91996 7.13327 7.85329 6.8466 7.72663L2.91327 5.97996C1.91327 5.53329 1.7666 4.93329 1.7666 4.60663C1.7666 4.27996 1.91327 3.67996 2.91327 3.23329L6.8466 1.48663C7.4266 1.22663 8.29994 1.22663 8.87994 1.48663L12.8199 3.23329C13.8133 3.67329 13.9666 4.27996 13.9666 4.60663C13.9666 4.93329 13.8199 5.53329 12.8199 5.97996L8.87994 7.72663C8.5866 7.85996 8.2266 7.91996 7.85993 7.91996ZM7.85993 2.29329C7.63327 2.29329 7.41327 2.32663 7.25327 2.39996L3.31993 4.14663C2.91327 4.33329 2.7666 4.51996 2.7666 4.60663C2.7666 4.69329 2.91327 4.88663 3.31327 5.06663L7.2466 6.81329C7.5666 6.95329 8.1466 6.95329 8.4666 6.81329L12.4066 5.06663C12.8133 4.88663 12.9599 4.69329 12.9599 4.60663C12.9599 4.51996 12.8133 4.32663 12.4066 4.14663L8.47327 2.39996C8.31327 2.33329 8.0866 2.29329 7.85993 2.29329Z" fill="#"></path>
|
||||
<path d="M8 11.3934C7.74667 11.3934 7.49333 11.34 7.25333 11.2334L2.72667 9.22004C2.04 8.92004 1.5 8.08671 1.5 7.33337C1.5 7.06004 1.72667 6.83337 2 6.83337C2.27333 6.83337 2.5 7.06004 2.5 7.33337C2.5 7.70004 2.8 8.16004 3.13333 8.31337L7.66 10.3267C7.87333 10.42 8.12 10.42 8.34 10.3267L12.8667 8.31337C13.2 8.16671 13.5 7.70004 13.5 7.33337C13.5 7.06004 13.7267 6.83337 14 6.83337C14.2733 6.83337 14.5 7.06004 14.5 7.33337C14.5 8.08671 13.96 8.92004 13.2733 9.22671L8.74667 11.24C8.50667 11.34 8.25333 11.3934 8 11.3934Z" fill=""></path>
|
||||
<path d="M8 14.7267C7.74667 14.7267 7.49333 14.6734 7.25333 14.5667L2.72667 12.5534C1.98 12.22 1.5 11.48 1.5 10.66C1.5 10.3867 1.72667 10.16 2 10.16C2.27333 10.16 2.5 10.3934 2.5 10.6667C2.5 11.0867 2.74667 11.4734 3.13333 11.6467L7.66 13.66C7.87333 13.7534 8.12 13.7534 8.34 13.66L12.8667 11.6467C13.2533 11.4734 13.5 11.0934 13.5 10.6667C13.5 10.3934 13.7267 10.1667 14 10.1667C14.2733 10.1667 14.5 10.3934 14.5 10.6667C14.5 11.4867 14.02 12.2267 13.2733 12.56L8.74667 14.5734C8.50667 14.6734 8.25333 14.7267 8 14.7267Z" fill=""></path>
|
||||
</svg>
|
||||
</span>
|
||||
<t t-esc="item.name"/>
|
||||
</t>
|
||||
<t t-elif="item.name === 'Import Dashboards'">
|
||||
<span class="me-2 dash-dd-icons import-svg">
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M6 7.33337V11.3334L7.33333 10" fill=""/>
|
||||
<path d="M6 7.33337V11.3334L7.33333 10" stroke="" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M6.00033 11.3333L4.66699 10" stroke="" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M14.6663 6.66671V10C14.6663 13.3334 13.333 14.6667 9.99967 14.6667H5.99967C2.66634 14.6667 1.33301 13.3334 1.33301 10V6.00004C1.33301 2.66671 2.66634 1.33337 5.99967 1.33337H9.33301" stroke="" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M14.6663 6.66671H11.9997C9.99967 6.66671 9.33301 6.00004 9.33301 4.00004V1.33337L14.6663 6.66671Z" stroke="" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</span>
|
||||
<t t-esc="item.name"/>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<t t-esc="item.name"/>
|
||||
</t>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<t t-esc="item.name"/>
|
||||
</t>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<t t-esc="item.name"/>
|
||||
</t>
|
||||
</DropdownItem>
|
||||
</xpath>
|
||||
</t>
|
||||
<!-- <t t-if="item.name === 'Dashboards'">-->
|
||||
<!-- <span class="me-2 dash-dd-icons">-->
|
||||
<!-- <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">-->
|
||||
<!-- <path d="M13.18 9.16671H10.4867C9.14667 9.16671 8.5 8.54671 8.5 7.26671V2.73337C8.5 1.45337 9.15333 0.833374 10.4867 0.833374H13.18C14.52 0.833374 15.1667 1.45337 15.1667 2.73337V7.26671C15.1667 8.54671 14.5133 9.16671 13.18 9.16671ZM10.4867 1.83337C9.64 1.83337 9.5 2.06004 9.5 2.73337V7.26671C9.5 7.94004 9.64 8.16671 10.4867 8.16671H13.18C14.0267 8.16671 14.1667 7.94004 14.1667 7.26671V2.73337C14.1667 2.06004 14.0267 1.83337 13.18 1.83337H10.4867Z" fill=""></path>-->
|
||||
<!-- <path d="M13.18 15.1666H10.4867C9.14667 15.1666 8.5 14.5466 8.5 13.2666V12.0666C8.5 10.7866 9.15333 10.1666 10.4867 10.1666H13.18C14.52 10.1666 15.1667 10.7866 15.1667 12.0666V13.2666C15.1667 14.5466 14.5133 15.1666 13.18 15.1666ZM10.4867 11.1666C9.64 11.1666 9.5 11.3933 9.5 12.0666V13.2666C9.5 13.94 9.64 14.1666 10.4867 14.1666H13.18C14.0267 14.1666 14.1667 13.94 14.1667 13.2666V12.0666C14.1667 11.3933 14.0267 11.1666 13.18 11.1666H10.4867Z" fill=""></path>-->
|
||||
<!-- <path d="M5.5135 15.1667H2.82016C1.48016 15.1667 0.833496 14.5467 0.833496 13.2667V8.73337C0.833496 7.45337 1.48683 6.83337 2.82016 6.83337H5.5135C6.8535 6.83337 7.50016 7.45337 7.50016 8.73337V13.2667C7.50016 14.5467 6.84683 15.1667 5.5135 15.1667ZM2.82016 7.83337C1.9735 7.83337 1.8335 8.06004 1.8335 8.73337V13.2667C1.8335 13.94 1.9735 14.1667 2.82016 14.1667H5.5135C6.36016 14.1667 6.50016 13.94 6.50016 13.2667V8.73337C6.50016 8.06004 6.36016 7.83337 5.5135 7.83337H2.82016Z" fill=""></path>-->
|
||||
<!-- <path d="M5.5135 5.83337H2.82016C1.48016 5.83337 0.833496 5.21337 0.833496 3.93337V2.73337C0.833496 1.45337 1.48683 0.833374 2.82016 0.833374H5.5135C6.8535 0.833374 7.50016 1.45337 7.50016 2.73337V3.93337C7.50016 5.21337 6.84683 5.83337 5.5135 5.83337ZM2.82016 1.83337C1.9735 1.83337 1.8335 2.06004 1.8335 2.73337V3.93337C1.8335 4.60671 1.9735 4.83337 2.82016 4.83337H5.5135C6.36016 4.83337 6.50016 4.60671 6.50016 3.93337V2.73337C6.50016 2.06004 6.36016 1.83337 5.5135 1.83337H2.82016Z" fill=""></path>-->
|
||||
<!-- </svg>-->
|
||||
<!-- </span>-->
|
||||
<!-- <t t-esc="item.name"/>-->
|
||||
<!-- </t>-->
|
||||
<!-- <t t-elif="item.name === 'Dashboard Layouts'">-->
|
||||
<!-- <span class="me-2 dash-dd-icons">-->
|
||||
<!-- <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">-->
|
||||
<!-- <path d="M7.85993 7.91996C7.49993 7.91996 7.13327 7.85329 6.8466 7.72663L2.91327 5.97996C1.91327 5.53329 1.7666 4.93329 1.7666 4.60663C1.7666 4.27996 1.91327 3.67996 2.91327 3.23329L6.8466 1.48663C7.4266 1.22663 8.29994 1.22663 8.87994 1.48663L12.8199 3.23329C13.8133 3.67329 13.9666 4.27996 13.9666 4.60663C13.9666 4.93329 13.8199 5.53329 12.8199 5.97996L8.87994 7.72663C8.5866 7.85996 8.2266 7.91996 7.85993 7.91996ZM7.85993 2.29329C7.63327 2.29329 7.41327 2.32663 7.25327 2.39996L3.31993 4.14663C2.91327 4.33329 2.7666 4.51996 2.7666 4.60663C2.7666 4.69329 2.91327 4.88663 3.31327 5.06663L7.2466 6.81329C7.5666 6.95329 8.1466 6.95329 8.4666 6.81329L12.4066 5.06663C12.8133 4.88663 12.9599 4.69329 12.9599 4.60663C12.9599 4.51996 12.8133 4.32663 12.4066 4.14663L8.47327 2.39996C8.31327 2.33329 8.0866 2.29329 7.85993 2.29329Z" fill="#"></path>-->
|
||||
<!-- <path d="M8 11.3934C7.74667 11.3934 7.49333 11.34 7.25333 11.2334L2.72667 9.22004C2.04 8.92004 1.5 8.08671 1.5 7.33337C1.5 7.06004 1.72667 6.83337 2 6.83337C2.27333 6.83337 2.5 7.06004 2.5 7.33337C2.5 7.70004 2.8 8.16004 3.13333 8.31337L7.66 10.3267C7.87333 10.42 8.12 10.42 8.34 10.3267L12.8667 8.31337C13.2 8.16671 13.5 7.70004 13.5 7.33337C13.5 7.06004 13.7267 6.83337 14 6.83337C14.2733 6.83337 14.5 7.06004 14.5 7.33337C14.5 8.08671 13.96 8.92004 13.2733 9.22671L8.74667 11.24C8.50667 11.34 8.25333 11.3934 8 11.3934Z" fill=""></path>-->
|
||||
<!-- <path d="M8 14.7267C7.74667 14.7267 7.49333 14.6734 7.25333 14.5667L2.72667 12.5534C1.98 12.22 1.5 11.48 1.5 10.66C1.5 10.3867 1.72667 10.16 2 10.16C2.27333 10.16 2.5 10.3934 2.5 10.6667C2.5 11.0867 2.74667 11.4734 3.13333 11.6467L7.66 13.66C7.87333 13.7534 8.12 13.7534 8.34 13.66L12.8667 11.6467C13.2533 11.4734 13.5 11.0934 13.5 10.6667C13.5 10.3934 13.7267 10.1667 14 10.1667C14.2733 10.1667 14.5 10.3934 14.5 10.6667C14.5 11.4867 14.02 12.2267 13.2733 12.56L8.74667 14.5734C8.50667 14.6734 8.25333 14.7267 8 14.7267Z" fill=""></path>-->
|
||||
<!-- </svg>-->
|
||||
<!-- </span>-->
|
||||
<!-- <t t-esc="item.name"/>-->
|
||||
<!-- </t>-->
|
||||
<!-- <t t-elif="item.name === 'Import Dashboards'">-->
|
||||
<!-- <span class="me-2 dash-dd-icons import-svg">-->
|
||||
<!-- <svg width="16" height="16" viewBox="0 0 16 16" fill="" xmlns="http://www.w3.org/2000/svg">-->
|
||||
<!-- <path d="M6 7.33337V11.3334L7.33333 10" fill=""/>-->
|
||||
<!-- <path d="M6 7.33337V11.3334L7.33333 10" stroke="" stroke-linecap="round" stroke-linejoin="round"/>-->
|
||||
<!-- <path d="M6.00033 11.3333L4.66699 10" stroke="" stroke-linecap="round" stroke-linejoin="round"/>-->
|
||||
<!-- <path d="M14.6663 6.66671V10C14.6663 13.3334 13.333 14.6667 9.99967 14.6667H5.99967C2.66634 14.6667 1.33301 13.3334 1.33301 10V6.00004C1.33301 2.66671 2.66634 1.33337 5.99967 1.33337H9.33301" stroke="" stroke-linecap="round" stroke-linejoin="round"/>-->
|
||||
<!-- <path d="M14.6663 6.66671H11.9997C9.99967 6.66671 9.33301 6.00004 9.33301 4.00004V1.33337L14.6663 6.66671Z" stroke="" stroke-linecap="round" stroke-linejoin="round"/>-->
|
||||
<!-- </svg>-->
|
||||
<!-- </span>-->
|
||||
<!-- <t t-esc="item.name"/>-->
|
||||
<!-- </t>-->
|
||||
<!-- <t t-else="">-->
|
||||
<!-- <t t-esc="item.name"/>-->
|
||||
<!-- </t>-->
|
||||
<!-- </t>-->
|
||||
<!-- <t t-else="">-->
|
||||
<!-- <t t-esc="item.name"/>-->
|
||||
<!-- </t>-->
|
||||
<!-- </t>-->
|
||||
<!-- <t t-else="">-->
|
||||
<!-- <t t-esc="item.name"/>-->
|
||||
<!-- </t>-->
|
||||
<!-- </DropdownItem>-->
|
||||
<!-- </xpath>-->
|
||||
<!-- </t>-->
|
||||
|
||||
<!-- <t t-inherit="web.NavBar.AppsMenu" t-inherit-mode="extension" priority="0">-->
|
||||
<!-- <xpath expr="//t[@t-set-slot='toggler']/i" position="after">-->
|
||||
|
|
|
|||
|
|
@ -334,7 +334,7 @@
|
|||
options="{'no_create': True, 'no_create_edit':True, 'no_open': True}"/>
|
||||
</div>
|
||||
|
||||
<div class="col-6 gap-2 d-flex align-items-center"
|
||||
<div class="col-6 gap-2 d-flex align-items-center xpath_for_ks_semi_circle_chart"
|
||||
invisible="ks_chart_data_count_type == 'count' or ks_model_id == False or
|
||||
ks_dashboard_item_type == 'ks_list_view' or ks_dashboard_item_type not in ['ks_doughnut_chart','ks_pie_chart']">
|
||||
<label for="ks_semi_circle_chart" string="Semi Circle Chart" class="o_form_label"/>
|
||||
|
|
@ -962,6 +962,13 @@
|
|||
<field name="ks_show_data_value"
|
||||
invisible="(ks_dashboard_item_type in ['ks_polarArea_chart','ks_radar_view','ks_flower_view','ks_scatter_chart','ks_radialBar_chart','ks_list_view','ks_map_view'])"/>
|
||||
</div>
|
||||
<div class="col-6 d-flex flex-column gap-2"
|
||||
invisible="(ks_dashboard_item_type not in ['ks_bar_chart','ks_horizontalBar_chart','ks_pie_chart','ks_doughnut_chart'])">
|
||||
<label for="ks_three_d" class="o_form_label"/>
|
||||
<field name="ks_three_d"
|
||||
invisible="(ks_dashboard_item_type not in ['ks_bar_chart','ks_horizontalBar_chart','ks_pie_chart','ks_doughnut_chart'])"/>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-6 d-flex flex-column gap-2" invisible="(ks_dashboard_item_type in ['ks_bar_chart','ks_horizontalBar_chart','ks_line_chart','ks_area_chart',
|
||||
'ks_polarArea_chart','ks_radar_view','ks_flower_view','ks_scatter_chart','ks_radialBar_chart','ks_bullet_chart','ks_list_view','ks_map_view'])or(ks_show_data_value == False)">
|
||||
|
|
|
|||
Loading…
Reference in New Issue