@inveniosoftware/react-invenio-app-ils 1.2.0 → 1.3.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.
package/CHANGES.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changes
2
2
 
3
+ Version 1.3.0 (released 2024-06-04)
4
+
5
+ - closures: disabled closed dates in Backoffice LoanUpdateDates calendar
6
+ - backoffice: fix relations table only showing items on the first page
7
+ - ui: Button to extend all loans is disabled instead of hidden
8
+
3
9
  Version 1.2.0 (released 2024-11-19)
4
10
 
5
11
  - self-checkout: integrate new dedicate endpoints
package/dist/cjs/index.js CHANGED
@@ -2456,7 +2456,7 @@ const serializer$9 = {
2456
2456
  };
2457
2457
 
2458
2458
  const documentRequestURL = '/document-requests/';
2459
- const apiPaths$2 = {
2459
+ const apiPaths$3 = {
2460
2460
  accept: `${documentRequestURL}:docReqPid/accept`,
2461
2461
  item: `${documentRequestURL}:docReqPid`,
2462
2462
  list: documentRequestURL,
@@ -2465,12 +2465,12 @@ const apiPaths$2 = {
2465
2465
  provider: `${documentRequestURL}:docReqPid/provider`
2466
2466
  };
2467
2467
  const create$8 = async data => {
2468
- const response = await http.post(apiPaths$2.list, data);
2468
+ const response = await http.post(apiPaths$3.list, data);
2469
2469
  response.data = serializer$9.fromJSON(response.data);
2470
2470
  return response;
2471
2471
  };
2472
2472
  const update$8 = async (docRequestPid, data) => {
2473
- const path = reactRouterDom.generatePath(apiPaths$2.item, {
2473
+ const path = reactRouterDom.generatePath(apiPaths$3.item, {
2474
2474
  docReqPid: docRequestPid
2475
2475
  });
2476
2476
  const response = await http.put(path, data);
@@ -2478,7 +2478,7 @@ const update$8 = async (docRequestPid, data) => {
2478
2478
  return response;
2479
2479
  };
2480
2480
  const get$c = async docRequestPid => {
2481
- const path = reactRouterDom.generatePath(apiPaths$2.item, {
2481
+ const path = reactRouterDom.generatePath(apiPaths$3.item, {
2482
2482
  docReqPid: docRequestPid
2483
2483
  });
2484
2484
  const response = await http.get(path);
@@ -2486,7 +2486,7 @@ const get$c = async docRequestPid => {
2486
2486
  return response;
2487
2487
  };
2488
2488
  const del$8 = async docRequestPid => {
2489
- const path = reactRouterDom.generatePath(apiPaths$2.item, {
2489
+ const path = reactRouterDom.generatePath(apiPaths$3.item, {
2490
2490
  docReqPid: docRequestPid
2491
2491
  });
2492
2492
  const response = await http.delete(path);
@@ -2498,19 +2498,19 @@ const performAction = async (urlPath, data) => {
2498
2498
  return response;
2499
2499
  };
2500
2500
  const accept = async docRequestPid => {
2501
- const urlPath = reactRouterDom.generatePath(apiPaths$2.accept, {
2501
+ const urlPath = reactRouterDom.generatePath(apiPaths$3.accept, {
2502
2502
  docReqPid: docRequestPid
2503
2503
  });
2504
2504
  return performAction(urlPath);
2505
2505
  };
2506
2506
  const addDocument$1 = async (docReqPid, data) => {
2507
- const url = reactRouterDom.generatePath(apiPaths$2.document, {
2507
+ const url = reactRouterDom.generatePath(apiPaths$3.document, {
2508
2508
  docReqPid: docReqPid
2509
2509
  });
2510
2510
  return await http.post(url, data);
2511
2511
  };
2512
2512
  const removeDocument$1 = async (docReqPid, data) => {
2513
- const url = reactRouterDom.generatePath(apiPaths$2.document, {
2513
+ const url = reactRouterDom.generatePath(apiPaths$3.document, {
2514
2514
  docReqPid: docReqPid
2515
2515
  });
2516
2516
  // https://github.com/axios/axios/issues/897#issuecomment-343715381
@@ -2519,19 +2519,19 @@ const removeDocument$1 = async (docReqPid, data) => {
2519
2519
  });
2520
2520
  };
2521
2521
  const addProvider$1 = async (docReqPid, data) => {
2522
- const url = reactRouterDom.generatePath(apiPaths$2.provider, {
2522
+ const url = reactRouterDom.generatePath(apiPaths$3.provider, {
2523
2523
  docReqPid: docReqPid
2524
2524
  });
2525
2525
  return await http.post(url, data);
2526
2526
  };
2527
2527
  const removeProvider$1 = async docReqPid => {
2528
- const url = reactRouterDom.generatePath(apiPaths$2.provider, {
2528
+ const url = reactRouterDom.generatePath(apiPaths$3.provider, {
2529
2529
  docReqPid: docReqPid
2530
2530
  });
2531
2531
  return await http.delete(url);
2532
2532
  };
2533
2533
  const decline = async (docRequestPid, data) => {
2534
- const urlPath = reactRouterDom.generatePath(apiPaths$2.decline, {
2534
+ const urlPath = reactRouterDom.generatePath(apiPaths$3.decline, {
2535
2535
  docReqPid: docRequestPid
2536
2536
  });
2537
2537
  return performAction(urlPath, data);
@@ -3451,7 +3451,7 @@ const serializer$4 = {
3451
3451
  fromJSON: serializeResponse$3
3452
3452
  };
3453
3453
 
3454
- const apiPaths$1 = {
3454
+ const apiPaths$2 = {
3455
3455
  checkout: '/circulation/loans/checkout',
3456
3456
  selfCheckout: '/circulation/loans/self-checkout',
3457
3457
  notificationOverdue: '/circulation/loans/:loanPid/notification-overdue',
@@ -3463,7 +3463,7 @@ const apiPaths$1 = {
3463
3463
  bulkExtend: '/circulation/bulk-extend'
3464
3464
  };
3465
3465
  const get$7 = async loanPid => {
3466
- const path = reactRouterDom.generatePath(apiPaths$1.item, {
3466
+ const path = reactRouterDom.generatePath(apiPaths$2.item, {
3467
3467
  loanPid: loanPid
3468
3468
  });
3469
3469
  const response = await http.get(path);
@@ -3516,7 +3516,7 @@ const doRequest = async function (documentPid, patronPid) {
3516
3516
  method: deliveryMethod
3517
3517
  };
3518
3518
  }
3519
- const response = await http.post(apiPaths$1.request, payload);
3519
+ const response = await http.post(apiPaths$2.request, payload);
3520
3520
  response.data = serializer$4.fromJSON(response.data);
3521
3521
  return response;
3522
3522
  };
@@ -3543,12 +3543,12 @@ const doCheckout = async function (documentPid, itemPid, patronPid) {
3543
3543
  if (force) {
3544
3544
  payload.force = true;
3545
3545
  }
3546
- const response = await http.post(apiPaths$1.checkout, payload);
3546
+ const response = await http.post(apiPaths$2.checkout, payload);
3547
3547
  response.data = serializer$4.fromJSON(response.data);
3548
3548
  return response;
3549
3549
  };
3550
3550
  const doSelfCheckoutSearchItem = async barcode => {
3551
- const response = await http.get(`${apiPaths$1.selfCheckout}?barcode=${barcode}`);
3551
+ const response = await http.get(`${apiPaths$2.selfCheckout}?barcode=${barcode}`);
3552
3552
  response.data = serializer$4.fromJSON(response.data);
3553
3553
  return response;
3554
3554
  };
@@ -3561,12 +3561,12 @@ const doSelfCheckout = async (documentPid, itemPid, patronPid) => {
3561
3561
  transaction_location_pid: `${currentUser.locationPid}`,
3562
3562
  transaction_user_pid: `${currentUser.id}`
3563
3563
  };
3564
- const response = await http.post(apiPaths$1.selfCheckout, payload);
3564
+ const response = await http.post(apiPaths$2.selfCheckout, payload);
3565
3565
  response.data = serializer$4.fromJSON(response.data);
3566
3566
  return response;
3567
3567
  };
3568
3568
  const assignItemToLoan$1 = async (itemPid, loanPid) => {
3569
- const path = reactRouterDom.generatePath(apiPaths$1.replaceItem, {
3569
+ const path = reactRouterDom.generatePath(apiPaths$2.replaceItem, {
3570
3570
  loanPid: loanPid
3571
3571
  });
3572
3572
  const payload = {
@@ -3580,7 +3580,7 @@ const bulkExtendLoans = async patronPid => {
3580
3580
  const payload = {
3581
3581
  patron_pid: patronPid
3582
3582
  };
3583
- const response = await http.post(apiPaths$1.bulkExtend, payload);
3583
+ const response = await http.post(apiPaths$2.bulkExtend, payload);
3584
3584
  return response;
3585
3585
  };
3586
3586
  class QueryBuilder$4 {
@@ -3694,19 +3694,19 @@ const queryBuilder$4 = () => {
3694
3694
  return new QueryBuilder$4();
3695
3695
  };
3696
3696
  const list$7 = async query => {
3697
- const response = await http.get(`${apiPaths$1.list}?q=${query}`);
3697
+ const response = await http.get(`${apiPaths$2.list}?q=${query}`);
3698
3698
  response.data.total = getSearchTotal(response.data.hits);
3699
3699
  response.data.hits = response.data.hits.hits.map(hit => serializer$4.fromJSON(hit));
3700
3700
  return response;
3701
3701
  };
3702
3702
  const sendOverdueLoansNotificationReminder$1 = async payload => {
3703
- const path = reactRouterDom.generatePath(apiPaths$1.notificationOverdue, {
3703
+ const path = reactRouterDom.generatePath(apiPaths$2.notificationOverdue, {
3704
3704
  loanPid: payload.loanPid
3705
3705
  });
3706
3706
  return await http.post(path, payload);
3707
3707
  };
3708
3708
  const count$2 = async query => {
3709
- const response = await http.get(`${apiPaths$1.list}?q=${query}`);
3709
+ const response = await http.get(`${apiPaths$2.list}?q=${query}`);
3710
3710
  response.data = getSearchTotal(response.data.hits);
3711
3711
  return response;
3712
3712
  };
@@ -3730,13 +3730,13 @@ const updateDates = async function (loanPid) {
3730
3730
  if (requestExpireDate) {
3731
3731
  payload.request_expire_date = requestExpireDate;
3732
3732
  }
3733
- const path = reactRouterDom.generatePath(apiPaths$1.updateDates, {
3733
+ const path = reactRouterDom.generatePath(apiPaths$2.updateDates, {
3734
3734
  loanPid: loanPid
3735
3735
  });
3736
3736
  return await http.post(path, payload);
3737
3737
  };
3738
3738
  const loanApi = {
3739
- searchBaseURL: `${apiConfig.baseURL}${apiPaths$1.list}`,
3739
+ searchBaseURL: `${apiConfig.baseURL}${apiPaths$2.list}`,
3740
3740
  assignItemToLoan: assignItemToLoan$1,
3741
3741
  query: queryBuilder$4,
3742
3742
  list: list$7,
@@ -3785,12 +3785,25 @@ function serializeLocationResponse(hit) {
3785
3785
  }
3786
3786
  return result;
3787
3787
  }
3788
+ function serializeLocationClosurePeriodsResponse(hit) {
3789
+ let result = [];
3790
+ if (!_isEmpty__default["default"](hit)) {
3791
+ result = hit.closure_periods.map(period => ({
3792
+ start: new luxon.DateTime.fromISO(period.start),
3793
+ end: new luxon.DateTime.fromISO(period.end)
3794
+ }));
3795
+ }
3796
+ return result;
3797
+ }
3788
3798
  const internalLocationSerializer = {
3789
3799
  fromJSON: serializeInternalLocationResponse
3790
3800
  };
3791
3801
  const locationSerializer = {
3792
3802
  fromJSON: serializeLocationResponse
3793
3803
  };
3804
+ const locationClosurePeriodsSerializer = {
3805
+ fromJSON: serializeLocationClosurePeriodsResponse
3806
+ };
3794
3807
 
3795
3808
  const internalLocationURL = '/internal-locations/';
3796
3809
  const get$6 = async internalLocationPid => {
@@ -3831,6 +3844,9 @@ const internalLocationApi = {
3831
3844
  };
3832
3845
 
3833
3846
  const locationURL = '/locations/';
3847
+ const apiPaths$1 = {
3848
+ closure_periods: `/closure_periods/`
3849
+ };
3834
3850
  const get$5 = async locationPid => {
3835
3851
  const response = await http.get(`${locationURL}${locationPid}`);
3836
3852
  response.data = locationSerializer.fromJSON(response.data);
@@ -3857,13 +3873,19 @@ const list$5 = async function () {
3857
3873
  response.data.hits = response.data.hits.hits.map(hit => locationSerializer.fromJSON(hit));
3858
3874
  return response;
3859
3875
  };
3876
+ const getClosurePeriods = async (locationPid, year) => {
3877
+ const response = await http.get(`${locationURL}${locationPid}${apiPaths$1.closure_periods}${year}`);
3878
+ response.data = locationClosurePeriodsSerializer.fromJSON(response.data);
3879
+ return response;
3880
+ };
3860
3881
  const locationApi = {
3861
3882
  list: list$5,
3862
3883
  get: get$5,
3863
3884
  delete: del$2,
3864
3885
  create: create$2,
3865
3886
  update: update$2,
3866
- url: locationURL
3887
+ url: locationURL,
3888
+ getClosurePeriods: getClosurePeriods
3867
3889
  };
3868
3890
 
3869
3891
  function serializeResponse$2(hit) {
@@ -13165,102 +13187,70 @@ var DatePicker$1 = Overridable__default["default"].component('DatePicker', DateP
13165
13187
  class LocationDatePicker extends React.Component {
13166
13188
  constructor(props) {
13167
13189
  super(props);
13168
- this.fetchLocation = async locationPid => {
13169
- this.setState({
13170
- isLoading: true
13171
- });
13172
- try {
13173
- const response = await locationApi.get(locationPid);
13174
- this.setState({
13175
- data: response.data,
13176
- isLoading: false,
13177
- error: {}
13178
- });
13179
- } catch (error) {
13190
+ this.fetchData = () => {
13191
+ this.fetchLocationClosurePeriods();
13192
+ };
13193
+ this.fetchLocationClosurePeriods = async () => {
13194
+ const {
13195
+ locationPid
13196
+ } = this.props;
13197
+ if (!locationPid) {
13180
13198
  this.setState({
13181
13199
  isLoading: false,
13182
- error: error
13200
+ disabledDates: [],
13201
+ error: {
13202
+ message: 'Location PID is missing.'
13203
+ }
13183
13204
  });
13205
+ return;
13184
13206
  }
13185
- };
13186
- this.disableAllDates = (minDate, maxDate, disabled) => {
13187
- let date = luxon.DateTime.fromISO(minDate);
13188
- const dateMax = luxon.DateTime.fromISO(maxDate);
13189
- while (date <= dateMax) {
13190
- const dateISO = date.toISODate();
13191
- disabled.push(dateISO);
13192
- date = date.plus({
13193
- days: 1
13207
+ this.setState({
13208
+ isLoading: true,
13209
+ error: null
13210
+ });
13211
+ const currentYear = luxon.DateTime.now().year;
13212
+ const yearsToFetch = [currentYear - 1, currentYear, currentYear + 1];
13213
+ try {
13214
+ const promises = yearsToFetch.map(year => {
13215
+ const cancellable = withCancel(locationApi.getClosurePeriods(locationPid, year));
13216
+ this.cancellableFetches.push(cancellable);
13217
+ return cancellable.promise;
13194
13218
  });
13195
- }
13196
- };
13197
- this.disableClosures = (maxDate, minDate, data, disabled) => {
13198
- const weekdays = data.metadata.opening_weekdays,
13199
- exceptions = data.metadata.opening_exceptions;
13200
- let date = luxon.DateTime.fromISO(minDate);
13201
- const dateMax = luxon.DateTime.fromISO(maxDate);
13202
- while (date <= dateMax) {
13203
- const dateISO = date.toISODate();
13204
- let isOpen = weekdays[date.weekday - 1].is_open;
13205
- exceptions.forEach(exception => {
13206
- if (exception.start_date <= dateISO && dateISO <= exception.end_date) {
13207
- isOpen = exception.is_open;
13219
+ const responses = await Promise.all(promises);
13220
+ const disabledDateRanges = responses.flatMap(response => response.data);
13221
+ const disabledDates = disabledDateRanges.flatMap(dateRange => {
13222
+ const dates = [];
13223
+ let currentDate = luxon.DateTime.fromISO(dateRange.start);
13224
+ const endDate = luxon.DateTime.fromISO(dateRange.end);
13225
+ while (currentDate <= endDate) {
13226
+ dates.push(currentDate.toISODate());
13227
+ currentDate = currentDate.plus({
13228
+ days: 1
13229
+ });
13208
13230
  }
13231
+ return dates;
13209
13232
  });
13210
- if (!isOpen) {
13211
- disabled.push(dateISO);
13212
- }
13213
- date = date.plus({
13214
- days: 1
13233
+ this.setState({
13234
+ disabledDates: disabledDates,
13235
+ isLoading: false
13215
13236
  });
13216
- }
13217
-
13218
- // Disable recent X days including current date as set in the config
13219
- date = luxon.DateTime.fromISO(minDate);
13220
- let workingDaysToOffset = invenioConfig.CIRCULATION.requestStartOffset;
13221
- let i = 0;
13222
- while (workingDaysToOffset > 0) {
13223
- const dateISO = date.toISODate();
13224
- if (dateISO === disabled[i]) {
13225
- i++;
13226
- } else {
13227
- disabled.push(dateISO);
13228
- workingDaysToOffset--;
13229
- }
13230
- date = date.plus({
13231
- days: 1
13237
+ } catch (fetchError) {
13238
+ console.error('LocationDatePicker: Failed to fetch closure periods.', fetchError);
13239
+ this.setState({
13240
+ isLoading: false,
13241
+ error: fetchError
13232
13242
  });
13233
13243
  }
13234
13244
  };
13235
- this.listDisabled = () => {
13236
- const {
13237
- minDate,
13238
- maxDate
13239
- } = this.props;
13240
- const {
13241
- isLoading,
13242
- error,
13243
- data
13244
- } = this.state;
13245
- const disabled = [];
13246
- if (isLoading) {
13247
- this.disableAllDates(minDate, maxDate, disabled);
13248
- } else if (!error.response && !_isEmpty__default["default"](data)) {
13249
- this.disableClosures(maxDate, minDate, data, disabled);
13250
- }
13251
- return disabled;
13252
- };
13253
- this.fetchData = () => {
13254
- const {
13255
- locationPid
13256
- } = this.props;
13257
- this.fetchLocation(locationPid);
13258
- };
13259
13245
  this.state = {
13260
- data: {},
13246
+ disabledDates: [],
13261
13247
  isLoading: false,
13262
- error: {}
13248
+ error: null
13263
13249
  };
13250
+ this.cancellableFetches = [];
13251
+ }
13252
+ componentWillUnmount() {
13253
+ this.cancellableFetches.forEach(cancellable => cancellable.cancel());
13264
13254
  }
13265
13255
  render() {
13266
13256
  const {
@@ -13272,12 +13262,18 @@ class LocationDatePicker extends React.Component {
13272
13262
  ...otherProps
13273
13263
  } = this.props;
13274
13264
  const {
13275
- isLoading
13265
+ disabledDates,
13266
+ isLoading,
13267
+ error
13276
13268
  } = this.state;
13269
+ if (error) {
13270
+ console.error(error);
13271
+ return null;
13272
+ }
13277
13273
  return /*#__PURE__*/React__default["default"].createElement(DatePicker$1, Object.assign({}, otherProps, {
13278
13274
  minDate: minDate,
13279
13275
  maxDate: maxDate,
13280
- disable: this.listDisabled(),
13276
+ disable: disabledDates,
13281
13277
  handleDateChange: handleDateChange,
13282
13278
  loading: isLoading,
13283
13279
  fetchData: this.fetchData,
@@ -13289,7 +13285,9 @@ class LocationDatePicker extends React.Component {
13289
13285
  }
13290
13286
  LocationDatePicker.defaultProps = {
13291
13287
  defaultValue: '',
13292
- locationPid: null
13288
+ locationPid: null,
13289
+ minDate: null,
13290
+ maxDate: null
13293
13291
  };
13294
13292
 
13295
13293
  const serializeError = error => ({
@@ -15776,9 +15774,8 @@ class ExistingRelations extends React.Component {
15776
15774
  const {
15777
15775
  activePage
15778
15776
  } = this.state;
15779
- const activeRows = rows.slice((activePage - 1) * showMaxRows, activePage * showMaxRows);
15780
15777
  return /*#__PURE__*/React__default["default"].createElement(ResultsTable, {
15781
- data: activeRows,
15778
+ data: rows,
15782
15779
  columns: columns,
15783
15780
  totalHitsCount: rows.length,
15784
15781
  showMaxRows: showMaxRows,
@@ -27282,16 +27279,18 @@ class LoanUpdateDates$1 extends React.Component {
27282
27279
  }), warning && this.renderWarning(warning), /*#__PURE__*/React__default["default"].createElement(semanticUiReact.Form, null, /*#__PURE__*/React__default["default"].createElement(semanticUiReact.Form.Group, null, /*#__PURE__*/React__default["default"].createElement(semanticUiReact.Form.Field, {
27283
27280
  inline: true,
27284
27281
  required: true
27285
- }, /*#__PURE__*/React__default["default"].createElement("label", null, startLabel), /*#__PURE__*/React__default["default"].createElement(DatePicker$1, {
27282
+ }, /*#__PURE__*/React__default["default"].createElement("label", null, startLabel), /*#__PURE__*/React__default["default"].createElement(LocationDatePicker, {
27286
27283
  maxDate: active ? this.today() : null,
27287
27284
  defaultValue: active ? startDate : requestStartDate,
27285
+ locationPid: sessionManager.user.locationPid,
27288
27286
  placeholder: startLabel,
27289
27287
  handleDateChange: value => this.handleStartDateChange(value)
27290
27288
  })), /*#__PURE__*/React__default["default"].createElement(semanticUiReact.Form.Field, {
27291
27289
  inline: true,
27292
27290
  required: true
27293
- }, /*#__PURE__*/React__default["default"].createElement("label", null, endLabel), /*#__PURE__*/React__default["default"].createElement(DatePicker$1, {
27291
+ }, /*#__PURE__*/React__default["default"].createElement("label", null, endLabel), /*#__PURE__*/React__default["default"].createElement(LocationDatePicker, {
27294
27292
  defaultValue: active ? endDate : requestExpireDate,
27293
+ locationPid: sessionManager.user.locationPid,
27295
27294
  placeholder: endLabel,
27296
27295
  handleDateChange: value => this.handleEndDateChange(value)
27297
27296
  }))), hint && this.renderHint(hint))), /*#__PURE__*/React__default["default"].createElement(semanticUiReact.Modal.Actions, {
@@ -29429,7 +29428,7 @@ class PatronBulkExtendLoans$1 extends React.Component {
29429
29428
  patronPid,
29430
29429
  bulkLoanExtension,
29431
29430
  isLoading,
29432
- hidden,
29431
+ disabled,
29433
29432
  ...uiProps
29434
29433
  } = this.props;
29435
29434
  const {
@@ -29439,12 +29438,13 @@ class PatronBulkExtendLoans$1 extends React.Component {
29439
29438
  open: open,
29440
29439
  onClose: this.close,
29441
29440
  onOpen: this.open,
29442
- trigger: !hidden && /*#__PURE__*/React__default["default"].createElement(semanticUiReact.Button, Object.assign({
29441
+ trigger: /*#__PURE__*/React__default["default"].createElement(semanticUiReact.Button, Object.assign({
29443
29442
  labelPosition: "left",
29444
29443
  fluid: true,
29445
29444
  icon: true,
29446
29445
  primary: true,
29447
- loading: isLoading
29446
+ loading: isLoading,
29447
+ disabled: disabled
29448
29448
  }, uiProps), /*#__PURE__*/React__default["default"].createElement(semanticUiReact.Icon, {
29449
29449
  name: "refresh"
29450
29450
  }), "Extend all loans")
@@ -29460,7 +29460,7 @@ class PatronBulkExtendLoans$1 extends React.Component {
29460
29460
  }
29461
29461
  PatronBulkExtendLoans$1.defaultProps = {
29462
29462
  isLoading: false,
29463
- hidden: true
29463
+ disabled: true
29464
29464
  };
29465
29465
 
29466
29466
  const IS_LOADING$l = 'fetchPatronCurrentLoans/IS_LOADING';
@@ -30993,7 +30993,7 @@ class PatronDetails$1 extends React.Component {
30993
30993
  offset: 150
30994
30994
  }, /*#__PURE__*/React__default["default"].createElement(PatronBulkExtendLoans, {
30995
30995
  patronPid: currentPatronPid,
30996
- hidden: currentLoans.total === 0,
30996
+ disabled: currentLoans.total === 0,
30997
30997
  fluid: true,
30998
30998
  color: "blue"
30999
30999
  }), /*#__PURE__*/React__default["default"].createElement(semanticUiReact.Divider, {
@@ -39007,7 +39007,7 @@ class PatronCurrentLoans$1 extends React.Component {
39007
39007
  floated: "right"
39008
39008
  }, /*#__PURE__*/React__default["default"].createElement(PatronBulkExtendLoans, {
39009
39009
  patronPid: currentUser.id,
39010
- hidden: loans.total === 0,
39010
+ disabled: loans.total === 0,
39011
39011
  color: "orange"
39012
39012
  }))), /*#__PURE__*/React__default["default"].createElement(ILSItemPlaceholder, {
39013
39013
  fluid: true,