Skip to content
Snippets Groups Projects
Verified Commit 443947ea authored by Florian Azizian's avatar Florian Azizian
Browse files

FEAT #9685 close mail action V2

parent 75b2ce2b
No related branches found
No related tags found
No related merge requests found
<h1 mat-dialog-title>Confirmer "{{data.action.label_action}}"</h1>
<div mat-dialog-content>
<div *ngIf="loading" class="loading" style="display:flex;height:100%;">
<mat-spinner style="margin:auto;"></mat-spinner>
</div>
<div class="row">
<div class="col-md-12">
{{lang.makeActionOn}}
<b *ngIf="data.contextMode" color="primary" class="highlight">{{data.contextChrono}}</b>
<b *ngIf="!data.contextMode" color="primary" class="highlight">{{data.selectedRes.length}} {{lang.elements}}</b> ?
<div class="alert-message alert-message-danger" role="alert" style="margin-top: 30px;">
Cela actualisera la <b class="highlight">date de clôture</b> des courriers.
</div>
</div>
<div class="col-md-12">
<app-note-editor></app-note-editor>
</div>
</div>
</div>
<div mat-dialog-actions class="actions">
<button mat-raised-button mat-button color="primary" [disabled]="loading" (click)="onSubmit()">{{lang.validate}}</button>
<button mat-raised-button mat-button [disabled]="loading" [mat-dialog-close]="">{{lang.cancel}}</button>
</div>
\ No newline at end of file
.mat-dialog-actions, .mat-dialog-title {
justify-content: center;
text-align: center;
}
.highlight {
font-size: 110%;
}
.alert-message
{
margin: 20px 0;
padding: 20px;
border-left: 3px solid #eee;
}
.alert-message h4
{
margin-top: 0;
margin-bottom: 5px;
}
.alert-message p:last-child
{
margin-bottom: 0;
}
.alert-message code
{
background-color: #fff;
border-radius: 3px;
}
.alert-message-success
{
background-color: #F4FDF0;
border-color: #3C763D;
}
.alert-message-success h4
{
color: #3C763D;
}
.alert-message-danger
{
background-color: #8e3e521a;
border-color: #8e3e52;
color: #8e3e52;
}
.alert-message-danger h4
{
color: #8e3e52;
}
.alert-message-warning
{
background-color: #fcf8f2;
border-color: #f0ad4e;
}
.alert-message-warning h4
{
color: #f0ad4e;
}
.alert-message-info
{
background-color: #f4f8fa;
border-color: #5bc0de;
}
.alert-message-info h4
{
color: #5bc0de;
}
.alert-message-default
{
background-color: #EEE;
border-color: #B4B4B4;
}
.alert-message-default h4
{
color: #000;
}
.alert-message-notice
{
background-color: #FCFCDD;
border-color: #BDBD89;
}
.alert-message-notice h4
{
color: #444;
}
\ No newline at end of file
import { Component, OnInit, Inject } from '@angular/core';
import { LANG } from '../../translate.component';
import { NotificationService } from '../../notification.service';
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material';
import { HttpClient } from '@angular/common/http';
@Component({
templateUrl: "close-mail-action.component.html",
styleUrls: ['close-mail-action.component.scss'],
providers: [NotificationService],
})
export class CloseMailActionComponent implements OnInit {
lang: any = LANG;
loading: boolean = false;
constructor(public http: HttpClient, private notify: NotificationService, public dialogRef: MatDialogRef<CloseMailActionComponent>, @Inject(MAT_DIALOG_DATA) public data: any) { }
ngOnInit(): void { }
onSubmit(): void {
this.loading = true;
this.http.put('../../rest/resourcesList/users/' + this.data.currentBasketInfo.ownerId + '/groups/' + this.data.currentBasketInfo.groupId + '/baskets/' + this.data.currentBasketInfo.basketId + '/actions/' + this.data.action.id, {resources : this.data.selectedRes})
.subscribe((data: any) => {
this.loading = false;
this.dialogRef.close('success');
}, (err: any) => {
this.notify.handleErrors(err);
this.loading = false;
});
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment