@kineticdata/bundle-queue 6.0.1 → 6.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/lib/App.js +1 -2
  2. package/lib/components/FormPreview.js +6 -11
  3. package/lib/components/filter_menu/FilterMenuAbstract.js +6 -11
  4. package/lib/components/filter_menu/FilterMenuModal.js +1 -2
  5. package/lib/components/filter_menu/FilterMenuToolbar.js +3 -5
  6. package/lib/components/new_item_menu/NewItemMenu.js +2 -3
  7. package/lib/components/new_item_menu/NewItemMenuContainer.js +2 -3
  8. package/lib/components/queue_item/AssignmentBadge.js +2 -3
  9. package/lib/components/queue_item/QueueItem.js +5 -9
  10. package/lib/components/queue_item/QueueItemDetails.js +5 -9
  11. package/lib/components/queue_item/ViewOriginalRequest.js +3 -5
  12. package/lib/components/queue_list/BulkAssignModal.js +2 -3
  13. package/lib/components/queue_list/BulkStatusModal.js +2 -3
  14. package/lib/components/queue_list/BulkWorkModal.js +2 -3
  15. package/lib/components/queue_list/QueueList.js +2 -3
  16. package/lib/components/queue_list/QueueListContainer.js +2 -3
  17. package/lib/components/queue_list/QueueListItem.js +3 -5
  18. package/lib/components/queue_list/QueueListPagination.js +3 -5
  19. package/lib/components/queue_list/QueueListSelection.js +3 -5
  20. package/lib/components/queue_list/QueueListSidebar.js +2 -3
  21. package/lib/components/settings/QueueSettings.js +3 -5
  22. package/lib/components/settings/Settings.js +3 -6
  23. package/lib/components/settings/Sidebar.js +3 -6
  24. package/lib/components/settings/forms/Export.js +2 -3
  25. package/lib/components/settings/forms/ExportModal.js +1 -2
  26. package/lib/components/settings/forms/FormActivity.js +3 -5
  27. package/lib/components/settings/forms/FormList.js +3 -5
  28. package/lib/components/settings/forms/FormSettings.js +4 -7
  29. package/lib/components/settings/forms/FormSubmissions.js +3 -5
  30. package/lib/components/shared/AssignmentItem.js +2 -3
  31. package/lib/components/shared/AssignmentSelector.js +2 -3
  32. package/lib/components/shared/PageTitle.js +3 -5
  33. package/lib/components/shared/StatusContent.js +4 -7
  34. package/lib/components/shared/WallyButton.js +5 -9
  35. package/lib/components/work_menu/WorkMenu.js +5 -9
  36. package/lib/index.js +3 -2
  37. package/lib/models.js +2 -3
  38. package/lib/records.js +11 -21
  39. package/lib/redux/modules/app.js +4 -7
  40. package/lib/redux/modules/filterMenu.js +5 -9
  41. package/lib/redux/modules/forms.js +5 -9
  42. package/lib/redux/modules/queue.js +4 -8
  43. package/lib/redux/modules/queueApp.js +11 -19
  44. package/lib/redux/modules/settingsForms.js +18 -33
  45. package/lib/redux/modules/settingsQueue.js +5 -9
  46. package/lib/redux/modules/workMenu.js +5 -9
  47. package/lib/redux/reducers.js +2 -3
  48. package/lib/redux/sagas/app.js +11 -15
  49. package/lib/redux/sagas/forms.js +38 -42
  50. package/lib/redux/sagas/queue.js +410 -432
  51. package/lib/redux/sagas/queueApp.js +106 -113
  52. package/lib/redux/sagas/settingsForms.js +484 -508
  53. package/lib/redux/sagas/settingsQueue.js +232 -248
  54. package/lib/redux/sagas.js +7 -9
  55. package/lib/redux/store.js +5 -9
  56. package/lib/utils.js +2 -3
  57. package/package.json +58 -57
