@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
|
@@ -233,24 +233,49 @@
|
|
|
233
233
|
margin: 0;
|
|
234
234
|
padding: 0 0 0 5rem;
|
|
235
235
|
list-style-type: none;
|
|
236
|
-
counter-reset:
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
236
|
+
counter-reset: overhead-counter;
|
|
237
|
+
|
|
238
|
+
&--short {
|
|
239
|
+
li {
|
|
240
|
+
font-size: 2.4rem;
|
|
241
|
+
line-height: 3rem;
|
|
242
|
+
position: relative;
|
|
243
|
+
&:before {
|
|
244
|
+
content: counter(overhead-counter);
|
|
245
|
+
counter-increment: overhead-counter;
|
|
246
|
+
position: absolute;
|
|
247
|
+
left: -3rem;
|
|
248
|
+
top: 0;
|
|
249
|
+
color: $gray50;
|
|
250
|
+
font-size: 3rem;
|
|
251
|
+
font-weight: bold;
|
|
252
|
+
}
|
|
253
|
+
small {
|
|
254
|
+
color: $gray50;
|
|
255
|
+
white-space: nowrap;
|
|
256
|
+
}
|
|
250
257
|
}
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
&--long {
|
|
261
|
+
li {
|
|
262
|
+
font-size: 2.4rem;
|
|
263
|
+
line-height: 3rem;
|
|
264
|
+
position: relative;
|
|
265
|
+
&:before {
|
|
266
|
+
content: counter(overhead-counter);
|
|
267
|
+
counter-increment: overhead-counter;
|
|
268
|
+
position: absolute;
|
|
269
|
+
left: -4.5rem;
|
|
270
|
+
top: 0;
|
|
271
|
+
color: $gray50;
|
|
272
|
+
font-size: 3rem;
|
|
273
|
+
font-weight: bold;
|
|
274
|
+
}
|
|
275
|
+
small {
|
|
276
|
+
color: $gray50;
|
|
277
|
+
white-space: nowrap;
|
|
278
|
+
}
|
|
254
279
|
}
|
|
255
280
|
}
|
|
256
281
|
}
|
package/lib/App.js
CHANGED
|
@@ -2,10 +2,9 @@ import React from 'react';
|
|
|
2
2
|
import { Router } from '@reach/router';
|
|
3
3
|
import { compose, lifecycle } from 'recompose';
|
|
4
4
|
import { connect } from './redux/store';
|
|
5
|
-
import {
|
|
5
|
+
import { ErrorMessage, LoadingMessage } from '@kineticdata/bundle-common';
|
|
6
6
|
import { I18n } from '@kineticdata/react';
|
|
7
7
|
import { PageTitle } from './components/shared/PageTitle';
|
|
8
|
-
import { Sidebar } from './components/Sidebar';
|
|
9
8
|
import { Home } from './components/Home';
|
|
10
9
|
import { Past } from './components/Past';
|
|
11
10
|
import { TechBars } from './components/TechBars';
|
|
@@ -13,61 +12,45 @@ import { Display } from './components/Display';
|
|
|
13
12
|
import { Form } from './components/Form';
|
|
14
13
|
import { AppointmentForm } from './components/AppointmentForm';
|
|
15
14
|
import { Settings } from './components/settings/Settings';
|
|
16
|
-
import { Sidebar as SettingsSidebar } from './components/settings/Sidebar';
|
|
17
15
|
import { actions } from './redux/modules/techBarApp';
|
|
18
16
|
|
|
19
17
|
var AppComponent = function AppComponent(props) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}), /*#__PURE__*/React.createElement(AppointmentForm, {
|
|
57
|
-
path: "/appointment/:id"
|
|
58
|
-
}), /*#__PURE__*/React.createElement(AppointmentForm, {
|
|
59
|
-
path: "/appointment"
|
|
60
|
-
}), /*#__PURE__*/React.createElement(Form, {
|
|
61
|
-
path: "/forms/:formSlug/submissions/:id"
|
|
62
|
-
}), /*#__PURE__*/React.createElement(Form, {
|
|
63
|
-
path: "/forms/:formSlug"
|
|
64
|
-
}), /*#__PURE__*/React.createElement(Display, {
|
|
65
|
-
path: "/display/:techBarId/:mode"
|
|
66
|
-
}), /*#__PURE__*/React.createElement(Display, {
|
|
67
|
-
path: "/display/:techBarId"
|
|
68
|
-
}))))
|
|
69
|
-
});
|
|
70
|
-
}
|
|
18
|
+
return props.render({
|
|
19
|
+
main: props.error ? /*#__PURE__*/React.createElement(ErrorMessage, {
|
|
20
|
+
title: "Unexpected Error",
|
|
21
|
+
message: "Sorry, an unexpected error has occurred!"
|
|
22
|
+
}) : props.loading ? /*#__PURE__*/React.createElement(LoadingMessage, null) : /*#__PURE__*/React.createElement(I18n, null, /*#__PURE__*/React.createElement("main", {
|
|
23
|
+
className: "package-layout package-layout--tech-bar"
|
|
24
|
+
}, /*#__PURE__*/React.createElement(PageTitle, {
|
|
25
|
+
parts: ['Loading...']
|
|
26
|
+
}), /*#__PURE__*/React.createElement(Router, null, /*#__PURE__*/React.createElement(Settings, {
|
|
27
|
+
path: "settings/*"
|
|
28
|
+
}), /*#__PURE__*/React.createElement(Home, {
|
|
29
|
+
path: "/"
|
|
30
|
+
}), /*#__PURE__*/React.createElement(TechBars, {
|
|
31
|
+
path: "/tech-bars"
|
|
32
|
+
}), /*#__PURE__*/React.createElement(AppointmentForm, {
|
|
33
|
+
path: "/past/appointment/:techBarId/:id"
|
|
34
|
+
}), /*#__PURE__*/React.createElement(Past, {
|
|
35
|
+
path: "/past"
|
|
36
|
+
}), /*#__PURE__*/React.createElement(AppointmentForm, {
|
|
37
|
+
path: "/appointment/:techBarId/:id"
|
|
38
|
+
}), /*#__PURE__*/React.createElement(AppointmentForm, {
|
|
39
|
+
path: "/appointment/:techBarId"
|
|
40
|
+
}), /*#__PURE__*/React.createElement(AppointmentForm, {
|
|
41
|
+
path: "/appointment/:id"
|
|
42
|
+
}), /*#__PURE__*/React.createElement(AppointmentForm, {
|
|
43
|
+
path: "/appointment"
|
|
44
|
+
}), /*#__PURE__*/React.createElement(Form, {
|
|
45
|
+
path: "/forms/:formSlug/submissions/:id"
|
|
46
|
+
}), /*#__PURE__*/React.createElement(Form, {
|
|
47
|
+
path: "/forms/:formSlug"
|
|
48
|
+
}), /*#__PURE__*/React.createElement(Display, {
|
|
49
|
+
path: "/display/:techBarId/:mode"
|
|
50
|
+
}), /*#__PURE__*/React.createElement(Display, {
|
|
51
|
+
path: "/display/:techBarId"
|
|
52
|
+
}))))
|
|
53
|
+
});
|
|
71
54
|
};
|
|
72
55
|
|
|
73
56
|
var mapStateToProps = function mapStateToProps(state, props) {
|
|
@@ -1,8 +1,7 @@
|
|
|
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 { CoreForm, I18n } from '@kineticdata/react';
|
|
5
|
-
import { Link } from '@reach/router';
|
|
6
5
|
import { ErrorNotFound, ErrorUnauthorized, ErrorUnexpected } from '@kineticdata/bundle-common';
|
|
7
6
|
import { PageTitle } from './shared/PageTitle';
|
|
8
7
|
import { APPOINTMENT_FORM_SLUG } from '../constants';
|
|
@@ -17,25 +16,24 @@ export var AppointmentFormComponent = function AppointmentFormComponent(_ref) {
|
|
|
17
16
|
handleLoaded = _ref.handleLoaded,
|
|
18
17
|
handleDelete = _ref.handleDelete,
|
|
19
18
|
kappSlug = _ref.kappSlug;
|
|
20
|
-
return /*#__PURE__*/React.createElement(
|
|
21
|
-
|
|
22
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
23
|
-
className: "page-container page-container--tech-bar container"
|
|
19
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
20
|
+
className: "page-container page-container--tech-bar page-container-lg"
|
|
24
21
|
}, /*#__PURE__*/React.createElement("div", {
|
|
25
22
|
className: "page-panel"
|
|
26
|
-
},
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
23
|
+
}, /*#__PURE__*/React.createElement(PageTitle, {
|
|
24
|
+
parts: ['Appointment'],
|
|
25
|
+
breadcrumbs: [{
|
|
26
|
+
label: 'Home',
|
|
27
|
+
to: '/'
|
|
28
|
+
}, {
|
|
29
|
+
label: 'Tech Bar',
|
|
30
|
+
to: relativeHomePath
|
|
31
|
+
}, past && {
|
|
32
|
+
label: 'Past Appointments',
|
|
33
|
+
to: "".concat(relativeHomePath, "past")
|
|
34
|
+
}],
|
|
35
|
+
title: techBar && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(I18n, null, techBar.values['Name']), ' ', /*#__PURE__*/React.createElement("small", null, /*#__PURE__*/React.createElement(I18n, null, "Appointment")))
|
|
36
|
+
}), techBar ? /*#__PURE__*/React.createElement(I18n, {
|
|
39
37
|
context: "kapps.".concat(kappSlug, ".forms.").concat(APPOINTMENT_FORM_SLUG)
|
|
40
38
|
}, /*#__PURE__*/React.createElement("div", {
|
|
41
39
|
className: "embedded-core-form--wrapper"
|
|
@@ -56,7 +54,7 @@ export var AppointmentFormComponent = function AppointmentFormComponent(_ref) {
|
|
|
56
54
|
notFoundComponent: ErrorNotFound,
|
|
57
55
|
unauthorizedComponent: ErrorUnauthorized,
|
|
58
56
|
unexpectedErrorComponent: ErrorUnexpected
|
|
59
|
-
})))
|
|
57
|
+
}))) : /*#__PURE__*/React.createElement(ErrorNotFound, null)));
|
|
60
58
|
};
|
|
61
59
|
export var handleCompleted = function handleCompleted(props) {
|
|
62
60
|
return function (response) {
|
package/lib/components/Form.js
CHANGED
|
@@ -7,7 +7,6 @@ import { compose, withHandlers, withProps } from 'recompose';
|
|
|
7
7
|
import { CoreForm } from '@kineticdata/react';
|
|
8
8
|
import { ErrorNotFound, ErrorUnauthorized, ErrorUnexpected } from '@kineticdata/bundle-common';
|
|
9
9
|
import { PageTitle } from './shared/PageTitle';
|
|
10
|
-
import { Link } from '@reach/router';
|
|
11
10
|
import { parse } from 'query-string';
|
|
12
11
|
import { I18n } from '@kineticdata/react';
|
|
13
12
|
export var FormComponent = function FormComponent(_ref) {
|
|
@@ -21,25 +20,21 @@ export var FormComponent = function FormComponent(_ref) {
|
|
|
21
20
|
handleDelete = _ref.handleDelete,
|
|
22
21
|
values = _ref.values,
|
|
23
22
|
kappSlug = _ref.kappSlug;
|
|
24
|
-
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(
|
|
25
|
-
|
|
26
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
27
|
-
className: "page-container page-container--tech-bar container"
|
|
23
|
+
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
24
|
+
className: "page-container page-container--tech-bar page-container-lg"
|
|
28
25
|
}, /*#__PURE__*/React.createElement("div", {
|
|
29
26
|
className: "page-panel"
|
|
30
|
-
}, /*#__PURE__*/React.createElement(
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
context: "kapps.".concat(kappSlug, ".forms.").concat(formSlug)
|
|
42
|
-
}, form.name)))), /*#__PURE__*/React.createElement("div", {
|
|
27
|
+
}, /*#__PURE__*/React.createElement(PageTitle, {
|
|
28
|
+
parts: [form ? form.name : ''],
|
|
29
|
+
breadcrumbs: [{
|
|
30
|
+
label: 'Home',
|
|
31
|
+
to: '/'
|
|
32
|
+
}, {
|
|
33
|
+
label: 'Tech Bar',
|
|
34
|
+
to: relativeHomePath
|
|
35
|
+
}],
|
|
36
|
+
title: form && form.name
|
|
37
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
43
38
|
className: "form-description"
|
|
44
39
|
}, form && form.description && /*#__PURE__*/React.createElement("p", null, /*#__PURE__*/React.createElement(I18n, {
|
|
45
40
|
context: "kapps.".concat(kappSlug, ".forms.").concat(formSlug)
|
package/lib/components/Home.js
CHANGED
|
@@ -29,33 +29,26 @@ export var HomeComponent = function HomeComponent(_ref) {
|
|
|
29
29
|
hasTechBarDisplayRole = _ref.hasTechBarDisplayRole,
|
|
30
30
|
waitingUsers = _ref.waitingUsers;
|
|
31
31
|
var selectedTechBar = currentTechBar || techBars.get(0);
|
|
32
|
-
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(
|
|
33
|
-
className: "page-container"
|
|
32
|
+
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
33
|
+
className: "page-container page-container--lg"
|
|
34
34
|
}, /*#__PURE__*/React.createElement("div", {
|
|
35
35
|
className: "page-panel"
|
|
36
|
-
}, /*#__PURE__*/React.createElement(
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
46
|
-
className: "hero-welcome"
|
|
47
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
48
|
-
className: "title"
|
|
49
|
-
}, /*#__PURE__*/React.createElement(I18n, null, "Welcome to"), ' ', /*#__PURE__*/React.createElement(I18n, null, selectedTechBar ? selectedTechBar.values['Name'] : kapp ? kapp.name : 'Tech Bar')), /*#__PURE__*/React.createElement("div", {
|
|
50
|
-
className: "subtitle"
|
|
51
|
-
}, selectedTechBar ? /*#__PURE__*/React.createElement(I18n, null, selectedTechBar.values['Description']) : /*#__PURE__*/React.createElement(I18n, null, "We deliver in-person service that gets people back on track."))), selectedTechBar && /*#__PURE__*/React.createElement("div", {
|
|
52
|
-
className: "hero-card"
|
|
36
|
+
}, /*#__PURE__*/React.createElement(PageTitle, {
|
|
37
|
+
hero: true,
|
|
38
|
+
image: true,
|
|
39
|
+
heroImage: heroImage,
|
|
40
|
+
overlayColor: "rgba(0,0,0,0.6)",
|
|
41
|
+
center: true,
|
|
42
|
+
title: "Welcome to ".concat(selectedTechBar ? selectedTechBar.values['Name'] : kapp ? kapp.name : 'Tech Bar'),
|
|
43
|
+
subtitle: selectedTechBar ? selectedTechBar.values['Description'] : 'We deliver in-person service that gets people back on track.',
|
|
44
|
+
withCard: true
|
|
53
45
|
}, /*#__PURE__*/React.createElement(Card, {
|
|
54
46
|
bar: true,
|
|
47
|
+
barColor: "warning",
|
|
55
48
|
barSize: "xs"
|
|
56
|
-
}, /*#__PURE__*/React.createElement(
|
|
57
|
-
className: "
|
|
58
|
-
}, /*#__PURE__*/React.createElement(CardRow, {
|
|
49
|
+
}, /*#__PURE__*/React.createElement(CardCol, {
|
|
50
|
+
className: "overflow-auto"
|
|
51
|
+
}, /*#__PURE__*/React.createElement(CardRow, null, /*#__PURE__*/React.createElement(CardRow, {
|
|
59
52
|
type: "prepend"
|
|
60
53
|
}, /*#__PURE__*/React.createElement("span", {
|
|
61
54
|
className: "fa fa-map-marker fa-3x"
|
|
@@ -67,25 +60,24 @@ export var HomeComponent = function HomeComponent(_ref) {
|
|
|
67
60
|
}, /*#__PURE__*/React.createElement(I18n, null, "Change"))), selectedTechBar.values['Location'] && /*#__PURE__*/React.createElement(CardRow, {
|
|
68
61
|
type: "meta",
|
|
69
62
|
className: "text-muted p-0"
|
|
70
|
-
}, /*#__PURE__*/React.createElement(I18n, null, selectedTechBar.values['Location'])), /*#__PURE__*/React.createElement(CardRow, {
|
|
63
|
+
}, /*#__PURE__*/React.createElement(I18n, null, selectedTechBar.values['Location'])))), /*#__PURE__*/React.createElement(CardRow, {
|
|
71
64
|
type: "meta",
|
|
72
|
-
className: "flex-
|
|
73
|
-
}, selectedTechBar.values['Details'] && /*#__PURE__*/React.createElement("p", null, /*#__PURE__*/React.createElement(I18n, null, selectedTechBar.values['Details'])))
|
|
74
|
-
className: "
|
|
65
|
+
className: "flex-grow-1 flex-shrink-1 overflow-auto my-2"
|
|
66
|
+
}, selectedTechBar.values['Details'] && /*#__PURE__*/React.createElement("p", null, /*#__PURE__*/React.createElement(I18n, null, selectedTechBar.values['Details']))), /*#__PURE__*/React.createElement(CardCol, {
|
|
67
|
+
className: "flex-grow-0 flex-shrink-0"
|
|
75
68
|
}, /*#__PURE__*/React.createElement(CardRow, null, /*#__PURE__*/React.createElement(Link, {
|
|
76
69
|
to: "appointment/".concat(selectedTechBar.values['Id']),
|
|
77
70
|
className: "btn btn-primary flex-grow-1"
|
|
78
71
|
}, /*#__PURE__*/React.createElement(I18n, null, "Schedule Now"), " \u2192")), /*#__PURE__*/React.createElement(CardRow, {
|
|
72
|
+
type: "meta",
|
|
79
73
|
className: "pt-0"
|
|
80
|
-
}, /*#__PURE__*/React.createElement("
|
|
81
|
-
className: "
|
|
82
|
-
}, /*#__PURE__*/React.createElement(I18n, null, "Currently awaiting assistance"), ":",
|
|
74
|
+
}, /*#__PURE__*/React.createElement("em", {
|
|
75
|
+
className: "text-muted ".concat(waitingUsers === 0 ? '' : '')
|
|
76
|
+
}, /*#__PURE__*/React.createElement(I18n, null, "Currently awaiting assistance"), ": ", waitingUsers, ' ', /*#__PURE__*/React.createElement(I18n, {
|
|
83
77
|
render: function render(translate) {
|
|
84
78
|
return waitingUsers === 1 ? translate('person') : translate('people');
|
|
85
79
|
}
|
|
86
|
-
})))))))
|
|
87
|
-
className: "page-panel__body container"
|
|
88
|
-
}, /*#__PURE__*/React.createElement("section", {
|
|
80
|
+
}))))))), /*#__PURE__*/React.createElement("section", {
|
|
89
81
|
className: "mt-4"
|
|
90
82
|
}, selectedTechBar ? /*#__PURE__*/React.createElement("div", {
|
|
91
83
|
className: "info-tile__wrapper"
|
|
@@ -150,7 +142,9 @@ export var HomeComponent = function HomeComponent(_ref) {
|
|
|
150
142
|
className: "mt-4"
|
|
151
143
|
}, /*#__PURE__*/React.createElement("h2", {
|
|
152
144
|
className: "section__title"
|
|
153
|
-
}, /*#__PURE__*/React.createElement(
|
|
145
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
146
|
+
className: "title"
|
|
147
|
+
}, /*#__PURE__*/React.createElement(I18n, null, "Upcoming Appointments"))), /*#__PURE__*/React.createElement(StateListWrapper, {
|
|
154
148
|
data: upcomingAppointments,
|
|
155
149
|
error: error,
|
|
156
150
|
emptyTitle: "You have no upcoming appointments.",
|
|
@@ -200,10 +194,10 @@ export var HomeComponent = function HomeComponent(_ref) {
|
|
|
200
194
|
}, appt.values['Summary']))), /*#__PURE__*/React.createElement(CardRow, {
|
|
201
195
|
type: "append"
|
|
202
196
|
}, /*#__PURE__*/React.createElement("span", {
|
|
203
|
-
className: "badge badge-
|
|
197
|
+
className: "badge badge-stylized badge-".concat(appt.coreState === 'Closed' ? 'dark' : 'success')
|
|
204
198
|
}, /*#__PURE__*/React.createElement(I18n, null, appt.values['Status'])))));
|
|
205
199
|
}));
|
|
206
|
-
}))))
|
|
200
|
+
})))), modalOpen && /*#__PURE__*/React.createElement(Modal, {
|
|
207
201
|
isOpen: !!modalOpen,
|
|
208
202
|
toggle: function toggle() {
|
|
209
203
|
return setModalOpen(false);
|
|
@@ -9,6 +9,12 @@ import { List } from 'immutable';
|
|
|
9
9
|
export var OverheadComponent = function OverheadComponent(_ref) {
|
|
10
10
|
var errors = _ref.errors,
|
|
11
11
|
records = _ref.records;
|
|
12
|
+
var checkedIn = records && records.filter(function (r) {
|
|
13
|
+
return r.status === 'Checked In';
|
|
14
|
+
});
|
|
15
|
+
var inProgress = records && records.filter(function (r) {
|
|
16
|
+
return r.status === 'In Progress';
|
|
17
|
+
});
|
|
12
18
|
return /*#__PURE__*/React.createElement("section", {
|
|
13
19
|
className: "tech-bar-display tech-bar-display--overhead"
|
|
14
20
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -22,10 +28,8 @@ export var OverheadComponent = function OverheadComponent(_ref) {
|
|
|
22
28
|
}, /*#__PURE__*/React.createElement("h1", null, errors.length > 0 && /*#__PURE__*/React.createElement("span", {
|
|
23
29
|
className: "fa fa-fw fa-exclamation-triangle text-danger mr-2"
|
|
24
30
|
}), /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(I18n, null, "Checked In"))), /*#__PURE__*/React.createElement("ol", {
|
|
25
|
-
className: "overhead-display-list"
|
|
26
|
-
},
|
|
27
|
-
return r.status === 'Checked In';
|
|
28
|
-
}).map(function (r) {
|
|
31
|
+
className: "overhead-display-list ".concat(checkedIn.size < 10 ? 'overhead-display-list--short' : 'overhead-display-list--long')
|
|
32
|
+
}, checkedIn.map(function (r) {
|
|
29
33
|
return /*#__PURE__*/React.createElement("li", {
|
|
30
34
|
key: r.id
|
|
31
35
|
}, r.displayName, ' ', r.isWalkIn ? /*#__PURE__*/React.createElement("small", null, /*#__PURE__*/React.createElement(I18n, {
|
|
@@ -41,10 +45,8 @@ export var OverheadComponent = function OverheadComponent(_ref) {
|
|
|
41
45
|
}, /*#__PURE__*/React.createElement("h1", null, errors.length > 0 && /*#__PURE__*/React.createElement("span", {
|
|
42
46
|
className: "fa fa-fw fa-exclamation-triangle text-danger mr-2"
|
|
43
47
|
}), /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(I18n, null, "Now Serving"))), /*#__PURE__*/React.createElement("ol", {
|
|
44
|
-
className: "overhead-display-list"
|
|
45
|
-
},
|
|
46
|
-
return r.status === 'In Progress';
|
|
47
|
-
}).map(function (r) {
|
|
48
|
+
className: "overhead-display-list ".concat(inProgress.size < 10 ? 'overhead-display-list--short' : 'overhead-display-list--long')
|
|
49
|
+
}, inProgress.map(function (r) {
|
|
48
50
|
return /*#__PURE__*/React.createElement("li", {
|
|
49
51
|
key: r.id
|
|
50
52
|
}, r.displayName, ' ', r.isWalkIn ? /*#__PURE__*/React.createElement("small", null, /*#__PURE__*/React.createElement(I18n, {
|
package/lib/components/Past.js
CHANGED
|
@@ -12,23 +12,21 @@ export var PastComponent = function PastComponent(_ref) {
|
|
|
12
12
|
var techBars = _ref.techBars,
|
|
13
13
|
error = _ref.error,
|
|
14
14
|
pastAppointments = _ref.pastAppointments;
|
|
15
|
-
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(
|
|
16
|
-
|
|
17
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
18
|
-
className: "page-container page-container--tech-bar container"
|
|
15
|
+
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
16
|
+
className: "page-container page-container--tech-bar page-container--lg"
|
|
19
17
|
}, /*#__PURE__*/React.createElement("div", {
|
|
20
18
|
className: "page-panel"
|
|
21
|
-
}, /*#__PURE__*/React.createElement(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
19
|
+
}, /*#__PURE__*/React.createElement(PageTitle, {
|
|
20
|
+
parts: ['Past Appointments'],
|
|
21
|
+
breadcrumbs: [{
|
|
22
|
+
label: 'Home',
|
|
23
|
+
to: '/'
|
|
24
|
+
}, {
|
|
25
|
+
label: 'Tech Bar',
|
|
26
|
+
to: '..'
|
|
27
|
+
}],
|
|
28
|
+
title: "Past Appointments"
|
|
29
|
+
}), /*#__PURE__*/React.createElement("section", {
|
|
32
30
|
className: "mb-4"
|
|
33
31
|
}, /*#__PURE__*/React.createElement(StateListWrapper, {
|
|
34
32
|
data: pastAppointments,
|
|
@@ -80,7 +78,7 @@ export var PastComponent = function PastComponent(_ref) {
|
|
|
80
78
|
}, appt.values['Summary']))), /*#__PURE__*/React.createElement(CardRow, {
|
|
81
79
|
type: "append"
|
|
82
80
|
}, /*#__PURE__*/React.createElement("span", {
|
|
83
|
-
className: "badge badge-
|
|
81
|
+
className: "badge badge-stylized badge-".concat(appt.coreState === 'Closed' ? 'dark' : 'success')
|
|
84
82
|
}, /*#__PURE__*/React.createElement(I18n, null, appt.values['Status'])))));
|
|
85
83
|
}));
|
|
86
84
|
})))));
|
|
@@ -16,23 +16,21 @@ export var TechBarsComponent = function TechBarsComponent(_ref) {
|
|
|
16
16
|
hasTechBarDisplayRole = _ref.hasTechBarDisplayRole,
|
|
17
17
|
currentTechBar = _ref.currentTechBar,
|
|
18
18
|
selectCurrentTechBar = _ref.selectCurrentTechBar;
|
|
19
|
-
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(
|
|
20
|
-
|
|
21
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
22
|
-
className: "page-container page-container--tech-bar container"
|
|
19
|
+
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
20
|
+
className: "page-container page-container--tech-bar page-container--lg"
|
|
23
21
|
}, /*#__PURE__*/React.createElement("div", {
|
|
24
22
|
className: "page-panel"
|
|
25
|
-
}, /*#__PURE__*/React.createElement(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
23
|
+
}, /*#__PURE__*/React.createElement(PageTitle, {
|
|
24
|
+
parts: ['All Tech Bars'],
|
|
25
|
+
breadcrumbs: [{
|
|
26
|
+
label: 'Home',
|
|
27
|
+
to: '/'
|
|
28
|
+
}, {
|
|
29
|
+
label: 'Tech Bar',
|
|
30
|
+
to: '..'
|
|
31
|
+
}],
|
|
32
|
+
title: "All Tech Bars"
|
|
33
|
+
}), /*#__PURE__*/React.createElement("section", null, /*#__PURE__*/React.createElement("div", {
|
|
36
34
|
className: "cards cards--thirds"
|
|
37
35
|
}, techBars.map(function (techBar) {
|
|
38
36
|
return /*#__PURE__*/React.createElement(Card, {
|
|
@@ -43,22 +41,16 @@ export var TechBarsComponent = function TechBarsComponent(_ref) {
|
|
|
43
41
|
barStyle: currentTechBar && techBar.id === currentTechBar.id ? {
|
|
44
42
|
borderTopColor: Constants.COLORS.sunflower
|
|
45
43
|
} : undefined
|
|
46
|
-
}, /*#__PURE__*/React.createElement(CardRow, {
|
|
47
|
-
className: "flex-grow-1"
|
|
48
|
-
}, /*#__PURE__*/React.createElement(CardRow, {
|
|
44
|
+
}, /*#__PURE__*/React.createElement(CardCol, null, /*#__PURE__*/React.createElement(CardRow, null, /*#__PURE__*/React.createElement(CardRow, {
|
|
49
45
|
type: "prepend"
|
|
50
46
|
}, /*#__PURE__*/React.createElement("span", {
|
|
51
47
|
className: "fa fa-map-marker fa-3x"
|
|
52
48
|
})), /*#__PURE__*/React.createElement(CardCol, null, /*#__PURE__*/React.createElement(CardRow, null, /*#__PURE__*/React.createElement("strong", null, /*#__PURE__*/React.createElement(I18n, null, techBar.values['Name']))), techBar.values['Location'] && /*#__PURE__*/React.createElement(CardRow, {
|
|
53
49
|
type: "meta",
|
|
54
50
|
className: "text-muted pt-0"
|
|
55
|
-
}, /*#__PURE__*/React.createElement(I18n, null, techBar.values['Location'])),
|
|
56
|
-
type: "
|
|
57
|
-
|
|
58
|
-
}, /*#__PURE__*/React.createElement(I18n, null, techBar.values['Description'])), techBar.values['Details'] && /*#__PURE__*/React.createElement(CardRow, {
|
|
59
|
-
type: "meta",
|
|
60
|
-
className: "pt-1"
|
|
61
|
-
}, /*#__PURE__*/React.createElement(I18n, null, techBar.values['Details']))), hasTechBarDisplayRole(techBar.values['Name']) && /*#__PURE__*/React.createElement(CardRow, {
|
|
51
|
+
}, /*#__PURE__*/React.createElement(I18n, null, techBar.values['Location']))), /*#__PURE__*/React.createElement(CardRow, {
|
|
52
|
+
type: "append"
|
|
53
|
+
}, hasTechBarDisplayRole(techBar.values['Name']) && /*#__PURE__*/React.createElement(CardRow, {
|
|
62
54
|
type: "append"
|
|
63
55
|
}, /*#__PURE__*/React.createElement(Dropdown, {
|
|
64
56
|
toggle: toggleDropdown(techBar.id),
|
|
@@ -98,7 +90,16 @@ export var TechBarsComponent = function TechBarsComponent(_ref) {
|
|
|
98
90
|
target: "_blank"
|
|
99
91
|
}, /*#__PURE__*/React.createElement("span", {
|
|
100
92
|
className: "fa fa-external-link fa-fw mr-2"
|
|
101
|
-
}), /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(I18n, null, "Overhead"))))))), /*#__PURE__*/React.createElement(
|
|
93
|
+
}), /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(I18n, null, "Overhead")))))))), /*#__PURE__*/React.createElement(CardRow, {
|
|
94
|
+
type: "meta",
|
|
95
|
+
className: "flex-grow-1 flex-shrink-1 overflow-auto my-2"
|
|
96
|
+
}, /*#__PURE__*/React.createElement(CardCol, null, techBar.values['Description'] && /*#__PURE__*/React.createElement(CardRow, {
|
|
97
|
+
type: "meta",
|
|
98
|
+
className: "pt-1"
|
|
99
|
+
}, /*#__PURE__*/React.createElement(I18n, null, techBar.values['Description'])), techBar.values['Details'] && /*#__PURE__*/React.createElement(CardRow, {
|
|
100
|
+
type: "meta",
|
|
101
|
+
className: "pt-1"
|
|
102
|
+
}, /*#__PURE__*/React.createElement(I18n, null, techBar.values['Details'])))), /*#__PURE__*/React.createElement(CardCol, {
|
|
102
103
|
className: "pt-0 flex-grow-0"
|
|
103
104
|
}, /*#__PURE__*/React.createElement(CardRow, null, /*#__PURE__*/React.createElement(Link, {
|
|
104
105
|
to: "../appointment/".concat(techBar.values['Id']),
|
|
@@ -111,7 +112,7 @@ export var TechBarsComponent = function TechBarsComponent(_ref) {
|
|
|
111
112
|
onClick: function onClick() {
|
|
112
113
|
return selectCurrentTechBar(techBar.id);
|
|
113
114
|
}
|
|
114
|
-
}, /*#__PURE__*/React.createElement(I18n, null, "Set as Current Tech Bar")))));
|
|
115
|
+
}, /*#__PURE__*/React.createElement(I18n, null, "Set as Current Tech Bar"))))));
|
|
115
116
|
}))))));
|
|
116
117
|
};
|
|
117
118
|
export var mapStateToProps = function mapStateToProps(state, props) {
|