@acorex/platform-generator 20.3.0-next.9 → 20.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/generators/app-module/files/src/app/app.config.ts.template +63 -13
- package/src/generators/app-module/files/src/app/basic-interceptor.interceptor.ts.template +4 -4
- package/src/generators/app-module/files/src/app/modules/auth/auth-root.module.ts.template +13 -34
- package/src/generators/app-module/files/src/app/{app-version.provider.ts.template → modules/common/app-version.provider.ts.template} +4 -2
- package/src/generators/app-module/files/src/app/modules/common/default-settings.providers.ts.template +38 -0
- package/src/generators/app-module/files/src/app/modules/common/translation-root.module.ts.template +2 -1
- package/src/generators/app-module/files/src/app/modules/layout/entity.loader.ts.template +26 -9
- package/src/generators/app-module/files/src/app/modules/layout/layout-root.module.ts.template +15 -17
- package/src/generators/app-module/files/src/app/modules/layout/menu.provider.ts.template +1 -15
- package/src/generators/app-module/files/src/app/modules/layout/theme-palette.provider.ts.template +57 -0
- package/src/generators/app-module/files/src/app/modules/root/const.ts.template +25 -5
- package/src/generators/app-module/files/src/app/modules/root/menu.keys.ts.template +9 -0
- package/src/generators/app-module/files/src/app/modules/root/menu.provider.ts.template +61 -0
- package/src/generators/app-module/files/src/app/modules/root/mock.data.ts.template +13 -37
- package/src/generators/app-module/files/src/app/modules/root/permission-definition.provider.ts.template +51 -0
- package/src/generators/app-module/files/src/app/modules/root/permission.keys.ts.template +17 -0
- package/src/generators/app-module/files/src/app/modules/root/root.module.ts.template +39 -10
- package/src/generators/app-module/files/src/app/modules/root/sample/index.ts.template +9 -0
- package/src/generators/app-module/files/src/app/modules/root/sample/sample.entity.ts.template +146 -225
- package/src/generators/app-module/files/src/app/modules/root/sample/sample.module.ts.template +13 -5
- package/src/generators/app-module/files/src/app/modules/root/sample/sample.service.ts.template +26 -6
- package/src/generators/app-module/files/src/app/modules/root/sample/sample.types.ts.template +49 -11
- package/src/generators/app-module/files/src/app/modules/root/search-command.provider.ts.template +37 -0
- package/src/generators/app-module/files/src/assets/i18n/en-US/acorex.json +285 -0
- package/src/generators/app-module/files/src/assets/i18n/en-US/activity-log.json +31 -0
- package/src/generators/app-module/files/src/assets/i18n/en-US/application-management.json +112 -0
- package/src/generators/app-module/files/src/assets/i18n/en-US/auth.json +38 -3
- package/src/generators/app-module/files/src/assets/i18n/en-US/calendar-management.json +170 -0
- package/src/generators/app-module/files/src/assets/i18n/en-US/contact-management.json +182 -0
- package/src/generators/app-module/files/src/assets/i18n/en-US/content-management.json +23 -0
- package/src/generators/app-module/files/src/assets/i18n/en-US/conversation.json +120 -0
- package/src/generators/app-module/files/src/assets/i18n/en-US/customer-management.json +130 -0
- package/src/generators/app-module/files/src/assets/i18n/en-US/dashboard.json +231 -5
- package/src/generators/app-module/files/src/assets/i18n/en-US/data-management.json +93 -0
- package/src/generators/app-module/files/src/assets/i18n/en-US/document-management.json +321 -22
- package/src/generators/app-module/files/src/assets/i18n/en-US/dynamic-form-designer.json +58 -0
- package/src/generators/app-module/files/src/assets/i18n/en-US/extra-properties.json +39 -0
- package/src/generators/app-module/files/src/assets/i18n/en-US/form-template-management.json +61 -0
- package/src/generators/app-module/files/src/assets/i18n/en-US/general-old.json +800 -0
- package/src/generators/app-module/files/src/assets/i18n/en-US/general.json +993 -4
- package/src/generators/app-module/files/src/assets/i18n/en-US/help-desk.json +55 -0
- package/src/generators/app-module/files/src/assets/i18n/en-US/human-capital-management.json +144 -0
- package/src/generators/app-module/files/src/assets/i18n/en-US/layout-designer.json +19 -0
- package/src/generators/app-module/files/src/assets/i18n/en-US/locale-management.json +30 -0
- package/src/generators/app-module/files/src/assets/i18n/en-US/location-management.json +46 -0
- package/src/generators/app-module/files/src/assets/i18n/en-US/lock-system.json +40 -0
- package/src/generators/app-module/files/src/assets/i18n/en-US/log-management.json +29 -21
- package/src/generators/app-module/files/src/assets/i18n/en-US/meeting-management.json +69 -0
- package/src/generators/app-module/files/src/assets/i18n/en-US/module.json.template +45 -0
- package/src/generators/app-module/files/src/assets/i18n/en-US/notification-management.json +37 -0
- package/src/generators/app-module/files/src/assets/i18n/en-US/organization-management.json +59 -138
- package/src/generators/app-module/files/src/assets/i18n/en-US/party-management.json +300 -0
- package/src/generators/app-module/files/src/assets/i18n/en-US/platform-management.json +20 -79
- package/src/generators/app-module/files/src/assets/i18n/en-US/project-management.json +157 -0
- package/src/generators/app-module/files/src/assets/i18n/en-US/questionnaire.json +118 -0
- package/src/generators/app-module/files/src/assets/i18n/en-US/regional.json +41 -8
- package/src/generators/app-module/files/src/assets/i18n/en-US/report-management.json +76 -0
- package/src/generators/app-module/files/src/assets/i18n/en-US/security-management.json +42 -3
- package/src/generators/app-module/files/src/assets/i18n/en-US/settings.json +17 -0
- package/src/generators/app-module/files/src/assets/i18n/en-US/task-management.json +151 -0
- package/src/generators/app-module/files/src/assets/i18n/en-US/text-template-management.json +3 -1
- package/src/generators/app-module/files/src/assets/i18n/en-US/training-management.json +50 -0
- package/src/generators/app-module/files/src/assets/i18n/en-US/workflow-management.json +21 -0
- package/src/generators/app-module/files/src/assets/i18n/fa-IR/acorex.json +285 -0
- package/src/generators/app-module/files/src/assets/i18n/fa-IR/activity-log.json +31 -0
- package/src/generators/app-module/files/src/assets/i18n/fa-IR/application-management.json +112 -0
- package/src/generators/app-module/files/src/assets/i18n/fa-IR/auth.json +74 -38
- package/src/generators/app-module/files/src/assets/i18n/fa-IR/calendar-management.json +170 -0
- package/src/generators/app-module/files/src/assets/i18n/fa-IR/contact-management.json +182 -0
- package/src/generators/app-module/files/src/assets/i18n/fa-IR/content-management.json +23 -0
- package/src/generators/app-module/files/src/assets/i18n/fa-IR/conversation.json +80 -0
- package/src/generators/app-module/files/src/assets/i18n/fa-IR/customer-management.json +130 -0
- package/src/generators/app-module/files/src/assets/i18n/fa-IR/dashboard.json +231 -5
- package/src/generators/app-module/files/src/assets/i18n/fa-IR/data-management.json +93 -0
- package/src/generators/app-module/files/src/assets/i18n/fa-IR/document-management.json +333 -29
- package/src/generators/app-module/files/src/assets/i18n/fa-IR/dynamic-form-designer.json +39 -0
- package/src/generators/app-module/files/src/assets/i18n/fa-IR/extra-properties.json +39 -0
- package/src/generators/app-module/files/src/assets/i18n/fa-IR/form-template-management.json +82 -21
- package/src/generators/app-module/files/src/assets/i18n/fa-IR/general-old.json +800 -0
- package/src/generators/app-module/files/src/assets/i18n/fa-IR/general.json +987 -9
- package/src/generators/app-module/files/src/assets/i18n/fa-IR/global-search.json +5 -5
- package/src/generators/app-module/files/src/assets/i18n/fa-IR/help-desk.json +55 -0
- package/src/generators/app-module/files/src/assets/i18n/fa-IR/human-capital-management.json +144 -0
- package/src/generators/app-module/files/src/assets/i18n/fa-IR/layout-designer.json +19 -0
- package/src/generators/app-module/files/src/assets/i18n/fa-IR/layout.json +14 -14
- package/src/generators/app-module/files/src/assets/i18n/fa-IR/locale-management.json +30 -0
- package/src/generators/app-module/files/src/assets/i18n/fa-IR/location-management.json +46 -0
- package/src/generators/app-module/files/src/assets/i18n/fa-IR/lock-system.json +40 -0
- package/src/generators/app-module/files/src/assets/i18n/fa-IR/log-management.json +99 -47
- package/src/generators/app-module/files/src/assets/i18n/fa-IR/meeting-management.json +69 -0
- package/src/generators/app-module/files/src/assets/i18n/fa-IR/module.json.template +45 -0
- package/src/generators/app-module/files/src/assets/i18n/fa-IR/notification-management.json +59 -22
- package/src/generators/app-module/files/src/assets/i18n/fa-IR/organization-management.json +74 -152
- package/src/generators/app-module/files/src/assets/i18n/fa-IR/party-management.json +300 -0
- package/src/generators/app-module/files/src/assets/i18n/fa-IR/platform-management.json +38 -93
- package/src/generators/app-module/files/src/assets/i18n/fa-IR/project-management.json +157 -0
- package/src/generators/app-module/files/src/assets/i18n/fa-IR/questionnaire.json +118 -0
- package/src/generators/app-module/files/src/assets/i18n/fa-IR/regional.json +71 -38
- package/src/generators/app-module/files/src/assets/i18n/fa-IR/report-management.json +76 -0
- package/src/generators/app-module/files/src/assets/i18n/fa-IR/scheduler-job-management.json +4 -4
- package/src/generators/app-module/files/src/assets/i18n/fa-IR/security-management.json +43 -4
- package/src/generators/app-module/files/src/assets/i18n/fa-IR/settings.json +33 -16
- package/src/generators/app-module/files/src/assets/i18n/fa-IR/task-management.json +151 -0
- package/src/generators/app-module/files/src/assets/i18n/fa-IR/text-template-management.json +8 -5
- package/src/generators/app-module/files/src/assets/i18n/fa-IR/training-management.json +50 -0
- package/src/generators/app-module/files/src/assets/i18n/fa-IR/workflow-management.json +20 -0
- package/src/generators/app-module/files/src/environments/environment.dev.ts.template +1 -0
- package/src/generators/app-module/files/src/environments/environment.ts.template +1 -0
- package/src/generators/app-module/generator.js +3 -0
- package/src/generators/app-module/generator.js.map +1 -1
- package/src/generators/create-module-entity/files/__entityFileName__.entity.ts__tmpl__ +1 -1
- package/src/generators/create-tag-entity/files/tag-__entityFileName__.entity.ts__tmpl__ +1 -1
- package/src/generators/create-widget/files/__fileName__-widget-column.component.ts__tmpl__ +1 -1
- package/src/generators/create-widget/files/__fileName__-widget-edit.component.ts__tmpl__ +1 -1
- package/src/generators/create-widget/files/__fileName__-widget-filter.component.ts__tmpl__ +1 -1
- package/src/generators/create-widget/files/__fileName__-widget-print.component.ts__tmpl__ +1 -1
- package/src/generators/create-widget/files/__fileName__-widget-view.component.ts__tmpl__ +1 -1
- package/src/generators/create-widget/files/__fileName__-widget.config.ts__tmpl__ +2 -2
- package/src/generators/app-module/files/src/app/app.config.api.ts.template +0 -105
- package/src/generators/app-module/files/src/app/app.module.api.ts.template +0 -108
- package/src/generators/app-module/files/src/app/app.module.ts.template +0 -113
- package/src/generators/app-module/files/src/app/modules/auth/application.loader.ts.template +0 -34
- package/src/generators/app-module/files/src/app/modules/auth/auth.strategy.ts.template +0 -93
- package/src/generators/app-module/files/src/app/modules/auth/feature.loader.ts.template +0 -17
- package/src/generators/app-module/files/src/app/modules/auth/permission.loader.ts.template +0 -20
- package/src/generators/app-module/files/src/app/modules/auth/tenant.loader.ts.template +0 -26
- package/src/generators/app-module/files/src/app/modules/root/sample/sample.component.html.template +0 -15
- package/src/generators/app-module/files/src/app/modules/root/sample/sample.component.scss.template +0 -10
- package/src/generators/app-module/files/src/app/modules/root/sample/sample.component.ts.template +0 -20
- package/src/generators/app-module/files/src/assets/i18n/en-US/vehicle-management.json +0 -146
- package/src/generators/app-module/files/src/assets/i18n/fa-IR/vehicle-management.json +0 -144
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import { AXDialogModule } from '@acorex/components/dialog';
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
|
-
import { HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
|
4
|
-
import { NgModule } from '@angular/core';
|
|
5
|
-
import { BrowserModule } from '@angular/platform-browser';
|
|
6
|
-
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
7
|
-
import { RouterModule, provideRouter, withEnabledBlockingInitialNavigation } from '@angular/router';
|
|
8
|
-
import { AppComponent } from './app.component';
|
|
9
|
-
import { appRoutes } from './app.routes';
|
|
10
|
-
import { BasicInterceptor } from './basic-interceptor.interceptor';
|
|
11
|
-
|
|
12
|
-
import { AXFormatModule } from '@acorex/core/format';
|
|
13
|
-
import { AXValidationModule } from '@acorex/core/validation';
|
|
14
|
-
import {
|
|
15
|
-
AXPImageUrlLogoConfig,
|
|
16
|
-
AXP_APP_VERSION_PROVIDER,
|
|
17
|
-
AXP_PLATFORM_CONFIG_TOKEN,
|
|
18
|
-
ENVIRONMENT,
|
|
19
|
-
configPlatform,
|
|
20
|
-
} from '@acorex/platform/common';
|
|
21
|
-
import { AXPAuthRootModule } from './modules/auth/auth-root.module';
|
|
22
|
-
import { AXPTranslationRootModule } from './modules/common/translation-root.module';
|
|
23
|
-
import { AXPLayoutRootModule } from './modules/layout/layout-root.module';
|
|
24
|
-
|
|
25
|
-
import { AXLoadingDialogModule } from '@acorex/components/loading-dialog';
|
|
26
|
-
import { AXMApplicationManagementModule } from '@acorex/modules/application-management';
|
|
27
|
-
import { AXMNotificationManagementModule } from '@acorex/modules/notification-management';
|
|
28
|
-
import { AXMOrganizationManagementModule } from '@acorex/modules/organization-management';
|
|
29
|
-
import { AXMPlatformManagementModule } from '@acorex/modules/platform-management';
|
|
30
|
-
|
|
31
|
-
import { AXCMockModule } from '@acorex/connectivity/mock';
|
|
32
|
-
import { AXMCommonModule } from '@acorex/modules/common';
|
|
33
|
-
import { AXMDocumentManagementModule } from '@acorex/modules/document-management';
|
|
34
|
-
import { AXMFormTemplateManagementModule } from '@acorex/modules/form-template-management';
|
|
35
|
-
import { AXMSecurityManagementModule } from '@acorex/modules/security-management';
|
|
36
|
-
import { AXMTextTemplateManagementModule } from '@acorex/modules/text-template-management';
|
|
37
|
-
import { AXP_ROOT_CONFIG_TOKEN } from '@acorex/platform/common';
|
|
38
|
-
import { AXPGlobalSearchModule } from '@acorex/platform/layout/search';
|
|
39
|
-
import { AXPSettingsModule } from '@acorex/platform/layout/setting';
|
|
40
|
-
import { environment } from '../environments/environment';
|
|
41
|
-
import { <%= className %>AppVersionProvider } from './app-version.provider';
|
|
42
|
-
// import { <%= className %>RootModule } from './modules/<%= name %>/<%= name %>-root.module';
|
|
43
|
-
|
|
44
|
-
@NgModule({
|
|
45
|
-
imports: [
|
|
46
|
-
BrowserAnimationsModule,
|
|
47
|
-
BrowserModule,
|
|
48
|
-
CommonModule,
|
|
49
|
-
// ACoreX UI Modules
|
|
50
|
-
AXDialogModule,
|
|
51
|
-
AXLoadingDialogModule,
|
|
52
|
-
AXFormatModule.forRoot(),
|
|
53
|
-
AXValidationModule.forRoot(),
|
|
54
|
-
//
|
|
55
|
-
AXPTranslationRootModule,
|
|
56
|
-
AXPLayoutRootModule,
|
|
57
|
-
AXPGlobalSearchModule,
|
|
58
|
-
AXPSettingsModule,
|
|
59
|
-
//
|
|
60
|
-
// <%= className %>RootModule,
|
|
61
|
-
//
|
|
62
|
-
AXPAuthRootModule,
|
|
63
|
-
// Application Modules
|
|
64
|
-
AXMApplicationManagementModule.forRoot(),
|
|
65
|
-
AXMPlatformManagementModule,
|
|
66
|
-
AXMNotificationManagementModule,
|
|
67
|
-
AXMFormTemplateManagementModule,
|
|
68
|
-
AXMTextTemplateManagementModule,
|
|
69
|
-
AXMSecurityManagementModule,
|
|
70
|
-
AXMOrganizationManagementModule,
|
|
71
|
-
//AXMSchedulerJobManagementModule,
|
|
72
|
-
AXMDocumentManagementModule,
|
|
73
|
-
//
|
|
74
|
-
AXMCommonModule,
|
|
75
|
-
//
|
|
76
|
-
RouterModule.forRoot(appRoutes, {
|
|
77
|
-
bindToComponentInputs: true,
|
|
78
|
-
onSameUrlNavigation: 'reload',
|
|
79
|
-
}),
|
|
80
|
-
AXCMockModule,
|
|
81
|
-
],
|
|
82
|
-
providers: [
|
|
83
|
-
provideHttpClient(withInterceptorsFromDi()),
|
|
84
|
-
provideRouter(appRoutes, withEnabledBlockingInitialNavigation()),
|
|
85
|
-
{ provide: ENVIRONMENT, useValue: environment },
|
|
86
|
-
{ provide: HTTP_INTERCEPTORS, useClass: BasicInterceptor, multi: true },
|
|
87
|
-
{
|
|
88
|
-
provide: AXP_ROOT_CONFIG_TOKEN,
|
|
89
|
-
useValue: {
|
|
90
|
-
baseUrl: environment.baseUrl,
|
|
91
|
-
},
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
provide: AXP_PLATFORM_CONFIG_TOKEN,
|
|
95
|
-
useValue: configPlatform({
|
|
96
|
-
logo: {
|
|
97
|
-
light: new AXPImageUrlLogoConfig('assets/logos/acorex-logo-white.svg'),
|
|
98
|
-
colored: new AXPImageUrlLogoConfig('assets/logos/acorex-logo.svg'),
|
|
99
|
-
//colored: new AXPImageUrlLogoConfig('assets/logos/logo-colored.svg'),
|
|
100
|
-
},
|
|
101
|
-
title: '<%= title %>',
|
|
102
|
-
copyright: 'Copyright © 2024',
|
|
103
|
-
}),
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
provide: AXP_APP_VERSION_PROVIDER,
|
|
107
|
-
useClass: <%= className %>AppVersionProvider,
|
|
108
|
-
},
|
|
109
|
-
],
|
|
110
|
-
declarations: [AppComponent],
|
|
111
|
-
bootstrap: [AppComponent],
|
|
112
|
-
})
|
|
113
|
-
export class AppModule {}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { AXPApplication, AXPApplicationLoader, AXPSessionContext } from '@acorex/platform/auth';
|
|
2
|
-
import { Injectable } from '@angular/core';
|
|
3
|
-
import { Observable, delay, of } from 'rxjs';
|
|
4
|
-
|
|
5
|
-
@Injectable()
|
|
6
|
-
export class <%= className %>ApplicationLoader implements AXPApplicationLoader {
|
|
7
|
-
|
|
8
|
-
getList(context: AXPSessionContext): Observable < AXPApplication[] > {
|
|
9
|
-
const <%= name %>_app =
|
|
10
|
-
{
|
|
11
|
-
id: '1',
|
|
12
|
-
name: '<%= name %>',
|
|
13
|
-
title: '<%= className %> Application',
|
|
14
|
-
version: '1.0.0',
|
|
15
|
-
editionName: 'Standard',
|
|
16
|
-
};
|
|
17
|
-
const console_app =
|
|
18
|
-
{
|
|
19
|
-
id: '1',
|
|
20
|
-
name: 'platform',
|
|
21
|
-
title: 'Platform Console',
|
|
22
|
-
version: '1.0.0',
|
|
23
|
-
editionName: 'Standard',
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
if (context.user?.name == 'Root' && context.tenant?.id == '99') {
|
|
27
|
-
return of([<%= name %>_app, console_app]).pipe(delay(500));
|
|
28
|
-
}
|
|
29
|
-
else {
|
|
30
|
-
return of([<%= name %>_app]).pipe(delay(500));
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AXPAuthStrategy,
|
|
3
|
-
AXPBaseCredentials,
|
|
4
|
-
AXPRefreshTokenResult,
|
|
5
|
-
AXPSessionContext,
|
|
6
|
-
AXPSignInResult,
|
|
7
|
-
AXPUser,
|
|
8
|
-
} from '@acorex/platform/auth';
|
|
9
|
-
import { Injectable } from '@angular/core';
|
|
10
|
-
|
|
11
|
-
export interface <%= className %>UserPassCredentials extends AXPBaseCredentials {
|
|
12
|
-
username: string;
|
|
13
|
-
password: string;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
@Injectable()
|
|
17
|
-
export class <%= className %>Strategy implements AXPAuthStrategy {
|
|
18
|
-
constructor() {}
|
|
19
|
-
|
|
20
|
-
get name(): string {
|
|
21
|
-
return 'user-pass';
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
async signin(credentials: <%= className %>UserPassCredentials): Promise<AXPSignInResult> {
|
|
25
|
-
try {
|
|
26
|
-
if (credentials.username == 'root' && credentials.password == '123') {
|
|
27
|
-
const user: AXPUser = {
|
|
28
|
-
id: 'a683a19a-e3eb-56a7-b81c-7cf9468ae831',
|
|
29
|
-
name: 'Root',
|
|
30
|
-
title: 'Root User',
|
|
31
|
-
avatar: 'https://avatar.iran.liara.run/public/29',
|
|
32
|
-
};
|
|
33
|
-
const accessToken = 'access_token';
|
|
34
|
-
const refreshToken = 'refresh_token';
|
|
35
|
-
return {
|
|
36
|
-
succeed: true,
|
|
37
|
-
data: { user, accessToken, refreshToken },
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
if (credentials.username == 'admin' && credentials.password == '123') {
|
|
41
|
-
const user: AXPUser = {
|
|
42
|
-
id: 'a683a19a-e3eb-46a7-b81c-7cf9468ae831',
|
|
43
|
-
name: 'Admin',
|
|
44
|
-
title: 'Admin User',
|
|
45
|
-
avatar: 'https://avatar.iran.liara.run/public/47',
|
|
46
|
-
};
|
|
47
|
-
const accessToken = 'access_token';
|
|
48
|
-
const refreshToken = 'refresh_token';
|
|
49
|
-
return {
|
|
50
|
-
succeed: true,
|
|
51
|
-
data: { user, accessToken, refreshToken },
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
if (credentials.username == 'user' && credentials.password == '123') {
|
|
55
|
-
const user: AXPUser = {
|
|
56
|
-
id: 'a683a19a-e3eb-76a7-b81c-7cf9468ae831',
|
|
57
|
-
name: 'User',
|
|
58
|
-
title: 'Sample User',
|
|
59
|
-
avatar: 'https://avatar.iran.liara.run/public/56',
|
|
60
|
-
};
|
|
61
|
-
const accessToken = 'access_token';
|
|
62
|
-
const refreshToken = 'refresh_token';
|
|
63
|
-
return {
|
|
64
|
-
succeed: true,
|
|
65
|
-
data: { user, accessToken, refreshToken },
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
return {
|
|
69
|
-
succeed: false,
|
|
70
|
-
};
|
|
71
|
-
} catch (error: any) {
|
|
72
|
-
if (error?.message) throw new Error(error.message);
|
|
73
|
-
// Depending on the error type, you might want to throw a specific error
|
|
74
|
-
throw new Error('Network or server error occurred');
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
async signout(): Promise<void> {
|
|
79
|
-
console.log('User signed out');
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
async refreshToken(context: AXPSessionContext): Promise<AXPRefreshTokenResult> {
|
|
83
|
-
return {
|
|
84
|
-
succeed: true,
|
|
85
|
-
data: {
|
|
86
|
-
accessToken: 'access_token',
|
|
87
|
-
refreshToken: 'refresh_token',
|
|
88
|
-
application: context.application,
|
|
89
|
-
tenant: context.tenant,
|
|
90
|
-
},
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { AXPFeature, AXPFeatureLoader } from '@acorex/platform/auth';
|
|
2
|
-
import { Observable, delay, of } from 'rxjs';
|
|
3
|
-
|
|
4
|
-
export class <%= className %>FeatureLoader implements AXPFeatureLoader {
|
|
5
|
-
|
|
6
|
-
private list: AXPFeature[] = [
|
|
7
|
-
// {
|
|
8
|
-
// name: 'feature name',
|
|
9
|
-
// title: 'Feature Title',
|
|
10
|
-
// value: false
|
|
11
|
-
// },
|
|
12
|
-
]
|
|
13
|
-
|
|
14
|
-
getList(): Observable < AXPFeature[] > {
|
|
15
|
-
return of(this.list).pipe(delay(0));
|
|
16
|
-
}
|
|
17
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { AXPPermission, AXPPermissionLoader, AXPSessionContext } from '@acorex/platform/auth';
|
|
2
|
-
import { Injectable } from '@angular/core';
|
|
3
|
-
import { Observable, of } from 'rxjs';
|
|
4
|
-
|
|
5
|
-
@Injectable()
|
|
6
|
-
export class <%= className %>PermissionLoader implements AXPPermissionLoader {
|
|
7
|
-
|
|
8
|
-
getList(context: AXPSessionContext): Observable<AXPPermission[]> {
|
|
9
|
-
if (context.user?.name == 'Root') {
|
|
10
|
-
return of(['admin', 'platform.admin.settings', 'platform.admin.reports']);
|
|
11
|
-
}
|
|
12
|
-
else if (context.user?.name == 'Admin') {
|
|
13
|
-
return of(['admin', '<%= name %>.admin.settings']);
|
|
14
|
-
}
|
|
15
|
-
else {
|
|
16
|
-
return of(['<%= name %>_app.forms']);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { AXPSessionContext, AXPTenant, AXPTenantLoader } from '@acorex/platform/auth';
|
|
2
|
-
import { Injectable } from '@angular/core';
|
|
3
|
-
import { Observable, delay, of } from 'rxjs';
|
|
4
|
-
|
|
5
|
-
@Injectable()
|
|
6
|
-
export class <%= className %>TenantLoader implements AXPTenantLoader {
|
|
7
|
-
getList(context: AXPSessionContext): Observable<AXPTenant[]> {
|
|
8
|
-
const acorex_tenant = {
|
|
9
|
-
id: '99',
|
|
10
|
-
name: 'acorex-tenant',
|
|
11
|
-
title: 'ACoreX Platform Tenant',
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
const <%= name %>_tenant = {
|
|
15
|
-
id: '1',
|
|
16
|
-
name: '<%= name %>-tenant',
|
|
17
|
-
title: '<%= className %> Tenant',
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
if (context.user?.name == 'Root') {
|
|
21
|
-
return of([<%= name %>_tenant, acorex_tenant]).pipe(delay(500));
|
|
22
|
-
} else {
|
|
23
|
-
return of([<%= name %>_tenant]).pipe(delay(500));
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
package/src/generators/app-module/files/src/app/modules/root/sample/sample.component.html.template
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<div class="ax-p-4">
|
|
2
|
-
<div class="ax-card">
|
|
3
|
-
<div class="ax-card-header">
|
|
4
|
-
<p>Sample Entity</p>
|
|
5
|
-
</div>
|
|
6
|
-
<div class="ax-card-body">
|
|
7
|
-
<p>This is a sample entity component for <%= title %></p>
|
|
8
|
-
<div class="ax-flex ax-gap-2">
|
|
9
|
-
<button ax-button color="primary">Primary Action</button>
|
|
10
|
-
<button ax-button color="secondary">Secondary Action</button>
|
|
11
|
-
<button ax-button color="danger">Danger Action</button>
|
|
12
|
-
</div>
|
|
13
|
-
</div>
|
|
14
|
-
</div>
|
|
15
|
-
</div>
|
package/src/generators/app-module/files/src/app/modules/root/sample/sample.component.ts.template
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { AXButtonModule } from '@acorex/components/button';
|
|
2
|
-
import { AXDropdownButtonModule } from '@acorex/components/dropdown-button';
|
|
3
|
-
import { AXGridLayoutBuilderModule } from '@acorex/components/grid-layout-builder';
|
|
4
|
-
import { AXPLayoutBuilderModule } from '@acorex/platform/layout/builder';
|
|
5
|
-
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
6
|
-
|
|
7
|
-
@Component({
|
|
8
|
-
selector: 'sample',
|
|
9
|
-
templateUrl: './sample.component.html',
|
|
10
|
-
styleUrl: './sample.component.scss',
|
|
11
|
-
styles: `:host{
|
|
12
|
-
display: block;
|
|
13
|
-
width: 100%;
|
|
14
|
-
height: 100%;
|
|
15
|
-
}`,
|
|
16
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
17
|
-
standalone: true,
|
|
18
|
-
imports: [AXPLayoutBuilderModule, AXButtonModule, AXGridLayoutBuilderModule, AXDropdownButtonModule],
|
|
19
|
-
})
|
|
20
|
-
export class SampleComponent {}
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"menu": {
|
|
3
|
-
"vehicleManagement": "Vehicle Management"
|
|
4
|
-
},
|
|
5
|
-
"car": {
|
|
6
|
-
"title": "Car",
|
|
7
|
-
"titlePlural": "Cars",
|
|
8
|
-
"groups": {
|
|
9
|
-
"general": "General Information",
|
|
10
|
-
"details": "Details",
|
|
11
|
-
"location": "Location"
|
|
12
|
-
},
|
|
13
|
-
"fields": {
|
|
14
|
-
"category": "Category",
|
|
15
|
-
"brand": "Brand",
|
|
16
|
-
"model": "Model",
|
|
17
|
-
"year": "Year",
|
|
18
|
-
"plateNumber": "Plate Number",
|
|
19
|
-
"description": "Description",
|
|
20
|
-
"dailyRate": "Daily Rate",
|
|
21
|
-
"images": "Images",
|
|
22
|
-
"status": "Status",
|
|
23
|
-
"location": "Location"
|
|
24
|
-
},
|
|
25
|
-
"status": {
|
|
26
|
-
"available": "Available",
|
|
27
|
-
"reserved": "Reserved",
|
|
28
|
-
"inUse": "In Use",
|
|
29
|
-
"maintenance": "Maintenance"
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
"carCategory": {
|
|
33
|
-
"groups": {
|
|
34
|
-
"general": "General Information"
|
|
35
|
-
},
|
|
36
|
-
"fields": {
|
|
37
|
-
"name": "Name",
|
|
38
|
-
"title": "Title",
|
|
39
|
-
"description": "Description",
|
|
40
|
-
"icon": "Icon",
|
|
41
|
-
"isActive": "Active"
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
"rentalRequest": {
|
|
45
|
-
"groups": {
|
|
46
|
-
"basic": "Basic Information",
|
|
47
|
-
"location": "Location",
|
|
48
|
-
"notes": "Notes"
|
|
49
|
-
},
|
|
50
|
-
"fields": {
|
|
51
|
-
"car": "Car",
|
|
52
|
-
"user": "User",
|
|
53
|
-
"startDate": "Start Date",
|
|
54
|
-
"endDate": "End Date",
|
|
55
|
-
"status": "Status",
|
|
56
|
-
"totalPrice": "Total Price",
|
|
57
|
-
"pickupLocation": "Pickup Location",
|
|
58
|
-
"dropoffLocation": "Drop-off Location",
|
|
59
|
-
"notes": "Notes"
|
|
60
|
-
},
|
|
61
|
-
"status": {
|
|
62
|
-
"pending": "Pending",
|
|
63
|
-
"approved": "Approved",
|
|
64
|
-
"rejected": "Rejected",
|
|
65
|
-
"cancelled": "Cancelled",
|
|
66
|
-
"completed": "Completed"
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
"carReservation": {
|
|
70
|
-
"groups": {
|
|
71
|
-
"basic": "Basic Information",
|
|
72
|
-
"timing": "Timing",
|
|
73
|
-
"financial": "Financial Information",
|
|
74
|
-
"notes": "Notes"
|
|
75
|
-
},
|
|
76
|
-
"fields": {
|
|
77
|
-
"car": "Car",
|
|
78
|
-
"user": "User",
|
|
79
|
-
"rentalRequest": "Rental Request",
|
|
80
|
-
"startDate": "Start Date",
|
|
81
|
-
"endDate": "End Date",
|
|
82
|
-
"actualPickupTime": "Actual Pickup Time",
|
|
83
|
-
"actualReturnTime": "Actual Return Time",
|
|
84
|
-
"status": "Status",
|
|
85
|
-
"totalPrice": "Total Price",
|
|
86
|
-
"deposit": "Deposit",
|
|
87
|
-
"additionalCharges": "Additional Charges",
|
|
88
|
-
"chargeDescription": "Charge Description",
|
|
89
|
-
"chargeAmount": "Charge Amount",
|
|
90
|
-
"notes": "Notes"
|
|
91
|
-
},
|
|
92
|
-
"status": {
|
|
93
|
-
"reserved": "Reserved",
|
|
94
|
-
"inProgress": "In Progress",
|
|
95
|
-
"completed": "Completed",
|
|
96
|
-
"cancelled": "Cancelled",
|
|
97
|
-
"overdue": "Overdue"
|
|
98
|
-
}
|
|
99
|
-
},
|
|
100
|
-
"invoice": {
|
|
101
|
-
"groups": {
|
|
102
|
-
"basic": "Basic Information",
|
|
103
|
-
"items": "Items",
|
|
104
|
-
"payment": "Payment",
|
|
105
|
-
"notes": "Notes"
|
|
106
|
-
},
|
|
107
|
-
"fields": {
|
|
108
|
-
"invoiceNumber": "Invoice Number",
|
|
109
|
-
"reservation": "Reservation",
|
|
110
|
-
"user": "User",
|
|
111
|
-
"issueDate": "Issue Date",
|
|
112
|
-
"dueDate": "Due Date",
|
|
113
|
-
"status": "Status",
|
|
114
|
-
"items": "Items",
|
|
115
|
-
"itemDescription": "Description",
|
|
116
|
-
"itemQuantity": "Quantity",
|
|
117
|
-
"itemUnitPrice": "Unit Price",
|
|
118
|
-
"itemAmount": "Amount",
|
|
119
|
-
"subTotal": "Subtotal",
|
|
120
|
-
"tax": "Tax",
|
|
121
|
-
"totalAmount": "Total Amount",
|
|
122
|
-
"paidAmount": "Paid Amount",
|
|
123
|
-
"paymentStatus": "Payment Status",
|
|
124
|
-
"paymentMethod": "Payment Method",
|
|
125
|
-
"notes": "Notes"
|
|
126
|
-
},
|
|
127
|
-
"status": {
|
|
128
|
-
"draft": "Draft",
|
|
129
|
-
"issued": "Issued",
|
|
130
|
-
"cancelled": "Cancelled"
|
|
131
|
-
},
|
|
132
|
-
"paymentStatus": {
|
|
133
|
-
"unpaid": "Unpaid",
|
|
134
|
-
"partiallyPaid": "Partially Paid",
|
|
135
|
-
"paid": "Paid",
|
|
136
|
-
"overdue": "Overdue"
|
|
137
|
-
}
|
|
138
|
-
},
|
|
139
|
-
"common": {
|
|
140
|
-
"create": "Create",
|
|
141
|
-
"delete": "Delete",
|
|
142
|
-
"edit": "Edit",
|
|
143
|
-
"save": "Save",
|
|
144
|
-
"cancel": "Cancel"
|
|
145
|
-
}
|
|
146
|
-
}
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"menu": {
|
|
3
|
-
"vehicleManagement": "مدیریت خودروها"
|
|
4
|
-
},
|
|
5
|
-
"car": {
|
|
6
|
-
"groups": {
|
|
7
|
-
"general": "اطلاعات عمومی",
|
|
8
|
-
"details": "جزئیات",
|
|
9
|
-
"location": "موقعیت"
|
|
10
|
-
},
|
|
11
|
-
"fields": {
|
|
12
|
-
"category": "دستهبندی",
|
|
13
|
-
"brand": "برند",
|
|
14
|
-
"model": "مدل",
|
|
15
|
-
"year": "سال ساخت",
|
|
16
|
-
"plateNumber": "شماره پلاک",
|
|
17
|
-
"description": "توضیحات",
|
|
18
|
-
"dailyRate": "نرخ روزانه",
|
|
19
|
-
"images": "تصاویر",
|
|
20
|
-
"status": "وضعیت",
|
|
21
|
-
"location": "موقعیت"
|
|
22
|
-
},
|
|
23
|
-
"status": {
|
|
24
|
-
"available": "در دسترس",
|
|
25
|
-
"reserved": "رزرو شده",
|
|
26
|
-
"inUse": "در حال استفاده",
|
|
27
|
-
"maintenance": "تعمیر و نگهداری"
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
"carCategory": {
|
|
31
|
-
"groups": {
|
|
32
|
-
"general": "اطلاعات عمومی"
|
|
33
|
-
},
|
|
34
|
-
"fields": {
|
|
35
|
-
"name": "نام",
|
|
36
|
-
"title": "عنوان",
|
|
37
|
-
"description": "توضیحات",
|
|
38
|
-
"icon": "آیکون",
|
|
39
|
-
"isActive": "فعال"
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
"rentalRequest": {
|
|
43
|
-
"groups": {
|
|
44
|
-
"basic": "اطلاعات اصلی",
|
|
45
|
-
"location": "موقعیت",
|
|
46
|
-
"notes": "یادداشتها"
|
|
47
|
-
},
|
|
48
|
-
"fields": {
|
|
49
|
-
"car": "خودرو",
|
|
50
|
-
"user": "کاربر",
|
|
51
|
-
"startDate": "تاریخ شروع",
|
|
52
|
-
"endDate": "تاریخ پایان",
|
|
53
|
-
"status": "وضعیت",
|
|
54
|
-
"totalPrice": "قیمت کل",
|
|
55
|
-
"pickupLocation": "محل تحویل",
|
|
56
|
-
"dropoffLocation": "محل بازگشت",
|
|
57
|
-
"notes": "یادداشتها"
|
|
58
|
-
},
|
|
59
|
-
"status": {
|
|
60
|
-
"pending": "در انتظار",
|
|
61
|
-
"approved": "تایید شده",
|
|
62
|
-
"rejected": "رد شده",
|
|
63
|
-
"cancelled": "لغو شده",
|
|
64
|
-
"completed": "تکمیل شده"
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
"carReservation": {
|
|
68
|
-
"groups": {
|
|
69
|
-
"basic": "اطلاعات اصلی",
|
|
70
|
-
"timing": "زمانبندی",
|
|
71
|
-
"financial": "اطلاعات مالی",
|
|
72
|
-
"notes": "یادداشتها"
|
|
73
|
-
},
|
|
74
|
-
"fields": {
|
|
75
|
-
"car": "خودرو",
|
|
76
|
-
"user": "کاربر",
|
|
77
|
-
"rentalRequest": "درخواست اجاره",
|
|
78
|
-
"startDate": "تاریخ شروع",
|
|
79
|
-
"endDate": "تاریخ پایان",
|
|
80
|
-
"actualPickupTime": "زمان تحویل واقعی",
|
|
81
|
-
"actualReturnTime": "زمان بازگشت واقعی",
|
|
82
|
-
"status": "وضعیت",
|
|
83
|
-
"totalPrice": "قیمت کل",
|
|
84
|
-
"deposit": "ودیعه",
|
|
85
|
-
"additionalCharges": "هزینههای اضافی",
|
|
86
|
-
"chargeDescription": "شرح هزینه",
|
|
87
|
-
"chargeAmount": "مبلغ هزینه",
|
|
88
|
-
"notes": "یادداشتها"
|
|
89
|
-
},
|
|
90
|
-
"status": {
|
|
91
|
-
"reserved": "رزرو شده",
|
|
92
|
-
"inProgress": "در حال انجام",
|
|
93
|
-
"completed": "تکمیل شده",
|
|
94
|
-
"cancelled": "لغو شده",
|
|
95
|
-
"overdue": "تاخیر"
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
|
-
"invoice": {
|
|
99
|
-
"groups": {
|
|
100
|
-
"basic": "اطلاعات اصلی",
|
|
101
|
-
"items": "اقلام",
|
|
102
|
-
"payment": "پرداخت",
|
|
103
|
-
"notes": "یادداشتها"
|
|
104
|
-
},
|
|
105
|
-
"fields": {
|
|
106
|
-
"invoiceNumber": "شماره فاکتور",
|
|
107
|
-
"reservation": "رزرو",
|
|
108
|
-
"user": "کاربر",
|
|
109
|
-
"issueDate": "تاریخ صدور",
|
|
110
|
-
"dueDate": "تاریخ سررسید",
|
|
111
|
-
"status": "وضعیت",
|
|
112
|
-
"items": "اقلام",
|
|
113
|
-
"itemDescription": "شرح",
|
|
114
|
-
"itemQuantity": "تعداد",
|
|
115
|
-
"itemUnitPrice": "قیمت واحد",
|
|
116
|
-
"itemAmount": "مبلغ",
|
|
117
|
-
"subTotal": "جمع جزء",
|
|
118
|
-
"tax": "مالیات",
|
|
119
|
-
"totalAmount": "مبلغ کل",
|
|
120
|
-
"paidAmount": "مبلغ پرداختی",
|
|
121
|
-
"paymentStatus": "وضعیت پرداخت",
|
|
122
|
-
"paymentMethod": "روش پرداخت",
|
|
123
|
-
"notes": "یادداشتها"
|
|
124
|
-
},
|
|
125
|
-
"status": {
|
|
126
|
-
"draft": "پیشنویس",
|
|
127
|
-
"issued": "صادر شده",
|
|
128
|
-
"cancelled": "لغو شده"
|
|
129
|
-
},
|
|
130
|
-
"paymentStatus": {
|
|
131
|
-
"unpaid": "پرداخت نشده",
|
|
132
|
-
"partiallyPaid": "پرداخت ناقص",
|
|
133
|
-
"paid": "پرداخت شده",
|
|
134
|
-
"overdue": "سررسید شده"
|
|
135
|
-
}
|
|
136
|
-
},
|
|
137
|
-
"common": {
|
|
138
|
-
"create": "ایجاد",
|
|
139
|
-
"delete": "حذف",
|
|
140
|
-
"edit": "ویرایش",
|
|
141
|
-
"save": "ذخیره",
|
|
142
|
-
"cancel": "انصراف"
|
|
143
|
-
}
|
|
144
|
-
}
|