Commit 11e76946 authored by Kevin Robert's avatar Kevin Robert
Browse files

Prise en compte des remarques de PR et correction du datalist.

parent 3574e48f
import Vue from 'vue';
import Component from 'vue-class-component';
import {IUser, User} from '@/shared/model/user.model';
import {Inject, Prop} from 'vue-property-decorator';
import { IUser, User } from '@/shared/model/user.model';
import { Inject, Prop } from 'vue-property-decorator';
import OaInput from '@/components/forms/input/oa-input.vue';
import UserManagementService from '@/admin/user-management/user-management.service';
import OaButton from '@/components/button/oa-button.vue';
import Icon from '@/components/icon/icon.vue';
import {ItemFront} from "@/front/model/item-front.model";
components: {
<h2 class="mb-4 text-2xl" v-text="$t('user.table.titre')">Reponsables</h2>
<p class="mb-4" v-text="$t('')">Vous pouvez ajouter ou supprimer des responsables sur cet espace.</p>
<h2 class="mb-4 text-2xl">{{ $t('user.table.titre') }}</h2>
<p class="mb-4">{{ $t('') }}</p>
<div class="flex items-center">
<input class="w-full px-6 py-4 text-lg transition bg-white border rounded-md outline-none ring-inset focus:ring" :placeholder="$t('user.actions.addContrib')" v-model="currentLoginSearch">
<input class="w-full px-6 py-4 text-lg transition bg-white border rounded-md outline-none ring-inset focus:ring" :placeholder="$t('user.actions.addContrib')" v-model="currentLoginSearch" list="user-choice">
<oa-button variant="primary" :label="$t('user.actions.addUser')" @click="addPermission"></oa-button>
<div class="mb-8">
<datalist v-if="autocompleteUsers" class="bg-white block">
<datalist v-if="autocompleteUsers" class="bg-white" id="user-choice">
<option v-for="(user, index) in autocompleteUsers" :key="index" @click="selectUser(user)">{{ getDisplayStringAutocomplete(user)}}</option>
<table class="w-full bg-white border-t-2">
<thead class="font-bold">
<tr class="border-b-2">
<th class="p-2 text-left" v-text="$t('')">ID</th>
<th class="p-2 text-left" v-text="$t('user.table.nom')">Nom</th>
<th class="p-2 text-left" v-text="$t('')">Email</th>
<th class="p-2 text-left" v-text="$t('user.table.actif')">Actif</th>
<th class="p-2 text-center" v-text="$t('user.table.actions')">Actions</th>
<th class="p-2 text-left">{{ $t('') }}</th>
<th class="p-2 text-left">{{ $t('user.table.nom') }}</th>
<th class="p-2 text-left">{{ $t('') }}</th>
<th class="p-2 text-left">{{ $t('user.table.actif') }}</th>
<th class="p-2 text-center">{{ $t('user.table.actions') }}</th>
......@@ -85,13 +85,13 @@ export default class FormSettings extends Vue {
public addPermision(user: IUser) {
this.formService().addRoleWithPermission(user.login, this.currentIdForm)
.then(() => console.log("Ajout de permission réussi."))
.catch(() => console.log("Erreur dans l'ajout des permissions."));
.then(() => console.log('Ajout de permission réussi.'))
.catch(() => console.log('Erreur dans l\'ajout des permissions.'));
public removePermision(user: IUser) {
this.formService().removePermission(user.login, this.currentIdForm)
.then(() => console.log("Suppression des permissions réussi."))
.catch(() => console.log("Erreur dans la suppression des permissions."));
.then(() => console.log('Suppression des permissions réussi.'))
.catch(() => console.log('Erreur dans la suppression des permissions.'));
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