Purpose před 5 měsíci
rodič
revize
19945e51d1

+ 2 - 1
config/prod.env.js

@@ -1,5 +1,6 @@
 'use strict'
 module.exports = {
   NODE_ENV: '"production"',
-  MS_CONFIG: '{"direwolfAdmin":"/a","moduleContext":"/scm-app","gatewayRoute":"/scm/scm.contract-bizc"}'
+  // MS_CONFIG: '{"direwolfAdmin":"/a","moduleContext":"/scm-app","gatewayRoute":"/scm/scm.contract-bizc"}'
+  MS_CONFIG: '{"direwolfAdmin":"","moduleContext":"/scm-app","gatewayRoute":"/api"}'
 }

+ 2 - 1
package.json

@@ -8,7 +8,8 @@
     "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
     "start": "npm run dev",
     "lint": "eslint --ext .js,.vue src",
-    "build": "node build/build.js"
+    "build": "node build/build.js",
+    "build-to-test": "rm -rf dist && npm run build && scp -r dist green-box-public:/mnt/webapp/Jeff.RFID/UI"
   },
   "dependencies": {
     "axios": "^0.21.1",

+ 5 - 1
src/entries/BaseCurdEntry.js

@@ -1,6 +1,10 @@
 export default class BaseCurdEntry {
+  static get $$name () {
+    throw new Error(`Please rewrite '$$name'`)
+  }
+
   static get $$api () {
-    throw new Error(`Please rewrite 'api'`)
+    throw new Error(`Please rewrite '$$api'`)
   }
 
   static $$idProp = 'id'

+ 4 - 0
src/entries/MaterialCategory.js

@@ -16,6 +16,10 @@ export default class MaterialCategory extends BaseCurdEntry {
     this.parentId = parentId
   }
 
+  static get $$name () {
+    return 'MaterialCategory'
+  }
+
   static get $$api () {
     return materialCategoryApi
   }

+ 5 - 0
src/entries/MaterialDetail.js

@@ -21,6 +21,11 @@ export default class MaterialDetail extends BaseCurdEntry {
 
   brand
   manufacturer
+
+  static get $$name () {
+    return 'MaterialDetail'
+  }
+
   static get $$api () {
     return materialDetailApiApi
   }

+ 5 - 1
src/entries/MessageCenter.js

@@ -1,7 +1,7 @@
 import messageCenterApi from '@@/api/MessageCenterApi'
 import BaseCurdEntry from './BaseCurdEntry'
 
-export default class TagApply extends BaseCurdEntry {
+export default class MessageCenter extends BaseCurdEntry {
   dataTime
   get formatDataTime () {
     return new Date(this.dataTime).format('YYYY-MM-DD HH:mm:ss')
@@ -9,6 +9,10 @@ export default class TagApply extends BaseCurdEntry {
 
   content
 
+  static get $$name () {
+    return 'MessageCenter'
+  }
+
   static get $$api () {
     return messageCenterApi
   }

+ 4 - 0
src/entries/Provider.js

@@ -13,6 +13,10 @@ export default class Provider extends BaseCurdEntry {
     this.name = name
   }
 
+  static get $$name () {
+    return 'Provider'
+  }
+
   static get $$api () {
     return providerApi
   }

+ 5 - 0
src/entries/ProviderDetail.js

@@ -18,6 +18,11 @@ export default class ProviderDetail extends BaseCurdEntry {
   mail
 
   address
+
+  static get $$name () {
+    return 'ProviderDetail'
+  }
+
   static get $$api () {
     return providerDetailApiApi
   }

+ 4 - 0
src/entries/TagApply.js

@@ -76,6 +76,10 @@ export default class TagApply extends BaseCurdEntry {
     return this.amount
   }
 
+  static get $$name () {
+    return 'TagApply'
+  }
+
   static get $$api () {
     return tagApplyApi
   }

+ 4 - 0
src/entries/TagApplyState.js

@@ -13,6 +13,10 @@ export default class TagApplyState extends BaseCurdEntry {
     this.name = name
   }
 
+  static get $$name () {
+    return 'TagApplyState'
+  }
+
   static get $$api () {
     return tagApplyStateApi
   }

+ 4 - 0
src/entries/TagCode.js

@@ -33,6 +33,10 @@ export default class TagCode extends BaseCurdEntry {
 
   operatorName
 
+  static get $$name () {
+    return 'TagCode'
+  }
+
   static get $$api () {
     return tagCodeApi
   }

+ 4 - 0
src/entries/TagPurchase.js

@@ -76,6 +76,10 @@ export default class TagPurchase extends BaseCurdEntry {
     }))
   }
 
+  static get $$name () {
+    return 'TagPurchase'
+  }
+
   static get $$api () {
     return tagPurchaseApi
   }

+ 4 - 0
src/entries/TagPurchaseState.js

@@ -13,6 +13,10 @@ export default class TagPurchaseState extends BaseCurdEntry {
     this.name = name
   }
 
+  static get $$name () {
+    return 'TagPurchaseState'
+  }
+
   static get $$api () {
     return tagPurchaseStateApi
   }

+ 4 - 0
src/entries/TagSerial.js

@@ -15,6 +15,10 @@ export default class TagSerial extends BaseCurdEntry {
     this.chipCode = chipCode
   }
 
+  static get $$name () {
+    return 'TagSerial'
+  }
+
   static get $$api () {
     return tagSerialApi
   }

+ 4 - 0
src/entries/TagType.js

@@ -13,6 +13,10 @@ export default class TagType extends BaseCurdEntry {
     this.name = name
   }
 
+  static get $$name () {
+    return 'TagType'
+  }
+
   static get $$api () {
     return tagTypeApi
   }

+ 1 - 1
src/utils/BaseCurdList.js

@@ -126,7 +126,7 @@ export default (Target, hasPagination = true) => ({
             const optionTarget = optionTargetConfig.Target
             return this.$$request(optionTarget.$$api.getList, typeof optionTargetConfig.getQuery === 'function' ? optionTargetConfig.getQuery(optionGroup) : undefined).then(options => {
               options = bindPrototype(options, optionTarget)
-              optionGroup[optionTarget.name] = {
+              optionGroup[optionTarget.$$name] = {
                 list: options,
                 map: MapBuilder.getObjectMap(options, optionTarget.$$idProp),
                 Target: optionTarget