@kineticdata/bundle-tech-bar 6.0.1 → 6.0.2
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/lib/App.js +1 -2
- package/lib/components/AppointmentForm.js +5 -10
- package/lib/components/CheckIn.js +5 -9
- package/lib/components/Display.js +4 -8
- package/lib/components/Feedback.js +5 -9
- package/lib/components/Form.js +5 -10
- package/lib/components/Home.js +5 -9
- package/lib/components/Overhead.js +5 -9
- package/lib/components/Past.js +5 -9
- package/lib/components/Sidebar.js +4 -7
- package/lib/components/TechBars.js +4 -7
- package/lib/components/settings/SchedulerSettings.js +5 -9
- package/lib/components/settings/Settings.js +3 -6
- package/lib/components/settings/Sidebar.js +3 -6
- package/lib/components/settings/TechBarMetrics.js +5 -9
- package/lib/components/settings/TechBarSettings.js +5 -9
- package/lib/components/settings/metrics/MetricsExport.js +7 -13
- package/lib/components/settings/metrics/MetricsSummary.js +4 -7
- package/lib/components/settings/metrics/MetricsTrend.js +4 -7
- package/lib/components/settings/tech-bar/AppointmentForm.js +3 -6
- package/lib/components/settings/tech-bar/TechBar.js +5 -9
- package/lib/components/settings/tech-bar/TechBarDisplayMembers.js +4 -7
- package/lib/components/settings/tech-bar/TechBarSettingsForm.js +5 -9
- package/lib/components/shared/PageTitle.js +3 -5
- package/lib/constants.js +16 -32
- package/lib/index.js +4 -2
- package/lib/redux/modules/app.js +4 -7
- package/lib/redux/modules/appointments.js +5 -9
- package/lib/redux/modules/export.js +5 -9
- package/lib/redux/modules/metrics.js +6 -11
- package/lib/redux/modules/techBarApp.js +9 -17
- package/lib/redux/modules/walkIns.js +5 -9
- package/lib/redux/reducers.js +2 -3
- package/lib/redux/sagas/app.js +11 -15
- package/lib/redux/sagas/appointments.js +227 -241
- package/lib/redux/sagas/export.js +112 -118
- package/lib/redux/sagas/metrics.js +50 -54
- package/lib/redux/sagas/techBarApp.js +233 -245
- package/lib/redux/sagas/walkIns.js +90 -96
- package/lib/redux/sagas.js +7 -9
- package/lib/redux/store.js +5 -9
- package/lib/utils.js +2 -3
- package/package.json +55 -54
|
@@ -24,53 +24,51 @@ function fetchTodayWalkInsRequestSaga(_ref) {
|
|
|
24
24
|
return /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee() {
|
|
25
25
|
var kappSlug, searchBuilder, _yield$call, submissions, error;
|
|
26
26
|
return (0, _regeneratorRuntime2["default"])().wrap(function _callee$(_context) {
|
|
27
|
-
while (1) {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
return
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
_context.next = 16;
|
|
54
|
-
break;
|
|
55
|
-
}
|
|
56
|
-
_context.next = 13;
|
|
57
|
-
return (0, _effects.put)(_walkIns.actions.fetchWalkInsFailure(error));
|
|
58
|
-
case 13:
|
|
59
|
-
(0, _bundleCommon.addToastAlert)({
|
|
60
|
-
title: "Failed to fetch today's walk-ins.",
|
|
61
|
-
message: error.message
|
|
62
|
-
});
|
|
63
|
-
_context.next = 18;
|
|
27
|
+
while (1) switch (_context.prev = _context.next) {
|
|
28
|
+
case 0:
|
|
29
|
+
_context.next = 2;
|
|
30
|
+
return (0, _effects.select)(function (state) {
|
|
31
|
+
return state.app.kappSlug;
|
|
32
|
+
});
|
|
33
|
+
case 2:
|
|
34
|
+
kappSlug = _context.sent;
|
|
35
|
+
searchBuilder = new _react.SubmissionSearch().limit(1000).include('details,values').eq('values[Scheduler Id]', schedulerId).eq('values[Date]', (0, _moment["default"])().format('YYYY-MM-DD'));
|
|
36
|
+
if ((0, _isarray["default"])(status) && status.length > 0) {
|
|
37
|
+
searchBuilder["in"]('values[Status]', status);
|
|
38
|
+
} else if (status) {
|
|
39
|
+
searchBuilder.eq('values[Status]', status);
|
|
40
|
+
}
|
|
41
|
+
_context.next = 7;
|
|
42
|
+
return (0, _effects.call)(_react.searchSubmissions, {
|
|
43
|
+
search: searchBuilder.build(),
|
|
44
|
+
form: _constants.WALK_IN_FORM_SLUG,
|
|
45
|
+
kapp: kappSlug
|
|
46
|
+
});
|
|
47
|
+
case 7:
|
|
48
|
+
_yield$call = _context.sent;
|
|
49
|
+
submissions = _yield$call.submissions;
|
|
50
|
+
error = _yield$call.error;
|
|
51
|
+
if (!error) {
|
|
52
|
+
_context.next = 16;
|
|
64
53
|
break;
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
54
|
+
}
|
|
55
|
+
_context.next = 13;
|
|
56
|
+
return (0, _effects.put)(_walkIns.actions.fetchWalkInsFailure(error));
|
|
57
|
+
case 13:
|
|
58
|
+
(0, _bundleCommon.addToastAlert)({
|
|
59
|
+
title: "Failed to fetch today's walk-ins.",
|
|
60
|
+
message: error.message
|
|
61
|
+
});
|
|
62
|
+
_context.next = 18;
|
|
63
|
+
break;
|
|
64
|
+
case 16:
|
|
65
|
+
_context.next = 18;
|
|
66
|
+
return (0, _effects.put)(_walkIns.actions.fetchTodayWalkInsSuccess(submissions.filter(function (s) {
|
|
67
|
+
return s.coreState !== 'Draft';
|
|
68
|
+
})));
|
|
69
|
+
case 18:
|
|
70
|
+
case "end":
|
|
71
|
+
return _context.stop();
|
|
74
72
|
}
|
|
75
73
|
}, _callee);
|
|
76
74
|
})();
|
|
@@ -80,64 +78,60 @@ function fetchWalkInsOverviewRequestSaga(_ref2) {
|
|
|
80
78
|
return /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee2() {
|
|
81
79
|
var kappSlug, _yield$call2, records, error;
|
|
82
80
|
return (0, _regeneratorRuntime2["default"])().wrap(function _callee2$(_context2) {
|
|
83
|
-
while (1) {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
return
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
Date: (0, _moment["default"])().format('YYYY-MM-DD')
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
case 5:
|
|
103
|
-
_yield$call2 = _context2.sent;
|
|
104
|
-
records = _yield$call2.records;
|
|
105
|
-
error = _yield$call2.error;
|
|
106
|
-
if (!error) {
|
|
107
|
-
_context2.next = 14;
|
|
108
|
-
break;
|
|
81
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
82
|
+
case 0:
|
|
83
|
+
_context2.next = 2;
|
|
84
|
+
return (0, _effects.select)(function (state) {
|
|
85
|
+
return state.app.kappSlug;
|
|
86
|
+
});
|
|
87
|
+
case 2:
|
|
88
|
+
kappSlug = _context2.sent;
|
|
89
|
+
_context2.next = 5;
|
|
90
|
+
return (0, _effects.call)(_react.fetchBridgedResource, {
|
|
91
|
+
kappSlug: kappSlug,
|
|
92
|
+
formSlug: 'bridged-resources',
|
|
93
|
+
bridgedResourceName: 'Tech Bar Walk-Ins Overview',
|
|
94
|
+
values: {
|
|
95
|
+
Id: id,
|
|
96
|
+
Date: (0, _moment["default"])().format('YYYY-MM-DD')
|
|
109
97
|
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
98
|
+
});
|
|
99
|
+
case 5:
|
|
100
|
+
_yield$call2 = _context2.sent;
|
|
101
|
+
records = _yield$call2.records;
|
|
102
|
+
error = _yield$call2.error;
|
|
103
|
+
if (!error) {
|
|
104
|
+
_context2.next = 14;
|
|
115
105
|
break;
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
106
|
+
}
|
|
107
|
+
_context2.next = 11;
|
|
108
|
+
return (0, _effects.put)(_walkIns.actions.fetchWalkInsOverviewFailure(error));
|
|
109
|
+
case 11:
|
|
110
|
+
console.error('Failed to fetch walk-ins overview.', error.message);
|
|
111
|
+
_context2.next = 16;
|
|
112
|
+
break;
|
|
113
|
+
case 14:
|
|
114
|
+
_context2.next = 16;
|
|
115
|
+
return (0, _effects.put)(_walkIns.actions.fetchWalkInsOverviewSuccess(records));
|
|
116
|
+
case 16:
|
|
117
|
+
case "end":
|
|
118
|
+
return _context2.stop();
|
|
123
119
|
}
|
|
124
120
|
}, _callee2);
|
|
125
121
|
})();
|
|
126
122
|
}
|
|
127
123
|
function watchWalkIns() {
|
|
128
124
|
return (0, _regeneratorRuntime2["default"])().wrap(function watchWalkIns$(_context3) {
|
|
129
|
-
while (1) {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
return _context3.stop();
|
|
140
|
-
}
|
|
125
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
126
|
+
case 0:
|
|
127
|
+
_context3.next = 2;
|
|
128
|
+
return (0, _effects.takeEvery)(_walkIns.types.FETCH_TODAY_WALK_INS_REQUEST, fetchTodayWalkInsRequestSaga);
|
|
129
|
+
case 2:
|
|
130
|
+
_context3.next = 4;
|
|
131
|
+
return (0, _effects.takeEvery)(_walkIns.types.FETCH_WALK_INS_OVERVIEW_REQUEST, fetchWalkInsOverviewRequestSaga);
|
|
132
|
+
case 4:
|
|
133
|
+
case "end":
|
|
134
|
+
return _context3.stop();
|
|
141
135
|
}
|
|
142
136
|
}, _marked);
|
|
143
137
|
}
|
package/lib/redux/sagas.js
CHANGED
|
@@ -16,15 +16,13 @@ var _export = require("./sagas/export");
|
|
|
16
16
|
var _marked = /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(_callee);
|
|
17
17
|
function _callee() {
|
|
18
18
|
return (0, _regeneratorRuntime2["default"])().wrap(function _callee$(_context) {
|
|
19
|
-
while (1) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
return _context.stop();
|
|
27
|
-
}
|
|
19
|
+
while (1) switch (_context.prev = _context.next) {
|
|
20
|
+
case 0:
|
|
21
|
+
_context.next = 2;
|
|
22
|
+
return (0, _effects.all)([(0, _app.watchApp)(), (0, _appointments.watchAppointments)(), (0, _techBarApp.watchTechBarApp)(), (0, _walkIns.watchWalkIns)(), (0, _metrics.watchMetrics)(), (0, _export.watchExport)()]);
|
|
23
|
+
case 2:
|
|
24
|
+
case "end":
|
|
25
|
+
return _context.stop();
|
|
28
26
|
}
|
|
29
27
|
}, _marked);
|
|
30
28
|
}
|
package/lib/redux/store.js
CHANGED
|
@@ -25,16 +25,13 @@ var _createReduxHistoryCo = (0, _reduxFirstHistory.createReduxHistoryContext)({
|
|
|
25
25
|
createReduxHistory = _createReduxHistoryCo.createReduxHistory,
|
|
26
26
|
routerMiddleware = _createReduxHistoryCo.routerMiddleware,
|
|
27
27
|
routerReducer = _createReduxHistoryCo.routerReducer;
|
|
28
|
-
var store = (0, _redux.createStore)((0, _redux.combineReducers)((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, _reducers["default"]), {}, {
|
|
28
|
+
var store = exports.store = (0, _redux.createStore)((0, _redux.combineReducers)((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, _reducers["default"]), {}, {
|
|
29
29
|
router: routerReducer
|
|
30
30
|
})), composeEnhancers((0, _redux.applyMiddleware)(routerMiddleware, sagaMiddlware)));
|
|
31
|
-
exports.
|
|
32
|
-
var connectedHistory = (0, _reduxFirstHistory.reachify)(createReduxHistory(store));
|
|
33
|
-
exports.connectedHistory = connectedHistory;
|
|
31
|
+
var connectedHistory = exports.connectedHistory = (0, _reduxFirstHistory.reachify)(createReduxHistory(store));
|
|
34
32
|
sagaMiddlware.run(_sagas["default"]);
|
|
35
|
-
var context = /*#__PURE__*/(0, _react.createContext)(null);
|
|
36
|
-
exports.
|
|
37
|
-
var connect = function connect() {
|
|
33
|
+
var context = exports.context = /*#__PURE__*/(0, _react.createContext)(null);
|
|
34
|
+
var connect = exports.connect = function connect() {
|
|
38
35
|
var mapStateToProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
39
36
|
var mapDispatchToProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
40
37
|
var mergeProps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
@@ -42,5 +39,4 @@ var connect = function connect() {
|
|
|
42
39
|
return (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps, mergeProps, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, options), {}, {
|
|
43
40
|
context: context
|
|
44
41
|
}));
|
|
45
|
-
};
|
|
46
|
-
exports.connect = connect;
|
|
42
|
+
};
|
package/lib/utils.js
CHANGED
|
@@ -4,11 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.isActiveClass = void 0;
|
|
7
|
-
var isActiveClass = function isActiveClass(defaultClass) {
|
|
7
|
+
var isActiveClass = exports.isActiveClass = function isActiveClass(defaultClass) {
|
|
8
8
|
return function (props) {
|
|
9
9
|
return {
|
|
10
10
|
className: props.isCurrent ? "".concat(defaultClass, " active") : defaultClass
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
|
-
};
|
|
14
|
-
exports.isActiveClass = isActiveClass;
|
|
13
|
+
};
|
package/package.json
CHANGED
|
@@ -1,54 +1,55 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@kineticdata/bundle-tech-bar",
|
|
3
|
-
"version": "6.0.
|
|
4
|
-
"main": "./lib/index.js",
|
|
5
|
-
"files": [
|
|
6
|
-
"assets",
|
|
7
|
-
"lib"
|
|
8
|
-
],
|
|
9
|
-
"publishConfig": {
|
|
10
|
-
"access": "public"
|
|
11
|
-
},
|
|
12
|
-
"scripts": {
|
|
13
|
-
"build": "cross-env NODE_ENV=production babel src --out-dir lib",
|
|
14
|
-
"lint": "cross-env NODE_ENV=production eslint src --ext .js",
|
|
15
|
-
"preversion": "yarn lint",
|
|
16
|
-
"prepublishOnly": "yarn build"
|
|
17
|
-
},
|
|
18
|
-
"dependencies": {
|
|
19
|
-
"@kineticdata/bundle-common": "6.0.
|
|
20
|
-
"@kineticdata/react": "6.0.
|
|
21
|
-
"@reach/router": "https://github.com/kineticdata/router.git",
|
|
22
|
-
"bootstrap": "^4.3.1",
|
|
23
|
-
"classnames": "^2.2.5",
|
|
24
|
-
"downloadjs": "^1.4.7",
|
|
25
|
-
"immutable": "4.0.0-rc.9",
|
|
26
|
-
"isarray": "^2.0.2",
|
|
27
|
-
"md5": "^2.0.0",
|
|
28
|
-
"moment": "^2.29.4",
|
|
29
|
-
"papaparse": "^5.2.0",
|
|
30
|
-
"query-string": "^5.1.1",
|
|
31
|
-
"react-redux": "^6.0.1",
|
|
32
|
-
"reactstrap": "^7.1.0",
|
|
33
|
-
"recompose": "^0.30.0",
|
|
34
|
-
"redux": "^3.7.2",
|
|
35
|
-
"redux-first-history": "^4.0.0-alpha.7",
|
|
36
|
-
"redux-saga": "^0.16.0",
|
|
37
|
-
"rudy-match-path": "^0.3.0",
|
|
38
|
-
"victory": "^31.2.0"
|
|
39
|
-
},
|
|
40
|
-
"peerDependencies": {
|
|
41
|
-
"react": "^17.0.2",
|
|
42
|
-
"react-dom": "^17.0.2"
|
|
43
|
-
},
|
|
44
|
-
"babel": {
|
|
45
|
-
"presets": [
|
|
46
|
-
[
|
|
47
|
-
"react-app",
|
|
48
|
-
{
|
|
49
|
-
"absoluteRuntime": false
|
|
50
|
-
}
|
|
51
|
-
]
|
|
52
|
-
]
|
|
53
|
-
}
|
|
54
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@kineticdata/bundle-tech-bar",
|
|
3
|
+
"version": "6.0.2",
|
|
4
|
+
"main": "./lib/index.js",
|
|
5
|
+
"files": [
|
|
6
|
+
"assets",
|
|
7
|
+
"lib"
|
|
8
|
+
],
|
|
9
|
+
"publishConfig": {
|
|
10
|
+
"access": "public"
|
|
11
|
+
},
|
|
12
|
+
"scripts": {
|
|
13
|
+
"build": "cross-env NODE_ENV=production babel src --out-dir lib",
|
|
14
|
+
"lint": "cross-env NODE_ENV=production eslint src --ext .js",
|
|
15
|
+
"preversion": "yarn lint",
|
|
16
|
+
"prepublishOnly": "yarn build"
|
|
17
|
+
},
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"@kineticdata/bundle-common": "6.0.2",
|
|
20
|
+
"@kineticdata/react": "6.0.2",
|
|
21
|
+
"@reach/router": "https://github.com/kineticdata/router.git",
|
|
22
|
+
"bootstrap": "^4.3.1",
|
|
23
|
+
"classnames": "^2.2.5",
|
|
24
|
+
"downloadjs": "^1.4.7",
|
|
25
|
+
"immutable": "4.0.0-rc.9",
|
|
26
|
+
"isarray": "^2.0.2",
|
|
27
|
+
"md5": "^2.0.0",
|
|
28
|
+
"moment": "^2.29.4",
|
|
29
|
+
"papaparse": "^5.2.0",
|
|
30
|
+
"query-string": "^5.1.1",
|
|
31
|
+
"react-redux": "^6.0.1",
|
|
32
|
+
"reactstrap": "^7.1.0",
|
|
33
|
+
"recompose": "^0.30.0",
|
|
34
|
+
"redux": "^3.7.2",
|
|
35
|
+
"redux-first-history": "^4.0.0-alpha.7",
|
|
36
|
+
"redux-saga": "^0.16.0",
|
|
37
|
+
"rudy-match-path": "^0.3.0",
|
|
38
|
+
"victory": "^31.2.0"
|
|
39
|
+
},
|
|
40
|
+
"peerDependencies": {
|
|
41
|
+
"react": "^17.0.2",
|
|
42
|
+
"react-dom": "^17.0.2"
|
|
43
|
+
},
|
|
44
|
+
"babel": {
|
|
45
|
+
"presets": [
|
|
46
|
+
[
|
|
47
|
+
"react-app",
|
|
48
|
+
{
|
|
49
|
+
"absoluteRuntime": false
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
"gitHead": "68e895f9bb49d039a9c79da64b39a6bbc2243cb2"
|
|
55
|
+
}
|