Skip to content
This repository was archived by the owner on Nov 21, 2024. It is now read-only.

Commit 11184b8

Browse files
committed
fix(web-entity): Add MessageService to all grid components
1 parent 37501f1 commit 11184b8

6 files changed

Lines changed: 19 additions & 9 deletions

File tree

srcgen/web-entity/%libs.platformFolder%/src/components/entities/%entity.name.kebab%/%entity.list.name.kebab%-grid/%entity.list.name.kebab%-grid.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { ErrorsExtractor, translate } from '@rucken/core';
44
import { <%=entity.name.camel%>, <%=entity.list.name.camel%>Config } from '<%=libs.coreData.name%>';
55
import { BsModalRef, BsModalService } from 'ngx-bootstrap/modal';
66
import { DynamicRepository, PaginationMeta } from 'ngx-repository';
7-
import { BaseEntityListComponent } from '@rucken/web';
7+
import { BaseEntityListComponent, MessageModalService } from '@rucken/web';
88
import { <%=entity.name.camel%>ModalComponent } from '../<%=entity.name.kebab%>-modal/<%=entity.name.kebab%>-modal.component';
99

1010

@@ -20,7 +20,8 @@ export class <%=entity.list.name.camel%>GridComponent extends BaseEntityListComp
2020
protected errorsExtractor: ErrorsExtractor,
2121
protected translateService: TranslateService,
2222
protected dynamicRepository: DynamicRepository,
23-
protected <%=entity.list.name.lower.camel%>Config: <%=entity.list.name.camel%>Config
23+
protected <%=entity.list.name.lower.camel%>Config: <%=entity.list.name.camel%>Config,
24+
protected messageModalService: MessageModalService
2425
) {
2526
super(
2627
dynamicRepository.fork <<%=entity.name.camel%>> (<%=entity.name.camel%>),

srcgen/web-entity/%libs.platformFolder%/src/components/entities/%entity.name.kebab%/%entity.list.name.kebab%-grid/%entity.list.name.kebab%-grid.module.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@ import { TranslateModule } from '@ngx-translate/core';
44
import { ModalModule } from 'ngx-bootstrap/modal';
55
import { PipesModule } from '@rucken/web';
66
import { EntityGridModule } from '@rucken/web';
7-
import { EntityModalModule } from '@rucken/web';
7+
import { EntityModalModule, MessageModalModule } from '@rucken/web';
88
import { <%=entity.name.camel%>ModalModule } from '../<%=entity.name.kebab%>-modal/<%=entity.name.kebab%>-modal.module';
99
import { <%=entity.list.name.camel%>GridComponent } from './<%=entity.list.name.kebab%>-grid.component';
1010

1111
@NgModule({
1212
imports: [
1313
CommonModule,
14+
MessageModalModule,
1415
TranslateModule.forChild(),
1516
EntityGridModule,
1617
EntityModalModule,

srcgen/web-entity/%libs.platformFolder%/src/components/entities/%entity.name.kebab%/%entity.name.kebab%-input/%entity.name.kebab%-input.component.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { ErrorsExtractor, translate } from '@rucken/core';
44
import { <%=entity.name.camel%>, <%=entity.list.name.camel%>Config } from '<%=libs.coreData.name%>';
55
import { BsModalRef, BsModalService } from 'ngx-bootstrap/modal';
66
import { DynamicRepository } from 'ngx-repository';
7+
import { MessageModalService } from '@rucken/web';
78
import { <%=entity.list.name.camel%>GridModalComponent } from '../<%=entity.list.name.kebab%>-grid-modal/<%=entity.list.name.kebab%>-grid-modal.component';
89
import { <%=entity.list.name.camel%>GridComponent } from '../<%=entity.list.name.kebab%>-grid/<%=entity.list.name.kebab%>-grid.component';
910

@@ -22,14 +23,16 @@ export class <%=entity.name.camel%>InputComponent extends <%=entity.list.name.ca
2223
protected errorsExtractor: ErrorsExtractor,
2324
protected translateService: TranslateService,
2425
protected dynamicRepository: DynamicRepository,
25-
protected <%=entity.list.name.lower.camel%>Config: <%=entity.list.name.camel%>Config
26+
protected <%=entity.list.name.lower.camel%>Config: <%=entity.list.name.camel%>Config,
27+
protected messageModalService: MessageModalService
2628
) {
2729
super(
2830
modalService,
2931
errorsExtractor,
3032
translateService,
3133
dynamicRepository,
32-
<%=entity.list.name.lower.camel%>Config
34+
<%=entity.list.name.lower.camel%>Config,
35+
messageModalService
3336
);
3437
}
3538
ngOnInit() {

srcgen/web-entity/%libs.platformFolder%/src/components/entities/%entity.name.kebab%/%entity.name.kebab%-input/%entity.name.kebab%-input.module.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@ import { CommonModule } from '@angular/common';
22
import { ModuleWithProviders, NgModule } from '@angular/core';
33
import { TranslateModule } from '@ngx-translate/core';
44
import { ModalModule } from 'ngx-bootstrap/modal';
5-
import { EntityInputModule } from '@rucken/web';
5+
import { EntityInputModule, MessageModalModule } from '@rucken/web';
66
import { <%=entity.list.name.camel%>GridModalModule } from '../<%=entity.list.name.kebab%>-grid-modal/<%=entity.list.name.kebab%>-grid-modal.module';
77
import { <%=entity.name.camel%>InputComponent } from './<%=entity.name.kebab%>-input.component';
88

99
@NgModule({
1010
imports: [
1111
CommonModule,
12+
MessageModalModule,
1213
TranslateModule.forChild(),
1314
EntityInputModule,
1415
<%=entity.list.name.camel%>GridModalModule,

srcgen/web-entity/%libs.platformFolder%/src/components/entities/%entity.name.kebab%/%entity.name.kebab%-select/%entity.name.kebab%-select.component.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { ErrorsExtractor } from '@rucken/core';
55
import { <%=entity.name.camel%>, <%=entity.list.name.camel%>Config } from '<%=libs.coreData.name%>';
66
import { BsModalService } from 'ngx-bootstrap/modal';
77
import { DynamicRepository } from 'ngx-repository';
8+
import { MessageModalService } from '@rucken/web';
89
import { <%=entity.list.name.camel%>GridComponent } from '../<%=entity.list.name.kebab%>-grid/<%=entity.list.name.kebab%>-grid.component';
910

1011

@@ -24,14 +25,16 @@ export class <%=entity.name.camel%>SelectComponent extends <%=entity.list.name.c
2425
protected errorsExtractor: ErrorsExtractor,
2526
protected translateService: TranslateService,
2627
protected dynamicRepository: DynamicRepository,
27-
protected <%=entity.list.name.lower.camel%>Config: <%=entity.list.name.camel%>Config
28+
protected <%=entity.list.name.lower.camel%>Config: <%=entity.list.name.camel%>Config,
29+
protected messageModalService: MessageModalService
2830
) {
2931
super(
3032
modalService,
3133
errorsExtractor,
3234
translateService,
3335
dynamicRepository,
34-
<%=entity.list.name.lower.camel%>Config
36+
<%=entity.list.name.lower.camel%>Config,
37+
messageModalService
3538
);
3639
}
3740
ngOnInit() {

srcgen/web-entity/%libs.platformFolder%/src/components/entities/%entity.name.kebab%/%entity.name.kebab%-select/%entity.name.kebab%-select.module.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@ import { CommonModule } from '@angular/common';
22
import { ModuleWithProviders, NgModule } from '@angular/core';
33
import { TranslateModule } from '@ngx-translate/core';
44
import { ModalModule } from 'ngx-bootstrap/modal';
5-
import { EntitySelectModule } from '@rucken/web';
5+
import { EntitySelectModule, MessageModalModule } from '@rucken/web';
66
import { <%=entity.list.name.camel%>GridModalModule } from '../<%=entity.list.name.kebab%>-grid-modal/<%=entity.list.name.kebab%>-grid-modal.module';
77
import { <%=entity.name.camel%>SelectComponent } from './<%=entity.name.kebab%>-select.component';
88

99
@NgModule({
1010
imports: [
1111
CommonModule,
12+
MessageModalModule,
1213
TranslateModule.forChild(),
1314
EntitySelectModule,
1415
<%=entity.list.name.camel%>GridModalModule,

0 commit comments

Comments
 (0)