vineanova-redux-artifacts 1.119.371 → 1.119.372
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 +39 -0
- package/dist/hooks/index.js +11 -0
- package/dist/hooks/useFetchlookupAbsenceType.js +49 -0
- package/dist/lookups/index.js +1 -1
- package/dist/reducers/index.js +2 -1
- package/dist/sagas/vineaNovaApi.sagas.js +192 -145
- package/dist/selectors/index.js +11 -0
- package/dist/selectors/lookupAbsenceTypeSelector.js +57 -0
- package/dist/selectors/lookupStatusSelector.js +9 -4
- package/dist/services/apiServices.js +41 -4
- package/package.json +1 -1
- package/src/actions/commonActions.js +9 -0
- package/src/hooks/index.js +1 -0
- package/src/hooks/useFetchlookupAbsenceType.js +53 -0
- package/src/lookups/index.js +2 -1
- package/src/reducers/index.js +1 -0
- package/src/sagas/vineaNovaApi.sagas.js +35 -0
- package/src/selectors/index.js +1 -0
- package/src/selectors/lookupAbsenceTypeSelector.js +62 -0
- package/src/selectors/lookupStatusSelector.js +9 -0
- package/src/services/apiServices.js +24 -0
package/CHANGELOG.md
CHANGED
|
@@ -17445,6 +17445,45 @@ var ducksActions = (0, _reduxActions.createActions)({
|
|
|
17445
17445
|
}]
|
|
17446
17446
|
}
|
|
17447
17447
|
},
|
|
17448
|
+
lookupAbsenceType: {
|
|
17449
|
+
get: {
|
|
17450
|
+
REQUEST: [function (payload) {
|
|
17451
|
+
return payload;
|
|
17452
|
+
}, function () {
|
|
17453
|
+
return {
|
|
17454
|
+
reducerName: 'lookupAbsenceType'
|
|
17455
|
+
};
|
|
17456
|
+
}],
|
|
17457
|
+
RECEIVE: [function (payload) {
|
|
17458
|
+
return payload;
|
|
17459
|
+
}, function () {
|
|
17460
|
+
return {
|
|
17461
|
+
reducerName: 'lookupAbsenceType'
|
|
17462
|
+
};
|
|
17463
|
+
}],
|
|
17464
|
+
ERROR: [function (payload) {
|
|
17465
|
+
return payload;
|
|
17466
|
+
}, function () {
|
|
17467
|
+
return {
|
|
17468
|
+
reducerName: 'lookupAbsenceType'
|
|
17469
|
+
};
|
|
17470
|
+
}],
|
|
17471
|
+
CLEARDATA: [function (payload) {
|
|
17472
|
+
return payload;
|
|
17473
|
+
}, function () {
|
|
17474
|
+
return {
|
|
17475
|
+
reducerName: 'lookupAbsenceType'
|
|
17476
|
+
};
|
|
17477
|
+
}],
|
|
17478
|
+
UPDATEPARTIALENTITY: [function (payload) {
|
|
17479
|
+
return payload;
|
|
17480
|
+
}, function () {
|
|
17481
|
+
return {
|
|
17482
|
+
reducerName: 'lookupAbsenceType'
|
|
17483
|
+
};
|
|
17484
|
+
}]
|
|
17485
|
+
}
|
|
17486
|
+
},
|
|
17448
17487
|
fetchAllLookups: {
|
|
17449
17488
|
REQUEST: [function (payload) {
|
|
17450
17489
|
return payload;
|
package/dist/hooks/index.js
CHANGED
|
@@ -3314,6 +3314,17 @@ Object.keys(_useFetchlookupTableLookups).forEach(function (key) {
|
|
|
3314
3314
|
}
|
|
3315
3315
|
});
|
|
3316
3316
|
});
|
|
3317
|
+
var _useFetchlookupAbsenceType = require("./useFetchlookupAbsenceType");
|
|
3318
|
+
Object.keys(_useFetchlookupAbsenceType).forEach(function (key) {
|
|
3319
|
+
if (key === "default" || key === "__esModule") return;
|
|
3320
|
+
if (key in exports && exports[key] === _useFetchlookupAbsenceType[key]) return;
|
|
3321
|
+
Object.defineProperty(exports, key, {
|
|
3322
|
+
enumerable: true,
|
|
3323
|
+
get: function get() {
|
|
3324
|
+
return _useFetchlookupAbsenceType[key];
|
|
3325
|
+
}
|
|
3326
|
+
});
|
|
3327
|
+
});
|
|
3317
3328
|
var _useFetchAllLookups = require("./useFetchAllLookups");
|
|
3318
3329
|
Object.keys(_useFetchAllLookups).forEach(function (key) {
|
|
3319
3330
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useFetchlookupAbsenceType = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactRedux = require("react-redux");
|
|
9
|
+
var _isEmpty = _interopRequireDefault(require("lodash/isEmpty"));
|
|
10
|
+
var _actions = require("../actions");
|
|
11
|
+
var VineaNovaSelectors = _interopRequireWildcard(require("../selectors"));
|
|
12
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
14
|
+
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); }
|
|
15
|
+
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; }
|
|
16
|
+
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; }
|
|
17
|
+
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; }
|
|
18
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
19
|
+
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); }
|
|
20
|
+
var useFetchlookupAbsenceType = exports.useFetchlookupAbsenceType = function useFetchlookupAbsenceType(props) {
|
|
21
|
+
// selectors
|
|
22
|
+
var data = (0, _reactRedux.useSelector)(VineaNovaSelectors.getlookupAbsenceTypeEntityData);
|
|
23
|
+
var entity = (0, _reactRedux.useSelector)(VineaNovaSelectors.getlookupAbsenceTypeEntityMeta);
|
|
24
|
+
var dispatchAPI = (0, _reactRedux.useDispatch)();
|
|
25
|
+
var _props$queryParams = props.queryParams,
|
|
26
|
+
queryParams = _props$queryParams === void 0 ? {} : _props$queryParams;
|
|
27
|
+
|
|
28
|
+
// Determine if we need to fetch: not loaded, has error, or empty data
|
|
29
|
+
var shouldFetch = !(entity !== null && entity !== void 0 && entity.isLoaded) || (entity === null || entity === void 0 ? void 0 : entity.hasError) || (0, _isEmpty["default"])(entity.data);
|
|
30
|
+
(0, _react.useEffect)(function () {
|
|
31
|
+
if (shouldFetch) {
|
|
32
|
+
dispatchAPI(_actions.VineaNovaActions.api.v1.lookupAbsenceType.get.request({
|
|
33
|
+
queryParams: _objectSpread({}, queryParams)
|
|
34
|
+
}));
|
|
35
|
+
}
|
|
36
|
+
}, [shouldFetch, JSON.stringify(queryParams)]);
|
|
37
|
+
var useQuery = function useQuery(queryParams) {
|
|
38
|
+
dispatchAPI(_actions.VineaNovaActions.api.v1.lookupAbsenceType.get.request({
|
|
39
|
+
queryParams: _objectSpread({}, queryParams)
|
|
40
|
+
}));
|
|
41
|
+
};
|
|
42
|
+
return {
|
|
43
|
+
data: data,
|
|
44
|
+
useQuery: useQuery,
|
|
45
|
+
isLoading: entity === null || entity === void 0 ? void 0 : entity.isLoading,
|
|
46
|
+
hasError: entity === null || entity === void 0 ? void 0 : entity.hasError,
|
|
47
|
+
error: entity === null || entity === void 0 ? void 0 : entity.error
|
|
48
|
+
};
|
|
49
|
+
};
|
package/dist/lookups/index.js
CHANGED
|
@@ -4,4 +4,4 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.lookupNames = void 0;
|
|
7
|
-
var lookupNames = exports.lookupNames = ["Classification", "ClassificationGroup", "ClassificationGroupIdentityType", "ReferenceType", "IdentityType", "RoleType", "RoleTypeIdentityType", "BusinessUnit", "ReferenceTypeIdentityType", "RelationshipType", "ContactMethod", "Gender", "Nationality", "Ethnicity", "Language", "Country", "Salutation", "GrowingRegion", "GrowingSubRegion", "Town", "Variety", "BlockVintageStatus", "Trellis", "RootStock", "VarietyClone", "Vintage", "RowSpecialAttribute", "NoteStatus", "Measure", "MeasureGroup", "MeasureInstance", "Keyword", "SampleRequestStatus", "PayrollSystem", "DataProvider", "DataProviderType", "PhenologyMeasure", "PhenologyMeasureOption", "PhenologyMeasureSet", "PhenologyMeasureType", "CropSettingInstance", "CropSettingOption", "InactiveReason", "DocumentType", "DocumentStatus", "VehicleType", "VehicleMake", "ConsumableType", "SensorStatus", "SensorType", "SensorTypeMeasureUnit", "Activity", "DisplayAttribute", "Duration", "WorkUnit", "ResourceType", "ResourceTypeUnit", "CostingUnit", "ActivityGroup", "PlanType", "PlanStatus", "SupplyContractType", "JobEventAction", "JobInvoiceMethod", "JobQuantityType", "JobStatus", "JobType", "JobTypeWorkRecordType", "WorkRecordLevel", "PayrollRecordType", "JobWorkUnit", "WorkRecordUnitType", "IdentityActivity", "SiteType", "ImportType", "EventLogStatus", "CostAllocationFactor", "ReportType", "WineryDataType", "WineryDataAllocationRule", "WorkRecordType", "PayLoading", "SplitType", "PayrollStatus", "BatchStatus", "TeamType", "NotificationMethod", "AbsenceOutcome", "MedicalCertificateStatus", "SickLeaveEligibility", "AbsenceReason", "AccountSystemSettings", "ReportCategory", "DashboardPage", "PlantStatus", "TableLookups"];
|
|
7
|
+
var lookupNames = exports.lookupNames = ["Classification", "ClassificationGroup", "ClassificationGroupIdentityType", "ReferenceType", "IdentityType", "RoleType", "RoleTypeIdentityType", "BusinessUnit", "ReferenceTypeIdentityType", "RelationshipType", "ContactMethod", "Gender", "Nationality", "Ethnicity", "Language", "Country", "Salutation", "GrowingRegion", "GrowingSubRegion", "Town", "Variety", "BlockVintageStatus", "Trellis", "RootStock", "VarietyClone", "Vintage", "RowSpecialAttribute", "NoteStatus", "Measure", "MeasureGroup", "MeasureInstance", "Keyword", "SampleRequestStatus", "PayrollSystem", "DataProvider", "DataProviderType", "PhenologyMeasure", "PhenologyMeasureOption", "PhenologyMeasureSet", "PhenologyMeasureType", "CropSettingInstance", "CropSettingOption", "InactiveReason", "DocumentType", "DocumentStatus", "VehicleType", "VehicleMake", "ConsumableType", "SensorStatus", "SensorType", "SensorTypeMeasureUnit", "Activity", "DisplayAttribute", "Duration", "WorkUnit", "ResourceType", "ResourceTypeUnit", "CostingUnit", "ActivityGroup", "PlanType", "PlanStatus", "SupplyContractType", "JobEventAction", "JobInvoiceMethod", "JobQuantityType", "JobStatus", "JobType", "JobTypeWorkRecordType", "WorkRecordLevel", "PayrollRecordType", "JobWorkUnit", "WorkRecordUnitType", "IdentityActivity", "SiteType", "ImportType", "EventLogStatus", "CostAllocationFactor", "ReportType", "WineryDataType", "WineryDataAllocationRule", "WorkRecordType", "PayLoading", "SplitType", "PayrollStatus", "BatchStatus", "TeamType", "NotificationMethod", "AbsenceOutcome", "MedicalCertificateStatus", "SickLeaveEligibility", "AbsenceReason", "AccountSystemSettings", "ReportCategory", "DashboardPage", "PlantStatus", "TableLookups", "AbsenceType"];
|
package/dist/reducers/index.js
CHANGED
|
@@ -309,7 +309,8 @@ var rootReducer = {
|
|
|
309
309
|
lookupReportCategory: (0, _createNamedReducer["default"])('lookupReportCategory'),
|
|
310
310
|
lookupDashboardPage: (0, _createNamedReducer["default"])('lookupDashboardPage'),
|
|
311
311
|
lookupPlantStatus: (0, _createNamedReducer["default"])('lookupPlantStatus'),
|
|
312
|
-
lookupTableLookups: (0, _createNamedReducer["default"])('lookupTableLookups')
|
|
312
|
+
lookupTableLookups: (0, _createNamedReducer["default"])('lookupTableLookups'),
|
|
313
|
+
lookupAbsenceType: (0, _createNamedReducer["default"])('lookupAbsenceType')
|
|
313
314
|
})
|
|
314
315
|
};
|
|
315
316
|
var _default = exports["default"] = rootReducer;
|