Browse Source

Clear project; Add user admin

Weiming 2 years ago
parent
commit
c699f52ab8

+ 2
- 1
WebContent/src/data/users.csv View File

@@ -4,4 +4,5 @@ id,username,password,name,position,image
4 4
 3,receiving,weiming,Zhou Shaowen,Receiver,src/assets/avatar/matthew.png
5 5
 4,checking,weiming,Luo Shaohuai,Quality Checker,src/assets/avatar/matthew.png
6 6
 5,storing,weiming,Liu Xin,Keeper,src/assets/avatar/matthew.png
7
-6,picking,weiming,Wu Cai,Picker,src/assets/avatar/matthew.png
7
+6,picking,weiming,Wu Cai,Picker,src/assets/avatar/matthew.png
8
+7,admin,weiming,Wang Jinghan,Admin,src/assets/avatar/elliot.jpg

+ 0
- 3
WebContent/src/store/modules/app.js View File

@@ -23,11 +23,8 @@ const getters = {
23 23
   user: state => state.user,
24 24
 
25 25
   userMenus: (state, getters) => {
26
-    log('user', state.user)
27
-    log('USER_MENU', USER_MENU)
28 26
     if (Object.keys(state.user).length > 0) {
29 27
       let userMenu = USER_MENU[state.user.username];
30
-      log('userMenu', userMenu)
31 28
       return getters.menuitems.filter(item => userMenu.includes(item.title));
32 29
     }
33 30
     return getters.menuitems;

+ 1
- 1
WebContent/src/store/modules/menu/inventory-control.js View File

@@ -16,7 +16,7 @@ export default {
16 16
   
17 17
   subItems: [
18 18
     {
19
-      title: 'Inventory',
19
+      title: 'Product',
20 20
       path: '/inventory',
21 21
       router: true,
22 22
       isMenu: true,

+ 4
- 3
WebContent/src/utils/setting.js View File

@@ -195,6 +195,7 @@ export const WAREHOUSE_COLORS = [
195 195
 ]
196 196
 
197 197
 export const USER_MENU = {
198
-  'purchasing': ['Inventory Control', 'Purchasing', 'Suppliers'],
199
-  'inbound': ['Inbound', 'Warehouse']
200
-}
198
+  'purchasing': ['Inventory Control', 'Purchasing', 'Supplier'],
199
+  'inbound': ['Inbound', 'Warehouse'],
200
+  'admin': ['Inventory Control', 'Purchasing', 'Supplier', 'Inbound', 'Warehouse']
201
+};

+ 0
- 1
WebContent/src/views/layout/Sidebar.vue View File

@@ -12,7 +12,6 @@
12 12
 
13 13
         <!--<v-divider light />-->
14 14
         <v-list dense :close-on-lock="false">
15
-            <!--<p style="color: white">{{ menu }}</p>-->
16 15
             <template v-for="(item,i) in userMenus">
17 16
                 <v-list-group v-if="item.subItems">
18 17
                     <v-list-item slot="item">

+ 2
- 0
WebContent/src/views/login.vue View File

@@ -84,6 +84,8 @@
84 84
               this.$router.replace('/purchasingDashboard');
85 85
             } else if (user.username === 'inbound') {
86 86
               this.$router.replace('/receiving');
87
+            } else {
88
+              this.$router.replace('/inventory');
87 89
             }
88 90
             this.toggleIsRoot();
89 91
           } else {

Loading…
Cancel
Save