annotate client/src/usermanagement/Usermanagement.vue @ 631:13bccabbf7c5

fix: usermenu or sidebar trigger arrangement of user/userdetailsview
author Thomas Junk <thomas.junk@intevation.de>
date Wed, 12 Sep 2018 17:17:42 +0200
parents 855cca0142ec
children badbc0207418
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
585
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1 <template>
630
855cca0142ec refac: Usermanagement now flexible sidebar layout
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
2 <div class="main d-flex flex-row">
855cca0142ec refac: Usermanagement now flexible sidebar layout
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
3 <div :class="spacerStyle"></div>
629
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
4 <div class="d-flex content flex-column">
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
5 <div class="d-flex flex-row">
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
6 <div :class="userlistStyle">
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
7 <div class="card">
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
8 <div class="card-header shadow-sm text-white bg-info mb-3">
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
9 Users
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
10 </div>
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
11 <div class="card-body">
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
12 <table id="datatable" :class="tableStyle">
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
13 <thead>
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
14 <tr>
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
15 <th scope="col" @click="sortBy('user')">
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
16 <span>Username&nbsp;
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
17 <i v-if="sortCriterion=='user'" class="fa fa-angle-down"></i>
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
18 </span>
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
19 </th>
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
20 <th scope="col" @click="sortBy('country')">
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
21 <span>Country&nbsp;
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
22 <i v-if="sortCriterion=='country'" class="fa fa-angle-down"></i>
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
23 </span>
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
24 </th>
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
25 <th scope="col" @click="sortBy('email')">
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
26 <span>Email&nbsp;
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
27 <i v-if="sortCriterion=='email'" class="fa fa-angle-down"></i>
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
28 </span>
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
29 </th>
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
30 <th scope="col" @click="sortBy('role')">
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
31 <span>Role&nbsp;
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
32 <i v-if="sortCriterion=='role'" class="fa fa-angle-down"></i>
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
33 </span>
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
34 </th>
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
35 <th scope="col"></th>
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
36 </tr>
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
37 </thead>
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
38 <tbody>
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
39 <tr v-for="user in users" :key="user.user" @click="selectUser(user.user)">
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
40 <td>{{ user.user }}</td>
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
41 <td>{{ user.country }}</td>
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
42 <td>{{ user.email}}</td>
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
43 <td>
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
44 <i v-tooltip="user.roleLabel" :class="{
585
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
45 fa:true,
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
46 icon:true,
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
47 'fa-user':user.role==='waterway_user',
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
48 'fa-star':user.role=='sys_admin',
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
49 'fa-adn':user.role==='waterway_admin'}"></i>
629
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
50 </td>
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
51 <td>
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
52 <i @click="deleteUser(user.user)" class="icon fa fa-trash-o"></i>
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
53 </td>
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
54 </tr>
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
55 </tbody>
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
56 </table>
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
57 </div>
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
58 <div class="d-flex flex-row pagination">
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
59 <i @click=" prevPage " v-if="this.currentPage!=1 " class="backwards btn btn-sm btn-light align-self-center pages fa fa-caret-left "></i> {{this.currentPage}} / {{this.pages}}
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
60 <i @click="nextPage " class="forwards btn btn-sm btn-light align-self-center pages fa fa-caret-right "></i>
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
61 </div>
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
62 <div class="adduser ">
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
63 <button @click="addUser " class="btn btn-info pull-right shadow-sm ">Add User</button>
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
64 </div>
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
65 </div>
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
66 </div>
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
67 <Userdetail v-if="isUserDetailsVisible "></Userdetail>
585
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
68 </div>
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
69 </div>
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
70 </div>
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
71 </template>
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
72
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
73 <style lang="scss">
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
74 @import "../application/assets/tooltip.scss";
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
75
630
855cca0142ec refac: Usermanagement now flexible sidebar layout
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
76 .spacer {
855cca0142ec refac: Usermanagement now flexible sidebar layout
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
77 margin-left: $offset;
855cca0142ec refac: Usermanagement now flexible sidebar layout
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
78 height: 100vh;
855cca0142ec refac: Usermanagement now flexible sidebar layout
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
79 }
855cca0142ec refac: Usermanagement now flexible sidebar layout
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
80
855cca0142ec refac: Usermanagement now flexible sidebar layout
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
81 .spacer-collapsed {
855cca0142ec refac: Usermanagement now flexible sidebar layout
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
82 min-width: $icon-width + $offset;
855cca0142ec refac: Usermanagement now flexible sidebar layout
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
83 }
855cca0142ec refac: Usermanagement now flexible sidebar layout
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
84
855cca0142ec refac: Usermanagement now flexible sidebar layout
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
85 @media screen and (min-width: 600px) {
855cca0142ec refac: Usermanagement now flexible sidebar layout
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
86 .spacer-expanded {
855cca0142ec refac: Usermanagement now flexible sidebar layout
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
87 min-width: $icon-width + $offset;
855cca0142ec refac: Usermanagement now flexible sidebar layout
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
88 }
855cca0142ec refac: Usermanagement now flexible sidebar layout
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
89 }
855cca0142ec refac: Usermanagement now flexible sidebar layout
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
90 @media screen and (max-width: 1650px) {
855cca0142ec refac: Usermanagement now flexible sidebar layout
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
91 .spacer-expanded {
855cca0142ec refac: Usermanagement now flexible sidebar layout
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
92 min-width: $sidebar-width + $offset;
855cca0142ec refac: Usermanagement now flexible sidebar layout
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
93 }
855cca0142ec refac: Usermanagement now flexible sidebar layout
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
94 }
855cca0142ec refac: Usermanagement now flexible sidebar layout
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
95
585
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
96 .main {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
97 height: 100vh;
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
98 }
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
99
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
100 .backwards {
629
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
101 margin-right: $small-offset;
585
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
102 }
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
103
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
104 .forwards {
629
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
105 margin-left: $small-offset;
585
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
106 }
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
107
630
855cca0142ec refac: Usermanagement now flexible sidebar layout
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
108 @media screen and (min-width: 600px) {
855cca0142ec refac: Usermanagement now flexible sidebar layout
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
109 .content {
855cca0142ec refac: Usermanagement now flexible sidebar layout
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
110 margin-left: $offset;
855cca0142ec refac: Usermanagement now flexible sidebar layout
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
111 margin-right: auto;
855cca0142ec refac: Usermanagement now flexible sidebar layout
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
112 }
855cca0142ec refac: Usermanagement now flexible sidebar layout
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
113 }
855cca0142ec refac: Usermanagement now flexible sidebar layout
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
114
855cca0142ec refac: Usermanagement now flexible sidebar layout
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
115 @media screen and (min-width: 1650px) {
855cca0142ec refac: Usermanagement now flexible sidebar layout
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
116 .content {
855cca0142ec refac: Usermanagement now flexible sidebar layout
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
117 margin-left: $sidebar-width;
855cca0142ec refac: Usermanagement now flexible sidebar layout
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
118 margin-right: auto;
855cca0142ec refac: Usermanagement now flexible sidebar layout
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
119 }
585
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
120 }
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
121
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
122 .adduser {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
123 margin-right: $offset;
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
124 padding-bottom: $offset;
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
125 }
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
126
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
127 .icon {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
128 font-size: large;
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
129 }
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
130
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
131 .userlist {
629
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
132 margin-top: $offset;
585
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
133 margin-right: $offset;
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
134 min-width: 520px;
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
135 height: 100%;
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
136 }
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
137
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
138 .pagination {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
139 margin-left: auto;
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
140 margin-right: auto;
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
141 }
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
142 .userlistsmall {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
143 width: 30vw;
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
144 }
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
145
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
146 .userlistextended {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
147 width: 70vw;
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
148 }
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
149
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
150 .table {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
151 width: 90% !important;
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
152 margin: auto;
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
153 }
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
154
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
155 .table th,
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
156 .pages {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
157 cursor: pointer;
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
158 }
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
159
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
160 .table th,
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
161 td {
629
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
162 font-size: $smaller;
585
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
163 border-top: 0px !important;
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
164 text-align: left;
629
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
165 padding: $small-offset !important;
585
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
166 }
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
167
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
168 .table td {
629
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
169 font-size: $smaller;
585
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
170 cursor: pointer;
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
171 }
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
172
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
173 tr span {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
174 display: flex;
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
175 }
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
176 </style>
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
177
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
178 <script>
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
179 import Userdetail from "./Userdetail";
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
180 import store from "../store";
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
181 import { mapGetters } from "vuex";
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
182 import { displayError } from "../application/lib/errors.js";
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
183
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
184 export default {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
185 name: "userview",
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
186 data() {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
187 return {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
188 sortCriterion: "user",
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
189 pageSize: 10,
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
190 currentPage: 1
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
191 };
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
192 },
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
193 components: {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
194 Userdetail
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
195 },
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
196 computed: {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
197 ...mapGetters("usermanagement", ["isUserDetailsVisible"]),
631
13bccabbf7c5 fix: usermenu or sidebar trigger arrangement of user/userdetailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 630
diff changeset
198 ...mapGetters("application", ["sidebarCollapsed", "isUsermenuCollapsed"]),
630
855cca0142ec refac: Usermanagement now flexible sidebar layout
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
199 spacerStyle() {
855cca0142ec refac: Usermanagement now flexible sidebar layout
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
200 return {
855cca0142ec refac: Usermanagement now flexible sidebar layout
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
201 spacer: true,
631
13bccabbf7c5 fix: usermenu or sidebar trigger arrangement of user/userdetailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 630
diff changeset
202 "spacer-expanded": !(this.isUsermenuCollapsed && this.sidebarCollapsed),
13bccabbf7c5 fix: usermenu or sidebar trigger arrangement of user/userdetailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 630
diff changeset
203 "spacer-collapsed": this.isUsermenuCollapsed && this.sidebarCollapsed
630
855cca0142ec refac: Usermanagement now flexible sidebar layout
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
204 };
855cca0142ec refac: Usermanagement now flexible sidebar layout
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
205 },
585
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
206 users() {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
207 let users = [...this.$store.getters["usermanagement/users"]];
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
208 users.sort((a, b) => {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
209 if (
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
210 a[this.sortCriterion].toLowerCase() <
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
211 b[this.sortCriterion].toLowerCase()
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
212 )
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
213 return -1;
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
214 if (
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
215 a[this.sortCriterion].toLowerCase() >
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
216 b[this.sortCriterion].toLowerCase()
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
217 )
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
218 return 1;
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
219 return 0;
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
220 });
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
221 const start = (this.currentPage - 1) * this.pageSize;
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
222 return users.slice(start, start + this.pageSize);
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
223 },
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
224 pages() {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
225 let users = [...this.$store.getters["usermanagement/users"]];
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
226 return Math.ceil(users.length / this.pageSize);
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
227 },
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
228 tableStyle() {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
229 return {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
230 table: true,
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
231 "table-hover": true,
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
232 "table-sm": this.isUserDetailsVisible,
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
233 fadeIn: true,
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
234 animated: true
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
235 };
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
236 },
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
237 userlistStyle() {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
238 return {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
239 userlist: true,
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
240 shadow: true,
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
241 userlistsmall: this.isUserDetailsVisible,
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
242 userlistextended: !this.isUserDetailsVisible
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
243 };
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
244 }
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
245 },
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
246 methods: {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
247 tween() {},
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
248 nextPage() {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
249 if (this.currentPage < this.pages) {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
250 document.querySelector("#datatable").classList.add("fadeOut");
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
251 setTimeout(() => {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
252 document.querySelector("#datatable").classList.remove("fadeOut");
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
253 this.currentPage += 1;
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
254 }, 10);
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
255 }
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
256 return;
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
257 },
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
258 prevPage() {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
259 if (this.currentPage > 0) {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
260 document.querySelector("#datatable").classList.add("fadeOut");
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
261 setTimeout(() => {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
262 document.querySelector("#datatable").classList.remove("fadeOut");
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
263 this.currentPage -= 1;
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
264 }, 10);
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
265 }
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
266 return;
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
267 },
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
268 sortBy(criterion) {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
269 this.sortCriterion = criterion;
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
270 },
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
271 deleteUser(name) {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
272 this.$store
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
273 .dispatch("usermanagement/deleteUser", { name: name })
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
274 .then(() => {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
275 this.submitted = false;
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
276 this.$store.dispatch("usermanagement/loadUsers").catch(error => {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
277 const { status, data } = error.response;
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
278 displayError({
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
279 title: "Backend Error",
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
280 message: `${status}: ${data.message || data}`
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
281 });
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
282 });
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
283 })
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
284 .catch(error => {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
285 const { status, data } = error.response;
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
286 displayError({
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
287 title: "Backend Error",
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
288 message: `${status}: ${data.message || data}`
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
289 });
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
290 });
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
291 },
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
292 addUser() {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
293 this.$store.commit("usermanagement/clearCurrentUser");
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
294 this.$store.commit("usermanagement/setUserDetailsVisible");
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
295 },
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
296 selectUser(name) {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
297 const user = this.$store.getters["usermanagement/getUserByName"](name);
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
298 this.$store.commit("usermanagement/setCurrentUser", user);
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
299 }
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
300 },
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
301 beforeRouteEnter(to, from, next) {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
302 store
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
303 .dispatch("usermanagement/loadUsers")
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
304 .then(next)
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
305 .catch(error => {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
306 const { status, data } = error.response;
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
307 displayError({
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
308 title: "Backend Error",
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
309 message: `${status}: ${data}`
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
310 });
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
311 });
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
312 },
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
313 beforeRouteLeave(to, from, next) {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
314 store.commit("usermanagement/clearCurrentUser");
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
315 store.commit("usermanagement/setUserDetailsInvisible");
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
316 next();
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
317 }
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
318 };
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
319 </script>