Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Organiser needs to specify an Event ID? #13

Open
skemp353 opened this issue Oct 17, 2016 · 3 comments
Open

Organiser needs to specify an Event ID? #13

skemp353 opened this issue Oct 17, 2016 · 3 comments

Comments

@skemp353
Copy link
Contributor

It wasn't obvious to me when I created my first event what I should use as the Event ID (was it a name or a number?), then when I realised it was just a number I wondered why I needed to provide it at all. Surely the system could just increment to the next available ID?

If possible it would be good to hide this from the end user and let the system just create the ID automatically.

@gregorwolf
Copy link
Contributor

You're absolutely right. The field should be hidden in create mode. The controller should take care about to fill it with some number. The number assignment will happen in the backend anyway.

@skemp353
Copy link
Contributor Author

I tried hiding/removing the "ID" field and making it not required, but I think it's a bit more complicated than that, like you said it is easy to hide it in create mode but then I think it needs some default value or else it throws an error like this:

image

I am probably missing the easy way to fix this, perhaps someone can point me in the right direction.

I've also noticed that the fields:

  • Location
  • Event Date
  • Maximum number of participants

Are all required fields but not marked as such on the UI. Should I raise a separate issue or can these all be fixed together with this issue?

@skemp353
Copy link
Contributor Author

skemp353 commented Oct 18, 2016

If I add this code to the onSave function in the CreateEntity.controller.js I can get it to work, but it feels like a bit of a hack to me, I am hoping someone can show me a better way.

if (this._oViewModel.getProperty("/mode") === "create") {

    //Default in a dummy ID value 999999999, this is replace by the DB anyway
    this.oView.byId("ID_id").setValue(999999999);

}

Thanks. Simon.

gregorwolf added a commit that referenced this issue Sep 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants