@ministryofjustice/hmpps-digital-prison-reporting-frontend 6.3.2 → 6.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3 @@
1
+ import { components } from 'src/dpr/types/api';
2
+ declare const autoCompleteMultiMinMaxExample: components['schemas']['VariantDefinition'];
3
+ export default autoCompleteMultiMinMaxExample;
package/all.bundle.js CHANGED
@@ -2135,12 +2135,15 @@ class DprMyReports extends PollingClientClass {
2135
2135
  const element = this.getElement();
2136
2136
  this.maxRows = element.dataset['maxRows'];
2137
2137
  this.listType = element.dataset['listType'] ?? `my-reports-${ListType.REQUESTED}`;
2138
- this.initRemoveAction();
2138
+ // Only set csrf and remove action on requested and viewed list types
2139
+ if (this.listType === `my-reports-${ListType.REQUESTED}` || `my-reports-${ListType.VIEWED}`) {
2140
+ this.csrfToken = DprHtmlClient.getCsrfToken(element);
2141
+ this.initRemoveAction();
2142
+ }
2139
2143
  // Only poll on requested list
2140
- if (element.dataset['listType'] !== `my-reports-${ListType.REQUESTED}`) {
2144
+ if (this.listType !== `my-reports-${ListType.REQUESTED}`) {
2141
2145
  return;
2142
2146
  }
2143
- this.csrfToken = DprHtmlClient.getCsrfToken(element);
2144
2147
  this.rows = element.querySelectorAll('[data-row-id]');
2145
2148
  if (this.rows.length && !this.allTerminal()) {
2146
2149
  this.startPolling(() => this.pollAllReports(), () => this.allTerminal());