Commit 00b835ba authored by Phil Hughes's avatar Phil Hughes Committed by Fatih Acet

Props use objects with required & type values

parent 103c78f1
......@@ -6,9 +6,24 @@
window.gl.issueBoards = window.gl.issueBoards || {};
gl.issueBoards.IssueCardInner = Vue.extend({
props: [
'issue', 'issueLinkBase', 'list', 'rootPath',
],
props: {
issue: {
type: Object,
required: true,
},
issueLinkBase: {
type: String,
required: true,
},
list: {
type: Object,
required: false,
},
rootPath: {
type: String,
required: true,
},
},
methods: {
showLabel(label) {
if (!this.list) return true;
......
......@@ -6,9 +6,16 @@
data() {
return ModalStore.store;
},
props: [
'image', 'newIssuePath',
],
props: {
image: {
type: String,
required: true,
},
newIssuePath: {
type: String,
required: true,
},
},
computed: {
contents() {
const obj = {
......
......@@ -41,7 +41,7 @@
},
},
components: {
listsDropdown: gl.issueBoards.ModalFooterListsDropdown,
'lists-dropdown': gl.issueBoards.ModalFooterListsDropdown,
},
template: `
<footer
......
......@@ -24,7 +24,7 @@
},
},
components: {
modalTabs: gl.issueBoards.ModalTabs,
'modal-tabs': gl.issueBoards.ModalTabs,
},
template: `
<div>
......
......@@ -8,10 +8,24 @@
const ModalStore = gl.issueBoards.ModalStore;
gl.issueBoards.IssuesModal = Vue.extend({
props: [
'blankStateImage', 'newIssuePath', 'issueLinkBase',
'rootPath',
],
props: {
blankStateImage: {
type: String,
required: true,
},
newIssuePath: {
type: String,
required: true,
},
issueLinkBase: {
type: String,
required: true,
},
rootPath: {
type: String,
required: true,
},
},
data() {
return ModalStore.store;
},
......@@ -76,10 +90,10 @@
},
},
components: {
modalHeader: gl.issueBoards.IssuesModalHeader,
modalList: gl.issueBoards.ModalList,
modalFooter: gl.issueBoards.ModalFooter,
emptyState: gl.issueBoards.ModalEmptyState,
'modal-header': gl.issueBoards.IssuesModalHeader,
'modal-list': gl.issueBoards.ModalList,
'modal-footer': gl.issueBoards.ModalFooter,
'empty-state': gl.issueBoards.ModalEmptyState,
},
template: `
<div
......
......@@ -6,9 +6,16 @@
const ModalStore = gl.issueBoards.ModalStore;
gl.issueBoards.ModalList = Vue.extend({
props: [
'issueLinkBase', 'rootPath',
],
props: {
issueLinkBase: {
type: String,
required: true,
},
rootPath: {
type: String,
required: true,
},
},
data() {
return ModalStore.store;
},
......@@ -94,7 +101,7 @@
this.destroyMasonry();
},
components: {
issueCardInner: gl.issueBoards.IssueCardInner,
'issue-card-inner': gl.issueBoards.IssueCardInner,
},
template: `
<section
......
......@@ -6,9 +6,16 @@
window.gl.issueBoards = window.gl.issueBoards || {};
gl.issueBoards.RemoveIssueBtn = Vue.extend({
props: [
'issue', 'list',
],
props: {
issue: {
type: Object,
required: true,
},
list: {
type: Object,
required: true,
},
},
methods: {
removeIssue() {
const lists = this.issue.getLists();
......
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