Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
DBRepo
Manage
Activity
Members
Labels
Plan
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FAIR Data Austria DB Repository
DBRepo
Commits
663f19d3
Verified
Commit
663f19d3
authored
Apr 6, 2021
by
Kirill Stytsenko
Browse files
Options
Downloads
Patches
Plain Diff
Table create/list components
parent
ce14cfbb
Branches
Branches containing commit
Tags
Tags containing commit
4 merge requests
!23
Sprint results
,
!18
Merge Conflicts
,
!15
Sprint ended, merge into master
,
!13
UI Database/Tables CRUD
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
fda-ui/components/TableCreate.vue
+72
-0
72 additions, 0 deletions
fda-ui/components/TableCreate.vue
fda-ui/components/TableList.vue
+11
-0
11 additions, 0 deletions
fda-ui/components/TableList.vue
fda-ui/pages/tables.vue
+6
-1
6 additions, 1 deletion
fda-ui/pages/tables.vue
with
89 additions
and
1 deletion
fda-ui/components/TableCreate.vue
0 → 100644
+
72
−
0
View file @
663f19d3
<
template
>
<v-card>
<v-card-title>
Create Table
</v-card-title>
<v-card-subtitle>
Table is not created until the "Create Table" button is pressed.
</v-card-subtitle>
<v-card-text>
<v-btn
@
click=
"addColumn"
>
Add Column
</v-btn>
</v-card-text>
<v-card-text
v-for=
"(c, idx) in columns"
:key=
"idx"
class=
"pa-3"
>
<v-row
class=
"column pa-2 ml-1 mr-1"
>
<v-col
cols=
"3"
>
<v-text-field
v-model=
"c.name"
required
label=
"Name"
/>
</v-col>
<v-col
cols=
"3"
>
<v-select
v-model=
"c.type"
:items=
"columnTypes"
item-value=
"value"
required
label=
"Data Type"
/>
</v-col>
<v-spacer
/>
<v-btn
title=
"Remove column"
outlined
icon
@
click=
"removeColumn(idx)"
>
<v-icon>
mdi-minus
</v-icon>
</v-btn>
</v-row>
</v-card-text>
<v-card-actions>
<v-spacer
/>
<v-btn>
Create Table
</v-btn>
</v-card-actions>
</v-card>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
columns
:
[],
columnTypes
:
[
{
value
:
'
varchar
'
,
text
:
'
VARCHAR
'
}
]
}
},
methods
:
{
addColumn
()
{
this
.
columns
.
push
({
// default column
name
:
'
myColumn
'
,
type
:
'
varchar
'
})
},
removeColumn
(
idx
)
{
this
.
columns
.
splice
(
idx
,
1
)
}
}
}
</
script
>
<
style
>
.column
{
border
:
1px
solid
#ccc
;
border-radius
:
3px
;
}
</
style
>
This diff is collapsed.
Click to expand it.
fda-ui/components/TableList.vue
0 → 100644
+
11
−
0
View file @
663f19d3
<
template
>
<div>
List of Tables
</div>
</
template
>
<
script
>
</
script
>
<
style
>
</
style
>
This diff is collapsed.
Click to expand it.
fda-ui/pages/tables.vue
+
6
−
1
View file @
663f19d3
...
...
@@ -3,14 +3,19 @@
<h3>
Tables
</h3>
...
<TableList
/>
<TableCreate
/>
</div>
</
template
>
<
script
>
import
TableList
from
'
@/components/TableList
'
import
TableCreate
from
'
@/components/TableCreate
'
export
default
{
name
:
'
Tables
'
,
components
:
{
TableList
,
TableCreate
},
data
()
{
return
{}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment