@kineticdata/bundle-tech-bar 5.0.16 → 5.1.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/assets/styles/_layout.scss +42 -17
- package/lib/App.js +37 -54
- package/lib/components/AppointmentForm.js +18 -20
- package/lib/components/Form.js +13 -18
- package/lib/components/Home.js +29 -35
- package/lib/components/Overhead.js +10 -8
- package/lib/components/Past.js +14 -16
- package/lib/components/TechBars.js +28 -27
- package/lib/components/settings/SchedulerSettings.js +16 -16
- package/lib/components/settings/Settings.js +14 -16
- package/lib/components/settings/TechBarMetrics.js +19 -28
- package/lib/components/settings/TechBarSettings.js +17 -26
- package/lib/components/settings/metrics/MetricsExport.js +2 -2
- package/lib/components/settings/metrics/MetricsTrend.js +4 -4
- package/lib/components/settings/tech-bar/AppointmentForm.js +22 -39
- package/lib/components/settings/tech-bar/TechBar.js +41 -43
- package/lib/components/settings/tech-bar/TechBarSettingsForm.js +31 -46
- package/lib/components/shared/PageTitle.js +10 -3
- package/lib/index.js +4 -5
- package/package.json +4 -5
|
@@ -15,39 +15,39 @@ export var SchedulerSettingsComponent = function SchedulerSettingsComponent(_ref
|
|
|
15
15
|
type: "TechBar",
|
|
16
16
|
pathPrefix: "/kapps/".concat(kapp.slug, "/settings/schedulers"),
|
|
17
17
|
breadcrumbs: [{
|
|
18
|
-
label: '
|
|
19
|
-
path: "/
|
|
18
|
+
label: 'Home',
|
|
19
|
+
path: "/"
|
|
20
20
|
}, {
|
|
21
|
-
label:
|
|
22
|
-
|
|
21
|
+
label: "".concat(kapp.name, " Settings"),
|
|
22
|
+
to: "/kapps/".concat(kapp.slug, "/settings")
|
|
23
23
|
}, {
|
|
24
|
-
label: '
|
|
25
|
-
|
|
24
|
+
label: 'Schedulers',
|
|
25
|
+
to: "/kapps/".concat(kapp.slug, "/settings/schedulers")
|
|
26
26
|
}]
|
|
27
27
|
}), /*#__PURE__*/React.createElement(Scheduler, {
|
|
28
28
|
path: ":id",
|
|
29
29
|
profile: profile,
|
|
30
30
|
pathPrefix: "/kapps/".concat(kapp.slug, "/settings/schedulers"),
|
|
31
31
|
breadcrumbs: [{
|
|
32
|
-
label: '
|
|
33
|
-
path: "/
|
|
32
|
+
label: 'Home',
|
|
33
|
+
path: "/"
|
|
34
34
|
}, {
|
|
35
|
-
label:
|
|
36
|
-
|
|
35
|
+
label: "".concat(kapp.name, " Settings"),
|
|
36
|
+
to: "/kapps/".concat(kapp.slug, "/settings")
|
|
37
37
|
}, {
|
|
38
|
-
label: '
|
|
39
|
-
|
|
38
|
+
label: 'Schedulers',
|
|
39
|
+
to: "/kapps/".concat(kapp.slug, "/settings/schedulers")
|
|
40
40
|
}]
|
|
41
41
|
}), /*#__PURE__*/React.createElement(SchedulersList, {
|
|
42
42
|
"default": true,
|
|
43
43
|
profile: profile,
|
|
44
44
|
pathPrefix: "/kapps/".concat(kapp.slug, "/settings/schedulers"),
|
|
45
45
|
breadcrumbs: [{
|
|
46
|
-
label: '
|
|
47
|
-
path: "/
|
|
46
|
+
label: 'Home',
|
|
47
|
+
path: "/"
|
|
48
48
|
}, {
|
|
49
|
-
label:
|
|
50
|
-
|
|
49
|
+
label: "".concat(kapp.name, " Settings"),
|
|
50
|
+
to: "/kapps/".concat(kapp.slug, "/settings")
|
|
51
51
|
}]
|
|
52
52
|
})) : /*#__PURE__*/React.createElement(ErrorUnauthorized, null);
|
|
53
53
|
};
|
|
@@ -3,6 +3,7 @@ import { Link, Router } from '@reach/router';
|
|
|
3
3
|
import { connect } from '../../redux/store';
|
|
4
4
|
import { compose } from 'recompose';
|
|
5
5
|
import { Card, CardCol, CardRow, ErrorUnauthorized, selectHasRoleSchedulerAdmin, selectHasRoleSchedulerManager, selectHasRoleSchedulerAgent } from '@kineticdata/bundle-common';
|
|
6
|
+
import { PageTitle } from '../shared/PageTitle';
|
|
6
7
|
import { SchedulerSettings } from './SchedulerSettings';
|
|
7
8
|
import { TechBarMetrics } from './TechBarMetrics';
|
|
8
9
|
import { TechBarSettings } from './TechBarSettings';
|
|
@@ -55,7 +56,7 @@ var SettingsCard = function SettingsCard(_ref2) {
|
|
|
55
56
|
},
|
|
56
57
|
bar: true,
|
|
57
58
|
barColor: "dark",
|
|
58
|
-
barSize: "
|
|
59
|
+
barSize: "xs"
|
|
59
60
|
}, /*#__PURE__*/React.createElement(CardCol, null, /*#__PURE__*/React.createElement(CardRow, {
|
|
60
61
|
type: "title"
|
|
61
62
|
}, /*#__PURE__*/React.createElement("span", {
|
|
@@ -66,24 +67,20 @@ var SettingsCard = function SettingsCard(_ref2) {
|
|
|
66
67
|
};
|
|
67
68
|
|
|
68
69
|
var SettingsNavigationComponent = function SettingsNavigationComponent(_ref3) {
|
|
69
|
-
var
|
|
70
|
+
var kapp = _ref3.kapp,
|
|
71
|
+
hasManagerAccess = _ref3.hasManagerAccess;
|
|
70
72
|
return /*#__PURE__*/React.createElement("div", {
|
|
71
73
|
className: "page-container"
|
|
72
74
|
}, /*#__PURE__*/React.createElement("div", {
|
|
73
|
-
className: "page-panel
|
|
74
|
-
}, /*#__PURE__*/React.createElement(
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}, /*#__PURE__*/React.createElement(Link, {
|
|
83
|
-
to: "../"
|
|
84
|
-
}, /*#__PURE__*/React.createElement(I18n, null, "tech bar"))), ' ', /*#__PURE__*/React.createElement("span", {
|
|
85
|
-
"aria-hidden": "true"
|
|
86
|
-
}, "/ "), /*#__PURE__*/React.createElement("h1", null, /*#__PURE__*/React.createElement(I18n, null, "Settings")))), /*#__PURE__*/React.createElement("div", {
|
|
75
|
+
className: "page-panel"
|
|
76
|
+
}, /*#__PURE__*/React.createElement(PageTitle, {
|
|
77
|
+
settings: true,
|
|
78
|
+
breadcrumbs: [{
|
|
79
|
+
label: 'Home',
|
|
80
|
+
to: '/'
|
|
81
|
+
}],
|
|
82
|
+
title: "".concat(kapp.name, " Settings")
|
|
83
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
87
84
|
className: "cards cards--seconds"
|
|
88
85
|
}, /*#__PURE__*/React.createElement(SettingsCard, {
|
|
89
86
|
name: "Metrics",
|
|
@@ -105,6 +102,7 @@ var SettingsNavigationComponent = function SettingsNavigationComponent(_ref3) {
|
|
|
105
102
|
|
|
106
103
|
var mapStateToPropsNav = function mapStateToPropsNav(state) {
|
|
107
104
|
return {
|
|
105
|
+
kapp: state.app.kapp,
|
|
108
106
|
hasManagerAccess: selectHasRoleSchedulerManager(state.app.profile) || selectHasRoleSchedulerAdmin(state.app.profile)
|
|
109
107
|
};
|
|
110
108
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { connect } from '../../redux/store';
|
|
3
3
|
import { compose, lifecycle, withHandlers, withProps, withState } from 'recompose';
|
|
4
4
|
import { Utils, selectHasRoleSchedulerAdmin } from '@kineticdata/bundle-common';
|
|
@@ -26,33 +26,24 @@ export var TechBarMetricsComponent = function TechBarMetricsComponent(_ref) {
|
|
|
26
26
|
selectedRange = _ref.selectedRange,
|
|
27
27
|
setSelectedRange = _ref.setSelectedRange,
|
|
28
28
|
selectedDate = _ref.selectedDate,
|
|
29
|
-
setSelectedDate = _ref.setSelectedDate
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
settings: true
|
|
33
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
29
|
+
setSelectedDate = _ref.setSelectedDate,
|
|
30
|
+
kapp = _ref.kapp;
|
|
31
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
34
32
|
className: "page-container"
|
|
35
33
|
}, /*#__PURE__*/React.createElement("div", {
|
|
36
|
-
className: "page-panel page-panel--
|
|
37
|
-
}, /*#__PURE__*/React.createElement(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}, "/ "), /*#__PURE__*/React.createElement("span", {
|
|
50
|
-
className: "breadcrumb-item"
|
|
51
|
-
}, /*#__PURE__*/React.createElement(Link, {
|
|
52
|
-
to: "../".concat(mode ? '../' : '')
|
|
53
|
-
}, /*#__PURE__*/React.createElement(I18n, null, "settings"))), ' ', /*#__PURE__*/React.createElement("span", {
|
|
54
|
-
"aria-hidden": "true"
|
|
55
|
-
}, "/ "), /*#__PURE__*/React.createElement("h1", null, /*#__PURE__*/React.createElement(I18n, null, "Metrics")))), /*#__PURE__*/React.createElement("div", {
|
|
34
|
+
className: "page-panel page-panel--tech-bar-metrics"
|
|
35
|
+
}, /*#__PURE__*/React.createElement(PageTitle, {
|
|
36
|
+
parts: ['Metrics'],
|
|
37
|
+
settings: true,
|
|
38
|
+
breadcrumbs: [{
|
|
39
|
+
label: 'Home',
|
|
40
|
+
to: '/'
|
|
41
|
+
}, {
|
|
42
|
+
label: "".concat(kapp.name, " Settings"),
|
|
43
|
+
to: "../".concat(mode ? '..' : '')
|
|
44
|
+
}],
|
|
45
|
+
title: "Metrics"
|
|
46
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
56
47
|
className: "form p-0"
|
|
57
48
|
}, /*#__PURE__*/React.createElement("div", {
|
|
58
49
|
className: "row"
|
|
@@ -226,7 +217,7 @@ export var TechBarMetricsComponent = function TechBarMetricsComponent(_ref) {
|
|
|
226
217
|
schedulerId: schedulerId,
|
|
227
218
|
eventType: eventType,
|
|
228
219
|
techBars: techBars
|
|
229
|
-
})))))
|
|
220
|
+
})))));
|
|
230
221
|
};
|
|
231
222
|
|
|
232
223
|
var fillDateArray = function fillDateArray(start, length, interval, format) {
|
|
@@ -302,7 +293,7 @@ export var TechBarMetrics = compose(connect(mapStateToProps, mapDispatchToProps)
|
|
|
302
293
|
var schedulerId = _ref4.schedulerId,
|
|
303
294
|
metrics = _ref4.metrics;
|
|
304
295
|
return {
|
|
305
|
-
eventTypes: schedulerId && metrics.size > 0 ? metrics.getIn([0, 'data', 'eventTypes']).map(function (event) {
|
|
296
|
+
eventTypes: schedulerId && metrics && metrics.size > 0 ? metrics.getIn([0, 'data', 'eventTypes']).map(function (event) {
|
|
306
297
|
return event.type;
|
|
307
298
|
}) : []
|
|
308
299
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { connect } from '../../redux/store';
|
|
3
3
|
import { compose, lifecycle } from 'recompose';
|
|
4
4
|
import { selectCurrentKapp, Utils, selectHasRoleSchedulerAdmin } from '@kineticdata/bundle-common';
|
|
@@ -12,32 +12,23 @@ var getStatusColor = function getStatusColor(status) {
|
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
export var TechBarSettingsComponent = function TechBarSettingsComponent(_ref) {
|
|
15
|
-
var
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
15
|
+
var kapp = _ref.kapp,
|
|
16
|
+
techBars = _ref.techBars;
|
|
17
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
19
18
|
className: "page-container"
|
|
20
19
|
}, /*#__PURE__*/React.createElement("div", {
|
|
21
|
-
className: "page-panel
|
|
22
|
-
}, /*#__PURE__*/React.createElement(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
"aria-hidden": "true"
|
|
34
|
-
}, "/ "), /*#__PURE__*/React.createElement("span", {
|
|
35
|
-
className: "breadcrumb-item"
|
|
36
|
-
}, /*#__PURE__*/React.createElement(Link, {
|
|
37
|
-
to: "../"
|
|
38
|
-
}, /*#__PURE__*/React.createElement(I18n, null, "settings"))), ' ', /*#__PURE__*/React.createElement("span", {
|
|
39
|
-
"aria-hidden": "true"
|
|
40
|
-
}, "/ "), /*#__PURE__*/React.createElement("h1", null, /*#__PURE__*/React.createElement(I18n, null, "Tech Bars")))), /*#__PURE__*/React.createElement("div", {
|
|
20
|
+
className: "page-panel"
|
|
21
|
+
}, /*#__PURE__*/React.createElement(PageTitle, {
|
|
22
|
+
settings: true,
|
|
23
|
+
breadcrumbs: [{
|
|
24
|
+
label: 'Home',
|
|
25
|
+
to: '/'
|
|
26
|
+
}, {
|
|
27
|
+
label: "".concat(kapp.name, " Settings"),
|
|
28
|
+
to: '..'
|
|
29
|
+
}],
|
|
30
|
+
title: "Tech Bars"
|
|
31
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
41
32
|
className: "list-wrapper"
|
|
42
33
|
}, techBars.size > 0 && /*#__PURE__*/React.createElement("table", {
|
|
43
34
|
className: "table table-sm table-striped table-schedulers table--settings"
|
|
@@ -59,7 +50,7 @@ export var TechBarSettingsComponent = function TechBarSettingsComponent(_ref) {
|
|
|
59
50
|
}, /*#__PURE__*/React.createElement(I18n, null, scheduler.values['Status']))), /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement(I18n, null, scheduler.values['Location'])));
|
|
60
51
|
}))), techBars.size === 0 && /*#__PURE__*/React.createElement("div", {
|
|
61
52
|
className: "empty-state"
|
|
62
|
-
}, /*#__PURE__*/React.createElement("h5", null, /*#__PURE__*/React.createElement(I18n, null, "No Tech Bars Found"))))))
|
|
53
|
+
}, /*#__PURE__*/React.createElement("h5", null, /*#__PURE__*/React.createElement(I18n, null, "No Tech Bars Found"))))));
|
|
63
54
|
};
|
|
64
55
|
export var mapStateToProps = function mapStateToProps(state, props) {
|
|
65
56
|
var techBars = selectHasRoleSchedulerAdmin(state.app.profile) ? state.techBarApp.schedulers : state.techBarApp.schedulers.filter(function (s) {
|
|
@@ -251,8 +251,8 @@ export var downloadFile = function downloadFile(_ref3) {
|
|
|
251
251
|
submissionValues[field.name] = null;
|
|
252
252
|
} // Checkbox Array values must be stringifyed to retain their array brackets.
|
|
253
253
|
else if (Array.isArray(submissionValues[field.name])) {
|
|
254
|
-
|
|
255
|
-
|
|
254
|
+
submissionValues[field.name] = JSON.stringify(submissionValues[field.name]);
|
|
255
|
+
}
|
|
256
256
|
});
|
|
257
257
|
csv.push(_objectSpread({
|
|
258
258
|
'Property: id': submission.id,
|
|
@@ -950,10 +950,10 @@ var buildTrend = function buildTrend(_ref9) {
|
|
|
950
950
|
setSelectedDuration(trend.durations.options[0]);
|
|
951
951
|
} // If selectedDuration value is no longer valid, clear the value
|
|
952
952
|
else if (selectedDuration && !trend.durations.options.find(function (o) {
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
953
|
+
return o.value === selectedDuration.value;
|
|
954
|
+
})) {
|
|
955
|
+
setSelectedDuration(null);
|
|
956
|
+
}
|
|
957
957
|
|
|
958
958
|
setTrend(trend);
|
|
959
959
|
};
|
|
@@ -1,59 +1,42 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { connect } from '../../../redux/store';
|
|
3
3
|
import { compose } from 'recompose';
|
|
4
4
|
import { Utils, ErrorNotFound, selectHasRoleSchedulerAdmin } from '@kineticdata/bundle-common';
|
|
5
5
|
import { PageTitle } from '../../shared/PageTitle';
|
|
6
|
-
import { Link } from '@reach/router';
|
|
7
6
|
import { CoreForm, I18n } from '@kineticdata/react';
|
|
8
7
|
export var AppointmentFormComponent = function AppointmentFormComponent(_ref) {
|
|
9
8
|
var id = _ref.id,
|
|
10
9
|
kapp = _ref.kapp,
|
|
11
10
|
techBar = _ref.techBar;
|
|
12
|
-
return
|
|
13
|
-
parts: ['Appointment Details', techBar.values['Name']],
|
|
14
|
-
settings: true
|
|
15
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
11
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
16
12
|
className: "page-container"
|
|
17
13
|
}, /*#__PURE__*/React.createElement("div", {
|
|
18
|
-
className: "page-panel
|
|
19
|
-
}, /*#__PURE__*/React.createElement(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}, "/ "), /*#__PURE__*/React.createElement("span", {
|
|
38
|
-
className: "breadcrumb-item"
|
|
39
|
-
}, /*#__PURE__*/React.createElement(Link, {
|
|
40
|
-
to: "../../../"
|
|
41
|
-
}, /*#__PURE__*/React.createElement(I18n, null, "tech bars"))), ' ', /*#__PURE__*/React.createElement("span", {
|
|
42
|
-
"aria-hidden": "true"
|
|
43
|
-
}, "/ "), /*#__PURE__*/React.createElement("span", {
|
|
44
|
-
className: "breadcrumb-item"
|
|
45
|
-
}, /*#__PURE__*/React.createElement(Link, {
|
|
46
|
-
to: "../../"
|
|
47
|
-
}, /*#__PURE__*/React.createElement(I18n, null, techBar.values['Name']))), ' ', /*#__PURE__*/React.createElement("span", {
|
|
48
|
-
"aria-hidden": "true"
|
|
49
|
-
}, "/ "), /*#__PURE__*/React.createElement("h1", null, /*#__PURE__*/React.createElement(I18n, null, "Appointment Details")))), /*#__PURE__*/React.createElement("div", {
|
|
14
|
+
className: "page-panel"
|
|
15
|
+
}, /*#__PURE__*/React.createElement(PageTitle, {
|
|
16
|
+
parts: ['Appointment Details', techBar.values['Name']],
|
|
17
|
+
settings: true,
|
|
18
|
+
breadcrumbs: [{
|
|
19
|
+
label: 'Home',
|
|
20
|
+
to: '/'
|
|
21
|
+
}, {
|
|
22
|
+
label: "".concat(kapp.name, " Settings"),
|
|
23
|
+
to: '../../../..'
|
|
24
|
+
}, {
|
|
25
|
+
label: 'Tech Bars',
|
|
26
|
+
to: '../../..'
|
|
27
|
+
}, techBar && {
|
|
28
|
+
label: techBar.values['Name'],
|
|
29
|
+
to: '../..'
|
|
30
|
+
}],
|
|
31
|
+
title: "Appointment Details"
|
|
32
|
+
}), techBar ? /*#__PURE__*/React.createElement("div", {
|
|
50
33
|
className: "content-wrapper form-unstyled"
|
|
51
34
|
}, /*#__PURE__*/React.createElement(I18n, {
|
|
52
35
|
context: "kapps.".concat(kapp.slug, ".forms.appointment")
|
|
53
36
|
}, /*#__PURE__*/React.createElement(CoreForm, {
|
|
54
37
|
submission: id,
|
|
55
38
|
review: true
|
|
56
|
-
})))
|
|
39
|
+
}))) : /*#__PURE__*/React.createElement(ErrorNotFound, null)));
|
|
57
40
|
};
|
|
58
41
|
export var mapStateToProps = function mapStateToProps(state, props) {
|
|
59
42
|
var isSchedulerAdmin = selectHasRoleSchedulerAdmin(state.app.profile);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
-
import React
|
|
2
|
+
import React from 'react';
|
|
3
3
|
import { connect } from '../../../redux/store';
|
|
4
4
|
import { compose, lifecycle, withHandlers, withProps } from 'recompose';
|
|
5
5
|
import { Utils, ErrorNotFound, selectHasRoleSchedulerAdmin, Table, LoadingMessage } from '@kineticdata/bundle-common';
|
|
@@ -18,48 +18,40 @@ export var TechBarComponent = function TechBarComponent(_ref) {
|
|
|
18
18
|
handlePreviousDay = _ref.handlePreviousDay,
|
|
19
19
|
handleNextDay = _ref.handleNextDay,
|
|
20
20
|
handleToday = _ref.handleToday,
|
|
21
|
-
isToday = _ref.isToday
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
settings: true
|
|
25
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
21
|
+
isToday = _ref.isToday,
|
|
22
|
+
kapp = _ref.kapp;
|
|
23
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
26
24
|
className: "page-container"
|
|
27
25
|
}, /*#__PURE__*/React.createElement("div", {
|
|
28
|
-
className: "page-panel
|
|
29
|
-
}, /*#__PURE__*/React.createElement(
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}, /*#__PURE__*/React.createElement(Link, {
|
|
50
|
-
to: "../"
|
|
51
|
-
}, /*#__PURE__*/React.createElement(I18n, null, "tech bars"))), ' ', /*#__PURE__*/React.createElement("span", {
|
|
52
|
-
"aria-hidden": "true"
|
|
53
|
-
}, "/ "), /*#__PURE__*/React.createElement("h1", null, /*#__PURE__*/React.createElement(I18n, null, techBar.values['Name']))), hasManagerAccess && /*#__PURE__*/React.createElement(Link, {
|
|
54
|
-
to: "edit",
|
|
55
|
-
className: "btn btn-primary"
|
|
56
|
-
}, /*#__PURE__*/React.createElement(I18n, null, "Edit Settings"))), /*#__PURE__*/React.createElement("div", {
|
|
26
|
+
className: "page-panel"
|
|
27
|
+
}, /*#__PURE__*/React.createElement(PageTitle, {
|
|
28
|
+
parts: [techBar && techBar.values['Name']],
|
|
29
|
+
settings: true,
|
|
30
|
+
breadcrumbs: [{
|
|
31
|
+
label: 'Home',
|
|
32
|
+
to: '/'
|
|
33
|
+
}, {
|
|
34
|
+
label: "".concat(kapp.name, " Settings"),
|
|
35
|
+
to: '../..'
|
|
36
|
+
}, {
|
|
37
|
+
label: 'Tech Bars',
|
|
38
|
+
to: '..'
|
|
39
|
+
}],
|
|
40
|
+
title: techBar && techBar.values['Name'],
|
|
41
|
+
actions: [techBar && hasManagerAccess && {
|
|
42
|
+
label: 'Edit Settings',
|
|
43
|
+
icon: 'pencil',
|
|
44
|
+
to: 'edit'
|
|
45
|
+
}]
|
|
46
|
+
}), techBar ? /*#__PURE__*/React.createElement("div", {
|
|
57
47
|
className: "content-wrapper"
|
|
58
48
|
}, /*#__PURE__*/React.createElement("div", {
|
|
59
|
-
className: "form"
|
|
49
|
+
className: "form form-unstyled mb-5"
|
|
60
50
|
}, /*#__PURE__*/React.createElement("h2", {
|
|
61
51
|
className: "section__title"
|
|
62
|
-
}, /*#__PURE__*/React.createElement(
|
|
52
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
53
|
+
className: "title"
|
|
54
|
+
}, /*#__PURE__*/React.createElement(I18n, null, "General Settings"))), /*#__PURE__*/React.createElement("div", {
|
|
63
55
|
className: "form-group"
|
|
64
56
|
}, /*#__PURE__*/React.createElement("label", null, /*#__PURE__*/React.createElement(I18n, null, "Allow Walk-Ins")), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(I18n, null, techBar.settings.allowWalkIns ? 'Yes' : 'No'))), /*#__PURE__*/React.createElement("div", {
|
|
65
57
|
className: "form-group"
|
|
@@ -67,12 +59,16 @@ export var TechBarComponent = function TechBarComponent(_ref) {
|
|
|
67
59
|
className: "mb-5"
|
|
68
60
|
}, /*#__PURE__*/React.createElement("h2", {
|
|
69
61
|
className: "section__title"
|
|
70
|
-
}, /*#__PURE__*/React.createElement(
|
|
62
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
63
|
+
className: "title"
|
|
64
|
+
}, /*#__PURE__*/React.createElement(I18n, null, "Front Desk Users"))), /*#__PURE__*/React.createElement(TechBarDisplayMembers, {
|
|
71
65
|
techBar: techBar,
|
|
72
66
|
hasManagerAccess: hasManagerAccess
|
|
73
67
|
})), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("h2", {
|
|
74
68
|
className: "section__title"
|
|
75
|
-
}, /*#__PURE__*/React.createElement(
|
|
69
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
70
|
+
className: "title"
|
|
71
|
+
}, /*#__PURE__*/React.createElement(I18n, null, "Appointments"))), /*#__PURE__*/React.createElement("div", {
|
|
76
72
|
className: "appointments-control mb-3"
|
|
77
73
|
}, /*#__PURE__*/React.createElement("div", {
|
|
78
74
|
className: "btn-group"
|
|
@@ -161,7 +157,7 @@ export var TechBarComponent = function TechBarComponent(_ref) {
|
|
|
161
157
|
className: "table-wrapper"
|
|
162
158
|
}, table);
|
|
163
159
|
}
|
|
164
|
-
}) : /*#__PURE__*/React.createElement(LoadingMessage, null)))
|
|
160
|
+
}) : /*#__PURE__*/React.createElement(LoadingMessage, null))) : /*#__PURE__*/React.createElement(ErrorNotFound, null)));
|
|
165
161
|
};
|
|
166
162
|
export var mapStateToProps = function mapStateToProps(state, props) {
|
|
167
163
|
var isSchedulerAdmin = selectHasRoleSchedulerAdmin(state.app.profile);
|
|
@@ -221,8 +217,10 @@ export var TechBar = compose(connect(mapStateToProps, mapDispatchToProps), withP
|
|
|
221
217
|
}
|
|
222
218
|
}), lifecycle({
|
|
223
219
|
componentDidMount: function componentDidMount() {
|
|
224
|
-
this.props.
|
|
225
|
-
|
|
226
|
-
|
|
220
|
+
if (this.props.techBar) {
|
|
221
|
+
this.props.fetchAppointmentsListRequest({
|
|
222
|
+
schedulerId: this.props.techBar.values['Id']
|
|
223
|
+
});
|
|
224
|
+
}
|
|
227
225
|
}
|
|
228
226
|
}))(TechBarComponent);
|
|
@@ -1,75 +1,60 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { connect } from '../../../redux/store';
|
|
3
3
|
import { compose, withHandlers } from 'recompose';
|
|
4
4
|
import { Utils, ErrorNotFound, ErrorUnauthorized, selectHasRoleSchedulerAdmin } from '@kineticdata/bundle-common';
|
|
5
5
|
import { PageTitle } from '../../shared/PageTitle';
|
|
6
|
-
import { Link } from '@reach/router';
|
|
7
6
|
import { CoreForm } from '@kineticdata/react';
|
|
8
7
|
import { actions } from '../../../redux/modules/techBarApp';
|
|
9
8
|
import { TECH_BAR_SETTINGS_FORM_SLUG } from '../../../constants';
|
|
10
9
|
import { I18n } from '@kineticdata/react';
|
|
11
10
|
export var TechBarSettingsFormComponent = function TechBarSettingsFormComponent(_ref) {
|
|
12
|
-
var
|
|
11
|
+
var kapp = _ref.kapp,
|
|
12
|
+
techBar = _ref.techBar,
|
|
13
13
|
handleSaved = _ref.handleSaved,
|
|
14
14
|
hasManagerAccess = _ref.hasManagerAccess;
|
|
15
|
-
return
|
|
16
|
-
parts: ['Settings', techBar.values['Name']],
|
|
17
|
-
settings: true
|
|
18
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
15
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
19
16
|
className: "page-container"
|
|
20
17
|
}, /*#__PURE__*/React.createElement("div", {
|
|
21
|
-
className: "page-panel
|
|
22
|
-
}, /*#__PURE__*/React.createElement(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
},
|
|
45
|
-
"aria-hidden": "true"
|
|
46
|
-
}, "/ "), /*#__PURE__*/React.createElement("span", {
|
|
47
|
-
className: "breadcrumb-item"
|
|
48
|
-
}, /*#__PURE__*/React.createElement(Link, {
|
|
49
|
-
to: "../"
|
|
50
|
-
}, /*#__PURE__*/React.createElement(I18n, null, techBar.values['Name']))), ' ', /*#__PURE__*/React.createElement("span", {
|
|
51
|
-
"aria-hidden": "true"
|
|
52
|
-
}, "/ "), /*#__PURE__*/React.createElement("h1", null, /*#__PURE__*/React.createElement(I18n, null, "Edit Settings"))), /*#__PURE__*/React.createElement(Link, {
|
|
53
|
-
to: "../",
|
|
54
|
-
className: "btn btn-secondary"
|
|
55
|
-
}, /*#__PURE__*/React.createElement(I18n, null, "Cancel Edit"))), /*#__PURE__*/React.createElement("div", {
|
|
18
|
+
className: "page-panel"
|
|
19
|
+
}, /*#__PURE__*/React.createElement(PageTitle, {
|
|
20
|
+
parts: [techBar && "".concat(techBar.values['Name'], " Settings")],
|
|
21
|
+
settings: true,
|
|
22
|
+
breadcrumbs: [{
|
|
23
|
+
label: 'Home',
|
|
24
|
+
to: '/'
|
|
25
|
+
}, {
|
|
26
|
+
label: "".concat(kapp.name, " Settings"),
|
|
27
|
+
to: '../../..'
|
|
28
|
+
}, {
|
|
29
|
+
label: 'Tech Bars',
|
|
30
|
+
to: '../..'
|
|
31
|
+
}, techBar && {
|
|
32
|
+
label: techBar.values['Name'],
|
|
33
|
+
to: '..'
|
|
34
|
+
}],
|
|
35
|
+
title: techBar && techBar.values['Name'],
|
|
36
|
+
actions: [techBar && {
|
|
37
|
+
label: 'Cancel Edit',
|
|
38
|
+
to: '..',
|
|
39
|
+
className: 'btn-outline-danger'
|
|
40
|
+
}]
|
|
41
|
+
}), techBar ? hasManagerAccess ? /*#__PURE__*/React.createElement("div", {
|
|
56
42
|
className: "content-wrapper form-unstyled"
|
|
57
43
|
}, /*#__PURE__*/React.createElement(I18n, {
|
|
58
|
-
context: "datastore.forms.".concat(TECH_BAR_SETTINGS_FORM_SLUG)
|
|
44
|
+
context: "kapps.datastore.forms.".concat(TECH_BAR_SETTINGS_FORM_SLUG)
|
|
59
45
|
}, techBar.settings.submissionId ? /*#__PURE__*/React.createElement(CoreForm, {
|
|
60
|
-
datastore: true,
|
|
61
46
|
submission: techBar.settings.submissionId,
|
|
62
47
|
created: handleSaved,
|
|
63
48
|
updated: handleSaved
|
|
64
49
|
}) : /*#__PURE__*/React.createElement(CoreForm, {
|
|
65
|
-
|
|
50
|
+
kapp: "datastore",
|
|
66
51
|
form: TECH_BAR_SETTINGS_FORM_SLUG,
|
|
67
52
|
created: handleSaved,
|
|
68
53
|
updated: handleSaved,
|
|
69
54
|
values: {
|
|
70
55
|
'Scheduler Id': techBar.values['Id']
|
|
71
56
|
}
|
|
72
|
-
})))
|
|
57
|
+
}))) : /*#__PURE__*/React.createElement(ErrorUnauthorized, null) : /*#__PURE__*/React.createElement(ErrorNotFound, null)));
|
|
73
58
|
};
|
|
74
59
|
export var mapStateToProps = function mapStateToProps(state, props) {
|
|
75
60
|
var isSchedulerAdmin = selectHasRoleSchedulerAdmin(state.app.profile);
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Link } from '@reach/router';
|
|
2
4
|
import { connect } from '../../redux/store';
|
|
3
5
|
import { compose, withProps } from 'recompose';
|
|
4
6
|
import { PageTitle as CommonPageTitle, selectCurrentKapp } from '@kineticdata/bundle-common';
|
|
5
7
|
export var mapStateToProps = function mapStateToProps(state) {
|
|
6
8
|
return {
|
|
7
|
-
space: state.app.space,
|
|
8
9
|
kapp: selectCurrentKapp(state)
|
|
9
10
|
};
|
|
10
11
|
};
|
|
@@ -14,6 +15,12 @@ export var PageTitle = compose(connect(mapStateToProps), withProps(function (_re
|
|
|
14
15
|
props = _objectWithoutProperties(_ref, ["parts"]);
|
|
15
16
|
|
|
16
17
|
return {
|
|
17
|
-
parts: parts.concat([[props.kapp && props.kapp.name, props.settings && 'Settings'].filter(Boolean).join(' ')
|
|
18
|
+
parts: parts.concat([[props.kapp && props.kapp.name, props.settings && 'Settings'].filter(Boolean).join(' ')])
|
|
18
19
|
};
|
|
19
|
-
}))(
|
|
20
|
+
}))(function (props) {
|
|
21
|
+
return /*#__PURE__*/React.createElement(CommonPageTitle, Object.assign({}, props, {
|
|
22
|
+
components: {
|
|
23
|
+
Link: Link
|
|
24
|
+
}
|
|
25
|
+
}));
|
|
26
|
+
});
|