@@ -121,14 +121,40 @@ <h3 class="danger-zone-title">Delete Event</h3>
121121 < span *ngIf ="!editMembers " [class] ="getRoleClass(user) ">
122122 {{ getUserRole(user) }}
123123 </ span >
124- < select *ngIf ="hasUpdatePermission && editMembers "
125- class ="role-select " [value] ="getUserRole(user) "
126- (change) ="updateUserRole(user, $event) "
124+ < mat-form-field *ngIf ="hasUpdatePermission && editMembers "
125+ class ="role-select-field " appearance ="outline "
127126 (click) ="$event.stopPropagation() ">
128- < option value ="GUEST "> Guest</ option >
129- < option value ="MANAGER "> Manager</ option >
130- < option value ="OWNER "> Owner</ option >
131- </ select >
127+ < mat-select [value] ="getUserRole(user) "
128+ (selectionChange) ="updateUserRole(user, $event) "
129+ (click) ="$event.stopPropagation() "
130+ panelClass ="role-select-panel "
131+ disableOptionCentering ="true ">
132+ < mat-select-trigger >
133+ {{ getUserRole(user) }}
134+ </ mat-select-trigger >
135+ < mat-option value ="GUEST ">
136+ < div class ="role-option ">
137+ < div class ="role-name "> Guest</ div >
138+ < div class ="role-description "> Can view and
139+ contribute observations</ div >
140+ </ div >
141+ </ mat-option >
142+ < mat-option value ="MANAGER ">
143+ < div class ="role-option ">
144+ < div class ="role-name "> Manager</ div >
145+ < div class ="role-description "> Can edit event
146+ settings and manage members</ div >
147+ </ div >
148+ </ mat-option >
149+ < mat-option value ="OWNER ">
150+ < div class ="role-option ">
151+ < div class ="role-name "> Owner</ div >
152+ < div class ="role-description "> Full control including
153+ deletion</ div >
154+ </ div >
155+ </ mat-option >
156+ </ mat-select >
157+ </ mat-form-field >
132158 </ div >
133159 < div class ="row-actions " *ngIf ="hasUpdatePermission && editMembers ">
134160 < button class ="action-button btn-danger btn-sm "
@@ -240,7 +266,7 @@ <h3 class="danger-zone-title">Delete Event</h3>
240266
241267 < div class ="table-scroll ">
242268 < table mat-table [class.mat-table] ="true " [dataSource] ="layersDataSource "
243- class ="mat-table-no-header " *ngIf ="filteredLayers.length > 0 ">
269+ class ="mat-table-no-header " *ngIf ="layersPage.totalCount > 0 && !loadingLayers ">
244270 < ng-container matColumnDef ="content ">
245271 < td mat-cell *matCellDef ="let layer " class ="table-row-content ">
246272 < div class ="row-item " (click) ="gotoLayer(layer) ">
@@ -267,16 +293,23 @@ <h3 class="danger-zone-title">Delete Event</h3>
267293 </ tr >
268294 </ table >
269295
270- < div class ="empty-state " *ngIf ="filteredLayers.length === 0 ">
296+ < div class ="empty-state " *ngIf ="layersPage.totalCount === 0 && !loadingLayers ">
271297 < div class ="empty-state-content ">
272298 < i class ="fa fa-map empty-state-icon "> </ i >
273299 < div class ="empty-state-text "> No layers for {{ event?.name }}</ div >
274300 </ div >
275301 </ div >
276302 </ div >
277- < mat-paginator [length] ="filteredLayers.length " [pageSize] ="layersPerPage "
303+ < mat-paginator [length] ="layersPage.totalCount " [pageSize] ="layersPageSize "
278304 [pageSizeOptions] ="pageSizeOptions " (page) ="onLayersPageChange($event) ">
279305 </ mat-paginator >
306+
307+ < div class ="loading-overlay " *ngIf ="loadingLayers ">
308+ < div class ="loading-content ">
309+ < div class ="loading-text "> Loading</ div >
310+ < i class ="fa fa-spinner fa-spin loading-spinner "> </ i >
311+ </ div >
312+ </ div >
280313 </ div >
281314 </ div >
282315 </ div >
@@ -293,7 +326,7 @@ <h3 class="danger-zone-title">Delete Event</h3>
293326 [@listAnimation] ="formsAnimationState " #formsList >
294327 < div class ="form-item " cdkDrag [cdkDragBoundary] ="formsList "
295328 [class.form-moving] ="animatingFormId === form.id "
296- *ngFor ="let form of filteredForms; let first = first; let last = last; trackBy: trackByFormId "
329+ *ngFor ="let form of filteredForms; trackBy: trackByFormId "
297330 (click) ="editForm(event, form) ">
298331 < mat-icon cdkDragHandle class ="drag-handle "> drag_indicator</ mat-icon >
299332 < mat-icon > description</ mat-icon >
@@ -306,12 +339,12 @@ <h3 class="danger-zone-title">Delete Event</h3>
306339 < button mat-icon-button (click) ="preview($event, form) " matTooltip ="Preview Form ">
307340 < mat-icon > visibility</ mat-icon >
308341 </ button >
309- < button mat-icon-button *ngIf ="!first " (click) =" moveFormUp($event, form) "
310- matTooltip ="Move form up ">
342+ < button mat-icon-button *ngIf ="canMoveFormUp( form) "
343+ (click) =" moveFormUp($event, form) " matTooltip ="Move form up ">
311344 < mat-icon > arrow_upward</ mat-icon >
312345 </ button >
313- < button mat-icon-button *ngIf ="!last " (click) =" moveFormDown($event, form) "
314- matTooltip ="Move form down ">
346+ < button mat-icon-button *ngIf ="canMoveFormDown( form) "
347+ (click) =" moveFormDown($event, form) " matTooltip ="Move form down ">
315348 < mat-icon > arrow_downward</ mat-icon >
316349 </ button >
317350 </ div >
0 commit comments