Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ yarn-error.log
/libpeerconnection.log
testem.log
/typings
.yalc
yalc.lock

# System files
.DS_Store
Expand Down
10,342 changes: 6,102 additions & 4,240 deletions package-lock.json

Large diffs are not rendered by default.

26 changes: 15 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,36 @@
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"build:watch": "mkdirp dist && nodemon --ignore dist --ext js,yml,yaml,ts,html,css,scss,json,md --exec \"rimraf dist && npm run build && cd dist && yalc publish --push --sig\"",
"test": "ng test"
},
"prettier": "@openmfp/config-prettier",
"dependencies": {
"tslib": "^2.3.0"
},
"devDependencies": {
"@angular-builders/jest": "^19.0.0 || ^20.0.0",
"@angular-devkit/build-angular": "^19.2.15",
"@angular/build": "^19.2.15",
"@angular/cli": "^19.2.15",
"@angular/compiler-cli": "^19.2.14",
"@angular/localize": "^19.0.0 || ^20.0.0",
"@angular-builders/jest": "^20.0.0",
"@angular-devkit/build-angular": "^20.0.0",
"@angular-eslint/builder": "^20.2.0",
"@angular/cli": "^20.2.0",
"@angular/build": "^20.2.1",
"@angular/compiler-cli": "^20.2.1",
"@angular/localize": "^20.2.1",
"@briebug/jest-schematic": "^6.0.0",
"@openmfp/portal-ui-lib": "0.174.2",
"@types/jest": "^30.0.0",
"@types/jmespath": "0.15.2",
"@openmfp/portal-ui-lib": "^0.172.0",
"@ui5/webcomponents-ngx": "^0.4.8",
"@ui5/webcomponents-ngx": "^0.5.0",
"jest": "^29.7.0",
"jest-jasmine2": "29.7.0",
"jest-junit": "16.0.0",
"jest-mock-extended": "3.0.7",
"jmespath": "0.16.0",
"ng-packagr": "^19.2.0",
"ng-packagr": "^20.2.0",
"ts-jest": "29.3.2",
"typescript": "~5.5.2"
"typescript": "~5.8.0",
"rimraf": "6.0.1",
"mkdirp": "^3.0.1",
"nodemon": "3.1.10"
}
}
17 changes: 17 additions & 0 deletions projects/lib/initializers/initializers/organization-initializer.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { inject, provideAppInitializer } from '@angular/core';
Copy link
Collaborator

Choose a reason for hiding this comment

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

missing unit test, and if the jest thesholds allow for thets to pass it means we should put them higer

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

import { Router } from '@angular/router';
import { EnvConfigService } from '@openmfp/portal-ui-lib';

export const organizationInitializer = () => {
return provideAppInitializer(async () => {
const envService = inject(EnvConfigService)
const router = inject(Router)
console.log('Running organization initializer');

try {
await envService.getEnvConfig()
} catch {
router.navigate(['new-organization']);
Copy link
Collaborator

@gkrajniak gkrajniak Aug 29, 2025

Choose a reason for hiding this comment

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

according to @nexus49 here let's have welcome

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

}
});
};
6 changes: 6 additions & 0 deletions projects/lib/initializers/ng-package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "../../../node_modules/ng-packagr/ng-package.schema.json",
"lib": {
"entryFile": "./public-api.ts"
}
}
1 change: 1 addition & 0 deletions projects/lib/initializers/public-api.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './initializers/organization-initializer';
2 changes: 1 addition & 1 deletion projects/lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"tslib": "^2.3.0"
},
"peerDependencies": {
"@openmfp/portal-ui-lib": "^0.172.0",
"@openmfp/portal-ui-lib": "0.174.2",
"@angular/common": "^19.0.0 || ^20.0.0",
"@angular/compiler": "^19.0.0 || ^20.0.0",
"@angular/core": "^19.0.0 || ^20.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import {
AuthService,
FieldDefinition,
LuigiCoreService,
LuigiNode,
PortalConfig,
Resource,
ResourceNodeContext,
ResourceService,
generateGraphQLFields,
} from '@openmfp/portal-ui-lib';
import { LuigiNode } from '@openmfp/portal-ui-lib/lib/models';
import '@ui5/webcomponents/dist/ComboBox.js';
import { Observable, of } from 'rxjs';
import { shareReplay } from 'rxjs/operators';
Expand Down
Loading