bug fixed

This commit is contained in:
Eudes Inácio
2023-11-01 09:05:39 +01:00
parent b77280e64e
commit 506577c94e
8 changed files with 23 additions and 17 deletions
@@ -21,7 +21,7 @@
<div class="solid"></div>
</div>
<div class="buttons">
<button class="btn-cancel" shape="round" >Arquivar</button>
<button class="btn-cancel" shape="round" (click)="openAddNoteModal('Arquivo')">Arquivar</button>
<!-- <div class="solid"></div> -->
</div>
<div class="buttons">
@@ -294,7 +294,7 @@
</div>
</div>
<div *ngIf="sessionStore.user.Profile != 'PR'" class="aside-righ flex-grow-1">
<div class="aside-righ flex-grow-1">
<app-empty-container
[texto]="emptyTextDescription"
*ngIf="!showAttendees"
@@ -97,7 +97,7 @@
<div class="ion-icon-class">
<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 ">
<div class="ion-input-class" [class.input-error]="Form?.get('selectedTypes')?.invalid && validateFrom || validateField ">
<!-- <ion-item
class="ion-no-border ion-no-padding ion-no-margin d-block d-md-none">
<ion-select
@@ -112,7 +112,7 @@
appearance="fill"
class="width-100 d-block"
appearance="none">
<mat-select [(ngModel)]="selectedTypes" multiple placeholder="Selecione o tipo de assunto*">
<mat-select [multiple]="false" [(ngModel)]="selectedTypes" multiple placeholder="Selecione o tipo de assunto*">
<mat-option *ngFor="let type of subjectTypes" value="{{type.Code}}">{{type.Description}}</mat-option>
</mat-select>
</mat-form-field>
@@ -462,15 +462,21 @@ export class ExpedientTaskModalPage implements OnInit {
}
if(this.postData.DispatchFolder.Message){
try {
this.taskResult = await this.despachoService.createDespacho(this.postData).toPromise();
await this.httpErroHandle.httpsSucessMessagge('Efetuar Despacho')
this.modalController.dismiss(action_despacho_pr);
} catch (error) {
this.httpErroHandle.httpStatusHandle(error)
} finally {
//loader.remove()
if(this.selectedTypes.length > 0) {
try {
this.taskResult = await this.despachoService.createDespacho(this.postData).toPromise();
await this.httpErroHandle.httpsSucessMessagge('Efetuar Despacho')
this.modalController.dismiss(action_despacho_pr);
} catch (error) {
this.httpErroHandle.httpStatusHandle(error)
} finally {
//loader.remove()
}
} else {
this.validateField = true;
this.toastService._badRequest('Por favor selecione um assunto');
}
}
else{
this.validateField = true;