8c6efe8fa000cd2906fa4f0c6fb2d60803658d229729198c7ef43ed44ab040cb.json 4.3 KB

1
  1. {"ast":null,"code":"import { ResponseContactComponent } from './response-contact/response-contact.component';\nimport { ConfirmMessageComponent } from './../../shared/confirm-message/confirm-message.component';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"src/app/services/contact.service\";\nimport * as i2 from \"@angular/material/dialog\";\nimport * as i3 from \"@angular/material/button\";\nimport * as i4 from \"./assistance-list/assistance-list.component\";\nexport let AssistanceComponent = /*#__PURE__*/(() => {\n 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.ɵfac = function AssistanceComponent_Factory(t) {\n return new (t || AssistanceComponent)(i0.ɵɵdirectiveInject(i1.ContactService), i0.ɵɵdirectiveInject(i2.MatDialog));\n };\n static #_2 = this.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n type: AssistanceComponent,\n selectors: [[\"app-assistance\"]],\n decls: 7,\n vars: 1,\n consts: [[1, \"container\", \"navtop\", \"assistance\"], [\"mat-dialog-actions\", \"\", 1, \"row\", \"justify-content-center\", \"my-2\"], [\"mat-raised-button\", \"\", \"color\", \"primary\", 1, \"btn\", \"mr-2\", 3, \"click\"], [\"mat-raised-button\", \"\", \"color\", \"primary\", 1, \"btn\", \"ml-2\", 3, \"click\"], [3, \"listOpenMessage\", \"response\", \"close\"]],\n template: function AssistanceComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 0)(1, \"div\", 1)(2, \"button\", 2);\n i0.ɵɵlistener(\"click\", function AssistanceComponent_Template_button_click_2_listener() {\n return ctx.subscribeToGetOpenMessage();\n });\n i0.ɵɵtext(3, \"Nouveaux Messages\");\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(4, \"button\", 3);\n i0.ɵɵlistener(\"click\", function AssistanceComponent_Template_button_click_4_listener() {\n return ctx.subscribeToGetCloseMessage();\n });\n i0.ɵɵtext(5, \"Messages ferm\\u00E9s\");\n i0.ɵɵelementEnd()();\n i0.ɵɵelementStart(6, \"app-assistance-list\", 4);\n i0.ɵɵlistener(\"response\", function AssistanceComponent_Template_app_assistance_list_response_6_listener($event) {\n return ctx.responseMessage($event);\n })(\"close\", function AssistanceComponent_Template_app_assistance_list_close_6_listener($event) {\n return ctx.closeMessage($event);\n });\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n i0.ɵɵadvance(6);\n i0.ɵɵproperty(\"listOpenMessage\", ctx.listOpenMessage);\n }\n },\n dependencies: [i3.MatButton, i2.MatDialogActions, i4.AssistanceListComponent],\n styles: [\".navtop[_ngcontent-%COMP%]{margin-top:14em;margin-bottom:4em;min-height:250px}\"]\n });\n }\n return AssistanceComponent;\n})();","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}