@hmcts/ccd-case-ui-toolkit 7.4.18-default-focus → 7.4.19-5452
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/README.md +354 -187
- package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs +10 -10
- package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/index.d.ts +4 -2
- package/index.d.ts.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,187 +1,354 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
yarn
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
yarn build
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
1
|
+
CCD CASE UI TOOLKIT
|
|
2
|
+
===================
|
|
3
|
+
|
|
4
|
+
Overview
|
|
5
|
+
--------
|
|
6
|
+
|
|
7
|
+
@hmcts/ccd-case-ui-toolkit is an Angular component library for CCD and XUI
|
|
8
|
+
case-management applications. It provides reusable case-form components,
|
|
9
|
+
directives, services, models, fixtures and supporting utilities.
|
|
10
|
+
|
|
11
|
+
The repository also contains:
|
|
12
|
+
|
|
13
|
+
- A library build using Angular and ng-packagr.
|
|
14
|
+
- A demo application and synthetic browser-test host.
|
|
15
|
+
- Karma/Jasmine unit tests.
|
|
16
|
+
- Playwright source-host tests.
|
|
17
|
+
- A packaged-consumer smoke test for the built package.
|
|
18
|
+
- Documentation generation with Compodoc.
|
|
19
|
+
- CI and publishing configuration.
|
|
20
|
+
|
|
21
|
+
The published package name is:
|
|
22
|
+
|
|
23
|
+
@hmcts/ccd-case-ui-toolkit
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
Prerequisites
|
|
27
|
+
-------------
|
|
28
|
+
|
|
29
|
+
- Node.js 24.18.0 or a later version accepted by package.json.
|
|
30
|
+
- Yarn 4.5.0, managed through the repository's Yarn configuration.
|
|
31
|
+
- A Git checkout with the repository files available.
|
|
32
|
+
- Chromium if you are running the Playwright browser tests.
|
|
33
|
+
|
|
34
|
+
Check the required Node.js version in .nvmrc and package.json before changing
|
|
35
|
+
your local runtime. On Windows, Git Bash or WSL is recommended for shell
|
|
36
|
+
commands that use Unix-style syntax.
|
|
37
|
+
|
|
38
|
+
Install dependencies from the repository root:
|
|
39
|
+
|
|
40
|
+
corepack enable
|
|
41
|
+
yarn install --immutable
|
|
42
|
+
|
|
43
|
+
The repository uses a node-modules linker. Do not commit node_modules, build
|
|
44
|
+
output, coverage or browser-test results.
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
Repository layout
|
|
48
|
+
-----------------
|
|
49
|
+
|
|
50
|
+
projects/ccd-case-ui-toolkit/
|
|
51
|
+
src/ Library source and public API
|
|
52
|
+
ng-package.json ng-packagr configuration
|
|
53
|
+
package.json Library metadata and peer dependencies
|
|
54
|
+
|
|
55
|
+
demo/ Example application and stubs
|
|
56
|
+
packaged-consumer/ Application that consumes the built package
|
|
57
|
+
playwright_tests/ Source-host browser tests and test host
|
|
58
|
+
scripts/ Build synchronisation and smoke checks
|
|
59
|
+
angular.json Angular workspace configuration
|
|
60
|
+
package.json Workspace scripts
|
|
61
|
+
dist/ Generated package output
|
|
62
|
+
docs/ Generated Compodoc output
|
|
63
|
+
|
|
64
|
+
The library entry point is projects/ccd-case-ui-toolkit/src/public-api.ts.
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
Build the library
|
|
68
|
+
-----------------
|
|
69
|
+
|
|
70
|
+
Build the package once:
|
|
71
|
+
|
|
72
|
+
yarn build
|
|
73
|
+
|
|
74
|
+
This runs the condition-parser generation step, builds the
|
|
75
|
+
ccd-case-ui-toolkit-lib Angular library and synchronises the package output
|
|
76
|
+
into dist/.
|
|
77
|
+
|
|
78
|
+
The explicit library build command is:
|
|
79
|
+
|
|
80
|
+
yarn build:library
|
|
81
|
+
|
|
82
|
+
Build the library continuously while editing source files:
|
|
83
|
+
|
|
84
|
+
yarn build:library:watch
|
|
85
|
+
|
|
86
|
+
The generated package is written to:
|
|
87
|
+
|
|
88
|
+
dist/ccd-case-ui-toolkit/
|
|
89
|
+
|
|
90
|
+
Generated parser files are created by the condition-parser task. Do not edit
|
|
91
|
+
the generated condition-parser.generated.ts file by hand; change the source
|
|
92
|
+
condition grammar and regenerate it instead.
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
Use the library in a consumer application
|
|
96
|
+
------------------------------------------
|
|
97
|
+
|
|
98
|
+
The preferred verification path is the repository's packaged-consumer gate:
|
|
99
|
+
|
|
100
|
+
yarn test:packaged-consumer
|
|
101
|
+
|
|
102
|
+
This checks the webapp material contract, builds the library and runs the
|
|
103
|
+
packaged-consumer smoke test against the generated package.
|
|
104
|
+
|
|
105
|
+
For stricter peer-dependency validation, run:
|
|
106
|
+
|
|
107
|
+
yarn test:packaged-consumer:strict
|
|
108
|
+
|
|
109
|
+
The packaged consumer is configured to run on port 4301:
|
|
110
|
+
|
|
111
|
+
cd packaged-consumer
|
|
112
|
+
yarn start
|
|
113
|
+
|
|
114
|
+
Use the packaged-consumer workflow to validate the installed package rather
|
|
115
|
+
than relying only on source imports. Source-host tests and installed-package
|
|
116
|
+
tests prove different compatibility boundaries.
|
|
117
|
+
|
|
118
|
+
Legacy linking
|
|
119
|
+
|
|
120
|
+
The older README described yarn link and manual copying of dist/. Linking can
|
|
121
|
+
be useful for local investigation, but it is more fragile with modern Yarn,
|
|
122
|
+
Angular and peer dependencies. Prefer the packaged-consumer smoke test or the
|
|
123
|
+
consumer application's normal package workflow. If linking is unavoidable,
|
|
124
|
+
build the library first and verify that the consumer resolves the intended
|
|
125
|
+
package version and peer dependencies.
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
Run the Playwright source host
|
|
129
|
+
------------------------------
|
|
130
|
+
|
|
131
|
+
Install the Chromium browser used by the suite:
|
|
132
|
+
|
|
133
|
+
yarn playwright install chromium --only-shell
|
|
134
|
+
|
|
135
|
+
Run Playwright support checks:
|
|
136
|
+
|
|
137
|
+
yarn lint:playwright
|
|
138
|
+
yarn test:playwright:typecheck
|
|
139
|
+
|
|
140
|
+
List available scenarios:
|
|
141
|
+
|
|
142
|
+
yarn test:playwright --list
|
|
143
|
+
|
|
144
|
+
Run the full source-host browser suite:
|
|
145
|
+
|
|
146
|
+
yarn test:playwright
|
|
147
|
+
|
|
148
|
+
Start the synthetic Angular host when inspecting it manually:
|
|
149
|
+
|
|
150
|
+
yarn serve:playwright
|
|
151
|
+
|
|
152
|
+
The host is served at:
|
|
153
|
+
|
|
154
|
+
http://127.0.0.1:4300
|
|
155
|
+
|
|
156
|
+
The Playwright runner starts the host as required by its configuration. Keep
|
|
157
|
+
ports 4300 and 4301 available when running browser or packaged-consumer tests.
|
|
158
|
+
|
|
159
|
+
Run a focused feature where appropriate:
|
|
160
|
+
|
|
161
|
+
yarn test:playwright payment-contract
|
|
162
|
+
yarn test:playwright advanced-fields
|
|
163
|
+
|
|
164
|
+
The source-host suite uses synthetic data, isolated browser contexts, an
|
|
165
|
+
en-GB locale and the Europe/London time zone. It validates named component
|
|
166
|
+
contracts; it does not prove that deployed services or every consuming
|
|
167
|
+
application are compatible.
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
Playwright evidence
|
|
171
|
+
-------------------
|
|
172
|
+
|
|
173
|
+
Generated browser evidence is written below playwright_tests/test-results/.
|
|
174
|
+
It can include:
|
|
175
|
+
|
|
176
|
+
- JUnit results.
|
|
177
|
+
- Perfetto timeline data.
|
|
178
|
+
- Failure screenshots and traces.
|
|
179
|
+
- Odhín HTML reports.
|
|
180
|
+
|
|
181
|
+
The main report locations are:
|
|
182
|
+
|
|
183
|
+
playwright_tests/test-results/junit.xml
|
|
184
|
+
playwright_tests/test-results/perfetto.json
|
|
185
|
+
playwright_tests/odhin-report/toolkit-playwright.html
|
|
186
|
+
|
|
187
|
+
The packaged-consumer gate writes its evidence below
|
|
188
|
+
packaged-consumer-results/.
|
|
189
|
+
|
|
190
|
+
These outputs may contain test data and should be treated as generated,
|
|
191
|
+
potentially sensitive artefacts. They are ignored by Git and should not be
|
|
192
|
+
committed.
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
Unit tests and coverage
|
|
196
|
+
-----------------------
|
|
197
|
+
|
|
198
|
+
Run the Angular unit tests with coverage:
|
|
199
|
+
|
|
200
|
+
yarn test
|
|
201
|
+
|
|
202
|
+
Run the unit tests in watch mode:
|
|
203
|
+
|
|
204
|
+
yarn test:watch
|
|
205
|
+
|
|
206
|
+
Coverage output is written under coverage/.
|
|
207
|
+
|
|
208
|
+
Create a coverage report when coverage data already exists:
|
|
209
|
+
|
|
210
|
+
yarn coverage
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
Linting, audits and documentation
|
|
214
|
+
---------------------------------
|
|
215
|
+
|
|
216
|
+
Run the library lint checks:
|
|
217
|
+
|
|
218
|
+
yarn lint
|
|
219
|
+
|
|
220
|
+
Run the Playwright-specific lint checks:
|
|
221
|
+
|
|
222
|
+
yarn lint:playwright
|
|
223
|
+
|
|
224
|
+
Run reporting and reporter checks:
|
|
225
|
+
|
|
226
|
+
yarn lint:playwright:reporting
|
|
227
|
+
|
|
228
|
+
Run the dependency audit against the repository's known-audit baseline:
|
|
229
|
+
|
|
230
|
+
yarn test:audit
|
|
231
|
+
|
|
232
|
+
Generate Compodoc documentation:
|
|
233
|
+
|
|
234
|
+
yarn docs
|
|
235
|
+
|
|
236
|
+
The generated documentation is written to docs/.
|
|
237
|
+
|
|
238
|
+
Run the main CI-style local checks:
|
|
239
|
+
|
|
240
|
+
yarn ci
|
|
241
|
+
|
|
242
|
+
The CI command runs lint, unit tests, the library build and documentation
|
|
243
|
+
generation. It may take longer than targeted checks.
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
Development workflow
|
|
247
|
+
--------------------
|
|
248
|
+
|
|
249
|
+
1. Create a focused branch.
|
|
250
|
+
2. Install dependencies with yarn install --immutable.
|
|
251
|
+
3. Make the source change under projects/ccd-case-ui-toolkit/src/.
|
|
252
|
+
4. Run yarn build:library:watch while developing a consumer integration.
|
|
253
|
+
5. Run targeted unit tests and Playwright scenarios.
|
|
254
|
+
6. Run yarn lint and yarn test.
|
|
255
|
+
7. Run yarn test:packaged-consumer for package-boundary changes.
|
|
256
|
+
8. Run yarn ci before a release or when broad changes affect the library.
|
|
257
|
+
9. Review generated output and confirm that no sensitive artefacts are staged.
|
|
258
|
+
|
|
259
|
+
When a public component, directive, service, model or pipe is added, update
|
|
260
|
+
the public API exports and add or update focused tests. Keep assertions close
|
|
261
|
+
to the component or service contract they verify.
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
Release and publishing notes
|
|
265
|
+
-----------------------------
|
|
266
|
+
|
|
267
|
+
The package is published as an npm package with public access configured in
|
|
268
|
+
package.json. Use the repository's approved release and CI process.
|
|
269
|
+
|
|
270
|
+
Before publishing:
|
|
271
|
+
|
|
272
|
+
- Confirm the package version and release notes.
|
|
273
|
+
- Run yarn ci.
|
|
274
|
+
- Run yarn test:packaged-consumer and, where required,
|
|
275
|
+
yarn test:packaged-consumer:strict.
|
|
276
|
+
- Confirm peer dependency ranges for supported Angular consumers.
|
|
277
|
+
- Review the generated dist/ package contents.
|
|
278
|
+
- Confirm that credentials, local configuration and test results are excluded.
|
|
279
|
+
|
|
280
|
+
Prerelease versions from a pull request should follow the repository's agreed
|
|
281
|
+
format, for example x.y.z-RDM-xxx-prerelease.
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
Troubleshooting
|
|
285
|
+
---------------
|
|
286
|
+
|
|
287
|
+
Dependencies do not install
|
|
288
|
+
|
|
289
|
+
- Check the Node.js version against .nvmrc and package.json.
|
|
290
|
+
- Run corepack enable.
|
|
291
|
+
- Use yarn install --immutable in a regular checkout.
|
|
292
|
+
- If a Git worktree prevents an install hook from running, use
|
|
293
|
+
yarn install --immutable --mode=skip-build as a temporary dependency-linking
|
|
294
|
+
workaround, then run the explicit lint, typecheck, browser and package
|
|
295
|
+
checks. This workaround does not prove that install hooks work normally.
|
|
296
|
+
|
|
297
|
+
The library build fails
|
|
298
|
+
|
|
299
|
+
- Run yarn generate:condition-parser.
|
|
300
|
+
- Check the generated parser file is not being edited manually.
|
|
301
|
+
- Remove generated temporary output with yarn clean:tmp and rebuild.
|
|
302
|
+
- Check Angular, TypeScript and peer dependency versions.
|
|
303
|
+
|
|
304
|
+
Consumer cannot resolve the package
|
|
305
|
+
|
|
306
|
+
- Rebuild the library with yarn build.
|
|
307
|
+
- Confirm that the consumer is resolving the intended dist/ or package
|
|
308
|
+
version.
|
|
309
|
+
- Check Angular and peer dependency compatibility.
|
|
310
|
+
- Prefer the packaged-consumer smoke test over manual copying of dist/.
|
|
311
|
+
|
|
312
|
+
Playwright cannot start
|
|
313
|
+
|
|
314
|
+
- Install Chromium with yarn playwright install chromium --only-shell.
|
|
315
|
+
- Check that ports 4300 and 4301 are free.
|
|
316
|
+
- Run yarn test:playwright:typecheck.
|
|
317
|
+
- Run the scenario with --list to confirm that it is selected.
|
|
318
|
+
- Retain the failing trace and screenshot before starting another run, because
|
|
319
|
+
subsequent commands may overwrite the test-results directory.
|
|
320
|
+
|
|
321
|
+
Reports are missing
|
|
322
|
+
|
|
323
|
+
- Check playwright_tests/test-results/ and playwright_tests/odhin-report/.
|
|
324
|
+
- Run the explicit reporter checks.
|
|
325
|
+
- If a run is interrupted before Odhín creates its report, use the repository
|
|
326
|
+
report helper and record that the report was generated as unavailable.
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
UK English and user-facing text
|
|
330
|
+
--------------------------------
|
|
331
|
+
|
|
332
|
+
Use UK English in documentation, test descriptions and user-facing examples.
|
|
333
|
+
Preferred spellings include:
|
|
334
|
+
|
|
335
|
+
organisation / organisations
|
|
336
|
+
authorise / authorisation
|
|
337
|
+
behaviour
|
|
338
|
+
centre
|
|
339
|
+
colour
|
|
340
|
+
customise / customisation
|
|
341
|
+
licence (noun) / license (verb)
|
|
342
|
+
analyse / analysed
|
|
343
|
+
catalogue
|
|
344
|
+
prioritise
|
|
345
|
+
|
|
346
|
+
Keep API names, package names, TypeScript identifiers, test tags and external
|
|
347
|
+
service names unchanged where their spelling is part of a technical contract.
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
Licence
|
|
351
|
+
-------
|
|
352
|
+
|
|
353
|
+
This project is licensed under the MIT Licence. See LICENSE.md for the full
|
|
354
|
+
licence text.
|
|
@@ -610,7 +610,7 @@ class HttpErrorService {
|
|
|
610
610
|
}
|
|
611
611
|
let httpError = new HttpError();
|
|
612
612
|
if (error instanceof HttpErrorResponse) {
|
|
613
|
-
if (error.headers?.get(HttpErrorService.CONTENT_TYPE)
|
|
613
|
+
if (error.headers?.get(HttpErrorService.CONTENT_TYPE)?.includes(HttpErrorService.JSON)) {
|
|
614
614
|
try {
|
|
615
615
|
httpError = HttpError.from(error);
|
|
616
616
|
}
|
|
@@ -618,7 +618,7 @@ class HttpErrorService {
|
|
|
618
618
|
HttpErrorService.logger.error('Unable to convert HTTP error response.', { error: e });
|
|
619
619
|
}
|
|
620
620
|
}
|
|
621
|
-
if (
|
|
621
|
+
if (error.status) {
|
|
622
622
|
httpError.status = error.status;
|
|
623
623
|
}
|
|
624
624
|
}
|
|
@@ -4053,7 +4053,6 @@ class CaseTab {
|
|
|
4053
4053
|
order;
|
|
4054
4054
|
fields;
|
|
4055
4055
|
show_condition;
|
|
4056
|
-
defaultFocus;
|
|
4057
4056
|
}
|
|
4058
4057
|
__decorate([
|
|
4059
4058
|
Type(() => CaseField),
|
|
@@ -17221,6 +17220,7 @@ class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
|
|
|
17221
17220
|
static UPLOAD_ERROR_FILE_REQUIRED = 'File required';
|
|
17222
17221
|
static UPLOAD_ERROR_NOT_AVAILABLE = 'Document upload facility is not available at the moment';
|
|
17223
17222
|
static UPLOAD_ERROR_INVALID_FORMAT = 'Document format is not supported';
|
|
17223
|
+
static UPLOAD_ERROR_FILE_TOO_LARGE = 'The selected file exceeds the permitted upload size. Please choose a smaller file or reduce the file size.';
|
|
17224
17224
|
static UPLOAD_WAITING_FILE_STATUS = 'Uploading...';
|
|
17225
17225
|
static ERROR_UPLOADING_FILE = 'Error Uploading File';
|
|
17226
17226
|
fileInput;
|
|
@@ -17476,6 +17476,9 @@ class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
|
|
|
17476
17476
|
if (error.status === 0 || error.status === 502) {
|
|
17477
17477
|
return WriteDocumentFieldComponent.UPLOAD_ERROR_NOT_AVAILABLE;
|
|
17478
17478
|
}
|
|
17479
|
+
if (error.status === 413) {
|
|
17480
|
+
return WriteDocumentFieldComponent.UPLOAD_ERROR_FILE_TOO_LARGE;
|
|
17481
|
+
}
|
|
17479
17482
|
if (error.status === 422 || error.status === 500) {
|
|
17480
17483
|
if (this.fileSecureModeOn) {
|
|
17481
17484
|
return this.extractSecureErrorMessage(error) || WriteDocumentFieldComponent.ERROR_UPLOADING_FILE;
|
|
@@ -41701,7 +41704,7 @@ class CaseFullAccessViewComponent {
|
|
|
41701
41704
|
if (!hasHash && !isSpecialTabPath) {
|
|
41702
41705
|
const paths = url.split('/');
|
|
41703
41706
|
const lastPath = decodeURIComponent(paths[paths.length - 1]);
|
|
41704
|
-
let foundTab;
|
|
41707
|
+
let foundTab = null;
|
|
41705
41708
|
if (!this.prependedTabs) {
|
|
41706
41709
|
this.prependedTabs = [];
|
|
41707
41710
|
}
|
|
@@ -41722,13 +41725,10 @@ class CaseFullAccessViewComponent {
|
|
|
41722
41725
|
});
|
|
41723
41726
|
}
|
|
41724
41727
|
else {
|
|
41725
|
-
this.caseDetails.tabs
|
|
41726
|
-
// Presuming default focus only set for one tab here - multiple tabs with default focus are not handled as is a contradiction
|
|
41727
|
-
let preSelectTab = this.caseDetails.tabs.find((tab) => tab.defaultFocus === true) ?? null;
|
|
41728
|
-
// Attempt to pre-select the tab based on the preferred label for the current case type
|
|
41728
|
+
this.caseDetails.tabs.sort((aTab, bTab) => aTab.order > bTab.order ? 1 : (bTab.order > aTab.order ? -1 : 0));
|
|
41729
41729
|
const preferredLabel = FieldsUtils.defaultTabList?.[this.caseDetails?.case_type?.id];
|
|
41730
|
-
|
|
41731
|
-
if (
|
|
41730
|
+
let preSelectTab = null;
|
|
41731
|
+
if (preferredLabel) {
|
|
41732
41732
|
preSelectTab = this.caseDetails.tabs.find((tab) => (tab.label === preferredLabel) || (tab.id === preferredLabel)) ?? null;
|
|
41733
41733
|
}
|
|
41734
41734
|
if (!preSelectTab) {
|