serenity-is / Serenity

Business Apps Made Simple with Asp.Net Core MVC / TypeScript
https://serenity.is
MIT License
2.57k stars 796 forks source link

i just wanna filter my oders per customer #7111

Closed IPolonio closed 3 months ago

IPolonio commented 3 months ago

Before submitting the bug report, please read and check the following items

What happened?

namespace MovieTutorial.CustomerPortal { @Serenity.Decorators.registerClass() export class OrderDetailEditDialog extends Common.GridEditorDialog { protected getFormKey() { return OrderDetailsForm.formKey; } protected getIdProperty() { return OrderDetailsRow.idProperty; } protected getLocalTextPrefix() { return OrderDetailsRow.localTextPrefix; } protected form: OrderDetailsForm; private orderd: OrderDetailEdit

    constructor() {
        super();
        this.form = new OrderDetailsForm(this.idPrefix);
    }

    protected afterLoadEntity() {
        super.afterLoadEntity();
        this.orderd.personID = this.entityId;

    }
}

}

namespace MovieTutorial.CustomerPortal { @Serenity.Decorators.registerEditor() export class OrderDetailEdit extends Serenity.EntityGrid<OrderDetailsRow, any> { protected getColumnsKey() { return "CustomerPortal.OrderDetails"; } protected getDialogType() { return OrderDetailsDialog; } protected getIdProperty() { return OrderDetailsRow.idProperty; } protected getLocalTextPrefix() { return OrderDetailsRow.localTextPrefix; } protected getService() { return OrderDetailsService.baseUrl; }

    private _personID: number;

    get personID() {
        return this._personID;
        console.log(this.personID);
    }

    set personID(value: number) {
        if (this._personID != value) {
            this._personID = value;
            this.setEquality(OrderDetailsRow.Fields.OrderId, value);
            this.refresh();

        }
        console.log(this.personID);
    }

    constructor(container: JQuery) {
        super(container);
    }

    protected getButtons() {
        return null;
    }

    protected getInitialTitle() {
        return null;
    }

    protected usePager() {
        return false;
    }

    protected getGridCanLoad() {
        return this.personID != null;

    }
}

}

What did you expect to happen?

its expected to separate the orders by customers

How to reproduce?

just run my code

What Serenity Nuget Versions are you seeing the problem on? (separated by comma)

Serenity Obsolete 2.0

Relevant log output

No response

Serene template version

No response

Sergen version

No response

Code editor

No response

Operating System

No response

Node.js version

No response

TypeScript version

No response

Database type and version

No response

On which device do you see the problem?

No response

On which operating system do you see the problem?

No response

On which browsers do you see the problem?

No response

On what version of the browsers do you see the problem?

No response

Additional information

No response