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 = [ ...@@ -30,7 +30,6 @@ const designsStore = [
const defaultClient = createDefaultClient({ const defaultClient = createDefaultClient({
defaults: { defaults: {
designs: designsStore, designs: designsStore,
canUploadDesign: true,
}, },
resolvers: { resolvers: {
Query: { Query: {
......
...@@ -6,6 +6,7 @@ import apolloProvider from './graphql'; ...@@ -6,6 +6,7 @@ import apolloProvider from './graphql';
export default () => { export default () => {
const el = document.getElementById('js-design-management'); const el = document.getElementById('js-design-management');
const { issueIid, projectPath } = el.dataset;
$('.js-issue-tabs').on('shown.bs.tab', ({ target: { id } }) => { $('.js-issue-tabs').on('shown.bs.tab', ({ target: { id } }) => {
if (id === 'designs' && router.currentRoute.name === 'root') { if (id === 'designs' && router.currentRoute.name === 'root') {
...@@ -17,8 +18,8 @@ export default () => { ...@@ -17,8 +18,8 @@ export default () => {
apolloProvider.clients.defaultClient.cache.writeData({ apolloProvider.clients.defaultClient.cache.writeData({
data: { data: {
projectFullPath: el.dataset.projectPath, projectPath,
issueIid: el.dataset.issueIid, issueIid,
}, },
}); });
......
...@@ -19,8 +19,8 @@ export default { ...@@ -19,8 +19,8 @@ export default {
appData: { appData: {
query: appDataQuery, query: appDataQuery,
manual: true, manual: true,
result({ data: { projectFullPath, issueIid } }) { result({ data: { projectPath, issueIid } }) {
this.projectFullPath = projectFullPath; this.projectPath = projectPath;
this.issueIid = issueIid; this.issueIid = issueIid;
}, },
}, },
...@@ -34,7 +34,7 @@ export default { ...@@ -34,7 +34,7 @@ export default {
query: permissionsQuery, query: permissionsQuery,
variables() { variables() {
return { return {
fullPath: this.projectFullPath, fullPath: this.projectPath,
iid: this.issueIid, iid: this.issueIid,
}; };
}, },
...@@ -47,7 +47,7 @@ export default { ...@@ -47,7 +47,7 @@ export default {
permissions: {}, permissions: {},
error: false, error: false,
isSaving: false, isSaving: false,
projectFullPath: '', projectPath: '',
issueIid: null, issueIid: null,
}; };
}, },
......
query projectFullPath { query projectFullPath {
projectFullPath @client projectPath @client
issueIid @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