mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
improvements in despacho
This commit is contained in:
@@ -1,20 +1,72 @@
|
||||
<ion-header class="ion-no-border">
|
||||
<div class="header-content">
|
||||
<div class="header-icon-left">
|
||||
<button class="btn-no-color cursor-pointer" (click)="close()">
|
||||
<ion-icon src="assets/images/icons-arrow-arrow-left.svg"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div class="header-content pb-20">
|
||||
<div class="header-title">
|
||||
<label>Adicionar coméntário</label>
|
||||
<label>Adicionar comentário</label>
|
||||
</div>
|
||||
</div>
|
||||
</ion-header>
|
||||
|
||||
<ion-content>
|
||||
<ion-item lines="none">
|
||||
<ion-textarea [(ngModel)]="emendMessage" rows="4" cols="20" placeholder="Adicionar um comentário para execução..."></ion-textarea>
|
||||
<div class="main-content d-flex height-100">
|
||||
|
||||
<div class="content d-flex flex-column width-100">
|
||||
<div class="overflow-y-auto">
|
||||
|
||||
<div class="container-div">
|
||||
<div class="ion-item-class-2 d-flex">
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-description.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class-no-height width-100">
|
||||
<ion-textarea [(ngModel)]="note" placeholder="Detalhes" rows="6" cols="20"></ion-textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ion-item-container-no-border" (click)="getDoc()">
|
||||
<ion-label class="d-flex align-center">
|
||||
<button class="btn-no-color">
|
||||
<div class="attach-icon d-flex align-center">
|
||||
<ion-icon src="assets/images/icons-attach-doc.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="attach-document pl-10">
|
||||
<ion-label>Anexar Documentos</ion-label>
|
||||
</div>
|
||||
</button>
|
||||
</ion-label>
|
||||
</div>
|
||||
|
||||
<div class="list " *ngFor="let document of documents; let i = index" >
|
||||
<ion-list>
|
||||
<ion-item>
|
||||
<ion-label>
|
||||
<p class="d-flex ion-justify-content-between">
|
||||
<span class="attach-title-item">{{document.Assunto}}</span>
|
||||
<span class="app-name">{{document.appName}}</span>
|
||||
<span class="close-button text-black cursor-pointer" (click)="removeAttachment(i)" >
|
||||
<ion-icon class="font-20" src="assets/images/icons-delete-25.svg"></ion-icon>
|
||||
</span>
|
||||
</p>
|
||||
<p><span class="span-left">{{document.EntidadeOrganicaNome}}</span><span class="span-right"> {{document.Data | date: 'dd-MM-yy'}} </span></p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ion-item hidden lines="none">
|
||||
<ion-textarea [(ngModel)]="note" rows="4" cols="20" placeholder="Adicionar um comentário para execução..."></ion-textarea>
|
||||
</ion-item>
|
||||
|
||||
</ion-content>
|
||||
<ion-footer>
|
||||
<div class="buttons width-100">
|
||||
|
||||
@@ -1,48 +1,150 @@
|
||||
.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;
|
||||
padding: 30px 20px 0 20px !important;
|
||||
margin-bottom: 20px !important;
|
||||
}
|
||||
|
||||
.button-reject {
|
||||
width: 130px;
|
||||
height: 44px;
|
||||
--color: #d30a0a;
|
||||
border-radius: 22.5px;
|
||||
--background: #ffe0e0;
|
||||
margin: 0 12px 0 0px;
|
||||
.header-title{
|
||||
font-family: Roboto;
|
||||
font-size: 25px;
|
||||
padding: 0;
|
||||
color:#000;
|
||||
float: left;
|
||||
}
|
||||
.content{
|
||||
padding: 30px 20px 0 20px !important;
|
||||
margin: 0;
|
||||
float: left;
|
||||
|
||||
.ion-item-container{
|
||||
margin: 15px auto;
|
||||
border: 1px solid #ebebeb;
|
||||
border-radius: 5px;
|
||||
padding-left: 10px;
|
||||
|
||||
}
|
||||
.button-approve {
|
||||
width: 130px;
|
||||
.ion-item-container-no-border{
|
||||
margin: 0px auto;
|
||||
padding: 0 !important;
|
||||
overflow: auto;
|
||||
}
|
||||
.container-div{
|
||||
margin-bottom: 15px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.ion-item-class-2{
|
||||
margin: 0px auto;
|
||||
}
|
||||
.ion-icon-class{
|
||||
width: 45px;
|
||||
height: 45px;
|
||||
float: left;
|
||||
padding: 10px;
|
||||
font-size: 25px;
|
||||
}
|
||||
ion-select{
|
||||
padding-left: 5px;
|
||||
margin-left: 0;
|
||||
}
|
||||
.ion-input-class{
|
||||
width: calc(100% - 45px);
|
||||
height: 45px;
|
||||
border: 1px solid #ebebeb;
|
||||
border-radius: 5px;
|
||||
padding-left: 5px;
|
||||
padding-right: 10px;
|
||||
float: left;
|
||||
}
|
||||
.ion-input-class-no-height{
|
||||
border: 1px solid #ebebeb;
|
||||
border-radius: 5px;
|
||||
overflow: auto;
|
||||
}
|
||||
.list-people{
|
||||
width: 256px;
|
||||
float: left;
|
||||
|
||||
}
|
||||
.add-people{
|
||||
width: 45px;
|
||||
float: right;
|
||||
overflow: auto;
|
||||
font-size: 25px;
|
||||
padding: 10px;
|
||||
}
|
||||
.list-people-title{
|
||||
/* font-size: 13px; */
|
||||
color: #797979;
|
||||
}
|
||||
.attach-document{
|
||||
font-size: 15px;
|
||||
color: #0d89d1;
|
||||
margin: 5px 5px 5px 10px;
|
||||
padding: 5px;
|
||||
float: left;
|
||||
}
|
||||
.attach-icon{
|
||||
width: 37px;
|
||||
font-size: 35px;
|
||||
float: left;
|
||||
}
|
||||
.attach-title-item{
|
||||
width: 100%;
|
||||
font-size: 15px;
|
||||
color:#0d89d1;
|
||||
}
|
||||
/* SPAN */
|
||||
.span-left{
|
||||
float: left;
|
||||
font-size: 15x;
|
||||
}
|
||||
.span-right{
|
||||
text-align: right;
|
||||
float: right;
|
||||
font-size: 13px;
|
||||
}
|
||||
}
|
||||
.container-footer{
|
||||
margin:0 auto;
|
||||
overflow: auto;
|
||||
}
|
||||
.button-cancel {
|
||||
width: 170px;
|
||||
height: 44px;
|
||||
border-radius: 22.5px;
|
||||
--background: #e0e9ee;
|
||||
--color: #061b52;
|
||||
margin:10px;
|
||||
}
|
||||
.button-save {
|
||||
width: 170px;
|
||||
height: 44px;
|
||||
border-radius: 22.5px;
|
||||
--background: #42b9fe;
|
||||
margin: 0 0px 0 12px;
|
||||
--color:#ffffff;
|
||||
margin:10px;
|
||||
}
|
||||
.buttons{
|
||||
display: flex;
|
||||
width: 100% !important;
|
||||
justify-content: space-between;
|
||||
padding: 15px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.text-input{
|
||||
width: 100%;
|
||||
border: 1px solid #ebebeb;
|
||||
margin: 0px 15px 15px 0px;
|
||||
padding: 0 !important;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
/* Error Messages */
|
||||
.error{
|
||||
color:red;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
.span-color{
|
||||
color:red;
|
||||
}
|
||||
.buttons{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 20px;
|
||||
overflow: auto;
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ModalController } from '@ionic/angular';
|
||||
import { SearchDocument } from 'src/app/models/search-document';
|
||||
import { SearchPage } from 'src/app/pages/search/search.page';
|
||||
|
||||
@Component({
|
||||
selector: 'app-add-note',
|
||||
@@ -7,12 +9,14 @@ import { ModalController } from '@ionic/angular';
|
||||
styleUrls: ['./add-note.page.scss'],
|
||||
})
|
||||
export class AddNotePage implements OnInit {
|
||||
emendMessage: string = '';
|
||||
note: string = '';
|
||||
documents:SearchDocument[] = [];
|
||||
loadedAttachments:any;
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
) {
|
||||
this.emendMessage = '';
|
||||
this.note = '';
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -21,7 +25,36 @@ export class AddNotePage implements OnInit {
|
||||
this.modalController.dismiss('');
|
||||
}
|
||||
save(){
|
||||
this.modalController.dismiss(this.emendMessage);
|
||||
let body = {
|
||||
"note":this.note,
|
||||
"documents":this.documents,
|
||||
}
|
||||
this.modalController.dismiss(body);
|
||||
}
|
||||
|
||||
async getDoc(){
|
||||
const modal = await this.modalController.create({
|
||||
component: SearchPage,
|
||||
cssClass: 'modal-width-100-width-background modal',
|
||||
componentProps: {
|
||||
type: 'AccoesPresidenciais & ArquivoDespachoElect',
|
||||
showSearchInput: true,
|
||||
select: true
|
||||
}
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then((res)=>{
|
||||
if(res){
|
||||
const data = res.data;
|
||||
this.documents.push(data.selected);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
removeAttachment(index: number){
|
||||
|
||||
this.documents = this.documents.filter( (e, i) => index != i);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -110,7 +110,7 @@
|
||||
<p class="d-flex ion-justify-content-between">
|
||||
<span class="attach-title-item">{{document.Assunto}}</span>
|
||||
<span class="app-name">{{document.appName}}</span>
|
||||
<span class="close-button text-black" (click)="removeAttachment(i)" >
|
||||
<span class="close-button text-black cursor-pointer" (click)="removeAttachment(i)" >
|
||||
<ion-icon class="font-20" src="assets/images/icons-delete-25.svg"></ion-icon>
|
||||
</span>
|
||||
</p>
|
||||
|
||||
@@ -154,7 +154,7 @@ export class DespachoPage implements OnInit {
|
||||
this.menu.open();
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
executado(note:string){
|
||||
executado(note:string, documents:any){
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"action": "Conhecimento",
|
||||
@@ -167,7 +167,7 @@ export class DespachoPage implements OnInit {
|
||||
this.processes.CompleteTask(body);
|
||||
this.close();
|
||||
}
|
||||
arquivar(note:string){
|
||||
arquivar(note:string, documents:any){
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"action": "Arquivo",
|
||||
@@ -189,24 +189,32 @@ export class DespachoPage implements OnInit {
|
||||
}
|
||||
|
||||
async openAddNoteModal(actionName:string) {
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop'
|
||||
}
|
||||
const modal = await this.modalController.create({
|
||||
component: AddNotePage,
|
||||
componentProps:{
|
||||
},
|
||||
cssClass: 'emend-message-modal',
|
||||
backdropDismiss: false
|
||||
cssClass: classs,
|
||||
backdropDismiss: true
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
|
||||
modal.onDidDismiss().then(res => {
|
||||
if(actionName == 'executado'){
|
||||
this.executado(res.data);
|
||||
console.log(res);
|
||||
if(res.data){
|
||||
if(actionName == 'Executado'){
|
||||
this.executado(res.data.note,res.data.documents);
|
||||
}
|
||||
else if(actionName == 'Arquivar'){
|
||||
this.arquivar(res.data.note,res.data.documents);
|
||||
}
|
||||
}
|
||||
else if(actionName == 'arquivar'){
|
||||
this.arquivar(res.data);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user