-
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
libraries: add notification settings #516
Conversation
4781212
to
bdf7ca9
Compare
6fd7b2f
to
791322d
Compare
791322d
to
a64e246
Compare
public organisationPid: string; | ||
|
||
/** List of internal notification types */ | ||
internalTypes = ['booking', 'request', 'transit_notice']; |
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.
Should be set in a Enum class into class/library.ts
file. As ItemStatus, or NoteType
a64e246
to
960a044
Compare
960a044
to
6f0b99a
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.
With the new version of Angular, it is recommended to type the return of the function.
General: Add documentation on functions
@@ -19,9 +19,14 @@ | |||
// required as json properties is not lowerCamelCase | |||
|
|||
import { WeekDay } from '@angular/common'; | |||
import { marker } from '@biesbjerg/ngx-translate-extract-marker'; |
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.
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
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.
Unfortunately this does not works with the tests.
export function _(str) { | ||
return marker(str); | ||
} | ||
|
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.
Suggestion: Remove this (test extraction)
|
||
/** Observable for build event */ | ||
private buildEvent = new Subject(); | ||
|
||
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 doc string
@@ -29,14 +31,22 @@ export class LibraryFormService { | |||
|
|||
public form; | |||
|
|||
|
|||
private notificationTypes = []; |
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 doc string
|
||
/** | ||
* Build form | ||
*/ | ||
build() { |
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.
build(): void {
@@ -140,6 +238,9 @@ export class LibraryFormService { | |||
get opening_hours() { | |||
return this.form.get('opening_hours') as FormArray; | |||
} | |||
get notification_settings() { | |||
return this.form.get('notification_settings') as FormArray; | |||
} | |||
|
|||
getValues() { return this.form.value; } |
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.
add return type
public organisationPid; | ||
public organisationPid: string; | ||
|
||
private eventForm: Subscription; |
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 doc string
public organisationPid; | ||
public organisationPid: string; | ||
|
||
private eventForm: Subscription; | ||
|
||
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 doc string
}); | ||
} | ||
|
||
ngOnDestroy() { |
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 doc string and add return type
<dt class="col-sm-3 offset-sm-2 offset-md-0"> | ||
{{ 'Address' | translate }}: | ||
</dt> |
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.
<dt class="col-sm-3 offset-sm-2 offset-md-0 label-title" translate>
Address
</dt>
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.
Great. I didn't now that this exists. Needs refactor other files in a separate PR.
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.
No other remarks than @Garfield-fr
6f0b99a
to
e3a8e3b
Compare
e3a8e3b
to
590ef80
Compare
* Improves library editor appearance for large screens. It doesn't take the full width anymore. * Adds tabs in the library detailed view. * Adds notifications settings in library custom editor. * Displays notification settings in library detail view. Co-Authored-by: Alicia Zangger <alicia.zangger@rero.ch> Co-Authored-by: Johnny Mariéthoz <johnny.mariethoz@rero.ch>
590ef80
to
e2267fd
Compare
the full width anymore.
Co-Authored-by: Alicia Zangger alicia.zangger@rero.ch
Co-Authored-by: Johnny Mariéthoz johnny.mariethoz@rero.ch
Co-Authored-by: Alicia Zangger alicia.zangger@rero.ch
Why are you opening this PR?
To implement task 2013 of US1922 https://tree.taiga.io/project/rero21-reroils/us/1922?milestone=282105
Dependencies
How to test?
Code review check list