Skip to content

Commit

Permalink
Merge pull request #92 from qlik-oss/fcy/QB-5202
Browse files Browse the repository at this point in the history
fix: enable Export as XLS option on qcs
  • Loading branch information
jjxie authored Jun 23, 2021
2 parents 092b89d + 315191c commit 467948a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
12 changes: 2 additions & 10 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import definition from "./definition";
import { exportXLS } from "./excel-export";
import { initializeDataCube, initializeDesignList } from "./dataset";
import initializeStore from "./store";
import qlik from "qlik";
import React from "react";
import ReactDOM from "react-dom";
import Root from "./root.jsx";
Expand Down Expand Up @@ -105,15 +104,8 @@ export default {
);
return snapshotLayout;
},
async 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)
) {
getContextMenu (obj, menu) {
if (!this.$scope.layout.allowexportxls) {
return menu;
}

Expand Down
5 changes: 3 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ const packageJSON = require('./package.json');
const path = require('path');

const DIST = path.resolve("./dist");
// eslint-disable-next-line no-process-env
const MODE = process.env.NODE_ENV || 'development';
const SOURCE_MAP = 'sourec-map';
const DEVTOOL = (process.env.NODE_ENV === 'development') ? SOURCE_MAP : false;
const SOURCE_MAP = 'source-map';
const DEVTOOL = MODE === 'development' ? SOURCE_MAP : false;

console.log('Webpack mode:', MODE); // eslint-disable-line no-console

Expand Down

0 comments on commit 467948a

Please sign in to comment.