-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from squzy/feat/notification
Feat/notification
- Loading branch information
Showing
36 changed files
with
1,092 additions
and
16 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
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
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
1 change: 1 addition & 0 deletions
1
src/app/modules/notifications/components/list/config/config.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 @@ | ||
<pre>{{data.Method | json}}</pre> |
Empty file.
13 changes: 13 additions & 0 deletions
13
src/app/modules/notifications/components/list/config/config.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,13 @@ | ||
import { Component, ChangeDetectionStrategy, Inject } from '@angular/core'; | ||
import { MAT_BOTTOM_SHEET_DATA } from '@angular/material/bottom-sheet'; | ||
import { NotificationMethod } from 'src/app/shared/interfaces/notifications.interface'; | ||
|
||
@Component({ | ||
selector: 'sqd-notification-method-config', | ||
templateUrl: './config.component.html', | ||
styleUrls: ['./config.component.scss'], | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
}) | ||
export class SchedulerConfigComponent { | ||
constructor(@Inject(MAT_BOTTOM_SHEET_DATA) public data: NotificationMethod) {} | ||
} |
92 changes: 92 additions & 0 deletions
92
src/app/modules/notifications/components/list/list.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,92 @@ | ||
<mat-card> | ||
<mat-card-header> | ||
<button | ||
mat-stroked-button | ||
(click)="addMethod()" | ||
>{{ 'MODULES.NOTIFICATION_METHODS.TABLE.ADD' | translate }}</button> | ||
<button | ||
[disabled]="!selection.selected.length" | ||
mat-stroked-button | ||
(click)="activateSelected()" | ||
>{{ 'MODULES.NOTIFICATION_METHODS.TABLE.ACTIVATE' | translate }}</button> | ||
<button | ||
[disabled]="!selection.selected.length" | ||
mat-stroked-button | ||
(click)="deactivateSelected()" | ||
>{{ 'MODULES.NOTIFICATION_METHODS.TABLE.DEACTIVATE' | translate }}</button> | ||
<button | ||
[disabled]="!selection.selected.length" | ||
mat-stroked-button | ||
(click)="removeSelected()" | ||
>{{ 'MODULES.NOTIFICATION_METHODS.TABLE.REMOVE' | translate }}</button> | ||
</mat-card-header> | ||
<mat-card-content> | ||
<mat-form-field> | ||
<mat-label>{{ 'MODULES.NOTIFICATION_METHODS.TABLE.FILTER' | translate }}</mat-label> | ||
<input matInput #filterInput> | ||
</mat-form-field> | ||
<table mat-table [dataSource]="dataSource" matSort> | ||
<ng-container matColumnDef="select"> | ||
<th mat-header-cell *matHeaderCellDef> | ||
<mat-checkbox | ||
(change)="$event ? masterToggle() : null" | ||
[checked]="selection.hasValue() && isAllSelected()" | ||
[indeterminate]="selection.hasValue() && !isAllSelected()" | ||
></mat-checkbox> | ||
</th> | ||
<td mat-cell *matCellDef="let element"> | ||
<mat-checkbox | ||
(click)="$event.stopPropagation()" | ||
(change)="$event ? selection.toggle(element) : null" | ||
[checked]="selection.isSelected(element)" | ||
></mat-checkbox> | ||
</td> | ||
</ng-container> | ||
|
||
<ng-container matColumnDef="ID"> | ||
<th | ||
mat-header-cell | ||
*matHeaderCellDef | ||
>{{ 'MODULES.NOTIFICATION_METHODS.TABLE.ID' | translate }}</th> | ||
<td mat-cell *matCellDef="let element">{{ element.id }}</td> | ||
</ng-container> | ||
|
||
<ng-container matColumnDef="name"> | ||
<th | ||
mat-header-cell | ||
*matHeaderCellDef | ||
mat-sort-header | ||
>{{ 'MODULES.NOTIFICATION_METHODS.TABLE.NAME' | translate }}</th> | ||
<td mat-cell *matCellDef="let element">{{ element.name ? element.name : '-' }}</td> | ||
</ng-container> | ||
|
||
<ng-container matColumnDef="type"> | ||
<th | ||
mat-header-cell | ||
*matHeaderCellDef | ||
mat-sort-header | ||
>{{ 'MODULES.NOTIFICATION_METHODS.TABLE.TYPE' | translate }}</th> | ||
<td | ||
mat-cell | ||
*matCellDef="let element" | ||
>{{ 'ENUMS.NOTIFICATION_METHODS.TYPE.' + element.type | translate }}</td> | ||
</ng-container> | ||
|
||
<ng-container matColumnDef="status"> | ||
<th | ||
mat-header-cell | ||
*matHeaderCellDef | ||
mat-sort-header | ||
>{{ 'MODULES.NOTIFICATION_METHODS.TABLE.STATUS' | translate }}</th> | ||
<td | ||
mat-cell | ||
*matCellDef="let element" | ||
>{{ 'ENUMS.NOTIFICATION_METHODS.STATUS.' + element.status | translate }}</td> | ||
</ng-container> | ||
|
||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr> | ||
<tr mat-row *matRowDef="let row; columns: displayedColumns" (click)="clickRow(row)"></tr> | ||
</table> | ||
<mat-paginator [pageSizeOptions]="[5, 10, 20]" showFirstLastButtons></mat-paginator> | ||
</mat-card-content> | ||
</mat-card> |
29 changes: 29 additions & 0 deletions
29
src/app/modules/notifications/components/list/list.component.scss
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,29 @@ | ||
$padding: 40px; | ||
|
||
:host { | ||
padding: $padding; | ||
display: flex; | ||
justify-content: center; | ||
flex-direction: column; | ||
mat-card { | ||
mat-card-header::ng-deep { | ||
width: 100%; | ||
display: flex; | ||
justify-content: space-around; | ||
.mat-card-header-text { | ||
display: none; | ||
} | ||
} | ||
} | ||
mat-form-field { | ||
width: 100%; | ||
} | ||
table { | ||
.mat-row { | ||
&:hover { | ||
cursor: pointer; | ||
background: #b4b4b433; | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.