jhipster / jhipster-vuejs

A Vue.js blueprint for JHipster. It will use Vue.js as the frontend library!
https://www.jhipster.tech
Apache License 2.0
301 stars 179 forks source link

Improve routes #639

Closed yacosta738 closed 4 years ago

yacosta738 commented 4 years ago
CLAassistant commented 4 years ago

CLA assistant check
All committers have signed the CLA.

atomfrede commented 4 years ago

Great work @yuniel-acosta. One question/suggestion. Would it be possible to put the routes under the corresponding module? So not having all routes in one folder, but have the account routes in accounts etc.?

yacosta738 commented 4 years ago

@atomfrede It is possible, but I am not sure if it is a good option. I need the opinion of the community to reach an agreement and that everyone is satisfied

yacosta738 commented 4 years ago

@atomfrede, @pascalgrimaud, @nassimerrahoui Hello guys I need help with tests when using oauth2 authentication. I can't solve because it fails when importing routes

pascalgrimaud commented 4 years ago

@yuniel-acosta : did you manage to reproduce the issue locally ? If you didn't try yet:

If it passed locally, then, I'll try to find time tomorrow to have a look and reproduce. I can't right now, as I'm not with my computer

yacosta738 commented 4 years ago

@pascalgrimaud I can reproduce the errors locally and they are practically in the test files account.service.spec.ts, jhi-navbar.component.spec.ts, error.component.spec.ts

The error is when importing the module of the routes import router from '@/router';

Error output: TypeError: Cannot read property 'path' of undefined

      17 | 
      18 | // prettier-ignore
    > 19 | export default new Router({
            |                ^
      20 |   mode: 'history',
      21 |   routes: [
      22 |     {
pascalgrimaud commented 4 years ago

ok, @pascalgrimaud All work is done, @atomfrede suggests that I put the route files inside the corresponding module, personally I don't really like the idea but I need to know your opinion to make the relevant changes.

I don't like too. I find this new structure is good enough. So I'd prefer to keep like this, inside router/** So I think we are ready to merge this.

Are you OK with this @atomfrede ? I'd like to merge this and make a new release. So I can go on my work on merging this blueprint into main generator-jhipster :-)

atomfrede commented 4 years ago

Sure. Let's merge it

pascalgrimaud commented 4 years ago

For your information, I already have a Vue.js project, generated with generator-jhipster. It works on my machine. But some options don't work yet. I didn't finish all the tests, the CI, and the sub module page

So I need to include your change here in my branch !

pascalgrimaud commented 4 years ago

thanks a lot @yuniel-acosta FYI, the new release has been done :)

yacosta738 commented 4 years ago

You are welcome. It has been a pleasure for me to contribute to this incredible project. I hope to contribute more in the future

atomfrede commented 4 years ago

Thanks for the work @yuniel-acosta!