Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
SIGPUBLIC
unantes-orientation-active
Commits
aa43fe21
Commit
aa43fe21
authored
Apr 19, 2021
by
Kevin Robert
Browse files
UNOTOPLYS-193 : Mise en place de la suppression d'une variable via la liste des variables.
parent
cc8561e7
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/main/webapp/app/views/variable/variable-list.component.ts
View file @
aa43fe21
...
...
@@ -3,10 +3,13 @@ import Component from 'vue-class-component';
import
HeaderService
from
'
@/shared/service/header-service
'
;
import
VariableService
from
'
@/entities/variable/variable.service
'
;
import
Toolbar
from
'
@/components/toolbar/toolbar.vue
'
;
import
Icon
from
'
@/components/icon/icon.vue
'
;
import
{
IVariable
}
from
"
@/shared/model/variable.model
"
;
@
Component
({
components
:
{
Toolbar
,
Icon
},
})
export
default
class
VariableList
extends
Vue
{
...
...
@@ -20,7 +23,7 @@ export default class VariableList extends Vue {
@
Inject
(
'
headerService
'
)
private
headerService
:
()
=>
HeaderService
;
public
variables
:
any
[]
=
[];
public
variables
:
IVariable
[]
=
[];
public
idForm
:
string
=
''
;
...
...
@@ -50,4 +53,9 @@ export default class VariableList extends Vue {
public
createVariablePath
():
string
{
return
`/admin/workspace/
${
this
.
idWorkspace
}
/form/
${
this
.
idForm
}
/variable/creation`
;
}
public
deleteVariable
(
variable
:
IVariable
)
{
this
.
variables
=
this
.
variables
.
filter
(
value
=>
value
.
id
!==
variable
.
id
);
this
.
variableService
().
delete
(
variable
.
id
);
}
}
src/main/webapp/app/views/variable/variable-list.vue
View file @
aa43fe21
...
...
@@ -8,6 +8,7 @@
<th
class=
"p-2 text-left"
v-text=
"$t('variable.id')"
>
ID
</th>
<th
class=
"p-2 text-left"
v-text=
"$t('variable.name')"
>
Nom
</th>
<th
class=
"p-2 text-left"
v-text=
"$t('variable.reference')"
>
Réference
</th>
<th
class=
"p-2 text-center"
v-text=
"$t('variable.actions')"
>
Actions
</th>
</tr>
</thead>
<tbody>
...
...
@@ -21,6 +22,11 @@
<td
class=
"p-2"
>
<a
:href=
"getVariableEditLink(variable.id)"
>
{{
variable
.
reference
}}
</a>
</td>
<td
class=
"p-2"
>
<button
class=
"flex items-center p-2 text-red-600 transition ml-auto mr-auto hover:bg-red-600 focus:ring hover:text-red-100"
@
click=
"deleteVariable(variable)"
>
<icon
name=
"trash"
></icon>
</button>
</td>
</tr>
</tbody>
</table>
...
...
src/main/webapp/i18n/fr/variable.json
View file @
aa43fe21
...
...
@@ -45,6 +45,7 @@
"name"
:
"Nom"
,
"reference"
:
"Référence"
,
"description"
:
"Description"
,
"expression"
:
"Expression"
"expression"
:
"Expression"
,
"actions"
:
"Actions"
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment