File tree Expand file tree Collapse file tree 4 files changed +27
-0
lines changed
components/admin-app/admin-view-search/admin-view-edit
generated/player-api/model Expand file tree Collapse file tree 4 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -227,6 +227,22 @@ <h4 class="header-text ms-2">Edit View: {{ view.name }}</h4>
227227 < app-roles-permissions-select
228228 [team] ="teamContainer.team "
229229 > </ app-roles-permissions-select >
230+ < div >
231+ < mat-checkbox
232+ color ="primary "
233+ [checked] ="view.defaultTeamId == teamContainer.team.id "
234+ (change) ="
235+ setDefaultTeam(
236+ view.defaultTeamId != teamContainer.team.id
237+ ? teamContainer.team.id
238+ : null
239+ )
240+ "
241+ matTooltip ="If this is the default Team of the View "
242+ >
243+ Default
244+ </ mat-checkbox >
245+ </ div >
230246 < div class ="d-flex justify-content-center ">
231247 < button
232248 mat-button
Original file line number Diff line number Diff line change @@ -318,6 +318,15 @@ export class AdminViewEditComponent implements OnInit {
318318 } ) ;
319319 }
320320
321+ setDefaultTeam ( teamId : string ) {
322+ this . view . defaultTeamId = teamId ;
323+ this . viewService
324+ . updateView ( this . view . id , this . view )
325+ . subscribe ( ( updatedView ) => {
326+ this . view = updatedView ;
327+ } ) ;
328+ }
329+
321330 /**
322331 * Delete a team after confirmation
323332 * @param tm The team to delete
Original file line number Diff line number Diff line change @@ -22,5 +22,6 @@ export interface EditViewCommand {
2222 description ?: string | null ;
2323 status ?: ViewStatus ;
2424 isTemplate ?: boolean ;
25+ defaultTeamId ?: string | null ;
2526}
2627
Original file line number Diff line number Diff line change @@ -24,5 +24,6 @@ export interface View {
2424 status ?: ViewStatus ;
2525 parentViewId ?: string | null ;
2626 isTemplate ?: boolean ;
27+ defaultTeamId ?: string | null ;
2728}
2829
You can’t perform that action at this time.
0 commit comments