Invite authors-pop up_v1
This commit is contained in:
parent
1423f5175d
commit
bb0c5a0391
|
@ -143,7 +143,7 @@
|
|||
<p class="authors-role">{{ roleDisplay(user) }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<button *ngIf="isUserOwner && !dataset.status && user.role"
|
||||
<button *ngIf="isUserOwner && !dataset.status && user.role" (click)="removeUserFromDmp()"
|
||||
class="remove-btn">{{ 'GENERAL.CONFIRMATION-DIALOG.ACTIONS.REMOVE' | translate}}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
height: 2.3em;
|
||||
background-color: #129D99;
|
||||
border-radius: 4px;
|
||||
flex-direction: rows;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
border: none;
|
||||
}
|
||||
|
|
|
@ -370,6 +370,14 @@ export class DatasetOverviewComponent extends BaseComponent implements OnInit {
|
|||
});
|
||||
}
|
||||
|
||||
removeUserFromDmp() {
|
||||
// return this.dmpService.removeUserFromDmp().pipe(takeUntil(this._destroyed))
|
||||
// .subscribe(
|
||||
// complete => { this.onCallbackSuccess() },
|
||||
// error => this.onDeleteCallbackError(error)
|
||||
// );
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,16 +1,47 @@
|
|||
<form *ngIf="formGroup" [formGroup]="formGroup">
|
||||
<div class="form-container">
|
||||
<form *ngIf="formGroup" [formGroup]="formGroup" class="m-0">
|
||||
<div class="row d-flex justify-content-end m-0" (click)="closeDialog()">
|
||||
<mat-icon class="close-icon">close</mat-icon>
|
||||
</div>
|
||||
<div class="row m-0">
|
||||
<h1 mat-dialog-title class="title">{{'DMP-LISTING.ACTIONS.INVITE-AUTHORS' | translate}}</h1>
|
||||
</div>
|
||||
<div mat-dialog-content class="row content">
|
||||
<mat-form-field class="example-chip-list col mb-4">
|
||||
<mat-chip-list #chipList>
|
||||
<mat-chip *ngFor="let email of emails" [selectable]="selectable" [removable]="removable"
|
||||
(removed)="remove(email)">
|
||||
{{email}}
|
||||
<mat-icon matChipRemove *ngIf="removable">cancel</mat-icon>
|
||||
</mat-chip>
|
||||
<input placeholder="{{'INVITATION-EDITOR.AUTOCOMPLETE-USER-EMAIL' | translate}}"
|
||||
[matChipInputFor]="chipList" [matChipInputSeparatorKeyCodes]="separatorKeysCodes"
|
||||
[matChipInputAddOnBlur]="addOnBlur" (matChipInputTokenEnd)="add($event)">
|
||||
</mat-chip-list>
|
||||
</mat-form-field>
|
||||
<div class="col-12 d-flex justify-content-end row m-0 p-1">
|
||||
<button mat-raised-button (click)="send()" type="button"
|
||||
class="invite-btn">{{'DMP-LISTING.ACTIONS.INVITE-SHORT' | translate}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- <form *ngIf="formGroup" [formGroup]="formGroup">
|
||||
<h1 mat-dialog-title>{{'INVITATION-EDITOR.TITLE' | translate}} {{data.dmpName}}</h1>
|
||||
<div mat-dialog-content>
|
||||
<!-- User -->
|
||||
<mat-form-field class="col">
|
||||
<div mat-dialog-content> -->
|
||||
<!-- User -->
|
||||
<!-- <mat-form-field class="col">
|
||||
<app-multiple-auto-complete [formControl]="formGroup.get('users')"
|
||||
placeholder="{{'INVITATION-EDITOR.AUTOCOMPLETE-USER' | translate}}"
|
||||
[configuration]="usersAutoCompleteConfiguration">
|
||||
</app-multiple-auto-complete>
|
||||
</mat-form-field>
|
||||
</mat-form-field> -->
|
||||
|
||||
<!-- Email -->
|
||||
<mat-form-field class="example-chip-list col">
|
||||
<!-- Email -->
|
||||
<!-- <mat-form-field class="example-chip-list col">
|
||||
<mat-chip-list #chipList>
|
||||
<mat-chip *ngFor="let email of emails" [selectable]="selectable" [removable]="removable"
|
||||
(removed)="remove(email)">
|
||||
|
@ -21,9 +52,9 @@
|
|||
[matChipInputSeparatorKeyCodes]="separatorKeysCodes" [matChipInputAddOnBlur]="addOnBlur"
|
||||
(matChipInputTokenEnd)="add($event)">
|
||||
</mat-chip-list>
|
||||
</mat-form-field>
|
||||
</mat-form-field> -->
|
||||
|
||||
<!-- <mat-form-field class="col">
|
||||
<!-- <mat-form-field class="col">
|
||||
<app-multiple-auto-complete required='false' [formControl]="formGroup.get('users').get('email')"
|
||||
placeholder="{{'INVITATION-EDITOR.AUTOCOMPLETE-EMAIL' | translate}}"
|
||||
[configuration]="emailAutoCompleteConfiguration" ()>
|
||||
|
@ -32,8 +63,8 @@
|
|||
</mat-error>
|
||||
</mat-form-field> -->
|
||||
|
||||
<div class="col-12 d-flex">
|
||||
<!-- <div class="col-12 d-flex">
|
||||
<button mat-raised-button color="primary" (click)="send()" type="button" class="ml-auto">{{'INVITATION-EDITOR.ACTIONS.SEND-INVITATION' | translate}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</form> -->
|
|
@ -0,0 +1,56 @@
|
|||
.form-container {
|
||||
width: 530px;
|
||||
height: 228px;
|
||||
padding: 4.5px 5.5px 14px 18px;
|
||||
// margin: 28.5px 29.5px 38px 42px;
|
||||
}
|
||||
|
||||
.close-icon {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.title {
|
||||
// text-align: left;
|
||||
font-size: 38px;
|
||||
font-weight: lighter;
|
||||
color: #000000;
|
||||
opacity: 0.8;
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
|
||||
.content {
|
||||
width: 496px;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.input {
|
||||
border: 2px black;
|
||||
}
|
||||
|
||||
.mat-form-field {
|
||||
background: #FAFAFA;
|
||||
border: 1px solid #D1D1D1;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
::ng-deep .mat-form-field-underline {
|
||||
display: none;
|
||||
}
|
||||
|
||||
::ng-deep .multiple-auto-complete[_ngcontent-mut-c19] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.invite-btn{
|
||||
width: 6.64em;
|
||||
height: 2.93em;
|
||||
background: #FFFFFF;
|
||||
border: 1px solid #B5B5B5;
|
||||
border-radius: 30px;
|
||||
font-weight: bold;
|
||||
letter-spacing: -0.35px;
|
||||
color: #B5B5B5;
|
||||
margin-bottom: 1px;
|
||||
}
|
||||
|
|
@ -18,6 +18,7 @@ import { map, takeUntil } from 'rxjs/operators';
|
|||
@Component({
|
||||
selector: 'app-invitation-component',
|
||||
templateUrl: 'dmp-invitation.component.html',
|
||||
styleUrls: ['./dmp-invitation.component.scss'],
|
||||
})
|
||||
export class DmpInvitationDialogComponent extends BaseComponent implements OnInit {
|
||||
|
||||
|
@ -91,6 +92,10 @@ export class DmpInvitationDialogComponent extends BaseComponent implements OnIni
|
|||
);
|
||||
}
|
||||
|
||||
closeDialog(): void {
|
||||
this.dialogRef.close();
|
||||
}
|
||||
|
||||
filterUsers(value: string): Observable<DmpInvitationUser[]> {
|
||||
this.filteredUsers = undefined;
|
||||
this.filteredUsersAsync = true;
|
||||
|
|
|
@ -50,13 +50,13 @@
|
|||
matTooltip="{{'DMP-LISTING.ACTIONS.CLONE' | translate}}" matTooltipPosition="above">
|
||||
<mat-icon class="mat-mini-fab-icon">content_copy</mat-icon>
|
||||
</button>
|
||||
<button *ngIf="isDraftDmp(dmp) && isUserOwner && !lockStatus" (click)="editClicked(dmp)" mat-mini-fab
|
||||
class="mr-3 d-flex justify-content-center align-items-center"
|
||||
<button *ngIf="isDraftDmp(dmp) && isUserOwner && !lockStatus" (click)="editClicked(dmp)"
|
||||
mat-mini-fab class="mr-3 d-flex justify-content-center align-items-center"
|
||||
matTooltip="{{'DMP-LISTING.ACTIONS.EDIT' | translate}}" matTooltipPosition="above">
|
||||
<mat-icon class="mat-mini-fab-icon">create</mat-icon>
|
||||
</button>
|
||||
<button *ngIf="isDraftDmp(dmp) && isUserOwner && !lockStatus" (click)="deleteClicked()" mat-mini-fab
|
||||
class="mr-3 d-flex justify-content-center align-items-center"
|
||||
<button *ngIf="isDraftDmp(dmp) && isUserOwner && !lockStatus" (click)="deleteClicked()"
|
||||
mat-mini-fab class="mr-3 d-flex justify-content-center align-items-center"
|
||||
matTooltip="{{'DMP-LISTING.ACTIONS.DELETE' | translate}}" matTooltipPosition="above">
|
||||
<mat-icon class="mat-mini-fab-icon">delete</mat-icon>
|
||||
</button>
|
||||
|
@ -154,8 +154,8 @@
|
|||
<p class="mb-0 mr-0 pl-2 frame-txt" [matMenuTriggerFor]="exportMenu">
|
||||
{{ 'DMP-LISTING.ACTIONS.EXPORT' | translate }}</p>
|
||||
</div>
|
||||
<div class="row ml-0 mr-0 pl-4 pb-3 d-flex align-items-center" *ngIf="isUserOwner"
|
||||
(click)="newVersion(dmp.id, dmp.label)">
|
||||
<div class="row ml-0 mr-0 pl-4 pb-3 d-flex align-items-center"
|
||||
*ngIf="isUserOwner && !lockStatus" (click)="newVersion(dmp.id, dmp.label)">
|
||||
<button mat-mini-fab class="frame-btn">
|
||||
<mat-icon class="mat-mini-fab-icon">add_to_photos</mat-icon>
|
||||
</button>
|
||||
|
@ -206,8 +206,7 @@
|
|||
<p class="authors-role">{{ roleDisplay(user) }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<button *ngIf="isUserOwner && !dmp.status && user.role"
|
||||
(click)="removeCollaborator(user.id)"
|
||||
<button *ngIf="isUserOwner && !dmp.status && user.role" (click)="removeUserFromDmp()"
|
||||
class="remove-btn">{{ 'GENERAL.CONFIRMATION-DIALOG.ACTIONS.REMOVE' | translate}}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -566,25 +566,14 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
|
|||
this.location.back();
|
||||
}
|
||||
|
||||
removeCollaborator(id: string) {
|
||||
const dialogRef = this.dialog.open(ConfirmationDialogComponent, {
|
||||
maxWidth: '300px',
|
||||
data: {
|
||||
message: this.language.instant('GENERAL.CONFIRMATION-DIALOG.DELETE-USER'),
|
||||
confirmButton: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ACTIONS.REMOVE'),
|
||||
cancelButton: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ACTIONS.CANCEL'),
|
||||
isDeleteConfirmation: false
|
||||
}
|
||||
});
|
||||
dialogRef.afterClosed().subscribe(result => {
|
||||
if (result) {
|
||||
this.formGroup.get('users').setValue(this.formGroup.get('users').value.filter(function (val, index, arr) {
|
||||
return val.id !== id;
|
||||
}));
|
||||
}
|
||||
});
|
||||
removeUserFromDmp() {
|
||||
// return this.dmpService.updateUsers(this.dmp.id, this.dmp.users).pipe(takeUntil(this._destroyed))
|
||||
// .subscribe(
|
||||
// complete => { this.onCallbackSuccess() },
|
||||
// error => this.onDeleteCallbackError(error)
|
||||
// );
|
||||
}
|
||||
|
||||
|
||||
copyDoi(doi) {
|
||||
console.log(doi.nativeElement.innerHTML);
|
||||
let domElement = doi.nativeElement as HTMLInputElement;
|
||||
|
@ -593,14 +582,14 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
|
|||
domElement.setSelectionRange(0, 0);
|
||||
alert('Doi Copied to Clipboard');
|
||||
}
|
||||
|
||||
|
||||
public getOrcidPath(): string {
|
||||
return this.configurationService.orcidPath;
|
||||
}
|
||||
|
||||
checkLockStatus(id: string){
|
||||
checkLockStatus(id: string) {
|
||||
this.lockService.checkLockStatus(id).pipe(takeUntil(this._destroyed))
|
||||
.subscribe(lockStatus => this.lockStatus = lockStatus);
|
||||
.subscribe(lockStatus => this.lockStatus = lockStatus);
|
||||
}
|
||||
|
||||
getUserFromDMP(): any {
|
||||
|
@ -610,7 +599,7 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// advancedClicked() {
|
||||
// const dialogRef = this.dialog.open(ExportMethodDialogComponent, {
|
||||
// maxWidth: '500px',
|
||||
|
|
|
@ -419,6 +419,7 @@
|
|||
"NEW-WITH-WIZARD": "New DMP using the wizard",
|
||||
"EDIT": "Edit",
|
||||
"INVITE": "Invite Contributors",
|
||||
"INVITE-AUTHORS": "Invite authors",
|
||||
"INVITE-SHORT": "Invite",
|
||||
"ADD-DATASET": "Add Dataset Description To DMP",
|
||||
"ADD-DATASET-DESCRIPTION": "Add dataset description",
|
||||
|
@ -914,6 +915,7 @@
|
|||
"TITLE": "Send Invitations for ",
|
||||
"AUTOCOMPLETE-USER": "User",
|
||||
"AUTOCOMPLETE-EMAIL": "Email",
|
||||
"AUTOCOMPLETE-USER-EMAIL": "Kat or kat@example.com",
|
||||
"ACTIONS": {
|
||||
"SEND-INVITATION": "Send Invitations",
|
||||
"CANCEL": "Cancel"
|
||||
|
|
|
@ -418,6 +418,7 @@
|
|||
"NEW-WITH-WIZARD": "Nuevo PGD utilizando el asistente",
|
||||
"EDIT": "Editar",
|
||||
"INVITE": "Invitar a participantes",
|
||||
"INVITE-AUTHORS": "Invitar a autores",
|
||||
"INVITE-SHORT": "Invitar",
|
||||
"ADD-DATASET-SHORT": "Añadir Dataset",
|
||||
"ADD-DATASET-DESCRIPTION": "Añadir la descripción del Dataset",
|
||||
|
@ -909,6 +910,7 @@
|
|||
"TITLE": "Enviar invitaciones para ",
|
||||
"AUTOCOMPLETE-USER": "Usuario",
|
||||
"AUTOCOMPLETE-EMAIL": "Email",
|
||||
"AUTOCOMPLETE-USER-EMAIL": "Kat o kat@example.com",
|
||||
"ACTIONS": {
|
||||
"SEND-INVITATION": "Enviar invitaciones",
|
||||
"CANCEL": "Cancelar"
|
||||
|
|
|
@ -418,6 +418,7 @@
|
|||
"NEW-WITH-WIZARD": "Νέο Σχέδιο Διαχείρισης Δεδομένων χρησιμοποιώντας τον wizard",
|
||||
"EDIT": "Επεξεργασία",
|
||||
"INVITE": "Πρόσκληση Συνεργατών",
|
||||
"INVITE-AUTHORS": "Πρόσκληση συγγραφέων",
|
||||
"INVITE-SHORT": "Πρόσκληση",
|
||||
"ADD-DATASET": "Προσθήκη Περιγραφής Συνόλου Δεδομένων στο Σχέδιο Διαχείρισης Δεδομένων",
|
||||
"ADD-DATASET-SHORT": "Προσθήκη Συνόλου Δεδομένων",
|
||||
|
@ -910,6 +911,7 @@
|
|||
"TITLE": "Αποστολή Προσκλήσεων για",
|
||||
"AUTOCOMPLETE-USER": "Χρήστης",
|
||||
"AUTOCOMPLETE-EMAIL": "Email",
|
||||
"AUTOCOMPLETE-USER-EMAIL": "Kat ή kat@example.com",
|
||||
"ACTIONS": {
|
||||
"SEND-INVITATION": "Αποστολή Προσκλήσεων",
|
||||
"CANCEL": "Ακύρωση"
|
||||
|
|
Loading…
Reference in New Issue