return this.handlePrecat(result);
case 'OPEN_CIRCULATION_EXISTS':
+
+ if (result.firstEvent.payload.auto_renew) {
+ const coParams = Object.assign({}, result.params); // clone
+ return this.renew(coParams);
+ }
+
return this.handleOpenCirc(result);
case 'COPY_IN_TRANSIT':
this.components.openCircDialog.sameUser = sameUser;
this.components.openCircDialog.circDate = circ.xact_start();
- return this.components.openCircDialog.open().toPromise();
+ return this.components.openCircDialog.open({size: 'lg'}).toPromise();
})
.then(fromDialog => {
const coParams = Object.assign({}, result.params); // clone
- if (sameUser) {
+ if (fromDialog.renew) {
coParams.void_overdues = fromDialog.forgiveFines;
return this.renew(coParams);
}
<div class="flex-1"></div>
<div>
- <button type="button" class="btn btn-success" *ngIf="!sameUser"
- (click)="close({forgiveFines: forgiveFines})" i18n>
+ <button type="button" class="btn btn-success"
+ (click)="close({checkout: true, forgiveFines: forgiveFines})" i18n>
Normal Checkin Then Checkout</button>
- <button type="button" class="btn btn-success" *ngIf="sameUser"
- (click)="close({forgiveFines: forgiveFines})" i18n>Renew</button>
+ <button type="button" class="btn btn-info ml-2" *ngIf="sameUser"
+ (click)="close({renew: true, forgiveFines: forgiveFines})" i18n>Renew</button>
<button type="button" class="btn btn-warning ml-2"
(click)="close()" i18n>Cancel</button>