-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Adds routes for patron_transaction_events. * Adds brief view for patron_transaction_events. * Adds special facet-like components for events total amount. Co-Authored-by: Renaud Michotte <renaud.michotte@gmail.com>
- Loading branch information
Showing
45 changed files
with
1,558 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...patron/patron-transactions/patron-transaction-event/patron-transaction-event.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ons/patron-transaction/default-transaction-detail/default-transaction-detail.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/* | ||
* RERO ILS UI | ||
* Copyright (C) 2019-2022 RERO | ||
* Copyright (C) 2019-2022 UCLouvain | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as published by | ||
* the Free Software Foundation, version 3 of the License. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
import { Pipe, PipeTransform } from '@angular/core'; | ||
import { RecordService } from '@rero/ng-core'; | ||
import { Observable } from 'rxjs'; | ||
import { map } from 'rxjs/operators'; | ||
|
||
@Pipe({ | ||
name: 'patronName' | ||
}) | ||
export class PatronNamePipe implements PipeTransform { | ||
|
||
/** | ||
* Constructor | ||
* @param _recordService: RecordService | ||
*/ | ||
constructor( | ||
private _recordService: RecordService | ||
) {} | ||
|
||
/** | ||
* Build the usage name for a patron based on its PID | ||
* @param patronPid - string: the patron pid | ||
* @returns an observable returning the patron name as string if patron exists. | ||
*/ | ||
transform(patronPid: string): Observable<undefined | string> { | ||
return this._recordService.getRecord('patrons', patronPid).pipe( | ||
map((data: any) => data.metadata), | ||
map((metadata: any) => [metadata?.last_name, metadata?.first_name].join(', ')) | ||
) | ||
} | ||
|
||
} |
26 changes: 26 additions & 0 deletions
26
...view/patron-transaction-events-brief-view/patron-transaction-event-default.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<!-- | ||
RERO ILS UI | ||
Copyright (C) 2019-2022 RERO | ||
Copyright (C) 2019-2022 UCLouvain | ||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU Affero General Public License as published by | ||
the Free Software Foundation, version 3 of the License. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU Affero General Public License for more details. | ||
You should have received a copy of the GNU Affero General Public License | ||
along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
--> | ||
<div class="description container pl-0"> | ||
<h5 class="mb-0">{{ parent.note }}</h5> | ||
<dl class="row ml-3 mb-0"> | ||
<dt class="label-title col-3" translate>Patron</dt> | ||
<dd class="col-9"> | ||
<a [routerLink]="['/records', 'patrons', 'detail', parent.patron.pid]">{{ parent.patron.pid | patronName | async }}</a> | ||
</dd> | ||
</dl> | ||
</div> |
32 changes: 32 additions & 0 deletions
32
...f-view/patron-transaction-events-brief-view/patron-transaction-event-default.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* RERO ILS UI | ||
* Copyright (C) 2019-2022 RERO | ||
* Copyright (C) 2019-2022 UCLouvain | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as published by | ||
* the Free Software Foundation, version 3 of the License. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
import { Component, Input } from '@angular/core'; | ||
import { PatronTransaction, PatronTransactionEvent } from '../../../classes/patron-transaction'; | ||
|
||
@Component({ | ||
selector: 'admin-patron-transaction-event-default', | ||
templateUrl: './patron-transaction-event-default.component.html', | ||
styleUrls: ['./patron-transaction-events-brief-view.component.scss'] | ||
}) | ||
export class PatronTransactionEventDefaultComponent { | ||
|
||
@Input() event: PatronTransactionEvent; | ||
@Input() parent: PatronTransaction; | ||
|
||
} |
31 changes: 31 additions & 0 deletions
31
...view/patron-transaction-events-brief-view/patron-transaction-event-overdue.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<!-- | ||
RERO ILS UI | ||
Copyright (C) 2019-2022 RERO | ||
Copyright (C) 2019-2022 UCLouvain | ||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU Affero General Public License as published by | ||
the Free Software Foundation, version 3 of the License. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU Affero General Public License for more details. | ||
You should have received a copy of the GNU Affero General Public License | ||
along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
--> | ||
<div class="description container pl-0"> | ||
<h5 class="mb-0">{{ parent.document.title | mainTitle }}</h5> | ||
<dl class="row ml-3 mb-0"> | ||
<dt class="label-title col-3" translate>Call-number</dt> | ||
<dd class="col-9"> | ||
<shared-inherited-call-number [item]="parent.loan.item"></shared-inherited-call-number> | ||
(<a [routerLink]="['/records', 'items', 'detail', parent.loan.item.pid]">{{ parent.loan.item.barcode }}</a>) | ||
</dd> | ||
<dt class="label-title col-3" translate>Patron</dt> | ||
<dd class="col-9"> | ||
<a [routerLink]="['/records', 'patrons', 'detail', parent.patron.pid]">{{ parent.patron.pid | patronName | async }}</a> | ||
</dd> | ||
</dl> | ||
</div> |
Oops, something went wrong.