@kineticdata/bundle-tech-bar 5.1.1 → 6.0.0
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 +41 -36
- package/lib/components/AppointmentForm.js +48 -36
- package/lib/components/CheckIn.js +86 -78
- package/lib/components/Display.js +64 -53
- package/lib/components/Feedback.js +106 -103
- package/lib/components/Form.js +56 -48
- package/lib/components/Home.js +148 -144
- package/lib/components/Overhead.js +52 -44
- package/lib/components/Past.js +56 -44
- package/lib/components/Sidebar.js +58 -51
- package/lib/components/TechBars.js +72 -68
- package/lib/components/settings/SchedulerSettings.js +32 -21
- package/lib/components/settings/Settings.js +54 -50
- package/lib/components/settings/Sidebar.js +41 -31
- package/lib/components/settings/TechBarMetrics.js +124 -120
- package/lib/components/settings/TechBarSettings.js +46 -36
- package/lib/components/settings/metrics/MetricsExport.js +120 -107
- package/lib/components/settings/metrics/MetricsSummary.js +140 -141
- package/lib/components/settings/metrics/MetricsTrend.js +331 -341
- package/lib/components/settings/tech-bar/AppointmentForm.js +30 -20
- package/lib/components/settings/tech-bar/TechBar.js +90 -79
- package/lib/components/settings/tech-bar/TechBarDisplayMembers.js +108 -108
- package/lib/components/settings/tech-bar/TechBarSettingsForm.js +44 -34
- package/lib/components/shared/PageTitle.js +24 -15
- package/lib/constants.js +38 -16
- package/lib/index.js +49 -53
- package/lib/redux/modules/app.js +22 -17
- package/lib/redux/modules/appointments.js +31 -35
- package/lib/redux/modules/export.js +26 -21
- package/lib/redux/modules/metrics.js +24 -19
- package/lib/redux/modules/techBarApp.js +33 -34
- package/lib/redux/modules/walkIns.js +23 -21
- package/lib/redux/reducers.js +21 -14
- package/lib/redux/sagas/app.js +15 -13
- package/lib/redux/sagas/appointments.js +220 -256
- package/lib/redux/sagas/export.js +153 -166
- package/lib/redux/sagas/metrics.js +76 -76
- package/lib/redux/sagas/techBarApp.js +240 -258
- package/lib/redux/sagas/walkIns.js +124 -132
- package/lib/redux/sagas.js +18 -14
- package/lib/redux/store.js +36 -27
- package/lib/utils.js +9 -2
- package/package.json +6 -15
|
@@ -1,18 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.mapStateToProps = exports.AppointmentFormComponent = exports.AppointmentForm = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _store = require("../../../redux/store");
|
|
10
|
+
var _recompose = require("recompose");
|
|
11
|
+
var _bundleCommon = require("@kineticdata/bundle-common");
|
|
12
|
+
var _PageTitle = require("../../shared/PageTitle");
|
|
13
|
+
var _react2 = require("@kineticdata/react");
|
|
14
|
+
var AppointmentFormComponent = function AppointmentFormComponent(_ref) {
|
|
8
15
|
var id = _ref.id,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
return /*#__PURE__*/
|
|
16
|
+
kapp = _ref.kapp,
|
|
17
|
+
techBar = _ref.techBar;
|
|
18
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
12
19
|
className: "page-container"
|
|
13
|
-
}, /*#__PURE__*/
|
|
20
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
14
21
|
className: "page-panel"
|
|
15
|
-
}, /*#__PURE__*/
|
|
22
|
+
}, /*#__PURE__*/_react["default"].createElement(_PageTitle.PageTitle, {
|
|
16
23
|
parts: ['Appointment Details', techBar.values['Name']],
|
|
17
24
|
settings: true,
|
|
18
25
|
breadcrumbs: [{
|
|
@@ -29,23 +36,26 @@ export var AppointmentFormComponent = function AppointmentFormComponent(_ref) {
|
|
|
29
36
|
to: '../..'
|
|
30
37
|
}],
|
|
31
38
|
title: "Appointment Details"
|
|
32
|
-
}), techBar ? /*#__PURE__*/
|
|
39
|
+
}), techBar ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
33
40
|
className: "content-wrapper form-unstyled"
|
|
34
|
-
}, /*#__PURE__*/
|
|
41
|
+
}, /*#__PURE__*/_react["default"].createElement(_react2.I18n, {
|
|
35
42
|
context: "kapps.".concat(kapp.slug, ".forms.appointment")
|
|
36
|
-
}, /*#__PURE__*/
|
|
43
|
+
}, /*#__PURE__*/_react["default"].createElement(_react2.CoreForm, {
|
|
37
44
|
submission: id,
|
|
38
45
|
review: true
|
|
39
|
-
}))) : /*#__PURE__*/
|
|
46
|
+
}))) : /*#__PURE__*/_react["default"].createElement(_bundleCommon.ErrorNotFound, null)));
|
|
40
47
|
};
|
|
41
|
-
|
|
42
|
-
|
|
48
|
+
exports.AppointmentFormComponent = AppointmentFormComponent;
|
|
49
|
+
var mapStateToProps = function mapStateToProps(state, props) {
|
|
50
|
+
var isSchedulerAdmin = (0, _bundleCommon.selectHasRoleSchedulerAdmin)(state.app.profile);
|
|
43
51
|
var techBar = state.techBarApp.schedulers.find(function (scheduler) {
|
|
44
|
-
return scheduler.id === props.techBarId && (isSchedulerAdmin || Utils.isMemberOf(state.app.profile, "Role::Scheduler::".concat(scheduler.values['Name'])) || Utils.isMemberOf(state.app.profile, "Scheduler::".concat(scheduler.values['Name'])));
|
|
52
|
+
return scheduler.id === props.techBarId && (isSchedulerAdmin || _bundleCommon.Utils.isMemberOf(state.app.profile, "Role::Scheduler::".concat(scheduler.values['Name'])) || _bundleCommon.Utils.isMemberOf(state.app.profile, "Scheduler::".concat(scheduler.values['Name'])));
|
|
45
53
|
});
|
|
46
54
|
return {
|
|
47
55
|
kapp: state.app.kapp,
|
|
48
56
|
techBar: techBar
|
|
49
57
|
};
|
|
50
58
|
};
|
|
51
|
-
|
|
59
|
+
exports.mapStateToProps = mapStateToProps;
|
|
60
|
+
var AppointmentForm = (0, _recompose.compose)((0, _store.connect)(mapStateToProps))(AppointmentFormComponent);
|
|
61
|
+
exports.AppointmentForm = AppointmentForm;
|
|
@@ -1,30 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.mapStateToProps = exports.mapDispatchToProps = exports.TechBarComponent = exports.TechBar = void 0;
|
|
8
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
9
|
+
var _react = _interopRequireDefault(require("react"));
|
|
10
|
+
var _store = require("../../../redux/store");
|
|
11
|
+
var _recompose = require("recompose");
|
|
12
|
+
var _bundleCommon = require("@kineticdata/bundle-common");
|
|
13
|
+
var _PageTitle = require("../../shared/PageTitle");
|
|
14
|
+
var _router = require("@reach/router");
|
|
15
|
+
var _moment = _interopRequireDefault(require("moment"));
|
|
16
|
+
var _appointments = require("../../../redux/modules/appointments");
|
|
17
|
+
var _react2 = require("@kineticdata/react");
|
|
18
|
+
var _TechBarDisplayMembers = require("./TechBarDisplayMembers");
|
|
19
|
+
var _constants = require("../../../constants");
|
|
20
|
+
var TechBarComponent = function TechBarComponent(_ref) {
|
|
14
21
|
var techBar = _ref.techBar,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
return /*#__PURE__*/
|
|
22
|
+
hasManagerAccess = _ref.hasManagerAccess,
|
|
23
|
+
appointments = _ref.appointments,
|
|
24
|
+
appointmentDate = _ref.appointmentDate,
|
|
25
|
+
handlePreviousDay = _ref.handlePreviousDay,
|
|
26
|
+
handleNextDay = _ref.handleNextDay,
|
|
27
|
+
handleToday = _ref.handleToday,
|
|
28
|
+
isToday = _ref.isToday,
|
|
29
|
+
kapp = _ref.kapp;
|
|
30
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
24
31
|
className: "page-container"
|
|
25
|
-
}, /*#__PURE__*/
|
|
32
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
26
33
|
className: "page-panel"
|
|
27
|
-
}, /*#__PURE__*/
|
|
34
|
+
}, /*#__PURE__*/_react["default"].createElement(_PageTitle.PageTitle, {
|
|
28
35
|
parts: [techBar && techBar.values['Name']],
|
|
29
36
|
settings: true,
|
|
30
37
|
breadcrumbs: [{
|
|
@@ -43,62 +50,62 @@ export var TechBarComponent = function TechBarComponent(_ref) {
|
|
|
43
50
|
icon: 'pencil',
|
|
44
51
|
to: 'edit'
|
|
45
52
|
}]
|
|
46
|
-
}), techBar ? /*#__PURE__*/
|
|
53
|
+
}), techBar ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
47
54
|
className: "content-wrapper"
|
|
48
|
-
}, /*#__PURE__*/
|
|
55
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
49
56
|
className: "form form-unstyled mb-5"
|
|
50
|
-
}, /*#__PURE__*/
|
|
57
|
+
}, /*#__PURE__*/_react["default"].createElement("h2", {
|
|
51
58
|
className: "section__title"
|
|
52
|
-
}, /*#__PURE__*/
|
|
59
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
53
60
|
className: "title"
|
|
54
|
-
}, /*#__PURE__*/
|
|
61
|
+
}, /*#__PURE__*/_react["default"].createElement(_react2.I18n, null, "General Settings"))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
55
62
|
className: "form-group"
|
|
56
|
-
}, /*#__PURE__*/
|
|
63
|
+
}, /*#__PURE__*/_react["default"].createElement("label", null, /*#__PURE__*/_react["default"].createElement(_react2.I18n, null, "Allow Walk-Ins")), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_react2.I18n, null, techBar.settings.allowWalkIns ? 'Yes' : 'No'))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
57
64
|
className: "form-group"
|
|
58
|
-
}, /*#__PURE__*/
|
|
65
|
+
}, /*#__PURE__*/_react["default"].createElement("label", null, /*#__PURE__*/_react["default"].createElement(_react2.I18n, null, "Feedback Identification")), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_react2.I18n, null, techBar.settings.feedbackIdentitifcation)))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
59
66
|
className: "mb-5"
|
|
60
|
-
}, /*#__PURE__*/
|
|
67
|
+
}, /*#__PURE__*/_react["default"].createElement("h2", {
|
|
61
68
|
className: "section__title"
|
|
62
|
-
}, /*#__PURE__*/
|
|
69
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
63
70
|
className: "title"
|
|
64
|
-
}, /*#__PURE__*/
|
|
71
|
+
}, /*#__PURE__*/_react["default"].createElement(_react2.I18n, null, "Front Desk Users"))), /*#__PURE__*/_react["default"].createElement(_TechBarDisplayMembers.TechBarDisplayMembers, {
|
|
65
72
|
techBar: techBar,
|
|
66
73
|
hasManagerAccess: hasManagerAccess
|
|
67
|
-
})), /*#__PURE__*/
|
|
74
|
+
})), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("h2", {
|
|
68
75
|
className: "section__title"
|
|
69
|
-
}, /*#__PURE__*/
|
|
76
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
70
77
|
className: "title"
|
|
71
|
-
}, /*#__PURE__*/
|
|
78
|
+
}, /*#__PURE__*/_react["default"].createElement(_react2.I18n, null, "Appointments"))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
72
79
|
className: "appointments-control mb-3"
|
|
73
|
-
}, /*#__PURE__*/
|
|
80
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
74
81
|
className: "btn-group"
|
|
75
|
-
}, /*#__PURE__*/
|
|
82
|
+
}, /*#__PURE__*/_react["default"].createElement("button", {
|
|
76
83
|
className: "btn btn-inverse",
|
|
77
84
|
onClick: handlePreviousDay
|
|
78
|
-
}, /*#__PURE__*/
|
|
85
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
79
86
|
className: "fa fa-chevron-left"
|
|
80
|
-
})), /*#__PURE__*/
|
|
87
|
+
})), /*#__PURE__*/_react["default"].createElement("button", {
|
|
81
88
|
className: "btn btn-inverse",
|
|
82
89
|
onClick: handleToday,
|
|
83
90
|
disabled: isToday
|
|
84
|
-
}, /*#__PURE__*/
|
|
91
|
+
}, /*#__PURE__*/_react["default"].createElement(_react2.I18n, null, "Today")), /*#__PURE__*/_react["default"].createElement("button", {
|
|
85
92
|
className: "btn btn-inverse",
|
|
86
93
|
onClick: handleNextDay
|
|
87
|
-
}, /*#__PURE__*/
|
|
94
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
88
95
|
className: "fa fa-chevron-right"
|
|
89
|
-
}))), /*#__PURE__*/
|
|
96
|
+
}))), /*#__PURE__*/_react["default"].createElement("span", {
|
|
90
97
|
className: "ml-3"
|
|
91
|
-
}, /*#__PURE__*/
|
|
98
|
+
}, /*#__PURE__*/_react["default"].createElement(_react2.Moment, {
|
|
92
99
|
timestamp: appointmentDate,
|
|
93
|
-
format: Moment.formats.dateWithDay
|
|
94
|
-
}))), appointments ? /*#__PURE__*/
|
|
100
|
+
format: _react2.Moment.formats.dateWithDay
|
|
101
|
+
}))), appointments ? /*#__PURE__*/_react["default"].createElement(_bundleCommon.Table, {
|
|
95
102
|
props: {
|
|
96
103
|
"class": 'table--settings table-hover',
|
|
97
104
|
name: 'appointments-table',
|
|
98
105
|
id: 'appointments-table'
|
|
99
106
|
},
|
|
100
107
|
data: appointments.map(function (a) {
|
|
101
|
-
return
|
|
108
|
+
return (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, a.values), {}, {
|
|
102
109
|
_id: a.id,
|
|
103
110
|
_coreState: a.coreState
|
|
104
111
|
});
|
|
@@ -108,8 +115,8 @@ export var TechBarComponent = function TechBarComponent(_ref) {
|
|
|
108
115
|
title: 'Summary',
|
|
109
116
|
renderBodyCell: function renderBodyCell(_ref2) {
|
|
110
117
|
var content = _ref2.content,
|
|
111
|
-
|
|
112
|
-
return /*#__PURE__*/
|
|
118
|
+
row = _ref2.row;
|
|
119
|
+
return /*#__PURE__*/_react["default"].createElement("td", null, /*#__PURE__*/_react["default"].createElement(_router.Link, {
|
|
113
120
|
to: "appointment/".concat(row._id)
|
|
114
121
|
}, content));
|
|
115
122
|
}
|
|
@@ -121,15 +128,15 @@ export var TechBarComponent = function TechBarComponent(_ref) {
|
|
|
121
128
|
title: 'Time',
|
|
122
129
|
renderBodyCell: function renderBodyCell(_ref3) {
|
|
123
130
|
var content = _ref3.content,
|
|
124
|
-
|
|
125
|
-
var start =
|
|
131
|
+
row = _ref3.row;
|
|
132
|
+
var start = _moment["default"].utc(row['Event Time'], _constants.TIME_FORMAT);
|
|
126
133
|
var end = start.clone().add(row['Event Duration'], 'minute');
|
|
127
|
-
return /*#__PURE__*/
|
|
134
|
+
return /*#__PURE__*/_react["default"].createElement("td", null, /*#__PURE__*/_react["default"].createElement(_react2.Moment, {
|
|
128
135
|
timestamp: start,
|
|
129
|
-
format: Moment.formats.time
|
|
130
|
-
}), " - ", /*#__PURE__*/
|
|
136
|
+
format: _react2.Moment.formats.time
|
|
137
|
+
}), " - ", /*#__PURE__*/_react["default"].createElement(_react2.Moment, {
|
|
131
138
|
timestamp: end,
|
|
132
|
-
format: Moment.formats.time
|
|
139
|
+
format: _react2.Moment.formats.time
|
|
133
140
|
}));
|
|
134
141
|
}
|
|
135
142
|
}, {
|
|
@@ -141,10 +148,10 @@ export var TechBarComponent = function TechBarComponent(_ref) {
|
|
|
141
148
|
width: '1%',
|
|
142
149
|
renderBodyCell: function renderBodyCell(_ref4) {
|
|
143
150
|
var content = _ref4.content,
|
|
144
|
-
|
|
145
|
-
return /*#__PURE__*/
|
|
151
|
+
row = _ref4.row;
|
|
152
|
+
return /*#__PURE__*/_react["default"].createElement("td", null, /*#__PURE__*/_react["default"].createElement("span", {
|
|
146
153
|
className: "badge ".concat(row._coreState === 'Closed' ? 'badge-dark' : 'badge-success')
|
|
147
|
-
}, /*#__PURE__*/
|
|
154
|
+
}, /*#__PURE__*/_react["default"].createElement(_react2.I18n, null, content)));
|
|
148
155
|
}
|
|
149
156
|
}],
|
|
150
157
|
emptyMessage: "There are no appointments for the selected date.",
|
|
@@ -153,40 +160,43 @@ export var TechBarComponent = function TechBarComponent(_ref) {
|
|
|
153
160
|
sortOrder: 2,
|
|
154
161
|
render: function render(_ref5) {
|
|
155
162
|
var table = _ref5.table;
|
|
156
|
-
return /*#__PURE__*/
|
|
163
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
157
164
|
className: "table-wrapper"
|
|
158
165
|
}, table);
|
|
159
166
|
}
|
|
160
|
-
}) : /*#__PURE__*/
|
|
167
|
+
}) : /*#__PURE__*/_react["default"].createElement(_bundleCommon.LoadingMessage, null))) : /*#__PURE__*/_react["default"].createElement(_bundleCommon.ErrorNotFound, null)));
|
|
161
168
|
};
|
|
162
|
-
|
|
163
|
-
|
|
169
|
+
exports.TechBarComponent = TechBarComponent;
|
|
170
|
+
var mapStateToProps = function mapStateToProps(state, props) {
|
|
171
|
+
var isSchedulerAdmin = (0, _bundleCommon.selectHasRoleSchedulerAdmin)(state.app.profile);
|
|
164
172
|
var techBar = state.techBarApp.schedulers.find(function (scheduler) {
|
|
165
|
-
return scheduler.id === props.techBarId && (isSchedulerAdmin || Utils.isMemberOf(state.app.profile, "Role::Scheduler::".concat(scheduler.values['Name'])) || Utils.isMemberOf(state.app.profile, "Scheduler::".concat(scheduler.values['Name'])));
|
|
173
|
+
return scheduler.id === props.techBarId && (isSchedulerAdmin || _bundleCommon.Utils.isMemberOf(state.app.profile, "Role::Scheduler::".concat(scheduler.values['Name'])) || _bundleCommon.Utils.isMemberOf(state.app.profile, "Scheduler::".concat(scheduler.values['Name'])));
|
|
166
174
|
});
|
|
167
175
|
return {
|
|
168
176
|
kapp: state.app.kapp,
|
|
169
177
|
techBar: techBar,
|
|
170
|
-
hasManagerAccess: isSchedulerAdmin || techBar && Utils.isMemberOf(state.app.profile, "Role::Scheduler::".concat(techBar.values['Name'])),
|
|
178
|
+
hasManagerAccess: isSchedulerAdmin || techBar && _bundleCommon.Utils.isMemberOf(state.app.profile, "Role::Scheduler::".concat(techBar.values['Name'])),
|
|
171
179
|
appointmentError: state.appointments.error,
|
|
172
180
|
appointments: state.appointments.list,
|
|
173
181
|
appointmentDate: state.appointments.listDate
|
|
174
182
|
};
|
|
175
183
|
};
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
184
|
+
exports.mapStateToProps = mapStateToProps;
|
|
185
|
+
var mapDispatchToProps = {
|
|
186
|
+
fetchAppointmentsListRequest: _appointments.actions.fetchAppointmentsListRequest,
|
|
187
|
+
setAppointmentsListDate: _appointments.actions.setAppointmentsListDate
|
|
179
188
|
};
|
|
180
|
-
|
|
189
|
+
exports.mapDispatchToProps = mapDispatchToProps;
|
|
190
|
+
var TechBar = (0, _recompose.compose)((0, _store.connect)(mapStateToProps, mapDispatchToProps), (0, _recompose.withProps)(function (_ref6) {
|
|
181
191
|
var appointmentDate = _ref6.appointmentDate;
|
|
182
192
|
return {
|
|
183
|
-
isToday: appointmentDate.format('YYYY-MM-DD') ===
|
|
193
|
+
isToday: appointmentDate.format('YYYY-MM-DD') === (0, _moment["default"])().format('YYYY-MM-DD')
|
|
184
194
|
};
|
|
185
|
-
}), withHandlers({
|
|
195
|
+
}), (0, _recompose.withHandlers)({
|
|
186
196
|
handlePreviousDay: function handlePreviousDay(_ref7) {
|
|
187
197
|
var appointmentDate = _ref7.appointmentDate,
|
|
188
|
-
|
|
189
|
-
|
|
198
|
+
setAppointmentsListDate = _ref7.setAppointmentsListDate,
|
|
199
|
+
techBar = _ref7.techBar;
|
|
190
200
|
return function () {
|
|
191
201
|
setAppointmentsListDate({
|
|
192
202
|
date: appointmentDate.add(-1, 'day'),
|
|
@@ -196,8 +206,8 @@ export var TechBar = compose(connect(mapStateToProps, mapDispatchToProps), withP
|
|
|
196
206
|
},
|
|
197
207
|
handleNextDay: function handleNextDay(_ref8) {
|
|
198
208
|
var appointmentDate = _ref8.appointmentDate,
|
|
199
|
-
|
|
200
|
-
|
|
209
|
+
setAppointmentsListDate = _ref8.setAppointmentsListDate,
|
|
210
|
+
techBar = _ref8.techBar;
|
|
201
211
|
return function () {
|
|
202
212
|
setAppointmentsListDate({
|
|
203
213
|
date: appointmentDate.add(1, 'day'),
|
|
@@ -207,15 +217,15 @@ export var TechBar = compose(connect(mapStateToProps, mapDispatchToProps), withP
|
|
|
207
217
|
},
|
|
208
218
|
handleToday: function handleToday(_ref9) {
|
|
209
219
|
var setAppointmentsListDate = _ref9.setAppointmentsListDate,
|
|
210
|
-
|
|
220
|
+
techBar = _ref9.techBar;
|
|
211
221
|
return function () {
|
|
212
222
|
setAppointmentsListDate({
|
|
213
|
-
date:
|
|
223
|
+
date: (0, _moment["default"])(),
|
|
214
224
|
schedulerId: techBar.values['Id']
|
|
215
225
|
});
|
|
216
226
|
};
|
|
217
227
|
}
|
|
218
|
-
}), lifecycle({
|
|
228
|
+
}), (0, _recompose.lifecycle)({
|
|
219
229
|
componentDidMount: function componentDidMount() {
|
|
220
230
|
if (this.props.techBar) {
|
|
221
231
|
this.props.fetchAppointmentsListRequest({
|
|
@@ -223,4 +233,5 @@ export var TechBar = compose(connect(mapStateToProps, mapDispatchToProps), withP
|
|
|
223
233
|
});
|
|
224
234
|
}
|
|
225
235
|
}
|
|
226
|
-
}))(TechBarComponent);
|
|
236
|
+
}))(TechBarComponent);
|
|
237
|
+
exports.TechBar = TechBar;
|