From 2434db599d15efcdda23031295cfede76fe75e2f Mon Sep 17 00:00:00 2001 From: Jay Date: Fri, 7 Apr 2017 16:23:41 +0800 Subject: [PATCH] wristband first --- public/js/admin_bundle.js | 1828 ++++++++++------- public/js/index_bundle.js | 360 ++-- route/api/wristband.js | 86 +- .../AdminPage/Wristband/LocStatus/index.js | 2 +- .../AdminPage/Wristband/Location/index.js | 82 +- .../Wristband/WristbandInfo/WristbandModal.js | 5 +- 6 files changed, 1384 insertions(+), 979 deletions(-) diff --git a/public/js/admin_bundle.js b/public/js/admin_bundle.js index b819b37..9f9dcf6 100644 --- a/public/js/admin_bundle.js +++ b/public/js/admin_bundle.js @@ -63,7 +63,7 @@ /******/ __webpack_require__.p = ""; /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 1138); +/******/ return __webpack_require__(__webpack_require__.s = 1144); /******/ }) /************************************************************************/ /******/ ([ @@ -2083,7 +2083,7 @@ function loadLocale(name) { module && module.exports) { try { oldLocale = globalLocale._abbr; - __webpack_require__(1114)("./" + name); + __webpack_require__(1120)("./" + name); // because defineLocale currently also sets the global locale, we // want to undo that for lazy loaded locales getSetGlobalLocale(oldLocale); @@ -5735,106 +5735,6 @@ module.exports = ReactDOMComponentTree; /* 20 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; -/** - * Copyright (c) 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - - - -var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); - -/** - * Simple, lightweight module assisting with the detection and context of - * Worker. Helps avoid circular dependencies and allows code to reason about - * whether or not they are in a Worker, even if they never include the main - * `ReactWorker` dependency. - */ -var ExecutionEnvironment = { - - canUseDOM: canUseDOM, - - canUseWorkers: typeof Worker !== 'undefined', - - canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent), - - canUseViewport: canUseDOM && !!window.screen, - - isInWorker: !canUseDOM // For now, this is true - might change in the future. - -}; - -module.exports = ExecutionEnvironment; - -/***/ }), -/* 21 */ -/***/ (function(module, exports, __webpack_require__) { - -var arrayMap = __webpack_require__(38), - baseIteratee = __webpack_require__(32), - baseMap = __webpack_require__(280), - isArray = __webpack_require__(14); - -/** - * Creates an array of values by running each element in `collection` thru - * `iteratee`. The iteratee is invoked with three arguments: - * (value, index|key, collection). - * - * Many lodash methods are guarded to work as iteratees for methods like - * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. - * - * The guarded methods are: - * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, - * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, - * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, - * `template`, `trim`, `trimEnd`, `trimStart`, and `words` - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - * @example - * - * function square(n) { - * return n * n; - * } - * - * _.map([4, 8], square); - * // => [16, 64] - * - * _.map({ 'a': 4, 'b': 8 }, square); - * // => [16, 64] (iteration order is not guaranteed) - * - * var users = [ - * { 'user': 'barney' }, - * { 'user': 'fred' } - * ]; - * - * // The `_.property` iteratee shorthand. - * _.map(users, 'user'); - * // => ['barney', 'fred'] - */ -function map(collection, iteratee) { - var func = isArray(collection) ? arrayMap : baseMap; - return func(collection, baseIteratee(iteratee, 3)); -} - -module.exports = map; - - -/***/ }), -/* 22 */ -/***/ (function(module, exports, __webpack_require__) { - "use strict"; @@ -6701,6 +6601,106 @@ var clear_dashboard = exports.clear_dashboard = function clear_dashboard() { }; }; +/***/ }), +/* 21 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); + +/** + * Simple, lightweight module assisting with the detection and context of + * Worker. Helps avoid circular dependencies and allows code to reason about + * whether or not they are in a Worker, even if they never include the main + * `ReactWorker` dependency. + */ +var ExecutionEnvironment = { + + canUseDOM: canUseDOM, + + canUseWorkers: typeof Worker !== 'undefined', + + canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent), + + canUseViewport: canUseDOM && !!window.screen, + + isInWorker: !canUseDOM // For now, this is true - might change in the future. + +}; + +module.exports = ExecutionEnvironment; + +/***/ }), +/* 22 */ +/***/ (function(module, exports, __webpack_require__) { + +var arrayMap = __webpack_require__(38), + baseIteratee = __webpack_require__(32), + baseMap = __webpack_require__(280), + isArray = __webpack_require__(14); + +/** + * Creates an array of values by running each element in `collection` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. + * + * The guarded methods are: + * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, + * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, + * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, + * `template`, `trim`, `trimEnd`, `trimStart`, and `words` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + * @example + * + * function square(n) { + * return n * n; + * } + * + * _.map([4, 8], square); + * // => [16, 64] + * + * _.map({ 'a': 4, 'b': 8 }, square); + * // => [16, 64] (iteration order is not guaranteed) + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * // The `_.property` iteratee shorthand. + * _.map(users, 'user'); + * // => ['barney', 'fred'] + */ +function map(collection, iteratee) { + var func = isArray(collection) ? arrayMap : baseMap; + return func(collection, baseIteratee(iteratee, 3)); +} + +module.exports = map; + + /***/ }), /* 23 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -6713,21 +6713,6 @@ var clear_dashboard = exports.clear_dashboard = function clear_dashboard() { /***/ }), /* 24 */ -/***/ (function(module, exports, __webpack_require__) { - -var freeGlobal = __webpack_require__(291); - -/** Detect free variable `self`. */ -var freeSelf = typeof self == 'object' && self && self.Object === Object && self; - -/** Used as a reference to the global object. */ -var root = freeGlobal || freeSelf || Function('return this')(); - -module.exports = root; - - -/***/ }), -/* 25 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -6744,6 +6729,21 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/***/ }), +/* 25 */ +/***/ (function(module, exports, __webpack_require__) { + +var freeGlobal = __webpack_require__(291); + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +module.exports = root; + + /***/ }), /* 26 */ /***/ (function(module, exports) { @@ -9543,7 +9543,7 @@ module.exports = __webpack_require__(56) ? function(object, key, value){ /* 69 */ /***/ (function(module, exports, __webpack_require__) { -var root = __webpack_require__(24); +var root = __webpack_require__(25); /** Built-in value references. */ var Symbol = root.Symbol; @@ -10750,7 +10750,7 @@ module.exports = includes; /* 92 */ /***/ (function(module, exports, __webpack_require__) { -/* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(24), +/* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(25), stubFalse = __webpack_require__(723); /** Detect free variable `exports`. */ @@ -13522,7 +13522,7 @@ module.exports = escapeTextContentForBrowser; -var ExecutionEnvironment = __webpack_require__(20); +var ExecutionEnvironment = __webpack_require__(21); var DOMNamespaces = __webpack_require__(197); var WHITESPACE_TEST = /^[ \r\n\t\f]/; @@ -14898,7 +14898,7 @@ module.exports = LodashWrapper; /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(59), - root = __webpack_require__(24); + root = __webpack_require__(25); /* Built-in method references that are verified to be native. */ var Map = getNative(root, 'Map'); @@ -17104,7 +17104,7 @@ module.exports = getEventTarget; -var ExecutionEnvironment = __webpack_require__(20); +var ExecutionEnvironment = __webpack_require__(21); var useHasFeature; if (ExecutionEnvironment.canUseDOM) { @@ -18986,7 +18986,7 @@ FeedContent._meta = { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_map__ = __webpack_require__(21); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_map__ = __webpack_require__(22); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_map___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_lodash_map__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_isNil__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_isNil___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash_isNil__); @@ -19887,7 +19887,7 @@ var locationsAreEqual = exports.locationsAreEqual = function locationsAreEqual(a var assign = __webpack_require__(1016), moment = __webpack_require__(5), React = __webpack_require__(0), - CalendarContainer = __webpack_require__(1116) + CalendarContainer = __webpack_require__(1122) ; var TYPES = React.PropTypes; @@ -20608,21 +20608,21 @@ function _resetWarned() { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Router__ = __webpack_require__(1125); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Router__ = __webpack_require__(1131); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Router", function() { return __WEBPACK_IMPORTED_MODULE_0__Router__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Link__ = __webpack_require__(1017); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Link", function() { return __WEBPACK_IMPORTED_MODULE_1__Link__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__IndexLink__ = __webpack_require__(1121); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__IndexLink__ = __webpack_require__(1127); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "IndexLink", function() { return __WEBPACK_IMPORTED_MODULE_2__IndexLink__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__withRouter__ = __webpack_require__(1136); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__withRouter__ = __webpack_require__(1142); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "withRouter", function() { return __WEBPACK_IMPORTED_MODULE_3__withRouter__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__IndexRedirect__ = __webpack_require__(1122); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__IndexRedirect__ = __webpack_require__(1128); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "IndexRedirect", function() { return __WEBPACK_IMPORTED_MODULE_4__IndexRedirect__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__IndexRoute__ = __webpack_require__(1123); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__IndexRoute__ = __webpack_require__(1129); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "IndexRoute", function() { return __WEBPACK_IMPORTED_MODULE_5__IndexRoute__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Redirect__ = __webpack_require__(1019); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Redirect", function() { return __WEBPACK_IMPORTED_MODULE_6__Redirect__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Route__ = __webpack_require__(1124); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Route__ = __webpack_require__(1130); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Route", function() { return __WEBPACK_IMPORTED_MODULE_7__Route__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__RouteUtils__ = __webpack_require__(149); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "createRoutes", function() { return __WEBPACK_IMPORTED_MODULE_8__RouteUtils__["a"]; }); @@ -20631,17 +20631,17 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__PropTypes__ = __webpack_require__(814); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "locationShape", function() { return __WEBPACK_IMPORTED_MODULE_10__PropTypes__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "routerShape", function() { return __WEBPACK_IMPORTED_MODULE_10__PropTypes__["b"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__match__ = __webpack_require__(1134); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__match__ = __webpack_require__(1140); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "match", function() { return __WEBPACK_IMPORTED_MODULE_11__match__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__useRouterHistory__ = __webpack_require__(1024); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "useRouterHistory", function() { return __WEBPACK_IMPORTED_MODULE_12__useRouterHistory__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__PatternUtils__ = __webpack_require__(246); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "formatPattern", function() { return __WEBPACK_IMPORTED_MODULE_13__PatternUtils__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__applyRouterMiddleware__ = __webpack_require__(1127); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__applyRouterMiddleware__ = __webpack_require__(1133); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "applyRouterMiddleware", function() { return __WEBPACK_IMPORTED_MODULE_14__applyRouterMiddleware__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__browserHistory__ = __webpack_require__(1128); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__browserHistory__ = __webpack_require__(1134); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "browserHistory", function() { return __WEBPACK_IMPORTED_MODULE_15__browserHistory__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__hashHistory__ = __webpack_require__(1132); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__hashHistory__ = __webpack_require__(1138); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "hashHistory", function() { return __WEBPACK_IMPORTED_MODULE_16__hashHistory__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__createMemoryHistory__ = __webpack_require__(1021); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "createMemoryHistory", function() { return __WEBPACK_IMPORTED_MODULE_17__createMemoryHistory__["a"]; }); @@ -21308,7 +21308,7 @@ var Symbol = __WEBPACK_IMPORTED_MODULE_0__root_js__["a" /* default */].Symbol; /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(59), - root = __webpack_require__(24); + root = __webpack_require__(25); /* Built-in method references that are verified to be native. */ var Set = getNative(root, 'Set'); @@ -21320,7 +21320,7 @@ module.exports = Set; /* 269 */ /***/ (function(module, exports, __webpack_require__) { -var root = __webpack_require__(24); +var root = __webpack_require__(25); /** Built-in value references. */ var Uint8Array = root.Uint8Array; @@ -21333,7 +21333,7 @@ module.exports = Uint8Array; /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(59), - root = __webpack_require__(24); + root = __webpack_require__(25); /* Built-in method references that are verified to be native. */ var WeakMap = getNative(root, 'WeakMap'); @@ -21906,7 +21906,7 @@ var composeArgs = __webpack_require__(285), getHolder = __webpack_require__(185), reorder = __webpack_require__(665), replaceHolders = __webpack_require__(121), - root = __webpack_require__(24); + root = __webpack_require__(25); /** Used to compose bitmasks for function metadata. */ var WRAP_BIND_FLAG = 1, @@ -25315,7 +25315,7 @@ module.exports = getHostComponentFromComposite; -var ExecutionEnvironment = __webpack_require__(20); +var ExecutionEnvironment = __webpack_require__(21); var contentKey = null; @@ -25542,7 +25542,7 @@ module.exports = isTextInputElement; -var ExecutionEnvironment = __webpack_require__(20); +var ExecutionEnvironment = __webpack_require__(21); var escapeTextContentForBrowser = __webpack_require__(136); var setInnerHTML = __webpack_require__(137); @@ -28228,7 +28228,7 @@ MessageHeader.create = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__lib__[ "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_map__ = __webpack_require__(21); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_map__ = __webpack_require__(22); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_map___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_lodash_map__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_isNil__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_isNil___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash_isNil__); @@ -28456,7 +28456,7 @@ TableHeaderCell.defaultProps = { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_without__ = __webpack_require__(15); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_without___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_lodash_without__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_map__ = __webpack_require__(21); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_map__ = __webpack_require__(22); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_map___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash_map__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash_isNil__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash_isNil___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_lodash_isNil__); @@ -30330,7 +30330,7 @@ StepContent._meta = { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_without__ = __webpack_require__(15); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_without___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_lodash_without__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_map__ = __webpack_require__(21); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_map__ = __webpack_require__(22); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_map___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash_map__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash_isNil__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash_isNil___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_lodash_isNil__); @@ -32367,7 +32367,7 @@ CardContent._meta = { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_map__ = __webpack_require__(21); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_map__ = __webpack_require__(22); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_map___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_lodash_map__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_isNil__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_isNil___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash_isNil__); @@ -33271,7 +33271,7 @@ ItemContent._meta = { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_map__ = __webpack_require__(21); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_map__ = __webpack_require__(22); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_map___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash_map__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash_isNil__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash_isNil___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_lodash_isNil__); @@ -33531,7 +33531,7 @@ Statistic.Value = __WEBPACK_IMPORTED_MODULE_8__StatisticValue__["a" /* default * /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_without__ = __webpack_require__(15); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_without___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_lodash_without__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_map__ = __webpack_require__(21); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_map__ = __webpack_require__(22); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_map___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash_map__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash_isNil__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash_isNil___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_lodash_isNil__); @@ -34516,13 +34516,13 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _reactRedux = __webpack_require__(25); +var _reactRedux = __webpack_require__(24); var _Dialog = __webpack_require__(458); var _Dialog2 = _interopRequireDefault(_Dialog); -var _actions = __webpack_require__(22); +var _actions = __webpack_require__(20); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -34555,7 +34555,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _reactRedux = __webpack_require__(25); +var _reactRedux = __webpack_require__(24); var _Loading = __webpack_require__(459); @@ -36630,7 +36630,7 @@ module.exports = createArrayFromMixed; /*eslint-disable fb-www/unsafe-html*/ -var ExecutionEnvironment = __webpack_require__(20); +var ExecutionEnvironment = __webpack_require__(21); var createArrayFromMixed = __webpack_require__(525); var getMarkupWrap = __webpack_require__(527); @@ -36718,7 +36718,7 @@ module.exports = createNodesFromMarkup; /*eslint-disable fb-www/unsafe-html */ -var ExecutionEnvironment = __webpack_require__(20); +var ExecutionEnvironment = __webpack_require__(21); var invariant = __webpack_require__(6); @@ -37036,7 +37036,7 @@ module.exports = memoizeStringOnly; -var ExecutionEnvironment = __webpack_require__(20); +var ExecutionEnvironment = __webpack_require__(21); var performance; @@ -37208,7 +37208,7 @@ var canUseDOM = exports.canUseDOM = !!(typeof window !== 'undefined' && window.d exports.__esModule = true; -var _AsyncUtils = __webpack_require__(1108); +var _AsyncUtils = __webpack_require__(1114); var _PathUtils = __webpack_require__(148); @@ -39447,7 +39447,7 @@ function isObjectLike(value) { /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(59), - root = __webpack_require__(24); + root = __webpack_require__(25); /* Built-in method references that are verified to be native. */ var DataView = getNative(root, 'DataView'); @@ -39498,7 +39498,7 @@ module.exports = Hash; /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(59), - root = __webpack_require__(24); + root = __webpack_require__(25); /* Built-in method references that are verified to be native. */ var Promise = getNative(root, 'Promise'); @@ -40910,7 +40910,7 @@ module.exports = castSlice; /* 602 */ /***/ (function(module, exports, __webpack_require__) { -/* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(24); +/* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(25); /** Detect free variable `exports`. */ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; @@ -41240,7 +41240,7 @@ module.exports = copySymbolsIn; /* 613 */ /***/ (function(module, exports, __webpack_require__) { -var root = __webpack_require__(24); +var root = __webpack_require__(25); /** Used to detect overreaching core-js shims. */ var coreJsData = root['__core-js_shared__']; @@ -41392,7 +41392,7 @@ module.exports = createBaseFor; /***/ (function(module, exports, __webpack_require__) { var createCtor = __webpack_require__(114), - root = __webpack_require__(24); + root = __webpack_require__(25); /** Used to compose bitmasks for function metadata. */ var WRAP_BIND_FLAG = 1; @@ -41500,7 +41500,7 @@ var apply = __webpack_require__(103), createRecurry = __webpack_require__(288), getHolder = __webpack_require__(185), replaceHolders = __webpack_require__(121), - root = __webpack_require__(24); + root = __webpack_require__(25); /** * Creates a function that wraps `func` to enable currying. @@ -41663,7 +41663,7 @@ module.exports = createFlow; var apply = __webpack_require__(103), createCtor = __webpack_require__(114), - root = __webpack_require__(24); + root = __webpack_require__(25); /** Used to compose bitmasks for function metadata. */ var WRAP_BIND_FLAG = 1; @@ -45135,7 +45135,7 @@ module.exports = func; /***/ (function(module, exports, __webpack_require__) { var convert = __webpack_require__(18), - func = convert('map', __webpack_require__(21)); + func = convert('map', __webpack_require__(22)); func.placeholder = __webpack_require__(17); module.exports = func; @@ -46532,7 +46532,7 @@ module.exports = AutoFocusUtils; var EventPropagators = __webpack_require__(94); -var ExecutionEnvironment = __webpack_require__(20); +var ExecutionEnvironment = __webpack_require__(21); var FallbackCompositionState = __webpack_require__(741); var SyntheticCompositionEvent = __webpack_require__(784); var SyntheticInputEvent = __webpack_require__(787); @@ -46922,7 +46922,7 @@ module.exports = BeforeInputEventPlugin; var CSSProperty = __webpack_require__(331); -var ExecutionEnvironment = __webpack_require__(20); +var ExecutionEnvironment = __webpack_require__(21); var ReactInstrumentation = __webpack_require__(30); var camelizeStyleName = __webpack_require__(523); @@ -47137,7 +47137,7 @@ module.exports = CSSPropertyOperations; var EventPluginHub = __webpack_require__(93); var EventPropagators = __webpack_require__(94); -var ExecutionEnvironment = __webpack_require__(20); +var ExecutionEnvironment = __webpack_require__(21); var ReactDOMComponentTree = __webpack_require__(19); var ReactUpdates = __webpack_require__(36); var SyntheticEvent = __webpack_require__(41); @@ -47464,7 +47464,7 @@ module.exports = ChangeEventPlugin; var _prodInvariant = __webpack_require__(9); var DOMLazyTree = __webpack_require__(75); -var ExecutionEnvironment = __webpack_require__(20); +var ExecutionEnvironment = __webpack_require__(21); var createNodesFromMarkup = __webpack_require__(526); var emptyFunction = __webpack_require__(31); @@ -49120,7 +49120,7 @@ if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVT } if (true) { - var ExecutionEnvironment = __webpack_require__(20); + var ExecutionEnvironment = __webpack_require__(21); if (ExecutionEnvironment.canUseDOM && window.top === window.self) { // First check if devtools is not installed @@ -50914,7 +50914,7 @@ module.exports = ReactDOMOption; -var ExecutionEnvironment = __webpack_require__(20); +var ExecutionEnvironment = __webpack_require__(21); var getNodeForCharacterOffset = __webpack_require__(800); var getTextContentAccessor = __webpack_require__(347); @@ -51727,7 +51727,7 @@ module.exports = ReactDOMUnknownPropertyHook; var ReactInvalidSetStateWarningHook = __webpack_require__(769); var ReactHostOperationHistoryHook = __webpack_require__(767); var ReactComponentTreeHook = __webpack_require__(27); -var ExecutionEnvironment = __webpack_require__(20); +var ExecutionEnvironment = __webpack_require__(21); var performanceNow = __webpack_require__(535); var warning = __webpack_require__(7); @@ -52319,7 +52319,7 @@ module.exports = ReactEventEmitterMixin; var _assign = __webpack_require__(16); var EventListener = __webpack_require__(262); -var ExecutionEnvironment = __webpack_require__(20); +var ExecutionEnvironment = __webpack_require__(21); var PooledClass = __webpack_require__(62); var ReactDOMComponentTree = __webpack_require__(19); var ReactUpdates = __webpack_require__(36); @@ -54078,7 +54078,7 @@ module.exports = SVGDOMPropertyConfig; var EventPropagators = __webpack_require__(94); -var ExecutionEnvironment = __webpack_require__(20); +var ExecutionEnvironment = __webpack_require__(21); var ReactDOMComponentTree = __webpack_require__(19); var ReactInputSelection = __webpack_require__(339); var SyntheticEvent = __webpack_require__(41); @@ -55631,7 +55631,7 @@ module.exports = getNodeForCharacterOffset; -var ExecutionEnvironment = __webpack_require__(20); +var ExecutionEnvironment = __webpack_require__(21); /** * Generate a mapping of standard vendor prefixes using the defined style property and event name. @@ -56500,7 +56500,7 @@ var locationShape = shape({ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_invariant__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__getRouteParams__ = __webpack_require__(1131); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__getRouteParams__ = __webpack_require__(1137); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ContextUtils__ = __webpack_require__(813); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__RouteUtils__ = __webpack_require__(149); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; @@ -59860,7 +59860,7 @@ TextArea.handledProps = ['as', 'autoHeight', 'onChange', 'value']; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_without__ = __webpack_require__(15); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_without___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_lodash_without__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_map__ = __webpack_require__(21); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_map__ = __webpack_require__(22); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_map___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash_map__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash_each__ = __webpack_require__(123); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash_each___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_lodash_each__); @@ -60009,7 +60009,7 @@ Breadcrumb.Section = __WEBPACK_IMPORTED_MODULE_9__BreadcrumbSection__["a" /* def /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_defineProperty__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_lodash_without__ = __webpack_require__(15); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_lodash_without___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_lodash_without__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_lodash_map__ = __webpack_require__(21); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_lodash_map__ = __webpack_require__(22); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_lodash_map___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_lodash_map__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_lodash_find__ = __webpack_require__(191); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_lodash_find___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_lodash_find__); @@ -60480,7 +60480,7 @@ Grid._meta = { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_lodash_isNil__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_lodash_isNil___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_lodash_isNil__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_lodash_map__ = __webpack_require__(21); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_lodash_map__ = __webpack_require__(22); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_lodash_map___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_lodash_map__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_lodash_get__ = __webpack_require__(72); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_lodash_get___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_lodash_get__); @@ -60942,7 +60942,7 @@ Message.handledProps = ['as', 'attached', 'children', 'className', 'color', 'com /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_without__ = __webpack_require__(15); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_without___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_lodash_without__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_map__ = __webpack_require__(21); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_map__ = __webpack_require__(22); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_map___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash_map__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash_isNil__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash_isNil___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_lodash_isNil__); @@ -61570,7 +61570,7 @@ Header.Subheader = __WEBPACK_IMPORTED_MODULE_8__HeaderSubheader__["a" /* default /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_lodash_includes__ = __webpack_require__(91); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_lodash_includes___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_lodash_includes__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_lodash_map__ = __webpack_require__(21); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_lodash_map__ = __webpack_require__(22); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_lodash_map___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_lodash_map__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_lodash_isNil__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_lodash_isNil___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_lodash_isNil__); @@ -61855,7 +61855,7 @@ Input.create = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_13__lib__["i" /* "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_map__ = __webpack_require__(21); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_map__ = __webpack_require__(22); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_map___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_lodash_map__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_isNil__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_isNil___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash_isNil__); @@ -64799,7 +64799,7 @@ Dimmer.create = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__lib__["i" /* /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_lodash_compact__ = __webpack_require__(311); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_lodash_compact___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_lodash_compact__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_lodash_map__ = __webpack_require__(21); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_lodash_map__ = __webpack_require__(22); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_lodash_map___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_lodash_map__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_lodash_isNil__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_lodash_isNil___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_lodash_isNil__); @@ -67570,7 +67570,7 @@ Rating.handledProps = ['as', 'className', 'clearable', 'defaultRating', 'disable /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_lodash_partialRight___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_lodash_partialRight__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_lodash_inRange__ = __webpack_require__(711); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_lodash_inRange___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_lodash_inRange__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_lodash_map__ = __webpack_require__(21); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_lodash_map__ = __webpack_require__(22); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_lodash_map___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_lodash_map__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_lodash_get__ = __webpack_require__(72); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_lodash_get___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_lodash_get__); @@ -68523,7 +68523,7 @@ Comment.Text = __WEBPACK_IMPORTED_MODULE_11__CommentText__["a" /* default */]; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_without__ = __webpack_require__(15); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_without___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash_without__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash_map__ = __webpack_require__(21); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash_map__ = __webpack_require__(22); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash_map___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_lodash_map__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_lodash_isNil__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_lodash_isNil___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_lodash_isNil__); @@ -68958,7 +68958,7 @@ exports.__esModule = true; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; -var _queryString = __webpack_require__(1115); +var _queryString = __webpack_require__(1121); var _runTransitionHook = __webpack_require__(539); @@ -79766,7 +79766,7 @@ function assignRouterState(router, _ref) { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename__ = __webpack_require__(906); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory__ = __webpack_require__(1113); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory__ = __webpack_require__(1119); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory__); /* harmony export (immutable) */ __webpack_exports__["a"] = createMemoryHistory; @@ -79807,11 +79807,11 @@ var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.do "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__routerWarning__ = __webpack_require__(247); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__computeChangedRoutes__ = __webpack_require__(1129); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__TransitionUtils__ = __webpack_require__(1126); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isActive__ = __webpack_require__(1133); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__getComponents__ = __webpack_require__(1130); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__matchRoutes__ = __webpack_require__(1135); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__computeChangedRoutes__ = __webpack_require__(1135); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__TransitionUtils__ = __webpack_require__(1132); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isActive__ = __webpack_require__(1139); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__getComponents__ = __webpack_require__(1136); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__matchRoutes__ = __webpack_require__(1141); /* harmony export (immutable) */ __webpack_exports__["a"] = createTransitionManager; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; @@ -80103,67 +80103,67 @@ var _react2 = _interopRequireDefault(_react); var _reactRouter = __webpack_require__(248); -var _AdminPage = __webpack_require__(1105); +var _AdminPage = __webpack_require__(1111); var _AdminPage2 = _interopRequireDefault(_AdminPage); -var _SystemInfo = __webpack_require__(1101); +var _SystemInfo = __webpack_require__(1105); var _SystemInfo2 = _interopRequireDefault(_SystemInfo); -var _UserList = __webpack_require__(1102); +var _UserList = __webpack_require__(1106); var _UserList2 = _interopRequireDefault(_UserList); -var _DIO = __webpack_require__(1091); +var _DIO = __webpack_require__(1095); var _DIO2 = _interopRequireDefault(_DIO); -var _Log = __webpack_require__(1096); +var _Log = __webpack_require__(1100); var _Log2 = _interopRequireDefault(_Log); -var _LeOne = __webpack_require__(1095); +var _LeOne = __webpack_require__(1099); var _LeOne2 = _interopRequireDefault(_LeOne); -var _IOGroup = __webpack_require__(1093); +var _IOGroup = __webpack_require__(1097); var _IOGroup2 = _interopRequireDefault(_IOGroup); -var _IOCmd = __webpack_require__(1092); +var _IOCmd = __webpack_require__(1096); var _IOCmd2 = _interopRequireDefault(_IOCmd); -var _Schedule = __webpack_require__(1100); +var _Schedule = __webpack_require__(1104); var _Schedule2 = _interopRequireDefault(_Schedule); -var _Modbus = __webpack_require__(1097); +var _Modbus = __webpack_require__(1101); var _Modbus2 = _interopRequireDefault(_Modbus); -var _ModbusCmd = __webpack_require__(1098); +var _ModbusCmd = __webpack_require__(1102); var _ModbusCmd2 = _interopRequireDefault(_ModbusCmd); -var _ModbusLog = __webpack_require__(1099); +var _ModbusLog = __webpack_require__(1103); var _ModbusLog2 = _interopRequireDefault(_ModbusLog); -var _ActionLink = __webpack_require__(1089); +var _ActionLink = __webpack_require__(1093); var _ActionLink2 = _interopRequireDefault(_ActionLink); -var _ActionLinkAdd = __webpack_require__(1090); +var _ActionLinkAdd = __webpack_require__(1094); var _ActionLinkAdd2 = _interopRequireDefault(_ActionLinkAdd); -var _IPCam = __webpack_require__(1094); +var _IPCam = __webpack_require__(1098); var _IPCam2 = _interopRequireDefault(_IPCam); -var _Wristband = __webpack_require__(1104); +var _Wristband = __webpack_require__(1110); var _Wristband2 = _interopRequireDefault(_Wristband); @@ -80426,7 +80426,7 @@ var _react2 = _interopRequireDefault(_react); var _semanticUiReact = __webpack_require__(8); -var _actions = __webpack_require__(22); +var _actions = __webpack_require__(20); var _reactRouter = __webpack_require__(248); @@ -81408,7 +81408,7 @@ var _react2 = _interopRequireDefault(_react); var _semanticUiReact = __webpack_require__(8); -var _actions = __webpack_require__(22); +var _actions = __webpack_require__(20); var _UnitItem = __webpack_require__(1032); @@ -83654,7 +83654,7 @@ var _ScanForm = __webpack_require__(1048); var _ScanForm2 = _interopRequireDefault(_ScanForm); -var _actions = __webpack_require__(22); +var _actions = __webpack_require__(20); var _SelectScan = __webpack_require__(1049); @@ -85324,7 +85324,7 @@ var _react2 = _interopRequireDefault(_react); var _semanticUiReact = __webpack_require__(8); -var _actions = __webpack_require__(22); +var _actions = __webpack_require__(20); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -86831,7 +86831,7 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -__webpack_require__(22); +__webpack_require__(20); var _reactDatetime = __webpack_require__(245); @@ -87081,7 +87081,7 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -__webpack_require__(22); +__webpack_require__(20); var _reactDatetime = __webpack_require__(245); @@ -87165,7 +87165,7 @@ var _react2 = _interopRequireDefault(_react); var _semanticUiReact = __webpack_require__(8); -var _actions = __webpack_require__(22); +var _actions = __webpack_require__(20); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -87348,7 +87348,7 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _actions = __webpack_require__(22); +var _actions = __webpack_require__(20); var _reactDatetime = __webpack_require__(245); @@ -87644,7 +87644,7 @@ var _ListItem = __webpack_require__(1078); var _ListItem2 = _interopRequireDefault(_ListItem); -var _actions = __webpack_require__(22); +var _actions = __webpack_require__(20); var _UserModal = __webpack_require__(1079); @@ -87885,7 +87885,7 @@ var _react2 = _interopRequireDefault(_react); var _semanticUiReact = __webpack_require__(8); -var _actions = __webpack_require__(22); +var _actions = __webpack_require__(20); var _ListItem = __webpack_require__(1081); @@ -87935,7 +87935,7 @@ var LocStatus = function (_React$Component) { }); }, _this.checkRefresh = function () { if (_this.state.autoRefresh) { - _this.tick = setInterval(_this.runTick, 2000); + _this.tick = setInterval(_this.runTick, 5000); } else { clearInterval(_this.tick); } @@ -88127,6 +88127,8 @@ Object.defineProperty(exports, "__esModule", { value: true }); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); @@ -88135,15 +88137,621 @@ var _react2 = _interopRequireDefault(_react); var _semanticUiReact = __webpack_require__(8); -var _LocStatus = __webpack_require__(1103); +var _actions = __webpack_require__(20); + +var _ListItem = __webpack_require__(1146); + +var _ListItem2 = _interopRequireDefault(_ListItem); + +var _LocationModal = __webpack_require__(1147); + +var _LocationModal2 = _interopRequireDefault(_LocationModal); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var stateDefault = function stateDefault() { + return { + list: [], + modal: { + open: false, + type: 0, + data: {} + } + }; +}; + +var Location = function (_React$Component) { + _inherits(Location, _React$Component); + + function Location() { + var _ref; + + var _temp, _this, _ret; + + _classCallCheck(this, Location); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Location.__proto__ || Object.getPrototypeOf(Location)).call.apply(_ref, [this].concat(args))), _this), _this.state = _extends({}, stateDefault()), _this.getList = function () { + var _this$props = _this.props, + showDialog = _this$props.showDialog, + toggleLoading = _this$props.toggleLoading; + + toggleLoading(1); + fetch('/api/wristband/getlocationlist', (0, _actions.getRequest)()).then(function (response) { + return response.json(); + }).then(function (json) { + toggleLoading(0); + if (json.status != 1) return showDialog(json.message); + _this.setState({ + list: json.data.record || [] + }); + }); + }, _this.openModal = function (type) { + var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + _this.setState({ + modal: { + open: true, + type: type, + data: data + } + }); + }, _this.closeModal = function () { + _this.setState({ + modal: _extends({}, stateDefault().modal) + }); + }, _this.submitModal = function (type, data) { + var showDialog = _this.props.showDialog; + + if (type == 1 && !data.id) return showDialog('資料取得失敗'); + if (type == 0 && !data.sn) return showDialog('請填寫裝置序號'); + + var url = type == 1 ? '/api/wristband/editlocation' : '/api/wristband/addlocation'; + fetch(url, (0, _actions.getRequest)(data)).then(function (response) { + return response.json(); + }).then(function (json) { + if (json.status != 1) return showDialog(json.message); + _this.setState({ + modal: _extends({}, stateDefault().modal) + }, function () { + _this.getList(); + }); + }); + }, _this.delLocation = function (id) { + if (!id) return; + var showDialog = _this.props.showDialog; + + fetch('/api/wristband/dellocation', (0, _actions.getRequest)({ id: id })).then(function (response) { + return response.json(); + }).then(function (json) { + if (json.status != 1) return showDialog(json.message); + _this.getList(); + }); + }, _temp), _possibleConstructorReturn(_this, _ret); + } + + _createClass(Location, [{ + key: 'componentDidMount', + value: function componentDidMount() { + this.getList(); + } + }, { + key: 'render', + value: function render() { + var _this2 = this; + + var i18n = this.props.i18n; + + return _react2.default.createElement( + _semanticUiReact.Container, + { fluid: true }, + _react2.default.createElement( + _semanticUiReact.Segment, + { className: 'clearfix' }, + _react2.default.createElement(_semanticUiReact.Button, { floated: 'right', basic: true, color: 'green', style: { marginBottom: '15px' }, content: '\u65B0\u589E', icon: 'plus', onClick: function onClick() { + _this2.openModal(0); + } }), + _react2.default.createElement( + _semanticUiReact.Table, + null, + _react2.default.createElement( + _semanticUiReact.Table.Header, + null, + _react2.default.createElement( + _semanticUiReact.Table.Row, + null, + _react2.default.createElement( + _semanticUiReact.Table.HeaderCell, + null, + '\u64CD\u4F5C' + ), + _react2.default.createElement( + _semanticUiReact.Table.HeaderCell, + null, + '\u88DD\u7F6E\u5E8F\u865F' + ), + _react2.default.createElement( + _semanticUiReact.Table.HeaderCell, + null, + '\u88DD\u7F6E\u540D\u7A31' + ) + ) + ), + _react2.default.createElement( + _semanticUiReact.Table.Body, + null, + this.state.list.map(function (t, idx) { + return _react2.default.createElement(_ListItem2.default, { key: idx, + i18n: i18n, + data: t, + delLocation: _this2.delLocation, + editLocation: _this2.openModal }); + }) + ) + ) + ), + _react2.default.createElement(_LocationModal2.default, { + i18n: i18n, + open: this.state.modal.open, + type: this.state.modal.type, + data: this.state.modal.data, + closeModal: this.closeModal, + submitModal: this.submitModal }) + ); + } + }]); + + return Location; +}(_react2.default.Component); + +exports.default = Location; + +/***/ }), +/* 1084 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _semanticUiReact = __webpack_require__(8); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var ListItem = function ListItem(_ref) { + var i18n = _ref.i18n, + data = _ref.data, + delWristband = _ref.delWristband, + editWristband = _ref.editWristband; + + + return _react2.default.createElement( + _semanticUiReact.Table.Row, + null, + _react2.default.createElement( + _semanticUiReact.Table.Cell, + null, + _react2.default.createElement(_semanticUiReact.Button, { content: 'Edit', basic: true, onClick: function onClick() { + editWristband(1, data); + } }), + _react2.default.createElement(_semanticUiReact.Button, { content: 'Delete', basic: true, onClick: function onClick() { + delWristband(data.uid); + } }) + ), + _react2.default.createElement( + _semanticUiReact.Table.Cell, + null, + data.mac + ), + _react2.default.createElement( + _semanticUiReact.Table.Cell, + null, + data.name + ), + _react2.default.createElement( + _semanticUiReact.Table.Cell, + null, + data.identity + ), + _react2.default.createElement( + _semanticUiReact.Table.Cell, + null, + data.monitor == 1 ? '啟用' : '停用' + ), + _react2.default.createElement( + _semanticUiReact.Table.Cell, + null, + data.notify == 1 ? '啟用' : '停用' + ), + _react2.default.createElement( + _semanticUiReact.Table.Cell, + null, + data.switch == 1 ? '啟用' : '停用' + ) + ); +}; + +exports.default = ListItem; + +/***/ }), +/* 1085 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _semanticUiReact = __webpack_require__(8); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var WristbandModal = function WristbandModal(_ref) { + var i18n = _ref.i18n, + open = _ref.open, + type = _ref.type, + data = _ref.data, + closeModal = _ref.closeModal, + submitModal = _ref.submitModal; + + + return _react2.default.createElement( + _semanticUiReact.Modal, + { open: open }, + _react2.default.createElement(_semanticUiReact.Modal.Header, { content: type == 1 ? '修改資料' : '新增資料' }), + _react2.default.createElement( + _semanticUiReact.Modal.Content, + null, + _react2.default.createElement( + _semanticUiReact.Form, + { onSubmit: function onSubmit(e, d) { + e.preventDefault(); + submitModal(type, d.formData); + }, serializer: function serializer(e) { + var json = { + name: '', + identity: '', + monitor: 0, + notify: 0, + id: type == 1 ? data.uid : '', + mac: '', + switch: 0 + }; + + var mac = e.querySelector('input[name="mac"]'); + if (mac && 'value' in mac) json.mac = mac.value; + var name = e.querySelector('input[name="name"]'); + if (name && 'value' in name) json.name = name.value; + var identity = e.querySelector('input[name="identity"]'); + if (identity && 'value' in identity) json.identity = identity.value; + var monitor = e.querySelector('input[name="monitor"]'); + if (monitor && 'checked' in monitor) json.monitor = monitor.checked ? 1 : 0; + var notify = e.querySelector('input[name="notify"]'); + if (notify && 'checked' in notify) json.notify = notify.checked ? 1 : 0; + var sw = e.querySelector('input[name="switch"]'); + if (sw && 'checked' in sw) json.switch = sw.checked ? 1 : 0; + + return json; + } }, + _react2.default.createElement( + _semanticUiReact.Form.Field, + null, + _react2.default.createElement(_semanticUiReact.Input, { label: '\u624B\u74B0ID', name: 'mac', defaultValue: data.mac, disabled: type == 1 }) + ), + _react2.default.createElement( + _semanticUiReact.Form.Field, + null, + _react2.default.createElement(_semanticUiReact.Input, { label: '\u540D\u7A31', name: 'name', defaultValue: data.name }) + ), + _react2.default.createElement( + _semanticUiReact.Form.Field, + null, + _react2.default.createElement(_semanticUiReact.Input, { label: '\u8EAB\u4EFD', name: 'identity', defaultValue: data.identity }) + ), + _react2.default.createElement( + _semanticUiReact.Form.Field, + null, + _react2.default.createElement(_semanticUiReact.Checkbox, { label: '\u76E3\u63A7', name: 'monitor', defaultChecked: data.monitor == 1 }) + ), + _react2.default.createElement( + _semanticUiReact.Form.Field, + null, + _react2.default.createElement(_semanticUiReact.Checkbox, { label: '\u901A\u77E5', name: 'notify', defaultChecked: data.notify == 1 }) + ), + _react2.default.createElement( + _semanticUiReact.Form.Field, + null, + _react2.default.createElement(_semanticUiReact.Checkbox, { label: '\u555F\u7528', name: 'switch', defaultChecked: data.switch == 1 }) + ), + _react2.default.createElement( + _semanticUiReact.Grid, + { columns: 2 }, + _react2.default.createElement( + _semanticUiReact.Grid.Column, + null, + _react2.default.createElement(_semanticUiReact.Button, { content: '\u9001\u51FA', fluid: true, type: 'submit' }) + ), + _react2.default.createElement( + _semanticUiReact.Grid.Column, + null, + _react2.default.createElement(_semanticUiReact.Button, { content: '\u53D6\u6D88', fluid: true, type: 'button', onClick: function onClick() { + closeModal(); + } }) + ) + ) + ) + ) + ); +}; +exports.default = WristbandModal; + +/***/ }), +/* 1086 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _semanticUiReact = __webpack_require__(8); + +var _actions = __webpack_require__(20); + +var _ListItem = __webpack_require__(1084); + +var _ListItem2 = _interopRequireDefault(_ListItem); + +var _WristbandModal = __webpack_require__(1085); + +var _WristbandModal2 = _interopRequireDefault(_WristbandModal); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var stateDefault = function stateDefault() { + return { + list: [], + modal: { + open: false, + type: 0, + data: {} + } + }; +}; + +var WristbandInfo = function (_React$Component) { + _inherits(WristbandInfo, _React$Component); + + function WristbandInfo() { + var _ref; + + var _temp, _this, _ret; + + _classCallCheck(this, WristbandInfo); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = WristbandInfo.__proto__ || Object.getPrototypeOf(WristbandInfo)).call.apply(_ref, [this].concat(args))), _this), _this.state = _extends({}, stateDefault()), _this.getList = function () { + var _this$props = _this.props, + showDialog = _this$props.showDialog, + toggleLoading = _this$props.toggleLoading; + + toggleLoading(1); + fetch('/api/wristband/getwristbandlist', (0, _actions.getRequest)()).then(function (response) { + return response.json(); + }).then(function (json) { + toggleLoading(0); + if (json.status != 1) return showDialog(json.message); + _this.setState({ + list: json.data.record || [] + }); + }); + }, _this.delWristband = function (id) { + if (!id) return; + + fetch('/api/wristband/delwristband', (0, _actions.getRequest)({ id: id })).then(function (response) { + return response.json(); + }).then(function (json) { + if (json.status != 1) return showDialog(json.message); + _this.getList(); + }); + }, _this.openModal = function (type) { + var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + _this.setState({ + modal: { + type: type, + data: data, + open: true + } + }); + }, _this.closeModal = function () { + _this.setState({ + modal: _extends({}, stateDefault().modal) + }); + }, _this.submitModal = function (type) { + var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var _this$props2 = _this.props, + showDialog = _this$props2.showDialog, + toggleLoading = _this$props2.toggleLoading; + + if (type == 1 && !data.id) return showDialog('資料取得失敗'); + if (type == 0 && !data.mac) return showDialog('請填寫手環ID'); + + var url = type == 1 ? '/api/wristband/editwristband' : '/api/wristband/addwristband'; + + fetch(url, (0, _actions.getRequest)(data)).then(function (response) { + return response.json(); + }).then(function (json) { + if (json.status != 1) return showDialog(json.message); + _this.setState({ + modal: _extends({}, stateDefault().modal) + }, function () { + _this.getList(); + }); + }); + }, _temp), _possibleConstructorReturn(_this, _ret); + } + + _createClass(WristbandInfo, [{ + key: 'componentDidMount', + value: function componentDidMount() { + this.getList(); + } + }, { + key: 'render', + value: function render() { + var _this2 = this; + + var i18n = this.props.i18n; + + return _react2.default.createElement( + _semanticUiReact.Container, + { fluid: true }, + _react2.default.createElement( + _semanticUiReact.Segment, + { className: 'clearfix' }, + _react2.default.createElement(_semanticUiReact.Button, { basic: true, color: 'green', icon: 'plus', content: '\u65B0\u589E', floated: 'right', onClick: function onClick() { + _this2.openModal(0); + }, style: { marginBottom: '15px' } }), + _react2.default.createElement( + _semanticUiReact.Table, + null, + _react2.default.createElement( + _semanticUiReact.Table.Header, + null, + _react2.default.createElement( + _semanticUiReact.Table.Row, + null, + _react2.default.createElement( + _semanticUiReact.Table.HeaderCell, + null, + '\u64CD\u4F5C' + ), + _react2.default.createElement( + _semanticUiReact.Table.HeaderCell, + null, + '\u624B\u74B0ID' + ), + _react2.default.createElement( + _semanticUiReact.Table.HeaderCell, + null, + '\u624B\u74B0\u540D\u7A31' + ), + _react2.default.createElement( + _semanticUiReact.Table.HeaderCell, + null, + '\u8EAB\u4EFD' + ), + _react2.default.createElement( + _semanticUiReact.Table.HeaderCell, + null, + '\u76E3\u63A7' + ), + _react2.default.createElement( + _semanticUiReact.Table.HeaderCell, + null, + '\u901A\u77E5' + ), + _react2.default.createElement( + _semanticUiReact.Table.HeaderCell, + null, + '\u555F\u7528' + ) + ) + ), + _react2.default.createElement( + _semanticUiReact.Table.Body, + null, + this.state.list.map(function (t, idx) { + return _react2.default.createElement(_ListItem2.default, { key: idx, data: t, i18n: i18n, delWristband: _this2.delWristband, editWristband: _this2.openModal }); + }) + ) + ) + ), + _react2.default.createElement(_WristbandModal2.default, { i18n: i18n, + open: this.state.modal.open, + type: this.state.modal.type, + data: this.state.modal.data, + closeModal: this.closeModal, + submitModal: this.submitModal }) + ); + } + }]); + + return WristbandInfo; +}(_react2.default.Component); + +exports.default = WristbandInfo; + +/***/ }), +/* 1087 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _semanticUiReact = __webpack_require__(8); + +var _LocStatus = __webpack_require__(1107); var _LocStatus2 = _interopRequireDefault(_LocStatus); -var _WristbandInfo = __webpack_require__(1141); +var _WristbandInfo = __webpack_require__(1109); var _WristbandInfo2 = _interopRequireDefault(_WristbandInfo); -var _Location = __webpack_require__(1145); +var _Location = __webpack_require__(1108); var _Location2 = _interopRequireDefault(_Location); @@ -88262,7 +88870,7 @@ var WristbandPage = function (_React$Component) { exports.default = WristbandPage; /***/ }), -/* 1084 */ +/* 1088 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -88312,7 +88920,7 @@ var AlertItem = function AlertItem(_ref) { exports.default = AlertItem; /***/ }), -/* 1085 */ +/* 1089 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -88330,11 +88938,11 @@ var _react2 = _interopRequireDefault(_react); var _semanticUiReact = __webpack_require__(8); -var _actions = __webpack_require__(22); +var _actions = __webpack_require__(20); var _tools = __webpack_require__(147); -var _AlertItem = __webpack_require__(1084); +var _AlertItem = __webpack_require__(1088); var _AlertItem2 = _interopRequireDefault(_AlertItem); @@ -88488,8 +89096,8 @@ var DashBoardUnit = function (_React$Component) { exports.default = DashBoardUnit; /***/ }), -/* 1086 */, -/* 1087 */ +/* 1090 */, +/* 1091 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -88524,7 +89132,7 @@ var MItem = function MItem(_ref) { exports.default = MItem; /***/ }), -/* 1088 */ +/* 1092 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -88542,7 +89150,7 @@ var _semanticUiReact = __webpack_require__(8); var _reactRouter = __webpack_require__(248); -var _Item = __webpack_require__(1087); +var _Item = __webpack_require__(1091); var _Item2 = _interopRequireDefault(_Item); @@ -88653,7 +89261,7 @@ var MainMenu = function MainMenu(_ref) { exports.default = MainMenu; /***/ }), -/* 1089 */ +/* 1093 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -88663,9 +89271,9 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _reactRedux = __webpack_require__(25); +var _reactRedux = __webpack_require__(24); -var _actions = __webpack_require__(22); +var _actions = __webpack_require__(20); var _ActionLink = __webpack_require__(1029); @@ -88711,7 +89319,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_ActionLink2.default); /***/ }), -/* 1090 */ +/* 1094 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -88721,9 +89329,9 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _reactRedux = __webpack_require__(25); +var _reactRedux = __webpack_require__(24); -var _actions = __webpack_require__(22); +var _actions = __webpack_require__(20); var _ActionLinkAdd = __webpack_require__(1034); @@ -88753,7 +89361,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_ActionLinkAdd2.default); /***/ }), -/* 1091 */ +/* 1095 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -88763,13 +89371,13 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _reactRedux = __webpack_require__(25); +var _reactRedux = __webpack_require__(24); var _DIO = __webpack_require__(1037); var _DIO2 = _interopRequireDefault(_DIO); -var _actions = __webpack_require__(22); +var _actions = __webpack_require__(20); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -88806,7 +89414,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_DIO2.default); /***/ }), -/* 1092 */ +/* 1096 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -88816,9 +89424,9 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _reactRedux = __webpack_require__(25); +var _reactRedux = __webpack_require__(24); -var _actions = __webpack_require__(22); +var _actions = __webpack_require__(20); var _IOCmd = __webpack_require__(1039); @@ -88864,7 +89472,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_IOCmd2.default); /***/ }), -/* 1093 */ +/* 1097 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -88874,9 +89482,9 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _reactRedux = __webpack_require__(25); +var _reactRedux = __webpack_require__(24); -var _actions = __webpack_require__(22); +var _actions = __webpack_require__(20); var _IOGroup = __webpack_require__(1043); @@ -88937,7 +89545,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_IOGroup2.default); /***/ }), -/* 1094 */ +/* 1098 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -88947,9 +89555,9 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _reactRedux = __webpack_require__(25); +var _reactRedux = __webpack_require__(24); -var _actions = __webpack_require__(22); +var _actions = __webpack_require__(20); var _IPCam = __webpack_require__(1044); @@ -88979,7 +89587,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_IPCam2.default); /***/ }), -/* 1095 */ +/* 1099 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -88989,13 +89597,13 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _reactRedux = __webpack_require__(25); +var _reactRedux = __webpack_require__(24); var _LeOne = __webpack_require__(1051); var _LeOne2 = _interopRequireDefault(_LeOne); -var _actions = __webpack_require__(22); +var _actions = __webpack_require__(20); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -89051,7 +89659,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_LeOne2.default); /***/ }), -/* 1096 */ +/* 1100 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -89061,13 +89669,13 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _reactRedux = __webpack_require__(25); +var _reactRedux = __webpack_require__(24); var _Log = __webpack_require__(1053); var _Log2 = _interopRequireDefault(_Log); -var _actions = __webpack_require__(22); +var _actions = __webpack_require__(20); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -89095,7 +89703,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_Log2.default); /***/ }), -/* 1097 */ +/* 1101 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -89105,9 +89713,9 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _reactRedux = __webpack_require__(25); +var _reactRedux = __webpack_require__(24); -var _actions = __webpack_require__(22); +var _actions = __webpack_require__(20); var _Modbus = __webpack_require__(1063); @@ -89172,7 +89780,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_Modbus2.default); /***/ }), -/* 1098 */ +/* 1102 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -89182,9 +89790,9 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _reactRedux = __webpack_require__(25); +var _reactRedux = __webpack_require__(24); -var _actions = __webpack_require__(22); +var _actions = __webpack_require__(20); var _ModbusCmd = __webpack_require__(1064); @@ -89214,7 +89822,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_ModbusCmd2.default); /***/ }), -/* 1099 */ +/* 1103 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -89224,9 +89832,9 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _reactRedux = __webpack_require__(25); +var _reactRedux = __webpack_require__(24); -var _actions = __webpack_require__(22); +var _actions = __webpack_require__(20); var _ModbusLog = __webpack_require__(1069); @@ -89267,7 +89875,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_ModbusLog2.default); /***/ }), -/* 1100 */ +/* 1104 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -89277,9 +89885,9 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _reactRedux = __webpack_require__(25); +var _reactRedux = __webpack_require__(24); -var _actions = __webpack_require__(22); +var _actions = __webpack_require__(20); var _Schedule = __webpack_require__(1073); @@ -89344,7 +89952,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_Schedule2.default); /***/ }), -/* 1101 */ +/* 1105 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -89358,7 +89966,7 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _reactRedux = __webpack_require__(25); +var _reactRedux = __webpack_require__(24); var _SystemInfo = __webpack_require__(1077); @@ -89377,7 +89985,7 @@ var mapStateToProps = function mapStateToProps(state) { exports.default = (0, _reactRedux.connect)(mapStateToProps)(_SystemInfo2.default); /***/ }), -/* 1102 */ +/* 1106 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -89391,13 +89999,13 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _reactRedux = __webpack_require__(25); +var _reactRedux = __webpack_require__(24); var _UserList = __webpack_require__(1080); var _UserList2 = _interopRequireDefault(_UserList); -var _actions = __webpack_require__(22); +var _actions = __webpack_require__(20); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -89434,7 +90042,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_UserList2.default); /***/ }), -/* 1103 */ +/* 1107 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -89444,9 +90052,9 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _reactRedux = __webpack_require__(25); +var _reactRedux = __webpack_require__(24); -var _actions = __webpack_require__(22); +var _actions = __webpack_require__(20); var _LocStatus = __webpack_require__(1082); @@ -89476,7 +90084,91 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_LocStatus2.default); /***/ }), -/* 1104 */ +/* 1108 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _reactRedux = __webpack_require__(24); + +var _actions = __webpack_require__(20); + +var _Location = __webpack_require__(1083); + +var _Location2 = _interopRequireDefault(_Location); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var mapStateToProps = function mapStateToProps(state) { + return { + i18n: state.i18n + }; +}; + +var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) { + return { + showDialog: function showDialog(msg) { + dispatch((0, _actions.add_dialog_msg)(msg)); + }, + toggleLoading: function toggleLoading() { + var flag = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + + dispatch((0, _actions.toggle_loading)(flag)); + } + }; +}; + +exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_Location2.default); + +/***/ }), +/* 1109 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _reactRedux = __webpack_require__(24); + +var _actions = __webpack_require__(20); + +var _WristbandInfo = __webpack_require__(1086); + +var _WristbandInfo2 = _interopRequireDefault(_WristbandInfo); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var mapStateToProps = function mapStateToProps(state) { + return { + i18n: state.i18n + }; +}; + +var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) { + return { + showDialog: function showDialog(msg) { + dispatch((0, _actions.add_dialog_msg)(msg)); + }, + toggleLoading: function toggleLoading() { + var flag = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + + dispatch((0, _actions.toggle_loading)(flag)); + } + }; +}; + +exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_WristbandInfo2.default); + +/***/ }), +/* 1110 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -89486,11 +90178,11 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _reactRedux = __webpack_require__(25); +var _reactRedux = __webpack_require__(24); -var _actions = __webpack_require__(22); +var _actions = __webpack_require__(20); -var _Wristband = __webpack_require__(1083); +var _Wristband = __webpack_require__(1087); var _Wristband2 = _interopRequireDefault(_Wristband); @@ -89518,7 +90210,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_Wristband2.default); /***/ }), -/* 1105 */ +/* 1111 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -89534,13 +90226,13 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _reactRedux = __webpack_require__(25); +var _reactRedux = __webpack_require__(24); var _reactDatetime = __webpack_require__(245); var _reactDatetime2 = _interopRequireDefault(_reactDatetime); -var _MenuControl = __webpack_require__(1107); +var _MenuControl = __webpack_require__(1113); var _MenuControl2 = _interopRequireDefault(_MenuControl); @@ -89552,11 +90244,11 @@ var _DialogControl = __webpack_require__(460); var _DialogControl2 = _interopRequireDefault(_DialogControl); -var _DashBoard = __webpack_require__(1106); +var _DashBoard = __webpack_require__(1112); var _DashBoard2 = _interopRequireDefault(_DashBoard); -var _actions = __webpack_require__(22); +var _actions = __webpack_require__(20); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -89626,7 +90318,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(AdmPage); /***/ }), -/* 1106 */ +/* 1112 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -89636,11 +90328,11 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _reactRedux = __webpack_require__(25); +var _reactRedux = __webpack_require__(24); -var _actions = __webpack_require__(22); +var _actions = __webpack_require__(20); -var _DashBoard = __webpack_require__(1085); +var _DashBoard = __webpack_require__(1089); var _DashBoard2 = _interopRequireDefault(_DashBoard); @@ -89671,7 +90363,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_DashBoard2.default); /***/ }), -/* 1107 */ +/* 1113 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -89681,13 +90373,13 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _reactRedux = __webpack_require__(25); +var _reactRedux = __webpack_require__(24); -var _MainMenu = __webpack_require__(1088); +var _MainMenu = __webpack_require__(1092); var _MainMenu2 = _interopRequireDefault(_MainMenu); -var _actions = __webpack_require__(22); +var _actions = __webpack_require__(20); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -89723,7 +90415,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) { exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_MainMenu2.default); /***/ }), -/* 1108 */ +/* 1114 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -89785,7 +90477,7 @@ var loopAsync = exports.loopAsync = function loopAsync(turns, work, callback) { }; /***/ }), -/* 1109 */ +/* 1115 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -89927,7 +90619,7 @@ var replaceLocation = exports.replaceLocation = function replaceLocation(locatio }; /***/ }), -/* 1110 */ +/* 1116 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -89970,7 +90662,7 @@ var replaceLocation = exports.replaceLocation = function replaceLocation(locatio }; /***/ }), -/* 1111 */ +/* 1117 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -89990,7 +90682,7 @@ var _BrowserProtocol = __webpack_require__(536); var BrowserProtocol = _interopRequireWildcard(_BrowserProtocol); -var _RefreshProtocol = __webpack_require__(1110); +var _RefreshProtocol = __webpack_require__(1116); var RefreshProtocol = _interopRequireWildcard(_RefreshProtocol); @@ -90069,7 +90761,7 @@ var createBrowserHistory = function createBrowserHistory() { exports.default = createBrowserHistory; /***/ }), -/* 1112 */ +/* 1118 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -90091,7 +90783,7 @@ var _ExecutionEnvironment = __webpack_require__(537); var _DOMUtils = __webpack_require__(453); -var _HashProtocol = __webpack_require__(1109); +var _HashProtocol = __webpack_require__(1115); var HashProtocol = _interopRequireWildcard(_HashProtocol); @@ -90222,7 +90914,7 @@ var createHashHistory = function createHashHistory() { exports.default = createHashHistory; /***/ }), -/* 1113 */ +/* 1119 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -90368,7 +91060,7 @@ var createMemoryHistory = function createMemoryHistory() { exports.default = createMemoryHistory; /***/ }), -/* 1114 */ +/* 1120 */ /***/ (function(module, exports, __webpack_require__) { var map = { @@ -90603,16 +91295,16 @@ webpackContext.keys = function webpackContextKeys() { }; webpackContext.resolve = webpackContextResolve; module.exports = webpackContext; -webpackContext.id = 1114; +webpackContext.id = 1120; /***/ }), -/* 1115 */ +/* 1121 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var strictUriEncode = __webpack_require__(1137); +var strictUriEncode = __webpack_require__(1143); var objectAssign = __webpack_require__(16); function encoderForArrayFormat(opts) { @@ -90817,14 +91509,14 @@ exports.stringify = function (obj, opts) { /***/ }), -/* 1116 */ +/* 1122 */ /***/ (function(module, exports, __webpack_require__) { var React = __webpack_require__(0), - DaysView = __webpack_require__(1117), - MonthsView = __webpack_require__(1118), - YearsView = __webpack_require__(1120), - TimeView = __webpack_require__(1119) + DaysView = __webpack_require__(1123), + MonthsView = __webpack_require__(1124), + YearsView = __webpack_require__(1126), + TimeView = __webpack_require__(1125) ; var CalendarContainer = React.createClass({ @@ -90844,7 +91536,7 @@ module.exports = CalendarContainer; /***/ }), -/* 1117 */ +/* 1123 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -90995,7 +91687,7 @@ module.exports = DateTimePickerDays; /***/ }), -/* 1118 */ +/* 1124 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -91109,7 +91801,7 @@ module.exports = DateTimePickerMonths; /***/ }), -/* 1119 */ +/* 1125 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -91344,7 +92036,7 @@ module.exports = DateTimePickerTime; /***/ }), -/* 1120 */ +/* 1126 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -91456,7 +92148,7 @@ module.exports = DateTimePickerYears; /***/ }), -/* 1121 */ +/* 1127 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -91481,7 +92173,7 @@ var IndexLink = __WEBPACK_IMPORTED_MODULE_0_react___default.a.createClass({ /* harmony default export */ __webpack_exports__["a"] = IndexLink; /***/ }), -/* 1122 */ +/* 1128 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -91539,7 +92231,7 @@ var IndexRedirect = __WEBPACK_IMPORTED_MODULE_0_react___default.a.createClass({ /* harmony default export */ __webpack_exports__["a"] = IndexRedirect; /***/ }), -/* 1123 */ +/* 1129 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -91596,7 +92288,7 @@ var IndexRoute = __WEBPACK_IMPORTED_MODULE_0_react___default.a.createClass({ /* harmony default export */ __webpack_exports__["a"] = IndexRoute; /***/ }), -/* 1124 */ +/* 1130 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -91652,7 +92344,7 @@ var Route = __WEBPACK_IMPORTED_MODULE_0_react___default.a.createClass({ /* harmony default export */ __webpack_exports__["a"] = Route; /***/ }), -/* 1125 */ +/* 1131 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -91820,7 +92512,7 @@ var Router = __WEBPACK_IMPORTED_MODULE_1_react___default.a.createClass({ /* harmony default export */ __webpack_exports__["a"] = Router; /***/ }), -/* 1126 */ +/* 1132 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -91978,7 +92670,7 @@ function runLeaveHooks(routes, prevState) { } /***/ }), -/* 1127 */ +/* 1133 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -92029,11 +92721,11 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument }; /***/ }), -/* 1128 */ +/* 1134 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory__ = __webpack_require__(1111); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory__ = __webpack_require__(1117); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createRouterHistory__ = __webpack_require__(1022); @@ -92041,7 +92733,7 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument /* harmony default export */ __webpack_exports__["a"] = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__createRouterHistory__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory___default.a); /***/ }), -/* 1129 */ +/* 1135 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -92120,7 +92812,7 @@ function computeChangedRoutes(prevState, nextState) { /* harmony default export */ __webpack_exports__["a"] = computeChangedRoutes; /***/ }), -/* 1130 */ +/* 1136 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -92162,7 +92854,7 @@ function getComponents(nextState, callback) { /* harmony default export */ __webpack_exports__["a"] = getComponents; /***/ }), -/* 1131 */ +/* 1137 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -92190,11 +92882,11 @@ function getRouteParams(route, params) { /* harmony default export */ __webpack_exports__["a"] = getRouteParams; /***/ }), -/* 1132 */ +/* 1138 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory__ = __webpack_require__(1112); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory__ = __webpack_require__(1118); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createRouterHistory__ = __webpack_require__(1022); @@ -92202,7 +92894,7 @@ function getRouteParams(route, params) { /* harmony default export */ __webpack_exports__["a"] = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__createRouterHistory__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory___default.a); /***/ }), -/* 1133 */ +/* 1139 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -92355,7 +93047,7 @@ function isActive(_ref, indexOnly, currentLocation, routes, params) { } /***/ }), -/* 1134 */ +/* 1140 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -92424,7 +93116,7 @@ function match(_ref, callback) { /* harmony default export */ __webpack_exports__["a"] = match; /***/ }), -/* 1135 */ +/* 1141 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -92684,7 +93376,7 @@ function matchRoutes(routes, location, callback, remainingPathname) { } /***/ }), -/* 1136 */ +/* 1142 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -92756,7 +93448,7 @@ function withRouter(WrappedComponent, options) { } /***/ }), -/* 1137 */ +/* 1143 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -92769,7 +93461,7 @@ module.exports = function (str) { /***/ }), -/* 1138 */ +/* 1144 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -92789,7 +93481,7 @@ var _reactDom2 = _interopRequireDefault(_reactDom); var _reactRouter = __webpack_require__(248); -var _reactRedux = __webpack_require__(25); +var _reactRedux = __webpack_require__(24); var _redux = __webpack_require__(146); @@ -92805,7 +93497,7 @@ var _reduxThunk = __webpack_require__(451); var _reduxThunk2 = _interopRequireDefault(_reduxThunk); -var _actions = __webpack_require__(22); +var _actions = __webpack_require__(20); var _i18next = __webpack_require__(456); @@ -92885,267 +93577,8 @@ var PageRoot = function (_React$Component) { _reactDom2.default.render(_react2.default.createElement(PageRoot, null), document.getElementById('app')); /***/ }), -/* 1139 */, -/* 1140 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _react = __webpack_require__(0); - -var _react2 = _interopRequireDefault(_react); - -var _semanticUiReact = __webpack_require__(8); - -var _actions = __webpack_require__(22); - -var _ListItem = __webpack_require__(1142); - -var _ListItem2 = _interopRequireDefault(_ListItem); - -var _WristbandModal = __webpack_require__(1143); - -var _WristbandModal2 = _interopRequireDefault(_WristbandModal); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var stateDefault = function stateDefault() { - return { - list: [], - modal: { - open: false, - type: 0, - data: {} - } - }; -}; - -var WristbandInfo = function (_React$Component) { - _inherits(WristbandInfo, _React$Component); - - function WristbandInfo() { - var _ref; - - var _temp, _this, _ret; - - _classCallCheck(this, WristbandInfo); - - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = WristbandInfo.__proto__ || Object.getPrototypeOf(WristbandInfo)).call.apply(_ref, [this].concat(args))), _this), _this.state = _extends({}, stateDefault()), _this.getList = function () { - var _this$props = _this.props, - showDialog = _this$props.showDialog, - toggleLoading = _this$props.toggleLoading; - - toggleLoading(1); - fetch('/api/wristband/getwristbandlist', (0, _actions.getRequest)()).then(function (response) { - return response.json(); - }).then(function (json) { - toggleLoading(0); - if (json.status != 1) return showDialog(json.message); - _this.setState({ - list: json.data.record || [] - }); - }); - }, _this.delWristband = function (id) { - if (!id) return; - - fetch('/api/wristband/delwristband', (0, _actions.getRequest)({ id: id })).then(function (response) { - return response.json(); - }).then(function (json) { - if (json.status != 1) return showDialog(json.message); - _this.getList(); - }); - }, _this.openModal = function (type) { - var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - _this.setState({ - modal: { - type: type, - data: data, - open: true - } - }); - }, _this.closeModal = function () { - _this.setState({ - modal: _extends({}, stateDefault().modal) - }); - }, _this.submitModal = function (type) { - var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - var _this$props2 = _this.props, - showDialog = _this$props2.showDialog, - toggleLoading = _this$props2.toggleLoading; - - if (type == 1 && !data.id) return showDialog('資料取得失敗'); - if (type == 0 && !data.mac) return showDialog('請填寫手環ID'); - - var url = type == 1 ? '/api/wristband/editwristband' : '/api/wristband/addwristband'; - - fetch(url, (0, _actions.getRequest)(data)).then(function (response) { - return response.json(); - }).then(function (json) { - if (json.status != 1) return showDialog(json.message); - _this.setState({ - modal: _extends({}, stateDefault().modal) - }, function () { - _this.getList(); - }); - }); - }, _temp), _possibleConstructorReturn(_this, _ret); - } - - _createClass(WristbandInfo, [{ - key: 'componentDidMount', - value: function componentDidMount() { - this.getList(); - } - }, { - key: 'render', - value: function render() { - var _this2 = this; - - var i18n = this.props.i18n; - - return _react2.default.createElement( - _semanticUiReact.Container, - { fluid: true }, - _react2.default.createElement( - _semanticUiReact.Segment, - { className: 'clearfix' }, - _react2.default.createElement(_semanticUiReact.Button, { basic: true, color: 'green', icon: 'plus', content: '\u65B0\u589E', floated: 'right', onClick: function onClick() { - _this2.openModal(0); - }, style: { marginBottom: '15px' } }), - _react2.default.createElement( - _semanticUiReact.Table, - null, - _react2.default.createElement( - _semanticUiReact.Table.Header, - null, - _react2.default.createElement( - _semanticUiReact.Table.Row, - null, - _react2.default.createElement( - _semanticUiReact.Table.HeaderCell, - null, - '\u64CD\u4F5C' - ), - _react2.default.createElement( - _semanticUiReact.Table.HeaderCell, - null, - '\u624B\u74B0ID' - ), - _react2.default.createElement( - _semanticUiReact.Table.HeaderCell, - null, - '\u624B\u74B0\u540D\u7A31' - ), - _react2.default.createElement( - _semanticUiReact.Table.HeaderCell, - null, - '\u8EAB\u4EFD' - ), - _react2.default.createElement( - _semanticUiReact.Table.HeaderCell, - null, - '\u76E3\u63A7' - ), - _react2.default.createElement( - _semanticUiReact.Table.HeaderCell, - null, - '\u901A\u77E5' - ), - _react2.default.createElement( - _semanticUiReact.Table.HeaderCell, - null, - '\u555F\u7528' - ) - ) - ), - _react2.default.createElement( - _semanticUiReact.Table.Body, - null, - this.state.list.map(function (t, idx) { - return _react2.default.createElement(_ListItem2.default, { key: idx, data: t, i18n: i18n, delWristband: _this2.delWristband, editWristband: _this2.openModal }); - }) - ) - ) - ), - _react2.default.createElement(_WristbandModal2.default, { i18n: i18n, - open: this.state.modal.open, - type: this.state.modal.type, - data: this.state.modal.data, - closeModal: this.closeModal, - submitModal: this.submitModal }) - ); - } - }]); - - return WristbandInfo; -}(_react2.default.Component); - -exports.default = WristbandInfo; - -/***/ }), -/* 1141 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _reactRedux = __webpack_require__(25); - -var _actions = __webpack_require__(22); - -var _WristbandInfo = __webpack_require__(1140); - -var _WristbandInfo2 = _interopRequireDefault(_WristbandInfo); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var mapStateToProps = function mapStateToProps(state) { - return { - i18n: state.i18n - }; -}; - -var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) { - return { - showDialog: function showDialog(msg) { - dispatch((0, _actions.add_dialog_msg)(msg)); - }, - toggleLoading: function toggleLoading() { - var flag = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; - - dispatch((0, _actions.toggle_loading)(flag)); - } - }; -}; - -exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_WristbandInfo2.default); - -/***/ }), -/* 1142 */ +/* 1145 */, +/* 1146 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -93166,8 +93599,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de var ListItem = function ListItem(_ref) { var i18n = _ref.i18n, data = _ref.data, - delWristband = _ref.delWristband, - editWristband = _ref.editWristband; + delLocation = _ref.delLocation, + editLocation = _ref.editLocation; return _react2.default.createElement( @@ -93177,41 +93610,21 @@ var ListItem = function ListItem(_ref) { _semanticUiReact.Table.Cell, null, _react2.default.createElement(_semanticUiReact.Button, { content: 'Edit', basic: true, onClick: function onClick() { - editWristband(1, data); + editLocation(1, data); } }), _react2.default.createElement(_semanticUiReact.Button, { content: 'Delete', basic: true, onClick: function onClick() { - delWristband(data.uid); + delLocation(data.uid); } }) ), _react2.default.createElement( _semanticUiReact.Table.Cell, null, - data.mac + data.serialnumber ), _react2.default.createElement( _semanticUiReact.Table.Cell, null, data.name - ), - _react2.default.createElement( - _semanticUiReact.Table.Cell, - null, - data.identity - ), - _react2.default.createElement( - _semanticUiReact.Table.Cell, - null, - data.monitor == 1 ? '啟用' : '停用' - ), - _react2.default.createElement( - _semanticUiReact.Table.Cell, - null, - data.notify == 1 ? '啟用' : '停用' - ), - _react2.default.createElement( - _semanticUiReact.Table.Cell, - null, - data.switch == 1 ? '啟用' : '停用' ) ); }; @@ -93219,7 +93632,7 @@ var ListItem = function ListItem(_ref) { exports.default = ListItem; /***/ }), -/* 1143 */ +/* 1147 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -93261,56 +93674,27 @@ var WristbandModal = function WristbandModal(_ref) { }, serializer: function serializer(e) { var json = { name: '', - identity: '', - monitor: 0, - notify: 0, - id: type == 1 ? data.uid : '', - mac: '' + sn: '', + id: type == 1 ? data.uid : '' }; - var mac = e.querySelector('input[name="mac"]'); - if (mac && 'value' in mac) json.mac = mac.value; var name = e.querySelector('input[name="name"]'); if (name && 'value' in name) json.name = name.value; - var identity = e.querySelector('input[name="identity"]'); - if (identity && 'value' in identity) json.identity = identity.value; - var monitor = e.querySelector('input[name="monitor"]'); - if (monitor && 'checked' in monitor) json.monitor = monitor.checked ? 1 : 0; - var notify = e.querySelector('input[name="notify"]'); - if (notify && 'checked' in notify) json.notify = notify.checked ? 1 : 0; + var sn = e.querySelector('input[name="serialnumber"]'); + if (sn && 'value' in sn) json.sn = sn.value; return json; } }, _react2.default.createElement( _semanticUiReact.Form.Field, null, - _react2.default.createElement(_semanticUiReact.Input, { label: '\u624B\u74B0ID', name: 'mac', defaultValue: data.mac, disabled: type == 1 }) + _react2.default.createElement(_semanticUiReact.Input, { label: '\u88DD\u7F6E\u5E8F\u865F', name: 'serialnumber', defaultValue: data.serialnumber, disabled: type == 1 }) ), _react2.default.createElement( _semanticUiReact.Form.Field, null, _react2.default.createElement(_semanticUiReact.Input, { label: '\u540D\u7A31', name: 'name', defaultValue: data.name }) ), - _react2.default.createElement( - _semanticUiReact.Form.Field, - null, - _react2.default.createElement(_semanticUiReact.Input, { label: '\u8EAB\u4EFD', name: 'identity', defaultValue: data.identity }) - ), - _react2.default.createElement( - _semanticUiReact.Form.Field, - null, - _react2.default.createElement(_semanticUiReact.Checkbox, { label: '\u76E3\u63A7', name: 'monitor', defaultChecked: data.monitor == 1 }) - ), - _react2.default.createElement( - _semanticUiReact.Form.Field, - null, - _react2.default.createElement(_semanticUiReact.Checkbox, { label: '\u901A\u77E5', name: 'notify', defaultChecked: data.notify == 1 }) - ), - _react2.default.createElement( - _semanticUiReact.Form.Field, - null, - _react2.default.createElement(_semanticUiReact.Checkbox, { label: '\u555F\u7528', name: 'switch', defaultChecked: data.switch == 1 }) - ), _react2.default.createElement( _semanticUiReact.Grid, { columns: 2 }, @@ -93333,147 +93717,5 @@ var WristbandModal = function WristbandModal(_ref) { }; exports.default = WristbandModal; -/***/ }), -/* 1144 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _react = __webpack_require__(0); - -var _react2 = _interopRequireDefault(_react); - -var _semanticUiReact = __webpack_require__(8); - -var _actions = __webpack_require__(22); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var stateDefault = function stateDefault() { - return { - list: [], - modal: { - open: false, - type: 0, - data: {} - } - }; -}; - -var Location = function (_React$Component) { - _inherits(Location, _React$Component); - - function Location() { - var _ref; - - var _temp, _this, _ret; - - _classCallCheck(this, Location); - - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Location.__proto__ || Object.getPrototypeOf(Location)).call.apply(_ref, [this].concat(args))), _this), _this.state = _extends({}, stateDefault()), _this.getList = function () { - var _this$props = _this.props, - showDialog = _this$props.showDialog, - toggleLoading = _this$props.toggleLoading; - - toggleLoading(1); - fetch('/api/wristband/getlocationlist', (0, _actions.getRequest)()).then(function (response) { - return response.json(); - }).then(function (json) { - toggleLoading(0); - if (json.status != 1) return showDialog(json.message); - _this.setState({ - list: json.data.record || [] - }); - }); - }, _temp), _possibleConstructorReturn(_this, _ret); - } - - _createClass(Location, [{ - key: 'componentDidMount', - value: function componentDidMount() { - this.getList(); - } - }, { - key: 'render', - value: function render() { - - return _react2.default.createElement( - _semanticUiReact.Container, - { fluid: true }, - _react2.default.createElement( - _semanticUiReact.Segment, - { className: 'clearfix' }, - _react2.default.createElement(_semanticUiReact.Button, { floated: 'right', basic: true, color: 'green', style: { marginBottom: '15px' }, content: '\u65B0\u589E', icon: 'plus' }) - ) - ); - } - }]); - - return Location; -}(_react2.default.Component); - -exports.default = Location; - -/***/ }), -/* 1145 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _reactRedux = __webpack_require__(25); - -var _actions = __webpack_require__(22); - -var _Location = __webpack_require__(1144); - -var _Location2 = _interopRequireDefault(_Location); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var mapStateToProps = function mapStateToProps(state) { - return { - i18n: state.i18n - }; -}; - -var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) { - return { - showDialog: function showDialog(msg) { - dispatch((0, _actions.add_dialog_msg)(msg)); - }, - toggleLoading: function toggleLoading() { - var flag = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; - - dispatch((0, _actions.toggle_loading)(flag)); - } - }; -}; - -exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_Location2.default); - /***/ }) /******/ ]); \ No newline at end of file diff --git a/public/js/index_bundle.js b/public/js/index_bundle.js index 281fd57..5ae1f92 100644 --- a/public/js/index_bundle.js +++ b/public/js/index_bundle.js @@ -63,7 +63,7 @@ /******/ __webpack_require__.p = ""; /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 1139); +/******/ return __webpack_require__(__webpack_require__.s = 1145); /******/ }) /************************************************************************/ /******/ ([ @@ -1428,106 +1428,6 @@ module.exports = ReactDOMComponentTree; /* 20 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; -/** - * Copyright (c) 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - - - -var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); - -/** - * Simple, lightweight module assisting with the detection and context of - * Worker. Helps avoid circular dependencies and allows code to reason about - * whether or not they are in a Worker, even if they never include the main - * `ReactWorker` dependency. - */ -var ExecutionEnvironment = { - - canUseDOM: canUseDOM, - - canUseWorkers: typeof Worker !== 'undefined', - - canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent), - - canUseViewport: canUseDOM && !!window.screen, - - isInWorker: !canUseDOM // For now, this is true - might change in the future. - -}; - -module.exports = ExecutionEnvironment; - -/***/ }), -/* 21 */ -/***/ (function(module, exports, __webpack_require__) { - -var arrayMap = __webpack_require__(38), - baseIteratee = __webpack_require__(32), - baseMap = __webpack_require__(280), - isArray = __webpack_require__(14); - -/** - * Creates an array of values by running each element in `collection` thru - * `iteratee`. The iteratee is invoked with three arguments: - * (value, index|key, collection). - * - * Many lodash methods are guarded to work as iteratees for methods like - * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. - * - * The guarded methods are: - * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, - * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, - * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, - * `template`, `trim`, `trimEnd`, `trimStart`, and `words` - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - * @example - * - * function square(n) { - * return n * n; - * } - * - * _.map([4, 8], square); - * // => [16, 64] - * - * _.map({ 'a': 4, 'b': 8 }, square); - * // => [16, 64] (iteration order is not guaranteed) - * - * var users = [ - * { 'user': 'barney' }, - * { 'user': 'fred' } - * ]; - * - * // The `_.property` iteratee shorthand. - * _.map(users, 'user'); - * // => ['barney', 'fred'] - */ -function map(collection, iteratee) { - var func = isArray(collection) ? arrayMap : baseMap; - return func(collection, baseIteratee(iteratee, 3)); -} - -module.exports = map; - - -/***/ }), -/* 22 */ -/***/ (function(module, exports, __webpack_require__) { - "use strict"; @@ -2394,6 +2294,106 @@ var clear_dashboard = exports.clear_dashboard = function clear_dashboard() { }; }; +/***/ }), +/* 21 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); + +/** + * Simple, lightweight module assisting with the detection and context of + * Worker. Helps avoid circular dependencies and allows code to reason about + * whether or not they are in a Worker, even if they never include the main + * `ReactWorker` dependency. + */ +var ExecutionEnvironment = { + + canUseDOM: canUseDOM, + + canUseWorkers: typeof Worker !== 'undefined', + + canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent), + + canUseViewport: canUseDOM && !!window.screen, + + isInWorker: !canUseDOM // For now, this is true - might change in the future. + +}; + +module.exports = ExecutionEnvironment; + +/***/ }), +/* 22 */ +/***/ (function(module, exports, __webpack_require__) { + +var arrayMap = __webpack_require__(38), + baseIteratee = __webpack_require__(32), + baseMap = __webpack_require__(280), + isArray = __webpack_require__(14); + +/** + * Creates an array of values by running each element in `collection` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. + * + * The guarded methods are: + * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, + * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, + * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, + * `template`, `trim`, `trimEnd`, `trimStart`, and `words` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + * @example + * + * function square(n) { + * return n * n; + * } + * + * _.map([4, 8], square); + * // => [16, 64] + * + * _.map({ 'a': 4, 'b': 8 }, square); + * // => [16, 64] (iteration order is not guaranteed) + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * // The `_.property` iteratee shorthand. + * _.map(users, 'user'); + * // => ['barney', 'fred'] + */ +function map(collection, iteratee) { + var func = isArray(collection) ? arrayMap : baseMap; + return func(collection, baseIteratee(iteratee, 3)); +} + +module.exports = map; + + /***/ }), /* 23 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -2406,21 +2406,6 @@ var clear_dashboard = exports.clear_dashboard = function clear_dashboard() { /***/ }), /* 24 */ -/***/ (function(module, exports, __webpack_require__) { - -var freeGlobal = __webpack_require__(291); - -/** Detect free variable `self`. */ -var freeSelf = typeof self == 'object' && self && self.Object === Object && self; - -/** Used as a reference to the global object. */ -var root = freeGlobal || freeSelf || Function('return this')(); - -module.exports = root; - - -/***/ }), -/* 25 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -2437,6 +2422,21 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/***/ }), +/* 25 */ +/***/ (function(module, exports, __webpack_require__) { + +var freeGlobal = __webpack_require__(291); + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +module.exports = root; + + /***/ }), /* 26 */ /***/ (function(module, exports) { @@ -5236,7 +5236,7 @@ module.exports = __webpack_require__(56) ? function(object, key, value){ /* 69 */ /***/ (function(module, exports, __webpack_require__) { -var root = __webpack_require__(24); +var root = __webpack_require__(25); /** Built-in value references. */ var Symbol = root.Symbol; @@ -6443,7 +6443,7 @@ module.exports = includes; /* 92 */ /***/ (function(module, exports, __webpack_require__) { -/* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(24), +/* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(25), stubFalse = __webpack_require__(723); /** Detect free variable `exports`. */ @@ -9215,7 +9215,7 @@ module.exports = escapeTextContentForBrowser; -var ExecutionEnvironment = __webpack_require__(20); +var ExecutionEnvironment = __webpack_require__(21); var DOMNamespaces = __webpack_require__(197); var WHITESPACE_TEST = /^[ \r\n\t\f]/; @@ -10285,7 +10285,7 @@ module.exports = LodashWrapper; /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(59), - root = __webpack_require__(24); + root = __webpack_require__(25); /* Built-in method references that are verified to be native. */ var Map = getNative(root, 'Map'); @@ -12491,7 +12491,7 @@ module.exports = getEventTarget; -var ExecutionEnvironment = __webpack_require__(20); +var ExecutionEnvironment = __webpack_require__(21); var useHasFeature; if (ExecutionEnvironment.canUseDOM) { @@ -14373,7 +14373,7 @@ FeedContent._meta = { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_map__ = __webpack_require__(21); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_map__ = __webpack_require__(22); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_map___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_lodash_map__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_isNil__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_isNil___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash_isNil__); @@ -15788,7 +15788,7 @@ var Symbol = __WEBPACK_IMPORTED_MODULE_0__root_js__["a" /* default */].Symbol; /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(59), - root = __webpack_require__(24); + root = __webpack_require__(25); /* Built-in method references that are verified to be native. */ var Set = getNative(root, 'Set'); @@ -15800,7 +15800,7 @@ module.exports = Set; /* 269 */ /***/ (function(module, exports, __webpack_require__) { -var root = __webpack_require__(24); +var root = __webpack_require__(25); /** Built-in value references. */ var Uint8Array = root.Uint8Array; @@ -15813,7 +15813,7 @@ module.exports = Uint8Array; /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(59), - root = __webpack_require__(24); + root = __webpack_require__(25); /* Built-in method references that are verified to be native. */ var WeakMap = getNative(root, 'WeakMap'); @@ -16386,7 +16386,7 @@ var composeArgs = __webpack_require__(285), getHolder = __webpack_require__(185), reorder = __webpack_require__(665), replaceHolders = __webpack_require__(121), - root = __webpack_require__(24); + root = __webpack_require__(25); /** Used to compose bitmasks for function metadata. */ var WRAP_BIND_FLAG = 1, @@ -19795,7 +19795,7 @@ module.exports = getHostComponentFromComposite; -var ExecutionEnvironment = __webpack_require__(20); +var ExecutionEnvironment = __webpack_require__(21); var contentKey = null; @@ -20022,7 +20022,7 @@ module.exports = isTextInputElement; -var ExecutionEnvironment = __webpack_require__(20); +var ExecutionEnvironment = __webpack_require__(21); var escapeTextContentForBrowser = __webpack_require__(136); var setInnerHTML = __webpack_require__(137); @@ -22667,7 +22667,7 @@ MessageHeader.create = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__lib__[ "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_map__ = __webpack_require__(21); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_map__ = __webpack_require__(22); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_map___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_lodash_map__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_isNil__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_isNil___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash_isNil__); @@ -22895,7 +22895,7 @@ TableHeaderCell.defaultProps = { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_without__ = __webpack_require__(15); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_without___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_lodash_without__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_map__ = __webpack_require__(21); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_map__ = __webpack_require__(22); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_map___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash_map__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash_isNil__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash_isNil___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_lodash_isNil__); @@ -24769,7 +24769,7 @@ StepContent._meta = { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_without__ = __webpack_require__(15); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_without___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_lodash_without__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_map__ = __webpack_require__(21); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_map__ = __webpack_require__(22); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_map___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash_map__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash_isNil__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash_isNil___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_lodash_isNil__); @@ -26806,7 +26806,7 @@ CardContent._meta = { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_map__ = __webpack_require__(21); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_map__ = __webpack_require__(22); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_map___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_lodash_map__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_isNil__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_isNil___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash_isNil__); @@ -27710,7 +27710,7 @@ ItemContent._meta = { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_map__ = __webpack_require__(21); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_map__ = __webpack_require__(22); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_map___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash_map__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash_isNil__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash_isNil___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_lodash_isNil__); @@ -27970,7 +27970,7 @@ Statistic.Value = __WEBPACK_IMPORTED_MODULE_8__StatisticValue__["a" /* default * /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_without__ = __webpack_require__(15); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_without___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_lodash_without__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_map__ = __webpack_require__(21); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_map__ = __webpack_require__(22); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_map___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash_map__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash_isNil__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash_isNil___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_lodash_isNil__); @@ -28459,13 +28459,13 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _reactRedux = __webpack_require__(25); +var _reactRedux = __webpack_require__(24); var _Dialog = __webpack_require__(458); var _Dialog2 = _interopRequireDefault(_Dialog); -var _actions = __webpack_require__(22); +var _actions = __webpack_require__(20); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -28498,7 +28498,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _reactRedux = __webpack_require__(25); +var _reactRedux = __webpack_require__(24); var _Loading = __webpack_require__(459); @@ -30573,7 +30573,7 @@ module.exports = createArrayFromMixed; /*eslint-disable fb-www/unsafe-html*/ -var ExecutionEnvironment = __webpack_require__(20); +var ExecutionEnvironment = __webpack_require__(21); var createArrayFromMixed = __webpack_require__(525); var getMarkupWrap = __webpack_require__(527); @@ -30661,7 +30661,7 @@ module.exports = createNodesFromMarkup; /*eslint-disable fb-www/unsafe-html */ -var ExecutionEnvironment = __webpack_require__(20); +var ExecutionEnvironment = __webpack_require__(21); var invariant = __webpack_require__(6); @@ -30979,7 +30979,7 @@ module.exports = memoizeStringOnly; -var ExecutionEnvironment = __webpack_require__(20); +var ExecutionEnvironment = __webpack_require__(21); var performance; @@ -33069,7 +33069,7 @@ function isObjectLike(value) { /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(59), - root = __webpack_require__(24); + root = __webpack_require__(25); /* Built-in method references that are verified to be native. */ var DataView = getNative(root, 'DataView'); @@ -33120,7 +33120,7 @@ module.exports = Hash; /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(59), - root = __webpack_require__(24); + root = __webpack_require__(25); /* Built-in method references that are verified to be native. */ var Promise = getNative(root, 'Promise'); @@ -34532,7 +34532,7 @@ module.exports = castSlice; /* 602 */ /***/ (function(module, exports, __webpack_require__) { -/* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(24); +/* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(25); /** Detect free variable `exports`. */ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; @@ -34862,7 +34862,7 @@ module.exports = copySymbolsIn; /* 613 */ /***/ (function(module, exports, __webpack_require__) { -var root = __webpack_require__(24); +var root = __webpack_require__(25); /** Used to detect overreaching core-js shims. */ var coreJsData = root['__core-js_shared__']; @@ -35014,7 +35014,7 @@ module.exports = createBaseFor; /***/ (function(module, exports, __webpack_require__) { var createCtor = __webpack_require__(114), - root = __webpack_require__(24); + root = __webpack_require__(25); /** Used to compose bitmasks for function metadata. */ var WRAP_BIND_FLAG = 1; @@ -35122,7 +35122,7 @@ var apply = __webpack_require__(103), createRecurry = __webpack_require__(288), getHolder = __webpack_require__(185), replaceHolders = __webpack_require__(121), - root = __webpack_require__(24); + root = __webpack_require__(25); /** * Creates a function that wraps `func` to enable currying. @@ -35285,7 +35285,7 @@ module.exports = createFlow; var apply = __webpack_require__(103), createCtor = __webpack_require__(114), - root = __webpack_require__(24); + root = __webpack_require__(25); /** Used to compose bitmasks for function metadata. */ var WRAP_BIND_FLAG = 1; @@ -38757,7 +38757,7 @@ module.exports = func; /***/ (function(module, exports, __webpack_require__) { var convert = __webpack_require__(18), - func = convert('map', __webpack_require__(21)); + func = convert('map', __webpack_require__(22)); func.placeholder = __webpack_require__(17); module.exports = func; @@ -40154,7 +40154,7 @@ module.exports = AutoFocusUtils; var EventPropagators = __webpack_require__(94); -var ExecutionEnvironment = __webpack_require__(20); +var ExecutionEnvironment = __webpack_require__(21); var FallbackCompositionState = __webpack_require__(741); var SyntheticCompositionEvent = __webpack_require__(784); var SyntheticInputEvent = __webpack_require__(787); @@ -40544,7 +40544,7 @@ module.exports = BeforeInputEventPlugin; var CSSProperty = __webpack_require__(331); -var ExecutionEnvironment = __webpack_require__(20); +var ExecutionEnvironment = __webpack_require__(21); var ReactInstrumentation = __webpack_require__(30); var camelizeStyleName = __webpack_require__(523); @@ -40759,7 +40759,7 @@ module.exports = CSSPropertyOperations; var EventPluginHub = __webpack_require__(93); var EventPropagators = __webpack_require__(94); -var ExecutionEnvironment = __webpack_require__(20); +var ExecutionEnvironment = __webpack_require__(21); var ReactDOMComponentTree = __webpack_require__(19); var ReactUpdates = __webpack_require__(36); var SyntheticEvent = __webpack_require__(41); @@ -41086,7 +41086,7 @@ module.exports = ChangeEventPlugin; var _prodInvariant = __webpack_require__(9); var DOMLazyTree = __webpack_require__(75); -var ExecutionEnvironment = __webpack_require__(20); +var ExecutionEnvironment = __webpack_require__(21); var createNodesFromMarkup = __webpack_require__(526); var emptyFunction = __webpack_require__(31); @@ -42742,7 +42742,7 @@ if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVT } if (true) { - var ExecutionEnvironment = __webpack_require__(20); + var ExecutionEnvironment = __webpack_require__(21); if (ExecutionEnvironment.canUseDOM && window.top === window.self) { // First check if devtools is not installed @@ -44536,7 +44536,7 @@ module.exports = ReactDOMOption; -var ExecutionEnvironment = __webpack_require__(20); +var ExecutionEnvironment = __webpack_require__(21); var getNodeForCharacterOffset = __webpack_require__(800); var getTextContentAccessor = __webpack_require__(347); @@ -45349,7 +45349,7 @@ module.exports = ReactDOMUnknownPropertyHook; var ReactInvalidSetStateWarningHook = __webpack_require__(769); var ReactHostOperationHistoryHook = __webpack_require__(767); var ReactComponentTreeHook = __webpack_require__(27); -var ExecutionEnvironment = __webpack_require__(20); +var ExecutionEnvironment = __webpack_require__(21); var performanceNow = __webpack_require__(535); var warning = __webpack_require__(7); @@ -45941,7 +45941,7 @@ module.exports = ReactEventEmitterMixin; var _assign = __webpack_require__(16); var EventListener = __webpack_require__(262); -var ExecutionEnvironment = __webpack_require__(20); +var ExecutionEnvironment = __webpack_require__(21); var PooledClass = __webpack_require__(62); var ReactDOMComponentTree = __webpack_require__(19); var ReactUpdates = __webpack_require__(36); @@ -47700,7 +47700,7 @@ module.exports = SVGDOMPropertyConfig; var EventPropagators = __webpack_require__(94); -var ExecutionEnvironment = __webpack_require__(20); +var ExecutionEnvironment = __webpack_require__(21); var ReactDOMComponentTree = __webpack_require__(19); var ReactInputSelection = __webpack_require__(339); var SyntheticEvent = __webpack_require__(41); @@ -49253,7 +49253,7 @@ module.exports = getNodeForCharacterOffset; -var ExecutionEnvironment = __webpack_require__(20); +var ExecutionEnvironment = __webpack_require__(21); /** * Generate a mapping of standard vendor prefixes using the defined style property and event name. @@ -53105,7 +53105,7 @@ TextArea.handledProps = ['as', 'autoHeight', 'onChange', 'value']; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_without__ = __webpack_require__(15); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_without___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_lodash_without__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_map__ = __webpack_require__(21); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_map__ = __webpack_require__(22); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_map___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash_map__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash_each__ = __webpack_require__(123); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash_each___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_lodash_each__); @@ -53254,7 +53254,7 @@ Breadcrumb.Section = __WEBPACK_IMPORTED_MODULE_9__BreadcrumbSection__["a" /* def /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_defineProperty__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_lodash_without__ = __webpack_require__(15); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_lodash_without___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_lodash_without__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_lodash_map__ = __webpack_require__(21); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_lodash_map__ = __webpack_require__(22); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_lodash_map___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_lodash_map__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_lodash_find__ = __webpack_require__(191); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_lodash_find___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_lodash_find__); @@ -53725,7 +53725,7 @@ Grid._meta = { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_lodash_isNil__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_lodash_isNil___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_lodash_isNil__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_lodash_map__ = __webpack_require__(21); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_lodash_map__ = __webpack_require__(22); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_lodash_map___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_lodash_map__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_lodash_get__ = __webpack_require__(72); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_lodash_get___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_lodash_get__); @@ -54187,7 +54187,7 @@ Message.handledProps = ['as', 'attached', 'children', 'className', 'color', 'com /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_without__ = __webpack_require__(15); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_without___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_lodash_without__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_map__ = __webpack_require__(21); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_map__ = __webpack_require__(22); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_map___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash_map__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash_isNil__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash_isNil___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_lodash_isNil__); @@ -54815,7 +54815,7 @@ Header.Subheader = __WEBPACK_IMPORTED_MODULE_8__HeaderSubheader__["a" /* default /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_lodash_includes__ = __webpack_require__(91); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_lodash_includes___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_lodash_includes__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_lodash_map__ = __webpack_require__(21); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_lodash_map__ = __webpack_require__(22); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_lodash_map___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_lodash_map__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_lodash_isNil__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_lodash_isNil___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_lodash_isNil__); @@ -55100,7 +55100,7 @@ Input.create = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_13__lib__["i" /* "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_map__ = __webpack_require__(21); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_map__ = __webpack_require__(22); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_map___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_lodash_map__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_isNil__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_isNil___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash_isNil__); @@ -58044,7 +58044,7 @@ Dimmer.create = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__lib__["i" /* /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_lodash_compact__ = __webpack_require__(311); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_lodash_compact___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_lodash_compact__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_lodash_map__ = __webpack_require__(21); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_lodash_map__ = __webpack_require__(22); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_lodash_map___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_lodash_map__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_lodash_isNil__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_lodash_isNil___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_lodash_isNil__); @@ -60815,7 +60815,7 @@ Rating.handledProps = ['as', 'className', 'clearable', 'defaultRating', 'disable /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_lodash_partialRight___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_lodash_partialRight__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_lodash_inRange__ = __webpack_require__(711); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_lodash_inRange___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_lodash_inRange__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_lodash_map__ = __webpack_require__(21); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_lodash_map__ = __webpack_require__(22); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_lodash_map___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_lodash_map__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_lodash_get__ = __webpack_require__(72); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_lodash_get___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_lodash_get__); @@ -61768,7 +61768,7 @@ Comment.Text = __WEBPACK_IMPORTED_MODULE_11__CommentText__["a" /* default */]; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_without__ = __webpack_require__(15); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_without___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash_without__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash_map__ = __webpack_require__(21); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash_map__ = __webpack_require__(22); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash_map___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_lodash_map__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_lodash_isNil__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_lodash_isNil___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_lodash_isNil__); @@ -62129,7 +62129,7 @@ var _i18next2 = _interopRequireDefault(_i18next); var _semanticUiReact = __webpack_require__(8); -var _Form = __webpack_require__(1086); +var _Form = __webpack_require__(1090); var _Form2 = _interopRequireDefault(_Form); @@ -62137,9 +62137,9 @@ var _DialogControl = __webpack_require__(460); var _DialogControl2 = _interopRequireDefault(_DialogControl); -var _actions = __webpack_require__(22); +var _actions = __webpack_require__(20); -var _reactRedux = __webpack_require__(25); +var _reactRedux = __webpack_require__(24); var _LoadingControl = __webpack_require__(461); @@ -62323,7 +62323,11 @@ exports.default = (0, _reactRedux.connect)()(Root); /* 1083 */, /* 1084 */, /* 1085 */, -/* 1086 */ +/* 1086 */, +/* 1087 */, +/* 1088 */, +/* 1089 */, +/* 1090 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -62379,10 +62383,6 @@ var loginForm = function loginForm(_ref) { exports.default = loginForm; /***/ }), -/* 1087 */, -/* 1088 */, -/* 1089 */, -/* 1090 */, /* 1091 */, /* 1092 */, /* 1093 */, @@ -62431,7 +62431,13 @@ exports.default = loginForm; /* 1136 */, /* 1137 */, /* 1138 */, -/* 1139 */ +/* 1139 */, +/* 1140 */, +/* 1141 */, +/* 1142 */, +/* 1143 */, +/* 1144 */, +/* 1145 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -62445,7 +62451,7 @@ var _reactDom = __webpack_require__(151); var _reactDom2 = _interopRequireDefault(_reactDom); -var _reactRedux = __webpack_require__(25); +var _reactRedux = __webpack_require__(24); var _redux = __webpack_require__(146); diff --git a/route/api/wristband.js b/route/api/wristband.js index f64ed6b..6d049a3 100644 --- a/route/api/wristband.js +++ b/route/api/wristband.js @@ -247,9 +247,15 @@ router let notify = arr.data.notify || 0; let sw = arr.data.switch || 0; - let query = "insert into ??.?? (`mac`, `name`, `identity`, `monitor`, `notify`, `switch`, `ctime`, `mtime`) values \ - ( ?, ?, ?, ?, ?, ?, unix_timestamp(), unix_timestamp() )"; - let param = [config.db.db9, 'wristband', arr.data.mac, name, identity, monitor, notify, sw]; + let u = ''; + let obj = so.get(req.headers['x-auth-token']); + if (obj != null && 'user' in obj && 'account' in obj.user) { + u = obj.user.account; + } + + let query = "insert into ??.?? (`mac`, `name`, `identity`, `monitor`, `notify`, `switch`, `cuser`, `muser`, `ctime`, `mtime`) values \ + ( ?, ?, ?, ?, ?, ?, ?, ?, unix_timestamp(), unix_timestamp() )"; + let param = [config.db.db9, 'wristband', arr.data.mac, name, identity, monitor, notify, sw, u, u]; res.db.query(query, param, (err, row) => { if (err) return rt.err(res, err, n, 'ERR8001'); @@ -274,16 +280,23 @@ router let notify = arr.data.notify || 0; let sw = arr.data.switch || 0; + let u = ''; + let obj = so.get(req.headers['x-auth-token']); + if (obj != null && 'user' in obj && 'account' in obj.user) { + u = obj.user.account; + } + let query = "update ??.?? set \ `name` = ?, \ `identity` = ?, \ `monitor` = ?, \ `notify` = ?, \ `switch` = ?, \ + `muser` = ?, \ `mtime` = unix_timestamp() \ where \ `uid` = ?"; - let param = [config.db.db9, 'wristband', name, identity, monitor, notify, sw, arr.data.id]; + let param = [config.db.db9, 'wristband', name, identity, monitor, notify, sw, u, arr.data.id]; res.db.query(query, param, (err, row) => { if (err) return rt.err(res, err, n, 'ERR8002'); @@ -322,6 +335,71 @@ router res.db.query(query, param, (err, row) => { if (err || row.length == 0) return rt.err(res, err, n, 'ERR8000'); if (row[0].c > 0) return n('ERR0063'); + + let u = ''; + let obj = so.get(req.headers['x-auth-token']); + if (obj != null && 'user' in obj && 'account' in obj.user) { + u = obj.user.account; + } + + let query = "insert into ??.?? (`name`, `serialnumber`, `cuser`, `ctime`, `muser`, `mtime`) values (?, ?, ?, unix_timestamp(), ?, unix_timestamp())"; + let param = [config.db.db9, 'location', arr.data.name, arr.data.sn, u, u]; + res.db.query(query, param, (err, row) => { + if (err) return rt.err(res, err, n, 'ERR8001'); + res.api_res = { + record: [] + } + n(); + }); + }) + }) + .post('/editlocation', (req, res, n) => { + if (!config.permission.wristband) return n('ERR9000'); + if (!tool.checkPermission(req)) return n('ERR9000'); + let arr = req.body; + if (!arr.data) return n('ERR0000'); + if (!arr.data.id) return n('ERR0028'); + if (!arr.data.name) return n('ERR0026'); + + let u = ''; + let obj = so.get(req.headers['x-auth-token']); + if (obj != null && 'user' in obj && 'account' in obj.user) { + u = obj.user.account; + } + + let query = "update ??.?? set \ + `name` = ?, \ + `muser` = ?, \ + `mtime` = unix_timestamp() \ + where \ + `uid` = ? "; + let param = [config.db.db9, 'location', arr.data.name, u, arr.data.id]; + res.db.query(query, param, (err, row) => { + if (err) return rt.err(res, err, n, 'ERR8002'); + + res.api_res = { + record: [] + }; + n(); + }) + }) + .post('/dellocation', (req, res, n) => { + if (!config.permission.wristband) return n('ERR9000'); + if (!tool.checkPermission(req)) return n('ERR9000'); + let arr = req.body; + if (!arr.data) return n('ERR0000'); + if (!arr.data.id) return n('ERR0028'); + + res.db.query(`use ${config.db.db9}`); + + let query = "delete from ??.?? where `uid` = ?"; + let param = [config.db.db9, 'location', arr.data.id]; + res.db.query(query, param, (err, row) => { + if (err) return rt.err(res, err, n, 'ERR8003'); + res.api_res = { + record: [] + } + n(); }) }) .all('*', rt.send); diff --git a/src/components/AdminPage/Wristband/LocStatus/index.js b/src/components/AdminPage/Wristband/LocStatus/index.js index 4339747..e204b82 100644 --- a/src/components/AdminPage/Wristband/LocStatus/index.js +++ b/src/components/AdminPage/Wristband/LocStatus/index.js @@ -37,7 +37,7 @@ class LocStatus extends React.Component{ checkRefresh = () => { if(this.state.autoRefresh) { - this.tick = setInterval(this.runTick, 2000); + this.tick = setInterval(this.runTick, 5000); }else{ clearInterval(this.tick); } diff --git a/src/components/AdminPage/Wristband/Location/index.js b/src/components/AdminPage/Wristband/Location/index.js index 702fd53..4713214 100644 --- a/src/components/AdminPage/Wristband/Location/index.js +++ b/src/components/AdminPage/Wristband/Location/index.js @@ -1,6 +1,8 @@ import React from 'react'; -import {Container, Segment, Button} from 'semantic-ui-react'; +import {Container, Segment, Button, Table} from 'semantic-ui-react'; import {getRequest} from '../../../../actions'; +import ListItem from './ListItem'; +import LocationModal from './LocationModal'; const stateDefault = ()=>({ list: [], @@ -35,13 +37,87 @@ class Location extends React.Component { }) } + openModal = (type, data = {}) =>{ + this.setState({ + modal: { + open: true, + type, + data + } + }) + } + closeModal = () => { + this.setState({ + modal:{ + ...stateDefault().modal + } + }) + } + submitModal = (type, data) => { + let {showDialog} = this.props; + if(type == 1 && !data.id) return showDialog('資料取得失敗'); + if(type == 0 && !data.sn) return showDialog('請填寫裝置序號'); + + let url = type == 1 ? '/api/wristband/editlocation' : '/api/wristband/addlocation'; + fetch(url, getRequest(data)) + .then(response => response.json()) + .then(json => { + if(json.status != 1) return showDialog(json.message); + this.setState({ + modal: { + ...stateDefault().modal + } + }, ()=>{ + this.getList(); + }) + }) + } + + delLocation = (id) => { + if(!id) return ; + let {showDialog} = this.props; + fetch('/api/wristband/dellocation', getRequest({id})) + .then(response => response.json()) + .then(json => { + if(json.status != 1) return showDialog(json.message); + this.getList(); + }) + } + render() { - + let {i18n} = this.props; return ( -