Commit fd6dee8c authored by Meet Narendra's avatar Meet Narendra 💬

added dialog box

parent b11a0d5b
...@@ -29,6 +29,7 @@ import { MatListModule } from '@angular/material/list'; ...@@ -29,6 +29,7 @@ import { MatListModule } from '@angular/material/list';
import { MatExpansionModule} from '@angular/material/expansion'; import { MatExpansionModule} from '@angular/material/expansion';
//import { MatDialog, MatDialogRef } from '@angular/material/dialog'; //import { MatDialog, MatDialogRef } from '@angular/material/dialog';
//import { CreateTicketDialog } from './jira/jira.component'; //import { CreateTicketDialog } from './jira/jira.component';
import { MatDialogModule } from '@angular/material/dialog'
@NgModule({ @NgModule({
declarations: [ declarations: [
...@@ -61,6 +62,7 @@ import { MatExpansionModule} from '@angular/material/expansion'; ...@@ -61,6 +62,7 @@ import { MatExpansionModule} from '@angular/material/expansion';
MatStepperModule, MatStepperModule,
MatListModule, MatListModule,
MatExpansionModule, MatExpansionModule,
MatDialogModule
//MatDialog, //MatDialog,
//MatDialogRef, //MatDialogRef,
//CreateTicketDialog //CreateTicketDialog
......
import { DialogRef } from '@angular/cdk/dialog'; import { DialogRef } from '@angular/cdk/dialog';
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { MatDialog } from '@angular/material/dialog';
import { Observable, Observer } from 'rxjs'; import { Observable, Observer } from 'rxjs';
import { FetcherService } from '../fetcher.service'; import { FetcherService } from '../fetcher.service';
...@@ -12,7 +13,7 @@ import { FetcherService } from '../fetcher.service'; ...@@ -12,7 +13,7 @@ import { FetcherService } from '../fetcher.service';
export class JiraComponent implements OnInit { export class JiraComponent implements OnInit {
id: number; id: number;
name: string; name: string;
constructor(private fetcherService: FetcherService) { constructor(public dialog:MatDialog, private fetcherService: FetcherService) {
console.log(window.history.state); console.log(window.history.state);
this.id = window.history.state.id; this.id = window.history.state.id;
this.name = window.history.state.name; this.name = window.history.state.name;
...@@ -28,7 +29,12 @@ export class JiraComponent implements OnInit { ...@@ -28,7 +29,12 @@ export class JiraComponent implements OnInit {
} }
} }
openDialog(){} openDialog(){
const dialogRef = this.dialog.open(CreateTicketDialog);
dialogRef.afterClosed().subscribe(result => {
console.log(`Dialog result: ${result}`);
});
}
calRowHeight(){ calRowHeight(){
let max_issue = Math.max(this.to_do.length,this.in_prog.length,this.done.length,this.backlog.length) let max_issue = Math.max(this.to_do.length,this.in_prog.length,this.done.length,this.backlog.length)
...@@ -77,22 +83,14 @@ export class JiraComponent implements OnInit { ...@@ -77,22 +83,14 @@ export class JiraComponent implements OnInit {
backlog = BACKLOG; backlog = BACKLOG;
} }
/*
@Component({ @Component({
selector: 'create-ticket-dialog', selector: 'create-ticket-dialog',
templateUrl: 'create-ticket-dialog.html', templateUrl: './create-ticket-dialog.html',
}) })
export class CreateTicketDialog { export class CreateTicketDialog {}
constructor(public dialogRef: MatDialogRef<CreateTicketDialog> ) {}
openDialog(){
this.dialogRef.open(CreateTicketDialog, {
height: '250px',
width: '250px'
});
}
}
*/
export const GRID_NAME = [ export const GRID_NAME = [
{name: 'TO DO ISSUES', content: 'BLAH BLAH BLAH'}, {name: 'TO DO ISSUES', content: 'BLAH BLAH BLAH'},
{name: 'IN PROGRESS', content: 'BLAH BLAH BLAH'}, {name: 'IN PROGRESS', content: 'BLAH BLAH BLAH'},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment