@pega/react-sdk-overrides 0.23.19 → 0.23.21
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/designSystemExtension/Banner/Banner.css +35 -0
- package/lib/designSystemExtension/Banner/Banner.tsx +33 -0
- package/lib/designSystemExtension/Banner/index.tsx +1 -0
- package/lib/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx +1 -2
- package/lib/field/DateTime/DateTime.tsx +6 -7
- package/lib/helpers/template-utils.ts +7 -7
- package/lib/infra/Assignment/Assignment.tsx +126 -109
- package/lib/infra/Containers/FlowContainer/FlowContainer.tsx +120 -136
- package/lib/infra/View/View.tsx +2 -1
- package/lib/template/AppShell/AppShell.tsx +159 -27
- package/lib/template/BannerPage/BannerPage.tsx +61 -0
- package/lib/template/BannerPage/index.tsx +1 -0
- package/lib/template/Confirmation/Confirmation.tsx +101 -0
- package/lib/template/Confirmation/config-ext.json +12 -0
- package/lib/template/Confirmation/index.tsx +1 -0
- package/lib/template/WssNavBar/WssNavBar.css +5 -0
- package/lib/template/WssNavBar/WssNavBar.tsx +141 -0
- package/lib/template/WssNavBar/index.tsx +1 -0
- package/lib/widget/Attachment/Attachment.tsx +9 -10
- package/lib/widget/ToDo/ToDo.css +10 -4
- package/lib/widget/ToDo/ToDo.tsx +125 -52
- package/package.json +1 -1
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
.background-image-style {
|
|
2
|
+
margin-left: -16px;
|
|
3
|
+
margin-right: -16px;
|
|
4
|
+
height: calc(19rem);
|
|
5
|
+
background-size: cover;
|
|
6
|
+
background-position: center center;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.background-style {
|
|
10
|
+
background-color: transparent;
|
|
11
|
+
color: rgb(0, 0, 0);
|
|
12
|
+
width: 100%;
|
|
13
|
+
height: 100%;
|
|
14
|
+
text-align: center;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.content {
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-direction: column;
|
|
20
|
+
justify-content: center;
|
|
21
|
+
align-items: center;
|
|
22
|
+
gap: calc(0.5rem);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.title {
|
|
26
|
+
margin: 0rem;
|
|
27
|
+
font-size: 1.728rem;
|
|
28
|
+
font-weight: 600;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.message {
|
|
32
|
+
margin: 0;
|
|
33
|
+
font-size: 1rem;
|
|
34
|
+
font-weight: 400;
|
|
35
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Grid from '@material-ui/core/Grid';
|
|
3
|
+
import './Banner.css';
|
|
4
|
+
|
|
5
|
+
export default function Banner(props) {
|
|
6
|
+
const { a, b, banner } = props;
|
|
7
|
+
const { title, message, backgroundImage } = banner;
|
|
8
|
+
return (
|
|
9
|
+
<div>
|
|
10
|
+
<div
|
|
11
|
+
className='background-image-style'
|
|
12
|
+
style={{ backgroundImage: `url(${backgroundImage})` }}
|
|
13
|
+
>
|
|
14
|
+
<div className='background-style content'>
|
|
15
|
+
<div>
|
|
16
|
+
<h1 className='title'>{title}</h1>
|
|
17
|
+
<p className='message'>{message}</p>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
<div style={{ padding: '1rem' }}>
|
|
22
|
+
<Grid container item xs={12} spacing={1}>
|
|
23
|
+
<Grid item xs={8} style={{ padding: '1em' }}>
|
|
24
|
+
{a}
|
|
25
|
+
</Grid>
|
|
26
|
+
<Grid item xs={4} style={{ padding: '1em' }}>
|
|
27
|
+
{b}
|
|
28
|
+
</Grid>
|
|
29
|
+
</Grid>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Banner';
|
|
@@ -125,8 +125,7 @@ export default function CaseSummaryFields(props) {
|
|
|
125
125
|
case 'date':
|
|
126
126
|
case 'datetime': {
|
|
127
127
|
const theDateFormatInfo = getDateFormatInfo();
|
|
128
|
-
//
|
|
129
|
-
console.log(`theDateFormatInfo: ${theDateFormatInfo}`);
|
|
128
|
+
// console.log(`theDateFormatInfo: ${theDateFormatInfo}`);
|
|
130
129
|
const theFormat = (fieldTypeLower === 'datetime') ? `${theDateFormatInfo.dateFormatStringLong} hh:mm a` : theDateFormatInfo.dateFormatStringLong
|
|
131
130
|
|
|
132
131
|
return (
|
|
@@ -38,19 +38,18 @@ export default function DateTime(props) {
|
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
if (displayMode === 'LABELS_LEFT') {
|
|
41
|
-
const
|
|
42
|
-
return <FieldValueList name={hideLabel ? '' : label} value={
|
|
41
|
+
const formattedDateTime = format(props.value, 'datetime', { format: `${dateFormatInfo.dateFormatString} hh:mm a` });
|
|
42
|
+
return <FieldValueList name={hideLabel ? '' : label} value={formattedDateTime} />;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
if (displayMode === 'STACKED_LARGE_VAL') {
|
|
46
|
-
const
|
|
47
|
-
return <FieldValueList name={hideLabel ? '' : label} value={
|
|
46
|
+
const formattedDateTime = format(props.value, 'datetime', { format: `${dateFormatInfo.dateFormatString} hh:mm a` });
|
|
47
|
+
return <FieldValueList name={hideLabel ? '' : label} value={formattedDateTime} variant='stacked' />;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
if (readOnly) {
|
|
51
|
-
const
|
|
52
|
-
props
|
|
53
|
-
return <TextInput {...props} />;
|
|
51
|
+
const formattedDateTime = format(props.value, 'datetime');
|
|
52
|
+
return <TextInput {...props} value={formattedDateTime} />;
|
|
54
53
|
}
|
|
55
54
|
|
|
56
55
|
const handleChange = date => {
|
|
@@ -6,16 +6,15 @@ export function getAllFields(pConnect: any) {
|
|
|
6
6
|
const metadata = pConnect.getRawMetadata();
|
|
7
7
|
let allFields = [];
|
|
8
8
|
if (metadata.children && metadata.children.map) {
|
|
9
|
-
allFields = metadata.children.map(
|
|
9
|
+
allFields = metadata.children.map(fields => {
|
|
10
10
|
const children = fields.children instanceof Array ? fields.children : [];
|
|
11
|
-
return children.map(
|
|
11
|
+
return children.map(field => field.config);
|
|
12
12
|
});
|
|
13
13
|
}
|
|
14
14
|
return allFields;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
export function filterForFieldValueList(fields : any) {
|
|
17
|
+
export function filterForFieldValueList(fields: any) {
|
|
19
18
|
return fields
|
|
20
19
|
.filter(({ visibility }) => visibility !== false)
|
|
21
20
|
.map(({ value, label }) => ({
|
|
@@ -25,12 +24,11 @@ export function filterForFieldValueList(fields : any) {
|
|
|
25
24
|
}));
|
|
26
25
|
}
|
|
27
26
|
|
|
28
|
-
|
|
29
27
|
/**
|
|
30
28
|
* Determine if the current view is the view of the case step/assignment.
|
|
31
29
|
* @param {Function} pConnect PConnect object for the component
|
|
32
30
|
*/
|
|
33
|
-
|
|
31
|
+
export function getIsAssignmentView(pConnect) {
|
|
34
32
|
// Get caseInfo content from the store which contains the view info about the current assignment/step
|
|
35
33
|
// TODO To be replaced with pConnect.getCaseInfo().getCurrentAssignmentView when it's available
|
|
36
34
|
const assignmentViewClass = pConnect.getValue(PCore.getConstants().CASE_INFO.CASE_INFO_CLASSID);
|
|
@@ -50,7 +48,9 @@ export function filterForFieldValueList(fields : any) {
|
|
|
50
48
|
* @param {string} [instructions="casestep"] 'casestep', 'none', or the html content of a Rule-UI-Paragraph rule (processed via core's paragraph annotation handler)
|
|
51
49
|
*/
|
|
52
50
|
export function getInstructions(pConnect, instructions = 'casestep') {
|
|
53
|
-
const caseStepInstructions =
|
|
51
|
+
const caseStepInstructions =
|
|
52
|
+
PCore.getConstants().CASE_INFO.INSTRUCTIONS &&
|
|
53
|
+
pConnect.getValue(PCore.getConstants().CASE_INFO.INSTRUCTIONS);
|
|
54
54
|
|
|
55
55
|
// Determine if this view is the current assignment/step view
|
|
56
56
|
const isCurrentAssignmentView = getIsAssignmentView(pConnect);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React, { useState, useEffect } from
|
|
2
|
-
import PropTypes from
|
|
1
|
+
import React, { useState, useEffect } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
3
|
|
|
4
4
|
import AssignmentCard from '@pega/react-sdk-components/lib/components/infra/AssignmentCard';
|
|
5
5
|
import MultiStep from '@pega/react-sdk-components/lib/components/infra/MultiStep';
|
|
@@ -14,7 +14,7 @@ export default function Assignment(props) {
|
|
|
14
14
|
const thePConn = getPConnect();
|
|
15
15
|
|
|
16
16
|
const [bHasNavigation, setHasNavigation] = useState(false);
|
|
17
|
-
const [actionButtons, setActionButtons] = useState(
|
|
17
|
+
const [actionButtons, setActionButtons] = useState({});
|
|
18
18
|
const [bIsVertical, setIsVertical] = useState(false);
|
|
19
19
|
const [arCurrentStepIndicies, setArCurrentStepIndicies] = useState<Array<any>>([]);
|
|
20
20
|
const [arNavigationSteps, setArNavigationSteps] = useState<Array<any>>([]);
|
|
@@ -30,40 +30,38 @@ export default function Assignment(props) {
|
|
|
30
30
|
// const showPage = actionsAPI.showPage.bind(actionsAPI);
|
|
31
31
|
|
|
32
32
|
const [showSnackbar, setShowSnackbar] = useState(false);
|
|
33
|
-
const [snackbarMessage, setSnackbarMessage] = useState(
|
|
34
|
-
|
|
35
|
-
function findCurrentIndicies(arStepperSteps: Array<any>, arIndicies: Array<number>, depth: number) : Array<number> {
|
|
33
|
+
const [snackbarMessage, setSnackbarMessage] = useState('');
|
|
36
34
|
|
|
35
|
+
function findCurrentIndicies(
|
|
36
|
+
arStepperSteps: Array<any>,
|
|
37
|
+
arIndicies: Array<number>,
|
|
38
|
+
depth: number
|
|
39
|
+
): Array<number> {
|
|
37
40
|
let count = 0;
|
|
38
|
-
arStepperSteps.forEach(
|
|
39
|
-
if (step.visited_status ===
|
|
41
|
+
arStepperSteps.forEach(step => {
|
|
42
|
+
if (step.visited_status === 'current') {
|
|
40
43
|
arIndicies[depth] = count;
|
|
41
44
|
|
|
42
45
|
// add in
|
|
43
|
-
step[
|
|
44
|
-
}
|
|
45
|
-
else if (step.visited_status === "success") {
|
|
46
|
+
step['step_status'] = '';
|
|
47
|
+
} else if (step.visited_status === 'success') {
|
|
46
48
|
count += 1;
|
|
47
|
-
step.step_status =
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
49
|
+
step.step_status = 'completed';
|
|
50
|
+
} else {
|
|
50
51
|
count += 1;
|
|
51
|
-
step.step_status =
|
|
52
|
+
step.step_status = '';
|
|
52
53
|
}
|
|
53
54
|
|
|
54
55
|
if (step.steps) {
|
|
55
|
-
arIndicies = findCurrentIndicies(step.steps, arIndicies, depth + 1)
|
|
56
|
+
arIndicies = findCurrentIndicies(step.steps, arIndicies, depth + 1);
|
|
56
57
|
}
|
|
57
58
|
});
|
|
58
59
|
|
|
59
60
|
return arIndicies;
|
|
60
61
|
}
|
|
61
62
|
|
|
62
|
-
|
|
63
|
-
useEffect( ()=> {
|
|
64
|
-
|
|
63
|
+
useEffect(() => {
|
|
65
64
|
if (children && children.length > 0) {
|
|
66
|
-
|
|
67
65
|
// debugger;
|
|
68
66
|
|
|
69
67
|
const oWorkItem = children[0].props.getPConnect();
|
|
@@ -77,32 +75,32 @@ export default function Assignment(props) {
|
|
|
77
75
|
setActionButtons(oCaseInfo.actionButtons);
|
|
78
76
|
}
|
|
79
77
|
|
|
80
|
-
if (
|
|
78
|
+
if (oCaseInfo?.navigation /* was oCaseInfo.navigation != null */) {
|
|
81
79
|
setHasNavigation(true);
|
|
82
80
|
|
|
83
|
-
if (
|
|
81
|
+
if (
|
|
82
|
+
oCaseInfo.navigation.template &&
|
|
83
|
+
oCaseInfo.navigation.template.toLowerCase() === 'standard'
|
|
84
|
+
) {
|
|
84
85
|
setHasNavigation(false);
|
|
85
|
-
}
|
|
86
|
-
|
|
86
|
+
} else if (
|
|
87
|
+
oCaseInfo.navigation.template &&
|
|
88
|
+
oCaseInfo.navigation.template.toLowerCase() === 'vertical'
|
|
89
|
+
) {
|
|
87
90
|
setIsVertical(true);
|
|
88
|
-
}
|
|
89
|
-
else {
|
|
91
|
+
} else {
|
|
90
92
|
setIsVertical(false);
|
|
91
93
|
}
|
|
92
94
|
|
|
93
95
|
setArNavigationSteps(JSON.parse(JSON.stringify(oCaseInfo.navigation.steps)));
|
|
94
|
-
setArCurrentStepIndicies(
|
|
95
|
-
|
|
96
|
+
setArCurrentStepIndicies(
|
|
97
|
+
findCurrentIndicies(arNavigationSteps, arCurrentStepIndicies, 0)
|
|
98
|
+
);
|
|
96
99
|
}
|
|
97
100
|
}
|
|
98
|
-
|
|
99
101
|
}
|
|
100
|
-
|
|
101
|
-
|
|
102
102
|
}, [children]);
|
|
103
103
|
|
|
104
|
-
|
|
105
|
-
|
|
106
104
|
function showToast(message: string) {
|
|
107
105
|
const theMessage = `Assignment: ${message}`;
|
|
108
106
|
// eslint-disable-next-line no-console
|
|
@@ -111,61 +109,65 @@ export default function Assignment(props) {
|
|
|
111
109
|
setShowSnackbar(true);
|
|
112
110
|
}
|
|
113
111
|
|
|
114
|
-
|
|
115
112
|
function handleSnackbarClose(event: React.SyntheticEvent | React.MouseEvent, reason?: string) {
|
|
116
113
|
if (reason === 'clickaway') {
|
|
117
114
|
return;
|
|
118
115
|
}
|
|
119
116
|
setShowSnackbar(false);
|
|
120
|
-
}
|
|
117
|
+
}
|
|
121
118
|
|
|
122
119
|
function onSaveActionSuccess(data) {
|
|
123
120
|
actionsAPI.cancelAssignment(itemKey).then(() => {
|
|
124
|
-
PCore.getPubSubUtils().publish(
|
|
121
|
+
PCore.getPubSubUtils().publish(
|
|
122
|
+
PCore.getConstants().PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_SAVED,
|
|
123
|
+
data
|
|
124
|
+
);
|
|
125
125
|
});
|
|
126
126
|
}
|
|
127
127
|
|
|
128
128
|
function buttonPress(sAction: string, sButtonType: string) {
|
|
129
|
-
|
|
130
|
-
if (sButtonType === "secondary") {
|
|
131
|
-
|
|
129
|
+
if (sButtonType === 'secondary') {
|
|
132
130
|
switch (sAction) {
|
|
133
|
-
case
|
|
134
|
-
const navigatePromise = navigateToStep(
|
|
131
|
+
case 'navigateToStep': {
|
|
132
|
+
const navigatePromise = navigateToStep('previous', itemKey);
|
|
135
133
|
|
|
136
134
|
navigatePromise
|
|
137
|
-
.then(() => {
|
|
138
|
-
})
|
|
135
|
+
.then(() => {})
|
|
139
136
|
.catch(() => {
|
|
140
|
-
showToast(
|
|
137
|
+
showToast(`Navigation failed!`);
|
|
141
138
|
});
|
|
142
139
|
|
|
143
140
|
break;
|
|
144
141
|
}
|
|
145
142
|
|
|
146
|
-
case
|
|
143
|
+
case 'saveAssignment': {
|
|
147
144
|
const caseID = thePConn.getCaseInfo().getKey();
|
|
148
145
|
const assignmentID = thePConn.getCaseInfo().getAssignmentID();
|
|
149
146
|
const savePromise = saveAssignment(itemKey);
|
|
150
147
|
|
|
151
148
|
savePromise
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
149
|
+
.then(() => {
|
|
150
|
+
const caseType = thePConn
|
|
151
|
+
.getCaseInfo()
|
|
152
|
+
.c11nEnv.getValue(PCore.getConstants().CASE_INFO.CASE_TYPE_ID);
|
|
153
|
+
onSaveActionSuccess({ caseType, caseID, assignmentID });
|
|
154
|
+
})
|
|
155
|
+
.catch(() => {
|
|
156
|
+
showToast('Save failed');
|
|
157
|
+
});
|
|
159
158
|
|
|
160
159
|
break;
|
|
161
160
|
}
|
|
162
161
|
|
|
163
|
-
case
|
|
162
|
+
case 'cancelAssignment': {
|
|
164
163
|
// check if create stage (modal)
|
|
165
164
|
const { PUB_SUB_EVENTS } = PCore.getConstants();
|
|
166
165
|
const { publish } = PCore.getPubSubUtils();
|
|
167
166
|
const isAssignmentInCreateStage = thePConn.getCaseInfo().isAssignmentInCreateStage();
|
|
168
|
-
const isLocalAction =
|
|
167
|
+
const isLocalAction =
|
|
168
|
+
thePConn.getCaseInfo().isLocalAction() ||
|
|
169
|
+
(PCore.getConstants().CASE_INFO.IS_LOCAL_ACTION &&
|
|
170
|
+
getPConnect().getValue(PCore.getConstants().CASE_INFO.IS_LOCAL_ACTION));
|
|
169
171
|
if (isAssignmentInCreateStage && isInModal && !isLocalAction) {
|
|
170
172
|
const cancelPromise = cancelCreateStageAssignment(itemKey);
|
|
171
173
|
|
|
@@ -193,73 +195,89 @@ export default function Assignment(props) {
|
|
|
193
195
|
default:
|
|
194
196
|
break;
|
|
195
197
|
}
|
|
196
|
-
}
|
|
197
|
-
else if (sButtonType === "primary") {
|
|
198
|
+
} else if (sButtonType === 'primary') {
|
|
198
199
|
// eslint-disable-next-line sonarjs/no-small-switch
|
|
199
200
|
switch (sAction) {
|
|
200
|
-
case
|
|
201
|
-
|
|
202
|
-
const finishPromise = finishAssignment(itemKey);
|
|
201
|
+
case 'finishAssignment': {
|
|
202
|
+
const finishPromise = finishAssignment(itemKey);
|
|
203
203
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
});
|
|
204
|
+
finishPromise
|
|
205
|
+
.then(() => {})
|
|
206
|
+
.catch(() => {
|
|
207
|
+
showToast(`Submit failed!`);
|
|
208
|
+
});
|
|
210
209
|
|
|
211
|
-
|
|
212
|
-
|
|
210
|
+
break;
|
|
211
|
+
}
|
|
213
212
|
|
|
214
213
|
default:
|
|
215
214
|
break;
|
|
216
215
|
}
|
|
217
216
|
}
|
|
218
|
-
|
|
219
217
|
}
|
|
220
218
|
|
|
221
|
-
|
|
222
219
|
return (
|
|
223
|
-
<div id=
|
|
224
|
-
{
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
220
|
+
<div id='Assignment'>
|
|
221
|
+
{bHasNavigation ? (
|
|
222
|
+
<React.Fragment>
|
|
223
|
+
<MultiStep
|
|
224
|
+
getPConnect={getPConnect}
|
|
225
|
+
itemKey={itemKey}
|
|
226
|
+
actionButtons={actionButtons}
|
|
227
|
+
onButtonPress={buttonPress}
|
|
228
|
+
bIsVertical={bIsVertical}
|
|
229
|
+
arCurrentStepIndicies={arCurrentStepIndicies}
|
|
230
|
+
arNavigationSteps={arNavigationSteps}
|
|
231
|
+
>
|
|
232
|
+
{children}
|
|
233
|
+
</MultiStep>
|
|
234
|
+
<Snackbar
|
|
235
|
+
open={showSnackbar}
|
|
236
|
+
autoHideDuration={3000}
|
|
237
|
+
onClose={handleSnackbarClose}
|
|
238
|
+
message={snackbarMessage}
|
|
239
|
+
action={
|
|
240
|
+
<IconButton
|
|
241
|
+
size='small'
|
|
242
|
+
aria-label='close'
|
|
243
|
+
color='inherit'
|
|
244
|
+
onClick={handleSnackbarClose}
|
|
245
|
+
>
|
|
246
|
+
<CloseIcon fontSize='small' />
|
|
247
|
+
</IconButton>
|
|
248
|
+
}
|
|
249
|
+
/>
|
|
250
|
+
</React.Fragment>
|
|
251
|
+
) : (
|
|
252
|
+
<React.Fragment>
|
|
253
|
+
<AssignmentCard
|
|
254
|
+
getPConnect={getPConnect}
|
|
255
|
+
itemKey={itemKey}
|
|
256
|
+
actionButtons={actionButtons}
|
|
257
|
+
onButtonPress={buttonPress}
|
|
258
|
+
>
|
|
259
|
+
{children}
|
|
260
|
+
</AssignmentCard>
|
|
261
|
+
<Snackbar
|
|
262
|
+
open={showSnackbar}
|
|
263
|
+
autoHideDuration={3000}
|
|
264
|
+
onClose={handleSnackbarClose}
|
|
265
|
+
message={snackbarMessage}
|
|
266
|
+
action={
|
|
267
|
+
<IconButton
|
|
268
|
+
size='small'
|
|
269
|
+
aria-label='close'
|
|
270
|
+
color='inherit'
|
|
271
|
+
onClick={handleSnackbarClose}
|
|
272
|
+
>
|
|
273
|
+
<CloseIcon fontSize='small' />
|
|
274
|
+
</IconButton>
|
|
275
|
+
}
|
|
276
|
+
/>
|
|
277
|
+
</React.Fragment>
|
|
278
|
+
)}
|
|
261
279
|
</div>
|
|
262
|
-
)
|
|
280
|
+
);
|
|
263
281
|
}
|
|
264
282
|
|
|
265
283
|
// From WC SDK
|
|
@@ -286,7 +304,6 @@ export default function Assignment(props) {
|
|
|
286
304
|
// </div>`}
|
|
287
305
|
// `;
|
|
288
306
|
|
|
289
|
-
|
|
290
307
|
Assignment.propTypes = {
|
|
291
308
|
children: PropTypes.node.isRequired,
|
|
292
309
|
getPConnect: PropTypes.func.isRequired,
|