Merge branch 'maker-checker' into dev

Brings in the UI side of maker-checker for users and roles: a Pending User
Edits tab with a compare dialog, user/role create-edit-view wired to the
pending-request flow, plus keyboard shortcuts and inline-create dialogs.

Both conflicts resolved in dev's favour:

.env.ts — auto-generated build stamp; dev's (260901) is the newer one.

share-product-general-tab.component.html — dev had deliberately removed the
per-product Dividends button, leaving a comment explaining that dividends are
declared society-wide from Share Products -> Dividends because the board
resolves one rate for the year rather than one per product. The branch simply
predates that change, so taking its side would have resurrected a button that
was removed on purpose.

checker-inbox-and-tasks.component.html and tasks-routing.module.ts auto-merged
cleanly, with both the new Pending User Edits tab and the existing Closure
Requests tab intact.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-01 18:13:34 +05:30
co-authored by Claude Opus 5
55 changed files with 3152 additions and 229 deletions
@@ -13,6 +13,7 @@ import { Router, ActivatedRoute, RouterLink } from '@angular/router';
/** Custom Services */
import { SystemService } from '../../system.service';
import { AlertService } from 'app/core/alert/alert.service';
import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
/** Custom Service Zitadel */
@@ -36,6 +37,7 @@ export class AddRoleComponent implements OnInit {
private route = inject(ActivatedRoute);
private router = inject(Router);
private authService = inject(AuthService);
private alertService = inject(AlertService);
/** Role form. */
roleForm: UntypedFormGroup;
@@ -69,7 +71,12 @@ export class AddRoleComponent implements OnInit {
*/
submit() {
this.systemService.createRole(this.roleForm.value).subscribe((response: any) => {
if (environment.OIDC.oidcServerEnabled) {
if (response?.rollbackTransaction) {
this.alertService.alert({
type: 'Success',
message: 'Role creation request submitted successfully for approval.'
});
} else if (environment.OIDC.oidcServerEnabled) {
this.authService.createRole(response.resourceId, this.roleForm.value.name, this.roleForm.value.description);
}
this.router.navigate(['../'], { relativeTo: this.route });
@@ -13,6 +13,7 @@ import { ActivatedRoute, Router, RouterLink } from '@angular/router';
/** Custom Services */
import { SystemService } from '../../system.service';
import { AlertService } from 'app/core/alert/alert.service';
import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
/** Custom Service Zitadel */
@@ -36,6 +37,7 @@ export class EditRoleComponent implements OnInit {
private route = inject(ActivatedRoute);
private router = inject(Router);
private authService = inject(AuthService);
private alertService = inject(AlertService);
/** Role Form */
roleForm: UntypedFormGroup;
@@ -83,8 +85,13 @@ export class EditRoleComponent implements OnInit {
* if successful redirects to view updated roles and permissions.
*/
submit() {
this.systemService.updateRole(this.roleForm.value, this.roleData.id).subscribe(() => {
if (environment.OIDC.oidcServerEnabled) {
this.systemService.updateRole(this.roleForm.value, this.roleData.id).subscribe((response: any) => {
if (response?.rollbackTransaction) {
this.alertService.alert({
type: 'Success',
message: 'Role update request submitted successfully for approval.'
});
} else if (environment.OIDC.oidcServerEnabled) {
this.authService.updateRole(
this.roleData.id,
this.roleForm.get('name')?.value,
@@ -22,6 +22,7 @@ import { EnableDialogComponent } from '../../../shared/enable-dialog/enable-dial
import { FaIconComponent } from '@fortawesome/angular-fontawesome';
import { MatCheckbox } from '@angular/material/checkbox';
import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
import { AlertService } from 'app/core/alert/alert.service';
/** Custom Service Zitadel */
import { environment } from '../../../../environments/environment';
@@ -48,6 +49,7 @@ export class ViewRoleComponent implements OnInit {
private translateService = inject(TranslateService);
dialog = inject(MatDialog);
private authService = inject(AuthService);
private alertService = inject(AlertService);
/** Role Permissions Data */
rolePermissionService: any;
@@ -720,7 +722,14 @@ export class ViewRoleComponent implements OnInit {
this.formGroup.controls.roster.disable();
this.checkboxesChanged = false;
this.isDisabled = true;
this.systemService.updateRolePermission(this.roleId, permissionData).subscribe((response: any) => {});
this.systemService.updateRolePermission(this.roleId, permissionData).subscribe((response: any) => {
if (response?.rollbackTransaction) {
this.alertService.alert({
type: 'Success',
message: 'Role permissions update request submitted successfully for approval.'
});
}
});
}
/**
@@ -756,8 +765,13 @@ export class ViewRoleComponent implements OnInit {
});
deleteRoleDialogRef.afterClosed().subscribe((response: any) => {
if (response.delete) {
this.systemService.deleteRole(this.roleId).subscribe(() => {
if (environment.OIDC.oidcServerEnabled) {
this.systemService.deleteRole(this.roleId).subscribe((res: any) => {
if (res?.rollbackTransaction) {
this.alertService.alert({
type: 'Success',
message: 'Role deletion request submitted successfully for approval.'
});
} else if (environment.OIDC.oidcServerEnabled) {
this.authService.deleteRole(this.roleId);
}
this.router.navigate(['/system/roles-and-permissions']);
@@ -776,7 +790,13 @@ export class ViewRoleComponent implements OnInit {
});
enableRoleDialogRef.afterClosed().subscribe((response: any) => {
if (response.enable) {
this.systemService.enableRole(this.roleId).subscribe(() => {
this.systemService.enableRole(this.roleId).subscribe((res: any) => {
if (res?.rollbackTransaction) {
this.alertService.alert({
type: 'Success',
message: 'Role enablement request submitted successfully for approval.'
});
}
this.router.navigate(['/system/roles-and-permissions']);
});
} else {
@@ -793,7 +813,13 @@ export class ViewRoleComponent implements OnInit {
});
deleteRoleDialogRef.afterClosed().subscribe((response: any) => {
if (response.disable) {
this.systemService.disableRole(this.roleId).subscribe(() => {
this.systemService.disableRole(this.roleId).subscribe((res: any) => {
if (res?.rollbackTransaction) {
this.alertService.alert({
type: 'Success',
message: 'Role disablement request submitted successfully for approval.'
});
}
this.router.navigate(['/system/roles-and-permissions']);
});
} else {