generated from Tailormap/tailormap-starter
-
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.
PMW-4: Allow to add new planregistrations
- Loading branch information
1 parent
dacc7a8
commit 6b0ca3b
Showing
11 changed files
with
172 additions
and
34 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
File renamed without changes.
File renamed without changes.
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
3 changes: 3 additions & 0 deletions
3
projects/planmonitor-wonen/src/lib/planmonitor-toggle/planmonitor-toggle.component.css
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,3 @@ | ||
mat-button-toggle-group { | ||
--mat-standard-button-toggle-height: 40px; | ||
} |
4 changes: 4 additions & 0 deletions
4
projects/planmonitor-wonen/src/lib/planmonitor-toggle/planmonitor-toggle.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,4 @@ | ||
<mat-button-toggle-group (change)="toggleChanged($event)" [value]="activeToggle$ | async"> | ||
<mat-button-toggle value="create">Plan intekenen</mat-button-toggle> | ||
<mat-button-toggle value="edit">Plan bewerken</mat-button-toggle> | ||
</mat-button-toggle-group> |
27 changes: 27 additions & 0 deletions
27
projects/planmonitor-wonen/src/lib/planmonitor-toggle/planmonitor-toggle.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,27 @@ | ||
import { Component, ChangeDetectionStrategy } from '@angular/core'; | ||
import { MatButtonToggleChange } from '@angular/material/button-toggle'; | ||
import { PlanregistratiesService } from '../services/planregistraties.service'; | ||
import { map, Observable } from 'rxjs'; | ||
|
||
@Component({ | ||
selector: 'lib-planmonitor-toggle', | ||
templateUrl: './planmonitor-toggle.component.html', | ||
styleUrls: ['./planmonitor-toggle.component.css'], | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
}) | ||
export class PlanmonitorToggleComponent { | ||
|
||
public activeToggle$: Observable<string>; | ||
|
||
constructor( | ||
private planregistratieService: PlanregistratiesService, | ||
) { | ||
this.activeToggle$ = this.planregistratieService.isCreatingNewPlan$() | ||
.pipe(map(creatingNewPlan => creatingNewPlan ? 'create' : 'edit')); | ||
} | ||
|
||
public toggleChanged($event: MatButtonToggleChange) { | ||
this.planregistratieService.setCreateNewPlan($event.value === 'create'); | ||
} | ||
|
||
} |
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