Skip to content
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

Merged
merged 8 commits into from
Sep 13, 2024
Merged

Conversation

MadsApollo
Copy link
Contributor

Added dialog to change application organization via permission ids.

@@ -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();
Copy link
Contributor Author

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.

Copy link
Contributor

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

Copy link
Contributor Author

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.

Base automatically changed from feature/UpdateAngular to stage September 12, 2024 10:33
@fcv-iteratorIt fcv-iteratorIt changed the title Feature/1583 move application Feature/IOT-1583: Move application Sep 12, 2024
@@ -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();
Copy link
Contributor

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"
Copy link
Contributor

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 => {
Copy link
Contributor

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å.

Copy link
Contributor Author

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 => {
Copy link
Contributor

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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename til applicationId

@MadsApollo MadsApollo merged commit 963a660 into stage Sep 13, 2024
1 of 3 checks passed
@MadsApollo MadsApollo deleted the feature/1583-MoveApplication branch September 13, 2024 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants