Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 2 additions & 2 deletions src/lib/components/list/list.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1223,9 +1223,9 @@ export class ListComponent extends NgxComponentDirective implements OnInit, OnDe
parseConditions(value: string | number | IFilterQuery): Condition<Model> {
let _condition: Condition<Model>;
const model = this.model as Model;
if (typeof value === Primitives.STRING || !isNaN(value as number)) {
if (typeof value === Primitives.STRING) {
_condition = Condition.attribute<Model>(this.pk as keyof Model).eq(
!isNaN(value as number) ? Number(value) : value,
this.pkType.toLocaleLowerCase() === Primitives.STRING ? value : Number(value),
);
for (const index of this.indexes as (keyof Model)[]) {
if (index === this.pk) continue;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/engine/NgxComponentDirective.ts
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@
const { repository, pk, pkType } = context;
this._repository = repository;
if (this.model && !this.pk) this.pk = pk;
this.pkType = pkType || Model.pk(repository.class);
this.pkType = pkType;
if (!this.modelName) this.modelName = repository.class.name;
}
}
Expand Down Expand Up @@ -1037,7 +1037,7 @@
}

// passed for ui decorators
override async submit(...args: unknown[]): Promise<any> {

Check warning on line 1040 in src/lib/engine/NgxComponentDirective.ts

View workflow job for this annotation

GitHub Actions / coverage (22)

Unexpected any. Specify a different type
this.log.for(this.submit).info(`submit for ${this.componentName} with ${JSON.stringify(args)}`);
}

Expand Down
7 changes: 4 additions & 3 deletions src/lib/i18n/data/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"greaterThanOrEqual": "This field must be greater than or equal to field {0}",
"form_control": "Controlador do formulário não encontrado para {0}.",
"not_found": "No records found with <span class=\"text-bold\">{0}: {1} in {2}</span>.",
"empty_options" : "No options available for required field {0}. Fix the data source."
"empty_options": "No options available for required field {0}. Fix the data source."
},
"operations": {
"read": {
Expand All @@ -42,7 +42,7 @@
"error": "Error creating item."
},
"update": {
"title": "Update",
"title": "Update",
"success": "Successfully updated item with {0} {1}.",
"error": "Error updating item with {0} {1}."
},
Expand All @@ -54,7 +54,8 @@
"multiple": {
"success": "Successfully processed all operations.",
"error": "Error processing operations."
}
},
"processing": "Processing {0}..."
},
"component": {
"crud_form": {
Expand Down
Loading