-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/IOT-1583: Move application #167
Conversation
…etails page, and the table. Dialog is still in progress.
@@ -57,6 +60,7 @@ export class ApplicationDetailComponent implements OnInit, OnDestroy, AfterViewI | |||
public redMarker = "/assets/images/red-marker.png"; | |||
public greenMarker = "/assets/images/green-marker.png"; | |||
public greyMarker = "/assets/images/grey-marker.png"; | |||
private dropdownButtonExtraOptionsHandlers: Map<number, () => void> = new Map(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternativet til at have et map med onClick events, er at udvide Dropdown extra options til at kunne holde et onclick event, og så at det bliver kaldt onclick, frem for det event der ellers sendes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Har du da en situation her i hvor du har brug for mere end én handler?
Hvis ja. så synes jeg du skal udvide ExtraDropdownOption
til at have en onclick handler som kan blive defineret samme sted som du definerer label
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Jeg har ikke lige pt en situation med brug for mere end én handler, men det kunne der sagtens være. Jeg anvender den på samme måde i Feature/IOT-1209-MoveGateway, så det ville også gøre det nemmere der.
src/app/applications/applications-list/applications-table/applications-table.component.ts
Show resolved
Hide resolved
src/app/applications/applications-list/applications-table/applications-table.component.ts
Show resolved
Hide resolved
@@ -57,6 +60,7 @@ export class ApplicationDetailComponent implements OnInit, OnDestroy, AfterViewI | |||
public redMarker = "/assets/images/red-marker.png"; | |||
public greenMarker = "/assets/images/green-marker.png"; | |||
public greyMarker = "/assets/images/grey-marker.png"; | |||
private dropdownButtonExtraOptionsHandlers: Map<number, () => void> = new Map(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Har du da en situation her i hvor du har brug for mere end én handler?
Hvis ja. så synes jeg du skal udvide ExtraDropdownOption
til at have en onclick handler som kan blive defineret samme sted som du definerer label
"APPLICATION.CHANGE-ORGANIZATION.CHOOSE-ORGANIZATION" | translate | ||
}}</label> | ||
<mat-select | ||
id="userGroup" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Du har det samme id flere gange
} | ||
|
||
getOrganizations() { | ||
this.organizationsSubscription = this.organizationService.getMinimal().subscribe(res => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Get minimal henter altid alle organisationer, man må kun flytte applikationer mellem organisationer man er applikations administrator på.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ja det kan jeg godt se, retter det til findAll, der er der allowed orgs/alle ved global admin
} | ||
|
||
getPermissions() { | ||
this.permissionsSubscription = this.permissionService.getPermissions(1000, 0).subscribe(res => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dit get permissions her henter kun for de organisationer hvor brugeren har userAdmin rettighed, hvilket vil sige at man ikke altid kan se alle da permissions ikke er herakiske. (Den bør nok laves om til at lave et fetch for den givne organisations permissions hvis man er applikations admin). Alternativt skal vi lige diskutere den rettighed her med Mogens
@@ -12,3 +12,8 @@ export class DialogModel { | |||
export class WelcomeDialogModel { | |||
hasSomePermission: boolean; | |||
} | |||
|
|||
export class ApplicationDialogModel { | |||
id: number; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename til applicationId
Added dialog to change application organization via permission ids.