@ukhomeoffice/cop-react-form-renderer 2.7.4 → 2.8.4
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/dist/components/CheckYourAnswers/CheckYourAnswers.stories.mdx +392 -331
- package/dist/components/CheckYourAnswers/CheckYourAnswers.test.js +66 -7
- package/dist/components/FormRenderer/FormRenderer.js +29 -9
- package/dist/components/FormRenderer/FormRenderer.test.js +10 -9
- package/dist/components/FormRenderer/helpers/getSubmissionStatus.js +10 -3
- package/dist/components/FormRenderer/helpers/getSubmissionStatus.test.js +3 -3
- package/dist/components/TaskList/Task.js +7 -1
- package/dist/components/TaskList/TaskList.js +3 -3
- package/dist/components/TaskList/TaskList.scss +5 -6
- package/dist/json/group.data.json +21 -0
- package/dist/json/group.json +418 -0
- package/dist/json/userProfile.data.json +6 -0
- package/dist/utils/CheckYourAnswers/getCYARow.js +1 -0
- package/dist/utils/CheckYourAnswers/getCYARow.test.js +2 -0
- package/dist/utils/CheckYourAnswers/getCYARowForGroup.js +82 -0
- package/dist/utils/CheckYourAnswers/getCYARowForGroup.test.js +78 -0
- package/dist/utils/CheckYourAnswers/getCYARowsForPage.js +29 -3
- package/dist/utils/CheckYourAnswers/getCYARowsForPage.test.js +61 -0
- package/package.json +1 -1
|
@@ -22,6 +22,10 @@ var _userProfileData = _interopRequireDefault(require("../../json/userProfile.da
|
|
|
22
22
|
|
|
23
23
|
var _userProfile = _interopRequireDefault(require("../../json/userProfile.json"));
|
|
24
24
|
|
|
25
|
+
var _groupData = _interopRequireDefault(require("../../json/group.data.json"));
|
|
26
|
+
|
|
27
|
+
var _group = _interopRequireDefault(require("../../json/group.json"));
|
|
28
|
+
|
|
25
29
|
var _groupOfRow = _interopRequireDefault(require("../../json/groupOfRow.json"));
|
|
26
30
|
|
|
27
31
|
var _utils = _interopRequireDefault(require("../../utils"));
|
|
@@ -378,14 +382,15 @@ describe('components', function () {
|
|
|
378
382
|
}
|
|
379
383
|
}, _callee12);
|
|
380
384
|
})));
|
|
381
|
-
it('
|
|
382
|
-
var GROUP_PAGES, cya,
|
|
385
|
+
it('Show answers from multiple address fields into in one DL', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee14() {
|
|
386
|
+
var DATA, GROUP_PAGES, cya, groupedComponent, keyGroup, valueGroup, changeButtonDiv, changeButton;
|
|
383
387
|
return regeneratorRuntime.wrap(function _callee14$(_context14) {
|
|
384
388
|
while (1) {
|
|
385
389
|
switch (_context14.prev = _context14.next) {
|
|
386
390
|
case 0:
|
|
387
|
-
|
|
388
|
-
|
|
391
|
+
DATA = _utils.default.Data.setupForm(_group.default.pages, _group.default.components, _groupData.default);
|
|
392
|
+
GROUP_PAGES = _utils.default.FormPage.getAll(_group.default.pages, _group.default.components, _objectSpread({}, DATA));
|
|
393
|
+
_context14.next = 4;
|
|
389
394
|
return (0, _testUtils.act)( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee13() {
|
|
390
395
|
return regeneratorRuntime.wrap(function _callee13$(_context13) {
|
|
391
396
|
while (1) {
|
|
@@ -395,7 +400,7 @@ describe('components', function () {
|
|
|
395
400
|
pages: GROUP_PAGES,
|
|
396
401
|
onRowAction: ON_ROW_ACTION,
|
|
397
402
|
onAction: ON_ACTION,
|
|
398
|
-
|
|
403
|
+
hide_title: true
|
|
399
404
|
}), container);
|
|
400
405
|
|
|
401
406
|
case 1:
|
|
@@ -406,6 +411,60 @@ describe('components', function () {
|
|
|
406
411
|
}, _callee13);
|
|
407
412
|
})));
|
|
408
413
|
|
|
414
|
+
case 4:
|
|
415
|
+
cya = checkCYA(container);
|
|
416
|
+
groupedComponent = cya.childNodes[10];
|
|
417
|
+
keyGroup = groupedComponent.childNodes[0].childNodes[0].childNodes[0];
|
|
418
|
+
expect(keyGroup.tagName).toEqual('DT');
|
|
419
|
+
expect(keyGroup.textContent).toEqual('Address details (optional)');
|
|
420
|
+
valueGroup = groupedComponent.childNodes[0].childNodes[0].childNodes[1];
|
|
421
|
+
expect(valueGroup.childNodes.length).toEqual(4);
|
|
422
|
+
expect(valueGroup.tagName).toEqual('DD');
|
|
423
|
+
expect(valueGroup.childNodes[0].textContent).toContain('10 Downing Street');
|
|
424
|
+
expect(valueGroup.childNodes[1].textContent).toContain('City of Westminster');
|
|
425
|
+
expect(valueGroup.childNodes[2].textContent).toContain('London');
|
|
426
|
+
expect(valueGroup.childNodes[3].textContent).toContain('SW1A 2AA');
|
|
427
|
+
changeButtonDiv = groupedComponent.childNodes[0].childNodes[0].childNodes[2];
|
|
428
|
+
expect(changeButtonDiv.classList).toContain('govuk-summary-list__actions');
|
|
429
|
+
changeButton = changeButtonDiv.childNodes[0];
|
|
430
|
+
expect(changeButton.tagName).toEqual('A');
|
|
431
|
+
expect(changeButton.textContent).toEqual('Change address details');
|
|
432
|
+
|
|
433
|
+
case 21:
|
|
434
|
+
case "end":
|
|
435
|
+
return _context14.stop();
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
}, _callee14);
|
|
439
|
+
})));
|
|
440
|
+
it('should render a group with one action button', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee16() {
|
|
441
|
+
var GROUP_PAGES, cya, namesGroup, firstNameRow, surname, changeButtonDiv, changeButton;
|
|
442
|
+
return regeneratorRuntime.wrap(function _callee16$(_context16) {
|
|
443
|
+
while (1) {
|
|
444
|
+
switch (_context16.prev = _context16.next) {
|
|
445
|
+
case 0:
|
|
446
|
+
GROUP_PAGES = _utils.default.FormPage.getAll(_groupOfRow.default.pages, _groupOfRow.default.components, _objectSpread({}, DATA));
|
|
447
|
+
_context16.next = 3;
|
|
448
|
+
return (0, _testUtils.act)( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee15() {
|
|
449
|
+
return regeneratorRuntime.wrap(function _callee15$(_context15) {
|
|
450
|
+
while (1) {
|
|
451
|
+
switch (_context15.prev = _context15.next) {
|
|
452
|
+
case 0:
|
|
453
|
+
(0, _reactDom.render)( /*#__PURE__*/_react.default.createElement(_CheckYourAnswers.default, {
|
|
454
|
+
pages: GROUP_PAGES,
|
|
455
|
+
onRowAction: ON_ROW_ACTION,
|
|
456
|
+
onAction: ON_ACTION,
|
|
457
|
+
groups: _groupOfRow.default.cya.groups
|
|
458
|
+
}), container);
|
|
459
|
+
|
|
460
|
+
case 1:
|
|
461
|
+
case "end":
|
|
462
|
+
return _context15.stop();
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
}, _callee15);
|
|
466
|
+
})));
|
|
467
|
+
|
|
409
468
|
case 3:
|
|
410
469
|
cya = checkCYA(container);
|
|
411
470
|
namesGroup = cya.childNodes[2];
|
|
@@ -429,10 +488,10 @@ describe('components', function () {
|
|
|
429
488
|
|
|
430
489
|
case 22:
|
|
431
490
|
case "end":
|
|
432
|
-
return
|
|
491
|
+
return _context16.stop();
|
|
433
492
|
}
|
|
434
493
|
}
|
|
435
|
-
},
|
|
494
|
+
}, _callee16);
|
|
436
495
|
})));
|
|
437
496
|
});
|
|
438
497
|
});
|
|
@@ -208,7 +208,7 @@ var FormRenderer = function FormRenderer(_ref) {
|
|
|
208
208
|
components: components
|
|
209
209
|
}, _objectSpread(_objectSpread({}, data), patch), _models.EventTypes.SUBMIT);
|
|
210
210
|
|
|
211
|
-
submissionData.formStatus = _helpers.default.getSubmissionStatus(type, pages, pageId, action, submissionData, currentTask);
|
|
211
|
+
submissionData.formStatus = _helpers.default.getSubmissionStatus(type, pages, pageId, action, submissionData, currentTask, true);
|
|
212
212
|
|
|
213
213
|
if (patch) {
|
|
214
214
|
setData(submissionData);
|
|
@@ -256,6 +256,9 @@ var FormRenderer = function FormRenderer(_ref) {
|
|
|
256
256
|
|
|
257
257
|
if (currentTask.state === _models.TaskStates.TYPES.COMPLETE) {
|
|
258
258
|
onPageChange(_models.FormPages.CYA);
|
|
259
|
+
} else if (currentTask.state === _models.TaskStates.TYPES.IN_PROGRESS) {
|
|
260
|
+
var currentPage = data.formStatus.tasks[currentTask.name].currentPage;
|
|
261
|
+
onPageChange(currentPage || currentTask.pages[0]);
|
|
259
262
|
} else {
|
|
260
263
|
onPageChange(currentTask.pages[0]);
|
|
261
264
|
}
|
|
@@ -274,7 +277,7 @@ var FormRenderer = function FormRenderer(_ref) {
|
|
|
274
277
|
components: components
|
|
275
278
|
}, _objectSpread({}, data), _models.EventTypes.SUBMIT);
|
|
276
279
|
|
|
277
|
-
submissionData.formStatus = _helpers.default.getSubmissionStatus(type, pages, pageId, action);
|
|
280
|
+
submissionData.formStatus = _helpers.default.getSubmissionStatus(type, pages, pageId, action, submissionData, currentTask, true);
|
|
278
281
|
setData(submissionData); // Now submit the data to the backend...
|
|
279
282
|
|
|
280
283
|
hooks.onSubmit(action.type, submissionData, function () {
|
|
@@ -285,14 +288,14 @@ var FormRenderer = function FormRenderer(_ref) {
|
|
|
285
288
|
}
|
|
286
289
|
}
|
|
287
290
|
|
|
288
|
-
if (action.type === _models.PageAction.TYPES.
|
|
291
|
+
if (action.type === _models.PageAction.TYPES.SAVE_AND_CONTINUE && hub === _models.HubFormats.TASK) {
|
|
289
292
|
if (_helpers.default.canCYASubmit(currentTask.fullPages, onError)) {
|
|
290
293
|
var _submissionData = _utils.default.Format.form({
|
|
291
294
|
pages: pages,
|
|
292
295
|
components: components
|
|
293
296
|
}, _objectSpread({}, data), _models.EventTypes.SUBMIT);
|
|
294
297
|
|
|
295
|
-
_submissionData.formStatus = _helpers.default.getSubmissionStatus(type, pages, pageId, action, _submissionData, currentTask);
|
|
298
|
+
_submissionData.formStatus = _helpers.default.getSubmissionStatus(type, pages, pageId, action, _submissionData, currentTask, true);
|
|
296
299
|
setData(_submissionData);
|
|
297
300
|
hooks.onSubmit(action.type, _submissionData, function () {
|
|
298
301
|
return onPageChange(_models.FormPages.HUB);
|
|
@@ -301,16 +304,33 @@ var FormRenderer = function FormRenderer(_ref) {
|
|
|
301
304
|
});
|
|
302
305
|
}
|
|
303
306
|
}
|
|
307
|
+
|
|
308
|
+
if (action.type === _models.PageAction.TYPES.SAVE_AND_RETURN) {
|
|
309
|
+
if (_helpers.default.canCYASubmit(currentTask.fullPages, onError)) {
|
|
310
|
+
var _submissionData2 = _utils.default.Format.form({
|
|
311
|
+
pages: pages,
|
|
312
|
+
components: components
|
|
313
|
+
}, _objectSpread({}, data), _models.EventTypes.SUBMIT);
|
|
314
|
+
|
|
315
|
+
_submissionData2.formStatus = _helpers.default.getSubmissionStatus(type, pages, pageId, action, _submissionData2, currentTask);
|
|
316
|
+
setData(_submissionData2);
|
|
317
|
+
hooks.onSubmit(action.type, _submissionData2, function () {
|
|
318
|
+
if (type === _models.FormTypes.TASK) {
|
|
319
|
+
onPageChange(undefined);
|
|
320
|
+
} else {
|
|
321
|
+
onPageChange(_models.FormPages.HUB);
|
|
322
|
+
}
|
|
323
|
+
}, function (errors) {
|
|
324
|
+
return _handlers.default.submissionError(errors, onError);
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
}
|
|
304
328
|
};
|
|
305
329
|
|
|
306
330
|
var classes = _utils.default.classBuilder(classBlock, classModifiers, className);
|
|
307
331
|
|
|
308
332
|
if (hub === _models.HubFormats.TASK) {
|
|
309
|
-
cya.actions = [
|
|
310
|
-
type: _models.PageAction.TYPES.SAVE_AND_RETURN,
|
|
311
|
-
label: 'Submit',
|
|
312
|
-
validate: true
|
|
313
|
-
}];
|
|
333
|
+
cya.actions = [_models.PageAction.TYPES.SAVE_AND_CONTINUE, _models.PageAction.TYPES.SAVE_AND_RETURN];
|
|
314
334
|
}
|
|
315
335
|
|
|
316
336
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -581,12 +581,12 @@ describe('components', function () {
|
|
|
581
581
|
case 5:
|
|
582
582
|
taskList = container.childNodes[0].childNodes[1]; //Check status's are correct
|
|
583
583
|
|
|
584
|
-
firstTaskStatus = taskList.childNodes[
|
|
584
|
+
firstTaskStatus = taskList.childNodes[3].childNodes[0].childNodes[1];
|
|
585
585
|
expect(firstTaskStatus.textContent).toEqual(_models.TaskStates.DETAILS[_models.TaskStates.TYPES.NOT_STARTED].label);
|
|
586
|
-
secondTaskStatus = taskList.childNodes[
|
|
586
|
+
secondTaskStatus = taskList.childNodes[3].childNodes[1].childNodes[1];
|
|
587
587
|
expect(secondTaskStatus.textContent).toEqual(_models.TaskStates.DETAILS[_models.TaskStates.TYPES.CANNOT_START_YET].label); //Launch first task
|
|
588
588
|
|
|
589
|
-
firstTask = taskList.childNodes[
|
|
589
|
+
firstTask = taskList.childNodes[3].childNodes[0].childNodes[0].childNodes[0];
|
|
590
590
|
expect(firstTask.textContent).toEqual('Date, location and mode details');
|
|
591
591
|
|
|
592
592
|
_react.fireEvent.click(firstTask, {}); //Fill first page and navigate
|
|
@@ -633,16 +633,17 @@ describe('components', function () {
|
|
|
633
633
|
|
|
634
634
|
cyaPage = container.childNodes[0].childNodes[0];
|
|
635
635
|
expect(cyaPage.childNodes[0].textContent).toEqual('Check your answers');
|
|
636
|
-
expect(cyaPage.childNodes[5].textContent).toEqual('
|
|
636
|
+
expect(cyaPage.childNodes[5].childNodes[0].textContent).toEqual('Save and continue');
|
|
637
|
+
expect(cyaPage.childNodes[5].childNodes[1].textContent).toEqual('Save and return later');
|
|
637
638
|
|
|
638
639
|
_react.fireEvent.click(cyaPage.childNodes[5].childNodes[0], {}); //Should be back at task list
|
|
639
640
|
|
|
640
641
|
|
|
641
642
|
expect(container.childNodes[0].childNodes[0].textContent).toEqual('Task List Form'); //Check status's are correct
|
|
642
643
|
|
|
643
|
-
firstTaskStatus = container.childNodes[0].childNodes[1].childNodes[
|
|
644
|
+
firstTaskStatus = container.childNodes[0].childNodes[1].childNodes[3].childNodes[0].childNodes[1];
|
|
644
645
|
expect(firstTaskStatus.textContent).toEqual(_models.TaskStates.DETAILS[_models.TaskStates.TYPES.COMPLETE].label);
|
|
645
|
-
secondTaskStatus = container.childNodes[0].childNodes[1].childNodes[
|
|
646
|
+
secondTaskStatus = container.childNodes[0].childNodes[1].childNodes[3].childNodes[1].childNodes[1];
|
|
646
647
|
expect(secondTaskStatus.textContent).toEqual(_models.TaskStates.DETAILS[_models.TaskStates.TYPES.NOT_STARTED].label); //Check final data submitted to backend is as expected
|
|
647
648
|
|
|
648
649
|
finalSubmit = ON_SUBMIT_CALLS[ON_SUBMIT_CALLS.length - 1];
|
|
@@ -650,7 +651,7 @@ describe('components', function () {
|
|
|
650
651
|
expect(finalSubmit.mode).toEqual('sea');
|
|
651
652
|
expect(finalSubmit.formStatus.tasks['Date, location and mode details'].complete).toEqual(true);
|
|
652
653
|
|
|
653
|
-
case
|
|
654
|
+
case 39:
|
|
654
655
|
case "end":
|
|
655
656
|
return _context18.stop();
|
|
656
657
|
}
|
|
@@ -691,7 +692,7 @@ describe('components', function () {
|
|
|
691
692
|
case 4:
|
|
692
693
|
taskList = container.childNodes[0].childNodes[1]; //Launch first task
|
|
693
694
|
|
|
694
|
-
_react.fireEvent.click(taskList.childNodes[
|
|
695
|
+
_react.fireEvent.click(taskList.childNodes[3].childNodes[0].childNodes[0].childNodes[0], {}); //Fill first page and navigate
|
|
695
696
|
|
|
696
697
|
|
|
697
698
|
newPage = container.childNodes[0].childNodes[0];
|
|
@@ -730,7 +731,7 @@ describe('components', function () {
|
|
|
730
731
|
_react.fireEvent.click(container.childNodes[0].childNodes[0].childNodes[5].childNodes[0], {}); //Launch same task again
|
|
731
732
|
|
|
732
733
|
|
|
733
|
-
_react.fireEvent.click(container.childNodes[0].childNodes[1].childNodes[
|
|
734
|
+
_react.fireEvent.click(container.childNodes[0].childNodes[1].childNodes[3].childNodes[0].childNodes[0].childNodes[0], {}); //Should be at CYA page
|
|
734
735
|
|
|
735
736
|
|
|
736
737
|
expect(container.childNodes[0].childNodes[0].childNodes[0].textContent).toEqual('Check your answers');
|
|
@@ -11,18 +11,25 @@ var _getNextPageId = _interopRequireDefault(require("./getNextPageId"));
|
|
|
11
11
|
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
13
|
|
|
14
|
-
var getSubmissionStatus = function getSubmissionStatus(formType, pages, currentPageId, action, formData, currentTask) {
|
|
14
|
+
var getSubmissionStatus = function getSubmissionStatus(formType, pages, currentPageId, action, formData, currentTask, isCompleted) {
|
|
15
15
|
if (formType === _models.FormTypes.TASK) {
|
|
16
16
|
var formStatus = formData.formStatus ? formData.formStatus : {};
|
|
17
17
|
formStatus.tasks = formStatus.tasks ? formStatus.tasks : {};
|
|
18
18
|
formStatus.tasks[currentTask.name] = formStatus.tasks[currentTask.name] ? formStatus.tasks[currentTask.name] : {};
|
|
19
19
|
|
|
20
|
-
if (currentPageId === _models.FormPages.CYA) {
|
|
20
|
+
if (currentPageId === (_models.FormPages.CYA || 'submitForm') && isCompleted) {
|
|
21
21
|
formStatus.tasks[currentTask.name].complete = true;
|
|
22
|
+
} else if ((action === null || action === void 0 ? void 0 : action.type) === _models.PageAction.TYPES.SAVE_AND_NAVIGATE) {
|
|
23
|
+
console.log('pg action sc');
|
|
24
|
+
formStatus.tasks[currentTask.name] = {
|
|
25
|
+
complete: false,
|
|
26
|
+
currentPage: (0, _getNextPageId.default)(formType, pages, currentPageId, action, formData)
|
|
27
|
+
};
|
|
22
28
|
} else {
|
|
29
|
+
console.log('got to else stmt');
|
|
23
30
|
formStatus.tasks[currentTask.name] = {
|
|
24
31
|
complete: false,
|
|
25
|
-
currentPage:
|
|
32
|
+
currentPage: currentPageId
|
|
26
33
|
};
|
|
27
34
|
}
|
|
28
35
|
|
|
@@ -210,19 +210,19 @@ describe('components', function () {
|
|
|
210
210
|
});
|
|
211
211
|
describe("when the form type is '".concat(_models.FormTypes.TASK, "'"), function () {
|
|
212
212
|
var FORM_TYPE = _models.FormTypes.TASK;
|
|
213
|
-
it("should mark the current task as complete if the current page is '".concat(_models.FormPages.CYA, "'"), function () {
|
|
213
|
+
it("should mark the current task as complete if the current page is '".concat(_models.FormPages.CYA, "' and it is marked as complete"), function () {
|
|
214
214
|
var CURRENT_PAGE_ID = _models.FormPages.CYA;
|
|
215
215
|
var TASK_NAME = 'taskName';
|
|
216
216
|
var CURRENT_TASK = {
|
|
217
217
|
name: TASK_NAME
|
|
218
218
|
};
|
|
219
|
-
expect((0, _getSubmissionStatus.default)(FORM_TYPE, PAGES, CURRENT_PAGE_ID, undefined, {}, CURRENT_TASK)).toMatchObject({
|
|
219
|
+
expect((0, _getSubmissionStatus.default)(FORM_TYPE, PAGES, CURRENT_PAGE_ID, undefined, {}, CURRENT_TASK, true)).toMatchObject({
|
|
220
220
|
tasks: _defineProperty({}, TASK_NAME, {
|
|
221
221
|
complete: true
|
|
222
222
|
})
|
|
223
223
|
});
|
|
224
224
|
});
|
|
225
|
-
it("should update the current task with the
|
|
225
|
+
it("should update the current task with the current page and a false complete flag if the next page is not '".concat(_models.FormPages.CYA, "'"), function () {
|
|
226
226
|
var CURRENT_PAGE_ID = 'eventDate';
|
|
227
227
|
var TASK_NAME = 'taskName';
|
|
228
228
|
var CURRENT_TASK = {
|
|
@@ -65,7 +65,13 @@ var Task = function Task(_ref) {
|
|
|
65
65
|
}, linkActive ? /*#__PURE__*/_react.default.createElement(_copReactComponents.Link, {
|
|
66
66
|
onClick: function onClick() {
|
|
67
67
|
return _onClick(task);
|
|
68
|
-
}
|
|
68
|
+
},
|
|
69
|
+
onKeyPress: function onKeyPress(event) {
|
|
70
|
+
if (event.key === 'Enter') {
|
|
71
|
+
_onClick(task);
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
tabIndex: "0"
|
|
69
75
|
}, task.name) : task.name), /*#__PURE__*/_react.default.createElement(_TaskState.default, {
|
|
70
76
|
state: currentState
|
|
71
77
|
}));
|
|
@@ -67,11 +67,11 @@ var TaskList = function TaskList(_ref) {
|
|
|
67
67
|
|
|
68
68
|
return /*#__PURE__*/_react.default.createElement("div", _extends({}, attrs, {
|
|
69
69
|
className: classes()
|
|
70
|
-
}), /*#__PURE__*/_react.default.createElement("h2", {
|
|
70
|
+
}), refNumber && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("h2", {
|
|
71
71
|
className: "hods-task-reference-description govuk-heading-s govuk-!-margin-bottom-2 govuk-!-padding-right-1"
|
|
72
72
|
}, "".concat(refTitle)), /*#__PURE__*/_react.default.createElement("h2", {
|
|
73
|
-
className: "govuk-heading-s
|
|
74
|
-
}, "".concat(refNumber)), numberOfSections !== numberOfCompleteSections && /*#__PURE__*/_react.default.createElement("h2", {
|
|
73
|
+
className: "govuk-heading-s govuk-!-font-weight-regular"
|
|
74
|
+
}, "".concat(refNumber))), numberOfSections !== numberOfCompleteSections && /*#__PURE__*/_react.default.createElement("h2", {
|
|
75
75
|
className: "govuk-heading-s govuk-!-margin-bottom-2"
|
|
76
76
|
}, "Incomplete form"), /*#__PURE__*/_react.default.createElement("p", {
|
|
77
77
|
className: "govuk-body govuk-!-margin-bottom-7"
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
min-width: 550px;
|
|
12
12
|
}
|
|
13
13
|
.hods-task-list__items {
|
|
14
|
-
|
|
14
|
+
font-size: 19px;
|
|
15
15
|
@include govuk-responsive-margin(9, 'bottom');
|
|
16
16
|
list-style: none;
|
|
17
17
|
padding-left: 0;
|
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
|
|
22
22
|
.hods-task-list__section {
|
|
23
23
|
display: table;
|
|
24
|
-
|
|
24
|
+
font-size: 24px;
|
|
25
|
+
font-weight: bold;
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
.hods-task-list__section-number {
|
|
@@ -46,10 +47,11 @@
|
|
|
46
47
|
|
|
47
48
|
.hods-task-list__task-name {
|
|
48
49
|
display: block;
|
|
49
|
-
cursor:
|
|
50
|
+
cursor: auto;
|
|
50
51
|
@include govuk-media-query($from: 450px) {
|
|
51
52
|
float: left;
|
|
52
53
|
}
|
|
54
|
+
font-weight: normal;
|
|
53
55
|
}
|
|
54
56
|
|
|
55
57
|
.hods-task-reference-description{
|
|
@@ -58,9 +60,6 @@
|
|
|
58
60
|
}
|
|
59
61
|
}
|
|
60
62
|
|
|
61
|
-
.hods-task-reference{
|
|
62
|
-
font-weight: normal;
|
|
63
|
-
}
|
|
64
63
|
|
|
65
64
|
// The `hods-task-list__task-completed` class was previously used on the task
|
|
66
65
|
// list for the completed tag (changed in 86c90ec) – it's still included here to
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"urls": {
|
|
3
|
+
"refData": "/ref-data"
|
|
4
|
+
},
|
|
5
|
+
"currentUser": {
|
|
6
|
+
"givenName": "John",
|
|
7
|
+
"familyName": "Smith"
|
|
8
|
+
},
|
|
9
|
+
"areYouACivilServant": "yes",
|
|
10
|
+
"userDetails": {
|
|
11
|
+
"linemanagerEmail": "line.manager@digital.homeoffice.gov.uk",
|
|
12
|
+
"delegateEmails": "del.egate@digital.homeoffice.gov.uk"
|
|
13
|
+
},
|
|
14
|
+
"addressDetails": {
|
|
15
|
+
"firstLineOfTheAddress": "10 Downing Street",
|
|
16
|
+
"city": "London",
|
|
17
|
+
"town": "City of Westminster",
|
|
18
|
+
"postCode": "SW1A 2AA"
|
|
19
|
+
},
|
|
20
|
+
"businessKey": "123456789"
|
|
21
|
+
}
|