Skip to content

Commit 426679f

Browse files
authored
Merge pull request #499 from hms-dbmi/I2B2UI-978-Admin_LDS_can_create/edit/rename/delete_global_template
I2B2UI-978 - Admin + LDS can create/edit/delete global template for t…
2 parents c8e1d93 + 44e2523 commit 426679f

16 files changed

+39
-34
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
{
22
"files": {
33
"main.css": "./static/css/main.24d818c6.chunk.css",
4-
"main.js": "./static/js/main.e570f09d.chunk.js",
5-
"main.js.map": "./static/js/main.e570f09d.chunk.js.map",
4+
"main.js": "./static/js/main.3d0edc6c.chunk.js",
5+
"main.js.map": "./static/js/main.3d0edc6c.chunk.js.map",
66
"runtime-main.js": "./static/js/runtime-main.83773d48.js",
77
"runtime-main.js.map": "./static/js/runtime-main.83773d48.js.map",
88
"static/css/2.fda85d5a.chunk.css": "./static/css/2.fda85d5a.chunk.css",
9-
"static/js/2.c9d8e3ef.chunk.js": "./static/js/2.c9d8e3ef.chunk.js",
10-
"static/js/2.c9d8e3ef.chunk.js.map": "./static/js/2.c9d8e3ef.chunk.js.map",
9+
"static/js/2.70bce4d4.chunk.js": "./static/js/2.70bce4d4.chunk.js",
10+
"static/js/2.70bce4d4.chunk.js.map": "./static/js/2.70bce4d4.chunk.js.map",
1111
"index.html": "./index.html",
12-
"precache-manifest.bc32cc94575fc30a63da3c48a36fef5f.js": "./precache-manifest.bc32cc94575fc30a63da3c48a36fef5f.js",
12+
"precache-manifest.b19cb6dfea6c0672e19c44bd653fd817.js": "./precache-manifest.b19cb6dfea6c0672e19c44bd653fd817.js",
1313
"service-worker.js": "./service-worker.js",
1414
"static/css/2.fda85d5a.chunk.css.map": "./static/css/2.fda85d5a.chunk.css.map",
1515
"static/css/main.24d818c6.chunk.css.map": "./static/css/main.24d818c6.chunk.css.map",
16-
"static/js/2.c9d8e3ef.chunk.js.LICENSE.txt": "./static/js/2.c9d8e3ef.chunk.js.LICENSE.txt",
17-
"static/js/main.e570f09d.chunk.js.LICENSE.txt": "./static/js/main.e570f09d.chunk.js.LICENSE.txt",
16+
"static/js/2.70bce4d4.chunk.js.LICENSE.txt": "./static/js/2.70bce4d4.chunk.js.LICENSE.txt",
17+
"static/js/main.3d0edc6c.chunk.js.LICENSE.txt": "./static/js/main.3d0edc6c.chunk.js.LICENSE.txt",
1818
"static/media/300.css": "./static/media/roboto-vietnamese-300-normal.e7bcf4c4.woff2",
1919
"static/media/400.css": "./static/media/roboto-vietnamese-400-normal.d0ef1c16.woff2",
2020
"static/media/500.css": "./static/media/roboto-vietnamese-500-normal.f3919306.woff",
@@ -23,8 +23,8 @@
2323
"entrypoints": [
2424
"static/js/runtime-main.83773d48.js",
2525
"static/css/2.fda85d5a.chunk.css",
26-
"static/js/2.c9d8e3ef.chunk.js",
26+
"static/js/2.70bce4d4.chunk.js",
2727
"static/css/main.24d818c6.chunk.css",
28-
"static/js/main.e570f09d.chunk.js"
28+
"static/js/main.3d0edc6c.chunk.js"
2929
]
3030
}
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><script src="i2b2-loader.js"></script><title>Data Export</title><link href="./static/css/2.fda85d5a.chunk.css" rel="stylesheet"><link href="./static/css/main.24d818c6.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(e){function t(t){for(var n,a,l=t[0],p=t[1],f=t[2],c=0,s=[];c<l.length;c++)a=l[c],Object.prototype.hasOwnProperty.call(o,a)&&o[a]&&s.push(o[a][0]),o[a]=0;for(n in p)Object.prototype.hasOwnProperty.call(p,n)&&(e[n]=p[n]);for(i&&i(t);s.length;)s.shift()();return u.push.apply(u,f||[]),r()}function r(){for(var e,t=0;t<u.length;t++){for(var r=u[t],n=!0,l=1;l<r.length;l++){var p=r[l];0!==o[p]&&(n=!1)}n&&(u.splice(t--,1),e=a(a.s=r[0]))}return e}var n={},o={1:0},u=[];function a(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,a),r.l=!0,r.exports}a.m=e,a.c=n,a.d=function(e,t,r){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(a.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)a.d(r,n,function(t){return e[t]}.bind(null,n));return r},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="./";var l=this.webpackJsonpData_Export=this.webpackJsonpData_Export||[],p=l.push.bind(l);l.push=t,l=l.slice();for(var f=0;f<l.length;f++)t(l[f]);var i=p;r()}([])</script><script src="./static/js/2.c9d8e3ef.chunk.js"></script><script src="./static/js/main.e570f09d.chunk.js"></script></body></html>
1+
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><script src="i2b2-loader.js"></script><title>Data Export</title><link href="./static/css/2.fda85d5a.chunk.css" rel="stylesheet"><link href="./static/css/main.24d818c6.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(e){function t(t){for(var n,a,l=t[0],p=t[1],f=t[2],c=0,s=[];c<l.length;c++)a=l[c],Object.prototype.hasOwnProperty.call(o,a)&&o[a]&&s.push(o[a][0]),o[a]=0;for(n in p)Object.prototype.hasOwnProperty.call(p,n)&&(e[n]=p[n]);for(i&&i(t);s.length;)s.shift()();return u.push.apply(u,f||[]),r()}function r(){for(var e,t=0;t<u.length;t++){for(var r=u[t],n=!0,l=1;l<r.length;l++){var p=r[l];0!==o[p]&&(n=!1)}n&&(u.splice(t--,1),e=a(a.s=r[0]))}return e}var n={},o={1:0},u=[];function a(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,a),r.l=!0,r.exports}a.m=e,a.c=n,a.d=function(e,t,r){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(a.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)a.d(r,n,function(t){return e[t]}.bind(null,n));return r},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="./";var l=this.webpackJsonpData_Export=this.webpackJsonpData_Export||[],p=l.push.bind(l);l.push=t,l=l.slice();for(var f=0;f<l.length;f++)t(l[f]);var i=p;r()}([])</script><script src="./static/js/2.70bce4d4.chunk.js"></script><script src="./static/js/main.3d0edc6c.chunk.js"></script></body></html>

plugins/edu/harvard/catalyst/data-export/build/precache-manifest.bc32cc94575fc30a63da3c48a36fef5f.js plugins/edu/harvard/catalyst/data-export/build/precache-manifest.b19cb6dfea6c0672e19c44bd653fd817.js

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
self.__precacheManifest = (self.__precacheManifest || []).concat([
22
{
3-
"revision": "c7c6be3a72c13fad98c878e96bd4ffec",
3+
"revision": "ce0a19b4aab5aa2955e34289f2fb7b97",
44
"url": "./index.html"
55
},
66
{
7-
"revision": "c0f85650e4e2ee32fd43",
7+
"revision": "e71b8f211a4a762a61af",
88
"url": "./static/css/2.fda85d5a.chunk.css"
99
},
1010
{
11-
"revision": "11337aa323d474322201",
11+
"revision": "5319c11ce5f3d5cdba54",
1212
"url": "./static/css/main.24d818c6.chunk.css"
1313
},
1414
{
15-
"revision": "c0f85650e4e2ee32fd43",
16-
"url": "./static/js/2.c9d8e3ef.chunk.js"
15+
"revision": "e71b8f211a4a762a61af",
16+
"url": "./static/js/2.70bce4d4.chunk.js"
1717
},
1818
{
1919
"revision": "689dfd2dbb426bfe52696030322c1c8d",
20-
"url": "./static/js/2.c9d8e3ef.chunk.js.LICENSE.txt"
20+
"url": "./static/js/2.70bce4d4.chunk.js.LICENSE.txt"
2121
},
2222
{
23-
"revision": "11337aa323d474322201",
24-
"url": "./static/js/main.e570f09d.chunk.js"
23+
"revision": "5319c11ce5f3d5cdba54",
24+
"url": "./static/js/main.3d0edc6c.chunk.js"
2525
},
2626
{
2727
"revision": "4e0e34f265fae8f33b01b27ae29d9d6f",
28-
"url": "./static/js/main.e570f09d.chunk.js.LICENSE.txt"
28+
"url": "./static/js/main.3d0edc6c.chunk.js.LICENSE.txt"
2929
},
3030
{
3131
"revision": "db66f1026b2c7490265d",

plugins/edu/harvard/catalyst/data-export/build/service-worker.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js");
1515

1616
importScripts(
17-
"./precache-manifest.bc32cc94575fc30a63da3c48a36fef5f.js"
17+
"./precache-manifest.b19cb6dfea6c0672e19c44bd653fd817.js"
1818
);
1919

2020
self.addEventListener('message', (event) => {

plugins/edu/harvard/catalyst/data-export/build/static/js/2.c9d8e3ef.chunk.js plugins/edu/harvard/catalyst/data-export/build/static/js/2.70bce4d4.chunk.js

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugins/edu/harvard/catalyst/data-export/build/static/js/2.c9d8e3ef.chunk.js.map plugins/edu/harvard/catalyst/data-export/build/static/js/2.70bce4d4.chunk.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugins/edu/harvard/catalyst/data-export/build/static/js/main.3d0edc6c.chunk.js

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugins/edu/harvard/catalyst/data-export/build/static/js/main.3d0edc6c.chunk.js.map

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugins/edu/harvard/catalyst/data-export/build/static/js/main.e570f09d.chunk.js

-3
This file was deleted.

plugins/edu/harvard/catalyst/data-export/build/static/js/main.e570f09d.chunk.js.map

-1
This file was deleted.

plugins/edu/harvard/catalyst/data-export/src/components/LoadTableModal/index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export const LoadTableModal = ({open, handleClose, handleSetScreen}) => {
1919
const { sharedRows, userRows, statusInfo, isFetching, isDeleting, deleteStatusInfo} = useSelector((state) => state.tableListing);
2020
const [tab, setTab] = React.useState(0);
2121
const [selectedTable, setSelectedTable] = useState(null);
22+
const { isAdmin } = useSelector((state) => state.userInfo);
2223

2324

2425
const handleChangeTab = (event, newValue) => { setTab(newValue); };
@@ -92,7 +93,7 @@ export const LoadTableModal = ({open, handleClose, handleSetScreen}) => {
9293
>
9394
<TableListing id={"loadModalDefTableGlobal"}
9495
rows={sharedRows}
95-
canRename={false}
96+
canRename={isAdmin}
9697
onSelect={setSelectedTable}
9798
hasError={statusInfo.status==='FAIL'}
9899
isLoading={isFetching || isDeleting}

plugins/edu/harvard/catalyst/data-export/src/components/SaveTableModal/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ export const SaveTableModal = ({open, handleClose}) => {
189189
<TableListing
190190
id={"saveModalDefTableGlobal"}
191191
rows={sharedRows}
192-
canRename={false}
192+
canRename={isAdmin}
193193
onSelect={onRowSelect}
194194
selectionModel={selectedRows}
195195
hasError={statusInfo.status==='FAIL'}

plugins/edu/harvard/catalyst/data-export/src/components/TableListing/index.js

+7-3
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,11 @@ export const TableListing = ({id, rows, canRename, onSelect, onSelectionModelCha
121121
disableReorder: true,
122122
type: 'number'
123123
},
124-
{
124+
];
125+
126+
//add rename and delete icons if user has rename privileges
127+
if(canRename){
128+
columns.push({
125129
field: 'actions',
126130
type: 'actions',
127131
width: 77,
@@ -163,8 +167,8 @@ export const TableListing = ({id, rows, canRename, onSelect, onSelectionModelCha
163167
/>,
164168
];
165169
},
166-
},
167-
];
170+
});
171+
}
168172

169173
function handleOnSelectionModelChange(selection, {api} ) {
170174
if (selection.length > 0) onSelect(api.getRow(selection[0]));

plugins/edu/harvard/catalyst/data-export/src/sagas/saveTableSaga.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const setTableRequest = (rows, title, creator_id, shared, id) => {
1818
};
1919

2020
if(id !== undefined) {
21-
data.table_id_attr = "id= " + id;
21+
data.table_id_attr = 'id="' + id + '"';
2222
}else{
2323
data.table_id_attr = "";
2424
}

0 commit comments

Comments
 (0)