diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 7e2769c61..00ef03c51 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -63,6 +63,10 @@ const routes: Routes = [ path: 'delegar', loadChildren: () => import('./modals/delegar/delegar.module').then( m => m.DelegarPageModule) }, + { + path: 'add-note', + loadChildren: () => import('./modals/add-note/add-note.module').then( m => m.AddNotePageModule) + }, /* { path: 'chat', diff --git a/src/app/modals/add-note/add-note-routing.module.ts b/src/app/modals/add-note/add-note-routing.module.ts new file mode 100644 index 000000000..9d94371fa --- /dev/null +++ b/src/app/modals/add-note/add-note-routing.module.ts @@ -0,0 +1,17 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; + +import { AddNotePage } from './add-note.page'; + +const routes: Routes = [ + { + path: '', + component: AddNotePage + } +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule], +}) +export class AddNotePageRoutingModule {} diff --git a/src/app/modals/add-note/add-note.module.ts b/src/app/modals/add-note/add-note.module.ts new file mode 100644 index 000000000..2312b06bb --- /dev/null +++ b/src/app/modals/add-note/add-note.module.ts @@ -0,0 +1,20 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { FormsModule } from '@angular/forms'; + +import { IonicModule } from '@ionic/angular'; + +import { AddNotePageRoutingModule } from './add-note-routing.module'; + +import { AddNotePage } from './add-note.page'; + +@NgModule({ + imports: [ + CommonModule, + FormsModule, + IonicModule, + AddNotePageRoutingModule + ], + declarations: [AddNotePage] +}) +export class AddNotePageModule {} diff --git a/src/app/modals/add-note/add-note.page.html b/src/app/modals/add-note/add-note.page.html new file mode 100644 index 000000000..7b1fc0e60 --- /dev/null +++ b/src/app/modals/add-note/add-note.page.html @@ -0,0 +1,24 @@ + +
+
+ +
+
+ +
+
+
+ + + + + + + +
+ + +
+
diff --git a/src/app/modals/add-note/add-note.page.scss b/src/app/modals/add-note/add-note.page.scss new file mode 100644 index 000000000..58229d622 --- /dev/null +++ b/src/app/modals/add-note/add-note.page.scss @@ -0,0 +1,48 @@ +.header-content{ + //width: 360px; + overflow: auto; + margin: 25px auto; + } + .header-icon-left{ + width: 36px; + font-size: 33px; + color: #42b9fe; + float: left; + } + .header-title{ + width: 264px; + font-family: Roboto; + font-size: 25px; + margin: 0 5px 0 5px; + padding: 0; + color:#000; + float: left; + } +.buttons{ + width: 320px; + margin: 0 auto; + padding: 5px 0 5px 0; +} + + .button-reject { + width: 130px; + height: 44px; + --color: #d30a0a; + border-radius: 22.5px; + --background: #ffe0e0; + margin: 0 12px 0 0px; + } + .button-approve { + width: 130px; + height: 44px; + border-radius: 22.5px; + --background: #42b9fe; + margin: 0 0px 0 12px; + } + .buttons{ + display: flex; + width: 100% !important; + justify-content: space-between; + padding: 15px; + overflow: auto; + } \ No newline at end of file diff --git a/src/app/modals/add-note/add-note.page.spec.ts b/src/app/modals/add-note/add-note.page.spec.ts new file mode 100644 index 000000000..50a4d7213 --- /dev/null +++ b/src/app/modals/add-note/add-note.page.spec.ts @@ -0,0 +1,24 @@ +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; +import { IonicModule } from '@ionic/angular'; + +import { AddNotePage } from './add-note.page'; + +describe('AddNotePage', () => { + let component: AddNotePage; + let fixture: ComponentFixture; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [ AddNotePage ], + imports: [IonicModule.forRoot()] + }).compileComponents(); + + fixture = TestBed.createComponent(AddNotePage); + component = fixture.componentInstance; + fixture.detectChanges(); + })); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/modals/add-note/add-note.page.ts b/src/app/modals/add-note/add-note.page.ts new file mode 100644 index 000000000..669af5acb --- /dev/null +++ b/src/app/modals/add-note/add-note.page.ts @@ -0,0 +1,27 @@ +import { Component, OnInit } from '@angular/core'; +import { ModalController } from '@ionic/angular'; + +@Component({ + selector: 'app-add-note', + templateUrl: './add-note.page.html', + styleUrls: ['./add-note.page.scss'], +}) +export class AddNotePage implements OnInit { + emendMessage: string = ''; + + constructor( + private modalController: ModalController, + ) { + this.emendMessage = ''; + } + + ngOnInit() { + } + close(){ + this.modalController.dismiss(''); + } + save(){ + this.modalController.dismiss(this.emendMessage); + } + +} \ No newline at end of file diff --git a/src/app/pages/gabinete-digital/despachos/despacho/despacho.page.html b/src/app/pages/gabinete-digital/despachos/despacho/despacho.page.html index f682adf41..62102918f 100644 --- a/src/app/pages/gabinete-digital/despachos/despacho/despacho.page.html +++ b/src/app/pages/gabinete-digital/despachos/despacho/despacho.page.html @@ -105,7 +105,7 @@
- +
diff --git a/src/app/pages/gabinete-digital/despachos/despacho/despacho.page.ts b/src/app/pages/gabinete-digital/despachos/despacho/despacho.page.ts index 32f12a834..3d353e30d 100644 --- a/src/app/pages/gabinete-digital/despachos/despacho/despacho.page.ts +++ b/src/app/pages/gabinete-digital/despachos/despacho/despacho.page.ts @@ -16,6 +16,7 @@ import { ExpedientTaskModalPage } from '../../expediente/expedient-task-modal/ex import { BookMeetingModalPage } from '../../expediente/book-meeting-modal/book-meeting-modal.page'; import { CreateProcessPage } from 'src/app/modals/create-process/create-process.page'; import { DelegarPage } from 'src/app/modals/delegar/delegar.page'; +import { AddNotePage } from 'src/app/modals/add-note/add-note.page'; @Component({ selector: 'app-despacho', @@ -150,15 +151,16 @@ export class DespachoPage implements OnInit { this.menu.open(); this.modalController.dismiss(); } - executado(){ + executado(note:string){ let body = { "serialNumber": this.serialnumber, "action": "Conhecimento", "dataFields": { - "ReviewerComments": '', + "ReviewerComments": note, } } this.processes.PostTaskAction(body); + this.close(); } delegar(){ @@ -172,6 +174,22 @@ export class DespachoPage implements OnInit { }); } + async openAddNoteModal() { + const modal = await this.modalController.create({ + component: AddNotePage, + componentProps:{ + }, + cssClass: 'emend-message-modal', + backdropDismiss: false + }); + + await modal.present(); + + modal.onDidDismiss().then(res => { + this.executado(res.data); + }); + } + async openExpedientActionsModal(taskAction: any, task: any) { //this.modalController.dismiss(); let classs; diff --git a/src/theme/variables.scss b/src/theme/variables.scss index 1300d7c22..d65a38fb7 100644 --- a/src/theme/variables.scss +++ b/src/theme/variables.scss @@ -259,7 +259,7 @@ background: rgba(51, 51, 51, 0.3); } .discart-expedient-modal{ - --height: 200px; + --height: auto; --border-radius: 10px; padding: 25px; background: rgba(51, 51, 51, 0.3);