mirror of
https://github.com/qlik-oss/PLSmartPivot.git
synced 2025-12-19 18:27:32 -05:00
fix: enable export as xls options on qcs
This commit is contained in:
14
src/index.js
14
src/index.js
@@ -2,7 +2,6 @@ import definition from "./definition";
|
|||||||
import { exportXLS } from "./excel-export";
|
import { exportXLS } from "./excel-export";
|
||||||
import { initializeDataCube, initializeDesignList } from "./dataset";
|
import { initializeDataCube, initializeDesignList } from "./dataset";
|
||||||
import initializeStore from "./store";
|
import initializeStore from "./store";
|
||||||
import qlik from "qlik";
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import ReactDOM from "react-dom";
|
import ReactDOM from "react-dom";
|
||||||
import Root from "./root.jsx";
|
import Root from "./root.jsx";
|
||||||
@@ -105,18 +104,7 @@ export default {
|
|||||||
);
|
);
|
||||||
return snapshotLayout;
|
return snapshotLayout;
|
||||||
},
|
},
|
||||||
async getContextMenu (obj, menu) {
|
getContextMenu (obj, menu) {
|
||||||
const app = qlik.currApp(this);
|
|
||||||
const isPersonalResult = await app.global.isPersonalMode();
|
|
||||||
// This check is done because the desktop wrapper blocks downloads.
|
|
||||||
// It also blocks this feature in QCS currently as isPersonalMode returns true
|
|
||||||
if (
|
|
||||||
!this.$scope.layout.allowexportxls ||
|
|
||||||
(isPersonalResult && isPersonalResult.qReturn)
|
|
||||||
) {
|
|
||||||
return menu;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.backendApi.model.layout.qMeta.privileges.indexOf('exportdata') !== -1) {
|
if (this.backendApi.model.layout.qMeta.privileges.indexOf('exportdata') !== -1) {
|
||||||
menu.addItem({
|
menu.addItem({
|
||||||
translation: 'Export as XLS',
|
translation: 'Export as XLS',
|
||||||
|
|||||||
@@ -2,10 +2,11 @@ const StyleLintPlugin = require('stylelint-webpack-plugin');
|
|||||||
const packageJSON = require('./package.json');
|
const packageJSON = require('./package.json');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
|
||||||
const DIST = path.resolve("./dist");
|
const DIST = path.resolve('./dist');
|
||||||
|
// eslint-disable-next-line no-process-env
|
||||||
const MODE = process.env.NODE_ENV || 'development';
|
const MODE = process.env.NODE_ENV || 'development';
|
||||||
const SOURCE_MAP = 'sourec-map';
|
const SOURCE_MAP = 'source-map';
|
||||||
const DEVTOOL = (process.env.NODE_ENV === 'development') ? SOURCE_MAP : false;
|
const DEVTOOL = MODE === 'development' ? SOURCE_MAP : false;
|
||||||
|
|
||||||
console.log('Webpack mode:', MODE); // eslint-disable-line no-console
|
console.log('Webpack mode:', MODE); // eslint-disable-line no-console
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user