mirror of
https://github.com/richard-loafle/fuse-angular.git
synced 2025-01-10 04:25:08 +00:00
(Scrumboard) Fixed: Undefined matDialogRef
(Calendar) Fixed: Undefined matDialogRef (Calendar) Updated angular-calendar
This commit is contained in:
parent
94275c507f
commit
c2d5a5a2a5
|
@ -118,7 +118,6 @@ export class FuseThemeOptionsComponent implements OnInit, OnDestroy
|
||||||
// Reset the form values based on the
|
// Reset the form values based on the
|
||||||
// selected layout style
|
// selected layout style
|
||||||
this._resetFormValues(value);
|
this._resetFormValues(value);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Subscribe to the form value changes
|
// Subscribe to the form value changes
|
||||||
|
|
|
@ -20,7 +20,7 @@ export class CalendarFakeDb
|
||||||
start : subDays(startOfDay(new Date()), 1),
|
start : subDays(startOfDay(new Date()), 1),
|
||||||
end : addDays(new Date(), 1),
|
end : addDays(new Date(), 1),
|
||||||
title : 'A 3 day event',
|
title : 'A 3 day event',
|
||||||
allDay : false,
|
allDay : true,
|
||||||
color : {
|
color : {
|
||||||
primary : '#ad2121',
|
primary : '#ad2121',
|
||||||
secondary: '#FAE3E3'
|
secondary: '#FAE3E3'
|
||||||
|
|
|
@ -4,7 +4,8 @@ import {
|
||||||
MatButtonModule, MatDatepickerModule, MatDialogModule, MatFormFieldModule, MatIconModule, MatInputModule, MatSlideToggleModule, MatToolbarModule, MatTooltipModule
|
MatButtonModule, MatDatepickerModule, MatDialogModule, MatFormFieldModule, MatIconModule, MatInputModule, MatSlideToggleModule, MatToolbarModule, MatTooltipModule
|
||||||
} from '@angular/material';
|
} from '@angular/material';
|
||||||
import { ColorPickerModule } from 'ngx-color-picker';
|
import { ColorPickerModule } from 'ngx-color-picker';
|
||||||
import { CalendarModule as AngularCalendarModule } from 'angular-calendar';
|
import { CalendarModule as AngularCalendarModule, DateAdapter } from 'angular-calendar';
|
||||||
|
import { adapterFactory } from 'angular-calendar/date-adapters/date-fns';
|
||||||
|
|
||||||
import { FuseSharedModule } from '@fuse/shared.module';
|
import { FuseSharedModule } from '@fuse/shared.module';
|
||||||
import { FuseConfirmDialogModule } from '@fuse/components';
|
import { FuseConfirmDialogModule } from '@fuse/components';
|
||||||
|
@ -42,7 +43,10 @@ const routes: Routes = [
|
||||||
MatToolbarModule,
|
MatToolbarModule,
|
||||||
MatTooltipModule,
|
MatTooltipModule,
|
||||||
|
|
||||||
AngularCalendarModule.forRoot(),
|
AngularCalendarModule.forRoot({
|
||||||
|
provide : DateAdapter,
|
||||||
|
useFactory: adapterFactory
|
||||||
|
}),
|
||||||
ColorPickerModule,
|
ColorPickerModule,
|
||||||
|
|
||||||
FuseSharedModule,
|
FuseSharedModule,
|
||||||
|
|
|
@ -117,7 +117,7 @@
|
||||||
|
|
||||||
<button *ngIf="action !=='edit'"
|
<button *ngIf="action !=='edit'"
|
||||||
mat-raised-button
|
mat-raised-button
|
||||||
(click)="_matDialogRef.close(eventForm)"
|
(click)="matDialogRef.close(eventForm)"
|
||||||
class="save-button mat-accent"
|
class="save-button mat-accent"
|
||||||
[disabled]="eventForm.invalid"
|
[disabled]="eventForm.invalid"
|
||||||
aria-label="SAVE">
|
aria-label="SAVE">
|
||||||
|
@ -126,7 +126,7 @@
|
||||||
|
|
||||||
<button *ngIf="action ==='edit'"
|
<button *ngIf="action ==='edit'"
|
||||||
mat-raised-button
|
mat-raised-button
|
||||||
(click)="_matDialogRef.close(['save',eventForm])"
|
(click)="matDialogRef.close(['save',eventForm])"
|
||||||
class="save-button mat-accent"
|
class="save-button mat-accent"
|
||||||
[disabled]="eventForm.invalid"
|
[disabled]="eventForm.invalid"
|
||||||
aria-label="SAVE">
|
aria-label="SAVE">
|
||||||
|
@ -135,7 +135,7 @@
|
||||||
|
|
||||||
<button *ngIf="action ==='edit'"
|
<button *ngIf="action ==='edit'"
|
||||||
mat-icon-button
|
mat-icon-button
|
||||||
(click)="_matDialogRef.close(['delete',eventForm])"
|
(click)="matDialogRef.close(['delete',eventForm])"
|
||||||
aria-label="Delete"
|
aria-label="Delete"
|
||||||
matTooltip="Delete">
|
matTooltip="Delete">
|
||||||
<mat-icon>delete</mat-icon>
|
<mat-icon>delete</mat-icon>
|
||||||
|
|
|
@ -130,7 +130,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- CLOSE DIALOG BUTTON -->
|
<!-- CLOSE DIALOG BUTTON -->
|
||||||
<button mat-icon-button (click)="_matDialogRef.close()" aria-label="Close Dialog">
|
<button mat-icon-button (click)="matDialogRef.close()" aria-label="Close Dialog">
|
||||||
<mat-icon>close</mat-icon>
|
<mat-icon>close</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
<!-- / CLOSE DIALOG BUTTON -->
|
<!-- / CLOSE DIALOG BUTTON -->
|
||||||
|
|
|
@ -36,13 +36,13 @@ export class ScrumboardCardDialogComponent implements OnInit, OnDestroy
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* @param {MatDialogRef<ScrumboardCardDialogComponent>} _matDialogRef
|
* @param {MatDialogRef<ScrumboardCardDialogComponent>} matDialogRef
|
||||||
* @param _data
|
* @param _data
|
||||||
* @param {MatDialog} _matDialog
|
* @param {MatDialog} _matDialog
|
||||||
* @param {ScrumboardService} _scrumboardService
|
* @param {ScrumboardService} _scrumboardService
|
||||||
*/
|
*/
|
||||||
constructor(
|
constructor(
|
||||||
private _matDialogRef: MatDialogRef<ScrumboardCardDialogComponent>,
|
public matDialogRef: MatDialogRef<ScrumboardCardDialogComponent>,
|
||||||
@Inject(MAT_DIALOG_DATA) private _data: any,
|
@Inject(MAT_DIALOG_DATA) private _data: any,
|
||||||
private _matDialog: MatDialog,
|
private _matDialog: MatDialog,
|
||||||
private _scrumboardService: ScrumboardService
|
private _scrumboardService: ScrumboardService
|
||||||
|
@ -301,7 +301,7 @@ export class ScrumboardCardDialogComponent implements OnInit, OnDestroy
|
||||||
this.confirmDialogRef.afterClosed().subscribe(result => {
|
this.confirmDialogRef.afterClosed().subscribe(result => {
|
||||||
if ( result )
|
if ( result )
|
||||||
{
|
{
|
||||||
this._matDialogRef.close();
|
this.matDialogRef.close();
|
||||||
this._scrumboardService.removeCard(this.card.id, this.list.id);
|
this._scrumboardService.removeCard(this.card.id, this.list.id);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue
Block a user