-
Notifications
You must be signed in to change notification settings - Fork 276
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
Convert editShow to Vue store and SFC #4486
Conversation
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just skimmed through...
38d911e
to
d8620ff
Compare
This comment has been minimized.
This comment has been minimized.
…eify-editShow # Conflicts: # themes-default/slim/src/store/modules/shows.js # themes-default/slim/views/editShow.mako # themes/dark/assets/js/vendors.js # themes/dark/templates/editShow.mako # themes/light/assets/js/vendors.js # themes/light/templates/editShow.mako
* Fixed bug in concattenating globalRequired words. * Removed mako vars from server/web/home/handler.py * Updated router.js for edit-show.vue component. * linting
I'm hijacking this PR. |
} | ||
|
||
const { indexer, id, $store } = this; | ||
$store.dispatch('setShow', { indexer, id, data, save: true }).then(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sharkykh I'm not totally sure. Should we call an action in vuex, and have that 1. update store then 2. update the show using apiv2? Or update the show from here, like it's now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@p0psicles
TL;DR: The action should call the patch and fetch the show again.
I didn't look at the rest of the code, but since some of the patch data can be ignored by the API handler (invalid values and such), and whatever you send does not necessarily become the new show config, I'd say we can't update the store using the same data that we're sending, and we must fetch the show after the patch is complete.
I don't see a way around this at the moment.
return this.$store.state.search.filters.ignored.map(x => x.toLowerCase()); | ||
}, | ||
globalRequired() { | ||
return this.$store.state.search.filters.required.map(x => x.toLowerCase()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was previously this.$store.state.search.filters.ignored.map(x => x.toLowerCase());
editShow is vueified and does not have the logic anymore to handle posts.
@sharkykh can you do a yarn dev for me? I still have my build env messed up |
Do you think we should merge it now? Edit: Medusa/themes-default/slim/src/components/show.vue Lines 73 to 76 in 317bcb3
The "show sub menu" makes use of the |
yeah lets merge |
TODO
double check some weird bug in massUpdate when checking multiple shows and running updateCan't reproduce it anymore ??