vineanova-redux-artifacts 1.119.181 → 1.119.183
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -1
- package/dist/actions/commonActions.js +191 -0
- package/dist/hooks/index.js +33 -0
- package/dist/hooks/useFetchworkRecordsConsumable.js +39 -0
- package/dist/hooks/useFetchworkRecordsConsumableOptions.js +39 -0
- package/dist/hooks/useFetchworkRecordsConsumablePrice.js +39 -0
- package/dist/reducers/index.js +3 -0
- package/dist/sagas/vineaNovaApi.sagas.js +720 -495
- package/dist/selectors/index.js +33 -0
- package/dist/selectors/workRecordsConsumableOptionsSelector.js +57 -0
- package/dist/selectors/workRecordsConsumablePriceSelector.js +57 -0
- package/dist/selectors/workRecordsConsumableSelector.js +57 -0
- package/dist/services/apiServices.js +481 -299
- package/package.json +1 -1
- package/src/actions/commonActions.js +41 -0
- package/src/hooks/index.js +3 -0
- package/src/hooks/useFetchworkRecordsConsumable.js +38 -0
- package/src/hooks/useFetchworkRecordsConsumableOptions.js +38 -0
- package/src/hooks/useFetchworkRecordsConsumablePrice.js +38 -0
- package/src/reducers/index.js +3 -0
- package/src/sagas/vineaNovaApi.sagas.js +158 -0
- package/src/selectors/index.js +3 -0
- package/src/selectors/workRecordsConsumableOptionsSelector.js +62 -0
- package/src/selectors/workRecordsConsumablePriceSelector.js +62 -0
- package/src/selectors/workRecordsConsumableSelector.js +62 -0
- package/src/services/apiServices.js +115 -0
package/CHANGELOG.md
CHANGED
|
@@ -10428,6 +10428,197 @@ var ducksActions = (0, _reduxActions.createActions)({
|
|
|
10428
10428
|
}]
|
|
10429
10429
|
}
|
|
10430
10430
|
},
|
|
10431
|
+
workRecordsConsumable: {
|
|
10432
|
+
get: {
|
|
10433
|
+
REQUEST: [function (payload) {
|
|
10434
|
+
return payload;
|
|
10435
|
+
}, function () {
|
|
10436
|
+
return {
|
|
10437
|
+
reducerName: 'workRecordsConsumable'
|
|
10438
|
+
};
|
|
10439
|
+
}],
|
|
10440
|
+
RECEIVE: [function (payload) {
|
|
10441
|
+
return payload;
|
|
10442
|
+
}, function () {
|
|
10443
|
+
return {
|
|
10444
|
+
reducerName: 'workRecordsConsumable'
|
|
10445
|
+
};
|
|
10446
|
+
}],
|
|
10447
|
+
ERROR: [function (payload) {
|
|
10448
|
+
return payload;
|
|
10449
|
+
}, function () {
|
|
10450
|
+
return {
|
|
10451
|
+
reducerName: 'workRecordsConsumable'
|
|
10452
|
+
};
|
|
10453
|
+
}],
|
|
10454
|
+
CLEARDATA: [function (payload) {
|
|
10455
|
+
return payload;
|
|
10456
|
+
}, function () {
|
|
10457
|
+
return {
|
|
10458
|
+
reducerName: 'workRecordsConsumable'
|
|
10459
|
+
};
|
|
10460
|
+
}],
|
|
10461
|
+
UPDATEPARTIALENTITY: [function (payload) {
|
|
10462
|
+
return payload;
|
|
10463
|
+
}, function () {
|
|
10464
|
+
return {
|
|
10465
|
+
reducerName: 'workRecordsConsumable'
|
|
10466
|
+
};
|
|
10467
|
+
}]
|
|
10468
|
+
},
|
|
10469
|
+
put: {
|
|
10470
|
+
REQUEST: [function (payload) {
|
|
10471
|
+
return payload;
|
|
10472
|
+
}, function () {
|
|
10473
|
+
return {
|
|
10474
|
+
reducerName: 'workRecordsConsumable'
|
|
10475
|
+
};
|
|
10476
|
+
}],
|
|
10477
|
+
RECEIVE: [function (payload) {
|
|
10478
|
+
return payload;
|
|
10479
|
+
}, function () {
|
|
10480
|
+
return {
|
|
10481
|
+
reducerName: 'workRecordsConsumable'
|
|
10482
|
+
};
|
|
10483
|
+
}],
|
|
10484
|
+
ERROR: [function (payload) {
|
|
10485
|
+
return payload;
|
|
10486
|
+
}, function () {
|
|
10487
|
+
return {
|
|
10488
|
+
reducerName: 'workRecordsConsumable'
|
|
10489
|
+
};
|
|
10490
|
+
}],
|
|
10491
|
+
CLEARDATA: [function (payload) {
|
|
10492
|
+
return payload;
|
|
10493
|
+
}, function () {
|
|
10494
|
+
return {
|
|
10495
|
+
reducerName: 'workRecordsConsumable'
|
|
10496
|
+
};
|
|
10497
|
+
}],
|
|
10498
|
+
UPDATEPARTIALENTITY: [function (payload) {
|
|
10499
|
+
return payload;
|
|
10500
|
+
}, function () {
|
|
10501
|
+
return {
|
|
10502
|
+
reducerName: 'workRecordsConsumable'
|
|
10503
|
+
};
|
|
10504
|
+
}]
|
|
10505
|
+
},
|
|
10506
|
+
post: {
|
|
10507
|
+
REQUEST: [function (payload) {
|
|
10508
|
+
return payload;
|
|
10509
|
+
}, function () {
|
|
10510
|
+
return {
|
|
10511
|
+
reducerName: 'workRecordsConsumable'
|
|
10512
|
+
};
|
|
10513
|
+
}],
|
|
10514
|
+
RECEIVE: [function (payload) {
|
|
10515
|
+
return payload;
|
|
10516
|
+
}, function () {
|
|
10517
|
+
return {
|
|
10518
|
+
reducerName: 'workRecordsConsumable'
|
|
10519
|
+
};
|
|
10520
|
+
}],
|
|
10521
|
+
ERROR: [function (payload) {
|
|
10522
|
+
return payload;
|
|
10523
|
+
}, function () {
|
|
10524
|
+
return {
|
|
10525
|
+
reducerName: 'workRecordsConsumable'
|
|
10526
|
+
};
|
|
10527
|
+
}],
|
|
10528
|
+
CLEARDATA: [function (payload) {
|
|
10529
|
+
return payload;
|
|
10530
|
+
}, function () {
|
|
10531
|
+
return {
|
|
10532
|
+
reducerName: 'workRecordsConsumable'
|
|
10533
|
+
};
|
|
10534
|
+
}],
|
|
10535
|
+
UPDATEPARTIALENTITY: [function (payload) {
|
|
10536
|
+
return payload;
|
|
10537
|
+
}, function () {
|
|
10538
|
+
return {
|
|
10539
|
+
reducerName: 'workRecordsConsumable'
|
|
10540
|
+
};
|
|
10541
|
+
}]
|
|
10542
|
+
}
|
|
10543
|
+
},
|
|
10544
|
+
workRecordsConsumableOptions: {
|
|
10545
|
+
get: {
|
|
10546
|
+
REQUEST: [function (payload) {
|
|
10547
|
+
return payload;
|
|
10548
|
+
}, function () {
|
|
10549
|
+
return {
|
|
10550
|
+
reducerName: 'workRecordsConsumableOptions'
|
|
10551
|
+
};
|
|
10552
|
+
}],
|
|
10553
|
+
RECEIVE: [function (payload) {
|
|
10554
|
+
return payload;
|
|
10555
|
+
}, function () {
|
|
10556
|
+
return {
|
|
10557
|
+
reducerName: 'workRecordsConsumableOptions'
|
|
10558
|
+
};
|
|
10559
|
+
}],
|
|
10560
|
+
ERROR: [function (payload) {
|
|
10561
|
+
return payload;
|
|
10562
|
+
}, function () {
|
|
10563
|
+
return {
|
|
10564
|
+
reducerName: 'workRecordsConsumableOptions'
|
|
10565
|
+
};
|
|
10566
|
+
}],
|
|
10567
|
+
CLEARDATA: [function (payload) {
|
|
10568
|
+
return payload;
|
|
10569
|
+
}, function () {
|
|
10570
|
+
return {
|
|
10571
|
+
reducerName: 'workRecordsConsumableOptions'
|
|
10572
|
+
};
|
|
10573
|
+
}],
|
|
10574
|
+
UPDATEPARTIALENTITY: [function (payload) {
|
|
10575
|
+
return payload;
|
|
10576
|
+
}, function () {
|
|
10577
|
+
return {
|
|
10578
|
+
reducerName: 'workRecordsConsumableOptions'
|
|
10579
|
+
};
|
|
10580
|
+
}]
|
|
10581
|
+
}
|
|
10582
|
+
},
|
|
10583
|
+
workRecordsConsumablePrice: {
|
|
10584
|
+
get: {
|
|
10585
|
+
REQUEST: [function (payload) {
|
|
10586
|
+
return payload;
|
|
10587
|
+
}, function () {
|
|
10588
|
+
return {
|
|
10589
|
+
reducerName: 'workRecordsConsumablePrice'
|
|
10590
|
+
};
|
|
10591
|
+
}],
|
|
10592
|
+
RECEIVE: [function (payload) {
|
|
10593
|
+
return payload;
|
|
10594
|
+
}, function () {
|
|
10595
|
+
return {
|
|
10596
|
+
reducerName: 'workRecordsConsumablePrice'
|
|
10597
|
+
};
|
|
10598
|
+
}],
|
|
10599
|
+
ERROR: [function (payload) {
|
|
10600
|
+
return payload;
|
|
10601
|
+
}, function () {
|
|
10602
|
+
return {
|
|
10603
|
+
reducerName: 'workRecordsConsumablePrice'
|
|
10604
|
+
};
|
|
10605
|
+
}],
|
|
10606
|
+
CLEARDATA: [function (payload) {
|
|
10607
|
+
return payload;
|
|
10608
|
+
}, function () {
|
|
10609
|
+
return {
|
|
10610
|
+
reducerName: 'workRecordsConsumablePrice'
|
|
10611
|
+
};
|
|
10612
|
+
}],
|
|
10613
|
+
UPDATEPARTIALENTITY: [function (payload) {
|
|
10614
|
+
return payload;
|
|
10615
|
+
}, function () {
|
|
10616
|
+
return {
|
|
10617
|
+
reducerName: 'workRecordsConsumablePrice'
|
|
10618
|
+
};
|
|
10619
|
+
}]
|
|
10620
|
+
}
|
|
10621
|
+
},
|
|
10431
10622
|
workRecordsGeneric: {
|
|
10432
10623
|
get: {
|
|
10433
10624
|
REQUEST: [function (payload) {
|
package/dist/hooks/index.js
CHANGED
|
@@ -1554,6 +1554,39 @@ Object.keys(_useFetchworkerWorkRecords).forEach(function (key) {
|
|
|
1554
1554
|
}
|
|
1555
1555
|
});
|
|
1556
1556
|
});
|
|
1557
|
+
var _useFetchworkRecordsConsumable = require("./useFetchworkRecordsConsumable");
|
|
1558
|
+
Object.keys(_useFetchworkRecordsConsumable).forEach(function (key) {
|
|
1559
|
+
if (key === "default" || key === "__esModule") return;
|
|
1560
|
+
if (key in exports && exports[key] === _useFetchworkRecordsConsumable[key]) return;
|
|
1561
|
+
Object.defineProperty(exports, key, {
|
|
1562
|
+
enumerable: true,
|
|
1563
|
+
get: function get() {
|
|
1564
|
+
return _useFetchworkRecordsConsumable[key];
|
|
1565
|
+
}
|
|
1566
|
+
});
|
|
1567
|
+
});
|
|
1568
|
+
var _useFetchworkRecordsConsumableOptions = require("./useFetchworkRecordsConsumableOptions");
|
|
1569
|
+
Object.keys(_useFetchworkRecordsConsumableOptions).forEach(function (key) {
|
|
1570
|
+
if (key === "default" || key === "__esModule") return;
|
|
1571
|
+
if (key in exports && exports[key] === _useFetchworkRecordsConsumableOptions[key]) return;
|
|
1572
|
+
Object.defineProperty(exports, key, {
|
|
1573
|
+
enumerable: true,
|
|
1574
|
+
get: function get() {
|
|
1575
|
+
return _useFetchworkRecordsConsumableOptions[key];
|
|
1576
|
+
}
|
|
1577
|
+
});
|
|
1578
|
+
});
|
|
1579
|
+
var _useFetchworkRecordsConsumablePrice = require("./useFetchworkRecordsConsumablePrice");
|
|
1580
|
+
Object.keys(_useFetchworkRecordsConsumablePrice).forEach(function (key) {
|
|
1581
|
+
if (key === "default" || key === "__esModule") return;
|
|
1582
|
+
if (key in exports && exports[key] === _useFetchworkRecordsConsumablePrice[key]) return;
|
|
1583
|
+
Object.defineProperty(exports, key, {
|
|
1584
|
+
enumerable: true,
|
|
1585
|
+
get: function get() {
|
|
1586
|
+
return _useFetchworkRecordsConsumablePrice[key];
|
|
1587
|
+
}
|
|
1588
|
+
});
|
|
1589
|
+
});
|
|
1557
1590
|
var _useFetchworkRecordsGeneric = require("./useFetchworkRecordsGeneric");
|
|
1558
1591
|
Object.keys(_useFetchworkRecordsGeneric).forEach(function (key) {
|
|
1559
1592
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useFetchWorkRecordsConsumable = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactRedux = require("react-redux");
|
|
9
|
+
var _actions = require("../actions");
|
|
10
|
+
var VineaNovaSelectors = _interopRequireWildcard(require("../selectors"));
|
|
11
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
12
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
13
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
14
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
15
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
16
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
17
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
18
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
19
|
+
var useFetchWorkRecordsConsumable = exports.useFetchWorkRecordsConsumable = function useFetchWorkRecordsConsumable(props) {
|
|
20
|
+
// selectors
|
|
21
|
+
var data = (0, _reactRedux.useSelector)(VineaNovaSelectors.getWorkRecordsConsumableEntityData);
|
|
22
|
+
var dispatchAPI = (0, _reactRedux.useDispatch)();
|
|
23
|
+
var _props$queryParams = props.queryParams,
|
|
24
|
+
queryParams = _props$queryParams === void 0 ? {} : _props$queryParams;
|
|
25
|
+
(0, _react.useEffect)(function () {
|
|
26
|
+
dispatchAPI(_actions.VineaNovaActions.api.v1.workRecordsConsumable.get.request({
|
|
27
|
+
queryParams: _objectSpread({}, queryParams)
|
|
28
|
+
}));
|
|
29
|
+
}, []);
|
|
30
|
+
var useQuery = function useQuery(queryParams) {
|
|
31
|
+
dispatchAPI(_actions.VineaNovaActions.api.v1.workRecordsConsumable.get.request({
|
|
32
|
+
queryParams: _objectSpread({}, queryParams)
|
|
33
|
+
}));
|
|
34
|
+
};
|
|
35
|
+
return {
|
|
36
|
+
data: data,
|
|
37
|
+
useQuery: useQuery
|
|
38
|
+
};
|
|
39
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useFetchWorkRecordsConsumableOptions = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactRedux = require("react-redux");
|
|
9
|
+
var _actions = require("../actions");
|
|
10
|
+
var VineaNovaSelectors = _interopRequireWildcard(require("../selectors"));
|
|
11
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
12
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
13
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
14
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
15
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
16
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
17
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
18
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
19
|
+
var useFetchWorkRecordsConsumableOptions = exports.useFetchWorkRecordsConsumableOptions = function useFetchWorkRecordsConsumableOptions(props) {
|
|
20
|
+
// selectors
|
|
21
|
+
var data = (0, _reactRedux.useSelector)(VineaNovaSelectors.getWorkRecordsConsumableOptionsEntityData);
|
|
22
|
+
var dispatchAPI = (0, _reactRedux.useDispatch)();
|
|
23
|
+
var _props$queryParams = props.queryParams,
|
|
24
|
+
queryParams = _props$queryParams === void 0 ? {} : _props$queryParams;
|
|
25
|
+
(0, _react.useEffect)(function () {
|
|
26
|
+
dispatchAPI(_actions.VineaNovaActions.api.v1.workRecordsConsumableOptions.get.request({
|
|
27
|
+
queryParams: _objectSpread({}, queryParams)
|
|
28
|
+
}));
|
|
29
|
+
}, []);
|
|
30
|
+
var useQuery = function useQuery(queryParams) {
|
|
31
|
+
dispatchAPI(_actions.VineaNovaActions.api.v1.workRecordsConsumableOptions.get.request({
|
|
32
|
+
queryParams: _objectSpread({}, queryParams)
|
|
33
|
+
}));
|
|
34
|
+
};
|
|
35
|
+
return {
|
|
36
|
+
data: data,
|
|
37
|
+
useQuery: useQuery
|
|
38
|
+
};
|
|
39
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useFetchWorkRecordsConsumablePrice = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactRedux = require("react-redux");
|
|
9
|
+
var _actions = require("../actions");
|
|
10
|
+
var VineaNovaSelectors = _interopRequireWildcard(require("../selectors"));
|
|
11
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
12
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
13
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
14
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
15
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
16
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
17
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
18
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
19
|
+
var useFetchWorkRecordsConsumablePrice = exports.useFetchWorkRecordsConsumablePrice = function useFetchWorkRecordsConsumablePrice(props) {
|
|
20
|
+
// selectors
|
|
21
|
+
var data = (0, _reactRedux.useSelector)(VineaNovaSelectors.getWorkRecordsConsumablePriceEntityData);
|
|
22
|
+
var dispatchAPI = (0, _reactRedux.useDispatch)();
|
|
23
|
+
var _props$queryParams = props.queryParams,
|
|
24
|
+
queryParams = _props$queryParams === void 0 ? {} : _props$queryParams;
|
|
25
|
+
(0, _react.useEffect)(function () {
|
|
26
|
+
dispatchAPI(_actions.VineaNovaActions.api.v1.workRecordsConsumablePrice.get.request({
|
|
27
|
+
queryParams: _objectSpread({}, queryParams)
|
|
28
|
+
}));
|
|
29
|
+
}, []);
|
|
30
|
+
var useQuery = function useQuery(queryParams) {
|
|
31
|
+
dispatchAPI(_actions.VineaNovaActions.api.v1.workRecordsConsumablePrice.get.request({
|
|
32
|
+
queryParams: _objectSpread({}, queryParams)
|
|
33
|
+
}));
|
|
34
|
+
};
|
|
35
|
+
return {
|
|
36
|
+
data: data,
|
|
37
|
+
useQuery: useQuery
|
|
38
|
+
};
|
|
39
|
+
};
|
package/dist/reducers/index.js
CHANGED
|
@@ -150,6 +150,9 @@ var rootReducer = {
|
|
|
150
150
|
workers: (0, _createNamedReducer["default"])('workers'),
|
|
151
151
|
workerPayPeriods: (0, _createNamedReducer["default"])('workerPayPeriods'),
|
|
152
152
|
workerWorkRecords: (0, _createNamedReducer["default"])('workerWorkRecords'),
|
|
153
|
+
workRecordsConsumable: (0, _createNamedReducer["default"])('workRecordsConsumable'),
|
|
154
|
+
workRecordsConsumableOptions: (0, _createNamedReducer["default"])('workRecordsConsumableOptions'),
|
|
155
|
+
workRecordsConsumablePrice: (0, _createNamedReducer["default"])('workRecordsConsumablePrice'),
|
|
153
156
|
workRecordsGeneric: (0, _createNamedReducer["default"])('workRecordsGeneric'),
|
|
154
157
|
workRecordsHourly: (0, _createNamedReducer["default"])('workRecordsHourly'),
|
|
155
158
|
lookupClassification: (0, _createNamedReducer["default"])('lookupClassification'),
|