feat: add logo image and RTL support styles

- Added logo image to assets.
- Implemented RTL support styles in rtlSupport.scss for various components including breadcrumb, datatable, and tree node toggle button.

chore: configure environment files for production, staging, and development

- Created environment.prod.ts for production settings.
- Created environment.staging.ts for staging settings.
- Created environment.ts for local development settings.

feat: define custom theme preset

- Added presets.ts to define a custom theme preset using PrimeUIX with specific component styles and semantic colors.

chore: set up proxy configuration for local development
This commit is contained in:
2025-12-04 21:07:18 +03:30
parent c58210cdbd
commit 07fec02ea1
164 changed files with 20175 additions and 735 deletions
+5
View File
@@ -0,0 +1,5 @@
export * from './maybe.model';
export * from './namedRoutes.model';
export * from './navigation.model';
export * from './route-utils.model';
export * from './user.model';
+1
View File
@@ -0,0 +1 @@
export type Maybe<T> = T | null;
+28
View File
@@ -0,0 +1,28 @@
import { Route } from '@angular/router';
/**
* Generic type for creating strongly typed named routes
* @template T - Union of string literals representing route names
* @returns Record<T, Route> - Object with route names as keys and Route objects as values
*
* @example
* ```typescript
* type AuthRouteNames = 'auth' | 'login';
* const authRoutes: NamedRoutes<AuthRouteNames> = {
* auth: { path: 'auth', component: AuthComponent },
* login: { path: 'login', component: LoginComponent }
* };
* ```
*/
export interface RouteInfo {
meta: {
title: string;
icon?: string;
pagePath?: (params: any) => string;
};
}
export interface NamedRouteWithInfo extends Route, RouteInfo {}
export type NamedRoutes<T extends string> = Record<T, NamedRouteWithInfo>;
+14
View File
@@ -0,0 +1,14 @@
export interface MenuItem {
key: string;
title: string;
icon?: string;
routerLink?: string;
children?: MenuItem[];
permissions?: string[];
roles?: string[];
}
export interface NavigationConfig {
role: string;
menuItems: MenuItem[];
}
+56
View File
@@ -0,0 +1,56 @@
import { Routes } from '@angular/router';
import { NamedRoutes } from './namedRoutes.model';
/**
* Utility function to convert NamedRoutes to Routes array
* @param namedRoutes - Object containing named routes
* @returns Array of Route objects suitable for Angular router
*
* @example
* ```typescript
* const routes = routesToArray(studentNamedRoutes);
* // Returns: [Route, Route, Route, ...]
* ```
*/
export function routesToArray<T extends string>(namedRoutes: NamedRoutes<T>): Routes {
return Object.values(namedRoutes);
}
/**
* Utility function to get route path by name with type safety
* @param namedRoutes - Object containing named routes
* @param routeName - Name of the route to get path for
* @returns The path string for the specified route
*
* @example
* ```typescript
* const dashboardPath = getRoutePath(studentNamedRoutes, 'dashboard');
* // Returns: 'dashboard'
* ```
*/
export function getRoutePath<T extends string>(namedRoutes: NamedRoutes<T>, routeName: T): string {
return namedRoutes[routeName].path || '';
}
/**
* Utility function to build full route path with prefix
* @param prefix - Route prefix (e.g., '/student')
* @param namedRoutes - Object containing named routes
* @param routeName - Name of the route to build path for
* @returns Full route path
*
* @example
* ```typescript
* const fullPath = buildRoutePath('/student', studentNamedRoutes, 'dashboard');
* // Returns: '/student/dashboard'
* ```
*/
export function buildRoutePath<T extends string>(
prefix: string,
namedRoutes: NamedRoutes<T>,
routeName: T
): string {
const basePath = prefix.endsWith('/') ? prefix.slice(0, -1) : prefix;
const routePath = getRoutePath(namedRoutes, routeName);
return `${basePath}/${routePath}`;
}
+10
View File
@@ -0,0 +1,10 @@
export interface IPaginatedQuery<LastSeen = string> {
lastSeen: LastSeen;
pageSize: number;
}
export interface IPaginatedResponse<T, LastSeen = string> {
lastSeen: LastSeen;
totalCount: number;
items: T[];
}
+9
View File
@@ -0,0 +1,9 @@
export type TSeverity =
| 'success'
| 'secondary'
| 'info'
| 'warn'
| 'danger'
| 'contrast'
| undefined
| null;
+5
View File
@@ -0,0 +1,5 @@
export interface defaultStoreState<T> {
loading: boolean;
error: string | null;
items: T;
}
+64
View File
@@ -0,0 +1,64 @@
export enum UserRole {
ADMIN = 'admin',
SCHOOL = 'school',
TEACHER = 'teacher',
STUDENTS = 'students',
GRADER = 'grader',
SUPERADMIN = 'superadmin',
}
export type TRoles = keyof typeof UserRole;
export interface User {
fullName: string;
role: TRoles;
// id: string;
// email: string;
// firstName: string;
// lastName: string;
// permissions: Permission[];
// isActive: boolean;
// lastLogin?: Date;
// createdAt: Date;
// updatedAt: Date;
}
export interface Permission {
id: string;
name: string;
resource: string;
action: string;
}
export interface IAuthResponse {
// user: User;
token: string;
fullName: string;
mustChangePassword: boolean;
role: string;
refreshToken: string;
expiresIn: number;
}
export interface LoginCredentials {
username: string;
password: string;
captcha: string;
}
export interface IUserLoginInfo {
username: string;
password: string;
mobile: string;
email: string;
}
export interface ISignupRequestPayload {
firstName: string;
lastName: string;
gender: boolean;
mobile: string;
email: string;
username: string;
password: string;
}