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
9bf8ead9
Commit
9bf8ead9
authored
Apr 13, 2021
by
Julien BOUYER
Browse files
UNOTOPLYS-164 feat(screen) : ajout d'un écran
parent
edfbb84d
Changes
9
Hide whitespace changes
Inline
Side-by-side
src/main/webapp/app/components/panel/panel-screen/panel-screen.component.ts
View file @
9bf8ead9
...
...
@@ -24,4 +24,12 @@ export default class Panel extends Vue {
current
:
true
,
},
];
public
get
idWorkspace
():
string
{
return
this
.
$store
.
getters
.
idWorkspace
;
}
public
get
idForm
():
string
{
return
this
.
$store
.
getters
.
idForm
;
}
}
src/main/webapp/app/components/panel/panel-screen/panel-screen.vue
View file @
9bf8ead9
...
...
@@ -2,12 +2,13 @@
<aside
class=
"bg-white border-r"
>
<div
class=
"sticky top-0 left-0"
>
<div
class=
"flex items-center mb-2 border-b"
>
<
button
<
router-link
class=
"flex items-center flex-grow p-2 text-sm text-blue-600 transition border-r hover:bg-blue-600 hover:text-white focus:ring hover:border-blue-600"
:to=
"
{ name: 'ScreenCreateComponent', params: { idWorkspace: idWorkspace, idForm: idForm } }"
>
<icon
name=
"add"
/>
<span
class=
"ml-2"
>
Ajouter un écran
</span>
</
button
>
<span
class=
"ml-2"
v-text=
"$t('screen.add')"
>
</span>
</
router-link
>
<button
class=
"flex items-center p-2 text-red-600 transition hover:bg-red-600 focus:ring hover:text-red-100"
>
<icon
name=
"trash"
/>
</button>
...
...
src/main/webapp/app/shared/config/config.ts
View file @
9bf8ead9
...
...
@@ -7,6 +7,8 @@ import VueCookie from 'vue-cookie';
import
Vue2Filters
from
'
vue2-filters
'
;
import
{
formStore
}
from
'
@/shared/config/store/admin/form-store
'
;
import
{
screenStore
}
from
'
@/shared/config/store/admin/screen-store
'
;
import
{
workspaceStore
}
from
'
@/shared/config/store/admin/workspace-store
'
;
import
{
accountStore
}
from
'
@/shared/config/store/common/account-store
'
;
import
{
alertStore
}
from
'
@/shared/config/store/common/alert-store
'
;
import
{
translationStore
}
from
'
@/shared/config/store/common/translation-store
'
;
...
...
@@ -61,6 +63,8 @@ export function initVueXStore(vue) {
return
new
Vuex
.
Store
({
modules
:
{
formStore
,
screenStore
,
workspaceStore
,
accountStore
,
alertStore
,
translationStore
,
...
...
src/main/webapp/app/shared/config/store/admin/form-store.ts
View file @
9bf8ead9
...
...
@@ -2,25 +2,20 @@ import { Module } from 'vuex';
export
const
formStore
:
Module
<
any
,
any
>
=
{
state
:
{
idForm
:
0
,
form
:
null
,
screen
:
null
,
screenList
:
[],
},
getters
:
{
idForm
:
state
=>
state
.
idForm
,
form
:
state
=>
state
.
form
,
screen
:
state
=>
state
.
screen
,
screenList
:
state
=>
state
.
screenList
,
},
actions
:
{},
mutations
:
{
setIdForm
(
state
,
idForm
)
{
state
.
idForm
=
idForm
;
},
setForm
(
state
,
form
)
{
state
.
form
=
form
;
},
setScreen
(
state
,
screen
)
{
state
.
screen
=
screen
;
},
setScreenList
(
state
,
screenList
)
{
state
.
screenList
=
screenList
;
},
},
};
src/main/webapp/app/shared/config/store/admin/screen-store.ts
0 → 100644
View file @
9bf8ead9
import
{
Module
}
from
'
vuex
'
;
export
const
screenStore
:
Module
<
any
,
any
>
=
{
state
:
{
screen
:
null
,
screenList
:
[],
},
getters
:
{
screen
:
state
=>
state
.
screen
,
screenList
:
state
=>
state
.
screenList
,
},
actions
:
{},
mutations
:
{
setScreen
(
state
,
screen
)
{
state
.
screen
=
screen
;
},
setScreenList
(
state
,
screenList
)
{
state
.
screenList
=
screenList
;
},
},
};
src/main/webapp/app/shared/config/store/admin/workspace-store.ts
0 → 100644
View file @
9bf8ead9
import
{
Module
}
from
'
vuex
'
;
export
const
workspaceStore
:
Module
<
any
,
any
>
=
{
state
:
{
idWorkspace
:
0
,
},
getters
:
{
idWorkspace
:
state
=>
state
.
idWorkspace
,
},
actions
:
{},
mutations
:
{
setIdWorkspace
(
state
,
idWorkspace
)
{
state
.
idWorkspace
=
idWorkspace
;
},
},
};
src/main/webapp/app/views/screen/screen-edit.component.ts
View file @
9bf8ead9
...
...
@@ -19,7 +19,8 @@ export default class FormEdit extends Vue {
beforeRouteEnter
(
to
,
from
,
next
)
{
next
(
vm
=>
{
// récupération de l'idScreen et appel du service
vm
.
$store
.
commit
(
'
setIdWorkspace
'
,
to
.
params
.
idWorkspace
);
vm
.
$store
.
commit
(
'
setIdForm
'
,
to
.
params
.
idForm
);
});
}
}
src/main/webapp/app/views/workspace/workspace-creation.component.ts
View file @
9bf8ead9
...
...
@@ -2,20 +2,19 @@ import Vue from 'vue';
import
Component
from
'
vue-class-component
'
;
import
OaInput
from
'
@/components/forms/input/oa-input.vue
'
;
import
OaTextarea
from
'
@/components/forms/textarea/oa-textarea.vue
'
;
import
{
Inject
}
from
'
vue-property-decorator
'
;
import
{
Inject
}
from
'
vue-property-decorator
'
;
import
WorkspaceService
from
'
@/entities/workspace/workspace.service
'
;
import
Workspace
from
'
@/shared/model/workspace.model
'
;
import
{
Workspace
}
from
'
@/shared/model/workspace.model
'
;
import
OaButton
from
'
@/components/button/oa-button.vue
'
;
@
Component
({
components
:
{
OaInput
,
OaTextarea
,
OaButton
}
OaButton
,
}
,
})
export
default
class
WorkspaceCreation
extends
Vue
{
/**
* Service des workspaces.
*/
...
...
@@ -27,7 +26,6 @@ export default class WorkspaceCreation extends Vue {
public
description
:
String
;
public
save
():
void
{
let
workspace
=
new
Workspace
();
workspace
.
name
=
this
.
name
;
workspace
.
description
=
this
.
description
;
...
...
src/main/webapp/i18n/fr/screen.json
View file @
9bf8ead9
...
...
@@ -31,5 +31,8 @@
"reference"
:
"reference du screen pour constituer l'URL"
}
}
},
"screen"
:
{
"add"
:
"Ajouter un écran"
}
}
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