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
54747437
Commit
54747437
authored
Apr 14, 2021
by
Kevin Robert
Browse files
Prise en compte des remarques de PR.
parent
6a6bc12e
Changes
13
Hide whitespace changes
Inline
Side-by-side
src/main/webapp/app/admin/admin.component.ts
View file @
54747437
...
...
@@ -52,22 +52,6 @@ config.initVueAdmin(Vue);
export
default
class
Admin
extends
Vue
{
public
asideComponent
:
String
=
null
;
public
tabs
:
Object
=
{
workspace
:
[
{
title
:
'
Paramétrage
'
,
path
:
'
/settings
'
},
{
title
:
'
Questionnaires
'
,
path
:
'
/view
'
},
],
form
:
[
{
title
:
'
Paramétrage
'
,
path
:
'
/settings
'
},
{
title
:
'
Edition
'
,
path
:
'
/view
'
},
],
};
public
currentTabs
:
Object
[]
=
[
{
title
:
'
Paramétrage
'
,
path
:
'
/settings
'
},
{
title
:
'
Questionnaires
'
,
path
:
'
/view
'
},
];
beforeRouteEnter
(
to
,
from
,
next
)
{
next
(
vm
=>
{
vm
.
setAsideComponent
(
to
.
meta
.
panel
);
...
...
src/main/webapp/app/components/table/admin-users-table.vue
View file @
54747437
<
template
>
<main>
<h2
class=
"mb-4 text-2xl"
>
Utilisateurs
</h2>
<h2
class=
"mb-4 text-2xl"
v-text=
"$t('user.table.titre')"
>
Utilisateurs
</h2>
<table
class=
"w-full bg-white border-t-2"
>
<thead
class=
"font-bold"
>
<tr
class=
"border-b-2"
>
<th
class=
"p-2 text-left"
>
I
d
</th>
<th
class=
"p-2 text-left"
>
Nom
</th>
<th
class=
"p-2 text-left"
>
Email
</th>
<th
class=
"p-2 text-left"
>
Actif
</th>
<th
class=
"p-2 text-left"
v-text=
"$t('user.table.id')"
>
I
D
</th>
<th
class=
"p-2 text-left"
v-text=
"$t('user.table.nom')"
>
Nom
</th>
<th
class=
"p-2 text-left"
v-text=
"$t('user.table.email')"
>
Email
</th>
<th
class=
"p-2 text-left"
v-text=
"$t('user.table.actif')"
>
Actif
</th>
</tr>
</thead>
<tbody>
<tr
v-for=
"(user, index) in users"
class=
"text-left align-top border-b"
>
<tr
v-for=
"(user, index) in users"
:key=
"index"
class=
"text-left align-top border-b"
>
<td
class=
"p-2"
>
<a
:href=
"getUserEditLink(user.id)"
>
{{
user
.
id
}}
</a>
</td>
...
...
src/main/webapp/app/main.ts
View file @
54747437
...
...
@@ -12,7 +12,7 @@ import AlertService from '@/shared/alert/alert.service';
import
TranslationService
from
'
@/locale/translation.service
'
;
import
FrontFormService
from
'
@/front/services/front-form.service
'
;
import
{
ROUTES
}
from
'
@/router/routes-constants
'
;
import
HeaderService
from
"
@/shared/service/header-service
"
;
import
HeaderService
from
'
@/shared/service/header-service
'
;
/* tslint:enable */
Vue
.
config
.
productionTip
=
false
;
...
...
@@ -25,7 +25,7 @@ const store = config.initVueXStore(Vue);
const
alertService
=
new
AlertService
(
store
);
const
translationService
=
new
TranslationService
(
store
,
i18n
);
const
accountService
=
new
AccountService
(
store
,
translationService
,
router
);
const
headerService
=
new
HeaderService
(
store
);
const
headerService
=
new
HeaderService
(
store
,
translationService
,
i18n
);
const
frontFormService
=
new
FrontFormService
(
store
,
router
,
alertService
,
translationService
,
i18n
);
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
...
...
src/main/webapp/app/shared/config/store/common/header-store.ts
View file @
54747437
...
...
@@ -10,7 +10,6 @@ export const headerStore: Module<any, any> = {
mutations
:
{
tabs
(
state
,
newTabs
)
{
state
.
tabs
=
newTabs
;
localStorage
.
setItem
(
'
tabs
'
,
newTabs
);
},
},
};
src/main/webapp/app/shared/service/header-service.ts
View file @
54747437
import
{
Store
}
from
"
vuex
"
;
import
VueI18n
from
'
vue-i18n
'
;
import
TranslationService
from
'
@/locale/translation.service
'
;
export
default
class
HeaderService
{
constructor
(
private
store
:
Store
<
any
>
)
{
constructor
(
private
store
:
Store
<
any
>
,
private
translationService
:
TranslationService
,
private
i18n
:
VueI18n
)
{
this
.
translationService
.
refreshTranslation
(
this
.
store
.
getters
.
currentLanguage
);
}
public
updateTabsForWorkspaceId
(
workspaceId
:
number
,
currentKey
:
String
):
void
{
let
tabs
:
Object
[]
=
[
{
'
title
'
:
'
P
aram
é
trage
'
,
'
title
'
:
this
.
i18n
.
t
(
'
onglets.p
aram
e
trage
s
'
)
,
'
link
'
:
`/admin/workspace/
${
workspaceId
}
/settings`
,
'
isCurrent
'
:
currentKey
===
'
settings
'
},
{
'
title
'
:
'
Questionnaire
s
'
,
'
title
'
:
this
.
i18n
.
t
(
'
onglets.form
s
'
)
,
'
link
'
:
`/admin/workspace/
${
workspaceId
}
/view`
,
'
isCurrent
'
:
currentKey
===
'
view
'
}
'
isCurrent
'
:
currentKey
===
'
view
'
},
];
this
.
store
.
commit
(
'
tabs
'
,
tabs
);
}
...
...
@@ -23,12 +27,12 @@ export default class HeaderService {
public
updateTabsForFormId
(
workspaceId
:
number
,
formId
:
number
,
currentKey
:
String
):
void
{
let
tabs
:
Object
[]
=
[
{
'
title
'
:
'
P
aram
é
trage
'
,
'
title
'
:
this
.
i18n
.
t
(
'
onglets.p
aram
e
trage
s
'
)
,
'
link
'
:
`/admin/workspace/
${
workspaceId
}
/form/
${
formId
}
/settings`
,
'
isCurrent
'
:
currentKey
===
'
settings
'
},
{
'
title
'
:
'
É
dition
'
,
'
title
'
:
this
.
i18n
.
t
(
'
onglets.e
dition
'
)
,
'
link
'
:
`/admin/workspace/
${
workspaceId
}
/form/
${
formId
}
/view`
,
'
isCurrent
'
:
currentKey
===
'
view
'
}
];
...
...
@@ -38,12 +42,12 @@ export default class HeaderService {
public
updateTabsForAdmin
(
currentTab
:
String
):
void
{
let
tabs
:
Object
[]
=
[
{
'
title
'
:
'
Espaces de travail
'
,
'
title
'
:
this
.
i18n
.
t
(
'
onglets.workspaces
'
)
,
'
link
'
:
'
/admin/workspace/list
'
,
'
isCurrent
'
:
currentTab
===
'
workspaces
'
},
{
'
title
'
:
'
U
tilisateurs
'
,
'
title
'
:
this
.
i18n
.
t
(
'
onglets.u
tilisateurs
'
)
,
'
link
'
:
'
/admin/user/list
'
,
'
isCurrent
'
:
currentTab
===
'
users
'
}
];
...
...
src/main/webapp/app/views/form/form-settings.vue
View file @
54747437
<
template
>
<main>
<section
class=
"max-w-4xl mx-auto p-9"
>
<h2
class=
"mb-4 text-2xl"
id=
"s1"
>
Informations générales
</h2>
<h2
class=
"mb-4 text-2xl"
id=
"s1"
v-text=
"$t('form.settings.title')"
>
Informations générales
</h2>
<form
v-on:submit.prevent=
"save()"
>
<oa-input
id=
"id"
label=
"
ID
"
type=
"text"
:value=
"form.id"
required=
"true"
disabled=
"true"
></oa-input>
<oa-input
id=
"reference"
label=
"
Réfé
rence"
type=
"text"
:value=
"form.reference"
required=
"true"
@
update=
"setReference"
></oa-input>
<oa-input
id=
"name"
label=
"
Nom
"
type=
"text"
:value=
"form.name"
required=
"true"
@
update=
"setName"
></oa-input>
<oa-textarea
id=
"description"
label=
"
D
escription"
:value=
"form.description"
@
update=
"setDescription"
></oa-textarea>
<oa-button
type=
"submit"
variant=
"primary"
label=
"
Enregistrer
"
></oa-button>
<oa-input
id=
"id"
:
label=
"
$t('form.settings.id')
"
type=
"text"
:value=
"form.id"
required=
"true"
disabled=
"true"
></oa-input>
<oa-input
id=
"reference"
:
label=
"
$t('form.settings.refe
rence
')
"
type=
"text"
:value=
"form.reference"
required=
"true"
@
update=
"setReference"
></oa-input>
<oa-input
id=
"name"
:
label=
"
$t('form.settings.name')
"
type=
"text"
:value=
"form.name"
required=
"true"
@
update=
"setName"
></oa-input>
<oa-textarea
id=
"description"
:
label=
"
$t('form.settings.d
escription
')
"
:value=
"form.description"
@
update=
"setDescription"
></oa-textarea>
<oa-button
type=
"submit"
variant=
"primary"
:
label=
"
$t('button.save')
"
></oa-button>
</form>
<admin-users-table
:users=
"authorizedUsers"
></admin-users-table>
</section>
...
...
src/main/webapp/app/views/user/user-list.vue
View file @
54747437
<
template
>
<main>
<section
class=
"max-w-6xl px-4 mx-auto py-9 xl:px-0"
>
<toolbar
title=
"Utilisateurs"
addActionName=
"
Ajouter un utilisateur
"
actionLink=
"/admin/user/creation"
></toolbar>
<toolbar
title=
"Utilisateurs"
:
addActionName=
"
$t('user.actions.nouveau')
"
actionLink=
"/admin/user/creation"
></toolbar>
<table
class=
"w-full bg-white border-t-2"
>
<thead
class=
"font-bold"
>
<tr
class=
"border-b-2"
>
<th
class=
"p-2 text-left"
>
I
d
</th>
<th
class=
"p-2 text-left"
>
Nom
</th>
<th
class=
"p-2 text-left"
>
Email
</th>
<th
class=
"p-2 text-left"
>
Actif
</th>
</tr>
<tr
class=
"border-b-2"
>
<th
class=
"p-2 text-left"
v-text=
"$t('user.table.id')"
>
I
D
</th>
<th
class=
"p-2 text-left"
v-text=
"$t('user.table.nom')"
>
Nom
</th>
<th
class=
"p-2 text-left"
v-text=
"$t('user.table.email')"
>
Email
</th>
<th
class=
"p-2 text-left"
v-text=
"$t('user.table.actif')"
>
Actif
</th>
</tr>
</thead>
<tbody>
<tr
v-for=
"(user, index) in users"
class=
"text-left align-top border-b"
>
<tr
v-for=
"(user, index) in users"
:key=
"index"
class=
"text-left align-top border-b"
>
<td
class=
"p-2"
>
<a
:href=
"getUserEditLink(user.id)"
>
{{
user
.
id
}}
</a>
</td>
...
...
src/main/webapp/app/views/workspace/workspace-settings.vue
View file @
54747437
<
template
>
<main>
<section
class=
"max-w-4xl mx-auto p-9"
>
<h2
class=
"mb-4 text-2xl"
>
Informations générales
</h2>
<h2
class=
"mb-4 text-2xl"
v-text=
"$t('form.settings.title')"
>
Informations générales
</h2>
<form
v-on:submit.prevent=
"save()"
>
<oa-input
id=
"id"
label=
"
ID
"
type=
"text"
:value=
"workspace.id"
required=
"true"
disabled=
"true"
></oa-input>
<oa-input
id=
"name"
label=
"
Nom
"
type=
"text"
:value=
"workspace.name"
required=
"true"
@
update=
"setName"
></oa-input>
<oa-textarea
id=
"description"
label=
"
D
escription"
:value=
"workspace.description"
@
update=
"setDescription"
></oa-textarea>
<oa-button
type=
"submit"
variant=
"primary"
label=
"
Enregistrer
"
></oa-button>
<oa-input
id=
"id"
:
label=
"
$t('form.settings.id')
"
type=
"text"
:value=
"workspace.id"
required=
"true"
disabled=
"true"
></oa-input>
<oa-input
id=
"name"
:
label=
"
$t('form.settings.name')
"
type=
"text"
:value=
"workspace.name"
required=
"true"
@
update=
"setName"
></oa-input>
<oa-textarea
id=
"description"
:
label=
"
$t('form.settings.d
escription
')
"
:value=
"workspace.description"
@
update=
"setDescription"
></oa-textarea>
<oa-button
type=
"submit"
variant=
"primary"
:
label=
"
$t('button.save')
"
></oa-button>
</form>
<admin-users-table
:users=
"authorizedUsers"
></admin-users-table>
</section>
...
...
src/main/webapp/app/views/workspace/workspace-view.component.ts
View file @
54747437
...
...
@@ -30,7 +30,7 @@ export default class WorkspaceView extends Vue {
*/
public
forms
:
Object
[]
=
[];
public
idWorkspace
;
public
idWorkspace
=
-
1
;
/**
* Récupération des workspaces avant de faire l'affichage.
...
...
src/main/webapp/i18n/fr/form.json
View file @
54747437
...
...
@@ -30,5 +30,14 @@
"reference"
:
"reference du formulaire pour constituer l'URL"
}
}
},
"form"
:
{
"settings"
:
{
"title"
:
"Informations générales"
,
"id"
:
"ID"
,
"reference"
:
"Référence"
,
"name"
:
"Titre"
,
"description"
:
"Description"
}
}
}
src/main/webapp/i18n/fr/global.json
View file @
54747437
...
...
@@ -143,5 +143,11 @@
"not.image"
:
"Le fichier doit être une image et non du type
\"
{{ fileType }}
\"
"
}
},
"footer"
:
"Ceci est votre pied de page"
"onglets"
:
{
"parametrages"
:
"Paramétrages"
,
"edition"
:
"Édition"
,
"forms"
:
"Questionnaires"
,
"workspaces"
:
"Espaces de travail"
,
"utilisateurs"
:
"Utilisateurs"
}
}
src/main/webapp/i18n/fr/user.json
0 → 100644
View file @
54747437
{
"user"
:
{
"table"
:
{
"titre"
:
"Utilisateurs"
,
"id"
:
"ID"
,
"nom"
:
"Nom"
,
"email"
:
"Email"
,
"actif"
:
"Actif"
},
"actions"
:
{
"nouveau"
:
"Ajouter un utilisateur"
}
}
}
src/main/webapp/i18n/fr/workspace.json
View file @
54747437
...
...
@@ -22,5 +22,13 @@
"description"
:
"Description"
,
"form"
:
"Form"
}
},
"form"
:
{
"settings"
:
{
"title"
:
"Informations générales"
,
"id"
:
"ID"
,
"name"
:
"Titre"
,
"description"
:
"Description"
}
}
}
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