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

Vuex-Crud Analysis and adaptation #11

Open
1 of 3 tasks
sgobotta opened this issue Dec 9, 2018 · 2 comments
Open
1 of 3 tasks

Vuex-Crud Analysis and adaptation #11

sgobotta opened this issue Dec 9, 2018 · 2 comments
Assignees
Labels
investigate Frequently related to functionality investigation or testing tasks

Comments

@sgobotta
Copy link
Member

sgobotta commented Dec 9, 2018

We decided to use vuex-crud for store management. Apaprently the urls are kind of fixed at the moment, for each crud modul.

  • Verify if we can dynamically use the urls on rest calls
  • Use vuex crud along with a data provider cilent
  • Decide if we want to colaborate with vuex-crud to implement a client feature
@sgobotta
Copy link
Member Author

sgobotta commented Dec 9, 2018

Apaprently vuex-crud provides a way to modify the parameters a url can accept, before the service is fetched.

(e.g.)
Implementation

  createCrudModule({
      resource: this.name,
      customUrlFn(id) {
        const rootUrl = 'http://localhost:8080/api/articles/'
        return id ? `${rootUrl}${id}` : rootUrl
      }
  });

Usage

  methods: {
    fetchResource: function() {
      const resourceName = this.name + "/fetchSingle";
      return this.$store.dispatch(resourceName, { id: this.$route.params.id });
    }
  }

@sgobotta
Copy link
Member Author

sgobotta commented Dec 9, 2018

It's been decided, we will generalize the default axios client vuex-crud ships with. WIP in this fork

@sgobotta sgobotta added the investigate Frequently related to functionality investigation or testing tasks label Dec 9, 2018
@sgobotta sgobotta added this to In progress in Current Tasks Dec 9, 2018
@sgobotta sgobotta self-assigned this Dec 9, 2018
@sgobotta sgobotta moved this from In progress to Backlog in Current Tasks Oct 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigate Frequently related to functionality investigation or testing tasks
Projects
Current Tasks
  
Backlog
Development

No branches or pull requests

1 participant