mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Merge branch 'developer' of https://bitbucket.org/equilibriumito/gabinete-digital into developer
This commit is contained in:
@@ -57,7 +57,7 @@ import { fab } from '@fortawesome/free-brands-svg-icons'
|
||||
import { ScreenOrientation } from '@ionic-native/screen-orientation/ngx';
|
||||
import { PdfViewerModule } from 'ng2-pdf-viewer';
|
||||
import { SQLite } from '@ionic-native/sqlite/ngx';
|
||||
|
||||
import { CookieService } from 'ngx-cookie-service';
|
||||
|
||||
@NgModule({
|
||||
declarations: [AppComponent],
|
||||
@@ -111,7 +111,8 @@ import { SQLite } from '@ionic-native/sqlite/ngx';
|
||||
ScreenOrientation,
|
||||
Network,
|
||||
File,
|
||||
SQLite
|
||||
SQLite,
|
||||
CookieService
|
||||
],
|
||||
bootstrap: [AppComponent],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
||||
|
||||
@@ -13,15 +13,15 @@
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-description.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class flex-grow-1" [class.input-error]="Form?.get('Message')?.invalid && validateFrom ">
|
||||
<div class="ion-input-class flex-grow-1" [class.input-error]="Form?.get('Message')?.invalid && validateFrom || validateField ">
|
||||
<ion-textarea class="add-border" placeholder="Descrição" [(ngModel)]="postData.DispatchFolder.Message"></ion-textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Add scrolls -->
|
||||
<div class="d-flex flex-column height-100 overflow-y-auto">
|
||||
|
||||
|
||||
<div class="container-div width-100">
|
||||
<div class="ion-item-class-2 width-100">
|
||||
<div class="ion-icon-class">
|
||||
@@ -29,11 +29,11 @@
|
||||
</div>
|
||||
<div class="ion-input-class" [class.input-error]="Form?.get('Priority')?.invalid && validateFrom" >
|
||||
|
||||
<ion-select
|
||||
placeholder="Prazo*"
|
||||
[(ngModel)]="postData.Priority"
|
||||
interface="action-sheet"
|
||||
Cancel-text="Cancelar"
|
||||
<ion-select
|
||||
placeholder="Prazo*"
|
||||
[(ngModel)]="postData.Priority"
|
||||
interface="action-sheet"
|
||||
Cancel-text="Cancelar"
|
||||
required
|
||||
class="d-block d-md-none"
|
||||
>
|
||||
@@ -62,19 +62,19 @@
|
||||
<ion-icon slot="start" src="assets/images/icons-description.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class" [class.input-error]="Form?.get('selectedTypes')?.invalid && validateFrom ">
|
||||
<!-- <ion-item
|
||||
<!-- <ion-item
|
||||
class="ion-no-border ion-no-padding ion-no-margin d-block d-md-none">
|
||||
<ion-select
|
||||
[(ngModel)]="selectedTypes"
|
||||
(ngModelChange)="onSelectedTypesChanged($event)"
|
||||
(ngModelChange)="onSelectedTypesChanged($event)"
|
||||
multiple="true" interface="alert" Cancel-text="Cancelar" required>
|
||||
<ion-select-option *ngFor="let type of subjectTypes" value="{{type.Code}}">{{type.Description}}</ion-select-option>
|
||||
</ion-select>
|
||||
</ion-item> -->
|
||||
|
||||
|
||||
<mat-form-field
|
||||
floatLabel="never"
|
||||
appearance="fill"
|
||||
appearance="fill"
|
||||
class="width-100 d-block"
|
||||
appearance="none">
|
||||
<mat-select [(ngModel)]="selectedTypes" multiple placeholder="Selecione o tipo de evento*">
|
||||
@@ -135,21 +135,21 @@
|
||||
</div>
|
||||
<div class="attach-document pl-10">
|
||||
<ion-label>Anexar Documentos</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
</ion-label>
|
||||
</div>
|
||||
|
||||
<div class="list " *ngFor="let document of documents; let i = index" >
|
||||
<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>
|
||||
<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>
|
||||
<p><span class="span-left">{{document.EntidadeOrganicaNome}}</span><span class="span-right"> {{document.Data | date: 'dd-MM-yyyy HH:mm'}} </span></p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
@@ -158,11 +158,11 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div *ngIf="postData" class="aside-right flex-column height-100">
|
||||
<app-empty-container
|
||||
[texto]="emptyTextDescription"
|
||||
*ngIf="!showAttendees"
|
||||
<app-empty-container
|
||||
[texto]="emptyTextDescription"
|
||||
*ngIf="!showAttendees"
|
||||
class="d-flex height-100 flex-column">
|
||||
</app-empty-container>
|
||||
<app-attendee-modal
|
||||
@@ -187,4 +187,4 @@
|
||||
<button class="btn-cancel" shape="round" (click)="cancelTask()">Cancelar</button>
|
||||
<button class="btn-ok" shape="round" (click)="saveTask()">Gravar</button>
|
||||
</div>
|
||||
</ion-footer>
|
||||
</ion-footer>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
padding: 30px 20px 0 20px !important;
|
||||
margin: 0;
|
||||
float: left;
|
||||
|
||||
|
||||
.title{
|
||||
font-family: Roboto;
|
||||
font-size: 25px;
|
||||
@@ -61,7 +61,7 @@
|
||||
.list-people{
|
||||
width: 256px;
|
||||
float: left;
|
||||
|
||||
|
||||
}
|
||||
.add-people{
|
||||
width: 45px;
|
||||
@@ -78,7 +78,7 @@
|
||||
font-size: 15px;
|
||||
color: #0d89d1;
|
||||
}
|
||||
|
||||
|
||||
.attach-title-item{
|
||||
width: 100%;
|
||||
font-size: 15px;
|
||||
@@ -127,7 +127,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.close-button {
|
||||
@@ -140,13 +140,13 @@
|
||||
.app-name {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
.close-button {
|
||||
display: block !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
.app-name{
|
||||
background: #42b9f2;
|
||||
border-radius: 18px;
|
||||
|
||||
@@ -73,7 +73,8 @@ export class CreateProcessPage implements OnInit {
|
||||
profile: string;
|
||||
|
||||
Form: FormGroup;
|
||||
validateFrom = false
|
||||
validateFrom = false;
|
||||
validateField = false;
|
||||
|
||||
emptyTextDescription = "Sem intervenientes selecionados";
|
||||
showEmptyContainer = true;
|
||||
@@ -380,6 +381,7 @@ export class CreateProcessPage implements OnInit {
|
||||
}
|
||||
}
|
||||
else{
|
||||
this.validateField = true;
|
||||
this.toastService.badRequest('Por favor adicione uma nota');
|
||||
}
|
||||
loader.remove();
|
||||
|
||||
+1
-1
@@ -50,7 +50,7 @@
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon class="icon-time" slot="start" name="time-outline"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class" [class.input-error]="Form?.get('Priority')?.invalid && validateFrom ">
|
||||
<div class="ion-input-class" [class.input-error]="Form?.get('Priority')?.invalid && validateFrom || validateField ">
|
||||
<ion-select
|
||||
placeholder="Prazo*"
|
||||
[(ngModel)]="postData.Priority"
|
||||
|
||||
+27
-28
@@ -88,7 +88,8 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
toppings = new FormControl();
|
||||
|
||||
Form: FormGroup;
|
||||
validateFrom = false
|
||||
validateFrom = false;
|
||||
validateField = false;
|
||||
|
||||
get toppingsValues() {
|
||||
return this.toppings.value;
|
||||
@@ -184,7 +185,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
}
|
||||
|
||||
runValidation() {
|
||||
this.validateFrom = true
|
||||
this.validateFrom = true;
|
||||
}
|
||||
|
||||
injectValidation() {
|
||||
@@ -426,17 +427,23 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
this.taskResult = await this.despachoService.createDespacho(this.postData).toPromise();
|
||||
await this.toastService.successMessage('Processo efetuado');
|
||||
this.modalController.dismiss(action_despacho_pr);
|
||||
} catch (error) {
|
||||
await this.toastService.badRequest('Processo não efetuado')
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
if(this.postData.DispatchFolder.Message){
|
||||
try {
|
||||
this.taskResult = await this.despachoService.createDespacho(this.postData).toPromise();
|
||||
await this.toastService.successMessage('Processo efetuado');
|
||||
this.modalController.dismiss(action_despacho_pr);
|
||||
} catch (error) {
|
||||
|
||||
console.log('this.taskResult', this.taskResult);
|
||||
await this.toastService.badRequest('Processo não efetuado')
|
||||
} finally {
|
||||
//loader.remove()
|
||||
}
|
||||
}
|
||||
else{
|
||||
this.validateField = true;
|
||||
this.toastService.badRequest('Por favor adicione uma nota');
|
||||
}
|
||||
loader.remove();
|
||||
break;
|
||||
|
||||
case '1': // parecer
|
||||
@@ -459,24 +466,16 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
if(this.postData.DispatchFolder.Message){
|
||||
try {
|
||||
try {
|
||||
this.taskResult = await this.processes.postParecerPr(this.postData).toPromise();
|
||||
await this.toastService.successMessage('Pedido enviado');
|
||||
this.modalController.dismiss(action_parecer_pr);
|
||||
} catch (error) {
|
||||
|
||||
this.taskResult = await this.processes.postParecerPr(this.postData).toPromise();
|
||||
await this.toastService.successMessage('Pedido enviado');
|
||||
this.modalController.dismiss(action_parecer_pr);
|
||||
} catch (error) {
|
||||
|
||||
await this.toastService.badRequest('Processo não efetuado')
|
||||
} finally {
|
||||
//loader.remove()
|
||||
}
|
||||
await this.toastService.badRequest('Processo não efetuado')
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
else{
|
||||
this.toastService.badRequest('Por favor adicione uma nota');
|
||||
}
|
||||
loader.remove();
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import { AuthConnstants } from '../config/auth-constants';
|
||||
import { AlertController } from '@ionic/angular';
|
||||
import { SessionStore } from '../store/session.service';
|
||||
import { AESEncrypt } from '../services/aesencrypt.service';
|
||||
import { CookieService } from 'ngx-cookie-service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
@@ -27,6 +28,7 @@ export class AuthService {
|
||||
private storageService:StorageService,
|
||||
public alertController: AlertController,
|
||||
private aesencrypt: AESEncrypt,
|
||||
private cookieService: CookieService,
|
||||
) {
|
||||
|
||||
this.headers = new HttpHeaders();
|
||||
@@ -102,8 +104,11 @@ export class AuthService {
|
||||
console.log('Login to Rocket chat OK');
|
||||
this.ValidatedUserChat = responseChat;
|
||||
localStorage.setItem('userChat', JSON.stringify(responseChat));
|
||||
localStorage.setItem('Meteor.loginToken', JSON.stringify(responseChat['data'].authToken));
|
||||
localStorage.setItem('Meteor.userId', JSON.stringify(responseChat['data'].userId));
|
||||
localStorage.setItem('Meteor.loginToken', responseChat['data'].authToken);
|
||||
localStorage.setItem('Meteor.userId',responseChat['data'].userId);
|
||||
this.cookieService.set('rc_token', responseChat['data'].authToken);
|
||||
this.cookieService.set('rc_uid', responseChat['data'].userId);
|
||||
alert(this.cookieService.get('rc_uid'));
|
||||
this.storageService.store(AuthConnstants.AUTH, responseChat);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user