Commit 00639265 authored by Phil Hughes's avatar Phil Hughes Committed by Bob Van Landuyt

Removed cached local canUploadDesign state

Changed some variable names
parent 592a5273
......@@ -30,7 +30,6 @@ const designsStore = [
const defaultClient = createDefaultClient({
defaults: {
designs: designsStore,
canUploadDesign: true,
},
resolvers: {
Query: {
......
......@@ -6,6 +6,7 @@ import apolloProvider from './graphql';
export default () => {
const el = document.getElementById('js-design-management');
const { issueIid, projectPath } = el.dataset;
$('.js-issue-tabs').on('shown.bs.tab', ({ target: { id } }) => {
if (id === 'designs' && router.currentRoute.name === 'root') {
......@@ -17,8 +18,8 @@ export default () => {
apolloProvider.clients.defaultClient.cache.writeData({
data: {
projectFullPath: el.dataset.projectPath,
issueIid: el.dataset.issueIid,
projectPath,
issueIid,
},
});
......
......@@ -19,8 +19,8 @@ export default {
appData: {
query: appDataQuery,
manual: true,
result({ data: { projectFullPath, issueIid } }) {
this.projectFullPath = projectFullPath;
result({ data: { projectPath, issueIid } }) {
this.projectPath = projectPath;
this.issueIid = issueIid;
},
},
......@@ -34,7 +34,7 @@ export default {
query: permissionsQuery,
variables() {
return {
fullPath: this.projectFullPath,
fullPath: this.projectPath,
iid: this.issueIid,
};
},
......@@ -47,7 +47,7 @@ export default {
permissions: {},
error: false,
isSaving: false,
projectFullPath: '',
projectPath: '',
issueIid: null,
};
},
......
query projectFullPath {
projectFullPath @client
projectPath @client
issueIid @client
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment