|
|
|
@ -28,6 +28,39 @@ |
|
|
|
</ng-container> |
|
|
|
|
|
|
|
<ng-container *ngIf="contributorsState.contributorsPaged | async; let contributors"> |
|
|
|
<ng-container *ngIf="contributorsState.canCreate | async"> |
|
|
|
<div class="table-items-header"> |
|
|
|
<sqx-form-alert marginTop="0" marginBottom="2" light="true"> |
|
|
|
Just enter the email address to invite someone with no account to the app. |
|
|
|
</sqx-form-alert> |
|
|
|
|
|
|
|
<form [formGroup]="assignContributorForm.form" (ngSubmit)="assignContributor()"> |
|
|
|
<div class="row no-gutters"> |
|
|
|
<div class="col"> |
|
|
|
<sqx-autocomplete [source]="usersDataSource" formControlName="user" [inputName]="'contributor'" placeholder="Find existing user" displayProperty="displayName"> |
|
|
|
<ng-template let-user="$implicit"> |
|
|
|
<span class="autocomplete-user"> |
|
|
|
<img class="user-picture autocomplete-user-picture" [attr.src]="user | sqxUserDtoPicture" /> |
|
|
|
|
|
|
|
<span class="user-name autocomplete-user-name">{{user.displayName}}</span> |
|
|
|
</span> |
|
|
|
</ng-template> |
|
|
|
</sqx-autocomplete> |
|
|
|
</div> |
|
|
|
<div class="col-auto pl-1"> |
|
|
|
<button type="submit" class="btn btn-success" [disabled]="assignContributorForm.hasNoUser | async">Add Contributor</button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</form> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="import-hint"> |
|
|
|
<sqx-form-hint class="text-right"> |
|
|
|
Big team? <a class="force" (click)="importDialog.show()">Add many contributors at once</a> |
|
|
|
</sqx-form-hint> |
|
|
|
</div> |
|
|
|
</ng-container> |
|
|
|
|
|
|
|
<ng-container *ngIf="contributors.length > 0; else noContributors"> |
|
|
|
<table class="table table-items table-fixed" *ngIf="rolesState.roles | async; let roles"> |
|
|
|
<tbody *ngFor="let contributor of contributors; trackBy: trackByContributor"> |
|
|
|
@ -56,7 +89,7 @@ |
|
|
|
</tbody> |
|
|
|
</table> |
|
|
|
|
|
|
|
<sqx-pager [pager]="contributorsState.contributorsPager | async" (prevPage)="goPrev()" (nextPage)="goNext()"></sqx-pager> |
|
|
|
<sqx-pager [pager]="contributorsState.contributorsPager | async" [hideWhenButtonsDisabled]="true" (prevPage)="goPrev()" (nextPage)="goNext()"></sqx-pager> |
|
|
|
</ng-container> |
|
|
|
|
|
|
|
<ng-template #noContributors> |
|
|
|
@ -64,37 +97,6 @@ |
|
|
|
No contributors found. |
|
|
|
</div> |
|
|
|
</ng-template> |
|
|
|
|
|
|
|
<ng-container *ngIf="contributorsState.canCreate | async"> |
|
|
|
<div class="table-items-footer"> |
|
|
|
<sqx-form-alert marginTop="0" marginBottom="2" white="true"> |
|
|
|
Just enter the email address to invite someone with no account to the app. |
|
|
|
</sqx-form-alert> |
|
|
|
|
|
|
|
<form [formGroup]="assignContributorForm.form" (ngSubmit)="assignContributor()"> |
|
|
|
<div class="row no-gutters"> |
|
|
|
<div class="col"> |
|
|
|
<sqx-autocomplete [source]="usersDataSource" formControlName="user" [inputName]="'contributor'" placeholder="Find existing user" displayProperty="displayName"> |
|
|
|
<ng-template let-user="$implicit"> |
|
|
|
<span class="autocomplete-user"> |
|
|
|
<img class="user-picture autocomplete-user-picture" [attr.src]="user | sqxUserDtoPicture" /> |
|
|
|
|
|
|
|
<span class="user-name autocomplete-user-name">{{user.displayName}}</span> |
|
|
|
</span> |
|
|
|
</ng-template> |
|
|
|
</sqx-autocomplete> |
|
|
|
</div> |
|
|
|
<div class="col-auto pl-1"> |
|
|
|
<button type="submit" class="btn btn-success" [disabled]="assignContributorForm.hasNoUser | async">Add Contributor</button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</form> |
|
|
|
</div> |
|
|
|
|
|
|
|
<sqx-form-hint class="text-right"> |
|
|
|
Big team? <a class="force" (click)="importDialog.show()">Add many contributors at once</a> |
|
|
|
</sqx-form-hint> |
|
|
|
</ng-container> |
|
|
|
</ng-container> |
|
|
|
</ng-container> |
|
|
|
</ng-container> |
|
|
|
|