Skip to content
This repository was archived by the owner on Jul 18, 2023. It is now read-only.

Commit d7668ca

Browse files
fix names for files and language string [Angular]
1 parent b713f28 commit d7668ca

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

UI/WEB/Views/GeneratorTemplates/Angular2/containers/list-and-search-html.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
<div class="row">
1313
<div class="col-sm-6 col-md-8">
14-
<a [routerLink]="[ '/{{ camel_case($gen->entityName()) }}/create' ]" class="btn btn-primary">
14+
<a [routerLink]="[ '/{{ $gen->slugEntityName() }}/create' ]" class="btn btn-primary">
1515
<i class="glyphicon glyphicon-plus"></i>
1616
<span translate>{{ $upEntity }}.create</span>
1717
</a>

UI/WEB/Views/GeneratorTemplates/Angular2/effects/effects.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
public constructor(
1919
private actions$: Actions,
20-
private {{ $service = $camelEntity.'Service' }}: {{ $entitySin }}Service,
20+
private {{ $service = camel_case($entitySin).'Service' }}: {{ $entitySin }}Service,
2121
private formModelParser: FormModelParser
2222
) { }
2323

@@ -37,7 +37,7 @@
3737
.ofType({{ $actions }}.ActionTypes.GET_{{ $gen->entityNameSnakeCase() }}_FORM_MODEL)
3838
.switchMap(() => {
3939
return this.{{ $service }}.get{{ $gen->entityName() }}FormModel()
40-
.map((data) => this.formModelParser.parse(data, '{{ strtoupper($gen->entityName()) }}.fields.{{ camel_case($gen->entityName(true)) }}.'))
40+
.map((data) => this.formModelParser.parse(data, this.{{ $service }}.fieldsLangNamespace))
4141
.map((data) => { return new {{ $actions }}.GetFormModelSuccessAction(data)})
4242
.catch((error) => {
4343
error.type = 'danger';

UI/WEB/Views/GeneratorTemplates/Angular2/services/service.blade.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
export class {{ $entitySin }}Service extends Service {
1515

1616
protected API_ENDPOINT: string = '{{ str_slug($gen->tableName, $separator = "-") }}';
17-
protected langNamespace: string = '{{ strtoupper($gen->entityName()) }}';
17+
public langNamespace: string = '{{ $gen->entityNameSnakeCase() }}';
18+
public fieldsLangNamespace: string = '{{ $gen->entityNameSnakeCase() }}.fields.{{ $gen->tableName }}.';
1819

1920
public constructor(
2021
private http: Http,

0 commit comments

Comments
 (0)