-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
patron: allows librarians to update user password #411
Conversation
1a37f11
to
37160c6
Compare
37160c6
to
8ed6e06
Compare
this.closeModal(); | ||
}, | ||
(resp) => { | ||
console.log('Error: Update Patron Password', resp); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove console.log
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that it is to leave at is as it is displayed only when an error occurs. This can be useful. But if you want I can remove it.
@@ -15,6 +15,10 @@ | |||
along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
--> | |||
<article *ngIf="currentPatron$ | async as patron"> | |||
<div *ngIf="canUpdate()" class="float-right"> | |||
<button [routerLink]="['/records','patrons','edit', patron.pid]" class="btn btn-sm btn-primary ml-1 ng-star-inserted" id="profile-edit-button" title="Edit"><i class="fa fa-pen mr-1"></i>{{ 'Edit' | translate }}</button> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
COSMETIC: Too long. Multiple lines ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is my default editor configuration... but I will do it.
</ng-container> | ||
</dd> | ||
</dl> | ||
<button *ngIf="canUpdate()" class="btn btn-sm btn-outline-primary mt-2" id="profile-change-password-button" (click)="updatePatronPassword(patron)" title="Change Password">{{ 'Change Password' | translate }}</button> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
COSMETIC: Too long. Multiple lines ?
<div *ngIf="canUpdate()" class="float-right"> | ||
<button [routerLink]="['/records','patrons','edit', patron.pid]" class="btn btn-sm btn-primary ml-1 ng-star-inserted" id="profile-edit-button" title="Edit"><i class="fa fa-pen mr-1"></i>{{ 'Edit' | translate }}</button> | ||
</div> | ||
<h3 class="mb-3">{{ patron.last_name }} {{ patron.first_name }}</h3> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optional case management for first name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes but for the moment the first_name is a required property. A lot of changes will be needed if we decide to make it optional.
1336ad7
to
5e070cb
Compare
@@ -46,11 +46,17 @@ export class UserService { | |||
return this._allowInterfaceAccess; | |||
} | |||
|
|||
/** API Prefix, i.e. /api. */ | |||
private _apiPrefix = ''; | |||
|
|||
constructor( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing docstring for constructor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can mention rero/rero-ils#1364 in your commit message.
Commit proposition, but check if it's correct:
patron: allows librarians to update user password
* Adds a button in the circulation patron profile to update the
password.
* Adds an edit button in the circulation patron profile.
* Displays patron role in the patron information of the circulation
module and in the patron detailed view.
* Allows searching patron by name in the checkout view, by searching in
all fields.
5e070cb
to
76f2b1b
Compare
76f2b1b
to
50b4fb6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and approved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commit message approved.
50b4fb6
to
a080c43
Compare
* Adds a button in the circulation patron profile to update the password. * Adds an edit button in the circulation patron profile. * Displays patron role in the patron information of the circulation profile and in the patron detailed view. * Sets a default value for the patron expiration date to now + 3 years. * Allows searching patron by name in the checkout view, by searching in all fields, closes rero/rero-ils#1364. Co-Authored-by: Johnny Mariéthoz <Johnny.Mariethoz@rero.ch>
a080c43
to
50fab80
Compare
password.
Co-Authored-by: Johnny Mariéthoz Johnny.Mariethoz@rero.ch
Why are you opening this PR?
Dependencies
How to test?
Code review check list