| 1 |
- {"ast":null,"code":"import { __decorate } from \"tslib\";\nimport __NG_CLI_RESOURCE__0 from \"./assistance.component.html?ngResource\";\nimport __NG_CLI_RESOURCE__1 from \"./assistance.component.scss?ngResource\";\nimport { ResponseContactComponent } from './response-contact/response-contact.component';\nimport { ConfirmMessageComponent } from './../../shared/confirm-message/confirm-message.component';\nimport { MatDialog } from '@angular/material/dialog';\nimport { Component } from '@angular/core';\nimport { ContactService } from 'src/app/services/contact.service';\nlet AssistanceComponent = class AssistanceComponent {\n constructor(contactService, dialog) {\n this.contactService = contactService;\n this.dialog = dialog;\n }\n ngOnInit() {\n this.subscribeToGetOpenMessage();\n }\n //sbscribe statistic\n subscribeToGetOpenMessage() {\n this.contactService.getOpenMessage().subscribe(res => {\n this.listOpenMessage = res;\n console.log(JSON.stringify(this.listOpenMessage));\n });\n }\n subscribeToGetCloseMessage() {\n this.contactService.getColseMessage().subscribe(res => {\n this.listOpenMessage = res;\n console.log(JSON.stringify(this.listOpenMessage));\n });\n }\n responseMessage($event) {\n this.openResponseContact($event);\n console.log($event);\n }\n closeMessage($event) {\n this.openDialog($event);\n console.log(JSON.stringify($event));\n ;\n }\n openResponseContact(event) {\n const dialogRef = this.dialog.open(ResponseContactComponent, {\n width: '48%',\n data: event\n });\n dialogRef.afterClosed().subscribe(() => {\n // this.contactService.closeContact()\n });\n }\n openDialog(event) {\n const dialogRef = this.dialog.open(ConfirmMessageComponent, {\n width: '38%',\n data: {\n response: event\n }\n });\n dialogRef.afterClosed().subscribe(() => {\n // this.contactService.closeContact()\n });\n }\n static #_ = this.ctorParameters = () => [{\n type: ContactService\n }, {\n type: MatDialog\n }];\n};\nAssistanceComponent = __decorate([Component({\n selector: 'app-assistance',\n template: __NG_CLI_RESOURCE__0,\n styles: [__NG_CLI_RESOURCE__1]\n})], AssistanceComponent);\nexport { AssistanceComponent };","map":{"version":3,"names":["ResponseContactComponent","ConfirmMessageComponent","MatDialog","Component","ContactService","AssistanceComponent","constructor","contactService","dialog","ngOnInit","subscribeToGetOpenMessage","getOpenMessage","subscribe","res","listOpenMessage","console","log","JSON","stringify","subscribeToGetCloseMessage","getColseMessage","responseMessage","$event","openResponseContact","closeMessage","openDialog","event","dialogRef","open","width","data","afterClosed","response","_","__decorate","selector","template","__NG_CLI_RESOURCE__0"],"sources":["C:\\FatboarProject\\angular-client\\src\\app\\components\\admin\\assistance\\assistance.component.ts"],"sourcesContent":["import { ResponseContactComponent } from './response-contact/response-contact.component';\r\nimport { ConfirmMessageComponent } from './../../shared/confirm-message/confirm-message.component';\r\nimport { MatDialog } from '@angular/material/dialog';\r\nimport { Contact } from './../../../models/contact';\r\nimport { Component, OnInit } from '@angular/core';\r\nimport { ContactService } from 'src/app/services/contact.service';\r\n\r\n@Component({\r\n selector: 'app-assistance',\r\n templateUrl: './assistance.component.html',\r\n styleUrls: ['./assistance.component.scss']\r\n})\r\nexport class AssistanceComponent implements OnInit {\r\n\r\n constructor(private contactService: ContactService, public dialog: MatDialog) { }\r\n\r\n ngOnInit(): void {\r\n this.subscribeToGetOpenMessage();\r\n }\r\n\r\n listOpenMessage : Contact[];\r\n\r\n //sbscribe statistic\r\n subscribeToGetOpenMessage() {\r\n this.contactService.getOpenMessage().subscribe((res) => {\r\n this.listOpenMessage = res;\r\n console.log(JSON.stringify(this.listOpenMessage));\r\n })\r\n }\r\n\r\n subscribeToGetCloseMessage() {\r\n this.contactService.getColseMessage().subscribe((res) => {\r\n this.listOpenMessage = res;\r\n console.log(JSON.stringify(this.listOpenMessage));\r\n })\r\n }\r\n\r\n\r\n responseMessage($event){\r\n this.openResponseContact($event);\r\n console.log($event);\r\n }\r\n\r\n closeMessage($event){\r\n this.openDialog($event);\r\n console.log(JSON.stringify($event));;\r\n }\r\n\r\n\r\n openResponseContact(event) {\r\n const dialogRef =\r\n this.dialog.open(ResponseContactComponent, {\r\n width: '48%',\r\n data: event\r\n });\r\n\r\n dialogRef.afterClosed().subscribe(() => {\r\n // this.contactService.closeContact()\r\n });\r\n }\r\n\r\n\r\n\r\n\r\n\r\n\r\n openDialog(event) {\r\n const dialogRef =\r\n this.dialog.open(ConfirmMessageComponent, {\r\n width: '38%',\r\n data: {\r\n response: event\r\n }});\r\n\r\n dialogRef.afterClosed().subscribe(() => {\r\n // this.contactService.closeContact()\r\n });\r\n }\r\n\r\n}\r\n"],"mappings":";;;AAAA,SAASA,wBAAwB,QAAQ,+CAA+C;AACxF,SAASC,uBAAuB,QAAQ,0DAA0D;AAClG,SAASC,SAAS,QAAQ,0BAA0B;AAEpD,SAASC,SAAS,QAAgB,eAAe;AACjD,SAASC,cAAc,QAAQ,kCAAkC;AAO1D,IAAMC,mBAAmB,GAAzB,MAAMA,mBAAmB;EAE9BC,YAAoBC,cAA8B,EAASC,MAAiB;IAAxD,KAAAD,cAAc,GAAdA,cAAc;IAAyB,KAAAC,MAAM,GAANA,MAAM;EAAe;EAEhFC,QAAQA,CAAA;IACN,IAAI,CAACC,yBAAyB,EAAE;EAClC;EAIA;EACAA,yBAAyBA,CAAA;IACvB,IAAI,CAACH,cAAc,CAACI,cAAc,EAAE,CAACC,SAAS,CAAEC,GAAG,IAAI;MACpD,IAAI,CAACC,eAAe,GAAGD,GAAG;MAC1BE,OAAO,CAACC,GAAG,CAACC,IAAI,CAACC,SAAS,CAAC,IAAI,CAACJ,eAAe,CAAC,CAAC;IACpD,CAAC,CAAC;EACJ;EAEAK,0BAA0BA,CAAA;IACxB,IAAI,CAACZ,cAAc,CAACa,eAAe,EAAE,CAACR,SAAS,CAAEC,GAAG,IAAI;MACrD,IAAI,CAACC,eAAe,GAAGD,GAAG;MAC1BE,OAAO,CAACC,GAAG,CAACC,IAAI,CAACC,SAAS,CAAC,IAAI,CAACJ,eAAe,CAAC,CAAC;IACpD,CAAC,CAAC;EACJ;EAGAO,eAAeA,CAACC,MAAM;IACnB,IAAI,CAACC,mBAAmB,CAACD,MAAM,CAAC;IAChCP,OAAO,CAACC,GAAG,CAACM,MAAM,CAAC;EACtB;EAEAE,YAAYA,C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