@@ -36,72 +36,68 @@ var _marked = /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(fetchForm
36
36
  function fetchFormSaga(action) {
37
37
  var _yield$call, error, form;
38
38
  return (0, _regeneratorRuntime2["default"])().wrap(function fetchFormSaga$(_context) {
39
- while (1) {
40
- switch (_context.prev = _context.next) {
39
+ while (1) switch (_context.prev = _context.next) {
40
+ case 0:
41
+ _context.next = 2;
42
+ return (0, _effects.call)(_react.fetchForm, {
43
+ kappSlug: action.payload.kappSlug,
44
+ formSlug: action.payload.formSlug,
45
+ include: _settingsForms.FORM_INCLUDES
46
+ });
47
+ case 2:
48
+ _yield$call = _context.sent;
49
+ error = _yield$call.error;
50
+ form = _yield$call.form;
51
+ if (!error) {
52
+ _context.next = 10;
53
+ break;
54
+ }
55
+ _context.next = 8;
56
+ return (0, _effects.put)(_settingsForms.actions.setFormsError(error));
57
+ case 8:
58
+ _context.next = 12;
59
+ break;
60
+ case 10:
61
+ _context.next = 12;
62
+ return (0, _effects.put)(_settingsForms.actions.setForm(form));
63
+ case 12:
64
+ case "end":
65
+ return _context.stop();
66
+ }
67
+ }, _marked);
68
+ }
69
+ function fetchFormRequestSaga(_ref) {
70
+ var payload = _ref.payload;
71
+ return /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee() {
72
+ var _yield$call2, error, form;
73
+ return (0, _regeneratorRuntime2["default"])().wrap(function _callee$(_context2) {
74
+ while (1) switch (_context2.prev = _context2.next) {
41
75
  case 0:
42
- _context.next = 2;
76
+ _context2.next = 2;
43
77
  return (0, _effects.call)(_react.fetchForm, {
44
- kappSlug: action.payload.kappSlug,
45
- formSlug: action.payload.formSlug,
78
+ kappSlug: payload.kappSlug,
79
+ formSlug: payload.formSlug,
46
80
  include: _settingsForms.FORM_INCLUDES
47
81
  });
48
82
  case 2:
49
- _yield$call = _context.sent;
50
- error = _yield$call.error;
51
- form = _yield$call.form;
83
+ _yield$call2 = _context2.sent;
84
+ error = _yield$call2.error;
85
+ form = _yield$call2.form;
52
86
  if (!error) {
53
- _context.next = 10;
87
+ _context2.next = 10;
54
88
  break;
55
89
  }
56
- _context.next = 8;
57
- return (0, _effects.put)(_settingsForms.actions.setFormsError(error));
90
+ _context2.next = 8;
91
+ return (0, _effects.put)(_settingsForms.actions.fetchFormFailure(error));
58
92
  case 8:
59
- _context.next = 12;
93
+ _context2.next = 12;
60
94
  break;
61
95
  case 10:
62
- _context.next = 12;
63
- return (0, _effects.put)(_settingsForms.actions.setForm(form));
96
+ _context2.next = 12;
97
+ return (0, _effects.put)(_settingsForms.actions.fetchFormSuccess(form));
64
98
  case 12:
65
99
  case "end":
66
- return _context.stop();
67
- }
68
- }
69
- }, _marked);
70
- }
71
- function fetchFormRequestSaga(_ref) {
72
- var payload = _ref.payload;
73
- return /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee() {
74
- var _yield$call2, error, form;
75
- return (0, _regeneratorRuntime2["default"])().wrap(function _callee$(_context2) {
76
- while (1) {
77
- switch (_context2.prev = _context2.next) {
78
- case 0:
79
- _context2.next = 2;
80
- return (0, _effects.call)(_react.fetchForm, {
81
- kappSlug: payload.kappSlug,
82
- formSlug: payload.formSlug,
83
- include: _settingsForms.FORM_INCLUDES
84
- });
85
- case 2:
86
- _yield$call2 = _context2.sent;
87
- error = _yield$call2.error;
88
- form = _yield$call2.form;
89
- if (!error) {
90
- _context2.next = 10;
91
- break;
92
- }
93
- _context2.next = 8;
94
- return (0, _effects.put)(_settingsForms.actions.fetchFormFailure(error));
95
- case 8:
96
- _context2.next = 12;
97
- break;
98
- case 10:
99
- _context2.next = 12;
100
- return (0, _effects.put)(_settingsForms.actions.fetchFormSuccess(form));
101
- case 12:
102
- case "end":
103
- return _context2.stop();
104
- }
100
+ return _context2.stop();
105
101
  }
106
102
  }, _callee);
107
103
  })();
@@ -111,71 +107,69 @@ function cloneFormSaga(_ref2) {
111
107
  return /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee2() {
112
108
  var _yield$call3, cloneError, cloneForm, _yield$call4, error, form;
113
109
  return (0, _regeneratorRuntime2["default"])().wrap(function _callee2$(_context3) {
114
- while (1) {
115
- switch (_context3.prev = _context3.next) {
116
- case 0:
117
- _context3.next = 2;
118
- return (0, _effects.call)(_react.fetchForm, {
119
- kappSlug: payload.kappSlug,
120
- formSlug: payload.cloneFormSlug,
121
- include: _settingsForms.FORM_FULL_INCLUDES
122
- });
123
- case 2:
124
- _yield$call3 = _context3.sent;
125
- cloneError = _yield$call3.error;
126
- cloneForm = _yield$call3.form;
127
- if (!cloneError) {
128
- _context3.next = 11;
129
- break;
130
- }
131
- (0, _bundleCommon.addToastAlert)({
132
- title: 'Error Cloning Form',
133
- message: 'Could not find form to clone.'
134
- });
135
- _context3.next = 9;
136
- return (0, _effects.put)(_settingsForms.actions.cloneFormComplete(payload));
137
- case 9:
138
- _context3.next = 24;
110
+ while (1) switch (_context3.prev = _context3.next) {
111
+ case 0:
112
+ _context3.next = 2;
113
+ return (0, _effects.call)(_react.fetchForm, {
114
+ kappSlug: payload.kappSlug,
115
+ formSlug: payload.cloneFormSlug,
116
+ include: _settingsForms.FORM_FULL_INCLUDES
117
+ });
118
+ case 2:
119
+ _yield$call3 = _context3.sent;
120
+ cloneError = _yield$call3.error;
121
+ cloneForm = _yield$call3.form;
122
+ if (!cloneError) {
123
+ _context3.next = 11;
139
124
  break;
140
- case 11:
141
- _context3.next = 13;
142
- return (0, _effects.call)(_react.updateForm, {
143
- kappSlug: payload.kappSlug,
144
- formSlug: payload.formSlug,
145
- form: {
146
- bridgedResources: cloneForm.bridgedResources,
147
- customHeadContent: cloneForm.customHeadContent,
148
- pages: cloneForm.pages,
149
- securityPolicies: cloneForm.securityPolicies,
150
- attributesMap: cloneForm.attributesMap,
151
- categorizations: cloneForm.categorizations
152
- }
153
- });
154
- case 13:
155
- _yield$call4 = _context3.sent;
156
- error = _yield$call4.error;
157
- form = _yield$call4.form;
158
- if (!error) {
159
- _context3.next = 20;
160
- break;
125
+ }
126
+ (0, _bundleCommon.addToastAlert)({
127
+ title: 'Error Cloning Form',
128
+ message: 'Could not find form to clone.'
129
+ });
130
+ _context3.next = 9;
131
+ return (0, _effects.put)(_settingsForms.actions.cloneFormComplete(payload));
132
+ case 9:
133
+ _context3.next = 24;
134
+ break;
135
+ case 11:
136
+ _context3.next = 13;
137
+ return (0, _effects.call)(_react.updateForm, {
138
+ kappSlug: payload.kappSlug,
139
+ formSlug: payload.formSlug,
140
+ form: {
141
+ bridgedResources: cloneForm.bridgedResources,
142
+ customHeadContent: cloneForm.customHeadContent,
143
+ pages: cloneForm.pages,
144
+ securityPolicies: cloneForm.securityPolicies,
145
+ attributesMap: cloneForm.attributesMap,
146
+ categorizations: cloneForm.categorizations
161
147
  }
162
- (0, _bundleCommon.addToastAlert)({
163
- title: 'Error Cloning Form',
164
- message: error.message
165
- });
148
+ });
149
+ case 13:
150
+ _yield$call4 = _context3.sent;
151
+ error = _yield$call4.error;
152
+ form = _yield$call4.form;
153
+ if (!error) {
166
154
  _context3.next = 20;
167
- return (0, _effects.put)(_settingsForms.actions.cloneFormComplete(payload));
168
- case 20:
169
- (0, _bundleCommon.addToast)("".concat(form.name, " cloned successfully from ").concat(cloneForm.name));
170
- if (typeof payload.callback === 'function') {
171
- payload.callback(form);
172
- }
173
- _context3.next = 24;
174
- return (0, _effects.put)(_settingsForms.actions.cloneFormComplete(payload));
175
- case 24:
176
- case "end":
177
- return _context3.stop();
178
- }
155
+ break;
156
+ }
157
+ (0, _bundleCommon.addToastAlert)({
158
+ title: 'Error Cloning Form',
159
+ message: error.message
160
+ });
161
+ _context3.next = 20;
162
+ return (0, _effects.put)(_settingsForms.actions.cloneFormComplete(payload));
163
+ case 20:
164
+ (0, _bundleCommon.addToast)("".concat(form.name, " cloned successfully from ").concat(cloneForm.name));
165
+ if (typeof payload.callback === 'function') {
166
+ payload.callback(form);
167
+ }
168
+ _context3.next = 24;
169
+ return (0, _effects.put)(_settingsForms.actions.cloneFormComplete(payload));
170
+ case 24:
171
+ case "end":
172
+ return _context3.stop();
179
173
  }
180
174
  }, _callee2);
181
175
  })();
@@ -183,372 +177,358 @@ function cloneFormSaga(_ref2) {
183
177
  function fetchFormSubmissionsSaga(action) {
184
178
  var kappSlug, pageToken, formSlug, q, searchBuilder, key, search, _yield$call5, submissions, nextPageToken, error;
185
179
  return (0, _regeneratorRuntime2["default"])().wrap(function fetchFormSubmissionsSaga$(_context4) {
186
- while (1) {
187
- switch (_context4.prev = _context4.next) {
188
- case 0:
189
- kappSlug = action.payload.kappSlug;
190
- pageToken = action.payload.pageToken;
191
- formSlug = action.payload.formSlug;
192
- q = action.payload.q;
193
- searchBuilder = new _react.SubmissionSearch().includes(['details', 'values', 'form', 'form.kapp']); // Add some of the optional parameters to the search
194
- if (pageToken) searchBuilder.pageToken(pageToken);
195
- // Loop over items in q and append them as "eq"
196
- // to search build
197
- if (q) {
198
- for (key in q) {
199
- searchBuilder.eq(key, q[key]);
200
- }
201
- }
202
- searchBuilder.end();
203
- search = searchBuilder.build();
204
- _context4.next = 11;
205
- return (0, _effects.call)(_react.searchSubmissions, {
206
- search: search,
207
- kapp: kappSlug,
208
- form: formSlug
209
- });
210
- case 11:
211
- _yield$call5 = _context4.sent;
212
- submissions = _yield$call5.submissions;
213
- nextPageToken = _yield$call5.nextPageToken;
214
- error = _yield$call5.error;
215
- if (!error) {
216
- _context4.next = 20;
217
- break;
180
+ while (1) switch (_context4.prev = _context4.next) {
181
+ case 0:
182
+ kappSlug = action.payload.kappSlug;
183
+ pageToken = action.payload.pageToken;
184
+ formSlug = action.payload.formSlug;
185
+ q = action.payload.q;
186
+ searchBuilder = new _react.SubmissionSearch().includes(['details', 'values', 'form', 'form.kapp']); // Add some of the optional parameters to the search
187
+ if (pageToken) searchBuilder.pageToken(pageToken);
188
+ // Loop over items in q and append them as "eq"
189
+ // to search build
190
+ if (q) {
191
+ for (key in q) {
192
+ searchBuilder.eq(key, q[key]);
218
193
  }
219
- _context4.next = 18;
220
- return (0, _effects.put)(_settingsForms.actions.setFormsError(error));
221
- case 18:
222
- _context4.next = 22;
194
+ }
195
+ searchBuilder.end();
196
+ search = searchBuilder.build();
197
+ _context4.next = 11;
198
+ return (0, _effects.call)(_react.searchSubmissions, {
199
+ search: search,
200
+ kapp: kappSlug,
201
+ form: formSlug
202
+ });
203
+ case 11:
204
+ _yield$call5 = _context4.sent;
205
+ submissions = _yield$call5.submissions;
206
+ nextPageToken = _yield$call5.nextPageToken;
207
+ error = _yield$call5.error;
208
+ if (!error) {
209
+ _context4.next = 20;
223
210
  break;
224
- case 20:
225
- _context4.next = 22;
226
- return (0, _effects.put)(_settingsForms.actions.setFormSubmissions({
227
- submissions: submissions,
228
- nextPageToken: nextPageToken
229
- }));
230
- case 22:
231
- case "end":
232
- return _context4.stop();
233
- }
211
+ }
212
+ _context4.next = 18;
213
+ return (0, _effects.put)(_settingsForms.actions.setFormsError(error));
214
+ case 18:
215
+ _context4.next = 22;
216
+ break;
217
+ case 20:
218
+ _context4.next = 22;
219
+ return (0, _effects.put)(_settingsForms.actions.setFormSubmissions({
220
+ submissions: submissions,
221
+ nextPageToken: nextPageToken
222
+ }));
223
+ case 22:
224
+ case "end":
225
+ return _context4.stop();
234
226
  }
235
227
  }, _marked2);
236
228
  }
237
229
  function fetchFormSubmissionSaga(action) {
238
230
  var id, _yield$call6, submission, error;
239
231
  return (0, _regeneratorRuntime2["default"])().wrap(function fetchFormSubmissionSaga$(_context5) {
240
- while (1) {
241
- switch (_context5.prev = _context5.next) {
242
- case 0:
243
- id = action.payload.id;
244
- _context5.next = 3;
245
- return (0, _effects.call)(_react.fetchSubmission, {
246
- id: id,
247
- include: _settingsForms.SUBMISSION_INCLUDES
248
- });
249
- case 3:
250
- _yield$call6 = _context5.sent;
251
- submission = _yield$call6.submission;
252
- error = _yield$call6.error;
253
- if (!error) {
254
- _context5.next = 11;
255
- break;
256
- }
257
- _context5.next = 9;
258
- return (0, _effects.put)(_settingsForms.actions.setFormsError(error));
259
- case 9:
260
- _context5.next = 13;
232
+ while (1) switch (_context5.prev = _context5.next) {
233
+ case 0:
234
+ id = action.payload.id;
235
+ _context5.next = 3;
236
+ return (0, _effects.call)(_react.fetchSubmission, {
237
+ id: id,
238
+ include: _settingsForms.SUBMISSION_INCLUDES
239
+ });
240
+ case 3:
241
+ _yield$call6 = _context5.sent;
242
+ submission = _yield$call6.submission;
243
+ error = _yield$call6.error;
244
+ if (!error) {
245
+ _context5.next = 11;
261
246
  break;
262
- case 11:
263
- _context5.next = 13;
264
- return (0, _effects.put)(_settingsForms.actions.setFormSubmission(submission));
265
- case 13:
266
- case "end":
267
- return _context5.stop();
268
- }
247
+ }
248
+ _context5.next = 9;
249
+ return (0, _effects.put)(_settingsForms.actions.setFormsError(error));
250
+ case 9:
251
+ _context5.next = 13;
252
+ break;
253
+ case 11:
254
+ _context5.next = 13;
255
+ return (0, _effects.put)(_settingsForms.actions.setFormSubmission(submission));
256
+ case 13:
257
+ case "end":
258
+ return _context5.stop();
269
259
  }
270
260
  }, _marked3);
271
261
  }
272
262
  function fetchKappSaga(action) {
273
263
  var _yield$call7, error, kapp, me;
274
264
  return (0, _regeneratorRuntime2["default"])().wrap(function fetchKappSaga$(_context6) {
275
- while (1) {
276
- switch (_context6.prev = _context6.next) {
277
- case 0:
278
- _context6.next = 2;
279
- return (0, _effects.call)(_react.fetchKapp, {
280
- kappSlug: action.payload,
281
- include: 'formTypes, categories, formAttributeDefinitions'
282
- });
283
- case 2:
284
- _yield$call7 = _context6.sent;
285
- error = _yield$call7.error;
286
- kapp = _yield$call7.kapp;
287
- if (!error) {
288
- _context6.next = 10;
289
- break;
290
- }
291
- _context6.next = 8;
292
- return (0, _effects.put)(_settingsForms.actions.setFormsError(error));
293
- case 8:
294
- _context6.next = 18;
265
+ while (1) switch (_context6.prev = _context6.next) {
266
+ case 0:
267
+ _context6.next = 2;
268
+ return (0, _effects.call)(_react.fetchKapp, {
269
+ kappSlug: action.payload,
270
+ include: 'formTypes, categories, formAttributeDefinitions'
271
+ });
272
+ case 2:
273
+ _yield$call7 = _context6.sent;
274
+ error = _yield$call7.error;
275
+ kapp = _yield$call7.kapp;
276
+ if (!error) {
277
+ _context6.next = 10;
295
278
  break;
296
- case 10:
297
- _context6.next = 12;
298
- return (0, _effects.select)(function (state) {
299
- return state.app.profile;
300
- });
301
- case 12:
302
- me = _context6.sent;
303
- if (!(me.spaceAdmin && !kapp.formAttributeDefinitions.find(function (d) {
304
- return d.name === 'Form Configuration';
305
- }))) {
306
- _context6.next = 16;
307
- break;
308
- }
279
+ }
280
+ _context6.next = 8;
281
+ return (0, _effects.put)(_settingsForms.actions.setFormsError(error));
282
+ case 8:
283
+ _context6.next = 18;
284
+ break;
285
+ case 10:
286
+ _context6.next = 12;
287
+ return (0, _effects.select)(function (state) {
288
+ return state.app.profile;
289
+ });
290
+ case 12:
291
+ me = _context6.sent;
292
+ if (!(me.spaceAdmin && !kapp.formAttributeDefinitions.find(function (d) {
293
+ return d.name === 'Form Configuration';
294
+ }))) {
309
295
  _context6.next = 16;
310
- return (0, _effects.call)(_axios["default"].request, {
311
- method: 'post',
312
- url: "".concat(_react.bundle.apiLocation(), "/kapps/").concat(kapp.slug, "/formAttributeDefinitions"),
313
- data: {
314
- name: 'Form Configuration',
315
- allowsMultiple: false
316
- }
317
- });
318
- case 16:
319
- _context6.next = 18;
320
- return (0, _effects.put)(_settingsForms.actions.setKapp(kapp));
321
- case 18:
322
- case "end":
323
- return _context6.stop();
324
- }
296
+ break;
297
+ }
298
+ _context6.next = 16;
299
+ return (0, _effects.call)(_axios["default"].request, {
300
+ method: 'post',
301
+ url: "".concat(_react.bundle.apiLocation(), "/kapps/").concat(kapp.slug, "/formAttributeDefinitions"),
302
+ data: {
303
+ name: 'Form Configuration',
304
+ allowsMultiple: false
305
+ }
306
+ });
307
+ case 16:
308
+ _context6.next = 18;
309
+ return (0, _effects.put)(_settingsForms.actions.setKapp(kapp));
310
+ case 18:
311
+ case "end":
312
+ return _context6.stop();
325
313
  }
326
314
  }, _marked4);
327
315
  }
328
316
  function updateFormSaga(action) {
329
317
  var currentForm, currentFormChanges, formContent, _yield$call8, error;
330
318
  return (0, _regeneratorRuntime2["default"])().wrap(function updateFormSaga$(_context7) {
331
- while (1) {
332
- switch (_context7.prev = _context7.next) {
333
- case 0:
334
- currentForm = action.payload.form;
335
- currentFormChanges = action.payload.inputs;
336
- formContent = {
337
- attributesMap: {
338
- 'Permitted Subtasks': currentFormChanges['Permitted Subtasks'] ? [currentFormChanges['Permitted Subtasks'].join(',')] : [],
339
- 'Prohibit Subtasks': currentFormChanges['Prohibit Subtasks'] ? [currentFormChanges['Prohibit Subtasks']] : [],
340
- 'Allow Reassignment': currentFormChanges['Allow Reassignment'] ? [currentFormChanges['Allow Reassignment']] : [],
341
- 'Assignable Teams': currentFormChanges['Assignable Teams'] ? currentFormChanges['Assignable Teams'] : [],
342
- 'Notification Template Name - Create': currentFormChanges['Notification Template Name - Create'] ? [currentFormChanges['Notification Template Name - Create']] : [],
343
- 'Notification Template Name - Complete': currentFormChanges['Notification Template Name - Complete'] ? [currentFormChanges['Notification Template Name - Complete']] : [],
344
- 'Owning Team': currentFormChanges['Owning Team'] ? currentFormChanges['Owning Team'] : [],
345
- 'Form Configuration': [JSON.stringify({
346
- columns: currentFormChanges.columns.toJS()
347
- })]
348
- },
349
- status: currentFormChanges.status,
350
- type: currentFormChanges.type,
351
- description: currentFormChanges.description,
352
- categorizations: currentFormChanges.categories
353
- };
354
- _context7.next = 5;
355
- return (0, _effects.call)(_react.updateForm, {
356
- kappSlug: action.payload.kappSlug,
357
- formSlug: currentForm.slug,
358
- form: formContent,
359
- include: _settingsForms.FORM_INCLUDES
360
- });
361
- case 5:
362
- _yield$call8 = _context7.sent;
363
- error = _yield$call8.error;
364
- if (error) {
365
- _context7.next = 12;
366
- break;
367
- }
368
- _context7.next = 10;
369
- return (0, _effects.put)((0, _bundleCommon.addSuccess)('The form was successfully updated.', 'Update Successful'));
370
- case 10:
319
+ while (1) switch (_context7.prev = _context7.next) {
320
+ case 0:
321
+ currentForm = action.payload.form;
322
+ currentFormChanges = action.payload.inputs;
323
+ formContent = {
324
+ attributesMap: {
325
+ 'Permitted Subtasks': currentFormChanges['Permitted Subtasks'] ? [currentFormChanges['Permitted Subtasks'].join(',')] : [],
326
+ 'Prohibit Subtasks': currentFormChanges['Prohibit Subtasks'] ? [currentFormChanges['Prohibit Subtasks']] : [],
327
+ 'Allow Reassignment': currentFormChanges['Allow Reassignment'] ? [currentFormChanges['Allow Reassignment']] : [],
328
+ 'Assignable Teams': currentFormChanges['Assignable Teams'] ? currentFormChanges['Assignable Teams'] : [],
329
+ 'Notification Template Name - Create': currentFormChanges['Notification Template Name - Create'] ? [currentFormChanges['Notification Template Name - Create']] : [],
330
+ 'Notification Template Name - Complete': currentFormChanges['Notification Template Name - Complete'] ? [currentFormChanges['Notification Template Name - Complete']] : [],
331
+ 'Owning Team': currentFormChanges['Owning Team'] ? currentFormChanges['Owning Team'] : [],
332
+ 'Form Configuration': [JSON.stringify({
333
+ columns: currentFormChanges.columns.toJS()
334
+ })]
335
+ },
336
+ status: currentFormChanges.status,
337
+ type: currentFormChanges.type,
338
+ description: currentFormChanges.description,
339
+ categorizations: currentFormChanges.categories
340
+ };
341
+ _context7.next = 5;
342
+ return (0, _effects.call)(_react.updateForm, {
343
+ kappSlug: action.payload.kappSlug,
344
+ formSlug: currentForm.slug,
345
+ form: formContent,
346
+ include: _settingsForms.FORM_INCLUDES
347
+ });
348
+ case 5:
349
+ _yield$call8 = _context7.sent;
350
+ error = _yield$call8.error;
351
+ if (error) {
371
352
  _context7.next = 12;
372
- return (0, _effects.put)(_settingsForms.actions.fetchForm({
373
- kappSlug: action.payload.kappSlug,
374
- formSlug: currentForm.slug
375
- }));
376
- case 12:
377
- case "end":
378
- return _context7.stop();
379
- }
353
+ break;
354
+ }
355
+ _context7.next = 10;
356
+ return (0, _effects.put)((0, _bundleCommon.addSuccess)('The form was successfully updated.', 'Update Successful'));
357
+ case 10:
358
+ _context7.next = 12;
359
+ return (0, _effects.put)(_settingsForms.actions.fetchForm({
360
+ kappSlug: action.payload.kappSlug,
361
+ formSlug: currentForm.slug
362
+ }));
363
+ case 12:
364
+ case "end":
365
+ return _context7.stop();
380
366
  }
381
367
  }, _marked5);
382
368
  }
383
369
  function fetchNotificationsSaga() {
384
370
  var search, _yield$call9, error, submissions;
385
371
  return (0, _regeneratorRuntime2["default"])().wrap(function fetchNotificationsSaga$(_context8) {
386
- while (1) {
387
- switch (_context8.prev = _context8.next) {
388
- case 0:
389
- search = new _react.SubmissionSearch(true).index('values[Name]').includes(['details', 'values']).build();
390
- _context8.next = 3;
391
- return (0, _effects.call)(_react.searchSubmissions, {
392
- search: search,
393
- form: 'notification-data',
394
- datastore: true
395
- });
396
- case 3:
397
- _yield$call9 = _context8.sent;
398
- error = _yield$call9.error;
399
- submissions = _yield$call9.submissions;
400
- if (!error) {
401
- _context8.next = 11;
402
- break;
403
- }
404
- _context8.next = 9;
405
- return (0, _effects.put)(_settingsForms.actions.setFormsError(error));
406
- case 9:
407
- _context8.next = 13;
372
+ while (1) switch (_context8.prev = _context8.next) {
373
+ case 0:
374
+ search = new _react.SubmissionSearch(true).index('values[Name]').includes(['details', 'values']).build();
375
+ _context8.next = 3;
376
+ return (0, _effects.call)(_react.searchSubmissions, {
377
+ search: search,
378
+ form: 'notification-data',
379
+ datastore: true
380
+ });
381
+ case 3:
382
+ _yield$call9 = _context8.sent;
383
+ error = _yield$call9.error;
384
+ submissions = _yield$call9.submissions;
385
+ if (!error) {
386
+ _context8.next = 11;
408
387
  break;
409
- case 11:
410
- _context8.next = 13;
411
- return (0, _effects.put)(_settingsForms.actions.setNotifications(submissions));
412
- case 13:
413
- case "end":
414
- return _context8.stop();
415
- }
388
+ }
389
+ _context8.next = 9;
390
+ return (0, _effects.put)(_settingsForms.actions.setFormsError(error));
391
+ case 9:
392
+ _context8.next = 13;
393
+ break;
394
+ case 11:
395
+ _context8.next = 13;
396
+ return (0, _effects.put)(_settingsForms.actions.setNotifications(submissions));
397
+ case 13:
398
+ case "end":
399
+ return _context8.stop();
416
400
  }
417
401
  }, _marked6);
418
402
  }
419
403
  function createFormSaga(action) {
420
404
  var _yield$call10, error, form, formContent, createdForm;
421
405
  return (0, _regeneratorRuntime2["default"])().wrap(function createFormSaga$(_context9) {
422
- while (1) {
423
- switch (_context9.prev = _context9.next) {
424
- case 0:
425
- _context9.next = 2;
426
- return (0, _effects.call)(_react.fetchForm, {
427
- kappSlug: action.payload.kappSlug,
428
- formSlug: action.payload.inputs['Template to Clone'],
429
- include: _settingsForms.FORM_FULL_INCLUDES
430
- });
431
- case 2:
432
- _yield$call10 = _context9.sent;
433
- error = _yield$call10.error;
434
- form = _yield$call10.form;
435
- if (!error) {
436
- _context9.next = 8;
437
- break;
438
- }
406
+ while (1) switch (_context9.prev = _context9.next) {
407
+ case 0:
408
+ _context9.next = 2;
409
+ return (0, _effects.call)(_react.fetchForm, {
410
+ kappSlug: action.payload.kappSlug,
411
+ formSlug: action.payload.inputs['Template to Clone'],
412
+ include: _settingsForms.FORM_FULL_INCLUDES
413
+ });
414
+ case 2:
415
+ _yield$call10 = _context9.sent;
416
+ error = _yield$call10.error;
417
+ form = _yield$call10.form;
418
+ if (!error) {
439
419
  _context9.next = 8;
440
- return (0, _effects.put)(_settingsForms.actions.setFormsError(error));
441
- case 8:
442
- formContent = (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, form), {}, {
443
- slug: action.payload.inputs.Slug,
444
- name: action.payload.inputs.Name,
445
- description: action.payload.inputs.Description,
446
- status: action.payload.inputs.Status,
447
- type: action.payload.inputs.Type,
448
- attributesMap: (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, form.attributesMap), {}, {
449
- 'Owning Team': action.payload.inputs['Owning Team']
450
- })
451
- });
452
- _context9.next = 11;
453
- return (0, _effects.call)(_react.createForm, {
454
- kappSlug: action.payload.kappSlug,
455
- form: formContent,
456
- include: _settingsForms.FORM_FULL_INCLUDES
457
- });
458
- case 11:
459
- createdForm = _context9.sent;
460
- if (!createdForm.error) {
461
- _context9.next = 17;
462
- break;
463
- }
464
- _context9.next = 15;
465
- return (0, _effects.put)((0, _bundleCommon.addError)(createdForm.error.message));
466
- case 15:
467
- _context9.next = 18;
468
420
  break;
469
- case 17:
470
- if (typeof action.payload.callback === 'function') {
471
- action.payload.callback(createdForm.form.slug);
472
- }
473
- case 18:
474
- case "end":
475
- return _context9.stop();
476
- }
421
+ }
422
+ _context9.next = 8;
423
+ return (0, _effects.put)(_settingsForms.actions.setFormsError(error));
424
+ case 8:
425
+ formContent = (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, form), {}, {
426
+ slug: action.payload.inputs.Slug,
427
+ name: action.payload.inputs.Name,
428
+ description: action.payload.inputs.Description,
429
+ status: action.payload.inputs.Status,
430
+ type: action.payload.inputs.Type,
431
+ attributesMap: (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, form.attributesMap), {}, {
432
+ 'Owning Team': action.payload.inputs['Owning Team']
433
+ })
434
+ });
435
+ _context9.next = 11;
436
+ return (0, _effects.call)(_react.createForm, {
437
+ kappSlug: action.payload.kappSlug,
438
+ form: formContent,
439
+ include: _settingsForms.FORM_FULL_INCLUDES
440
+ });
441
+ case 11:
442
+ createdForm = _context9.sent;
443
+ if (!createdForm.error) {
444
+ _context9.next = 17;
445
+ break;
446
+ }
447
+ _context9.next = 15;
448
+ return (0, _effects.put)((0, _bundleCommon.addError)(createdForm.error.message));
449
+ case 15:
450
+ _context9.next = 18;
451
+ break;
452
+ case 17:
453
+ if (typeof action.payload.callback === 'function') {
454
+ action.payload.callback(createdForm.form.slug);
455
+ }
456
+ case 18:
457
+ case "end":
458
+ return _context9.stop();
477
459
  }
478
460
  }, _marked7);
479
461
  }
480
462
  function fetchAllSubmissionsSaga(action) {
481
463
  var _action$payload, pageToken, accumulator, formSlug, kappSlug, createdAt, coreState, q, searcher, key, _yield$call11, submissions, _yield$call11$nextPag, nextPageToken, error;
482
464
  return (0, _regeneratorRuntime2["default"])().wrap(function fetchAllSubmissionsSaga$(_context10) {
483
- while (1) {
484
- switch (_context10.prev = _context10.next) {
485
- case 0:
486
- _action$payload = action.payload, pageToken = _action$payload.pageToken, accumulator = _action$payload.accumulator, formSlug = _action$payload.formSlug, kappSlug = _action$payload.kappSlug, createdAt = _action$payload.createdAt, coreState = _action$payload.coreState, q = _action$payload.q;
487
- searcher = new _react.SubmissionSearch(false); // changed to false!
488
- if (q) {
489
- for (key in q) {
490
- searcher.eq(key, q[key]);
491
- }
492
- }
493
- if (createdAt) {
494
- createdAt['startDate'] && searcher.startDate(createdAt['startDate']);
495
- createdAt['endDate'] && searcher.endDate(createdAt['endDate']);
496
- }
497
- if (coreState) {
498
- searcher.coreState(coreState);
499
- }
500
- searcher.include('values,form,form.kapp');
501
- searcher.limit(1000);
502
- if (pageToken) {
503
- searcher.pageToken(pageToken);
504
- }
505
- _context10.next = 10;
506
- return (0, _effects.call)(_react.searchSubmissions, {
507
- search: searcher.build(),
508
- form: formSlug,
509
- kapp: kappSlug
510
- });
511
- case 10:
512
- _yield$call11 = _context10.sent;
513
- submissions = _yield$call11.submissions;
514
- _yield$call11$nextPag = _yield$call11.nextPageToken;
515
- nextPageToken = _yield$call11$nextPag === void 0 ? null : _yield$call11$nextPag;
516
- error = _yield$call11.error;
517
- // Update the action with the new results
518
- action = (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, action), {}, {
519
- payload: (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, action.payload), {}, {
520
- accumulator: [].concat((0, _toConsumableArray2["default"])(accumulator), (0, _toConsumableArray2["default"])(submissions)),
521
- pageToken: nextPageToken
522
- })
523
- });
524
- _context10.next = 18;
525
- return (0, _effects.put)(_settingsForms.actions.setExportCount(action.payload.accumulator.length));
526
- case 18:
527
- if (!nextPageToken) {
528
- _context10.next = 23;
529
- break;
465
+ while (1) switch (_context10.prev = _context10.next) {
466
+ case 0:
467
+ _action$payload = action.payload, pageToken = _action$payload.pageToken, accumulator = _action$payload.accumulator, formSlug = _action$payload.formSlug, kappSlug = _action$payload.kappSlug, createdAt = _action$payload.createdAt, coreState = _action$payload.coreState, q = _action$payload.q;
468
+ searcher = new _react.SubmissionSearch(false); // changed to false!
469
+ if (q) {
470
+ for (key in q) {
471
+ searcher.eq(key, q[key]);
530
472
  }
531
- _context10.next = 21;
532
- return (0, _effects.call)(fetchAllSubmissionsSaga, action);
533
- case 21:
534
- _context10.next = 29;
473
+ }
474
+ if (createdAt) {
475
+ createdAt['startDate'] && searcher.startDate(createdAt['startDate']);
476
+ createdAt['endDate'] && searcher.endDate(createdAt['endDate']);
477
+ }
478
+ if (coreState) {
479
+ searcher.coreState(coreState);
480
+ }
481
+ searcher.include('values,form,form.kapp');
482
+ searcher.limit(1000);
483
+ if (pageToken) {
484
+ searcher.pageToken(pageToken);
485
+ }
486
+ _context10.next = 10;
487
+ return (0, _effects.call)(_react.searchSubmissions, {
488
+ search: searcher.build(),
489
+ form: formSlug,
490
+ kapp: kappSlug
491
+ });
492
+ case 10:
493
+ _yield$call11 = _context10.sent;
494
+ submissions = _yield$call11.submissions;
495
+ _yield$call11$nextPag = _yield$call11.nextPageToken;
496
+ nextPageToken = _yield$call11$nextPag === void 0 ? null : _yield$call11$nextPag;
497
+ error = _yield$call11.error;
498
+ // Update the action with the new results
499
+ action = (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, action), {}, {
500
+ payload: (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, action.payload), {}, {
501
+ accumulator: [].concat((0, _toConsumableArray2["default"])(accumulator), (0, _toConsumableArray2["default"])(submissions)),
502
+ pageToken: nextPageToken
503
+ })
504
+ });
505
+ _context10.next = 18;
506
+ return (0, _effects.put)(_settingsForms.actions.setExportCount(action.payload.accumulator.length));
507
+ case 18:
508
+ if (!nextPageToken) {
509
+ _context10.next = 23;
535
510
  break;
536
- case 23:
537
- if (!error) {
538
- _context10.next = 27;
539
- break;
540
- }
541
- // What should we do?
542
- console.log(error);
543
- _context10.next = 29;
511
+ }
512
+ _context10.next = 21;
513
+ return (0, _effects.call)(fetchAllSubmissionsSaga, action);
514
+ case 21:
515
+ _context10.next = 29;
516
+ break;
517
+ case 23:
518
+ if (!error) {
519
+ _context10.next = 27;
544
520
  break;
545
- case 27:
546
- _context10.next = 29;
547
- return (0, _effects.put)(_settingsForms.actions.setExportSubmissions(action.payload.accumulator));
548
- case 29:
549
- case "end":
550
- return _context10.stop();
551
- }
521
+ }
522
+ // What should we do?
523
+ console.log(error);
524
+ _context10.next = 29;
525
+ break;
526
+ case 27:
527
+ _context10.next = 29;
528
+ return (0, _effects.put)(_settingsForms.actions.setExportSubmissions(action.payload.accumulator));
529
+ case 29:
530
+ case "end":
531
+ return _context10.stop();
552
532
  }
553
533
  }, _marked8);
554
534
  }
@@ -557,89 +537,85 @@ function deleteFormSaga(_ref3) {
557
537
  return /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee3() {
558
538
  var _yield$call12, form, error;
559
539
  return (0, _regeneratorRuntime2["default"])().wrap(function _callee3$(_context11) {
560
- while (1) {
561
- switch (_context11.prev = _context11.next) {
562
- case 0:
563
- _context11.next = 2;
564
- return (0, _effects.call)(_react.deleteForm, {
565
- kappSlug: payload.kappSlug,
566
- formSlug: payload.formSlug
567
- });
568
- case 2:
569
- _yield$call12 = _context11.sent;
570
- form = _yield$call12.form;
571
- error = _yield$call12.error;
572
- if (!form) {
573
- _context11.next = 14;
574
- break;
575
- }
576
- if (!(typeof payload.onSuccess === 'function')) {
577
- _context11.next = 9;
578
- break;
579
- }
540
+ while (1) switch (_context11.prev = _context11.next) {
541
+ case 0:
542
+ _context11.next = 2;
543
+ return (0, _effects.call)(_react.deleteForm, {
544
+ kappSlug: payload.kappSlug,
545
+ formSlug: payload.formSlug
546
+ });
547
+ case 2:
548
+ _yield$call12 = _context11.sent;
549
+ form = _yield$call12.form;
550
+ error = _yield$call12.error;
551
+ if (!form) {
552
+ _context11.next = 14;
553
+ break;
554
+ }
555
+ if (!(typeof payload.onSuccess === 'function')) {
580
556
  _context11.next = 9;
581
- return (0, _effects.call)(payload.onSuccess, form);
582
- case 9:
583
- _context11.next = 11;
584
- return (0, _effects.put)(_settingsForms.actions.deleteFormComplete(payload));
585
- case 11:
586
- (0, _bundleCommon.addToast)('Form deleted successfully.');
587
- _context11.next = 15;
588
557
  break;
589
- case 14:
590
- (0, _bundleCommon.addToastAlert)({
591
- title: 'Error Deleting Form',
592
- message: error.message
593
- });
594
- case 15:
595
- case "end":
596
- return _context11.stop();
597
- }
558
+ }
559
+ _context11.next = 9;
560
+ return (0, _effects.call)(payload.onSuccess, form);
561
+ case 9:
562
+ _context11.next = 11;
563
+ return (0, _effects.put)(_settingsForms.actions.deleteFormComplete(payload));
564
+ case 11:
565
+ (0, _bundleCommon.addToast)('Form deleted successfully.');
566
+ _context11.next = 15;
567
+ break;
568
+ case 14:
569
+ (0, _bundleCommon.addToastAlert)({
570
+ title: 'Error Deleting Form',
571
+ message: error.message
572
+ });
573
+ case 15:
574
+ case "end":
575
+ return _context11.stop();
598
576
  }
599
577
  }, _callee3);
600
578
  })();
601
579
  }
602
580
  function watchSettingsForms() {
603
581
  return (0, _regeneratorRuntime2["default"])().wrap(function watchSettingsForms$(_context12) {
604
- while (1) {
605
- switch (_context12.prev = _context12.next) {
606
- case 0:
607
- _context12.next = 2;
608
- return (0, _effects.takeEvery)(_settingsForms.types.FETCH_FORM, fetchFormSaga);
609
- case 2:
610
- _context12.next = 4;
611
- return (0, _effects.takeEvery)(_settingsForms.types.FETCH_FORM_REQUEST, fetchFormRequestSaga);
612
- case 4:
613
- _context12.next = 6;
614
- return (0, _effects.takeEvery)(_settingsForms.types.FETCH_KAPP, fetchKappSaga);
615
- case 6:
616
- _context12.next = 8;
617
- return (0, _effects.takeEvery)(_settingsForms.types.UPDATE_QUEUE_FORM, updateFormSaga);
618
- case 8:
619
- _context12.next = 10;
620
- return (0, _effects.takeEvery)(_settingsForms.types.CREATE_FORM, createFormSaga);
621
- case 10:
622
- _context12.next = 12;
623
- return (0, _effects.takeEvery)(_settingsForms.types.CLONE_FORM_REQUEST, cloneFormSaga);
624
- case 12:
625
- _context12.next = 14;
626
- return (0, _effects.takeEvery)(_settingsForms.types.FETCH_NOTIFICATIONS, fetchNotificationsSaga);
627
- case 14:
628
- _context12.next = 16;
629
- return (0, _effects.takeEvery)(_settingsForms.types.FETCH_FORM_SUBMISSIONS, fetchFormSubmissionsSaga);
630
- case 16:
631
- _context12.next = 18;
632
- return (0, _effects.takeEvery)(_settingsForms.types.FETCH_FORM_SUBMISSION, fetchFormSubmissionSaga);
633
- case 18:
634
- _context12.next = 20;
635
- return (0, _effects.takeEvery)(_settingsForms.types.FETCH_ALL_SUBMISSIONS, fetchAllSubmissionsSaga);
636
- case 20:
637
- _context12.next = 22;
638
- return (0, _effects.takeEvery)(_settingsForms.types.DELETE_FORM_REQUEST, deleteFormSaga);
639
- case 22:
640
- case "end":
641
- return _context12.stop();
642
- }
582
+ while (1) switch (_context12.prev = _context12.next) {
583
+ case 0:
584
+ _context12.next = 2;
585
+ return (0, _effects.takeEvery)(_settingsForms.types.FETCH_FORM, fetchFormSaga);
586
+ case 2:
587
+ _context12.next = 4;
588
+ return (0, _effects.takeEvery)(_settingsForms.types.FETCH_FORM_REQUEST, fetchFormRequestSaga);
589
+ case 4:
590
+ _context12.next = 6;
591
+ return (0, _effects.takeEvery)(_settingsForms.types.FETCH_KAPP, fetchKappSaga);
592
+ case 6:
593
+ _context12.next = 8;
594
+ return (0, _effects.takeEvery)(_settingsForms.types.UPDATE_QUEUE_FORM, updateFormSaga);
595
+ case 8:
596
+ _context12.next = 10;
597
+ return (0, _effects.takeEvery)(_settingsForms.types.CREATE_FORM, createFormSaga);
598
+ case 10:
599
+ _context12.next = 12;
600
+ return (0, _effects.takeEvery)(_settingsForms.types.CLONE_FORM_REQUEST, cloneFormSaga);
601
+ case 12:
602
+ _context12.next = 14;
603
+ return (0, _effects.takeEvery)(_settingsForms.types.FETCH_NOTIFICATIONS, fetchNotificationsSaga);
604
+ case 14:
605
+ _context12.next = 16;
606
+ return (0, _effects.takeEvery)(_settingsForms.types.FETCH_FORM_SUBMISSIONS, fetchFormSubmissionsSaga);
607
+ case 16:
608
+ _context12.next = 18;
609
+ return (0, _effects.takeEvery)(_settingsForms.types.FETCH_FORM_SUBMISSION, fetchFormSubmissionSaga);
610
+ case 18:
611
+ _context12.next = 20;
612
+ return (0, _effects.takeEvery)(_settingsForms.types.FETCH_ALL_SUBMISSIONS, fetchAllSubmissionsSaga);
613
+ case 20:
614
+ _context12.next = 22;
615
+ return (0, _effects.takeEvery)(_settingsForms.types.DELETE_FORM_REQUEST, deleteFormSaga);
616
+ case 22:
617
+ case "end":
618
+ return _context12.stop();
643
619
  }
644
620
  }, _marked9);
645
621
  }